diff --git a/Gemfile b/Gemfile index bb0823f8c..2ded8a0dc 100644 --- a/Gemfile +++ b/Gemfile @@ -5,10 +5,11 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" } gemspec +gem("rubydex", ">= 0.2.3") + # Specify the same dependency sources as the application Gemfile gem("spring") -gem("constant_resolver", require: false) gem("rubocop-performance", require: false) gem("rubocop-sorbet", require: false) gem("mocha", require: false) @@ -25,3 +26,7 @@ gem("m") gem("rake") gem("sorbet-static") gem("zeitwerk") + +# Ruby 4.0 removed ostruct from stdlib; yard/tapioca need it +gem("ostruct") +gem("mutex_m") diff --git a/Gemfile.lock b/Gemfile.lock index 1299828d3..c5dcbf776 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,15 +3,11 @@ PATH specs: packwerk (3.3.0) activesupport (>= 6.0) - ast benchmark - better_html bundler - constant_resolver (>= 0.3) - parallel (< 2) - parser + herb prism (>= 1.4.0) - zeitwerk (>= 2.6.1) + rubydex (>= 0.2.3) GEM remote: https://rubygems.org/ @@ -50,26 +46,22 @@ GEM ast (2.4.3) base64 (0.3.0) benchmark (0.5.0) - better_html (2.1.1) - actionview (>= 6.0) - activesupport (>= 6.0) - ast (~> 2.0) - erubi (~> 1.4) - parser (>= 2.4) - smart_properties bigdecimal (4.1.2) builder (3.3.0) byebug (11.1.3) cgi (0.5.1) concurrent-ruby (1.3.6) connection_pool (3.0.2) - constant_resolver (0.3.0) crass (1.0.6) date (3.4.1) drb (2.2.3) erb (4.0.4.1) cgi (>= 0.3.3) erubi (1.13.1) + herb (0.10.1-aarch64-linux-gnu) + herb (0.10.1-arm64-darwin) + herb (0.10.1-x86_64-darwin) + herb (0.10.1-x86_64-linux-gnu) i18n (1.14.8) concurrent-ruby (~> 1.0) io-console (0.8.0) @@ -94,6 +86,7 @@ GEM minitest-mock (5.27.0) mocha (2.5.0) ruby2_keywords (>= 0.0.5) + mutex_m (0.3.0) netrc (0.11.0) nokogiri (1.19.3-aarch64-linux-gnu) racc (~> 1.4) @@ -103,6 +96,7 @@ GEM racc (~> 1.4) nokogiri (1.19.3-x86_64-linux-gnu) racc (~> 1.4) + ostruct (0.6.3) parallel (1.28.0) parser (3.3.11.1) ast (~> 2.4.1) @@ -180,12 +174,11 @@ GEM rubocop (>= 0.90.0) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - rubydex (0.2.0-aarch64-linux) - rubydex (0.2.0-arm64-darwin) - rubydex (0.2.0-x86_64-darwin) - rubydex (0.2.0-x86_64-linux) + rubydex (0.2.3-aarch64-linux) + rubydex (0.2.3-arm64-darwin) + rubydex (0.2.3-x86_64-darwin) + rubydex (0.2.3-x86_64-linux) securerandom (0.4.1) - smart_properties (1.17.0) sorbet (0.6.13184) sorbet-static (= 0.6.13184) sorbet-runtime (0.6.13184) @@ -232,6 +225,7 @@ PLATFORMS arm64-darwin-21 arm64-darwin-22 arm64-darwin-23 + arm64-darwin-24 arm64-darwin-25 x86_64-darwin x86_64-darwin-20 @@ -239,11 +233,12 @@ PLATFORMS DEPENDENCIES byebug - constant_resolver m minitest-focus minitest-mock mocha + mutex_m + ostruct packwerk! railties rake @@ -251,6 +246,7 @@ DEPENDENCIES rubocop-performance rubocop-shopify rubocop-sorbet + rubydex (>= 0.2.3) sorbet-static spring tapioca diff --git a/exe/packwerk b/exe/packwerk index 5f01582e1..7ddcfaeb3 100755 --- a/exe/packwerk +++ b/exe/packwerk @@ -3,9 +3,6 @@ require "packwerk" -# Needs to be run in test environment in order to have test helper paths available in the autoload paths -ENV["RAILS_ENV"] = "test" - # Command line arguments needs to be duplicated because spring modifies it packwerk_argv = ARGV.dup cli = Packwerk::Cli.new(style: Packwerk::OutputStyles::Coloured.new) diff --git a/lib/packwerk.rb b/lib/packwerk.rb index a4e34d621..e90929f11 100644 --- a/lib/packwerk.rb +++ b/lib/packwerk.rb @@ -9,6 +9,8 @@ require "active_support/core_ext/string" # Provides Object#to_json require "active_support/core_ext/object/json" +# Provides Object#present? / #blank? +require "active_support/core_ext/object/blank" module Packwerk extend ActiveSupport::Autoload @@ -28,7 +30,6 @@ module Packwerk autoload :PackageSet autoload :PackageTodo autoload :Parsers - autoload :RailsLoadPaths autoload :Reference autoload :ReferenceOffense autoload :Validator @@ -56,24 +57,11 @@ module Validators # Private APIs # Please submit an issue if you have a use-case for these autoload :ApplicationValidator - autoload :AssociationInspector - autoload :Cache - autoload :ConstantDiscovery - autoload :ConstantNameInspector - autoload :ConstNodeInspector autoload :ExtensionLoader - autoload :FileProcessor autoload :FilesForProcessing autoload :Graph - autoload :NodeHelpers - autoload :NodeProcessor - autoload :NodeProcessorFactory - autoload :NodeVisitor - autoload :ParsedConstantDefinitions autoload :ParseRun - autoload :ReferenceExtractor autoload :RunContext - autoload :UnresolvedReference module Generators extend ActiveSupport::Autoload diff --git a/lib/packwerk/application_validator.rb b/lib/packwerk/application_validator.rb index 5be79fa06..3d142d7aa 100644 --- a/lib/packwerk/application_validator.rb +++ b/lib/packwerk/application_validator.rb @@ -1,7 +1,7 @@ # typed: strict # frozen_string_literal: true -require "constant_resolver" +require "rubydex" require "pathname" require "yaml" @@ -71,18 +71,23 @@ def check_package_manifest_syntax(configuration) #: (Configuration configuration) -> Validator::Result def check_application_structure(configuration) - resolver = ConstantResolver.new( - root_path: configuration.root_path.to_s, - load_paths: configuration.load_paths, - exclude: configuration.exclude, - ) - - begin - resolver.file_map + graph = Rubydex::Graph.new(workspace_path: configuration.root_path) + files = FilesForProcessing.fetch( + relative_file_paths: [], + configuration: configuration, + ).files.to_a + graph.index_all(files) + graph.resolve + + diagnostics = graph.diagnostics + if diagnostics.empty? Validator::Result.new(ok: true) - rescue => e - Validator::Result.new(ok: false, error_value: e.message) + else + messages = diagnostics.map(&:message).join("\n") + Validator::Result.new(ok: false, error_value: messages) end + rescue => e + Validator::Result.new(ok: false, error_value: e.message) end #: (Configuration configuration) -> Validator::Result diff --git a/lib/packwerk/association_inspector.rb b/lib/packwerk/association_inspector.rb deleted file mode 100644 index b3f984948..000000000 --- a/lib/packwerk/association_inspector.rb +++ /dev/null @@ -1,77 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -module Packwerk - # Extracts the implicit constant reference from an active record association - class AssociationInspector - include ConstantNameInspector - - RAILS_ASSOCIATIONS = [ - :belongs_to, - :has_many, - :has_one, - :has_and_belongs_to_many, - ].to_set #: Set[Symbol] - - #: ( - #| inflector: singleton(ActiveSupport::Inflector), - #| ?custom_associations: Set[Symbol], - #| ?excluded_files: Set[String] - #| ) -> void - def initialize(inflector:, custom_associations: Set.new, excluded_files: Set.new) - @inflector = inflector - @associations = RAILS_ASSOCIATIONS + custom_associations #: Set[Symbol] - @excluded_files = excluded_files #: Set[String] - end - - # @override - #: (AST::Node node, ancestors: Array[AST::Node], relative_file: String) -> String? - def constant_name_from_node(node, ancestors:, relative_file:) - return unless NodeHelpers.method_call?(node) - return if excluded?(relative_file) - return unless association?(node) - - arguments = NodeHelpers.method_arguments(node) - return unless (association_name = association_name(arguments)) - - if (class_name_node = custom_class_name(arguments)) - return unless NodeHelpers.string?(class_name_node) - - NodeHelpers.literal_value(class_name_node) - else - @inflector.classify(association_name.to_s) - end - end - - private - - #: (String relative_file) -> bool - def excluded?(relative_file) - @excluded_files.include?(relative_file) - end - - #: (AST::Node node) -> bool - def association?(node) - method_name = NodeHelpers.method_name(node) - @associations.include?(method_name) - end - - #: (Array[AST::Node] arguments) -> AST::Node? - def custom_class_name(arguments) - association_options = arguments.detect { |n| NodeHelpers.hash?(n) } - return unless association_options - - NodeHelpers.value_from_hash(association_options, :class_name) - end - - #: (Array[AST::Node] arguments) -> (Symbol | String)? - def association_name(arguments) - association_name_node = arguments[0] #: as !nil - return unless NodeHelpers.symbol?(association_name_node) - - NodeHelpers.literal_value(association_name_node) - end - end - - private_constant :AssociationInspector -end diff --git a/lib/packwerk/cache.rb b/lib/packwerk/cache.rb deleted file mode 100644 index f37a1a227..000000000 --- a/lib/packwerk/cache.rb +++ /dev/null @@ -1,184 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -require "digest" - -module Packwerk - class Cache - class CacheContents - #: String - attr_reader :file_contents_digest - - #: Array[UnresolvedReference] - attr_reader :unresolved_references - - #: (file_contents_digest: String, unresolved_references: Array[UnresolvedReference]) -> void - def initialize(file_contents_digest:, unresolved_references:) - @file_contents_digest = file_contents_digest - @unresolved_references = unresolved_references - end - - class << self - #: (String serialized_cache_contents) -> CacheContents - def deserialize(serialized_cache_contents) - cache_contents_json = JSON.parse(serialized_cache_contents) - unresolved_references = cache_contents_json["unresolved_references"].map do |json| - UnresolvedReference.new( - constant_name: json["constant_name"], - namespace_path: json["namespace_path"], - relative_path: json["relative_path"], - source_location: Node::Location.new(json["source_location"]["line"], json["source_location"]["column"],) - ) - end - - CacheContents.new( - file_contents_digest: cache_contents_json["file_contents_digest"], - unresolved_references: unresolved_references, - ) - end - end - - #: (*untyped _args) -> String - def to_json(*_args) - JSON.generate({ - file_contents_digest: @file_contents_digest, - unresolved_references: @unresolved_references.map do |ref| - source_location = ref.source_location #: as !nil - - { - constant_name: ref.constant_name, - namespace_path: ref.namespace_path, - relative_path: ref.relative_path, - source_location: { line: source_location.line, column: source_location.column }, - } - end, - }) - end - - #: -> String - def serialize - to_json - end - end - - #: type cache_shape = Hash[String, CacheContents] - - #: (enable_cache: bool, cache_directory: Pathname, config_path: String?) -> void - def initialize(enable_cache:, cache_directory:, config_path:) - @enable_cache = enable_cache - @cache = {} #: cache_shape - @files_by_digest = {} #: Hash[String, String] - @config_path = config_path - @cache_directory = cache_directory - - if @enable_cache - create_cache_directory! - bust_cache_if_packwerk_yml_has_changed! - bust_cache_if_inflections_have_changed! - end - end - - #: -> void - def bust_cache! - FileUtils.rm_rf(@cache_directory) - end - - #: (String file_path) { -> Array[UnresolvedReference] } -> Array[UnresolvedReference] - def with_cache(file_path, &block) - return yield unless @enable_cache - - cache_location = @cache_directory.join(digest_for_string(file_path)) - - cache_contents = if cache_location.exist? - CacheContents.deserialize(cache_location.read) #: CacheContents - end - - file_contents_digest = digest_for_file(file_path) - - if !cache_contents.nil? && cache_contents.file_contents_digest == file_contents_digest - Debug.out("Cache hit for #{file_path}") - - cache_contents.unresolved_references - else - Debug.out("Cache miss for #{file_path}") - - unresolved_references = yield - - cache_contents = CacheContents.new( - file_contents_digest: file_contents_digest, - unresolved_references: unresolved_references, - ) - cache_location.write(cache_contents.serialize) - - unresolved_references - end - end - - #: (String file) -> String - def digest_for_file(file) - digest_for_string(File.read(file)) - end - - #: (String str) -> String - def digest_for_string(str) - # MD5 appears to be the fastest - # https://gist.github.com/morimori/1330095 - Digest::MD5.hexdigest(str) - end - - #: -> void - def bust_cache_if_packwerk_yml_has_changed! - return nil if @config_path.nil? - - bust_cache_if_contents_have_changed(File.read(@config_path), :packwerk_yml) - end - - #: -> void - def bust_cache_if_inflections_have_changed! - bust_cache_if_contents_have_changed(YAML.dump(ActiveSupport::Inflector.inflections), :inflections) - end - - #: (String contents, Symbol contents_key) -> void - def bust_cache_if_contents_have_changed(contents, contents_key) - current_digest = digest_for_string(contents) - cached_digest_path = @cache_directory.join(contents_key.to_s) - - if !cached_digest_path.exist? - # In this case, we have nothing cached - # We save the current digest. This way the next time we compare current digest to cached digest, - # we can accurately determine if we should bust the cache - cached_digest_path.write(current_digest) - - nil - elsif cached_digest_path.read == current_digest - Debug.out("#{contents_key} contents have NOT changed, preserving cache") - else - Debug.out("#{contents_key} contents have changed, busting cache") - - bust_cache! - create_cache_directory! - - cached_digest_path.write(current_digest) - end - end - - #: -> void - def create_cache_directory! - FileUtils.mkdir_p(@cache_directory) - end - end - - class Debug - class << self - #: (String out) -> void - def out(out) - if ENV["DEBUG_PACKWERK_CACHE"] - puts(out) - end - end - end - end - - private_constant :Cache - private_constant :Debug -end diff --git a/lib/packwerk/commands/uses_parse_run.rb b/lib/packwerk/commands/uses_parse_run.rb index 1aae48eb9..851c18d62 100644 --- a/lib/packwerk/commands/uses_parse_run.rb +++ b/lib/packwerk/commands/uses_parse_run.rb @@ -40,8 +40,20 @@ def offenses_formatter_from_options #: -> ParseRun def parse_run + all_files = if @files_for_processing.files_specified? + # Scoped check -- compute full workspace for indexing + FilesForProcessing.fetch( + relative_file_paths: [], + configuration: configuration, + ).files + else + # Full check -- the file set IS the workspace + @files_for_processing.files + end + ParseRun.new( relative_file_set: @files_for_processing.files, + all_files: all_files, parallel: configuration.parallel?, ) end diff --git a/lib/packwerk/configuration.rb b/lib/packwerk/configuration.rb index 8c7c752d6..d2c943303 100644 --- a/lib/packwerk/configuration.rb +++ b/lib/packwerk/configuration.rb @@ -85,9 +85,12 @@ def initialize(configs = {}, config_path: nil) end end + # Load paths were used by the old ConstantResolver to map constants to file paths + # via Zeitwerk conventions. Rubydex resolves constants from actual parsed definitions, + # so load paths are no longer needed. Returns an empty hash for backward compatibility. #: -> Hash[String, Module[top]] def load_paths - @load_paths ||= RailsLoadPaths.for(@root_path, environment: "test") #: Hash[String, Module[top]]? + {} end #: -> bool diff --git a/lib/packwerk/const_node_inspector.rb b/lib/packwerk/const_node_inspector.rb deleted file mode 100644 index b42903079..000000000 --- a/lib/packwerk/const_node_inspector.rb +++ /dev/null @@ -1,53 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -module Packwerk - # Extracts a constant name from an AST node of type :const - class ConstNodeInspector - include ConstantNameInspector - - # @override - #: (AST::Node node, ancestors: Array[AST::Node], relative_file: String) -> String? - def constant_name_from_node(node, ancestors:, relative_file:) - return nil unless NodeHelpers.constant?(node) - - parent = ancestors.first - - # Only process the root `const` node for namespaced constant references. For example, in the - # reference `Spam::Eggs::Thing`, we only process the const node associated with `Spam`. - return nil unless root_constant?(parent) - - if parent && constant_in_module_or_class_definition?(node, parent: parent) - fully_qualify_constant(ancestors) - else - begin - NodeHelpers.constant_name(node) - rescue NodeHelpers::TypeError - nil - end - end - end - - private - - #: (AST::Node? parent) -> bool - def root_constant?(parent) - !(parent && NodeHelpers.constant?(parent)) - end - - #: (AST::Node node, parent: AST::Node) -> bool? - def constant_in_module_or_class_definition?(node, parent:) - parent_name = NodeHelpers.module_name_from_definition(parent) - parent_name && parent_name == NodeHelpers.constant_name(node) - end - - #: (Array[AST::Node] ancestors) -> String - def fully_qualify_constant(ancestors) - # We're defining a class with this name, in which case the constant is implicitly fully qualified by its - # enclosing namespace - "::" + NodeHelpers.parent_module_name(ancestors: ancestors) - end - end - - private_constant :ConstNodeInspector -end diff --git a/lib/packwerk/constant_discovery.rb b/lib/packwerk/constant_discovery.rb deleted file mode 100644 index 5f5e8416e..000000000 --- a/lib/packwerk/constant_discovery.rb +++ /dev/null @@ -1,64 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -require "constant_resolver" - -module Packwerk - # Get information about unresolved constants without loading the application code. - # Information gathered: Fully qualified name, path to file containing the definition, package, - # and visibility (public/private to the package). - # - # The implementation makes a few assumptions about the code base: - # - `Something::SomeOtherThing` is defined in a path of either `something/some_other_thing.rb` or `something.rb`, - # relative to the load path. Rails' `zeitwerk` autoloader makes the same assumption. - # - It is OK to not always infer the exact file defining the constant. For example, when a constant is inherited, we - # have no way of inferring the file it is defined in. You could argue though that inheritance means that another - # constant with the same name exists in the inheriting class, and this view is sufficient for all our use cases. - class ConstantDiscovery - # @param constant_resolver [ConstantResolver] - # @param packages [Packwerk::PackageSet] - #: (constant_resolver: ConstantResolver, packages: Packwerk::PackageSet) -> void - def initialize(constant_resolver:, packages:) - @packages = packages - @resolver = constant_resolver - end - - # Get the package that owns a given file path. - # - # @param path [String] the file path - # - # @return [Packwerk::Package] the package that contains the given file, - # or nil if the path is not owned by any component - #: (String path) -> Packwerk::Package - def package_from_path(path) - @packages.package_from_path(path) - end - - # Analyze a constant via its name. - # If the constant is unresolved, we need the current namespace path to correctly infer its full name - # - # @param const_name [String] The unresolved constant's name. - # @param current_namespace_path [Array] (optional) The namespace of the context in which the constant is - # used, e.g. ["Apps", "Models"] for `Apps::Models`. Defaults to [] which means top level. - # @return [ConstantContext] - #: (String const_name, ?current_namespace_path: Array[String]?) -> ConstantContext? - def context_for(const_name, current_namespace_path: []) - begin - constant = @resolver.resolve(const_name, current_namespace_path: current_namespace_path) - rescue ConstantResolver::Error => e - raise(ConstantResolver::Error, e.message) - end - - return unless constant - - package = @packages.package_from_path(constant.location) - ConstantContext.new( - constant.name, - constant.location, - package, - ) - end - end - - private_constant :ConstantDiscovery -end diff --git a/lib/packwerk/constant_name_inspector.rb b/lib/packwerk/constant_name_inspector.rb deleted file mode 100644 index b4655082f..000000000 --- a/lib/packwerk/constant_name_inspector.rb +++ /dev/null @@ -1,16 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -require "ast" - -module Packwerk - # An interface describing an object that can extract a constant name from an AST node. - # @interface - module ConstantNameInspector - # @abstract - #: (::AST::Node node, ancestors: Array[::AST::Node], relative_file: String) -> String? - def constant_name_from_node(node, ancestors:, relative_file:) = raise NotImplementedError, "Abstract method called" - end - - private_constant :ConstantNameInspector -end diff --git a/lib/packwerk/file_processor.rb b/lib/packwerk/file_processor.rb deleted file mode 100644 index 543a5b18e..000000000 --- a/lib/packwerk/file_processor.rb +++ /dev/null @@ -1,93 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -require "parser" - -module Packwerk - class FileProcessor - class UnknownFileTypeResult < Offense - #: (file: String) -> void - def initialize(file:) - super(file: file, message: "unknown file type") - end - end - - #: (node_processor_factory: NodeProcessorFactory, cache: Cache, ?parser_factory: Parsers::Factory?) -> void - def initialize(node_processor_factory:, cache:, parser_factory: nil) - @node_processor_factory = node_processor_factory - @cache = cache - @parser_factory = parser_factory || Packwerk::Parsers::Factory.instance #: Parsers::Factory - end - - class ProcessedFile - #: Array[UnresolvedReference] - attr_reader :unresolved_references - - #: Array[Offense] - attr_reader :offenses - - #: (?unresolved_references: Array[UnresolvedReference], ?offenses: Array[Offense]) -> void - def initialize(unresolved_references: [], offenses: []) - @unresolved_references = unresolved_references - @offenses = offenses - end - end - - #: (String relative_file) -> ProcessedFile - def call(relative_file) - parser = parser_for(relative_file) - if parser.nil? - return ProcessedFile.new(offenses: [UnknownFileTypeResult.new(file: relative_file)]) - end - - unresolved_references = @cache.with_cache(relative_file) do - node = parse_into_ast(relative_file, parser) - return ProcessedFile.new unless node - - references_from_ast(node, relative_file) - end - - ProcessedFile.new(unresolved_references: unresolved_references) - rescue Parsers::ParseError => e - ProcessedFile.new(offenses: [e.result]) - rescue StandardError => e - message = <<~MSG - Packwerk encountered an internal error. - For now, you can add this file to `packwerk.yml` `exclude` list. - Please file an issue and include this error message and stacktrace: - - #{e.message} #{e.backtrace&.join("\n")}" - MSG - - offense = Parsers::ParseResult.new(file: relative_file, message: message) - ProcessedFile.new(offenses: [offense]) - end - - private - - #: (Parser::AST::Node node, String relative_file) -> Array[UnresolvedReference] - def references_from_ast(node, relative_file) - references = [] - - node_processor = @node_processor_factory.for(relative_file: relative_file, node: node) - node_visitor = NodeVisitor.new(node_processor: node_processor) - node_visitor.visit(node, ancestors: [], result: references) - - references - end - - #: (String relative_file, Parsers::ParserInterface parser) -> untyped - def parse_into_ast(relative_file, parser) - File.open(relative_file, "r", nil, external_encoding: Encoding::UTF_8) do |file| - parser.call(io: file, file_path: relative_file) - end - end - - #: (String file_path) -> Parsers::ParserInterface? - def parser_for(file_path) - @parser_factory.for_path(file_path) - end - end - - private_constant :FileProcessor -end diff --git a/lib/packwerk/node_helpers.rb b/lib/packwerk/node_helpers.rb deleted file mode 100644 index dd48d78b1..000000000 --- a/lib/packwerk/node_helpers.rb +++ /dev/null @@ -1,336 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -require "parser" -require "parser/ast/node" - -module Packwerk - # Convenience methods for working with Parser::AST::Node nodes. - module NodeHelpers - class TypeError < ArgumentError; end - - class << self - #: (AST::Node class_or_module_node) -> String - def class_or_module_name(class_or_module_node) - case type_of(class_or_module_node) - when CLASS, MODULE - # (class (const nil :Foo) (const nil :Bar) (nil)) - # "class Foo < Bar; end" - # (module (const nil :Foo) (nil)) - # "module Foo; end" - identifier = class_or_module_node.children[0] - constant_name(identifier) - else - raise TypeError - end - end - - #: (AST::Node constant_node) -> String - def constant_name(constant_node) - case type_of(constant_node) - when CONSTANT_ROOT_NAMESPACE - "" - when CONSTANT, CONSTANT_ASSIGNMENT, SELF - # (const nil :Foo) - # "Foo" - # (const (cbase) :Foo) - # "::Foo" - # (const (lvar :a) :Foo) - # "a::Foo" - # (casgn nil :Foo (int 1)) - # "Foo = 1" - # (casgn (cbase) :Foo (int 1)) - # "::Foo = 1" - # (casgn (lvar :a) :Foo (int 1)) - # "a::Foo = 1" - # (casgn (self) :Foo (int 1)) - # "self::Foo = 1" - namespace, name = constant_node.children - - if namespace - [constant_name(namespace), name].join("::") - else - name.to_s - end - else - raise TypeError - end - end - - #: (AST::Node node) ?{ (Parser::AST::Node arg0) -> void } -> Enumerable[AST::Node] - def each_child(node, &block) - if block - node.children.each do |child| - yield(child) if child.is_a?(Parser::AST::Node) - end - else - enum_for(:each_child, node) - end - end - - #: (AST::Node starting_node, ancestors: Array[AST::Node]) -> Array[String] - def enclosing_namespace_path(starting_node, ancestors:) - ancestors.select { |n| [CLASS, MODULE].include?(type_of(n)) } - .each_with_object([]) do |node, namespace| - # when evaluating `class Child < Parent`, the const node for `Parent` is a child of the class - # node, so it'll be an ancestor, but `Parent` is not evaluated in the namespace of `Child`, so - # we need to skip it here - next if type_of(node) == CLASS && parent_class(node) == starting_node - - namespace.prepend(class_or_module_name(node)) - end - end - - #: (AST::Node string_or_symbol_node) -> (String | Symbol) - def literal_value(string_or_symbol_node) - case type_of(string_or_symbol_node) - when STRING, SYMBOL - # (str "foo") - # "'foo'" - # (sym :foo) - # ":foo" - string_or_symbol_node.children[0] - else - raise TypeError - end - end - - #: (Parser::AST::Node node) -> Node::Location - def location(node) - location = node.location - Node::Location.new(location.line, location.column) - end - - #: (AST::Node node) -> bool - def constant?(node) - type_of(node) == CONSTANT - end - - #: (AST::Node node) -> bool - def constant_assignment?(node) - type_of(node) == CONSTANT_ASSIGNMENT - end - - #: (AST::Node node) -> bool - def class?(node) - type_of(node) == CLASS - end - - #: (AST::Node node) -> bool - def method_call?(node) - type_of(node) == METHOD_CALL - end - - #: (AST::Node node) -> bool - def hash?(node) - type_of(node) == HASH - end - - #: (AST::Node node) -> bool - def string?(node) - type_of(node) == STRING - end - - #: (AST::Node node) -> bool - def symbol?(node) - type_of(node) == SYMBOL - end - - #: (AST::Node method_call_node) -> Array[AST::Node] - def method_arguments(method_call_node) - raise TypeError unless method_call?(method_call_node) - - # (send (lvar :foo) :bar (int 1)) - # "foo.bar(1)" - method_call_node.children.slice(2..-1) - end - - #: (AST::Node method_call_node) -> Symbol - def method_name(method_call_node) - raise TypeError unless method_call?(method_call_node) - - # (send (lvar :foo) :bar (int 1)) - # "foo.bar(1)" - method_call_node.children[1] - end - - #: (AST::Node node) -> String? - def module_name_from_definition(node) - case type_of(node) - when CLASS, MODULE - # "class My::Class; end" - # "module My::Module; end" - class_or_module_name(node) - when CONSTANT_ASSIGNMENT - # "My::Class = ..." - # "My::Module = ..." - rvalue = node.children.last - - case type_of(rvalue) - when METHOD_CALL - # "Class.new" - # "Module.new" - constant_name(node) if module_creation?(rvalue) - when BLOCK - # "Class.new do end" - # "Module.new do end" - constant_name(node) if module_creation?(method_call_node(rvalue)) - end - end - end - - #: (AST::Node node) -> Node::Location? - def name_location(node) - location = node #: as Parser::AST::Node - .location - - if location.respond_to?(:name) - name = location.name - Node::Location.new(name.line, name.column) - end - end - - #: (AST::Node class_node) -> AST::Node? - def parent_class(class_node) - raise TypeError unless type_of(class_node) == CLASS - - # (class (const nil :Foo) (const nil :Bar) (nil)) - # "class Foo < Bar; end" - class_node.children[1] - end - - #: (ancestors: Array[AST::Node]) -> String - def parent_module_name(ancestors:) - definitions = ancestors - .select { |n| [CLASS, MODULE, CONSTANT_ASSIGNMENT, BLOCK].include?(type_of(n)) } - - names = definitions.map do |definition| - name_part_from_definition(definition) - end.compact - - names.empty? ? "Object" : names.reverse.join("::") - end - - #: (AST::Node hash_node, Symbol key) -> untyped - def value_from_hash(hash_node, key) - raise TypeError unless hash?(hash_node) - - pair = hash_pairs(hash_node).detect { |pair_node| literal_value(hash_pair_key(pair_node)) == key } - hash_pair_value(pair) if pair - end - - private - - BLOCK = :block - CLASS = :class - CONSTANT = :const - CONSTANT_ASSIGNMENT = :casgn - CONSTANT_ROOT_NAMESPACE = :cbase - HASH = :hash - HASH_PAIR = :pair - METHOD_CALL = :send - MODULE = :module - SELF = :self - STRING = :str - SYMBOL = :sym - - private_constant( - :BLOCK, :CLASS, :CONSTANT, :CONSTANT_ASSIGNMENT, :CONSTANT_ROOT_NAMESPACE, :HASH, :HASH_PAIR, :METHOD_CALL, - :MODULE, :SELF, :STRING, :SYMBOL, - ) - - #: (AST::Node node) -> Symbol - def type_of(node) - node.type - end - - #: (AST::Node hash_pair_node) -> untyped - def hash_pair_key(hash_pair_node) - raise TypeError unless type_of(hash_pair_node) == HASH_PAIR - - # (pair (int 1) (int 2)) - # "1 => 2" - # (pair (sym :answer) (int 42)) - # "answer: 42" - hash_pair_node.children[0] - end - - #: (AST::Node hash_pair_node) -> untyped - def hash_pair_value(hash_pair_node) - raise TypeError unless type_of(hash_pair_node) == HASH_PAIR - - # (pair (int 1) (int 2)) - # "1 => 2" - # (pair (sym :answer) (int 42)) - # "answer: 42" - hash_pair_node.children[1] - end - - #: (AST::Node hash_node) -> Array[AST::Node] - def hash_pairs(hash_node) - raise TypeError unless hash?(hash_node) - - # (hash (pair (int 1) (int 2)) (pair (int 3) (int 4))) - # "{1 => 2, 3 => 4}" - hash_node.children.select { |n| type_of(n) == HASH_PAIR } - end - - #: (AST::Node block_node) -> AST::Node - def method_call_node(block_node) - raise TypeError unless type_of(block_node) == BLOCK - - # (block (send (lvar :foo) :bar) (args) (int 42)) - # "foo.bar do 42 end" - block_node.children[0] - end - - #: (AST::Node node) -> bool - def module_creation?(node) - # "Class.new" - # "Module.new" - method_call?(node) && - dynamic_class_creation?(receiver(node)) && - method_name(node) == :new - end - - #: (AST::Node? node) -> bool - def dynamic_class_creation?(node) - !!node && - constant?(node) && - ["Class", "Module"].include?(constant_name(node)) - end - - #: (AST::Node node) -> String? - def name_from_block_definition(node) - if method_name(method_call_node(node)) == :class_eval - receiver = receiver(node) - constant_name(receiver) if receiver && constant?(receiver) - end - end - - #: (AST::Node node) -> String? - def name_part_from_definition(node) - case type_of(node) - when CLASS, MODULE, CONSTANT_ASSIGNMENT - module_name_from_definition(node) - when BLOCK - name_from_block_definition(node) - end - end - - #: (AST::Node method_call_or_block_node) -> AST::Node? - def receiver(method_call_or_block_node) - case type_of(method_call_or_block_node) - when METHOD_CALL - method_call_or_block_node.children[0] - when BLOCK - receiver(method_call_node(method_call_or_block_node)) - else - raise TypeError - end - end - end - end - - private_constant :NodeHelpers -end diff --git a/lib/packwerk/node_processor.rb b/lib/packwerk/node_processor.rb deleted file mode 100644 index 8017fc443..000000000 --- a/lib/packwerk/node_processor.rb +++ /dev/null @@ -1,22 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -module Packwerk - # Processes a single node in an abstract syntax tree (AST) using the provided checkers. - class NodeProcessor - #: (reference_extractor: ReferenceExtractor, relative_file: String) -> void - def initialize(reference_extractor:, relative_file:) - @reference_extractor = reference_extractor - @relative_file = relative_file - end - - #: (Parser::AST::Node node, Array[Parser::AST::Node] ancestors) -> UnresolvedReference? - def call(node, ancestors) - return unless NodeHelpers.method_call?(node) || NodeHelpers.constant?(node) - - @reference_extractor.reference_from_node(node, ancestors: ancestors, relative_file: @relative_file) - end - end - - private_constant :NodeProcessor -end diff --git a/lib/packwerk/node_processor_factory.rb b/lib/packwerk/node_processor_factory.rb deleted file mode 100644 index 2524d62aa..000000000 --- a/lib/packwerk/node_processor_factory.rb +++ /dev/null @@ -1,39 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -module Packwerk - class NodeProcessorFactory - #: String - attr_reader :root_path - - #: Array[ConstantNameInspector] - attr_reader :constant_name_inspectors - - #: (root_path: String, constant_name_inspectors: Array[ConstantNameInspector]) -> void - def initialize(root_path:, constant_name_inspectors:) - @root_path = root_path - @constant_name_inspectors = constant_name_inspectors - end - - #: (relative_file: String, node: AST::Node) -> NodeProcessor - def for(relative_file:, node:) - NodeProcessor.new( - reference_extractor: reference_extractor(node: node), - relative_file: relative_file, - ) - end - - private - - #: (node: AST::Node) -> ReferenceExtractor - def reference_extractor(node:) - ReferenceExtractor.new( - constant_name_inspectors: constant_name_inspectors, - root_node: node, - root_path: root_path, - ) - end - end - - private_constant :NodeProcessorFactory -end diff --git a/lib/packwerk/node_visitor.rb b/lib/packwerk/node_visitor.rb deleted file mode 100644 index 554d075ff..000000000 --- a/lib/packwerk/node_visitor.rb +++ /dev/null @@ -1,25 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -module Packwerk - # Visits all nodes of an AST, processing them using a given node processor. - class NodeVisitor - #: (node_processor: NodeProcessor) -> void - def initialize(node_processor:) - @node_processor = node_processor - end - - #: (Parser::AST::Node node, ancestors: Array[Parser::AST::Node], result: Array[UnresolvedReference]) -> void - def visit(node, ancestors:, result:) - reference = @node_processor.call(node, ancestors) - result << reference if reference - - child_ancestors = [node] + ancestors - NodeHelpers.each_child(node) do |child| - visit(child, ancestors: child_ancestors, result: result) - end - end - end - - private_constant :NodeVisitor -end diff --git a/lib/packwerk/parse_run.rb b/lib/packwerk/parse_run.rb index 9aed0260a..2d51341ef 100644 --- a/lib/packwerk/parse_run.rb +++ b/lib/packwerk/parse_run.rb @@ -1,59 +1,28 @@ # typed: strict # frozen_string_literal: true -require "parallel" - module Packwerk class ParseRun - #: type process_file_proc = ^(String path) -> Array[Offense] - - #: (relative_file_set: FilesForProcessing::relative_file_set, parallel: bool) -> void - def initialize(relative_file_set:, parallel:) + #: (relative_file_set: FilesForProcessing::relative_file_set, ?all_files: FilesForProcessing::relative_file_set, ?parallel: bool) -> void + def initialize(relative_file_set:, all_files: relative_file_set, parallel: true) @relative_file_set = relative_file_set - @parallel = parallel + @all_files = all_files + # NOTE: parallel flag accepted for interface compatibility but ignored. + # Rubydex handles heavy lifting in Rust; the remaining Ruby work is too lightweight + # for fork-based parallelism to help. + _ = parallel end #: (RunContext run_context, ?on_interrupt: (^-> void)?) ?{ (Array[Packwerk::Offense] offenses) -> void } -> Array[Offense] def find_offenses(run_context, on_interrupt: nil, &block) - process_file_proc = process_file_proc(run_context, &block) - - offenses = if @parallel - Parallel.flat_map(@relative_file_set, &process_file_proc) - else - serial_find_offenses(on_interrupt: on_interrupt, &process_file_proc) - end - - offenses - end - - private - - #: (RunContext run_context) ?{ (Array[Offense] offenses) -> void } -> process_file_proc - def process_file_proc(run_context, &block) - if block - proc do |relative_file| - run_context.process_file(relative_file: relative_file).tap(&block) - end #: process_file_proc - else - proc do |relative_file| - run_context.process_file(relative_file: relative_file) - end #: process_file_proc - end - end - - #: (?on_interrupt: (^-> void)?) { (?) -> untyped } -> Array[Offense] - def serial_find_offenses(on_interrupt: nil, &block) - all_offenses = [] #: Array[Offense] - begin - @relative_file_set.each do |relative_file| - offenses = yield(relative_file) - all_offenses.concat(offenses) - end - rescue Interrupt - on_interrupt&.call - all_offenses - end - all_offenses + # Phase 1: Index all workspace files and resolve constants via Rubydex + run_context.index_and_resolve(@relative_file_set, all_files: @all_files) + + # Phase 2: Walk resolved references, check violations, report per-file + run_context.find_offenses(@relative_file_set, &block) + rescue Interrupt + on_interrupt&.call + [] end end diff --git a/lib/packwerk/parsed_constant_definitions.rb b/lib/packwerk/parsed_constant_definitions.rb deleted file mode 100644 index a7724f1d5..000000000 --- a/lib/packwerk/parsed_constant_definitions.rb +++ /dev/null @@ -1,73 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -require "ast/node" - -module Packwerk - # A collection of constant definitions parsed from an Abstract Syntax Tree (AST). - class ParsedConstantDefinitions - class << self - # What fully qualified constants can this constant refer to in this context? - #: (String constant_name, namespace_path: Array[String?]) -> Array[String] - def reference_qualifications(constant_name, namespace_path:) - return [constant_name] if constant_name.start_with?("::") - - resolved_constant_name = "::#{constant_name}" - - possible_namespaces = namespace_path.each_with_object([""]) do |current, acc| - acc << "#{acc.last}::#{current}" if current - end - - possible_namespaces.map { |namespace| namespace + resolved_constant_name } - end - end - - #: (root_node: AST::Node?) -> void - def initialize(root_node:) - @local_definitions = {} #: Hash[String, Node::Location?] - - collect_local_definitions_from_root(root_node) if root_node - end - - #: (String constant_name, ?location: Node::Location?, ?namespace_path: Array[String]) -> bool - def local_reference?(constant_name, location: nil, namespace_path: []) - qualifications = self.class.reference_qualifications(constant_name, namespace_path: namespace_path) - - qualifications.any? do |name| - @local_definitions[name] && - @local_definitions[name] != location - end - end - - private - - #: (AST::Node node, ?Array[String?] current_namespace_path) -> void - def collect_local_definitions_from_root(node, current_namespace_path = []) - if NodeHelpers.constant_assignment?(node) - add_definition(NodeHelpers.constant_name(node), current_namespace_path, NodeHelpers.name_location(node)) - elsif NodeHelpers.module_name_from_definition(node) - # handle compact constant nesting (e.g. "module Sales::Order") - tempnode = node #: AST::Node? - while (tempnode = NodeHelpers.each_child( - tempnode #: as !nil - ).find { |node| NodeHelpers.constant?(node) }) - add_definition(NodeHelpers.constant_name(tempnode), current_namespace_path, - NodeHelpers.name_location(tempnode)) - end - - current_namespace_path += NodeHelpers.class_or_module_name(node).split("::") - end - - NodeHelpers.each_child(node) { |child| collect_local_definitions_from_root(child, current_namespace_path) } - end - - #: (String constant_name, Array[String?] current_namespace_path, Node::Location? location) -> void - def add_definition(constant_name, current_namespace_path, location) - resolved_constant = [""].concat(current_namespace_path).push(constant_name).join("::") - - @local_definitions[resolved_constant] = location - end - end - - private_constant :ParsedConstantDefinitions -end diff --git a/lib/packwerk/parsers.rb b/lib/packwerk/parsers.rb index ea2fb2a6c..2cb3237e7 100644 --- a/lib/packwerk/parsers.rb +++ b/lib/packwerk/parsers.rb @@ -4,9 +4,6 @@ module Packwerk module Parsers autoload :Erb, "packwerk/parsers/erb" - autoload :Factory, "packwerk/parsers/factory" - autoload :ParserInterface, "packwerk/parsers/parser_interface" - autoload :Ruby, "packwerk/parsers/ruby" class ParseResult < Offense; end diff --git a/lib/packwerk/parsers/erb.rb b/lib/packwerk/parsers/erb.rb index 52f50404f..268726e43 100644 --- a/lib/packwerk/parsers/erb.rb +++ b/lib/packwerk/parsers/erb.rb @@ -1,77 +1,23 @@ # typed: strict # frozen_string_literal: true -require "ast/node" -require "better_html" -require "better_html/parser" -require "parser/source/buffer" +require "herb" module Packwerk module Parsers + # Extracts the Ruby source embedded in an ERB template using Herb, the + # Shopify ERB parser. Herb correctly handles ERB blocks that span tags + # (e.g. `<%= form_for(:user) do |f| %>...<% end %>`) and preserves the + # original line/column positions so reported violations point at the + # actual ERB source location. class Erb - include ParserInterface - - #: (?parser_class: untyped, ?ruby_parser: Ruby) -> void - def initialize(parser_class: BetterHtml::Parser, ruby_parser: Ruby.new) - @parser_class = parser_class #: singleton(BetterHtml::Parser) - @ruby_parser = ruby_parser - end - - # @override - #: (io: (IO | StringIO), ?file_path: String) -> untyped - def call(io:, file_path: "") - buffer = Parser::Source::Buffer.new(file_path) - buffer.source = io.read - parse_buffer(buffer, file_path: file_path) - end - - #: (Parser::Source::Buffer buffer, file_path: String) -> AST::Node? - def parse_buffer(buffer, file_path:) - parser = @parser_class.new(buffer, template_language: :html) - to_ruby_ast(parser.ast, file_path) - rescue EncodingError => e - result = ParseResult.new(file: file_path, message: e.message) - raise Parsers::ParseError, result - rescue Parser::SyntaxError => e - result = ParseResult.new(file: file_path, message: "Syntax error: #{e}") - raise Parsers::ParseError, result - end - - private - - #: ((::AST::Node & Object) erb_ast, String file_path) -> ::AST::Node? - def to_ruby_ast(erb_ast, file_path) - # Note that we're not using the source location (line/column) at the moment, but if we did - # care about that, we'd need to tweak this to insert empty lines and spaces so that things - # line up with the ERB file - nodes = code_nodes(erb_ast) #: as !nil - code_pieces = nodes.map do |node| - node #: as ::AST::Node - .children.first - end - - @ruby_parser.call( - io: StringIO.new(code_pieces.join("\n")), - file_path: file_path, - ) - end - - #: ((::AST::Node | String)? node) ?{ (::AST::Node arg0) -> void } -> (Enumerator[::AST::Node] | Array[String])? - def code_nodes(node, &block) - return enum_for(:code_nodes, node) unless block - return unless node.is_a?(::AST::Node) - - yield node if node.type == :code - - # Skip descending into an ERB comment node, which may contain code nodes - if node.type == :erb - first_child = node.children.first - return if first_child&.type == :indicator && first_child&.children&.first == "#" - end - - node.children.each do |child| - code_nodes(child, &block) - end + #: (file_path: String) -> String? + def extract_ruby_source(file_path:) + source = File.read(file_path, encoding: Encoding::UTF_8) + ruby = Herb.extract_ruby(source) + ruby.empty? ? nil : ruby + rescue EncodingError + nil end end end diff --git a/lib/packwerk/parsers/factory.rb b/lib/packwerk/parsers/factory.rb deleted file mode 100644 index f85ec5176..000000000 --- a/lib/packwerk/parsers/factory.rb +++ /dev/null @@ -1,52 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -require "singleton" - -module Packwerk - module Parsers - class Factory - include Singleton - - RUBY_REGEX = %r{ - # Although not important for regex, these are ordered from most likely to match to least likely. - \.(rb|rake|builder|gemspec|ru)\Z - | - (Gemfile|Rakefile)\Z - }x - private_constant :RUBY_REGEX - - ERB_REGEX = /\.erb\Z/ - private_constant :ERB_REGEX - - #: -> void - def initialize - @ruby_parser = nil #: ParserInterface? - @erb_parser = nil #: ParserInterface? - @erb_parser_class = nil #: Class[top]? - end - - #: (String path) -> ParserInterface? - def for_path(path) - case path - when RUBY_REGEX - @ruby_parser ||= Ruby.new - when ERB_REGEX - erb_parser_class_ = erb_parser_class #: as untyped - @erb_parser ||= erb_parser_class_.new - end - end - - #: -> Class[top] - def erb_parser_class - @erb_parser_class ||= Erb - end - - #: (Class[top]? klass) -> void - def erb_parser_class=(klass) - @erb_parser_class = klass - @erb_parser = nil - end - end - end -end diff --git a/lib/packwerk/parsers/parser_interface.rb b/lib/packwerk/parsers/parser_interface.rb deleted file mode 100644 index 9d00260d8..000000000 --- a/lib/packwerk/parsers/parser_interface.rb +++ /dev/null @@ -1,14 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -module Packwerk - module Parsers - # @requires_ancestor: Kernel - # @interface - module ParserInterface - # @abstract - #: (io: (IO | StringIO), file_path: String) -> untyped - def call(io:, file_path:) = raise NotImplementedError, "Abstract method called" - end - end -end diff --git a/lib/packwerk/parsers/ruby.rb b/lib/packwerk/parsers/ruby.rb deleted file mode 100644 index 0cbb3b104..000000000 --- a/lib/packwerk/parsers/ruby.rb +++ /dev/null @@ -1,56 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -require "parser" -require "prism" - -module Packwerk - module Parsers - class Ruby - include ParserInterface - - class RaiseExceptionsParser < Prism::Translation::Parser - #: (untyped builder) -> void - def initialize(builder) - super(builder) - super.diagnostics.all_errors_are_fatal = true - end - - private - - #: (Prism::ParseError error) -> bool - def valid_error?(error) - error.type != :invalid_yield - end - end - - class TolerateInvalidUtf8Builder < Prism::Translation::Parser::Builder - #: (untyped token) -> untyped - def string_value(token) - value(token) - end - end - - #: (?parser_class: untyped) -> void - def initialize(parser_class: RaiseExceptionsParser) - @builder = TolerateInvalidUtf8Builder.new #: Object - @parser_class = parser_class #: singleton(RaiseExceptionsParser) - end - - # @override - #: (io: (IO | StringIO), ?file_path: String) -> Parser::AST::Node? - def call(io:, file_path: "") - buffer = Parser::Source::Buffer.new(file_path) - buffer.source = io.read - parser = @parser_class.new(@builder) - parser.parse(buffer) - rescue EncodingError => e - result = ParseResult.new(file: file_path, message: e.message) - raise Parsers::ParseError, result - rescue Parser::SyntaxError => e - result = ParseResult.new(file: file_path, message: "Syntax error: #{e}") - raise Parsers::ParseError, result - end - end - end -end diff --git a/lib/packwerk/rails_load_paths.rb b/lib/packwerk/rails_load_paths.rb deleted file mode 100644 index 14d930141..000000000 --- a/lib/packwerk/rails_load_paths.rb +++ /dev/null @@ -1,70 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -require "bundler" -gem "railties", ">= 6.0" -require "rails/railtie" - -module Packwerk - # Extracts the load paths from the analyzed application so that we can map constant names to paths. - module RailsLoadPaths - class << self - #: (String root, environment: String) -> Hash[String, Module[top]] - def for(root, environment:) - require_application(root, environment) - all_paths = extract_application_autoload_paths - relevant_paths = filter_relevant_paths(all_paths) - assert_load_paths_present(relevant_paths) - relative_path_strings(relevant_paths) - end - - private - - #: -> Hash[String, Module[top]] - def extract_application_autoload_paths - Rails.autoloaders.inject({}) do |h, loader| - h.merge(loader.dirs(namespaces: true)) - end - end - - #: (Hash[String, Module[top]] all_paths, ?bundle_path: Pathname, ?rails_root: Pathname) -> Hash[Pathname, Module[top]] - def filter_relevant_paths(all_paths, bundle_path: Bundler.bundle_path, rails_root: Rails.root) - bundle_path_match = bundle_path.join("**") - rails_root_match = rails_root.join("**") - - all_paths - .transform_keys { |path| Pathname.new(path).expand_path } - .select { |path| path.fnmatch(rails_root_match.to_s) } # path needs to be in application directory - .reject { |path| path.fnmatch(bundle_path_match.to_s) } # reject paths from vendored gems - end - - #: (Hash[Pathname, Module[top]] load_paths, ?rails_root: Pathname) -> Hash[String, Module[top]] - def relative_path_strings(load_paths, rails_root: Rails.root) - load_paths.transform_keys { |path| Pathname.new(path).relative_path_from(rails_root).to_s } - end - - #: (String root, String environment) -> void - def require_application(root, environment) - environment_file = "#{root}/config/environment" - - if File.file?("#{environment_file}.rb") - ENV["RAILS_ENV"] ||= environment - - require environment_file - else - raise "A Rails application could not be found in #{root}" - end - end - - #: (Hash[untyped, Module[top]] paths) -> void - def assert_load_paths_present(paths) - if paths.empty? - raise <<~EOS - We could not extract autoload paths from your Rails app. This is likely a configuration error. - Packwerk will not work correctly without any autoload paths. - EOS - end - end - end - end -end diff --git a/lib/packwerk/reference_extractor.rb b/lib/packwerk/reference_extractor.rb deleted file mode 100644 index 4b359fec0..000000000 --- a/lib/packwerk/reference_extractor.rb +++ /dev/null @@ -1,135 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -module Packwerk - # Extracts a possible constant reference from a given AST node. - class ReferenceExtractor - class << self - #: (Array[UnresolvedReference] unresolved_references, ConstantDiscovery context_provider) -> Array[Reference] - def get_fully_qualified_references_from(unresolved_references, context_provider) - fully_qualified_references = [] #: Array[Reference] - - unresolved_references.each do |unresolved_references_or_offense| - unresolved_reference = unresolved_references_or_offense - - constant = - context_provider.context_for( - unresolved_reference.constant_name, - current_namespace_path: unresolved_reference.namespace_path - ) - - next if constant.nil? - - package_for_constant = constant.package - - next if package_for_constant.nil? - - source_package = context_provider.package_from_path(unresolved_reference.relative_path) - - next if source_package == package_for_constant - - fully_qualified_references << Reference.new( - package: source_package, - relative_path: unresolved_reference.relative_path, - constant: constant, - source_location: unresolved_reference.source_location, - ) - end - - fully_qualified_references - end - end - - #: (constant_name_inspectors: Array[ConstantNameInspector], root_node: AST::Node, root_path: String) -> void - def initialize( - constant_name_inspectors:, - root_node:, - root_path: - ) - @constant_name_inspectors = constant_name_inspectors - @root_path = root_path - @local_constant_definitions = ParsedConstantDefinitions.new(root_node: root_node) #: ParsedConstantDefinitions - end - - #: (Parser::AST::Node node, ancestors: Array[Parser::AST::Node], relative_file: String) -> UnresolvedReference? - def reference_from_node(node, ancestors:, relative_file:) - constant_name = nil #: String? - - @constant_name_inspectors.each do |inspector| - constant_name = inspect_node( - inspector, - node: node, - ancestors: ancestors, - relative_file: relative_file - ) - - break if constant_name - end - - if constant_name - reference_from_constant( - constant_name, - node: node, - ancestors: ancestors, - relative_file: relative_file - ) - end - end - - private - - #: ( - #| ConstantNameInspector inspector, - #| node: Parser::AST::Node, - #| ancestors: Array[Parser::AST::Node], - #| relative_file: String - #| ) -> String? - def inspect_node(inspector, node:, ancestors:, relative_file:) - inspector.constant_name_from_node(node, ancestors: ancestors, relative_file: relative_file) - rescue ArgumentError => error - if error.message == "unknown keyword: :relative_file" - inspector_ = inspector #: as untyped - inspector_.constant_name_from_node(node, ancestors: ancestors).tap do - warn(<<~MSG.squish) - #{inspector_.class}#reference_from_node without a relative_file: keyword - argument is deprecated and will be required in Packwerk 3.1.1. - MSG - end - else - raise - end - end - - #: ( - #| String constant_name, - #| node: Parser::AST::Node, - #| ancestors: Array[Parser::AST::Node], - #| relative_file: String - #| ) -> UnresolvedReference? - def reference_from_constant(constant_name, node:, ancestors:, relative_file:) - namespace_path = NodeHelpers.enclosing_namespace_path(node, ancestors: ancestors) - - return if local_reference?(constant_name, NodeHelpers.name_location(node), namespace_path) - - location = NodeHelpers.location(node) - - UnresolvedReference.new( - constant_name: constant_name, - namespace_path: namespace_path, - relative_path: relative_file, - source_location: location - ) - end - - #: (String constant_name, Node::Location? name_location, Array[String] namespace_path) -> bool - def local_reference?(constant_name, name_location, namespace_path) - @local_constant_definitions.local_reference?( - constant_name, - location: name_location, - namespace_path: namespace_path - ) - end - end - - private_constant :ReferenceExtractor -end diff --git a/lib/packwerk/run_context.rb b/lib/packwerk/run_context.rb index 1f0f959d6..66567fc6b 100644 --- a/lib/packwerk/run_context.rb +++ b/lib/packwerk/run_context.rb @@ -1,85 +1,188 @@ # typed: strict # frozen_string_literal: true -require "constant_resolver" +require "rubydex" +require "prism" module Packwerk # Holds the context of a Packwerk run across multiple files. + # Uses Rubydex::Graph for indexing, constant resolution, and reference extraction. class RunContext + RAILS_ASSOCIATIONS = [:belongs_to, :has_many, :has_one, :has_and_belongs_to_many].to_set.freeze #: Set[Symbol] + + # A constant reference implied by a Rails-style association call (e.g. + # `belongs_to :foo` implies a reference to `Foo`). Discovered by parsing + # the source file with Prism rather than from the Rubydex graph. + class AssociationReference + #: String + attr_reader :const_name + + # Module/class nesting in which the association call appears, used as + # the resolution scope for `const_name`. + #: Array[String] + attr_reader :nesting + + #: Node::Location + attr_reader :location + + #: (const_name: String, nesting: Array[String], location: Node::Location) -> void + def initialize(const_name:, nesting:, location:) + @const_name = const_name + @nesting = nesting + @location = location + end + end + + # A resolved cross-package constant reference, captured as a plain Ruby object + # (no Rubydex types) so it can be processed in the violation-checking phase + # independently of the Rubydex graph. + class ExtractedRef + #: String + attr_reader :const_name + + #: String + attr_reader :target_path + + #: Integer + attr_reader :line + + #: Integer + attr_reader :column + + #: (const_name: String, target_path: String, line: Integer, column: Integer) -> void + def initialize(const_name:, target_path:, line:, column:) + @const_name = const_name + @target_path = target_path + @line = line + @column = column + end + end + + # Where a constant is defined: the set of packages containing any definition, + # and the canonical target URI (preferring Zeitwerk-conventional paths). + class DefinitionSet + #: Set[Package] + attr_reader :packages + + #: String? + attr_reader :target_uri + + #: (Set[Package] packages, String? target_uri) -> void + def initialize(packages, target_uri) + @packages = packages + @target_uri = target_uri + end + end + class << self #: (Configuration configuration) -> RunContext def from_configuration(configuration) new( root_path: configuration.root_path, - load_paths: configuration.load_paths, package_paths: configuration.package_paths, inflector: ActiveSupport::Inflector, - custom_associations: configuration.custom_associations.to_set, + custom_associations: configuration.custom_associations, associations_exclude: configuration.associations_exclude, - exclude: configuration.exclude, - cache_enabled: configuration.cache_enabled?, - cache_directory: configuration.cache_directory, - config_path: configuration.config_path, + include_globs: configuration.include, + exclude_globs: configuration.exclude, ) end end #: ( #| root_path: String, - #| load_paths: Hash[String, Module[top]], #| inflector: singleton(ActiveSupport::Inflector), - #| cache_directory: Pathname, - #| ?config_path: String?, #| ?package_paths: (Array[String] | String)?, - #| ?custom_associations: Set[Symbol], + #| ?custom_associations: Array[Symbol], #| ?associations_exclude: Array[String], - #| ?exclude: Array[String], - #| ?checkers: Array[Checker], - #| ?cache_enabled: bool + #| ?include_globs: Array[String], + #| ?exclude_globs: Array[String], + #| ?checkers: Array[Checker] #| ) -> void def initialize( root_path:, - load_paths:, inflector:, - cache_directory:, - config_path: nil, package_paths: nil, - custom_associations: Set.new, + custom_associations: [], associations_exclude: [], - exclude: [], - checkers: Checker.all, - cache_enabled: false + include_globs: Configuration::DEFAULT_INCLUDE_GLOBS, + exclude_globs: Configuration::DEFAULT_EXCLUDE_GLOBS, + checkers: Checker.all ) @root_path = root_path - @load_paths = load_paths - @package_paths = package_paths @inflector = inflector @custom_associations = custom_associations @associations_exclude = associations_exclude @checkers = checkers - @cache_enabled = cache_enabled - @cache_directory = cache_directory - @config_path = config_path - @exclude = exclude - - @file_processor = nil #: FileProcessor? - @context_provider = nil #: ConstantDiscovery? + @package_paths = package_paths + @include_globs = include_globs + @exclude_globs = exclude_globs + @real_root_path = File.realpath(root_path) #: String + @real_file_uri_prefix = "file://#{@real_root_path}/" #: String + @associations = (RAILS_ASSOCIATIONS | custom_associations.to_set) #: Set[Symbol] + @graph = Rubydex::Graph.new(workspace_path: @real_root_path) #: Rubydex::Graph @package_set = nil #: PackageSet? - # We need to initialize this before we fork the process, see https://github.com/Shopify/packwerk/issues/182 - @cache = Cache.new(enable_cache: @cache_enabled, cache_directory: @cache_directory, config_path: @config_path) #: Cache + @reference_checker = ReferenceChecking::ReferenceChecker.new(@checkers) #: ReferenceChecking::ReferenceChecker + + # Maps keyed by absolute file:// URI for fast lookup in the hot reference loop + # without re-parsing URIs. Built in index_and_resolve. + @checked_uris = Set.new #: Set[String] + @uri_to_package = {} #: Hash[String, Package] + @uri_to_relative_path = {} #: Hash[String, String] + @path_to_package = {} #: Hash[String, Package] end - #: (relative_file: String) -> Array[Packwerk::Offense] - def process_file(relative_file:) - processed_file = file_processor.call(relative_file) + # Phase 1: Index all files into the Rubydex graph and run resolution. + # + # We index ALL Ruby files in the workspace (not just the files being checked) + # so that Rubydex can resolve cross-package constant references. The checked + # file set may be a subset (e.g. `packwerk check components/timeline`), but + # resolution needs to see definitions across the entire codebase. + #: (FilesForProcessing::relative_file_set relative_file_set, ?all_files: FilesForProcessing::relative_file_set) -> void + def index_and_resolve(relative_file_set, all_files: relative_file_set) + rb_files = [] #: Array[String] + erb_files = [] #: Array[String] + + all_files.each do |rel_path| + abs_path = File.join(@real_root_path, rel_path) + if rel_path.end_with?(".erb") + # Only index ERB files that are in the check set + erb_files << abs_path if relative_file_set.include?(rel_path) + else + rb_files << abs_path + end + end + + @graph.index_all(rb_files) unless rb_files.empty? - references = ReferenceExtractor.get_fully_qualified_references_from( - processed_file.unresolved_references, - context_provider - ) - reference_checker = ReferenceChecking::ReferenceChecker.new(@checkers) + erb_parser = Parsers::Erb.new + erb_files.each do |erb_file| + ruby_source = erb_parser.extract_ruby_source(file_path: erb_file) + next unless ruby_source - processed_file.offenses + references.flat_map { |reference| reference_checker.call(reference) } + @graph.index_source("file://#{erb_file}", ruby_source, "ruby") + end + + @graph.resolve + + build_uri_indexes(relative_file_set, all_files) + end + + # Phase 2: Walk all resolved constant references and check for violations. + # Groups offenses by source file and yields per-file for progress reporting. + #: (FilesForProcessing::relative_file_set relative_file_set) ?{ (Array[Offense] offenses) -> void } -> Array[Offense] + def find_offenses(relative_file_set, &block) + offenses_by_file = collect_constant_reference_offenses(relative_file_set) + merge_association_offenses!(offenses_by_file, relative_file_set) + + all_offenses = [] #: Array[Offense] + relative_file_set.each do |file| + file_offenses = offenses_by_file.fetch(file, []) + all_offenses.concat(file_offenses) + yield(file_offenses) if block + end + + all_offenses end #: -> PackageSet @@ -89,52 +192,314 @@ def package_set private - #: -> FileProcessor - def file_processor - @file_processor ||= FileProcessor.new(node_processor_factory: node_processor_factory, cache: @cache) + # Build URI-keyed lookup tables so the hot reference loop can compare URIs as opaque + # strings without parsing them. Computed once per run after indexing completes. + # + # @checked_uris : URIs of files we should report violations for + # @uri_to_package : URI -> owning Package (for all indexed workspace files) + # @uri_to_relative_path: URI -> workspace-relative path (used when emitting offenses) + #: (FilesForProcessing::relative_file_set relative_file_set, FilesForProcessing::relative_file_set all_files) -> void + def build_uri_indexes(relative_file_set, all_files) + @checked_uris = Set.new + @uri_to_package = {} + @uri_to_relative_path = {} + + all_files.each do |rel_path| + uri = "#{@real_file_uri_prefix}#{rel_path}" + package = package_set.package_from_path(rel_path) + @uri_to_relative_path[uri] = rel_path + @uri_to_package[uri] = package + @path_to_package[rel_path] = package + @checked_uris << uri if relative_file_set.include?(rel_path) + end + end + + # Extract constant references from Rubydex, then check for dependency violations. + #: (FilesForProcessing::relative_file_set relative_file_set) -> Hash[String, Array[Offense]] + def collect_constant_reference_offenses(relative_file_set) + refs_by_file = extract_refs_by_file + check_refs_for_violations(refs_by_file) + end + + # Iterate declarations and their references to extract cross-package violations. + # + # Hot loop works entirely with absolute URIs as opaque strings: no URI parsing, + # no path manipulation. URIs are converted to relative paths only when emitting + # the final ExtractedRef objects (one conversion per output reference). + # + # Iterates per-declaration rather than per-reference because: + # - Many declarations have zero references in the workspace (skip them entirely) + # - Per-declaration work (resolving package set, Zeitwerk path) is computed + # once per constant rather than once per reference + #: -> Hash[String, Array[ExtractedRef]] + def extract_refs_by_file + refs_by_file = Hash.new { |h, k| h[k] = [] } #: Hash[String, Array[ExtractedRef]] + + @graph.declarations.each do |declaration| + # Skip singleton classes (Foo::) -- their references duplicate the regular + # class's references (Foo.bar produces refs to BOTH Foo and Foo::). + next if declaration.is_a?(Rubydex::SingletonClass) + + checked_refs = checked_references(declaration) + next if checked_refs.empty? + + defns = definition_set_for(declaration) + target_uri = defns.target_uri + next if defns.packages.empty? || target_uri.nil? + + target_path = @uri_to_relative_path.fetch(target_uri) + const_name = "::#{declaration.name}" + + checked_refs.each do |loc| + source_uri = loc.uri + source_package = @uri_to_package.fetch(source_uri) + # If ANY definition of this constant is in the source package, it's a local reference + next if defns.packages.include?(source_package) + + source_path = @uri_to_relative_path.fetch(source_uri) + bucket = refs_by_file[source_path] #: as !nil + + # Rubydex locations use 0-based line/column; Packwerk uses 1-based for display. + bucket << ExtractedRef.new( + const_name: const_name, + target_path: target_path, + line: loc.start_line + 1, + column: loc.start_column + 1, + ) + end + end + + refs_by_file + end + + # Collect locations of references to this declaration whose source URI + # belongs to the set of files being checked. + #: (Rubydex::Declaration declaration) -> Array[Rubydex::Location] + def checked_references(declaration) + declaration.references.filter_map do |ref| + next unless ref.is_a?(Rubydex::ResolvedConstantReference) + + loc = ref.location + loc if @checked_uris.include?(loc.uri) + end end - #: -> NodeProcessorFactory - def node_processor_factory - NodeProcessorFactory.new( - root_path: @root_path, - constant_name_inspectors: constant_name_inspectors - ) + # Summarize where a constant is defined: the set of packages containing any + # definition, and the canonical target URI (preferring Zeitwerk-conventional paths + # like `ApiClient` → `app/models/api_client.rb`). + #: (Rubydex::Declaration declaration) -> DefinitionSet + def definition_set_for(declaration) + defined_uris = declaration.definitions.filter_map do |defn| + uri = defn.location.uri + uri if @uri_to_package.key?(uri) + end + + packages = defined_uris.map { |uri| @uri_to_package.fetch(uri) }.to_set + zeitwerk_suffix = "#{ActiveSupport::Inflector.underscore(declaration.name)}.rb" + target_uri = defined_uris.find { |uri| uri.end_with?(zeitwerk_suffix) } || defined_uris.first + + DefinitionSet.new(packages, target_uri) end - #: -> ConstantDiscovery - def context_provider - @context_provider ||= ConstantDiscovery.new( - constant_resolver: resolver, - packages: package_set - ) + # Check extracted references for dependency violations. + #: (Hash[String, Array[ExtractedRef]] refs_by_file) -> Hash[String, Array[Offense]] + def check_refs_for_violations(refs_by_file) + offenses_by_file = Hash.new { |h, k| h[k] = [] } #: Hash[String, Array[Offense]] + + refs_by_file.each do |source_path, refs| + offenses = check_file_refs(source_path, refs) + offenses_by_file[source_path] = offenses if offenses.any? + end + + offenses_by_file + end + + # Check a single file's extracted references for violations. + #: (String source_path, Array[ExtractedRef] refs) -> Array[Offense] + def check_file_refs(source_path, refs) + source_package = package_for(source_path) + offenses = [] #: Array[Offense] + + refs.each do |ref| + target_package = package_for(ref.target_path) + # Already filtered by definition_set_for, but keep for safety + next if source_package == target_package + + reference = Reference.new( + package: source_package, + relative_path: source_path, + constant: ConstantContext.new(ref.const_name, ref.target_path, target_package), + source_location: Node::Location.new(ref.line, ref.column), + ) + + offenses.concat(@reference_checker.call(reference)) + end + + offenses end - #: -> ConstantResolver - def resolver - ConstantResolver.new( - root_path: @root_path, - load_paths: @load_paths, - inflector: @inflector, - exclude: @exclude, - ) + # Run a supplementary pass to detect cross-package references from ActiveRecord associations. + # Rubydex doesn't understand that `has_many :orders` implies a reference to `Order`, + # so we parse those files with Prism and resolve the implied constants via the graph. + # + # Uses graph.method_references to identify which files contain association calls, + # then only parses those files with Prism (typically ~1% of all files). + #: (Hash[String, Array[Offense]] offenses_by_file, FilesForProcessing::relative_file_set relative_file_set) -> void + def merge_association_offenses!(offenses_by_file, relative_file_set) + excluded_files = Set.new(@associations_exclude.flat_map { |glob| Dir[glob] }) + + # Use Rubydex's method references to find only files that contain association calls. + # This avoids reparsing all 57k+ files when only ~1.3% have associations. + association_names = @associations.map(&:to_s).to_set + files_with_associations = Set.new + @graph.method_references.each do |ref| + next unless association_names.include?(ref.name) + + rel_path = location_to_relative_path(ref.location) + next unless rel_path + + files_with_associations << rel_path + end + + files_to_scan = files_with_associations & relative_file_set - excluded_files + + all_association_refs = files_to_scan.flat_map do |relative_file| + extract_association_references(relative_file).map { |assoc_ref| [relative_file, assoc_ref] } + end + + # Resolve and check violations (uses shared graph + package_set) + all_association_refs.each do |relative_file, assoc_ref| + declaration = @graph.resolve_constant(assoc_ref.const_name, assoc_ref.nesting) + next unless declaration + + target_def = declaration.definitions.first + next unless target_def + + target_path = location_to_relative_path(target_def.location) + next unless target_path + + source_package = package_for(relative_file) + target_package = package_for(target_path) + next if source_package == target_package + + reference = Reference.new( + package: source_package, + relative_path: relative_file, + constant: ConstantContext.new("::#{declaration.name}", target_path, target_package), + source_location: assoc_ref.location, + ) + + offenses = @reference_checker.call(reference) + offenses_by_file[relative_file]&.concat(offenses) + end + end + + # Parse a single file with Prism and extract constant names implied by AR associations. + #: (String relative_file) -> Array[AssociationReference] + def extract_association_references(relative_file) + source = File.read(relative_file, encoding: Encoding::UTF_8) + result = Prism.parse(source) + return [] unless result.success? + + refs = [] #: Array[AssociationReference] + visit_for_associations(result.value, [], refs) + refs + end + + # Recursively walk Prism's native AST looking for association method calls. + # Tracks module/class nesting for constant resolution context. + #: (Prism::Node node, Array[String] nesting, Array[AssociationReference] refs) -> void + def visit_for_associations(node, nesting, refs) + case node + when Prism::CallNode + if @associations.include?(node.name) + const_name = association_constant_name(node) + if const_name + # Prism uses 1-based line, 0-based column; Packwerk uses 1-based for both. + location = Node::Location.new(node.location.start_line, node.location.start_column + 1) + refs << AssociationReference.new(const_name: const_name, nesting: nesting.dup, location: location) + end + end + when Prism::ClassNode + name = constant_path_string(node.constant_path) + if name + fqn = nesting.empty? ? name : "#{nesting.last}::#{name}" + nesting = [fqn] + nesting + end + when Prism::ModuleNode + name = constant_path_string(node.constant_path) + if name + fqn = nesting.empty? ? name : "#{nesting.last}::#{name}" + nesting = [fqn] + nesting + end + end + + node.child_nodes.each do |child| + next unless child + + visit_for_associations(child, nesting, refs) + end + end + + # Extract the implied constant name from an association call. + # e.g. `has_many :orders` => "Order" + # e.g. `belongs_to :author, class_name: "Person"` => "Person" + #: (Prism::CallNode call_node) -> String? + def association_constant_name(call_node) + arguments = call_node.arguments&.arguments + return unless arguments && !arguments.empty? + + first_arg = arguments.first + return unless first_arg.is_a?(Prism::SymbolNode) + + association_name = first_arg.value + return unless association_name + + # Check for explicit class_name: option + keyword_hash = arguments.find { |a| a.is_a?(Prism::KeywordHashNode) } + if keyword_hash.is_a?(Prism::KeywordHashNode) + class_name_pair = keyword_hash.elements.find do |element| + next false unless element.is_a?(Prism::AssocNode) + + key = element.key + key.is_a?(Prism::SymbolNode) && key.value == "class_name" + end + if class_name_pair.is_a?(Prism::AssocNode) + value = class_name_pair.value + return value.content if value.is_a?(Prism::StringNode) + end + end + + @inflector.classify(association_name) + end + + # Convert a Prism constant path node to a string name. + # e.g. ConstantReadNode("Foo") => "Foo" + # e.g. ConstantPathNode("Foo::Bar") => "Foo::Bar" + #: (Prism::Node? node) -> String? + def constant_path_string(node) + case node + when Prism::ConstantReadNode + node.name.to_s + when Prism::ConstantPathNode + parent = constant_path_string(node.parent) + child = node.full_name.to_s + parent ? "#{parent}::#{child}" : child + end end - #: -> Array[ConstantNameInspector] - def constant_name_inspectors - [ - ConstNodeInspector.new, - AssociationInspector.new( - inflector: @inflector, - custom_associations: @custom_associations, - excluded_files: relative_files_for_globs(@associations_exclude), - ), - ] + # Look up the workspace-relative path for a Rubydex::Location. + # Returns nil for locations outside the indexed workspace (e.g. rubydex:built-in). + #: (Rubydex::Location location) -> String? + def location_to_relative_path(location) + @uri_to_relative_path[location.uri] end - #: (Array[String] relative_globs) -> FilesForProcessing::relative_file_set - def relative_files_for_globs(relative_globs) - Set.new(relative_globs.flat_map { |glob| Dir[glob] }) + # Look up a package by relative file path, using the precomputed map and + # falling back to PackageSet for unknown paths (e.g. files not in the index). + #: (String relative_path) -> Package + def package_for(relative_path) + @path_to_package[relative_path] || package_set.package_from_path(relative_path) end end diff --git a/lib/packwerk/unresolved_reference.rb b/lib/packwerk/unresolved_reference.rb deleted file mode 100644 index ea778db66..000000000 --- a/lib/packwerk/unresolved_reference.rb +++ /dev/null @@ -1,18 +0,0 @@ -# typed: true -# frozen_string_literal: true - -module Packwerk - # An unresolved reference from a file in one package to a constant that may be defined in a different package. - # Unresolved means that we know how it's referred to in the file, - # and we have enough context on that reference to figure out the fully qualified reference such that we - # can produce a Reference in a separate pass. However, we have not yet resolved it to its fully qualified version. - UnresolvedReference = Struct.new( - :constant_name, - :namespace_path, - :relative_path, - :source_location, - keyword_init: true, - ) - - private_constant :UnresolvedReference -end diff --git a/lib/packwerk/validator.rb b/lib/packwerk/validator.rb index 2df56846c..fc3337517 100644 --- a/lib/packwerk/validator.rb +++ b/lib/packwerk/validator.rb @@ -1,7 +1,6 @@ # typed: strict # frozen_string_literal: true -require "constant_resolver" require "pathname" require "yaml" diff --git a/packwerk.gemspec b/packwerk.gemspec index 2104d8ea0..7ea23eb5e 100644 --- a/packwerk.gemspec +++ b/packwerk.gemspec @@ -41,15 +41,11 @@ Gem::Specification.new do |spec| spec.add_dependency("activesupport", ">= 6.0") spec.add_dependency("benchmark") spec.add_dependency("bundler") - spec.add_dependency("constant_resolver", ">= 0.3") - spec.add_dependency("parallel", "< 2") - spec.add_dependency("zeitwerk", ">= 2.6.1") + spec.add_dependency("rubydex", ">= 0.2.3") - # For Ruby parsing - spec.add_dependency("ast") - spec.add_dependency("parser") + # For association detection (Prism native AST walk) spec.add_dependency("prism", ">= 1.4.0") - # For ERB parsing - spec.add_dependency("better_html") + # For ERB parsing -- preserves block-spanning tags and source positions + spec.add_dependency("herb") end diff --git a/sorbet/rbi/gems/actionpack@7.0.8.7.rbi b/sorbet/rbi/gems/actionpack@7.0.8.7.rbi deleted file mode 100644 index 3ad22da7c..000000000 --- a/sorbet/rbi/gems/actionpack@7.0.8.7.rbi +++ /dev/null @@ -1,19338 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `actionpack` gem. -# Please instead update this file by running `bin/tapioca gem actionpack`. - -# source://actionpack//lib/abstract_controller.rb#8 -module AbstractController - extend ::ActiveSupport::Autoload - - class << self - # source://actionpack//lib/abstract_controller.rb#24 - def eager_load!; end - end -end - -# Raised when a non-existing controller action is triggered. -# -# source://actionpack//lib/abstract_controller/base.rb#11 -class AbstractController::ActionNotFound < ::StandardError - include ::DidYouMean::Correctable - - # @return [ActionNotFound] a new instance of ActionNotFound - # - # source://actionpack//lib/abstract_controller/base.rb#14 - def initialize(message = T.unsafe(nil), controller = T.unsafe(nil), action = T.unsafe(nil)); end - - # source://actionpack//lib/abstract_controller/base.rb#12 - def action; end - - # source://actionpack//lib/abstract_controller/base.rb#12 - def controller; end - - # source://actionpack//lib/abstract_controller/base.rb#23 - def corrections; end -end - -# source://actionpack//lib/abstract_controller/asset_paths.rb#4 -module AbstractController::AssetPaths - extend ::ActiveSupport::Concern -end - -# AbstractController::Base is a low-level API. Nobody should be -# using it directly, and subclasses (like ActionController::Base) are -# expected to provide their own +render+ method, since rendering means -# different things depending on the context. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://actionpack//lib/abstract_controller/base.rb#33 -class AbstractController::Base - include ::ActiveSupport::Configurable - extend ::ActiveSupport::Configurable::ClassMethods - extend ::ActiveSupport::DescendantsTracker - - # Delegates to the class's ::action_methods. - # - # source://actionpack//lib/abstract_controller/base.rb#161 - def action_methods; end - - # Returns the name of the action this controller is processing. - # - # source://activesupport/7.0.8.7/lib/active_support/core_ext/module/attr_internal.rb#33 - def action_name; end - - # source://activesupport/7.0.8.7/lib/active_support/core_ext/module/attr_internal.rb#33 - def action_name=(_arg0); end - - # Returns true if a method for the action is available and - # can be dispatched, false otherwise. - # - # Notice that action_methods.include?("foo") may return - # false and available_action?("foo") returns true because - # this method considers actions that are also available - # through other means, for example, implicit render ones. - # - # ==== Parameters - # * action_name - The name of an action to be tested - # - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/base.rb#175 - def available_action?(action_name); end - - # Delegates to the class's ::controller_path. - # - # source://actionpack//lib/abstract_controller/base.rb#156 - def controller_path; end - - # Returns the formats that can be processed by the controller. - # - # source://activesupport/7.0.8.7/lib/active_support/core_ext/module/attr_internal.rb#33 - def formats; end - - # source://activesupport/7.0.8.7/lib/active_support/core_ext/module/attr_internal.rb#33 - def formats=(_arg0); end - - # source://actionpack//lib/abstract_controller/base.rb#194 - def inspect; end - - # Tests if a response body is set. Used to determine if the - # +process_action+ callback needs to be terminated in - # AbstractController::Callbacks. - # - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/base.rb#182 - def performed?; end - - # Calls the action going through the entire action dispatch stack. - # - # The actual method that is called is determined by calling - # #method_for_action. If no method can handle the action, then an - # AbstractController::ActionNotFound error is raised. - # - # ==== Returns - # * self - # - # source://actionpack//lib/abstract_controller/base.rb#142 - def process(action, *args, **_arg2); end - - # Returns the body of the HTTP response sent by the controller. - # - # source://activesupport/7.0.8.7/lib/active_support/core_ext/module/attr_internal.rb#33 - def response_body; end - - # source://activesupport/7.0.8.7/lib/active_support/core_ext/module/attr_internal.rb#33 - def response_body=(_arg0); end - - # Actually call the method associated with the action. Override - # this method if you wish to change how action methods are called, - # not to add additional behavior around it. For example, you would - # override #send_action if you want to inject arguments into the - # method. - def send_action(*_arg0); end - - private - - # Takes an action name and returns the name of the method that will - # handle the action. - # - # It checks if the action name is valid and returns false otherwise. - # - # See method_for_action for more information. - # - # ==== Parameters - # * action_name - An action name to find a method name for - # - # ==== Returns - # * string - The name of the method that handles the action - # * false - No valid method name could be found. - # Raise +AbstractController::ActionNotFound+. - # - # source://actionpack//lib/abstract_controller/base.rb#246 - def _find_action_name(action_name); end - - # If the action name was not found, but a method called "action_missing" - # was found, #method_for_action will return "_handle_action_missing". - # This method calls #action_missing with the current action name. - # - # source://actionpack//lib/abstract_controller/base.rb#228 - def _handle_action_missing(*args); end - - # Checks if the action name is valid and returns false otherwise. - # - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/base.rb#282 - def _valid_action_name?(action_name); end - - # Returns true if the name can be considered an action because - # it has a method defined in the controller. - # - # ==== Parameters - # * name - The name of an action to be tested - # - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/base.rb#204 - def action_method?(name); end - - # Takes an action name and returns the name of the method that will - # handle the action. In normal cases, this method returns the same - # name as it receives. By default, if #method_for_action receives - # a name that is not an action, it will look for an #action_missing - # method and return "_handle_action_missing" if one is found. - # - # Subclasses may override this method to add additional conditions - # that should be considered an action. For instance, an HTTP controller - # with a template matching the action name is considered to exist. - # - # If you override this method to handle additional cases, you may - # also provide a method (like +_handle_method_missing+) to handle - # the case. - # - # If none of these conditions are true, and +method_for_action+ - # returns +nil+, an +AbstractController::ActionNotFound+ exception will be raised. - # - # ==== Parameters - # * action_name - An action name to find a method name for - # - # ==== Returns - # * string - The name of the method that handles the action - # * nil - No method name could be found. - # - # source://actionpack//lib/abstract_controller/base.rb#273 - def method_for_action(action_name); end - - # Call the action. Override this in a subclass to modify the - # behavior around processing an action. This, and not #process, - # is the intended way to override action dispatching. - # - # Notice that the first argument is the method to be dispatched - # which is *not* necessarily the same as the action name. - # - # source://actionpack//lib/abstract_controller/base.rb#214 - def process_action(*_arg0, **_arg1, &_arg2); end - - class << self - # Returns the value of attribute abstract. - # - # source://actionpack//lib/abstract_controller/base.rb#50 - def abstract; end - - # Define a controller as abstract. See internal_methods for more - # details. - # - # source://actionpack//lib/abstract_controller/base.rb#55 - def abstract!; end - - # Returns the value of attribute abstract. - # - # source://actionpack//lib/abstract_controller/base.rb#50 - def abstract?; end - - # A list of method names that should be considered actions. This - # includes all public instance methods on a controller, less - # any internal methods (see internal_methods), adding back in - # any methods that are internal, but still exist on the class - # itself. - # - # ==== Returns - # * Set - A set of all methods that should be considered actions. - # - # source://actionpack//lib/abstract_controller/base.rb#89 - def action_methods; end - - # action_methods are cached and there is sometimes a need to refresh - # them. ::clear_action_methods! allows you to do that, so next time - # you run action_methods, they will be recalculated. - # - # source://actionpack//lib/abstract_controller/base.rb#107 - def clear_action_methods!; end - - # Returns the full controller name, underscored, without the ending Controller. - # - # class MyApp::MyPostsController < AbstractController::Base - # - # end - # - # MyApp::MyPostsController.controller_path # => "my_app/my_posts" - # - # ==== Returns - # * String - # - # source://actionpack//lib/abstract_controller/base.rb#121 - def controller_path; end - - # source://actionpack//lib/abstract_controller/base.rb#59 - def inherited(klass); end - - # A list of all internal methods for a controller. This finds the first - # abstract superclass of a controller, and gets a list of all public - # instance methods on that abstract class. Public instance methods of - # a controller would normally be considered action methods, so methods - # declared on abstract classes are being removed. - # (ActionController::Metal and ActionController::Base are defined as abstract) - # - # source://actionpack//lib/abstract_controller/base.rb#74 - def internal_methods; end - - # Refresh the cached action_methods when a new action_method is added. - # - # source://actionpack//lib/abstract_controller/base.rb#126 - def method_added(name); end - - # Returns true if the given controller is capable of rendering - # a path. A subclass of +AbstractController::Base+ - # may return false. An Email controller for example does not - # support paths, only full URLs. - # - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/base.rb#190 - def supports_path?; end - end -end - -# source://actionpack//lib/abstract_controller/caching.rb#4 -module AbstractController::Caching - include ::AbstractController::Caching::ConfigMethods - extend ::ActiveSupport::Concern - extend ::ActiveSupport::Autoload - include GeneratedInstanceMethods - include ::AbstractController::Caching::Fragments - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::Caching::Fragments::ClassMethods - mixes_in_class_methods ::AbstractController::Caching::ClassMethods - mixes_in_class_methods ::AbstractController::Caching::ConfigMethods - - # source://actionpack//lib/abstract_controller/caching.rb#52 - def view_cache_dependencies; end - - private - - # Convenience accessor. - # - # source://actionpack//lib/abstract_controller/caching.rb#58 - def cache(key, options = T.unsafe(nil), &block); end - - module GeneratedClassMethods - def _view_cache_dependencies; end - def _view_cache_dependencies=(value); end - def _view_cache_dependencies?; end - def fragment_cache_keys; end - def fragment_cache_keys=(value); end - def fragment_cache_keys?; end - end - - module GeneratedInstanceMethods - def _view_cache_dependencies; end - def _view_cache_dependencies=(value); end - def _view_cache_dependencies?; end - def fragment_cache_keys; end - def fragment_cache_keys=(value); end - def fragment_cache_keys?; end - end -end - -# source://actionpack//lib/abstract_controller/caching.rb#46 -module AbstractController::Caching::ClassMethods - # source://actionpack//lib/abstract_controller/caching.rb#47 - def view_cache_dependency(&dependency); end -end - -# source://actionpack//lib/abstract_controller/caching.rb#12 -module AbstractController::Caching::ConfigMethods - # source://actionpack//lib/abstract_controller/caching.rb#13 - def cache_store; end - - # source://actionpack//lib/abstract_controller/caching.rb#17 - def cache_store=(store); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/caching.rb#22 - def cache_configured?; end -end - -# Fragment caching is used for caching various blocks within -# views without caching the entire action as a whole. This is -# useful when certain elements of an action change frequently or -# depend on complicated state while other parts rarely change or -# can be shared amongst multiple parties. The caching is done using -# the +cache+ helper available in the Action View. See -# ActionView::Helpers::CacheHelper for more information. -# -# While it's strongly recommended that you use key-based cache -# expiration (see links in CacheHelper for more information), -# it is also possible to manually expire caches. For example: -# -# expire_fragment('name_of_cache') -# -# source://actionpack//lib/abstract_controller/caching/fragments.rb#18 -module AbstractController::Caching::Fragments - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::Caching::Fragments::ClassMethods - - # Given a key (as described in +expire_fragment+), returns - # a key array suitable for use in reading, writing, or expiring a - # cached fragment. All keys begin with :views, - # followed by ENV["RAILS_CACHE_ID"] or ENV["RAILS_APP_VERSION"] if set, - # followed by any controller-wide key prefix values, ending - # with the specified +key+ value. - # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#68 - def combined_fragment_cache_key(key); end - - # Removes fragments from the cache. - # - # +key+ can take one of three forms: - # - # * String - This would normally take the form of a path, like - # pages/45/notes. - # * Hash - Treated as an implicit call to +url_for+, like - # { controller: 'pages', action: 'notes', id: 45} - # * Regexp - Will remove any fragment that matches, so - # %r{pages/\d*/notes} might remove all notes. Make sure you - # don't use anchors in the regex (^ or $) because - # the actual filename matched looks like - # ./cache/filename/path.cache. Note: Regexp expiration is - # only supported on caches that can iterate over all keys (unlike - # memcached). - # - # +options+ is passed through to the cache store's +delete+ - # method (or delete_matched, for Regexp keys). - # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#132 - def expire_fragment(key, options = T.unsafe(nil)); end - - # Check if a cached fragment from the location signified by - # +key+ exists (see +expire_fragment+ for acceptable formats). - # - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#105 - def fragment_exist?(key, options = T.unsafe(nil)); end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#145 - def instrument_fragment_cache(name, key, &block); end - - # Reads a cached fragment from the location signified by +key+ - # (see +expire_fragment+ for acceptable formats). - # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#93 - def read_fragment(key, options = T.unsafe(nil)); end - - # Writes +content+ to the location signified by - # +key+ (see +expire_fragment+ for acceptable formats). - # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#80 - def write_fragment(key, content, options = T.unsafe(nil)); end - - module GeneratedClassMethods - def fragment_cache_keys; end - def fragment_cache_keys=(value); end - def fragment_cache_keys?; end - end - - module GeneratedInstanceMethods - def fragment_cache_keys; end - def fragment_cache_keys=(value); end - def fragment_cache_keys?; end - end -end - -# source://actionpack//lib/abstract_controller/caching/fragments.rb#35 -module AbstractController::Caching::Fragments::ClassMethods - # Allows you to specify controller-wide key prefixes for - # cache fragments. Pass either a constant +value+, or a block - # which computes a value each time a cache key is generated. - # - # For example, you may want to prefix all fragment cache keys - # with a global version identifier, so you can easily - # invalidate all caches. - # - # class ApplicationController - # fragment_cache_key "v1" - # end - # - # When it's time to invalidate all fragments, simply change - # the string constant. Or, progressively roll out the cache - # invalidation using a computed value: - # - # class ApplicationController - # fragment_cache_key do - # @account.id.odd? ? "v1" : "v2" - # end - # end - # - # source://actionpack//lib/abstract_controller/caching/fragments.rb#57 - def fragment_cache_key(value = T.unsafe(nil), &key); end -end - -# = Abstract Controller Callbacks -# -# Abstract Controller provides hooks during the life cycle of a controller action. -# Callbacks allow you to trigger logic during this cycle. Available callbacks are: -# -# * after_action -# * append_after_action -# * append_around_action -# * append_before_action -# * around_action -# * before_action -# * prepend_after_action -# * prepend_around_action -# * prepend_before_action -# * skip_after_action -# * skip_around_action -# * skip_before_action -# -# NOTE: Calling the same callback multiple times will overwrite previous callback definitions. -# -# source://actionpack//lib/abstract_controller/callbacks.rb#24 -module AbstractController::Callbacks - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Callbacks - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveSupport::DescendantsTracker - mixes_in_class_methods ::AbstractController::Callbacks::ClassMethods - - private - - # Override AbstractController::Base#process_action to run the - # process_action callbacks around the normal behavior. - # - # source://actionpack//lib/abstract_controller/callbacks.rb#232 - def process_action(*_arg0, **_arg1, &_arg2); 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://actionpack//lib/abstract_controller/callbacks.rb#38 -class AbstractController::Callbacks::ActionFilter - # @return [ActionFilter] a new instance of ActionFilter - # - # source://actionpack//lib/abstract_controller/callbacks.rb#39 - def initialize(actions); end - - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/callbacks.rb#43 - def after(controller); end - - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/callbacks.rb#43 - def around(controller); end - - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/callbacks.rb#43 - def before(controller); end - - # @return [Boolean] - # - # source://actionpack//lib/abstract_controller/callbacks.rb#43 - def match?(controller); end -end - -# source://actionpack//lib/abstract_controller/callbacks.rb#52 -module AbstractController::Callbacks::ClassMethods - # Take callback names and an optional callback proc, normalize them, - # then call the block with each callback. This allows us to abstract - # the normalization across several methods that use it. - # - # ==== Parameters - # * callbacks - An array of callbacks, with an optional - # options hash as the last parameter. - # * block - A proc that should be added to the callbacks. - # - # ==== Block Parameters - # * name - The callback to be added. - # * options - A hash of options to be used when adding the callback. - # - # source://actionpack//lib/abstract_controller/callbacks.rb#96 - def _insert_callbacks(callbacks, block = T.unsafe(nil)); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#77 - def _normalize_callback_option(options, from, to); end - - # If +:only+ or +:except+ are used, convert the options into the - # +:if+ and +:unless+ options of ActiveSupport::Callbacks. - # - # The basic idea is that :only => :index gets converted to - # :if => proc {|c| c.action_name == "index" }. - # - # Note that :only has priority over :if in case they - # are used together. - # - # only: :index, if: -> { true } # the :if option will be ignored. - # - # Note that :if has priority over :except in case they - # are used together. - # - # except: :index, if: -> { true } # the :except option will be ignored. - # - # ==== Options - # * only - The callback should be run only for this action. - # * except - The callback should be run for all actions except this action. - # - # source://actionpack//lib/abstract_controller/callbacks.rb#72 - def _normalize_callback_options(options); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#204 - def after_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#204 - def append_after_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#204 - def append_around_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#204 - def append_before_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#204 - def around_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#204 - def before_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#210 - def prepend_after_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#210 - def prepend_around_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#210 - def prepend_before_action(*names, &blk); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#218 - def skip_after_action(*names); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#218 - def skip_around_action(*names); end - - # source://actionpack//lib/abstract_controller/callbacks.rb#218 - def skip_before_action(*names); end -end - -# source://actionpack//lib/abstract_controller/collector.rb#6 -module AbstractController::Collector - # source://actionpack//lib/abstract_controller/collector.rb#10 - def atom(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def bmp(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def css(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def csv(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def gif(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def gzip(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def html(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def ics(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def jpeg(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def js(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def json(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def m4a(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def mp3(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def mp4(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def mpeg(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def multipart_form(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def ogg(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def otf(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def pdf(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def png(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def rss(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def svg(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def text(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def tiff(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def ttf(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def url_encoded_form(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def vcf(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def vtt(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def webm(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def woff(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def woff2(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def xml(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def yaml(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/collector.rb#10 - def zip(*args, **_arg1, &block); end - - private - - # source://actionpack//lib/abstract_controller/collector.rb#26 - def method_missing(symbol, *args, **_arg2, &block); end - - class << self - # source://actionpack//lib/abstract_controller/collector.rb#7 - def generate_method_for_mime(mime); end - end -end - -# source://actionpack//lib/abstract_controller/rendering.rb#9 -class AbstractController::DoubleRenderError < ::AbstractController::Error - # @return [DoubleRenderError] a new instance of DoubleRenderError - # - # source://actionpack//lib/abstract_controller/rendering.rb#12 - def initialize(message = T.unsafe(nil)); end -end - -# source://actionpack//lib/abstract_controller/rendering.rb#10 -AbstractController::DoubleRenderError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/abstract_controller/error.rb#4 -class AbstractController::Error < ::StandardError; end - -# source://actionpack//lib/abstract_controller/helpers.rb#7 -module AbstractController::Helpers - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::Helpers::ClassMethods - - # source://actionpack//lib/abstract_controller/helpers.rb#40 - def _helpers; end - - module GeneratedClassMethods - def _helper_methods; end - def _helper_methods=(value); end - def _helper_methods?; end - end - - module GeneratedInstanceMethods - def _helper_methods; end - def _helper_methods=(value); end - def _helper_methods?; end - end -end - -# source://actionpack//lib/abstract_controller/helpers.rb#44 -module AbstractController::Helpers::ClassMethods - # Sets the attribute _helpers - # - # @param value the value to set the attribute _helpers to. - # - # source://actionpack//lib/abstract_controller/helpers.rb#56 - def _helpers=(_arg0); end - - # source://actionpack//lib/abstract_controller/helpers.rb#188 - def _helpers_for_modification; end - - # Clears up all existing helpers in this class, only keeping the helper - # with the same name as this class. - # - # source://actionpack//lib/abstract_controller/helpers.rb#162 - def clear_helpers; end - - # Includes the given modules in the template class. - # - # Modules can be specified in different ways. All of the following calls - # include +FooHelper+: - # - # # Module, recommended. - # helper FooHelper - # - # # String/symbol without the "helper" suffix, camel or snake case. - # helper "Foo" - # helper :Foo - # helper "foo" - # helper :foo - # - # The last two assume that "foo".camelize returns "Foo". - # - # When strings or symbols are passed, the method finds the actual module - # object using String#constantize. Therefore, if the module has not been - # yet loaded, it has to be autoloadable, which is normally the case. - # - # Namespaces are supported. The following calls include +Foo::BarHelper+: - # - # # Module, recommended. - # helper Foo::BarHelper - # - # # String/symbol without the "helper" suffix, camel or snake case. - # helper "Foo::Bar" - # helper :"Foo::Bar" - # helper "foo/bar" - # helper :"foo/bar" - # - # The last two assume that "foo/bar".camelize returns "Foo::Bar". - # - # The method accepts a block too. If present, the block is evaluated in - # the context of the controller helper module. This simple call makes the - # +wadus+ method available in templates of the enclosing controller: - # - # helper do - # def wadus - # "wadus" - # end - # end - # - # Furthermore, all the above styles can be mixed together: - # - # helper FooHelper, "woo", "bar/baz" do - # def wadus - # "wadus" - # end - # end - # - # source://actionpack//lib/abstract_controller/helpers.rb#151 - def helper(*args, &block); end - - # Declare a controller method as a helper. For example, the following - # makes the +current_user+ and +logged_in?+ controller methods available - # to the view: - # class ApplicationController < ActionController::Base - # helper_method :current_user, :logged_in? - # - # private - # def current_user - # @current_user ||= User.find_by(id: session[:user]) - # end - # - # def logged_in? - # current_user != nil - # end - # end - # - # In a view: - # <% if logged_in? -%>Welcome, <%= current_user.name %><% end -%> - # - # ==== Parameters - # * method[, method] - A name or names of a method on the controller - # to be made available on the view. - # - # source://actionpack//lib/abstract_controller/helpers.rb#80 - def helper_method(*methods); end - - # When a class is inherited, wrap its helper module in a new module. - # This ensures that the parent class's module can be changed - # independently of the child class's. - # - # source://actionpack//lib/abstract_controller/helpers.rb#48 - def inherited(klass); end - - # Given an array of values like the ones accepted by +helper+, this method - # returns an array with the corresponding modules, in the same order. - # - # source://actionpack//lib/abstract_controller/helpers.rb#173 - def modules_for_helpers(modules_or_helper_prefixes); end - - private - - # source://actionpack//lib/abstract_controller/helpers.rb#207 - def default_helper_module!; end - - # source://actionpack//lib/abstract_controller/helpers.rb#196 - def define_helpers_module(klass, helpers = T.unsafe(nil)); end -end - -# source://actionpack//lib/abstract_controller/helpers.rb#26 -class AbstractController::Helpers::MissingHelperError < ::LoadError - # @return [MissingHelperError] a new instance of MissingHelperError - # - # source://actionpack//lib/abstract_controller/helpers.rb#27 - def initialize(error, path); end -end - -# source://actionpack//lib/abstract_controller/logger.rb#6 -module AbstractController::Logger - extend ::ActiveSupport::Concern - include ::ActiveSupport::Benchmarkable -end - -# source://actionpack//lib/abstract_controller/railties/routes_helpers.rb#6 -module AbstractController::Railties; end - -# source://actionpack//lib/abstract_controller/railties/routes_helpers.rb#7 -module AbstractController::Railties::RoutesHelpers - class << self - # source://actionpack//lib/abstract_controller/railties/routes_helpers.rb#8 - def with(routes, include_path_helpers = T.unsafe(nil)); end - end -end - -# source://actionpack//lib/abstract_controller/rendering.rb#17 -module AbstractController::Rendering - extend ::ActiveSupport::Concern - include ::ActionView::ViewPaths - - mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods - - # Normalizes arguments and options, and then delegates to render_to_body and - # sticks the result in self.response_body. - # - # Supported options depend on the underlying +render_to_body+ implementation. - # - # source://actionpack//lib/abstract_controller/rendering.rb#25 - def render(*args, &block); end - - # Performs the actual template rendering. - # - # source://actionpack//lib/abstract_controller/rendering.rb#49 - def render_to_body(options = T.unsafe(nil)); end - - # Similar to #render, but only returns the rendered template as a string, - # instead of setting +self.response_body+. - # - # If a component extends the semantics of +response_body+ (as ActionController - # extends it to be anything that responds to the method each), this method - # needs to be overridden in order to still return a string. - # - # source://actionpack//lib/abstract_controller/rendering.rb#43 - def render_to_string(*args, &block); end - - # Returns +Content-Type+ of rendered content. - # - # source://actionpack//lib/abstract_controller/rendering.rb#53 - def rendered_format; end - - # This method should return a hash with assigns. - # You can overwrite this configuration per controller. - # - # source://actionpack//lib/abstract_controller/rendering.rb#61 - def view_assigns; end - - private - - # Normalize args by converting render "foo" to - # render :action => "foo" and render "foo/bar" to - # render :file => "foo/bar". - # - # source://actionpack//lib/abstract_controller/rendering.rb#73 - def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end - - # Normalize options. - # - # source://actionpack//lib/abstract_controller/rendering.rb#88 - def _normalize_options(options); end - - # Normalize args and options. - # - # source://actionpack//lib/abstract_controller/rendering.rb#114 - def _normalize_render(*args, &block); end - - # Process the rendered format. - # - # source://actionpack//lib/abstract_controller/rendering.rb#98 - def _process_format(format); end - - # Process extra options. - # - # source://actionpack//lib/abstract_controller/rendering.rb#93 - def _process_options(options); end - - # source://actionpack//lib/abstract_controller/rendering.rb#101 - def _process_variant(options); end - - # source://actionpack//lib/abstract_controller/rendering.rb#121 - def _protected_ivars; end - - # source://actionpack//lib/abstract_controller/rendering.rb#104 - def _set_html_content_type; end - - # source://actionpack//lib/abstract_controller/rendering.rb#110 - def _set_rendered_content_type(format); end - - # source://actionpack//lib/abstract_controller/rendering.rb#107 - def _set_vary_header; end -end - -# source://actionpack//lib/abstract_controller/rendering.rb#57 -AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/abstract_controller/translation.rb#6 -module AbstractController::Translation - # Delegates to I18n.localize. - # - # source://actionpack//lib/abstract_controller/translation.rb#51 - def l(object, **options); end - - # Delegates to I18n.localize. - # - # source://actionpack//lib/abstract_controller/translation.rb#51 - def localize(object, **options); end - - # source://actionpack//lib/abstract_controller/translation.rb#7 - def raise_on_missing_translations; end - - # source://actionpack//lib/abstract_controller/translation.rb#7 - def raise_on_missing_translations=(val); end - - # Delegates to I18n.translate. - # - # When the given key starts with a period, it will be scoped by the current - # controller and action. So if you call translate(".foo") from - # PeopleController#index, it will convert the call to - # I18n.translate("people.index.foo"). This makes it less repetitive - # to translate many keys within the same controller / action and gives you a - # simple framework for scoping them consistently. - # - # source://actionpack//lib/abstract_controller/translation.rb#17 - def t(key, **options); end - - # Delegates to I18n.translate. - # - # When the given key starts with a period, it will be scoped by the current - # controller and action. So if you call translate(".foo") from - # PeopleController#index, it will convert the call to - # I18n.translate("people.index.foo"). This makes it less repetitive - # to translate many keys within the same controller / action and gives you a - # simple framework for scoping them consistently. - # - # source://actionpack//lib/abstract_controller/translation.rb#17 - def translate(key, **options); end - - class << self - # source://actionpack//lib/abstract_controller/translation.rb#7 - def raise_on_missing_translations; end - - # source://actionpack//lib/abstract_controller/translation.rb#7 - def raise_on_missing_translations=(val); end - end -end - -# source://actionpack//lib/abstract_controller/translation.rb#57 -AbstractController::Translation::MISSING_TRANSLATION = T.let(T.unsafe(nil), Integer) - -# Includes +url_for+ into the host class (e.g. an abstract controller or mailer). The class -# has to provide a +RouteSet+ by implementing the _routes methods. Otherwise, an -# exception will be raised. -# -# Note that this module is completely decoupled from HTTP - the only requirement is a valid -# _routes implementation. -# -# source://actionpack//lib/abstract_controller/url_for.rb#10 -module AbstractController::UrlFor - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActionDispatch::Routing::UrlFor - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods - - # source://actionpack//lib/abstract_controller/url_for.rb#14 - def _routes; end - - module GeneratedClassMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end - - module GeneratedInstanceMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end -end - -# source://actionpack//lib/abstract_controller/url_for.rb#19 -module AbstractController::UrlFor::ClassMethods - # source://actionpack//lib/abstract_controller/url_for.rb#20 - def _routes; end - - # source://actionpack//lib/abstract_controller/url_for.rb#24 - def action_methods; end -end - -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#13 -module ActionController - extend ::ActiveSupport::Autoload - - class << self - # See Renderers.add - # - # source://actionpack//lib/action_controller/metal/renderers.rb#7 - def add_renderer(key, &block); end - - # See Renderers.remove - # - # source://actionpack//lib/action_controller/metal/renderers.rb#12 - def remove_renderer(key); end - end -end - -# API Controller is a lightweight version of ActionController::Base, -# created for applications that don't require all functionalities that a complete -# \Rails controller provides, allowing you to create controllers with just the -# features that you need for API only applications. -# -# An API Controller is different from a normal controller in the sense that -# by default it doesn't include a number of features that are usually required -# by browser access only: layouts and templates rendering, -# flash, assets, and so on. This makes the entire controller stack thinner, -# suitable for API applications. It doesn't mean you won't have such -# features if you need them: they're all available for you to include in -# your application, they're just not part of the default API controller stack. -# -# Normally, +ApplicationController+ is the only controller that inherits from -# ActionController::API. All other controllers in turn inherit from -# +ApplicationController+. -# -# A sample controller could look like this: -# -# class PostsController < ApplicationController -# def index -# posts = Post.all -# render json: posts -# end -# end -# -# Request, response, and parameters objects all work the exact same way as -# ActionController::Base. -# -# == Renders -# -# The default API Controller stack includes all renderers, which means you -# can use render :json and siblings freely in your controllers. Keep -# in mind that templates are not going to be rendered, so you need to ensure -# your controller is calling either render or redirect_to in -# all actions, otherwise it will return 204 No Content. -# -# def show -# post = Post.find(params[:id]) -# render json: post -# end -# -# == Redirects -# -# Redirects are used to move from one action to another. You can use the -# redirect_to method in your controllers in the same way as in -# ActionController::Base. For example: -# -# def create -# redirect_to root_url and return if not_authorized? -# # do stuff here -# end -# -# == Adding New Behavior -# -# In some scenarios you may want to add back some functionality provided by -# ActionController::Base that is not present by default in -# ActionController::API, for instance MimeResponds. This -# module gives you the respond_to method. Adding it is quite simple, -# you just need to include the module in a specific controller or in -# +ApplicationController+ in case you want it available in your entire -# application: -# -# class ApplicationController < ActionController::API -# include ActionController::MimeResponds -# end -# -# class PostsController < ApplicationController -# def index -# posts = Post.all -# -# respond_to do |format| -# format.json { render json: posts } -# format.xml { render xml: posts } -# end -# end -# end -# -# Make sure to check the modules included in ActionController::Base -# if you want to use any other functionality that is not provided -# by ActionController::API out of the box. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://actionpack//lib/action_controller/api.rb#89 -class ActionController::API < ::ActionController::Metal - include ::ActionView::ViewPaths - include ::AbstractController::Rendering - include ::ActionDispatch::Routing::PolymorphicRoutes - include ::ActionDispatch::Routing::UrlFor - include ::AbstractController::UrlFor - include ::ActionController::UrlFor - include ::AbstractController::Logger - include ::ActiveSupport::Benchmarkable - include ::ActionController::Redirecting - include ::ActionController::ApiRendering - include ::ActionController::Rendering - include ::ActionController::Renderers - include ::ActionController::Renderers::All - include ::ActionController::Head - include ::ActionController::ConditionalGet - include ::ActionController::BasicImplicitRender - include ::ActionController::StrongParameters - include ::ActionController::DataStreaming - include ::ActionController::DefaultHeaders - include ::ActionController::Logging - include ::ActiveSupport::Callbacks - include ::AbstractController::Callbacks - include ::ActiveSupport::Rescuable - include ::ActionController::Rescue - include ::ActionController::Instrumentation - include ::ActionController::ParamsWrapper - extend ::ActionView::ViewPaths::ClassMethods - extend ::AbstractController::UrlFor::ClassMethods - extend ::ActionController::Rendering::ClassMethods - extend ::ActionController::Renderers::ClassMethods - extend ::ActionController::ConditionalGet::ClassMethods - extend ::ActionController::DefaultHeaders::ClassMethods - extend ::ActionController::Logging::ClassMethods - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::AbstractController::Callbacks::ClassMethods - extend ::ActiveSupport::Rescuable::ClassMethods - extend ::ActionController::Instrumentation::ClassMethods - extend ::ActionController::ParamsWrapper::ClassMethods - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#940 - def _process_action_callbacks; end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers; end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers=(_arg0); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers?; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#928 - def _run_process_action_callbacks(&block); end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options; end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options=(_arg0); end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options?; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(_arg0); end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def logger; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def logger=(value); end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#15 - def raise_on_open_redirects; end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#15 - def raise_on_open_redirects=(val); end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers=(_arg0); end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - class << self - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#932 - def _process_action_callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#936 - def _process_action_callbacks=(value); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers; end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers=(value); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers?; end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options; end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options=(value); end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options?; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(value); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(value); end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def logger; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def logger=(value); end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack; end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#15 - def raise_on_open_redirects; end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#15 - def raise_on_open_redirects=(val); end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # Shortcut helper that returns all the ActionController::API modules except - # the ones passed as arguments: - # - # class MyAPIBaseController < ActionController::Metal - # ActionController::API.without_modules(:UrlFor).each do |left| - # include left - # end - # end - # - # This gives better control over what you want to exclude and makes it easier - # to create an API controller class, instead of listing the modules required - # manually. - # - # source://actionpack//lib/action_controller/api.rb#104 - def without_modules(*modules); end - end -end - -# source://actionpack//lib/action_controller/api.rb#112 -ActionController::API::MODULES = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_controller/metal/exceptions.rb#4 -class ActionController::ActionControllerError < ::StandardError; end - -# source://actionpack//lib/action_controller/api/api_rendering.rb#4 -module ActionController::ApiRendering - extend ::ActiveSupport::Concern - include ::ActionController::Rendering - - mixes_in_class_methods ::ActionController::Rendering::ClassMethods - - # source://actionpack//lib/action_controller/api/api_rendering.rb#11 - def render_to_body(options = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#7 -class ActionController::BadRequest < ::ActionController::ActionControllerError - # @return [BadRequest] a new instance of BadRequest - # - # source://actionpack//lib/action_controller/metal/exceptions.rb#8 - def initialize(msg = T.unsafe(nil)); end -end - -# Action Controllers are the core of a web request in \Rails. They are made up of one or more actions that are executed -# on request and then either it renders a template or redirects to another action. An action is defined as a public method -# on the controller, which will automatically be made accessible to the web-server through \Rails Routes. -# -# By default, only the ApplicationController in a \Rails application inherits from ActionController::Base. All other -# controllers inherit from ApplicationController. This gives you one class to configure things such as -# request forgery protection and filtering of sensitive request parameters. -# -# A sample controller could look like this: -# -# class PostsController < ApplicationController -# def index -# @posts = Post.all -# end -# -# def create -# @post = Post.create params[:post] -# redirect_to posts_path -# end -# end -# -# Actions, by default, render a template in the app/views directory corresponding to the name of the controller and action -# after executing code in the action. For example, the +index+ action of the PostsController would render the -# template app/views/posts/index.html.erb by default after populating the @posts instance variable. -# -# Unlike index, the create action will not render a template. After performing its main purpose (creating a -# new post), it initiates a redirect instead. This redirect works by returning an external -# 302 Moved HTTP response that takes the user to the index action. -# -# These two methods represent the two basic action archetypes used in Action Controllers: Get-and-show and do-and-redirect. -# Most actions are variations on these themes. -# -# == Requests -# -# For every request, the router determines the value of the +controller+ and +action+ keys. These determine which controller -# and action are called. The remaining request parameters, the session (if one is available), and the full request with -# all the HTTP headers are made available to the action through accessor methods. Then the action is performed. -# -# The full request object is available via the request accessor and is primarily used to query for HTTP headers: -# -# def server_ip -# location = request.env["REMOTE_ADDR"] -# render plain: "This server hosted at #{location}" -# end -# -# == Parameters -# -# All request parameters, whether they come from a query string in the URL or form data submitted through a POST request are -# available through the params method which returns a hash. For example, an action that was performed through -# /posts?category=All&limit=5 will include { "category" => "All", "limit" => "5" } in params. -# -# It's also possible to construct multi-dimensional parameter hashes by specifying keys using brackets, such as: -# -# -# -# -# A request coming from a form holding these inputs will include { "post" => { "name" => "david", "address" => "hyacintvej" } }. -# If the address input had been named post[address][street], the params would have included -# { "post" => { "address" => { "street" => "hyacintvej" } } }. There's no limit to the depth of the nesting. -# -# == Sessions -# -# Sessions allow you to store objects in between requests. This is useful for objects that are not yet ready to be persisted, -# such as a Signup object constructed in a multi-paged process, or objects that don't change much and are needed all the time, such -# as a User object for a system that requires login. The session should not be used, however, as a cache for objects where it's likely -# they could be changed unknowingly. It's usually too much work to keep it all synchronized -- something databases already excel at. -# -# You can place objects in the session by using the session method, which accesses a hash: -# -# session[:person] = Person.authenticate(user_name, password) -# -# You can retrieve it again through the same hash: -# -# "Hello #{session[:person]}" -# -# For removing objects from the session, you can either assign a single key to +nil+: -# -# # removes :person from session -# session[:person] = nil -# -# or you can remove the entire session with +reset_session+. -# -# By default, sessions are stored in an encrypted browser cookie (see -# ActionDispatch::Session::CookieStore). Thus the user will not be able to -# read or edit the session data. However, the user can keep a copy of the -# cookie even after it has expired, so you should avoid storing sensitive -# information in cookie-based sessions. -# -# == Responses -# -# Each action results in a response, which holds the headers and document to be sent to the user's browser. The actual response -# object is generated automatically through the use of renders and redirects and requires no user intervention. -# -# == Renders -# -# Action Controller sends content to the user by using one of five rendering methods. The most versatile and common is the rendering -# of a template. Included in the Action Pack is the Action View, which enables rendering of ERB templates. It's automatically configured. -# The controller passes objects to the view by assigning instance variables: -# -# def show -# @post = Post.find(params[:id]) -# end -# -# Which are then automatically available to the view: -# -# Title: <%= @post.title %> -# -# You don't have to rely on the automated rendering. For example, actions that could result in the rendering of different templates -# will use the manual rendering methods: -# -# def search -# @results = Search.find(params[:query]) -# case @results.count -# when 0 then render action: "no_results" -# when 1 then render action: "show" -# when 2..10 then render action: "show_many" -# end -# end -# -# Read more about writing ERB and Builder templates in ActionView::Base. -# -# == Redirects -# -# Redirects are used to move from one action to another. For example, after a create action, which stores a blog entry to the -# database, we might like to show the user the new entry. Because we're following good DRY principles (Don't Repeat Yourself), we're -# going to reuse (and redirect to) a show action that we'll assume has already been created. The code might look like this: -# -# def create -# @entry = Entry.new(params[:entry]) -# if @entry.save -# # The entry was saved correctly, redirect to show -# redirect_to action: 'show', id: @entry.id -# else -# # things didn't go so well, do something else -# end -# end -# -# In this case, after saving our new entry to the database, the user is redirected to the show method, which is then executed. -# Note that this is an external HTTP-level redirection which will cause the browser to make a second request (a GET to the show action), -# and not some internal re-routing which calls both "create" and then "show" within one request. -# -# Learn more about redirect_to and what options you have in ActionController::Redirecting. -# -# == Calling multiple redirects or renders -# -# An action may contain only a single render or a single redirect. Attempting to try to do either again will result in a DoubleRenderError: -# -# def do_something -# redirect_to action: "elsewhere" -# render action: "overthere" # raises DoubleRenderError -# end -# -# If you need to redirect on the condition of something, then be sure to add "and return" to halt execution. -# -# def do_something -# redirect_to(action: "elsewhere") and return if monkeys.nil? -# render action: "overthere" # won't be called if monkeys is nil -# end -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://actionpack//lib/action_controller/base.rb#167 -class ActionController::Base < ::ActionController::Metal - include ::ActionView::ViewPaths - include ::AbstractController::Rendering - include ::AbstractController::Translation - include ::AbstractController::AssetPaths - include ::AbstractController::Helpers - include ::ActionController::Helpers - include ::ActionDispatch::Routing::PolymorphicRoutes - include ::ActionDispatch::Routing::UrlFor - include ::AbstractController::UrlFor - include ::ActionController::UrlFor - include ::AbstractController::Logger - include ::ActiveSupport::Benchmarkable - include ::ActionController::Redirecting - include ::ActionView::Rendering - include ::ActionView::Layouts - include ::ActionController::Rendering - include ::ActionController::Renderers - include ::ActionController::Renderers::All - include ::ActionController::Head - include ::ActionController::ConditionalGet - include ::ActionController::EtagWithTemplateDigest - include ::ActionController::EtagWithFlash - include ::ActionController::Caching - include ::AbstractController::Caching::Fragments - include ::AbstractController::Caching::ConfigMethods - include ::AbstractController::Caching - include ::ActionController::MimeResponds - include ::ActionController::BasicImplicitRender - include ::ActionController::ImplicitRender - include ::ActionController::StrongParameters - include ::ActionController::ParameterEncoding - include ::ActionController::Cookies - include ::ActionController::Flash - include ::ActionController::FormBuilder - include ::ActiveSupport::Callbacks - include ::AbstractController::Callbacks - include ::ActionController::RequestForgeryProtection - include ::ActionController::ContentSecurityPolicy - include ::ActionController::PermissionsPolicy - include ::ActionController::Streaming - include ::ActionController::DataStreaming - include ::ActionController::HttpAuthentication::Basic::ControllerMethods - include ::ActionController::HttpAuthentication::Digest::ControllerMethods - include ::ActionController::HttpAuthentication::Token::ControllerMethods - include ::ActionController::DefaultHeaders - include ::ActionController::Logging - include ::ActiveSupport::Rescuable - include ::ActionController::Rescue - include ::ActionController::Instrumentation - include ::ActionController::ParamsWrapper - extend ::ActionView::ViewPaths::ClassMethods - extend ::AbstractController::Helpers::ClassMethods - extend ::ActionController::Helpers::ClassMethods - extend ::AbstractController::UrlFor::ClassMethods - extend ::ActionView::Rendering::ClassMethods - extend ::ActionView::Layouts::ClassMethods - extend ::ActionController::Rendering::ClassMethods - extend ::ActionController::Renderers::ClassMethods - extend ::ActionController::ConditionalGet::ClassMethods - extend ::AbstractController::Caching::Fragments::ClassMethods - extend ::AbstractController::Caching::ClassMethods - extend ::AbstractController::Caching::ConfigMethods - extend ::ActionController::ParameterEncoding::ClassMethods - extend ::ActionController::Flash::ClassMethods - extend ::ActionController::FormBuilder::ClassMethods - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::AbstractController::Callbacks::ClassMethods - extend ::ActionController::RequestForgeryProtection::ClassMethods - extend ::ActionController::ContentSecurityPolicy::ClassMethods - extend ::ActionController::PermissionsPolicy::ClassMethods - extend ::ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods - extend ::ActionController::DefaultHeaders::ClassMethods - extend ::ActionController::Logging::ClassMethods - extend ::ActiveSupport::Rescuable::ClassMethods - extend ::ActionController::Instrumentation::ClassMethods - extend ::ActionController::ParamsWrapper::ClassMethods - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://actionpack//lib/abstract_controller/helpers.rb#11 - def _helper_methods; end - - # source://actionpack//lib/abstract_controller/helpers.rb#11 - def _helper_methods=(_arg0); end - - # source://actionpack//lib/abstract_controller/helpers.rb#11 - def _helper_methods?; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#940 - def _process_action_callbacks; end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers; end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers=(_arg0); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers?; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#928 - def _run_process_action_callbacks(&block); end - - # source://actionpack//lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies; end - - # source://actionpack//lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies=(_arg0); end - - # source://actionpack//lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies?; end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options; end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options=(_arg0); end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options?; end - - # source://actionpack//lib/action_controller/metal/flash.rb#36 - def alert; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def allow_forgery_protection; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def allow_forgery_protection=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def asset_host; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def asset_host=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def assets_dir; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def assets_dir=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def default_asset_host_protocol; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def default_asset_host_protocol=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def default_protect_from_forgery; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def default_protect_from_forgery=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def default_static_extension; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def default_static_extension=(value); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def enable_fragment_cache_logging; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def enable_fragment_cache_logging=(value); end - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest; end - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest=(_arg0); end - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest?; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(_arg0); end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers?; end - - # source://actionpack//lib/action_controller/metal/flash.rb#10 - def flash(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def forgery_protection_origin_check; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def forgery_protection_origin_check=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def forgery_protection_strategy; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def forgery_protection_strategy=(value); end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys; end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys=(_arg0); end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys?; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#63 - def helpers_path; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#63 - def helpers_path=(_arg0); end - - # source://actionpack//lib/action_controller/metal/helpers.rb#63 - def helpers_path?; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#64 - def include_all_helpers; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#64 - def include_all_helpers=(_arg0); end - - # source://actionpack//lib/action_controller/metal/helpers.rb#64 - def include_all_helpers?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def javascripts_dir; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def javascripts_dir=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def log_warning_on_csrf_failure; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def log_warning_on_csrf_failure=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def logger; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def logger=(value); end - - # source://actionpack//lib/action_controller/metal/flash.rb#36 - def notice; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def per_form_csrf_tokens; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def per_form_csrf_tokens=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def perform_caching; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def perform_caching=(value); end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#15 - def raise_on_open_redirects; end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#15 - def raise_on_open_redirects=(val); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def relative_url_root; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def relative_url_root=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def request_forgery_protection_token; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def request_forgery_protection_token=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers=(_arg0); end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def stylesheets_dir; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def stylesheets_dir=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def urlsafe_csrf_tokens; end - - private - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - # source://actionpack//lib/action_controller/base.rb#266 - def _protected_ivars; end - - class << self - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://actionpack//lib/action_controller/form_builder.rb#31 - def _default_form_builder; end - - # source://actionpack//lib/action_controller/form_builder.rb#31 - def _default_form_builder=(value); end - - # source://actionpack//lib/action_controller/form_builder.rb#31 - def _default_form_builder?; end - - # source://actionpack//lib/action_controller/metal/flash.rb#8 - def _flash_types; end - - # source://actionpack//lib/action_controller/metal/flash.rb#8 - def _flash_types=(value); end - - # source://actionpack//lib/action_controller/metal/flash.rb#8 - def _flash_types?; end - - # source://actionpack//lib/abstract_controller/helpers.rb#11 - def _helper_methods; end - - # source://actionpack//lib/abstract_controller/helpers.rb#11 - def _helper_methods=(value); end - - # source://actionpack//lib/abstract_controller/helpers.rb#11 - def _helper_methods?; end - - # source://actionpack//lib/abstract_controller/helpers.rb#15 - def _helpers; end - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#209 - def _layout; end - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#209 - def _layout=(value); end - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#209 - def _layout?; end - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#210 - def _layout_conditions; end - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#210 - def _layout_conditions=(value); end - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#210 - def _layout_conditions?; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#932 - def _process_action_callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#936 - def _process_action_callbacks=(value); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers; end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers=(value); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#31 - def _renderers?; end - - # source://actionpack//lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies; end - - # source://actionpack//lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies=(value); end - - # source://actionpack//lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies?; end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options; end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options=(value); end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def allow_forgery_protection; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def allow_forgery_protection=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def asset_host; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def asset_host=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def assets_dir; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def assets_dir=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def default_asset_host_protocol; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def default_asset_host_protocol=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def default_protect_from_forgery; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def default_protect_from_forgery=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def default_static_extension; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def default_static_extension=(value); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(value); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def enable_fragment_cache_logging; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def enable_fragment_cache_logging=(value); end - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest; end - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest=(value); end - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest?; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers; end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(value); end - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 - def etaggers?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def forgery_protection_origin_check; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def forgery_protection_origin_check=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def forgery_protection_strategy; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def forgery_protection_strategy=(value); end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys; end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys=(value); end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys?; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#63 - def helpers_path; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#63 - def helpers_path=(value); end - - # source://actionpack//lib/action_controller/metal/helpers.rb#63 - def helpers_path?; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#64 - def include_all_helpers; end - - # source://actionpack//lib/action_controller/metal/helpers.rb#64 - def include_all_helpers=(value); end - - # source://actionpack//lib/action_controller/metal/helpers.rb#64 - def include_all_helpers?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def javascripts_dir; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def javascripts_dir=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def log_warning_on_csrf_failure; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def log_warning_on_csrf_failure=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def logger; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def logger=(value); end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def per_form_csrf_tokens; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def per_form_csrf_tokens=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def perform_caching; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def perform_caching=(value); end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#15 - def raise_on_open_redirects; end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#15 - def raise_on_open_redirects=(val); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def relative_url_root; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def relative_url_root=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def request_forgery_protection_token; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def request_forgery_protection_token=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def stylesheets_dir; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def stylesheets_dir=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def urlsafe_csrf_tokens; end - - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#97 - def urlsafe_csrf_tokens=(urlsafe_csrf_tokens); end - - # Shortcut helper that returns all the modules included in - # ActionController::Base except the ones passed as arguments: - # - # class MyBaseController < ActionController::Metal - # ActionController::Base.without_modules(:ParamsWrapper, :Streaming).each do |left| - # include left - # end - # end - # - # This gives better control over what you want to exclude and makes it - # easier to create a bare controller class, instead of listing the modules - # required manually. - # - # source://actionpack//lib/action_controller/base.rb#198 - def without_modules(*modules); end - end -end - -# source://actionpack//lib/action_controller/base.rb#0 -module ActionController::Base::HelperMethods - # source://actionpack//lib/action_controller/metal/flash.rb#39 - def alert(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/caching/fragments.rb#31 - def combined_fragment_cache_key(*args, **_arg1, &block); end - - # source://actionpack//lib/action_controller/metal/content_security_policy.rb#11 - def content_security_policy?(*args, **_arg1, &block); end - - # source://actionpack//lib/action_controller/metal/content_security_policy.rb#12 - def content_security_policy_nonce(*args, **_arg1, &block); end - - # source://actionpack//lib/action_controller/metal/cookies.rb#8 - def cookies(*args, **_arg1, &block); end - - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#106 - def form_authenticity_token(*args, **_arg1, &block); end - - # source://actionpack//lib/action_controller/metal/flash.rb#39 - def notice(*args, **_arg1, &block); end - - # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#107 - def protect_against_forgery?(*args, **_arg1, &block); end - - # source://actionpack//lib/abstract_controller/caching.rb#43 - def view_cache_dependencies(*args, **_arg1, &block); end -end - -# source://actionpack//lib/action_controller/base.rb#206 -ActionController::Base::MODULES = T.let(T.unsafe(nil), Array) - -# Define some internal variables that should not be propagated to the view. -# -# source://actionpack//lib/action_controller/base.rb#261 -ActionController::Base::PROTECTED_IVARS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_controller/metal/basic_implicit_render.rb#4 -module ActionController::BasicImplicitRender - # source://actionpack//lib/action_controller/metal/basic_implicit_render.rb#11 - def default_render; end - - # source://actionpack//lib/action_controller/metal/basic_implicit_render.rb#5 - def send_action(method, *args); end -end - -# \Caching is a cheap way of speeding up slow applications by keeping the result of -# calculations, renderings, and database calls around for subsequent requests. -# -# You can read more about each approach by clicking the modules below. -# -# Note: To turn off all caching provided by Action Controller, set -# config.action_controller.perform_caching = false -# -# == \Caching stores -# -# All the caching stores from ActiveSupport::Cache are available to be used as backends -# for Action Controller caching. -# -# Configuration examples (FileStore is the default): -# -# config.action_controller.cache_store = :memory_store -# config.action_controller.cache_store = :file_store, '/path/to/cache/directory' -# config.action_controller.cache_store = :mem_cache_store, 'localhost' -# config.action_controller.cache_store = :mem_cache_store, Memcached::Rails.new('localhost:11211') -# config.action_controller.cache_store = MyOwnStore.new('parameter') -# -# source://actionpack//lib/action_controller/caching.rb#24 -module ActionController::Caching - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::AbstractController::Caching::Fragments - include ::AbstractController::Caching - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::Caching::Fragments::ClassMethods - mixes_in_class_methods ::AbstractController::Caching::ClassMethods - mixes_in_class_methods ::AbstractController::Caching::ConfigMethods - - private - - # source://actionpack//lib/action_controller/caching.rb#40 - def instrument_name; end - - # source://actionpack//lib/action_controller/caching.rb#32 - def instrument_payload(key); end - - module GeneratedClassMethods - def _view_cache_dependencies; end - def _view_cache_dependencies=(value); end - def _view_cache_dependencies?; end - def fragment_cache_keys; end - def fragment_cache_keys=(value); end - def fragment_cache_keys?; end - end - - module GeneratedInstanceMethods - def _view_cache_dependencies; end - def _view_cache_dependencies=(value); end - def _view_cache_dependencies?; end - def fragment_cache_keys; end - def fragment_cache_keys=(value); end - def fragment_cache_keys?; end - end -end - -# source://actionpack//lib/action_controller/metal/conditional_get.rb#7 -module ActionController::ConditionalGet - include ::ActionController::Head - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods - - # Sets the +Cache-Control+ header, overwriting existing directives. This - # method will also ensure an HTTP +Date+ header for client compatibility. - # - # Defaults to issuing the +private+ directive, so that intermediate caches - # must not cache the response. - # - # ==== Options - # - # [+:public+] - # If true, replaces the default +private+ directive with the +public+ - # directive. - # [+:must_revalidate+] - # If true, adds the +must-revalidate+ directive. - # [+:stale_while_revalidate+] - # Sets the value of the +stale-while-revalidate+ directive. - # [+:stale_if_error+] - # Sets the value of the +stale-if-error+ directive. - # - # Any additional key-value pairs are concatenated as directives. For a list - # of supported +Cache-Control+ directives, see the {article on - # MDN}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control]. - # - # ==== Examples - # - # expires_in 10.minutes - # # => Cache-Control: max-age=600, private - # - # expires_in 10.minutes, public: true - # # => Cache-Control: max-age=600, public - # - # expires_in 10.minutes, public: true, must_revalidate: true - # # => Cache-Control: max-age=600, public, must-revalidate - # - # expires_in 1.hour, stale_while_revalidate: 60.seconds - # # => Cache-Control: max-age=3600, private, stale-while-revalidate=60 - # - # expires_in 1.hour, stale_if_error: 5.minutes - # # => Cache-Control: max-age=3600, private, stale-if-error=300 - # - # expires_in 1.hour, public: true, "s-maxage": 3.hours, "no-transform": true - # # => Cache-Control: max-age=3600, public, s-maxage=10800, no-transform=true - # - # source://actionpack//lib/action_controller/metal/conditional_get.rb#274 - def expires_in(seconds, options = T.unsafe(nil)); end - - # Sets an HTTP 1.1 +Cache-Control+ header of no-cache. This means the - # resource will be marked as stale, so clients must always revalidate. - # Intermediate/browser caches may still store the asset. - # - # source://actionpack//lib/action_controller/metal/conditional_get.rb#292 - def expires_now; end - - # Sets the +etag+, +last_modified+, or both on the response, and renders a - # 304 Not Modified response if the request is already fresh. - # - # ==== Options - # - # [+:etag+] - # Sets a "weak" ETag validator on the response. See the +:weak_etag+ option. - # [+:weak_etag+] - # Sets a "weak" ETag validator on the response. Requests that specify an - # +If-None-Match+ header may receive a 304 Not Modified response - # if the ETag matches exactly. - # - # A weak ETag indicates semantic equivalence, not byte-for-byte equality, - # so they're good for caching HTML pages in browser caches. They can't be - # used for responses that must be byte-identical, like serving +Range+ - # requests within a PDF file. - # [+:strong_etag+] - # Sets a "strong" ETag validator on the response. Requests that specify an - # +If-None-Match+ header may receive a 304 Not Modified response - # if the ETag matches exactly. - # - # A strong ETag implies exact equality -- the response must match byte for - # byte. This is necessary for serving +Range+ requests within a large - # video or PDF file, for example, or for compatibility with some CDNs that - # don't support weak ETags. - # [+:last_modified+] - # Sets a "weak" last-update validator on the response. Subsequent requests - # that specify an +If-Modified-Since+ header may receive a 304 Not Modified - # response if +last_modified+ <= +If-Modified-Since+. - # [+:public+] - # By default the +Cache-Control+ header is private. Set this option to - # +true+ if you want your application to be cacheable by other devices, - # such as proxy caches. - # [+:cache_control+] - # When given, will overwrite an existing +Cache-Control+ header. For a - # list of +Cache-Control+ directives, see the {article on - # MDN}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control]. - # [+:template+] - # By default, the template digest for the current controller/action is - # included in ETags. If the action renders a different template, you can - # include its digest instead. If the action doesn't render a template at - # all, you can pass template: false to skip any attempt to check - # for a template digest. - # - # ==== Examples - # - # def show - # @article = Article.find(params[:id]) - # fresh_when(etag: @article, last_modified: @article.updated_at, public: true) - # end - # - # This will send a 304 Not Modified response if the request - # specifies a matching ETag and +If-Modified-Since+ header. Otherwise, it - # will render the +show+ template. - # - # You can also just pass a record: - # - # def show - # @article = Article.find(params[:id]) - # fresh_when(@article) - # end - # - # +etag+ will be set to the record, and +last_modified+ will be set to the - # record's +updated_at+. - # - # You can also pass an object that responds to +maximum+, such as a - # collection of records: - # - # def index - # @articles = Article.all - # fresh_when(@articles) - # end - # - # In this case, +etag+ will be set to the collection, and +last_modified+ - # will be set to maximum(:updated_at) (the timestamp of the most - # recently updated record). - # - # When passing a record or a collection, you can still specify other - # options, such as +:public+ and +:cache_control+: - # - # def show - # @article = Article.find(params[:id]) - # fresh_when(@article, public: true, cache_control: { no_cache: true }) - # end - # - # The above will set Cache-Control: public, no-cache in the response. - # - # When rendering a different template than the controller/action's default - # template, you can indicate which digest to include in the ETag: - # - # before_action { fresh_when @article, template: "widgets/show" } - # - # source://actionpack//lib/action_controller/metal/conditional_get.rb#128 - def fresh_when(object = T.unsafe(nil), etag: T.unsafe(nil), weak_etag: T.unsafe(nil), strong_etag: T.unsafe(nil), last_modified: T.unsafe(nil), public: T.unsafe(nil), cache_control: T.unsafe(nil), template: T.unsafe(nil)); end - - # Cache or yield the block. The cache is supposed to never expire. - # - # You can use this method when you have an HTTP response that never changes, - # and the browser and proxies should cache it indefinitely. - # - # * +public+: By default, HTTP responses are private, cached only on the - # user's web browser. To allow proxies to cache the response, set +true+ to - # indicate that they can serve the cached response to all users. - # - # source://actionpack//lib/action_controller/metal/conditional_get.rb#304 - def http_cache_forever(public: T.unsafe(nil)); end - - # Sets an HTTP 1.1 +Cache-Control+ header of no-store. This means the - # resource may not be stored in any cache. - # - # source://actionpack//lib/action_controller/metal/conditional_get.rb#314 - def no_store; end - - # Sets the +etag+ and/or +last_modified+ on the response and checks them - # against the request. If the request doesn't match the provided options, it - # is considered stale, and the response should be rendered from scratch. - # Otherwise, it is fresh, and a 304 Not Modified is sent. - # - # ==== Options - # - # See #fresh_when for supported options. - # - # ==== Examples - # - # def show - # @article = Article.find(params[:id]) - # - # if stale?(etag: @article, last_modified: @article.updated_at) - # @statistics = @article.really_expensive_call - # respond_to do |format| - # # all the supported formats - # end - # end - # end - # - # You can also just pass a record: - # - # def show - # @article = Article.find(params[:id]) - # - # if stale?(@article) - # @statistics = @article.really_expensive_call - # respond_to do |format| - # # all the supported formats - # end - # end - # end - # - # +etag+ will be set to the record, and +last_modified+ will be set to the - # record's +updated_at+. - # - # You can also pass an object that responds to +maximum+, such as a - # collection of records: - # - # def index - # @articles = Article.all - # - # if stale?(@articles) - # @statistics = @articles.really_expensive_call - # respond_to do |format| - # # all the supported formats - # end - # end - # end - # - # In this case, +etag+ will be set to the collection, and +last_modified+ - # will be set to maximum(:updated_at) (the timestamp of the most - # recently updated record). - # - # When passing a record or a collection, you can still specify other - # options, such as +:public+ and +:cache_control+: - # - # def show - # @article = Article.find(params[:id]) - # - # if stale?(@article, public: true, cache_control: { no_cache: true }) - # @statistics = @articles.really_expensive_call - # respond_to do |format| - # # all the supported formats - # end - # end - # end - # - # The above will set Cache-Control: public, no-cache in the response. - # - # When rendering a different template than the controller/action's default - # template, you can indicate which digest to include in the ETag: - # - # def show - # super if stale?(@article, template: "widgets/show") - # end - # - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/conditional_get.rb#227 - def stale?(object = T.unsafe(nil), **freshness_kwargs); end - - private - - # source://actionpack//lib/action_controller/metal/conditional_get.rb#319 - def combine_etags(validator, options); end - - module GeneratedClassMethods - def etaggers; end - def etaggers=(value); end - def etaggers?; end - end - - module GeneratedInstanceMethods - def etaggers; end - def etaggers=(value); end - def etaggers?; end - end -end - -# source://actionpack//lib/action_controller/metal/conditional_get.rb#16 -module ActionController::ConditionalGet::ClassMethods - # Allows you to consider additional controller-wide information when generating an ETag. - # For example, if you serve pages tailored depending on who's logged in at the moment, you - # may want to add the current user id to be part of the ETag to prevent unauthorized displaying - # of cached pages. - # - # class InvoicesController < ApplicationController - # etag { current_user&.id } - # - # def show - # # Etag will differ even for the same invoice when it's viewed by a different current_user - # @invoice = Invoice.find(params[:id]) - # fresh_when etag: @invoice - # end - # end - # - # source://actionpack//lib/action_controller/metal/conditional_get.rb#31 - def etag(&etagger); end -end - -# source://actionpack//lib/action_controller/metal/content_security_policy.rb#4 -module ActionController::ContentSecurityPolicy - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::AbstractController::Helpers - include ::ActiveSupport::Callbacks - include ::AbstractController::Callbacks - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::Helpers::ClassMethods - mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveSupport::DescendantsTracker - mixes_in_class_methods ::AbstractController::Callbacks::ClassMethods - mixes_in_class_methods ::ActionController::ContentSecurityPolicy::ClassMethods - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/content_security_policy.rb#73 - def content_security_policy?; end - - # source://actionpack//lib/action_controller/metal/content_security_policy.rb#77 - def content_security_policy_nonce; end - - # source://actionpack//lib/action_controller/metal/content_security_policy.rb#81 - def current_content_security_policy; end - - module GeneratedClassMethods - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - def _helper_methods; end - def _helper_methods=(value); end - def _helper_methods?; end - end - - module GeneratedInstanceMethods - def __callbacks; end - def __callbacks?; end - def _helper_methods; end - def _helper_methods=(value); end - def _helper_methods?; end - end -end - -# source://actionpack//lib/action_controller/metal/content_security_policy.rb#15 -module ActionController::ContentSecurityPolicy::ClassMethods - # Overrides parts of the globally configured +Content-Security-Policy+ - # header: - # - # class PostsController < ApplicationController - # content_security_policy do |policy| - # policy.base_uri "https://www.example.com" - # end - # end - # - # Options can be passed similar to +before_action+. For example, pass - # only: :index to override the header on the index action only: - # - # class PostsController < ApplicationController - # content_security_policy(only: :index) do |policy| - # policy.default_src :self, :https - # end - # end - # - # Pass +false+ to remove the +Content-Security-Policy+ header: - # - # class PostsController < ApplicationController - # content_security_policy false, only: :index - # end - # - # source://actionpack//lib/action_controller/metal/content_security_policy.rb#39 - def content_security_policy(enabled = T.unsafe(nil), **options, &block); end - - # Overrides the globally configured +Content-Security-Policy-Report-Only+ - # header: - # - # class PostsController < ApplicationController - # content_security_policy_report_only only: :index - # end - # - # Pass +false+ to remove the +Content-Security-Policy-Report-Only+ header: - # - # class PostsController < ApplicationController - # content_security_policy_report_only false, only: :index - # end - # - # source://actionpack//lib/action_controller/metal/content_security_policy.rb#65 - def content_security_policy_report_only(report_only = T.unsafe(nil), **options); end -end - -# source://actionpack//lib/action_controller/metal/cookies.rb#4 -module ActionController::Cookies - extend ::ActiveSupport::Concern - - private - - # The cookies for the current request. See ActionDispatch::Cookies for - # more information. - # - # source://actionpack//lib/action_controller/metal/cookies.rb#14 - def cookies; end -end - -# Methods for sending arbitrary data and for streaming files to the browser, -# instead of rendering. -# -# source://actionpack//lib/action_controller/metal/data_streaming.rb#9 -module ActionController::DataStreaming - extend ::ActiveSupport::Concern - include ::ActionController::Rendering - - mixes_in_class_methods ::ActionController::Rendering::ClassMethods - - private - - # Sends the given binary data to the browser. This method is similar to - # render plain: data, but also allows you to specify whether - # the browser should display the response as a file attachment (i.e. in a - # download dialog) or as inline data. You may also set the content type, - # the file name, and other things. - # - # Options: - # * :filename - suggests a filename for the browser to use. - # * :type - specifies an HTTP content type. Defaults to +application/octet-stream+. - # You can specify either a string or a symbol for a registered type with Mime::Type.register, for example +:json+. - # If omitted, type will be inferred from the file extension specified in :filename. - # If no content type is registered for the extension, the default type +application/octet-stream+ will be used. - # * :disposition - specifies whether the file will be shown inline or downloaded. - # Valid values are "inline" and "attachment" (default). - # * :status - specifies the status code to send with the response. Defaults to 200. - # - # Generic data download: - # - # send_data buffer - # - # Download a dynamically-generated tarball: - # - # send_data generate_tgz('dir'), filename: 'dir.tgz' - # - # Display an image Active Record in the browser: - # - # send_data image.data, type: image.content_type, disposition: 'inline' - # - # See +send_file+ for more information on HTTP Content-* headers and caching. - # - # source://actionpack//lib/action_controller/metal/data_streaming.rb#109 - def send_data(data, options = T.unsafe(nil)); end - - # Sends the file. This uses a server-appropriate method (such as +X-Sendfile+) - # via the +Rack::Sendfile+ middleware. The header to use is set via - # +config.action_dispatch.x_sendfile_header+. - # Your server can also configure this for you by setting the +X-Sendfile-Type+ header. - # - # Be careful to sanitize the path parameter if it is coming from a web - # page. send_file(params[:path]) allows a malicious user to - # download any file on your server. - # - # Options: - # * :filename - suggests a filename for the browser to use. - # Defaults to File.basename(path). - # * :type - specifies an HTTP content type. - # You can specify either a string or a symbol for a registered type with Mime::Type.register, for example +:json+. - # If omitted, the type will be inferred from the file extension specified in :filename. - # If no content type is registered for the extension, the default type +application/octet-stream+ will be used. - # * :disposition - specifies whether the file will be shown inline or downloaded. - # Valid values are "inline" and "attachment" (default). - # * :status - specifies the status code to send with the response. Defaults to 200. - # * :url_based_filename - set to +true+ if you want the browser to guess the filename from - # the URL, which is necessary for i18n filenames on certain browsers - # (setting :filename overrides this option). - # - # The default +Content-Type+ and +Content-Disposition+ headers are - # set to download arbitrary binary files in as many browsers as - # possible. IE versions 4, 5, 5.5, and 6 are all known to have - # a variety of quirks (especially when downloading over SSL). - # - # Simple download: - # - # send_file '/path/to.zip' - # - # Show a JPEG in the browser: - # - # send_file '/path/to.jpeg', type: 'image/jpeg', disposition: 'inline' - # - # Show a 404 page in the browser: - # - # send_file '/path/to/404.html', type: 'text/html; charset=utf-8', disposition: 'inline', status: 404 - # - # You can use other Content-* HTTP headers to provide additional - # information to the client. See MDN for a - # {list of HTTP headers}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers]. - # - # Also be aware that the document may be cached by proxies and browsers. - # The +Pragma+ and +Cache-Control+ headers declare how the file may be cached - # by intermediaries. They default to require clients to validate with - # the server before releasing cached responses. See - # https://www.mnot.net/cache_docs/ for an overview of web caching and - # {RFC 9111}[https://www.rfc-editor.org/rfc/rfc9111.html#name-cache-control] - # for the +Cache-Control+ header spec. - # - # @raise [MissingFile] - # - # source://actionpack//lib/action_controller/metal/data_streaming.rb#69 - def send_file(path, options = T.unsafe(nil)); end - - # @raise [ArgumentError] - # - # source://actionpack//lib/action_controller/metal/data_streaming.rb#114 - def send_file_headers!(options); end -end - -# source://actionpack//lib/action_controller/metal/data_streaming.rb#15 -ActionController::DataStreaming::DEFAULT_SEND_FILE_DISPOSITION = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_controller/metal/data_streaming.rb#14 -ActionController::DataStreaming::DEFAULT_SEND_FILE_TYPE = T.let(T.unsafe(nil), String) - -# Allows configuring default headers that will be automatically merged into -# each response. -# -# source://actionpack//lib/action_controller/metal/default_headers.rb#6 -module ActionController::DefaultHeaders - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionController::DefaultHeaders::ClassMethods -end - -# source://actionpack//lib/action_controller/metal/default_headers.rb#9 -module ActionController::DefaultHeaders::ClassMethods - # source://actionpack//lib/action_controller/metal/default_headers.rb#10 - def make_response!(request); end -end - -# When you're using the flash, it's generally used as a conditional on the view. -# This means the content of the view depends on the flash. Which in turn means -# that the ETag for a response should be computed with the content of the flash -# in mind. This does that by including the content of the flash as a component -# in the ETag that's generated for a response. -# -# source://actionpack//lib/action_controller/metal/etag_with_flash.rb#9 -module ActionController::EtagWithFlash - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActionController::ConditionalGet - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods - - module GeneratedClassMethods - def etaggers; end - def etaggers=(value); end - def etaggers?; end - end - - module GeneratedInstanceMethods - def etaggers; end - def etaggers=(value); end - def etaggers?; end - end -end - -# When our views change, they should bubble up into HTTP cache freshness -# and bust browser caches. So the template digest for the current action -# is automatically included in the ETag. -# -# Enabled by default for apps that use Action View. Disable by setting -# -# config.action_controller.etag_with_template_digest = false -# -# Override the template to digest by passing +:template+ to +fresh_when+ -# and +stale?+ calls. For example: -# -# # We're going to render widgets/show, not posts/show -# fresh_when @post, template: 'widgets/show' -# -# # We're not going to render a template, so omit it from the ETag. -# fresh_when @post, template: false -# -# source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#21 -module ActionController::EtagWithTemplateDigest - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActionController::ConditionalGet - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods - - private - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#35 - def determine_template_etag(options); end - - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#51 - def lookup_and_digest_template(template); end - - # Pick the template digest to include in the ETag. If the +:template+ option - # is present, use the named template. If +:template+ is +nil+ or absent, use - # the default controller/action template. If +:template+ is false, omit the - # template digest from the ETag. - # - # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#45 - def pick_template_for_etag(options); end - - module GeneratedClassMethods - def etag_with_template_digest; end - def etag_with_template_digest=(value); end - def etag_with_template_digest?; end - def etaggers; end - def etaggers=(value); end - def etaggers?; end - end - - module GeneratedInstanceMethods - def etag_with_template_digest; end - def etag_with_template_digest=(value); end - def etag_with_template_digest?; end - def etaggers; end - def etaggers=(value); end - def etaggers?; end - end -end - -# source://actionpack//lib/action_controller/metal/flash.rb#4 -module ActionController::Flash - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::Flash::ClassMethods - - private - - # source://actionpack//lib/action_controller/metal/flash.rb#51 - def redirect_to(options = T.unsafe(nil), response_options_and_flash = T.unsafe(nil)); end - - module GeneratedClassMethods - def _flash_types; end - def _flash_types=(value); end - def _flash_types?; end - end - - module GeneratedInstanceMethods; end -end - -# source://actionpack//lib/action_controller/metal/flash.rb#14 -module ActionController::Flash::ClassMethods - # source://actionpack//lib/action_controller/metal/flash.rb#45 - def action_methods; end - - # Creates new flash types. You can pass as many types as you want to create - # flash types other than the default alert and notice in - # your controllers and views. For instance: - # - # # in application_controller.rb - # class ApplicationController < ActionController::Base - # add_flash_types :warning - # end - # - # # in your controller - # redirect_to user_path(@user), warning: "Incomplete profile" - # - # # in your view - # <%= warning %> - # - # This method will automatically define a new method for each of the given - # names, and it will be available in your views. - # - # source://actionpack//lib/action_controller/metal/flash.rb#32 - def add_flash_types(*types); end -end - -# Override the default form builder for all views rendered by this -# controller and any of its descendants. Accepts a subclass of -# ActionView::Helpers::FormBuilder. -# -# For example, given a form builder: -# -# class AdminFormBuilder < ActionView::Helpers::FormBuilder -# def special_field(name) -# end -# end -# -# The controller specifies a form builder as its default: -# -# class AdminAreaController < ApplicationController -# default_form_builder AdminFormBuilder -# end -# -# Then in the view any form using +form_for+ will be an instance of the -# specified form builder: -# -# <%= form_for(@instance) do |builder| %> -# <%= builder.special_field(:name) %> -# <% end %> -# -# source://actionpack//lib/action_controller/form_builder.rb#27 -module ActionController::FormBuilder - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::FormBuilder::ClassMethods - - # Default form builder for the controller - # - # source://actionpack//lib/action_controller/form_builder.rb#46 - def default_form_builder; end - - module GeneratedClassMethods - def _default_form_builder; end - def _default_form_builder=(value); end - def _default_form_builder?; end - end - - module GeneratedInstanceMethods; end -end - -# source://actionpack//lib/action_controller/form_builder.rb#34 -module ActionController::FormBuilder::ClassMethods - # Set the form builder to be used as the default for all forms - # in the views rendered by this controller and its subclasses. - # - # ==== Parameters - # * builder - Default form builder, an instance of ActionView::Helpers::FormBuilder - # - # source://actionpack//lib/action_controller/form_builder.rb#40 - def default_form_builder(builder); end -end - -# source://actionpack//lib/action_controller/metal/head.rb#4 -module ActionController::Head - # Returns a response that has no content (merely headers). The options - # argument is interpreted to be a hash of header names and values. - # This allows you to easily return a response that consists only of - # significant headers: - # - # head :created, location: person_path(@person) - # - # head :created, location: @person - # - # It can also be used to return exceptional conditions: - # - # return head(:method_not_allowed) unless request.post? - # return head(:bad_request) unless valid_request? - # render - # - # See +Rack::Utils::SYMBOL_TO_STATUS_CODE+ for a full list of valid +status+ symbols. - # - # source://actionpack//lib/action_controller/metal/head.rb#21 - def head(status, options = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/head.rb#52 - def include_content?(status); end -end - -# The \Rails framework provides a large number of helpers for working with assets, dates, forms, -# numbers and model objects, to name a few. These helpers are available to all templates -# by default. -# -# In addition to using the standard template helpers provided, creating custom helpers to -# extract complicated logic or reusable functionality is strongly encouraged. By default, each controller -# will include all helpers. These helpers are only accessible on the controller through #helpers -# -# In previous versions of \Rails the controller will include a helper which -# matches the name of the controller, e.g., MyController will automatically -# include MyHelper. You can revert to the old behavior with the following: -# -# # config/application.rb -# class Application < Rails::Application -# config.action_controller.include_all_helpers = false -# end -# -# Additional helpers can be specified using the +helper+ class method in ActionController::Base or any -# controller which inherits from it. -# -# The +to_s+ method from the \Time class can be wrapped in a helper method to display a custom message if -# a \Time object is blank: -# -# module FormattedTimeHelper -# def format_time(time, format=:long, blank_message=" ") -# time.blank? ? blank_message : time.to_fs(format) -# end -# end -# -# FormattedTimeHelper can now be included in a controller, using the +helper+ class method: -# -# class EventsController < ActionController::Base -# helper FormattedTimeHelper -# def index -# @events = Event.all -# end -# end -# -# Then, in any view rendered by EventsController, the format_time method can be called: -# -# <% @events.each do |event| -%> -#

-# <%= format_time(event.time, :short, "N/A") %> | <%= event.name %> -#

-# <% end -%> -# -# Finally, assuming we have two event instances, one which has a time and one which does not, -# the output might look like this: -# -# 23 Aug 11:30 | Carolina Railhawks Soccer Match -# N/A | Carolina Railhawks Training Workshop -# -# source://actionpack//lib/action_controller/metal/helpers.rb#56 -module ActionController::Helpers - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::AbstractController::Helpers - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::Helpers::ClassMethods - mixes_in_class_methods ::ActionController::Helpers::ClassMethods - - # Provides a proxy to access helper methods from outside the view. - # - # source://actionpack//lib/action_controller/metal/helpers.rb#128 - def helpers; end - - class << self - # Returns the value of attribute helpers_path. - # - # source://actionpack//lib/action_controller/metal/helpers.rb#59 - def helpers_path; end - - # Sets the attribute helpers_path - # - # @param value the value to set the attribute helpers_path to. - # - # source://actionpack//lib/action_controller/metal/helpers.rb#59 - def helpers_path=(_arg0); end - end - - module GeneratedClassMethods - def _helper_methods; end - def _helper_methods=(value); end - def _helper_methods?; end - def helpers_path; end - def helpers_path=(value); end - def helpers_path?; end - def include_all_helpers; end - def include_all_helpers=(value); end - def include_all_helpers?; end - end - - module GeneratedInstanceMethods - def _helper_methods; end - def _helper_methods=(value); end - def _helper_methods?; end - def helpers_path; end - def helpers_path=(value); end - def helpers_path?; end - def include_all_helpers; end - def include_all_helpers=(value); end - def include_all_helpers?; end - end -end - -# source://actionpack//lib/action_controller/metal/helpers.rb#67 -module ActionController::Helpers::ClassMethods - # Returns a list of helper names in a given path. - # - # ActionController::Base.all_helpers_from_path 'app/helpers' - # # => ["application", "chart", "rubygems"] - # - # source://actionpack//lib/action_controller/metal/helpers.rb#111 - def all_helpers_from_path(path); end - - # Declares helper accessors for controller attributes. For example, the - # following adds new +name+ and name= instance methods to a - # controller and makes them available to the view: - # attr_accessor :name - # helper_attr :name - # - # ==== Parameters - # * attrs - Names of attributes to be converted into helpers. - # - # source://actionpack//lib/action_controller/metal/helpers.rb#76 - def helper_attr(*attrs); end - - # Provides a proxy to access helper methods from outside the view. - # - # Note that the proxy is rendered under a different view context. - # This may cause incorrect behaviour with capture methods. Consider - # using {helper}[rdoc-ref:AbstractController::Helpers::ClassMethods#helper] - # instead when using +capture+. - # - # source://actionpack//lib/action_controller/metal/helpers.rb#86 - def helpers; end - - # Override modules_for_helpers to accept +:all+ as argument, which loads - # all helpers in helpers_path. - # - # ==== Parameters - # * args - A list of helpers - # - # ==== Returns - # * array - A normalized list of modules for the list of helpers provided. - # - # source://actionpack//lib/action_controller/metal/helpers.rb#102 - def modules_for_helpers(args); end - - private - - # Extract helper names from files in app/helpers/**/*_helper.rb - # - # source://actionpack//lib/action_controller/metal/helpers.rb#122 - def all_application_helpers; end -end - -# HTTP Basic, Digest, and Token authentication. -# -# source://actionpack//lib/action_controller/metal/http_authentication.rb#9 -module ActionController::HttpAuthentication; end - -# = HTTP \Basic authentication -# -# === Simple \Basic example -# -# class PostsController < ApplicationController -# http_basic_authenticate_with name: "dhh", password: "secret", except: :index -# -# def index -# render plain: "Everyone can see me!" -# end -# -# def edit -# render plain: "I'm only accessible if you know the password" -# end -# end -# -# === Advanced \Basic example -# -# Here is a more advanced \Basic example where only Atom feeds and the XML API are protected by HTTP authentication. -# The regular HTML interface is protected by a session approach: -# -# class ApplicationController < ActionController::Base -# before_action :set_account, :authenticate -# -# private -# def set_account -# @account = Account.find_by(url_name: request.subdomains.first) -# end -# -# def authenticate -# case request.format -# when Mime[:xml], Mime[:atom] -# if user = authenticate_with_http_basic { |u, p| @account.users.authenticate(u, p) } -# @current_user = user -# else -# request_http_basic_authentication -# end -# else -# if session_authenticated? -# @current_user = @account.users.find(session[:authenticated][:user_id]) -# else -# redirect_to(login_url) and return false -# end -# end -# end -# end -# -# In your integration tests, you can do something like this: -# -# def test_access_granted_from_xml -# authorization = ActionController::HttpAuthentication::Basic.encode_credentials(users(:dhh).name, users(:dhh).password) -# -# get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization } -# -# assert_equal 200, status -# end -# -# source://actionpack//lib/action_controller/metal/http_authentication.rb#66 -module ActionController::HttpAuthentication::Basic - extend ::ActionController::HttpAuthentication::Basic - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#127 - def auth_param(request); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#123 - def auth_scheme(request); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#105 - def authenticate(request, &login_procedure); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#135 - def authentication_request(controller, realm, message); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#119 - def decode_credentials(request); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#131 - def encode_credentials(user_name, password); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#111 - def has_basic_credentials?(request); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#115 - def user_name_and_password(request); end -end - -# source://actionpack//lib/action_controller/metal/http_authentication.rb#69 -module ActionController::HttpAuthentication::Basic::ControllerMethods - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#92 - def authenticate_or_request_with_http_basic(realm = T.unsafe(nil), message = T.unsafe(nil), &login_procedure); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#96 - def authenticate_with_http_basic(&login_procedure); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#83 - def http_basic_authenticate_or_request_with(name:, password:, realm: T.unsafe(nil), message: T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#100 - def request_http_basic_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_controller/metal/http_authentication.rb#72 -module ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods - # Enables HTTP \Basic authentication. - # - # See ActionController::HttpAuthentication::Basic for example usage. - # - # @raise [ArgumentError] - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#76 - def http_basic_authenticate_with(name:, password:, realm: T.unsafe(nil), **options); end -end - -# = HTTP \Digest authentication -# -# === Simple \Digest example -# -# require "openssl" -# class PostsController < ApplicationController -# REALM = "SuperSecret" -# USERS = {"dhh" => "secret", #plain text password -# "dap" => OpenSSL::Digest::MD5.hexdigest(["dap",REALM,"secret"].join(":"))} #ha1 digest password -# -# before_action :authenticate, except: [:index] -# -# def index -# render plain: "Everyone can see me!" -# end -# -# def edit -# render plain: "I'm only accessible if you know the password" -# end -# -# private -# def authenticate -# authenticate_or_request_with_http_digest(REALM) do |username| -# USERS[username] -# end -# end -# end -# -# === Notes -# -# The +authenticate_or_request_with_http_digest+ block must return the user's password -# or the ha1 digest hash so the framework can appropriately hash to check the user's -# credentials. Returning +nil+ will cause authentication to fail. -# -# Storing the ha1 hash: MD5(username:realm:password), is better than storing a plain password. If -# the password file or database is compromised, the attacker would be able to use the ha1 hash to -# authenticate as the user at this +realm+, but would not have the user's password to try using at -# other sites. -# -# In rare instances, web servers or front proxies strip authorization headers before -# they reach your application. You can debug this situation by logging all environment -# variables, and check for HTTP_AUTHORIZATION, amongst others. -# -# source://actionpack//lib/action_controller/metal/http_authentication.rb#185 -module ActionController::HttpAuthentication::Digest - extend ::ActionController::HttpAuthentication::Digest - - # Returns false on a valid response, true otherwise. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#211 - def authenticate(request, realm, &password_procedure); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#269 - def authentication_header(controller, realm); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#276 - def authentication_request(controller, realm, message = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#262 - def decode_credentials(header); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#258 - def decode_credentials_header(request); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#253 - def encode_credentials(http_method, credentials, password, password_is_ha1); end - - # Returns the expected response for a request of +http_method+ to +uri+ with the decoded +credentials+ and the expected +password+ - # Optional parameter +password_is_ha1+ is set to +true+ by default, since best practice is to store ha1 digest instead - # of a plain-text password. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#243 - def expected_response(http_method, uri, credentials, password, password_is_ha1 = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#249 - def ha1(credentials, password); end - - # Uses an MD5 digest based on time to generate a value to be used only once. - # - # A server-specified data string which should be uniquely generated each time a 401 response is made. - # It is recommended that this string be base64 or hexadecimal data. - # Specifically, since the string is passed in the header lines as a quoted string, the double-quote character is not allowed. - # - # The contents of the nonce are implementation dependent. - # The quality of the implementation depends on a good choice. - # A nonce might, for example, be constructed as the base 64 encoding of - # - # time-stamp H(time-stamp ":" ETag ":" private-key) - # - # where time-stamp is a server-generated time or other non-repeating value, - # ETag is the value of the HTTP ETag header associated with the requested entity, - # and private-key is data known only to the server. - # With a nonce of this form a server would recalculate the hash portion after receiving the client authentication header and - # reject the request if it did not match the nonce from that header or - # if the time-stamp value is not recent enough. In this way the server can limit the time of the nonce's validity. - # The inclusion of the ETag prevents a replay request for an updated version of the resource. - # (Note: including the IP address of the client in the nonce would appear to offer the server the ability - # to limit the reuse of the nonce to the same client that originally got it. - # However, that would break proxy farms, where requests from a single user often go through different proxies in the farm. - # Also, IP address spoofing is not that hard.) - # - # An implementation might choose not to accept a previously used nonce or a previously used digest, in order to - # protect against a replay attack. Or, an implementation might choose to use one-time nonces or digests for - # POST, PUT, or PATCH requests, and a time-stamp for GET requests. For more details on the issues involved see Section 4 - # of this document. - # - # The nonce is opaque to the client. Composed of Time, and hash of Time with secret - # key from the Rails session secret generated upon creation of project. Ensures - # the time cannot be modified by client. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#321 - def nonce(secret_key, time = T.unsafe(nil)); end - - # Opaque based on digest of secret key - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#340 - def opaque(secret_key); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#283 - def secret_token(request); end - - # Returns false unless the request credentials response value matches the expected value. - # First try the password as a ha1 digest password. If this fails, then try it as a plain - # text password. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#218 - def validate_digest_response(request, realm, &password_procedure); end - - # Might want a shorter timeout depending on whether the request - # is a PATCH, PUT, or POST, and if the client is a browser or web service. - # Can be much shorter if the Stale directive is implemented. This would - # allow a user to use new nonce without prompting the user again for their - # username and password. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#333 - def validate_nonce(secret_key, request, value, seconds_to_timeout = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_controller/metal/http_authentication.rb#188 -module ActionController::HttpAuthentication::Digest::ControllerMethods - # Authenticate using an HTTP \Digest, or otherwise render an HTTP header - # requesting the client to send a \Digest. - # - # See ActionController::HttpAuthentication::Digest for example usage. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#193 - def authenticate_or_request_with_http_digest(realm = T.unsafe(nil), message = T.unsafe(nil), &password_procedure); end - - # Authenticate using an HTTP \Digest. Returns true if authentication is - # successful, false otherwise. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#199 - def authenticate_with_http_digest(realm = T.unsafe(nil), &password_procedure); end - - # Render an HTTP header requesting the client to send a \Digest for - # authentication. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#205 - def request_http_digest_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end -end - -# = HTTP \Token authentication -# -# === Simple \Token example -# -# class PostsController < ApplicationController -# TOKEN = "secret" -# -# before_action :authenticate, except: [ :index ] -# -# def index -# render plain: "Everyone can see me!" -# end -# -# def edit -# render plain: "I'm only accessible if you know the password" -# end -# -# private -# def authenticate -# authenticate_or_request_with_http_token do |token, options| -# # Compare the tokens in a time-constant manner, to mitigate -# # timing attacks. -# ActiveSupport::SecurityUtils.secure_compare(token, TOKEN) -# end -# end -# end -# -# -# Here is a more advanced Token example where only Atom feeds and the XML API are protected by HTTP token authentication. -# The regular HTML interface is protected by a session approach: -# -# class ApplicationController < ActionController::Base -# before_action :set_account, :authenticate -# -# private -# def set_account -# @account = Account.find_by(url_name: request.subdomains.first) -# end -# -# def authenticate -# case request.format -# when Mime[:xml], Mime[:atom] -# if user = authenticate_with_http_token { |t, o| @account.users.authenticate(t, o) } -# @current_user = user -# else -# request_http_token_authentication -# end -# else -# if session_authenticated? -# @current_user = @account.users.find(session[:authenticated][:user_id]) -# else -# redirect_to(login_url) and return false -# end -# end -# end -# end -# -# -# In your integration tests, you can do something like this: -# -# def test_access_granted_from_xml -# authorization = ActionController::HttpAuthentication::Token.encode_credentials(users(:dhh).token) -# -# get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization } -# -# assert_equal 200, status -# end -# -# -# On shared hosts, Apache sometimes doesn't pass authentication headers to -# FCGI instances. If your environment matches this description and you cannot -# authenticate, try this rule in your Apache setup: -# -# RewriteRule ^(.*)$ dispatch.fcgi [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L] -# -# source://actionpack//lib/action_controller/metal/http_authentication.rb#419 -module ActionController::HttpAuthentication::Token - extend ::ActionController::HttpAuthentication::Token - - # If token Authorization header is present, call the login - # procedure with the present token and options. - # - # Returns the return value of login_procedure if a - # token is found. Returns nil if no token is found. - # - # ==== Parameters - # - # * +controller+ - ActionController::Base instance for the current request. - # * +login_procedure+ - Proc to call if a token is present. The Proc - # should take two arguments: - # - # authenticate(controller) { |token, options| ... } - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#461 - def authenticate(controller, &login_procedure); end - - # Sets a WWW-Authenticate header to let the client know a token is desired. - # - # Returns nothing. - # - # ==== Parameters - # - # * +controller+ - ActionController::Base instance for the outgoing response. - # * +realm+ - String realm to use in the header. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#542 - def authentication_request(controller, realm, message = T.unsafe(nil)); end - - # Encodes the given token and options into an Authorization header value. - # - # Returns String. - # - # ==== Parameters - # - # * +token+ - String token. - # * +options+ - Optional Hash of the options. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#527 - def encode_credentials(token, options = T.unsafe(nil)); end - - # Takes +raw_params+ and turns it into an array of parameters. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#496 - def params_array_from(raw_params); end - - # This method takes an authorization body and splits up the key-value - # pairs by the standardized :, ;, or \t - # delimiters defined in +AUTHN_PAIR_DELIMITERS+. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#508 - def raw_params(auth); end - - # This removes the " characters wrapping the value. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#501 - def rewrite_param_values(array_params); end - - # Parses the token and options out of the token Authorization header. - # The value for the Authorization header is expected to have the prefix - # "Token" or "Bearer". If the header looks like this: - # - # Authorization: Token token="abc", nonce="def" - # - # Then the returned token is "abc", and the options are - # {nonce: "def"}. - # - # Returns an +Array+ of [String, Hash] if a token is present. - # Returns +nil+ if no token is found. - # - # ==== Parameters - # - # * +request+ - ActionDispatch::Request instance with the current headers. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#483 - def token_and_options(request); end - - # source://actionpack//lib/action_controller/metal/http_authentication.rb#491 - def token_params_from(auth); end -end - -# source://actionpack//lib/action_controller/metal/http_authentication.rb#422 -ActionController::HttpAuthentication::Token::AUTHN_PAIR_DELIMITERS = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_controller/metal/http_authentication.rb#425 -module ActionController::HttpAuthentication::Token::ControllerMethods - # Authenticate using an HTTP Bearer token, or otherwise render an HTTP - # header requesting the client to send a Bearer token. - # - # See ActionController::HttpAuthentication::Token for example usage. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#430 - def authenticate_or_request_with_http_token(realm = T.unsafe(nil), message = T.unsafe(nil), &login_procedure); end - - # Authenticate using an HTTP Bearer token. Returns true if - # authentication is successful, false otherwise. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#436 - def authenticate_with_http_token(&login_procedure); end - - # Render an HTTP header requesting the client to send a Bearer token for - # authentication. - # - # source://actionpack//lib/action_controller/metal/http_authentication.rb#442 - def request_http_token_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_controller/metal/http_authentication.rb#420 -ActionController::HttpAuthentication::Token::TOKEN_KEY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_controller/metal/http_authentication.rb#421 -ActionController::HttpAuthentication::Token::TOKEN_REGEX = T.let(T.unsafe(nil), Regexp) - -# Handles implicit rendering for a controller action that does not -# explicitly respond with +render+, +respond_to+, +redirect+, or +head+. -# -# For API controllers, the implicit response is always 204 No Content. -# -# For all other controllers, we use these heuristics to decide whether to -# render a template, raise an error for a missing template, or respond with -# 204 No Content: -# -# First, if we DO find a template, it's rendered. Template lookup accounts -# for the action name, locales, format, variant, template handlers, and more -# (see +render+ for details). -# -# Second, if we DON'T find a template but the controller action does have -# templates for other formats, variants, etc., then we trust that you meant -# to provide a template for this response, too, and we raise -# ActionController::UnknownFormat with an explanation. -# -# Third, if we DON'T find a template AND the request is a page load in a web -# browser (technically, a non-XHR GET request for an HTML response) where -# you reasonably expect to have rendered a template, then we raise -# ActionController::MissingExactTemplate with an explanation. -# -# Finally, if we DON'T find a template AND the request isn't a browser page -# load, then we implicitly respond with 204 No Content. -# -# source://actionpack//lib/action_controller/metal/implicit_render.rb#29 -module ActionController::ImplicitRender - include ::ActionController::BasicImplicitRender - - # source://actionpack//lib/action_controller/metal/implicit_render.rb#33 - def default_render; end - - # source://actionpack//lib/action_controller/metal/implicit_render.rb#52 - def method_for_action(action_name); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/implicit_render.rb#59 - def interactive_browser_request?; end -end - -# Adds instrumentation to several ends in ActionController::Base. It also provides -# some hooks related with process_action. This allows an ORM like Active Record -# and/or DataMapper to plug in ActionController and show related information. -# -# Check ActiveRecord::Railties::ControllerRuntime for an example. -# -# source://actionpack//lib/action_controller/metal/instrumentation.rb#12 -module ActionController::Instrumentation - extend ::ActiveSupport::Concern - include ::ActiveSupport::Benchmarkable - include ::AbstractController::Logger - - mixes_in_class_methods ::ActionController::Instrumentation::ClassMethods - - # source://actionpack//lib/action_controller/metal/instrumentation.rb#40 - def redirect_to(*_arg0); end - - # source://actionpack//lib/action_controller/metal/instrumentation.rb#19 - def render(*_arg0); end - - # source://actionpack//lib/action_controller/metal/instrumentation.rb#34 - def send_data(data, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/instrumentation.rb#27 - def send_file(path, options = T.unsafe(nil)); end - - def view_runtime; end - def view_runtime=(_arg0); end - - private - - # Every time after an action is processed, this method is invoked - # with the payload, so you can add more information. - # - # source://actionpack//lib/action_controller/metal/instrumentation.rb#96 - def append_info_to_payload(payload); end - - # A hook which allows you to clean up any time, wrongly taken into account in - # views, like database querying time. - # - # def cleanup_view_runtime - # super - time_taken_in_something_expensive - # end - # - # source://actionpack//lib/action_controller/metal/instrumentation.rb#90 - def cleanup_view_runtime; end - - # A hook invoked every time a before callback is halted. - # - # source://actionpack//lib/action_controller/metal/instrumentation.rb#80 - def halted_callback_hook(filter, _); end - - # source://actionpack//lib/action_controller/metal/instrumentation.rb#50 - def process_action(*_arg0); end -end - -# source://actionpack//lib/action_controller/metal/instrumentation.rb#100 -module ActionController::Instrumentation::ClassMethods - # A hook which allows other frameworks to log what happened during - # controller process action. This method should return an array - # with the messages to be added. - # - # source://actionpack//lib/action_controller/metal/instrumentation.rb#104 - def log_process_action(payload); end -end - -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#8 -class ActionController::InvalidAuthenticityToken < ::ActionController::ActionControllerError; end - -# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#11 -class ActionController::InvalidCrossOriginRequest < ::ActionController::ActionControllerError; end - -# Mix this module into your controller, and all actions in that controller -# will be able to stream data to the client as it's written. -# -# class MyController < ActionController::Base -# include ActionController::Live -# -# def stream -# response.headers['Content-Type'] = 'text/event-stream' -# 100.times { -# response.stream.write "hello world\n" -# sleep 1 -# } -# ensure -# response.stream.close -# end -# end -# -# There are a few caveats with this module. You *cannot* write headers after the -# response has been committed (Response#committed? will return truthy). -# Calling +write+ or +close+ on the response stream will cause the response -# object to be committed. Make sure all headers are set before calling write -# or close on your stream. -# -# You *must* call close on your stream when you're finished, otherwise the -# socket may be left open forever. -# -# The final caveat is that your actions are executed in a separate thread than -# the main thread. Make sure your actions are thread safe, and this shouldn't -# be a problem (don't share state across threads, etc). -# -# source://actionpack//lib/action_controller/metal/live.rb#37 -module ActionController::Live - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionController::Live::ClassMethods - - # source://actionpack//lib/action_controller/test_case.rb#24 - def new_controller_thread; end - - # source://actionpack//lib/action_controller/metal/live.rb#249 - def process(name); end - - # source://actionpack//lib/action_controller/metal/live.rb#295 - def response_body=(body); end - - # Sends a stream to the browser, which is helpful when you're generating exports or other running data where you - # don't want the entire file buffered in memory first. Similar to send_data, but where the data is generated live. - # - # Options: - # * :filename - suggests a filename for the browser to use. - # * :type - specifies an HTTP content type. - # You can specify either a string or a symbol for a registered type with Mime::Type.register, for example :json. - # If omitted, type will be inferred from the file extension specified in :filename. - # If no content type is registered for the extension, the default type 'application/octet-stream' will be used. - # * :disposition - specifies whether the file will be shown inline or downloaded. - # Valid values are 'inline' and 'attachment' (default). - # - # Example of generating a csv export: - # - # send_stream(filename: "subscribers.csv") do |stream| - # stream.write "email_address,updated_at\n" - # - # @subscribers.find_each do |subscriber| - # stream.write "#{subscriber.email_address},#{subscriber.updated_at}\n" - # end - # end - # - # source://actionpack//lib/action_controller/metal/live.rb#321 - def send_stream(filename:, disposition: T.unsafe(nil), type: T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_controller/metal/live.rb#348 - def log_error(exception); end -end - -# source://actionpack//lib/action_controller/metal/live.rb#127 -class ActionController::Live::Buffer < ::ActionDispatch::Response::Buffer - include ::MonitorMixin - - # @return [Buffer] a new instance of Buffer - # - # source://actionpack//lib/action_controller/metal/live.rb#143 - def initialize(response); end - - # Inform the producer/writing thread that the client has - # disconnected; the reading thread is no longer interested in - # anything that's being written. - # - # See also #close. - # - # source://actionpack//lib/action_controller/metal/live.rb#193 - def abort; end - - # source://actionpack//lib/action_controller/metal/live.rb#212 - def call_on_error; end - - # Write a 'close' event to the buffer; the producer/writing thread - # uses this to notify us that it's finished supplying content. - # - # See also #abort. - # - # source://actionpack//lib/action_controller/metal/live.rb#180 - def close; end - - # Is the client still connected and waiting for content? - # - # The result of calling `write` when this is `false` is determined - # by `ignore_disconnect`. - # - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/live.rb#204 - def connected?; end - - # Ignore that the client has disconnected. - # - # If this value is `true`, calling `write` after the client - # disconnects will result in the written content being silently - # discarded. If this value is `false` (the default), a - # ClientDisconnected exception will be raised. - # - # source://actionpack//lib/action_controller/metal/live.rb#141 - def ignore_disconnect; end - - # Ignore that the client has disconnected. - # - # If this value is `true`, calling `write` after the client - # disconnects will result in the written content being silently - # discarded. If this value is `false` (the default), a - # ClientDisconnected exception will be raised. - # - # source://actionpack//lib/action_controller/metal/live.rb#141 - def ignore_disconnect=(_arg0); end - - # source://actionpack//lib/action_controller/metal/live.rb#208 - def on_error(&block); end - - # source://actionpack//lib/action_controller/metal/live.rb#151 - def write(string); end - - # Same as +write+ but automatically include a newline at the end of the string. - # - # source://actionpack//lib/action_controller/metal/live.rb#172 - def writeln(string); end - - private - - # source://actionpack//lib/action_controller/metal/live.rb#228 - def build_queue(queue_size); end - - # source://actionpack//lib/action_controller/metal/live.rb#217 - def each_chunk(&block); end - - class << self - # Returns the value of attribute queue_size. - # - # source://actionpack//lib/action_controller/metal/live.rb#131 - def queue_size; end - - # Sets the attribute queue_size - # - # @param value the value to set the attribute queue_size to. - # - # source://actionpack//lib/action_controller/metal/live.rb#131 - def queue_size=(_arg0); end - end -end - -# source://actionpack//lib/action_controller/metal/live.rb#40 -module ActionController::Live::ClassMethods - # source://actionpack//lib/action_controller/metal/live.rb#41 - def make_response!(request); end -end - -# source://actionpack//lib/action_controller/metal/live.rb#124 -class ActionController::Live::ClientDisconnected < ::RuntimeError; end - -# source://actionpack//lib/action_controller/metal/live.rb#233 -class ActionController::Live::Response < ::ActionDispatch::Response - private - - # source://actionpack//lib/action_controller/metal/live.rb#235 - def before_committed; end - - # source://actionpack//lib/action_controller/metal/live.rb#242 - def build_buffer(response, body); end -end - -# This class provides the ability to write an SSE (Server Sent Event) -# to an IO stream. The class is initialized with a stream and can be used -# to either write a JSON string or an object which can be converted to JSON. -# -# Writing an object will convert it into standard SSE format with whatever -# options you have configured. You may choose to set the following options: -# -# 1) Event. If specified, an event with this name will be dispatched on -# the browser. -# 2) Retry. The reconnection time in milliseconds used when attempting -# to send the event. -# 3) Id. If the connection dies while sending an SSE to the browser, then -# the server will receive a +Last-Event-ID+ header with value equal to +id+. -# -# After setting an option in the constructor of the SSE object, all future -# SSEs sent across the stream will use those options unless overridden. -# -# Example Usage: -# -# class MyController < ActionController::Base -# include ActionController::Live -# -# def index -# response.headers['Content-Type'] = 'text/event-stream' -# sse = SSE.new(response.stream, retry: 300, event: "event-name") -# sse.write({ name: 'John'}) -# sse.write({ name: 'John'}, id: 10) -# sse.write({ name: 'John'}, id: 10, event: "other-event") -# sse.write({ name: 'John'}, id: 10, event: "other-event", retry: 500) -# ensure -# sse.close -# end -# end -# -# Note: SSEs are not currently supported by IE. However, they are supported -# by Chrome, Firefox, Opera, and Safari. -# -# source://actionpack//lib/action_controller/metal/live.rb#88 -class ActionController::Live::SSE - # @return [SSE] a new instance of SSE - # - # source://actionpack//lib/action_controller/metal/live.rb#91 - def initialize(stream, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/live.rb#96 - def close; end - - # source://actionpack//lib/action_controller/metal/live.rb#100 - def write(object, options = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_controller/metal/live.rb#110 - def perform_write(json, options); end -end - -# source://actionpack//lib/action_controller/metal/live.rb#89 -ActionController::Live::SSE::PERMITTED_OPTIONS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_controller/test_case.rb#169 -class ActionController::LiveTestResponse < ::ActionController::Live::Response - # Was there a server-side error? - # - # source://rack/2.2.13/lib/rack/response.rb#141 - def error?; end - - # Was the URL not found? - # - # source://rack/2.2.13/lib/rack/response.rb#151 - def missing?; end - - # Was the response successful? - # - # source://rack/2.2.13/lib/rack/response.rb#138 - def success?; end -end - -# source://actionpack//lib/action_controller/log_subscriber.rb#4 -class ActionController::LogSubscriber < ::ActiveSupport::LogSubscriber - # source://actionpack//lib/action_controller/log_subscriber.rb#67 - def exist_fragment?(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#67 - def expire_fragment(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#40 - def halted_callback(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#76 - def logger; end - - # source://actionpack//lib/action_controller/log_subscriber.rb#20 - def process_action(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#67 - def read_fragment(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#48 - def redirect_to(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#52 - def send_data(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#44 - def send_file(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#7 - def start_processing(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#56 - def unpermitted_parameters(event); end - - # source://actionpack//lib/action_controller/log_subscriber.rb#67 - def write_fragment(event); end -end - -# source://actionpack//lib/action_controller/log_subscriber.rb#5 -ActionController::LogSubscriber::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_controller/metal/logging.rb#4 -module ActionController::Logging - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionController::Logging::ClassMethods -end - -# source://actionpack//lib/action_controller/metal/logging.rb#7 -module ActionController::Logging::ClassMethods - # Set a different log level per request. - # - # # Use the debug log level if a particular cookie is set. - # class ApplicationController < ActionController::Base - # log_at :debug, if: -> { cookies[:debug] } - # end - # - # source://actionpack//lib/action_controller/metal/logging.rb#15 - def log_at(level, **options); end -end - -# ActionController::Metal is the simplest possible controller, providing a -# valid Rack interface without the additional niceties provided by -# ActionController::Base. -# -# A sample metal controller might look like this: -# -# class HelloController < ActionController::Metal -# def index -# self.response_body = "Hello World!" -# end -# end -# -# And then to route requests to your metal controller, you would add -# something like this to config/routes.rb: -# -# get 'hello', to: HelloController.action(:index) -# -# The +action+ method returns a valid Rack application for the \Rails -# router to dispatch to. -# -# == Rendering Helpers -# -# ActionController::Metal by default provides no utilities for rendering -# views, partials, or other responses aside from explicitly calling of -# response_body=, content_type=, and status=. To -# add the render helpers you're used to having in a normal controller, you -# can do the following: -# -# class HelloController < ActionController::Metal -# include AbstractController::Rendering -# include ActionView::Layouts -# append_view_path "#{Rails.root}/app/views" -# -# def index -# render "hello/index" -# end -# end -# -# == Redirection Helpers -# -# To add redirection helpers to your metal controller, do the following: -# -# class HelloController < ActionController::Metal -# include ActionController::Redirecting -# include Rails.application.routes.url_helpers -# -# def index -# redirect_to root_url -# end -# end -# -# == Other Helpers -# -# You can refer to the modules included in ActionController::Base to see -# other features you can bring into your metal controller. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://actionpack//lib/action_controller/metal.rb#117 -class ActionController::Metal < ::AbstractController::Base - include ::ActionController::Testing::Functional - - # @return [Metal] a new instance of Metal - # - # source://actionpack//lib/action_controller/metal.rb#150 - def initialize; end - - # source://actionpack//lib/action_controller/metal.rb#147 - def content_type(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def content_type=(arg); end - - # Delegates to the class's ::controller_name. - # - # source://actionpack//lib/action_controller/metal.rb#141 - def controller_name; end - - # source://actionpack//lib/action_controller/metal.rb#185 - def dispatch(name, request, response); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def headers(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def location(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def location=(arg); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def media_type(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack; end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack=(_arg0); end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack?; end - - # source://actionpack//lib/action_controller/metal.rb#157 - def params; end - - # source://actionpack//lib/action_controller/metal.rb#161 - def params=(val); end - - # Tests if render or redirect has already happened. - # - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal.rb#181 - def performed?; end - - # source://activesupport/7.0.8.7/lib/active_support/core_ext/module/attr_internal.rb#33 - def request; end - - # source://activesupport/7.0.8.7/lib/active_support/core_ext/module/attr_internal.rb#33 - def request=(_arg0); end - - # source://actionpack//lib/action_controller/metal.rb#206 - def reset_session; end - - # source://activesupport/7.0.8.7/lib/active_support/core_ext/module/attr_internal.rb#33 - def response; end - - # source://activesupport/7.0.8.7/lib/active_support/core_ext/module/attr_internal.rb#33 - def response=(_arg0); end - - # source://actionpack//lib/action_controller/metal.rb#172 - def response_body=(body); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def response_code(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal.rb#146 - def session(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal.rb#197 - def set_request!(request); end - - # source://actionpack//lib/action_controller/metal.rb#193 - def set_response!(response); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def status(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal.rb#147 - def status=(arg); end - - # source://actionpack//lib/action_controller/metal.rb#202 - def to_a; end - - # Basic url_for that can be overridden for more robust functionality. - # - # source://actionpack//lib/action_controller/metal.rb#168 - def url_for(string); end - - class << self - # Returns a Rack endpoint for the given action name. - # - # source://actionpack//lib/action_controller/metal.rb#231 - def action(name); end - - # source://actionpack//lib/action_controller/metal.rb#136 - def action_encoding_template(action); end - - # Returns the last part of the controller's name, underscored, without the ending - # Controller. For instance, PostsController returns posts. - # Namespaces are left out, so Admin::PostsController returns posts as well. - # - # ==== Returns - # * string - # - # source://actionpack//lib/action_controller/metal.rb#126 - def controller_name; end - - # Direct dispatch to the controller. Instantiates the controller, then - # executes the action named +name+. - # - # source://actionpack//lib/action_controller/metal.rb#247 - def dispatch(name, req, res); end - - # source://actionpack//lib/action_controller/metal.rb#212 - def inherited(base); end - - # source://actionpack//lib/action_controller/metal.rb#130 - def make_response!(request); end - - # Alias for +middleware_stack+. - # - # source://actionpack//lib/action_controller/metal.rb#226 - def middleware; end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack; end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack=(value); end - - # source://actionpack//lib/action_controller/metal.rb#210 - def middleware_stack?; end - - # Pushes the given Rack middleware and its arguments to the bottom of the - # middleware stack. - # - # source://actionpack//lib/action_controller/metal.rb#220 - def use(*_arg0, **_arg1, &_arg2); end - end -end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#50 -class ActionController::MethodNotAllowed < ::ActionController::ActionControllerError - # @return [MethodNotAllowed] a new instance of MethodNotAllowed - # - # source://actionpack//lib/action_controller/metal/exceptions.rb#51 - def initialize(*allowed_methods); end -end - -# Extend ActionDispatch middleware stack to make it aware of options -# allowing the following syntax in controllers: -# -# class PostsController < ApplicationController -# use AuthenticationMiddleware, except: [:index, :show] -# end -# -# source://actionpack//lib/action_controller/metal.rb#14 -class ActionController::MiddlewareStack < ::ActionDispatch::MiddlewareStack - # source://actionpack//lib/action_controller/metal.rb#27 - def build(action, app = T.unsafe(nil), &block); end - - private - - # source://actionpack//lib/action_controller/metal.rb#40 - def build_middleware(klass, args, block); end -end - -# source://actionpack//lib/action_controller/metal.rb#37 -ActionController::MiddlewareStack::EXCLUDE = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_controller/metal.rb#36 -ActionController::MiddlewareStack::INCLUDE = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_controller/metal.rb#15 -class ActionController::MiddlewareStack::Middleware < ::ActionDispatch::MiddlewareStack::Middleware - # @return [Middleware] a new instance of Middleware - # - # source://actionpack//lib/action_controller/metal.rb#16 - def initialize(klass, args, actions, strategy, block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal.rb#22 - def valid?(action); end -end - -# source://actionpack//lib/action_controller/metal.rb#38 -ActionController::MiddlewareStack::NULL = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_controller/metal/mime_responds.rb#6 -module ActionController::MimeResponds - # Without web-service support, an action which collects the data for displaying a list of people - # might look something like this: - # - # def index - # @people = Person.all - # end - # - # That action implicitly responds to all formats, but formats can also be explicitly enumerated: - # - # def index - # @people = Person.all - # respond_to :html, :js - # end - # - # Here's the same action, with web-service support baked in: - # - # def index - # @people = Person.all - # - # respond_to do |format| - # format.html - # format.js - # format.xml { render xml: @people } - # end - # end - # - # What that says is, "if the client wants HTML or JS in response to this action, just respond as we - # would have before, but if the client wants XML, return them the list of people in XML format." - # (Rails determines the desired response format from the HTTP Accept header submitted by the client.) - # - # Supposing you have an action that adds a new person, optionally creating their company - # (by name) if it does not already exist, without web-services, it might look like this: - # - # def create - # @company = Company.find_or_create_by(name: params[:company][:name]) - # @person = @company.people.create(params[:person]) - # - # redirect_to(person_list_url) - # end - # - # Here's the same action, with web-service support baked in: - # - # def create - # company = params[:person].delete(:company) - # @company = Company.find_or_create_by(name: company[:name]) - # @person = @company.people.create(params[:person]) - # - # respond_to do |format| - # format.html { redirect_to(person_list_url) } - # format.js - # format.xml { render xml: @person.to_xml(include: @company) } - # end - # end - # - # If the client wants HTML, we just redirect them back to the person list. If they want JavaScript, - # then it is an Ajax request and we render the JavaScript template associated with this action. - # Lastly, if the client wants XML, we render the created person as XML, but with a twist: we also - # include the person's company in the rendered XML, so you get something like this: - # - # - # ... - # ... - # - # ... - # ... - # ... - # - # - # - # Note, however, the extra bit at the top of that action: - # - # company = params[:person].delete(:company) - # @company = Company.find_or_create_by(name: company[:name]) - # - # This is because the incoming XML document (if a web-service request is in process) can only contain a - # single root-node. So, we have to rearrange things so that the request looks like this (url-encoded): - # - # person[name]=...&person[company][name]=...&... - # - # And, like this (xml-encoded): - # - # - # ... - # - # ... - # - # - # - # In other words, we make the request so that it operates on a single entity's person. Then, in the action, - # we extract the company data from the request, find or create the company, and then create the new person - # with the remaining data. - # - # Note that you can define your own XML parameter parser which would allow you to describe multiple entities - # in a single request (i.e., by wrapping them all in a single root node), but if you just go with the flow - # and accept Rails' defaults, life will be much easier. - # - # If you need to use a MIME type which isn't supported by default, you can register your own handlers in - # +config/initializers/mime_types.rb+ as follows. - # - # Mime::Type.register "image/jpeg", :jpg - # - # +respond_to+ also allows you to specify a common block for different formats by using +any+: - # - # def index - # @people = Person.all - # - # respond_to do |format| - # format.html - # format.any(:xml, :json) { render request.format.to_sym => @people } - # end - # end - # - # In the example above, if the format is xml, it will render: - # - # render xml: @people - # - # Or if the format is json: - # - # render json: @people - # - # +any+ can also be used with no arguments, in which case it will be used for any format requested by - # the user: - # - # respond_to do |format| - # format.html - # format.any { redirect_to support_path } - # end - # - # Formats can have different variants. - # - # The request variant is a specialization of the request format, like :tablet, - # :phone, or :desktop. - # - # We often want to render different html/json/xml templates for phones, - # tablets, and desktop browsers. Variants make it easy. - # - # You can set the variant in a +before_action+: - # - # request.variant = :tablet if /iPad/.match?(request.user_agent) - # - # Respond to variants in the action just like you respond to formats: - # - # respond_to do |format| - # format.html do |variant| - # variant.tablet # renders app/views/projects/show.html+tablet.erb - # variant.phone { extra_setup; render ... } - # variant.none { special_setup } # executed only if there is no variant set - # end - # end - # - # Provide separate templates for each format and variant: - # - # app/views/projects/show.html.erb - # app/views/projects/show.html+tablet.erb - # app/views/projects/show.html+phone.erb - # - # When you're not sharing any code within the format, you can simplify defining variants - # using the inline syntax: - # - # respond_to do |format| - # format.js { render "trash" } - # format.html.phone { redirect_to progress_path } - # format.html.none { render "trash" } - # end - # - # Variants also support common +any+/+all+ block that formats have. - # - # It works for both inline: - # - # respond_to do |format| - # format.html.any { render html: "any" } - # format.html.phone { render html: "phone" } - # end - # - # and block syntax: - # - # respond_to do |format| - # format.html do |variant| - # variant.any(:tablet, :phablet){ render html: "any" } - # variant.phone { render html: "phone" } - # end - # end - # - # You can also set an array of variants: - # - # request.variant = [:tablet, :phone] - # - # This will work similarly to formats and MIME types negotiation. If there - # is no +:tablet+ variant declared, the +:phone+ variant will be used: - # - # respond_to do |format| - # format.html.none - # format.html.phone # this gets rendered - # end - # - # @raise [ArgumentError] - # @yield [collector] - # - # source://actionpack//lib/action_controller/metal/mime_responds.rb#201 - def respond_to(*mimes); end -end - -# A container for responses available from the current controller for -# requests for different mime-types sent to a particular action. -# -# The public controller methods +respond_to+ may be called with a block -# that is used to define responses to different mime-types, e.g. -# for +respond_to+ : -# -# respond_to do |format| -# format.html -# format.xml { render xml: @people } -# end -# -# In this usage, the argument passed to the block (+format+ above) is an -# instance of the ActionController::MimeResponds::Collector class. This -# object serves as a container in which available responses can be stored by -# calling any of the dynamically generated, mime-type-specific methods such -# as +html+, +xml+ etc on the Collector. Each response is represented by a -# corresponding block if present. -# -# A subsequent call to #negotiate_format(request) will enable the Collector -# to determine which specific mime-type it should respond with for the current -# request, with this response then being accessible by calling #response. -# -# source://actionpack//lib/action_controller/metal/mime_responds.rb#242 -class ActionController::MimeResponds::Collector - include ::AbstractController::Collector - - # @return [Collector] a new instance of Collector - # - # source://actionpack//lib/action_controller/metal/mime_responds.rb#246 - def initialize(mimes, variant = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#253 - def all(*args, &block); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#253 - def any(*args, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/mime_responds.rb#271 - def any_response?; end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#262 - def custom(mime_type, &block); end - - # Returns the value of attribute format. - # - # source://actionpack//lib/action_controller/metal/mime_responds.rb#244 - def format; end - - # Sets the attribute format - # - # @param value the value to set the attribute format to. - # - # source://actionpack//lib/action_controller/metal/mime_responds.rb#244 - def format=(_arg0); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#288 - def negotiate_format(request); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#275 - def response; end -end - -# source://actionpack//lib/action_controller/metal/mime_responds.rb#292 -class ActionController::MimeResponds::Collector::VariantCollector - # @return [VariantCollector] a new instance of VariantCollector - # - # source://actionpack//lib/action_controller/metal/mime_responds.rb#293 - def initialize(variant = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#298 - def all(*args, &block); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#298 - def any(*args, &block); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#309 - def method_missing(name, *args, &block); end - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#313 - def variant; end - - private - - # source://actionpack//lib/action_controller/metal/mime_responds.rb#322 - def variant_key; end -end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#94 -class ActionController::MissingExactTemplate < ::ActionController::UnknownFormat; end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#59 -class ActionController::MissingFile < ::ActionController::ActionControllerError; end - -# See Responder#api_behavior -# -# source://actionpack//lib/action_controller/metal/renderers.rb#17 -class ActionController::MissingRenderer < ::LoadError - # @return [MissingRenderer] a new instance of MissingRenderer - # - # source://actionpack//lib/action_controller/metal/renderers.rb#18 - def initialize(format); end -end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#56 -class ActionController::NotImplemented < ::ActionController::MethodNotAllowed; end - -# Specify binary encoding for parameters for a given action. -# -# source://actionpack//lib/action_controller/metal/parameter_encoding.rb#5 -module ActionController::ParameterEncoding - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionController::ParameterEncoding::ClassMethods -end - -# source://actionpack//lib/action_controller/metal/parameter_encoding.rb#8 -module ActionController::ParameterEncoding::ClassMethods - # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#18 - def action_encoding_template(action); end - - # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#9 - def inherited(klass); end - - # Specify the encoding for a parameter on an action. - # If not specified the default is UTF-8. - # - # You can specify a binary (ASCII_8BIT) parameter with: - # - # class RepositoryController < ActionController::Base - # # This specifies that file_path is not UTF-8 and is instead ASCII_8BIT - # param_encoding :show, :file_path, Encoding::ASCII_8BIT - # - # def show - # @repo = Repository.find_by_filesystem_path params[:file_path] - # - # # params[:repo_name] remains UTF-8 encoded - # @repo_name = params[:repo_name] - # end - # - # def index - # @repositories = Repository.all - # end - # end - # - # The file_path parameter on the show action would be encoded as ASCII-8BIT, - # but all other arguments will remain UTF-8 encoded. - # This is useful in the case where an application must handle data - # but encoding of the data is unknown, like file system data. - # - # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#77 - def param_encoding(action, param, encoding); end - - # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#14 - def setup_param_encode; end - - # Specify that a given action's parameters should all be encoded as - # ASCII-8BIT (it "skips" the encoding default of UTF-8). - # - # For example, a controller would use it like this: - # - # class RepositoryController < ActionController::Base - # skip_parameter_encoding :show - # - # def show - # @repo = Repository.find_by_filesystem_path params[:file_path] - # - # # `repo_name` is guaranteed to be UTF-8, but was ASCII-8BIT, so - # # tag it as such - # @repo_name = params[:repo_name].force_encoding 'UTF-8' - # end - # - # def index - # @repositories = Repository.all - # end - # end - # - # The show action in the above controller would have all parameter values - # encoded as ASCII-8BIT. This is useful in the case where an application - # must handle data but encoding of the data is unknown, like file system data. - # - # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#48 - def skip_parameter_encoding(action); end -end - -# Raised when a required parameter is missing. -# -# params = ActionController::Parameters.new(a: {}) -# params.fetch(:b) -# # => ActionController::ParameterMissing: param is missing or the value is empty: b -# params.require(:a) -# # => ActionController::ParameterMissing: param is missing or the value is empty: a -# -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#21 -class ActionController::ParameterMissing < ::KeyError - # @return [ParameterMissing] a new instance of ParameterMissing - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#24 - def initialize(param, keys = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#33 - def corrections; end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#22 - def keys; end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#22 - def param; end -end - -# == Action Controller \Parameters -# -# Allows you to choose which attributes should be permitted for mass updating -# and thus prevent accidentally exposing that which shouldn't be exposed. -# Provides two methods for this purpose: #require and #permit. The former is -# used to mark parameters as required. The latter is used to set the parameter -# as permitted and limit which attributes should be allowed for mass updating. -# -# params = ActionController::Parameters.new({ -# person: { -# name: "Francesco", -# age: 22, -# role: "admin" -# } -# }) -# -# permitted = params.require(:person).permit(:name, :age) -# permitted # => #"Francesco", "age"=>22} permitted: true> -# permitted.permitted? # => true -# -# Person.first.update!(permitted) -# # => # -# -# It provides two options that controls the top-level behavior of new instances: -# -# * +permit_all_parameters+ - If it's +true+, all the parameters will be -# permitted by default. The default is +false+. -# * +action_on_unpermitted_parameters+ - Controls behavior when parameters that are not explicitly -# permitted are found. The default value is :log in test and development environments, -# +false+ otherwise. The values can be: -# * +false+ to take no action. -# * :log to emit an ActiveSupport::Notifications.instrument event on the -# unpermitted_parameters.action_controller topic and log at the DEBUG level. -# * :raise to raise an ActionController::UnpermittedParameters exception. -# -# Examples: -# -# params = ActionController::Parameters.new -# params.permitted? # => false -# -# ActionController::Parameters.permit_all_parameters = true -# -# params = ActionController::Parameters.new -# params.permitted? # => true -# -# params = ActionController::Parameters.new(a: "123", b: "456") -# params.permit(:c) -# # => # -# -# ActionController::Parameters.action_on_unpermitted_parameters = :raise -# -# params = ActionController::Parameters.new(a: "123", b: "456") -# params.permit(:c) -# # => ActionController::UnpermittedParameters: found unpermitted keys: a, b -# -# Please note that these options *are not thread-safe*. In a multi-threaded -# environment they should only be set once at boot-time and never mutated at -# runtime. -# -# You can fetch values of ActionController::Parameters using either -# :key or "key". -# -# params = ActionController::Parameters.new(key: "value") -# params[:key] # => "value" -# params["key"] # => "value" -# -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#132 -class ActionController::Parameters - # Returns a new ActionController::Parameters instance. - # Also, sets the +permitted+ attribute to the default value of - # ActionController::Parameters.permit_all_parameters. - # - # class Person < ActiveRecord::Base - # end - # - # params = ActionController::Parameters.new(name: "Francesco") - # params.permitted? # => false - # Person.new(params) # => ActiveModel::ForbiddenAttributesError - # - # ActionController::Parameters.permit_all_parameters = true - # - # params = ActionController::Parameters.new(name: "Francesco") - # params.permitted? # => true - # Person.new(params) # => # - # - # @return [Parameters] a new instance of Parameters - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#247 - def initialize(parameters = T.unsafe(nil), logging_context = T.unsafe(nil)); end - - # Returns true if another +Parameters+ object contains the same content and - # permitted flag. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#255 - def ==(other); end - - # Returns a parameter for the given +key+. If not found, - # returns +nil+. - # - # params = ActionController::Parameters.new(person: { name: "Francesco" }) - # params[:person] # => #"Francesco"} permitted: false> - # params[:none] # => nil - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#619 - def [](key); end - - # Assigns a value to a given +key+. The given key may still get filtered out - # when #permit is called. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#625 - def []=(key, value); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#223 - def always_permitted_parameters; end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#223 - def always_permitted_parameters=(val); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def as_json(*_arg0, **_arg1, &_arg2); end - - # Returns a new ActionController::Parameters instance with +nil+ values removed. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#795 - def compact; end - - # Removes all +nil+ values in place and returns +self+, or +nil+ if no changes were made. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#800 - def compact!; end - - # Returns a new ActionController::Parameters instance without the blank values. - # Uses Object#blank? for determining if a value is blank. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#806 - def compact_blank; end - - # Removes all blank values in place and returns self. - # Uses Object#blank? for determining if a value is blank. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#812 - def compact_blank!; end - - # Attribute that keeps track of converted arrays, if any, to avoid double - # looping in the common use case permit + mass-assignment. Defined in a - # method to instantiate it only if needed. - # - # \Testing membership still loops, but it's going to be faster than our own - # loop that converts values. Also, we are not going to build a new array - # object per fetch. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#384 - def converted_arrays; end - - # Returns a duplicate +ActionController::Parameters+ instance with the same permitted parameters. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#897 - def deep_dup; end - - # Returns a new ActionController::Parameters instance with the - # results of running +block+ once for every key. This includes the keys - # from the root hash and from all nested hashes and arrays. The values are unchanged. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#746 - def deep_transform_keys(&block); end - - # Returns the same ActionController::Parameters instance with - # changed keys. This includes the keys from the root hash and from all - # nested hashes and arrays. The values are unchanged. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#755 - def deep_transform_keys!(&block); end - - # Deletes a key-value pair from +Parameters+ and returns the value. If - # +key+ is not found, returns +nil+ (or, with optional code block, yields - # +key+ and returns the result). This method is similar to #extract!, which - # returns the corresponding +ActionController::Parameters+ object. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#764 - def delete(key, &block); end - - # Removes items that the block evaluates to true and returns self. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#788 - def delete_if(&block); end - - # Extracts the nested parameter from the given +keys+ by calling +dig+ - # at each step. Returns +nil+ if any intermediate step is +nil+. - # - # params = ActionController::Parameters.new(foo: { bar: { baz: 1 } }) - # params.dig(:foo, :bar, :baz) # => 1 - # params.dig(:foo, :zot, :xyz) # => nil - # - # params2 = ActionController::Parameters.new(foo: [10, 11, 12]) - # params2.dig(:foo, 1) # => 11 - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#663 - def dig(*keys); end - - # Convert all hashes in values into parameters, then yield each pair in - # the same way as Hash#each_pair. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#356 - def each(&block); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def each_key(*_arg0, **_arg1, &_arg2); end - - # Convert all hashes in values into parameters, then yield each pair in - # the same way as Hash#each_pair. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#356 - def each_pair(&block); end - - # Convert all hashes in values into parameters, then yield each value in - # the same way as Hash#each_value. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#368 - def each_value(&block); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def empty?(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#892 - def encode_with(coder); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#263 - def eql?(other); end - - # Returns a new ActionController::Parameters instance that - # filters out the given +keys+. - # - # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) - # params.except(:a, :b) # => #3} permitted: false> - # params.except(:d) # => #1, "b"=>2, "c"=>3} permitted: false> - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#692 - def except(*keys); end - - # Removes and returns the key/value pairs matching the given keys. - # - # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) - # params.extract!(:a, :b) # => #1, "b"=>2} permitted: false> - # params # => #3} permitted: false> - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#701 - def extract!(*keys); end - - # Returns a parameter for the given +key+. If the +key+ - # can't be found, there are several options: With no other arguments, - # it will raise an ActionController::ParameterMissing error; - # if a second argument is given, then that is returned (converted to an - # instance of +ActionController::Parameters+ if possible); if a block - # is given, then that will be run and its result returned. - # - # params = ActionController::Parameters.new(person: { name: "Francesco" }) - # params.fetch(:person) # => #"Francesco"} permitted: false> - # params.fetch(:none) # => ActionController::ParameterMissing: param is missing or the value is empty: none - # params.fetch(:none, {}) # => # - # params.fetch(:none, "Francesco") # => "Francesco" - # params.fetch(:none) { "Francesco" } # => "Francesco" - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#642 - def fetch(key, *args); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def has_key?(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def has_value?(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#269 - def hash; end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def include?(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#874 - def init_with(coder); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#861 - def inspect; end - - # Equivalent to Hash#keep_if, but returns +nil+ if no changes were made. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#775 - def keep_if(&block); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def key?(*_arg0, **_arg1, &_arg2); end - - # :method: values - # - # :call-seq: - # values() - # - # Returns a new array of the values of the parameters. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def keys(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def member?(*_arg0, **_arg1, &_arg2); end - - # Returns a new ActionController::Parameters instance with all keys from - # +other_hash+ merged into current hash. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#824 - def merge(other_hash); end - - # Returns the current ActionController::Parameters instance with - # +other_hash+ merged into current hash. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#832 - def merge!(other_hash); end - - # Returns a new ActionController::Parameters instance that - # includes only the given +filters+ and sets the +permitted+ attribute - # for the object to +true+. This is useful for limiting which attributes - # should be allowed for mass updating. - # - # params = ActionController::Parameters.new(user: { name: "Francesco", age: 22, role: "admin" }) - # permitted = params.require(:user).permit(:name, :age) - # permitted.permitted? # => true - # permitted.has_key?(:name) # => true - # permitted.has_key?(:age) # => true - # permitted.has_key?(:role) # => false - # - # Only permitted scalars pass the filter. For example, given - # - # params.permit(:name) - # - # +:name+ passes if it is a key of +params+ whose associated value is of type - # +String+, +Symbol+, +NilClass+, +Numeric+, +TrueClass+, +FalseClass+, - # +Date+, +Time+, +DateTime+, +StringIO+, +IO+, - # ActionDispatch::Http::UploadedFile or +Rack::Test::UploadedFile+. - # Otherwise, the key +:name+ is filtered out. - # - # You may declare that the parameter should be an array of permitted scalars - # by mapping it to an empty array: - # - # params = ActionController::Parameters.new(tags: ["rails", "parameters"]) - # params.permit(tags: []) - # - # Sometimes it is not possible or convenient to declare the valid keys of - # a hash parameter or its internal structure. Just map to an empty hash: - # - # params.permit(preferences: {}) - # - # Be careful because this opens the door to arbitrary input. In this - # case, +permit+ ensures values in the returned structure are permitted - # scalars and filters out anything else. - # - # You can also use +permit+ on nested parameters, like: - # - # params = ActionController::Parameters.new({ - # person: { - # name: "Francesco", - # age: 22, - # pets: [{ - # name: "Purplish", - # category: "dogs" - # }] - # } - # }) - # - # permitted = params.permit(person: [ :name, { pets: :name } ]) - # permitted.permitted? # => true - # permitted[:person][:name] # => "Francesco" - # permitted[:person][:age] # => nil - # permitted[:person][:pets][0][:name] # => "Purplish" - # permitted[:person][:pets][0][:category] # => nil - # - # Note that if you use +permit+ in a key that points to a hash, - # it won't allow all the hash. You also need to specify which - # attributes inside the hash should be permitted. - # - # params = ActionController::Parameters.new({ - # person: { - # contact: { - # email: "none@test.com", - # phone: "555-1234" - # } - # } - # }) - # - # params.require(:person).permit(:contact) - # # => # - # - # params.require(:person).permit(contact: :phone) - # # => ##"555-1234"} permitted: true>} permitted: true> - # - # params.require(:person).permit(contact: [ :email, :phone ]) - # # => ##"none@test.com", "phone"=>"555-1234"} permitted: true>} permitted: true> - # - # If your parameters specify multiple parameters indexed by a number, - # you can permit each set of parameters under the numeric key to be the same using the same syntax as permitting a single item. - # - # params = ActionController::Parameters.new({ - # person: { - # '0': { - # email: "none@test.com", - # phone: "555-1234" - # }, - # '1': { - # email: "nothing@test.com", - # phone: "555-6789" - # }, - # } - # }) - # params.permit(person: [:email]).to_h - # # => {"person"=>{"0"=>{"email"=>"none@test.com"}, "1"=>{"email"=>"nothing@test.com"}}} - # - # If you want to specify what keys you want from each numeric key, you can instead specify each one individually - # - # params = ActionController::Parameters.new({ - # person: { - # '0': { - # email: "none@test.com", - # phone: "555-1234" - # }, - # '1': { - # email: "nothing@test.com", - # phone: "555-6789" - # }, - # } - # }) - # params.permit(person: { '0': [:email], '1': [:phone]}).to_h - # # => {"person"=>{"0"=>{"email"=>"none@test.com"}, "1"=>{"phone"=>"555-6789"}}} - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#596 - def permit(*filters); end - - # Sets the +permitted+ attribute to +true+. This can be used to pass - # mass assignment. Returns +self+. - # - # class Person < ActiveRecord::Base - # end - # - # params = ActionController::Parameters.new(name: "Francesco") - # params.permitted? # => false - # Person.new(params) # => ActiveModel::ForbiddenAttributesError - # params.permit! - # params.permitted? # => true - # Person.new(params) # => # - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#410 - def permit!; end - - # Returns +true+ if the parameter is permitted, +false+ otherwise. - # - # params = ActionController::Parameters.new - # params.permitted? # => false - # params.permit! - # params.permitted? # => true - # - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#394 - def permitted?; end - - # Returns a new ActionController::Parameters instance with items - # that the block evaluates to true removed. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#783 - def reject(&block); end - - # Removes items that the block evaluates to true and returns self. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#788 - def reject!(&block); end - - # This method accepts both a single key and an array of keys. - # - # When passed a single key, if it exists and its associated value is - # either present or the singleton +false+, returns said value: - # - # ActionController::Parameters.new(person: { name: "Francesco" }).require(:person) - # # => #"Francesco"} permitted: false> - # - # Otherwise raises ActionController::ParameterMissing: - # - # ActionController::Parameters.new.require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # ActionController::Parameters.new(person: nil).require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # ActionController::Parameters.new(person: "\t").require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # ActionController::Parameters.new(person: {}).require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # When given an array of keys, the method tries to require each one of them - # in order. If it succeeds, an array with the respective return values is - # returned: - # - # params = ActionController::Parameters.new(user: { ... }, profile: { ... }) - # user_params, profile_params = params.require([:user, :profile]) - # - # Otherwise, the method re-raises the first exception found: - # - # params = ActionController::Parameters.new(user: {}, profile: {}) - # user_params, profile_params = params.require([:user, :profile]) - # # ActionController::ParameterMissing: param is missing or the value is empty: user - # - # Technically this method can be used to fetch terminal values: - # - # # CAREFUL - # params = ActionController::Parameters.new(person: { name: "Finn" }) - # name = params.require(:person).require(:name) # CAREFUL - # - # but take into account that at some point those ones have to be permitted: - # - # def person_params - # params.require(:person).permit(:name).tap do |person_params| - # person_params.require(:name) # SAFER - # end - # end - # - # for example. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#471 - def require(key); end - - # This method accepts both a single key and an array of keys. - # - # When passed a single key, if it exists and its associated value is - # either present or the singleton +false+, returns said value: - # - # ActionController::Parameters.new(person: { name: "Francesco" }).require(:person) - # # => #"Francesco"} permitted: false> - # - # Otherwise raises ActionController::ParameterMissing: - # - # ActionController::Parameters.new.require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # ActionController::Parameters.new(person: nil).require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # ActionController::Parameters.new(person: "\t").require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # ActionController::Parameters.new(person: {}).require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person - # - # When given an array of keys, the method tries to require each one of them - # in order. If it succeeds, an array with the respective return values is - # returned: - # - # params = ActionController::Parameters.new(user: { ... }, profile: { ... }) - # user_params, profile_params = params.require([:user, :profile]) - # - # Otherwise, the method re-raises the first exception found: - # - # params = ActionController::Parameters.new(user: {}, profile: {}) - # user_params, profile_params = params.require([:user, :profile]) - # # ActionController::ParameterMissing: param is missing or the value is empty: user - # - # Technically this method can be used to fetch terminal values: - # - # # CAREFUL - # params = ActionController::Parameters.new(person: { name: "Finn" }) - # name = params.require(:person).require(:name) # CAREFUL - # - # but take into account that at some point those ones have to be permitted: - # - # def person_params - # params.require(:person).permit(:name).tap do |person_params| - # person_params.require(:name) # SAFER - # end - # end - # - # for example. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#471 - def required(key); end - - # Returns a new ActionController::Parameters instance with all keys - # from current hash merged into +other_hash+. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#839 - def reverse_merge(other_hash); end - - # Returns the current ActionController::Parameters instance with - # current hash merged into +other_hash+. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#848 - def reverse_merge!(other_hash); end - - # Returns a new ActionController::Parameters instance with only - # items that the block evaluates to true. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#770 - def select(&block); end - - # Equivalent to Hash#keep_if, but returns +nil+ if no changes were made. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#775 - def select!(&block); end - - # Returns a new ActionController::Parameters instance that - # includes only the given +keys+. If the given +keys+ - # don't exist, returns an empty hash. - # - # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) - # params.slice(:a, :b) # => #1, "b"=>2} permitted: false> - # params.slice(:d) # => # - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#675 - def slice(*keys); end - - # Returns the current ActionController::Parameters instance which - # contains only the given +keys+. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#681 - def slice!(*keys); end - - # This is required by ActiveModel attribute assignment, so that user can - # pass +Parameters+ to a mass assignment methods in a model. It should not - # matter as we are using +HashWithIndifferentAccess+ internally. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#857 - def stringify_keys; end - - # Returns a safe ActiveSupport::HashWithIndifferentAccess - # representation of the parameters with all unpermitted keys removed. - # - # params = ActionController::Parameters.new({ - # name: "Senjougahara Hitagi", - # oddity: "Heavy stone crab" - # }) - # params.to_h - # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash - # - # safe_params = params.permit(:name) - # safe_params.to_h # => {"name"=>"Senjougahara Hitagi"} - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#285 - def to_h; end - - # Returns a safe Hash representation of the parameters - # with all unpermitted keys removed. - # - # params = ActionController::Parameters.new({ - # name: "Senjougahara Hitagi", - # oddity: "Heavy stone crab" - # }) - # params.to_hash - # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash - # - # safe_params = params.permit(:name) - # safe_params.to_hash # => {"name"=>"Senjougahara Hitagi"} - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#305 - def to_hash; end - - # Returns a string representation of the receiver suitable for use as a URL - # query string: - # - # params = ActionController::Parameters.new({ - # name: "David", - # nationality: "Danish" - # }) - # params.to_query - # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash - # - # safe_params = params.permit(:name, :nationality) - # safe_params.to_query - # # => "name=David&nationality=Danish" - # - # An optional namespace can be passed to enclose key names: - # - # params = ActionController::Parameters.new({ - # name: "David", - # nationality: "Danish" - # }) - # safe_params = params.permit(:name, :nationality) - # safe_params.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://actionpack//lib/action_controller/metal/strong_parameters.rb#335 - def to_param(*args); end - - # Returns a string representation of the receiver suitable for use as a URL - # query string: - # - # params = ActionController::Parameters.new({ - # name: "David", - # nationality: "Danish" - # }) - # params.to_query - # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash - # - # safe_params = params.permit(:name, :nationality) - # safe_params.to_query - # # => "name=David&nationality=Danish" - # - # An optional namespace can be passed to enclose key names: - # - # params = ActionController::Parameters.new({ - # name: "David", - # nationality: "Danish" - # }) - # safe_params = params.permit(:name, :nationality) - # safe_params.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://actionpack//lib/action_controller/metal/strong_parameters.rb#335 - def to_query(*args); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def to_s(*_arg0, **_arg1, &_arg2); end - - # Returns an unsafe, unfiltered ActiveSupport::HashWithIndifferentAccess - # representation of the parameters. - # - # params = ActionController::Parameters.new({ - # name: "Senjougahara Hitagi", - # oddity: "Heavy stone crab" - # }) - # params.to_unsafe_h - # # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"} - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#349 - def to_unsafe_h; end - - # Returns an unsafe, unfiltered ActiveSupport::HashWithIndifferentAccess - # representation of the parameters. - # - # params = ActionController::Parameters.new({ - # name: "Senjougahara Hitagi", - # oddity: "Heavy stone crab" - # }) - # params.to_unsafe_h - # # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"} - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#349 - def to_unsafe_hash; end - - # Returns a new ActionController::Parameters instance with the - # results of running +block+ once for every key. The values are unchanged. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#728 - def transform_keys(&block); end - - # Performs keys transformation and returns the altered - # ActionController::Parameters instance. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#737 - def transform_keys!(&block); end - - # Returns a new ActionController::Parameters instance with the results of - # running +block+ once for every value. The keys are unchanged. - # - # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) - # params.transform_values { |x| x * 2 } - # # => #2, "b"=>4, "c"=>6} permitted: false> - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#711 - def transform_values; end - - # Performs values transformation and returns the altered - # ActionController::Parameters instance. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#720 - def transform_values!; end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def value?(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#209 - def values(*_arg0, **_arg1, &_arg2); end - - # Returns values that were assigned to the given +keys+. Note that all the - # +Hash+ objects will be converted to ActionController::Parameters. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#818 - def values_at(*keys); end - - # Returns a new ActionController::Parameters instance with all keys - # from current hash merged into +other_hash+. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#839 - def with_defaults(other_hash); end - - # Returns the current ActionController::Parameters instance with - # current hash merged into +other_hash+. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#848 - def with_defaults!(other_hash); end - - protected - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#912 - def each_nested_attribute; end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#908 - def nested_attributes?; end - - # Returns the value of attribute parameters. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#904 - def parameters; end - - # Sets the attribute permitted - # - # @param value the value to set the attribute permitted to. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#906 - def permitted=(_arg0); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1053 - def array_of_permitted_scalars?(value); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#940 - def convert_hashes_to_parameters(key, value); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#925 - def convert_parameters_to_hashes(value, using); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#946 - def convert_value_to_parameters(value); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#966 - def each_element(object, filter, &block); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1065 - def hash_filter(params, filter); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1124 - def initialize_copy(source); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#919 - def new_instance_with_inherited_permitted_status(hash); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1059 - def non_scalar?(value); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1109 - def permit_any_in_array(array); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1092 - def permit_any_in_parameters(params); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1024 - def permitted_scalar?(value); end - - # Adds existing keys to the params if their values are scalar. - # - # For example: - # - # puts self.keys #=> ["zipcode(90210i)"] - # params = {} - # - # permitted_scalar_filter(params, "zipcode") - # - # puts params.keys # => ["zipcode"] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1038 - def permitted_scalar_filter(params, permitted_key); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#960 - def specify_numeric_keys?(filter); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#992 - def unpermitted_keys(params); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#979 - def unpermitted_parameters!(params); end - - class << self - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#135 - def action_on_unpermitted_parameters; end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#135 - def action_on_unpermitted_parameters=(val); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#223 - def always_permitted_parameters; end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#223 - def always_permitted_parameters=(val); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#865 - def hook_into_yaml_loading; end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#226 - def nested_attribute?(key, value); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#133 - def permit_all_parameters; end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#133 - def permit_all_parameters=(val); end - end -end - -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1063 -ActionController::Parameters::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1064 -ActionController::Parameters::EMPTY_HASH = T.let(T.unsafe(nil), Hash) - -# This is a list of permitted scalar types that includes the ones -# supported in XML and JSON requests. -# -# This list is in particular used to filter ordinary requests, \String goes -# as first element to quickly short-circuit the common case. -# -# If you modify this collection please update the one in the #permit doc -# as well. -# -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1008 -ActionController::Parameters::PERMITTED_SCALAR_TYPES = T.let(T.unsafe(nil), Array) - -# Wraps the parameters hash into a nested hash. This will allow clients to -# submit requests without having to specify any root elements. -# -# This functionality is enabled by default for JSON, and can be customized by -# setting the format array: -# -# class ApplicationController < ActionController::Base -# wrap_parameters format: [:json, :xml] -# end -# -# You could also turn it on per controller: -# -# class UsersController < ApplicationController -# wrap_parameters format: [:json, :xml, :url_encoded_form, :multipart_form] -# end -# -# If you enable +ParamsWrapper+ for +:json+ format, instead of having to -# send JSON parameters like this: -# -# {"user": {"name": "Konata"}} -# -# You can send parameters like this: -# -# {"name": "Konata"} -# -# And it will be wrapped into a nested hash with the key name matching the -# controller's name. For example, if you're posting to +UsersController+, -# your new +params+ hash will look like this: -# -# {"name" => "Konata", "user" => {"name" => "Konata"}} -# -# You can also specify the key in which the parameters should be wrapped to, -# and also the list of attributes it should wrap by using either +:include+ or -# +:exclude+ options like this: -# -# class UsersController < ApplicationController -# wrap_parameters :person, include: [:username, :password] -# end -# -# On Active Record models with no +:include+ or +:exclude+ option set, -# it will only wrap the parameters returned by the class method -# attribute_names. -# -# If you're going to pass the parameters to an +ActiveModel+ object (such as -# User.new(params[:user])), you might consider passing the model class to -# the method instead. The +ParamsWrapper+ will actually try to determine the -# list of attribute names from the model and only wrap those attributes: -# -# class UsersController < ApplicationController -# wrap_parameters Person -# end -# -# You still could pass +:include+ and +:exclude+ to set the list of attributes -# you want to wrap. -# -# By default, if you don't specify the key in which the parameters would be -# wrapped to, +ParamsWrapper+ will actually try to determine if there's -# a model related to it or not. This controller, for example: -# -# class Admin::UsersController < ApplicationController -# end -# -# will try to check if Admin::User or +User+ model exists, and use it to -# determine the wrapper key respectively. If both models don't exist, -# it will then fallback to use +user+ as the key. -# -# To disable this functionality for a controller: -# -# class UsersController < ApplicationController -# wrap_parameters false -# end -# -# source://actionpack//lib/action_controller/metal/params_wrapper.rb#80 -module ActionController::ParamsWrapper - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::ParamsWrapper::ClassMethods - - private - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#277 - def _extract_parameters(parameters); end - - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#299 - def _perform_parameter_wrapping; end - - # Returns the list of parameters which will be selected for wrapped. - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#273 - def _wrap_parameters(parameters); end - - # Checks if we should perform parameters wrapping. - # - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#289 - def _wrapper_enabled?; end - - # Returns the list of enabled formats. - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#268 - def _wrapper_formats; end - - # Returns the wrapper key which will be used to store wrapped parameters. - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#263 - def _wrapper_key; end - - # Performs parameters wrapping upon the request. Called automatically - # by the metal call stack. - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#257 - def process_action(*_arg0); end - - module GeneratedClassMethods - def _wrapper_options; end - def _wrapper_options=(value); end - def _wrapper_options?; end - end - - module GeneratedInstanceMethods - def _wrapper_options; end - def _wrapper_options=(value); end - def _wrapper_options?; end - end -end - -# source://actionpack//lib/action_controller/metal/params_wrapper.rb#188 -module ActionController::ParamsWrapper::ClassMethods - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#189 - def _set_wrapper_options(options); end - - # Sets the default wrapper key or model which will be used to determine - # wrapper key and attribute names. Called automatically when the - # module is inherited. - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#244 - def inherited(klass); end - - # Sets the name of the wrapper key, or the model which +ParamsWrapper+ - # would use to determine the attribute names from. - # - # ==== Examples - # wrap_parameters format: :xml - # # enables the parameter wrapper for XML format - # - # wrap_parameters :person - # # wraps parameters into +params[:person]+ hash - # - # wrap_parameters Person - # # wraps parameters by determining the wrapper key from Person class - # # (+person+, in this case) and the list of attribute names - # - # wrap_parameters include: [:username, :title] - # # wraps only +:username+ and +:title+ attributes from parameters. - # - # wrap_parameters false - # # disables parameters wrapping for this controller altogether. - # - # ==== Options - # * :format - The list of formats in which the parameters wrapper - # will be enabled. - # * :include - The list of attribute names which parameters wrapper - # will wrap into a nested hash. - # * :exclude - The list of attribute names which parameters wrapper - # will exclude from a nested hash. - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#220 - def wrap_parameters(name_or_model_or_options, options = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_controller/metal/params_wrapper.rb#83 -ActionController::ParamsWrapper::EXCLUDE_PARAMETERS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_controller/metal/params_wrapper.rb#87 -class ActionController::ParamsWrapper::Options < ::Struct - include ::Mutex_m - - # @return [Options] a new instance of Options - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#98 - def initialize(name, format, include, exclude, klass, model); end - - # Returns the value of attribute include - # - # @return [Object] the current value of include - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#108 - def include; end - - # source://mutex_m/0.1.2/mutex_m.rb#93 - def lock; end - - # source://mutex_m/0.1.2/mutex_m.rb#83 - def locked?; end - - # Returns the value of attribute model - # - # @return [Object] the current value of model - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#104 - def model; end - - # Returns the value of attribute name - # - # @return [Object] the current value of name - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#141 - def name; end - - # source://mutex_m/0.1.2/mutex_m.rb#78 - def synchronize(&block); end - - # source://mutex_m/0.1.2/mutex_m.rb#88 - def try_lock; end - - # source://mutex_m/0.1.2/mutex_m.rb#98 - def unlock; end - - private - - # Determine the wrapper model from the controller's name. By convention, - # this could be done by trying to find the defined model that has the - # same singular name as the controller. For example, +UsersController+ - # will try to find if the +User+ model exists. - # - # This method also does namespace lookup. Foo::Bar::UsersController will - # try to find Foo::Bar::User, Foo::User and finally User. - # - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#165 - def _default_wrap_model; end - - class << self - # source://actionpack//lib/action_controller/metal/params_wrapper.rb#90 - def from_hash(hash); end - end -end - -# source://actionpack//lib/action_controller/metal/permissions_policy.rb#4 -module ActionController::PermissionsPolicy - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionController::PermissionsPolicy::ClassMethods -end - -# source://actionpack//lib/action_controller/metal/permissions_policy.rb#7 -module ActionController::PermissionsPolicy::ClassMethods - # Overrides parts of the globally configured +Feature-Policy+ - # header: - # - # class PagesController < ApplicationController - # permissions_policy do |policy| - # policy.geolocation "https://example.com" - # end - # end - # - # Options can be passed similar to +before_action+. For example, pass - # only: :index to override the header on the index action only: - # - # class PagesController < ApplicationController - # permissions_policy(only: :index) do |policy| - # policy.camera :self - # end - # end - # - # source://actionpack//lib/action_controller/metal/permissions_policy.rb#26 - def permissions_policy(**options, &block); end -end - -# source://actionpack//lib/action_controller/railtie.rb#11 -class ActionController::Railtie < ::Rails::Railtie; end - -# source://actionpack//lib/action_controller/railties/helpers.rb#4 -module ActionController::Railties; end - -# source://actionpack//lib/action_controller/railties/helpers.rb#5 -module ActionController::Railties::Helpers - # source://actionpack//lib/action_controller/railties/helpers.rb#6 - def inherited(klass); end -end - -# source://actionpack//lib/action_controller/metal/redirecting.rb#4 -module ActionController::Redirecting - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Benchmarkable - include ::AbstractController::Logger - include ::ActionDispatch::Routing::UrlFor - include ::AbstractController::UrlFor - include ::ActionController::UrlFor - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods - - # source://actionpack//lib/action_controller/metal/redirecting.rb#136 - def _compute_redirect_to_location(request, options); end - - # Soft deprecated alias for #redirect_back_or_to where the +fallback_location+ location is supplied as a keyword argument instead - # of the first positional argument. - # - # source://actionpack//lib/action_controller/metal/redirecting.rb#101 - def redirect_back(fallback_location:, allow_other_host: T.unsafe(nil), **args); end - - # Redirects the browser to the page that issued the request (the referrer) - # if possible, otherwise redirects to the provided default fallback - # location. - # - # The referrer information is pulled from the HTTP +Referer+ (sic) header on - # the request. This is an optional header and its presence on the request is - # subject to browser security settings and user preferences. If the request - # is missing this header, the fallback_location will be used. - # - # redirect_back_or_to({ action: "show", id: 5 }) - # redirect_back_or_to @post - # redirect_back_or_to "http://www.rubyonrails.org" - # redirect_back_or_to "/images/screenshot.jpg" - # redirect_back_or_to posts_url - # redirect_back_or_to proc { edit_post_url(@post) } - # redirect_back_or_to '/', allow_other_host: false - # - # ==== Options - # * :allow_other_host - Allow or disallow redirection to the host that is different to the current host, defaults to true. - # - # All other options that can be passed to #redirect_to are accepted as - # options, and the behavior is identical. - # - # source://actionpack//lib/action_controller/metal/redirecting.rb#127 - def redirect_back_or_to(fallback_location, allow_other_host: T.unsafe(nil), **options); end - - # Redirects the browser to the target specified in +options+. This parameter can be any one of: - # - # * Hash - The URL will be generated by calling url_for with the +options+. - # * Record - The URL will be generated by calling url_for with the +options+, which will reference a named URL for that record. - # * String starting with protocol:// (like http://) or a protocol relative reference (like //) - Is passed straight through as the target for redirection. - # * String not containing a protocol - The current protocol and host is prepended to the string. - # * Proc - A block that will be executed in the controller's context. Should return any option accepted by +redirect_to+. - # - # === Examples: - # - # redirect_to action: "show", id: 5 - # redirect_to @post - # redirect_to "http://www.rubyonrails.org" - # redirect_to "/images/screenshot.jpg" - # redirect_to posts_url - # redirect_to proc { edit_post_url(@post) } - # - # The redirection happens as a 302 Found header unless otherwise specified using the :status option: - # - # redirect_to post_url(@post), status: :found - # redirect_to action: 'atom', status: :moved_permanently - # redirect_to post_url(@post), status: 301 - # redirect_to action: 'atom', status: 302 - # - # The status code can either be a standard {HTTP Status code}[https://www.iana.org/assignments/http-status-codes] as an - # integer, or a symbol representing the downcased, underscored and symbolized description. - # Note that the status code must be a 3xx HTTP code, or redirection will not occur. - # - # If you are using XHR requests other than GET or POST and redirecting after the - # request then some browsers will follow the redirect using the original request - # method. This may lead to undesirable behavior such as a double DELETE. To work - # around this you can return a 303 See Other status code which will be - # followed using a GET request. - # - # redirect_to posts_url, status: :see_other - # redirect_to action: 'index', status: 303 - # - # It is also possible to assign a flash message as part of the redirection. There are two special accessors for the commonly used flash names - # +alert+ and +notice+ as well as a general purpose +flash+ bucket. - # - # redirect_to post_url(@post), alert: "Watch it, mister!" - # redirect_to post_url(@post), status: :found, notice: "Pay attention to the road" - # redirect_to post_url(@post), status: 301, flash: { updated_post_id: @post.id } - # redirect_to({ action: 'atom' }, alert: "Something serious happened") - # - # Statements after +redirect_to+ in our controller get executed, so +redirect_to+ doesn't stop the execution of the function. - # To terminate the execution of the function immediately after the +redirect_to+, use return. - # - # redirect_to post_url(@post) and return - # - # === Open Redirect protection - # - # By default, Rails protects against redirecting to external hosts for your app's safety, so called open redirects. - # Note: this was a new default in Rails 7.0, after upgrading opt-in by uncommenting the line with +raise_on_open_redirects+ in config/initializers/new_framework_defaults_7_0.rb - # - # Here #redirect_to automatically validates the potentially-unsafe URL: - # - # redirect_to params[:redirect_url] - # - # Raises UnsafeRedirectError in the case of an unsafe redirect. - # - # To allow any external redirects pass allow_other_host: true, though using a user-provided param in that case is unsafe. - # - # redirect_to "https://rubyonrails.org", allow_other_host: true - # - # See #url_from for more information on what an internal and safe URL is, or how to fall back to an alternate redirect URL in the unsafe case. - # - # @raise [ActionControllerError] - # - # source://actionpack//lib/action_controller/metal/redirecting.rb#84 - def redirect_to(options = T.unsafe(nil), response_options = T.unsafe(nil)); end - - # Verifies the passed +location+ is an internal URL that's safe to redirect to and returns it, or nil if not. - # Useful to wrap a params provided redirect URL and fallback to an alternate URL to redirect to: - # - # redirect_to url_from(params[:redirect_url]) || root_url - # - # The +location+ is considered internal, and safe, if it's on the same host as request.host: - # - # # If request.host is example.com: - # url_from("https://example.com/profile") # => "https://example.com/profile" - # url_from("http://example.com/profile") # => "http://example.com/profile" - # url_from("http://evil.com/profile") # => nil - # - # Subdomains are considered part of the host: - # - # # If request.host is on https://example.com or https://app.example.com, you'd get: - # url_from("https://dev.example.com/profile") # => nil - # - # NOTE: there's a similarity with {url_for}[rdoc-ref:ActionDispatch::Routing::UrlFor#url_for], which generates an internal URL from various options from within the app, e.g. url_for(@post). - # However, #url_from is meant to take an external parameter to verify as in url_from(params[:redirect_url]). - # - # source://actionpack//lib/action_controller/metal/redirecting.rb#175 - def url_from(location); end - - private - - # source://actionpack//lib/action_controller/metal/redirecting.rb#181 - def _allow_other_host; end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#195 - def _enforce_open_redirect_protection(location, allow_other_host:); end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#214 - def _ensure_url_is_http_header_safe(url); end - - # source://actionpack//lib/action_controller/metal/redirecting.rb#185 - def _extract_redirect_to_status(options, response_options); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/metal/redirecting.rb#203 - def _url_host_allowed?(url); end - - class << self - # source://actionpack//lib/action_controller/metal/redirecting.rb#136 - def _compute_redirect_to_location(request, options); end - end - - module GeneratedClassMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end - - module GeneratedInstanceMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end -end - -# source://actionpack//lib/action_controller/metal/redirecting.rb#7 -ActionController::Redirecting::ILLEGAL_HEADER_VALUE_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_controller/metal/redirecting.rb#12 -class ActionController::Redirecting::UnsafeRedirectError < ::StandardError; end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#14 -class ActionController::RenderError < ::ActionController::ActionControllerError; end - -# ActionController::Renderer allows you to render arbitrary templates -# without requirement of being in controller actions. -# -# You get a concrete renderer class by invoking ActionController::Base#renderer. -# For example: -# -# ApplicationController.renderer -# -# It allows you to call method #render directly. -# -# ApplicationController.renderer.render template: '...' -# -# You can use this shortcut in a controller, instead of the previous example: -# -# ApplicationController.render template: '...' -# -# #render allows you to use the same options that you can use when rendering in a controller. -# For example: -# -# FooController.render :action, locals: { ... }, assigns: { ... } -# -# The template will be rendered in a Rack environment which is accessible through -# ActionController::Renderer#env. You can set it up in two ways: -# -# * by changing renderer defaults, like -# -# ApplicationController.renderer.defaults # => hash with default Rack environment -# -# * by initializing an instance of renderer by passing it a custom environment. -# -# ApplicationController.renderer.new(method: 'post', https: true) -# -# source://actionpack//lib/action_controller/renderer.rb#36 -class ActionController::Renderer - # Accepts a custom Rack environment to render templates in. - # It will be merged with the default Rack environment defined by - # +ActionController::Renderer::DEFAULTS+. - # - # @return [Renderer] a new instance of Renderer - # - # source://actionpack//lib/action_controller/renderer.rb#65 - def initialize(controller, env, defaults); end - - # Returns the value of attribute controller. - # - # source://actionpack//lib/action_controller/renderer.rb#37 - def controller; end - - # Returns the value of attribute defaults. - # - # source://actionpack//lib/action_controller/renderer.rb#37 - def defaults; end - - # Create a new renderer for the same controller but with a new env. - # - # source://actionpack//lib/action_controller/renderer.rb#53 - def new(env = T.unsafe(nil)); end - - # Renders a template to a string, just like ActionController::Rendering#render_to_string. - # - # source://actionpack//lib/action_controller/renderer.rb#72 - def render(*args); end - - # Renders a template to a string, just like ActionController::Rendering#render_to_string. - # - # source://actionpack//lib/action_controller/renderer.rb#72 - def render_to_string(*args); end - - # Create a new renderer for the same controller but with new defaults. - # - # source://actionpack//lib/action_controller/renderer.rb#58 - def with_defaults(defaults); end - - private - - # source://actionpack//lib/action_controller/renderer.rb#86 - def normalize_keys(defaults, env); end - - # source://actionpack//lib/action_controller/renderer.rb#107 - def rack_key_for(key); end - - # source://actionpack//lib/action_controller/renderer.rb#111 - def rack_value_for(key, value); end - - class << self - # Create a new renderer instance for a specific controller class. - # - # source://actionpack//lib/action_controller/renderer.rb#48 - def for(controller, env = T.unsafe(nil), defaults = T.unsafe(nil)); end - end -end - -# source://actionpack//lib/action_controller/renderer.rb#39 -ActionController::Renderer::DEFAULTS = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_controller/renderer.rb#99 -ActionController::Renderer::RACK_KEY_TRANSLATION = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_controller/metal/renderers.rb#23 -module ActionController::Renderers - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::Renderers::ClassMethods - - # source://actionpack//lib/action_controller/metal/renderers.rb#144 - def _render_to_body_with_renderer(options); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#170 - def _render_with_renderer_js(js, options); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#155 - def _render_with_renderer_json(json, options); end - - # source://actionpack//lib/action_controller/metal/renderers.rb#175 - def _render_with_renderer_xml(xml, options); end - - # Called by +render+ in AbstractController::Rendering - # which sets the return value as the +response_body+. - # - # If no renderer is found, +super+ returns control to - # ActionView::Rendering.render_to_body, if present. - # - # source://actionpack//lib/action_controller/metal/renderers.rb#140 - def render_to_body(options); end - - class << self - # source://actionpack//lib/action_controller/metal/renderers.rb#90 - def _render_with_renderer_method_name(key); end - - # Adds a new renderer to call within controller actions. - # A renderer is invoked by passing its name as an option to - # AbstractController::Rendering#render. To create a renderer - # pass it a name and a block. The block takes two arguments, the first - # is the value paired with its key and the second is the remaining - # hash of options passed to +render+. - # - # Create a csv renderer: - # - # ActionController::Renderers.add :csv do |obj, options| - # filename = options[:filename] || 'data' - # str = obj.respond_to?(:to_csv) ? obj.to_csv : obj.to_s - # send_data str, type: Mime[:csv], - # disposition: "attachment; filename=#{filename}.csv" - # end - # - # Note that we used Mime[:csv] for the csv mime type as it comes with Rails. - # For a custom renderer, you'll need to register a mime type with - # Mime::Type.register. - # - # To use the csv renderer in a controller action: - # - # def show - # @csvable = Csvable.find(params[:id]) - # respond_to do |format| - # format.html - # format.csv { render csv: @csvable, filename: @csvable.name } - # end - # end - # - # source://actionpack//lib/action_controller/metal/renderers.rb#74 - def add(key, &block); end - - # This method is the opposite of add method. - # - # To remove a csv renderer: - # - # ActionController::Renderers.remove(:csv) - # - # source://actionpack//lib/action_controller/metal/renderers.rb#84 - def remove(key); end - end - - module GeneratedClassMethods - def _renderers; end - def _renderers=(value); end - def _renderers?; end - end - - module GeneratedInstanceMethods - def _renderers; end - def _renderers=(value); end - def _renderers?; end - end -end - -# Used in ActionController::Base and ActionController::API to include all -# renderers by default. -# -# source://actionpack//lib/action_controller/metal/renderers.rb#36 -module ActionController::Renderers::All - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActionController::Renderers - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActionController::Renderers::ClassMethods - - module GeneratedClassMethods - def _renderers; end - def _renderers=(value); end - def _renderers?; end - end - - module GeneratedInstanceMethods - def _renderers; end - def _renderers=(value); end - def _renderers?; end - end -end - -# source://actionpack//lib/action_controller/metal/renderers.rb#94 -module ActionController::Renderers::ClassMethods - # Adds, by name, a renderer or renderers to the +_renderers+ available - # to call within controller actions. - # - # It is useful when rendering from an ActionController::Metal controller or - # otherwise to add an available renderer proc to a specific controller. - # - # Both ActionController::Base and ActionController::API - # include ActionController::Renderers::All, making all renderers - # available in the controller. See Renderers::RENDERERS and Renderers.add. - # - # Since ActionController::Metal controllers cannot render, the controller - # must include AbstractController::Rendering, ActionController::Rendering, - # and ActionController::Renderers, and have at least one renderer. - # - # Rather than including ActionController::Renderers::All and including all renderers, - # you may specify which renderers to include by passing the renderer name or names to - # +use_renderers+. For example, a controller that includes only the :json renderer - # (+_render_with_renderer_json+) might look like: - # - # class MetalRenderingController < ActionController::Metal - # include AbstractController::Rendering - # include ActionController::Rendering - # include ActionController::Renderers - # - # use_renderers :json - # - # def show - # render json: record - # end - # end - # - # You must specify a +use_renderer+, else the +controller.renderer+ and - # +controller._renderers+ will be nil, and the action will fail. - # - # source://actionpack//lib/action_controller/metal/renderers.rb#128 - def use_renderer(*args); end - - # Adds, by name, a renderer or renderers to the +_renderers+ available - # to call within controller actions. - # - # It is useful when rendering from an ActionController::Metal controller or - # otherwise to add an available renderer proc to a specific controller. - # - # Both ActionController::Base and ActionController::API - # include ActionController::Renderers::All, making all renderers - # available in the controller. See Renderers::RENDERERS and Renderers.add. - # - # Since ActionController::Metal controllers cannot render, the controller - # must include AbstractController::Rendering, ActionController::Rendering, - # and ActionController::Renderers, and have at least one renderer. - # - # Rather than including ActionController::Renderers::All and including all renderers, - # you may specify which renderers to include by passing the renderer name or names to - # +use_renderers+. For example, a controller that includes only the :json renderer - # (+_render_with_renderer_json+) might look like: - # - # class MetalRenderingController < ActionController::Metal - # include AbstractController::Rendering - # include ActionController::Rendering - # include ActionController::Renderers - # - # use_renderers :json - # - # def show - # render json: record - # end - # end - # - # You must specify a +use_renderer+, else the +controller.renderer+ and - # +controller._renderers+ will be nil, and the action will fail. - # - # source://actionpack//lib/action_controller/metal/renderers.rb#128 - def use_renderers(*args); end -end - -# A Set containing renderer names that correspond to available renderer procs. -# Default values are :json, :js, :xml. -# -# source://actionpack//lib/action_controller/metal/renderers.rb#28 -ActionController::Renderers::RENDERERS = T.let(T.unsafe(nil), Set) - -# source://actionpack//lib/action_controller/metal/rendering.rb#4 -module ActionController::Rendering - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionController::Rendering::ClassMethods - - # Renders a template and assigns the result to +self.response_body+. - # - # If no rendering mode option is specified, the template will be derived - # from the first argument. - # - # render "posts/show" - # # => renders app/views/posts/show.html.erb - # - # # In a PostsController action... - # render :show - # # => renders app/views/posts/show.html.erb - # - # If the first argument responds to +render_in+, the template will be - # rendered by calling +render_in+ with the current view context. - # - # ==== \Rendering Mode - # - # [+:partial+] - # See ActionView::PartialRenderer for details. - # - # render partial: "posts/form", locals: { post: Post.new } - # # => renders app/views/posts/_form.html.erb - # - # [+:file+] - # Renders the contents of a file. This option should not be used - # with unsanitized user input. - # - # render file: "/path/to/some/file" - # # => renders /path/to/some/file - # - # [+:inline+] - # Renders an ERB template string. - # - # @name = "World" - # render inline: "

Hello, <%= @name %>!

" - # # => renders "

Hello, World!

" - # - # [+:body+] - # Renders the provided text, and sets the content type as +text/plain+. - # - # render body: "Hello, World!" - # # => renders "Hello, World!" - # - # [+:plain+] - # Renders the provided text, and sets the content type as +text/plain+. - # - # render plain: "Hello, World!" - # # => renders "Hello, World!" - # - # [+:html+] - # Renders the provided HTML string, and sets the content type as +text/html+. - # If the string is not +html_safe?+, performs HTML escaping on the string - # before rendering. - # - # render html: "

Hello, World!

".html_safe - # # => renders "

Hello, World!

" - # - # render html: "

Hello, World!

" - # # => renders "<h1>Hello, World!</h1>" - # - # [+:json+] - # Renders the provided object as JSON, and sets the content type as - # +application/json+. If the object is not a string, it will be converted - # to JSON by calling +to_json+. - # - # render json: { hello: "world" } - # # => renders "{\"hello\":\"world\"}" - # - # By default, when a rendering mode is specified, no layout template is - # rendered. - # - # ==== Options - # - # [+:assigns+] - # Hash of instance variable assignments for the template. - # - # render inline: "

Hello, <%= @name %>!

", assigns: { name: "World" } - # # => renders "

Hello, World!

" - # - # [+:locals+] - # Hash of local variable assignments for the template. - # - # render inline: "

Hello, <%= name %>!

", locals: { name: "World" } - # # => renders "

Hello, World!

" - # - # [+:layout+] - # The layout template to render. Can also be +false+ or +true+ to disable - # or (re)enable the default layout template. - # - # render "posts/show", layout: "holiday" - # # => renders app/views/posts/show.html.erb with the app/views/layouts/holiday.html.erb layout - # - # render "posts/show", layout: false - # # => renders app/views/posts/show.html.erb with no layout - # - # render inline: "

Hello, World!

", layout: true - # # => renders "

Hello, World!

" with the default layout - # - # [+:status+] - # The HTTP status code to send with the response. Can be specified as a - # number or as the status name in Symbol form. Defaults to 200. - # - # render "posts/new", status: 422 - # # => renders app/views/posts/new.html.erb with HTTP status code 422 - # - # render "posts/new", status: :unprocessable_entity - # # => renders app/views/posts/new.html.erb with HTTP status code 422 - # - # -- - # Check for double render errors and set the content_type after rendering. - # - # @raise [::AbstractController::DoubleRenderError] - # - # source://actionpack//lib/action_controller/metal/rendering.rb#137 - def render(*args); end - - # source://actionpack//lib/action_controller/metal/rendering.rb#157 - def render_to_body(options = T.unsafe(nil)); end - - # Similar to #render, but only returns the rendered template as a string, - # instead of setting +self.response_body+. - # -- - # Override render_to_string because body can now be set to a Rack body. - # - # source://actionpack//lib/action_controller/metal/rendering.rb#146 - def render_to_string(*_arg0); end - - private - - # Normalize arguments by catching blocks and setting them on :update. - # - # source://actionpack//lib/action_controller/metal/rendering.rb#199 - def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil), &blk); end - - # Normalize both text and status options. - # - # source://actionpack//lib/action_controller/metal/rendering.rb#206 - def _normalize_options(options); end - - # source://actionpack//lib/action_controller/metal/rendering.rb#220 - def _normalize_text(options); end - - # Process controller specific options, as status, content-type and location. - # - # source://actionpack//lib/action_controller/metal/rendering.rb#229 - def _process_options(options); end - - # source://actionpack//lib/action_controller/metal/rendering.rb#168 - def _process_variant(options); end - - # source://actionpack//lib/action_controller/metal/rendering.rb#174 - def _render_in_priorities(options); end - - # source://actionpack//lib/action_controller/metal/rendering.rb#182 - def _set_html_content_type; end - - # source://actionpack//lib/action_controller/metal/rendering.rb#186 - def _set_rendered_content_type(format); end - - # source://actionpack//lib/action_controller/metal/rendering.rb#192 - def _set_vary_header; end - - # Before processing, set the request formats in current controller formats. - # - # source://actionpack//lib/action_controller/metal/rendering.rb#163 - def process_action(*_arg0); end -end - -# source://actionpack//lib/action_controller/metal/rendering.rb#9 -module ActionController::Rendering::ClassMethods - # source://actionpack//lib/action_controller/metal/rendering.rb#21 - def inherited(klass); end - - # source://actionpack//lib/action_controller/metal/rendering.rb#11 - def render(*_arg0, **_arg1, &_arg2); end - - # Returns a renderer instance (inherited from ActionController::Renderer) - # for the controller. - # - # source://actionpack//lib/action_controller/metal/rendering.rb#15 - def renderer; end - - # source://actionpack//lib/action_controller/metal/rendering.rb#17 - def setup_renderer!; end -end - -# source://actionpack//lib/action_controller/metal/rendering.rb#7 -ActionController::Rendering::RENDER_FORMATS_IN_PRIORITY = T.let(T.unsafe(nil), Array) - -# Controller actions are protected from Cross-Site Request Forgery (CSRF) attacks -# by including a token in the rendered HTML for your application. This token is -# stored as a random string in the session, to which an attacker does not have -# access. When a request reaches your application, \Rails verifies the received -# token with the token in the session. All requests are checked except GET requests -# as these should be idempotent. Keep in mind that all session-oriented requests -# are CSRF protected by default, including JavaScript and HTML requests. -# -# Since HTML and JavaScript requests are typically made from the browser, we -# need to ensure to verify request authenticity for the web browser. We can -# use session-oriented authentication for these types of requests, by using -# the protect_from_forgery method in our controllers. -# -# GET requests are not protected since they don't have side effects like writing -# to the database and don't leak sensitive information. JavaScript requests are -# an exception: a third-party site can use a -# -# The first two characters (">) are required in case the exception happens -# while rendering attributes for a given tag. You can check the real cause -# for the exception in your logger. -# -# == Web server support -# -# Not all web servers support streaming out-of-the-box. You need to check -# the instructions for each of them. -# -# ==== Unicorn -# -# Unicorn supports streaming but it needs to be configured. For this, you -# need to create a config file as follow: -# -# # unicorn.config.rb -# listen 3000, tcp_nopush: false -# -# And use it on initialization: -# -# unicorn_rails --config-file unicorn.config.rb -# -# You may also want to configure other parameters like :tcp_nodelay. -# Please check its documentation for more information: https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-listen -# -# If you are using Unicorn with NGINX, you may need to tweak NGINX. -# Streaming should work out of the box on Rainbows. -# -# ==== Passenger -# -# To be described. -# -# source://actionpack//lib/action_controller/metal/streaming.rb#195 -module ActionController::Streaming - private - - # Set proper cache control and transfer encoding when streaming - # - # source://actionpack//lib/action_controller/metal/streaming.rb#198 - def _process_options(options); end - - # Call render_body if we are streaming instead of usual +render+. - # - # source://actionpack//lib/action_controller/metal/streaming.rb#212 - def _render_template(options); end -end - -# == Strong \Parameters -# -# It provides an interface for protecting attributes from end-user -# assignment. This makes Action Controller parameters forbidden -# to be used in Active Model mass assignment until they have been explicitly -# enumerated. -# -# In addition, parameters can be marked as required and flow through a -# predefined raise/rescue flow to end up as a 400 Bad Request with no -# effort. -# -# class PeopleController < ActionController::Base -# # Using "Person.create(params[:person])" would raise an -# # ActiveModel::ForbiddenAttributesError exception because it'd -# # be using mass assignment without an explicit permit step. -# # This is the recommended form: -# def create -# Person.create(person_params) -# end -# -# # This will pass with flying colors as long as there's a person key in the -# # parameters, otherwise it'll raise an ActionController::ParameterMissing -# # exception, which will get caught by ActionController::Base and turned -# # into a 400 Bad Request reply. -# def update -# redirect_to current_account.people.find(params[:id]).tap { |person| -# person.update!(person_params) -# } -# end -# -# private -# # Using a private method to encapsulate the permissible parameters is -# # a good pattern since you'll be able to reuse the same permit -# # list between create and update. Also, you can specialize this method -# # with per-user checking of permissible attributes. -# def person_params -# params.require(:person).permit(:name, :age) -# end -# end -# -# In order to use accepts_nested_attributes_for with Strong \Parameters, you -# will need to specify which nested attributes should be permitted. You might want -# to allow +:id+ and +:_destroy+, see ActiveRecord::NestedAttributes for more information. -# -# class Person -# has_many :pets -# accepts_nested_attributes_for :pets -# end -# -# class PeopleController < ActionController::Base -# def create -# Person.create(person_params) -# end -# -# ... -# -# private -# -# def person_params -# # It's mandatory to specify the nested attributes that should be permitted. -# # If you use `permit` with just the key that points to the nested attributes hash, -# # it will return an empty hash. -# params.require(:person).permit(:name, :age, pets_attributes: [ :id, :name, :category ]) -# end -# end -# -# See ActionController::Parameters.require and ActionController::Parameters.permit -# for more information. -# -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1198 -module ActionController::StrongParameters - # Returns a new ActionController::Parameters object that - # has been instantiated with the request.parameters. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1201 - def params; end - - # Assigns the given +value+ to the +params+ hash. If +value+ - # is a Hash, this will create an ActionController::Parameters - # object that has been instantiated with the given +value+ hash. - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1216 - def params=(value); end -end - -# source://actionpack//lib/action_controller/template_assertions.rb#4 -module ActionController::TemplateAssertions - # @raise [NoMethodError] - # - # source://actionpack//lib/action_controller/template_assertions.rb#5 - def assert_template(options = T.unsafe(nil), message = T.unsafe(nil)); end -end - -# Superclass for ActionController functional tests. Functional tests allow you to -# test a single controller action per test method. -# -# == Use integration style controller tests over functional style controller tests. -# -# Rails discourages the use of functional tests in favor of integration tests -# (use ActionDispatch::IntegrationTest). -# -# New Rails applications no longer generate functional style controller tests and they should -# only be used for backward compatibility. Integration style controller tests perform actual -# requests, whereas functional style controller tests merely simulate a request. Besides, -# integration tests are as fast as functional tests and provide lot of helpers such as +as+, -# +parsed_body+ for effective testing of controller actions including even API endpoints. -# -# == Basic example -# -# Functional tests are written as follows: -# 1. First, one uses the +get+, +post+, +patch+, +put+, +delete+, or +head+ method to simulate -# an HTTP request. -# 2. Then, one asserts whether the current state is as expected. "State" can be anything: -# the controller's HTTP response, the database contents, etc. -# -# For example: -# -# class BooksControllerTest < ActionController::TestCase -# def test_create -# # Simulate a POST response with the given HTTP parameters. -# post(:create, params: { book: { title: "Love Hina" }}) -# -# # Asserts that the controller tried to redirect us to -# # the created book's URI. -# assert_response :found -# -# # Asserts that the controller really put the book in the database. -# assert_not_nil Book.find_by(title: "Love Hina") -# end -# end -# -# You can also send a real document in the simulated HTTP request. -# -# def test_create -# json = {book: { title: "Love Hina" }}.to_json -# post :create, body: json -# end -# -# == Special instance variables -# -# ActionController::TestCase will also automatically provide the following instance -# variables for use in the tests: -# -# @controller:: -# The controller instance that will be tested. -# @request:: -# An ActionController::TestRequest, representing the current HTTP -# request. You can modify this object before sending the HTTP request. For example, -# you might want to set some session properties before sending a GET request. -# @response:: -# An ActionDispatch::TestResponse object, representing the response -# of the last HTTP response. In the above example, @response becomes valid -# after calling +post+. If the various assert methods are not sufficient, then you -# may use this object to inspect the HTTP response in detail. -# -# == Controller is automatically inferred -# -# ActionController::TestCase will automatically infer the controller under test -# from the test class name. If the controller cannot be inferred from the test -# class name, you can explicitly set it with +tests+. -# -# class SpecialEdgeCaseWidgetsControllerTest < ActionController::TestCase -# tests WidgetController -# end -# -# == \Testing controller internals -# -# In addition to these specific assertions, you also have easy access to various collections that the regular test/unit assertions -# can be used against. These collections are: -# -# * session: Objects being saved in the session. -# * flash: The flash objects currently in the session. -# * cookies: \Cookies being sent to the user on this request. -# -# These collections can be used just like any other hash: -# -# assert_equal "Dave", cookies[:name] # makes sure that a cookie called :name was set as "Dave" -# assert flash.empty? # makes sure that there's nothing in the flash -# -# On top of the collections, you have the complete URL that a given action redirected to available in redirect_to_url. -# -# For redirects within the same controller, you can even call follow_redirect and the redirect will be followed, triggering another -# action call which can then be asserted against. -# -# == Manipulating session and cookie variables -# -# Sometimes you need to set up the session and cookie variables for a test. -# To do this just assign a value to the session or cookie collection: -# -# session[:key] = "value" -# cookies[:key] = "value" -# -# To clear the cookies for a test just clear the cookie collection: -# -# cookies.clear -# -# == \Testing named routes -# -# If you're using named routes, they can be easily tested using the original named routes' methods straight in the test case. -# -# assert_redirected_to page_url(title: 'foo') -# -# source://actionpack//lib/action_controller/test_case.rb#335 -class ActionController::TestCase < ::ActiveSupport::TestCase - include ::ActiveSupport::Testing::ConstantLookup - include ::ActionDispatch::TestProcess::FixtureFile - include ::ActionDispatch::TestProcess - include ::ActionDispatch::Assertions::ResponseAssertions - include ::ActionDispatch::Assertions::RoutingAssertions - include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions - include ::Rails::Dom::Testing::Assertions - include ::ActionController::TestCase::Behavior - include ::ActionController::TemplateAssertions - include ::ActionDispatch::Assertions - extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods - extend ::ActionController::TestCase::Behavior::ClassMethods - - # source://actionpack//lib/action_controller/test_case.rb#561 - def _controller_class; end - - # source://actionpack//lib/action_controller/test_case.rb#561 - def _controller_class=(_arg0); end - - # source://actionpack//lib/action_controller/test_case.rb#561 - def _controller_class?; end - - class << self - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack//lib/action_controller/test_case.rb#561 - def _controller_class; end - - # source://actionpack//lib/action_controller/test_case.rb#561 - def _controller_class=(value); end - - # source://actionpack//lib/action_controller/test_case.rb#561 - def _controller_class?; end - - # source://actionpack//lib/action_controller/test_case.rb#336 - def executor_around_each_request; end - - # source://actionpack//lib/action_controller/test_case.rb#336 - def executor_around_each_request=(_arg0); end - end -end - -# source://actionpack//lib/action_controller/test_case.rb#338 -module ActionController::TestCase::Behavior - include ::ActionDispatch::TestProcess::FixtureFile - include ::ActionDispatch::TestProcess - include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions - include ::Rails::Dom::Testing::Assertions - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Testing::ConstantLookup - include ::ActionController::TemplateAssertions - include ::ActionDispatch::Assertions - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods - mixes_in_class_methods ::ActionController::TestCase::Behavior::ClassMethods - - # source://actionpack//lib/action_controller/test_case.rb#554 - def build_response(klass); end - - # source://actionpack//lib/action_controller/test_case.rb#514 - def controller_class_name; end - - # Simulate a DELETE request with the given parameters and set/volley the response. - # See +get+ for more details. - # - # source://actionpack//lib/action_controller/test_case.rb#429 - def delete(action, **args); end - - # source://actionpack//lib/action_controller/test_case.rb#518 - def generated_path(generated_extras); end - - # Simulate a GET request with the given parameters. - # - # - +action+: The controller action to call. - # - +params+: The hash with HTTP parameters that you want to pass. This may be +nil+. - # - +body+: The request body with a string that is appropriately encoded - # (application/x-www-form-urlencoded or multipart/form-data). - # - +session+: A hash of parameters to store in the session. This may be +nil+. - # - +flash+: A hash of parameters to store in the flash. This may be +nil+. - # - # You can also simulate POST, PATCH, PUT, DELETE, and HEAD requests with - # +post+, +patch+, +put+, +delete+, and +head+. - # Example sending parameters, session, and setting a flash message: - # - # get :show, - # params: { id: 7 }, - # session: { user_id: 1 }, - # flash: { notice: 'This is flash message' } - # - # Note that the request method is not verified. The different methods are - # available to make the tests more expressive. - # - # source://actionpack//lib/action_controller/test_case.rb#403 - def get(action, **args); end - - # Simulate a HEAD request with the given parameters and set/volley the response. - # See +get+ for more details. - # - # source://actionpack//lib/action_controller/test_case.rb#435 - def head(action, **args); end - - # Simulate a PATCH request with the given parameters and set/volley the response. - # See +get+ for more details. - # - # source://actionpack//lib/action_controller/test_case.rb#417 - def patch(action, **args); end - - # Simulate a POST request with the given parameters and set/volley the response. - # See +get+ for more details. - # - # source://actionpack//lib/action_controller/test_case.rb#411 - def post(action, **args); end - - # Simulate an HTTP request to +action+ by specifying request method, - # parameters and set/volley the response. - # - # - +action+: The controller action to call. - # - +method+: Request method used to send the HTTP request. Possible values - # are +GET+, +POST+, +PATCH+, +PUT+, +DELETE+, +HEAD+. Defaults to +GET+. Can be a symbol. - # - +params+: The hash with HTTP parameters that you want to pass. This may be +nil+. - # - +body+: The request body with a string that is appropriately encoded - # (application/x-www-form-urlencoded or multipart/form-data). - # - +session+: A hash of parameters to store in the session. This may be +nil+. - # - +flash+: A hash of parameters to store in the flash. This may be +nil+. - # - +format+: Request format. Defaults to +nil+. Can be string or symbol. - # - +as+: Content type. Defaults to +nil+. Must be a symbol that corresponds - # to a mime type. - # - # Example calling +create+ action and sending two params: - # - # process :create, - # method: 'POST', - # params: { - # user: { name: 'Gaurish Sharma', email: 'user@example.com' } - # }, - # session: { user_id: 1 }, - # flash: { notice: 'This is flash message' } - # - # To simulate +GET+, +POST+, +PATCH+, +PUT+, +DELETE+, and +HEAD+ requests - # prefer using #get, #post, #patch, #put, #delete and #head methods - # respectively which will make tests more expressive. - # - # It's not recommended to make more than one request in the same test. Instance - # variables that are set in one request will not persist to the next request, - # but it's not guaranteed that all Rails internal state will be reset. Prefer - # ActionDispatch::IntegrationTest for making multiple requests in the same test. - # - # Note that the request method is not verified. - # - # source://actionpack//lib/action_controller/test_case.rb#474 - def process(action, method: T.unsafe(nil), params: T.unsafe(nil), session: T.unsafe(nil), body: T.unsafe(nil), flash: T.unsafe(nil), format: T.unsafe(nil), xhr: T.unsafe(nil), as: T.unsafe(nil)); end - - # Simulate a PUT request with the given parameters and set/volley the response. - # See +get+ for more details. - # - # source://actionpack//lib/action_controller/test_case.rb#423 - def put(action, **args); end - - # source://actionpack//lib/action_controller/test_case.rb#522 - def query_parameter_names(generated_extras); end - - # Returns the value of attribute request. - # - # source://actionpack//lib/action_controller/test_case.rb#344 - def request; end - - # Returns the value of attribute response. - # - # source://actionpack//lib/action_controller/test_case.rb#344 - def response; end - - # source://actionpack//lib/action_controller/test_case.rb#526 - def setup_controller_request_and_response; end - - private - - # source://actionpack//lib/action_controller/test_case.rb#646 - def check_required_ivars; end - - # source://actionpack//lib/action_controller/test_case.rb#642 - def document_root_element; end - - # source://actionpack//lib/action_controller/test_case.rb#597 - def process_controller_response(action, cookies, xhr); end - - # source://actionpack//lib/action_controller/test_case.rb#632 - def scrub_env!(env); end - - # source://actionpack//lib/action_controller/test_case.rb#567 - def setup_request(controller_class_name, action, parameters, session, flash, xhr); end - - # source://actionpack//lib/action_controller/test_case.rb#589 - def wrap_execution(&block); end - - module GeneratedClassMethods - def _controller_class; end - def _controller_class=(value); end - def _controller_class?; end - end - - module GeneratedInstanceMethods - def _controller_class; end - def _controller_class=(value); end - def _controller_class?; end - end -end - -# source://actionpack//lib/action_controller/test_case.rb#346 -module ActionController::TestCase::Behavior::ClassMethods - # source://actionpack//lib/action_controller/test_case.rb#368 - def controller_class; end - - # source://actionpack//lib/action_controller/test_case.rb#364 - def controller_class=(new_class); end - - # source://actionpack//lib/action_controller/test_case.rb#376 - def determine_default_controller_class(name); end - - # Sets the controller class name. Useful if the name can't be inferred from test class. - # Normalizes +controller_class+ before using. - # - # tests WidgetController - # tests :widget - # tests 'widget' - # - # source://actionpack//lib/action_controller/test_case.rb#353 - def tests(controller_class); end -end - -# ActionController::TestCase will be deprecated and moved to a gem in the future. -# Please use ActionDispatch::IntegrationTest going forward. -# -# source://actionpack//lib/action_controller/test_case.rb#34 -class ActionController::TestRequest < ::ActionDispatch::TestRequest - # @return [TestRequest] a new instance of TestRequest - # - # source://actionpack//lib/action_controller/test_case.rb#57 - def initialize(env, session, controller_class); end - - # source://actionpack//lib/action_controller/test_case.rb#76 - def assign_parameters(routes, controller_path, action, parameters, generated_path, query_string_keys); end - - # source://actionpack//lib/action_controller/test_case.rb#72 - def content_type=(type); end - - # Returns the value of attribute controller_class. - # - # source://actionpack//lib/action_controller/test_case.rb#42 - def controller_class; end - - # source://actionpack//lib/action_controller/test_case.rb#68 - def query_string=(string); end - - private - - # source://actionpack//lib/action_controller/test_case.rb#164 - def params_parsers; end - - class << self - # Create a new test request with default `env` values. - # - # source://actionpack//lib/action_controller/test_case.rb#45 - def create(controller_class); end - - # source://actionpack//lib/action_controller/test_case.rb#38 - def new_session; end - - private - - # source://actionpack//lib/action_controller/test_case.rb#52 - def default_env; end - end -end - -# source://actionpack//lib/action_controller/test_case.rb#35 -ActionController::TestRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_controller/test_case.rb#136 -ActionController::TestRequest::ENCODER = T.let(T.unsafe(nil), T.untyped) - -# Methods #destroy and #load! are overridden to avoid calling methods on the -# -# source://actionpack//lib/action_controller/test_case.rb#182 -class ActionController::TestSession < ::Rack::Session::Abstract::PersistedSecure::SecureSessionHash - # @return [TestSession] a new instance of TestSession - # - # source://actionpack//lib/action_controller/test_case.rb#185 - def initialize(session = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/test_case.rb#204 - def destroy; end - - # source://actionpack//lib/action_controller/test_case.rb#208 - def dig(*keys); end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/test_case.rb#217 - def enabled?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_controller/test_case.rb#192 - def exists?; end - - # source://actionpack//lib/action_controller/test_case.rb#213 - def fetch(key, *args, &block); end - - # source://actionpack//lib/action_controller/test_case.rb#196 - def keys; end - - # source://actionpack//lib/action_controller/test_case.rb#200 - def values; end - - private - - # source://actionpack//lib/action_controller/test_case.rb#222 - def load!; end -end - -# source://actionpack//lib/action_controller/test_case.rb#183 -ActionController::TestSession::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_controller/metal/testing.rb#4 -module ActionController::Testing; end - -# Behavior specific to functional tests -# -# source://actionpack//lib/action_controller/metal/testing.rb#6 -module ActionController::Testing::Functional - # source://actionpack//lib/action_controller/metal/testing.rb#7 - def clear_instance_variables_between_requests; end - - # source://actionpack//lib/action_controller/metal/testing.rb#16 - def recycle!; end -end - -# Raised when a Parameters instance is not marked as permitted and -# an operation to transform it to hash is called. -# -# params = ActionController::Parameters.new(a: "123", b: "456") -# params.to_h -# # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash -# -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#61 -class ActionController::UnfilteredParameters < ::ArgumentError - # @return [UnfilteredParameters] a new instance of UnfilteredParameters - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#62 - def initialize; end -end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#73 -class ActionController::UnknownFormat < ::ActionController::ActionControllerError; end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#70 -class ActionController::UnknownHttpMethod < ::ActionController::ActionControllerError; end - -# Raised when a supplied parameter is not expected and -# ActionController::Parameters.action_on_unpermitted_parameters -# is set to :raise. -# -# params = ActionController::Parameters.new(a: "123", b: "456") -# params.permit(:c) -# # => ActionController::UnpermittedParameters: found unpermitted parameters: :a, :b -# -# source://actionpack//lib/action_controller/metal/strong_parameters.rb#46 -class ActionController::UnpermittedParameters < ::IndexError - # @return [UnpermittedParameters] a new instance of UnpermittedParameters - # - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#49 - def initialize(params); end - - # source://actionpack//lib/action_controller/metal/strong_parameters.rb#47 - def params; end -end - -# Includes +url_for+ into the host class. The class has to provide a +RouteSet+ by implementing -# the _routes method. Otherwise, an exception will be raised. -# -# In addition to AbstractController::UrlFor, this module accesses the HTTP layer to define -# URL options like the +host+. In order to do so, this module requires the host class -# to implement +env+ which needs to be Rack-compatible, and +request+ which -# returns an ActionDispatch::Request instance. -# -# class RootUrl -# include ActionController::UrlFor -# include Rails.application.routes.url_helpers -# -# delegate :env, :request, to: :controller -# -# def initialize(controller) -# @controller = controller -# @url = root_path # named route from the application. -# end -# end -# -# source://actionpack//lib/action_controller/metal/url_for.rb#23 -module ActionController::UrlFor - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActionDispatch::Routing::UrlFor - include ::AbstractController::UrlFor - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods - - # source://actionpack//lib/action_controller/metal/url_for.rb#28 - def url_options; end - - module GeneratedClassMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end - - module GeneratedInstanceMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end -end - -# source://actionpack//lib/action_controller/metal/exceptions.rb#25 -class ActionController::UrlGenerationError < ::ActionController::ActionControllerError - include ::DidYouMean::Correctable - - # @return [UrlGenerationError] a new instance of UrlGenerationError - # - # source://actionpack//lib/action_controller/metal/exceptions.rb#28 - def initialize(message, routes = T.unsafe(nil), route_name = T.unsafe(nil), method_name = T.unsafe(nil)); end - - # source://actionpack//lib/action_controller/metal/exceptions.rb#39 - def corrections; end - - # Returns the value of attribute method_name. - # - # source://actionpack//lib/action_controller/metal/exceptions.rb#26 - def method_name; end - - # Returns the value of attribute route_name. - # - # source://actionpack//lib/action_controller/metal/exceptions.rb#26 - def route_name; end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_controller/metal/exceptions.rb#26 - def routes; end -end - -# source://actionpack//lib/action_dispatch.rb#37 -module ActionDispatch - extend ::ActiveSupport::Autoload - - # source://actionpack//lib/action_dispatch.rb#99 - def test_app; end - - # source://actionpack//lib/action_dispatch.rb#99 - def test_app=(val); end - - class << self - # source://actionpack//lib/action_dispatch.rb#99 - def test_app; end - - # source://actionpack//lib/action_dispatch.rb#99 - def test_app=(val); end - end -end - -# source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#8 -class ActionDispatch::ActionableExceptions - # @return [ActionableExceptions] a new instance of ActionableExceptions - # - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#11 - def initialize(app); end - - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#15 - def call(env); end - - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 - def endpoint; end - - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 - def endpoint=(val); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#25 - def actionable_request?(request); end - - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#29 - def redirect_to(location); end - - class << self - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 - def endpoint; end - - # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 - def endpoint=(val); end - end -end - -# This is a class that abstracts away an asserted response. It purposely -# does not inherit from Response because it doesn't need it. That means it -# does not have headers or a body. -# -# source://actionpack//lib/action_dispatch/testing/assertion_response.rb#7 -class ActionDispatch::AssertionResponse - # Accepts a specific response status code as an Integer (404) or String - # ('404') or a response status range as a Symbol pseudo-code (:success, - # indicating any 200-299 status code). - # - # @raise [ArgumentError] - # @return [AssertionResponse] a new instance of AssertionResponse - # - # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#20 - def initialize(code_or_name); end - - # Returns the value of attribute code. - # - # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#8 - def code; end - - # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#33 - def code_and_name; end - - # Returns the value of attribute name. - # - # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#8 - def name; end - - private - - # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#38 - def code_from_name(name); end - - # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#42 - def name_from_code(code); end -end - -# source://actionpack//lib/action_dispatch/testing/assertion_response.rb#10 -ActionDispatch::AssertionResponse::GENERIC_RESPONSE_CODES = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/testing/assertions/response.rb#4 -module ActionDispatch::Assertions - include ::ActionDispatch::Assertions::ResponseAssertions - include ::ActionDispatch::Assertions::RoutingAssertions - include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions - include ::Rails::Dom::Testing::Assertions - - # source://actionpack//lib/action_dispatch/testing/assertions.rb#13 - def html_document; end -end - -# A small suite of assertions that test responses from \Rails applications. -# -# source://actionpack//lib/action_dispatch/testing/assertions/response.rb#6 -module ActionDispatch::Assertions::ResponseAssertions - # Asserts that the response is a redirect to a URL matching the given options. - # - # # Asserts that the redirection was to the "index" action on the WeblogController - # assert_redirected_to controller: "weblog", action: "index" - # - # # Asserts that the redirection was to the named route login_url - # assert_redirected_to login_url - # - # # Asserts that the redirection was to the URL for @customer - # assert_redirected_to @customer - # - # # Asserts that the redirection matches the regular expression - # assert_redirected_to %r(\Ahttp://example.org) - # - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#53 - def assert_redirected_to(options = T.unsafe(nil), message = T.unsafe(nil)); end - - # Asserts that the response is one of the following types: - # - # * :success - Status code was in the 200-299 range - # * :redirect - Status code was in the 300-399 range - # * :missing - Status code was 404 - # * :error - Status code was in the 500-599 range - # - # You can also pass an explicit status number like assert_response(501) - # or its symbolic equivalent assert_response(:not_implemented). - # See +Rack::Utils::SYMBOL_TO_STATUS_CODE+ for a full list. - # - # # Asserts that the response was a redirection - # assert_response :redirect - # - # # Asserts that the response code was status code 401 (unauthorized) - # assert_response 401 - # - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#30 - def assert_response(type, message = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#95 - def code_with_name(code_or_name); end - - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#79 - def generate_response_message(expected, actual = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#89 - def location_if_redirected; end - - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#70 - def normalize_argument_to_redirection(fragment); end - - # Proxy to to_param if the object will respond to it. - # - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#66 - def parameterize(value); end - - # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#84 - def response_body_if_short; end -end - -# source://actionpack//lib/action_dispatch/testing/assertions/response.rb#7 -ActionDispatch::Assertions::ResponseAssertions::RESPONSE_PREDICATES = T.let(T.unsafe(nil), Hash) - -# Suite of assertions to test routes generated by \Rails and the handling of requests made to them. -# -# source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#11 -module ActionDispatch::Assertions::RoutingAssertions - # Asserts that the provided options can be used to generate the provided path. This is the inverse of +assert_recognizes+. - # The +extras+ parameter is used to tell the request the names and values of additional request parameters that would be in - # a query string. The +message+ parameter allows you to specify a custom error message for assertion failures. - # - # The +defaults+ parameter is unused. - # - # # Asserts that the default action is generated for a route with no action - # assert_generates "/items", controller: "items", action: "index" - # - # # Tests that the list action is properly routed - # assert_generates "/items/list", controller: "items", action: "list" - # - # # Tests the generation of a route with a parameter - # assert_generates "/items/list/1", { controller: "items", action: "list", id: "1" } - # - # # Asserts that the generated route gives us our custom route - # assert_generates "changesets/12", { controller: 'scm', action: 'show_diff', revision: "12" } - # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#85 - def assert_generates(expected_path, options, defaults = T.unsafe(nil), extras = T.unsafe(nil), message = T.unsafe(nil)); end - - # Asserts that the routing of the given +path+ was handled correctly and that the parsed options (given in the +expected_options+ hash) - # match +path+. Basically, it asserts that \Rails recognizes the route given by +expected_options+. - # - # Pass a hash in the second argument (+path+) to specify the request method. This is useful for routes - # requiring a specific HTTP method. The hash should contain a +:path+ with the incoming request path - # and a +:method+ containing the required HTTP verb. - # - # # Asserts that POSTing to /items will call the create action on ItemsController - # assert_recognizes({controller: 'items', action: 'create'}, {path: 'items', method: :post}) - # - # You can also pass in +extras+ with a hash containing URL parameters that would normally be in the query string. This can be used - # to assert that values in the query string will end up in the params hash correctly. To test query strings you must use the extras - # argument because appending the query string on the path directly will not work. For example: - # - # # Asserts that a path of '/items/list/1?view=print' returns the correct options - # assert_recognizes({controller: 'items', action: 'list', id: '1', view: 'print'}, 'items/list/1', { view: "print" }) - # - # The +message+ parameter allows you to pass in an error message that is displayed upon failure. - # - # # Check the default route (i.e., the index action) - # assert_recognizes({controller: 'items', action: 'index'}, 'items') - # - # # Test a specific action - # assert_recognizes({controller: 'items', action: 'list'}, 'items/list') - # - # # Test an action with a parameter - # assert_recognizes({controller: 'items', action: 'destroy', id: '1'}, 'items/destroy/1') - # - # # Test a custom route - # assert_recognizes({controller: 'items', action: 'show', id: '1'}, 'view/item1') - # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#47 - def assert_recognizes(expected_options, path, extras = T.unsafe(nil), msg = T.unsafe(nil)); end - - # Asserts that path and options match both ways; in other words, it verifies that path generates - # options and then that options generates path. This essentially combines +assert_recognizes+ - # and +assert_generates+ into one step. - # - # The +extras+ hash allows you to specify options that would normally be provided as a query string to the action. The - # +message+ parameter allows you to specify a custom error message to display upon failure. - # - # # Asserts a basic route: a controller with the default action (index) - # assert_routing '/home', controller: 'home', action: 'index' - # - # # Test a route generated with a specific controller, action, and parameter (id) - # assert_routing '/entries/show/23', controller: 'entries', action: 'show', id: 23 - # - # # Asserts a basic route (controller + default action), with an error message if it fails - # assert_routing '/store', { controller: 'store', action: 'index' }, {}, {}, 'Route for store index not generated properly' - # - # # Tests a route, providing a defaults hash - # assert_routing 'controller/action/9', {id: "9", item: "square"}, {controller: "controller", action: "action"}, {}, {item: "square"} - # - # # Tests a route with an HTTP method - # assert_routing({ method: 'put', path: '/product/321' }, { controller: "product", action: "update", id: "321" }) - # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#128 - def assert_routing(path, options, defaults = T.unsafe(nil), extras = T.unsafe(nil), message = T.unsafe(nil)); end - - # ROUTES TODO: These assertions should really work in an integration context - # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#183 - def method_missing(selector, *args, **_arg2, &block); end - - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#12 - def setup; end - - # A helper to make it easier to test different route configurations. - # This method temporarily replaces @routes with a new RouteSet instance. - # - # The new instance is yielded to the passed block. Typically the block - # will create some routes using set.draw { match ... }: - # - # with_routing do |set| - # set.draw do - # resources :users - # end - # assert_equal "/users", users_path - # end - # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#153 - def with_routing; end - - private - - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#228 - def fail_on(exception_class, message); end - - # Recognizes the route for a given path. - # - # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#194 - def recognized_request_for(path, extras = T.unsafe(nil), msg); end -end - -# Provides callbacks to be executed before and after dispatching the request. -# -# source://actionpack//lib/action_dispatch/middleware/callbacks.rb#5 -class ActionDispatch::Callbacks - include ::ActiveSupport::Callbacks - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - - # @return [Callbacks] a new instance of Callbacks - # - # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#20 - def initialize(app); end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#940 - def _call_callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#928 - def _run_call_callbacks(&block); end - - # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#24 - def call(env); end - - class << self - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#932 - def _call_callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#936 - def _call_callbacks=(value); end - - # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#15 - def after(*args, &block); end - - # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#11 - def before(*args, &block); end - end -end - -# Configures the HTTP -# {Content-Security-Policy}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy] -# response header to help protect against XSS and injection attacks. -# -# Example global policy: -# -# Rails.application.config.content_security_policy do |policy| -# policy.default_src :self, :https -# policy.font_src :self, :https, :data -# policy.img_src :self, :https, :data -# policy.object_src :none -# policy.script_src :self, :https -# policy.style_src :self, :https -# -# # Specify URI for violation reports -# policy.report_uri "/csp-violation-report-endpoint" -# end -# -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#24 -class ActionDispatch::ContentSecurityPolicy - # @return [ContentSecurityPolicy] a new instance of ContentSecurityPolicy - # @yield [_self] - # @yieldparam _self [ActionDispatch::ContentSecurityPolicy] the object that the method was called on - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#176 - def initialize; end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def base_uri(*sources); end - - # Specify whether to prevent the user agent from loading any assets over - # HTTP when the page uses HTTPS: - # - # policy.block_all_mixed_content - # - # Pass +false+ to allow it again: - # - # policy.block_all_mixed_content false - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#204 - def block_all_mixed_content(enabled = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#293 - def build(context = T.unsafe(nil), nonce = T.unsafe(nil), nonce_directives = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def child_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def connect_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def default_src(*sources); end - - # Returns the value of attribute directives. - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#174 - def directives; end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def font_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def form_action(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def frame_ancestors(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def frame_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def img_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def manifest_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def media_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def object_src(*sources); end - - # Restricts the set of plugins that can be embedded: - # - # policy.plugin_types "application/x-shockwave-flash" - # - # Leave empty to allow all plugins: - # - # policy.plugin_types - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#220 - def plugin_types(*types); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def prefetch_src(*sources); end - - # Enable the {report-uri}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-uri] - # directive. Violation reports will be sent to the specified URI: - # - # policy.report_uri "/csp-violation-report-endpoint" - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#233 - def report_uri(uri); end - - # Specify asset types for which {Subresource Integrity}[https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity] - # is required: - # - # policy.require_sri_for :script, :style - # - # Leave empty to not require Subresource Integrity: - # - # policy.require_sri_for - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#246 - def require_sri_for(*types); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def require_trusted_types_for(*sources); end - - # Specify whether a {sandbox}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/sandbox] - # should be enabled for the requested resource: - # - # policy.sandbox - # - # Values can be passed as arguments: - # - # policy.sandbox "allow-scripts", "allow-modals" - # - # Pass +false+ to disable the sandbox: - # - # policy.sandbox false - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#267 - def sandbox(*values); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def script_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def script_src_attr(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def script_src_elem(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def style_src(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def style_src_attr(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def style_src_elem(*sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def trusted_types(*sources); end - - # Specify whether user agents should treat any assets over HTTP as HTTPS: - # - # policy.upgrade_insecure_requests - # - # Pass +false+ to disable it: - # - # policy.upgrade_insecure_requests false - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#285 - def upgrade_insecure_requests(enabled = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#186 - def worker_src(*sources); end - - private - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#312 - def apply_mapping(source); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#299 - def apply_mappings(sources); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#346 - def build_directive(directive, sources, context); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#318 - def build_directives(context, nonce, nonce_directives); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#181 - def initialize_copy(other); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#370 - def nonce_directive?(directive, nonce_directives); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#352 - def resolve_source(source, context); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#334 - def validate(directive, sources); end -end - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#170 -ActionDispatch::ContentSecurityPolicy::DEFAULT_NONCE_DIRECTIVES = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#145 -ActionDispatch::ContentSecurityPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#25 -class ActionDispatch::ContentSecurityPolicy::InvalidDirectiveError < ::StandardError; end - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#126 -ActionDispatch::ContentSecurityPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#28 -class ActionDispatch::ContentSecurityPolicy::Middleware - # @return [Middleware] a new instance of Middleware - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#33 - def initialize(app); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#37 - def call(env); end - - private - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#58 - def header_name(request); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#66 - def policy_present?(headers); end -end - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#29 -ActionDispatch::ContentSecurityPolicy::Middleware::CONTENT_TYPE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#30 -ActionDispatch::ContentSecurityPolicy::Middleware::POLICY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#31 -ActionDispatch::ContentSecurityPolicy::Middleware::POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#71 -module ActionDispatch::ContentSecurityPolicy::Request - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#78 - def content_security_policy; end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#82 - def content_security_policy=(policy); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#110 - def content_security_policy_nonce; end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#102 - def content_security_policy_nonce_directives; end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#106 - def content_security_policy_nonce_directives=(generator); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#94 - def content_security_policy_nonce_generator; end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#98 - def content_security_policy_nonce_generator=(generator); end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#86 - def content_security_policy_report_only; end - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#90 - def content_security_policy_report_only=(value); end - - private - - # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#121 - def generate_content_security_policy_nonce; end -end - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#75 -ActionDispatch::ContentSecurityPolicy::Request::NONCE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#76 -ActionDispatch::ContentSecurityPolicy::Request::NONCE_DIRECTIVES = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#74 -ActionDispatch::ContentSecurityPolicy::Request::NONCE_GENERATOR = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#72 -ActionDispatch::ContentSecurityPolicy::Request::POLICY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#73 -ActionDispatch::ContentSecurityPolicy::Request::POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) - -# Read and write data to cookies through ActionController::Base#cookies. -# -# When reading cookie data, the data is read from the HTTP request header, Cookie. -# When writing cookie data, the data is sent out in the HTTP response header, +Set-Cookie+. -# -# Examples of writing: -# -# # Sets a simple session cookie. -# # This cookie will be deleted when the user's browser is closed. -# cookies[:user_name] = "david" -# -# # Cookie values are String-based. Other data types need to be serialized. -# cookies[:lat_lon] = JSON.generate([47.68, -122.37]) -# -# # Sets a cookie that expires in 1 hour. -# cookies[:login] = { value: "XJ-122", expires: 1.hour } -# -# # Sets a cookie that expires at a specific time. -# cookies[:login] = { value: "XJ-122", expires: Time.utc(2020, 10, 15, 5) } -# -# # Sets a signed cookie, which prevents users from tampering with its value. -# # It can be read using the signed method `cookies.signed[:name]` -# cookies.signed[:user_id] = current_user.id -# -# # Sets an encrypted cookie value before sending it to the client which -# # prevent users from reading and tampering with its value. -# # It can be read using the encrypted method `cookies.encrypted[:name]` -# cookies.encrypted[:discount] = 45 -# -# # Sets a "permanent" cookie (which expires in 20 years from now). -# cookies.permanent[:login] = "XJ-122" -# -# # You can also chain these methods: -# cookies.signed.permanent[:login] = "XJ-122" -# -# Examples of reading: -# -# cookies[:user_name] # => "david" -# cookies.size # => 2 -# JSON.parse(cookies[:lat_lon]) # => [47.68, -122.37] -# cookies.signed[:login] # => "XJ-122" -# cookies.encrypted[:discount] # => 45 -# -# Example for deleting: -# -# cookies.delete :user_name -# -# Please note that if you specify a +:domain+ when setting a cookie, you must also specify the domain when deleting the cookie: -# -# cookies[:name] = { -# value: 'a yummy cookie', -# expires: 1.year, -# domain: 'domain.com' -# } -# -# cookies.delete(:name, domain: 'domain.com') -# -# The option symbols for setting cookies are: -# -# * :value - The cookie's value. -# * :path - The path for which this cookie applies. Defaults to the root -# of the application. -# * :domain - The domain for which this cookie applies so you can -# restrict to the domain level. If you use a schema like www.example.com -# and want to share session with user.example.com set :domain -# to :all. To support multiple domains, provide an array, and -# the first domain matching request.host will be used. Make -# sure to specify the :domain option with :all or -# Array again when deleting cookies. -# -# domain: nil # Does not set cookie domain. (default) -# domain: :all # Allow the cookie for the top most level -# # domain and subdomains. -# domain: %w(.example.com .example.org) # Allow the cookie -# # for concrete domain names. -# -# * :tld_length - When using :domain => :all, this option can be used to explicitly -# set the TLD length when using a short (<= 3 character) domain that is being interpreted as part of a TLD. -# For example, to share cookies between user1.lvh.me and user2.lvh.me, set :tld_length to 2. -# * :expires - The time at which this cookie expires, as a \Time or ActiveSupport::Duration object. -# * :secure - Whether this cookie is only transmitted to HTTPS servers. -# Default is +false+. -# * :httponly - Whether this cookie is accessible via scripting or -# only HTTP. Defaults to +false+. -# * :same_site - The value of the +SameSite+ cookie attribute, which -# determines how this cookie should be restricted in cross-site contexts. -# Possible values are +:none+, +:lax+, and +:strict+. Defaults to +:lax+. -# -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#182 -class ActionDispatch::Cookies - # @return [Cookies] a new instance of Cookies - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#697 - def initialize(app); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#701 - def call(env); end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#188 -ActionDispatch::Cookies::AUTHENTICATED_ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#485 -class ActionDispatch::Cookies::AbstractCookieJar - include ::ActionDispatch::Cookies::ChainedCookieJars - - # @return [AbstractCookieJar] a new instance of AbstractCookieJar - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#488 - def initialize(parent_jar); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#492 - def [](name); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#504 - def []=(name, options); end - - protected - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#516 - def request; end - - private - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#534 - def commit(name, options); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#527 - def cookie_metadata(name, options); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#519 - def expiry_options(options); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#533 - def parse(name, data, purpose: T.unsafe(nil)); end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#194 -ActionDispatch::Cookies::COOKIES_DIGEST = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#195 -ActionDispatch::Cookies::COOKIES_ROTATIONS = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#196 -ActionDispatch::Cookies::COOKIES_SAME_SITE_PROTECTION = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#193 -ActionDispatch::Cookies::COOKIES_SERIALIZER = T.let(T.unsafe(nil), String) - -# Include in a cookie jar to allow chaining, e.g. +cookies.permanent.signed+. -# -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#206 -module ActionDispatch::Cookies::ChainedCookieJars - # Returns a jar that'll automatically encrypt cookie values before sending them to the client and will decrypt them for read. - # If the cookie was tampered with by the user (or a 3rd party), +nil+ will be returned. - # - # If +config.action_dispatch.encrypted_cookie_salt+ and +config.action_dispatch.encrypted_signed_cookie_salt+ - # are both set, legacy cookies encrypted with HMAC AES-256-CBC will be transparently upgraded. - # - # This jar requires that you set a suitable secret for the verification on your app's +secret_key_base+. - # - # Example: - # - # cookies.encrypted[:discount] = 45 - # # => Set-Cookie: discount=DIQ7fw==--K3n//8vvnSbGq9dA--7Xh91HfLpwzbj1czhBiwOg==; path=/ - # - # cookies.encrypted[:discount] # => 45 - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#252 - def encrypted; end - - # Returns a jar that'll automatically set the assigned cookies to have an expiration date 20 years from now. Example: - # - # cookies.permanent[:prefers_open_id] = true - # # => Set-Cookie: prefers_open_id=true; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT - # - # This jar is only meant for writing. You'll read permanent cookies through the regular accessor. - # - # This jar allows chaining with the signed jar as well, so you can set permanent, signed cookies. Examples: - # - # cookies.permanent.signed[:remember_me] = current_user.id - # # => Set-Cookie: remember_me=BAhU--848956038e692d7046deab32b7131856ab20e14e; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#218 - def permanent; end - - # Returns a jar that'll automatically generate a signed representation of cookie value and verify it when reading from - # the cookie again. This is useful for creating cookies with values that the user is not supposed to change. If a signed - # cookie was tampered with by the user (or a 3rd party), +nil+ will be returned. - # - # This jar requires that you set a suitable secret for the verification on your app's +secret_key_base+. - # - # Example: - # - # cookies.signed[:discount] = 45 - # # => Set-Cookie: discount=BAhpMg==--2c1c6906c90a3bc4fd54a51ffb41dffa4bf6b5f7; path=/ - # - # cookies.signed[:discount] # => 45 - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#234 - def signed; end - - # Returns the +signed+ or +encrypted+ jar, preferring +encrypted+ if +secret_key_base+ is set. - # Used by ActionDispatch::Session::CookieStore to avoid the need to introduce new cookie stores. - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#258 - def signed_or_encrypted; end - - private - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#281 - def encrypted_cookie_cipher; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#275 - def prepare_upgrade_legacy_hmac_aes_cbc_cookies?; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#285 - def signed_cookie_digest; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#268 - def upgrade_legacy_hmac_aes_cbc_cookies?; end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#290 -class ActionDispatch::Cookies::CookieJar - include ::ActionDispatch::Cookies::ChainedCookieJars - include ::Enumerable - - # @return [CookieJar] a new instance of CookieJar - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#301 - def initialize(request); end - - # Returns the value of the cookie by +name+, or +nil+ if no such cookie exists. - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#322 - def [](name); end - - # Sets the cookie named +name+. The second argument may be the cookie's - # value or a hash of options as documented above. - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#356 - def []=(name, options); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 - def always_write_cookie; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 - def always_write_cookie=(val); end - - # Removes all cookies on the client machine by calling delete for each cookie. - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#400 - def clear(options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#311 - def commit!; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#309 - def committed?; end - - # Removes the cookie on the client machine by setting the value to an empty string - # and the expiration date in the past. Like []=, you can pass in - # an options hash to delete cookies with extra data such as a :path. - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#379 - def delete(name, options = T.unsafe(nil)); end - - # Whether the given cookie is to be deleted by this CookieJar. - # Like []=, you can pass in an options hash to test if a - # deletion applies to a specific :path, :domain etc. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#393 - def deleted?(name, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#317 - def each(&block); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#326 - def fetch(name, *args, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#330 - def has_key?(name); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#330 - def key?(name); end - - # Returns the value of attribute request. - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#299 - def request; end - - # Returns the cookies as Hash. - def to_hash(*_arg0); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#350 - def to_header; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#338 - def update(other_hash); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#343 - def update_cookies_from_jar; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#404 - def write(headers); end - - private - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#413 - def escape(string); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#434 - def handle_options(options); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#417 - def make_set_cookie_header(header); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#430 - def write_cookie?(cookie); end - - class << self - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 - def always_write_cookie; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 - def always_write_cookie=(val); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#293 - def build(req, cookies); end - end -end - -# Raised when storing more than 4K of session data. -# -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#203 -class ActionDispatch::Cookies::CookieOverflow < ::StandardError; end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#190 -ActionDispatch::Cookies::ENCRYPTED_COOKIE_CIPHER = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#186 -ActionDispatch::Cookies::ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#187 -ActionDispatch::Cookies::ENCRYPTED_SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#645 -class ActionDispatch::Cookies::EncryptedKeyRotatingCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar - include ::ActionDispatch::Cookies::SerializedCookieJars - - # @return [EncryptedKeyRotatingCookieJar] a new instance of EncryptedKeyRotatingCookieJar - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#648 - def initialize(parent_jar); end - - private - - # @raise [CookieOverflow] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#690 - def commit(name, options); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#682 - def parse(name, encrypted_message, purpose: T.unsafe(nil)); end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#184 -ActionDispatch::Cookies::GENERATOR_KEY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#183 -ActionDispatch::Cookies::HTTP_HEADER = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#556 -class ActionDispatch::Cookies::JsonSerializer - class << self - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#561 - def dump(value); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#557 - def load(value); end - end -end - -# Cookies can typically store 4096 bytes. -# -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#200 -ActionDispatch::Cookies::MAX_COOKIE_SIZE = T.let(T.unsafe(nil), Integer) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#544 -class ActionDispatch::Cookies::MarshalWithJsonFallback - class << self - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#551 - def dump(value); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#545 - def load(value); end - end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#537 -class ActionDispatch::Cookies::PermanentCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar - private - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#539 - def commit(name, options); end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#192 -ActionDispatch::Cookies::SECRET_KEY_BASE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#191 -ActionDispatch::Cookies::SIGNED_COOKIE_DIGEST = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#185 -ActionDispatch::Cookies::SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#566 -module ActionDispatch::Cookies::SerializedCookieJars - protected - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#579 - def deserialize(name); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#611 - def digest; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#571 - def needs_migration?(value); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#575 - def serialize(value); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#599 - def serializer; end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#567 -ActionDispatch::Cookies::SerializedCookieJars::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#568 -ActionDispatch::Cookies::SerializedCookieJars::SERIALIZER = ActiveSupport::MessageEncryptor::NullSerializer - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#616 -class ActionDispatch::Cookies::SignedKeyRotatingCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar - include ::ActionDispatch::Cookies::SerializedCookieJars - - # @return [SignedKeyRotatingCookieJar] a new instance of SignedKeyRotatingCookieJar - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#619 - def initialize(parent_jar); end - - private - - # @raise [CookieOverflow] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#638 - def commit(name, options); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#632 - def parse(name, signed_message, purpose: T.unsafe(nil)); end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#189 -ActionDispatch::Cookies::USE_AUTHENTICATED_COOKIE_ENCRYPTION = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#197 -ActionDispatch::Cookies::USE_COOKIES_WITH_METADATA = T.let(T.unsafe(nil), String) - -# This middleware is responsible for logging exceptions and -# showing a debugging page in case the request is local. -# -# source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#11 -class ActionDispatch::DebugExceptions - # @return [DebugExceptions] a new instance of DebugExceptions - # - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#19 - def initialize(app, routes_app = T.unsafe(nil), response_format = T.unsafe(nil), interceptors = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#26 - def call(env); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#176 - def api_request?(content_type); end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#114 - def create_template(request, wrapper); end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#43 - def invoke_interceptors(request, exception); end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#152 - def log_array(logger, lines); end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#133 - def log_error(request, wrapper); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#180 - def log_rescued_responses?(request); end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#162 - def logger(request); end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#129 - def render(status, body, format); end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#54 - def render_exception(request, exception); end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#90 - def render_for_api_request(content_type, wrapper); end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#76 - def render_for_browser_request(request, wrapper); end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#170 - def routes_inspector(exception); end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#166 - def stderr_logger; end - - class << self - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#12 - def interceptors; end - - # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#14 - def register_interceptor(object = T.unsafe(nil), &block); end - end -end - -# This middleware can be used to diagnose deadlocks in the autoload interlock. -# -# To use it, insert it near the top of the middleware stack, using -# config/application.rb: -# -# config.middleware.insert_before Rack::Sendfile, ActionDispatch::DebugLocks -# -# After restarting the application and re-triggering the deadlock condition, -# the route /rails/locks will show a summary of all threads currently -# known to the interlock, which lock level they are holding or awaiting, and -# their current backtrace. -# -# Generally a deadlock will be caused by the interlock conflicting with some -# other external lock or blocking I/O call. These cannot be automatically -# identified, but should be visible in the displayed backtraces. -# -# NOTE: The formatting and content of this middleware's output is intended for -# human consumption, and should be expected to change between releases. -# -# This middleware exposes operational details of the server, with no access -# control. It should only be enabled when in use, and removed thereafter. -# -# source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#25 -class ActionDispatch::DebugLocks - # @return [DebugLocks] a new instance of DebugLocks - # - # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#26 - def initialize(app, path = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#31 - def call(env); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#103 - def blocked_by?(victim, blocker, all_threads); end - - # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#45 - def render_details(req); end -end - -# source://actionpack//lib/action_dispatch/middleware/debug_view.rb#9 -class ActionDispatch::DebugView < ::ActionView::Base - # @return [DebugView] a new instance of DebugView - # - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#12 - def initialize(assigns); end - - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#18 - def compiled_method_container; end - - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#42 - def debug_hash(object); end - - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#34 - def debug_headers(headers); end - - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#22 - def debug_params(params); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#60 - def params_valid?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#56 - def protect_against_forgery?; end - - # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#46 - def render(*_arg0); end -end - -# source://actionpack//lib/action_dispatch/middleware/debug_view.rb#10 -ActionDispatch::DebugView::RESCUES_TEMPLATE_PATH = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#7 -class ActionDispatch::ExceptionWrapper - # @return [ExceptionWrapper] a new instance of ExceptionWrapper - # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#46 - def initialize(backtrace_cleaner, exception); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#77 - def application_trace; end - - # Returns the value of attribute backtrace_cleaner. - # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 - def backtrace_cleaner; end - - # Returns the value of attribute exception. - # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 - def exception; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#71 - def exception_trace; end - - # Returns the value of attribute file. - # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 - def file; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#81 - def framework_trace; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#85 - def full_trace; end - - # Returns the value of attribute line_number. - # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 - def line_number; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#121 - def rescue_response?; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 - def rescue_responses; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 - def rescue_responses=(val); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#63 - def rescue_template; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 - def rescue_templates; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 - def rescue_templates=(val); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 - def silent_exceptions; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 - def silent_exceptions=(val); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#125 - def source_extracts; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#144 - def source_to_show_id; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#67 - def status_code; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#136 - def trace_to_show; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#89 - def traces; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#55 - def unwrapped_exception; end - - # Returns the value of attribute wrapped_causes. - # - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 - def wrapped_causes; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 - def wrapper_exceptions; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 - def wrapper_exceptions=(val); end - - private - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#149 - def backtrace; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#153 - def causes_for(exception); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#163 - def clean_backtrace(*args); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#190 - def expand_backtrace; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#183 - def extract_file_and_line_number(trace); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#171 - def source_fragment(path, line); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#159 - def wrapped_causes_for(exception, backtrace_cleaner); end - - class << self - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 - def rescue_responses; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 - def rescue_responses=(val); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 - def rescue_templates; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 - def rescue_templates=(val); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 - def silent_exceptions; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 - def silent_exceptions=(val); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#117 - def status_code_for_exception(class_name); end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 - def wrapper_exceptions; end - - # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 - def wrapper_exceptions=(val); end - end -end - -# source://actionpack//lib/action_dispatch/middleware/executor.rb#6 -class ActionDispatch::Executor - # @return [Executor] a new instance of Executor - # - # source://actionpack//lib/action_dispatch/middleware/executor.rb#7 - def initialize(app, executor); end - - # source://actionpack//lib/action_dispatch/middleware/executor.rb#11 - def call(env); end -end - -# This endpoint serves static files from disk using +Rack::File+. -# -# URL paths are matched with static files according to expected -# conventions: +path+, +path+.html, +path+/index.html. -# -# Precompressed versions of these files are checked first. Brotli (.br) -# and gzip (.gz) files are supported. If +path+.br exists, this -# endpoint returns that file with a Content-Encoding: br header. -# -# If no matching file is found, this endpoint responds 404 Not Found. -# -# Pass the +root+ directory to search for matching files, an optional -# index: "index" to change the default +path+/index.html, and optional -# additional response headers. -# -# source://actionpack//lib/action_dispatch/middleware/static.rb#41 -class ActionDispatch::FileHandler - # @return [FileHandler] a new instance of FileHandler - # - # source://actionpack//lib/action_dispatch/middleware/static.rb#49 - def initialize(root, index: T.unsafe(nil), headers: T.unsafe(nil), precompressed: T.unsafe(nil), compressible_content_types: T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/static.rb#63 - def attempt(env); end - - # source://actionpack//lib/action_dispatch/middleware/static.rb#59 - def call(env); end - - private - - # source://actionpack//lib/action_dispatch/middleware/static.rb#179 - def clean_path(path_info); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/static.rb#143 - def compressible?(content_type); end - - # @yield [path, content_type || "text/plain"] - # - # source://actionpack//lib/action_dispatch/middleware/static.rb#156 - def each_candidate_filepath(path_info); end - - # source://actionpack//lib/action_dispatch/middleware/static.rb#147 - def each_precompressed_filepath(filepath); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/static.rb#138 - def file_readable?(path); end - - # Match a URI path to a static file to be served. - # - # Used by the +Static+ class to negotiate a servable file in the - # +public/+ directory (see Static#call). - # - # Checks for +path+, +path+.html, and +path+/index.html files, - # in that order, including .br and .gzip compressed extensions. - # - # If a matching file is found, the path and necessary response headers - # (Content-Type, Content-Encoding) are returned. - # - # source://actionpack//lib/action_dispatch/middleware/static.rb#98 - def find_file(path_info, accept_encoding:); end - - # source://actionpack//lib/action_dispatch/middleware/static.rb#74 - def serve(request, filepath, content_headers); end - - # source://actionpack//lib/action_dispatch/middleware/static.rb#106 - def try_files(filepath, content_type, accept_encoding:); end - - # source://actionpack//lib/action_dispatch/middleware/static.rb#116 - def try_precompressed_files(filepath, headers, accept_encoding:); end -end - -# +Accept-Encoding+ value -> file extension -# -# source://actionpack//lib/action_dispatch/middleware/static.rb#43 -ActionDispatch::FileHandler::PRECOMPRESSED = T.let(T.unsafe(nil), Hash) - -# The flash provides a way to pass temporary primitive-types (String, Array, Hash) between actions. Anything you place in the flash will be exposed -# to the very next action and then cleared out. This is a great way of doing notices and alerts, such as a create -# action that sets flash[:notice] = "Post successfully created" before redirecting to a display action that can -# then expose the flash to its template. Actually, that exposure is automatically done. -# -# class PostsController < ActionController::Base -# def create -# # save post -# flash[:notice] = "Post successfully created" -# redirect_to @post -# end -# -# def show -# # doesn't need to assign the flash notice to the template, that's done automatically -# end -# end -# -# Then in +show.html.erb+: -# -# <% if flash[:notice] %> -#
<%= flash[:notice] %>
-# <% end %> -# -# Since the +notice+ and +alert+ keys are a common idiom, convenience accessors are available: -# -# flash.alert = "You must be logged in" -# flash.notice = "Post successfully created" -# -# This example places a string in the flash. And of course, you can put as many as you like at a time too. If you want to pass -# non-primitive types, you will have to handle that in your application. Example: To show messages with links, you will have to -# use sanitize helper. -# -# Just remember: They'll be gone by the time the next action has been performed. -# -# See docs on the FlashHash class for more details about the flash. -# -# source://actionpack//lib/action_dispatch/middleware/flash.rb#41 -class ActionDispatch::Flash - class << self - # source://actionpack//lib/action_dispatch/middleware/flash.rb#293 - def new(app); end - end -end - -# source://actionpack//lib/action_dispatch/middleware/flash.rb#110 -class ActionDispatch::Flash::FlashHash - include ::Enumerable - - # @return [FlashHash] a new instance of FlashHash - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#140 - def initialize(flashes = T.unsafe(nil), discard = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#160 - def [](k); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#154 - def []=(k, v); end - - # Convenience accessor for flash[:alert]. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#261 - def alert; end - - # Convenience accessor for flash[:alert]=. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#266 - def alert=(message); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#193 - def clear; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#178 - def delete(key); end - - # Marks the entire flash or a single flash entry to be discarded by the end of the current action: - # - # flash.discard # discard the entire flash at the end of the current action - # flash.discard(:warning) # discard only the "warning" entry at the end of the current action - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#246 - def discard(k = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#198 - def each(&block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#189 - def empty?; end - - # Keeps either the entire current flash or a specific flash entry available for the next action: - # - # flash.keep # keeps the entire flash - # flash.keep(:notice) # keeps only the "notice" entry, the rest of the flash is discarded - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#236 - def keep(k = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#174 - def key?(name); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#170 - def keys; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#164 - def merge!(h); end - - # Convenience accessor for flash[:notice]. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#271 - def notice; end - - # Convenience accessor for flash[:notice]=. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#276 - def notice=(message); end - - # Sets a flash that will not be available to the next action, only to the current. - # - # flash.now[:message] = "Hello current action" - # - # This method enables you to use the flash as a central messaging system in your app. - # When you need to pass an object to the next action, you use the standard flash assign ([]=). - # When you need to pass an object to the current action, you use now, and your object will - # vanish when the current action is done. - # - # Entries set via now are accessed the same way as standard entries: flash['my-key']. - # - # Also, brings two convenience accessors: - # - # flash.now.alert = "Beware now!" - # # Equivalent to flash.now[:alert] = "Beware now!" - # - # flash.now.notice = "Good luck now!" - # # Equivalent to flash.now[:notice] = "Good luck now!" - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#228 - def now; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#204 - def replace(h); end - - # Mark for removal entries that were kept, and delete unkept ones. - # - # This method is called automatically by filters, so you generally don't need to care about it. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#255 - def sweep; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#185 - def to_hash; end - - # Builds a hash containing the flashes to keep for the next request. - # If there are none to keep, returns +nil+. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#134 - def to_session_value; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#164 - def update(h); end - - protected - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#281 - def now_is_loaded?; end - - private - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#146 - def initialize_copy(other); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#286 - def stringify_array(array); end - - class << self - # source://actionpack//lib/action_dispatch/middleware/flash.rb#113 - def from_session_value(value); end - end -end - -# source://actionpack//lib/action_dispatch/middleware/flash.rb#81 -class ActionDispatch::Flash::FlashNow - # @return [FlashNow] a new instance of FlashNow - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#84 - def initialize(flash); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#95 - def [](k); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#88 - def []=(k, v); end - - # Convenience accessor for flash.now[:alert]=. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#100 - def alert=(message); end - - # Returns the value of attribute flash. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#82 - def flash; end - - # Sets the attribute flash - # - # @param value the value to set the attribute flash to. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#82 - def flash=(_arg0); end - - # Convenience accessor for flash.now[:notice]=. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#105 - def notice=(message); end -end - -# source://actionpack//lib/action_dispatch/middleware/flash.rb#42 -ActionDispatch::Flash::KEY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/flash.rb#44 -module ActionDispatch::Flash::RequestMethods - # source://actionpack//lib/action_dispatch/middleware/flash.rb#62 - def commit_flash; end - - # Access the contents of the flash. Returns a ActionDispatch::Flash::FlashHash. - # - # See ActionDispatch::Flash for example usage. - # - # source://actionpack//lib/action_dispatch/middleware/flash.rb#48 - def flash; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#54 - def flash=(flash); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#58 - def flash_hash; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#75 - def reset_session; end -end - -# This middleware guards from DNS rebinding attacks by explicitly permitting -# the hosts a request can be sent to, and is passed the options set in -# +config.host_authorization+. -# -# Requests can opt-out of Host Authorization with +exclude+: -# -# config.host_authorization = { exclude: ->(request) { request.path =~ /healthcheck/ } } -# -# When a request comes to an unauthorized host, the +response_app+ -# application will be executed and rendered. If no +response_app+ is given, a -# default one will run. -# The default response app logs blocked host info with level 'error' and -# responds with 403 Forbidden. The body of the response contains debug info -# if +config.consider_all_requests_local+ is set to true, otherwise the body is empty. -# -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#18 -class ActionDispatch::HostAuthorization - # @return [HostAuthorization] a new instance of HostAuthorization - # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#122 - def initialize(app, hosts, exclude: T.unsafe(nil), response_app: T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#130 - def call(env); end - - private - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#146 - def blocked_hosts(request); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#158 - def excluded?(request); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#162 - def mark_as_authorized(request); end -end - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#19 -ActionDispatch::HostAuthorization::ALLOWED_HOSTS_IN_DEVELOPMENT = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#83 -class ActionDispatch::HostAuthorization::DefaultResponseApp - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#86 - def call(env); end - - private - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#117 - def available_logger(request); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#109 - def log_error(request); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#102 - def response(format, body); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#95 - def response_body(request); end -end - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#84 -ActionDispatch::HostAuthorization::DefaultResponseApp::RESPONSE_STATUS = T.let(T.unsafe(nil), Integer) - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#21 -ActionDispatch::HostAuthorization::IPV4_HOSTNAME = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#22 -ActionDispatch::HostAuthorization::IPV6_HOSTNAME = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#23 -ActionDispatch::HostAuthorization::IPV6_HOSTNAME_WITH_PORT = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#20 -ActionDispatch::HostAuthorization::PORT_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#30 -class ActionDispatch::HostAuthorization::Permissions - # @return [Permissions] a new instance of Permissions - # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#31 - def initialize(hosts); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#39 - def allows?(host); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#35 - def empty?; end - - private - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#78 - def extract_hostname(host); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#56 - def sanitize_hosts(hosts); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#66 - def sanitize_regexp(host); end - - # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#70 - def sanitize_string(host); end -end - -# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#24 -ActionDispatch::HostAuthorization::VALID_IP_HOSTNAME = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch.rb#80 -module ActionDispatch::Http - extend ::ActiveSupport::Autoload -end - -# source://actionpack//lib/action_dispatch/http/cache.rb#5 -module ActionDispatch::Http::Cache; end - -# source://actionpack//lib/action_dispatch/http/cache.rb#6 -module ActionDispatch::Http::Cache::Request - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#28 - def etag_matches?(etag); end - - # Check response freshness (+Last-Modified+ and ETag) against request - # +If-Modified-Since+ and +If-None-Match+ conditions. If both headers are - # supplied, both must match, or the request is not considered fresh. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#38 - def fresh?(response); end - - # source://actionpack//lib/action_dispatch/http/cache.rb#10 - def if_modified_since; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#16 - def if_none_match; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#20 - def if_none_match_etags; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#24 - def not_modified?(modified_at); end -end - -# source://actionpack//lib/action_dispatch/http/cache.rb#7 -ActionDispatch::Http::Cache::Request::HTTP_IF_MODIFIED_SINCE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#8 -ActionDispatch::Http::Cache::Request::HTTP_IF_NONE_MATCH = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#51 -module ActionDispatch::Http::Cache::Response - # Returns the value of attribute cache_control. - # - # source://actionpack//lib/action_dispatch/http/cache.rb#52 - def cache_control; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#68 - def date; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#78 - def date=(utc_time); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#74 - def date?; end - - # This method sets a weak ETag validator on the response so browsers - # and proxies may cache the response, keyed on the ETag. On subsequent - # requests, the +If-None-Match+ header is set to the cached ETag. If it - # matches the current ETag, we can return a 304 Not Modified response - # with no body, letting the browser or proxy know that their cache is - # current. Big savings in request time and network bandwidth. - # - # Weak ETags are considered to be semantically equivalent but not - # byte-for-byte identical. This is perfect for browser caching of HTML - # pages where we don't care about exact equality, just what the user - # is viewing. - # - # Strong ETags are considered byte-for-byte identical. They allow a - # browser or proxy cache to support +Range+ requests, useful for paging - # through a PDF file or scrubbing through a video. Some CDNs only - # support strong ETags and will ignore weak ETags entirely. - # - # Weak ETags are what we almost always need, so they're the default. - # Check out #strong_etag= to provide a strong ETag validator. - # - # source://actionpack//lib/action_dispatch/http/cache.rb#101 - def etag=(weak_validators); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#113 - def etag?; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#54 - def last_modified; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#64 - def last_modified=(utc_time); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#60 - def last_modified?; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#109 - def strong_etag=(strong_validators); end - - # True if an ETag is set, and it isn't a weak validator (not preceded with W/). - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#121 - def strong_etag?; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#105 - def weak_etag=(weak_validators); end - - # True if an ETag is set, and it's a weak validator (preceded with W/). - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/cache.rb#116 - def weak_etag?; end - - private - - # source://actionpack//lib/action_dispatch/http/cache.rb#146 - def cache_control_headers; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#138 - def cache_control_segments; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#134 - def generate_strong_etag(validators); end - - # source://actionpack//lib/action_dispatch/http/cache.rb#130 - def generate_weak_etag(validators); end - - # source://actionpack//lib/action_dispatch/http/cache.rb#175 - def handle_conditional_get!; end - - # source://actionpack//lib/action_dispatch/http/cache.rb#185 - def merge_and_normalize_cache_control!(cache_control); end - - # source://actionpack//lib/action_dispatch/http/cache.rb#164 - def prepare_cache_control!; end -end - -# source://actionpack//lib/action_dispatch/http/cache.rb#126 -ActionDispatch::Http::Cache::Response::DATE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#168 -ActionDispatch::Http::Cache::Response::DEFAULT_CACHE_CONTROL = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#127 -ActionDispatch::Http::Cache::Response::LAST_MODIFIED = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#173 -ActionDispatch::Http::Cache::Response::MUST_REVALIDATE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#170 -ActionDispatch::Http::Cache::Response::NO_CACHE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#169 -ActionDispatch::Http::Cache::Response::NO_STORE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#172 -ActionDispatch::Http::Cache::Response::PRIVATE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#171 -ActionDispatch::Http::Cache::Response::PUBLIC = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/cache.rb#128 -ActionDispatch::Http::Cache::Response::SPECIAL_KEYS = T.let(T.unsafe(nil), Set) - -# source://actionpack//lib/action_dispatch/http/content_disposition.rb#5 -class ActionDispatch::Http::ContentDisposition - # @return [ContentDisposition] a new instance of ContentDisposition - # - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#12 - def initialize(disposition:, filename:); end - - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#19 - def ascii_filename; end - - # Returns the value of attribute disposition. - # - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#10 - def disposition; end - - # Returns the value of attribute filename. - # - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#10 - def filename; end - - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#29 - def to_s; end - - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#25 - def utf8_filename; end - - private - - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#38 - def percent_escape(string, pattern); end - - class << self - # source://actionpack//lib/action_dispatch/http/content_disposition.rb#6 - def format(disposition:, filename:); end - end -end - -# source://actionpack//lib/action_dispatch/http/content_disposition.rb#23 -ActionDispatch::Http::ContentDisposition::RFC_5987_ESCAPED_CHAR = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/http/content_disposition.rb#17 -ActionDispatch::Http::ContentDisposition::TRADITIONAL_ESCAPED_CHAR = T.let(T.unsafe(nil), Regexp) - -# Allows you to specify sensitive query string and POST parameters to filter -# from the request log. -# -# # Replaces values with "[FILTERED]" for keys that match /foo|bar/i. -# env["action_dispatch.parameter_filter"] = [:foo, "bar"] -# -# For more information about filter behavior, see ActiveSupport::ParameterFilter. -# -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#14 -module ActionDispatch::Http::FilterParameters - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#19 - def initialize; end - - # Returns a hash of request.env with all sensitive data replaced. - # - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#34 - def filtered_env; end - - # Returns a hash of parameters with all sensitive data replaced. - # - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#27 - def filtered_parameters; end - - # Reconstructs a path with all sensitive GET parameters replaced. - # - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#39 - def filtered_path; end - - private - - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#50 - def env_filter; end - - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#61 - def filtered_query_string; end - - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#44 - def parameter_filter; end - - # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#57 - def parameter_filter_for(filters); end -end - -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#15 -ActionDispatch::Http::FilterParameters::ENV_MATCH = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#17 -ActionDispatch::Http::FilterParameters::NULL_ENV_FILTER = T.let(T.unsafe(nil), ActiveSupport::ParameterFilter) - -# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#16 -ActionDispatch::Http::FilterParameters::NULL_PARAM_FILTER = T.let(T.unsafe(nil), ActiveSupport::ParameterFilter) - -# source://actionpack//lib/action_dispatch/http/filter_redirect.rb#5 -module ActionDispatch::Http::FilterRedirect - # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#8 - def filtered_location; end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#25 - def location_filter_match?; end - - # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#17 - def location_filters; end -end - -# source://actionpack//lib/action_dispatch/http/filter_redirect.rb#6 -ActionDispatch::Http::FilterRedirect::FILTERED = T.let(T.unsafe(nil), String) - -# Provides access to the request's HTTP headers from the environment. -# -# env = { "CONTENT_TYPE" => "text/plain", "HTTP_USER_AGENT" => "curl/7.43.0" } -# headers = ActionDispatch::Http::Headers.from_hash(env) -# headers["Content-Type"] # => "text/plain" -# headers["User-Agent"] # => "curl/7.43.0" -# -# Also note that when headers are mapped to CGI-like variables by the Rack -# server, both dashes and underscores are converted to underscores. This -# ambiguity cannot be resolved at this stage anymore. Both underscores and -# dashes have to be interpreted as if they were originally sent as dashes. -# -# # GET / HTTP/1.1 -# # ... -# # User-Agent: curl/7.43.0 -# # X_Custom_Header: token -# -# headers["X_Custom_Header"] # => nil -# headers["X-Custom-Header"] # => "token" -# -# source://actionpack//lib/action_dispatch/http/headers.rb#24 -class ActionDispatch::Http::Headers - include ::Enumerable - - # @return [Headers] a new instance of Headers - # - # source://actionpack//lib/action_dispatch/http/headers.rb#54 - def initialize(request); end - - # Returns the value for the given key mapped to @env. - # - # source://actionpack//lib/action_dispatch/http/headers.rb#59 - def [](key); end - - # Sets the given value for the key mapped to @env. - # - # source://actionpack//lib/action_dispatch/http/headers.rb#64 - def []=(key, value); end - - # Add a value to a multivalued header like +Vary+ or +Accept-Encoding+. - # - # source://actionpack//lib/action_dispatch/http/headers.rb#69 - def add(key, value); end - - # source://actionpack//lib/action_dispatch/http/headers.rb#95 - def each(&block); end - - # source://actionpack//lib/action_dispatch/http/headers.rb#116 - def env; end - - # Returns the value for the given key mapped to @env. - # - # If the key is not found and an optional code block is not provided, - # raises a KeyError exception. - # - # If the code block is provided, then it will be run and - # its result returned. - # - # source://actionpack//lib/action_dispatch/http/headers.rb#87 - def fetch(key, default = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/headers.rb#73 - def include?(key); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/headers.rb#73 - def key?(key); end - - # Returns a new Http::Headers instance containing the contents of - # headers_or_env and the original instance. - # - # source://actionpack//lib/action_dispatch/http/headers.rb#101 - def merge(headers_or_env); end - - # Adds the contents of headers_or_env to original instance - # entries; duplicate keys are overwritten with the values from - # headers_or_env. - # - # source://actionpack//lib/action_dispatch/http/headers.rb#110 - def merge!(headers_or_env); end - - private - - # Converts an HTTP header name to an environment variable name if it is - # not contained within the headers hash. - # - # source://actionpack//lib/action_dispatch/http/headers.rb#121 - def env_name(key); end - - class << self - # source://actionpack//lib/action_dispatch/http/headers.rb#50 - def from_hash(hash); end - end -end - -# source://actionpack//lib/action_dispatch/http/headers.rb#25 -ActionDispatch::Http::Headers::CGI_VARIABLES = T.let(T.unsafe(nil), Set) - -# source://actionpack//lib/action_dispatch/http/headers.rb#78 -ActionDispatch::Http::Headers::DEFAULT = T.let(T.unsafe(nil), Object) - -# source://actionpack//lib/action_dispatch/http/headers.rb#46 -ActionDispatch::Http::Headers::HTTP_HEADER = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#7 -module ActionDispatch::Http::MimeNegotiation - extend ::ActiveSupport::Concern - - # Returns the accepted MIME type for the request. - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#54 - def accepts; end - - # The MIME type of the HTTP request, such as Mime[:xml]. - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#23 - def content_mime_type; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#36 - def content_type; end - - # Returns the MIME type for the \format used in the request. - # - # GET /posts/5.xml | request.format => Mime[:xml] - # GET /posts/5.xhtml | request.format => Mime[:html] - # GET /posts/5 | request.format => Mime[:html] or Mime[:js], or request.accepts.first - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#75 - def format(view_path = T.unsafe(nil)); end - - # Sets the \format by string extension, which can be used to force custom formats - # that are not controlled by the extension. - # - # class ApplicationController < ActionController::Base - # before_action :adjust_format_for_iphone - # - # private - # def adjust_format_for_iphone - # request.format = :iphone if request.env["HTTP_USER_AGENT"][/iPhone/] - # end - # end - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#127 - def format=(extension); end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#79 - def formats; end - - # Sets the \formats by string extensions. This differs from #format= by allowing you - # to set multiple, ordered formats, which is useful when you want to have a fallback. - # - # In this example, the +:iphone+ format will be used if it's available, otherwise it'll fallback - # to the +:html+ format. - # - # class ApplicationController < ActionController::Base - # before_action :adjust_format_for_iphone_with_html_fallback - # - # private - # def adjust_format_for_iphone_with_html_fallback - # request.formats = [ :iphone, :html ] if request.env["HTTP_USER_AGENT"][/iPhone/] - # end - # end - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#146 - def formats=(extensions); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#49 - def has_content_type?; end - - # Returns the first MIME type that matches the provided array of MIME types. - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#154 - def negotiate_mime(order); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#166 - def should_apply_vary_header?; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#112 - def variant; end - - # Sets the \variant for template. - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#102 - def variant=(variant); end - - private - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#190 - def format_from_path_extension; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#175 - def params_readable?; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#186 - def use_accept_header; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#181 - def valid_accept_header; end -end - -# We use normal content negotiation unless you include */* in your list, -# in which case we assume you're a browser and send HTML. -# -# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#173 -ActionDispatch::Http::MimeNegotiation::BROWSER_LIKE_ACCEPTS = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#10 -class ActionDispatch::Http::MimeNegotiation::InvalidType < ::Mime::Type::InvalidMimeType; end - -# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#12 -ActionDispatch::Http::MimeNegotiation::RESCUABLE_MIME_FORMAT_ERRORS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/parameters.rb#5 -module ActionDispatch::Http::Parameters - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActionDispatch::Http::Parameters::ClassMethods - - # Returns both GET and POST \parameters in a single hash. - # - # source://actionpack//lib/action_dispatch/http/parameters.rb#50 - def parameters; end - - # Returns both GET and POST \parameters in a single hash. - # - # source://actionpack//lib/action_dispatch/http/parameters.rb#50 - def params; end - - # Returns a hash with the \parameters used to form the \path of the request. - # Returned hash keys are strings: - # - # { action: "my_action", controller: "my_controller" } - # - # source://actionpack//lib/action_dispatch/http/parameters.rb#82 - def path_parameters; end - - # source://actionpack//lib/action_dispatch/http/parameters.rb#65 - def path_parameters=(parameters); end - - private - - # source://actionpack//lib/action_dispatch/http/parameters.rb#100 - def log_parse_error_once; end - - # source://actionpack//lib/action_dispatch/http/parameters.rb#112 - def params_parsers; end - - # source://actionpack//lib/action_dispatch/http/parameters.rb#87 - def parse_formatted_parameters(parsers); end -end - -# source://actionpack//lib/action_dispatch/http/parameters.rb#34 -module ActionDispatch::Http::Parameters::ClassMethods - # Configure the parameter parser for a given MIME type. - # - # It accepts a hash where the key is the symbol of the MIME type - # and the value is a proc. - # - # original_parsers = ActionDispatch::Request.parameter_parsers - # xml_parser = -> (raw_post) { Hash.from_xml(raw_post) || {} } - # new_parsers = original_parsers.merge(xml: xml_parser) - # ActionDispatch::Request.parameter_parsers = new_parsers - # - # source://actionpack//lib/action_dispatch/http/parameters.rb#44 - def parameter_parsers=(parsers); end -end - -# source://actionpack//lib/action_dispatch/http/parameters.rb#10 -ActionDispatch::Http::Parameters::DEFAULT_PARSERS = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/http/parameters.rb#8 -ActionDispatch::Http::Parameters::PARAMETERS_KEY = T.let(T.unsafe(nil), String) - -# Raised when raw data from the request cannot be parsed by the parser -# defined for request's content MIME type. -# -# source://actionpack//lib/action_dispatch/http/parameters.rb#19 -class ActionDispatch::Http::Parameters::ParseError < ::StandardError - # @return [ParseError] a new instance of ParseError - # - # source://actionpack//lib/action_dispatch/http/parameters.rb#20 - def initialize(message = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_dispatch/http/url.rb#7 -module ActionDispatch::Http::URL - # source://actionpack//lib/action_dispatch/http/url.rb#179 - def initialize; end - - # Returns the \domain part of a \host, such as "rubyonrails.org" in "www.rubyonrails.org". You can specify - # a different tld_length, such as 2 to catch rubyonrails.co.uk in "www.rubyonrails.co.uk". - # - # source://actionpack//lib/action_dispatch/http/url.rb#321 - def domain(tld_length = T.unsafe(nil)); end - - # Returns the host for this request, such as "example.com". - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.host # => "example.com" - # - # source://actionpack//lib/action_dispatch/http/url.rb#226 - def host; end - - # Returns a \host:\port string for this request, such as "example.com" or - # "example.com:8080". Port is only included if it is not a default port - # (80 or 443) - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.host_with_port # => "example.com" - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.host_with_port # => "example.com" - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.host_with_port # => "example.com:8080" - # - # source://actionpack//lib/action_dispatch/http/url.rb#242 - def host_with_port; end - - # Returns a number \port suffix like 8080 if the \port number of this request - # is not the default HTTP \port 80 or HTTPS \port 443. - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.optional_port # => nil - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.optional_port # => 8080 - # - # source://actionpack//lib/action_dispatch/http/url.rb#292 - def optional_port; end - - # Returns the port number of this request as an integer. - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.port # => 80 - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.port # => 8080 - # - # source://actionpack//lib/action_dispatch/http/url.rb#253 - def port; end - - # Returns a string \port suffix, including colon, like ":8080" if the \port - # number of this request is not the default HTTP \port 80 or HTTPS \port 443. - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.port_string # => "" - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.port_string # => ":8080" - # - # source://actionpack//lib/action_dispatch/http/url.rb#304 - def port_string; end - - # Returns 'https://' if this is an SSL request and 'http://' otherwise. - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.protocol # => "http://" - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com', 'HTTPS' => 'on' - # req.protocol # => "https://" - # - # source://actionpack//lib/action_dispatch/http/url.rb#200 - def protocol; end - - # Returns the \host and port for this request, such as "example.com:8080". - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.raw_host_with_port # => "example.com" - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.raw_host_with_port # => "example.com:80" - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.raw_host_with_port # => "example.com:8080" - # - # source://actionpack//lib/action_dispatch/http/url.rb#214 - def raw_host_with_port; end - - # source://actionpack//lib/action_dispatch/http/url.rb#12 - def secure_protocol; end - - # source://actionpack//lib/action_dispatch/http/url.rb#12 - def secure_protocol=(val); end - - # Returns the requested port, such as 8080, based on SERVER_PORT - # - # req = ActionDispatch::Request.new 'SERVER_PORT' => '80' - # req.server_port # => 80 - # - # req = ActionDispatch::Request.new 'SERVER_PORT' => '8080' - # req.server_port # => 8080 - # - # source://actionpack//lib/action_dispatch/http/url.rb#315 - def server_port; end - - # Returns the standard \port number for this request's protocol. - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.standard_port # => 80 - # - # source://actionpack//lib/action_dispatch/http/url.rb#265 - def standard_port; end - - # Returns whether this request is using the standard port - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.standard_port? # => true - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.standard_port? # => false - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/url.rb#280 - def standard_port?; end - - # Returns all the \subdomains as a string, so "dev.www" would be - # returned for "dev.www.rubyonrails.org". You can specify a different tld_length, - # such as 2 to catch "www" instead of "www.rubyonrails" - # in "www.rubyonrails.co.uk". - # - # source://actionpack//lib/action_dispatch/http/url.rb#337 - def subdomain(tld_length = T.unsafe(nil)); end - - # Returns all the \subdomains as an array, so ["dev", "www"] would be - # returned for "dev.www.rubyonrails.org". You can specify a different tld_length, - # such as 2 to catch ["www"] instead of ["www", "rubyonrails"] - # in "www.rubyonrails.co.uk". - # - # source://actionpack//lib/action_dispatch/http/url.rb#329 - def subdomains(tld_length = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/url.rb#13 - def tld_length; end - - # source://actionpack//lib/action_dispatch/http/url.rb#13 - def tld_length=(val); end - - # Returns the complete URL used for this request. - # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.url # => "http://example.com" - # - # source://actionpack//lib/action_dispatch/http/url.rb#189 - def url; end - - class << self - # Returns the domain part of a host given the domain level. - # - # # Top-level domain example - # extract_domain('www.example.com', 1) # => "example.com" - # # Second-level domain example - # extract_domain('dev.www.example.co.uk', 2) # => "example.co.uk" - # - # source://actionpack//lib/action_dispatch/http/url.rb#22 - def extract_domain(host, tld_length); end - - # Returns the subdomains of a host as a String given the domain level. - # - # # Top-level domain example - # extract_subdomain('www.example.com', 1) # => "www" - # # Second-level domain example - # extract_subdomain('dev.www.example.co.uk', 2) # => "dev.www" - # - # source://actionpack//lib/action_dispatch/http/url.rb#46 - def extract_subdomain(host, tld_length); end - - # Returns the subdomains of a host as an Array given the domain level. - # - # # Top-level domain example - # extract_subdomains('www.example.com', 1) # => ["www"] - # # Second-level domain example - # extract_subdomains('dev.www.example.co.uk', 2) # => ["dev", "www"] - # - # source://actionpack//lib/action_dispatch/http/url.rb#32 - def extract_subdomains(host, tld_length); end - - # source://actionpack//lib/action_dispatch/http/url.rb#58 - def full_url_for(options); end - - # source://actionpack//lib/action_dispatch/http/url.rb#70 - def path_for(options); end - - # source://actionpack//lib/action_dispatch/http/url.rb#12 - def secure_protocol; end - - # source://actionpack//lib/action_dispatch/http/url.rb#12 - def secure_protocol=(val); end - - # source://actionpack//lib/action_dispatch/http/url.rb#13 - def tld_length; end - - # source://actionpack//lib/action_dispatch/http/url.rb#13 - def tld_length=(val); end - - # source://actionpack//lib/action_dispatch/http/url.rb#50 - def url_for(options); end - - private - - # source://actionpack//lib/action_dispatch/http/url.rb#90 - def add_anchor(path, anchor); end - - # source://actionpack//lib/action_dispatch/http/url.rb#83 - def add_params(path, params); end - - # source://actionpack//lib/action_dispatch/http/url.rb#105 - def build_host_url(host, port, protocol, options, path); end - - # source://actionpack//lib/action_dispatch/http/url.rb#96 - def extract_domain_from(host, tld_length); end - - # source://actionpack//lib/action_dispatch/http/url.rb#100 - def extract_subdomains_from(host, tld_length); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/url.rb#129 - def named_host?(host); end - - # source://actionpack//lib/action_dispatch/http/url.rb#146 - def normalize_host(_host, options); end - - # source://actionpack//lib/action_dispatch/http/url.rb#166 - def normalize_port(port, protocol); end - - # source://actionpack//lib/action_dispatch/http/url.rb#133 - def normalize_protocol(protocol); end - end -end - -# source://actionpack//lib/action_dispatch/http/url.rb#9 -ActionDispatch::Http::URL::HOST_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/http/url.rb#8 -ActionDispatch::Http::URL::IP_HOST_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/http/url.rb#10 -ActionDispatch::Http::URL::PROTOCOL_REGEXP = T.let(T.unsafe(nil), Regexp) - -# Models uploaded files. -# -# The actual file is accessible via the +tempfile+ accessor, though some -# of its interface is available directly for convenience. -# -# Uploaded files are temporary files whose lifespan is one request. When -# the object is finalized Ruby unlinks the file, so there is no need to -# clean them with a separate maintenance task. -# -# source://actionpack//lib/action_dispatch/http/upload.rb#13 -class ActionDispatch::Http::UploadedFile - # @raise [ArgumentError] - # @return [UploadedFile] a new instance of UploadedFile - # - # source://actionpack//lib/action_dispatch/http/upload.rb#27 - def initialize(hash); end - - # Shortcut for +tempfile.close+. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#69 - def close(unlink_now = T.unsafe(nil)); end - - # A string with the MIME type of the file. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#18 - def content_type; end - - # A string with the MIME type of the file. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#18 - def content_type=(_arg0); end - - # Shortcut for +tempfile.eof?+. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/upload.rb#94 - def eof?; end - - # A string with the headers of the multipart request. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#25 - def headers; end - - # A string with the headers of the multipart request. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#25 - def headers=(_arg0); end - - # Shortcut for +tempfile.open+. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#64 - def open; end - - # The basename of the file in the client. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#15 - def original_filename; end - - # The basename of the file in the client. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#15 - def original_filename=(_arg0); end - - # Shortcut for +tempfile.path+. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#74 - def path; end - - # Shortcut for +tempfile.read+. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#59 - def read(length = T.unsafe(nil), buffer = T.unsafe(nil)); end - - # Shortcut for +tempfile.rewind+. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#84 - def rewind; end - - # Shortcut for +tempfile.size+. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#89 - def size; end - - # A +Tempfile+ object with the actual uploaded file. Note that some of - # its interface is available directly. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#22 - def tempfile; end - - # A +Tempfile+ object with the actual uploaded file. Note that some of - # its interface is available directly. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#22 - def tempfile=(_arg0); end - - # source://actionpack//lib/action_dispatch/http/upload.rb#98 - def to_io; end - - # Shortcut for +tempfile.to_path+. - # - # source://actionpack//lib/action_dispatch/http/upload.rb#79 - def to_path; end -end - -# source://actionpack//lib/action_dispatch.rb#40 -class ActionDispatch::IllegalStateError < ::StandardError; end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#11 -module ActionDispatch::Integration; end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#12 -module ActionDispatch::Integration::RequestHelpers - # Performs a DELETE request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#39 - def delete(path, **args); end - - # Follow a single redirect response. If the last response was not a - # redirect, an exception will be raised. Otherwise, the redirect is - # performed on the location header. If the redirection is a 307 or 308 redirect, - # the same HTTP verb will be used when redirecting, otherwise a GET request - # will be performed. Any arguments are passed to the - # underlying request. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#61 - def follow_redirect!(**args); end - - # Performs a GET request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#15 - def get(path, **args); end - - # Performs a HEAD request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#45 - def head(path, **args); end - - # Performs an OPTIONS request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#51 - def options(path, **args); end - - # Performs a PATCH request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#27 - def patch(path, **args); end - - # Performs a POST request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#21 - def post(path, **args); end - - # Performs a PUT request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#33 - def put(path, **args); end -end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#316 -module ActionDispatch::Integration::Runner - include ::ActionDispatch::Assertions::ResponseAssertions - include ::ActionDispatch::Assertions::RoutingAssertions - include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions - include ::Rails::Dom::Testing::Assertions - include ::ActionDispatch::Assertions - - # source://actionpack//lib/action_dispatch/testing/integration.rb#324 - def initialize(*args, &blk); end - - # Returns the value of attribute app. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#321 - def app; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#395 - def assertions; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#399 - def assertions=(assertions); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def assigns(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#329 - def before_setup; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def cookies(*_arg0, **_arg1, &_arg2); end - - # Copy the instance variables from the current session instance into the - # test instance. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#405 - def copy_session_variables!; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#344 - def create_session(app); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#411 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#415 - def default_url_options=(options); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def delete(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def follow_redirect!(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def get(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def head(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#334 - def integration_session; end - - # Open a new session instance. If a block is given, the new session is - # yielded to the block before being returned. - # - # session = open_session do |sess| - # sess.extend(CustomAssertions) - # end - # - # By default, a single session is automatically created for you, but you - # can use this method to open multiple sessions that ought to be tested - # simultaneously. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#387 - def open_session; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def patch(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def post(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#367 - def put(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#356 - def remove!; end - - # Reset the current session. This is useful for testing multiple sessions - # in a single test case. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#340 - def reset!; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#322 - def root_session; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#322 - def root_session=(_arg0); end - - private - - # Delegate unhandled messages to the current session instance. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#425 - def method_missing(method, *args, **_arg2, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#420 - def respond_to_missing?(method, _); end -end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#319 -ActionDispatch::Integration::Runner::APP_SESSIONS = T.let(T.unsafe(nil), Hash) - -# An instance of this class represents a set of requests and responses -# performed sequentially by a test process. Because you can instantiate -# multiple sessions and run them side-by-side, you can also mimic (to some -# limited extent) multiple simultaneous users interacting with your system. -# -# Typically, you will instantiate a new session using -# IntegrationTest#open_session, rather than instantiating -# Integration::Session directly. -# -# source://actionpack//lib/action_dispatch/testing/integration.rb#84 -class ActionDispatch::Integration::Session - include ::Minitest::Assertions - include ::ActionDispatch::Assertions::ResponseAssertions - include ::ActionDispatch::Assertions::RoutingAssertions - include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions - include ::Rails::Dom::Testing::Assertions - include ::ActionDispatch::Assertions - include ::ActionDispatch::Integration::RequestHelpers - include ::ActionDispatch::TestProcess::FixtureFile - include ::ActionDispatch::TestProcess - include ::ActionDispatch::Routing::PolymorphicRoutes - include ::ActionDispatch::Routing::UrlFor - - # Create and initialize a new Session instance. - # - # @return [Session] a new instance of Session - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#126 - def initialize(app); end - - # The Accept header to send. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#103 - def accept; end - - # The Accept header to send. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#103 - def accept=(_arg0); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#90 - def body(*_arg0, **_arg1, &_arg2); end - - # A reference to the controller instance used by the last request. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#112 - def controller; end - - # A map of the cookies returned by the last response, and which will be - # sent with the next request. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#107 - def cookies; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#90 - def headers(*_arg0, **_arg1, &_arg2); end - - # The hostname used in the last request. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#94 - def host; end - - # Sets the attribute host - # Set the host name to use in the next request. - # - # session.host! "www.example.com" - # - # @param value the value to set the attribute host to. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#97 - def host!(_arg0); end - - # Sets the attribute host - # - # @param value the value to set the attribute host to. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#97 - def host=(_arg0); end - - # Specify whether or not the session should mimic a secure HTTPS request. - # - # session.https! - # session.https!(false) - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#174 - def https!(flag = T.unsafe(nil)); end - - # Returns +true+ if the session is mimicking a secure HTTPS request. - # - # if session.https? - # ... - # end - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#183 - def https?; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#91 - def path(*_arg0, **_arg1, &_arg2); end - - # Performs the actual request. - # - # - +method+: The HTTP method (GET, POST, PATCH, PUT, DELETE, HEAD, OPTIONS) - # as a symbol. - # - +path+: The URI (as a String) on which you want to perform the - # request. - # - +params+: The HTTP parameters that you want to pass. This may - # be +nil+, - # a Hash, or a String that is appropriately encoded - # (application/x-www-form-urlencoded or - # multipart/form-data). - # - +headers+: Additional headers to pass, as a Hash. The headers will be - # merged into the Rack env hash. - # - +env+: Additional env to pass, as a Hash. The headers will be - # merged into the Rack env hash. - # - +xhr+: Set to +true+ if you want to make an Ajax request. - # Adds request headers characteristic of XMLHttpRequest e.g. HTTP_X_REQUESTED_WITH. - # The headers will be merged into the Rack env hash. - # - +as+: Used for encoding the request with different content type. - # Supports +:json+ by default and will set the appropriate request headers. - # The headers will be merged into the Rack env hash. - # - # This method is rarely used directly. Use +#get+, +#post+, or other standard - # HTTP methods in integration tests. +#process+ is only required when using a - # request method that doesn't have a method defined in the integration tests. - # - # This method returns the response status, after performing the request. - # Furthermore, if this method was called from an ActionDispatch::IntegrationTest object, - # then that object's @response instance variable will point to a Response object - # which one can use to inspect the details of the response. - # - # Example: - # process :get, '/author', params: { since: 201501011400 } - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#220 - def process(method, path, params: T.unsafe(nil), headers: T.unsafe(nil), env: T.unsafe(nil), xhr: T.unsafe(nil), as: T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#90 - def redirect?(*_arg0, **_arg1, &_arg2); end - - # The remote_addr used in the last request. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#100 - def remote_addr; end - - # The remote_addr used in the last request. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#100 - def remote_addr=(_arg0); end - - # A reference to the request instance used by the last request. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#115 - def request; end - - # A running counter of the number of requests processed. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#121 - def request_count; end - - # A running counter of the number of requests processed. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#121 - def request_count=(_arg0); end - - # Resets the instance. This can be used to reset the state information - # in an existing session instance, so it can be used from a clean-slate - # condition. - # - # session.reset! - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#150 - def reset!; end - - # A reference to the response instance used by the last request. - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#118 - def response; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#90 - def status(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#90 - def status_message(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#133 - def url_options; end - - private - - # source://actionpack//lib/action_dispatch/testing/integration.rb#300 - def _mock_session; end - - # @yield [location] - # - # source://actionpack//lib/action_dispatch/testing/integration.rb#308 - def build_expanded_path(path); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#304 - def build_full_uri(path, env); end - - class << self - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(value); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - end -end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#85 -ActionDispatch::Integration::Session::DEFAULT_HOST = T.let(T.unsafe(nil), String) - -# An integration test spans multiple controllers and actions, -# tying them all together to ensure they work together as expected. It tests -# more completely than either unit or functional tests do, exercising the -# entire stack, from the dispatcher to the database. -# -# At its simplest, you simply extend IntegrationTest and write your tests -# using the get/post methods: -# -# require "test_helper" -# -# class ExampleTest < ActionDispatch::IntegrationTest -# fixtures :people -# -# def test_login -# # get the login page -# get "/login" -# assert_equal 200, status -# -# # post the login and follow through to the home page -# post "/login", params: { username: people(:jamis).username, -# password: people(:jamis).password } -# follow_redirect! -# assert_equal 200, status -# assert_equal "/home", path -# end -# end -# -# However, you can also have multiple session instances open per test, and -# even extend those instances with assertions and methods to create a very -# powerful testing DSL that is specific for your application. You can even -# reference any named routes you happen to have defined. -# -# require "test_helper" -# -# class AdvancedTest < ActionDispatch::IntegrationTest -# fixtures :people, :rooms -# -# def test_login_and_speak -# jamis, david = login(:jamis), login(:david) -# room = rooms(:office) -# -# jamis.enter(room) -# jamis.speak(room, "anybody home?") -# -# david.enter(room) -# david.speak(room, "hello!") -# end -# -# private -# -# module CustomAssertions -# def enter(room) -# # reference a named route, for maximum internal consistency! -# get(room_url(id: room.id)) -# assert(...) -# ... -# end -# -# def speak(room, message) -# post "/say/#{room.id}", xhr: true, params: { message: message } -# assert(...) -# ... -# end -# end -# -# def login(who) -# open_session do |sess| -# sess.extend(CustomAssertions) -# who = people(who) -# sess.post "/login", params: { username: who.username, -# password: who.password } -# assert(...) -# end -# end -# end -# -# Another longer example would be: -# -# A simple integration test that exercises multiple controllers: -# -# require "test_helper" -# -# class UserFlowsTest < ActionDispatch::IntegrationTest -# test "login and browse site" do -# # login via https -# https! -# get "/login" -# assert_response :success -# -# post "/login", params: { username: users(:david).username, password: users(:david).password } -# follow_redirect! -# assert_equal '/welcome', path -# assert_equal 'Welcome david!', flash[:notice] -# -# https!(false) -# get "/articles/all" -# assert_response :success -# assert_select 'h1', 'Articles' -# end -# end -# -# As you can see the integration test involves multiple controllers and -# exercises the entire stack from database to dispatcher. In addition you can -# have multiple session instances open simultaneously in a test and extend -# those instances with assertion methods to create a very powerful testing -# DSL (domain-specific language) just for your application. -# -# Here's an example of multiple sessions and custom DSL in an integration test -# -# require "test_helper" -# -# class UserFlowsTest < ActionDispatch::IntegrationTest -# test "login and browse site" do -# # User david logs in -# david = login(:david) -# # User guest logs in -# guest = login(:guest) -# -# # Both are now available in different sessions -# assert_equal 'Welcome david!', david.flash[:notice] -# assert_equal 'Welcome guest!', guest.flash[:notice] -# -# # User david can browse site -# david.browses_site -# # User guest can browse site as well -# guest.browses_site -# -# # Continue with other assertions -# end -# -# private -# -# module CustomDsl -# def browses_site -# get "/products/all" -# assert_response :success -# assert_select 'h1', 'Products' -# end -# end -# -# def login(user) -# open_session do |sess| -# sess.extend(CustomDsl) -# u = users(user) -# sess.https! -# sess.post "/login", params: { username: u.username, password: u.password } -# assert_equal '/welcome', sess.path -# sess.https!(false) -# end -# end -# end -# -# See the {request helpers documentation}[rdoc-ref:ActionDispatch::Integration::RequestHelpers] for help on how to -# use +get+, etc. -# -# === Changing the request encoding -# -# You can also test your JSON API easily by setting what the request should -# be encoded as: -# -# require "test_helper" -# -# class ApiTest < ActionDispatch::IntegrationTest -# test "creates articles" do -# assert_difference -> { Article.count } do -# post articles_path, params: { article: { title: "Ahoy!" } }, as: :json -# end -# -# assert_response :success -# assert_equal({ id: Article.last.id, title: "Ahoy!" }, response.parsed_body) -# end -# end -# -# The +as+ option passes an "application/json" Accept header (thereby setting -# the request format to JSON unless overridden), sets the content type to -# "application/json" and encodes the parameters as JSON. -# -# Calling +parsed_body+ on the response parses the response body based on the -# last response MIME type. -# -# Out of the box, only :json is supported. But for any custom MIME -# types you've registered, you can add your own encoders with: -# -# ActionDispatch::IntegrationTest.register_encoder :wibble, -# param_encoder: -> params { params.to_wibble }, -# response_parser: -> body { body } -# -# Where +param_encoder+ defines how the params should be encoded and -# +response_parser+ defines how the response body should be parsed through -# +parsed_body+. -# -# Consult the Rails Testing Guide for more. -# -# source://actionpack//lib/action_dispatch/testing/integration.rb#631 -class ActionDispatch::IntegrationTest < ::ActiveSupport::TestCase - include ::ActionDispatch::TestProcess::FixtureFile - include ::ActionDispatch::Assertions::ResponseAssertions - include ::ActionDispatch::Assertions::RoutingAssertions - include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions - include ::Rails::Dom::Testing::Assertions - include ::ActionDispatch::Assertions - include ::ActionDispatch::Integration::Runner - include ::ActionController::TemplateAssertions - include ::ActionDispatch::IntegrationTest::Behavior - include ::ActionDispatch::Routing::PolymorphicRoutes - include ::ActionDispatch::Routing::UrlFor - include ::ActionDispatch::IntegrationTest::UrlOptions - extend ::ActionDispatch::IntegrationTest::Behavior::ClassMethods -end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#641 -module ActionDispatch::IntegrationTest::Behavior - include ::ActionDispatch::Assertions::ResponseAssertions - include ::ActionDispatch::Assertions::RoutingAssertions - include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions - include ::Rails::Dom::Testing::Assertions - include ::ActionDispatch::Assertions - include ::ActionDispatch::Integration::Runner - include ::ActionController::TemplateAssertions - extend ::ActiveSupport::Concern - include ::ActionDispatch::Routing::UrlFor - include ::ActionDispatch::IntegrationTest::UrlOptions - - mixes_in_class_methods ::ActionDispatch::IntegrationTest::Behavior::ClassMethods - - # source://actionpack//lib/action_dispatch/testing/integration.rb#672 - def app; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#676 - def document_root_element; end -end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#654 -module ActionDispatch::IntegrationTest::Behavior::ClassMethods - # source://actionpack//lib/action_dispatch/testing/integration.rb#655 - def app; end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#663 - def app=(app); end - - # source://actionpack//lib/action_dispatch/testing/integration.rb#667 - def register_encoder(*args, **options); end -end - -# source://actionpack//lib/action_dispatch/testing/integration.rb#634 -module ActionDispatch::IntegrationTest::UrlOptions - extend ::ActiveSupport::Concern - - # source://actionpack//lib/action_dispatch/testing/integration.rb#636 - def url_options; end -end - -# :stopdoc: -# -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#4 -module ActionDispatch::Journey; end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#7 -class ActionDispatch::Journey::Ast - # @return [Ast] a new instance of Ast - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#11 - def initialize(tree, formatted); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#37 - def glob?; end - - # Returns the value of attribute names. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 - def names; end - - # Returns the value of attribute path_params. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 - def path_params; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#23 - def requirements=(requirements); end - - # Returns the value of attribute tree. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 - def root; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#33 - def route=(route); end - - # Returns the value of attribute terminals. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 - def terminals; end - - # Returns the value of attribute tree. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 - def tree; end - - # Returns the value of attribute wildcard_options. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 - def wildcard_options; end - - private - - # Returns the value of attribute stars. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#42 - def stars; end - - # Returns the value of attribute symbols. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#42 - def symbols; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#44 - def visit_tree(formatted); end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#6 -class ActionDispatch::Journey::Format - # @return [Format] a new instance of Format - # - # source://actionpack//lib/action_dispatch/journey/visitors.rb#22 - def initialize(parts); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#37 - def evaluate(hash); end - - class << self - # source://actionpack//lib/action_dispatch/journey/visitors.rb#14 - def required_path(symbol); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#18 - def required_segment(symbol); end - end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#7 -ActionDispatch::Journey::Format::ESCAPE_PATH = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#8 -ActionDispatch::Journey::Format::ESCAPE_SEGMENT = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#10 -class ActionDispatch::Journey::Format::Parameter < ::Struct - # source://actionpack//lib/action_dispatch/journey/visitors.rb#11 - def escape(value); end - - # Returns the value of attribute escaper - # - # @return [Object] the current value of escaper - def escaper; end - - # Sets the attribute escaper - # - # @param value [Object] the value to set the attribute escaper to. - # @return [Object] the newly set value - def escaper=(_); end - - # Returns the value of attribute name - # - # @return [Object] the current value of name - def name; end - - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# The Formatter class is used for formatting URLs. For example, parameters -# passed to +url_for+ in Rails will eventually call Formatter#generate. -# -# source://actionpack//lib/action_dispatch/journey/formatter.rb#10 -class ActionDispatch::Journey::Formatter - # @return [Formatter] a new instance of Formatter - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#13 - def initialize(routes); end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#97 - def clear; end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#59 - def generate(name, options, path_parameters); end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#11 - def routes; end - - private - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#196 - def build_cache; end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#207 - def cache; end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#102 - def extract_parameterized_parts(route, options, recall); end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#129 - def match_route(name, options); end - - # Returns an array populated with missing keys if any are present. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#168 - def missing_keys(route, parts); end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#125 - def named_routes; end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#151 - def non_recursive(cache, options); end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#188 - def possibles(cache, options, depth = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_dispatch/journey/formatter.rb#32 -class ActionDispatch::Journey::Formatter::MissingRoute - # @return [MissingRoute] a new instance of MissingRoute - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#35 - def initialize(constraints, missing_keys, unmatched_keys, routes, name); end - - # Returns the value of attribute constraints. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 - def constraints; end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#51 - def message; end - - # Returns the value of attribute missing_keys. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 - def missing_keys; end - - # Returns the value of attribute name. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 - def name; end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#47 - def params; end - - # @raise [ActionController::UrlGenerationError] - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#43 - def path(method_name); end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 - def routes; end - - # Returns the value of attribute unmatched_keys. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 - def unmatched_keys; end -end - -# source://actionpack//lib/action_dispatch/journey/formatter.rb#18 -class ActionDispatch::Journey::Formatter::RouteWithParams - # @return [RouteWithParams] a new instance of RouteWithParams - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#21 - def initialize(route, parameterized_parts, params); end - - # Returns the value of attribute params. - # - # source://actionpack//lib/action_dispatch/journey/formatter.rb#19 - def params; end - - # source://actionpack//lib/action_dispatch/journey/formatter.rb#27 - def path(_); end -end - -# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#7 -module ActionDispatch::Journey::GTG; end - -# source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#8 -class ActionDispatch::Journey::GTG::Builder - # @return [Builder] a new instance of Builder - # - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#13 - def initialize(root); end - - # Returns the value of attribute ast. - # - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#11 - def ast; end - - # Returns the value of attribute endpoints. - # - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#11 - def endpoints; end - - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#86 - def firstpos(node); end - - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#107 - def lastpos(node); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#64 - def nullable?(node); end - - # Returns the value of attribute root. - # - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#11 - def root; end - - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#19 - def transition_table; end - - private - - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#129 - def build_followpos; end - - # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#142 - def symbol(edge); end -end - -# source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#9 -ActionDispatch::Journey::GTG::Builder::DUMMY_END_NODE = T.let(T.unsafe(nil), ActionDispatch::Journey::Nodes::Dummy) - -# source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#8 -class ActionDispatch::Journey::GTG::MatchData - # @return [MatchData] a new instance of MatchData - # - # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#11 - def initialize(memos); end - - # Returns the value of attribute memos. - # - # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#9 - def memos; end -end - -# source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#16 -class ActionDispatch::Journey::GTG::Simulator - # @return [Simulator] a new instance of Simulator - # - # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#21 - def initialize(transition_table); end - - # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#25 - def memos(string); end - - # Returns the value of attribute tt. - # - # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#19 - def tt; end -end - -# source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#17 -ActionDispatch::Journey::GTG::Simulator::INITIAL_STATE = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#8 -class ActionDispatch::Journey::GTG::TransitionTable - include ::ActionDispatch::Journey::NFA::Dot - - # @return [TransitionTable] a new instance of TransitionTable - # - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#16 - def initialize; end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#163 - def []=(from, to, sym); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#32 - def accepting?(state); end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#28 - def accepting_states; end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#24 - def add_accepting(state); end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#36 - def add_memo(idx, memo); end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#98 - def as_json(options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#44 - def eclosure(t); end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#40 - def memo(idx); end - - # Returns the value of attribute memos. - # - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#11 - def memos; end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#48 - def move(t, full_string, start_index, end_index); end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#180 - def states; end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#115 - def to_svg; end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#187 - def transitions; end - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#125 - def visualizer(paths, title = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#198 - def states_hash_for(sym); end -end - -# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#13 -ActionDispatch::Journey::GTG::TransitionTable::DEFAULT_EXP = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#14 -ActionDispatch::Journey::GTG::TransitionTable::DEFAULT_EXP_ANCHORED = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/nfa/dot.rb#5 -module ActionDispatch::Journey::NFA; end - -# source://actionpack//lib/action_dispatch/journey/nfa/dot.rb#6 -module ActionDispatch::Journey::NFA::Dot - # source://actionpack//lib/action_dispatch/journey/nfa/dot.rb#7 - def to_dot; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#67 -module ActionDispatch::Journey::Nodes; end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#180 -class ActionDispatch::Journey::Nodes::Binary < ::ActionDispatch::Journey::Nodes::Node - # @return [Binary] a new instance of Binary - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#183 - def initialize(left, right); end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#188 - def children; end - - # Returns the value of attribute right. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#181 - def right; end - - # Sets the attribute right - # - # @param value the value to set the attribute right to. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#181 - def right=(_arg0); end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#191 -class ActionDispatch::Journey::Nodes::Cat < ::ActionDispatch::Journey::Nodes::Binary - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#192 - def cat?; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#193 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#132 -class ActionDispatch::Journey::Nodes::Dot < ::ActionDispatch::Journey::Nodes::Terminal - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#133 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#120 -class ActionDispatch::Journey::Nodes::Dummy < ::ActionDispatch::Journey::Nodes::Literal - # @return [Dummy] a new instance of Dummy - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#121 - def initialize(x = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#125 - def literal?; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#157 -class ActionDispatch::Journey::Nodes::Group < ::ActionDispatch::Journey::Nodes::Unary - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#159 - def group?; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#158 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#115 -class ActionDispatch::Journey::Nodes::Literal < ::ActionDispatch::Journey::Nodes::Terminal - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#116 - def literal?; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#117 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#68 -class ActionDispatch::Journey::Nodes::Node - include ::Enumerable - - # @return [Node] a new instance of Node - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#73 - def initialize(left); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#106 - def cat?; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#78 - def each(&block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#107 - def group?; end - - # Returns the value of attribute left. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 - def left; end - - # Sets the attribute left - # - # @param value the value to set the attribute left to. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 - def left=(_arg0); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#103 - def literal?; end - - # Returns the value of attribute memo. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 - def memo; end - - # Sets the attribute memo - # - # @param value the value to set the attribute memo to. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 - def memo=(_arg0); end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#94 - def name; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#105 - def star?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#102 - def symbol?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#104 - def terminal?; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#86 - def to_dot; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#82 - def to_s; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#90 - def to_sym; end - - # @raise [NotImplementedError] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#98 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#196 -class ActionDispatch::Journey::Nodes::Or < ::ActionDispatch::Journey::Nodes::Node - # @return [Or] a new instance of Or - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#199 - def initialize(children); end - - # Returns the value of attribute children. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#197 - def children; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#203 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#128 -class ActionDispatch::Journey::Nodes::Slash < ::ActionDispatch::Journey::Nodes::Terminal - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#129 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#162 -class ActionDispatch::Journey::Nodes::Star < ::ActionDispatch::Journey::Nodes::Unary - # @return [Star] a new instance of Star - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#165 - def initialize(left); end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#175 - def name; end - - # Returns the value of attribute regexp. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#163 - def regexp; end - - # Sets the attribute regexp - # - # @param value the value to set the attribute regexp to. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#163 - def regexp=(_arg0); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#172 - def star?; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#173 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#136 -class ActionDispatch::Journey::Nodes::Symbol < ::ActionDispatch::Journey::Nodes::Terminal - # @return [Symbol] a new instance of Symbol - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#143 - def initialize(left, regexp = T.unsafe(nil)); end - - # Returns the value of attribute name. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#139 - def name; end - - # Returns the value of attribute regexp. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#137 - def regexp; end - - # Sets the attribute regexp - # - # @param value the value to set the attribute regexp to. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#137 - def regexp=(_arg0); end - - # Returns the value of attribute regexp. - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#137 - def symbol; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#150 - def symbol?; end - - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#149 - def type; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#141 -ActionDispatch::Journey::Nodes::Symbol::DEFAULT_EXP = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#142 -ActionDispatch::Journey::Nodes::Symbol::GREEDY_EXP = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#110 -class ActionDispatch::Journey::Nodes::Terminal < ::ActionDispatch::Journey::Nodes::Node - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 - def symbol; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#112 - def terminal?; end -end - -# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#153 -class ActionDispatch::Journey::Nodes::Unary < ::ActionDispatch::Journey::Nodes::Node - # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#154 - def children; end -end - -# source://actionpack//lib/action_dispatch/journey/parser_extras.rb#9 -class ActionDispatch::Journey::Parser < ::Racc::Parser - include ::ActionDispatch::Journey::Nodes - - # @return [Parser] a new instance of Parser - # - # source://actionpack//lib/action_dispatch/journey/parser_extras.rb#16 - def initialize; end - - # reduce 0 omitted - # - # source://actionpack//lib/action_dispatch/journey/parser.rb#137 - def _reduce_1(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#165 - def _reduce_10(val, _values); end - - # reduce 14 omitted - # - # source://actionpack//lib/action_dispatch/journey/parser.rb#177 - def _reduce_15(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#181 - def _reduce_16(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#185 - def _reduce_17(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#189 - def _reduce_18(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#141 - def _reduce_2(val, _values); end - - # reduce 6 omitted - # - # source://actionpack//lib/action_dispatch/journey/parser.rb#153 - def _reduce_7(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#157 - def _reduce_8(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#161 - def _reduce_9(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser.rb#193 - def _reduce_none(val, _values); end - - # source://actionpack//lib/action_dispatch/journey/parser_extras.rb#25 - def next_token; end - - # source://actionpack//lib/action_dispatch/journey/parser_extras.rb#20 - def parse(string); end - - class << self - # source://actionpack//lib/action_dispatch/journey/parser_extras.rb#12 - def parse(string); end - end -end - -# source://actionpack//lib/action_dispatch/journey/parser.rb#92 -ActionDispatch::Journey::Parser::Racc_arg = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/journey/parser.rb#131 -ActionDispatch::Journey::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) - -# source://actionpack//lib/action_dispatch/journey/parser.rb#108 -ActionDispatch::Journey::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#5 -module ActionDispatch::Journey::Path; end - -# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#6 -class ActionDispatch::Journey::Path::Pattern - # @return [Pattern] a new instance of Pattern - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#9 - def initialize(ast, requirements, separators, anchored); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#156 - def =~(other); end - - # Returns the value of attribute anchored. - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 - def anchored; end - - # Returns the value of attribute ast. - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 - def ast; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#23 - def build_formatter; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#27 - def eager_load!; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#156 - def match(other); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#162 - def match?(other); end - - # Returns the value of attribute names. - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 - def names; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#59 - def optional_names; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#55 - def required_names; end - - # Returns the value of attribute requirements. - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 - def requirements; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#34 - def requirements_anchored?; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#174 - def requirements_for_missing_keys_check; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#166 - def source; end - - # Returns the value of attribute spec. - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 - def spec; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#170 - def to_regexp; end - - private - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#185 - def offsets; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#181 - def regexp_visitor; end -end - -# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#65 -class ActionDispatch::Journey::Path::Pattern::AnchoredRegexp < ::ActionDispatch::Journey::Visitors::Visitor - # @return [AnchoredRegexp] a new instance of AnchoredRegexp - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#66 - def initialize(separator, matchers); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#73 - def accept(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#77 - def visit_CAT(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#94 - def visit_DOT(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#90 - def visit_GROUP(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#94 - def visit_LITERAL(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#108 - def visit_OR(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#99 - def visit_SLASH(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#103 - def visit_STAR(node); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#81 - def visit_SYMBOL(node); end -end - -# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#121 -class ActionDispatch::Journey::Path::Pattern::MatchData - # @return [MatchData] a new instance of MatchData - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#124 - def initialize(names, offsets, match); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#138 - def [](x); end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#130 - def captures; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#143 - def length; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#134 - def named_captures; end - - # Returns the value of attribute names. - # - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#122 - def names; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#147 - def post_match; end - - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#151 - def to_s; end -end - -# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#114 -class ActionDispatch::Journey::Path::Pattern::UnanchoredRegexp < ::ActionDispatch::Journey::Path::Pattern::AnchoredRegexp - # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#115 - def accept(node); end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#6 -class ActionDispatch::Journey::Route - # +path+ is a path constraint. - # +constraints+ is a hash of constraints to be applied to this route. - # - # @return [Route] a new instance of Route - # - # source://actionpack//lib/action_dispatch/journey/route.rb#56 - def initialize(name:, path:, app: T.unsafe(nil), constraints: T.unsafe(nil), required_defaults: T.unsafe(nil), defaults: T.unsafe(nil), request_method_match: T.unsafe(nil), precedence: T.unsafe(nil), scope_options: T.unsafe(nil), internal: T.unsafe(nil)); end - - # Returns the value of attribute app. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def app; end - - # Returns the value of attribute ast. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def ast; end - - # Returns the value of attribute constraints. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def conditions; end - - # Returns the value of attribute constraints. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def constraints; end - - # Returns the value of attribute defaults. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def defaults; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/route.rb#141 - def dispatcher?; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#77 - def eager_load!; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#119 - def format(path_options); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/route.rb#137 - def glob?; end - - # Returns the value of attribute internal. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def internal; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#163 - def ip; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/route.rb#145 - def matches?(request); end - - # Returns the value of attribute name. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def name; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#114 - def parts; end - - # Returns the value of attribute path. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def path; end - - # Returns the value of attribute precedence. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def precedence; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/route.rb#127 - def required_default?(key); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#131 - def required_defaults; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#102 - def required_keys; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#123 - def required_parts; end - - # Needed for `bin/rails routes`. Picks up succinctly defined requirements - # for a route, for example route - # - # get 'photo/:id', :controller => 'photos', :action => 'show', - # :id => /[A-Z]\d{5}/ - # - # will have {:controller=>"photos", :action=>"show", :id=>/[A-Z]\d{5}/} - # as requirements. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#92 - def requirements; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/route.rb#167 - def requires_matching_verb?; end - - # Returns the value of attribute scope_options. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#7 - def scope_options; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#106 - def score(supplied_keys); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#114 - def segment_keys; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#98 - def segments; end - - # source://actionpack//lib/action_dispatch/journey/route.rb#171 - def verb; end - - private - - # source://actionpack//lib/action_dispatch/journey/route.rb#180 - def match_verb(request); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#176 - def verbs; end - - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#47 - def verb_matcher(verb); end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#12 -module ActionDispatch::Journey::Route::VerbMatchers; end - -# source://actionpack//lib/action_dispatch/journey/route.rb#34 -class ActionDispatch::Journey::Route::VerbMatchers::All - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#35 - def call(_); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#36 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::DELETE - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::GET - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::HEAD - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::LINK - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::OPTIONS - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::PATCH - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::POST - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::PUT - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::TRACE - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#17 -class ActionDispatch::Journey::Route::VerbMatchers::UNLINK - class << self - # source://actionpack//lib/action_dispatch/journey/route.rb#19 - def call(req); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#18 - def verb; end - end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#24 -class ActionDispatch::Journey::Route::VerbMatchers::Unknown - # @return [Unknown] a new instance of Unknown - # - # source://actionpack//lib/action_dispatch/journey/route.rb#27 - def initialize(verb); end - - # source://actionpack//lib/action_dispatch/journey/route.rb#31 - def call(request); end - - # Returns the value of attribute verb. - # - # source://actionpack//lib/action_dispatch/journey/route.rb#25 - def verb; end -end - -# source://actionpack//lib/action_dispatch/journey/route.rb#13 -ActionDispatch::Journey::Route::VerbMatchers::VERBS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/journey/route.rb#39 -ActionDispatch::Journey::Route::VerbMatchers::VERB_TO_CLASS = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#5 -class ActionDispatch::Journey::Router - # @return [Router] a new instance of Router - # - # source://actionpack//lib/action_dispatch/journey/router.rb#20 - def initialize(routes); end - - # source://actionpack//lib/action_dispatch/journey/router.rb#24 - def eager_load!; end - - # source://actionpack//lib/action_dispatch/journey/router.rb#65 - def recognize(rails_req); end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_dispatch/journey/router.rb#18 - def routes; end - - # Sets the attribute routes - # - # @param value the value to set the attribute routes to. - # - # source://actionpack//lib/action_dispatch/journey/router.rb#18 - def routes=(_arg0); end - - # source://actionpack//lib/action_dispatch/journey/router.rb#31 - def serve(req); end - - # source://actionpack//lib/action_dispatch/journey/router.rb#78 - def visualizer; end - - private - - # source://actionpack//lib/action_dispatch/journey/router.rb#92 - def ast; end - - # source://actionpack//lib/action_dispatch/journey/router.rb#100 - def custom_routes; end - - # source://actionpack//lib/action_dispatch/journey/router.rb#104 - def filter_routes(path); end - - # source://actionpack//lib/action_dispatch/journey/router.rb#109 - def find_routes(req); end - - # source://actionpack//lib/action_dispatch/journey/router.rb#134 - def match_head_routes(routes, req); end - - # source://actionpack//lib/action_dispatch/journey/router.rb#86 - def partitioned_routes; end - - # source://actionpack//lib/action_dispatch/journey/router.rb#96 - def simulator; end -end - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#6 -class ActionDispatch::Journey::Router::Utils - class << self - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#90 - def escape_fragment(fragment); end - - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#82 - def escape_path(path); end - - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#86 - def escape_segment(segment); end - - # Normalizes URI path. - # - # Strips off trailing slash and ensures there is a leading slash. - # Also converts downcase URL encoded string to uppercase. - # - # normalize_path("/foo") # => "/foo" - # normalize_path("/foo/") # => "/foo" - # normalize_path("foo") # => "/foo" - # normalize_path("") # => "/" - # normalize_path("/%ab") # => "/%AB" - # - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#17 - def normalize_path(path); end - - # Replaces any escaped sequences with their unescaped representations. - # - # uri = "/topics?title=Ruby%20on%20Rails" - # unescape_uri(uri) #=> "/topics?title=Ruby on Rails" - # - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#98 - def unescape_uri(uri); end - end -end - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#80 -ActionDispatch::Journey::Router::Utils::ENCODER = T.let(T.unsafe(nil), ActionDispatch::Journey::Router::Utils::UriEncoder) - -# URI path and fragment escaping -# https://tools.ietf.org/html/rfc3986 -# -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#33 -class ActionDispatch::Journey::Router::Utils::UriEncoder - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#51 - def escape_fragment(fragment); end - - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#55 - def escape_path(path); end - - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#59 - def escape_segment(segment); end - - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#63 - def unescape_uri(uri); end - - private - - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#69 - def escape(component, pattern); end - - # source://actionpack//lib/action_dispatch/journey/router/utils.rb#73 - def percent_encode(unsafe); end -end - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#40 -ActionDispatch::Journey::Router::Utils::UriEncoder::ALPHA = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#38 -ActionDispatch::Journey::Router::Utils::UriEncoder::DEC2HEX = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#41 -ActionDispatch::Journey::Router::Utils::UriEncoder::DIGIT = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#37 -ActionDispatch::Journey::Router::Utils::UriEncoder::EMPTY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#34 -ActionDispatch::Journey::Router::Utils::UriEncoder::ENCODE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#45 -ActionDispatch::Journey::Router::Utils::UriEncoder::ESCAPED = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#47 -ActionDispatch::Journey::Router::Utils::UriEncoder::FRAGMENT = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#49 -ActionDispatch::Journey::Router::Utils::UriEncoder::PATH = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#48 -ActionDispatch::Journey::Router::Utils::UriEncoder::SEGMENT = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#43 -ActionDispatch::Journey::Router::Utils::UriEncoder::SUB_DELIMS = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#42 -ActionDispatch::Journey::Router::Utils::UriEncoder::UNRESERVED = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#35 -ActionDispatch::Journey::Router::Utils::UriEncoder::US_ASCII = T.let(T.unsafe(nil), Encoding) - -# source://actionpack//lib/action_dispatch/journey/router/utils.rb#36 -ActionDispatch::Journey::Router::Utils::UriEncoder::UTF_8 = T.let(T.unsafe(nil), Encoding) - -# The Routing table. Contains all routes for a system. Routes can be -# added to the table by calling Routes#add_route. -# -# source://actionpack//lib/action_dispatch/journey/routes.rb#7 -class ActionDispatch::Journey::Routes - include ::Enumerable - - # @return [Routes] a new instance of Routes - # - # source://actionpack//lib/action_dispatch/journey/routes.rb#12 - def initialize; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#65 - def add_route(name, mapping); end - - # Returns the value of attribute anchored_routes. - # - # source://actionpack//lib/action_dispatch/journey/routes.rb#10 - def anchored_routes; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#51 - def ast; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#37 - def clear; end - - # Returns the value of attribute custom_routes. - # - # source://actionpack//lib/action_dispatch/journey/routes.rb#10 - def custom_routes; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#33 - def each(&block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/routes.rb#20 - def empty?; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#29 - def last; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#24 - def length; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#43 - def partition_route(route); end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_dispatch/journey/routes.rb#10 - def routes; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#58 - def simulator; end - - # source://actionpack//lib/action_dispatch/journey/routes.rb#24 - def size; end - - private - - # source://actionpack//lib/action_dispatch/journey/routes.rb#74 - def clear_cache!; end -end - -# source://actionpack//lib/action_dispatch/journey/scanner.rb#7 -class ActionDispatch::Journey::Scanner - # @return [Scanner] a new instance of Scanner - # - # source://actionpack//lib/action_dispatch/journey/scanner.rb#8 - def initialize; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/journey/scanner.rb#16 - def eos?; end - - # source://actionpack//lib/action_dispatch/journey/scanner.rb#28 - def next_token; end - - # source://actionpack//lib/action_dispatch/journey/scanner.rb#20 - def pos; end - - # source://actionpack//lib/action_dispatch/journey/scanner.rb#24 - def pre_match; end - - # source://actionpack//lib/action_dispatch/journey/scanner.rb#12 - def scan_setup(str); end - - private - - # takes advantage of String @- deduping capabilities in Ruby 2.5 upwards - # see: https://bugs.ruby-lang.org/issues/13077 - # - # source://actionpack//lib/action_dispatch/journey/scanner.rb#38 - def dedup_scan(regex); end - - # source://actionpack//lib/action_dispatch/journey/scanner.rb#43 - def scan; end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#53 -module ActionDispatch::Journey::Visitors; end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#194 -class ActionDispatch::Journey::Visitors::Dot < ::ActionDispatch::Journey::Visitors::FunctionalVisitor - # @return [Dot] a new instance of Dot - # - # source://actionpack//lib/action_dispatch/journey/visitors.rb#195 - def initialize; end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#200 - def accept(node, seed = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#215 - def binary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#222 - def nary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#254 - def terminal(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#229 - def unary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#239 - def visit_CAT(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#234 - def visit_GROUP(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#249 - def visit_OR(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#244 - def visit_STAR(node, seed); end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#260 -ActionDispatch::Journey::Visitors::Dot::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::Dot) - -# Loop through the requirements AST. -# -# source://actionpack//lib/action_dispatch/journey/visitors.rb#159 -class ActionDispatch::Journey::Visitors::Each < ::ActionDispatch::Journey::Visitors::FunctionalVisitor - # source://actionpack//lib/action_dispatch/journey/visitors.rb#160 - def visit(node, block); end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#165 -ActionDispatch::Journey::Visitors::Each::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::Each) - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#134 -class ActionDispatch::Journey::Visitors::FormatBuilder < ::ActionDispatch::Journey::Visitors::Visitor - # source://actionpack//lib/action_dispatch/journey/visitors.rb#135 - def accept(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#138 - def binary(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#136 - def terminal(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#142 - def visit_GROUP(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#144 - def visit_STAR(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#148 - def visit_SYMBOL(n); end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#95 -class ActionDispatch::Journey::Visitors::FunctionalVisitor - # source://actionpack//lib/action_dispatch/journey/visitors.rb#98 - def accept(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#106 - def binary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#111 - def nary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#122 - def terminal(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#116 - def unary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#102 - def visit(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#109 - def visit_CAT(n, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#126 - def visit_DOT(n, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#119 - def visit_GROUP(n, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#123 - def visit_LITERAL(n, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#114 - def visit_OR(n, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#125 - def visit_SLASH(n, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#120 - def visit_STAR(n, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#124 - def visit_SYMBOL(n, seed); end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#96 -ActionDispatch::Journey::Visitors::FunctionalVisitor::DISPATCH_CACHE = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#168 -class ActionDispatch::Journey::Visitors::String < ::ActionDispatch::Journey::Visitors::FunctionalVisitor - private - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#170 - def binary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#174 - def nary(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#183 - def terminal(node, seed); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#187 - def visit_GROUP(node, seed); end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#191 -ActionDispatch::Journey::Visitors::String::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::String) - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#54 -class ActionDispatch::Journey::Visitors::Visitor - # source://actionpack//lib/action_dispatch/journey/visitors.rb#57 - def accept(node); end - - private - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#66 - def binary(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#72 - def nary(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#83 - def terminal(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#77 - def unary(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#62 - def visit(node); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#70 - def visit_CAT(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#87 - def visit_DOT(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#80 - def visit_GROUP(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#84 - def visit_LITERAL(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#75 - def visit_OR(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#86 - def visit_SLASH(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#81 - def visit_STAR(n); end - - # source://actionpack//lib/action_dispatch/journey/visitors.rb#85 - def visit_SYMBOL(n); end -end - -# source://actionpack//lib/action_dispatch/journey/visitors.rb#55 -ActionDispatch::Journey::Visitors::Visitor::DISPATCH_CACHE = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/middleware/stack.rb#7 -class ActionDispatch::MiddlewareStack - include ::Enumerable - - # @return [MiddlewareStack] a new instance of MiddlewareStack - # @yield [_self] - # @yieldparam _self [ActionDispatch::MiddlewareStack] the object that the method was called on - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#70 - def initialize(*args); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#87 - def [](i); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#160 - def build(app = T.unsafe(nil), &block); end - - # Deletes a middleware from the middleware stack. - # - # Returns the array of middlewares not including the deleted item, or - # returns nil if the target is not found. - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#125 - def delete(target); end - - # Deletes a middleware from the middleware stack. - # - # Returns the array of middlewares not including the deleted item, or - # raises +RuntimeError+ if the target is not found. - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#133 - def delete!(target); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#75 - def each(&block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#100 - def insert(index, klass, *args, **_arg3, &block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#108 - def insert_after(index, *args, **_arg2, &block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#100 - def insert_before(index, klass, *args, **_arg3, &block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#83 - def last; end - - # Returns the value of attribute middlewares. - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#68 - def middlewares; end - - # Sets the attribute middlewares - # - # @param value the value to set the attribute middlewares to. - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#68 - def middlewares=(_arg0); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#137 - def move(target, source); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#147 - def move_after(target, source); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#137 - def move_before(target, source); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#79 - def size; end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#114 - def swap(target, *args, **_arg2, &block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#91 - def unshift(klass, *args, **_arg2, &block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#155 - def use(klass, *args, **_arg2, &block); end - - private - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#172 - def assert_index(index, where); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#178 - def build_middleware(klass, args, block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#182 - def index_of(klass); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#96 - def initialize_copy(other); end -end - -# This class is used to instrument the execution of a single middleware. -# It proxies the +call+ method transparently and instruments the method -# call. -# -# source://actionpack//lib/action_dispatch/middleware/stack.rb#48 -class ActionDispatch::MiddlewareStack::InstrumentationProxy - # @return [InstrumentationProxy] a new instance of InstrumentationProxy - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#51 - def initialize(middleware, class_name); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#59 - def call(env); end -end - -# source://actionpack//lib/action_dispatch/middleware/stack.rb#49 -ActionDispatch::MiddlewareStack::InstrumentationProxy::EVENT_NAME = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/stack.rb#8 -class ActionDispatch::MiddlewareStack::Middleware - # @return [Middleware] a new instance of Middleware - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#11 - def initialize(klass, args, block); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#19 - def ==(middleware); end - - # Returns the value of attribute args. - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#9 - def args; end - - # Returns the value of attribute block. - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#9 - def block; end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#36 - def build(app); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#40 - def build_instrumented(app); end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#28 - def inspect; end - - # Returns the value of attribute klass. - # - # source://actionpack//lib/action_dispatch/middleware/stack.rb#9 - def klass; end - - # source://actionpack//lib/action_dispatch/middleware/stack.rb#17 - def name; end -end - -# source://actionpack//lib/action_dispatch.rb#43 -class ActionDispatch::MissingController < ::NameError; end - -# Configures the HTTP -# {Feature-Policy}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy] -# response header to specify which browser features the current document and -# its iframes can use. -# -# Example global policy: -# -# Rails.application.config.permissions_policy do |policy| -# policy.camera :none -# policy.gyroscope :none -# policy.microphone :none -# policy.usb :none -# policy.fullscreen :self -# policy.payment :self, "https://secure.example.com" -# end -# -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#22 -class ActionDispatch::PermissionsPolicy - # @return [PermissionsPolicy] a new instance of PermissionsPolicy - # @yield [_self] - # @yieldparam _self [ActionDispatch::PermissionsPolicy] the object that the method was called on - # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#106 - def initialize; end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def accelerometer(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def ambient_light_sensor(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def autoplay(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#125 - def build(context = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def camera(*sources); end - - # Returns the value of attribute directives. - # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#104 - def directives; end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def encrypted_media(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def fullscreen(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def geolocation(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def gyroscope(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def magnetometer(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def microphone(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def midi(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def payment(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def picture_in_picture(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def speaker(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def usb(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def vibrate(*sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 - def vr(*sources); end - - private - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#143 - def apply_mapping(source); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#130 - def apply_mappings(sources); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#161 - def build_directive(sources, context); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#149 - def build_directives(context); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#111 - def initialize_copy(other); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#165 - def resolve_source(source, context); end -end - -# List of available permissions can be found at -# https://github.com/w3c/webappsec-permissions-policy/blob/master/features.md#policy-controlled-features -# -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#82 -ActionDispatch::PermissionsPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#75 -ActionDispatch::PermissionsPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#23 -class ActionDispatch::PermissionsPolicy::Middleware - # @return [Middleware] a new instance of Middleware - # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#32 - def initialize(app); end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#36 - def call(env); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#58 - def policy_empty?(policy); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#54 - def policy_present?(headers); end -end - -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#24 -ActionDispatch::PermissionsPolicy::Middleware::CONTENT_TYPE = T.let(T.unsafe(nil), String) - -# The Feature-Policy header has been renamed to Permissions-Policy. -# The Permissions-Policy requires a different implementation and isn't -# yet supported by all browsers. To avoid having to rename this -# middleware in the future we use the new name for the middleware but -# keep the old header name and implementation for now. -# -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#30 -ActionDispatch::PermissionsPolicy::Middleware::POLICY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#63 -module ActionDispatch::PermissionsPolicy::Request - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#66 - def permissions_policy; end - - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#70 - def permissions_policy=(policy); end -end - -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#64 -ActionDispatch::PermissionsPolicy::Request::POLICY = T.let(T.unsafe(nil), String) - -# When called, this middleware renders an error page. By default if an HTML -# response is expected it will render static error pages from the /public -# directory. For example when this middleware receives a 500 response it will -# render the template found in /public/500.html. -# If an internationalized locale is set, this middleware will attempt to render -# the template in /public/500..html. If an internationalized template -# is not found it will fall back on /public/500.html. -# -# When a request with a content type other than HTML is made, this middleware -# will attempt to convert error information into the appropriate response type. -# -# source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#14 -class ActionDispatch::PublicExceptions - # @return [PublicExceptions] a new instance of PublicExceptions - # - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#17 - def initialize(public_path); end - - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#21 - def call(env); end - - # Returns the value of attribute public_path. - # - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#15 - def public_path; end - - # Sets the attribute public_path - # - # @param value the value to set the attribute public_path to. - # - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#15 - def public_path=(_arg0); end - - private - - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#35 - def render(status, content_type, body); end - - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#44 - def render_format(status, content_type, body); end - - # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#49 - def render_html(status); end -end - -# source://actionpack//lib/action_dispatch/railtie.rb#7 -class ActionDispatch::Railtie < ::Rails::Railtie; end - -# ActionDispatch::Reloader wraps the request with callbacks provided by ActiveSupport::Reloader -# callbacks, intended to assist with code reloading during development. -# -# By default, ActionDispatch::Reloader is included in the middleware stack -# only in the development environment; specifically, when +config.cache_classes+ -# is false. -# -# source://actionpack//lib/action_dispatch/middleware/reloader.rb#10 -class ActionDispatch::Reloader < ::ActionDispatch::Executor; end - -# This middleware calculates the IP address of the remote client that is -# making the request. It does this by checking various headers that could -# contain the address, and then picking the last-set address that is not -# on the list of trusted IPs. This follows the precedent set by e.g. -# {the Tomcat server}[https://issues.apache.org/bugzilla/show_bug.cgi?id=50453], -# with {reasoning explained at length}[https://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection] -# by @gingerlime. A more detailed explanation of the algorithm is given -# at GetIp#calculate_ip. -# -# Some Rack servers concatenate repeated headers, like {HTTP RFC 2616}[https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2] -# requires. Some Rack servers simply drop preceding headers, and only report -# the value that was {given in the last header}[https://andre.arko.net/2011/12/26/repeated-headers-and-ruby-web-servers]. -# If you are behind multiple proxy servers (like NGINX to HAProxy to Unicorn) -# then you should test your Rack server to make sure your data is good. -# -# IF YOU DON'T USE A PROXY, THIS MAKES YOU VULNERABLE TO IP SPOOFING. -# This middleware assumes that there is at least one proxy sitting around -# and setting headers with the client's remote IP address. If you don't use -# a proxy, because you are hosted on e.g. Heroku without SSL, any client can -# claim to have any IP address by setting the +X-Forwarded-For+ header. If you -# care about that, then you need to explicitly drop or ignore those headers -# sometime before this middleware runs. -# -# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#28 -class ActionDispatch::RemoteIp - # Create a new +RemoteIp+ middleware instance. - # - # The +ip_spoofing_check+ option is on by default. When on, an exception - # is raised if it looks like the client is trying to lie about its own IP - # address. It makes sense to turn off this check on sites aimed at non-IP - # clients (like WAP devices), or behind proxies that set headers in an - # incorrect or confusing way (like AWS ELB). - # - # The +custom_proxies+ argument can take an enumerable which will be used - # instead of +TRUSTED_PROXIES+. Any proxy setup will put the value you - # want in the middle (or at the beginning) of the +X-Forwarded-For+ list, - # with your proxy servers after it. If your proxies aren't removed, pass - # them in via the +custom_proxies+ parameter. That way, the middleware will - # ignore those IP addresses, and return the one that you want. - # - # @return [RemoteIp] a new instance of RemoteIp - # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#60 - def initialize(app, ip_spoofing_check = T.unsafe(nil), custom_proxies = T.unsafe(nil)); end - - # Since the IP address may not be needed, we store the object here - # without calculating the IP to keep from slowing down the majority of - # requests. For those requests that do need to know the IP, the - # GetIp#calculate_ip method will calculate the memoized client IP address. - # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#90 - def call(env); end - - # Returns the value of attribute check_ip. - # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#44 - def check_ip; end - - # Returns the value of attribute proxies. - # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#44 - def proxies; end -end - -# The GetIp class exists as a way to defer processing of the request data -# into an actual IP address. If the ActionDispatch::Request#remote_ip method -# is called, this class will calculate the value and then memoize it. -# -# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#99 -class ActionDispatch::RemoteIp::GetIp - # @return [GetIp] a new instance of GetIp - # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#100 - def initialize(req, check_ip, proxies); end - - # Sort through the various IP address headers, looking for the IP most - # likely to be the address of the actual remote client making this - # request. - # - # REMOTE_ADDR will be correct if the request is made directly against the - # Ruby process, on e.g. Heroku. When the request is proxied by another - # server like HAProxy or NGINX, the IP address that made the original - # request will be put in an +X-Forwarded-For+ header. If there are multiple - # proxies, that header may contain a list of IPs. Other proxy services - # set the +Client-Ip+ header instead, so we check that too. - # - # As discussed in {this post about Rails IP Spoofing}[https://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection/], - # while the first IP in the list is likely to be the "originating" IP, - # it could also have been set by the client maliciously. - # - # In order to find the first address that is (probably) accurate, we - # take the list of IPs, remove known and trusted proxies, and then take - # the last address left, which was presumably set by one of those proxies. - # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#124 - def calculate_ip; end - - # Memoizes the value returned by #calculate_ip and returns it for - # ActionDispatch::Request to use. - # - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#167 - def to_s; end - - private - - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#186 - def filter_proxies(ips); end - - # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#172 - def ips_from(header); end -end - -# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#29 -class ActionDispatch::RemoteIp::IpSpoofAttackError < ::StandardError; end - -# The default trusted IPs list simply includes IP addresses that are -# guaranteed by the IP specification to be private addresses. Those will -# not be the ultimate client IP in production, and so are discarded. See -# https://en.wikipedia.org/wiki/Private_network for details. -# -# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#35 -ActionDispatch::RemoteIp::TRUSTED_PROXIES = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/request.rb#18 -class ActionDispatch::Request - include ::ActionDispatch::Flash::RequestMethods - include ::Rack::Request::Helpers - include ::ActionDispatch::Http::Cache::Request - include ::ActionDispatch::Http::MimeNegotiation - include ::ActionDispatch::Http::Parameters - include ::ActionDispatch::Http::FilterParameters - include ::ActionDispatch::Http::URL - include ::ActionDispatch::ContentSecurityPolicy::Request - include ::ActionDispatch::PermissionsPolicy::Request - include ::Rack::Request::Env - include ::ActionDispatch::RequestCookieMethods - extend ::ActionDispatch::Http::Parameters::ClassMethods - - # @return [Request] a new instance of Request - # - # source://actionpack//lib/action_dispatch/http/request.rb#60 - def initialize(env); end - - # Override Rack's GET method to support indifferent access. - # - # source://actionpack//lib/action_dispatch/http/request.rb#371 - def GET; end - - # Override Rack's POST method to support indifferent access. - # - # source://actionpack//lib/action_dispatch/http/request.rb#387 - def POST; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def accept; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def accept_charset; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def accept_encoding; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def accept_language; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def auth_type; end - - # Returns the authorization header regardless of whether it was specified directly or through one of the - # proxy alternatives. - # - # source://actionpack//lib/action_dispatch/http/request.rb#403 - def authorization; end - - # The request body is an IO input stream. If the RAW_POST_DATA environment - # variable is already set, wrap it in a StringIO. - # - # source://actionpack//lib/action_dispatch/http/request.rb#333 - def body; end - - # source://actionpack//lib/action_dispatch/http/request.rb#354 - def body_stream; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def cache_control; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def client_ip; end - - # source://actionpack//lib/action_dispatch/http/request.rb#70 - def commit_cookie_jar!; end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#62 - def commit_flash; end - - # Returns the content length of the request as an integer. - # - # source://actionpack//lib/action_dispatch/http/request.rb#269 - def content_length; end - - # source://actionpack//lib/action_dispatch/http/request.rb#79 - def controller_class; end - - # source://actionpack//lib/action_dispatch/http/request.rb#85 - def controller_class_for(name); end - - # source://actionpack//lib/action_dispatch/http/request.rb#170 - def controller_instance; end - - # source://actionpack//lib/action_dispatch/http/request.rb#174 - def controller_instance=(controller); end - - # source://actionpack//lib/action_dispatch/http/request.rb#156 - def engine_script_name(_routes); end - - # source://actionpack//lib/action_dispatch/http/request.rb#160 - def engine_script_name=(name); end - - # Determine whether the request body contains form-data by checking - # the request +Content-Type+ for one of the media-types: - # +application/x-www-form-urlencoded+ or +multipart/form-data+. The - # list of form-data media types can be modified through the - # +FORM_DATA_MEDIA_TYPES+ array. - # - # A request body is not assumed to contain form-data when no - # +Content-Type+ header is provided and the request_method is POST. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/request.rb#350 - def form_data?; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def from; end - - # Returns the +String+ full path including params of the last URL requested. - # - # # get "/articles" - # request.fullpath # => "/articles" - # - # # get "/articles?page=2" - # request.fullpath # => "/articles?page=2" - # - # source://actionpack//lib/action_dispatch/http/request.rb#248 - def fullpath; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def gateway_interface; end - - # Provides access to the request's HTTP headers, for example: - # - # request.headers["Content-Type"] # => "text/plain" - # - # source://actionpack//lib/action_dispatch/http/request.rb#209 - def headers; end - - # source://actionpack//lib/action_dispatch/http/request.rb#178 - def http_auth_salt; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#18 - def ignore_accept_header; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#18 - def ignore_accept_header=(val); end - - # source://actionpack//lib/action_dispatch/http/request.rb#427 - def inspect; end - - # Returns the IP address of client as a +String+. - # - # source://actionpack//lib/action_dispatch/http/request.rb#282 - def ip; end - - # Returns true if the request has a header matching the given key parameter. - # - # request.key? :ip_spoofing_check # => true - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/request.rb#106 - def key?(key); end - - # True if the request came from localhost, 127.0.0.1, or ::1. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/request.rb#411 - def local?; end - - # source://actionpack//lib/action_dispatch/http/request.rb#420 - def logger; end - - # The +String+ MIME type of the request. - # - # # get "/articles" - # request.media_type # => "application/x-www-form-urlencoded" - # - # source://actionpack//lib/action_dispatch/http/request.rb#264 - def media_type; end - - # Returns the original value of the environment's REQUEST_METHOD, - # even if it was overridden by middleware. See #request_method for - # more information. - # - # source://actionpack//lib/action_dispatch/http/request.rb#197 - def method; end - - # Returns a symbol form of the #method. - # - # source://actionpack//lib/action_dispatch/http/request.rb#202 - def method_symbol; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def negotiate; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def origin; end - - # Returns a +String+ with the last requested path including their params. - # - # # get '/foo' - # request.original_fullpath # => '/foo' - # - # # get '/foo?bar' - # request.original_fullpath # => '/foo?bar' - # - # source://actionpack//lib/action_dispatch/http/request.rb#237 - def original_fullpath; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def original_script_name; end - - # Returns the original request URL as a +String+. - # - # # get "/articles?page=2" - # request.original_url # => "http://www.example.com/articles?page=2" - # - # source://actionpack//lib/action_dispatch/http/request.rb#256 - def original_url; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def path_translated; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def pragma; end - - # Override Rack's GET method to support indifferent access. - # - # source://actionpack//lib/action_dispatch/http/request.rb#371 - def query_parameters; end - - # Read the request \body. This is useful for web services that need to - # work with raw requests directly. - # - # source://actionpack//lib/action_dispatch/http/request.rb#322 - def raw_post; end - - # source://rack/2.2.13/lib/rack/request.rb#157 - def raw_request_method; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def remote_addr; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def remote_host; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def remote_ident; end - - # Returns the IP address of client as a +String+, - # usually set by the RemoteIp middleware. - # - # source://actionpack//lib/action_dispatch/http/request.rb#288 - def remote_ip; end - - # source://actionpack//lib/action_dispatch/http/request.rb#292 - def remote_ip=(remote_ip); end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def remote_user; end - - # Returns the unique request id, which is based on either the +X-Request-Id+ header that can - # be generated by a firewall, load balancer, or web server, or by the RequestId middleware - # (which sets the +action_dispatch.request_id+ environment variable). - # - # This unique ID is useful for tracing a request from end-to-end as part of logging or debugging. - # This relies on the Rack variable set by the ActionDispatch::RequestId middleware. - # - # source://actionpack//lib/action_dispatch/http/request.rb#305 - def request_id; end - - # source://actionpack//lib/action_dispatch/http/request.rb#309 - def request_id=(id); end - - # Returns the HTTP \method that the application should see. - # In the case where the \method was overridden by a middleware - # (for instance, if a HEAD request was converted to a GET, - # or if a _method parameter was used to determine the \method - # the application should use), this \method returns the overridden - # value, not the original. - # - # source://actionpack//lib/action_dispatch/http/request.rb#144 - def request_method; end - - # source://actionpack//lib/action_dispatch/http/request.rb#164 - def request_method=(request_method); end - - # Returns a symbol form of the #request_method. - # - # source://actionpack//lib/action_dispatch/http/request.rb#190 - def request_method_symbol; end - - # Override Rack's POST method to support indifferent access. - # - # source://actionpack//lib/action_dispatch/http/request.rb#387 - def request_parameters; end - - # source://actionpack//lib/action_dispatch/http/request.rb#415 - def request_parameters=(params); end - - # source://actionpack//lib/action_dispatch/middleware/flash.rb#75 - def reset_session; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#19 - def return_only_media_type_on_content_type; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#19 - def return_only_media_type_on_content_type=(val); end - - # source://actionpack//lib/action_dispatch/http/request.rb#148 - def routes; end - - # source://actionpack//lib/action_dispatch/http/request.rb#152 - def routes=(routes); end - - # Early Hints is an HTTP/2 status code that indicates hints to help a client start - # making preparations for processing the final response. - # - # If the env contains +rack.early_hints+ then the server accepts HTTP2 push for Link headers. - # - # The +send_early_hints+ method accepts a hash of links as follows: - # - # send_early_hints("Link" => "; rel=preload; as=style\n; rel=preload") - # - # If you are using +javascript_include_tag+ or +stylesheet_link_tag+ the - # Early Hints headers are included by default if supported. - # - # source://actionpack//lib/action_dispatch/http/request.rb#224 - def send_early_hints(links); end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def server_name; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def server_protocol; end - - # Returns the lowercase name of the HTTP server software. - # - # source://actionpack//lib/action_dispatch/http/request.rb#316 - def server_software; end - - # source://actionpack//lib/action_dispatch/http/request.rb#362 - def session=(session); end - - # source://actionpack//lib/action_dispatch/http/request.rb#366 - def session_options=(options); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/request.rb#182 - def show_exceptions?; end - - # Returns the unique request id, which is based on either the +X-Request-Id+ header that can - # be generated by a firewall, load balancer, or web server, or by the RequestId middleware - # (which sets the +action_dispatch.request_id+ environment variable). - # - # This unique ID is useful for tracing a request from end-to-end as part of logging or debugging. - # This relies on the Rack variable set by the ActionDispatch::RequestId middleware. - # - # source://actionpack//lib/action_dispatch/http/request.rb#305 - def uuid; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def version; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def x_csrf_token; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def x_forwarded_for; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def x_forwarded_host; end - - # source://actionpack//lib/action_dispatch/http/request.rb#50 - def x_request_id; end - - # Returns true if the +X-Requested-With+ header contains "XMLHttpRequest" - # (case-insensitive), which may need to be manually added depending on the - # choice of JavaScript libraries and frameworks. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/request.rb#276 - def xhr?; end - - # Returns true if the +X-Requested-With+ header contains "XMLHttpRequest" - # (case-insensitive), which may need to be manually added depending on the - # choice of JavaScript libraries and frameworks. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/request.rb#276 - def xml_http_request?; end - - private - - # source://actionpack//lib/action_dispatch/http/request.rb#432 - def check_method(name); end - - # source://actionpack//lib/action_dispatch/http/request.rb#437 - def default_session; end - - class << self - # source://actionpack//lib/action_dispatch/http/request.rb#56 - def empty; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#18 - def ignore_accept_header; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#18 - def ignore_accept_header=(val); end - - # source://actionpack//lib/action_dispatch/http/parameters.rb#28 - def parameter_parsers; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#19 - def return_only_media_type_on_content_type; end - - # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#19 - def return_only_media_type_on_content_type=(val); end - end -end - -# source://actionpack//lib/action_dispatch/http/request.rb#297 -ActionDispatch::Request::ACTION_DISPATCH_REQUEST_ID = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/request.rb#34 -ActionDispatch::Request::ENV_METHODS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/request.rb#127 -ActionDispatch::Request::HTTP_METHODS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/request.rb#129 -ActionDispatch::Request::HTTP_METHOD_LOOKUP = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/http/request.rb#32 -ActionDispatch::Request::LOCALHOST = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/http/request.rb#73 -class ActionDispatch::Request::PASS_NOT_FOUND - class << self - # source://actionpack//lib/action_dispatch/http/request.rb#74 - def action(_); end - - # source://actionpack//lib/action_dispatch/http/request.rb#76 - def action_encoding_template(action); end - - # source://actionpack//lib/action_dispatch/http/request.rb#75 - def call(_); end - end -end - -# HTTP methods from {RFC 2518: HTTP Extensions for Distributed Authoring -- WEBDAV}[https://www.ietf.org/rfc/rfc2518.txt] -# -# source://actionpack//lib/action_dispatch/http/request.rb#113 -ActionDispatch::Request::RFC2518 = T.let(T.unsafe(nil), Array) - -# HTTP methods from {RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1}[https://www.ietf.org/rfc/rfc2616.txt] -# -# source://actionpack//lib/action_dispatch/http/request.rb#111 -ActionDispatch::Request::RFC2616 = T.let(T.unsafe(nil), Array) - -# HTTP methods from {RFC 3253: Versioning Extensions to WebDAV}[https://www.ietf.org/rfc/rfc3253.txt] -# -# source://actionpack//lib/action_dispatch/http/request.rb#115 -ActionDispatch::Request::RFC3253 = T.let(T.unsafe(nil), Array) - -# HTTP methods from {RFC 3648: WebDAV Ordered Collections Protocol}[https://www.ietf.org/rfc/rfc3648.txt] -# -# source://actionpack//lib/action_dispatch/http/request.rb#117 -ActionDispatch::Request::RFC3648 = T.let(T.unsafe(nil), Array) - -# HTTP methods from {RFC 3744: WebDAV Access Control Protocol}[https://www.ietf.org/rfc/rfc3744.txt] -# -# source://actionpack//lib/action_dispatch/http/request.rb#119 -ActionDispatch::Request::RFC3744 = T.let(T.unsafe(nil), Array) - -# HTTP methods from {RFC 4791: Calendaring Extensions to WebDAV}[https://www.ietf.org/rfc/rfc4791.txt] -# -# source://actionpack//lib/action_dispatch/http/request.rb#123 -ActionDispatch::Request::RFC4791 = T.let(T.unsafe(nil), Array) - -# HTTP methods from {RFC 5323: WebDAV SEARCH}[https://www.ietf.org/rfc/rfc5323.txt] -# -# source://actionpack//lib/action_dispatch/http/request.rb#121 -ActionDispatch::Request::RFC5323 = T.let(T.unsafe(nil), Array) - -# HTTP methods from {RFC 5789: PATCH Method for HTTP}[https://www.ietf.org/rfc/rfc5789.txt] -# -# source://actionpack//lib/action_dispatch/http/request.rb#125 -ActionDispatch::Request::RFC5789 = T.let(T.unsafe(nil), Array) - -# Session is responsible for lazily loading the session from store. -# -# source://actionpack//lib/action_dispatch/request/session.rb#8 -class ActionDispatch::Request::Session - # @return [Session] a new instance of Session - # - # source://actionpack//lib/action_dispatch/request/session.rb#74 - def initialize(by, req, enabled: T.unsafe(nil)); end - - # Returns value of the key stored in the session or - # +nil+ if the given key is not found in the session. - # - # source://actionpack//lib/action_dispatch/request/session.rb#110 - def [](key); end - - # Writes given value to given key of the session. - # - # source://actionpack//lib/action_dispatch/request/session.rb#150 - def []=(key, value); end - - # Clears the session. - # - # source://actionpack//lib/action_dispatch/request/session.rb#156 - def clear; end - - # Deletes given key from the session. - # - # source://actionpack//lib/action_dispatch/request/session.rb#184 - def delete(key); end - - # source://actionpack//lib/action_dispatch/request/session.rb#95 - def destroy; end - - # Returns the nested value specified by the sequence of keys, returning - # +nil+ if any intermediate step is +nil+. - # - # source://actionpack//lib/action_dispatch/request/session.rb#123 - def dig(*keys); end - - # source://actionpack//lib/action_dispatch/request/session.rb#240 - def each(&block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/request/session.rb#230 - def empty?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/request/session.rb#87 - def enabled?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/request/session.rb#220 - def exists?; end - - # Returns value of the given key from the session, or raises +KeyError+ - # if can't find the given key and no default value is set. - # Returns default value if specified. - # - # session.fetch(:foo) - # # => KeyError: key not found: "foo" - # - # session.fetch(:foo, :bar) - # # => :bar - # - # session.fetch(:foo) do - # :bar - # end - # # => :bar - # - # source://actionpack//lib/action_dispatch/request/session.rb#203 - def fetch(key, default = T.unsafe(nil), &block); end - - # Returns true if the session has the given key or false. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/request/session.rb#130 - def has_key?(key); end - - # source://actionpack//lib/action_dispatch/request/session.rb#83 - def id; end - - # Returns true if the session has the given key or false. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/request/session.rb#130 - def include?(key); end - - # source://actionpack//lib/action_dispatch/request/session.rb#212 - def inspect; end - - # Returns true if the session has the given key or false. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/request/session.rb#130 - def key?(key); end - - # Returns keys of the session as Array. - # - # source://actionpack//lib/action_dispatch/request/session.rb#138 - def keys; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/request/session.rb#226 - def loaded?; end - - # source://actionpack//lib/action_dispatch/request/session.rb#235 - def merge!(other); end - - # source://actionpack//lib/action_dispatch/request/session.rb#91 - def options; end - - # Returns the session as Hash. - # - # source://actionpack//lib/action_dispatch/request/session.rb#162 - def to_h; end - - # Returns the session as Hash. - # - # source://actionpack//lib/action_dispatch/request/session.rb#162 - def to_hash; end - - # Updates the session with given Hash. - # - # session.to_hash - # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2"} - # - # session.update({ "foo" => "bar" }) - # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} - # - # session.to_hash - # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} - # - # source://actionpack//lib/action_dispatch/request/session.rb#178 - def update(hash); end - - # Returns values of the session as Array. - # - # source://actionpack//lib/action_dispatch/request/session.rb#144 - def values; end - - private - - # source://actionpack//lib/action_dispatch/request/session.rb#261 - def load!; end - - # source://actionpack//lib/action_dispatch/request/session.rb#257 - def load_for_delete!; end - - # source://actionpack//lib/action_dispatch/request/session.rb#245 - def load_for_read!; end - - # source://actionpack//lib/action_dispatch/request/session.rb#249 - def load_for_write!; end - - class << self - # Creates a session hash, merging the properties of the previous session if any. - # - # source://actionpack//lib/action_dispatch/request/session.rb#17 - def create(store, req, default_options); end - - # source://actionpack//lib/action_dispatch/request/session.rb#41 - def delete(req); end - - # source://actionpack//lib/action_dispatch/request/session.rb#27 - def disabled(req); end - - # source://actionpack//lib/action_dispatch/request/session.rb#33 - def find(req); end - - # source://actionpack//lib/action_dispatch/request/session.rb#37 - def set(req, session); end - end -end - -# source://actionpack//lib/action_dispatch/request/session.rb#9 -class ActionDispatch::Request::Session::DisabledSessionError < ::StandardError; end - -# source://actionpack//lib/action_dispatch/request/session.rb#10 -ActionDispatch::Request::Session::ENV_SESSION_KEY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/request/session.rb#11 -ActionDispatch::Request::Session::ENV_SESSION_OPTIONS_KEY = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/request/session.rb#45 -class ActionDispatch::Request::Session::Options - # @return [Options] a new instance of Options - # - # source://actionpack//lib/action_dispatch/request/session.rb#54 - def initialize(by, default_options); end - - # source://actionpack//lib/action_dispatch/request/session.rb#59 - def [](key); end - - # source://actionpack//lib/action_dispatch/request/session.rb#69 - def []=(k, v); end - - # source://actionpack//lib/action_dispatch/request/session.rb#63 - def id(req); end - - # source://actionpack//lib/action_dispatch/request/session.rb#70 - def to_hash; end - - # source://actionpack//lib/action_dispatch/request/session.rb#71 - def values_at(*args); end - - class << self - # source://actionpack//lib/action_dispatch/request/session.rb#50 - def find(req); end - - # source://actionpack//lib/action_dispatch/request/session.rb#46 - def set(req, options); end - end -end - -# Singleton object used to determine if an optional param wasn't specified. -# -# source://actionpack//lib/action_dispatch/request/session.rb#14 -ActionDispatch::Request::Session::Unspecified = T.let(T.unsafe(nil), Object) - -# source://actionpack//lib/action_dispatch/request/utils.rb#7 -class ActionDispatch::Request::Utils - # source://actionpack//lib/action_dispatch/request/utils.rb#8 - def perform_deep_munge; end - - # source://actionpack//lib/action_dispatch/request/utils.rb#8 - def perform_deep_munge=(val); end - - class << self - # source://actionpack//lib/action_dispatch/request/utils.rb#29 - def check_param_encoding(params); end - - # source://actionpack//lib/action_dispatch/request/utils.rb#10 - def each_param_value(params, &block); end - - # source://actionpack//lib/action_dispatch/request/utils.rb#21 - def normalize_encode_params(params); end - - # source://actionpack//lib/action_dispatch/request/utils.rb#8 - def perform_deep_munge; end - - # source://actionpack//lib/action_dispatch/request/utils.rb#8 - def perform_deep_munge=(val); end - - # source://actionpack//lib/action_dispatch/request/utils.rb#44 - def set_binary_encoding(request, params, controller, action); end - end -end - -# source://actionpack//lib/action_dispatch/request/utils.rb#81 -class ActionDispatch::Request::Utils::CustomParamEncoder - class << self - # source://actionpack//lib/action_dispatch/request/utils.rb#94 - def action_encoding_template(request, controller, action); end - - # source://actionpack//lib/action_dispatch/request/utils.rb#82 - def encode(request, params, controller, action); end - end -end - -# Remove nils from the params hash. -# -# source://actionpack//lib/action_dispatch/request/utils.rb#73 -class ActionDispatch::Request::Utils::NoNilParamEncoder < ::ActionDispatch::Request::Utils::ParamEncoder - class << self - # source://actionpack//lib/action_dispatch/request/utils.rb#74 - def handle_array(params); end - end -end - -# source://actionpack//lib/action_dispatch/request/utils.rb#48 -class ActionDispatch::Request::Utils::ParamEncoder - class << self - # source://actionpack//lib/action_dispatch/request/utils.rb#67 - def handle_array(params); end - - # Convert nested Hash to HashWithIndifferentAccess. - # - # source://actionpack//lib/action_dispatch/request/utils.rb#50 - def normalize_encode_params(params); end - end -end - -# source://actionpack//lib/action_dispatch/middleware/cookies.rb#10 -module ActionDispatch::RequestCookieMethods - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#48 - def authenticated_encrypted_cookie_salt; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#11 - def cookie_jar; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#28 - def cookie_jar=(jar); end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#76 - def cookies_digest; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#80 - def cookies_rotations; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#72 - def cookies_same_site_protection; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#68 - def cookies_serializer; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#56 - def encrypted_cookie_cipher; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#40 - def encrypted_cookie_salt; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#44 - def encrypted_signed_cookie_salt; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#24 - def have_cookie_jar?; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#32 - def key_generator; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#64 - def secret_key_base; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#60 - def signed_cookie_digest; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#36 - def signed_cookie_salt; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#52 - def use_authenticated_cookie_encryption; end - - # source://actionpack//lib/action_dispatch/middleware/cookies.rb#84 - def use_cookies_with_metadata; end -end - -# source://actionpack//lib/action_dispatch/testing/request_encoder.rb#4 -class ActionDispatch::RequestEncoder - # @return [RequestEncoder] a new instance of RequestEncoder - # - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#16 - def initialize(mime_name, param_encoder, response_parser); end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#32 - def accept_header; end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#28 - def content_type; end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#36 - def encode_params(params); end - - # Returns the value of attribute response_parser. - # - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#14 - def response_parser; end - - class << self - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#45 - def encoder(name); end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#40 - def parser(content_type); end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#49 - def register_encoder(mime_name, param_encoder: T.unsafe(nil), response_parser: T.unsafe(nil)); end - end -end - -# source://actionpack//lib/action_dispatch/testing/request_encoder.rb#5 -class ActionDispatch::RequestEncoder::IdentityEncoder - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#7 - def accept_header; end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#6 - def content_type; end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#8 - def encode_params(params); end - - # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#9 - def response_parser; end -end - -# Makes a unique request id available to the +action_dispatch.request_id+ env variable (which is then accessible -# through ActionDispatch::Request#request_id or the alias ActionDispatch::Request#uuid) and sends -# the same id to the client via the +X-Request-Id+ header. -# -# The unique request id is either based on the +X-Request-Id+ header in the request, which would typically be generated -# by a firewall, load balancer, or the web server, or, if this header is not available, a random uuid. If the -# header is accepted from the outside world, we sanitize it to a max of 255 chars and alphanumeric and dashes only. -# -# The unique request id can be used to trace a request end-to-end and would typically end up being part of log files -# from multiple pieces of the stack. -# -# source://actionpack//lib/action_dispatch/middleware/request_id.rb#17 -class ActionDispatch::RequestId - # @return [RequestId] a new instance of RequestId - # - # source://actionpack//lib/action_dispatch/middleware/request_id.rb#18 - def initialize(app, header:); end - - # source://actionpack//lib/action_dispatch/middleware/request_id.rb#23 - def call(env); end - - private - - # source://actionpack//lib/action_dispatch/middleware/request_id.rb#38 - def internal_request_id; end - - # source://actionpack//lib/action_dispatch/middleware/request_id.rb#30 - def make_request_id(request_id); end -end - -# Represents an HTTP response generated by a controller action. Use it to -# retrieve the current state of the response, or customize the response. It can -# either represent a real HTTP response (i.e. one that is meant to be sent -# back to the web browser) or a TestResponse (i.e. one that is generated -# from integration tests). -# -# \Response is mostly a Ruby on \Rails framework implementation detail, and -# should never be used directly in controllers. Controllers should use the -# methods defined in ActionController::Base instead. For example, if you want -# to set the HTTP response's content MIME type, then use -# ActionControllerBase#headers instead of Response#headers. -# -# Nevertheless, integration tests may want to inspect controller responses in -# more detail, and that's when \Response can be useful for application -# developers. Integration test methods such as -# Integration::RequestHelpers#get and Integration::RequestHelpers#post return -# objects of type TestResponse (which are of course also of type \Response). -# -# For example, the following demo integration test prints the body of the -# controller response to the console: -# -# class DemoControllerTest < ActionDispatch::IntegrationTest -# def test_print_root_path_to_console -# get('/') -# puts response.body -# end -# end -# -# source://actionpack//lib/action_dispatch/http/response.rb#36 -class ActionDispatch::Response - include ::Rack::Response::Helpers - include ::ActionDispatch::Http::FilterRedirect - include ::ActionDispatch::Http::Cache::Response - include ::MonitorMixin - - # @return [Response] a new instance of Response - # @yield [_self] - # @yieldparam _self [ActionDispatch::Response] the object that the method was called on - # - # source://actionpack//lib/action_dispatch/http/response.rb#161 - def initialize(status = T.unsafe(nil), header = T.unsafe(nil), body = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/response.rb#71 - def [](*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/http/response.rb#71 - def []=(*_arg0, **_arg1, &_arg2); end - - # Aliasing these off because AD::Http::Cache::Response defines them. - # - # source://rack/2.2.13/lib/rack/response.rb#229 - def _cache_control; end - - # source://rack/2.2.13/lib/rack/response.rb#233 - def _cache_control=(v); end - - # source://actionpack//lib/action_dispatch/http/response.rb#370 - def abort; end - - # source://actionpack//lib/action_dispatch/http/response.rb#183 - def await_commit; end - - # source://actionpack//lib/action_dispatch/http/response.rb#189 - def await_sent; end - - # Returns the content of the response as a string. This contains the contents - # of any calls to render. - # - # source://actionpack//lib/action_dispatch/http/response.rb#304 - def body; end - - # Allows you to manually set or override the response body. - # - # source://actionpack//lib/action_dispatch/http/response.rb#313 - def body=(body); end - - # source://actionpack//lib/action_dispatch/http/response.rb#357 - def body_parts; end - - # The charset of the response. HTML wants to know the encoding of the - # content you're giving them, so we need to send that along. - # - # source://actionpack//lib/action_dispatch/http/response.rb#274 - def charset; end - - # Sets the HTTP character set. In case of +nil+ parameter - # it sets the charset to +default_charset+. - # - # response.charset = 'utf-16' # => 'utf-16' - # response.charset = nil # => 'utf-8' - # - # source://actionpack//lib/action_dispatch/http/response.rb#263 - def charset=(charset); end - - # source://actionpack//lib/action_dispatch/http/response.rb#366 - def close; end - - # Returns a string to ensure compatibility with Net::HTTPResponse. - # - # source://actionpack//lib/action_dispatch/http/response.rb#285 - def code; end - - # source://actionpack//lib/action_dispatch/http/response.rb#193 - def commit!; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/response.rb#217 - def committed?; end - - # Content type of response. - # - # source://actionpack//lib/action_dispatch/http/response.rb#243 - def content_type; end - - # Sets the HTTP response's content MIME type. For example, in the controller - # you could write this: - # - # response.content_type = "text/plain" - # - # If a character set has been defined for this response (see charset=) then - # the character set information will also be included in the content type - # information. - # - # source://actionpack//lib/action_dispatch/http/response.rb#233 - def content_type=(content_type); end - - # Returns the response cookies, converted to a Hash of (name => value) pairs - # - # assert_equal 'AuthorOfNewPage', r.cookies['author'] - # - # source://actionpack//lib/action_dispatch/http/response.rb#394 - def cookies; end - - # source://actionpack//lib/action_dispatch/http/response.rb#85 - def default_charset; end - - # source://actionpack//lib/action_dispatch/http/response.rb#85 - def default_charset=(val); end - - # source://actionpack//lib/action_dispatch/http/response.rb#86 - def default_headers; end - - # source://actionpack//lib/action_dispatch/http/response.rb#86 - def default_headers=(val); end - - # source://actionpack//lib/action_dispatch/http/response.rb#181 - def delete_header(key); end - - # source://actionpack//lib/action_dispatch/http/response.rb#73 - def each(&block); end - - # source://actionpack//lib/action_dispatch/http/response.rb#179 - def get_header(key); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/response.rb#178 - def has_header?(key); end - - # Get headers for this response. - # - # source://actionpack//lib/action_dispatch/http/response.rb#67 - def header; end - - # Get headers for this response. - # - # source://actionpack//lib/action_dispatch/http/response.rb#67 - def headers; end - - # Media type of response. - # - # source://actionpack//lib/action_dispatch/http/response.rb#248 - def media_type; end - - # Returns the corresponding message for the current HTTP status code: - # - # response.status = 200 - # response.message # => "OK" - # - # response.status = 404 - # response.message # => "Not Found" - # - # source://actionpack//lib/action_dispatch/http/response.rb#297 - def message; end - - # Turns the Response into a Rack-compatible array of the status, headers, - # and body. Allows explicit splatting: - # - # status, headers, body = *response - # - # source://actionpack//lib/action_dispatch/http/response.rb#385 - def prepare!; end - - # The location header we'll be responding with. - # - # source://rack/2.2.13/lib/rack/response.rb#204 - def redirect_url; end - - # The request that the response is responding to. - # - # source://actionpack//lib/action_dispatch/http/response.rb#61 - def request; end - - # The request that the response is responding to. - # - # source://actionpack//lib/action_dispatch/http/response.rb#61 - def request=(_arg0); end - - # source://actionpack//lib/action_dispatch/http/response.rb#353 - def reset_body!; end - - # The response code of the request. - # - # source://actionpack//lib/action_dispatch/http/response.rb#280 - def response_code; end - - # Send the file stored at +path+ as the response body. - # - # source://actionpack//lib/action_dispatch/http/response.rb#348 - def send_file(path); end - - # source://actionpack//lib/action_dispatch/http/response.rb#201 - def sending!; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/response.rb#216 - def sending?; end - - # source://actionpack//lib/action_dispatch/http/response.rb#252 - def sending_file=(v); end - - # source://actionpack//lib/action_dispatch/http/response.rb#209 - def sent!; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/response.rb#218 - def sent?; end - - # source://actionpack//lib/action_dispatch/http/response.rb#180 - def set_header(key, v); end - - # The HTTP status code. - # - # source://actionpack//lib/action_dispatch/http/response.rb#64 - def status; end - - # Sets the HTTP status code. - # - # source://actionpack//lib/action_dispatch/http/response.rb#221 - def status=(status); end - - # Returns the corresponding message for the current HTTP status code: - # - # response.status = 200 - # response.message # => "OK" - # - # response.status = 404 - # response.message # => "Not Found" - # - # source://actionpack//lib/action_dispatch/http/response.rb#297 - def status_message; end - - # The underlying body, as a streamable object. - # - # source://actionpack//lib/action_dispatch/http/response.rb#159 - def stream; end - - # Turns the Response into a Rack-compatible array of the status, headers, - # and body. Allows explicit splatting: - # - # status, headers, body = *response - # - # source://actionpack//lib/action_dispatch/http/response.rb#385 - def to_a; end - - # source://actionpack//lib/action_dispatch/http/response.rb#308 - def write(string); end - - private - - # source://actionpack//lib/action_dispatch/http/response.rb#466 - def assign_default_content_type_and_charset!; end - - # source://actionpack//lib/action_dispatch/http/response.rb#438 - def before_committed; end - - # source://actionpack//lib/action_dispatch/http/response.rb#446 - def before_sending; end - - # source://actionpack//lib/action_dispatch/http/response.rb#458 - def build_buffer(response, body); end - - # source://actionpack//lib/action_dispatch/http/response.rb#506 - def handle_no_content!; end - - # source://actionpack//lib/action_dispatch/http/response.rb#462 - def munge_body_object(body); end - - # source://actionpack//lib/action_dispatch/http/response.rb#418 - def parse_content_type(content_type); end - - # Small internal convenience method to get the parsed version of the current - # content type header. - # - # source://actionpack//lib/action_dispatch/http/response.rb#428 - def parsed_content_type_header; end - - # source://actionpack//lib/action_dispatch/http/response.rb#513 - def rack_response(status, header); end - - # source://actionpack//lib/action_dispatch/http/response.rb#432 - def set_content_type(content_type, charset); end - - class << self - # source://actionpack//lib/action_dispatch/http/response.rb#149 - def create(status = T.unsafe(nil), header = T.unsafe(nil), body = T.unsafe(nil), default_headers: T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/response.rb#85 - def default_charset; end - - # source://actionpack//lib/action_dispatch/http/response.rb#85 - def default_charset=(val); end - - # source://actionpack//lib/action_dispatch/http/response.rb#86 - def default_headers; end - - # source://actionpack//lib/action_dispatch/http/response.rb#86 - def default_headers=(val); end - - # source://actionpack//lib/action_dispatch/http/response.rb#154 - def merge_default_headers(original, default); end - end -end - -# source://actionpack//lib/action_dispatch/http/response.rb#97 -class ActionDispatch::Response::Buffer - # @return [Buffer] a new instance of Buffer - # - # source://actionpack//lib/action_dispatch/http/response.rb#98 - def initialize(response, buf); end - - # source://actionpack//lib/action_dispatch/http/response.rb#131 - def abort; end - - # source://actionpack//lib/action_dispatch/http/response.rb#105 - def body; end - - # source://actionpack//lib/action_dispatch/http/response.rb#134 - def close; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/response.rb#139 - def closed?; end - - # source://actionpack//lib/action_dispatch/http/response.rb#121 - def each(&block); end - - # @raise [IOError] - # - # source://actionpack//lib/action_dispatch/http/response.rb#113 - def write(string); end - - private - - # source://actionpack//lib/action_dispatch/http/response.rb#144 - def each_chunk(&block); end -end - -# source://actionpack//lib/action_dispatch/http/response.rb#80 -ActionDispatch::Response::CONTENT_TYPE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/response.rb#412 -ActionDispatch::Response::CONTENT_TYPE_PARSER = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/http/response.rb#409 -class ActionDispatch::Response::ContentTypeHeader < ::Struct - # Returns the value of attribute charset - # - # @return [Object] the current value of charset - def charset; end - - # Sets the attribute charset - # - # @param value [Object] the value to set the attribute charset to. - # @return [Object] the newly set value - def charset=(_); end - - # Returns the value of attribute mime_type - # - # @return [Object] the current value of mime_type - def mime_type; end - - # Sets the attribute mime_type - # - # @param value [Object] the value to set the attribute mime_type to. - # @return [Object] the newly set value - def mime_type=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Avoid having to pass an open file handle as the response body. -# Rack::Sendfile will usually intercept the response and uses -# the path directly, so there is no reason to open the file. -# -# source://actionpack//lib/action_dispatch/http/response.rb#326 -class ActionDispatch::Response::FileBody - # @return [FileBody] a new instance of FileBody - # - # source://actionpack//lib/action_dispatch/http/response.rb#329 - def initialize(path); end - - # source://actionpack//lib/action_dispatch/http/response.rb#333 - def body; end - - # Stream the file's contents if Rack::Sendfile isn't present. - # - # source://actionpack//lib/action_dispatch/http/response.rb#338 - def each; end - - # source://actionpack//lib/action_dispatch/http/response.rb#327 - def to_path; end -end - -# source://actionpack//lib/action_dispatch/http/response.rb#37 -class ActionDispatch::Response::Header - # @return [Header] a new instance of Header - # - # source://actionpack//lib/action_dispatch/http/response.rb#38 - def initialize(response, header); end - - # source://actionpack//lib/action_dispatch/http/response.rb#43 - def []=(k, v); end - - # source://actionpack//lib/action_dispatch/http/response.rb#51 - def merge(other); end - - # source://actionpack//lib/action_dispatch/http/response.rb#55 - def to_hash; end -end - -# source://actionpack//lib/action_dispatch/http/response.rb#82 -ActionDispatch::Response::LOCATION = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/response.rb#83 -ActionDispatch::Response::NO_CONTENT_CODES = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/http/response.rb#410 -ActionDispatch::Response::NullContentTypeHeader = T.let(T.unsafe(nil), ActionDispatch::Response::ContentTypeHeader) - -# source://actionpack//lib/action_dispatch/http/response.rb#474 -class ActionDispatch::Response::RackBody - # @return [RackBody] a new instance of RackBody - # - # source://actionpack//lib/action_dispatch/http/response.rb#475 - def initialize(response); end - - # source://actionpack//lib/action_dispatch/http/response.rb#489 - def body; end - - # source://actionpack//lib/action_dispatch/http/response.rb#483 - def close; end - - # source://actionpack//lib/action_dispatch/http/response.rb#479 - def each(*args, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/response.rb#493 - def respond_to?(method, include_private = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/response.rb#501 - def to_path; end -end - -# source://actionpack//lib/action_dispatch/http/response.rb#81 -ActionDispatch::Response::SET_COOKIE = T.let(T.unsafe(nil), String) - -# The routing module provides URL rewriting in native Ruby. It's a way to -# redirect incoming requests to controllers and actions. This replaces -# mod_rewrite rules. Best of all, Rails' \Routing works with any web server. -# Routes are defined in config/routes.rb. -# -# Think of creating routes as drawing a map for your requests. The map tells -# them where to go based on some predefined pattern: -# -# Rails.application.routes.draw do -# Pattern 1 tells some request to go to one place -# Pattern 2 tell them to go to another -# ... -# end -# -# The following symbols are special: -# -# :controller maps to your controller name -# :action maps to an action with your controllers -# -# Other names simply map to a parameter as in the case of :id. -# -# == Resources -# -# Resource routing allows you to quickly declare all of the common routes -# for a given resourceful controller. Instead of declaring separate routes -# for your +index+, +show+, +new+, +edit+, +create+, +update+, and +destroy+ -# actions, a resourceful route declares them in a single line of code: -# -# resources :photos -# -# Sometimes, you have a resource that clients always look up without -# referencing an ID. A common example, /profile always shows the profile of -# the currently logged in user. In this case, you can use a singular resource -# to map /profile (rather than /profile/:id) to the show action. -# -# resource :profile -# -# It's common to have resources that are logically children of other -# resources: -# -# resources :magazines do -# resources :ads -# end -# -# You may wish to organize groups of controllers under a namespace. Most -# commonly, you might group a number of administrative controllers under -# an +admin+ namespace. You would place these controllers under the -# app/controllers/admin directory, and you can group them together -# in your router: -# -# namespace "admin" do -# resources :posts, :comments -# end -# -# Alternatively, you can add prefixes to your path without using a separate -# directory by using +scope+. +scope+ takes additional options which -# apply to all enclosed routes. -# -# scope path: "/cpanel", as: 'admin' do -# resources :posts, :comments -# end -# -# For more, see Routing::Mapper::Resources#resources, -# Routing::Mapper::Scoping#namespace, and Routing::Mapper::Scoping#scope. -# -# == Non-resourceful routes -# -# For routes that don't fit the resources mold, you can use the HTTP helper -# methods get, post, patch, put and delete. -# -# get 'post/:id', to: 'posts#show' -# post 'post/:id', to: 'posts#create_comment' -# -# Now, if you POST to /posts/:id, it will route to the create_comment action. A GET on the same -# URL will route to the show action. -# -# If your route needs to respond to more than one HTTP method (or all methods) then using the -# :via option on match is preferable. -# -# match 'post/:id', to: 'posts#show', via: [:get, :post] -# -# == Named routes -# -# Routes can be named by passing an :as option, -# allowing for easy reference within your source as +name_of_route_url+ -# for the full URL and +name_of_route_path+ for the URI path. -# -# Example: -# -# # In config/routes.rb -# get '/login', to: 'accounts#login', as: 'login' -# -# # With render, redirect_to, tests, etc. -# redirect_to login_url -# -# Arguments can be passed as well. -# -# redirect_to show_item_path(id: 25) -# -# Use root as a shorthand to name a route for the root path "/". -# -# # In config/routes.rb -# root to: 'blogs#index' -# -# # would recognize http://www.example.com/ as -# params = { controller: 'blogs', action: 'index' } -# -# # and provide these named routes -# root_url # => 'http://www.example.com/' -# root_path # => '/' -# -# Note: when using +controller+, the route is simply named after the -# method you call on the block parameter rather than map. -# -# # In config/routes.rb -# controller :blog do -# get 'blog/show', to: :list -# get 'blog/delete', to: :delete -# get 'blog/edit', to: :edit -# end -# -# # provides named routes for show, delete, and edit -# link_to @article.title, blog_show_path(id: @article.id) -# -# == Pretty URLs -# -# Routes can generate pretty URLs. For example: -# -# get '/articles/:year/:month/:day', to: 'articles#find_by_id', constraints: { -# year: /\d{4}/, -# month: /\d{1,2}/, -# day: /\d{1,2}/ -# } -# -# Using the route above, the URL "http://localhost:3000/articles/2005/11/06" -# maps to -# -# params = {year: '2005', month: '11', day: '06'} -# -# == Regular Expressions and parameters -# You can specify a regular expression to define a format for a parameter. -# -# controller 'geocode' do -# get 'geocode/:postalcode', to: :show, constraints: { -# postalcode: /\d{5}(-\d{4})?/ -# } -# end -# -# Constraints can include the 'ignorecase' and 'extended syntax' regular -# expression modifiers: -# -# controller 'geocode' do -# get 'geocode/:postalcode', to: :show, constraints: { -# postalcode: /hx\d\d\s\d[a-z]{2}/i -# } -# end -# -# controller 'geocode' do -# get 'geocode/:postalcode', to: :show, constraints: { -# postalcode: /# Postalcode format -# \d{5} #Prefix -# (-\d{4})? #Suffix -# /x -# } -# end -# -# Using the multiline modifier will raise an +ArgumentError+. -# Encoding regular expression modifiers are silently ignored. The -# match will always use the default encoding or ASCII. -# -# == External redirects -# -# You can redirect any path to another path using the redirect helper in your router: -# -# get "/stories", to: redirect("/posts") -# -# == Unicode character routes -# -# You can specify unicode character routes in your router: -# -# get "こんにちは", to: "welcome#index" -# -# == Routing to Rack Applications -# -# Instead of a String, like posts#index, which corresponds to the -# index action in the PostsController, you can specify any Rack application -# as the endpoint for a matcher: -# -# get "/application.js", to: Sprockets -# -# == Reloading routes -# -# You can reload routes if you feel you must: -# -# Rails.application.reload_routes! -# -# This will clear all named routes and reload config/routes.rb if the file has been modified from -# last load. To absolutely force reloading, use reload!. -# -# == Testing Routes -# -# The two main methods for testing your routes: -# -# === +assert_routing+ -# -# def test_movie_route_properly_splits -# opts = {controller: "plugin", action: "checkout", id: "2"} -# assert_routing "plugin/checkout/2", opts -# end -# -# +assert_routing+ lets you test whether or not the route properly resolves into options. -# -# === +assert_recognizes+ -# -# def test_route_has_options -# opts = {controller: "plugin", action: "show", id: "12"} -# assert_recognizes opts, "/plugins/show/12" -# end -# -# Note the subtle difference between the two: +assert_routing+ tests that -# a URL fits options while +assert_recognizes+ tests that a URL -# breaks into parameters properly. -# -# In tests you can simply pass the URL or named route to +get+ or +post+. -# -# def send_to_jail -# get '/jail' -# assert_response :success -# end -# -# def goes_to_login -# get login_url -# #... -# end -# -# == View a list of all your routes -# -# rails routes -# -# Target a specific controller with -c, or grep routes -# using -g. Useful in conjunction with --expanded -# which displays routes vertically. -# -# source://actionpack//lib/action_dispatch/routing.rb#248 -module ActionDispatch::Routing - extend ::ActiveSupport::Autoload -end - -# source://actionpack//lib/action_dispatch/routing/inspector.rb#129 -module ActionDispatch::Routing::ConsoleFormatter; end - -# source://actionpack//lib/action_dispatch/routing/inspector.rb#130 -class ActionDispatch::Routing::ConsoleFormatter::Base - # @return [Base] a new instance of Base - # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#131 - def initialize; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#145 - def header(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#148 - def no_routes(routes, filter); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#135 - def result; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#142 - def section(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#139 - def section_title(title); end -end - -# source://actionpack//lib/action_dispatch/routing/inspector.rb#202 -class ActionDispatch::Routing::ConsoleFormatter::Expanded < ::ActionDispatch::Routing::ConsoleFormatter::Base - # @return [Expanded] a new instance of Expanded - # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#203 - def initialize(width: T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#212 - def section(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#208 - def section_title(title); end - - private - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#217 - def draw_expanded_section(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#229 - def route_header(index:); end -end - -# source://actionpack//lib/action_dispatch/routing/inspector.rb#166 -class ActionDispatch::Routing::ConsoleFormatter::Sheet < ::ActionDispatch::Routing::ConsoleFormatter::Base - # source://actionpack//lib/action_dispatch/routing/inspector.rb#175 - def header(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#171 - def section(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#167 - def section_title(title); end - - private - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#189 - def draw_header(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#180 - def draw_section(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#195 - def widths(routes); end -end - -# source://actionpack//lib/action_dispatch/routing/endpoint.rb#5 -class ActionDispatch::Routing::Endpoint - # source://actionpack//lib/action_dispatch/routing/endpoint.rb#9 - def app; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/endpoint.rb#6 - def dispatcher?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/endpoint.rb#12 - def engine?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/endpoint.rb#8 - def matches?(req); end - - # source://actionpack//lib/action_dispatch/routing/endpoint.rb#10 - def rack_app; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/endpoint.rb#7 - def redirect?; end -end - -# source://actionpack//lib/action_dispatch/routing.rb#258 -ActionDispatch::Routing::HTTP_METHODS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/routing/inspector.rb#235 -class ActionDispatch::Routing::HtmlTableFormatter - # @return [HtmlTableFormatter] a new instance of HtmlTableFormatter - # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#236 - def initialize(view); end - - # The header is part of the HTML page, so we don't construct it here. - # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#250 - def header(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#253 - def no_routes(*_arg0); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#266 - def result; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#245 - def section(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#241 - def section_title(title); end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#12 -class ActionDispatch::Routing::Mapper - include ::ActionDispatch::Routing::Mapper::Base - include ::ActionDispatch::Routing::Mapper::HttpHelpers - include ::ActionDispatch::Routing::Redirection - include ::ActionDispatch::Routing::Mapper::Scoping - include ::ActionDispatch::Routing::Mapper::Concerns - include ::ActionDispatch::Routing::Mapper::Resources - include ::ActionDispatch::Routing::Mapper::CustomUrls - - # @return [Mapper] a new instance of Mapper - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2302 - def initialize(set); end - - class << self - # source://actionpack//lib/action_dispatch/routing/mapper.rb#381 - def normalize_name(name); end - - # Invokes Journey::Router::Utils.normalize_path, then ensures that - # /(:locale) becomes (/:locale). Except for root cases, where the - # former is the correct one. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#364 - def normalize_path(path); end - end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#385 -module ActionDispatch::Routing::Mapper::Base - # source://actionpack//lib/action_dispatch/routing/mapper.rb#618 - def default_url_options(options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#618 - def default_url_options=(options); end - - # Query if the following named route was already defined. - # - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#630 - def has_named_route?(name); end - - # Matches a URL pattern to one or more routes. - # - # You should not use the +match+ method in your router - # without specifying an HTTP method. - # - # If you want to expose your action to both GET and POST, use: - # - # # sets :controller, :action, and :id in params - # match ':controller/:action/:id', via: [:get, :post] - # - # Note that +:controller+, +:action+, and +:id+ are interpreted as URL - # query parameters and thus available through +params+ in an action. - # - # If you want to expose your action to GET, use +get+ in the router: - # - # Instead of: - # - # match ":controller/:action/:id" - # - # Do: - # - # get ":controller/:action/:id" - # - # Two of these symbols are special, +:controller+ maps to the controller - # and +:action+ to the controller's action. A pattern can also map - # wildcard segments (globs) to params: - # - # get 'songs/*category/:title', to: 'songs#show' - # - # # 'songs/rock/classic/stairway-to-heaven' sets - # # params[:category] = 'rock/classic' - # # params[:title] = 'stairway-to-heaven' - # - # To match a wildcard parameter, it must have a name assigned to it. - # Without a variable name to attach the glob parameter to, the route - # can't be parsed. - # - # When a pattern points to an internal route, the route's +:action+ and - # +:controller+ should be set in options or hash shorthand. Examples: - # - # match 'photos/:id' => 'photos#show', via: :get - # match 'photos/:id', to: 'photos#show', via: :get - # match 'photos/:id', controller: 'photos', action: 'show', via: :get - # - # A pattern can also point to a +Rack+ endpoint i.e. anything that - # responds to +call+: - # - # match 'photos/:id', to: -> (hash) { [200, {}, ["Coming soon"]] }, via: :get - # match 'photos/:id', to: PhotoRackApp, via: :get - # # Yes, controller actions are just rack endpoints - # match 'photos/:id', to: PhotosController.action(:show), via: :get - # - # Because requesting various HTTP verbs with a single action has security - # implications, you must either specify the actions in - # the via options or use one of the HttpHelpers[rdoc-ref:HttpHelpers] - # instead +match+ - # - # === Options - # - # Any options not seen here are passed on as params with the URL. - # - # [:controller] - # The route's controller. - # - # [:action] - # The route's action. - # - # [:param] - # Overrides the default resource identifier +:id+ (name of the - # dynamic segment used to generate the routes). - # You can access that segment from your controller using - # params[<:param>]. - # In your router: - # - # resources :users, param: :name - # - # The +users+ resource here will have the following routes generated for it: - # - # GET /users(.:format) - # POST /users(.:format) - # GET /users/new(.:format) - # GET /users/:name/edit(.:format) - # GET /users/:name(.:format) - # PATCH/PUT /users/:name(.:format) - # DELETE /users/:name(.:format) - # - # You can override ActiveRecord::Base#to_param of a related - # model to construct a URL: - # - # class User < ActiveRecord::Base - # def to_param - # name - # end - # end - # - # user = User.find_by(name: 'Phusion') - # user_path(user) # => "/users/Phusion" - # - # [:path] - # The path prefix for the routes. - # - # [:module] - # The namespace for :controller. - # - # match 'path', to: 'c#a', module: 'sekret', controller: 'posts', via: :get - # # => Sekret::PostsController - # - # See Scoping#namespace for its scope equivalent. - # - # [:as] - # The name used to generate routing helpers. - # - # [:via] - # Allowed HTTP verb(s) for route. - # - # match 'path', to: 'c#a', via: :get - # match 'path', to: 'c#a', via: [:get, :post] - # match 'path', to: 'c#a', via: :all - # - # [:to] - # Points to a +Rack+ endpoint. Can be an object that responds to - # +call+ or a string representing a controller's action. - # - # match 'path', to: 'controller#action', via: :get - # match 'path', to: -> (env) { [200, {}, ["Success!"]] }, via: :get - # match 'path', to: RackApp, via: :get - # - # [:on] - # Shorthand for wrapping routes in a specific RESTful context. Valid - # values are +:member+, +:collection+, and +:new+. Only use within - # resource(s) block. For example: - # - # resource :bar do - # match 'foo', to: 'c#a', on: :member, via: [:get, :post] - # end - # - # Is equivalent to: - # - # resource :bar do - # member do - # match 'foo', to: 'c#a', via: [:get, :post] - # end - # end - # - # [:constraints] - # Constrains parameters with a hash of regular expressions - # or an object that responds to matches?. In addition, constraints - # other than path can also be specified with any object - # that responds to === (e.g. String, Array, Range, etc.). - # - # match 'path/:id', constraints: { id: /[A-Z]\d{5}/ }, via: :get - # - # match 'json_only', constraints: { format: 'json' }, via: :get - # - # class PermitList - # def matches?(request) request.remote_ip == '1.2.3.4' end - # end - # match 'path', to: 'c#a', constraints: PermitList.new, via: :get - # - # See Scoping#constraints for more examples with its scope - # equivalent. - # - # [:defaults] - # Sets defaults for parameters - # - # # Sets params[:format] to 'jpg' by default - # match 'path', to: 'c#a', defaults: { format: 'jpg' }, via: :get - # - # See Scoping#defaults for its scope equivalent. - # - # [:anchor] - # Boolean to anchor a match pattern. Default is true. When set to - # false, the pattern matches any request prefixed with the given path. - # - # # Matches any request starting with 'path' - # match 'path', to: 'c#a', anchor: false, via: :get - # - # [:format] - # Allows you to specify the default value for optional +format+ - # segment or disable it by supplying +false+. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#566 - def match(path, options = T.unsafe(nil)); end - - # Mount a Rack-based application to be used within the application. - # - # mount SomeRackApp, at: "some_route" - # - # Alternatively: - # - # mount(SomeRackApp => "some_route") - # - # For options, see +match+, as +mount+ uses it internally. - # - # All mounted applications come with routing helpers to access them. - # These are named after the class specified, so for the above example - # the helper is either +some_rack_app_path+ or +some_rack_app_url+. - # To customize this helper's name, use the +:as+ option: - # - # mount(SomeRackApp => "some_route", as: "exciting") - # - # This will generate the +exciting_path+ and +exciting_url+ helpers - # which can be used to navigate to this mounted app. - # - # @raise [ArgumentError] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#588 - def mount(app, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#623 - def with_default_scope(scope, &block); end - - private - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#639 - def app_name(app, rails_app); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#648 - def define_generate_prefix(app, name); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#635 - def rails_app?(app); end -end - -# Routing Concerns allow you to declare common routes that can be reused -# inside others resources and routes. -# -# concern :commentable do -# resources :comments -# end -# -# concern :image_attachable do -# resources :images, only: :index -# end -# -# These concerns are used in Resources routing: -# -# resources :messages, concerns: [:commentable, :image_attachable] -# -# or in a scope or namespace: -# -# namespace :posts do -# concerns :commentable -# end -# -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2014 -module ActionDispatch::Routing::Mapper::Concerns - # Define a routing concern using a name. - # - # Concerns may be defined inline, using a block, or handled by - # another object, by passing that object as the second parameter. - # - # The concern object, if supplied, should respond to call, - # which will receive two parameters: - # - # * The current mapper - # * A hash of options which the concern object may use - # - # Options may also be used by concerns defined in a block by accepting - # a block parameter. So, using a block, you might do something as - # simple as limit the actions available on certain resources, passing - # standard resource options through the concern: - # - # concern :commentable do |options| - # resources :comments, options - # end - # - # resources :posts, concerns: :commentable - # resources :archived_posts do - # # Don't allow comments on archived posts - # concerns :commentable, only: [:index, :show] - # end - # - # Or, using a callable object, you might implement something more - # specific to your application, which would be out of place in your - # routes file. - # - # # purchasable.rb - # class Purchasable - # def initialize(defaults = {}) - # @defaults = defaults - # end - # - # def call(mapper, options = {}) - # options = @defaults.merge(options) - # mapper.resources :purchases - # mapper.resources :receipts - # mapper.resources :returns if options[:returnable] - # end - # end - # - # # routes.rb - # concern :purchasable, Purchasable.new(returnable: true) - # - # resources :toys, concerns: :purchasable - # resources :electronics, concerns: :purchasable - # resources :pets do - # concerns :purchasable, returnable: false - # end - # - # Any routing helpers can be used inside a concern. If using a - # callable, they're accessible from the Mapper that's passed to - # call. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2071 - def concern(name, callable = T.unsafe(nil), &block); end - - # Use the named concerns - # - # resources :posts do - # concerns :commentable - # end - # - # Concerns also work in any routes helper that you want to use: - # - # namespace :posts do - # concerns :commentable - # end - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2087 - def concerns(*args); end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#15 -class ActionDispatch::Routing::Mapper::Constraints < ::ActionDispatch::Routing::Endpoint - # @return [Constraints] a new instance of Constraints - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#21 - def initialize(app, constraints, strategy); end - - # Returns the value of attribute app. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#16 - def app; end - - # Returns the value of attribute constraints. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#16 - def constraints; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#36 - def dispatcher?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#38 - def matches?(req); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#45 - def serve(req); end - - private - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#52 - def constraint_args(constraint, request); end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#19 -ActionDispatch::Routing::Mapper::Constraints::CALL = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#18 -ActionDispatch::Routing::Mapper::Constraints::SERVE = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2099 -module ActionDispatch::Routing::Mapper::CustomUrls - # Define custom URL helpers that will be added to the application's - # routes. This allows you to override and/or replace the default behavior - # of routing helpers, e.g: - # - # direct :homepage do - # "https://rubyonrails.org" - # end - # - # direct :commentable do |model| - # [ model, anchor: model.dom_id ] - # end - # - # direct :main do - # { controller: "pages", action: "index", subdomain: "www" } - # end - # - # The return value from the block passed to +direct+ must be a valid set of - # arguments for +url_for+ which will actually build the URL string. This can - # be one of the following: - # - # * A string, which is treated as a generated URL - # * A hash, e.g. { controller: "pages", action: "index" } - # * An array, which is passed to +polymorphic_url+ - # * An Active Model instance - # * An Active Model class - # - # NOTE: Other URL helpers can be called in the block but be careful not to invoke - # your custom URL helper again otherwise it will result in a stack overflow error. - # - # You can also specify default options that will be passed through to - # your URL helper definition, e.g: - # - # direct :browse, page: 1, size: 10 do |options| - # [ :products, options.merge(params.permit(:page, :size).to_h.symbolize_keys) ] - # end - # - # In this instance the +params+ object comes from the context in which the - # block is executed, e.g. generating a URL inside a controller action or a view. - # If the block is executed where there isn't a +params+ object such as this: - # - # Rails.application.routes.url_helpers.browse_path - # - # then it will raise a +NameError+. Because of this you need to be aware of the - # context in which you will use your custom URL helper when defining it. - # - # NOTE: The +direct+ method can't be used inside of a scope block such as - # +namespace+ or +scope+ and will raise an error if it detects that it is. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2147 - def direct(name, options = T.unsafe(nil), &block); end - - # Define custom polymorphic mappings of models to URLs. This alters the - # behavior of +polymorphic_url+ and consequently the behavior of - # +link_to+ and +form_for+ when passed a model instance, e.g: - # - # resource :basket - # - # resolve "Basket" do - # [:basket] - # end - # - # This will now generate "/basket" when a +Basket+ instance is passed to - # +link_to+ or +form_for+ instead of the standard "/baskets/:id". - # - # NOTE: This custom behavior only applies to simple polymorphic URLs where - # a single model instance is passed and not more complicated forms, e.g: - # - # # config/routes.rb - # resource :profile - # namespace :admin do - # resources :users - # end - # - # resolve("User") { [:profile] } - # - # # app/views/application/_menu.html.erb - # link_to "Profile", @current_user - # link_to "Profile", [:admin, @current_user] - # - # The first +link_to+ will generate "/profile" but the second will generate - # the standard polymorphic URL of "/admin/users/1". - # - # You can pass options to a polymorphic mapping - the arity for the block - # needs to be two as the instance is passed as the first argument, e.g: - # - # resolve "Basket", anchor: "items" do |basket, options| - # [:basket, options] - # end - # - # This generates the URL "/basket#items" because when the last item in an - # array passed to +polymorphic_url+ is a hash then it's treated as options - # to the URL helper that gets called. - # - # NOTE: The +resolve+ method can't be used inside of a scope block such as - # +namespace+ or +scope+ and will raise an error if it detects that it is. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2199 - def resolve(*args, &block); end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#682 -module ActionDispatch::Routing::Mapper::HttpHelpers - # Define a route that only recognizes HTTP DELETE. - # For supported arguments, see match[rdoc-ref:Base#match] - # - # delete 'broccoli', to: 'food#broccoli' - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#719 - def delete(*args, &block); end - - # Define a route that only recognizes HTTP GET. - # For supported arguments, see match[rdoc-ref:Base#match] - # - # get 'bacon', to: 'food#bacon' - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#687 - def get(*args, &block); end - - # Define a route that only recognizes HTTP OPTIONS. - # For supported arguments, see match[rdoc-ref:Base#match] - # - # options 'carrots', to: 'food#carrots' - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#727 - def options(*args, &block); end - - # Define a route that only recognizes HTTP PATCH. - # For supported arguments, see match[rdoc-ref:Base#match] - # - # patch 'bacon', to: 'food#bacon' - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#703 - def patch(*args, &block); end - - # Define a route that only recognizes HTTP POST. - # For supported arguments, see match[rdoc-ref:Base#match] - # - # post 'bacon', to: 'food#bacon' - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#695 - def post(*args, &block); end - - # Define a route that only recognizes HTTP PUT. - # For supported arguments, see match[rdoc-ref:Base#match] - # - # put 'bacon', to: 'food#bacon' - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#711 - def put(*args, &block); end - - private - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#732 - def map_method(method, args, &block); end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#69 -class ActionDispatch::Routing::Mapper::Mapping - # @return [Mapping] a new instance of Mapping - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#118 - def initialize(set:, ast:, controller:, default_action:, to:, formatted:, via:, options_constraints:, anchor:, scope_params:, options:); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#176 - def application; end - - # Returns the value of attribute ast. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def ast; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#180 - def conditions; end - - # Returns the value of attribute default_action. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def default_action; end - - # Returns the value of attribute default_controller. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def default_controller; end - - # Returns the value of attribute defaults. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def defaults; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#169 - def make_route(name, precedence); end - - # Returns the value of attribute path. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def path; end - - # Returns the value of attribute required_defaults. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def required_defaults; end - - # Returns the value of attribute requirements. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def requirements; end - - # Returns the value of attribute scope_options. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def scope_options; end - - # Returns the value of attribute to. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 - def to; end - - private - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#316 - def add_controller_module(controller, modyoule); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#269 - def app(blocks); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#335 - def blocks(callable_constraint); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#184 - def build_conditions(current_conditions, request_class); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#281 - def check_controller_and_action(path_params, controller, action); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#296 - def check_part(name, part, path_params, hash); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#342 - def constraints(options, path_params); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#356 - def dispatcher(raise_on_name_error); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#199 - def intern(object); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#265 - def normalize_defaults(options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#233 - def normalize_format(formatted); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#203 - def normalize_options!(options, path_params, modyoule); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#193 - def request_method; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#227 - def split_constraints(path_params, constraints); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#308 - def split_to(to); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#328 - def translate_controller(controller); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#249 - def verify_regexp_requirements(requirements, wildcard_options); end - - class << self - # source://actionpack//lib/action_dispatch/routing/mapper.rb#76 - def build(scope, set, ast, controller, default_action, to, via, formatted, options_constraints, anchor, options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#90 - def check_via(via); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#102 - def normalize_path(path, format); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#114 - def optional_format?(path, format); end - end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#70 -ActionDispatch::Routing::Mapper::Mapping::ANCHOR_CHARACTERS_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#167 -ActionDispatch::Routing::Mapper::Mapping::JOINED_SEPARATORS = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#71 -ActionDispatch::Routing::Mapper::Mapping::OPTIONAL_FORMAT_REGEX = T.let(T.unsafe(nil), Regexp) - -# Resource routing allows you to quickly declare all of the common routes -# for a given resourceful controller. Instead of declaring separate routes -# for your +index+, +show+, +new+, +edit+, +create+, +update+, and +destroy+ -# actions, a resourceful route declares them in a single line of code: -# -# resources :photos -# -# Sometimes, you have a resource that clients always look up without -# referencing an ID. A common example, /profile always shows the profile of -# the currently logged in user. In this case, you can use a singular resource -# to map /profile (rather than /profile/:id) to the show action. -# -# resource :profile -# -# It's common to have resources that are logically children of other -# resources: -# -# resources :magazines do -# resources :ads -# end -# -# You may wish to organize groups of controllers under a namespace. Most -# commonly, you might group a number of administrative controllers under -# an +admin+ namespace. You would place these controllers under the -# app/controllers/admin directory, and you can group them together -# in your router: -# -# namespace "admin" do -# resources :posts, :comments -# end -# -# By default the +:id+ parameter doesn't accept dots. If you need to -# use dots as part of the +:id+ parameter add a constraint which -# overrides this restriction, e.g: -# -# resources :articles, id: /[^\/]+/ -# -# This allows any character other than a slash as part of your +:id+. -# -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1122 -module ActionDispatch::Routing::Mapper::Resources - # To add a route to the collection: - # - # resources :photos do - # collection do - # get 'search' - # end - # end - # - # This will enable Rails to recognize paths such as /photos/search - # with GET, and route to the search action of +PhotosController+. It will also - # create the search_photos_url and search_photos_path - # route helpers. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1500 - def collection(&block); end - - # Loads another routes file with the given +name+ located inside the - # +config/routes+ directory. In that file, you can use the normal - # routing DSL, but do not surround it with a - # +Rails.application.routes.draw+ block. - # - # # config/routes.rb - # Rails.application.routes.draw do - # draw :admin # Loads `config/routes/admin.rb` - # draw "third_party/some_gem" # Loads `config/routes/third_party/some_gem.rb` - # end - # - # # config/routes/admin.rb - # namespace :admin do - # resources :accounts - # end - # - # # config/routes/third_party/some_gem.rb - # mount SomeGem::Engine, at: "/some_gem" - # - # CAUTION: Use this feature with care. Having multiple routes - # files can negatively impact discoverability and readability. For most - # applications — even those with a few hundred routes — it's easier for - # developers to have a single routes file. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1610 - def draw(name); end - - # Matches a URL pattern to one or more routes. - # For more information, see match[rdoc-ref:Base#match]. - # - # match 'path' => 'controller#action', via: :patch - # match 'path', to: 'controller#action', via: :post - # match 'path', 'otherpath', on: :member, via: :get - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1632 - def match(path, *rest, &block); end - - # To add a member route, add a member block into the resource block: - # - # resources :photos do - # member do - # get 'preview' - # end - # end - # - # This will recognize /photos/1/preview with GET, and route to the - # preview action of +PhotosController+. It will also create the - # preview_photo_url and preview_photo_path helpers. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1521 - def member(&block); end - - # See ActionDispatch::Routing::Mapper::Scoping#namespace. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1568 - def namespace(path, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1547 - def nested(&block); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1537 - def new(&block); end - - # Sometimes, you have a resource that clients always look up without - # referencing an ID. A common example, /profile always shows the - # profile of the currently logged in user. In this case, you can use - # a singular resource to map /profile (rather than /profile/:id) to - # the show action: - # - # resource :profile - # - # This creates six different routes in your application, all mapping to - # the +Profiles+ controller (note that the controller is named after - # the plural): - # - # GET /profile/new - # GET /profile - # GET /profile/edit - # PATCH/PUT /profile - # DELETE /profile - # POST /profile - # - # If you want instances of a model to work with this resource via - # record identification (e.g. in +form_with+ or +redirect_to+), you - # will need to call resolve[rdoc-ref:CustomUrls#resolve]: - # - # resource :profile - # resolve('Profile') { [:profile] } - # - # # Enables this to work with singular routes: - # form_with(model: @profile) {} - # - # === Options - # Takes same options as resources[rdoc-ref:#resources] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1292 - def resource(*resources, &block); end - - # In Rails, a resourceful route provides a mapping between HTTP verbs - # and URLs and controller actions. By convention, each action also maps - # to particular CRUD operations in a database. A single entry in the - # routing file, such as - # - # resources :photos - # - # creates seven different routes in your application, all mapping to - # the +Photos+ controller: - # - # GET /photos - # GET /photos/new - # POST /photos - # GET /photos/:id - # GET /photos/:id/edit - # PATCH/PUT /photos/:id - # DELETE /photos/:id - # - # Resources can also be nested infinitely by using this block syntax: - # - # resources :photos do - # resources :comments - # end - # - # This generates the following comments routes: - # - # GET /photos/:photo_id/comments - # GET /photos/:photo_id/comments/new - # POST /photos/:photo_id/comments - # GET /photos/:photo_id/comments/:id - # GET /photos/:photo_id/comments/:id/edit - # PATCH/PUT /photos/:photo_id/comments/:id - # DELETE /photos/:photo_id/comments/:id - # - # === Options - # Takes same options as match[rdoc-ref:Base#match] as well as: - # - # [:path_names] - # Allows you to change the segment component of the +edit+ and +new+ actions. - # Actions not specified are not changed. - # - # resources :posts, path_names: { new: "brand_new" } - # - # The above example will now change /posts/new to /posts/brand_new. - # - # [:path] - # Allows you to change the path prefix for the resource. - # - # resources :posts, path: 'postings' - # - # The resource and all segments will now route to /postings instead of /posts. - # - # [:only] - # Only generate routes for the given actions. - # - # resources :cows, only: :show - # resources :cows, only: [:show, :index] - # - # [:except] - # Generate all routes except for the given actions. - # - # resources :cows, except: :show - # resources :cows, except: [:show, :index] - # - # [:shallow] - # Generates shallow routes for nested resource(s). When placed on a parent resource, - # generates shallow routes for all nested resources. - # - # resources :posts, shallow: true do - # resources :comments - # end - # - # Is the same as: - # - # resources :posts do - # resources :comments, except: [:show, :edit, :update, :destroy] - # end - # resources :comments, only: [:show, :edit, :update, :destroy] - # - # This allows URLs for resources that otherwise would be deeply nested such - # as a comment on a blog post like /posts/a-long-permalink/comments/1234 - # to be shortened to just /comments/1234. - # - # Set shallow: false on a child resource to ignore a parent's shallow parameter. - # - # [:shallow_path] - # Prefixes nested shallow routes with the specified path. - # - # scope shallow_path: "sekret" do - # resources :posts do - # resources :comments, shallow: true - # end - # end - # - # The +comments+ resource here will have the following routes generated for it: - # - # post_comments GET /posts/:post_id/comments(.:format) - # post_comments POST /posts/:post_id/comments(.:format) - # new_post_comment GET /posts/:post_id/comments/new(.:format) - # edit_comment GET /sekret/comments/:id/edit(.:format) - # comment GET /sekret/comments/:id(.:format) - # comment PATCH/PUT /sekret/comments/:id(.:format) - # comment DELETE /sekret/comments/:id(.:format) - # - # [:shallow_prefix] - # Prefixes nested shallow route names with specified prefix. - # - # scope shallow_prefix: "sekret" do - # resources :posts do - # resources :comments, shallow: true - # end - # end - # - # The +comments+ resource here will have the following routes generated for it: - # - # post_comments GET /posts/:post_id/comments(.:format) - # post_comments POST /posts/:post_id/comments(.:format) - # new_post_comment GET /posts/:post_id/comments/new(.:format) - # edit_sekret_comment GET /comments/:id/edit(.:format) - # sekret_comment GET /comments/:id(.:format) - # sekret_comment PATCH/PUT /comments/:id(.:format) - # sekret_comment DELETE /comments/:id(.:format) - # - # [:format] - # Allows you to specify the default value for optional +format+ - # segment or disable it by supplying +false+. - # - # [:param] - # Allows you to override the default param name of +:id+ in the URL. - # - # === Examples - # - # # routes call Admin::PostsController - # resources :posts, module: "admin" - # - # # resource actions are at /admin/posts. - # resources :posts, path: "admin/posts" - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1458 - def resources(*resources, &block); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1257 - def resources_path_names(options); end - - # You can specify what Rails should route "/" to with the root method: - # - # root to: 'pages#main' - # - # For options, see +match+, as +root+ uses it internally. - # - # You can also pass a string which will expand - # - # root 'pages#main' - # - # You should put the root route at the top of config/routes.rb, - # because this means it will be matched first. As this is the most popular route - # of most Rails applications, this is beneficial. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1679 - def root(path, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1576 - def shallow; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1583 - def shallow?; end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1743 - def action_options?(options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1825 - def action_path(name); end - - # @raise [ArgumentError] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1961 - def add_route(action, controller, options, _path, to, via, formatted, anchor, options_constraints); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1879 - def api_only?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1738 - def apply_action_options(options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1704 - def apply_common_behavior_for(method, resources, options, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1801 - def canonical_action?(action); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1946 - def decomposed_match(path, controller, options, _path, to, via, formatted, anchor, options_constraints); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1931 - def get_to_from_path(path, to, action); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1890 - def map_match(paths, options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1988 - def match_root_route(options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1841 - def name_for_action(as, action); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1778 - def nested_options; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1759 - def nested_scope?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1797 - def param_constraint; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1793 - def param_constraint?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1700 - def parent_resource; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1815 - def path_for_action(action, path); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1883 - def path_scope(path); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1829 - def prefix_name_for_action(as, action); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1755 - def resource_method_scope?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1770 - def resource_scope(resource, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1751 - def resource_scope?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1747 - def scope_action_options; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1867 - def set_member_mappings_for_resource; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1787 - def shallow_nesting_depth; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1805 - def shallow_scope; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1942 - def using_match_shorthand?(path); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1763 - def with_scope_level(kind); end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1127 -ActionDispatch::Routing::Mapper::Resources::CANONICAL_ACTIONS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1126 -ActionDispatch::Routing::Mapper::Resources::RESOURCE_OPTIONS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1129 -class ActionDispatch::Routing::Mapper::Resources::Resource - # @return [Resource] a new instance of Resource - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1132 - def initialize(entities, api_only, shallow, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1157 - def actions; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1165 - def available_actions; end - - # Checks for uncountable plurals, and appends "_index" if the plural - # and singular form are the same. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1189 - def collection_name; end - - # Returns the value of attribute path. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 - def collection_scope; end - - # Returns the value of attribute controller. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 - def controller; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1149 - def default_actions; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1181 - def member_name; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1199 - def member_scope; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1173 - def name; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1209 - def nested_param; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1213 - def nested_scope; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1205 - def new_scope(new_path); end - - # Returns the value of attribute param. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 - def param; end - - # Returns the value of attribute path. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 - def path; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1177 - def plural; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1193 - def resource_scope; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1217 - def shallow?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1199 - def shallow_scope; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1221 - def singleton?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1181 - def singular; end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1224 -class ActionDispatch::Routing::Mapper::Resources::SingletonResource < ::ActionDispatch::Routing::Mapper::Resources::Resource - # @return [SingletonResource] a new instance of SingletonResource - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1225 - def initialize(entities, api_only, shallow, options); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 - def collection_name; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1232 - def default_actions; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 - def member_name; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 - def member_scope; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 - def nested_scope; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1240 - def plural; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1254 - def singleton?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 - def singular; end -end - -# CANONICAL_ACTIONS holds all actions that does not need a prefix or -# a path appended since they fit properly in their scope level. -# -# source://actionpack//lib/action_dispatch/routing/mapper.rb#1125 -ActionDispatch::Routing::Mapper::Resources::VALID_ON_OPTIONS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2213 -class ActionDispatch::Routing::Mapper::Scope - include ::Enumerable - - # @return [Scope] a new instance of Scope - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2223 - def initialize(hash, parent = T.unsafe(nil), scope_level = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2282 - def [](key); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2249 - def action_name(name_prefix, prefix, collection_name, member_name); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2289 - def each; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2297 - def frame; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2229 - def nested?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2274 - def new(hash); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2278 - def new_level(level); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2233 - def null?; end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2270 - def options; end - - # Returns the value of attribute parent. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2221 - def parent; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2245 - def resource_method_scope?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2266 - def resource_scope?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2241 - def resources?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2237 - def root?; end - - # Returns the value of attribute scope_level. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#2221 - def scope_level; end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2299 -ActionDispatch::Routing::Mapper::Scope::NULL = T.let(T.unsafe(nil), ActionDispatch::Routing::Mapper::Scope) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2214 -ActionDispatch::Routing::Mapper::Scope::OPTIONS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2219 -ActionDispatch::Routing::Mapper::Scope::RESOURCE_METHOD_SCOPES = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#2218 -ActionDispatch::Routing::Mapper::Scope::RESOURCE_SCOPES = T.let(T.unsafe(nil), Array) - -# You may wish to organize groups of controllers under a namespace. -# Most commonly, you might group a number of administrative controllers -# under an +admin+ namespace. You would place these controllers under -# the app/controllers/admin directory, and you can group them -# together in your router: -# -# namespace "admin" do -# resources :posts, :comments -# end -# -# This will create a number of routes for each of the posts and comments -# controller. For Admin::PostsController, Rails will create: -# -# GET /admin/posts -# GET /admin/posts/new -# POST /admin/posts -# GET /admin/posts/1 -# GET /admin/posts/1/edit -# PATCH/PUT /admin/posts/1 -# DELETE /admin/posts/1 -# -# If you want to route /posts (without the prefix /admin) to -# Admin::PostsController, you could use -# -# scope module: "admin" do -# resources :posts -# end -# -# or, for a single case -# -# resources :posts, module: "admin" -# -# If you want to route /admin/posts to +PostsController+ -# (without the Admin:: module prefix), you could use -# -# scope "/admin" do -# resources :posts -# end -# -# or, for a single case -# -# resources :posts, path: "/admin/posts" -# -# In each of these cases, the named routes remain the same as if you did -# not use scope. In the last case, the following paths map to -# +PostsController+: -# -# GET /admin/posts -# GET /admin/posts/new -# POST /admin/posts -# GET /admin/posts/1 -# GET /admin/posts/1/edit -# PATCH/PUT /admin/posts/1 -# DELETE /admin/posts/1 -# -# source://actionpack//lib/action_dispatch/routing/mapper.rb#794 -module ActionDispatch::Routing::Mapper::Scoping - # === Parameter Restriction - # Allows you to constrain the nested routes based on a set of rules. - # For instance, in order to change the routes to allow for a dot character in the +id+ parameter: - # - # constraints(id: /\d+\.\d+/) do - # resources :posts - # end - # - # Now routes such as +/posts/1+ will no longer be valid, but +/posts/1.1+ will be. - # The +id+ parameter must match the constraint passed in for this example. - # - # You may use this to also restrict other parameters: - # - # resources :posts do - # constraints(post_id: /\d+\.\d+/) do - # resources :comments - # end - # end - # - # === Restricting based on IP - # - # Routes can also be constrained to an IP or a certain range of IP addresses: - # - # constraints(ip: /192\.168\.\d+\.\d+/) do - # resources :posts - # end - # - # Any user connecting from the 192.168.* range will be able to see this resource, - # where as any user connecting outside of this range will be told there is no such route. - # - # === Dynamic request matching - # - # Requests to routes can be constrained based on specific criteria: - # - # constraints(-> (req) { /iPhone/.match?(req.env["HTTP_USER_AGENT"]) }) do - # resources :iphones - # end - # - # You are able to move this logic out into a class if it is too complex for routes. - # This class must have a +matches?+ method defined on it which either returns +true+ - # if the user should be given access to that route, or +false+ if the user should not. - # - # class Iphone - # def self.matches?(request) - # /iPhone/.match?(request.env["HTTP_USER_AGENT"]) - # end - # end - # - # An expected place for this code would be +lib/constraints+. - # - # This class is then used like this: - # - # constraints(Iphone) do - # resources :iphones - # end - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#999 - def constraints(constraints = T.unsafe(nil), &block); end - - # Scopes routes to a specific controller - # - # controller "food" do - # match "bacon", action: :bacon, via: :get - # end - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#884 - def controller(controller); end - - # Allows you to set default parameters for a route, such as this: - # defaults id: 'home' do - # match 'scoped_pages/(:id)', to: 'pages#show' - # end - # Using this, the +:id+ parameter here will default to 'home'. - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1008 - def defaults(defaults = T.unsafe(nil)); end - - # Scopes routes to a specific namespace. For example: - # - # namespace :admin do - # resources :posts - # end - # - # This generates the following routes: - # - # admin_posts GET /admin/posts(.:format) admin/posts#index - # admin_posts POST /admin/posts(.:format) admin/posts#create - # new_admin_post GET /admin/posts/new(.:format) admin/posts#new - # edit_admin_post GET /admin/posts/:id/edit(.:format) admin/posts#edit - # admin_post GET /admin/posts/:id(.:format) admin/posts#show - # admin_post PATCH/PUT /admin/posts/:id(.:format) admin/posts#update - # admin_post DELETE /admin/posts/:id(.:format) admin/posts#destroy - # - # === Options - # - # The +:path+, +:as+, +:module+, +:shallow_path+, and +:shallow_prefix+ - # options all default to the name of the namespace. - # - # For options, see Base#match. For +:shallow_path+ option, see - # Resources#resources. - # - # # accessible through /sekret/posts rather than /admin/posts - # namespace :admin, path: "sekret" do - # resources :posts - # end - # - # # maps to Sekret::PostsController rather than Admin::PostsController - # namespace :admin, module: "sekret" do - # resources :posts - # end - # - # # generates +sekret_posts_path+ rather than +admin_posts_path+ - # namespace :admin, as: "sekret" do - # resources :posts - # end - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#929 - def namespace(path, options = T.unsafe(nil), &block); end - - # Scopes a set of routes to the given default options. - # - # Take the following route definition as an example: - # - # scope path: ":account_id", as: "account" do - # resources :projects - # end - # - # This generates helpers such as +account_projects_path+, just like +resources+ does. - # The difference here being that the routes generated are like /:account_id/projects, - # rather than /accounts/:account_id/projects. - # - # === Options - # - # Takes same options as Base#match and Resources#resources. - # - # # route /posts (without the prefix /admin) to Admin::PostsController - # scope module: "admin" do - # resources :posts - # end - # - # # prefix the posts resource's requests with '/admin' - # scope path: "/admin" do - # resources :posts - # end - # - # # prefix the routing helper name: +sekret_posts_path+ instead of +posts_path+ - # scope as: "sekret" do - # resources :posts - # end - # - # source://actionpack//lib/action_dispatch/routing/mapper.rb#825 - def scope(*args); end - - private - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1040 - def merge_action_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1024 - def merge_as_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1064 - def merge_blocks_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1056 - def merge_constraints_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1036 - def merge_controller_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1060 - def merge_defaults_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1048 - def merge_format_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1032 - def merge_module_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1070 - def merge_options_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1052 - def merge_path_names_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1016 - def merge_path_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1020 - def merge_shallow_path_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1028 - def merge_shallow_prefix_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1074 - def merge_shallow_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1078 - def merge_to_scope(parent, child); end - - # source://actionpack//lib/action_dispatch/routing/mapper.rb#1044 - def merge_via_scope(parent, child); end -end - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#877 -ActionDispatch::Routing::Mapper::Scoping::POISON = T.let(T.unsafe(nil), Object) - -# source://actionpack//lib/action_dispatch/routing/mapper.rb#13 -ActionDispatch::Routing::Mapper::URL_OPTIONS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/routing/redirection.rb#103 -class ActionDispatch::Routing::OptionRedirect < ::ActionDispatch::Routing::Redirect - # source://actionpack//lib/action_dispatch/routing/redirection.rb#132 - def inspect; end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#11 - def options; end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#106 - def path(params, request); end -end - -# source://actionpack//lib/action_dispatch/routing/redirection.rb#78 -class ActionDispatch::Routing::PathRedirect < ::ActionDispatch::Routing::Redirect - # source://actionpack//lib/action_dispatch/routing/redirection.rb#93 - def inspect; end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#81 - def path(params, request); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#98 - def interpolation_required?(string, params); end -end - -# source://actionpack//lib/action_dispatch/routing/redirection.rb#79 -ActionDispatch::Routing::PathRedirect::URL_PARTS = T.let(T.unsafe(nil), Regexp) - -# Polymorphic URL helpers are methods for smart resolution to a named route call when -# given an Active Record model instance. They are to be used in combination with -# ActionController::Resources. -# -# These methods are useful when you want to generate the correct URL or path to a RESTful -# resource without having to know the exact type of the record in question. -# -# Nested resources and/or namespaces are also supported, as illustrated in the example: -# -# polymorphic_url([:admin, @article, @comment]) -# -# results in: -# -# admin_article_comment_url(@article, @comment) -# -# == Usage within the framework -# -# Polymorphic URL helpers are used in a number of places throughout the \Rails framework: -# -# * url_for, so you can use it with a record as the argument, e.g. -# url_for(@article); -# * ActionView::Helpers::FormHelper uses polymorphic_path, so you can write -# form_for(@article) without having to specify :url parameter for the form -# action; -# * redirect_to (which, in fact, uses url_for) so you can write -# redirect_to(post) in your controllers; -# * ActionView::Helpers::AtomFeedHelper, so you don't have to explicitly specify URLs -# for feed entries. -# -# == Prefixed polymorphic helpers -# -# In addition to polymorphic_url and polymorphic_path methods, a -# number of prefixed helpers are available as a shorthand to action: "..." -# in options. Those are: -# -# * edit_polymorphic_url, edit_polymorphic_path -# * new_polymorphic_url, new_polymorphic_path -# -# Example usage: -# -# edit_polymorphic_path(@post) # => "/posts/1/edit" -# polymorphic_path(@post, format: :pdf) # => "/posts/1.pdf" -# -# == Usage with mounted engines -# -# If you are using a mounted engine and you need to use a polymorphic_url -# pointing at the engine's routes, pass in the engine's route proxy as the first -# argument to the method. For example: -# -# polymorphic_url([blog, @post]) # calls blog.post_path(@post) -# form_for([blog, @post]) # => "/blog/posts/1" -# -# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#57 -module ActionDispatch::Routing::PolymorphicRoutes - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#153 - def edit_polymorphic_path(record_or_hash, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#149 - def edit_polymorphic_url(record_or_hash, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#153 - def new_polymorphic_path(record_or_hash, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#149 - def new_polymorphic_url(record_or_hash, options = T.unsafe(nil)); end - - # Returns the path component of a URL for the given record. - # - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#124 - def polymorphic_path(record_or_hash_or_array, options = T.unsafe(nil)); end - - # Constructs a call to a named RESTful route for the given record and returns the - # resulting URL string. For example: - # - # # calls post_url(post) - # polymorphic_url(post) # => "http://example.com/posts/1" - # polymorphic_url([blog, post]) # => "http://example.com/blogs/1/posts/1" - # polymorphic_url([:admin, blog, post]) # => "http://example.com/admin/blogs/1/posts/1" - # polymorphic_url([user, :blog, post]) # => "http://example.com/users/1/blog/posts/1" - # polymorphic_url(Comment) # => "http://example.com/comments" - # - # ==== Options - # - # * :action - Specifies the action prefix for the named route: - # :new or :edit. Default is no prefix. - # * :routing_type - Allowed values are :path or :url. - # Default is :url. - # - # Also includes all the options from url_for. These include such - # things as :anchor or :trailing_slash. Example usage - # is given below: - # - # polymorphic_url([blog, post], anchor: 'my_anchor') - # # => "http://example.com/blogs/1/posts/1#my_anchor" - # polymorphic_url([blog, post], anchor: 'my_anchor', script_name: "/my_app") - # # => "http://example.com/my_app/blogs/1/posts/1#my_anchor" - # - # For all of these options, see the documentation for {url_for}[rdoc-ref:ActionDispatch::Routing::UrlFor]. - # - # ==== Functionality - # - # # an Article record - # polymorphic_url(record) # same as article_url(record) - # - # # a Comment record - # polymorphic_url(record) # same as comment_url(record) - # - # # it recognizes new records and maps to the collection - # record = Comment.new - # polymorphic_url(record) # same as comments_url() - # - # # the class of a record will also map to the collection - # polymorphic_url(Comment) # same as comments_url() - # - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#101 - def polymorphic_url(record_or_hash_or_array, options = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#168 - def polymorphic_mapping(record); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#164 - def polymorphic_path_for_action(action, record_or_hash, options); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#160 - def polymorphic_url_for_action(action, record_or_hash, options); end -end - -# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#176 -class ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder - # @return [HelperMethodBuilder] a new instance of HelperMethodBuilder - # - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#239 - def initialize(key_strategy, prefix, suffix); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#253 - def handle_class(klass); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#257 - def handle_class_call(target, klass); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#284 - def handle_list(list); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#261 - def handle_model(record); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#275 - def handle_model_call(target, record); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#245 - def handle_string(record); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#249 - def handle_string_call(target, str); end - - # Returns the value of attribute prefix. - # - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#237 - def prefix; end - - # Returns the value of attribute suffix. - # - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#237 - def suffix; end - - private - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#338 - def get_method_for_class(klass); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#343 - def get_method_for_string(str); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#330 - def polymorphic_mapping(target, record); end - - class << self - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#187 - def build(action, type); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#179 - def get(action, type); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#185 - def path; end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#201 - def plural(prefix, suffix); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#205 - def polymorphic_method(recipient, record_or_hash_or_array, action, type, options); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#197 - def singular(prefix, suffix); end - - # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#184 - def url; end - end -end - -# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#177 -ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder::CACHE = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/routing/redirection.rb#10 -class ActionDispatch::Routing::Redirect < ::ActionDispatch::Routing::Endpoint - # @return [Redirect] a new instance of Redirect - # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#13 - def initialize(status, block); end - - # Returns the value of attribute block. - # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#11 - def block; end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#20 - def call(env); end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#56 - def inspect; end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#52 - def path(params, request); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#18 - def redirect?; end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#24 - def serve(req); end - - # Returns the value of attribute status. - # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#11 - def status; end - - private - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#65 - def escape(params); end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#69 - def escape_fragment(params); end - - # source://actionpack//lib/action_dispatch/routing/redirection.rb#73 - def escape_path(params); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#61 - def relative_path?(path); end -end - -# source://actionpack//lib/action_dispatch/routing/redirection.rb#137 -module ActionDispatch::Routing::Redirection - # Redirect any path to another path: - # - # get "/stories" => redirect("/posts") - # - # This will redirect the user, while ignoring certain parts of the request, including query string, etc. - # /stories, /stories?foo=bar, etc all redirect to /posts. - # - # The redirect will use a 301 Moved Permanently status code by - # default. This can be overridden with the +:status+ option: - # - # get "/stories" => redirect("/posts", status: 307) - # - # You can also use interpolation in the supplied redirect argument: - # - # get 'docs/:article', to: redirect('/wiki/%{article}') - # - # Note that if you return a path without a leading slash then the URL is prefixed with the - # current SCRIPT_NAME environment variable. This is typically '/' but may be different in - # a mounted engine or where the application is deployed to a subdirectory of a website. - # - # Alternatively you can use one of the other syntaxes: - # - # The block version of redirect allows for the easy encapsulation of any logic associated with - # the redirect in question. Either the params and request are supplied as arguments, or just - # params, depending of how many arguments your block accepts. A string is required as a - # return value. - # - # get 'jokes/:number', to: redirect { |params, request| - # path = (params[:number].to_i.even? ? "wheres-the-beef" : "i-love-lamp") - # "http://#{request.host_with_port}/#{path}" - # } - # - # Note that the do end syntax for the redirect block wouldn't work, as Ruby would pass - # the block to +get+ instead of +redirect+. Use { ... } instead. - # - # The options version of redirect allows you to supply only the parts of the URL which need - # to change, it also supports interpolation of the path similar to the first example. - # - # get 'stores/:name', to: redirect(subdomain: 'stores', path: '/%{name}') - # get 'stores/:name(*all)', to: redirect(subdomain: 'stores', path: '/%{name}%{all}') - # get '/stories', to: redirect(path: '/posts') - # - # This will redirect the user, while changing only the specified parts of the request, - # for example the +path+ option in the last example. - # /stories, /stories?foo=bar, redirect to /posts and /posts?foo=bar respectively. - # - # Finally, an object which responds to call can be supplied to redirect, allowing you to reuse - # common redirect routes. The call method must accept two arguments, params and request, and return - # a string. - # - # get 'accounts/:name' => redirect(SubdomainRedirector.new('api')) - # - # @raise [ArgumentError] - # - # source://actionpack//lib/action_dispatch/routing/redirection.rb#190 - def redirect(*args, &block); end -end - -# :stopdoc: -# -# source://actionpack//lib/action_dispatch/routing/route_set.rb#14 -class ActionDispatch::Routing::RouteSet - # @return [RouteSet] a new instance of RouteSet - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#366 - def initialize(config = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#615 - def add_polymorphic_mapping(klass, options, &block); end - - # @raise [ArgumentError] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#584 - def add_route(mapping, name); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#619 - def add_url_helper(name, options, &block); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#395 - def api_only?; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#415 - def append(&block); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#849 - def call(env); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#439 - def clear!; end - - # Returns the value of attribute default_scope. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def default_scope; end - - # Sets the attribute default_scope - # - # @param value the value to set the attribute default_scope to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def default_scope=(_arg0); end - - # Returns the value of attribute default_url_options. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#338 - def default_url_options; end - - # Sets the attribute default_url_options - # - # @param value the value to set the attribute default_url_options to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#338 - def default_url_options=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#461 - def define_mounted_helper(name, script_namer = T.unsafe(nil)); end - - # Returns the value of attribute disable_clear_and_finalize. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#337 - def disable_clear_and_finalize; end - - # Sets the attribute disable_clear_and_finalize - # - # @param value the value to set the attribute disable_clear_and_finalize to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#337 - def disable_clear_and_finalize=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#408 - def draw(&block); end - - # Returns the value of attribute draw_paths. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#338 - def draw_paths; end - - # Sets the attribute draw_paths - # - # @param value the value to set the attribute draw_paths to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#338 - def draw_paths=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#385 - def eager_load!; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#580 - def empty?; end - - # Returns the value of attribute env_key. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#339 - def env_key; end - - # Generate the path indicated by the arguments, and return an array of - # the keys that were not used to generate it. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#760 - def extra_keys(options, recall = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#433 - def finalize!; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#792 - def find_relative_url_root(options); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#788 - def find_script_name(options); end - - # Returns the value of attribute formatter. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def formatter; end - - # Sets the attribute formatter - # - # @param value the value to set the attribute formatter to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def formatter=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#764 - def generate_extras(options, recall = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#488 - def generate_url_helpers(supports_path); end - - # Since the router holds references to many parts of the system - # like engines, controllers and the application itself, inspecting - # the route set can actually be really slow, therefore we default - # alias inspect to to_s. - def inspect; end - - # Contains all the mounted helpers across different - # engines and the `main_app` helper for the application. - # You can include this in your classes if you want to - # access routes for other engines. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#457 - def mounted_helpers; end - - # Returns the value of attribute named_routes. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def named_routes; end - - # Sets the attribute named_routes - # - # @param value the value to set the attribute named_routes to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def named_routes=(_arg0); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#784 - def optimize_routes_generation?; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#796 - def path_for(options, route_name = T.unsafe(nil), reserved = T.unsafe(nil)); end - - # Returns the value of attribute polymorphic_mappings. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#339 - def polymorphic_mappings; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#419 - def prepend(&block); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#855 - def recognize_path(path, environment = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#870 - def recognize_path_with_request(req, path, extras, raise_on_missing: T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#391 - def relative_url_root; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#399 - def request_class; end - - # Returns the value of attribute resources_path_names. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#337 - def resources_path_names; end - - # Sets the attribute resources_path_names - # - # @param value the value to set the attribute resources_path_names to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#337 - def resources_path_names=(_arg0); end - - # Returns the value of attribute router. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def router; end - - # Sets the attribute router - # - # @param value the value to set the attribute router to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def router=(_arg0); end - - # Returns the value of attribute set. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def routes; end - - # Returns the value of attribute set. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def set; end - - # Sets the attribute set - # - # @param value the value to set the attribute set to. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 - def set=(_arg0); end - - # The +options+ argument must be a hash whose keys are *symbols*. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#801 - def url_for(options, route_name = T.unsafe(nil), url_strategy = T.unsafe(nil), method_name = T.unsafe(nil), reserved = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#480 - def url_helpers(supports_path = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#423 - def eval_block(block); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#775 - def generate(route_name, options, recall = T.unsafe(nil), method_name = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#403 - def make_request(env); end - - class << self - # source://actionpack//lib/action_dispatch/routing/route_set.rb#343 - def default_resources_path_names; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#347 - def new_with_config(config); end - end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#362 -class ActionDispatch::Routing::RouteSet::Config < ::Struct - # Returns the value of attribute api_only - # - # @return [Object] the current value of api_only - def api_only; end - - # Sets the attribute api_only - # - # @param value [Object] the value to set the attribute api_only to. - # @return [Object] the newly set value - def api_only=(_); end - - # Returns the value of attribute relative_url_root - # - # @return [Object] the current value of relative_url_root - def relative_url_root; end - - # Sets the attribute relative_url_root - # - # @param value [Object] the value to set the attribute relative_url_root to. - # @return [Object] the newly set value - def relative_url_root=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#623 -class ActionDispatch::Routing::RouteSet::CustomUrlHelper - # @return [CustomUrlHelper] a new instance of CustomUrlHelper - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#626 - def initialize(name, defaults, &block); end - - # Returns the value of attribute block. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#624 - def block; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#632 - def call(t, args, only_path = T.unsafe(nil)); end - - # Returns the value of attribute defaults. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#624 - def defaults; end - - # Returns the value of attribute name. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#624 - def name; end - - private - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#644 - def eval_block(t, args, options); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#648 - def merge_defaults(options); end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#364 -ActionDispatch::Routing::RouteSet::DEFAULT_CONFIG = T.let(T.unsafe(nil), ActionDispatch::Routing::RouteSet::Config) - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#21 -class ActionDispatch::Routing::RouteSet::Dispatcher < ::ActionDispatch::Routing::Endpoint - # @return [Dispatcher] a new instance of Dispatcher - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#22 - def initialize(raise_on_name_error); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#26 - def dispatcher?; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#28 - def serve(req); end - - private - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#42 - def controller(req); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#48 - def dispatch(controller, action, req, res); end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#653 -class ActionDispatch::Routing::RouteSet::Generator - # @return [Generator] a new instance of Generator - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#656 - def initialize(named_route, options, recall, set); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#668 - def controller; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#672 - def current_controller; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#743 - def different_controller?; end - - # Generates a path from routes, returns a RouteWithParams or MissingRoute. - # MissingRoute will raise ActionController::UrlGenerationError. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#739 - def generate; end - - # Returns the value of attribute named_route. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 - def named_route; end - - # Remove leading slashes from controllers - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#727 - def normalize_controller!; end - - # This pulls :controller, :action, and :id out of the recall. - # The recall key is only used if there is no key in the options - # or if the key in the options is identical. If any of - # :controller, :action or :id is not found, don't pull any - # more keys from the recall. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#709 - def normalize_controller_action_id!; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#684 - def normalize_options!; end - - # Returns the value of attribute options. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 - def options; end - - # Returns the value of attribute recall. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 - def recall; end - - # Returns the value of attribute set. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 - def set; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#676 - def use_recall_for(key); end - - # if the current controller is "foo/bar/baz" and controller: "baz/bat" - # is specified, the controller becomes "foo/baz/bat" - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#717 - def use_relative_controller!; end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#749 - def named_route_exists?; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#753 - def segment_keys; end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#448 -module ActionDispatch::Routing::RouteSet::MountedHelpers - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActionDispatch::Routing::UrlFor - - mixes_in_class_methods GeneratedClassMethods - - module GeneratedClassMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end - - module GeneratedInstanceMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end -end - -# A NamedRouteCollection instance is a collection of named routes, and also -# maintains an anonymous module that can be used to install helpers for the -# named routes. -# -# source://actionpack//lib/action_dispatch/routing/route_set.rb#66 -class ActionDispatch::Routing::RouteSet::NamedRouteCollection - include ::Enumerable - - # @return [NamedRouteCollection] a new instance of NamedRouteCollection - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#71 - def initialize; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#121 - def [](name); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#102 - def []=(name, route); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#102 - def add(name, route); end - - # Given a +name+, defines name_path and name_url helpers. - # Used by 'direct', 'resolve', and 'polymorphic' route helpers. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#149 - def add_url_helper(name, defaults, &block); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#88 - def clear; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#88 - def clear!; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#134 - def each(&block); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#121 - def get(name); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#84 - def helper_names; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#125 - def key?(name); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#143 - def length; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#139 - def names; end - - # Returns the value of attribute path_helpers_module. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#68 - def path_helpers_module; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#79 - def route_defined?(name); end - - # Returns the value of attribute url_helpers_module. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#68 - def url_helpers_module; end - - private - - # Create a URL helper allowing ordered parameters to be associated - # with corresponding dynamic segments, so you can do: - # - # foo_url(bar, baz, bang) - # - # Instead of: - # - # foo_url(bar: bar, baz: baz, bang: bang) - # - # Also allow options hash, so you can do: - # - # foo_url(bar, baz, bang, sort_by: 'baz') - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#317 - def define_url_helper(mod, name, helper, url_strategy); end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#68 - def routes; end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#172 -class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper - # @return [UrlHelper] a new instance of UrlHelper - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#255 - def initialize(route, options, route_name); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#262 - def call(t, method_name, args, inner_options, url_strategy); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#274 - def handle_positional_args(controller_options, inner_options, args, result, path_params); end - - # Returns the value of attribute route_name. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#185 - def route_name; end - - class << self - # source://actionpack//lib/action_dispatch/routing/route_set.rb#173 - def create(route, options, route_name); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#181 - def optimize_helper?(route); end - end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#187 -class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper::OptimizedUrlHelper < ::ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper - # @return [OptimizedUrlHelper] a new instance of OptimizedUrlHelper - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#190 - def initialize(route, options, route_name); end - - # Returns the value of attribute arg_size. - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#188 - def arg_size; end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#196 - def call(t, method_name, args, inner_options, url_strategy); end - - private - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#227 - def optimize_routes_generation?(t); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#219 - def optimized_helper(args); end - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#231 - def parameterize_args(args); end - - # @raise [ActionController::UrlGenerationError] - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#242 - def raise_generation_error(args); end -end - -# strategy for building URLs to send to the client -# -# source://actionpack//lib/action_dispatch/routing/route_set.rb#333 -ActionDispatch::Routing::RouteSet::PATH = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#780 -ActionDispatch::Routing::RouteSet::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#53 -class ActionDispatch::Routing::RouteSet::StaticDispatcher < ::ActionDispatch::Routing::RouteSet::Dispatcher - # @return [StaticDispatcher] a new instance of StaticDispatcher - # - # source://actionpack//lib/action_dispatch/routing/route_set.rb#54 - def initialize(controller_class); end - - private - - # source://actionpack//lib/action_dispatch/routing/route_set.rb#60 - def controller(_); end -end - -# source://actionpack//lib/action_dispatch/routing/route_set.rb#334 -ActionDispatch::Routing::RouteSet::UNKNOWN = T.let(T.unsafe(nil), Proc) - -# source://actionpack//lib/action_dispatch/routing/inspector.rb#8 -class ActionDispatch::Routing::RouteWrapper < ::SimpleDelegator - # source://actionpack//lib/action_dispatch/routing/inspector.rb#41 - def action; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#13 - def constraints; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#37 - def controller; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#9 - def endpoint; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#49 - def engine?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#45 - def internal?; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#25 - def name; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#21 - def path; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#17 - def rack_app; end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#29 - def reqs; end -end - -# This class is just used for displaying route information when someone -# executes `bin/rails routes` or looks at the RoutingError page. -# People should not use this class. -# -# source://actionpack//lib/action_dispatch/routing/inspector.rb#58 -class ActionDispatch::Routing::RoutesInspector - # @return [RoutesInspector] a new instance of RoutesInspector - # - # source://actionpack//lib/action_dispatch/routing/inspector.rb#59 - def initialize(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#64 - def format(formatter, filter = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#117 - def collect_engine_routes(route); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#104 - def collect_routes(routes); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#93 - def filter_routes(filter); end - - # source://actionpack//lib/action_dispatch/routing/inspector.rb#84 - def normalize_filter(filter); end -end - -# source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#7 -class ActionDispatch::Routing::RoutesProxy - include ::ActionDispatch::Routing::PolymorphicRoutes - include ::ActionDispatch::Routing::UrlFor - - # @return [RoutesProxy] a new instance of RoutesProxy - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#13 - def initialize(routes, scope, helpers, script_namer = T.unsafe(nil)); end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 - def _routes; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # Returns the value of attribute routes. - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 - def routes; end - - # Sets the attribute routes - # - # @param value the value to set the attribute routes to. - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 - def routes=(_arg0); end - - # Returns the value of attribute scope. - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 - def scope; end - - # Sets the attribute scope - # - # @param value the value to set the attribute scope to. - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 - def scope=(_arg0); end - - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#19 - def url_options; end - - private - - # Keeps the part of the script name provided by the global - # context via ENV["SCRIPT_NAME"], which `mount` doesn't know - # about since it depends on the specific request, but use our - # script name resolver for the mount point dependent part. - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#58 - def merge_script_names(previous_script_name, new_script_name); end - - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#30 - def method_missing(method, *args); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#26 - def respond_to_missing?(method, _); end - - class << self - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(value); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - end -end - -# source://actionpack//lib/action_dispatch/routing.rb#257 -ActionDispatch::Routing::SEPARATORS = T.let(T.unsafe(nil), Array) - -# In config/routes.rb you define URL-to-controller mappings, but the reverse -# is also possible: a URL can be generated from one of your routing definitions. -# URL generation functionality is centralized in this module. -# -# See ActionDispatch::Routing for general information about routing and config/routes.rb. -# -# Tip: If you need to generate URLs from your models or some other place, -# then ActionDispatch::Routing::UrlFor is what you're looking for. Read on for -# an introduction. In general, this module should not be included on its own, -# as it is usually included by +url_helpers+ (as in Rails.application.routes.url_helpers). -# -# == URL generation from parameters -# -# As you may know, some functions, such as ActionController::Base#url_for -# and ActionView::Helpers::UrlHelper#link_to, can generate URLs given a set -# of parameters. For example, you've probably had the chance to write code -# like this in one of your views: -# -# <%= link_to('Click here', controller: 'users', -# action: 'new', message: 'Welcome!') %> -# # => Click here -# -# +link_to+, and all other functions that require URL generation functionality, -# actually use ActionDispatch::Routing::UrlFor under the hood. And in particular, -# they use the ActionDispatch::Routing::UrlFor#url_for method. One can generate -# the same path as the above example by using the following code: -# -# include ActionDispatch::Routing::UrlFor -# url_for(controller: 'users', -# action: 'new', -# message: 'Welcome!', -# only_path: true) -# # => "/users/new?message=Welcome%21" -# -# Notice the only_path: true part. This is because UrlFor has no -# information about the website hostname that your Rails app is serving. So if you -# want to include the hostname as well, then you must also pass the :host -# argument: -# -# include UrlFor -# url_for(controller: 'users', -# action: 'new', -# message: 'Welcome!', -# host: 'www.example.com') -# # => "http://www.example.com/users/new?message=Welcome%21" -# -# By default, all controllers and views have access to a special version of +url_for+, -# that already knows what the current hostname is. So if you use +url_for+ in your -# controllers or your views, then you don't need to explicitly pass the :host -# argument. -# -# For convenience, mailers also include ActionDispatch::Routing::UrlFor. So -# within mailers, you can use url_for. However, mailers cannot access -# incoming web requests in order to derive hostname information, so you have -# to provide the +:host+ option or set the default host using -# +default_url_options+. For more information on url_for in mailers see the -# ActionMailer::Base documentation. -# -# -# == URL generation for named routes -# -# UrlFor also allows one to access methods that have been auto-generated from -# named routes. For example, suppose that you have a 'users' resource in your -# config/routes.rb: -# -# resources :users -# -# This generates, among other things, the method users_path. By default, -# this method is accessible from your controllers, views, and mailers. If you need -# to access this auto-generated method from other places (such as a model), then -# you can do that by including Rails.application.routes.url_helpers in your class: -# -# class User < ActiveRecord::Base -# include Rails.application.routes.url_helpers -# -# def base_uri -# user_path(self) -# end -# end -# -# User.find(1).base_uri # => "/users/1" -# -# source://actionpack//lib/action_dispatch/routing/url_for.rb#87 -module ActionDispatch::Routing::UrlFor - include ::ActionDispatch::Routing::PolymorphicRoutes - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#106 - def initialize(*_arg0, **_arg1, &_arg2); end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#173 - def full_url_for(options = T.unsafe(nil)); end - - # Allows calling direct or regular named route. - # - # resources :buckets - # - # direct :recordable do |recording| - # route_for(:bucket, recording.bucket) - # end - # - # direct :threadable do |threadable| - # route_for(:recordable, threadable.parent) - # end - # - # This maintains the context of the original caller on - # whether to return a path or full URL, e.g: - # - # threadable_path(threadable) # => "/buckets/1" - # threadable_url(threadable) # => "http://example.com/buckets/1" - # - # source://actionpack//lib/action_dispatch/routing/url_for.rb#213 - def route_for(name, *args); end - - # Generate a URL based on the options provided, +default_url_options+, and the - # routes defined in config/routes.rb. The following options are supported: - # - # * :only_path - If true, the relative URL is returned. Defaults to +false+. - # * :protocol - The protocol to connect to. Defaults to "http". - # * :host - Specifies the host the link should be targeted at. - # If :only_path is false, this option must be - # provided either explicitly, or via +default_url_options+. - # * :subdomain - Specifies the subdomain of the link, using the +tld_length+ - # to split the subdomain from the host. - # If false, removes all subdomains from the host part of the link. - # * :domain - Specifies the domain of the link, using the +tld_length+ - # to split the domain from the host. - # * :tld_length - Number of labels the TLD id composed of, only used if - # :subdomain or :domain are supplied. Defaults to - # ActionDispatch::Http::URL.tld_length, which in turn defaults to 1. - # * :port - Optionally specify the port to connect to. - # * :anchor - An anchor name to be appended to the path. - # * :params - The query parameters to be appended to the path. - # * :trailing_slash - If true, adds a trailing slash, as in "/archive/2009/". - # * :script_name - Specifies application path relative to domain root. If provided, prepends application path. - # - # Any other key (:controller, :action, etc.) given to - # +url_for+ is forwarded to the Routes module. - # - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', port: '8080' - # # => 'http://somehost.org:8080/tasks/testing' - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', anchor: 'ok', only_path: true - # # => '/tasks/testing#ok' - # url_for controller: 'tasks', action: 'testing', trailing_slash: true - # # => 'http://somehost.org/tasks/testing/' - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', number: '33' - # # => 'http://somehost.org/tasks/testing?number=33' - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp" - # # => 'http://somehost.org/myapp/tasks/testing' - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp", only_path: true - # # => '/myapp/tasks/testing' - # - # Missing routes keys may be filled in from the current request's parameters - # (e.g. +:controller+, +:action+, +:id+, and any other parameters that are - # placed in the path). Given that the current action has been reached - # through GET /users/1: - # - # url_for(only_path: true) # => '/users/1' - # url_for(only_path: true, action: 'edit') # => '/users/1/edit' - # url_for(only_path: true, action: 'edit', id: 2) # => '/users/2/edit' - # - # Notice that no +:id+ parameter was provided to the first +url_for+ call - # and the helper used the one from the route's path. Any path parameter - # implicitly used by +url_for+ can always be overwritten like shown on the - # last +url_for+ calls. - # - # source://actionpack//lib/action_dispatch/routing/url_for.rb#169 - def url_for(options = T.unsafe(nil)); end - - # Hook overridden in controller to add request information - # with +default_url_options+. Application logic should not - # go into url_options. - # - # source://actionpack//lib/action_dispatch/routing/url_for.rb#114 - def url_options; end - - protected - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/routing/url_for.rb#218 - def optimize_routes_generation?; end - - private - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#230 - def _routes_context; end - - # source://actionpack//lib/action_dispatch/routing/url_for.rb#223 - def _with_routes(routes); end - - module GeneratedClassMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end - - module GeneratedInstanceMethods - def default_url_options; end - def default_url_options=(value); end - def default_url_options?; end - end -end - -# This middleware is added to the stack when config.force_ssl = true, and is passed -# the options set in +config.ssl_options+. It does three jobs to enforce secure HTTP -# requests: -# -# 1. TLS redirect: Permanently redirects +http://+ requests to +https://+ -# with the same URL host, path, etc. Enabled by default. Set +config.ssl_options+ -# to modify the destination URL -# (e.g. redirect: { host: "secure.widgets.com", port: 8080 }), or set -# redirect: false to disable this feature. -# -# Requests can opt-out of redirection with +exclude+: -# -# config.ssl_options = { redirect: { exclude: -> request { /healthcheck/.match?(request.path) } } } -# -# Cookies will not be flagged as secure for excluded requests. -# -# 2. Secure cookies: Sets the +secure+ flag on cookies to tell browsers they -# must not be sent along with +http://+ requests. Enabled by default. Set -# +config.ssl_options+ with secure_cookies: false to disable this feature. -# -# 3. HTTP Strict Transport Security (HSTS): Tells the browser to remember -# this site as TLS-only and automatically redirect non-TLS requests. -# Enabled by default. Configure +config.ssl_options+ with hsts: false to disable. -# -# Set +config.ssl_options+ with hsts: { ... } to configure HSTS: -# -# * +expires+: How long, in seconds, these settings will stick. The minimum -# required to qualify for browser preload lists is 1 year. Defaults to -# 2 years (recommended). -# -# * +subdomains+: Set to +true+ to tell the browser to apply these settings -# to all subdomains. This protects your cookies from interception by a -# vulnerable site on a subdomain. Defaults to +true+. -# -# * +preload+: Advertise that this site may be included in browsers' -# preloaded HSTS lists. HSTS protects your site on every visit except the -# first visit since it hasn't seen your HSTS header yet. To close this -# gap, browser vendors include a baked-in list of HSTS-enabled sites. -# Go to https://hstspreload.org to submit your site for inclusion. -# Defaults to +false+. -# -# To turn off HSTS, omitting the header is not enough. Browsers will remember the -# original HSTS directive until it expires. Instead, use the header to tell browsers to -# expire HSTS immediately. Setting hsts: false is a shortcut for -# hsts: { expires: 0 }. -# -# source://actionpack//lib/action_dispatch/middleware/ssl.rb#49 -class ActionDispatch::SSL - # @return [SSL] a new instance of SSL - # - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#61 - def initialize(app, redirect: T.unsafe(nil), hsts: T.unsafe(nil), secure_cookies: T.unsafe(nil), ssl_default_redirect_status: T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#73 - def call(env); end - - private - - # https://tools.ietf.org/html/rfc6797#section-6.1 - # - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#107 - def build_hsts_header(hsts); end - - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#114 - def flag_cookies_as_secure!(headers); end - - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#145 - def https_location_for(request); end - - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#92 - def normalize_hsts_options(options); end - - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#128 - def redirect_to_https(request); end - - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#135 - def redirection_status(request); end - - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#88 - def set_hsts_header!(headers); end - - class << self - # source://actionpack//lib/action_dispatch/middleware/ssl.rb#57 - def default_hsts_options; end - end -end - -# Default to 2 years as recommended on hstspreload.org. -# -# source://actionpack//lib/action_dispatch/middleware/ssl.rb#53 -ActionDispatch::SSL::HSTS_EXPIRES_IN = T.let(T.unsafe(nil), Integer) - -# source://actionpack//lib/action_dispatch/middleware/ssl.rb#55 -ActionDispatch::SSL::PERMANENT_REDIRECT_REQUEST_METHODS = T.let(T.unsafe(nil), Array) - -# source://actionpack//lib/action_dispatch/middleware/server_timing.rb#6 -class ActionDispatch::ServerTiming - # @return [ServerTiming] a new instance of ServerTiming - # - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#52 - def initialize(app); end - - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#58 - def call(env); end - - class << self - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#48 - def unsubscribe; end - end -end - -# source://actionpack//lib/action_dispatch/middleware/server_timing.rb#7 -ActionDispatch::ServerTiming::SERVER_TIMING_HEADER = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/middleware/server_timing.rb#9 -class ActionDispatch::ServerTiming::Subscriber - include ::Singleton - extend ::Singleton::SingletonClassMethods - - # @return [Subscriber] a new instance of Subscriber - # - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#13 - def initialize; end - - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#17 - def call(event); end - - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#23 - def collect_events; end - - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#32 - def ensure_subscribed; end - - # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#40 - def unsubscribe; end - - class << self - private - - def allocate; end - def new(*_arg0); end - end -end - -# source://actionpack//lib/action_dispatch/middleware/server_timing.rb#11 -ActionDispatch::ServerTiming::Subscriber::KEY = T.let(T.unsafe(nil), Symbol) - -# source://actionpack//lib/action_dispatch.rb#91 -module ActionDispatch::Session; end - -# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#90 -class ActionDispatch::Session::AbstractSecureStore < ::Rack::Session::Abstract::PersistedSecure - include ::ActionDispatch::Session::Compatibility - include ::ActionDispatch::Session::StaleSessionCheck - include ::ActionDispatch::Session::SessionObject - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#95 - def generate_sid; end - - private - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#100 - def set_cookie(request, response, cookie); end -end - -# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#79 -class ActionDispatch::Session::AbstractStore < ::Rack::Session::Abstract::Persisted - include ::ActionDispatch::Session::Compatibility - include ::ActionDispatch::Session::StaleSessionCheck - include ::ActionDispatch::Session::SessionObject - - private - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#85 - def set_cookie(request, response, cookie); end -end - -# A session store that uses an ActiveSupport::Cache::Store to store the sessions. This store is most useful -# if you don't store critical data in your sessions and you don't need them to live for extended periods -# of time. -# -# ==== Options -# * cache - The cache to use. If it is not specified, Rails.cache will be used. -# * expire_after - The length of time a session will be stored before automatically expiring. -# By default, the :expires_in option of the cache is used. -# -# source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#15 -class ActionDispatch::Session::CacheStore < ::ActionDispatch::Session::AbstractSecureStore - # @return [CacheStore] a new instance of CacheStore - # - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#16 - def initialize(app, options = T.unsafe(nil)); end - - # Remove a session from the cache. - # - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#42 - def delete_session(env, sid, options); end - - # Get a session from the cache. - # - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#23 - def find_session(env, sid); end - - # Set a session in the cache. - # - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#31 - def write_session(env, sid, session, options); end - - private - - # Turn the session id into a cache key. - # - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#50 - def cache_key(id); end - - # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#54 - def get_session_with_fallback(sid); end -end - -# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#20 -module ActionDispatch::Session::Compatibility - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#21 - def initialize(app, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#26 - def generate_sid; end - - private - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#33 - def initialize_sid; end - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#38 - def make_request(env); end -end - -# This cookie-based session store is the Rails default. It is -# dramatically faster than the alternatives. -# -# Sessions typically contain at most a user ID and flash message; both fit -# within the 4096 bytes cookie size limit. A +CookieOverflow+ exception is raised if -# you attempt to store more than 4096 bytes of data. -# -# The cookie jar used for storage is automatically configured to be the -# best possible option given your application's configuration. -# -# Your cookies will be encrypted using your application's +secret_key_base+. This -# goes a step further than signed cookies in that encrypted cookies cannot -# be altered or read by users. This is the default starting in Rails 4. -# -# Configure your session store in an initializer: -# -# Rails.application.config.session_store :cookie_store, key: '_your_app_session' -# -# In the development and test environments your application's +secret_key_base+ is -# generated by Rails and stored in a temporary file in tmp/development_secret.txt. -# In all other environments, it is stored encrypted in the -# config/credentials.yml.enc file. -# -# If your application was not updated to Rails 5.2 defaults, the +secret_key_base+ -# will be found in the old config/secrets.yml file. -# -# Note that changing your +secret_key_base+ will invalidate all existing session. -# Additionally, you should take care to make sure you are not relying on the -# ability to decode signed cookies generated by your app in external -# applications or JavaScript before changing it. -# -# Because CookieStore extends +Rack::Session::Abstract::Persisted+, many of the -# options described there can be used to customize the session cookie that -# is generated. For example: -# -# Rails.application.config.session_store :cookie_store, expire_after: 14.days -# -# would set the session cookie to expire automatically 14 days after creation. -# Other useful options include :key, :secure, -# :httponly, and :same_site. -# -# source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#49 -class ActionDispatch::Session::CookieStore < ::ActionDispatch::Session::AbstractSecureStore - # @return [CookieStore] a new instance of CookieStore - # - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#59 - def initialize(app, options = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#63 - def delete_session(req, session_id, options); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#70 - def load_session(req); end - - private - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#117 - def cookie_jar(request); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#79 - def extract_session_id(req); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#113 - def get_cookie(req); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#98 - def persistent_session_id!(data, sid = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#109 - def set_cookie(request, session_id, cookie); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#86 - def unpacked_cookie_data(req); end - - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#104 - def write_session(req, sid, session_data, options); end -end - -# source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#50 -class ActionDispatch::Session::CookieStore::SessionId - # @return [SessionId] a new instance of SessionId - # - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#53 - def initialize(session_id, cookie_value = T.unsafe(nil)); end - - # Returns the value of attribute cookie_value. - # - # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#51 - def cookie_value; end -end - -# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#69 -module ActionDispatch::Session::SessionObject - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#74 - def loaded_session?(session); end - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#70 - def prepare_session(req); end -end - -# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#11 -class ActionDispatch::Session::SessionRestoreError < ::StandardError - # @return [SessionRestoreError] a new instance of SessionRestoreError - # - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#12 - def initialize; end -end - -# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#43 -module ActionDispatch::Session::StaleSessionCheck - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#48 - def extract_session_id(env); end - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#44 - def load_session(env); end - - # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#52 - def stale_session_check!; end -end - -# This middleware rescues any exception returned by the application -# and calls an exceptions app that will wrap it in a format for the end user. -# -# The exceptions app should be passed as a parameter on initialization of -# +ShowExceptions+. Every time there is an exception, +ShowExceptions+ will -# store the exception in env["action_dispatch.exception"], rewrite -# the +PATH_INFO+ to the exception status code and call the Rack app. -# -# In \Rails applications, the exceptions app can be configured with -# +config.exceptions_app+, which defaults to ActionDispatch::PublicExceptions. -# -# If the application returns an "X-Cascade" => "pass" response, this -# middleware will send an empty response as a result with the correct status -# code. If any exception happens inside the exceptions app, this middleware -# catches the exceptions and returns a failsafe response. -# -# source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#21 -class ActionDispatch::ShowExceptions - # @return [ShowExceptions] a new instance of ShowExceptions - # - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#22 - def initialize(app, exceptions_app); end - - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#27 - def call(env); end - - private - - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#61 - def fallback_to_html_format_if_invalid_mime_type(request); end - - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#70 - def pass_response(status); end - - # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#39 - def render_exception(request, exception); end -end - -# This middleware serves static files from disk, if available. -# If no file is found, it hands off to the main app. -# -# In Rails apps, this middleware is configured to serve assets from -# the +public/+ directory. -# -# Only GET and HEAD requests are served. POST and other HTTP methods -# are handed off to the main app. -# -# Only files in the root directory are served; path traversal is denied. -# -# source://actionpack//lib/action_dispatch/middleware/static.rb#16 -class ActionDispatch::Static - # @return [Static] a new instance of Static - # - # source://actionpack//lib/action_dispatch/middleware/static.rb#17 - def initialize(app, path, index: T.unsafe(nil), headers: T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/middleware/static.rb#22 - def call(env); end -end - -# source://actionpack//lib/action_dispatch/testing/test_process.rb#7 -module ActionDispatch::TestProcess - include ::ActionDispatch::TestProcess::FixtureFile - - # @raise [NoMethodError] - # - # source://actionpack//lib/action_dispatch/testing/test_process.rb#30 - def assigns(key = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/testing/test_process.rb#44 - def cookies; end - - # source://actionpack//lib/action_dispatch/testing/test_process.rb#40 - def flash; end - - # source://actionpack//lib/action_dispatch/testing/test_process.rb#48 - def redirect_to_url; end - - # source://actionpack//lib/action_dispatch/testing/test_process.rb#36 - def session; end -end - -# source://actionpack//lib/action_dispatch/testing/test_process.rb#8 -module ActionDispatch::TestProcess::FixtureFile - # Shortcut for Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_fixture_path, path), type): - # - # post :change_avatar, params: { avatar: fixture_file_upload('david.png', 'image/png') } - # - # Default fixture files location is test/fixtures/files. - # - # To upload binary files on Windows, pass :binary as the last parameter. - # This will not affect other platforms: - # - # post :change_avatar, params: { avatar: fixture_file_upload('david.png', 'image/png', :binary) } - # - # source://actionpack//lib/action_dispatch/testing/test_process.rb#19 - def fixture_file_upload(path, mime_type = T.unsafe(nil), binary = T.unsafe(nil)); end -end - -# source://actionpack//lib/action_dispatch/testing/test_request.rb#7 -class ActionDispatch::TestRequest < ::ActionDispatch::Request - # source://actionpack//lib/action_dispatch/testing/test_request.rb#66 - def accept=(mime_types); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#46 - def action=(action_name); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#30 - def host=(host); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#50 - def if_modified_since=(last_modified); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#54 - def if_none_match=(etag); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#42 - def path=(path); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#34 - def port=(number); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#58 - def remote_addr=(addr); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#26 - def request_method=(method); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#38 - def request_uri=(uri); end - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#62 - def user_agent=(user_agent); end - - class << self - # Create a new test request with default +env+ values. - # - # source://actionpack//lib/action_dispatch/testing/test_request.rb#15 - def create(env = T.unsafe(nil)); end - - private - - # source://actionpack//lib/action_dispatch/testing/test_request.rb#21 - def default_env; end - end -end - -# source://actionpack//lib/action_dispatch/testing/test_request.rb#8 -ActionDispatch::TestRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) - -# Integration test methods such as Integration::RequestHelpers#get -# and Integration::RequestHelpers#post return objects of class -# TestResponse, which represent the HTTP response results of the requested -# controller actions. -# -# See Response for more information on controller response objects. -# -# source://actionpack//lib/action_dispatch/testing/test_response.rb#12 -class ActionDispatch::TestResponse < ::ActionDispatch::Response - # Returns a parsed body depending on the response MIME type. When a parser - # corresponding to the MIME type is not found, it returns the raw body. - # - # ==== Examples - # get "/posts" - # response.content_type # => "text/html; charset=utf-8" - # response.parsed_body.class # => String - # response.parsed_body # => "\n\n..." - # - # get "/posts.json" - # response.content_type # => "application/json; charset=utf-8" - # response.parsed_body.class # => Array - # response.parsed_body # => [{"id"=>42, "title"=>"Title"},... - # - # get "/posts/42.json" - # response.content_type # => "application/json; charset=utf-8" - # response.parsed_body.class # => Hash - # response.parsed_body # => {"id"=>42, "title"=>"Title"} - # - # source://actionpack//lib/action_dispatch/testing/test_response.rb#35 - def parsed_body; end - - # source://actionpack//lib/action_dispatch/testing/test_response.rb#39 - def response_parser; end - - class << self - # source://actionpack//lib/action_dispatch/testing/test_response.rb#13 - def from_response(response); end - end -end - -# source://actionpack//lib/action_pack/gem_version.rb#3 -module ActionPack - class << self - # Returns the currently loaded version of Action Pack as a Gem::Version. - # - # source://actionpack//lib/action_pack/gem_version.rb#5 - def gem_version; end - - # Returns the currently loaded version of Action Pack as a Gem::Version. - # - # source://actionpack//lib/action_pack/version.rb#7 - def version; end - end -end - -# source://actionpack//lib/action_pack/gem_version.rb#9 -module ActionPack::VERSION; end - -# source://actionpack//lib/action_pack/gem_version.rb#10 -ActionPack::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) - -# source://actionpack//lib/action_pack/gem_version.rb#11 -ActionPack::VERSION::MINOR = T.let(T.unsafe(nil), Integer) - -# source://actionpack//lib/action_pack/gem_version.rb#13 -ActionPack::VERSION::PRE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_pack/gem_version.rb#15 -ActionPack::VERSION::STRING = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_pack/gem_version.rb#12 -ActionPack::VERSION::TINY = T.let(T.unsafe(nil), Integer) - -module ActionView::RoutingUrlFor - include ::ActionDispatch::Routing::PolymorphicRoutes - include ::ActionDispatch::Routing::UrlFor -end - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#5 -module Mime - class << self - # source://actionpack//lib/action_dispatch/http/mime_type.rb#40 - def [](type); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#45 - def fetch(type, &block); end - end -end - -# ALL isn't a real MIME type, so we don't register it for lookup with the -# other concrete types. It's a wildcard match that we use for +respond_to+ -# negotiation internals. -# -# source://actionpack//lib/action_dispatch/http/mime_type.rb#333 -Mime::ALL = T.let(T.unsafe(nil), Mime::AllType) - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#319 -class Mime::AllType < ::Mime::Type - include ::Singleton - extend ::Singleton::SingletonClassMethods - - # @return [AllType] a new instance of AllType - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#322 - def initialize; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#326 - def all?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#327 - def html?; end - - class << self - private - - def allocate; end - def new(*_arg0); end - end -end - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#36 -Mime::EXTENSION_LOOKUP = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#37 -Mime::LOOKUP = T.let(T.unsafe(nil), Hash) - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#6 -class Mime::Mimes - include ::Enumerable - - # @return [Mimes] a new instance of Mimes - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#11 - def initialize; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#20 - def <<(type); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#25 - def delete_if; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#16 - def each(&block); end - - # Returns the value of attribute symbols. - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#7 - def symbols; end -end - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#335 -class Mime::NullType - include ::Singleton - extend ::Singleton::SingletonClassMethods - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#338 - def nil?; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#346 - def ref; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#342 - def to_s; end - - private - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#353 - def method_missing(method, *args); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#349 - def respond_to_missing?(method, _); end - - class << self - private - - def allocate; end - def new(*_arg0); end - end -end - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#35 -Mime::SET = T.let(T.unsafe(nil), Mime::Mimes) - -# Encapsulates the notion of a MIME type. Can be used at render time, for example, with: -# -# class PostsController < ActionController::Base -# def show -# @post = Post.find(params[:id]) -# -# respond_to do |format| -# format.html -# format.ics { render body: @post.to_ics, mime_type: Mime::Type.lookup("text/calendar") } -# format.xml { render xml: @post } -# end -# end -# end -# -# source://actionpack//lib/action_dispatch/http/mime_type.rb#64 -class Mime::Type - # @return [Type] a new instance of Type - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#234 - def initialize(string, symbol = T.unsafe(nil), synonyms = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#267 - def ==(mime_type); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#259 - def ===(list); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#281 - def =~(mime_type); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#297 - def all?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#274 - def eql?(other); end - - # Returns the value of attribute hash. - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#225 - def hash; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#293 - def html?; end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#287 - def match?(mime_type); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#255 - def ref; end - - # Returns the value of attribute symbol. - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#65 - def symbol; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#243 - def to_s; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#247 - def to_str; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#251 - def to_sym; end - - protected - - # Returns the value of attribute string. - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#300 - def string; end - - # Returns the value of attribute synonyms. - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#300 - def synonyms; end - - private - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#306 - def method_missing(method, *args); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#314 - def respond_to_missing?(method, include_private = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#304 - def to_a; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#303 - def to_ary; end - - class << self - # source://actionpack//lib/action_dispatch/http/mime_type.rb#144 - def lookup(string); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#148 - def lookup_by_extension(extension); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#172 - def parse(accept_header); end - - # For an input of 'text', returns [Mime[:json], Mime[:xml], Mime[:ics], - # Mime[:html], Mime[:css], Mime[:csv], Mime[:js], Mime[:yaml], Mime[:text]. - # - # For an input of 'application', returns [Mime[:html], Mime[:js], - # Mime[:xml], Mime[:yaml], Mime[:atom], Mime[:json], Mime[:rss], Mime[:url_encoded_form]. - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#206 - def parse_data_with_trailing_star(type); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#197 - def parse_trailing_star(accept_header); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#158 - def register(string, symbol, mime_type_synonyms = T.unsafe(nil), extension_synonyms = T.unsafe(nil), skip_lookup = T.unsafe(nil)); end - - # Registers an alias that's not used on MIME type lookup, but can be referenced directly. Especially useful for - # rendering different HTML versions depending on the user agent, like an iPhone. - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#154 - def register_alias(string, symbol, extension_synonyms = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#140 - def register_callback(&block); end - - # This method is opposite of register method. - # - # To unregister a MIME type: - # - # Mime::Type.unregister(:mobile) - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#215 - def unregister(symbol); end - end -end - -# A simple helper class used in parsing the accept header. -# -# source://actionpack//lib/action_dispatch/http/mime_type.rb#70 -class Mime::Type::AcceptItem - # @return [AcceptItem] a new instance of AcceptItem - # - # source://actionpack//lib/action_dispatch/http/mime_type.rb#74 - def initialize(index, name, q = T.unsafe(nil)); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#81 - def <=>(item); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 - def index; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 - def index=(_arg0); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 - def name; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 - def name=(_arg0); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 - def q; end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 - def q=(_arg0); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 - def to_s; end -end - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#88 -class Mime::Type::AcceptList - class << self - # source://actionpack//lib/action_dispatch/http/mime_type.rb#131 - def find_item_by_name(array, name); end - - # source://actionpack//lib/action_dispatch/http/mime_type.rb#89 - def sort!(list); end - end -end - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#232 -class Mime::Type::InvalidMimeType < ::StandardError; end - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#227 -Mime::Type::MIME_NAME = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#229 -Mime::Type::MIME_PARAMETER = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#228 -Mime::Type::MIME_PARAMETER_VALUE = T.let(T.unsafe(nil), String) - -# source://actionpack//lib/action_dispatch/http/mime_type.rb#230 -Mime::Type::MIME_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://actionpack//lib/action_dispatch.rb#33 -module Rack - class << self - # source://rack/2.2.13/lib/rack/version.rb#26 - def release; end - - # source://rack/2.2.13/lib/rack/version.rb#19 - def version; end - end -end diff --git a/sorbet/rbi/gems/actionpack@7.2.3.1.rbi b/sorbet/rbi/gems/actionpack@7.2.3.1.rbi new file mode 100644 index 000000000..c13dcd778 --- /dev/null +++ b/sorbet/rbi/gems/actionpack@7.2.3.1.rbi @@ -0,0 +1,19179 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `actionpack` gem. +# Please instead update this file by running `bin/tapioca gem actionpack`. + + +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# +# pkg:gem/actionpack#lib/abstract_controller/deprecator.rb:5 +module AbstractController + extend ::ActiveSupport::Autoload + + class << self + # pkg:gem/actionpack#lib/abstract_controller/deprecator.rb:6 + def deprecator; end + + # pkg:gem/actionpack#lib/abstract_controller.rb:27 + def eager_load!; end + end +end + +# Raised when a non-existing controller action is triggered. +# +# pkg:gem/actionpack#lib/abstract_controller/base.rb:13 +class AbstractController::ActionNotFound < ::StandardError + include ::DidYouMean::Correctable + + # pkg:gem/actionpack#lib/abstract_controller/base.rb:16 + def initialize(message = T.unsafe(nil), controller = T.unsafe(nil), action = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/abstract_controller/base.rb:14 + def action; end + + # pkg:gem/actionpack#lib/abstract_controller/base.rb:14 + def controller; end + + # pkg:gem/actionpack#lib/abstract_controller/base.rb:25 + def corrections; end +end + +# pkg:gem/actionpack#lib/abstract_controller/asset_paths.rb:6 +module AbstractController::AssetPaths + extend ::ActiveSupport::Concern +end + +# # Abstract Controller Base +# +# AbstractController::Base is a low-level API. Nobody should be using it +# directly, and subclasses (like ActionController::Base) are expected to provide +# their own `render` method, since rendering means different things depending on +# the context. +# +# pkg:gem/actionpack#lib/abstract_controller/base.rb:37 +class AbstractController::Base + include ::ActiveSupport::Configurable + extend ::ActiveSupport::Configurable::ClassMethods + extend ::ActiveSupport::DescendantsTracker + + # Delegates to the class's ::action_methods. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:126 + def action_methods; end + + # pkg:gem/actionpack#lib/abstract_controller/base.rb:44 + def action_name; end + + # pkg:gem/actionpack#lib/abstract_controller/base.rb:44 + def action_name=(_arg0); end + + # Returns true if a method for the action is available and can be dispatched, + # false otherwise. + # + # Notice that `action_methods.include?("foo")` may return false and + # `available_action?("foo")` returns true because this method considers actions + # that are also available through other means, for example, implicit render + # ones. + # + # #### Parameters + # * `action_name` - The name of an action to be tested + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:126 + def available_action?(action_name); end + + # Delegates to the class's ::controller_path. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:126 + def controller_path; end + + # pkg:gem/actionpack#lib/abstract_controller/base.rb:48 + def formats; end + + # pkg:gem/actionpack#lib/abstract_controller/base.rb:48 + def formats=(_arg0); end + + # pkg:gem/actionpack#lib/abstract_controller/base.rb:126 + def inspect; end + + # Tests if a response body is set. Used to determine if the `process_action` + # callback needs to be terminated in AbstractController::Callbacks. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:126 + def performed?; end + + # Calls the action going through the entire Action Dispatch stack. + # + # The actual method that is called is determined by calling #method_for_action. + # If no method can handle the action, then an AbstractController::ActionNotFound + # error is raised. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:126 + def process(action, *_arg1, **_arg2, &_arg3); end + + # pkg:gem/actionpack#lib/abstract_controller/base.rb:40 + def response_body; end + + # pkg:gem/actionpack#lib/abstract_controller/base.rb:40 + def response_body=(_arg0); end + + # Actually call the method associated with the action. Override this method if + # you wish to change how action methods are called, not to add additional + # behavior around it. For example, you would override #send_action if you want + # to inject arguments into the method. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:126 + def send_action(*_arg0); end + + private + + # Takes an action name and returns the name of the method that will handle the + # action. + # + # It checks if the action name is valid and returns false otherwise. + # + # See method_for_action for more information. + # + # #### Parameters + # * `action_name` - An action name to find a method name for + # + # + # #### Returns + # * `string` - The name of the method that handles the action + # * false - No valid method name could be found. + # + # Raise `AbstractController::ActionNotFound`. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:126 + def _find_action_name(action_name); end + + # If the action name was not found, but a method called "action_missing" was + # found, #method_for_action will return "_handle_action_missing". This method + # calls #action_missing with the current action name. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:126 + def _handle_action_missing(*args); end + + # Checks if the action name is valid and returns false otherwise. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:126 + def _valid_action_name?(action_name); end + + # Returns true if the name can be considered an action because it has a method + # defined in the controller. + # + # #### Parameters + # * `name` - The name of an action to be tested + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:126 + def action_method?(name); end + + # Takes an action name and returns the name of the method that will handle the + # action. In normal cases, this method returns the same name as it receives. By + # default, if #method_for_action receives a name that is not an action, it will + # look for an #action_missing method and return "_handle_action_missing" if one + # is found. + # + # Subclasses may override this method to add additional conditions that should + # be considered an action. For instance, an HTTP controller with a template + # matching the action name is considered to exist. + # + # If you override this method to handle additional cases, you may also provide a + # method (like `_handle_method_missing`) to handle the case. + # + # If none of these conditions are true, and `method_for_action` returns `nil`, + # an `AbstractController::ActionNotFound` exception will be raised. + # + # #### Parameters + # * `action_name` - An action name to find a method name for + # + # + # #### Returns + # * `string` - The name of the method that handles the action + # * `nil` - No method name could be found. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:126 + def method_for_action(action_name); end + + # Call the action. Override this in a subclass to modify the behavior around + # processing an action. This, and not #process, is the intended way to override + # action dispatching. + # + # Notice that the first argument is the method to be dispatched which is **not** + # necessarily the same as the action name. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:126 + def process_action(*_arg0, **_arg1, &_arg2); end + + class << self + # pkg:gem/actionpack#lib/abstract_controller/base.rb:54 + def abstract; end + + # Define a controller as abstract. See internal_methods for more details. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:58 + def abstract!; end + + # pkg:gem/actionpack#lib/abstract_controller/base.rb:55 + def abstract?; end + + # A `Set` of method names that should be considered actions. This includes all + # public instance methods on a controller, less any internal methods (see + # internal_methods), adding back in any methods that are internal, but still + # exist on the class itself. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:93 + def action_methods; end + + # action_methods are cached and there is sometimes a need to refresh them. + # ::clear_action_methods! allows you to do that, so next time you run + # action_methods, they will be recalculated. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:108 + def clear_action_methods!; end + + # Returns the full controller name, underscored, without the ending Controller. + # + # class MyApp::MyPostsController < AbstractController::Base + # + # end + # + # MyApp::MyPostsController.controller_path # => "my_app/my_posts" + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:120 + def controller_path; end + + # pkg:gem/actionpack#lib/abstract_controller/base.rb:130 + def eager_load!; end + + # pkg:gem/actionpack#lib/abstract_controller/base.rb:62 + def inherited(klass); end + + # A list of all internal methods for a controller. This finds the first abstract + # superclass of a controller, and gets a list of all public instance methods on + # that abstract class. Public instance methods of a controller would normally be + # considered action methods, so methods declared on abstract classes are being + # removed. (ActionController::Metal and ActionController::Base are defined as + # abstract) + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:77 + def internal_methods; end + + # Refresh the cached action_methods when a new action_method is added. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:125 + def method_added(name); end + + # Returns true if the given controller is capable of rendering a path. A + # subclass of `AbstractController::Base` may return false. An Email controller + # for example does not support paths, only full URLs. + # + # pkg:gem/actionpack#lib/abstract_controller/base.rb:189 + def supports_path?; end + end +end + +# pkg:gem/actionpack#lib/abstract_controller/caching.rb:6 +module AbstractController::Caching + include ::AbstractController::Caching::ConfigMethods + extend ::ActiveSupport::Concern + extend ::ActiveSupport::Autoload + include GeneratedInstanceMethods + include ::AbstractController::Caching::Fragments + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::Caching::Fragments::ClassMethods + mixes_in_class_methods ::AbstractController::Caching::ClassMethods + mixes_in_class_methods ::AbstractController::Caching::ConfigMethods + + # pkg:gem/actionpack#lib/abstract_controller/caching.rb:54 + def view_cache_dependencies; end + + private + + # Convenience accessor. + # + # pkg:gem/actionpack#lib/abstract_controller/caching.rb:60 + def cache(key, options = T.unsafe(nil), &block); end + + module GeneratedClassMethods + def _view_cache_dependencies; end + def _view_cache_dependencies=(value); end + def _view_cache_dependencies?; end + def fragment_cache_keys; end + def fragment_cache_keys=(value); end + def fragment_cache_keys?; end + end + + module GeneratedInstanceMethods + def _view_cache_dependencies; end + def _view_cache_dependencies=(value); end + def _view_cache_dependencies?; end + def fragment_cache_keys; end + def fragment_cache_keys=(value); end + def fragment_cache_keys?; end + end +end + +# pkg:gem/actionpack#lib/abstract_controller/caching.rb:48 +module AbstractController::Caching::ClassMethods + # pkg:gem/actionpack#lib/abstract_controller/caching.rb:49 + def view_cache_dependency(&dependency); end +end + +# pkg:gem/actionpack#lib/abstract_controller/caching.rb:14 +module AbstractController::Caching::ConfigMethods + # pkg:gem/actionpack#lib/abstract_controller/caching.rb:15 + def cache_store; end + + # pkg:gem/actionpack#lib/abstract_controller/caching.rb:19 + def cache_store=(store); end + + private + + # pkg:gem/actionpack#lib/abstract_controller/caching.rb:24 + def cache_configured?; end +end + +# # Abstract Controller Caching Fragments +# +# Fragment caching is used for caching various blocks within views without +# caching the entire action as a whole. This is useful when certain elements of +# an action change frequently or depend on complicated state while other parts +# rarely change or can be shared amongst multiple parties. The caching is done +# using the `cache` helper available in the Action View. See +# ActionView::Helpers::CacheHelper for more information. +# +# While it's strongly recommended that you use key-based cache expiration (see +# links in CacheHelper for more information), it is also possible to manually +# expire caches. For example: +# +# expire_fragment('name_of_cache') +# +# pkg:gem/actionpack#lib/abstract_controller/caching/fragments.rb:21 +module AbstractController::Caching::Fragments + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::Caching::Fragments::ClassMethods + + # Given a key (as described in `expire_fragment`), returns a key array suitable + # for use in reading, writing, or expiring a cached fragment. All keys begin + # with `:views`, followed by `ENV["RAILS_CACHE_ID"]` or + # `ENV["RAILS_APP_VERSION"]` if set, followed by any controller-wide key prefix + # values, ending with the specified `key` value. + # + # pkg:gem/actionpack#lib/abstract_controller/caching/fragments.rb:68 + def combined_fragment_cache_key(key); end + + # Removes fragments from the cache. + # + # `key` can take one of three forms: + # + # * String - This would normally take the form of a path, like + # `pages/45/notes`. + # * Hash - Treated as an implicit call to `url_for`, like `{ controller: + # 'pages', action: 'notes', id: 45}` + # * Regexp - Will remove any fragment that matches, so `%r{pages/\d*/notes}` + # might remove all notes. Make sure you don't use anchors in the regex (`^` + # or `$`) because the actual filename matched looks like + # `./cache/filename/path.cache`. Note: Regexp expiration is only supported + # on caches that can iterate over all keys (unlike memcached). + # + # + # `options` is passed through to the cache store's `delete` method (or + # `delete_matched`, for Regexp keys). + # + # pkg:gem/actionpack#lib/abstract_controller/caching/fragments.rb:131 + def expire_fragment(key, options = T.unsafe(nil)); end + + # Check if a cached fragment from the location signified by `key` exists (see + # `expire_fragment` for acceptable formats). + # + # pkg:gem/actionpack#lib/abstract_controller/caching/fragments.rb:105 + def fragment_exist?(key, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/abstract_controller/caching/fragments.rb:144 + def instrument_fragment_cache(name, key, &block); end + + # Reads a cached fragment from the location signified by `key` (see + # `expire_fragment` for acceptable formats). + # + # pkg:gem/actionpack#lib/abstract_controller/caching/fragments.rb:93 + def read_fragment(key, options = T.unsafe(nil)); end + + # Writes `content` to the location signified by `key` (see `expire_fragment` for + # acceptable formats). + # + # pkg:gem/actionpack#lib/abstract_controller/caching/fragments.rb:80 + def write_fragment(key, content, options = T.unsafe(nil)); end + + module GeneratedClassMethods + def fragment_cache_keys; end + def fragment_cache_keys=(value); end + def fragment_cache_keys?; end + end + + module GeneratedInstanceMethods + def fragment_cache_keys; end + def fragment_cache_keys=(value); end + def fragment_cache_keys?; end + end +end + +# pkg:gem/actionpack#lib/abstract_controller/caching/fragments.rb:38 +module AbstractController::Caching::Fragments::ClassMethods + # Allows you to specify controller-wide key prefixes for cache fragments. Pass + # either a constant `value`, or a block which computes a value each time a cache + # key is generated. + # + # For example, you may want to prefix all fragment cache keys with a global + # version identifier, so you can easily invalidate all caches. + # + # class ApplicationController + # fragment_cache_key "v1" + # end + # + # When it's time to invalidate all fragments, simply change the string constant. + # Or, progressively roll out the cache invalidation using a computed value: + # + # class ApplicationController + # fragment_cache_key do + # @account.id.odd? ? "v1" : "v2" + # end + # end + # + # pkg:gem/actionpack#lib/abstract_controller/caching/fragments.rb:58 + def fragment_cache_key(value = T.unsafe(nil), &key); end +end + +# # Abstract Controller Callbacks +# +# Abstract Controller provides hooks during the life cycle of a controller +# action. Callbacks allow you to trigger logic during this cycle. Available +# callbacks are: +# +# * `after_action` +# * `append_after_action` +# * `append_around_action` +# * `append_before_action` +# * `around_action` +# * `before_action` +# * `prepend_after_action` +# * `prepend_around_action` +# * `prepend_before_action` +# * `skip_after_action` +# * `skip_around_action` +# * `skip_before_action` +# +# pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:24 +module AbstractController::Callbacks + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveSupport::Callbacks + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods + mixes_in_class_methods ::ActiveSupport::DescendantsTracker + mixes_in_class_methods ::AbstractController::Callbacks::ClassMethods + + private + + # Override `AbstractController::Base#process_action` to run the `process_action` + # callbacks around the normal behavior. + # + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:259 + def process_action(*_arg0, **_arg1, &_arg2); end + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def __callbacks?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def __callbacks?; end + end +end + +# pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:39 +class AbstractController::Callbacks::ActionFilter + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:40 + def initialize(filters, conditional_key, actions); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:69 + def after(controller); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:71 + def around(controller); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:70 + def before(controller); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:46 + def match?(controller); end +end + +# pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:74 +module AbstractController::Callbacks::ClassMethods + # Take callback names and an optional callback proc, normalize them, then call + # the block with each callback. This allows us to abstract the normalization + # across several methods that use it. + # + # #### Parameters + # * `callbacks` - An array of callbacks, with an optional options hash as the + # last parameter. + # * `block` - A proc that should be added to the callbacks. + # + # + # #### Block Parameters + # * `name` - The callback to be added. + # * `options` - A hash of options to be used when adding the callback. + # + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:120 + def _insert_callbacks(callbacks, block = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:98 + def _normalize_callback_option(options, from, to); end + + # If `:only` or `:except` are used, convert the options into the `:if` and + # `:unless` options of ActiveSupport::Callbacks. + # + # The basic idea is that `:only => :index` gets converted to `:if => proc {|c| + # c.action_name == "index" }`. + # + # Note that `:only` has priority over `:if` in case they are used together. + # + # only: :index, if: -> { true } # the :if option will be ignored. + # + # Note that `:if` has priority over `:except` in case they are used together. + # + # except: :index, if: -> { true } # the :except option will be ignored. + # + # #### Options + # * `only` - The callback should be run only for this action. + # * `except` - The callback should be run for all actions except this action. + # + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:93 + def _normalize_callback_options(options); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:231 + def after_action(*names, &blk); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:252 + def append_after_action(*names, &blk); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:252 + def append_around_action(*names, &blk); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:252 + def append_before_action(*names, &blk); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:231 + def around_action(*names, &blk); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:231 + def before_action(*names, &blk); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:237 + def prepend_after_action(*names, &blk); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:237 + def prepend_around_action(*names, &blk); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:237 + def prepend_before_action(*names, &blk); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:245 + def skip_after_action(*names); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:245 + def skip_around_action(*names); end + + # pkg:gem/actionpack#lib/abstract_controller/callbacks.rb:245 + def skip_before_action(*names); end +end + +# pkg:gem/actionpack#lib/abstract_controller/collector.rb:8 +module AbstractController::Collector + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def atom(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def bmp(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def css(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def csv(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def gif(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def gzip(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def html(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def ics(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def jpeg(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def js(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def json(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def m4a(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def mp3(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def mp4(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def mpeg(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def multipart_form(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def ogg(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def otf(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def pdf(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def png(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def rss(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def svg(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def text(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def tiff(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def ttf(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def url_encoded_form(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def vcf(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def vtt(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def webm(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def webp(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def woff(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def woff2(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def xml(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def yaml(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:11 + def zip(*_arg0, **_arg1, &_arg2); end + + private + + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:27 + def method_missing(symbol, *_arg1, **_arg2, &_arg3); end + + class << self + # pkg:gem/actionpack#lib/abstract_controller/collector.rb:9 + def generate_method_for_mime(mime); end + end +end + +# pkg:gem/actionpack#lib/abstract_controller/rendering.rb:11 +class AbstractController::DoubleRenderError < ::AbstractController::Error + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:14 + def initialize(message = T.unsafe(nil)); end +end + +# pkg:gem/actionpack#lib/abstract_controller/rendering.rb:12 +AbstractController::DoubleRenderError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/abstract_controller/error.rb:6 +class AbstractController::Error < ::StandardError; end + +# pkg:gem/actionpack#lib/abstract_controller/helpers.rb:9 +module AbstractController::Helpers + extend ::ActiveSupport::Concern + extend ::AbstractController::Helpers::Resolution + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::Helpers::ClassMethods + + # pkg:gem/actionpack#lib/abstract_controller/helpers.rb:28 + def _helpers; end + + module GeneratedClassMethods + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end + + module GeneratedInstanceMethods + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end +end + +# pkg:gem/actionpack#lib/abstract_controller/helpers.rb:64 +module AbstractController::Helpers::ClassMethods + include ::AbstractController::Helpers::Resolution + + # pkg:gem/actionpack#lib/abstract_controller/helpers.rb:76 + def _helpers=(_arg0); end + + # pkg:gem/actionpack#lib/abstract_controller/helpers.rb:218 + def _helpers_for_modification; end + + # Clears up all existing helpers in this class, only keeping the helper with the + # same name as this class. + # + # pkg:gem/actionpack#lib/abstract_controller/helpers.rb:209 + def clear_helpers; end + + # Includes the given modules in the template class. + # + # Modules can be specified in different ways. All of the following calls include + # `FooHelper`: + # + # # Module, recommended. + # helper FooHelper + # + # # String/symbol without the "helper" suffix, camel or snake case. + # helper "Foo" + # helper :Foo + # helper "foo" + # helper :foo + # + # The last two assume that `"foo".camelize` returns "Foo". + # + # When strings or symbols are passed, the method finds the actual module object + # using String#constantize. Therefore, if the module has not been yet loaded, it + # has to be autoloadable, which is normally the case. + # + # Namespaces are supported. The following calls include `Foo::BarHelper`: + # + # # Module, recommended. + # helper Foo::BarHelper + # + # # String/symbol without the "helper" suffix, camel or snake case. + # helper "Foo::Bar" + # helper :"Foo::Bar" + # helper "foo/bar" + # helper :"foo/bar" + # + # The last two assume that `"foo/bar".camelize` returns "Foo::Bar". + # + # The method accepts a block too. If present, the block is evaluated in the + # context of the controller helper module. This simple call makes the `wadus` + # method available in templates of the enclosing controller: + # + # helper do + # def wadus + # "wadus" + # end + # end + # + # Furthermore, all the above styles can be mixed together: + # + # helper FooHelper, "woo", "bar/baz" do + # def wadus + # "wadus" + # end + # end + # + # pkg:gem/actionpack#lib/abstract_controller/helpers.rb:198 + def helper(*args, &block); end + + # Declare a controller method as a helper. For example, the following + # makes the `current_user` and `logged_in?` controller methods available + # to the view: + # + # class ApplicationController < ActionController::Base + # helper_method :current_user, :logged_in? + # + # private + # def current_user + # @current_user ||= User.find_by(id: session[:user]) + # end + # + # def logged_in? + # current_user != nil + # end + # end + # + # In a view: + # + # <% if logged_in? -%>Welcome, <%= current_user.name %><% end -%> + # + # #### Parameters + # * `method[, method]` - A name or names of a method on the controller to be + # made available on the view. + # + # pkg:gem/actionpack#lib/abstract_controller/helpers.rb:128 + def helper_method(*methods); end + + # When a class is inherited, wrap its helper module in a new module. This + # ensures that the parent class's module can be changed independently of the + # child class's. + # + # pkg:gem/actionpack#lib/abstract_controller/helpers.rb:68 + def inherited(klass); end + + private + + # pkg:gem/actionpack#lib/abstract_controller/helpers.rb:237 + def default_helper_module!; end + + # pkg:gem/actionpack#lib/abstract_controller/helpers.rb:226 + def define_helpers_module(klass, helpers = T.unsafe(nil)); end +end + +# pkg:gem/actionpack#lib/abstract_controller/helpers.rb:32 +module AbstractController::Helpers::Resolution + # pkg:gem/actionpack#lib/abstract_controller/helpers.rb:48 + def all_helpers_from_path(path); end + + # pkg:gem/actionpack#lib/abstract_controller/helpers.rb:57 + def helper_modules_from_paths(paths); end + + # pkg:gem/actionpack#lib/abstract_controller/helpers.rb:33 + def modules_for_helpers(modules_or_helper_prefixes); end +end + +# pkg:gem/actionpack#lib/abstract_controller/logger.rb:8 +module AbstractController::Logger + extend ::ActiveSupport::Concern + include ::ActiveSupport::Benchmarkable +end + +# pkg:gem/actionpack#lib/abstract_controller/rendering.rb:19 +module AbstractController::Rendering + extend ::ActiveSupport::Concern + include ::ActionView::ViewPaths + + mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods + + # Normalizes arguments and options, and then delegates to render_to_body and + # sticks the result in `self.response_body`. + # + # Supported options depend on the underlying `render_to_body` implementation. + # + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:27 + def render(*args, &block); end + + # Performs the actual template rendering. + # + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:51 + def render_to_body(options = T.unsafe(nil)); end + + # Similar to #render, but only returns the rendered template as a string, + # instead of setting `self.response_body`. + # + # If a component extends the semantics of `response_body` (as ActionController + # extends it to be anything that responds to the method each), this method needs + # to be overridden in order to still return a string. + # + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:45 + def render_to_string(*args, &block); end + + # Returns `Content-Type` of rendered content. + # + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:55 + def rendered_format; end + + # This method should return a hash with assigns. You can overwrite this + # configuration per controller. + # + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:63 + def view_assigns; end + + private + + # Normalize args by converting `render "foo"` to `render action: "foo"` and + # `render "foo/bar"` to `render file: "foo/bar"`. + # + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:74 + def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end + + # Normalize options. + # + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:89 + def _normalize_options(options); end + + # Normalize args and options. + # + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:115 + def _normalize_render(*args, &block); end + + # Process the rendered format. + # + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:99 + def _process_format(format); end + + # Process extra options. + # + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:94 + def _process_options(options); end + + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:102 + def _process_variant(options); end + + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:122 + def _protected_ivars; end + + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:105 + def _set_html_content_type; end + + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:111 + def _set_rendered_content_type(format); end + + # pkg:gem/actionpack#lib/abstract_controller/rendering.rb:108 + def _set_vary_header; end +end + +# pkg:gem/actionpack#lib/abstract_controller/rendering.rb:59 +AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/abstract_controller/translation.rb:8 +module AbstractController::Translation + # pkg:gem/actionpack#lib/abstract_controller/translation.rb:40 + def l(object, **options); end + + # Delegates to `I18n.localize`. + # + # pkg:gem/actionpack#lib/abstract_controller/translation.rb:37 + def localize(object, **options); end + + # pkg:gem/actionpack#lib/abstract_controller/translation.rb:34 + def t(key, **options); end + + # Delegates to `I18n.translate`. + # + # When the given key starts with a period, it will be scoped by the current + # controller and action. So if you call `translate(".foo")` from + # `PeopleController#index`, it will convert the call to + # `I18n.translate("people.index.foo")`. This makes it less repetitive to + # translate many keys within the same controller / action and gives you a simple + # framework for scoping them consistently. + # + # pkg:gem/actionpack#lib/abstract_controller/translation.rb:17 + def translate(key, **options); end +end + +# # URL For +# +# Includes `url_for` into the host class (e.g. an abstract controller or +# mailer). The class has to provide a `RouteSet` by implementing the `_routes` +# methods. Otherwise, an exception will be raised. +# +# Note that this module is completely decoupled from HTTP - the only requirement +# is a valid `_routes` implementation. +# +# pkg:gem/actionpack#lib/abstract_controller/url_for.rb:14 +module AbstractController::UrlFor + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActionDispatch::Routing::UrlFor + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods + + # pkg:gem/actionpack#lib/abstract_controller/url_for.rb:18 + def _routes; end + + module GeneratedClassMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end + + module GeneratedInstanceMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end +end + +# pkg:gem/actionpack#lib/abstract_controller/url_for.rb:23 +module AbstractController::UrlFor::ClassMethods + # pkg:gem/actionpack#lib/abstract_controller/url_for.rb:24 + def _routes; end + + # pkg:gem/actionpack#lib/abstract_controller/url_for.rb:28 + def action_methods; end +end + +# # Action Controller +# +# Action Controller is a module of Action Pack. +# +# Action Controller provides a base controller class that can be subclassed to +# implement filters and actions to handle requests. The result of an action is +# typically content generated from views. +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# +# pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:5 +module ActionController + extend ::ActiveSupport::Autoload + + class << self + # See Renderers.add + # + # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:9 + def add_renderer(key, &block); end + + # pkg:gem/actionpack#lib/action_controller/deprecator.rb:6 + def deprecator; end + + # See Renderers.remove + # + # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:14 + def remove_renderer(key); end + end +end + +# # Action Controller API +# +# API Controller is a lightweight version of ActionController::Base, created for +# applications that don't require all functionalities that a complete Rails +# controller provides, allowing you to create controllers with just the features +# that you need for API only applications. +# +# An API Controller is different from a normal controller in the sense that by +# default it doesn't include a number of features that are usually required by +# browser access only: layouts and templates rendering, flash, assets, and so +# on. This makes the entire controller stack thinner, suitable for API +# applications. It doesn't mean you won't have such features if you need them: +# they're all available for you to include in your application, they're just not +# part of the default API controller stack. +# +# Normally, `ApplicationController` is the only controller that inherits from +# `ActionController::API`. All other controllers in turn inherit from +# `ApplicationController`. +# +# A sample controller could look like this: +# +# class PostsController < ApplicationController +# def index +# posts = Post.all +# render json: posts +# end +# end +# +# Request, response, and parameters objects all work the exact same way as +# ActionController::Base. +# +# ## Renders +# +# The default API Controller stack includes all renderers, which means you can +# use `render :json` and siblings freely in your controllers. Keep in mind that +# templates are not going to be rendered, so you need to ensure your controller +# is calling either `render` or `redirect_to` in all actions, otherwise it will +# return `204 No Content`. +# +# def show +# post = Post.find(params[:id]) +# render json: post +# end +# +# ## Redirects +# +# Redirects are used to move from one action to another. You can use the +# `redirect_to` method in your controllers in the same way as in +# ActionController::Base. For example: +# +# def create +# redirect_to root_url and return if not_authorized? +# # do stuff here +# end +# +# ## Adding New Behavior +# +# In some scenarios you may want to add back some functionality provided by +# ActionController::Base that is not present by default in +# `ActionController::API`, for instance `MimeResponds`. This module gives you +# the `respond_to` method. Adding it is quite simple, you just need to include +# the module in a specific controller or in `ApplicationController` in case you +# want it available in your entire application: +# +# class ApplicationController < ActionController::API +# include ActionController::MimeResponds +# end +# +# class PostsController < ApplicationController +# def index +# posts = Post.all +# +# respond_to do |format| +# format.json { render json: posts } +# format.xml { render xml: posts } +# end +# end +# end +# +# Make sure to check the modules included in ActionController::Base if you want +# to use any other functionality that is not provided by `ActionController::API` +# out of the box. +# +# pkg:gem/actionpack#lib/action_controller/api.rb:92 +class ActionController::API < ::ActionController::Metal + include ::ActionView::ViewPaths + include ::AbstractController::Rendering + include ::ActionDispatch::Routing::PolymorphicRoutes + include ::ActionDispatch::Routing::UrlFor + include ::AbstractController::UrlFor + include ::ActionController::UrlFor + include ::AbstractController::Logger + include ::ActiveSupport::Benchmarkable + include ::ActionController::Redirecting + include ::ActionController::ApiRendering + include ::ActionController::Rendering + include ::ActionController::Renderers + include ::ActionController::Renderers::All + include ::ActionController::Head + include ::ActionController::ConditionalGet + include ::ActionController::BasicImplicitRender + include ::ActionController::StrongParameters + include ::ActionController::RateLimiting + include ::ActionController::Caching + include ::AbstractController::Caching::Fragments + include ::AbstractController::Caching::ConfigMethods + include ::AbstractController::Caching + include ::ActionController::DataStreaming + include ::ActionController::DefaultHeaders + include ::ActionController::Logging + include ::ActiveSupport::Callbacks + include ::AbstractController::Callbacks + include ::ActiveSupport::Rescuable + include ::ActionController::Rescue + include ::ActionController::Instrumentation + include ::ActionController::ParamsWrapper + extend ::ActionView::ViewPaths::ClassMethods + extend ::AbstractController::UrlFor::ClassMethods + extend ::ActionController::Rendering::ClassMethods + extend ::ActionController::Renderers::ClassMethods + extend ::ActionController::ConditionalGet::ClassMethods + extend ::ActionController::RateLimiting::ClassMethods + extend ::AbstractController::Caching::Fragments::ClassMethods + extend ::AbstractController::Caching::ClassMethods + extend ::AbstractController::Caching::ConfigMethods + extend ::ActionController::DefaultHeaders::ClassMethods + extend ::ActionController::Logging::ClassMethods + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::AbstractController::Callbacks::ClassMethods + extend ::ActiveSupport::Rescuable::ClassMethods + extend ::ActionController::Instrumentation::ClassMethods + extend ::ActionController::ParamsWrapper::ClassMethods + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def __callbacks; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def __callbacks?; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _process_action_callbacks; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _renderers; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _renderers=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _renderers?; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _run_process_action_callbacks(&block); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _view_cache_dependencies; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _view_cache_dependencies=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _view_cache_dependencies?; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _wrapper_options; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _wrapper_options=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _wrapper_options?; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def default_static_extension; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def default_static_extension=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def default_url_options; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def default_url_options=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def default_url_options?; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def enable_fragment_cache_logging; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def enable_fragment_cache_logging=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def etaggers; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def etaggers=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def etaggers?; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def fragment_cache_keys; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def fragment_cache_keys=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def fragment_cache_keys?; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def logger; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def logger=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def perform_caching; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def perform_caching=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def raise_on_missing_callback_actions; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def raise_on_missing_callback_actions=(val); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def raise_on_open_redirects; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def raise_on_open_redirects=(val); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def rescue_handlers; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def rescue_handlers=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def rescue_handlers?; end + + class << self + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def __callbacks; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def __callbacks=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def __callbacks?; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _process_action_callbacks; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _process_action_callbacks=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _renderers; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _renderers=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _renderers?; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _view_cache_dependencies; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _view_cache_dependencies=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _view_cache_dependencies?; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _wrapper_options; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _wrapper_options=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def _wrapper_options?; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def default_static_extension; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def default_static_extension=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def default_url_options; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def default_url_options=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def default_url_options?; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def enable_fragment_cache_logging; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def enable_fragment_cache_logging=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def etaggers; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def etaggers=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def etaggers?; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def fragment_cache_keys; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def fragment_cache_keys=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def fragment_cache_keys?; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def logger; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def logger=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:92 + def middleware_stack; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def perform_caching; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def perform_caching=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def raise_on_missing_callback_actions; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def raise_on_missing_callback_actions=(val); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def raise_on_open_redirects; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def raise_on_open_redirects=(val); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def rescue_handlers; end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def rescue_handlers=(value); end + + # pkg:gem/actionpack#lib/action_controller/api.rb:149 + def rescue_handlers?; end + + # Shortcut helper that returns all the ActionController::API modules except the + # ones passed as arguments: + # + # class MyAPIBaseController < ActionController::Metal + # ActionController::API.without_modules(:UrlFor).each do |left| + # include left + # end + # end + # + # This gives better control over what you want to exclude and makes it easier to + # create an API controller class, instead of listing the modules required + # manually. + # + # pkg:gem/actionpack#lib/action_controller/api.rb:107 + def without_modules(*modules); end + end +end + +# pkg:gem/actionpack#lib/action_controller/api.rb:115 +ActionController::API::MODULES = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:6 +class ActionController::ActionControllerError < ::StandardError; end + +# pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:6 +module ActionController::AllowBrowser + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::AllowBrowser::ClassMethods + + private + + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:53 + def allow_browser(versions:, block:); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:63 +class ActionController::AllowBrowser::BrowserBlocker + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:70 + def initialize(request, versions:); end + + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:74 + def blocked?; end + + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:68 + def request; end + + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:68 + def versions; end + + private + + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:95 + def bot?; end + + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:111 + def expanded_versions; end + + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:107 + def minimum_browser_version_for_browser; end + + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:115 + def normalized_browser_name; end + + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:79 + def parsed_user_agent; end + + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:87 + def unsupported_browser?; end + + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:83 + def user_agent_version_reported?; end + + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:99 + def version_below_minimum_required?; end + + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:91 + def version_guarded_browser?; end +end + +# pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:64 +ActionController::AllowBrowser::BrowserBlocker::SETS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:9 +module ActionController::AllowBrowser::ClassMethods + # Specify the browser versions that will be allowed to access all actions (or + # some, as limited by `only:` or `except:`). Only browsers matched in the hash + # or named set passed to `versions:` will be blocked if they're below the + # versions specified. This means that all other browsers, as well as agents that + # aren't reporting a user-agent header, will be allowed access. + # + # A browser that's blocked will by default be served the file in + # public/406-unsupported-browser.html with a HTTP status code of "406 Not + # Acceptable". + # + # In addition to specifically named browser versions, you can also pass + # `:modern` as the set to restrict support to browsers natively supporting webp + # images, web push, badges, import maps, CSS nesting, and CSS :has. This + # includes Safari 17.2+, Chrome 120+, Firefox 121+, Opera 106+. + # + # You can use https://caniuse.com to check for browser versions supporting the + # features you use. + # + # You can use `ActiveSupport::Notifications` to subscribe to events of browsers + # being blocked using the `browser_block.action_controller` event name. + # + # Examples: + # + # class ApplicationController < ActionController::Base + # # Allow only browsers natively supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has + # allow_browser versions: :modern + # end + # + # class ApplicationController < ActionController::Base + # # All versions of Chrome and Opera will be allowed, but no versions of "internet explorer" (ie). Safari needs to be 16.4+ and Firefox 121+. + # allow_browser versions: { safari: 16.4, firefox: 121, ie: false } + # end + # + # class MessagesController < ApplicationController + # # In addition to the browsers blocked by ApplicationController, also block Opera below 104 and Chrome below 119 for the show action. + # allow_browser versions: { opera: 104, chrome: 119 }, only: :show + # end + # + # pkg:gem/actionpack#lib/action_controller/metal/allow_browser.rb:47 + def allow_browser(versions:, block: T.unsafe(nil), **options); end +end + +# pkg:gem/actionpack#lib/action_controller/api/api_rendering.rb:6 +module ActionController::ApiRendering + extend ::ActiveSupport::Concern + include ::ActionController::Rendering + + mixes_in_class_methods ::ActionController::Rendering::ClassMethods + + # pkg:gem/actionpack#lib/action_controller/api/api_rendering.rb:13 + def render_to_body(options = T.unsafe(nil)); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:9 +class ActionController::BadRequest < ::ActionController::ActionControllerError + # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:10 + def initialize(msg = T.unsafe(nil)); end +end + +# # Action Controller Base +# +# Action Controllers are the core of a web request in Rails. They are made up of +# one or more actions that are executed on request and then either it renders a +# template or redirects to another action. An action is defined as a public +# method on the controller, which will automatically be made accessible to the +# web-server through Rails Routes. +# +# By default, only the ApplicationController in a Rails application inherits +# from `ActionController::Base`. All other controllers inherit from +# ApplicationController. This gives you one class to configure things such as +# request forgery protection and filtering of sensitive request parameters. +# +# A sample controller could look like this: +# +# class PostsController < ApplicationController +# def index +# @posts = Post.all +# end +# +# def create +# @post = Post.create params[:post] +# redirect_to posts_path +# end +# end +# +# Actions, by default, render a template in the `app/views` directory +# corresponding to the name of the controller and action after executing code in +# the action. For example, the `index` action of the PostsController would +# render the template `app/views/posts/index.html.erb` by default after +# populating the `@posts` instance variable. +# +# Unlike index, the create action will not render a template. After performing +# its main purpose (creating a new post), it initiates a redirect instead. This +# redirect works by returning an external `302 Moved` HTTP response that takes +# the user to the index action. +# +# These two methods represent the two basic action archetypes used in Action +# Controllers: Get-and-show and do-and-redirect. Most actions are variations on +# these themes. +# +# ## Requests +# +# For every request, the router determines the value of the `controller` and +# `action` keys. These determine which controller and action are called. The +# remaining request parameters, the session (if one is available), and the full +# request with all the HTTP headers are made available to the action through +# accessor methods. Then the action is performed. +# +# The full request object is available via the request accessor and is primarily +# used to query for HTTP headers: +# +# def server_ip +# location = request.env["REMOTE_ADDR"] +# render plain: "This server hosted at #{location}" +# end +# +# ## Parameters +# +# All request parameters, whether they come from a query string in the URL or +# form data submitted through a POST request are available through the `params` +# method which returns a hash. For example, an action that was performed through +# `/posts?category=All&limit=5` will include `{ "category" => "All", "limit" => +# "5" }` in `params`. +# +# It's also possible to construct multi-dimensional parameter hashes by +# specifying keys using brackets, such as: +# +# +# +# +# A request coming from a form holding these inputs will include `{ "post" => { +# "name" => "david", "address" => "hyacintvej" } }`. If the address input had +# been named `post[address][street]`, the `params` would have included `{ "post" +# => { "address" => { "street" => "hyacintvej" } } }`. There's no limit to the +# depth of the nesting. +# +# ## Sessions +# +# Sessions allow you to store objects in between requests. This is useful for +# objects that are not yet ready to be persisted, such as a Signup object +# constructed in a multi-paged process, or objects that don't change much and +# are needed all the time, such as a User object for a system that requires +# login. The session should not be used, however, as a cache for objects where +# it's likely they could be changed unknowingly. It's usually too much work to +# keep it all synchronized -- something databases already excel at. +# +# You can place objects in the session by using the `session` method, which +# accesses a hash: +# +# session[:person] = Person.authenticate(user_name, password) +# +# You can retrieve it again through the same hash: +# +# "Hello #{session[:person]}" +# +# For removing objects from the session, you can either assign a single key to +# `nil`: +# +# # removes :person from session +# session[:person] = nil +# +# or you can remove the entire session with `reset_session`. +# +# By default, sessions are stored in an encrypted browser cookie (see +# ActionDispatch::Session::CookieStore). Thus the user will not be able to read +# or edit the session data. However, the user can keep a copy of the cookie even +# after it has expired, so you should avoid storing sensitive information in +# cookie-based sessions. +# +# ## Responses +# +# Each action results in a response, which holds the headers and document to be +# sent to the user's browser. The actual response object is generated +# automatically through the use of renders and redirects and requires no user +# intervention. +# +# ## Renders +# +# Action Controller sends content to the user by using one of five rendering +# methods. The most versatile and common is the rendering of a template. +# Included in the Action Pack is the Action View, which enables rendering of ERB +# templates. It's automatically configured. The controller passes objects to the +# view by assigning instance variables: +# +# def show +# @post = Post.find(params[:id]) +# end +# +# Which are then automatically available to the view: +# +# Title: <%= @post.title %> +# +# You don't have to rely on the automated rendering. For example, actions that +# could result in the rendering of different templates will use the manual +# rendering methods: +# +# def search +# @results = Search.find(params[:query]) +# case @results.count +# when 0 then render action: "no_results" +# when 1 then render action: "show" +# when 2..10 then render action: "show_many" +# end +# end +# +# Read more about writing ERB and Builder templates in ActionView::Base. +# +# ## Redirects +# +# Redirects are used to move from one action to another. For example, after a +# `create` action, which stores a blog entry to the database, we might like to +# show the user the new entry. Because we're following good DRY principles +# (Don't Repeat Yourself), we're going to reuse (and redirect to) a `show` +# action that we'll assume has already been created. The code might look like +# this: +# +# def create +# @entry = Entry.new(params[:entry]) +# if @entry.save +# # The entry was saved correctly, redirect to show +# redirect_to action: 'show', id: @entry.id +# else +# # things didn't go so well, do something else +# end +# end +# +# In this case, after saving our new entry to the database, the user is +# redirected to the `show` method, which is then executed. Note that this is an +# external HTTP-level redirection which will cause the browser to make a second +# request (a GET to the show action), and not some internal re-routing which +# calls both "create" and then "show" within one request. +# +# Learn more about `redirect_to` and what options you have in +# ActionController::Redirecting. +# +# ## Calling multiple redirects or renders +# +# An action may perform only a single render or a single redirect. Attempting to +# do either again will result in a DoubleRenderError: +# +# def do_something +# redirect_to action: "elsewhere" +# render action: "overthere" # raises DoubleRenderError +# end +# +# If you need to redirect on the condition of something, then be sure to add +# "return" to halt execution. +# +# def do_something +# if monkeys.nil? +# redirect_to(action: "elsewhere") +# return +# end +# render action: "overthere" # won't be called if monkeys is nil +# end +# +# pkg:gem/actionpack#lib/action_controller/base.rb:207 +class ActionController::Base < ::ActionController::Metal + include ::ActionView::ViewPaths + include ::AbstractController::Rendering + include ::AbstractController::Translation + include ::AbstractController::AssetPaths + include ::AbstractController::Helpers + include ::ActionController::Helpers + include ::ActionDispatch::Routing::PolymorphicRoutes + include ::ActionDispatch::Routing::UrlFor + include ::AbstractController::UrlFor + include ::ActionController::UrlFor + include ::AbstractController::Logger + include ::ActiveSupport::Benchmarkable + include ::ActionController::Redirecting + include ::ActionView::Rendering + include ::ActionView::Layouts + include ::ActionController::Rendering + include ::ActionController::Renderers + include ::ActionController::Renderers::All + include ::ActionController::Head + include ::ActionController::ConditionalGet + include ::ActionController::EtagWithTemplateDigest + include ::ActionController::EtagWithFlash + include ::ActionController::Caching + include ::AbstractController::Caching::Fragments + include ::AbstractController::Caching::ConfigMethods + include ::AbstractController::Caching + include ::ActionController::MimeResponds + include ::ActionController::BasicImplicitRender + include ::ActionController::ImplicitRender + include ::ActionController::StrongParameters + include ::ActionController::ParameterEncoding + include ::ActionController::Cookies + include ::ActionController::Flash + include ::ActionController::FormBuilder + include ::ActiveSupport::Callbacks + include ::AbstractController::Callbacks + include ::ActionController::RequestForgeryProtection + include ::ActionController::ContentSecurityPolicy + include ::ActionController::PermissionsPolicy + include ::ActionController::RateLimiting + include ::ActionController::AllowBrowser + include ::ActionController::Streaming + include ::ActionController::DataStreaming + include ::ActionController::HttpAuthentication::Basic::ControllerMethods + include ::ActionController::HttpAuthentication::Digest::ControllerMethods + include ::ActionController::HttpAuthentication::Token::ControllerMethods + include ::ActionController::DefaultHeaders + include ::ActionController::Logging + include ::ActiveSupport::Rescuable + include ::ActionController::Rescue + include ::ActionController::Instrumentation + include ::ActionController::ParamsWrapper + extend ::ActionView::ViewPaths::ClassMethods + extend ::AbstractController::Helpers::Resolution + extend ::AbstractController::Helpers::ClassMethods + extend ::ActionController::Helpers::ClassMethods + extend ::AbstractController::UrlFor::ClassMethods + extend ::ActionView::Rendering::ClassMethods + extend ::ActionView::Layouts::ClassMethods + extend ::ActionController::Rendering::ClassMethods + extend ::ActionController::Renderers::ClassMethods + extend ::ActionController::ConditionalGet::ClassMethods + extend ::AbstractController::Caching::Fragments::ClassMethods + extend ::AbstractController::Caching::ClassMethods + extend ::AbstractController::Caching::ConfigMethods + extend ::ActionController::ParameterEncoding::ClassMethods + extend ::ActionController::Flash::ClassMethods + extend ::ActionController::FormBuilder::ClassMethods + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::AbstractController::Callbacks::ClassMethods + extend ::ActionController::RequestForgeryProtection::ClassMethods + extend ::ActionController::ContentSecurityPolicy::ClassMethods + extend ::ActionController::PermissionsPolicy::ClassMethods + extend ::ActionController::RateLimiting::ClassMethods + extend ::ActionController::AllowBrowser::ClassMethods + extend ::ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods + extend ::ActionController::DefaultHeaders::ClassMethods + extend ::ActionController::Logging::ClassMethods + extend ::ActiveSupport::Rescuable::ClassMethods + extend ::ActionController::Instrumentation::ClassMethods + extend ::ActionController::ParamsWrapper::ClassMethods + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def __callbacks; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def __callbacks?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def _helper_methods; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def _helper_methods=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def _helper_methods?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:277 + def _layout_conditions; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:277 + def _layout_conditions?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def _process_action_callbacks; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:279 + def _renderers; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:279 + def _renderers=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:279 + def _renderers?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def _run_process_action_callbacks(&block); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def _view_cache_dependencies; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def _view_cache_dependencies=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def _view_cache_dependencies?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:313 + def _wrapper_options; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:313 + def _wrapper_options=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:313 + def _wrapper_options?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:289 + def alert; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def allow_forgery_protection; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def allow_forgery_protection=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def asset_host; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def asset_host=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def assets_dir; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def assets_dir=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def csrf_token_storage_strategy; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def csrf_token_storage_strategy=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def default_asset_host_protocol; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def default_asset_host_protocol=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def default_static_extension; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def default_static_extension=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:275 + def default_url_options; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:275 + def default_url_options=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:275 + def default_url_options?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def enable_fragment_cache_logging; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def enable_fragment_cache_logging=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:281 + def etag_with_template_digest; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:281 + def etag_with_template_digest=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:281 + def etag_with_template_digest?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:280 + def etaggers; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:280 + def etaggers=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:280 + def etaggers?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:289 + def flash(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def forgery_protection_origin_check; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def forgery_protection_origin_check=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def forgery_protection_strategy; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def forgery_protection_strategy=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def fragment_cache_keys; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def fragment_cache_keys=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def fragment_cache_keys?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def helpers_path; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def helpers_path=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def helpers_path?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def include_all_helpers; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def include_all_helpers=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def include_all_helpers?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def javascripts_dir; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def javascripts_dir=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def log_warning_on_csrf_failure; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def log_warning_on_csrf_failure=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:276 + def logger; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:276 + def logger=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:289 + def notice; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def per_form_csrf_tokens; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def per_form_csrf_tokens=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def perform_caching; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def perform_caching=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def raise_on_missing_callback_actions; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def raise_on_missing_callback_actions=(val); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:276 + def raise_on_open_redirects; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:276 + def raise_on_open_redirects=(val); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def relative_url_root; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def relative_url_root=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def request_forgery_protection_token; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def request_forgery_protection_token=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:307 + def rescue_handlers; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:307 + def rescue_handlers=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:307 + def rescue_handlers?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def stylesheets_dir; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def stylesheets_dir=(value); end + + private + + # pkg:gem/actionpack#lib/action_controller/base.rb:277 + def _layout(lookup_context, formats, keys); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:324 + def _protected_ivars; end + + class << self + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def __callbacks; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def __callbacks=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def __callbacks?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:290 + def _default_form_builder; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:290 + def _default_form_builder=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:290 + def _default_form_builder?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:289 + def _flash_types; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:289 + def _flash_types=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:289 + def _flash_types?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def _helper_methods; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def _helper_methods=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def _helper_methods?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def _helpers; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:277 + def _layout; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:277 + def _layout=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:277 + def _layout?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:277 + def _layout_conditions; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:277 + def _layout_conditions=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:277 + def _layout_conditions?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def _process_action_callbacks; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def _process_action_callbacks=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:279 + def _renderers; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:279 + def _renderers=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:279 + def _renderers?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def _view_cache_dependencies; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def _view_cache_dependencies=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def _view_cache_dependencies?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:313 + def _wrapper_options; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:313 + def _wrapper_options=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:313 + def _wrapper_options?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def allow_forgery_protection; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def allow_forgery_protection=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def asset_host; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def asset_host=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def assets_dir; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def assets_dir=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def csrf_token_storage_strategy; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def csrf_token_storage_strategy=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def default_asset_host_protocol; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def default_asset_host_protocol=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def default_static_extension; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def default_static_extension=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:275 + def default_url_options; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:275 + def default_url_options=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:275 + def default_url_options?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def enable_fragment_cache_logging; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def enable_fragment_cache_logging=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:281 + def etag_with_template_digest; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:281 + def etag_with_template_digest=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:281 + def etag_with_template_digest?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:280 + def etaggers; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:280 + def etaggers=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:280 + def etaggers?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def forgery_protection_origin_check; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def forgery_protection_origin_check=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def forgery_protection_strategy; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def forgery_protection_strategy=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def fragment_cache_keys; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def fragment_cache_keys=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def fragment_cache_keys?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def helpers_path; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def helpers_path=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def helpers_path?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def include_all_helpers; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def include_all_helpers=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:274 + def include_all_helpers?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def javascripts_dir; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def javascripts_dir=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def log_warning_on_csrf_failure; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def log_warning_on_csrf_failure=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:276 + def logger; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:276 + def logger=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:207 + def middleware_stack; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def per_form_csrf_tokens; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def per_form_csrf_tokens=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def perform_caching; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def perform_caching=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def raise_on_missing_callback_actions; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def raise_on_missing_callback_actions=(val); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:276 + def raise_on_open_redirects; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:276 + def raise_on_open_redirects=(val); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def relative_url_root; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def relative_url_root=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def request_forgery_protection_token; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def request_forgery_protection_token=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:307 + def rescue_handlers; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:307 + def rescue_handlers=(value); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:307 + def rescue_handlers?; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def stylesheets_dir; end + + # pkg:gem/actionpack#lib/action_controller/base.rb:273 + def stylesheets_dir=(value); end + + # Shortcut helper that returns all the modules included in + # ActionController::Base except the ones passed as arguments: + # + # class MyBaseController < ActionController::Metal + # ActionController::Base.without_modules(:ParamsWrapper, :Streaming).each do |left| + # include left + # end + # end + # + # This gives better control over what you want to exclude and makes it easier to + # create a bare controller class, instead of listing the modules required + # manually. + # + # pkg:gem/actionpack#lib/action_controller/base.rb:222 + def without_modules(*modules); end + end +end + +# pkg:gem/actionpack#lib/action_controller/base.rb:274 +module ActionController::Base::HelperMethods + # pkg:gem/actionpack#lib/action_controller/base.rb:289 + def alert(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def combined_fragment_cache_key(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:292 + def content_security_policy?(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:292 + def content_security_policy_nonce(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:288 + def cookies(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def form_authenticity_token(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:289 + def notice(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:291 + def protect_against_forgery?(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/base.rb:283 + def view_cache_dependencies(*_arg0, **_arg1, &_arg2); end +end + +# pkg:gem/actionpack#lib/action_controller/base.rb:230 +ActionController::Base::MODULES = T.let(T.unsafe(nil), Array) + +# Define some internal variables that should not be propagated to the view. +# +# pkg:gem/actionpack#lib/action_controller/base.rb:318 +ActionController::Base::PROTECTED_IVARS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_controller/metal/basic_implicit_render.rb:6 +module ActionController::BasicImplicitRender + # pkg:gem/actionpack#lib/action_controller/metal/basic_implicit_render.rb:13 + def default_render; end + + # pkg:gem/actionpack#lib/action_controller/metal/basic_implicit_render.rb:7 + def send_action(method, *args); end +end + +# # Action Controller Caching +# +# Caching is a cheap way of speeding up slow applications by keeping the result +# of calculations, renderings, and database calls around for subsequent +# requests. +# +# You can read more about each approach by clicking the modules below. +# +# Note: To turn off all caching provided by Action Controller, set +# config.action_controller.perform_caching = false +# +# ## Caching stores +# +# All the caching stores from ActiveSupport::Cache are available to be used as +# backends for Action Controller caching. +# +# Configuration examples (FileStore is the default): +# +# config.action_controller.cache_store = :memory_store +# config.action_controller.cache_store = :file_store, '/path/to/cache/directory' +# config.action_controller.cache_store = :mem_cache_store, 'localhost' +# config.action_controller.cache_store = :mem_cache_store, Memcached::Rails.new('localhost:11211') +# config.action_controller.cache_store = MyOwnStore.new('parameter') +# +# pkg:gem/actionpack#lib/action_controller/caching.rb:29 +module ActionController::Caching + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::AbstractController::Caching::Fragments + include ::AbstractController::Caching + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::Caching::Fragments::ClassMethods + mixes_in_class_methods ::AbstractController::Caching::ClassMethods + mixes_in_class_methods ::AbstractController::Caching::ConfigMethods + + private + + # pkg:gem/actionpack#lib/action_controller/caching.rb:45 + def instrument_name; end + + # pkg:gem/actionpack#lib/action_controller/caching.rb:37 + def instrument_payload(key); end + + module GeneratedClassMethods + def _view_cache_dependencies; end + def _view_cache_dependencies=(value); end + def _view_cache_dependencies?; end + def fragment_cache_keys; end + def fragment_cache_keys=(value); end + def fragment_cache_keys?; end + end + + module GeneratedInstanceMethods + def _view_cache_dependencies; end + def _view_cache_dependencies=(value); end + def _view_cache_dependencies?; end + def fragment_cache_keys; end + def fragment_cache_keys=(value); end + def fragment_cache_keys?; end + end +end + +# pkg:gem/actionpack#lib/action_controller/metal/conditional_get.rb:9 +module ActionController::ConditionalGet + include ::ActionController::Head + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods + + # Sets the `Cache-Control` header, overwriting existing directives. This method + # will also ensure an HTTP `Date` header for client compatibility. + # + # Defaults to issuing the `private` directive, so that intermediate caches must + # not cache the response. + # + # #### Options + # + # `:public` + # directive. + # + # `:must_revalidate` + # + # `:stale_while_revalidate` + # + # `:stale_if_error` + # + # + # Any additional key-value pairs are concatenated as directives. For a list of + # supported `Cache-Control` directives, see the [article on + # MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control). + # + # #### Examples + # + # expires_in 10.minutes + # # => Cache-Control: max-age=600, private + # + # expires_in 10.minutes, public: true + # # => Cache-Control: max-age=600, public + # + # expires_in 10.minutes, public: true, must_revalidate: true + # # => Cache-Control: max-age=600, public, must-revalidate + # + # expires_in 1.hour, stale_while_revalidate: 60.seconds + # # => Cache-Control: max-age=3600, private, stale-while-revalidate=60 + # + # expires_in 1.hour, stale_if_error: 5.minutes + # # => Cache-Control: max-age=3600, private, stale-if-error=300 + # + # expires_in 1.hour, public: true, "s-maxage": 3.hours, "no-transform": true + # # => Cache-Control: max-age=3600, public, s-maxage=10800, no-transform=true + # + # pkg:gem/actionpack#lib/action_controller/metal/conditional_get.rb:287 + def expires_in(seconds, options = T.unsafe(nil)); end + + # Sets an HTTP 1.1 `Cache-Control` header of `no-cache`. This means the resource + # will be marked as stale, so clients must always revalidate. + # Intermediate/browser caches may still store the asset. + # + # pkg:gem/actionpack#lib/action_controller/metal/conditional_get.rb:305 + def expires_now; end + + # Sets the `etag`, `last_modified`, or both on the response, and renders a `304 + # Not Modified` response if the request is already fresh. + # + # #### Options + # + # `:etag` + # + # `:weak_etag` + # `If-None-Match` header may receive a `304 Not Modified` response if the + # ETag matches exactly. + # + # they're good for caching HTML pages in browser caches. They can't be used + # for responses that must be byte-identical, like serving `Range` requests + # within a PDF file. + # + # `:strong_etag` + # `If-None-Match` header may receive a `304 Not Modified` response if the + # ETag matches exactly. + # + # byte. This is necessary for serving `Range` requests within a large video + # or PDF file, for example, or for compatibility with some CDNs that don't + # support weak ETags. + # + # `:last_modified` + # that specify an `If-Modified-Since` header may receive a `304 Not + # Modified` response if `last_modified` <= `If-Modified-Since`. + # + # `:public` + # `true` if you want your application to be cacheable by other devices, such + # as proxy caches. + # + # `:cache_control` + # of `Cache-Control` directives, see the [article on + # MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control). + # + # `:template` + # included in ETags. If the action renders a different template, you can + # include its digest instead. If the action doesn't render a template at + # all, you can pass `template: false` to skip any attempt to check for a + # template digest. + # + # + # #### Examples + # + # def show + # @article = Article.find(params[:id]) + # fresh_when(etag: @article, last_modified: @article.updated_at, public: true) + # end + # + # This will send a `304 Not Modified` response if the request specifies a + # matching ETag and `If-Modified-Since` header. Otherwise, it will render the + # `show` template. + # + # You can also just pass a record: + # + # def show + # @article = Article.find(params[:id]) + # fresh_when(@article) + # end + # + # `etag` will be set to the record, and `last_modified` will be set to the + # record's `updated_at`. + # + # You can also pass an object that responds to `maximum`, such as a collection + # of records: + # + # def index + # @articles = Article.all + # fresh_when(@articles) + # end + # + # In this case, `etag` will be set to the collection, and `last_modified` will + # be set to `maximum(:updated_at)` (the timestamp of the most recently updated + # record). + # + # When passing a record or a collection, you can still specify other options, + # such as `:public` and `:cache_control`: + # + # def show + # @article = Article.find(params[:id]) + # fresh_when(@article, public: true, cache_control: { no_cache: true }) + # end + # + # The above will set `Cache-Control: public, no-cache` in the response. + # + # When rendering a different template than the controller/action's default + # template, you can indicate which digest to include in the ETag: + # + # before_action { fresh_when @article, template: "widgets/show" } + # + # pkg:gem/actionpack#lib/action_controller/metal/conditional_get.rb:137 + def fresh_when(object = T.unsafe(nil), etag: T.unsafe(nil), weak_etag: T.unsafe(nil), strong_etag: T.unsafe(nil), last_modified: T.unsafe(nil), public: T.unsafe(nil), cache_control: T.unsafe(nil), template: T.unsafe(nil)); end + + # Cache or yield the block. The cache is supposed to never expire. + # + # You can use this method when you have an HTTP response that never changes, and + # the browser and proxies should cache it indefinitely. + # + # * `public`: By default, HTTP responses are private, cached only on the + # user's web browser. To allow proxies to cache the response, set `true` to + # indicate that they can serve the cached response to all users. + # + # pkg:gem/actionpack#lib/action_controller/metal/conditional_get.rb:317 + def http_cache_forever(public: T.unsafe(nil)); end + + # Sets an HTTP 1.1 `Cache-Control` header of `no-store`. This means the resource + # may not be stored in any cache. + # + # pkg:gem/actionpack#lib/action_controller/metal/conditional_get.rb:327 + def no_store; end + + # Sets the `etag` and/or `last_modified` on the response and checks them against + # the request. If the request doesn't match the provided options, it is + # considered stale, and the response should be rendered from scratch. Otherwise, + # it is fresh, and a `304 Not Modified` is sent. + # + # #### Options + # + # See #fresh_when for supported options. + # + # #### Examples + # + # def show + # @article = Article.find(params[:id]) + # + # if stale?(etag: @article, last_modified: @article.updated_at) + # @statistics = @article.really_expensive_call + # respond_to do |format| + # # all the supported formats + # end + # end + # end + # + # You can also just pass a record: + # + # def show + # @article = Article.find(params[:id]) + # + # if stale?(@article) + # @statistics = @article.really_expensive_call + # respond_to do |format| + # # all the supported formats + # end + # end + # end + # + # `etag` will be set to the record, and `last_modified` will be set to the + # record's `updated_at`. + # + # You can also pass an object that responds to `maximum`, such as a collection + # of records: + # + # def index + # @articles = Article.all + # + # if stale?(@articles) + # @statistics = @articles.really_expensive_call + # respond_to do |format| + # # all the supported formats + # end + # end + # end + # + # In this case, `etag` will be set to the collection, and `last_modified` will + # be set to `maximum(:updated_at)` (the timestamp of the most recently updated + # record). + # + # When passing a record or a collection, you can still specify other options, + # such as `:public` and `:cache_control`: + # + # def show + # @article = Article.find(params[:id]) + # + # if stale?(@article, public: true, cache_control: { no_cache: true }) + # @statistics = @articles.really_expensive_call + # respond_to do |format| + # # all the supported formats + # end + # end + # end + # + # The above will set `Cache-Control: public, no-cache` in the response. + # + # When rendering a different template than the controller/action's default + # template, you can indicate which digest to include in the ETag: + # + # def show + # super if stale?(@article, template: "widgets/show") + # end + # + # pkg:gem/actionpack#lib/action_controller/metal/conditional_get.rb:236 + def stale?(object = T.unsafe(nil), **freshness_kwargs); end + + private + + # pkg:gem/actionpack#lib/action_controller/metal/conditional_get.rb:332 + def combine_etags(validator, options); end + + module GeneratedClassMethods + def etaggers; end + def etaggers=(value); end + def etaggers?; end + end + + module GeneratedInstanceMethods + def etaggers; end + def etaggers=(value); end + def etaggers?; end + end +end + +# pkg:gem/actionpack#lib/action_controller/metal/conditional_get.rb:18 +module ActionController::ConditionalGet::ClassMethods + # Allows you to consider additional controller-wide information when generating + # an ETag. For example, if you serve pages tailored depending on who's logged in + # at the moment, you may want to add the current user id to be part of the ETag + # to prevent unauthorized displaying of cached pages. + # + # class InvoicesController < ApplicationController + # etag { current_user&.id } + # + # def show + # # Etag will differ even for the same invoice when it's viewed by a different current_user + # @invoice = Invoice.find(params[:id]) + # fresh_when etag: @invoice + # end + # end + # + # pkg:gem/actionpack#lib/action_controller/metal/conditional_get.rb:33 + def etag(&etagger); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/content_security_policy.rb:6 +module ActionController::ContentSecurityPolicy + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::AbstractController::Helpers + include ::ActiveSupport::Callbacks + include ::AbstractController::Callbacks + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::Helpers::ClassMethods + mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods + mixes_in_class_methods ::ActiveSupport::DescendantsTracker + mixes_in_class_methods ::AbstractController::Callbacks::ClassMethods + mixes_in_class_methods ::ActionController::ContentSecurityPolicy::ClassMethods + + private + + # pkg:gem/actionpack#lib/action_controller/metal/content_security_policy.rb:74 + def content_security_policy?; end + + # pkg:gem/actionpack#lib/action_controller/metal/content_security_policy.rb:78 + def content_security_policy_nonce; end + + # pkg:gem/actionpack#lib/action_controller/metal/content_security_policy.rb:82 + def current_content_security_policy; end + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def __callbacks?; end + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def __callbacks?; end + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end +end + +# pkg:gem/actionpack#lib/action_controller/metal/content_security_policy.rb:17 +module ActionController::ContentSecurityPolicy::ClassMethods + # Overrides parts of the globally configured `Content-Security-Policy` header: + # + # class PostsController < ApplicationController + # content_security_policy do |policy| + # policy.base_uri "https://www.example.com" + # end + # end + # + # Options can be passed similar to `before_action`. For example, pass `only: + # :index` to override the header on the index action only: + # + # class PostsController < ApplicationController + # content_security_policy(only: :index) do |policy| + # policy.default_src :self, :https + # end + # end + # + # Pass `false` to remove the `Content-Security-Policy` header: + # + # class PostsController < ApplicationController + # content_security_policy false, only: :index + # end + # + # pkg:gem/actionpack#lib/action_controller/metal/content_security_policy.rb:40 + def content_security_policy(enabled = T.unsafe(nil), **options, &block); end + + # Overrides the globally configured `Content-Security-Policy-Report-Only` + # header: + # + # class PostsController < ApplicationController + # content_security_policy_report_only only: :index + # end + # + # Pass `false` to remove the `Content-Security-Policy-Report-Only` header: + # + # class PostsController < ApplicationController + # content_security_policy_report_only false, only: :index + # end + # + # pkg:gem/actionpack#lib/action_controller/metal/content_security_policy.rb:66 + def content_security_policy_report_only(report_only = T.unsafe(nil), **options); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/cookies.rb:6 +module ActionController::Cookies + extend ::ActiveSupport::Concern + + private + + # The cookies for the current request. See ActionDispatch::Cookies for more + # information. + # + # pkg:gem/actionpack#lib/action_controller/metal/cookies.rb:16 + def cookies; end +end + +# # Action Controller Data Streaming +# +# Methods for sending arbitrary data and for streaming files to the browser, +# instead of rendering. +# +# pkg:gem/actionpack#lib/action_controller/metal/data_streaming.rb:13 +module ActionController::DataStreaming + extend ::ActiveSupport::Concern + include ::ActionController::Rendering + + mixes_in_class_methods ::ActionController::Rendering::ClassMethods + + private + + # Sends the given binary data to the browser. This method is similar to `render + # plain: data`, but also allows you to specify whether the browser should + # display the response as a file attachment (i.e. in a download dialog) or as + # inline data. You may also set the content type, the file name, and other + # things. + # + # Options: + # * `:filename` - suggests a filename for the browser to use. + # * `:type` - specifies an HTTP content type. Defaults to + # `application/octet-stream`. You can specify either a string or a symbol + # for a registered type with `Mime::Type.register`, for example `:json`. If + # omitted, type will be inferred from the file extension specified in + # `:filename`. If no content type is registered for the extension, the + # default type `application/octet-stream` will be used. + # * `:disposition` - specifies whether the file will be shown inline or + # downloaded. Valid values are `"inline"` and `"attachment"` (default). + # * `:status` - specifies the status code to send with the response. Defaults + # to 200. + # + # + # Generic data download: + # + # send_data buffer + # + # Download a dynamically-generated tarball: + # + # send_data generate_tgz('dir'), filename: 'dir.tgz' + # + # Display an image Active Record in the browser: + # + # send_data image.data, type: image.content_type, disposition: 'inline' + # + # See `send_file` for more information on HTTP `Content-*` headers and caching. + # + # pkg:gem/actionpack#lib/action_controller/metal/data_streaming.rb:120 + def send_data(data, options = T.unsafe(nil)); end + + # Sends the file. This uses a server-appropriate method (such as `X-Sendfile`) + # via the `Rack::Sendfile` middleware. The header to use is set via + # `config.action_dispatch.x_sendfile_header`. Your server can also configure + # this for you by setting the `X-Sendfile-Type` header. + # + # Be careful to sanitize the path parameter if it is coming from a web page. + # `send_file(params[:path])` allows a malicious user to download any file on + # your server. + # + # Options: + # * `:filename` - suggests a filename for the browser to use. Defaults to + # `File.basename(path)`. + # * `:type` - specifies an HTTP content type. You can specify either a string + # or a symbol for a registered type with `Mime::Type.register`, for example + # `:json`. If omitted, the type will be inferred from the file extension + # specified in `:filename`. If no content type is registered for the + # extension, the default type `application/octet-stream` will be used. + # * `:disposition` - specifies whether the file will be shown inline or + # downloaded. Valid values are `"inline"` and `"attachment"` (default). + # * `:status` - specifies the status code to send with the response. Defaults + # to 200. + # * `:url_based_filename` - set to `true` if you want the browser to guess the + # filename from the URL, which is necessary for i18n filenames on certain + # browsers (setting `:filename` overrides this option). + # + # + # The default `Content-Type` and `Content-Disposition` headers are set to + # download arbitrary binary files in as many browsers as possible. IE versions + # 4, 5, 5.5, and 6 are all known to have a variety of quirks (especially when + # downloading over SSL). + # + # Simple download: + # + # send_file '/path/to.zip' + # + # Show a JPEG in the browser: + # + # send_file '/path/to.jpeg', type: 'image/jpeg', disposition: 'inline' + # + # Show a 404 page in the browser: + # + # send_file '/path/to/404.html', type: 'text/html; charset=utf-8', disposition: 'inline', status: 404 + # + # You can use other `Content-*` HTTP headers to provide additional information + # to the client. See MDN for a [list of HTTP + # headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers). + # + # Also be aware that the document may be cached by proxies and browsers. The + # `Pragma` and `Cache-Control` headers declare how the file may be cached by + # intermediaries. They default to require clients to validate with the server + # before releasing cached responses. See https://www.mnot.net/cache_docs/ for an + # overview of web caching and [RFC + # 9111](https://www.rfc-editor.org/rfc/rfc9111.html#name-cache-control) for the + # `Cache-Control` header spec. + # + # pkg:gem/actionpack#lib/action_controller/metal/data_streaming.rb:76 + def send_file(path, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_controller/metal/data_streaming.rb:125 + def send_file_headers!(options); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/data_streaming.rb:19 +ActionController::DataStreaming::DEFAULT_SEND_FILE_DISPOSITION = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_controller/metal/data_streaming.rb:18 +ActionController::DataStreaming::DEFAULT_SEND_FILE_TYPE = T.let(T.unsafe(nil), String) + +# # Action Controller Default Headers +# +# Allows configuring default headers that will be automatically merged into each +# response. +# +# pkg:gem/actionpack#lib/action_controller/metal/default_headers.rb:10 +module ActionController::DefaultHeaders + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::DefaultHeaders::ClassMethods +end + +# pkg:gem/actionpack#lib/action_controller/metal/default_headers.rb:13 +module ActionController::DefaultHeaders::ClassMethods + # pkg:gem/actionpack#lib/action_controller/metal/default_headers.rb:14 + def make_response!(request); end +end + +# # Action Controller Etag With Flash +# +# When you're using the flash, it's generally used as a conditional on the view. +# This means the content of the view depends on the flash. Which in turn means +# that the ETag for a response should be computed with the content of the flash +# in mind. This does that by including the content of the flash as a component +# in the ETag that's generated for a response. +# +# pkg:gem/actionpack#lib/action_controller/metal/etag_with_flash.rb:13 +module ActionController::EtagWithFlash + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActionController::ConditionalGet + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods + + module GeneratedClassMethods + def etaggers; end + def etaggers=(value); end + def etaggers?; end + end + + module GeneratedInstanceMethods + def etaggers; end + def etaggers=(value); end + def etaggers?; end + end +end + +# # Action Controller Etag With Template Digest +# +# When our views change, they should bubble up into HTTP cache freshness and +# bust browser caches. So the template digest for the current action is +# automatically included in the ETag. +# +# Enabled by default for apps that use Action View. Disable by setting +# +# config.action_controller.etag_with_template_digest = false +# +# Override the template to digest by passing `:template` to `fresh_when` and +# `stale?` calls. For example: +# +# # We're going to render widgets/show, not posts/show +# fresh_when @post, template: 'widgets/show' +# +# # We're not going to render a template, so omit it from the ETag. +# fresh_when @post, template: false +# +# pkg:gem/actionpack#lib/action_controller/metal/etag_with_template_digest.rb:25 +module ActionController::EtagWithTemplateDigest + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActionController::ConditionalGet + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods + + private + + # pkg:gem/actionpack#lib/action_controller/metal/etag_with_template_digest.rb:39 + def determine_template_etag(options); end + + # pkg:gem/actionpack#lib/action_controller/metal/etag_with_template_digest.rb:55 + def lookup_and_digest_template(template); end + + # Pick the template digest to include in the ETag. If the `:template` option is + # present, use the named template. If `:template` is `nil` or absent, use the + # default controller/action template. If `:template` is false, omit the template + # digest from the ETag. + # + # pkg:gem/actionpack#lib/action_controller/metal/etag_with_template_digest.rb:49 + def pick_template_for_etag(options); end + + module GeneratedClassMethods + def etag_with_template_digest; end + def etag_with_template_digest=(value); end + def etag_with_template_digest?; end + def etaggers; end + def etaggers=(value); end + def etaggers?; end + end + + module GeneratedInstanceMethods + def etag_with_template_digest; end + def etag_with_template_digest=(value); end + def etag_with_template_digest?; end + def etaggers; end + def etaggers=(value); end + def etaggers?; end + end +end + +# pkg:gem/actionpack#lib/action_controller/metal/flash.rb:6 +module ActionController::Flash + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::Flash::ClassMethods + + private + + # pkg:gem/actionpack#lib/action_controller/metal/flash.rb:53 + def redirect_to(options = T.unsafe(nil), response_options_and_flash = T.unsafe(nil)); end + + module GeneratedClassMethods + def _flash_types; end + def _flash_types=(value); end + def _flash_types?; end + end + + module GeneratedInstanceMethods; end +end + +# pkg:gem/actionpack#lib/action_controller/metal/flash.rb:16 +module ActionController::Flash::ClassMethods + # pkg:gem/actionpack#lib/action_controller/metal/flash.rb:47 + def action_methods; end + + # Creates new flash types. You can pass as many types as you want to create + # flash types other than the default `alert` and `notice` in your controllers + # and views. For instance: + # + # # in application_controller.rb + # class ApplicationController < ActionController::Base + # add_flash_types :warning + # end + # + # # in your controller + # redirect_to user_path(@user), warning: "Incomplete profile" + # + # # in your view + # <%= warning %> + # + # This method will automatically define a new method for each of the given + # names, and it will be available in your views. + # + # pkg:gem/actionpack#lib/action_controller/metal/flash.rb:34 + def add_flash_types(*types); end +end + +# # Action Controller Form Builder +# +# Override the default form builder for all views rendered by this controller +# and any of its descendants. Accepts a subclass of +# ActionView::Helpers::FormBuilder. +# +# For example, given a form builder: +# +# class AdminFormBuilder < ActionView::Helpers::FormBuilder +# def special_field(name) +# end +# end +# +# The controller specifies a form builder as its default: +# +# class AdminAreaController < ApplicationController +# default_form_builder AdminFormBuilder +# end +# +# Then in the view any form using `form_for` will be an instance of the +# specified form builder: +# +# <%= form_for(@instance) do |builder| %> +# <%= builder.special_field(:name) %> +# <% end %> +# +# pkg:gem/actionpack#lib/action_controller/form_builder.rb:31 +module ActionController::FormBuilder + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::FormBuilder::ClassMethods + + # Default form builder for the controller + # + # pkg:gem/actionpack#lib/action_controller/form_builder.rb:51 + def default_form_builder; end + + module GeneratedClassMethods + def _default_form_builder; end + def _default_form_builder=(value); end + def _default_form_builder?; end + end + + module GeneratedInstanceMethods; end +end + +# pkg:gem/actionpack#lib/action_controller/form_builder.rb:38 +module ActionController::FormBuilder::ClassMethods + # Set the form builder to be used as the default for all forms in the views + # rendered by this controller and its subclasses. + # + # #### Parameters + # * `builder` - Default form builder, an instance of + # ActionView::Helpers::FormBuilder + # + # pkg:gem/actionpack#lib/action_controller/form_builder.rb:45 + def default_form_builder(builder); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/head.rb:6 +module ActionController::Head + # Returns a response that has no content (merely headers). The options argument + # is interpreted to be a hash of header names and values. This allows you to + # easily return a response that consists only of significant headers: + # + # head :created, location: person_path(@person) + # + # head :created, location: @person + # + # It can also be used to return exceptional conditions: + # + # return head(:method_not_allowed) unless request.post? + # return head(:bad_request) unless valid_request? + # render + # + # See `Rack::Utils::SYMBOL_TO_STATUS_CODE` for a full list of valid `status` + # symbols. + # + # pkg:gem/actionpack#lib/action_controller/metal/head.rb:23 + def head(status, options = T.unsafe(nil)); end + + private + + # pkg:gem/actionpack#lib/action_controller/metal/head.rb:56 + def include_content?(status); end +end + +# # Action Controller Helpers +# +# The Rails framework provides a large number of helpers for working with +# assets, dates, forms, numbers and model objects, to name a few. These helpers +# are available to all templates by default. +# +# In addition to using the standard template helpers provided, creating custom +# helpers to extract complicated logic or reusable functionality is strongly +# encouraged. By default, each controller will include all helpers. These +# helpers are only accessible on the controller through `#helpers` +# +# In previous versions of Rails the controller will include a helper which +# matches the name of the controller, e.g., `MyController` will automatically +# include `MyHelper`. You can revert to the old behavior with the following: +# +# # config/application.rb +# class Application < Rails::Application +# config.action_controller.include_all_helpers = false +# end +# +# Additional helpers can be specified using the `helper` class method in +# ActionController::Base or any controller which inherits from it. +# +# The `to_s` method from the Time class can be wrapped in a helper method to +# display a custom message if a Time object is blank: +# +# module FormattedTimeHelper +# def format_time(time, format=:long, blank_message=" ") +# time.blank? ? blank_message : time.to_fs(format) +# end +# end +# +# FormattedTimeHelper can now be included in a controller, using the `helper` +# class method: +# +# class EventsController < ActionController::Base +# helper FormattedTimeHelper +# def index +# @events = Event.all +# end +# end +# +# Then, in any view rendered by `EventsController`, the `format_time` method can +# be called: +# +# <% @events.each do |event| -%> +#

+# <%= format_time(event.time, :short, "N/A") %> | <%= event.name %> +#

+# <% end -%> +# +# Finally, assuming we have two event instances, one which has a time and one +# which does not, the output might look like this: +# +# 23 Aug 11:30 | Carolina Railhawks Soccer Match +# N/A | Carolina Railhawks Training Workshop +# +# pkg:gem/actionpack#lib/action_controller/metal/helpers.rb:63 +module ActionController::Helpers + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::AbstractController::Helpers + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::Helpers::ClassMethods + mixes_in_class_methods ::ActionController::Helpers::ClassMethods + + # Provides a proxy to access helper methods from outside the view. + # + # pkg:gem/actionpack#lib/action_controller/metal/helpers.rb:125 + def helpers; end + + class << self + # pkg:gem/actionpack#lib/action_controller/metal/helpers.rb:66 + def helpers_path; end + + # pkg:gem/actionpack#lib/action_controller/metal/helpers.rb:66 + def helpers_path=(_arg0); end + end + + module GeneratedClassMethods + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + def helpers_path; end + def helpers_path=(value); end + def helpers_path?; end + def include_all_helpers; end + def include_all_helpers=(value); end + def include_all_helpers?; end + end + + module GeneratedInstanceMethods + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + def helpers_path; end + def helpers_path=(value); end + def helpers_path?; end + def include_all_helpers; end + def include_all_helpers=(value); end + def include_all_helpers?; end + end +end + +# pkg:gem/actionpack#lib/action_controller/metal/helpers.rb:74 +module ActionController::Helpers::ClassMethods + # Declares helper accessors for controller attributes. For example, the + # following adds new `name` and `name=` instance methods to a controller and + # makes them available to the view: + # attr_accessor :name + # helper_attr :name + # + # #### Parameters + # * `attrs` - Names of attributes to be converted into helpers. + # + # pkg:gem/actionpack#lib/action_controller/metal/helpers.rb:84 + def helper_attr(*attrs); end + + # Provides a proxy to access helper methods from outside the view. + # + # Note that the proxy is rendered under a different view context. This may cause + # incorrect behavior with capture methods. Consider using + # [helper](rdoc-ref:AbstractController::Helpers::ClassMethods#helper) instead + # when using `capture`. + # + # pkg:gem/actionpack#lib/action_controller/metal/helpers.rb:94 + def helpers; end + + # Override modules_for_helpers to accept `:all` as argument, which loads all + # helpers in helpers_path. + # + # #### Parameters + # * `args` - A list of helpers + # + # + # #### Returns + # * `array` - A normalized list of modules for the list of helpers provided. + # + # pkg:gem/actionpack#lib/action_controller/metal/helpers.rb:112 + def modules_for_helpers(args); end + + private + + # Extract helper names from files in `app/helpers/***/**_helper.rb` + # + # pkg:gem/actionpack#lib/action_controller/metal/helpers.rb:119 + def all_application_helpers; end +end + +# HTTP Basic, Digest, and Token authentication. +# +# pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:11 +module ActionController::HttpAuthentication; end + +# # HTTP Basic authentication +# +# ### Simple Basic example +# +# class PostsController < ApplicationController +# http_basic_authenticate_with name: "dhh", password: "secret", except: :index +# +# def index +# render plain: "Everyone can see me!" +# end +# +# def edit +# render plain: "I'm only accessible if you know the password" +# end +# end +# +# ### Advanced Basic example +# +# Here is a more advanced Basic example where only Atom feeds and the XML API +# are protected by HTTP authentication. The regular HTML interface is protected +# by a session approach: +# +# class ApplicationController < ActionController::Base +# before_action :set_account, :authenticate +# +# private +# def set_account +# @account = Account.find_by(url_name: request.subdomains.first) +# end +# +# def authenticate +# case request.format +# when Mime[:xml], Mime[:atom] +# if user = authenticate_with_http_basic { |u, p| @account.users.authenticate(u, p) } +# @current_user = user +# else +# request_http_basic_authentication +# end +# else +# if session_authenticated? +# @current_user = @account.users.find(session[:authenticated][:user_id]) +# else +# redirect_to(login_url) and return false +# end +# end +# end +# end +# +# In your integration tests, you can do something like this: +# +# def test_access_granted_from_xml +# authorization = ActionController::HttpAuthentication::Basic.encode_credentials(users(:dhh).name, users(:dhh).password) +# +# get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization } +# +# assert_equal 200, status +# end +# +# pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:69 +module ActionController::HttpAuthentication::Basic + extend ::ActionController::HttpAuthentication::Basic + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:130 + def auth_param(request); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:126 + def auth_scheme(request); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:108 + def authenticate(request, &login_procedure); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:138 + def authentication_request(controller, realm, message); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:122 + def decode_credentials(request); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:134 + def encode_credentials(user_name, password); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:114 + def has_basic_credentials?(request); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:118 + def user_name_and_password(request); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:72 +module ActionController::HttpAuthentication::Basic::ControllerMethods + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:95 + def authenticate_or_request_with_http_basic(realm = T.unsafe(nil), message = T.unsafe(nil), &login_procedure); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:99 + def authenticate_with_http_basic(&login_procedure); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:86 + def http_basic_authenticate_or_request_with(name:, password:, realm: T.unsafe(nil), message: T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:103 + def request_http_basic_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:75 +module ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods + # Enables HTTP Basic authentication. + # + # See ActionController::HttpAuthentication::Basic for example usage. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:79 + def http_basic_authenticate_with(name:, password:, realm: T.unsafe(nil), **options); end +end + +# # HTTP Digest authentication +# +# ### Simple Digest example +# +# require "openssl" +# class PostsController < ApplicationController +# REALM = "SuperSecret" +# USERS = {"dhh" => "secret", #plain text password +# "dap" => OpenSSL::Digest::MD5.hexdigest(["dap",REALM,"secret"].join(":"))} #ha1 digest password +# +# before_action :authenticate, except: [:index] +# +# def index +# render plain: "Everyone can see me!" +# end +# +# def edit +# render plain: "I'm only accessible if you know the password" +# end +# +# private +# def authenticate +# authenticate_or_request_with_http_digest(REALM) do |username| +# USERS[username] +# end +# end +# end +# +# ### Notes +# +# The `authenticate_or_request_with_http_digest` block must return the user's +# password or the ha1 digest hash so the framework can appropriately hash to +# check the user's credentials. Returning `nil` will cause authentication to +# fail. +# +# Storing the ha1 hash: MD5(username:realm:password), is better than storing a +# plain password. If the password file or database is compromised, the attacker +# would be able to use the ha1 hash to authenticate as the user at this `realm`, +# but would not have the user's password to try using at other sites. +# +# In rare instances, web servers or front proxies strip authorization headers +# before they reach your application. You can debug this situation by logging +# all environment variables, and check for HTTP_AUTHORIZATION, amongst others. +# +# pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:189 +module ActionController::HttpAuthentication::Digest + extend ::ActionController::HttpAuthentication::Digest + + # Returns true on a valid response, false otherwise. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:215 + def authenticate(request, realm, &password_procedure); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:274 + def authentication_header(controller, realm); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:281 + def authentication_request(controller, realm, message = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:267 + def decode_credentials(header); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:263 + def decode_credentials_header(request); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:258 + def encode_credentials(http_method, credentials, password, password_is_ha1); end + + # Returns the expected response for a request of `http_method` to `uri` with the + # decoded `credentials` and the expected `password` Optional parameter + # `password_is_ha1` is set to `true` by default, since best practice is to store + # ha1 digest instead of a plain-text password. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:248 + def expected_response(http_method, uri, credentials, password, password_is_ha1 = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:254 + def ha1(credentials, password); end + + # Uses an MD5 digest based on time to generate a value to be used only once. + # + # A server-specified data string which should be uniquely generated each time a + # 401 response is made. It is recommended that this string be base64 or + # hexadecimal data. Specifically, since the string is passed in the header lines + # as a quoted string, the double-quote character is not allowed. + # + # The contents of the nonce are implementation dependent. The quality of the + # implementation depends on a good choice. A nonce might, for example, be + # constructed as the base 64 encoding of + # + # time-stamp H(time-stamp ":" ETag ":" private-key) + # + # where time-stamp is a server-generated time or other non-repeating value, ETag + # is the value of the HTTP ETag header associated with the requested entity, and + # private-key is data known only to the server. With a nonce of this form a + # server would recalculate the hash portion after receiving the client + # authentication header and reject the request if it did not match the nonce + # from that header or if the time-stamp value is not recent enough. In this way + # the server can limit the time of the nonce's validity. The inclusion of the + # ETag prevents a replay request for an updated version of the resource. (Note: + # including the IP address of the client in the nonce would appear to offer the + # server the ability to limit the reuse of the nonce to the same client that + # originally got it. However, that would break proxy farms, where requests from + # a single user often go through different proxies in the farm. Also, IP address + # spoofing is not that hard.) + # + # An implementation might choose not to accept a previously used nonce or a + # previously used digest, in order to protect against a replay attack. Or, an + # implementation might choose to use one-time nonces or digests for POST, PUT, + # or PATCH requests, and a time-stamp for GET requests. For more details on the + # issues involved see Section 4 of this document. + # + # The nonce is opaque to the client. Composed of Time, and hash of Time with + # secret key from the Rails session secret generated upon creation of project. + # Ensures the time cannot be modified by client. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:330 + def nonce(secret_key, time = T.unsafe(nil)); end + + # Opaque based on digest of secret key + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:348 + def opaque(secret_key); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:288 + def secret_token(request); end + + # Returns false unless the request credentials response value matches the + # expected value. First try the password as a ha1 digest password. If this + # fails, then try it as a plain text password. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:222 + def validate_digest_response(request, realm, &password_procedure); end + + # Might want a shorter timeout depending on whether the request is a PATCH, PUT, + # or POST, and if the client is a browser or web service. Can be much shorter if + # the Stale directive is implemented. This would allow a user to use new nonce + # without prompting the user again for their username and password. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:341 + def validate_nonce(secret_key, request, value, seconds_to_timeout = T.unsafe(nil)); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:192 +module ActionController::HttpAuthentication::Digest::ControllerMethods + # Authenticate using an HTTP Digest, or otherwise render an HTTP header + # requesting the client to send a Digest. + # + # See ActionController::HttpAuthentication::Digest for example usage. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:197 + def authenticate_or_request_with_http_digest(realm = T.unsafe(nil), message = T.unsafe(nil), &password_procedure); end + + # Authenticate using an HTTP Digest. Returns true if authentication is + # successful, false otherwise. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:203 + def authenticate_with_http_digest(realm = T.unsafe(nil), &password_procedure); end + + # Render an HTTP header requesting the client to send a Digest for + # authentication. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:209 + def request_http_digest_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end +end + +# # HTTP Token authentication +# +# ### Simple Token example +# +# class PostsController < ApplicationController +# TOKEN = "secret" +# +# before_action :authenticate, except: [ :index ] +# +# def index +# render plain: "Everyone can see me!" +# end +# +# def edit +# render plain: "I'm only accessible if you know the password" +# end +# +# private +# def authenticate +# authenticate_or_request_with_http_token do |token, options| +# # Compare the tokens in a time-constant manner, to mitigate +# # timing attacks. +# ActiveSupport::SecurityUtils.secure_compare(token, TOKEN) +# end +# end +# end +# +# Here is a more advanced Token example where only Atom feeds and the XML API +# are protected by HTTP token authentication. The regular HTML interface is +# protected by a session approach: +# +# class ApplicationController < ActionController::Base +# before_action :set_account, :authenticate +# +# private +# def set_account +# @account = Account.find_by(url_name: request.subdomains.first) +# end +# +# def authenticate +# case request.format +# when Mime[:xml], Mime[:atom] +# if user = authenticate_with_http_token { |t, o| @account.users.authenticate(t, o) } +# @current_user = user +# else +# request_http_token_authentication +# end +# else +# if session_authenticated? +# @current_user = @account.users.find(session[:authenticated][:user_id]) +# else +# redirect_to(login_url) and return false +# end +# end +# end +# end +# +# In your integration tests, you can do something like this: +# +# def test_access_granted_from_xml +# authorization = ActionController::HttpAuthentication::Token.encode_credentials(users(:dhh).token) +# +# get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization } +# +# assert_equal 200, status +# end +# +# On shared hosts, Apache sometimes doesn't pass authentication headers to FCGI +# instances. If your environment matches this description and you cannot +# authenticate, try this rule in your Apache setup: +# +# RewriteRule ^(.*)$ dispatch.fcgi [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L] +# +# pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:425 +module ActionController::HttpAuthentication::Token + extend ::ActionController::HttpAuthentication::Token + + # If token Authorization header is present, call the login procedure with the + # present token and options. + # + # Returns the return value of `login_procedure` if a token is found. Returns + # `nil` if no token is found. + # + # #### Parameters + # + # * `controller` - ActionController::Base instance for the current request. + # * `login_procedure` - Proc to call if a token is present. The Proc should + # take two arguments: + # + # authenticate(controller) { |token, options| ... } + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:472 + def authenticate(controller, &login_procedure); end + + # Sets a WWW-Authenticate header to let the client know a token is desired. + # + # Returns nothing. + # + # #### Parameters + # + # * `controller` - ActionController::Base instance for the outgoing response. + # * `realm` - String realm to use in the header. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:555 + def authentication_request(controller, realm, message = T.unsafe(nil)); end + + # Encodes the given token and options into an Authorization header value. + # + # Returns String. + # + # #### Parameters + # + # * `token` - String token. + # * `options` - Optional Hash of the options. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:539 + def encode_credentials(token, options = T.unsafe(nil)); end + + # Takes `raw_params` and turns it into an array of parameters. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:507 + def params_array_from(raw_params); end + + # This method takes an authorization body and splits up the key-value pairs by + # the standardized `:`, `;`, or `\t` delimiters defined in + # `AUTHN_PAIR_DELIMITERS`. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:519 + def raw_params(auth); end + + # This removes the `"` characters wrapping the value. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:512 + def rewrite_param_values(array_params); end + + # Parses the token and options out of the token Authorization header. The value + # for the Authorization header is expected to have the prefix `"Token"` or + # `"Bearer"`. If the header looks like this: + # + # Authorization: Token token="abc", nonce="def" + # + # Then the returned token is `"abc"`, and the options are `{nonce: "def"}`. + # + # Returns an `Array` of `[String, Hash]` if a token is present. Returns `nil` if + # no token is found. + # + # #### Parameters + # + # * `request` - ActionDispatch::Request instance with the current headers. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:494 + def token_and_options(request); end + + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:502 + def token_params_from(auth); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:428 +ActionController::HttpAuthentication::Token::AUTHN_PAIR_DELIMITERS = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:431 +module ActionController::HttpAuthentication::Token::ControllerMethods + # Authenticate using an HTTP Bearer token, or otherwise render an HTTP header + # requesting the client to send a Bearer token. For the authentication to be + # considered successful, `login_procedure` must not return a false value. + # Typically, the authenticated user is returned. + # + # See ActionController::HttpAuthentication::Token for example usage. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:438 + def authenticate_or_request_with_http_token(realm = T.unsafe(nil), message = T.unsafe(nil), &login_procedure); end + + # Authenticate using an HTTP Bearer token. Returns the return value of + # `login_procedure` if a token is found. Returns `nil` if no token is found. + # + # See ActionController::HttpAuthentication::Token for example usage. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:446 + def authenticate_with_http_token(&login_procedure); end + + # Render an HTTP header requesting the client to send a Bearer token for + # authentication. + # + # pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:452 + def request_http_token_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:426 +ActionController::HttpAuthentication::Token::TOKEN_KEY = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_controller/metal/http_authentication.rb:427 +ActionController::HttpAuthentication::Token::TOKEN_REGEX = T.let(T.unsafe(nil), Regexp) + +# # Action Controller Implicit Render +# +# Handles implicit rendering for a controller action that does not explicitly +# respond with `render`, `respond_to`, `redirect`, or `head`. +# +# For API controllers, the implicit response is always `204 No Content`. +# +# For all other controllers, we use these heuristics to decide whether to render +# a template, raise an error for a missing template, or respond with `204 No +# Content`: +# +# First, if we DO find a template, it's rendered. Template lookup accounts for +# the action name, locales, format, variant, template handlers, and more (see +# `render` for details). +# +# Second, if we DON'T find a template but the controller action does have +# templates for other formats, variants, etc., then we trust that you meant to +# provide a template for this response, too, and we raise +# ActionController::UnknownFormat with an explanation. +# +# Third, if we DON'T find a template AND the request is a page load in a web +# browser (technically, a non-XHR GET request for an HTML response) where you +# reasonably expect to have rendered a template, then we raise +# ActionController::MissingExactTemplate with an explanation. +# +# Finally, if we DON'T find a template AND the request isn't a browser page +# load, then we implicitly respond with `204 No Content`. +# +# pkg:gem/actionpack#lib/action_controller/metal/implicit_render.rb:33 +module ActionController::ImplicitRender + include ::ActionController::BasicImplicitRender + + # pkg:gem/actionpack#lib/action_controller/metal/implicit_render.rb:37 + def default_render; end + + # pkg:gem/actionpack#lib/action_controller/metal/implicit_render.rb:56 + def method_for_action(action_name); end + + private + + # pkg:gem/actionpack#lib/action_controller/metal/implicit_render.rb:63 + def interactive_browser_request?; end +end + +# # Action Controller Instrumentation +# +# Adds instrumentation to several ends in ActionController::Base. It also +# provides some hooks related with process_action. This allows an ORM like +# Active Record and/or DataMapper to plug in ActionController and show related +# information. +# +# Check ActiveRecord::Railties::ControllerRuntime for an example. +# +# pkg:gem/actionpack#lib/action_controller/metal/instrumentation.rb:17 +module ActionController::Instrumentation + extend ::ActiveSupport::Concern + include ::ActiveSupport::Benchmarkable + include ::AbstractController::Logger + + mixes_in_class_methods ::ActionController::Instrumentation::ClassMethods + + # pkg:gem/actionpack#lib/action_controller/metal/instrumentation.rb:24 + def initialize(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/metal/instrumentation.rb:50 + def redirect_to(*_arg0); end + + # pkg:gem/actionpack#lib/action_controller/metal/instrumentation.rb:29 + def render(*_arg0); end + + # pkg:gem/actionpack#lib/action_controller/metal/instrumentation.rb:44 + def send_data(data, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_controller/metal/instrumentation.rb:37 + def send_file(path, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_controller/metal/instrumentation.rb:22 + def view_runtime; end + + # pkg:gem/actionpack#lib/action_controller/metal/instrumentation.rb:22 + def view_runtime=(_arg0); end + + private + + # Every time after an action is processed, this method is invoked with the + # payload, so you can add more information. + # + # pkg:gem/actionpack#lib/action_controller/metal/instrumentation.rb:106 + def append_info_to_payload(payload); end + + # A hook which allows you to clean up any time, wrongly taken into account in + # views, like database querying time. + # + # def cleanup_view_runtime + # super - time_taken_in_something_expensive + # end + # + # pkg:gem/actionpack#lib/action_controller/metal/instrumentation.rb:100 + def cleanup_view_runtime; end + + # A hook invoked every time a before callback is halted. + # + # pkg:gem/actionpack#lib/action_controller/metal/instrumentation.rb:90 + def halted_callback_hook(filter, _); end + + # pkg:gem/actionpack#lib/action_controller/metal/instrumentation.rb:60 + def process_action(*_arg0); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/instrumentation.rb:110 +module ActionController::Instrumentation::ClassMethods + # A hook which allows other frameworks to log what happened during controller + # process action. This method should return an array with the messages to be + # added. + # + # pkg:gem/actionpack#lib/action_controller/metal/instrumentation.rb:114 + def log_process_action(payload); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:10 +class ActionController::InvalidAuthenticityToken < ::ActionController::ActionControllerError; end + +# pkg:gem/actionpack#lib/action_controller/metal/request_forgery_protection.rb:13 +class ActionController::InvalidCrossOriginRequest < ::ActionController::ActionControllerError; end + +# Raised when initializing Parameters with keys that aren't strings or symbols. +# +# ActionController::Parameters.new(123 => 456) +# # => ActionController::InvalidParameterKey: all keys must be Strings or Symbols, got: Integer +# +# pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:74 +class ActionController::InvalidParameterKey < ::ArgumentError; end + +# # Action Controller Live +# +# Mix this module into your controller, and all actions in that controller will +# be able to stream data to the client as it's written. +# +# class MyController < ActionController::Base +# include ActionController::Live +# +# def stream +# response.headers['Content-Type'] = 'text/event-stream' +# 100.times { +# response.stream.write "hello world\n" +# sleep 1 +# } +# ensure +# response.stream.close +# end +# end +# +# There are a few caveats with this module. You **cannot** write headers after +# the response has been committed (Response#committed? will return truthy). +# Calling `write` or `close` on the response stream will cause the response +# object to be committed. Make sure all headers are set before calling write or +# close on your stream. +# +# You **must** call close on your stream when you're finished, otherwise the +# socket may be left open forever. +# +# The final caveat is that your actions are executed in a separate thread than +# the main thread. Make sure your actions are thread safe, and this shouldn't be +# a problem (don't share state across threads, etc). +# +# Note that Rails includes `Rack::ETag` by default, which will buffer your +# response. As a result, streaming responses may not work properly with Rack +# 2.2.x, and you may need to implement workarounds in your application. You can +# either set the `ETag` or `Last-Modified` response headers or remove +# `Rack::ETag` from the middleware stack to address this issue. +# +# Here's an example of how you can set the `Last-Modified` header if your Rack +# version is 2.2.x: +# +# def stream +# response.headers["Content-Type"] = "text/event-stream" +# response.headers["Last-Modified"] = Time.now.httpdate # Add this line if your Rack version is 2.2.x +# ... +# end +# +# pkg:gem/actionpack#lib/action_controller/metal/live.rb:56 +module ActionController::Live + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::Live::ClassMethods + + # Spawn a new thread to serve up the controller in. This is to get around the + # fact that Rack isn't based around IOs and we need to use a thread to stream + # data from the response bodies. Nobody should call this method except in Rails + # internals. Seriously! + # + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:373 + def new_controller_thread; end + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:276 + def process(name); end + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:322 + def response_body=(body); end + + # Sends a stream to the browser, which is helpful when you're generating exports + # or other running data where you don't want the entire file buffered in memory + # first. Similar to send_data, but where the data is generated live. + # + # Options: + # * `:filename` - suggests a filename for the browser to use. + # * `:type` - specifies an HTTP content type. You can specify either a string + # or a symbol for a registered type with `Mime::Type.register`, for example + # :json. If omitted, type will be inferred from the file extension specified + # in `:filename`. If no content type is registered for the extension, the + # default type 'application/octet-stream' will be used. + # * `:disposition` - specifies whether the file will be shown inline or + # downloaded. Valid values are 'inline' and 'attachment' (default). + # + # + # Example of generating a csv export: + # + # send_stream(filename: "subscribers.csv") do |stream| + # stream.write "email_address,updated_at\n" + # + # @subscribers.find_each do |subscriber| + # stream.write "#{subscriber.email_address},#{subscriber.updated_at}\n" + # end + # end + # + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:351 + def send_stream(filename:, disposition: T.unsafe(nil), type: T.unsafe(nil)); end + + private + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:381 + def log_error(exception); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/live.rb:151 +class ActionController::Live::Buffer < ::ActionDispatch::Response::Buffer + include ::MonitorMixin + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:166 + def initialize(response); end + + # Inform the producer/writing thread that the client has disconnected; the + # reading thread is no longer interested in anything that's being written. + # + # See also #close. + # + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:220 + def abort; end + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:239 + def call_on_error; end + + # Write a 'close' event to the buffer; the producer/writing thread uses this to + # notify us that it's finished supplying content. + # + # See also #abort. + # + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:208 + def close; end + + # Is the client still connected and waiting for content? + # + # The result of calling `write` when this is `false` is determined by + # `ignore_disconnect`. + # + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:231 + def connected?; end + + # Ignore that the client has disconnected. + # + # If this value is `true`, calling `write` after the client disconnects will + # result in the written content being silently discarded. If this value is + # `false` (the default), a ClientDisconnected exception will be raised. + # + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:164 + def ignore_disconnect; end + + # Ignore that the client has disconnected. + # + # If this value is `true`, calling `write` after the client disconnects will + # result in the written content being silently discarded. If this value is + # `false` (the default), a ClientDisconnected exception will be raised. + # + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:164 + def ignore_disconnect=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:235 + def on_error(&block); end + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:180 + def write(string); end + + # Same as `write` but automatically include a newline at the end of the string. + # + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:200 + def writeln(string); end + + private + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:255 + def build_queue(queue_size); end + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:244 + def each_chunk(&block); end + + class << self + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:155 + def queue_size; end + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:155 + def queue_size=(_arg0); end + end +end + +# pkg:gem/actionpack#lib/action_controller/metal/live.rb:59 +module ActionController::Live::ClassMethods + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:60 + def make_response!(request); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/live.rb:148 +class ActionController::Live::ClientDisconnected < ::RuntimeError; end + +# pkg:gem/actionpack#lib/action_controller/metal/live.rb:260 +class ActionController::Live::Response < ::ActionDispatch::Response + private + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:262 + def before_committed; end + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:269 + def build_buffer(response, body); end +end + +# # Action Controller Live Server Sent Events +# +# This class provides the ability to write an SSE (Server Sent Event) to an IO +# stream. The class is initialized with a stream and can be used to either write +# a JSON string or an object which can be converted to JSON. +# +# Writing an object will convert it into standard SSE format with whatever +# options you have configured. You may choose to set the following options: +# +# `:event` +# +# `:retry` +# +# `:id` +# server will receive a `Last-Event-ID` header with value equal to `id`. +# +# After setting an option in the constructor of the SSE object, all future SSEs +# sent across the stream will use those options unless overridden. +# +# Example Usage: +# +# class MyController < ActionController::Base +# include ActionController::Live +# +# def index +# response.headers['Content-Type'] = 'text/event-stream' +# sse = SSE.new(response.stream, retry: 300, event: "event-name") +# sse.write({ name: 'John'}) +# sse.write({ name: 'John'}, id: 10) +# sse.write({ name: 'John'}, id: 10, event: "other-event") +# sse.write({ name: 'John'}, id: 10, event: "other-event", retry: 500) +# ensure +# sse.close +# end +# end +# +# Note: SSEs are not currently supported by IE. However, they are supported by +# Chrome, Firefox, Opera, and Safari. +# +# pkg:gem/actionpack#lib/action_controller/metal/live.rb:112 +class ActionController::Live::SSE + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:115 + def initialize(stream, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:120 + def close; end + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:124 + def write(object, options = T.unsafe(nil)); end + + private + + # pkg:gem/actionpack#lib/action_controller/metal/live.rb:134 + def perform_write(json, options); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/live.rb:113 +ActionController::Live::SSE::PERMITTED_OPTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_controller/test_case.rb:174 +class ActionController::LiveTestResponse < ::ActionController::Live::Response + # Was there a server-side error? + # + # pkg:gem/actionpack#lib/action_controller/test_case.rb:182 + def error?; end + + # Was the URL not found? + # + # pkg:gem/actionpack#lib/action_controller/test_case.rb:179 + def missing?; end + + # Was the response successful? + # + # pkg:gem/actionpack#lib/action_controller/test_case.rb:176 + def success?; end +end + +# pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:6 +class ActionController::LogSubscriber < ::ActiveSupport::LogSubscriber + # pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:78 + def exist_fragment?(event); end + + # pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:78 + def expire_fragment(event); end + + # pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:47 + def halted_callback(event); end + + # pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:90 + def logger; end + + # pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:26 + def process_action(event); end + + # pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:78 + def read_fragment(event); end + + # pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:57 + def redirect_to(event); end + + # pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:62 + def send_data(event); end + + # pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:52 + def send_file(event); end + + # pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:9 + def start_processing(event); end + + # pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:67 + def unpermitted_parameters(event); end + + # pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:78 + def write_fragment(event); end + + class << self + # pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:24 + def log_levels; end + end +end + +# pkg:gem/actionpack#lib/action_controller/log_subscriber.rb:7 +ActionController::LogSubscriber::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_controller/metal/logging.rb:6 +module ActionController::Logging + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::Logging::ClassMethods +end + +# pkg:gem/actionpack#lib/action_controller/metal/logging.rb:9 +module ActionController::Logging::ClassMethods + # Set a different log level per request. + # + # # Use the debug log level if a particular cookie is set. + # class ApplicationController < ActionController::Base + # log_at :debug, if: -> { cookies[:debug] } + # end + # + # pkg:gem/actionpack#lib/action_controller/metal/logging.rb:17 + def log_at(level, **options); end +end + +# # Action Controller Metal +# +# `ActionController::Metal` is the simplest possible controller, providing a +# valid Rack interface without the additional niceties provided by +# ActionController::Base. +# +# A sample metal controller might look like this: +# +# class HelloController < ActionController::Metal +# def index +# self.response_body = "Hello World!" +# end +# end +# +# And then to route requests to your metal controller, you would add something +# like this to `config/routes.rb`: +# +# get 'hello', to: HelloController.action(:index) +# +# The ::action method returns a valid Rack application for the Rails router to +# dispatch to. +# +# ## Rendering Helpers +# +# By default, `ActionController::Metal` provides no utilities for rendering +# views, partials, or other responses aside from some low-level setters such +# as #response_body=, #content_type=, and #status=. To add the render helpers +# you're used to having in a normal controller, you can do the following: +# +# class HelloController < ActionController::Metal +# include AbstractController::Rendering +# include ActionView::Layouts +# append_view_path "#{Rails.root}/app/views" +# +# def index +# render "hello/index" +# end +# end +# +# ## Redirection Helpers +# +# To add redirection helpers to your metal controller, do the following: +# +# class HelloController < ActionController::Metal +# include ActionController::Redirecting +# include Rails.application.routes.url_helpers +# +# def index +# redirect_to root_url +# end +# end +# +# ## Other Helpers +# +# You can refer to the modules included in ActionController::Base to see other +# features you can bring into your metal controller. +# +# pkg:gem/actionpack#lib/action_controller/metal.rb:121 +class ActionController::Metal < ::AbstractController::Base + include ::ActionController::Testing::Functional + + # pkg:gem/actionpack#lib/action_controller/metal.rb:210 + def initialize; end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:204 + def content_type(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:192 + def content_type=(arg); end + + # Delegates to the class's ::controller_name. + # + # pkg:gem/actionpack#lib/action_controller/metal.rb:156 + def controller_name; end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:249 + def dispatch(name, request, response); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:180 + def headers(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:200 + def location(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:188 + def location=(arg); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:208 + def media_type(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:288 + def middleware_stack; end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:288 + def middleware_stack=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:288 + def middleware_stack?; end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:219 + def params; end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:223 + def params=(val); end + + # Tests if render or redirect has already happened. + # + # pkg:gem/actionpack#lib/action_controller/metal.rb:245 + def performed?; end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:164 + def request; end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:164 + def request=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:284 + def reset_session; end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:170 + def response; end + + # Assign the response and mark it as committed. No further processing will + # occur. + # + # pkg:gem/actionpack#lib/action_controller/metal.rb:268 + def response=(response); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:234 + def response_body=(body); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:227 + def response_code(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:176 + def session(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:275 + def set_request!(request); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:257 + def set_response!(response); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:196 + def status(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:184 + def status=(arg); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:280 + def to_a; end + + # Basic `url_for` that can be overridden for more robust functionality. + # + # pkg:gem/actionpack#lib/action_controller/metal.rb:230 + def url_for(string); end + + class << self + # Returns a Rack endpoint for the given action name. + # + # pkg:gem/actionpack#lib/action_controller/metal.rb:315 + def action(name); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:140 + def action_encoding_template(action); end + + # Returns the last part of the controller's name, underscored, without the + # ending `Controller`. For instance, `PostsController` returns `posts`. + # Namespaces are left out, so `Admin::PostsController` returns `posts` as well. + # + # #### Returns + # * `string` + # + # pkg:gem/actionpack#lib/action_controller/metal.rb:130 + def controller_name; end + + # Direct dispatch to the controller. Instantiates the controller, then executes + # the action named `name`. + # + # pkg:gem/actionpack#lib/action_controller/metal.rb:331 + def dispatch(name, req, res); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:134 + def make_response!(request); end + + # The middleware stack used by this controller. + # + # By default uses a variation of ActionDispatch::MiddlewareStack which allows + # for the following syntax: + # + # class PostsController < ApplicationController + # use AuthenticationMiddleware, except: [:index, :show] + # end + # + # Read more about [Rails middleware stack] + # (https://guides.rubyonrails.org/rails_on_rack.html#action-dispatcher-middleware-stack) + # in the guides. + # + # pkg:gem/actionpack#lib/action_controller/metal.rb:310 + def middleware; end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:288 + def middleware_stack; end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:288 + def middleware_stack=(value); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:288 + def middleware_stack?; end + + # Pushes the given Rack middleware and its arguments to the bottom of the + # middleware stack. + # + # pkg:gem/actionpack#lib/action_controller/metal.rb:293 + def use(*_arg0, **_arg1, &_arg2); end + + private + + # pkg:gem/actionpack#lib/action_controller/metal.rb:146 + def inherited(subclass); end + end +end + +# pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:52 +class ActionController::MethodNotAllowed < ::ActionController::ActionControllerError + # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:53 + def initialize(*allowed_methods); end +end + +# # Action Controller MiddlewareStack +# +# Extend ActionDispatch middleware stack to make it aware of options allowing +# the following syntax in controllers: +# +# class PostsController < ApplicationController +# use AuthenticationMiddleware, except: [:index, :show] +# end +# +# pkg:gem/actionpack#lib/action_controller/metal.rb:18 +class ActionController::MiddlewareStack < ::ActionDispatch::MiddlewareStack + # pkg:gem/actionpack#lib/action_controller/metal.rb:31 + def build(action, app = T.unsafe(nil), &block); end + + private + + # pkg:gem/actionpack#lib/action_controller/metal.rb:44 + def build_middleware(klass, args, block); end +end + +# pkg:gem/actionpack#lib/action_controller/metal.rb:41 +ActionController::MiddlewareStack::EXCLUDE = T.let(T.unsafe(nil), Proc) + +# pkg:gem/actionpack#lib/action_controller/metal.rb:40 +ActionController::MiddlewareStack::INCLUDE = T.let(T.unsafe(nil), Proc) + +# pkg:gem/actionpack#lib/action_controller/metal.rb:19 +class ActionController::MiddlewareStack::Middleware < ::ActionDispatch::MiddlewareStack::Middleware + # pkg:gem/actionpack#lib/action_controller/metal.rb:20 + def initialize(klass, args, actions, strategy, block); end + + # pkg:gem/actionpack#lib/action_controller/metal.rb:26 + def valid?(action); end +end + +# pkg:gem/actionpack#lib/action_controller/metal.rb:42 +ActionController::MiddlewareStack::NULL = T.let(T.unsafe(nil), Proc) + +# pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:8 +module ActionController::MimeResponds + # Without web-service support, an action which collects the data for displaying + # a list of people might look something like this: + # + # def index + # @people = Person.all + # end + # + # That action implicitly responds to all formats, but formats can also be + # explicitly enumerated: + # + # def index + # @people = Person.all + # respond_to :html, :js + # end + # + # Here's the same action, with web-service support baked in: + # + # def index + # @people = Person.all + # + # respond_to do |format| + # format.html + # format.js + # format.xml { render xml: @people } + # end + # end + # + # What that says is, "if the client wants HTML or JS in response to this action, + # just respond as we would have before, but if the client wants XML, return them + # the list of people in XML format." (Rails determines the desired response + # format from the HTTP Accept header submitted by the client.) + # + # Supposing you have an action that adds a new person, optionally creating their + # company (by name) if it does not already exist, without web-services, it might + # look like this: + # + # def create + # @company = Company.find_or_create_by(name: params[:company][:name]) + # @person = @company.people.create(params[:person]) + # + # redirect_to(person_list_url) + # end + # + # Here's the same action, with web-service support baked in: + # + # def create + # company = params[:person].delete(:company) + # @company = Company.find_or_create_by(name: company[:name]) + # @person = @company.people.create(params[:person]) + # + # respond_to do |format| + # format.html { redirect_to(person_list_url) } + # format.js + # format.xml { render xml: @person.to_xml(include: @company) } + # end + # end + # + # If the client wants HTML, we just redirect them back to the person list. If + # they want JavaScript, then it is an Ajax request and we render the JavaScript + # template associated with this action. Lastly, if the client wants XML, we + # render the created person as XML, but with a twist: we also include the + # person's company in the rendered XML, so you get something like this: + # + # + # ... + # ... + # + # ... + # ... + # ... + # + # + # + # Note, however, the extra bit at the top of that action: + # + # company = params[:person].delete(:company) + # @company = Company.find_or_create_by(name: company[:name]) + # + # This is because the incoming XML document (if a web-service request is in + # process) can only contain a single root-node. So, we have to rearrange things + # so that the request looks like this (url-encoded): + # + # person[name]=...&person[company][name]=...&... + # + # And, like this (xml-encoded): + # + # + # ... + # + # ... + # + # + # + # In other words, we make the request so that it operates on a single entity's + # person. Then, in the action, we extract the company data from the request, + # find or create the company, and then create the new person with the remaining + # data. + # + # Note that you can define your own XML parameter parser which would allow you + # to describe multiple entities in a single request (i.e., by wrapping them all + # in a single root node), but if you just go with the flow and accept Rails' + # defaults, life will be much easier. + # + # If you need to use a MIME type which isn't supported by default, you can + # register your own handlers in `config/initializers/mime_types.rb` as follows. + # + # Mime::Type.register "image/jpeg", :jpg + # + # `respond_to` also allows you to specify a common block for different formats + # by using `any`: + # + # def index + # @people = Person.all + # + # respond_to do |format| + # format.html + # format.any(:xml, :json) { render request.format.to_sym => @people } + # end + # end + # + # In the example above, if the format is xml, it will render: + # + # render xml: @people + # + # Or if the format is json: + # + # render json: @people + # + # `any` can also be used with no arguments, in which case it will be used for + # any format requested by the user: + # + # respond_to do |format| + # format.html + # format.any { redirect_to support_path } + # end + # + # Formats can have different variants. + # + # The request variant is a specialization of the request format, like `:tablet`, + # `:phone`, or `:desktop`. + # + # We often want to render different html/json/xml templates for phones, tablets, + # and desktop browsers. Variants make it easy. + # + # You can set the variant in a `before_action`: + # + # request.variant = :tablet if /iPad/.match?(request.user_agent) + # + # Respond to variants in the action just like you respond to formats: + # + # respond_to do |format| + # format.html do |variant| + # variant.tablet # renders app/views/projects/show.html+tablet.erb + # variant.phone { extra_setup; render ... } + # variant.none { special_setup } # executed only if there is no variant set + # end + # end + # + # Provide separate templates for each format and variant: + # + # app/views/projects/show.html.erb + # app/views/projects/show.html+tablet.erb + # app/views/projects/show.html+phone.erb + # + # When you're not sharing any code within the format, you can simplify defining + # variants using the inline syntax: + # + # respond_to do |format| + # format.js { render "trash" } + # format.html.phone { redirect_to progress_path } + # format.html.none { render "trash" } + # end + # + # Variants also support common `any`/`all` block that formats have. + # + # It works for both inline: + # + # respond_to do |format| + # format.html.any { render html: "any" } + # format.html.phone { render html: "phone" } + # end + # + # and block syntax: + # + # respond_to do |format| + # format.html do |variant| + # variant.any(:tablet, :phablet){ render html: "any" } + # variant.phone { render html: "phone" } + # end + # end + # + # You can also set an array of variants: + # + # request.variant = [:tablet, :phone] + # + # This will work similarly to formats and MIME types negotiation. If there is no + # `:tablet` variant declared, the `:phone` variant will be used: + # + # respond_to do |format| + # format.html.none + # format.html.phone # this gets rendered + # end + # + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:211 + def respond_to(*mimes); end +end + +# A container for responses available from the current controller for requests +# for different mime-types sent to a particular action. +# +# The public controller methods `respond_to` may be called with a block that is +# used to define responses to different mime-types, e.g. for `respond_to` : +# +# respond_to do |format| +# format.html +# format.xml { render xml: @people } +# end +# +# In this usage, the argument passed to the block (`format` above) is an +# instance of the ActionController::MimeResponds::Collector class. This object +# serves as a container in which available responses can be stored by calling +# any of the dynamically generated, mime-type-specific methods such as `html`, +# `xml` etc on the Collector. Each response is represented by a corresponding +# block if present. +# +# A subsequent call to #negotiate_format(request) will enable the Collector to +# determine which specific mime-type it should respond with for the current +# request, with this response then being accessible by calling #response. +# +# pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:251 +class ActionController::MimeResponds::Collector + include ::AbstractController::Collector + + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:255 + def initialize(mimes, variant = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:269 + def all(*args, &block); end + + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:262 + def any(*args, &block); end + + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:280 + def any_response?; end + + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:271 + def custom(mime_type, &block); end + + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:253 + def format; end + + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:253 + def format=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:297 + def negotiate_format(request); end + + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:284 + def response; end +end + +# pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:301 +class ActionController::MimeResponds::Collector::VariantCollector + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:302 + def initialize(variant = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:316 + def all(*args, &block); end + + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:307 + def any(*args, &block); end + + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:318 + def method_missing(name, *_arg1, &block); end + + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:322 + def variant; end + + private + + # pkg:gem/actionpack#lib/action_controller/metal/mime_responds.rb:331 + def variant_key; end +end + +# pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:96 +class ActionController::MissingExactTemplate < ::ActionController::UnknownFormat + # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:99 + def initialize(message, controller, action_name); end + + # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:97 + def action_name; end + + # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:97 + def controller; end +end + +# pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:61 +class ActionController::MissingFile < ::ActionController::ActionControllerError; end + +# See `Responder#api_behavior` +# +# pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:19 +class ActionController::MissingRenderer < ::LoadError + # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:20 + def initialize(format); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:58 +class ActionController::NotImplemented < ::ActionController::MethodNotAllowed; end + +# Specify binary encoding for parameters for a given action. +# +# pkg:gem/actionpack#lib/action_controller/metal/parameter_encoding.rb:7 +module ActionController::ParameterEncoding + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::ParameterEncoding::ClassMethods +end + +# pkg:gem/actionpack#lib/action_controller/metal/parameter_encoding.rb:10 +module ActionController::ParameterEncoding::ClassMethods + # pkg:gem/actionpack#lib/action_controller/metal/parameter_encoding.rb:20 + def action_encoding_template(action); end + + # pkg:gem/actionpack#lib/action_controller/metal/parameter_encoding.rb:11 + def inherited(klass); end + + # Specify the encoding for a parameter on an action. If not specified the + # default is UTF-8. + # + # You can specify a binary (ASCII_8BIT) parameter with: + # + # class RepositoryController < ActionController::Base + # # This specifies that file_path is not UTF-8 and is instead ASCII_8BIT + # param_encoding :show, :file_path, Encoding::ASCII_8BIT + # + # def show + # @repo = Repository.find_by_filesystem_path params[:file_path] + # + # # params[:repo_name] remains UTF-8 encoded + # @repo_name = params[:repo_name] + # end + # + # def index + # @repositories = Repository.all + # end + # end + # + # The file_path parameter on the show action would be encoded as ASCII-8BIT, but + # all other arguments will remain UTF-8 encoded. This is useful in the case + # where an application must handle data but encoding of the data is unknown, + # like file system data. + # + # pkg:gem/actionpack#lib/action_controller/metal/parameter_encoding.rb:79 + def param_encoding(action, param, encoding); end + + # pkg:gem/actionpack#lib/action_controller/metal/parameter_encoding.rb:16 + def setup_param_encode; end + + # Specify that a given action's parameters should all be encoded as ASCII-8BIT + # (it "skips" the encoding default of UTF-8). + # + # For example, a controller would use it like this: + # + # class RepositoryController < ActionController::Base + # skip_parameter_encoding :show + # + # def show + # @repo = Repository.find_by_filesystem_path params[:file_path] + # + # # `repo_name` is guaranteed to be UTF-8, but was ASCII-8BIT, so + # # tag it as such + # @repo_name = params[:repo_name].force_encoding 'UTF-8' + # end + # + # def index + # @repositories = Repository.all + # end + # end + # + # The show action in the above controller would have all parameter values + # encoded as ASCII-8BIT. This is useful in the case where an application must + # handle data but encoding of the data is unknown, like file system data. + # + # pkg:gem/actionpack#lib/action_controller/metal/parameter_encoding.rb:50 + def skip_parameter_encoding(action); end +end + +# Raised when a required parameter is missing. +# +# params = ActionController::Parameters.new(a: {}) +# params.fetch(:b) +# # => ActionController::ParameterMissing: param is missing or the value is empty: b +# params.require(:a) +# # => ActionController::ParameterMissing: param is missing or the value is empty: a +# +# pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:24 +class ActionController::ParameterMissing < ::KeyError + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:27 + def initialize(param, keys = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:36 + def corrections; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:25 + def keys; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:25 + def param; end +end + +# # Action Controller Parameters +# +# Allows you to choose which attributes should be permitted for mass updating +# and thus prevent accidentally exposing that which shouldn't be exposed. +# Provides two methods for this purpose: #require and #permit. The former is +# used to mark parameters as required. The latter is used to set the parameter +# as permitted and limit which attributes should be allowed for mass updating. +# +# params = ActionController::Parameters.new({ +# person: { +# name: "Francesco", +# age: 22, +# role: "admin" +# } +# }) +# +# permitted = params.require(:person).permit(:name, :age) +# permitted # => #"Francesco", "age"=>22} permitted: true> +# permitted.permitted? # => true +# +# Person.first.update!(permitted) +# # => # +# +# It provides two options that controls the top-level behavior of new instances: +# +# * `permit_all_parameters` - If it's `true`, all the parameters will be +# permitted by default. The default is `false`. +# * `action_on_unpermitted_parameters` - Controls behavior when parameters +# that are not explicitly permitted are found. The default value is `:log` +# in test and development environments, `false` otherwise. The values can +# be: +# * `false` to take no action. +# * `:log` to emit an `ActiveSupport::Notifications.instrument` event on +# the `unpermitted_parameters.action_controller` topic and log at the +# DEBUG level. +# * `:raise` to raise an ActionController::UnpermittedParameters +# exception. +# +# +# +# Examples: +# +# params = ActionController::Parameters.new +# params.permitted? # => false +# +# ActionController::Parameters.permit_all_parameters = true +# +# params = ActionController::Parameters.new +# params.permitted? # => true +# +# params = ActionController::Parameters.new(a: "123", b: "456") +# params.permit(:c) +# # => # +# +# ActionController::Parameters.action_on_unpermitted_parameters = :raise +# +# params = ActionController::Parameters.new(a: "123", b: "456") +# params.permit(:c) +# # => ActionController::UnpermittedParameters: found unpermitted keys: a, b +# +# Please note that these options *are not thread-safe*. In a multi-threaded +# environment they should only be set once at boot-time and never mutated at +# runtime. +# +# You can fetch values of `ActionController::Parameters` using either `:key` or +# `"key"`. +# +# params = ActionController::Parameters.new(key: "value") +# params[:key] # => "value" +# params["key"] # => "value" +# +# pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:147 +class ActionController::Parameters + include ::ActiveSupport::DeepMergeable + + # Returns a new `ActionController::Parameters` instance. Also, sets the + # `permitted` attribute to the default value of + # `ActionController::Parameters.permit_all_parameters`. + # + # class Person < ActiveRecord::Base + # end + # + # params = ActionController::Parameters.new(name: "Francesco") + # params.permitted? # => false + # Person.new(params) # => ActiveModel::ForbiddenAttributesError + # + # ActionController::Parameters.permit_all_parameters = true + # + # params = ActionController::Parameters.new(name: "Francesco") + # params.permitted? # => true + # Person.new(params) # => # + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:288 + def initialize(parameters = T.unsafe(nil), logging_context = T.unsafe(nil)); end + + # Returns true if another `Parameters` object contains the same content and + # permitted flag. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:302 + def ==(other); end + + # Returns a parameter for the given `key`. If not found, returns `nil`. + # + # params = ActionController::Parameters.new(person: { name: "Francesco" }) + # params[:person] # => #"Francesco"} permitted: false> + # params[:none] # => nil + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:670 + def [](key); end + + # Assigns a value to a given `key`. The given key may still get filtered out + # when #permit is called. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:676 + def []=(key, value); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:250 + def always_permitted_parameters; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:250 + def always_permitted_parameters=(val); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:237 + def as_json(*_arg0, **_arg1, &_arg2); end + + # Returns a new `ActionController::Parameters` instance with `nil` values + # removed. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:847 + def compact; end + + # Removes all `nil` values in place and returns `self`, or `nil` if no changes + # were made. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:853 + def compact!; end + + # Returns a new `ActionController::Parameters` instance without the blank + # values. Uses Object#blank? for determining if a value is blank. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:859 + def compact_blank; end + + # Removes all blank values in place and returns self. Uses Object#blank? for + # determining if a value is blank. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:865 + def compact_blank!; end + + # Attribute that keeps track of converted arrays, if any, to avoid double + # looping in the common use case permit + mass-assignment. Defined in a method + # to instantiate it only if needed. + # + # Testing membership still loops, but it's going to be faster than our own loop + # that converts values. Also, we are not going to build a new array object per + # fetch. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:436 + def converted_arrays; end + + # Returns a duplicate `ActionController::Parameters` instance with the same + # permitted parameters. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:965 + def deep_dup; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:900 + def deep_merge?(other_hash); end + + # Returns a new `ActionController::Parameters` instance with the results of + # running `block` once for every key. This includes the keys from the root hash + # and from all nested hashes and arrays. The values are unchanged. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:797 + def deep_transform_keys(&block); end + + # Returns the same `ActionController::Parameters` instance with changed keys. + # This includes the keys from the root hash and from all nested hashes and + # arrays. The values are unchanged. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:806 + def deep_transform_keys!(&block); end + + # Deletes a key-value pair from `Parameters` and returns the value. If `key` is + # not found, returns `nil` (or, with optional code block, yields `key` and + # returns the result). This method is similar to #extract!, which returns the + # corresponding `ActionController::Parameters` object. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:815 + def delete(key, &block); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:843 + def delete_if(&block); end + + # Extracts the nested parameter from the given `keys` by calling `dig` at each + # step. Returns `nil` if any intermediate step is `nil`. + # + # params = ActionController::Parameters.new(foo: { bar: { baz: 1 } }) + # params.dig(:foo, :bar, :baz) # => 1 + # params.dig(:foo, :zot, :xyz) # => nil + # + # params2 = ActionController::Parameters.new(foo: [10, 11, 12]) + # params2.dig(:foo, 1) # => 11 + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:714 + def dig(*keys); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:411 + def each(&block); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:237 + def each_key(*_arg0, **_arg1, &_arg2); end + + # Convert all hashes in values into parameters, then yield each pair in the same + # way as `Hash#each_pair`. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:403 + def each_pair(&block); end + + # Convert all hashes in values into parameters, then yield each value in the + # same way as `Hash#each_value`. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:415 + def each_value(&block); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:237 + def empty?(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:959 + def encode_with(coder); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:310 + def eql?(other); end + + # Returns a new `ActionController::Parameters` instance that filters out the + # given `keys`. + # + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.except(:a, :b) # => #3} permitted: false> + # params.except(:d) # => #1, "b"=>2, "c"=>3} permitted: false> + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:742 + def except(*keys); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:237 + def exclude?(*_arg0, **_arg1, &_arg2); end + + # Removes and returns the key/value pairs matching the given keys. + # + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.extract!(:a, :b) # => #1, "b"=>2} permitted: false> + # params # => #3} permitted: false> + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:752 + def extract!(*keys); end + + # Returns parameter value for the given `key` separated by `delimiter`. + # + # params = ActionController::Parameters.new(id: "1_123", tags: "ruby,rails") + # params.extract_value(:id) # => ["1", "123"] + # params.extract_value(:tags, delimiter: ",") # => ["ruby", "rails"] + # params.extract_value(:non_existent_key) # => nil + # + # Note that if the given `key`'s value contains blank elements, then the + # returned array will include empty strings. + # + # params = ActionController::Parameters.new(tags: "ruby,rails,,web") + # params.extract_value(:tags, delimiter: ",") # => ["ruby", "rails", "", "web"] + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:983 + def extract_value(key, delimiter: T.unsafe(nil)); end + + # Returns a parameter for the given `key`. If the `key` can't be found, there + # are several options: With no other arguments, it will raise an + # ActionController::ParameterMissing error; if a second argument is given, then + # that is returned (converted to an instance of `ActionController::Parameters` + # if possible); if a block is given, then that will be run and its result + # returned. + # + # params = ActionController::Parameters.new(person: { name: "Francesco" }) + # params.fetch(:person) # => #"Francesco"} permitted: false> + # params.fetch(:none) # => ActionController::ParameterMissing: param is missing or the value is empty: none + # params.fetch(:none, {}) # => # + # params.fetch(:none, "Francesco") # => "Francesco" + # params.fetch(:none) { "Francesco" } # => "Francesco" + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:693 + def fetch(key, *args); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:240 + def has_key?(*_arg0, **_arg1, &_arg2); end + + # Returns true if the given value is present for some key in the parameters. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:870 + def has_value?(value); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:316 + def hash; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:237 + def include?(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:941 + def init_with(coder); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:928 + def inspect; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:830 + def keep_if(&block); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:241 + def key?(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:237 + def keys(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:242 + def member?(*_arg0, **_arg1, &_arg2); end + + # Returns a new `ActionController::Parameters` instance with all keys from + # `other_hash` merged into current hash. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:884 + def merge(other_hash); end + + # :call-seq: merge!(other_hash) + # + # Returns the current `ActionController::Parameters` instance with `other_hash` + # merged into current hash. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:895 + def merge!(other_hash, &block); end + + # Returns a new `ActionController::Parameters` instance that includes only the + # given `filters` and sets the `permitted` attribute for the object to `true`. + # This is useful for limiting which attributes should be allowed for mass + # updating. + # + # params = ActionController::Parameters.new(user: { name: "Francesco", age: 22, role: "admin" }) + # permitted = params.require(:user).permit(:name, :age) + # permitted.permitted? # => true + # permitted.has_key?(:name) # => true + # permitted.has_key?(:age) # => true + # permitted.has_key?(:role) # => false + # + # Only permitted scalars pass the filter. For example, given + # + # params.permit(:name) + # + # `:name` passes if it is a key of `params` whose associated value is of type + # `String`, `Symbol`, `NilClass`, `Numeric`, `TrueClass`, `FalseClass`, `Date`, + # `Time`, `DateTime`, `StringIO`, `IO`, ActionDispatch::Http::UploadedFile or + # `Rack::Test::UploadedFile`. Otherwise, the key `:name` is filtered out. + # + # You may declare that the parameter should be an array of permitted scalars by + # mapping it to an empty array: + # + # params = ActionController::Parameters.new(tags: ["rails", "parameters"]) + # params.permit(tags: []) + # + # Sometimes it is not possible or convenient to declare the valid keys of a hash + # parameter or its internal structure. Just map to an empty hash: + # + # params.permit(preferences: {}) + # + # Be careful because this opens the door to arbitrary input. In this case, + # `permit` ensures values in the returned structure are permitted scalars and + # filters out anything else. + # + # You can also use `permit` on nested parameters, like: + # + # params = ActionController::Parameters.new({ + # person: { + # name: "Francesco", + # age: 22, + # pets: [{ + # name: "Purplish", + # category: "dogs" + # }] + # } + # }) + # + # permitted = params.permit(person: [ :name, { pets: :name } ]) + # permitted.permitted? # => true + # permitted[:person][:name] # => "Francesco" + # permitted[:person][:age] # => nil + # permitted[:person][:pets][0][:name] # => "Purplish" + # permitted[:person][:pets][0][:category] # => nil + # + # Note that if you use `permit` in a key that points to a hash, it won't allow + # all the hash. You also need to specify which attributes inside the hash should + # be permitted. + # + # params = ActionController::Parameters.new({ + # person: { + # contact: { + # email: "none@test.com", + # phone: "555-1234" + # } + # } + # }) + # + # params.require(:person).permit(:contact) + # # => # + # + # params.require(:person).permit(contact: :phone) + # # => ##"555-1234"} permitted: true>} permitted: true> + # + # params.require(:person).permit(contact: [ :email, :phone ]) + # # => ##"none@test.com", "phone"=>"555-1234"} permitted: true>} permitted: true> + # + # If your parameters specify multiple parameters indexed by a number, you can + # permit each set of parameters under the numeric key to be the same using the + # same syntax as permitting a single item. + # + # params = ActionController::Parameters.new({ + # person: { + # '0': { + # email: "none@test.com", + # phone: "555-1234" + # }, + # '1': { + # email: "nothing@test.com", + # phone: "555-6789" + # }, + # } + # }) + # params.permit(person: [:email]).to_h + # # => {"person"=>{"0"=>{"email"=>"none@test.com"}, "1"=>{"email"=>"nothing@test.com"}}} + # + # If you want to specify what keys you want from each numeric key, you can + # instead specify each one individually + # + # params = ActionController::Parameters.new({ + # person: { + # '0': { + # email: "none@test.com", + # phone: "555-1234" + # }, + # '1': { + # email: "nothing@test.com", + # phone: "555-6789" + # }, + # } + # }) + # params.permit(person: { '0': [:email], '1': [:phone]}).to_h + # # => {"person"=>{"0"=>{"email"=>"none@test.com"}, "1"=>{"phone"=>"555-6789"}}} + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:648 + def permit(*filters); end + + # Sets the `permitted` attribute to `true`. This can be used to pass mass + # assignment. Returns `self`. + # + # class Person < ActiveRecord::Base + # end + # + # params = ActionController::Parameters.new(name: "Francesco") + # params.permitted? # => false + # Person.new(params) # => ActiveModel::ForbiddenAttributesError + # params.permit! + # params.permitted? # => true + # Person.new(params) # => # + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:462 + def permit!; end + + # Returns `true` if the parameter is permitted, `false` otherwise. + # + # params = ActionController::Parameters.new + # params.permitted? # => false + # params.permit! + # params.permitted? # => true + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:446 + def permitted?; end + + # Returns a new `ActionController::Parameters` instance with items that the + # block evaluates to true removed. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:834 + def reject(&block); end + + # Removes items that the block evaluates to true and returns self. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:839 + def reject!(&block); end + + # This method accepts both a single key and an array of keys. + # + # When passed a single key, if it exists and its associated value is either + # present or the singleton `false`, returns said value: + # + # ActionController::Parameters.new(person: { name: "Francesco" }).require(:person) + # # => #"Francesco"} permitted: false> + # + # Otherwise raises ActionController::ParameterMissing: + # + # ActionController::Parameters.new.require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty: person + # + # ActionController::Parameters.new(person: nil).require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty: person + # + # ActionController::Parameters.new(person: "\t").require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty: person + # + # ActionController::Parameters.new(person: {}).require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty: person + # + # When given an array of keys, the method tries to require each one of them in + # order. If it succeeds, an array with the respective return values is returned: + # + # params = ActionController::Parameters.new(user: { ... }, profile: { ... }) + # user_params, profile_params = params.require([:user, :profile]) + # + # Otherwise, the method re-raises the first exception found: + # + # params = ActionController::Parameters.new(user: {}, profile: {}) + # user_params, profile_params = params.require([:user, :profile]) + # # ActionController::ParameterMissing: param is missing or the value is empty: user + # + # Technically this method can be used to fetch terminal values: + # + # # CAREFUL + # params = ActionController::Parameters.new(person: { name: "Finn" }) + # name = params.require(:person).require(:name) # CAREFUL + # + # but take into account that at some point those ones have to be permitted: + # + # def person_params + # params.require(:person).permit(:name).tap do |person_params| + # person_params.require(:name) # SAFER + # end + # end + # + # for example. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:522 + def require(key); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:532 + def required(key); end + + # Returns a new `ActionController::Parameters` instance with all keys from + # current hash merged into `other_hash`. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:906 + def reverse_merge(other_hash); end + + # Returns the current `ActionController::Parameters` instance with current hash + # merged into `other_hash`. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:915 + def reverse_merge!(other_hash); end + + # Returns a new `ActionController::Parameters` instance with only items that the + # block evaluates to true. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:821 + def select(&block); end + + # Equivalent to Hash#keep_if, but returns `nil` if no changes were made. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:826 + def select!(&block); end + + # Returns a new `ActionController::Parameters` instance that includes only the + # given `keys`. If the given `keys` don't exist, returns an empty hash. + # + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.slice(:a, :b) # => #1, "b"=>2} permitted: false> + # params.slice(:d) # => # + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:725 + def slice(*keys); end + + # Returns the current `ActionController::Parameters` instance which contains + # only the given `keys`. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:731 + def slice!(*keys); end + + # This is required by ActiveModel attribute assignment, so that user can pass + # `Parameters` to a mass assignment methods in a model. It should not matter as + # we are using `HashWithIndifferentAccess` internally. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:924 + def stringify_keys; end + + # Returns a safe ActiveSupport::HashWithIndifferentAccess representation of the + # parameters with all unpermitted keys removed. + # + # params = ActionController::Parameters.new({ + # name: "Senjougahara Hitagi", + # oddity: "Heavy stone crab" + # }) + # params.to_h + # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash + # + # safe_params = params.permit(:name) + # safe_params.to_h # => {"name"=>"Senjougahara Hitagi"} + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:332 + def to_h(&block); end + + # Returns a safe `Hash` representation of the parameters with all unpermitted + # keys removed. + # + # params = ActionController::Parameters.new({ + # name: "Senjougahara Hitagi", + # oddity: "Heavy stone crab" + # }) + # params.to_hash + # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash + # + # safe_params = params.permit(:name) + # safe_params.to_hash # => {"name"=>"Senjougahara Hitagi"} + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:352 + def to_hash; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:385 + def to_param(*args); end + + # Returns a string representation of the receiver suitable for use as a URL + # query string: + # + # params = ActionController::Parameters.new({ + # name: "David", + # nationality: "Danish" + # }) + # params.to_query + # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash + # + # safe_params = params.permit(:name, :nationality) + # safe_params.to_query + # # => "name=David&nationality=Danish" + # + # An optional namespace can be passed to enclose key names: + # + # params = ActionController::Parameters.new({ + # name: "David", + # nationality: "Danish" + # }) + # safe_params = params.permit(:name, :nationality) + # safe_params.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. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:382 + def to_query(*args); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:237 + def to_s(*_arg0, **_arg1, &_arg2); end + + # Returns an unsafe, unfiltered ActiveSupport::HashWithIndifferentAccess + # representation of the parameters. + # + # params = ActionController::Parameters.new({ + # name: "Senjougahara Hitagi", + # oddity: "Heavy stone crab" + # }) + # params.to_unsafe_h + # # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"} + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:396 + def to_unsafe_h; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:399 + def to_unsafe_hash; end + + # Returns a new `ActionController::Parameters` instance with the results of + # running `block` once for every key. The values are unchanged. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:779 + def transform_keys(&block); end + + # Performs keys transformation and returns the altered + # `ActionController::Parameters` instance. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:788 + def transform_keys!(&block); end + + # Returns a new `ActionController::Parameters` instance with the results of + # running `block` once for every value. The keys are unchanged. + # + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.transform_values { |x| x * 2 } + # # => #2, "b"=>4, "c"=>6} permitted: false> + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:762 + def transform_values; end + + # Performs values transformation and returns the altered + # `ActionController::Parameters` instance. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:771 + def transform_values!; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:874 + def value?(value); end + + # Returns a new array of the values of the parameters. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:425 + def values; end + + # Returns values that were assigned to the given `keys`. Note that all the + # `Hash` objects will be converted to `ActionController::Parameters`. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:878 + def values_at(*keys); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:911 + def with_defaults(other_hash); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:919 + def with_defaults!(other_hash); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:745 + def without(*keys); end + + protected + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:996 + def each_nested_attribute; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:992 + def nested_attributes?; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:988 + def parameters; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:990 + def permitted=(_arg0); end + + private + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1045 + def _deep_transform_keys_in_object(object, &block); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1064 + def _deep_transform_keys_in_object!(object, &block); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1174 + def array_of_permitted_scalars?(value); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1025 + def convert_hashes_to_parameters(key, value); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1009 + def convert_parameters_to_hashes(value, using, &block); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1031 + def convert_value_to_parameters(value); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1091 + def each_element(object, filter, &block); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1186 + def hash_filter(params, filter); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1247 + def initialize_copy(source); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1003 + def new_instance_with_inherited_permitted_status(hash); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1180 + def non_scalar?(value); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1230 + def permit_any_in_array(array); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1213 + def permit_any_in_parameters(params); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1145 + def permitted_scalar?(value); end + + # Adds existing keys to the params if their values are scalar. + # + # For example: + # + # puts self.keys #=> ["zipcode(90210i)"] + # params = {} + # + # permitted_scalar_filter(params, "zipcode") + # + # puts params.keys # => ["zipcode"] + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1159 + def permitted_scalar_filter(params, permitted_key); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1085 + def specify_numeric_keys?(filter); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1117 + def unpermitted_keys(params); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1104 + def unpermitted_parameters!(params); end + + class << self + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:152 + def action_on_unpermitted_parameters; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:152 + def action_on_unpermitted_parameters=(val); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:253 + def allow_deprecated_parameters_hash_equality; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:260 + def allow_deprecated_parameters_hash_equality=(value); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:250 + def always_permitted_parameters; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:250 + def always_permitted_parameters=(val); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:932 + def hook_into_yaml_loading; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:267 + def nested_attribute?(key, value); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:150 + def permit_all_parameters; end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:150 + def permit_all_parameters=(val); end + end +end + +# pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1184 +ActionController::Parameters::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1185 +ActionController::Parameters::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# This is a list of permitted scalar types that includes the ones supported in +# XML and JSON requests. +# +# This list is in particular used to filter ordinary requests, String goes as +# first element to quickly short-circuit the common case. +# +# If you modify this collection please update the one in the #permit doc as +# well. +# +# pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1129 +ActionController::Parameters::PERMITTED_SCALAR_TYPES = T.let(T.unsafe(nil), Array) + +# # Action Controller Params Wrapper +# +# Wraps the parameters hash into a nested hash. This will allow clients to +# submit requests without having to specify any root elements. +# +# This functionality is enabled by default for JSON, and can be customized by +# setting the format array: +# +# class ApplicationController < ActionController::Base +# wrap_parameters format: [:json, :xml] +# end +# +# You could also turn it on per controller: +# +# class UsersController < ApplicationController +# wrap_parameters format: [:json, :xml, :url_encoded_form, :multipart_form] +# end +# +# If you enable `ParamsWrapper` for `:json` format, instead of having to send +# JSON parameters like this: +# +# {"user": {"name": "Konata"}} +# +# You can send parameters like this: +# +# {"name": "Konata"} +# +# And it will be wrapped into a nested hash with the key name matching the +# controller's name. For example, if you're posting to `UsersController`, your +# new `params` hash will look like this: +# +# {"name" => "Konata", "user" => {"name" => "Konata"}} +# +# You can also specify the key in which the parameters should be wrapped to, and +# also the list of attributes it should wrap by using either `:include` or +# `:exclude` options like this: +# +# class UsersController < ApplicationController +# wrap_parameters :person, include: [:username, :password] +# end +# +# On Active Record models with no `:include` or `:exclude` option set, it will +# only wrap the parameters returned by the class method `attribute_names`. +# +# If you're going to pass the parameters to an `ActiveModel` object (such as +# `User.new(params[:user])`), you might consider passing the model class to the +# method instead. The `ParamsWrapper` will actually try to determine the list of +# attribute names from the model and only wrap those attributes: +# +# class UsersController < ApplicationController +# wrap_parameters Person +# end +# +# You still could pass `:include` and `:exclude` to set the list of attributes +# you want to wrap. +# +# By default, if you don't specify the key in which the parameters would be +# wrapped to, `ParamsWrapper` will actually try to determine if there's a model +# related to it or not. This controller, for example: +# +# class Admin::UsersController < ApplicationController +# end +# +# will try to check if `Admin::User` or `User` model exists, and use it to +# determine the wrapper key respectively. If both models don't exist, it will +# then fall back to use `user` as the key. +# +# To disable this functionality for a controller: +# +# class UsersController < ApplicationController +# wrap_parameters false +# end +# +# pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:83 +module ActionController::ParamsWrapper + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::ParamsWrapper::ClassMethods + + private + + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:277 + def _extract_parameters(parameters); end + + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:299 + def _perform_parameter_wrapping; end + + # Returns the list of parameters which will be selected for wrapped. + # + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:273 + def _wrap_parameters(parameters); end + + # Checks if we should perform parameters wrapping. + # + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:289 + def _wrapper_enabled?; end + + # Returns the list of enabled formats. + # + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:268 + def _wrapper_formats; end + + # Returns the wrapper key which will be used to store wrapped parameters. + # + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:263 + def _wrapper_key; end + + # Performs parameters wrapping upon the request. Called automatically by the + # metal call stack. + # + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:257 + def process_action(*_arg0); end + + module GeneratedClassMethods + def _wrapper_options; end + def _wrapper_options=(value); end + def _wrapper_options?; end + end + + module GeneratedInstanceMethods + def _wrapper_options; end + def _wrapper_options=(value); end + def _wrapper_options?; end + end +end + +# pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:188 +module ActionController::ParamsWrapper::ClassMethods + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:189 + def _set_wrapper_options(options); end + + # Sets the default wrapper key or model which will be used to determine wrapper + # key and attribute names. Called automatically when the module is inherited. + # + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:244 + def inherited(klass); end + + # Sets the name of the wrapper key, or the model which `ParamsWrapper` would use + # to determine the attribute names from. + # + # #### Examples + # wrap_parameters format: :xml + # # enables the parameter wrapper for XML format + # + # wrap_parameters :person + # # wraps parameters into params[:person] hash + # + # wrap_parameters Person + # # wraps parameters by determining the wrapper key from Person class + # # (:person, in this case) and the list of attribute names + # + # wrap_parameters include: [:username, :title] + # # wraps only :username and :title attributes from parameters. + # + # wrap_parameters false + # # disables parameters wrapping for this controller altogether. + # + # #### Options + # * `:format` - The list of formats in which the parameters wrapper will be + # enabled. + # * `:include` - The list of attribute names which parameters wrapper will + # wrap into a nested hash. + # * `:exclude` - The list of attribute names which parameters wrapper will + # exclude from a nested hash. + # + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:221 + def wrap_parameters(name_or_model_or_options, options = T.unsafe(nil)); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:86 +ActionController::ParamsWrapper::EXCLUDE_PARAMETERS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:88 +class ActionController::ParamsWrapper::Options < ::Struct + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:97 + def initialize(name, format, include, exclude, klass, model); end + + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:108 + def include; end + + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:104 + def model; end + + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:141 + def name; end + + private + + # Determine the wrapper model from the controller's name. By convention, this + # could be done by trying to find the defined model that has the same singular + # name as the controller. For example, `UsersController` will try to find if the + # `User` model exists. + # + # This method also does namespace lookup. Foo::Bar::UsersController will try to + # find Foo::Bar::User, Foo::User and finally User. + # + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:165 + def _default_wrap_model; end + + class << self + # pkg:gem/actionpack#lib/action_controller/metal/params_wrapper.rb:89 + def from_hash(hash); end + end +end + +# pkg:gem/actionpack#lib/action_controller/metal/permissions_policy.rb:6 +module ActionController::PermissionsPolicy + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::PermissionsPolicy::ClassMethods +end + +# pkg:gem/actionpack#lib/action_controller/metal/permissions_policy.rb:9 +module ActionController::PermissionsPolicy::ClassMethods + # Overrides parts of the globally configured `Feature-Policy` header: + # + # class PagesController < ApplicationController + # permissions_policy do |policy| + # policy.geolocation "https://example.com" + # end + # end + # + # Options can be passed similar to `before_action`. For example, pass `only: + # :index` to override the header on the index action only: + # + # class PagesController < ApplicationController + # permissions_policy(only: :index) do |policy| + # policy.camera :self + # end + # end + # + # pkg:gem/actionpack#lib/action_controller/metal/permissions_policy.rb:27 + def permissions_policy(**options, &block); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/rate_limiting.rb:6 +module ActionController::RateLimiting + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::RateLimiting::ClassMethods + + private + + # pkg:gem/actionpack#lib/action_controller/metal/rate_limiting.rb:53 + def rate_limiting(to:, within:, by:, with:, store:); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/rate_limiting.rb:9 +module ActionController::RateLimiting::ClassMethods + # Applies a rate limit to all actions or those specified by the normal + # `before_action` filters with `only:` and `except:`. + # + # The maximum number of requests allowed is specified `to:` and constrained to + # the window of time given by `within:`. + # + # Rate limits are by default unique to the ip address making the request, but + # you can provide your own identity function by passing a callable in the `by:` + # parameter. It's evaluated within the context of the controller processing the + # request. + # + # Requests that exceed the rate limit are refused with a `429 Too Many Requests` + # response. You can specialize this by passing a callable in the `with:` + # parameter. It's evaluated within the context of the controller processing the + # request. + # + # Rate limiting relies on a backing `ActiveSupport::Cache` store and defaults to + # `config.action_controller.cache_store`, which itself defaults to the global + # `config.cache_store`. If you don't want to store rate limits in the same + # datastore as your general caches, you can pass a custom store in the `store` + # parameter. + # + # Examples: + # + # class SessionsController < ApplicationController + # rate_limit to: 10, within: 3.minutes, only: :create + # end + # + # class SignupsController < ApplicationController + # rate_limit to: 1000, within: 10.seconds, + # by: -> { request.domain }, with: -> { redirect_to busy_controller_url, alert: "Too many signups on domain!" }, only: :new + # end + # + # class APIController < ApplicationController + # RATE_LIMIT_STORE = ActiveSupport::Cache::RedisCacheStore.new(url: ENV["REDIS_URL"]) + # rate_limit to: 10, within: 3.minutes, store: RATE_LIMIT_STORE + # end + # + # pkg:gem/actionpack#lib/action_controller/metal/rate_limiting.rb:47 + def rate_limit(to:, within:, by: T.unsafe(nil), with: T.unsafe(nil), store: T.unsafe(nil), **options); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:6 +module ActionController::Redirecting + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveSupport::Benchmarkable + include ::AbstractController::Logger + include ::ActionDispatch::Routing::UrlFor + include ::AbstractController::UrlFor + include ::ActionController::UrlFor + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods + + # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:159 + def _compute_redirect_to_location(request, options); end + + # Soft deprecated alias for #redirect_back_or_to where the `fallback_location` + # location is supplied as a keyword argument instead of the first positional + # argument. + # + # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:122 + def redirect_back(fallback_location:, allow_other_host: T.unsafe(nil), **args); end + + # Redirects the browser to the page that issued the request (the referrer) if + # possible, otherwise redirects to the provided default fallback location. + # + # The referrer information is pulled from the HTTP `Referer` (sic) header on the + # request. This is an optional header and its presence on the request is subject + # to browser security settings and user preferences. If the request is missing + # this header, the `fallback_location` will be used. + # + # redirect_back_or_to({ action: "show", id: 5 }) + # redirect_back_or_to @post + # redirect_back_or_to "http://www.rubyonrails.org" + # redirect_back_or_to "/images/screenshot.jpg" + # redirect_back_or_to posts_url + # redirect_back_or_to proc { edit_post_url(@post) } + # redirect_back_or_to '/', allow_other_host: false + # + # #### Options + # * `:allow_other_host` - Allow or disallow redirection to the host that is + # different to the current host, defaults to true. + # + # + # All other options that can be passed to #redirect_to are accepted as options, + # and the behavior is identical. + # + # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:149 + def redirect_back_or_to(fallback_location, allow_other_host: T.unsafe(nil), **options); end + + # Redirects the browser to the target specified in `options`. This parameter can + # be any one of: + # + # * `Hash` - The URL will be generated by calling url_for with the `options`. + # * `Record` - The URL will be generated by calling url_for with the + # `options`, which will reference a named URL for that record. + # * `String` starting with `protocol://` (like `http://`) or a protocol + # relative reference (like `//`) - Is passed straight through as the target + # for redirection. + # * `String` not containing a protocol - The current protocol and host is + # prepended to the string. + # * `Proc` - A block that will be executed in the controller's context. Should + # return any option accepted by `redirect_to`. + # + # + # ### Examples + # + # redirect_to action: "show", id: 5 + # redirect_to @post + # redirect_to "http://www.rubyonrails.org" + # redirect_to "/images/screenshot.jpg" + # redirect_to posts_url + # redirect_to proc { edit_post_url(@post) } + # + # The redirection happens as a `302 Found` header unless otherwise specified + # using the `:status` option: + # + # redirect_to post_url(@post), status: :found + # redirect_to action: 'atom', status: :moved_permanently + # redirect_to post_url(@post), status: 301 + # redirect_to action: 'atom', status: 302 + # + # The status code can either be a standard [HTTP Status + # code](https://www.iana.org/assignments/http-status-codes) as an integer, or a + # symbol representing the downcased, underscored and symbolized description. + # Note that the status code must be a 3xx HTTP code, or redirection will not + # occur. + # + # If you are using XHR requests other than GET or POST and redirecting after the + # request then some browsers will follow the redirect using the original request + # method. This may lead to undesirable behavior such as a double DELETE. To work + # around this you can return a `303 See Other` status code which will be + # followed using a GET request. + # + # redirect_to posts_url, status: :see_other + # redirect_to action: 'index', status: 303 + # + # It is also possible to assign a flash message as part of the redirection. + # There are two special accessors for the commonly used flash names `alert` and + # `notice` as well as a general purpose `flash` bucket. + # + # redirect_to post_url(@post), alert: "Watch it, mister!" + # redirect_to post_url(@post), status: :found, notice: "Pay attention to the road" + # redirect_to post_url(@post), status: 301, flash: { updated_post_id: @post.id } + # redirect_to({ action: 'atom' }, alert: "Something serious happened") + # + # Statements after `redirect_to` in our controller get executed, so + # `redirect_to` doesn't stop the execution of the function. To terminate the + # execution of the function immediately after the `redirect_to`, use return. + # + # redirect_to post_url(@post) and return + # + # ### Open Redirect protection + # + # By default, Rails protects against redirecting to external hosts for your + # app's safety, so called open redirects. Note: this was a new default in Rails + # 7.0, after upgrading opt-in by uncommenting the line with + # `raise_on_open_redirects` in + # `config/initializers/new_framework_defaults_7_0.rb` + # + # Here #redirect_to automatically validates the potentially-unsafe URL: + # + # redirect_to params[:redirect_url] + # + # Raises UnsafeRedirectError in the case of an unsafe redirect. + # + # To allow any external redirects pass `allow_other_host: true`, though using a + # user-provided param in that case is unsafe. + # + # redirect_to "https://rubyonrails.org", allow_other_host: true + # + # See #url_from for more information on what an internal and safe URL is, or how + # to fall back to an alternate redirect URL in the unsafe case. + # + # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:103 + def redirect_to(options = T.unsafe(nil), response_options = T.unsafe(nil)); end + + # Verifies the passed `location` is an internal URL that's safe to redirect to + # and returns it, or nil if not. Useful to wrap a params provided redirect URL + # and fall back to an alternate URL to redirect to: + # + # redirect_to url_from(params[:redirect_url]) || root_url + # + # The `location` is considered internal, and safe, if it's on the same host as + # `request.host`: + # + # # If request.host is example.com: + # url_from("https://example.com/profile") # => "https://example.com/profile" + # url_from("http://example.com/profile") # => "http://example.com/profile" + # url_from("http://evil.com/profile") # => nil + # + # Subdomains are considered part of the host: + # + # # If request.host is on https://example.com or https://app.example.com, you'd get: + # url_from("https://dev.example.com/profile") # => nil + # + # NOTE: there's a similarity with + # [url_for](rdoc-ref:ActionDispatch::Routing::UrlFor#url_for), which generates + # an internal URL from various options from within the app, e.g. + # `url_for(@post)`. However, #url_from is meant to take an external parameter to + # verify as in `url_from(params[:redirect_url])`. + # + # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:203 + def url_from(location); end + + private + + # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:209 + def _allow_other_host; end + + # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:223 + def _enforce_open_redirect_protection(location, allow_other_host:); end + + # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:242 + def _ensure_url_is_http_header_safe(url); end + + # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:213 + def _extract_redirect_to_status(options, response_options); end + + # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:231 + def _url_host_allowed?(url); end + + class << self + # pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:176 + def _compute_redirect_to_location(request, options); end + end + + module GeneratedClassMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end + + module GeneratedInstanceMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end +end + +# pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:14 +ActionController::Redirecting::ILLEGAL_HEADER_VALUE_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_controller/metal/redirecting.rb:12 +class ActionController::Redirecting::UnsafeRedirectError < ::StandardError; end + +# pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:16 +class ActionController::RenderError < ::ActionController::ActionControllerError; end + +# # Action Controller Renderer +# +# ActionController::Renderer allows you to render arbitrary templates without +# being inside a controller action. +# +# You can get a renderer instance by calling `renderer` on a controller class: +# +# ApplicationController.renderer +# PostsController.renderer +# +# and render a template by calling the #render method: +# +# ApplicationController.renderer.render template: "posts/show", assigns: { post: Post.first } +# PostsController.renderer.render :show, assigns: { post: Post.first } +# +# As a shortcut, you can also call `render` directly on the controller class +# itself: +# +# ApplicationController.render template: "posts/show", assigns: { post: Post.first } +# PostsController.render :show, assigns: { post: Post.first } +# +# pkg:gem/actionpack#lib/action_controller/renderer.rb:27 +class ActionController::Renderer + # Initializes a new Renderer. + # + # #### Parameters + # + # * `controller` - The controller class to instantiate for rendering. + # * `env` - The Rack env to use for mocking a request when rendering. Entries + # can be typical Rack env keys and values, or they can be any of the + # following, which will be converted appropriately: + # * `:http_host` - The HTTP host for the incoming request. Converts to + # Rack's `HTTP_HOST`. + # * `:https` - Boolean indicating whether the incoming request uses HTTPS. + # Converts to Rack's `HTTPS`. + # * `:method` - The HTTP method for the incoming request, + # case-insensitive. Converts to Rack's `REQUEST_METHOD`. + # * `:script_name` - The portion of the incoming request's URL path that + # corresponds to the application. Converts to Rack's `SCRIPT_NAME`. + # * `:input` - The input stream. Converts to Rack's `rack.input`. + # * `defaults` - Default values for the Rack env. Entries are specified in the + # same format as `env`. `env` will be merged on top of these values. + # `defaults` will be retained when calling #new on a renderer instance. + # + # + # If no `http_host` is specified, the env HTTP host will be derived from the + # routes' `default_url_options`. In this case, the `https` boolean and the + # `script_name` will also be derived from `default_url_options` if they were not + # specified. Additionally, the `https` boolean will fall back to + # `Rails.application.config.force_ssl` if `default_url_options` does not specify + # a `protocol`. + # + # pkg:gem/actionpack#lib/action_controller/renderer.rb:110 + def initialize(controller, env, defaults); end + + # pkg:gem/actionpack#lib/action_controller/renderer.rb:28 + def controller; end + + # pkg:gem/actionpack#lib/action_controller/renderer.rb:121 + def defaults; end + + # Creates a new renderer using the same controller, but with a new Rack env. + # + # ApplicationController.renderer.new(method: "post") + # + # pkg:gem/actionpack#lib/action_controller/renderer.rb:72 + def new(env = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_controller/renderer.rb:150 + def normalize_env(env, &_arg1); end + + # Renders a template to a string, just like + # ActionController::Rendering#render_to_string. + # + # pkg:gem/actionpack#lib/action_controller/renderer.rb:128 + def render(*args); end + + # pkg:gem/actionpack#lib/action_controller/renderer.rb:137 + def render_to_string(*args); end + + # Creates a new renderer using the same controller, but with the given defaults + # merged on top of the previous defaults. + # + # pkg:gem/actionpack#lib/action_controller/renderer.rb:78 + def with_defaults(defaults); end + + private + + # pkg:gem/actionpack#lib/action_controller/renderer.rb:152 + def env_for_request; end + + class << self + # Creates a new renderer using the given controller class. See ::new. + # + # pkg:gem/actionpack#lib/action_controller/renderer.rb:64 + def for(controller, env = T.unsafe(nil), defaults = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_controller/renderer.rb:35 + def normalize_env(env); end + end +end + +# pkg:gem/actionpack#lib/action_controller/renderer.rb:30 +ActionController::Renderer::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_controller/renderer.rb:148 +ActionController::Renderer::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_controller/renderer.rb:140 +ActionController::Renderer::RACK_KEY_TRANSLATION = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:25 +module ActionController::Renderers + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::Renderers::ClassMethods + + # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:145 + def _render_to_body_with_renderer(options); end + + # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:76 + def _render_with_renderer_js(js, options); end + + # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:76 + def _render_with_renderer_json(json, options); end + + # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:76 + def _render_with_renderer_xml(xml, options); end + + # Called by `render` in AbstractController::Rendering which sets the return + # value as the `response_body`. + # + # If no renderer is found, `super` returns control to + # `ActionView::Rendering.render_to_body`, if present. + # + # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:141 + def render_to_body(options); end + + class << self + # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:91 + def _render_with_renderer_method_name(key); end + + # Adds a new renderer to call within controller actions. A renderer is invoked + # by passing its name as an option to AbstractController::Rendering#render. To + # create a renderer pass it a name and a block. The block takes two arguments, + # the first is the value paired with its key and the second is the remaining + # hash of options passed to `render`. + # + # Create a csv renderer: + # + # ActionController::Renderers.add :csv do |obj, options| + # filename = options[:filename] || 'data' + # str = obj.respond_to?(:to_csv) ? obj.to_csv : obj.to_s + # send_data str, type: Mime[:csv], + # disposition: "attachment; filename=#{filename}.csv" + # end + # + # Note that we used [Mime](:csv) for the csv mime type as it comes with Rails. + # For a custom renderer, you'll need to register a mime type with + # `Mime::Type.register`. + # + # To use the csv renderer in a controller action: + # + # def show + # @csvable = Csvable.find(params[:id]) + # respond_to do |format| + # format.html + # format.csv { render csv: @csvable, filename: @csvable.name } + # end + # end + # + # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:75 + def add(key, &block); end + + # This method is the opposite of add method. + # + # To remove a csv renderer: + # + # ActionController::Renderers.remove(:csv) + # + # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:85 + def remove(key); end + end + + module GeneratedClassMethods + def _renderers; end + def _renderers=(value); end + def _renderers?; end + end + + module GeneratedInstanceMethods + def _renderers; end + def _renderers=(value); end + def _renderers?; end + end +end + +# Used in ActionController::Base and ActionController::API to include all +# renderers by default. +# +# pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:38 +module ActionController::Renderers::All + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActionController::Renderers + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::Renderers::ClassMethods + + module GeneratedClassMethods + def _renderers; end + def _renderers=(value); end + def _renderers?; end + end + + module GeneratedInstanceMethods + def _renderers; end + def _renderers=(value); end + def _renderers?; end + end +end + +# pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:95 +module ActionController::Renderers::ClassMethods + # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:133 + def use_renderer(*args); end + + # Adds, by name, a renderer or renderers to the `_renderers` available to call + # within controller actions. + # + # It is useful when rendering from an ActionController::Metal controller or + # otherwise to add an available renderer proc to a specific controller. + # + # Both ActionController::Base and ActionController::API include + # ActionController::Renderers::All, making all renderers available in the + # controller. See Renderers::RENDERERS and Renderers.add. + # + # Since ActionController::Metal controllers cannot render, the controller must + # include AbstractController::Rendering, ActionController::Rendering, and + # ActionController::Renderers, and have at least one renderer. + # + # Rather than including ActionController::Renderers::All and including all + # renderers, you may specify which renderers to include by passing the renderer + # name or names to `use_renderers`. For example, a controller that includes only + # the `:json` renderer (`_render_with_renderer_json`) might look like: + # + # class MetalRenderingController < ActionController::Metal + # include AbstractController::Rendering + # include ActionController::Rendering + # include ActionController::Renderers + # + # use_renderers :json + # + # def show + # render json: record + # end + # end + # + # You must specify a `use_renderer`, else the `controller.renderer` and + # `controller._renderers` will be `nil`, and the action will fail. + # + # pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:129 + def use_renderers(*args); end +end + +# A Set containing renderer names that correspond to available renderer procs. +# Default values are `:json`, `:js`, `:xml`. +# +# pkg:gem/actionpack#lib/action_controller/metal/renderers.rb:30 +ActionController::Renderers::RENDERERS = T.let(T.unsafe(nil), Set) + +# pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:6 +module ActionController::Rendering + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::Rendering::ClassMethods + + # Renders a template and assigns the result to `self.response_body`. + # + # If no rendering mode option is specified, the template will be derived from + # the first argument. + # + # render "posts/show" + # # => renders app/views/posts/show.html.erb + # + # # In a PostsController action... + # render :show + # # => renders app/views/posts/show.html.erb + # + # If the first argument responds to `render_in`, the template will be rendered + # by calling `render_in` with the current view context. + # + # class Greeting + # def render_in(view_context) + # view_context.render html: "

Hello, World

" + # end + # + # def format + # :html + # end + # end + # + # render(Greeting.new) + # # => "

Hello, World

" + # + # render(renderable: Greeting.new) + # # => "

Hello, World

" + # + # #### Rendering Mode + # + # `:partial` + # + # render partial: "posts/form", locals: { post: Post.new } + # # => renders app/views/posts/_form.html.erb + # + # `:file` + # unsanitized user input. + # + # render file: "/path/to/some/file" + # # => renders /path/to/some/file + # + # `:inline` + # + # @name = "World" + # render inline: "

Hello, <%= @name %>!

" + # # => renders "

Hello, World!

" + # + # `:body` + # + # render body: "Hello, World!" + # # => renders "Hello, World!" + # + # `:plain` + # + # render plain: "Hello, World!" + # # => renders "Hello, World!" + # + # `:html` + # `text/html`. If the string is not `html_safe?`, performs HTML escaping on + # the string before rendering. + # + # render html: "

Hello, World!

".html_safe + # # => renders "

Hello, World!

" + # + # render html: "

Hello, World!

" + # # => renders "<h1>Hello, World!</h1>" + # + # `:json` + # `application/json`. If the object is not a string, it will be converted to + # JSON by calling `to_json`. + # + # render json: { hello: "world" } + # # => renders "{\"hello\":\"world\"}" + # + # `:renderable` + # context. The response format is determined by calling `format` on the + # renderable if it responds to `format`, falling back to `text/html` by + # default. + # + # render renderable: Greeting.new + # # => renders "

Hello, World

" + # + # + # By default, when a rendering mode is specified, no layout template is + # rendered. + # + # #### Options + # + # `:assigns` + # + # render inline: "

Hello, <%= @name %>!

", assigns: { name: "World" } + # # => renders "

Hello, World!

" + # + # `:locals` + # + # render inline: "

Hello, <%= name %>!

", locals: { name: "World" } + # # => renders "

Hello, World!

" + # + # `:layout` + # (re)enable the default layout template. + # + # render "posts/show", layout: "holiday" + # # => renders app/views/posts/show.html.erb with the app/views/layouts/holiday.html.erb layout + # + # render "posts/show", layout: false + # # => renders app/views/posts/show.html.erb with no layout + # + # render inline: "

Hello, World!

", layout: true + # # => renders "

Hello, World!

" with the default layout + # + # `:status` + # number or as the status name in Symbol form. Defaults to 200. + # + # render "posts/new", status: 422 + # # => renders app/views/posts/new.html.erb with HTTP status code 422 + # + # render "posts/new", status: :unprocessable_entity + # # => renders app/views/posts/new.html.erb with HTTP status code 422 + # + # -- + # Check for double render errors and set the content_type after rendering. + # + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:165 + def render(*args); end + + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:185 + def render_to_body(options = T.unsafe(nil)); end + + # Similar to #render, but only returns the rendered template as a string, + # instead of setting `self.response_body`. + # -- + # Override render_to_string because body can now be set to a Rack body. + # + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:174 + def render_to_string(*_arg0); end + + private + + # Normalize both text and status options. + # + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:227 + def _normalize_options(options); end + + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:241 + def _normalize_text(options); end + + # Process controller specific options, as status, content-type and location. + # + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:250 + def _process_options(options); end + + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:196 + def _process_variant(options); end + + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:202 + def _render_in_priorities(options); end + + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:210 + def _set_html_content_type; end + + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:214 + def _set_rendered_content_type(format); end + + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:220 + def _set_vary_header; end + + # Before processing, set the request formats in current controller formats. + # + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:191 + def process_action(*_arg0); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:11 +module ActionController::Rendering::ClassMethods + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:23 + def inherited(klass); end + + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:13 + def render(*_arg0, **_arg1, &_arg2); end + + # Returns a renderer instance (inherited from ActionController::Renderer) for + # the controller. + # + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:17 + def renderer; end + + # pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:19 + def setup_renderer!; end +end + +# pkg:gem/actionpack#lib/action_controller/metal/rendering.rb:9 +ActionController::Rendering::RENDER_FORMATS_IN_PRIORITY = T.let(T.unsafe(nil), Array) + +# # Action Controller Request Forgery Protection +# +# Controller actions are protected from Cross-Site Request Forgery (CSRF) +# attacks by including a token in the rendered HTML for your application. This +# token is stored as a random string in the session, to which an attacker does +# not have access. When a request reaches your application, Rails verifies the +# received token with the token in the session. All requests are checked except +# GET requests as these should be idempotent. Keep in mind that all +# session-oriented requests are CSRF protected by default, including JavaScript +# and HTML requests. +# +# Since HTML and JavaScript requests are typically made from the browser, we +# need to ensure to verify request authenticity for the web browser. We can use +# session-oriented authentication for these types of requests, by using the +# `protect_from_forgery` method in our controllers. +# +# GET requests are not protected since they don't have side effects like writing +# to the database and don't leak sensitive information. JavaScript requests are +# an exception: a third-party site can use a +# +# The first two characters (`">`) are required in case the exception happens +# while rendering attributes for a given tag. You can check the real cause for +# the exception in your logger. +# +# ## Web server support +# +# Not all web servers support streaming out-of-the-box. You need to check the +# instructions for each of them. +# +# #### Unicorn +# +# Unicorn supports streaming but it needs to be configured. For this, you need +# to create a config file as follow: +# +# # unicorn.config.rb +# listen 3000, tcp_nopush: false +# +# And use it on initialization: +# +# unicorn_rails --config-file unicorn.config.rb +# +# You may also want to configure other parameters like `:tcp_nodelay`. +# +# For more information, please check the +# [documentation](https://bogomips.org/unicorn/Unicorn/Configurator.html#method- +# i-listen). +# +# If you are using Unicorn with NGINX, you may need to tweak NGINX. Streaming +# should work out of the box on Rainbows. +# +# #### Passenger +# +# Phusion Passenger with NGINX, offers two streaming mechanisms out of the box. +# +# 1. NGINX response buffering mechanism which is dependent on the value of +# `passenger_buffer_response` option (default is "off"). +# 2. Passenger buffering system which is always 'on' irrespective of the value +# of `passenger_buffer_response`. +# +# +# When `passenger_buffer_response` is turned "on", then streaming would be done +# at the NGINX level which waits until the application is done sending the +# response back to the client. +# +# For more information, please check the [documentation] +# (https://www.phusionpassenger.com/docs/references/config_reference/nginx/#passenger_buffer_response). +# +# pkg:gem/actionpack#lib/action_controller/metal/streaming.rb:208 +module ActionController::Streaming + private + + # Set proper cache control and transfer encoding when streaming + # + # pkg:gem/actionpack#lib/action_controller/metal/streaming.rb:240 + def _process_options(options); end + + # Call render_body if we are streaming instead of usual `render`. + # + # pkg:gem/actionpack#lib/action_controller/metal/streaming.rb:254 + def _render_template(options); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/streaming.rb:209 +class ActionController::Streaming::Body + # Store the response body to be chunked. + # + # pkg:gem/actionpack#lib/action_controller/metal/streaming.rb:214 + def initialize(body); end + + # Close the response body if the response body supports it. + # + # pkg:gem/actionpack#lib/action_controller/metal/streaming.rb:233 + def close; end + + # For each element yielded by the response body, yield the element in chunked + # encoding. + # + # pkg:gem/actionpack#lib/action_controller/metal/streaming.rb:220 + def each(&block); end +end + +# pkg:gem/actionpack#lib/action_controller/metal/streaming.rb:211 +ActionController::Streaming::Body::TAIL = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_controller/metal/streaming.rb:210 +ActionController::Streaming::Body::TERM = T.let(T.unsafe(nil), String) + +# # Strong Parameters +# +# It provides an interface for protecting attributes from end-user assignment. +# This makes Action Controller parameters forbidden to be used in Active Model +# mass assignment until they have been explicitly enumerated. +# +# In addition, parameters can be marked as required and flow through a +# predefined raise/rescue flow to end up as a `400 Bad Request` with no effort. +# +# class PeopleController < ActionController::Base +# # Using "Person.create(params[:person])" would raise an +# # ActiveModel::ForbiddenAttributesError exception because it'd +# # be using mass assignment without an explicit permit step. +# # This is the recommended form: +# def create +# Person.create(person_params) +# end +# +# # This will pass with flying colors as long as there's a person key in the +# # parameters, otherwise it'll raise an ActionController::ParameterMissing +# # exception, which will get caught by ActionController::Base and turned +# # into a 400 Bad Request reply. +# def update +# redirect_to current_account.people.find(params[:id]).tap { |person| +# person.update!(person_params) +# } +# end +# +# private +# # Using a private method to encapsulate the permissible parameters is +# # a good pattern since you'll be able to reuse the same permit +# # list between create and update. Also, you can specialize this method +# # with per-user checking of permissible attributes. +# def person_params +# params.require(:person).permit(:name, :age) +# end +# end +# +# In order to use `accepts_nested_attributes_for` with Strong Parameters, you +# will need to specify which nested attributes should be permitted. You might +# want to allow `:id` and `:_destroy`, see ActiveRecord::NestedAttributes for +# more information. +# +# class Person +# has_many :pets +# accepts_nested_attributes_for :pets +# end +# +# class PeopleController < ActionController::Base +# def create +# Person.create(person_params) +# end +# +# ... +# +# private +# +# def person_params +# # It's mandatory to specify the nested attributes that should be permitted. +# # If you use `permit` with just the key that points to the nested attributes hash, +# # it will return an empty hash. +# params.require(:person).permit(:name, :age, pets_attributes: [ :id, :name, :category ]) +# end +# end +# +# See ActionController::Parameters.require and +# ActionController::Parameters.permit for more information. +# +# pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1320 +module ActionController::StrongParameters + # Returns a new ActionController::Parameters object that has been instantiated + # with the `request.parameters`. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1323 + def params; end + + # Assigns the given `value` to the `params` hash. If `value` is a Hash, this + # will create an ActionController::Parameters object that has been instantiated + # with the given `value` hash. + # + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:1338 + def params=(value); end +end + +# pkg:gem/actionpack#lib/action_controller/template_assertions.rb:6 +module ActionController::TemplateAssertions + # pkg:gem/actionpack#lib/action_controller/template_assertions.rb:7 + def assert_template(options = T.unsafe(nil), message = T.unsafe(nil)); end +end + +# # Action Controller Test Case +# +# Superclass for ActionController functional tests. Functional tests allow you +# to test a single controller action per test method. +# +# ## Use integration style controller tests over functional style controller tests. +# +# Rails discourages the use of functional tests in favor of integration tests +# (use ActionDispatch::IntegrationTest). +# +# New Rails applications no longer generate functional style controller tests +# and they should only be used for backward compatibility. Integration style +# controller tests perform actual requests, whereas functional style controller +# tests merely simulate a request. Besides, integration tests are as fast as +# functional tests and provide lot of helpers such as `as`, `parsed_body` for +# effective testing of controller actions including even API endpoints. +# +# ## Basic example +# +# Functional tests are written as follows: +# 1. First, one uses the `get`, `post`, `patch`, `put`, `delete`, or `head` +# method to simulate an HTTP request. +# 2. Then, one asserts whether the current state is as expected. "State" can be +# anything: the controller's HTTP response, the database contents, etc. +# +# +# For example: +# +# class BooksControllerTest < ActionController::TestCase +# def test_create +# # Simulate a POST response with the given HTTP parameters. +# post(:create, params: { book: { title: "Love Hina" }}) +# +# # Asserts that the controller tried to redirect us to +# # the created book's URI. +# assert_response :found +# +# # Asserts that the controller really put the book in the database. +# assert_not_nil Book.find_by(title: "Love Hina") +# end +# end +# +# You can also send a real document in the simulated HTTP request. +# +# def test_create +# json = {book: { title: "Love Hina" }}.to_json +# post :create, body: json +# end +# +# ## Special instance variables +# +# ActionController::TestCase will also automatically provide the following +# instance variables for use in the tests: +# +# @controller +# +# @request +# You can modify this object before sending the HTTP request. For example, +# you might want to set some session properties before sending a GET +# request. +# +# @response +# last HTTP response. In the above example, `@response` becomes valid after +# calling `post`. If the various assert methods are not sufficient, then you +# may use this object to inspect the HTTP response in detail. +# +# +# ## Controller is automatically inferred +# +# ActionController::TestCase will automatically infer the controller under test +# from the test class name. If the controller cannot be inferred from the test +# class name, you can explicitly set it with `tests`. +# +# class SpecialEdgeCaseWidgetsControllerTest < ActionController::TestCase +# tests WidgetController +# end +# +# ## Testing controller internals +# +# In addition to these specific assertions, you also have easy access to various +# collections that the regular test/unit assertions can be used against. These +# collections are: +# +# * session: Objects being saved in the session. +# * flash: The flash objects currently in the session. +# * cookies: Cookies being sent to the user on this request. +# +# +# These collections can be used just like any other hash: +# +# assert_equal "Dave", cookies[:name] # makes sure that a cookie called :name was set as "Dave" +# assert flash.empty? # makes sure that there's nothing in the flash +# +# On top of the collections, you have the complete URL that a given action +# redirected to available in `redirect_to_url`. +# +# For redirects within the same controller, you can even call follow_redirect +# and the redirect will be followed, triggering another action call which can +# then be asserted against. +# +# ## Manipulating session and cookie variables +# +# Sometimes you need to set up the session and cookie variables for a test. To +# do this just assign a value to the session or cookie collection: +# +# session[:key] = "value" +# cookies[:key] = "value" +# +# To clear the cookies for a test just clear the cookie collection: +# +# cookies.clear +# +# ## Testing named routes +# +# If you're using named routes, they can be easily tested using the original +# named routes' methods straight in the test case. +# +# assert_redirected_to page_url(title: 'foo') +# +# pkg:gem/actionpack#lib/action_controller/test_case.rb:358 +class ActionController::TestCase < ::ActiveSupport::TestCase + include ::ActiveSupport::Testing::ConstantLookup + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + include ::ActionDispatch::Assertions::ResponseAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionController::TestCase::Behavior + include ::ActionController::TemplateAssertions + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions + extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods + extend ::ActionController::TestCase::Behavior::ClassMethods + extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:589 + def _controller_class; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:589 + def _controller_class=(_arg0); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:589 + def _controller_class?; end + + class << self + # pkg:gem/actionpack#lib/action_controller/test_case.rb:590 + def __callbacks; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:589 + def _controller_class; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:589 + def _controller_class=(value); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:589 + def _controller_class?; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:359 + def executor_around_each_request; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:359 + def executor_around_each_request=(_arg0); end + end +end + +# pkg:gem/actionpack#lib/action_controller/test_case.rb:361 +module ActionController::TestCase::Behavior + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveSupport::Testing::ConstantLookup + include ::ActionController::TemplateAssertions + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods + mixes_in_class_methods ::ActionController::TestCase::Behavior::ClassMethods + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:582 + def build_response(klass); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:542 + def controller_class_name; end + + # Simulate a DELETE request with the given parameters and set/volley the + # response. See `get` for more details. + # + # pkg:gem/actionpack#lib/action_controller/test_case.rb:453 + def delete(action, **args); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:546 + def generated_path(generated_extras); end + + # Simulate a GET request with the given parameters. + # + # * `action`: The controller action to call. + # * `params`: The hash with HTTP parameters that you want to pass. This may be + # `nil`. + # * `body`: The request body with a string that is appropriately encoded + # (`application/x-www-form-urlencoded` or `multipart/form-data`). + # * `session`: A hash of parameters to store in the session. This may be + # `nil`. + # * `flash`: A hash of parameters to store in the flash. This may be `nil`. + # + # + # You can also simulate POST, PATCH, PUT, DELETE, and HEAD requests with `post`, + # `patch`, `put`, `delete`, and `head`. Example sending parameters, session, and + # setting a flash message: + # + # get :show, + # params: { id: 7 }, + # session: { user_id: 1 }, + # flash: { notice: 'This is flash message' } + # + # Note that the request method is not verified. The different methods are + # available to make the tests more expressive. + # + # pkg:gem/actionpack#lib/action_controller/test_case.rb:429 + def get(action, **args); end + + # Simulate a HEAD request with the given parameters and set/volley the response. + # See `get` for more details. + # + # pkg:gem/actionpack#lib/action_controller/test_case.rb:459 + def head(action, **args); end + + # Simulate a PATCH request with the given parameters and set/volley the + # response. See `get` for more details. + # + # pkg:gem/actionpack#lib/action_controller/test_case.rb:441 + def patch(action, **args); end + + # Simulate a POST request with the given parameters and set/volley the response. + # See `get` for more details. + # + # pkg:gem/actionpack#lib/action_controller/test_case.rb:435 + def post(action, **args); end + + # Simulate an HTTP request to `action` by specifying request method, parameters + # and set/volley the response. + # + # * `action`: The controller action to call. + # * `method`: Request method used to send the HTTP request. Possible values + # are `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, `HEAD`. Defaults to `GET`. + # Can be a symbol. + # * `params`: The hash with HTTP parameters that you want to pass. This may be + # `nil`. + # * `body`: The request body with a string that is appropriately encoded + # (`application/x-www-form-urlencoded` or `multipart/form-data`). + # * `session`: A hash of parameters to store in the session. This may be + # `nil`. + # * `flash`: A hash of parameters to store in the flash. This may be `nil`. + # * `format`: Request format. Defaults to `nil`. Can be string or symbol. + # * `as`: Content type. Defaults to `nil`. Must be a symbol that corresponds + # to a mime type. + # + # + # Example calling `create` action and sending two params: + # + # process :create, + # method: 'POST', + # params: { + # user: { name: 'Gaurish Sharma', email: 'user@example.com' } + # }, + # session: { user_id: 1 }, + # flash: { notice: 'This is flash message' } + # + # To simulate `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, and `HEAD` requests + # prefer using #get, #post, #patch, #put, #delete and #head methods respectively + # which will make tests more expressive. + # + # It's not recommended to make more than one request in the same test. Instance + # variables that are set in one request will not persist to the next request, + # but it's not guaranteed that all Rails internal state will be reset. Prefer + # ActionDispatch::IntegrationTest for making multiple requests in the same test. + # + # Note that the request method is not verified. + # + # pkg:gem/actionpack#lib/action_controller/test_case.rb:502 + def process(action, method: T.unsafe(nil), params: T.unsafe(nil), session: T.unsafe(nil), body: T.unsafe(nil), flash: T.unsafe(nil), format: T.unsafe(nil), xhr: T.unsafe(nil), as: T.unsafe(nil)); end + + # Simulate a PUT request with the given parameters and set/volley the response. + # See `get` for more details. + # + # pkg:gem/actionpack#lib/action_controller/test_case.rb:447 + def put(action, **args); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:550 + def query_parameter_names(generated_extras); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:367 + def request; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:367 + def response; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:554 + def setup_controller_request_and_response; end + + private + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:675 + def check_required_ivars; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:671 + def document_root_element; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:625 + def process_controller_response(action, cookies, xhr); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:661 + def scrub_env!(env); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:595 + def setup_request(controller_class_name, action, parameters, session, flash, xhr); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:617 + def wrap_execution(&block); end + + module GeneratedClassMethods + def _controller_class; end + def _controller_class=(value); end + def _controller_class?; end + end + + module GeneratedInstanceMethods + def _controller_class; end + def _controller_class=(value); end + def _controller_class?; end + end +end + +# pkg:gem/actionpack#lib/action_controller/test_case.rb:369 +module ActionController::TestCase::Behavior::ClassMethods + # pkg:gem/actionpack#lib/action_controller/test_case.rb:391 + def controller_class; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:387 + def controller_class=(new_class); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:399 + def determine_default_controller_class(name); end + + # Sets the controller class name. Useful if the name can't be inferred from test + # class. Normalizes `controller_class` before using. + # + # tests WidgetController + # tests :widget + # tests 'widget' + # + # pkg:gem/actionpack#lib/action_controller/test_case.rb:376 + def tests(controller_class); end +end + +# ActionController::TestCase will be deprecated and moved to a gem in the +# future. Please use ActionDispatch::IntegrationTest going forward. +# +# pkg:gem/actionpack#lib/action_controller/test_case.rb:36 +class ActionController::TestRequest < ::ActionDispatch::TestRequest + # pkg:gem/actionpack#lib/action_controller/test_case.rb:59 + def initialize(env, session, controller_class); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:78 + def assign_parameters(routes, controller_path, action, parameters, generated_path, query_string_keys); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:74 + def content_type=(type); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:44 + def controller_class; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:70 + def query_string=(string); end + + private + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:169 + def params_parsers; end + + class << self + # Create a new test request with default `env` values. + # + # pkg:gem/actionpack#lib/action_controller/test_case.rb:47 + def create(controller_class); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:40 + def new_session; end + + private + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:54 + def default_env; end + end +end + +# pkg:gem/actionpack#lib/action_controller/test_case.rb:37 +ActionController::TestRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_controller/test_case.rb:141 +ActionController::TestRequest::ENCODER = T.let(T.unsafe(nil), T.untyped) + +# Methods #destroy and #load! are overridden to avoid calling methods on the +# @store object, which does not exist for the TestSession class. +# +# pkg:gem/actionpack#lib/action_controller/test_case.rb:187 +class ActionController::TestSession < ::Rack::Session::Abstract::PersistedSecure::SecureSessionHash + # pkg:gem/actionpack#lib/action_controller/test_case.rb:190 + def initialize(session = T.unsafe(nil), id = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:210 + def destroy; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:214 + def dig(*keys); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:223 + def enabled?; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:198 + def exists?; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:219 + def fetch(key, *args, &block); end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:227 + def id_was; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:202 + def keys; end + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:206 + def values; end + + private + + # pkg:gem/actionpack#lib/action_controller/test_case.rb:232 + def load!; end +end + +# pkg:gem/actionpack#lib/action_controller/test_case.rb:188 +ActionController::TestSession::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_controller/metal/testing.rb:6 +module ActionController::Testing; end + +# Behavior specific to functional tests +# +# pkg:gem/actionpack#lib/action_controller/metal/testing.rb:8 +module ActionController::Testing::Functional + # pkg:gem/actionpack#lib/action_controller/metal/testing.rb:9 + def clear_instance_variables_between_requests; end + + # pkg:gem/actionpack#lib/action_controller/metal/testing.rb:18 + def recycle!; end +end + +# Raised when a Parameters instance is not marked as permitted and an operation +# to transform it to hash is called. +# +# params = ActionController::Parameters.new(a: "123", b: "456") +# params.to_h +# # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash +# +# pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:64 +class ActionController::UnfilteredParameters < ::ArgumentError + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:65 + def initialize; end +end + +# pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:75 +class ActionController::UnknownFormat < ::ActionController::ActionControllerError; end + +# pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:72 +class ActionController::UnknownHttpMethod < ::ActionController::ActionControllerError; end + +# Raised when a supplied parameter is not expected and +# ActionController::Parameters.action_on_unpermitted_parameters is set to +# `:raise`. +# +# params = ActionController::Parameters.new(a: "123", b: "456") +# params.permit(:c) +# # => ActionController::UnpermittedParameters: found unpermitted parameters: :a, :b +# +# pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:49 +class ActionController::UnpermittedParameters < ::IndexError + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:52 + def initialize(params); end + + # pkg:gem/actionpack#lib/action_controller/metal/strong_parameters.rb:50 + def params; end +end + +# # Action Controller UrlFor +# +# Includes `url_for` into the host class. The class has to provide a `RouteSet` +# by implementing the `_routes` method. Otherwise, an exception will be raised. +# +# In addition to AbstractController::UrlFor, this module accesses the HTTP layer +# to define URL options like the `host`. In order to do so, this module requires +# the host class to implement `env` which needs to be Rack-compatible, and +# `request` which returns an ActionDispatch::Request instance. +# +# class RootUrl +# include ActionController::UrlFor +# include Rails.application.routes.url_helpers +# +# delegate :env, :request, to: :controller +# +# def initialize(controller) +# @controller = controller +# @url = root_path # named route from the application. +# end +# end +# +# pkg:gem/actionpack#lib/action_controller/metal/url_for.rb:27 +module ActionController::UrlFor + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActionDispatch::Routing::UrlFor + include ::AbstractController::UrlFor + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods + + # pkg:gem/actionpack#lib/action_controller/metal/url_for.rb:32 + def initialize(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_controller/metal/url_for.rb:37 + def url_options; end + + module GeneratedClassMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end + + module GeneratedInstanceMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end +end + +# pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:27 +class ActionController::UrlGenerationError < ::ActionController::ActionControllerError + include ::DidYouMean::Correctable + + # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:30 + def initialize(message, routes = T.unsafe(nil), route_name = T.unsafe(nil), method_name = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:41 + def corrections; end + + # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:28 + def method_name; end + + # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:28 + def route_name; end + + # pkg:gem/actionpack#lib/action_controller/metal/exceptions.rb:28 + def routes; end +end + +# # Action Dispatch +# +# Action Dispatch is a module of Action Pack. +# +# Action Dispatch parses information about the web request, handles routing as +# defined by the user, and does advanced processing related to HTTP such as +# MIME-type negotiation, decoding parameters in POST, PATCH, or PUT bodies, +# handling HTTP caching logic, cookies and sessions. +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# +# pkg:gem/actionpack#lib/action_dispatch/deprecator.rb:5 +module ActionDispatch + extend ::ActiveSupport::Autoload + + # pkg:gem/actionpack#lib/action_dispatch.rb:139 + def eager_load!; end + + # pkg:gem/actionpack#lib/action_dispatch.rb:125 + def test_app; end + + # pkg:gem/actionpack#lib/action_dispatch.rb:125 + def test_app=(val); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/deprecator.rb:6 + def deprecator; end + + # pkg:gem/actionpack#lib/action_dispatch.rb:125 + def test_app; end + + # pkg:gem/actionpack#lib/action_dispatch.rb:125 + def test_app=(val); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/actionable_exceptions.rb:9 +class ActionDispatch::ActionableExceptions + # pkg:gem/actionpack#lib/action_dispatch/middleware/actionable_exceptions.rb:12 + def initialize(app); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/actionable_exceptions.rb:16 + def call(env); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/actionable_exceptions.rb:10 + def endpoint; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/actionable_exceptions.rb:10 + def endpoint=(val); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/actionable_exceptions.rb:26 + def actionable_request?(request); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/actionable_exceptions.rb:30 + def redirect_to(location); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/middleware/actionable_exceptions.rb:10 + def endpoint; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/actionable_exceptions.rb:10 + def endpoint=(val); end + end +end + +# This is a class that abstracts away an asserted response. It purposely does +# not inherit from Response because it doesn't need it. That means it does not +# have headers or a body. +# +# pkg:gem/actionpack#lib/action_dispatch/testing/assertion_response.rb:9 +class ActionDispatch::AssertionResponse + # Accepts a specific response status code as an Integer (404) or String ('404') + # or a response status range as a Symbol pseudo-code (:success, indicating any + # 200-299 status code). + # + # pkg:gem/actionpack#lib/action_dispatch/testing/assertion_response.rb:22 + def initialize(code_or_name); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertion_response.rb:10 + def code; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertion_response.rb:35 + def code_and_name; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertion_response.rb:10 + def name; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertion_response.rb:40 + def code_from_name(name); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertion_response.rb:44 + def name_from_code(code); end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/assertion_response.rb:12 +ActionDispatch::AssertionResponse::GENERIC_RESPONSE_CODES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_dispatch/testing/assertions/response.rb:6 +module ActionDispatch::Assertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + extend ::ActiveSupport::Concern + include ::ActionDispatch::Assertions::RoutingAssertions + + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions.rb:17 + def html_document; end +end + +# A small suite of assertions that test responses from Rails applications. +# +# pkg:gem/actionpack#lib/action_dispatch/testing/assertions/response.rb:8 +module ActionDispatch::Assertions::ResponseAssertions + # Asserts that the response is a redirect to a URL matching the given options. + # + # # Asserts that the redirection was to the "index" action on the WeblogController + # assert_redirected_to controller: "weblog", action: "index" + # + # # Asserts that the redirection was to the named route login_url + # assert_redirected_to login_url + # + # # Asserts that the redirection was to the URL for @customer + # assert_redirected_to @customer + # + # # Asserts that the redirection matches the regular expression + # assert_redirected_to %r(\Ahttp://example.org) + # + # # Asserts that the redirection has the HTTP status code 301 (Moved + # # Permanently). + # assert_redirected_to "/some/path", status: :moved_permanently + # + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/response.rb:60 + def assert_redirected_to(url_options = T.unsafe(nil), options = T.unsafe(nil), message = T.unsafe(nil)); end + + # Asserts that the response is one of the following types: + # + # * `:success` - Status code was in the 200-299 range + # * `:redirect` - Status code was in the 300-399 range + # * `:missing` - Status code was 404 + # * `:error` - Status code was in the 500-599 range + # + # + # You can also pass an explicit status number like `assert_response(501)` or its + # symbolic equivalent `assert_response(:not_implemented)`. See + # `Rack::Utils::SYMBOL_TO_STATUS_CODE` for a full list. + # + # # Asserts that the response was a redirection + # assert_response :redirect + # + # # Asserts that the response code was status code 401 (unauthorized) + # assert_response 401 + # + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/response.rb:33 + def assert_response(type, message = T.unsafe(nil)); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/response.rb:105 + def code_with_name(code_or_name); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/response.rb:89 + def generate_response_message(expected, actual = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/response.rb:99 + def location_if_redirected; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/response.rb:80 + def normalize_argument_to_redirection(fragment); end + + # Proxy to to_param if the object will respond to it. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/response.rb:76 + def parameterize(value); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/response.rb:94 + def response_body_if_short; end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/assertions/response.rb:9 +ActionDispatch::Assertions::ResponseAssertions::RESPONSE_PREDICATES = T.let(T.unsafe(nil), Hash) + +# Suite of assertions to test routes generated by Rails and the handling of +# requests made to them. +# +# pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:14 +module ActionDispatch::Assertions::RoutingAssertions + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + + # Asserts that the provided options can be used to generate the provided path. + # This is the inverse of `assert_recognizes`. The `extras` parameter is used to + # tell the request the names and values of additional request parameters that + # would be in a query string. The `message` parameter allows you to specify a + # custom error message for assertion failures. + # + # The `defaults` parameter is unused. + # + # # Asserts that the default action is generated for a route with no action + # assert_generates "/items", controller: "items", action: "index" + # + # # Tests that the list action is properly routed + # assert_generates "/items/list", controller: "items", action: "list" + # + # # Tests the generation of a route with a parameter + # assert_generates "/items/list/1", { controller: "items", action: "list", id: "1" } + # + # # Asserts that the generated route gives us our custom route + # assert_generates "changesets/12", { controller: 'scm', action: 'show_diff', revision: "12" } + # + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:204 + def assert_generates(expected_path, options, defaults = T.unsafe(nil), extras = T.unsafe(nil), message = T.unsafe(nil)); end + + # Asserts that the routing of the given `path` was handled correctly and that + # the parsed options (given in the `expected_options` hash) match `path`. + # Basically, it asserts that Rails recognizes the route given by + # `expected_options`. + # + # Pass a hash in the second argument (`path`) to specify the request method. + # This is useful for routes requiring a specific HTTP method. The hash should + # contain a `:path` with the incoming request path and a `:method` containing + # the required HTTP verb. + # + # # Asserts that POSTing to /items will call the create action on ItemsController + # assert_recognizes({controller: 'items', action: 'create'}, {path: 'items', method: :post}) + # + # You can also pass in `extras` with a hash containing URL parameters that would + # normally be in the query string. This can be used to assert that values in the + # query string will end up in the params hash correctly. To test query strings + # you must use the extras argument because appending the query string on the + # path directly will not work. For example: + # + # # Asserts that a path of '/items/list/1?view=print' returns the correct options + # assert_recognizes({controller: 'items', action: 'list', id: '1', view: 'print'}, 'items/list/1', { view: "print" }) + # + # The `message` parameter allows you to pass in an error message that is + # displayed upon failure. + # + # # Check the default route (i.e., the index action) + # assert_recognizes({controller: 'items', action: 'index'}, 'items') + # + # # Test a specific action + # assert_recognizes({controller: 'items', action: 'list'}, 'items/list') + # + # # Test an action with a parameter + # assert_recognizes({controller: 'items', action: 'destroy', id: '1'}, 'items/destroy/1') + # + # # Test a custom route + # assert_recognizes({controller: 'items', action: 'show', id: '1'}, 'view/item1') + # + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:164 + def assert_recognizes(expected_options, path, extras = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Asserts that path and options match both ways; in other words, it verifies + # that `path` generates `options` and then that `options` generates `path`. This + # essentially combines `assert_recognizes` and `assert_generates` into one step. + # + # The `extras` hash allows you to specify options that would normally be + # provided as a query string to the action. The `message` parameter allows you + # to specify a custom error message to display upon failure. + # + # # Asserts a basic route: a controller with the default action (index) + # assert_routing '/home', controller: 'home', action: 'index' + # + # # Test a route generated with a specific controller, action, and parameter (id) + # assert_routing '/entries/show/23', controller: 'entries', action: 'show', id: 23 + # + # # Asserts a basic route (controller + default action), with an error message if it fails + # assert_routing '/store', { controller: 'store', action: 'index' }, {}, {}, 'Route for store index not generated properly' + # + # # Tests a route, providing a defaults hash + # assert_routing 'controller/action/9', {id: "9", item: "square"}, {controller: "controller", action: "action"}, {}, {item: "square"} + # + # # Tests a route with an HTTP method + # assert_routing({ method: 'put', path: '/product/321' }, { controller: "product", action: "update", id: "321" }) + # + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:248 + def assert_routing(path, options, defaults = T.unsafe(nil), extras = T.unsafe(nil), message = T.unsafe(nil)); end + + # ROUTES TODO: These assertions should really work in an integration context + # + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:261 + def method_missing(selector, *_arg1, **_arg2, &_arg3); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:103 + def setup; end + + # A helper to make it easier to test different route configurations. This method + # temporarily replaces @routes with a new RouteSet instance. + # + # The new instance is yielded to the passed block. Typically the block will + # create some routes using `set.draw { match ... }`: + # + # with_routing do |set| + # set.draw do + # resources :users + # end + # assert_equal "/users", users_path + # end + # + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:121 + def with_routing(&block); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:270 + def create_routes; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:336 + def fail_on(exception_class, message); end + + # Recognizes the route for a given path. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:302 + def recognized_request_for(path, extras = T.unsafe(nil), msg); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:294 + def reset_routes(old_routes, old_controller); end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:76 +module ActionDispatch::Assertions::RoutingAssertions::ClassMethods + # A helper to make it easier to test different route configurations. This method + # temporarily replaces @routes with a new RouteSet instance before each test. + # + # The new instance is yielded to the passed block. Typically the block will + # create some routes using `set.draw { match ... }`: + # + # with_routing do |set| + # set.draw do + # resources :users + # end + # end + # + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:89 + def with_routing(&block); end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:17 +module ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:37 + def with_routing(&block); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:46 + def create_routes; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:66 + def reset_routes(old_routes, old_integration_session); end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:20 +module ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods + # pkg:gem/actionpack#lib/action_dispatch/testing/assertions/routing.rb:21 + def with_routing(&block); end +end + +# # Action Dispatch AssumeSSL +# +# When proxying through a load balancer that terminates SSL, the forwarded +# request will appear as though it's HTTP instead of HTTPS to the application. +# This makes redirects and cookie security target HTTP instead of HTTPS. This +# middleware makes the server assume that the proxy already terminated SSL, and +# that the request really is HTTPS. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/assume_ssl.rb:13 +class ActionDispatch::AssumeSSL + # pkg:gem/actionpack#lib/action_dispatch/middleware/assume_ssl.rb:14 + def initialize(app); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/assume_ssl.rb:18 + def call(env); end +end + +# # Action Dispatch Callbacks +# +# Provides callbacks to be executed before and after dispatching the request. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:9 +class ActionDispatch::Callbacks + include ::ActiveSupport::Callbacks + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActiveSupport::DescendantsTracker + + # pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:24 + def initialize(app); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:10 + def __callbacks; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:10 + def __callbacks?; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:12 + def _call_callbacks; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:12 + def _run_call_callbacks(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:28 + def call(env); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:10 + def __callbacks; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:10 + def __callbacks=(value); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:10 + def __callbacks?; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:12 + def _call_callbacks; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:12 + def _call_callbacks=(value); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:19 + def after(*args, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/callbacks.rb:15 + def before(*args, &block); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/constants.rb:8 +module ActionDispatch::Constants; end + +# pkg:gem/actionpack#lib/action_dispatch/constants.rb:23 +ActionDispatch::Constants::CONTENT_ENCODING = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/constants.rb:24 +ActionDispatch::Constants::CONTENT_SECURITY_POLICY = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/constants.rb:25 +ActionDispatch::Constants::CONTENT_SECURITY_POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/constants.rb:27 +ActionDispatch::Constants::FEATURE_POLICY = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/constants.rb:26 +ActionDispatch::Constants::LOCATION = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/constants.rb:30 +ActionDispatch::Constants::SERVER_TIMING = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/constants.rb:31 +ActionDispatch::Constants::STRICT_TRANSPORT_SECURITY = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/constants.rb:37 +ActionDispatch::Constants::UNPROCESSABLE_CONTENT = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/actionpack#lib/action_dispatch/constants.rb:22 +ActionDispatch::Constants::VARY = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/constants.rb:29 +ActionDispatch::Constants::X_CASCADE = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/constants.rb:28 +ActionDispatch::Constants::X_REQUEST_ID = T.let(T.unsafe(nil), String) + +# # Action Dispatch Content Security Policy +# +# Configures the HTTP [Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) +# response header to help protect against XSS and +# injection attacks. +# +# Example global policy: +# +# Rails.application.config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https +# +# # Specify URI for violation reports +# policy.report_uri "/csp-violation-report-endpoint" +# end +# +# pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:28 +class ActionDispatch::ContentSecurityPolicy + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:179 + def initialize; end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def base_uri(*sources); end + + # Specify whether to prevent the user agent from loading any assets over HTTP + # when the page uses HTTPS: + # + # policy.block_all_mixed_content + # + # Pass `false` to allow it again: + # + # policy.block_all_mixed_content false + # + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:207 + def block_all_mixed_content(enabled = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:296 + def build(context = T.unsafe(nil), nonce = T.unsafe(nil), nonce_directives = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def child_src(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def connect_src(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def default_src(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:177 + def directives; end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def font_src(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def form_action(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def frame_ancestors(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def frame_src(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def img_src(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def manifest_src(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def media_src(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def object_src(*sources); end + + # Restricts the set of plugins that can be embedded: + # + # policy.plugin_types "application/x-shockwave-flash" + # + # Leave empty to allow all plugins: + # + # policy.plugin_types + # + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:223 + def plugin_types(*types); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def prefetch_src(*sources); end + + # Enable the [report-uri](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-uri) + # directive. Violation reports will be sent to the + # specified URI: + # + # policy.report_uri "/csp-violation-report-endpoint" + # + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:237 + def report_uri(uri); end + + # Specify asset types for which [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) is required: + # + # policy.require_sri_for :script, :style + # + # Leave empty to not require Subresource Integrity: + # + # policy.require_sri_for + # + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:249 + def require_sri_for(*types); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def require_trusted_types_for(*sources); end + + # Specify whether a [sandbox](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/sandbox) + # should be enabled for the requested resource: + # + # policy.sandbox + # + # Values can be passed as arguments: + # + # policy.sandbox "allow-scripts", "allow-modals" + # + # Pass `false` to disable the sandbox: + # + # policy.sandbox false + # + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:270 + def sandbox(*values); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def script_src(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def script_src_attr(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def script_src_elem(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def style_src(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def style_src_attr(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def style_src_elem(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def trusted_types(*sources); end + + # Specify whether user agents should treat any assets over HTTP as HTTPS: + # + # policy.upgrade_insecure_requests + # + # Pass `false` to disable it: + # + # policy.upgrade_insecure_requests false + # + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:288 + def upgrade_insecure_requests(enabled = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:189 + def worker_src(*sources); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:315 + def apply_mapping(source); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:302 + def apply_mappings(sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:349 + def build_directive(directive, sources, context); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:321 + def build_directives(context, nonce, nonce_directives); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:184 + def initialize_copy(other); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:373 + def nonce_directive?(directive, nonce_directives); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:355 + def resolve_source(source, context); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:337 + def validate(directive, sources); end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:173 +ActionDispatch::ContentSecurityPolicy::DEFAULT_NONCE_DIRECTIVES = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:148 +ActionDispatch::ContentSecurityPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:29 +class ActionDispatch::ContentSecurityPolicy::InvalidDirectiveError < ::StandardError; end + +# pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:128 +ActionDispatch::ContentSecurityPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:32 +class ActionDispatch::ContentSecurityPolicy::Middleware + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:33 + def initialize(app); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:37 + def call(env); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:59 + def header_name(request); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:67 + def policy_present?(headers); end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:73 +module ActionDispatch::ContentSecurityPolicy::Request + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:80 + def content_security_policy; end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:84 + def content_security_policy=(policy); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:112 + def content_security_policy_nonce; end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:104 + def content_security_policy_nonce_directives; end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:108 + def content_security_policy_nonce_directives=(generator); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:96 + def content_security_policy_nonce_generator; end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:100 + def content_security_policy_nonce_generator=(generator); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:88 + def content_security_policy_report_only; end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:92 + def content_security_policy_report_only=(value); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:123 + def generate_content_security_policy_nonce; end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:77 +ActionDispatch::ContentSecurityPolicy::Request::NONCE = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:78 +ActionDispatch::ContentSecurityPolicy::Request::NONCE_DIRECTIVES = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:76 +ActionDispatch::ContentSecurityPolicy::Request::NONCE_GENERATOR = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:74 +ActionDispatch::ContentSecurityPolicy::Request::POLICY = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/content_security_policy.rb:75 +ActionDispatch::ContentSecurityPolicy::Request::POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) + +# Read and write data to cookies through ActionController::Cookies#cookies. +# +# When reading cookie data, the data is read from the HTTP request header, +# Cookie. When writing cookie data, the data is sent out in the HTTP response +# header, `Set-Cookie`. +# +# Examples of writing: +# +# # Sets a simple session cookie. +# # This cookie will be deleted when the user's browser is closed. +# cookies[:user_name] = "david" +# +# # Cookie values are String-based. Other data types need to be serialized. +# cookies[:lat_lon] = JSON.generate([47.68, -122.37]) +# +# # Sets a cookie that expires in 1 hour. +# cookies[:login] = { value: "XJ-122", expires: 1.hour } +# +# # Sets a cookie that expires at a specific time. +# cookies[:login] = { value: "XJ-122", expires: Time.utc(2020, 10, 15, 5) } +# +# # Sets a signed cookie, which prevents users from tampering with its value. +# # It can be read using the signed method `cookies.signed[:name]` +# cookies.signed[:user_id] = current_user.id +# +# # Sets an encrypted cookie value before sending it to the client which +# # prevent users from reading and tampering with its value. +# # It can be read using the encrypted method `cookies.encrypted[:name]` +# cookies.encrypted[:discount] = 45 +# +# # Sets a "permanent" cookie (which expires in 20 years from now). +# cookies.permanent[:login] = "XJ-122" +# +# # You can also chain these methods: +# cookies.signed.permanent[:login] = "XJ-122" +# +# Examples of reading: +# +# cookies[:user_name] # => "david" +# cookies.size # => 2 +# JSON.parse(cookies[:lat_lon]) # => [47.68, -122.37] +# cookies.signed[:login] # => "XJ-122" +# cookies.encrypted[:discount] # => 45 +# +# Example for deleting: +# +# cookies.delete :user_name +# +# Please note that if you specify a `:domain` when setting a cookie, you must +# also specify the domain when deleting the cookie: +# +# cookies[:name] = { +# value: 'a yummy cookie', +# expires: 1.year, +# domain: 'domain.com' +# } +# +# cookies.delete(:name, domain: 'domain.com') +# +# The option symbols for setting cookies are: +# +# * `:value` - The cookie's value. +# * `:path` - The path for which this cookie applies. Defaults to the root of +# the application. +# * `:domain` - The domain for which this cookie applies so you can restrict +# to the domain level. If you use a schema like www.example.com and want to +# share session with user.example.com set `:domain` to `:all`. To support +# multiple domains, provide an array, and the first domain matching +# `request.host` will be used. Make sure to specify the `:domain` option +# with `:all` or `Array` again when deleting cookies. For more flexibility +# you can set the domain on a per-request basis by specifying `:domain` with +# a proc. +# +# domain: nil # Does not set cookie domain. (default) +# domain: :all # Allow the cookie for the top most level +# # domain and subdomains. +# domain: %w(.example.com .example.org) # Allow the cookie +# # for concrete domain names. +# domain: proc { Tenant.current.cookie_domain } # Set cookie domain dynamically +# domain: proc { |req| ".sub.#{req.host}" } # Set cookie domain dynamically based on request +# +# * `:tld_length` - When using `:domain => :all`, this option can be used to +# explicitly set the TLD length when using a short (<= 3 character) domain +# that is being interpreted as part of a TLD. For example, to share cookies +# between user1.lvh.me and user2.lvh.me, set `:tld_length` to 2. +# * `:expires` - The time at which this cookie expires, as a Time or +# ActiveSupport::Duration object. +# * `:secure` - Whether this cookie is only transmitted to HTTPS servers. +# Default is `false`. +# * `:httponly` - Whether this cookie is accessible via scripting or only +# HTTP. Defaults to `false`. +# * `:same_site` - The value of the `SameSite` cookie attribute, which +# determines how this cookie should be restricted in cross-site contexts. +# Possible values are `nil`, `:none`, `:lax`, and `:strict`. Defaults to +# `:lax`. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:193 +class ActionDispatch::Cookies + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:698 + def initialize(app); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:702 + def call(env); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:199 +ActionDispatch::Cookies::AUTHENTICATED_ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:504 +class ActionDispatch::Cookies::AbstractCookieJar + include ::ActionDispatch::Cookies::ChainedCookieJars + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:507 + def initialize(parent_jar); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:511 + def [](name); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:523 + def []=(name, options); end + + protected + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:535 + def request; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:553 + def commit(name, options); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:546 + def cookie_metadata(name, options); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:538 + def expiry_options(options); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:552 + def parse(name, data, purpose: T.unsafe(nil)); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:205 +ActionDispatch::Cookies::COOKIES_DIGEST = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:206 +ActionDispatch::Cookies::COOKIES_ROTATIONS = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:207 +ActionDispatch::Cookies::COOKIES_SAME_SITE_PROTECTION = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:204 +ActionDispatch::Cookies::COOKIES_SERIALIZER = T.let(T.unsafe(nil), String) + +# Include in a cookie jar to allow chaining, e.g. `cookies.permanent.signed`. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:217 +module ActionDispatch::Cookies::ChainedCookieJars + # Returns a jar that'll automatically encrypt cookie values before sending them + # to the client and will decrypt them for read. If the cookie was tampered with + # by the user (or a 3rd party), `nil` will be returned. + # + # If `config.action_dispatch.encrypted_cookie_salt` and + # `config.action_dispatch.encrypted_signed_cookie_salt` are both set, legacy + # cookies encrypted with HMAC AES-256-CBC will be transparently upgraded. + # + # This jar requires that you set a suitable secret for the verification on your + # app's `secret_key_base`. + # + # Example: + # + # cookies.encrypted[:discount] = 45 + # # => Set-Cookie: discount=DIQ7fw==--K3n//8vvnSbGq9dA--7Xh91HfLpwzbj1czhBiwOg==; path=/ + # + # cookies.encrypted[:discount] # => 45 + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:272 + def encrypted; end + + # Returns a jar that'll automatically set the assigned cookies to have an + # expiration date 20 years from now. Example: + # + # cookies.permanent[:prefers_open_id] = true + # # => Set-Cookie: prefers_open_id=true; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT + # + # This jar is only meant for writing. You'll read permanent cookies through the + # regular accessor. + # + # This jar allows chaining with the signed jar as well, so you can set + # permanent, signed cookies. Examples: + # + # cookies.permanent.signed[:remember_me] = current_user.id + # # => Set-Cookie: remember_me=BAhU--848956038e692d7046deab32b7131856ab20e14e; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:232 + def permanent; end + + # Returns a jar that'll automatically generate a signed representation of cookie + # value and verify it when reading from the cookie again. This is useful for + # creating cookies with values that the user is not supposed to change. If a + # signed cookie was tampered with by the user (or a 3rd party), `nil` will be + # returned. + # + # This jar requires that you set a suitable secret for the verification on your + # app's `secret_key_base`. + # + # Example: + # + # cookies.signed[:discount] = 45 + # # => Set-Cookie: discount=BAhpMg==--2c1c6906c90a3bc4fd54a51ffb41dffa4bf6b5f7; path=/ + # + # cookies.signed[:discount] # => 45 + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:251 + def signed; end + + # Returns the `signed` or `encrypted` jar, preferring `encrypted` if + # `secret_key_base` is set. Used by ActionDispatch::Session::CookieStore to + # avoid the need to introduce new cookie stores. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:279 + def signed_or_encrypted; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:302 + def encrypted_cookie_cipher; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:296 + def prepare_upgrade_legacy_hmac_aes_cbc_cookies?; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:306 + def signed_cookie_digest; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:289 + def upgrade_legacy_hmac_aes_cbc_cookies?; end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:311 +class ActionDispatch::Cookies::CookieJar + include ::ActionDispatch::Cookies::ChainedCookieJars + include ::Enumerable + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:322 + def initialize(request); end + + # Returns the value of the cookie by `name`, or `nil` if no such cookie exists. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:343 + def [](name); end + + # Sets the cookie named `name`. The second argument may be the cookie's value or + # a hash of options as documented above. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:377 + def []=(name, options); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:439 + def always_write_cookie; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:439 + def always_write_cookie=(val); end + + # Removes all cookies on the client machine by calling `delete` for each cookie. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:423 + def clear(options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:332 + def commit!; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:330 + def committed?; end + + # Removes the cookie on the client machine by setting the value to an empty + # string and the expiration date in the past. Like `[]=`, you can pass in an + # options hash to delete cookies with extra data such as a `:path`. + # + # Returns the value of the cookie, or `nil` if the cookie does not exist. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:402 + def delete(name, options = T.unsafe(nil)); end + + # Whether the given cookie is to be deleted by this CookieJar. Like `[]=`, you + # can pass in an options hash to test if a deletion applies to a specific + # `:path`, `:domain` etc. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:416 + def deleted?(name, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:338 + def each(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:347 + def fetch(name, *args, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:354 + def has_key?(name); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:351 + def key?(name); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:320 + def request; end + + # Returns the cookies as Hash. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:357 + def to_hash(*_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:371 + def to_header; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:359 + def update(other_hash); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:364 + def update_cookies_from_jar; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:427 + def write(response); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:442 + def escape(string); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:450 + def handle_options(options); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:446 + def write_cookie?(cookie); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:439 + def always_write_cookie; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:439 + def always_write_cookie=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:314 + def build(req, cookies); end + end +end + +# Raised when storing more than 4K of session data. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:214 +class ActionDispatch::Cookies::CookieOverflow < ::StandardError; end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:201 +ActionDispatch::Cookies::ENCRYPTED_COOKIE_CIPHER = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:197 +ActionDispatch::Cookies::ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:198 +ActionDispatch::Cookies::ENCRYPTED_SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:646 +class ActionDispatch::Cookies::EncryptedKeyRotatingCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar + include ::ActionDispatch::Cookies::SerializedCookieJars + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:649 + def initialize(parent_jar); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:691 + def commit(name, options); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:683 + def parse(name, encrypted_message, purpose: T.unsafe(nil)); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:195 +ActionDispatch::Cookies::GENERATOR_KEY = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:194 +ActionDispatch::Cookies::HTTP_HEADER = T.let(T.unsafe(nil), String) + +# Cookies can typically store 4096 bytes. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:211 +ActionDispatch::Cookies::MAX_COOKIE_SIZE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:556 +class ActionDispatch::Cookies::PermanentCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:558 + def commit(name, options); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:203 +ActionDispatch::Cookies::SECRET_KEY_BASE = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:202 +ActionDispatch::Cookies::SIGNED_COOKIE_DIGEST = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:196 +ActionDispatch::Cookies::SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:563 +module ActionDispatch::Cookies::SerializedCookieJars + protected + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:567 + def digest; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:610 + def check_for_overflow!(name, options); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:606 + def commit(name, options); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:592 + def parse(name, dumped, force_reserialize: T.unsafe(nil), **_arg3); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:586 + def reserialize?(dumped); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:572 + def serializer; end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:564 +ActionDispatch::Cookies::SerializedCookieJars::SERIALIZER = ActiveSupport::MessageEncryptor::NullSerializer + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:617 +class ActionDispatch::Cookies::SignedKeyRotatingCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar + include ::ActionDispatch::Cookies::SerializedCookieJars + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:620 + def initialize(parent_jar); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:639 + def commit(name, options); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:633 + def parse(name, signed_message, purpose: T.unsafe(nil)); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:200 +ActionDispatch::Cookies::USE_AUTHENTICATED_COOKIE_ENCRYPTION = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:208 +ActionDispatch::Cookies::USE_COOKIES_WITH_METADATA = T.let(T.unsafe(nil), String) + +# # Action Dispatch DebugExceptions +# +# This middleware is responsible for logging exceptions and showing a debugging +# page in case the request is local. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:15 +class ActionDispatch::DebugExceptions + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:23 + def initialize(app, routes_app = T.unsafe(nil), response_format = T.unsafe(nil), interceptors = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:30 + def call(env); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:187 + def api_request?(content_type); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:118 + def create_template(request, wrapper); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:50 + def invoke_interceptors(request, exception, wrapper); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:161 + def log_array(logger, lines, request); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:137 + def log_error(request, wrapper); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:191 + def log_rescued_responses?(request); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:173 + def logger(request); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:133 + def render(status, body, format); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:58 + def render_exception(request, exception, wrapper); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:94 + def render_for_api_request(content_type, wrapper); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:80 + def render_for_browser_request(request, wrapper); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:181 + def routes_inspector(exception); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:177 + def stderr_logger; end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:16 + def interceptors; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_exceptions.rb:18 + def register_interceptor(object = T.unsafe(nil), &block); end + end +end + +# # Action Dispatch DebugLocks +# +# This middleware can be used to diagnose deadlocks in the autoload interlock. +# +# To use it, insert it near the top of the middleware stack, using +# `config/application.rb`: +# +# config.middleware.insert_before Rack::Sendfile, ActionDispatch::DebugLocks +# +# After restarting the application and re-triggering the deadlock condition, the +# route `/rails/locks` will show a summary of all threads currently known to the +# interlock, which lock level they are holding or awaiting, and their current +# backtrace. +# +# Generally a deadlock will be caused by the interlock conflicting with some +# other external lock or blocking I/O call. These cannot be automatically +# identified, but should be visible in the displayed backtraces. +# +# NOTE: The formatting and content of this middleware's output is intended for +# human consumption, and should be expected to change between releases. +# +# This middleware exposes operational details of the server, with no access +# control. It should only be enabled when in use, and removed thereafter. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/debug_locks.rb:29 +class ActionDispatch::DebugLocks + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_locks.rb:30 + def initialize(app, path = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_locks.rb:35 + def call(env); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_locks.rb:108 + def blocked_by?(victim, blocker, all_threads); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_locks.rb:49 + def render_details(req); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:11 +class ActionDispatch::DebugView < ::ActionView::Base + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:14 + def initialize(assigns); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:21 + def compiled_method_container; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:49 + def debug_hash(object); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:41 + def debug_headers(headers); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:29 + def debug_params(params); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:25 + def error_highlight_available?; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:67 + def params_valid?; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:63 + def protect_against_forgery?; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:53 + def render(*_arg0); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/debug_view.rb:12 +ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:11 +class ActionDispatch::ExceptionWrapper + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:50 + def initialize(backtrace_cleaner, exception); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:101 + def actions; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:113 + def annotated_source_code; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:135 + def application_trace; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:48 + def backtrace_cleaner; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:89 + def corrections; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:204 + def error_highlight_available?; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:48 + def exception; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:48 + def exception_class_name; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:234 + def exception_id; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:230 + def exception_inspect; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:222 + def exception_name; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:129 + def exception_trace; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:77 + def failures; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:93 + def file_name; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:139 + def framework_trace; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:143 + def full_trace; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:73 + def has_cause?; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:81 + def has_corrections?; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:97 + def line_number; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:226 + def message; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:85 + def original_message; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:194 + def rescue_response?; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:12 + def rescue_responses; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:12 + def rescue_responses=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:121 + def rescue_template; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:30 + def rescue_templates; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:30 + def rescue_templates=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:61 + def routing_error?; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:179 + def show?(request); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:43 + def silent_exceptions; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:43 + def silent_exceptions=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:198 + def source_extracts; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:218 + def source_to_show_id; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:125 + def status_code; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:69 + def sub_template_message; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:65 + def template_error?; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:210 + def trace_to_show; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:147 + def traces; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:105 + def unwrapped_exception; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:48 + def wrapped_causes; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:39 + def wrapper_exceptions; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:39 + def wrapper_exceptions=(val); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:258 + def backtrace; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:260 + def build_backtrace; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:283 + def causes_for(exception); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:293 + def clean_backtrace(*args); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:346 + def extract_file_and_line_number(trace); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:301 + def extract_source(trace); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:330 + def extract_source_fragment_lines(source_lines, line); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:336 + def source_fragment(path, line); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:289 + def wrapped_causes_for(exception, backtrace_cleaner); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:12 + def rescue_responses; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:12 + def rescue_responses=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:30 + def rescue_templates; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:30 + def rescue_templates=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:43 + def silent_exceptions; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:43 + def silent_exceptions=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:175 + def status_code_for_exception(class_name); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:39 + def wrapper_exceptions; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:39 + def wrapper_exceptions=(val); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:239 +class ActionDispatch::ExceptionWrapper::SourceMapLocation + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:240 + def initialize(location, template); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/exception_wrapper.rb:245 + def spot(exc); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/executor.rb:8 +class ActionDispatch::Executor + # pkg:gem/actionpack#lib/action_dispatch/middleware/executor.rb:9 + def initialize(app, executor); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/executor.rb:13 + def call(env); end +end + +# # Action Dispatch FileHandler +# +# This endpoint serves static files from disk using `Rack::Files`. +# +# URL paths are matched with static files according to expected conventions: +# `path`, `path`.html, `path`/index.html. +# +# Precompressed versions of these files are checked first. Brotli (.br) and gzip +# (.gz) files are supported. If `path`.br exists, this endpoint returns that +# +# If no matching file is found, this endpoint responds `404 Not Found`. +# +# Pass the `root` directory to search for matching files, an optional `index: +# "index"` to change the default `path`/index.html, and optional additional +# response headers. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:47 +class ActionDispatch::FileHandler + # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:55 + def initialize(root, index: T.unsafe(nil), headers: T.unsafe(nil), precompressed: T.unsafe(nil), compressible_content_types: T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:69 + def attempt(env); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:65 + def call(env); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:185 + def clean_path(path_info); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:149 + def compressible?(content_type); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:162 + def each_candidate_filepath(path_info); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:153 + def each_precompressed_filepath(filepath); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:144 + def file_readable?(path); end + + # Match a URI path to a static file to be served. + # + # Used by the `Static` class to negotiate a servable file in the `public/` + # directory (see Static#call). + # + # Checks for `path`, `path`.html, and `path`/index.html files, in that order, + # including .br and .gzip compressed extensions. + # + # If a matching file is found, the path and necessary response headers + # (Content-Type, Content-Encoding) are returned. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:104 + def find_file(path_info, accept_encoding:); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:80 + def serve(request, filepath, content_headers); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:112 + def try_files(filepath, content_type, accept_encoding:); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:122 + def try_precompressed_files(filepath, headers, accept_encoding:); end +end + +# `Accept-Encoding` value -> file extension +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:49 +ActionDispatch::FileHandler::PRECOMPRESSED = T.let(T.unsafe(nil), Hash) + +# # Action Dispatch Flash +# +# The flash provides a way to pass temporary primitive-types (String, Array, +# Hash) between actions. Anything you place in the flash will be exposed to the +# very next action and then cleared out. This is a great way of doing notices +# and alerts, such as a create action that sets `flash[:notice] = "Post +# successfully created"` before redirecting to a display action that can then +# expose the flash to its template. Actually, that exposure is automatically +# done. +# +# class PostsController < ActionController::Base +# def create +# # save post +# flash[:notice] = "Post successfully created" +# redirect_to @post +# end +# +# def show +# # doesn't need to assign the flash notice to the template, that's done automatically +# end +# end +# +# Then in `show.html.erb`: +# +# <% if flash[:notice] %> +#
<%= flash[:notice] %>
+# <% end %> +# +# Since the `notice` and `alert` keys are a common idiom, convenience accessors +# are available: +# +# flash.alert = "You must be logged in" +# flash.notice = "Post successfully created" +# +# This example places a string in the flash. And of course, you can put as many +# as you like at a time too. If you want to pass non-primitive types, you will +# have to handle that in your application. Example: To show messages with links, +# you will have to use sanitize helper. +# +# Just remember: They'll be gone by the time the next action has been performed. +# +# See docs on the FlashHash class for more details about the flash. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:50 +class ActionDispatch::Flash + class << self + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:312 + def new(app); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:119 +class ActionDispatch::Flash::FlashHash + include ::Enumerable + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:149 + def initialize(flashes = T.unsafe(nil), discard = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:169 + def [](k); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:163 + def []=(k, v); end + + # Convenience accessor for `flash[:alert]`. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:280 + def alert; end + + # Convenience accessor for `flash[:alert]=`. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:285 + def alert=(message); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:204 + def clear; end + + # Immediately deletes the single flash entry. Use this method when you want + # remove the message within the current action. See also #discard. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:189 + def delete(key); end + + # Marks the entire flash or a single flash entry to be discarded by the end of + # the current action: + # + # flash.discard # discard the entire flash at the end of the current action + # flash.discard(:warning) # discard only the "warning" entry at the end of the current action + # + # Use this method when you want to display the message in the current action but + # not in the next one. See also #delete. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:264 + def discard(k = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:209 + def each(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:200 + def empty?; end + + # Keeps either the entire current flash or a specific flash entry available for + # the next action: + # + # flash.keep # keeps the entire flash + # flash.keep(:notice) # keeps only the "notice" entry, the rest of the flash is discarded + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:250 + def keep(k = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:183 + def key?(name); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:179 + def keys; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:213 + def merge!(h); end + + # Convenience accessor for `flash[:notice]`. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:290 + def notice; end + + # Convenience accessor for `flash[:notice]=`. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:295 + def notice=(message); end + + # Sets a flash that will not be available to the next action, only to the + # current. + # + # flash.now[:message] = "Hello current action" + # + # This method enables you to use the flash as a central messaging system in your + # app. When you need to pass an object to the next action, you use the standard + # flash assign (`[]=`). When you need to pass an object to the current action, + # you use `now`, and your object will vanish when the current action is done. + # + # Entries set via `now` are accessed the same way as standard entries: + # `flash['my-key']`. + # + # Also, brings two convenience accessors: + # + # flash.now.alert = "Beware now!" + # # Equivalent to flash.now[:alert] = "Beware now!" + # + # flash.now.notice = "Good luck now!" + # # Equivalent to flash.now[:notice] = "Good luck now!" + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:241 + def now; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:215 + def replace(h); end + + # Mark for removal entries that were kept, and delete unkept ones. + # + # This method is called automatically by filters, so you generally don't need to + # care about it. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:274 + def sweep; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:196 + def to_hash; end + + # Builds a hash containing the flashes to keep for the next request. If there + # are none to keep, returns `nil`. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:143 + def to_session_value; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:173 + def update(h); end + + protected + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:300 + def now_is_loaded?; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:155 + def initialize_copy(other); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:305 + def stringify_array(array); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:122 + def from_session_value(value); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:90 +class ActionDispatch::Flash::FlashNow + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:93 + def initialize(flash); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:104 + def [](k); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:97 + def []=(k, v); end + + # Convenience accessor for `flash.now[:alert]=`. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:109 + def alert=(message); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:91 + def flash; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:91 + def flash=(_arg0); end + + # Convenience accessor for `flash.now[:notice]=`. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:114 + def notice=(message); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:51 +ActionDispatch::Flash::KEY = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:53 +module ActionDispatch::Flash::RequestMethods + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:71 + def commit_flash; end + + # Access the contents of the flash. Returns a ActionDispatch::Flash::FlashHash. + # + # See ActionDispatch::Flash for example usage. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:57 + def flash; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:63 + def flash=(flash); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:67 + def flash_hash; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/flash.rb:84 + def reset_session; end +end + +# # Action Dispatch HostAuthorization +# +# This middleware guards from DNS rebinding attacks by explicitly permitting the +# hosts a request can be sent to, and is passed the options set in +# `config.host_authorization`. +# +# Requests can opt-out of Host Authorization with `exclude`: +# +# config.host_authorization = { exclude: ->(request) { request.path =~ /healthcheck/ } } +# +# When a request comes to an unauthorized host, the `response_app` application +# will be executed and rendered. If no `response_app` is given, a default one +# will run. The default response app logs blocked host info with level 'error' +# and responds with `403 Forbidden`. The body of the response contains debug +# info if `config.consider_all_requests_local` is set to true, otherwise the +# body is empty. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:22 +class ActionDispatch::HostAuthorization + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:127 + def initialize(app, hosts, exclude: T.unsafe(nil), response_app: T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:135 + def call(env); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:151 + def blocked_hosts(request); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:163 + def excluded?(request); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:167 + def mark_as_authorized(request); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:23 +ActionDispatch::HostAuthorization::ALLOWED_HOSTS_IN_DEVELOPMENT = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:88 +class ActionDispatch::HostAuthorization::DefaultResponseApp + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:91 + def call(env); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:122 + def available_logger(request); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:114 + def log_error(request); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:107 + def response(format, body); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:100 + def response_body(request); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:89 +ActionDispatch::HostAuthorization::DefaultResponseApp::RESPONSE_STATUS = T.let(T.unsafe(nil), Integer) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:26 +ActionDispatch::HostAuthorization::IPV4_HOSTNAME = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:27 +ActionDispatch::HostAuthorization::IPV6_HOSTNAME = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:28 +ActionDispatch::HostAuthorization::IPV6_HOSTNAME_WITH_PORT = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:24 +ActionDispatch::HostAuthorization::PORT_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:35 +class ActionDispatch::HostAuthorization::Permissions + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:36 + def initialize(hosts); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:44 + def allows?(host); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:40 + def empty?; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:83 + def extract_hostname(host); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:61 + def sanitize_hosts(hosts); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:71 + def sanitize_regexp(host); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:75 + def sanitize_string(host); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:25 +ActionDispatch::HostAuthorization::SUBDOMAIN_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/host_authorization.rb:29 +ActionDispatch::HostAuthorization::VALID_IP_HOSTNAME = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch.rb:93 +module ActionDispatch::Http + extend ::ActiveSupport::Autoload +end + +# pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:7 +module ActionDispatch::Http::Cache; end + +# pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:8 +module ActionDispatch::Http::Cache::Request + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:30 + def etag_matches?(etag); end + + # Check response freshness (`Last-Modified` and ETag) against request + # `If-Modified-Since` and `If-None-Match` conditions. If both headers are + # supplied, both must match, or the request is not considered fresh. + # + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:40 + def fresh?(response); end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:12 + def if_modified_since; end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:18 + def if_none_match; end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:22 + def if_none_match_etags; end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:26 + def not_modified?(modified_at); end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:9 +ActionDispatch::Http::Cache::Request::HTTP_IF_MODIFIED_SINCE = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:10 +ActionDispatch::Http::Cache::Request::HTTP_IF_NONE_MATCH = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:53 +module ActionDispatch::Http::Cache::Response + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:54 + def cache_control; end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:70 + def date; end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:80 + def date=(utc_time); end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:76 + def date?; end + + # This method sets a weak ETag validator on the response so browsers and proxies + # may cache the response, keyed on the ETag. On subsequent requests, the + # `If-None-Match` header is set to the cached ETag. If it matches the current + # ETag, we can return a `304 Not Modified` response with no body, letting the + # browser or proxy know that their cache is current. Big savings in request time + # and network bandwidth. + # + # Weak ETags are considered to be semantically equivalent but not byte-for-byte + # identical. This is perfect for browser caching of HTML pages where we don't + # care about exact equality, just what the user is viewing. + # + # Strong ETags are considered byte-for-byte identical. They allow a browser or + # proxy cache to support `Range` requests, useful for paging through a PDF file + # or scrubbing through a video. Some CDNs only support strong ETags and will + # ignore weak ETags entirely. + # + # Weak ETags are what we almost always need, so they're the default. Check out + # #strong_etag= to provide a strong ETag validator. + # + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:102 + def etag=(weak_validators); end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:114 + def etag?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:56 + def last_modified; end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:66 + def last_modified=(utc_time); end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:62 + def last_modified?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:110 + def strong_etag=(strong_validators); end + + # True if an ETag is set, and it isn't a weak validator (not preceded with + # `W/`). + # + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:123 + def strong_etag?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:106 + def weak_etag=(weak_validators); end + + # True if an ETag is set, and it's a weak validator (preceded with `W/`). + # + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:117 + def weak_etag?; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:146 + def cache_control_headers; end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:140 + def cache_control_segments; end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:136 + def generate_strong_etag(validators); end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:132 + def generate_weak_etag(validators); end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:175 + def handle_conditional_get!; end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:184 + def merge_and_normalize_cache_control!(cache_control); end + + # pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:164 + def prepare_cache_control!; end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:128 +ActionDispatch::Http::Cache::Response::DATE = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:168 +ActionDispatch::Http::Cache::Response::DEFAULT_CACHE_CONTROL = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:129 +ActionDispatch::Http::Cache::Response::LAST_MODIFIED = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:173 +ActionDispatch::Http::Cache::Response::MUST_REVALIDATE = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:170 +ActionDispatch::Http::Cache::Response::NO_CACHE = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:169 +ActionDispatch::Http::Cache::Response::NO_STORE = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:172 +ActionDispatch::Http::Cache::Response::PRIVATE = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:171 +ActionDispatch::Http::Cache::Response::PUBLIC = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/cache.rb:130 +ActionDispatch::Http::Cache::Response::SPECIAL_KEYS = T.let(T.unsafe(nil), Set) + +# pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:7 +class ActionDispatch::Http::ContentDisposition + # pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:14 + def initialize(disposition:, filename:); end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:21 + def ascii_filename; end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:12 + def disposition; end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:12 + def filename; end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:31 + def to_s; end + + # pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:27 + def utf8_filename; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:40 + def percent_escape(string, pattern); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:8 + def format(disposition:, filename:); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:25 +ActionDispatch::Http::ContentDisposition::RFC_5987_ESCAPED_CHAR = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/http/content_disposition.rb:19 +ActionDispatch::Http::ContentDisposition::TRADITIONAL_ESCAPED_CHAR = T.let(T.unsafe(nil), Regexp) + +# # Action Dispatch HTTP Filter Parameters +# +# Allows you to specify sensitive query string and POST parameters to filter +# from the request log. +# +# # Replaces values with "[FILTERED]" for keys that match /foo|bar/i. +# env["action_dispatch.parameter_filter"] = [:foo, "bar"] +# +# For more information about filter behavior, see +# ActiveSupport::ParameterFilter. +# +# pkg:gem/actionpack#lib/action_dispatch/http/filter_parameters.rb:19 +module ActionDispatch::Http::FilterParameters + # pkg:gem/actionpack#lib/action_dispatch/http/filter_parameters.rb:24 + def initialize; end + + # Returns a hash of request.env with all sensitive data replaced. + # + # pkg:gem/actionpack#lib/action_dispatch/http/filter_parameters.rb:40 + def filtered_env; end + + # Returns a hash of parameters with all sensitive data replaced. + # + # pkg:gem/actionpack#lib/action_dispatch/http/filter_parameters.rb:33 + def filtered_parameters; end + + # Reconstructs a path with all sensitive GET parameters replaced. + # + # pkg:gem/actionpack#lib/action_dispatch/http/filter_parameters.rb:45 + def filtered_path; end + + # Returns the `ActiveSupport::ParameterFilter` object used to filter in this + # request. + # + # pkg:gem/actionpack#lib/action_dispatch/http/filter_parameters.rb:51 + def parameter_filter; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/filter_parameters.rb:60 + def env_filter; end + + # pkg:gem/actionpack#lib/action_dispatch/http/filter_parameters.rb:71 + def filtered_query_string; end + + # pkg:gem/actionpack#lib/action_dispatch/http/filter_parameters.rb:67 + def parameter_filter_for(filters); end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/filter_parameters.rb:20 +ActionDispatch::Http::FilterParameters::ENV_MATCH = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/http/filter_parameters.rb:22 +ActionDispatch::Http::FilterParameters::NULL_ENV_FILTER = T.let(T.unsafe(nil), ActiveSupport::ParameterFilter) + +# pkg:gem/actionpack#lib/action_dispatch/http/filter_parameters.rb:21 +ActionDispatch::Http::FilterParameters::NULL_PARAM_FILTER = T.let(T.unsafe(nil), ActiveSupport::ParameterFilter) + +# pkg:gem/actionpack#lib/action_dispatch/http/filter_redirect.rb:7 +module ActionDispatch::Http::FilterRedirect + # pkg:gem/actionpack#lib/action_dispatch/http/filter_redirect.rb:10 + def filtered_location; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/filter_redirect.rb:27 + def location_filter_match?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/filter_redirect.rb:19 + def location_filters; end + + # pkg:gem/actionpack#lib/action_dispatch/http/filter_redirect.rb:37 + def parameter_filtered_location; end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/filter_redirect.rb:8 +ActionDispatch::Http::FilterRedirect::FILTERED = T.let(T.unsafe(nil), String) + +# # Action Dispatch HTTP Headers +# +# Provides access to the request's HTTP headers from the environment. +# +# env = { "CONTENT_TYPE" => "text/plain", "HTTP_USER_AGENT" => "curl/7.43.0" } +# headers = ActionDispatch::Http::Headers.from_hash(env) +# headers["Content-Type"] # => "text/plain" +# headers["User-Agent"] # => "curl/7.43.0" +# +# Also note that when headers are mapped to CGI-like variables by the Rack +# server, both dashes and underscores are converted to underscores. This +# ambiguity cannot be resolved at this stage anymore. Both underscores and +# dashes have to be interpreted as if they were originally sent as dashes. +# +# # GET / HTTP/1.1 +# # ... +# # User-Agent: curl/7.43.0 +# # X_Custom_Header: token +# +# headers["X_Custom_Header"] # => nil +# headers["X-Custom-Header"] # => "token" +# +# pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:28 +class ActionDispatch::Http::Headers + include ::Enumerable + + # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:58 + def initialize(request); end + + # Returns the value for the given key mapped to @env. + # + # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:63 + def [](key); end + + # Sets the given value for the key mapped to @env. + # + # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:68 + def []=(key, value); end + + # Add a value to a multivalued header like `Vary` or `Accept-Encoding`. + # + # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:73 + def add(key, value); end + + # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:98 + def each(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:118 + def env; end + + # Returns the value for the given key mapped to @env. + # + # If the key is not found and an optional code block is not provided, raises a + # `KeyError` exception. + # + # If the code block is provided, then it will be run and its result returned. + # + # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:90 + def fetch(key, default = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:80 + def include?(key); end + + # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:77 + def key?(key); end + + # Returns a new Http::Headers instance containing the contents of + # `headers_or_env` and the original instance. + # + # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:104 + def merge(headers_or_env); end + + # Adds the contents of `headers_or_env` to original instance entries; duplicate + # keys are overwritten with the values from `headers_or_env`. + # + # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:112 + def merge!(headers_or_env); end + + private + + # Converts an HTTP header name to an environment variable name if it is not + # contained within the headers hash. + # + # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:123 + def env_name(key); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:54 + def from_hash(hash); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:29 +ActionDispatch::Http::Headers::CGI_VARIABLES = T.let(T.unsafe(nil), Set) + +# pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:82 +ActionDispatch::Http::Headers::DEFAULT = T.let(T.unsafe(nil), Object) + +# pkg:gem/actionpack#lib/action_dispatch/http/headers.rb:50 +ActionDispatch::Http::Headers::HTTP_HEADER = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:9 +module ActionDispatch::Http::MimeNegotiation + extend ::ActiveSupport::Concern + + # Returns the accepted MIME type for the request. + # + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:42 + def accepts; end + + # The MIME type of the HTTP request, such as [Mime](:xml). + # + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:24 + def content_mime_type; end + + # Returns the MIME type for the format used in the request. + # + # # GET /posts/5.xml + # request.format # => Mime[:xml] + # + # # GET /posts/5.xhtml + # request.format # => Mime[:html] + # + # # GET /posts/5 + # request.format # => Mime[:html] or Mime[:js], or request.accepts.first + # + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:68 + def format(_view_path = T.unsafe(nil)); end + + # Sets the format by string extension, which can be used to force custom formats + # that are not controlled by the extension. + # + # class ApplicationController < ActionController::Base + # before_action :adjust_format_for_iphone + # + # private + # def adjust_format_for_iphone + # request.format = :iphone if request.env["HTTP_USER_AGENT"][/iPhone/] + # end + # end + # + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:120 + def format=(extension); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:72 + def formats; end + + # Sets the formats by string extensions. This differs from #format= by allowing + # you to set multiple, ordered formats, which is useful when you want to have a + # fallback. + # + # In this example, the `:iphone` format will be used if it's available, + # otherwise it'll fall back to the `:html` format. + # + # class ApplicationController < ActionController::Base + # before_action :adjust_format_for_iphone_with_html_fallback + # + # private + # def adjust_format_for_iphone_with_html_fallback + # request.formats = [ :iphone, :html ] if request.env["HTTP_USER_AGENT"][/iPhone/] + # end + # end + # + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:140 + def formats=(extensions); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:37 + def has_content_type?; end + + # Returns the first MIME type that matches the provided array of MIME types. + # + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:148 + def negotiate_mime(order); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:160 + def should_apply_vary_header?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:105 + def variant; end + + # Sets the variant for template. + # + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:95 + def variant=(variant); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:184 + def format_from_path_extension; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:169 + def params_readable?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:180 + def use_accept_header; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:175 + def valid_accept_header; end +end + +# We use normal content negotiation unless you include **/** in your list, in +# which case we assume you're a browser and send HTML. +# +# pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:167 +ActionDispatch::Http::MimeNegotiation::BROWSER_LIKE_ACCEPTS = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:12 +class ActionDispatch::Http::MimeNegotiation::InvalidType < ::Mime::Type::InvalidMimeType; end + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_negotiation.rb:14 +ActionDispatch::Http::MimeNegotiation::RESCUABLE_MIME_FORMAT_ERRORS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:7 +module ActionDispatch::Http::Parameters + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionDispatch::Http::Parameters::ClassMethods + + # Returns both GET and POST parameters in a single hash. + # + # pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:52 + def parameters; end + + # pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:65 + def params; end + + # Returns a hash with the parameters used to form the path of the request. + # Returned hash keys are symbols: + # + # { action: "my_action", controller: "my_controller" } + # + # pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:84 + def path_parameters; end + + # pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:67 + def path_parameters=(parameters); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:102 + def log_parse_error_once; end + + # pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:114 + def params_parsers; end + + # pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:89 + def parse_formatted_parameters(parsers); end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:36 +module ActionDispatch::Http::Parameters::ClassMethods + # Configure the parameter parser for a given MIME type. + # + # It accepts a hash where the key is the symbol of the MIME type and the value + # is a proc. + # + # original_parsers = ActionDispatch::Request.parameter_parsers + # xml_parser = -> (raw_post) { Hash.from_xml(raw_post) || {} } + # new_parsers = original_parsers.merge(xml: xml_parser) + # ActionDispatch::Request.parameter_parsers = new_parsers + # + # pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:46 + def parameter_parsers=(parsers); end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:12 +ActionDispatch::Http::Parameters::DEFAULT_PARSERS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:10 +ActionDispatch::Http::Parameters::PARAMETERS_KEY = T.let(T.unsafe(nil), String) + +# Raised when raw data from the request cannot be parsed by the parser defined +# for request's content MIME type. +# +# pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:21 +class ActionDispatch::Http::Parameters::ParseError < ::StandardError + # pkg:gem/actionpack#lib/action_dispatch/http/parameters.rb:22 + def initialize(message = T.unsafe(nil)); end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/url.rb:9 +module ActionDispatch::Http::URL + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:181 + def initialize; end + + # Returns the domain part of a host, such as "rubyonrails.org" in + # "www.rubyonrails.org". You can specify a different `tld_length`, such as 2 to + # catch rubyonrails.co.uk in "www.rubyonrails.co.uk". + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:324 + def domain(tld_length = T.unsafe(nil)); end + + # Returns the host for this request, such as "example.com". + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.host # => "example.com" + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:228 + def host; end + + # Returns a host:port string for this request, such as "example.com" or + # "example.com:8080". Port is only included if it is not a default port (80 or + # 443) + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.host_with_port # => "example.com" + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.host_with_port # => "example.com" + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.host_with_port # => "example.com:8080" + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:244 + def host_with_port; end + + # Returns a number port suffix like 8080 if the port number of this request is + # not the default HTTP port 80 or HTTPS port 443. + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.optional_port # => nil + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.optional_port # => 8080 + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:294 + def optional_port; end + + # Returns the port number of this request as an integer. + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.port # => 80 + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.port # => 8080 + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:255 + def port; end + + # Returns a string port suffix, including colon, like ":8080" if the port number + # of this request is not the default HTTP port 80 or HTTPS port 443. + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.port_string # => "" + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.port_string # => ":8080" + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:306 + def port_string; end + + # Returns 'https://' if this is an SSL request and 'http://' otherwise. + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.protocol # => "http://" + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com', 'HTTPS' => 'on' + # req.protocol # => "https://" + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:202 + def protocol; end + + # Returns the host and port for this request, such as "example.com:8080". + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.raw_host_with_port # => "example.com" + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.raw_host_with_port # => "example.com:80" + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.raw_host_with_port # => "example.com:8080" + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:216 + def raw_host_with_port; end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:14 + def secure_protocol; end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:14 + def secure_protocol=(val); end + + # Returns the requested port, such as 8080, based on SERVER_PORT. + # + # req = ActionDispatch::Request.new 'SERVER_PORT' => '80' + # req.server_port # => 80 + # + # req = ActionDispatch::Request.new 'SERVER_PORT' => '8080' + # req.server_port # => 8080 + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:317 + def server_port; end + + # Returns the standard port number for this request's protocol. + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.standard_port # => 80 + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:267 + def standard_port; end + + # Returns whether this request is using the standard port. + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.standard_port? # => true + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.standard_port? # => false + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:282 + def standard_port?; end + + # Returns all the subdomains as a string, so `"dev.www"` would be returned for + # "dev.www.rubyonrails.org". You can specify a different `tld_length`, such as 2 + # to catch `"www"` instead of `"www.rubyonrails"` in "www.rubyonrails.co.uk". + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:339 + def subdomain(tld_length = T.unsafe(nil)); end + + # Returns all the subdomains as an array, so `["dev", "www"]` would be returned + # for "dev.www.rubyonrails.org". You can specify a different `tld_length`, such + # as 2 to catch `["www"]` instead of `["www", "rubyonrails"]` in + # "www.rubyonrails.co.uk". + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:332 + def subdomains(tld_length = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:15 + def tld_length; end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:15 + def tld_length=(val); end + + # Returns the complete URL used for this request. + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.url # => "http://example.com" + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:191 + def url; end + + class << self + # Returns the domain part of a host given the domain level. + # + # # Top-level domain example + # extract_domain('www.example.com', 1) # => "example.com" + # # Second-level domain example + # extract_domain('dev.www.example.co.uk', 2) # => "example.co.uk" + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:24 + def extract_domain(host, tld_length); end + + # Returns the subdomains of a host as a String given the domain level. + # + # # Top-level domain example + # extract_subdomain('www.example.com', 1) # => "www" + # # Second-level domain example + # extract_subdomain('dev.www.example.co.uk', 2) # => "dev.www" + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:48 + def extract_subdomain(host, tld_length); end + + # Returns the subdomains of a host as an Array given the domain level. + # + # # Top-level domain example + # extract_subdomains('www.example.com', 1) # => ["www"] + # # Second-level domain example + # extract_subdomains('dev.www.example.co.uk', 2) # => ["dev", "www"] + # + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:34 + def extract_subdomains(host, tld_length); end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:60 + def full_url_for(options); end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:72 + def path_for(options); end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:14 + def secure_protocol; end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:14 + def secure_protocol=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:15 + def tld_length; end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:15 + def tld_length=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:52 + def url_for(options); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:92 + def add_anchor(path, anchor); end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:85 + def add_params(path, params); end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:107 + def build_host_url(host, port, protocol, options, path); end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:98 + def extract_domain_from(host, tld_length); end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:102 + def extract_subdomains_from(host, tld_length); end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:131 + def named_host?(host); end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:148 + def normalize_host(_host, options); end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:168 + def normalize_port(port, protocol); end + + # pkg:gem/actionpack#lib/action_dispatch/http/url.rb:135 + def normalize_protocol(protocol); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/url.rb:11 +ActionDispatch::Http::URL::HOST_REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/http/url.rb:10 +ActionDispatch::Http::URL::IP_HOST_REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/http/url.rb:12 +ActionDispatch::Http::URL::PROTOCOL_REGEXP = T.let(T.unsafe(nil), Regexp) + +# # Action Dispatch HTTP UploadedFile +# +# Models uploaded files. +# +# The actual file is accessible via the `tempfile` accessor, though some of its +# interface is available directly for convenience. +# +# Uploaded files are temporary files whose lifespan is one request. When the +# object is finalized Ruby unlinks the file, so there is no need to clean them +# with a separate maintenance task. +# +# pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:17 +class ActionDispatch::Http::UploadedFile + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:31 + def initialize(hash); end + + # Shortcut for `tempfile.close`. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:73 + def close(unlink_now = T.unsafe(nil)); end + + # A string with the MIME type of the file. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:22 + def content_type; end + + # A string with the MIME type of the file. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:22 + def content_type=(_arg0); end + + # Shortcut for `tempfile.eof?`. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:98 + def eof?; end + + # A string with the headers of the multipart request. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:29 + def headers; end + + # A string with the headers of the multipart request. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:29 + def headers=(_arg0); end + + # Shortcut for `tempfile.open`. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:68 + def open; end + + # The basename of the file in the client. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:19 + def original_filename; end + + # The basename of the file in the client. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:19 + def original_filename=(_arg0); end + + # Shortcut for `tempfile.path`. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:78 + def path; end + + # Shortcut for `tempfile.read`. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:63 + def read(length = T.unsafe(nil), buffer = T.unsafe(nil)); end + + # Shortcut for `tempfile.rewind`. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:88 + def rewind; end + + # Shortcut for `tempfile.size`. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:93 + def size; end + + # A `Tempfile` object with the actual uploaded file. Note that some of its + # interface is available directly. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:26 + def tempfile; end + + # A `Tempfile` object with the actual uploaded file. Note that some of its + # interface is available directly. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:26 + def tempfile=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:102 + def to_io; end + + # Shortcut for `tempfile.to_path`. + # + # pkg:gem/actionpack#lib/action_dispatch/http/upload.rb:83 + def to_path; end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:14 +module ActionDispatch::Integration; end + +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:15 +module ActionDispatch::Integration::RequestHelpers + # Performs a DELETE request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:42 + def delete(path, **args); end + + # Follow a single redirect response. If the last response was not a redirect, an + # exception will be raised. Otherwise, the redirect is performed on the location + # header. If the redirection is a 307 or 308 redirect, the same HTTP verb will + # be used when redirecting, otherwise a GET request will be performed. Any + # arguments are passed to the underlying request. + # + # The HTTP_REFERER header will be set to the previous url. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:65 + def follow_redirect!(headers: T.unsafe(nil), **args); end + + # Performs a GET request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:18 + def get(path, **args); end + + # Performs a HEAD request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:48 + def head(path, **args); end + + # Performs an OPTIONS request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:54 + def options(path, **args); end + + # Performs a PATCH request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:30 + def patch(path, **args); end + + # Performs a POST request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:24 + def post(path, **args); end + + # Performs a PUT request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:36 + def put(path, **args); end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:324 +module ActionDispatch::Integration::Runner + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions + extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:332 + def initialize(*args, &blk); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:329 + def app; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:402 + def assertions; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:406 + def assertions=(assertions); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:374 + def assigns(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:337 + def before_setup; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:374 + def cookies(*_arg0, **_arg1, &_arg2); end + + # Copy the instance variables from the current session instance into the test + # instance. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:412 + def copy_session_variables!; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:352 + def create_session(app); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:418 + def default_url_options; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:422 + def default_url_options=(options); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:374 + def delete(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:374 + def follow_redirect!(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:374 + def get(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:374 + def head(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:342 + def integration_session; end + + # Open a new session instance. If a block is given, the new session is yielded + # to the block before being returned. + # + # session = open_session do |sess| + # sess.extend(CustomAssertions) + # end + # + # By default, a single session is automatically created for you, but you can use + # this method to open multiple sessions that ought to be tested simultaneously. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:394 + def open_session; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:374 + def patch(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:374 + def post(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:374 + def put(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:364 + def remove!; end + + # Reset the current session. This is useful for testing multiple sessions in a + # single test case. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:348 + def reset!; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:330 + def root_session; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:330 + def root_session=(_arg0); end + + private + + # Delegate unhandled messages to the current session instance. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:432 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:427 + def respond_to_missing?(method, _); end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:327 +ActionDispatch::Integration::Runner::APP_SESSIONS = T.let(T.unsafe(nil), Hash) + +# An instance of this class represents a set of requests and responses performed +# sequentially by a test process. Because you can instantiate multiple sessions +# and run them side-by-side, you can also mimic (to some limited extent) +# multiple simultaneous users interacting with your system. +# +# Typically, you will instantiate a new session using Runner#open_session, +# rather than instantiating a Session directly. +# +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:91 +class ActionDispatch::Integration::Session + include ::Minitest::Assertions + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions + include ::ActionDispatch::Integration::RequestHelpers + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + include ::ActionDispatch::Routing::PolymorphicRoutes + include ::ActionDispatch::Routing::UrlFor + extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + + # Create and initialize a new Session instance. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:133 + def initialize(app); end + + # The Accept header to send. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:110 + def accept; end + + # The Accept header to send. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:110 + def accept=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:97 + def body(*_arg0, **_arg1, &_arg2); end + + # A reference to the controller instance used by the last request. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:119 + def controller; end + + # A map of the cookies returned by the last response, and which will be sent + # with the next request. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:114 + def cookies; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:130 + def default_url_options; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:130 + def default_url_options=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:130 + def default_url_options?; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:97 + def headers(*_arg0, **_arg1, &_arg2); end + + # The hostname used in the last request. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:101 + def host; end + + # Set the host name to use in the next request. + # + # session.host! "www.example.com" + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:305 + def host!(_arg0); end + + # The hostname used in the last request. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:104 + def host=(_arg0); end + + # Specify whether or not the session should mimic a secure HTTPS request. + # + # session.https! + # session.https!(false) + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:180 + def https!(flag = T.unsafe(nil)); end + + # Returns `true` if the session is mimicking a secure HTTPS request. + # + # if session.https? + # ... + # end + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:189 + def https?; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:98 + def path(*_arg0, **_arg1, &_arg2); end + + # Performs the actual request. + # + # * `method`: The HTTP method (GET, POST, PATCH, PUT, DELETE, HEAD, OPTIONS) + # as a symbol. + # * `path`: The URI (as a String) on which you want to perform the request. + # * `params`: The HTTP parameters that you want to pass. This may be `nil`, a + # Hash, or a String that is appropriately encoded + # (`application/x-www-form-urlencoded` or `multipart/form-data`). + # * `headers`: Additional headers to pass, as a Hash. The headers will be + # merged into the Rack env hash. + # * `env`: Additional env to pass, as a Hash. The headers will be merged into + # the Rack env hash. + # * `xhr`: Set to `true` if you want to make an Ajax request. Adds request + # headers characteristic of XMLHttpRequest e.g. HTTP_X_REQUESTED_WITH. The + # headers will be merged into the Rack env hash. + # * `as`: Used for encoding the request with different content type. Supports + # `:json` by default and will set the appropriate request headers. The + # headers will be merged into the Rack env hash. + # + # + # This method is rarely used directly. Use RequestHelpers#get, + # RequestHelpers#post, or other standard HTTP methods in integration tests. + # `#process` is only required when using a request method that doesn't have a + # method defined in the integration tests. + # + # This method returns the response status, after performing the request. + # Furthermore, if this method was called from an ActionDispatch::IntegrationTest + # object, then that object's `@response` instance variable will point to a + # Response object which one can use to inspect the details of the response. + # + # Example: + # process :get, '/author', params: { since: 201501011400 } + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:225 + def process(method, path, params: T.unsafe(nil), headers: T.unsafe(nil), env: T.unsafe(nil), xhr: T.unsafe(nil), as: T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:97 + def redirect?(*_arg0, **_arg1, &_arg2); end + + # The remote_addr used in the last request. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:107 + def remote_addr; end + + # The remote_addr used in the last request. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:107 + def remote_addr=(_arg0); end + + # A reference to the request instance used by the last request. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:122 + def request; end + + # A running counter of the number of requests processed. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:128 + def request_count; end + + # A running counter of the number of requests processed. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:128 + def request_count=(_arg0); end + + # Resets the instance. This can be used to reset the state information in an + # existing session instance, so it can be used from a clean-slate condition. + # + # session.reset! + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:156 + def reset!; end + + # A reference to the response instance used by the last request. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:125 + def response; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:97 + def status(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:97 + def status_message(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:140 + def url_options; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:308 + def _mock_session; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:316 + def build_expanded_path(path); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:312 + def build_full_uri(path, env); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:130 + def default_url_options; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:130 + def default_url_options=(value); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:130 + def default_url_options?; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:92 +ActionDispatch::Integration::Session::DEFAULT_HOST = T.let(T.unsafe(nil), String) + +# An integration test spans multiple controllers and actions, tying them all +# together to ensure they work together as expected. It tests more completely +# than either unit or functional tests do, exercising the entire stack, from the +# dispatcher to the database. +# +# At its simplest, you simply extend `IntegrationTest` and write your tests +# using the Integration::RequestHelpers#get and/or +# Integration::RequestHelpers#post methods: +# +# require "test_helper" +# +# class ExampleTest < ActionDispatch::IntegrationTest +# fixtures :people +# +# def test_login +# # get the login page +# get "/login" +# assert_equal 200, status +# +# # post the login and follow through to the home page +# post "/login", params: { username: people(:jamis).username, +# password: people(:jamis).password } +# follow_redirect! +# assert_equal 200, status +# assert_equal "/home", path +# end +# end +# +# However, you can also have multiple session instances open per test, and even +# extend those instances with assertions and methods to create a very powerful +# testing DSL that is specific for your application. You can even reference any +# named routes you happen to have defined. +# +# require "test_helper" +# +# class AdvancedTest < ActionDispatch::IntegrationTest +# fixtures :people, :rooms +# +# def test_login_and_speak +# jamis, david = login(:jamis), login(:david) +# room = rooms(:office) +# +# jamis.enter(room) +# jamis.speak(room, "anybody home?") +# +# david.enter(room) +# david.speak(room, "hello!") +# end +# +# private +# +# module CustomAssertions +# def enter(room) +# # reference a named route, for maximum internal consistency! +# get(room_url(id: room.id)) +# assert(...) +# ... +# end +# +# def speak(room, message) +# post "/say/#{room.id}", xhr: true, params: { message: message } +# assert(...) +# ... +# end +# end +# +# def login(who) +# open_session do |sess| +# sess.extend(CustomAssertions) +# who = people(who) +# sess.post "/login", params: { username: who.username, +# password: who.password } +# assert(...) +# end +# end +# end +# +# Another longer example would be: +# +# A simple integration test that exercises multiple controllers: +# +# require "test_helper" +# +# class UserFlowsTest < ActionDispatch::IntegrationTest +# test "login and browse site" do +# # login via https +# https! +# get "/login" +# assert_response :success +# +# post "/login", params: { username: users(:david).username, password: users(:david).password } +# follow_redirect! +# assert_equal '/welcome', path +# assert_equal 'Welcome david!', flash[:notice] +# +# https!(false) +# get "/articles/all" +# assert_response :success +# assert_select 'h1', 'Articles' +# end +# end +# +# As you can see the integration test involves multiple controllers and +# exercises the entire stack from database to dispatcher. In addition you can +# have multiple session instances open simultaneously in a test and extend those +# instances with assertion methods to create a very powerful testing DSL +# (domain-specific language) just for your application. +# +# Here's an example of multiple sessions and custom DSL in an integration test +# +# require "test_helper" +# +# class UserFlowsTest < ActionDispatch::IntegrationTest +# test "login and browse site" do +# # User david logs in +# david = login(:david) +# # User guest logs in +# guest = login(:guest) +# +# # Both are now available in different sessions +# assert_equal 'Welcome david!', david.flash[:notice] +# assert_equal 'Welcome guest!', guest.flash[:notice] +# +# # User david can browse site +# david.browses_site +# # User guest can browse site as well +# guest.browses_site +# +# # Continue with other assertions +# end +# +# private +# +# module CustomDsl +# def browses_site +# get "/products/all" +# assert_response :success +# assert_select 'h1', 'Products' +# end +# end +# +# def login(user) +# open_session do |sess| +# sess.extend(CustomDsl) +# u = users(user) +# sess.https! +# sess.post "/login", params: { username: u.username, password: u.password } +# assert_equal '/welcome', sess.path +# sess.https!(false) +# end +# end +# end +# +# See the [request helpers documentation](rdoc-ref:ActionDispatch::Integration::RequestHelpers) +# for help on how to use `get`, etc. +# +# ### Changing the request encoding +# +# You can also test your JSON API easily by setting what the request should be +# encoded as: +# +# require "test_helper" +# +# class ApiTest < ActionDispatch::IntegrationTest +# test "creates articles" do +# assert_difference -> { Article.count } do +# post articles_path, params: { article: { title: "Ahoy!" } }, as: :json +# end +# +# assert_response :success +# assert_equal({ id: Article.last.id, title: "Ahoy!" }, response.parsed_body) +# end +# end +# +# The `as` option passes an "application/json" Accept header (thereby setting +# the request format to JSON unless overridden), sets the content type to +# "application/json" and encodes the parameters as JSON. +# +# Calling TestResponse#parsed_body on the response parses the response body +# based on the last response MIME type. +# +# Out of the box, only `:json` is supported. But for any custom MIME types +# you've registered, you can add your own encoders with: +# +# ActionDispatch::IntegrationTest.register_encoder :wibble, +# param_encoder: -> params { params.to_wibble }, +# response_parser: -> body { body } +# +# Where `param_encoder` defines how the params should be encoded and +# `response_parser` defines how the response body should be parsed through +# TestResponse#parsed_body. +# +# Consult the [Rails Testing Guide](https://guides.rubyonrails.org/testing.html) +# for more. +# +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:639 +class ActionDispatch::IntegrationTest < ::ActiveSupport::TestCase + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions + include ::ActionDispatch::Integration::Runner + include ::ActionController::TemplateAssertions + include ::ActionDispatch::TestHelpers::PageDumpHelper + include ::ActionDispatch::IntegrationTest::Behavior + include ::ActionDispatch::Routing::PolymorphicRoutes + include ::ActionDispatch::Routing::UrlFor + include ::ActionDispatch::IntegrationTest::UrlOptions + include ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting + extend ::ActionDispatch::IntegrationTest::Behavior::ClassMethods + extend ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:649 +module ActionDispatch::IntegrationTest::Behavior + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions + include ::ActionDispatch::Integration::Runner + include ::ActionController::TemplateAssertions + include ::ActionDispatch::TestHelpers::PageDumpHelper + extend ::ActiveSupport::Concern + include ::ActionDispatch::Routing::UrlFor + include ::ActionDispatch::IntegrationTest::UrlOptions + include ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting + + mixes_in_class_methods ::ActionDispatch::IntegrationTest::Behavior::ClassMethods + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:682 + def app; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:686 + def document_root_element; end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:664 +module ActionDispatch::IntegrationTest::Behavior::ClassMethods + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:665 + def app; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:673 + def app=(app); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:677 + def register_encoder(*args, **options); end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:642 +module ActionDispatch::IntegrationTest::UrlOptions + extend ::ActiveSupport::Concern + + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:644 + def url_options; end +end + +# :stopdoc: +# :stopdoc: +# :stopdoc: +# :stopdoc: +# +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:6 +module ActionDispatch::Journey; end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:9 +class ActionDispatch::Journey::Ast + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:13 + def initialize(tree, formatted); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:38 + def glob?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:10 + def names; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:10 + def path_params; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:25 + def requirements=(requirements); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:11 + def root; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:34 + def route=(route); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:10 + def terminals; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:10 + def tree; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:10 + def wildcard_options; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:43 + def stars; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:43 + def symbols; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:45 + def visit_tree(formatted); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:8 +class ActionDispatch::Journey::Format + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:24 + def initialize(parts); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:39 + def evaluate(hash); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:16 + def required_path(symbol); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:20 + def required_segment(symbol); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:9 +ActionDispatch::Journey::Format::ESCAPE_PATH = T.let(T.unsafe(nil), Proc) + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:10 +ActionDispatch::Journey::Format::ESCAPE_SEGMENT = T.let(T.unsafe(nil), Proc) + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:12 +class ActionDispatch::Journey::Format::Parameter < ::Struct + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:13 + def escape(value); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:12 + def escaper; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:12 + def escaper=(_); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:12 + def name; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:12 + def name=(_); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:12 + def [](*_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:12 + def inspect; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:12 + def keyword_init?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:12 + def members; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:12 + def new(*_arg0); end + end +end + +# The Formatter class is used for formatting URLs. For example, parameters +# passed to `url_for` in Rails will eventually call Formatter#generate. +# +# pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:12 +class ActionDispatch::Journey::Formatter + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:15 + def initialize(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:110 + def clear; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:114 + def eager_load!; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:61 + def generate(name, options, path_parameters); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:13 + def routes; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:214 + def build_cache; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:225 + def cache; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:120 + def extract_parameterized_parts(route, options, recall); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:147 + def match_route(name, options); end + + # Returns an array populated with missing keys if any are present. + # + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:186 + def missing_keys(route, parts); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:143 + def named_routes; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:169 + def non_recursive(cache, options); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:206 + def possibles(cache, options, depth = T.unsafe(nil)); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:34 +class ActionDispatch::Journey::Formatter::MissingRoute + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:37 + def initialize(constraints, missing_keys, unmatched_keys, routes, name); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:35 + def constraints; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:53 + def message; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:35 + def missing_keys; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:35 + def name; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:49 + def params; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:45 + def path(method_name); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:35 + def routes; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:35 + def unmatched_keys; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:20 +class ActionDispatch::Journey::Formatter::RouteWithParams + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:23 + def initialize(route, parameterized_parts, params); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:21 + def params; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/formatter.rb:29 + def path(_); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:9 +module ActionDispatch::Journey::GTG; end + +# pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:10 +class ActionDispatch::Journey::GTG::Builder + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:15 + def initialize(root); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:13 + def ast; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:13 + def endpoints; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:87 + def firstpos(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:108 + def lastpos(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:66 + def nullable?(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:13 + def root; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:21 + def transition_table; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:130 + def build_followpos; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:143 + def symbol(edge); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/gtg/builder.rb:11 +ActionDispatch::Journey::GTG::Builder::DUMMY_END_NODE = T.let(T.unsafe(nil), ActionDispatch::Journey::Nodes::Dummy) + +# pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:10 +class ActionDispatch::Journey::GTG::MatchData + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:13 + def initialize(memos); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:11 + def memos; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:18 +class ActionDispatch::Journey::GTG::Simulator + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:23 + def initialize(transition_table); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:27 + def memos(string); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:21 + def tt; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/gtg/simulator.rb:19 +ActionDispatch::Journey::GTG::Simulator::INITIAL_STATE = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:10 +class ActionDispatch::Journey::GTG::TransitionTable + include ::ActionDispatch::Journey::NFA::Dot + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:18 + def initialize; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:165 + def []=(from, to, sym); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:34 + def accepting?(state); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:30 + def accepting_states; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:26 + def add_accepting(state); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:38 + def add_memo(idx, memo); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:100 + def as_json(options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:46 + def eclosure(t); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:42 + def memo(idx); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:13 + def memos; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:50 + def move(t, full_string, start_index, end_index); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:182 + def states; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:117 + def to_svg; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:189 + def transitions; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:127 + def visualizer(paths, title = T.unsafe(nil)); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:200 + def states_hash_for(sym); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:15 +ActionDispatch::Journey::GTG::TransitionTable::DEFAULT_EXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/journey/gtg/transition_table.rb:16 +ActionDispatch::Journey::GTG::TransitionTable::DEFAULT_EXP_ANCHORED = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/journey/nfa/dot.rb:7 +module ActionDispatch::Journey::NFA; end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nfa/dot.rb:8 +module ActionDispatch::Journey::NFA::Dot + # pkg:gem/actionpack#lib/action_dispatch/journey/nfa/dot.rb:9 + def to_dot; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:68 +module ActionDispatch::Journey::Nodes; end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:181 +class ActionDispatch::Journey::Nodes::Binary < ::ActionDispatch::Journey::Nodes::Node + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:184 + def initialize(left, right); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:189 + def children; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:182 + def right; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:182 + def right=(_arg0); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:192 +class ActionDispatch::Journey::Nodes::Cat < ::ActionDispatch::Journey::Nodes::Binary + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:193 + def cat?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:194 + def type; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:133 +class ActionDispatch::Journey::Nodes::Dot < ::ActionDispatch::Journey::Nodes::Terminal + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:134 + def type; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:121 +class ActionDispatch::Journey::Nodes::Dummy < ::ActionDispatch::Journey::Nodes::Literal + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:122 + def initialize(x = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:126 + def literal?; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:158 +class ActionDispatch::Journey::Nodes::Group < ::ActionDispatch::Journey::Nodes::Unary + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:160 + def group?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:159 + def type; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:116 +class ActionDispatch::Journey::Nodes::Literal < ::ActionDispatch::Journey::Nodes::Terminal + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:117 + def literal?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:118 + def type; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:69 +class ActionDispatch::Journey::Nodes::Node + include ::Enumerable + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:74 + def initialize(left); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:107 + def cat?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:79 + def each(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:108 + def group?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:72 + def left; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:72 + def left=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:104 + def literal?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:72 + def memo; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:72 + def memo=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:95 + def name; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:106 + def star?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:103 + def symbol?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:105 + def terminal?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:87 + def to_dot; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:83 + def to_s; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:91 + def to_sym; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:99 + def type; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:197 +class ActionDispatch::Journey::Nodes::Or < ::ActionDispatch::Journey::Nodes::Node + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:200 + def initialize(children); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:198 + def children; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:204 + def type; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:129 +class ActionDispatch::Journey::Nodes::Slash < ::ActionDispatch::Journey::Nodes::Terminal + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:130 + def type; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:163 +class ActionDispatch::Journey::Nodes::Star < ::ActionDispatch::Journey::Nodes::Unary + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:166 + def initialize(left); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:176 + def name; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:164 + def regexp; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:164 + def regexp=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:173 + def star?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:174 + def type; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:137 +class ActionDispatch::Journey::Nodes::Symbol < ::ActionDispatch::Journey::Nodes::Terminal + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:144 + def initialize(left, regexp = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:140 + def name; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:138 + def regexp; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:138 + def regexp=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:139 + def symbol; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:151 + def symbol?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:150 + def type; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:142 +ActionDispatch::Journey::Nodes::Symbol::DEFAULT_EXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:143 +ActionDispatch::Journey::Nodes::Symbol::GREEDY_EXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:111 +class ActionDispatch::Journey::Nodes::Terminal < ::ActionDispatch::Journey::Nodes::Node + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:112 + def symbol; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:113 + def terminal?; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:154 +class ActionDispatch::Journey::Nodes::Unary < ::ActionDispatch::Journey::Nodes::Node + # pkg:gem/actionpack#lib/action_dispatch/journey/nodes/node.rb:155 + def children; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/parser_extras.rb:11 +class ActionDispatch::Journey::Parser < ::Racc::Parser + include ::ActionDispatch::Journey::Nodes + + # pkg:gem/actionpack#lib/action_dispatch/journey/parser_extras.rb:18 + def initialize; end + + # reduce 0 omitted + # + # pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:138 + def _reduce_1(val, _values); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:166 + def _reduce_10(val, _values); end + + # reduce 14 omitted + # + # pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:178 + def _reduce_15(val, _values); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:182 + def _reduce_16(val, _values); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:186 + def _reduce_17(val, _values); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:190 + def _reduce_18(val, _values); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:142 + def _reduce_2(val, _values); end + + # reduce 6 omitted + # + # pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:154 + def _reduce_7(val, _values); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:158 + def _reduce_8(val, _values); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:162 + def _reduce_9(val, _values); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:194 + def _reduce_none(val, _values); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/parser_extras.rb:27 + def next_token; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/parser_extras.rb:22 + def parse(string); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/parser_extras.rb:14 + def parse(string); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:93 +ActionDispatch::Journey::Parser::Racc_arg = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:132 +ActionDispatch::Journey::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# pkg:gem/actionpack#lib/action_dispatch/journey/parser.rb:109 +ActionDispatch::Journey::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:7 +module ActionDispatch::Journey::Path; end + +# pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:8 +class ActionDispatch::Journey::Path::Pattern + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:11 + def initialize(ast, requirements, separators, anchored); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:163 + def =~(other); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:9 + def anchored; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:9 + def ast; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:25 + def build_formatter; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:29 + def eager_load!; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:159 + def match(other); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:165 + def match?(other); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:9 + def names; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:62 + def optional_names; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:58 + def required_names; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:9 + def requirements; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:36 + def requirements_anchored?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:177 + def requirements_for_missing_keys_check; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:169 + def source; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:9 + def spec; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:173 + def to_regexp; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:188 + def offsets; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:184 + def regexp_visitor; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:68 +class ActionDispatch::Journey::Path::Pattern::AnchoredRegexp < ::ActionDispatch::Journey::Visitors::Visitor + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:69 + def initialize(separator, matchers); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:76 + def accept(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:80 + def visit_CAT(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:100 + def visit_DOT(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:93 + def visit_GROUP(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:97 + def visit_LITERAL(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:111 + def visit_OR(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:102 + def visit_SLASH(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:106 + def visit_STAR(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:84 + def visit_SYMBOL(node); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:124 +class ActionDispatch::Journey::Path::Pattern::MatchData + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:127 + def initialize(names, offsets, match); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:141 + def [](x); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:133 + def captures; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:146 + def length; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:137 + def named_captures; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:125 + def names; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:150 + def post_match; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:154 + def to_s; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:117 +class ActionDispatch::Journey::Path::Pattern::UnanchoredRegexp < ::ActionDispatch::Journey::Path::Pattern::AnchoredRegexp + # pkg:gem/actionpack#lib/action_dispatch/journey/path/pattern.rb:118 + def accept(node); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:8 +class ActionDispatch::Journey::Route + # +path+ is a path constraint. + # `constraints` is a hash of constraints to be applied to this route. + # + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:58 + def initialize(name:, path:, app: T.unsafe(nil), constraints: T.unsafe(nil), required_defaults: T.unsafe(nil), defaults: T.unsafe(nil), request_method_match: T.unsafe(nil), precedence: T.unsafe(nil), scope_options: T.unsafe(nil), internal: T.unsafe(nil), source_location: T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 + def app; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 + def ast; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:12 + def conditions; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 + def constraints; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 + def defaults; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:144 + def dispatcher?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:80 + def eager_load!; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:122 + def format(path_options); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:140 + def glob?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 + def internal; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:166 + def ip; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:148 + def matches?(request); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 + def name; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:117 + def parts; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 + def path; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 + def precedence; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:130 + def required_default?(key); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:134 + def required_defaults; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:105 + def required_keys; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:126 + def required_parts; end + + # Needed for `bin/rails routes`. Picks up succinctly defined requirements for a + # route, for example route + # + # get 'photo/:id', :controller => 'photos', :action => 'show', + # :id => /[A-Z]\d{5}/ + # + # will have {:controller=>"photos", :action=>"show", :[id=>/](A-Z){5}/} as + # requirements. + # + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:95 + def requirements; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:170 + def requires_matching_verb?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 + def scope_options; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:109 + def score(supplied_keys); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:120 + def segment_keys; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:101 + def segments; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:9 + def source_location; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:174 + def verb; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:183 + def match_verb(request); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:179 + def verbs; end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:49 + def verb_matcher(verb); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:14 +module ActionDispatch::Journey::Route::VerbMatchers; end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:36 +class ActionDispatch::Journey::Route::VerbMatchers::All + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:37 + def call(_); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:38 + def verb; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 +class ActionDispatch::Journey::Route::VerbMatchers::DELETE + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def call(req); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def verb; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 +class ActionDispatch::Journey::Route::VerbMatchers::GET + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def call(req); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def verb; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 +class ActionDispatch::Journey::Route::VerbMatchers::HEAD + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def call(req); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def verb; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 +class ActionDispatch::Journey::Route::VerbMatchers::LINK + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def call(req); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def verb; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 +class ActionDispatch::Journey::Route::VerbMatchers::OPTIONS + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def call(req); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def verb; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 +class ActionDispatch::Journey::Route::VerbMatchers::PATCH + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def call(req); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def verb; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 +class ActionDispatch::Journey::Route::VerbMatchers::POST + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def call(req); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def verb; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 +class ActionDispatch::Journey::Route::VerbMatchers::PUT + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def call(req); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def verb; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 +class ActionDispatch::Journey::Route::VerbMatchers::TRACE + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def call(req); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def verb; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 +class ActionDispatch::Journey::Route::VerbMatchers::UNLINK + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def call(req); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:17 + def verb; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:26 +class ActionDispatch::Journey::Route::VerbMatchers::Unknown + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:29 + def initialize(verb); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:33 + def call(request); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:27 + def verb; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:15 +ActionDispatch::Journey::Route::VerbMatchers::VERBS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/journey/route.rb:41 +ActionDispatch::Journey::Route::VerbMatchers::VERB_TO_CLASS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:7 +class ActionDispatch::Journey::Router + # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:22 + def initialize(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:26 + def eager_load!; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:68 + def recognize(rails_req); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:20 + def routes; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:20 + def routes=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:33 + def serve(req); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:81 + def visualizer; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:95 + def ast; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:103 + def custom_routes; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:107 + def filter_routes(path); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:112 + def find_routes(req); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:137 + def match_head_routes(routes, req); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:89 + def partitioned_routes; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router.rb:99 + def simulator; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:8 +class ActionDispatch::Journey::Router::Utils + class << self + # pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:91 + def escape_fragment(fragment); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:83 + def escape_path(path); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:87 + def escape_segment(segment); end + + # Normalizes URI path. + # + # Strips off trailing slash and ensures there is a leading slash. Also converts + # downcase URL encoded string to uppercase. + # + # normalize_path("/foo") # => "/foo" + # normalize_path("/foo/") # => "/foo" + # normalize_path("foo") # => "/foo" + # normalize_path("") # => "/" + # normalize_path("/%ab") # => "/%AB" + # + # pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:19 + def normalize_path(path); end + + # Replaces any escaped sequences with their unescaped representations. + # + # uri = "/topics?title=Ruby%20on%20Rails" + # unescape_uri(uri) #=> "/topics?title=Ruby on Rails" + # + # pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:99 + def unescape_uri(uri); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:81 +ActionDispatch::Journey::Router::Utils::ENCODER = T.let(T.unsafe(nil), ActionDispatch::Journey::Router::Utils::UriEncoder) + +# URI path and fragment escaping https://tools.ietf.org/html/rfc3986 +# +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:34 +class ActionDispatch::Journey::Router::Utils::UriEncoder + # pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:52 + def escape_fragment(fragment); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:56 + def escape_path(path); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:60 + def escape_segment(segment); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:64 + def unescape_uri(uri); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:70 + def escape(component, pattern); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:74 + def percent_encode(unsafe); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:41 +ActionDispatch::Journey::Router::Utils::UriEncoder::ALPHA = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:39 +ActionDispatch::Journey::Router::Utils::UriEncoder::DEC2HEX = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:42 +ActionDispatch::Journey::Router::Utils::UriEncoder::DIGIT = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:38 +ActionDispatch::Journey::Router::Utils::UriEncoder::EMPTY = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:35 +ActionDispatch::Journey::Router::Utils::UriEncoder::ENCODE = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:46 +ActionDispatch::Journey::Router::Utils::UriEncoder::ESCAPED = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:48 +ActionDispatch::Journey::Router::Utils::UriEncoder::FRAGMENT = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:50 +ActionDispatch::Journey::Router::Utils::UriEncoder::PATH = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:49 +ActionDispatch::Journey::Router::Utils::UriEncoder::SEGMENT = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:44 +ActionDispatch::Journey::Router::Utils::UriEncoder::SUB_DELIMS = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:43 +ActionDispatch::Journey::Router::Utils::UriEncoder::UNRESERVED = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:36 +ActionDispatch::Journey::Router::Utils::UriEncoder::US_ASCII = T.let(T.unsafe(nil), Encoding) + +# pkg:gem/actionpack#lib/action_dispatch/journey/router/utils.rb:37 +ActionDispatch::Journey::Router::Utils::UriEncoder::UTF_8 = T.let(T.unsafe(nil), Encoding) + +# The Routing table. Contains all routes for a system. Routes can be added to +# the table by calling Routes#add_route. +# +# pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:9 +class ActionDispatch::Journey::Routes + include ::Enumerable + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:14 + def initialize(routes = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:67 + def add_route(name, mapping); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:12 + def anchored_routes; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:53 + def ast; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:39 + def clear; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:12 + def custom_routes; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:35 + def each(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:22 + def empty?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:31 + def last; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:26 + def length; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:45 + def partition_route(route); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:12 + def routes; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:60 + def simulator; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:29 + def size; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/journey/routes.rb:76 + def clear_cache!; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/scanner.rb:9 +class ActionDispatch::Journey::Scanner + # pkg:gem/actionpack#lib/action_dispatch/journey/scanner.rb:10 + def initialize; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/scanner.rb:18 + def eos?; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/scanner.rb:30 + def next_token; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/scanner.rb:22 + def pos; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/scanner.rb:26 + def pre_match; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/scanner.rb:14 + def scan_setup(str); end + + private + + # takes advantage of String @- deduping capabilities in Ruby 2.5 upwards see: + # https://bugs.ruby-lang.org/issues/13077 + # + # pkg:gem/actionpack#lib/action_dispatch/journey/scanner.rb:40 + def dedup_scan(regex); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/scanner.rb:45 + def scan; end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:55 +module ActionDispatch::Journey::Visitors; end + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:196 +class ActionDispatch::Journey::Visitors::Dot < ::ActionDispatch::Journey::Visitors::FunctionalVisitor + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:197 + def initialize; end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:202 + def accept(node, seed = T.unsafe(nil)); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:217 + def binary(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:224 + def nary(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:256 + def terminal(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:231 + def unary(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:241 + def visit_CAT(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:236 + def visit_GROUP(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:251 + def visit_OR(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:246 + def visit_STAR(node, seed); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:262 +ActionDispatch::Journey::Visitors::Dot::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::Dot) + +# Loop through the requirements AST. +# +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:161 +class ActionDispatch::Journey::Visitors::Each < ::ActionDispatch::Journey::Visitors::FunctionalVisitor + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:162 + def visit(node, block); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:167 +ActionDispatch::Journey::Visitors::Each::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::Each) + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:136 +class ActionDispatch::Journey::Visitors::FormatBuilder < ::ActionDispatch::Journey::Visitors::Visitor + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:137 + def accept(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:140 + def binary(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:138 + def terminal(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:144 + def visit_GROUP(n); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:146 + def visit_STAR(n); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:150 + def visit_SYMBOL(n); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:97 +class ActionDispatch::Journey::Visitors::FunctionalVisitor + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:100 + def accept(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:108 + def binary(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:113 + def nary(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:124 + def terminal(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:118 + def unary(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:104 + def visit(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:111 + def visit_CAT(n, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:128 + def visit_DOT(n, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:121 + def visit_GROUP(n, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:125 + def visit_LITERAL(n, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:116 + def visit_OR(n, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:127 + def visit_SLASH(n, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:122 + def visit_STAR(n, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:126 + def visit_SYMBOL(n, seed); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:98 +ActionDispatch::Journey::Visitors::FunctionalVisitor::DISPATCH_CACHE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:170 +class ActionDispatch::Journey::Visitors::String < ::ActionDispatch::Journey::Visitors::FunctionalVisitor + private + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:172 + def binary(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:176 + def nary(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:185 + def terminal(node, seed); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:189 + def visit_GROUP(node, seed); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:193 +ActionDispatch::Journey::Visitors::String::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::String) + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:56 +class ActionDispatch::Journey::Visitors::Visitor + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:59 + def accept(node); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:68 + def binary(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:74 + def nary(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:85 + def terminal(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:79 + def unary(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:64 + def visit(node); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:72 + def visit_CAT(n); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:89 + def visit_DOT(n); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:82 + def visit_GROUP(n); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:86 + def visit_LITERAL(n); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:77 + def visit_OR(n); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:88 + def visit_SLASH(n); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:83 + def visit_STAR(n); end + + # pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:87 + def visit_SYMBOL(n); end +end + +# pkg:gem/actionpack#lib/action_dispatch/journey/visitors.rb:57 +ActionDispatch::Journey::Visitors::Visitor::DISPATCH_CACHE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_dispatch/log_subscriber.rb:6 +class ActionDispatch::LogSubscriber < ::ActiveSupport::LogSubscriber + # pkg:gem/actionpack#lib/action_dispatch/log_subscriber.rb:7 + def redirect(event); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/log_subscriber.rb:21 + def log_levels; end + end +end + +# # Action Dispatch MiddlewareStack +# +# Read more about [Rails middleware +# stack](https://guides.rubyonrails.org/rails_on_rack.html#action-dispatcher-middleware-stack) +# in the guides. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:14 +class ActionDispatch::MiddlewareStack + include ::Enumerable + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:76 + def initialize(*args); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:93 + def [](i); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:166 + def build(app = T.unsafe(nil), &block); end + + # Deletes a middleware from the middleware stack. + # + # Returns the array of middlewares not including the deleted item, or returns + # nil if the target is not found. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:131 + def delete(target); end + + # Deletes a middleware from the middleware stack. + # + # Returns the array of middlewares not including the deleted item, or raises + # `RuntimeError` if the target is not found. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:139 + def delete!(target); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:81 + def each(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:106 + def insert(index, klass, *args, **_arg3, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:114 + def insert_after(index, *args, **_arg2, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:112 + def insert_before(index, klass, *args, **_arg3, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:89 + def last; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:74 + def middlewares; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:74 + def middlewares=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:143 + def move(target, source); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:153 + def move_after(target, source); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:151 + def move_before(target, source); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:85 + def size; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:120 + def swap(target, *args, **_arg2, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:97 + def unshift(klass, *args, **_arg2, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:161 + def use(klass, *args, **_arg2, &block); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:178 + def assert_index(index, where); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:184 + def build_middleware(klass, args, block); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:188 + def index_of(klass); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:102 + def initialize_copy(other); end +end + +# This class is used to instrument the execution of a single middleware. It +# proxies the `call` method transparently and instruments the method call. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:54 +class ActionDispatch::MiddlewareStack::InstrumentationProxy + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:57 + def initialize(middleware, class_name); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:65 + def call(env); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:55 +ActionDispatch::MiddlewareStack::InstrumentationProxy::EVENT_NAME = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:15 +class ActionDispatch::MiddlewareStack::Middleware + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:18 + def initialize(klass, args, block); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:26 + def ==(middleware); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:16 + def args; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:16 + def block; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:43 + def build(app); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:47 + def build_instrumented(app); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:35 + def inspect; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:16 + def klass; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/stack.rb:24 + def name; end +end + +# pkg:gem/actionpack#lib/action_dispatch.rb:54 +class ActionDispatch::MissingController < ::NameError; end + +# # Action Dispatch PermissionsPolicy +# +# Configures the HTTP +# [Feature-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy) +# response header to specify which browser features the current +# document and its iframes can use. +# +# Example global policy: +# +# Rails.application.config.permissions_policy do |policy| +# policy.camera :none +# policy.gyroscope :none +# policy.microphone :none +# policy.usb :none +# policy.fullscreen :self +# policy.payment :self, "https://secure.example.com" +# end +# +# The Feature-Policy header has been renamed to Permissions-Policy. The +# Permissions-Policy requires a different implementation and isn't yet supported +# by all browsers. To avoid having to rename this middleware in the future we +# use the new name for the middleware but keep the old header name and +# implementation for now. +# +# pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:31 +class ActionDispatch::PermissionsPolicy + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:111 + def initialize; end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def accelerometer(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def ambient_light_sensor(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def autoplay(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:130 + def build(context = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def camera(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:109 + def directives; end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def encrypted_media(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def fullscreen(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def geolocation(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def gyroscope(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def hid(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def idle_detection(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def magnetometer(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def microphone(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def midi(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def payment(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def picture_in_picture(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def screen_wake_lock(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def serial(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def sync_xhr(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def usb(*sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:121 + def web_share(*sources); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:148 + def apply_mapping(source); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:135 + def apply_mappings(sources); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:166 + def build_directive(sources, context); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:154 + def build_directives(context); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:116 + def initialize_copy(other); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:170 + def resolve_source(source, context); end +end + +# List of available permissions can be found at +# https://github.com/w3c/webappsec-permissions-policy/blob/main/features.md#policy-controlled-features +# +# pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:84 +ActionDispatch::PermissionsPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:77 +ActionDispatch::PermissionsPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:32 +class ActionDispatch::PermissionsPolicy::Middleware + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:33 + def initialize(app); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:37 + def call(env); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:60 + def policy_empty?(policy); end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:56 + def policy_present?(headers); end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:65 +module ActionDispatch::PermissionsPolicy::Request + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:68 + def permissions_policy; end + + # pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:72 + def permissions_policy=(policy); end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/permissions_policy.rb:66 +ActionDispatch::PermissionsPolicy::Request::POLICY = T.let(T.unsafe(nil), String) + +# # Action Dispatch PublicExceptions +# +# When called, this middleware renders an error page. By default if an HTML +# response is expected it will render static error pages from the `/public` +# directory. For example when this middleware receives a 500 response it will +# render the template found in `/public/500.html`. If an internationalized +# locale is set, this middleware will attempt to render the template in +# `/public/500..html`. If an internationalized template is not found it +# will fall back on `/public/500.html`. +# +# When a request with a content type other than HTML is made, this middleware +# will attempt to convert error information into the appropriate response type. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/public_exceptions.rb:18 +class ActionDispatch::PublicExceptions + # pkg:gem/actionpack#lib/action_dispatch/middleware/public_exceptions.rb:21 + def initialize(public_path); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/public_exceptions.rb:25 + def call(env); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/public_exceptions.rb:19 + def public_path; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/public_exceptions.rb:19 + def public_path=(_arg0); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/public_exceptions.rb:43 + def render(status, content_type, body); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/public_exceptions.rb:52 + def render_format(status, content_type, body); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/public_exceptions.rb:57 + def render_html(status); end +end + +# pkg:gem/actionpack#lib/action_dispatch.rb:51 +ActionDispatch::RFC2396_PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) + +# pkg:gem/actionpack#lib/action_dispatch/railtie.rb:10 +class ActionDispatch::Railtie < ::Rails::Railtie; end + +# # Action Dispatch Reloader +# +# ActionDispatch::Reloader wraps the request with callbacks provided by +# ActiveSupport::Reloader, intended to assist with code reloading during +# development. +# +# ActionDispatch::Reloader is included in the middleware stack only if reloading +# is enabled, which it is by the default in `development` mode. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/reloader.rb:14 +class ActionDispatch::Reloader < ::ActionDispatch::Executor; end + +# # Action Dispatch RemoteIp +# +# This middleware calculates the IP address of the remote client that is making +# the request. It does this by checking various headers that could contain the +# address, and then picking the last-set address that is not on the list of +# trusted IPs. This follows the precedent set by e.g. [the Tomcat +# server](https://issues.apache.org/bugzilla/show_bug.cgi?id=50453). A more +# detailed explanation of the algorithm is given at GetIp#calculate_ip. +# +# Some Rack servers concatenate repeated headers, like [HTTP RFC +# 2616](https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2) requires. +# Some Rack servers simply drop preceding headers, and only report the value +# that was [given in the last +# header](https://andre.arko.net/2011/12/26/repeated-headers-and-ruby-web-servers). +# If you are behind multiple proxy servers (like NGINX to HAProxy to +# Unicorn) then you should test your Rack server to make sure your data is good. +# +# IF YOU DON'T USE A PROXY, THIS MAKES YOU VULNERABLE TO IP SPOOFING. This +# middleware assumes that there is at least one proxy sitting around and setting +# headers with the client's remote IP address. If you don't use a proxy, because +# you are hosted on e.g. Heroku without SSL, any client can claim to have any IP +# address by setting the `X-Forwarded-For` header. If you care about that, then +# you need to explicitly drop or ignore those headers sometime before this +# middleware runs. Alternatively, remove this middleware to avoid inadvertently +# relying on it. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:33 +class ActionDispatch::RemoteIp + # Create a new `RemoteIp` middleware instance. + # + # The `ip_spoofing_check` option is on by default. When on, an exception is + # raised if it looks like the client is trying to lie about its own IP address. + # It makes sense to turn off this check on sites aimed at non-IP clients (like + # WAP devices), or behind proxies that set headers in an incorrect or confusing + # way (like AWS ELB). + # + # The `custom_proxies` argument can take an enumerable which will be used + # instead of `TRUSTED_PROXIES`. Any proxy setup will put the value you want in + # the middle (or at the beginning) of the `X-Forwarded-For` list, with your + # proxy servers after it. If your proxies aren't removed, pass them in via the + # `custom_proxies` parameter. That way, the middleware will ignore those IP + # addresses, and return the one that you want. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:65 + def initialize(app, ip_spoofing_check = T.unsafe(nil), custom_proxies = T.unsafe(nil)); end + + # Since the IP address may not be needed, we store the object here without + # calculating the IP to keep from slowing down the majority of requests. For + # those requests that do need to know the IP, the GetIp#calculate_ip method will + # calculate the memoized client IP address. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:93 + def call(env); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:49 + def check_ip; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:49 + def proxies; end +end + +# The GetIp class exists as a way to defer processing of the request data into +# an actual IP address. If the ActionDispatch::Request#remote_ip method is +# called, this class will calculate the value and then memoize it. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:102 +class ActionDispatch::RemoteIp::GetIp + # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:103 + def initialize(req, check_ip, proxies); end + + # Sort through the various IP address headers, looking for the IP most likely to + # be the address of the actual remote client making this request. + # + # REMOTE_ADDR will be correct if the request is made directly against the Ruby + # process, on e.g. Heroku. When the request is proxied by another server like + # HAProxy or NGINX, the IP address that made the original request will be put in + # an `X-Forwarded-For` header. If there are multiple proxies, that header may + # contain a list of IPs. Other proxy services set the `Client-Ip` header + # instead, so we check that too. + # + # As discussed in [this post about Rails IP + # Spoofing](https://web.archive.org/web/20170626095448/https://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection/), + # while the first IP in the list is likely to be the "originating" IP, it + # could also have been set by the client maliciously. + # + # In order to find the first address that is (probably) accurate, we take the + # list of IPs, remove known and trusted proxies, and then take the last address + # left, which was presumably set by one of those proxies. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:127 + def calculate_ip; end + + # Memoizes the value returned by #calculate_ip and returns it for + # ActionDispatch::Request to use. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:171 + def to_s; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:191 + def filter_proxies(ips); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:176 + def ips_from(header); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:34 +class ActionDispatch::RemoteIp::IpSpoofAttackError < ::StandardError; end + +# The default trusted IPs list simply includes IP addresses that are guaranteed +# by the IP specification to be private addresses. Those will not be the +# ultimate client IP in production, and so are discarded. See +# https://en.wikipedia.org/wiki/Private_network for details. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/remote_ip.rb:40 +ActionDispatch::RemoteIp::TRUSTED_PROXIES = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:20 +class ActionDispatch::Request + include ::ActionDispatch::Flash::RequestMethods + include ::Rack::Request::Helpers + include ::ActionDispatch::Http::Cache::Request + include ::ActionDispatch::Http::MimeNegotiation + include ::ActionDispatch::Http::Parameters + include ::ActionDispatch::Http::FilterParameters + include ::ActionDispatch::Http::URL + include ::ActionDispatch::ContentSecurityPolicy::Request + include ::ActionDispatch::PermissionsPolicy::Request + include ::Rack::Request::Env + include ::ActionDispatch::RequestCookieMethods + extend ::ActionDispatch::Http::Parameters::ClassMethods + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:62 + def initialize(env); end + + # Override Rack's GET method to support indifferent access. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:388 + def GET; end + + # Override Rack's POST method to support indifferent access. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:404 + def POST; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def accept; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def accept_charset; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def accept_encoding; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def accept_language; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def auth_type; end + + # Returns the authorization header regardless of whether it was specified + # directly or through one of the proxy alternatives. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:420 + def authorization; end + + # The request body is an IO input stream. If the RAW_POST_DATA environment + # variable is already set, wrap it in a StringIO. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:350 + def body; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:370 + def body_stream; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def cache_control; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def client_ip; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:72 + def commit_cookie_jar!; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:452 + def commit_csrf_token; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:441 + def commit_flash; end + + # Returns the content length of the request as an integer. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:285 + def content_length; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:81 + def controller_class; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:87 + def controller_class_for(name); end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:183 + def controller_instance; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:187 + def controller_instance=(controller); end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:169 + def engine_script_name(_routes); end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:173 + def engine_script_name=(name); end + + # Determine whether the request body contains form-data by checking the request + # `Content-Type` for one of the media-types: `application/x-www-form-urlencoded` + # or `multipart/form-data`. The list of form-data media types can be modified + # through the `FORM_DATA_MEDIA_TYPES` array. + # + # A request body is not assumed to contain form-data when no `Content-Type` + # header is provided and the request_method is POST. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:366 + def form_data?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def from; end + + # Returns the `String` full path including params of the last URL requested. + # + # # get "/articles" + # request.fullpath # => "/articles" + # + # # get "/articles?page=2" + # request.fullpath # => "/articles?page=2" + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:264 + def fullpath; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def gateway_interface; end + + # Provides access to the request's HTTP headers, for example: + # + # request.headers["Content-Type"] # => "text/plain" + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:225 + def headers; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:191 + def http_auth_salt; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:23 + def ignore_accept_header; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:23 + def ignore_accept_header=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:444 + def inspect; end + + # Returns the IP address of client as a `String`. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:299 + def ip; end + + # Returns true if the request has a header matching the given key parameter. + # + # request.key? :ip_spoofing_check # => true + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:108 + def key?(key); end + + # True if the request came from localhost, 127.0.0.1, or ::1. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:428 + def local?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:437 + def logger; end + + # The `String` MIME type of the request. + # + # # get "/articles" + # request.media_type # => "application/x-www-form-urlencoded" + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:280 + def media_type; end + + # Returns the original value of the environment's REQUEST_METHOD, even if it was + # overridden by middleware. See #request_method for more information. + # + # For debugging purposes, when called with arguments this method will fall back + # to Object#method + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:205 + def method(*args, **_arg1); end + + # Returns a symbol form of the #method. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:218 + def method_symbol; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def negotiate; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def origin; end + + # Returns a `String` with the last requested path including their params. + # + # # get '/foo' + # request.original_fullpath # => '/foo' + # + # # get '/foo?bar' + # request.original_fullpath # => '/foo?bar' + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:253 + def original_fullpath; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def original_script_name; end + + # Returns the original request URL as a `String`. + # + # # get "/articles?page=2" + # request.original_url # => "http://www.example.com/articles?page=2" + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:272 + def original_url; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def path_translated; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def pragma; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:401 + def query_parameters; end + + # Read the request body. This is useful for web services that need to work with + # raw requests directly. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:341 + def raw_post; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:138 + def raw_request_method; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def remote_addr; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def remote_host; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def remote_ident; end + + # Returns the IP address of client as a `String`, usually set by the RemoteIp + # middleware. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:305 + def remote_ip; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:309 + def remote_ip=(remote_ip); end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def remote_user; end + + # Returns the unique request id, which is based on either the `X-Request-Id` + # header that can be generated by a firewall, load balancer, or web server, or + # by the RequestId middleware (which sets the `action_dispatch.request_id` + # environment variable). + # + # This unique ID is useful for tracing a request from end-to-end as part of + # logging or debugging. This relies on the Rack variable set by the + # ActionDispatch::RequestId middleware. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:324 + def request_id; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:328 + def request_id=(id); end + + # Returns the HTTP method that the application should see. In the case where the + # method was overridden by a middleware (for instance, if a HEAD request was + # converted to a GET, or if a _method parameter was used to determine the method + # the application should use), this method returns the overridden value, not the + # original. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:145 + def request_method; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:177 + def request_method=(request_method); end + + # Returns a symbol form of the #request_method. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:196 + def request_method_symbol; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:416 + def request_parameters; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:432 + def request_parameters=(params); end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:448 + def reset_csrf_token; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:374 + def reset_session; end + + # Returns the URI pattern of the matched route for the request, using the same + # format as `bin/rails routes`: + # + # request.route_uri_pattern # => "/:controller(/:action(/:id))(.:format)" + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:153 + def route_uri_pattern; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:157 + def route_uri_pattern=(pattern); end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:161 + def routes; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:165 + def routes=(routes); end + + # Early Hints is an HTTP/2 status code that indicates hints to help a client + # start making preparations for processing the final response. + # + # If the env contains `rack.early_hints` then the server accepts HTTP2 push for + # link headers. + # + # The `send_early_hints` method accepts a hash of links as follows: + # + # send_early_hints("link" => "; rel=preload; as=style,; rel=preload") + # + # If you are using {javascript_include_tag}[rdoc-ref:ActionView::Helpers::AssetTagHelper#javascript_include_tag] + # or {stylesheet_link_tag}[rdoc-ref:ActionView::Helpers::AssetTagHelper#stylesheet_link_tag] + # the Early Hints headers are included by default if supported. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:242 + def send_early_hints(links); end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def server_name; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def server_protocol; end + + # Returns the lowercase name of the HTTP server software. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:335 + def server_software; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:379 + def session=(session); end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:383 + def session_options=(options); end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:332 + def uuid; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def version; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def x_csrf_token; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def x_forwarded_for; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def x_forwarded_host; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:50 + def x_request_id; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:296 + def xhr?; end + + # Returns true if the `X-Requested-With` header contains "XMLHttpRequest" + # (case-insensitive), which may need to be manually added depending on the + # choice of JavaScript libraries and frameworks. + # + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:293 + def xml_http_request?; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:457 + def check_method(name); end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:465 + def default_session; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:469 + def read_body_stream; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:481 + def reset_stream(body_stream); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:58 + def empty; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:23 + def ignore_accept_header; end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:23 + def ignore_accept_header=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:24 + def parameter_parsers; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:314 +ActionDispatch::Request::ACTION_DISPATCH_REQUEST_ID = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:36 +ActionDispatch::Request::ENV_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:129 +ActionDispatch::Request::HTTP_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:131 +ActionDispatch::Request::HTTP_METHOD_LOOKUP = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:34 +ActionDispatch::Request::LOCALHOST = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:75 +class ActionDispatch::Request::PASS_NOT_FOUND + class << self + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:76 + def action(_); end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:78 + def action_encoding_template(action); end + + # pkg:gem/actionpack#lib/action_dispatch/http/request.rb:77 + def call(_); end + end +end + +# HTTP methods from [RFC 2518: HTTP Extensions for Distributed Authoring -- WEBDAV](https://www.ietf.org/rfc/rfc2518.txt) +# +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:115 +ActionDispatch::Request::RFC2518 = T.let(T.unsafe(nil), Array) + +# HTTP methods from [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1](https://www.ietf.org/rfc/rfc2616.txt) +# +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:113 +ActionDispatch::Request::RFC2616 = T.let(T.unsafe(nil), Array) + +# HTTP methods from [RFC 3253: Versioning Extensions to WebDAV](https://www.ietf.org/rfc/rfc3253.txt) +# +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:117 +ActionDispatch::Request::RFC3253 = T.let(T.unsafe(nil), Array) + +# HTTP methods from [RFC 3648: WebDAV Ordered Collections Protocol](https://www.ietf.org/rfc/rfc3648.txt) +# +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:119 +ActionDispatch::Request::RFC3648 = T.let(T.unsafe(nil), Array) + +# HTTP methods from [RFC 3744: WebDAV Access Control Protocol](https://www.ietf.org/rfc/rfc3744.txt) +# +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:121 +ActionDispatch::Request::RFC3744 = T.let(T.unsafe(nil), Array) + +# HTTP methods from [RFC 4791: Calendaring Extensions to WebDAV](https://www.ietf.org/rfc/rfc4791.txt) +# +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:125 +ActionDispatch::Request::RFC4791 = T.let(T.unsafe(nil), Array) + +# HTTP methods from [RFC 5323: WebDAV SEARCH](https://www.ietf.org/rfc/rfc5323.txt) +# +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:123 +ActionDispatch::Request::RFC5323 = T.let(T.unsafe(nil), Array) + +# HTTP methods from [RFC 5789: PATCH Method for HTTP](https://www.ietf.org/rfc/rfc5789.txt) +# +# pkg:gem/actionpack#lib/action_dispatch/http/request.rb:127 +ActionDispatch::Request::RFC5789 = T.let(T.unsafe(nil), Array) + +# Session is responsible for lazily loading the session from store. +# +# pkg:gem/actionpack#lib/action_dispatch/request/session.rb:10 +class ActionDispatch::Request::Session + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:76 + def initialize(by, req, enabled: T.unsafe(nil)); end + + # Returns value of the key stored in the session or `nil` if the given key is + # not found in the session. + # + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:114 + def [](key); end + + # Writes given value to given key of the session. + # + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:154 + def []=(key, value); end + + # Clears the session. + # + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:160 + def clear; end + + # Deletes given key from the session. + # + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:193 + def delete(key); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:99 + def destroy; end + + # Returns the nested value specified by the sequence of keys, returning `nil` if + # any intermediate step is `nil`. + # + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:127 + def dig(*keys); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:244 + def each(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:239 + def empty?; end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:91 + def enabled?; end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:229 + def exists?; end + + # Returns value of the given key from the session, or raises `KeyError` if can't + # find the given key and no default value is set. Returns default value if + # specified. + # + # session.fetch(:foo) + # # => KeyError: key not found: "foo" + # + # session.fetch(:foo, :bar) + # # => :bar + # + # session.fetch(:foo) do + # :bar + # end + # # => :bar + # + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:212 + def fetch(key, default = T.unsafe(nil), &block); end + + # Returns true if the session has the given key or false. + # + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:134 + def has_key?(key); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:87 + def id; end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:248 + def id_was; end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:139 + def include?(key); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:221 + def inspect; end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:138 + def key?(key); end + + # Returns keys of the session as Array. + # + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:142 + def keys; end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:235 + def loaded?; end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:190 + def merge!(hash); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:95 + def options; end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:170 + def to_h; end + + # Returns the session as Hash. + # + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:166 + def to_hash; end + + # Updates the session with given Hash. + # + # session.to_hash + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2"} + # + # session.update({ "foo" => "bar" }) + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} + # + # session.to_hash + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} + # + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:182 + def update(hash); end + + # Returns values of the session as Array. + # + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:148 + def values; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:270 + def load!; end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:266 + def load_for_delete!; end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:254 + def load_for_read!; end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:258 + def load_for_write!; end + + class << self + # Creates a session hash, merging the properties of the previous session if any. + # + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:19 + def create(store, req, default_options); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:43 + def delete(req); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:29 + def disabled(req); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:35 + def find(req); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:39 + def set(req, session); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/request/session.rb:11 +class ActionDispatch::Request::Session::DisabledSessionError < ::StandardError; end + +# pkg:gem/actionpack#lib/action_dispatch/request/session.rb:12 +ActionDispatch::Request::Session::ENV_SESSION_KEY = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/request/session.rb:13 +ActionDispatch::Request::Session::ENV_SESSION_OPTIONS_KEY = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/request/session.rb:47 +class ActionDispatch::Request::Session::Options + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:56 + def initialize(by, default_options); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:61 + def [](key); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:71 + def []=(k, v); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:65 + def id(req); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:72 + def to_hash; end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:73 + def values_at(*args); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:52 + def find(req); end + + # pkg:gem/actionpack#lib/action_dispatch/request/session.rb:48 + def set(req, options); end + end +end + +# Singleton object used to determine if an optional param wasn't specified. +# +# pkg:gem/actionpack#lib/action_dispatch/request/session.rb:16 +ActionDispatch::Request::Session::Unspecified = T.let(T.unsafe(nil), Object) + +# pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:9 +class ActionDispatch::Request::Utils + # pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:10 + def perform_deep_munge; end + + # pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:10 + def perform_deep_munge=(val); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:31 + def check_param_encoding(params); end + + # pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:12 + def each_param_value(params, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:23 + def normalize_encode_params(params); end + + # pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:10 + def perform_deep_munge; end + + # pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:10 + def perform_deep_munge=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:46 + def set_binary_encoding(request, params, controller, action); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:85 +class ActionDispatch::Request::Utils::CustomParamEncoder + class << self + # pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:101 + def action_encoding_template(request, controller, action); end + + # pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:86 + def encode(request, params, controller, action); end + end +end + +# Remove nils from the params hash. +# +# pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:77 +class ActionDispatch::Request::Utils::NoNilParamEncoder < ::ActionDispatch::Request::Utils::ParamEncoder + class << self + # pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:78 + def handle_array(params); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:50 +class ActionDispatch::Request::Utils::ParamEncoder + class << self + # pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:71 + def handle_array(params); end + + # Convert nested Hash to HashWithIndifferentAccess. + # + # pkg:gem/actionpack#lib/action_dispatch/request/utils.rb:52 + def normalize_encode_params(params); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:12 +module ActionDispatch::RequestCookieMethods + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:50 + def authenticated_encrypted_cookie_salt; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:13 + def cookie_jar; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:30 + def cookie_jar=(jar); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:78 + def cookies_digest; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:82 + def cookies_rotations; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:74 + def cookies_same_site_protection; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:70 + def cookies_serializer; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:58 + def encrypted_cookie_cipher; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:42 + def encrypted_cookie_salt; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:46 + def encrypted_signed_cookie_salt; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:26 + def have_cookie_jar?; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:34 + def key_generator; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:66 + def secret_key_base; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:62 + def signed_cookie_digest; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:38 + def signed_cookie_salt; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:54 + def use_authenticated_cookie_encryption; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/cookies.rb:86 + def use_cookies_with_metadata; end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:9 +class ActionDispatch::RequestEncoder + # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:21 + def initialize(mime_name, param_encoder, response_parser, content_type); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:34 + def accept_header; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:19 + def content_type; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:38 + def encode_params(params); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:19 + def response_parser; end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:47 + def encoder(name); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:42 + def parser(content_type); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:51 + def register_encoder(mime_name, param_encoder: T.unsafe(nil), response_parser: T.unsafe(nil), content_type: T.unsafe(nil)); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:10 +class ActionDispatch::RequestEncoder::IdentityEncoder + # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:12 + def accept_header; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:11 + def content_type; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:13 + def encode_params(params); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/request_encoder.rb:14 + def response_parser; end +end + +# # Action Dispatch RequestId +# +# Makes a unique request id available to the `action_dispatch.request_id` env +# variable (which is then accessible through ActionDispatch::Request#request_id +# or the alias ActionDispatch::Request#uuid) and sends the same id to the client +# via the `X-Request-Id` header. +# +# The unique request id is either based on the `X-Request-Id` header in the +# request, which would typically be generated by a firewall, load balancer, or +# the web server, or, if this header is not available, a random uuid. If the +# header is accepted from the outside world, we sanitize it to a max of 255 +# chars and alphanumeric and dashes only. +# +# The unique request id can be used to trace a request end-to-end and would +# typically end up being part of log files from multiple pieces of the stack. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/request_id.rb:24 +class ActionDispatch::RequestId + # pkg:gem/actionpack#lib/action_dispatch/middleware/request_id.rb:25 + def initialize(app, header:); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/request_id.rb:30 + def call(env); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/request_id.rb:45 + def internal_request_id; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/request_id.rb:37 + def make_request_id(request_id); end +end + +# # Action Dispatch Response +# +# Represents an HTTP response generated by a controller action. Use it to +# retrieve the current state of the response, or customize the response. It can +# either represent a real HTTP response (i.e. one that is meant to be sent back +# to the web browser) or a TestResponse (i.e. one that is generated from +# integration tests). +# +# The Response object for the current request is exposed on controllers as +# ActionController::Metal#response. ActionController::Metal also provides a few +# additional methods that delegate to attributes of the Response such as +# ActionController::Metal#headers. +# +# Integration tests will likely also want to inspect responses in more detail. +# Methods such as Integration::RequestHelpers#get and +# Integration::RequestHelpers#post return instances of TestResponse (which +# inherits from Response) for this purpose. +# +# For example, the following demo integration test prints the body of the +# controller response to the console: +# +# class DemoControllerTest < ActionDispatch::IntegrationTest +# def test_print_root_path_to_console +# get('/') +# puts response.body +# end +# end +# +# pkg:gem/actionpack#lib/action_dispatch/http/response.rb:38 +class ActionDispatch::Response + include ::Rack::Response::Helpers + include ::ActionDispatch::Http::FilterRedirect + include ::ActionDispatch::Http::Cache::Response + include ::MonitorMixin + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:185 + def initialize(status = T.unsafe(nil), headers = T.unsafe(nil), body = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:89 + def [](*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:89 + def []=(*_arg0, **_arg1, &_arg2); end + + # Aliasing these off because AD::Http::Cache::Response defines them. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:107 + def _cache_control; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:108 + def _cache_control=(value); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:410 + def abort; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:211 + def await_commit; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:217 + def await_sent; end + + # Returns the content of the response as a string. This contains the contents of + # any calls to `render`. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:344 + def body; end + + # Allows you to manually set or override the response body. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:353 + def body=(body); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:397 + def body_parts; end + + # The charset of the response. HTML wants to know the encoding of the content + # you're giving them, so we need to send that along. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:314 + def charset; end + + # Sets the HTTP character set. In case of `nil` parameter it sets the charset to + # `default_charset`. + # + # response.charset = 'utf-16' # => 'utf-16' + # response.charset = nil # => 'utf-8' + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:303 + def charset=(charset); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:406 + def close; end + + # Returns a string to ensure compatibility with `Net::HTTPResponse`. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:325 + def code; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:221 + def commit!; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:245 + def committed?; end + + # Content type of response. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:283 + def content_type; end + + # Sets the HTTP response's content MIME type. For example, in the controller you + # could write this: + # + # response.content_type = "text/plain" + # + # If a character set has been defined for this response (see #charset=) then the + # character set information will also be included in the content type + # information. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:273 + def content_type=(content_type); end + + # Returns the response cookies, converted to a Hash of (name => value) pairs + # + # assert_equal 'AuthorOfNewPage', r.cookies['author'] + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:433 + def cookies; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:102 + def default_charset; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:102 + def default_charset=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:103 + def default_headers; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:103 + def default_headers=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:209 + def delete_header(key); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:91 + def each(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:207 + def get_header(key); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:206 + def has_header?(key); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:87 + def header; end + + # The headers for the response. + # + # header["Content-Type"] # => "text/plain" + # header["Content-Type"] = "application/json" + # header["Content-Type"] # => "application/json" + # + # Also aliased as `headers`. + # + # headers["Content-Type"] # => "text/plain" + # headers["Content-Type"] = "application/json" + # headers["Content-Type"] # => "application/json" + # + # Also aliased as `header` for compatibility. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:85 + def headers; end + + # Media type of response. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:288 + def media_type; end + + # Returns the corresponding message for the current HTTP status code: + # + # response.status = 200 + # response.message # => "OK" + # + # response.status = 404 + # response.message # => "Not Found" + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:337 + def message; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:428 + def prepare!; end + + # The location header we'll be responding with. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:404 + def redirect_url; end + + # The request that the response is responding to. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:67 + def request; end + + # The request that the response is responding to. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:67 + def request=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:393 + def reset_body!; end + + # The response code of the request. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:320 + def response_code; end + + # Send the file stored at `path` as the response body. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:388 + def send_file(path); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:229 + def sending!; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:244 + def sending?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:292 + def sending_file=(v); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:237 + def sent!; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:246 + def sent?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:208 + def set_header(key, v); end + + # The HTTP status code. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:70 + def status; end + + # Sets the HTTP status code. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:261 + def status=(status); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:340 + def status_message; end + + # The underlying body, as a streamable object. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:183 + def stream; end + + # Turns the Response into a Rack-compatible array of the status, headers, and + # body. Allows explicit splatting: + # + # status, headers, body = *response + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:424 + def to_a; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:348 + def write(string); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:503 + def assign_default_content_type_and_charset!; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:477 + def before_committed; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:485 + def before_sending; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:495 + def build_buffer(response, body); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:553 + def handle_no_content!; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:499 + def munge_body_object(body); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:457 + def parse_content_type(content_type); end + + # Small internal convenience method to get the parsed version of the current + # content type header. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:467 + def parsed_content_type_header; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:560 + def rack_response(status, headers); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:471 + def set_content_type(content_type, charset); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:173 + def create(status = T.unsafe(nil), headers = T.unsafe(nil), body = T.unsafe(nil), default_headers: T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:102 + def default_charset; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:102 + def default_charset=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:103 + def default_headers; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:103 + def default_headers=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:178 + def merge_default_headers(original, default); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:51 + def rack_status_code(status); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/response.rb:114 +class ActionDispatch::Response::Buffer + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:115 + def initialize(response, buf); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:143 + def <<(string); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:155 + def abort; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:128 + def body; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:158 + def close; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:163 + def closed?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:145 + def each(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:122 + def to_ary; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:136 + def write(string); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:168 + def each_chunk(&block); end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/response.rb:98 +ActionDispatch::Response::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/response.rb:451 +ActionDispatch::Response::CONTENT_TYPE_PARSER = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/http/response.rb:448 +class ActionDispatch::Response::ContentTypeHeader < ::Struct + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:448 + def charset; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:448 + def charset=(_); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:448 + def mime_type; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:448 + def mime_type=(_); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:448 + def [](*_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:448 + def inspect; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:448 + def keyword_init?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:448 + def members; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:448 + def new(*_arg0); end + end +end + +# Avoid having to pass an open file handle as the response body. Rack::Sendfile +# will usually intercept the response and uses the path directly, so there is no +# reason to open the file. +# +# pkg:gem/actionpack#lib/action_dispatch/http/response.rb:366 +class ActionDispatch::Response::FileBody + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:369 + def initialize(path); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:373 + def body; end + + # Stream the file's contents if Rack::Sendfile isn't present. + # + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:378 + def each; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:367 + def to_path; end +end + +# To be deprecated: +# +# pkg:gem/actionpack#lib/action_dispatch/http/response.rb:64 +ActionDispatch::Response::Header = Rack::Headers + +# pkg:gem/actionpack#lib/action_dispatch/http/response.rb:42 +ActionDispatch::Response::Headers = Rack::Headers + +# pkg:gem/actionpack#lib/action_dispatch/http/response.rb:100 +ActionDispatch::Response::NO_CONTENT_CODES = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/http/response.rb:449 +ActionDispatch::Response::NullContentTypeHeader = T.let(T.unsafe(nil), ActionDispatch::Response::ContentTypeHeader) + +# pkg:gem/actionpack#lib/action_dispatch/http/response.rb:511 +class ActionDispatch::Response::RackBody + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:512 + def initialize(response); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:522 + def body; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:544 + def call(*arguments, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:516 + def close; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:540 + def each(*args, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:528 + def respond_to?(method, include_private = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:536 + def to_ary; end + + # pkg:gem/actionpack#lib/action_dispatch/http/response.rb:548 + def to_path; end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/response.rb:526 +ActionDispatch::Response::RackBody::BODY_METHODS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_dispatch/http/response.rb:99 +ActionDispatch::Response::SET_COOKIE = T.let(T.unsafe(nil), String) + +# The routing module provides URL rewriting in native Ruby. It's a way to +# redirect incoming requests to controllers and actions. This replaces +# mod_rewrite rules. Best of all, Rails' Routing works with any web server. +# Routes are defined in `config/routes.rb`. +# +# Think of creating routes as drawing a map for your requests. The map tells +# them where to go based on some predefined pattern: +# +# Rails.application.routes.draw do +# Pattern 1 tells some request to go to one place +# Pattern 2 tell them to go to another +# ... +# end +# +# The following symbols are special: +# +# :controller maps to your controller name +# :action maps to an action with your controllers +# +# Other names simply map to a parameter as in the case of `:id`. +# +# ## Resources +# +# Resource routing allows you to quickly declare all of the common routes for a +# given resourceful controller. Instead of declaring separate routes for your +# `index`, `show`, `new`, `edit`, `create`, `update`, and `destroy` actions, a +# resourceful route declares them in a single line of code: +# +# resources :photos +# +# Sometimes, you have a resource that clients always look up without referencing +# an ID. A common example, /profile always shows the profile of the currently +# logged in user. In this case, you can use a singular resource to map /profile +# (rather than /profile/:id) to the show action. +# +# resource :profile +# +# It's common to have resources that are logically children of other resources: +# +# resources :magazines do +# resources :ads +# end +# +# You may wish to organize groups of controllers under a namespace. Most +# commonly, you might group a number of administrative controllers under an +# `admin` namespace. You would place these controllers under the +# `app/controllers/admin` directory, and you can group them together in your +# router: +# +# namespace "admin" do +# resources :posts, :comments +# end +# +# Alternatively, you can add prefixes to your path without using a separate +# directory by using `scope`. `scope` takes additional options which apply to +# all enclosed routes. +# +# scope path: "/cpanel", as: 'admin' do +# resources :posts, :comments +# end +# +# For more, see Routing::Mapper::Resources#resources, +# Routing::Mapper::Scoping#namespace, and Routing::Mapper::Scoping#scope. +# +# ## Non-resourceful routes +# +# For routes that don't fit the `resources` mold, you can use the HTTP helper +# methods `get`, `post`, `patch`, `put` and `delete`. +# +# get 'post/:id', to: 'posts#show' +# post 'post/:id', to: 'posts#create_comment' +# +# Now, if you POST to `/posts/:id`, it will route to the `create_comment` +# action. A GET on the same URL will route to the `show` action. +# +# If your route needs to respond to more than one HTTP method (or all methods) +# then using the `:via` option on `match` is preferable. +# +# match 'post/:id', to: 'posts#show', via: [:get, :post] +# +# ## Named routes +# +# Routes can be named by passing an `:as` option, allowing for easy reference +# within your source as `name_of_route_url` for the full URL and +# `name_of_route_path` for the URI path. +# +# Example: +# +# # In config/routes.rb +# get '/login', to: 'accounts#login', as: 'login' +# +# # With render, redirect_to, tests, etc. +# redirect_to login_url +# +# Arguments can be passed as well. +# +# redirect_to show_item_path(id: 25) +# +# Use `root` as a shorthand to name a route for the root path "/". +# +# # In config/routes.rb +# root to: 'blogs#index' +# +# # would recognize http://www.example.com/ as +# params = { controller: 'blogs', action: 'index' } +# +# # and provide these named routes +# root_url # => 'http://www.example.com/' +# root_path # => '/' +# +# Note: when using `controller`, the route is simply named after the method you +# call on the block parameter rather than map. +# +# # In config/routes.rb +# controller :blog do +# get 'blog/show' => :list +# get 'blog/delete' => :delete +# get 'blog/edit' => :edit +# end +# +# # provides named routes for show, delete, and edit +# link_to @article.title, blog_show_path(id: @article.id) +# +# ## Pretty URLs +# +# Routes can generate pretty URLs. For example: +# +# get '/articles/:year/:month/:day', to: 'articles#find_by_id', constraints: { +# year: /\d{4}/, +# month: /\d{1,2}/, +# day: /\d{1,2}/ +# } +# +# Using the route above, the URL "http://localhost:3000/articles/2005/11/06" +# maps to +# +# params = {year: '2005', month: '11', day: '06'} +# +# ## Regular Expressions and parameters +# You can specify a regular expression to define a format for a parameter. +# +# controller 'geocode' do +# get 'geocode/:postalcode', to: :show, constraints: { +# postalcode: /\d{5}(-\d{4})?/ +# } +# end +# +# Constraints can include the 'ignorecase' and 'extended syntax' regular +# expression modifiers: +# +# controller 'geocode' do +# get 'geocode/:postalcode', to: :show, constraints: { +# postalcode: /hx\d\d\s\d[a-z]{2}/i +# } +# end +# +# controller 'geocode' do +# get 'geocode/:postalcode', to: :show, constraints: { +# postalcode: /# Postalcode format +# \d{5} #Prefix +# (-\d{4})? #Suffix +# /x +# } +# end +# +# Using the multiline modifier will raise an `ArgumentError`. Encoding regular +# expression modifiers are silently ignored. The match will always use the +# default encoding or ASCII. +# +# ## External redirects +# +# You can redirect any path to another path using the redirect helper in your +# router: +# +# get "/stories", to: redirect("/posts") +# +# ## Unicode character routes +# +# You can specify unicode character routes in your router: +# +# get "こんにちは", to: "welcome#index" +# +# ## Routing to Rack Applications +# +# Instead of a String, like `posts#index`, which corresponds to the index action +# in the PostsController, you can specify any Rack application as the endpoint +# for a matcher: +# +# get "/application.js", to: Sprockets +# +# ## Reloading routes +# +# You can reload routes if you feel you must: +# +# Rails.application.reload_routes! +# +# This will clear all named routes and reload config/routes.rb if the file has +# been modified from last load. To absolutely force reloading, use `reload!`. +# +# ## Testing Routes +# +# The two main methods for testing your routes: +# +# ### `assert_routing` +# +# def test_movie_route_properly_splits +# opts = {controller: "plugin", action: "checkout", id: "2"} +# assert_routing "plugin/checkout/2", opts +# end +# +# `assert_routing` lets you test whether or not the route properly resolves into +# options. +# +# ### `assert_recognizes` +# +# def test_route_has_options +# opts = {controller: "plugin", action: "show", id: "12"} +# assert_recognizes opts, "/plugins/show/12" +# end +# +# Note the subtle difference between the two: `assert_routing` tests that a URL +# fits options while `assert_recognizes` tests that a URL breaks into parameters +# properly. +# +# In tests you can simply pass the URL or named route to `get` or `post`. +# +# def send_to_jail +# get '/jail' +# assert_response :success +# end +# +# def goes_to_login +# get login_url +# #... +# end +# +# ## View a list of all your routes +# +# $ bin/rails routes +# +# Target a specific controller with `-c`, or grep routes using `-g`. Useful in +# conjunction with `--expanded` which displays routes vertically. +# +# pkg:gem/actionpack#lib/action_dispatch/routing.rb:248 +module ActionDispatch::Routing + extend ::ActiveSupport::Autoload +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:155 +module ActionDispatch::Routing::ConsoleFormatter; end + +# pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:156 +class ActionDispatch::Routing::ConsoleFormatter::Base + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:157 + def initialize; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:171 + def header(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:174 + def no_routes(routes, filter); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:161 + def result; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:168 + def section(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:165 + def section_title(title); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:228 +class ActionDispatch::Routing::ConsoleFormatter::Expanded < ::ActionDispatch::Routing::ConsoleFormatter::Base + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:229 + def initialize(width: T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:238 + def section(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:234 + def section_title(title); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:243 + def draw_expanded_section(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:258 + def route_header(index:); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:192 +class ActionDispatch::Routing::ConsoleFormatter::Sheet < ::ActionDispatch::Routing::ConsoleFormatter::Base + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:201 + def header(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:197 + def section(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:193 + def section_title(title); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:215 + def draw_header(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:206 + def draw_section(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:221 + def widths(routes); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:263 +class ActionDispatch::Routing::ConsoleFormatter::Unused < ::ActionDispatch::Routing::ConsoleFormatter::Sheet + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:264 + def header(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:272 + def no_routes(routes, filter); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/endpoint.rb:7 +class ActionDispatch::Routing::Endpoint + # pkg:gem/actionpack#lib/action_dispatch/routing/endpoint.rb:11 + def app; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/endpoint.rb:8 + def dispatcher?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/endpoint.rb:14 + def engine?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/endpoint.rb:10 + def matches?(req); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/endpoint.rb:12 + def rack_app; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/endpoint.rb:9 + def redirect?; end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing.rb:260 +ActionDispatch::Routing::HTTP_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:285 +class ActionDispatch::Routing::HtmlTableFormatter + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:286 + def initialize(view); end + + # The header is part of the HTML page, so we don't construct it here. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:300 + def header(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:303 + def no_routes(*_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:316 + def result; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:295 + def section(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:291 + def section_title(title); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:14 +class ActionDispatch::Routing::Mapper + include ::ActionDispatch::Routing::Mapper::Base + include ::ActionDispatch::Routing::Mapper::HttpHelpers + include ::ActionDispatch::Routing::Redirection + include ::ActionDispatch::Routing::Mapper::Scoping + include ::ActionDispatch::Routing::Mapper::Concerns + include ::ActionDispatch::Routing::Mapper::Resources + include ::ActionDispatch::Routing::Mapper::CustomUrls + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2349 + def initialize(set); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:27 + def backtrace_cleaner; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:27 + def backtrace_cleaner=(val); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:429 + def normalize_name(name); end + + # Invokes Journey::Router::Utils.normalize_path, then ensures that /(:locale) + # becomes (/:locale). Except for root cases, where the former is the correct + # one. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:414 + def normalize_path(path); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:26 + def route_source_locations; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:26 + def route_source_locations=(val); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:15 +class ActionDispatch::Routing::Mapper::BacktraceCleaner < ::ActiveSupport::BacktraceCleaner + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:16 + def initialize; end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:433 +module ActionDispatch::Routing::Mapper::Base + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:665 + def default_url_options(options); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:662 + def default_url_options=(options); end + + # Query if the following named route was already defined. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:674 + def has_named_route?(name); end + + # Matches a URL pattern to one or more routes. + # + # You should not use the `match` method in your router without specifying an + # HTTP method. + # + # If you want to expose your action to both GET and POST, use: + # + # # sets :controller, :action, and :id in params + # match ':controller/:action/:id', via: [:get, :post] + # + # Note that `:controller`, `:action`, and `:id` are interpreted as URL query + # parameters and thus available through `params` in an action. + # + # If you want to expose your action to GET, use `get` in the router: + # + # Instead of: + # + # match ":controller/:action/:id" + # + # Do: + # + # get ":controller/:action/:id" + # + # Two of these symbols are special, `:controller` maps to the controller and + # `:action` to the controller's action. A pattern can also map wildcard segments + # (globs) to params: + # + # get 'songs/*category/:title', to: 'songs#show' + # + # # 'songs/rock/classic/stairway-to-heaven' sets + # # params[:category] = 'rock/classic' + # # params[:title] = 'stairway-to-heaven' + # + # To match a wildcard parameter, it must have a name assigned to it. Without a + # variable name to attach the glob parameter to, the route can't be parsed. + # + # When a pattern points to an internal route, the route's `:action` and + # `:controller` should be set in options or hash shorthand. Examples: + # + # match 'photos/:id' => 'photos#show', via: :get + # match 'photos/:id', to: 'photos#show', via: :get + # match 'photos/:id', controller: 'photos', action: 'show', via: :get + # + # A pattern can also point to a `Rack` endpoint i.e. anything that responds to + # `call`: + # + # match 'photos/:id', to: -> (hash) { [200, {}, ["Coming soon"]] }, via: :get + # match 'photos/:id', to: PhotoRackApp, via: :get + # # Yes, controller actions are just rack endpoints + # match 'photos/:id', to: PhotosController.action(:show), via: :get + # + # Because requesting various HTTP verbs with a single action has security + # implications, you must either specify the actions in the via options or use + # one of the [HttpHelpers](rdoc-ref:HttpHelpers) instead `match` + # + # ### Options + # + # Any options not seen here are passed on as params with the URL. + # + # :controller + # + # :action + # + # :param + # segment used to generate the routes). You can access that segment from + # your controller using `params[<:param>]`. In your router: + # + # resources :users, param: :name + # + # The `users` resource here will have the following routes generated for it: + # + # GET /users(.:format) + # POST /users(.:format) + # GET /users/new(.:format) + # GET /users/:name/edit(.:format) + # GET /users/:name(.:format) + # PATCH/PUT /users/:name(.:format) + # DELETE /users/:name(.:format) + # + # You can override `ActiveRecord::Base#to_param` of a related model to + # construct a URL: + # + # class User < ActiveRecord::Base + # def to_param + # name + # end + # end + # + # user = User.find_by(name: 'Phusion') + # user_path(user) # => "/users/Phusion" + # + # :path + # + # :module + # + # match 'path', to: 'c#a', module: 'sekret', controller: 'posts', via: :get + # # => Sekret::PostsController + # + # See `Scoping#namespace` for its scope equivalent. + # + # :as + # + # :via + # + # match 'path', to: 'c#a', via: :get + # match 'path', to: 'c#a', via: [:get, :post] + # match 'path', to: 'c#a', via: :all + # + # :to + # string representing a controller's action. + # + # match 'path', to: 'controller#action', via: :get + # match 'path', to: -> (env) { [200, {}, ["Success!"]] }, via: :get + # match 'path', to: RackApp, via: :get + # + # :on + # are `:member`, `:collection`, and `:new`. Only use within `resource(s)` + # block. For example: + # + # resource :bar do + # match 'foo', to: 'c#a', on: :member, via: [:get, :post] + # end + # + # Is equivalent to: + # + # resource :bar do + # member do + # match 'foo', to: 'c#a', via: [:get, :post] + # end + # end + # + # :constraints + # responds to `matches?`. In addition, constraints other than path can also + # be specified with any object that responds to `===` (e.g. String, Array, + # Range, etc.). + # + # match 'path/:id', constraints: { id: /[A-Z]\d{5}/ }, via: :get + # + # match 'json_only', constraints: { format: 'json' }, via: :get + # + # class PermitList + # def matches?(request) request.remote_ip == '1.2.3.4' end + # end + # match 'path', to: 'c#a', constraints: PermitList.new, via: :get + # + # See `Scoping#constraints` for more examples with its scope equivalent. + # + # :defaults + # + # # Sets params[:format] to 'jpg' by default + # match 'path', to: 'c#a', defaults: { format: 'jpg' }, via: :get + # + # See `Scoping#defaults` for its scope equivalent. + # + # :anchor + # the pattern matches any request prefixed with the given path. + # + # # Matches any request starting with 'path' + # match 'path', to: 'c#a', anchor: false, via: :get + # + # :format + # disable it by supplying `false`. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:610 + def match(path, options = T.unsafe(nil)); end + + # Mount a Rack-based application to be used within the application. + # + # mount SomeRackApp, at: "some_route" + # + # Alternatively: + # + # mount(SomeRackApp => "some_route") + # + # For options, see `match`, as `mount` uses it internally. + # + # All mounted applications come with routing helpers to access them. These are + # named after the class specified, so for the above example the helper is either + # `some_rack_app_path` or `some_rack_app_url`. To customize this helper's name, + # use the `:as` option: + # + # mount(SomeRackApp => "some_route", as: "exciting") + # + # This will generate the `exciting_path` and `exciting_url` helpers which can be + # used to navigate to this mounted app. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:632 + def mount(app, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:667 + def with_default_scope(scope, &block); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:683 + def app_name(app, rails_app); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:692 + def define_generate_prefix(app, name); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:679 + def rails_app?(app); end +end + +# Routing Concerns allow you to declare common routes that can be reused inside +# others resources and routes. +# +# concern :commentable do +# resources :comments +# end +# +# concern :image_attachable do +# resources :images, only: :index +# end +# +# These concerns are used in Resources routing: +# +# resources :messages, concerns: [:commentable, :image_attachable] +# +# or in a scope or namespace: +# +# namespace :posts do +# concerns :commentable +# end +# +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2061 +module ActionDispatch::Routing::Mapper::Concerns + # Define a routing concern using a name. + # + # Concerns may be defined inline, using a block, or handled by another object, + # by passing that object as the second parameter. + # + # The concern object, if supplied, should respond to `call`, which will receive + # two parameters: + # + # * The current mapper + # * A hash of options which the concern object may use + # + # Options may also be used by concerns defined in a block by accepting a block + # parameter. So, using a block, you might do something as simple as limit the + # actions available on certain resources, passing standard resource options + # through the concern: + # + # concern :commentable do |options| + # resources :comments, options + # end + # + # resources :posts, concerns: :commentable + # resources :archived_posts do + # # Don't allow comments on archived posts + # concerns :commentable, only: [:index, :show] + # end + # + # Or, using a callable object, you might implement something more specific to + # your application, which would be out of place in your routes file. + # + # # purchasable.rb + # class Purchasable + # def initialize(defaults = {}) + # @defaults = defaults + # end + # + # def call(mapper, options = {}) + # options = @defaults.merge(options) + # mapper.resources :purchases + # mapper.resources :receipts + # mapper.resources :returns if options[:returnable] + # end + # end + # + # # routes.rb + # concern :purchasable, Purchasable.new(returnable: true) + # + # resources :toys, concerns: :purchasable + # resources :electronics, concerns: :purchasable + # resources :pets do + # concerns :purchasable, returnable: false + # end + # + # Any routing helpers can be used inside a concern. If using a callable, they're + # accessible from the Mapper that's passed to `call`. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2116 + def concern(name, callable = T.unsafe(nil), &block); end + + # Use the named concerns + # + # resources :posts do + # concerns :commentable + # end + # + # Concerns also work in any routes helper that you want to use: + # + # namespace :posts do + # concerns :commentable + # end + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2132 + def concerns(*args); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:29 +class ActionDispatch::Routing::Mapper::Constraints < ::ActionDispatch::Routing::Endpoint + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:35 + def initialize(app, constraints, strategy); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:30 + def app; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:30 + def constraints; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:50 + def dispatcher?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:52 + def matches?(req); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:59 + def serve(req); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:66 + def constraint_args(constraint, request); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:33 +ActionDispatch::Routing::Mapper::Constraints::CALL = T.let(T.unsafe(nil), Proc) + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:32 +ActionDispatch::Routing::Mapper::Constraints::SERVE = T.let(T.unsafe(nil), Proc) + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2144 +module ActionDispatch::Routing::Mapper::CustomUrls + # Define custom URL helpers that will be added to the application's routes. This + # allows you to override and/or replace the default behavior of routing helpers, + # e.g: + # + # direct :homepage do + # "https://rubyonrails.org" + # end + # + # direct :commentable do |model| + # [ model, anchor: model.dom_id ] + # end + # + # direct :main do + # { controller: "pages", action: "index", subdomain: "www" } + # end + # + # The return value from the block passed to `direct` must be a valid set of + # arguments for `url_for` which will actually build the URL string. This can be + # one of the following: + # + # * A string, which is treated as a generated URL + # * A hash, e.g. `{ controller: "pages", action: "index" }` + # * An array, which is passed to `polymorphic_url` + # * An Active Model instance + # * An Active Model class + # + # + # NOTE: Other URL helpers can be called in the block but be careful not to + # invoke your custom URL helper again otherwise it will result in a stack + # overflow error. + # + # You can also specify default options that will be passed through to your URL + # helper definition, e.g: + # + # direct :browse, page: 1, size: 10 do |options| + # [ :products, options.merge(params.permit(:page, :size).to_h.symbolize_keys) ] + # end + # + # In this instance the `params` object comes from the context in which the block + # is executed, e.g. generating a URL inside a controller action or a view. If + # the block is executed where there isn't a `params` object such as this: + # + # Rails.application.routes.url_helpers.browse_path + # + # then it will raise a `NameError`. Because of this you need to be aware of the + # context in which you will use your custom URL helper when defining it. + # + # NOTE: The `direct` method can't be used inside of a scope block such as + # `namespace` or `scope` and will raise an error if it detects that it is. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2194 + def direct(name, options = T.unsafe(nil), &block); end + + # Define custom polymorphic mappings of models to URLs. This alters the behavior + # of `polymorphic_url` and consequently the behavior of `link_to` and `form_for` + # when passed a model instance, e.g: + # + # resource :basket + # + # resolve "Basket" do + # [:basket] + # end + # + # This will now generate "/basket" when a `Basket` instance is passed to + # `link_to` or `form_for` instead of the standard "/baskets/:id". + # + # NOTE: This custom behavior only applies to simple polymorphic URLs where a + # single model instance is passed and not more complicated forms, e.g: + # + # # config/routes.rb + # resource :profile + # namespace :admin do + # resources :users + # end + # + # resolve("User") { [:profile] } + # + # # app/views/application/_menu.html.erb + # link_to "Profile", @current_user + # link_to "Profile", [:admin, @current_user] + # + # The first `link_to` will generate "/profile" but the second will generate the + # standard polymorphic URL of "/admin/users/1". + # + # You can pass options to a polymorphic mapping - the arity for the block needs + # to be two as the instance is passed as the first argument, e.g: + # + # resolve "Basket", anchor: "items" do |basket, options| + # [:basket, options] + # end + # + # This generates the URL "/basket#items" because when the last item in an array + # passed to `polymorphic_url` is a hash then it's treated as options to the URL + # helper that gets called. + # + # NOTE: The `resolve` method can't be used inside of a scope block such as + # `namespace` or `scope` and will raise an error if it detects that it is. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2246 + def resolve(*args, &block); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:727 +module ActionDispatch::Routing::Mapper::HttpHelpers + # Define a route that only recognizes HTTP DELETE. For supported arguments, see + # [match](rdoc-ref:Base#match) + # + # delete 'broccoli', to: 'food#broccoli' + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:764 + def delete(*args, &block); end + + # Define a route that only recognizes HTTP GET. For supported arguments, see + # [match](rdoc-ref:Base#match) + # + # get 'bacon', to: 'food#bacon' + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:732 + def get(*args, &block); end + + # Define a route that only recognizes HTTP OPTIONS. For supported arguments, see + # [match](rdoc-ref:Base#match) + # + # options 'carrots', to: 'food#carrots' + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:772 + def options(*args, &block); end + + # Define a route that only recognizes HTTP PATCH. For supported arguments, see + # [match](rdoc-ref:Base#match) + # + # patch 'bacon', to: 'food#bacon' + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:748 + def patch(*args, &block); end + + # Define a route that only recognizes HTTP POST. For supported arguments, see + # [match](rdoc-ref:Base#match) + # + # post 'bacon', to: 'food#bacon' + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:740 + def post(*args, &block); end + + # Define a route that only recognizes HTTP PUT. For supported arguments, see + # [match](rdoc-ref:Base#match) + # + # put 'bacon', to: 'food#bacon' + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:756 + def put(*args, &block); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:777 + def map_method(method, args, &block); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:83 +class ActionDispatch::Routing::Mapper::Mapping + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:132 + def initialize(set:, ast:, controller:, default_action:, to:, formatted:, via:, options_constraints:, anchor:, scope_params:, options:); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:190 + def application; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 + def ast; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:194 + def conditions; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 + def default_action; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 + def default_controller; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 + def defaults; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:183 + def make_route(name, precedence); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 + def path; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 + def required_defaults; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 + def requirements; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 + def scope_options; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:87 + def to; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:334 + def add_controller_module(controller, modyoule); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:295 + def app(blocks); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:353 + def blocks(callable_constraint); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:198 + def build_conditions(current_conditions, request_class); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:307 + def check_controller_and_action(path_params, controller, action); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:322 + def check_part(name, part, path_params, hash); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:360 + def constraints(options, path_params); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:374 + def dispatcher(raise_on_name_error); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:213 + def intern(object); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:291 + def normalize_defaults(options); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:259 + def normalize_format(formatted); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:217 + def normalize_options!(options, path_params, modyoule); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:207 + def request_method; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:379 + def route_source_location; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:253 + def split_constraints(path_params, constraints); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:346 + def translate_controller(controller); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:275 + def verify_regexp_requirements(requirements, wildcard_options); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:90 + def build(scope, set, ast, controller, default_action, to, via, formatted, options_constraints, anchor, options); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:104 + def check_via(via); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:116 + def normalize_path(path, format); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:128 + def optional_format?(path, format); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:84 +ActionDispatch::Routing::Mapper::Mapping::ANCHOR_CHARACTERS_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:181 +ActionDispatch::Routing::Mapper::Mapping::JOINED_SEPARATORS = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:85 +ActionDispatch::Routing::Mapper::Mapping::OPTIONAL_FORMAT_REGEX = T.let(T.unsafe(nil), Regexp) + +# Resource routing allows you to quickly declare all of the common routes for a +# given resourceful controller. Instead of declaring separate routes for your +# `index`, `show`, `new`, `edit`, `create`, `update`, and `destroy` actions, a +# resourceful route declares them in a single line of code: +# +# resources :photos +# +# Sometimes, you have a resource that clients always look up without referencing +# an ID. A common example, /profile always shows the profile of the currently +# logged in user. In this case, you can use a singular resource to map /profile +# (rather than /profile/:id) to the show action. +# +# resource :profile +# +# It's common to have resources that are logically children of other resources: +# +# resources :magazines do +# resources :ads +# end +# +# You may wish to organize groups of controllers under a namespace. Most +# commonly, you might group a number of administrative controllers under an +# `admin` namespace. You would place these controllers under the +# `app/controllers/admin` directory, and you can group them together in your +# router: +# +# namespace "admin" do +# resources :posts, :comments +# end +# +# By default the `:id` parameter doesn't accept dots. If you need to use dots as +# part of the `:id` parameter add a constraint which overrides this restriction, +# e.g: +# +# resources :articles, id: /[^\/]+/ +# +# This allows any character other than a slash as part of your `:id`. +# +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1169 +module ActionDispatch::Routing::Mapper::Resources + # To add a route to the collection: + # + # resources :photos do + # collection do + # get 'search' + # end + # end + # + # This will enable Rails to recognize paths such as `/photos/search` with GET, + # and route to the search action of `PhotosController`. It will also create the + # `search_photos_url` and `search_photos_path` route helpers. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1548 + def collection(&block); end + + # Loads another routes file with the given `name` located inside the + # `config/routes` directory. In that file, you can use the normal routing DSL, + # but *do not* surround it with a `Rails.application.routes.draw` block. + # + # # config/routes.rb + # Rails.application.routes.draw do + # draw :admin # Loads `config/routes/admin.rb` + # draw "third_party/some_gem" # Loads `config/routes/third_party/some_gem.rb` + # end + # + # # config/routes/admin.rb + # namespace :admin do + # resources :accounts + # end + # + # # config/routes/third_party/some_gem.rb + # mount SomeGem::Engine, at: "/some_gem" + # + # **CAUTION:** Use this feature with care. Having multiple routes files can + # negatively impact discoverability and readability. For most applications — + # even those with a few hundred routes — it's easier for developers to have a + # single routes file. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1657 + def draw(name); end + + # Matches a URL pattern to one or more routes. For more information, see + # [match](rdoc-ref:Base#match). + # + # match 'path' => 'controller#action', via: :patch + # match 'path', to: 'controller#action', via: :post + # match 'path', 'otherpath', on: :member, via: :get + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1679 + def match(path, *rest, &block); end + + # To add a member route, add a member block into the resource block: + # + # resources :photos do + # member do + # get 'preview' + # end + # end + # + # This will recognize `/photos/1/preview` with GET, and route to the preview + # action of `PhotosController`. It will also create the `preview_photo_url` and + # `preview_photo_path` helpers. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1569 + def member(&block); end + + # See ActionDispatch::Routing::Mapper::Scoping#namespace. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1616 + def namespace(path, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1595 + def nested(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1585 + def new(&block); end + + # Sometimes, you have a resource that clients always look up without referencing + # an ID. A common example, /profile always shows the profile of the currently + # logged in user. In this case, you can use a singular resource to map /profile + # (rather than /profile/:id) to the show action: + # + # resource :profile + # + # This creates six different routes in your application, all mapping to the + # `Profiles` controller (note that the controller is named after the plural): + # + # GET /profile/new + # GET /profile + # GET /profile/edit + # PATCH/PUT /profile + # DELETE /profile + # POST /profile + # + # If you want instances of a model to work with this resource via record + # identification (e.g. in `form_with` or `redirect_to`), you will need to call + # [resolve](rdoc-ref:CustomUrls#resolve): + # + # resource :profile + # resolve('Profile') { [:profile] } + # + # # Enables this to work with singular routes: + # form_with(model: @profile) {} + # + # ### Options + # Takes same options as [resources](rdoc-ref:#resources) + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1337 + def resource(*resources, &block); end + + # In Rails, a resourceful route provides a mapping between HTTP verbs and URLs + # and controller actions. By convention, each action also maps to particular + # CRUD operations in a database. A single entry in the routing file, such as + # + # resources :photos + # + # creates seven different routes in your application, all mapping to the + # `Photos` controller: + # + # GET /photos + # GET /photos/new + # POST /photos + # GET /photos/:id + # GET /photos/:id/edit + # PATCH/PUT /photos/:id + # DELETE /photos/:id + # + # Resources can also be nested infinitely by using this block syntax: + # + # resources :photos do + # resources :comments + # end + # + # This generates the following comments routes: + # + # GET /photos/:photo_id/comments + # GET /photos/:photo_id/comments/new + # POST /photos/:photo_id/comments + # GET /photos/:photo_id/comments/:id + # GET /photos/:photo_id/comments/:id/edit + # PATCH/PUT /photos/:photo_id/comments/:id + # DELETE /photos/:photo_id/comments/:id + # + # ### Options + # Takes same options as [match](rdoc-ref:Base#match) as well as: + # + # :path_names + # actions. Actions not specified are not changed. + # + # resources :posts, path_names: { new: "brand_new" } + # + # The above example will now change /posts/new to /posts/brand_new. + # + # :path + # + # resources :posts, path: 'postings' + # + # The resource and all segments will now route to /postings instead of + # /posts. + # + # :only + # + # resources :cows, only: :show + # resources :cows, only: [:show, :index] + # + # :except + # + # resources :cows, except: :show + # resources :cows, except: [:show, :index] + # + # :shallow + # resource, generates shallow routes for all nested resources. + # + # resources :posts, shallow: true do + # resources :comments + # end + # + # Is the same as: + # + # resources :posts do + # resources :comments, except: [:show, :edit, :update, :destroy] + # end + # resources :comments, only: [:show, :edit, :update, :destroy] + # + # This allows URLs for resources that otherwise would be deeply nested such + # as a comment on a blog post like `/posts/a-long-permalink/comments/1234` + # to be shortened to just `/comments/1234`. + # + # Set `shallow: false` on a child resource to ignore a parent's shallow + # parameter. + # + # :shallow_path + # + # scope shallow_path: "sekret" do + # resources :posts do + # resources :comments, shallow: true + # end + # end + # + # The `comments` resource here will have the following routes generated for + # it: + # + # post_comments GET /posts/:post_id/comments(.:format) + # post_comments POST /posts/:post_id/comments(.:format) + # new_post_comment GET /posts/:post_id/comments/new(.:format) + # edit_comment GET /sekret/comments/:id/edit(.:format) + # comment GET /sekret/comments/:id(.:format) + # comment PATCH/PUT /sekret/comments/:id(.:format) + # comment DELETE /sekret/comments/:id(.:format) + # + # :shallow_prefix + # + # scope shallow_prefix: "sekret" do + # resources :posts do + # resources :comments, shallow: true + # end + # end + # + # The `comments` resource here will have the following routes generated for + # it: + # + # post_comments GET /posts/:post_id/comments(.:format) + # post_comments POST /posts/:post_id/comments(.:format) + # new_post_comment GET /posts/:post_id/comments/new(.:format) + # edit_sekret_comment GET /comments/:id/edit(.:format) + # sekret_comment GET /comments/:id(.:format) + # sekret_comment PATCH/PUT /comments/:id(.:format) + # sekret_comment DELETE /comments/:id(.:format) + # + # :format + # disable it by supplying `false`. + # + # :param + # + # + # ### Examples + # + # # routes call Admin::PostsController + # resources :posts, module: "admin" + # + # # resource actions are at /admin/posts. + # resources :posts, path: "admin/posts" + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1507 + def resources(*resources, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1304 + def resources_path_names(options); end + + # You can specify what Rails should route "/" to with the root method: + # + # root to: 'pages#main' + # + # For options, see `match`, as `root` uses it internally. + # + # You can also pass a string which will expand + # + # root 'pages#main' + # + # You should put the root route at the top of `config/routes.rb`, because this + # means it will be matched first. As this is the most popular route of most + # Rails applications, this is beneficial. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1726 + def root(path, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1624 + def shallow; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1631 + def shallow?; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1790 + def action_options?(options); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1872 + def action_path(name); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2008 + def add_route(action, controller, options, _path, to, via, formatted, anchor, options_constraints); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1926 + def api_only?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1785 + def apply_action_options(options); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1751 + def apply_common_behavior_for(method, resources, options, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1848 + def canonical_action?(action); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1993 + def decomposed_match(path, controller, options, _path, to, via, formatted, anchor, options_constraints); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1978 + def get_to_from_path(path, to, action); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1937 + def map_match(paths, options); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2035 + def match_root_route(options); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1888 + def name_for_action(as, action); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1825 + def nested_options; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1806 + def nested_scope?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1844 + def param_constraint; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1840 + def param_constraint?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1747 + def parent_resource; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1862 + def path_for_action(action, path); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1930 + def path_scope(path); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1876 + def prefix_name_for_action(as, action); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1802 + def resource_method_scope?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1817 + def resource_scope(resource, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1798 + def resource_scope?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1794 + def scope_action_options; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1914 + def set_member_mappings_for_resource; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1834 + def shallow_nesting_depth; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1852 + def shallow_scope; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1989 + def using_match_shorthand?(path); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1810 + def with_scope_level(kind); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1174 +ActionDispatch::Routing::Mapper::Resources::CANONICAL_ACTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1173 +ActionDispatch::Routing::Mapper::Resources::RESOURCE_OPTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1176 +class ActionDispatch::Routing::Mapper::Resources::Resource + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1179 + def initialize(entities, api_only, shallow, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1204 + def actions; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1212 + def available_actions; end + + # Checks for uncountable plurals, and appends "_index" if the plural and + # singular form are the same. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1236 + def collection_name; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1244 + def collection_scope; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1177 + def controller; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1196 + def default_actions; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1232 + def member_name; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1246 + def member_scope; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1220 + def name; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1256 + def nested_param; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1260 + def nested_scope; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1252 + def new_scope(new_path); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1177 + def param; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1177 + def path; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1224 + def plural; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1240 + def resource_scope; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1264 + def shallow?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1250 + def shallow_scope; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1268 + def singleton?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1228 + def singular; end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1271 +class ActionDispatch::Routing::Mapper::Resources::SingletonResource < ::ActionDispatch::Routing::Mapper::Resources::Resource + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1272 + def initialize(entities, api_only, shallow, options); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1296 + def collection_name; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1279 + def default_actions; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1295 + def member_name; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1298 + def member_scope; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1299 + def nested_scope; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1287 + def plural; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1301 + def singleton?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1291 + def singular; end +end + +# CANONICAL_ACTIONS holds all actions that does not need a prefix or a path +# appended since they fit properly in their scope level. +# +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1172 +ActionDispatch::Routing::Mapper::Resources::VALID_ON_OPTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2260 +class ActionDispatch::Routing::Mapper::Scope + include ::Enumerable + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2270 + def initialize(hash, parent = T.unsafe(nil), scope_level = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2329 + def [](key); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2296 + def action_name(name_prefix, prefix, collection_name, member_name); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2336 + def each; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2344 + def frame; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2276 + def nested?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2321 + def new(hash); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2325 + def new_level(level); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2280 + def null?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2317 + def options; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2268 + def parent; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2292 + def resource_method_scope?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2313 + def resource_scope?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2288 + def resources?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2284 + def root?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2268 + def scope_level; end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2346 +ActionDispatch::Routing::Mapper::Scope::NULL = T.let(T.unsafe(nil), ActionDispatch::Routing::Mapper::Scope) + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2261 +ActionDispatch::Routing::Mapper::Scope::OPTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2266 +ActionDispatch::Routing::Mapper::Scope::RESOURCE_METHOD_SCOPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:2265 +ActionDispatch::Routing::Mapper::Scope::RESOURCE_SCOPES = T.let(T.unsafe(nil), Array) + +# You may wish to organize groups of controllers under a namespace. Most +# commonly, you might group a number of administrative controllers under an +# `admin` namespace. You would place these controllers under the +# `app/controllers/admin` directory, and you can group them together in your +# router: +# +# namespace "admin" do +# resources :posts, :comments +# end +# +# This will create a number of routes for each of the posts and comments +# controller. For `Admin::PostsController`, Rails will create: +# +# GET /admin/posts +# GET /admin/posts/new +# POST /admin/posts +# GET /admin/posts/1 +# GET /admin/posts/1/edit +# PATCH/PUT /admin/posts/1 +# DELETE /admin/posts/1 +# +# If you want to route /posts (without the prefix /admin) to +# `Admin::PostsController`, you could use +# +# scope module: "admin" do +# resources :posts +# end +# +# or, for a single case +# +# resources :posts, module: "admin" +# +# If you want to route /admin/posts to `PostsController` (without the `Admin::` +# module prefix), you could use +# +# scope "/admin" do +# resources :posts +# end +# +# or, for a single case +# +# resources :posts, path: "/admin/posts" +# +# In each of these cases, the named routes remain the same as if you did not use +# scope. In the last case, the following paths map to `PostsController`: +# +# GET /admin/posts +# GET /admin/posts/new +# POST /admin/posts +# GET /admin/posts/1 +# GET /admin/posts/1/edit +# PATCH/PUT /admin/posts/1 +# DELETE /admin/posts/1 +# +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:838 +module ActionDispatch::Routing::Mapper::Scoping + # ### Parameter Restriction + # Allows you to constrain the nested routes based on a set of rules. For + # instance, in order to change the routes to allow for a dot character in the + # `id` parameter: + # + # constraints(id: /\d+\.\d+/) do + # resources :posts + # end + # + # Now routes such as `/posts/1` will no longer be valid, but `/posts/1.1` will + # be. The `id` parameter must match the constraint passed in for this example. + # + # You may use this to also restrict other parameters: + # + # resources :posts do + # constraints(post_id: /\d+\.\d+/) do + # resources :comments + # end + # end + # + # ### Restricting based on IP + # + # Routes can also be constrained to an IP or a certain range of IP addresses: + # + # constraints(ip: /192\.168\.\d+\.\d+/) do + # resources :posts + # end + # + # Any user connecting from the 192.168.* range will be able to see this + # resource, where as any user connecting outside of this range will be told + # there is no such route. + # + # ### Dynamic request matching + # + # Requests to routes can be constrained based on specific criteria: + # + # constraints(-> (req) { /iPhone/.match?(req.env["HTTP_USER_AGENT"]) }) do + # resources :iphones + # end + # + # You are able to move this logic out into a class if it is too complex for + # routes. This class must have a `matches?` method defined on it which either + # returns `true` if the user should be given access to that route, or `false` if + # the user should not. + # + # class Iphone + # def self.matches?(request) + # /iPhone/.match?(request.env["HTTP_USER_AGENT"]) + # end + # end + # + # An expected place for this code would be `lib/constraints`. + # + # This class is then used like this: + # + # constraints(Iphone) do + # resources :iphones + # end + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1046 + def constraints(constraints = T.unsafe(nil), &block); end + + # Scopes routes to a specific controller + # + # controller "food" do + # match "bacon", action: :bacon, via: :get + # end + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:928 + def controller(controller); end + + # Allows you to set default parameters for a route, such as this: + # + # defaults id: 'home' do + # match 'scoped_pages/(:id)', to: 'pages#show' + # end + # + # Using this, the `:id` parameter here will default to 'home'. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1057 + def defaults(defaults = T.unsafe(nil)); end + + # Scopes routes to a specific namespace. For example: + # + # namespace :admin do + # resources :posts + # end + # + # This generates the following routes: + # + # admin_posts GET /admin/posts(.:format) admin/posts#index + # admin_posts POST /admin/posts(.:format) admin/posts#create + # new_admin_post GET /admin/posts/new(.:format) admin/posts#new + # edit_admin_post GET /admin/posts/:id/edit(.:format) admin/posts#edit + # admin_post GET /admin/posts/:id(.:format) admin/posts#show + # admin_post PATCH/PUT /admin/posts/:id(.:format) admin/posts#update + # admin_post DELETE /admin/posts/:id(.:format) admin/posts#destroy + # + # ### Options + # + # The `:path`, `:as`, `:module`, `:shallow_path`, and `:shallow_prefix` options + # all default to the name of the namespace. + # + # For options, see `Base#match`. For `:shallow_path` option, see + # `Resources#resources`. + # + # # accessible through /sekret/posts rather than /admin/posts + # namespace :admin, path: "sekret" do + # resources :posts + # end + # + # # maps to Sekret::PostsController rather than Admin::PostsController + # namespace :admin, module: "sekret" do + # resources :posts + # end + # + # # generates sekret_posts_path rather than admin_posts_path + # namespace :admin, as: "sekret" do + # resources :posts + # end + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:973 + def namespace(path, options = T.unsafe(nil), &block); end + + # Scopes a set of routes to the given default options. + # + # Take the following route definition as an example: + # + # scope path: ":account_id", as: "account" do + # resources :projects + # end + # + # This generates helpers such as `account_projects_path`, just like `resources` + # does. The difference here being that the routes generated are like + # /:account_id/projects, rather than /accounts/:account_id/projects. + # + # ### Options + # + # Takes same options as `Base#match` and `Resources#resources`. + # + # # route /posts (without the prefix /admin) to Admin::PostsController + # scope module: "admin" do + # resources :posts + # end + # + # # prefix the posts resource's requests with '/admin' + # scope path: "/admin" do + # resources :posts + # end + # + # # prefix the routing helper name: sekret_posts_path instead of posts_path + # scope as: "sekret" do + # resources :posts + # end + # + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:869 + def scope(*args); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1089 + def merge_action_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1073 + def merge_as_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1113 + def merge_blocks_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1105 + def merge_constraints_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1085 + def merge_controller_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1109 + def merge_defaults_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1097 + def merge_format_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1081 + def merge_module_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1119 + def merge_options_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1101 + def merge_path_names_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1065 + def merge_path_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1069 + def merge_shallow_path_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1077 + def merge_shallow_prefix_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1123 + def merge_shallow_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1127 + def merge_to_scope(parent, child); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:1093 + def merge_via_scope(parent, child); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:921 +ActionDispatch::Routing::Mapper::Scoping::POISON = T.let(T.unsafe(nil), Object) + +# pkg:gem/actionpack#lib/action_dispatch/routing/mapper.rb:24 +ActionDispatch::Routing::Mapper::URL_OPTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:114 +class ActionDispatch::Routing::OptionRedirect < ::ActionDispatch::Routing::Redirect + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:143 + def inspect; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:115 + def options; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:117 + def path(params, request); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:89 +class ActionDispatch::Routing::PathRedirect < ::ActionDispatch::Routing::Redirect + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:104 + def inspect; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:92 + def path(params, request); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:109 + def interpolation_required?(string, params); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:90 +ActionDispatch::Routing::PathRedirect::URL_PARTS = T.let(T.unsafe(nil), Regexp) + +# # Action Dispatch Routing PolymorphicRoutes +# +# Polymorphic URL helpers are methods for smart resolution to a named route call +# when given an Active Record model instance. They are to be used in combination +# with ActionController::Resources. +# +# These methods are useful when you want to generate the correct URL or path to +# a RESTful resource without having to know the exact type of the record in +# question. +# +# Nested resources and/or namespaces are also supported, as illustrated in the +# example: +# +# polymorphic_url([:admin, @article, @comment]) +# +# results in: +# +# admin_article_comment_url(@article, @comment) +# +# ## Usage within the framework +# +# Polymorphic URL helpers are used in a number of places throughout the Rails +# framework: +# +# * `url_for`, so you can use it with a record as the argument, e.g. +# `url_for(@article)`; +# * ActionView::Helpers::FormHelper uses `polymorphic_path`, so you can write +# `form_for(@article)` without having to specify `:url` parameter for the +# form action; +# * `redirect_to` (which, in fact, uses `url_for`) so you can write +# `redirect_to(post)` in your controllers; +# * ActionView::Helpers::AtomFeedHelper, so you don't have to explicitly +# specify URLs for feed entries. +# +# +# ## Prefixed polymorphic helpers +# +# In addition to `polymorphic_url` and `polymorphic_path` methods, a number of +# prefixed helpers are available as a shorthand to `action: "..."` in options. +# Those are: +# +# * `edit_polymorphic_url`, `edit_polymorphic_path` +# * `new_polymorphic_url`, `new_polymorphic_path` +# +# +# Example usage: +# +# edit_polymorphic_path(@post) # => "/posts/1/edit" +# polymorphic_path(@post, format: :pdf) # => "/posts/1.pdf" +# +# ## Usage with mounted engines +# +# If you are using a mounted engine and you need to use a polymorphic_url +# pointing at the engine's routes, pass in the engine's route proxy as the first +# argument to the method. For example: +# +# polymorphic_url([blog, @post]) # calls blog.post_path(@post) +# form_for([blog, @post]) # => "/blog/posts/1" +# +# pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:66 +module ActionDispatch::Routing::PolymorphicRoutes + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:156 + def edit_polymorphic_path(record_or_hash, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:156 + def edit_polymorphic_url(record_or_hash, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:156 + def new_polymorphic_path(record_or_hash, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:156 + def new_polymorphic_url(record_or_hash, options = T.unsafe(nil)); end + + # Returns the path component of a URL for the given record. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:133 + def polymorphic_path(record_or_hash_or_array, options = T.unsafe(nil)); end + + # Constructs a call to a named RESTful route for the given record and returns + # the resulting URL string. For example: + # + # # calls post_url(post) + # polymorphic_url(post) # => "http://example.com/posts/1" + # polymorphic_url([blog, post]) # => "http://example.com/blogs/1/posts/1" + # polymorphic_url([:admin, blog, post]) # => "http://example.com/admin/blogs/1/posts/1" + # polymorphic_url([user, :blog, post]) # => "http://example.com/users/1/blog/posts/1" + # polymorphic_url(Comment) # => "http://example.com/comments" + # + # #### Options + # + # * `:action` - Specifies the action prefix for the named route: `:new` or + # `:edit`. Default is no prefix. + # * `:routing_type` - Allowed values are `:path` or `:url`. Default is `:url`. + # + # + # Also includes all the options from `url_for`. These include such things as + # `:anchor` or `:trailing_slash`. Example usage is given below: + # + # polymorphic_url([blog, post], anchor: 'my_anchor') + # # => "http://example.com/blogs/1/posts/1#my_anchor" + # polymorphic_url([blog, post], anchor: 'my_anchor', script_name: "/my_app") + # # => "http://example.com/my_app/blogs/1/posts/1#my_anchor" + # + # For all of these options, see the documentation for + # [url_for](rdoc-ref:ActionDispatch::Routing::UrlFor). + # + # #### Functionality + # + # # an Article record + # polymorphic_url(record) # same as article_url(record) + # + # # a Comment record + # polymorphic_url(record) # same as comment_url(record) + # + # # it recognizes new records and maps to the collection + # record = Comment.new + # polymorphic_url(record) # same as comments_url() + # + # # the class of a record will also map to the collection + # polymorphic_url(Comment) # same as comments_url() + # + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:110 + def polymorphic_url(record_or_hash_or_array, options = T.unsafe(nil)); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:177 + def polymorphic_mapping(record); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:173 + def polymorphic_path_for_action(action, record_or_hash, options); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:169 + def polymorphic_url_for_action(action, record_or_hash, options); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:185 +class ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:248 + def initialize(key_strategy, prefix, suffix); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:262 + def handle_class(klass); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:266 + def handle_class_call(target, klass); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:293 + def handle_list(list); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:270 + def handle_model(record); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:284 + def handle_model_call(target, record); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:254 + def handle_string(record); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:258 + def handle_string_call(target, str); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:246 + def prefix; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:246 + def suffix; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:347 + def get_method_for_class(klass); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:352 + def get_method_for_string(str); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:339 + def polymorphic_mapping(target, record); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:196 + def build(action, type); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:188 + def get(action, type); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:194 + def path; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:210 + def plural(prefix, suffix); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:214 + def polymorphic_method(recipient, record_or_hash_or_array, action, type, options); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:206 + def singular(prefix, suffix); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:193 + def url; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/polymorphic_routes.rb:186 +ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder::CACHE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:12 +class ActionDispatch::Routing::Redirect < ::ActionDispatch::Routing::Endpoint + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:15 + def initialize(status, block); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:13 + def block; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:35 + def build_response(req); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:22 + def call(env); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:67 + def inspect; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:63 + def path(params, request); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:20 + def redirect?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:13 + def status; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:76 + def escape(params); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:80 + def escape_fragment(params); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:84 + def escape_path(params); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:72 + def relative_path?(path); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:148 +module ActionDispatch::Routing::Redirection + # Redirect any path to another path: + # + # get "/stories" => redirect("/posts") + # + # This will redirect the user, while ignoring certain parts of the request, + # including query string, etc. `/stories`, `/stories?foo=bar`, etc all redirect + # to `/posts`. + # + # The redirect will use a `301 Moved Permanently` status code by default. This + # can be overridden with the `:status` option: + # + # get "/stories" => redirect("/posts", status: 307) + # + # You can also use interpolation in the supplied redirect argument: + # + # get 'docs/:article', to: redirect('/wiki/%{article}') + # + # Note that if you return a path without a leading slash then the URL is + # prefixed with the current SCRIPT_NAME environment variable. This is typically + # '/' but may be different in a mounted engine or where the application is + # deployed to a subdirectory of a website. + # + # Alternatively you can use one of the other syntaxes: + # + # The block version of redirect allows for the easy encapsulation of any logic + # associated with the redirect in question. Either the params and request are + # supplied as arguments, or just params, depending of how many arguments your + # block accepts. A string is required as a return value. + # + # get 'jokes/:number', to: redirect { |params, request| + # path = (params[:number].to_i.even? ? "wheres-the-beef" : "i-love-lamp") + # "http://#{request.host_with_port}/#{path}" + # } + # + # Note that the `do end` syntax for the redirect block wouldn't work, as Ruby + # would pass the block to `get` instead of `redirect`. Use `{ ... }` instead. + # + # The options version of redirect allows you to supply only the parts of the URL + # which need to change, it also supports interpolation of the path similar to + # the first example. + # + # get 'stores/:name', to: redirect(subdomain: 'stores', path: '/%{name}') + # get 'stores/:name(*all)', to: redirect(subdomain: 'stores', path: '/%{name}%{all}') + # get '/stories', to: redirect(path: '/posts') + # + # This will redirect the user, while changing only the specified parts of the + # request, for example the `path` option in the last example. `/stories`, + # `/stories?foo=bar`, redirect to `/posts` and `/posts?foo=bar` respectively. + # + # Finally, an object which responds to call can be supplied to redirect, + # allowing you to reuse common redirect routes. The call method must accept two + # arguments, params and request, and return a string. + # + # get 'accounts/:name' => redirect(SubdomainRedirector.new('api')) + # + # pkg:gem/actionpack#lib/action_dispatch/routing/redirection.rb:204 + def redirect(*args, &block); end +end + +# The RouteSet contains a collection of Route instances, representing the routes +# typically defined in `config/routes.rb`. +# +# pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:17 +class ActionDispatch::Routing::RouteSet + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:384 + def initialize(config = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:664 + def add_polymorphic_mapping(klass, options, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:633 + def add_route(mapping, name); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:668 + def add_url_helper(name, options, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:415 + def api_only?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:454 + def append(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:893 + def call(env); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:478 + def clear!; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:428 + def default_env; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:354 + def default_scope; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:354 + def default_scope=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:356 + def default_url_options; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:356 + def default_url_options=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:499 + def define_mounted_helper(name, script_namer = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:355 + def disable_clear_and_finalize; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:355 + def disable_clear_and_finalize=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:447 + def draw(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:356 + def draw_paths; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:356 + def draw_paths=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:404 + def eager_load!; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:629 + def empty?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:357 + def env_key; end + + # Generate the path indicated by the arguments, and return an array of the keys + # that were not used to generate it. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:808 + def extra_keys(options, recall = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:472 + def finalize!; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:836 + def find_script_name(options); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:354 + def formatter; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:354 + def formatter=(_arg0); end + + # Returns a Route matching the given requirements, or `nil` if none are found. + # + # This is intended for use by tools such as Language Servers. + # + # Given the routes are defined as: + # + # resources :posts + # + # Then the following will return the Route for the `show` action: + # + # Rails.application.routes.from_requirements(controller: "posts", action: "show") + # + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:29 + def from_requirements(requirements); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:812 + def generate_extras(options, recall = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:526 + def generate_url_helpers(supports_path); end + + # Since the router holds references to many parts of the system like engines, + # controllers and the application itself, inspecting the route set can actually + # be really slow, therefore we default alias inspect to to_s. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:37 + def inspect; end + + # Contains all the mounted helpers across different engines and the `main_app` + # helper for the application. You can include this in your classes if you want + # to access routes for other engines. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:495 + def mounted_helpers; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:354 + def named_routes; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:354 + def named_routes=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:832 + def optimize_routes_generation?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:840 + def path_for(options, route_name = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:357 + def polymorphic_mappings; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:458 + def prepend(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:899 + def recognize_path(path, environment = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:914 + def recognize_path_with_request(req, path, extras, raise_on_missing: T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:411 + def relative_url_root; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:419 + def request_class; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:355 + def resources_path_names; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:355 + def resources_path_names=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:354 + def router; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:354 + def router=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:359 + def routes; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:354 + def set; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:354 + def set=(_arg0); end + + # The `options` argument must be a hash whose keys are **symbols**. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:845 + def url_for(options, route_name = T.unsafe(nil), url_strategy = T.unsafe(nil), method_name = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:518 + def url_helpers(supports_path = T.unsafe(nil)); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:462 + def eval_block(block); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:823 + def generate(route_name, options, recall = T.unsafe(nil), method_name = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:423 + def make_request(env); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:361 + def default_resources_path_names; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:365 + def new_with_config(config); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:380 +class ActionDispatch::Routing::RouteSet::Config < ::Struct + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:380 + def api_only; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:380 + def api_only=(_); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:380 + def relative_url_root; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:380 + def relative_url_root=(_); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:380 + def [](*_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:380 + def inspect; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:380 + def keyword_init?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:380 + def members; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:380 + def new(*_arg0); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:672 +class ActionDispatch::Routing::RouteSet::CustomUrlHelper + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:675 + def initialize(name, defaults, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:673 + def block; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:681 + def call(t, args, only_path = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:673 + def defaults; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:673 + def name; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:693 + def eval_block(t, args, options); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:697 + def merge_defaults(options); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:382 +ActionDispatch::Routing::RouteSet::DEFAULT_CONFIG = T.let(T.unsafe(nil), ActionDispatch::Routing::RouteSet::Config) + +# pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:39 +class ActionDispatch::Routing::RouteSet::Dispatcher < ::ActionDispatch::Routing::Endpoint + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:40 + def initialize(raise_on_name_error); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:44 + def dispatcher?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:46 + def serve(req); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:60 + def controller(req); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:66 + def dispatch(controller, action, req, res); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:702 +class ActionDispatch::Routing::RouteSet::Generator + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:705 + def initialize(named_route, options, recall, set); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:717 + def controller; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:721 + def current_controller; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:791 + def different_controller?; end + + # Generates a path from routes, returns a RouteWithParams or MissingRoute. + # MissingRoute will raise ActionController::UrlGenerationError. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:787 + def generate; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:703 + def named_route; end + + # Remove leading slashes from controllers + # + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:775 + def normalize_controller!; end + + # This pulls :controller, :action, and :id out of the recall. The recall key is + # only used if there is no key in the options or if the key in the options is + # identical. If any of :controller, :action or :id is not found, don't pull any + # more keys from the recall. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:757 + def normalize_controller_action_id!; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:733 + def normalize_options!; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:703 + def options; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:703 + def recall; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:703 + def set; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:725 + def use_recall_for(key); end + + # if the current controller is "foo/bar/baz" and controller: "baz/bat" is + # specified, the controller becomes "foo/baz/bat" + # + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:765 + def use_relative_controller!; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:797 + def named_route_exists?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:801 + def segment_keys; end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:487 +module ActionDispatch::Routing::RouteSet::MountedHelpers + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActionDispatch::Routing::UrlFor + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end + + module GeneratedInstanceMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end +end + +# A NamedRouteCollection instance is a collection of named routes, and also +# maintains an anonymous module that can be used to install helpers for the +# named routes. +# +# pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:84 +class ActionDispatch::Routing::RouteSet::NamedRouteCollection + include ::Enumerable + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:89 + def initialize; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:149 + def [](name); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:148 + def []=(name, route); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:120 + def add(name, route); end + + # Given a `name`, defines name_path and name_url helpers. Used by 'direct', + # 'resolve', and 'polymorphic' route helpers. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:167 + def add_url_helper(name, defaults, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:150 + def clear; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:106 + def clear!; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:152 + def each(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:139 + def get(name); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:102 + def helper_names; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:143 + def key?(name); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:161 + def length; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:157 + def names; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:86 + def path_helpers_module; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:97 + def route_defined?(name); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:86 + def url_helpers_module; end + + private + + # Create a URL helper allowing ordered parameters to be associated with + # corresponding dynamic segments, so you can do: + # + # foo_url(bar, baz, bang) + # + # Instead of: + # + # foo_url(bar: bar, baz: baz, bang: bang) + # + # Also allow options hash, so you can do: + # + # foo_url(bar, baz, bang, sort_by: 'baz') + # + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:335 + def define_url_helper(mod, name, helper, url_strategy); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:86 + def routes; end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:190 +class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:273 + def initialize(route, options, route_name); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:280 + def call(t, method_name, args, inner_options, url_strategy); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:292 + def handle_positional_args(controller_options, inner_options, args, result, path_params); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:203 + def route_name; end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:191 + def create(route, options, route_name); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:199 + def optimize_helper?(route); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:205 +class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper::OptimizedUrlHelper < ::ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:208 + def initialize(route, options, route_name); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:206 + def arg_size; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:214 + def call(t, method_name, args, inner_options, url_strategy); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:245 + def optimize_routes_generation?(t); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:237 + def optimized_helper(args); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:249 + def parameterize_args(args); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:260 + def raise_generation_error(args); end +end + +# strategy for building URLs to send to the client +# +# pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:351 +ActionDispatch::Routing::RouteSet::PATH = T.let(T.unsafe(nil), Proc) + +# pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:828 +ActionDispatch::Routing::RouteSet::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:71 +class ActionDispatch::Routing::RouteSet::StaticDispatcher < ::ActionDispatch::Routing::RouteSet::Dispatcher + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:72 + def initialize(controller_class); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:78 + def controller(_); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/route_set.rb:352 +ActionDispatch::Routing::RouteSet::UNKNOWN = T.let(T.unsafe(nil), Proc) + +# pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:10 +class ActionDispatch::Routing::RouteWrapper < ::SimpleDelegator + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:56 + def action; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:28 + def constraints; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:52 + def controller; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:17 + def endpoint; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:64 + def engine?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:60 + def internal?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:11 + def matches_filter?(filter, value); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:40 + def name; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:36 + def path; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:32 + def rack_app; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:44 + def reqs; end +end + +# This class is just used for displaying route information when someone +# executes `bin/rails routes` or looks at the RoutingError page. People should +# not use this class. +# +# pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:73 +class ActionDispatch::Routing::RoutesInspector + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:74 + def initialize(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:79 + def format(formatter, filter = T.unsafe(nil)); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:143 + def collect_engine_routes(route); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:129 + def collect_routes(routes); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:118 + def filter_routes(filter); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/inspector.rb:99 + def normalize_filter(filter); end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:9 +class ActionDispatch::Routing::RoutesProxy + include ::ActionDispatch::Routing::PolymorphicRoutes + include ::ActionDispatch::Routing::UrlFor + + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:15 + def initialize(routes, scope, helpers, script_namer = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:13 + def _routes; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:10 + def default_url_options; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:10 + def default_url_options=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:10 + def default_url_options?; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:12 + def routes; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:12 + def routes=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:12 + def scope; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:12 + def scope=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:21 + def url_options; end + + private + + # Keeps the part of the script name provided by the global context via + # [ENV]("SCRIPT_NAME"), which `mount` doesn't know about since it depends on the + # specific request, but use our script name resolver for the mount point + # dependent part. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:55 + def merge_script_names(previous_script_name, new_script_name); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:32 + def method_missing(method, *args); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:28 + def respond_to_missing?(method, _); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:10 + def default_url_options; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:10 + def default_url_options=(value); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/routes_proxy.rb:10 + def default_url_options?; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/routing.rb:259 +ActionDispatch::Routing::SEPARATORS = T.let(T.unsafe(nil), Array) + +# # Action Dispatch Routing UrlFor +# +# In `config/routes.rb` you define URL-to-controller mappings, but the reverse +# is also possible: a URL can be generated from one of your routing definitions. +# URL generation functionality is centralized in this module. +# +# See ActionDispatch::Routing for general information about routing and +# `config/routes.rb`. +# +# **Tip:** If you need to generate URLs from your models or some other place, +# then ActionDispatch::Routing::UrlFor is what you're looking for. Read on for +# an introduction. In general, this module should not be included on its own, as +# it is usually included by `url_helpers` (as in +# `Rails.application.routes.url_helpers`). +# +# ## URL generation from parameters +# +# As you may know, some functions, such as `ActionController::Base#url_for` and +# ActionView::Helpers::UrlHelper#link_to, can generate URLs given a set of +# parameters. For example, you've probably had the chance to write code like +# this in one of your views: +# +# <%= link_to('Click here', controller: 'users', +# action: 'new', message: 'Welcome!') %> +# # => Click here +# +# `link_to`, and all other functions that require URL generation functionality, +# actually use ActionDispatch::Routing::UrlFor under the hood. And in +# particular, they use the ActionDispatch::Routing::UrlFor#url_for method. One +# can generate the same path as the above example by using the following code: +# +# include ActionDispatch::Routing::UrlFor +# url_for(controller: 'users', +# action: 'new', +# message: 'Welcome!', +# only_path: true) +# # => "/users/new?message=Welcome%21" +# +# Notice the `only_path: true` part. This is because UrlFor has no information +# about the website hostname that your Rails app is serving. So if you want to +# include the hostname as well, then you must also pass the `:host` argument: +# +# include UrlFor +# url_for(controller: 'users', +# action: 'new', +# message: 'Welcome!', +# host: 'www.example.com') +# # => "http://www.example.com/users/new?message=Welcome%21" +# +# By default, all controllers and views have access to a special version of +# `url_for`, that already knows what the current hostname is. So if you use +# `url_for` in your controllers or your views, then you don't need to explicitly +# pass the `:host` argument. +# +# For convenience, mailers also include ActionDispatch::Routing::UrlFor. So +# within mailers, you can use url_for. However, mailers cannot access incoming +# web requests in order to derive hostname information, so you have to provide +# the `:host` option or set the default host using `default_url_options`. For +# more information on url_for in mailers see the ActionMailer::Base +# documentation. +# +# ## URL generation for named routes +# +# UrlFor also allows one to access methods that have been auto-generated from +# named routes. For example, suppose that you have a 'users' resource in your +# `config/routes.rb`: +# +# resources :users +# +# This generates, among other things, the method `users_path`. By default, this +# method is accessible from your controllers, views, and mailers. If you need to +# access this auto-generated method from other places (such as a model), then +# you can do that by including `Rails.application.routes.url_helpers` in your +# class: +# +# class User < ActiveRecord::Base +# include Rails.application.routes.url_helpers +# +# def base_uri +# user_path(self) +# end +# end +# +# User.find(1).base_uri # => "/users/1" +# +# pkg:gem/actionpack#lib/action_dispatch/routing/url_for.rb:92 +module ActionDispatch::Routing::UrlFor + include ::ActionDispatch::Routing::PolymorphicRoutes + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + # pkg:gem/actionpack#lib/action_dispatch/routing/url_for.rb:111 + def initialize(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionpack#lib/action_dispatch/routing/url_for.rb:182 + def full_url_for(options = T.unsafe(nil)); end + + # Allows calling direct or regular named route. + # + # resources :buckets + # + # direct :recordable do |recording| + # route_for(:bucket, recording.bucket) + # end + # + # direct :threadable do |threadable| + # route_for(:recordable, threadable.parent) + # end + # + # This maintains the context of the original caller on whether to return a path + # or full URL, e.g: + # + # threadable_path(threadable) # => "/buckets/1" + # threadable_url(threadable) # => "http://example.com/buckets/1" + # + # pkg:gem/actionpack#lib/action_dispatch/routing/url_for.rb:222 + def route_for(name, *args); end + + # Generate a URL based on the options provided, `default_url_options`, and the + # routes defined in `config/routes.rb`. The following options are supported: + # + # * `:only_path` - If true, the relative URL is returned. Defaults to `false`. + # * `:protocol` - The protocol to connect to. Defaults to `"http"`. + # * `:host` - Specifies the host the link should be targeted at. If + # `:only_path` is false, this option must be provided either explicitly, or + # via `default_url_options`. + # * `:subdomain` - Specifies the subdomain of the link, using the `tld_length` + # to split the subdomain from the host. If false, removes all subdomains + # from the host part of the link. + # * `:domain` - Specifies the domain of the link, using the `tld_length` to + # split the domain from the host. + # * `:tld_length` - Number of labels the TLD id composed of, only used if + # `:subdomain` or `:domain` are supplied. Defaults to + # `ActionDispatch::Http::URL.tld_length`, which in turn defaults to 1. + # * `:port` - Optionally specify the port to connect to. + # * `:anchor` - An anchor name to be appended to the path. + # * `:params` - The query parameters to be appended to the path. + # * `:path_params` - The query parameters that will only be used for the named + # dynamic segments of path. If unused, they will be discarded. + # * `:trailing_slash` - If true, adds a trailing slash, as in + # `"/archive/2009/"`. + # * `:script_name` - Specifies application path relative to domain root. If + # provided, prepends application path. + # + # + # Any other key (`:controller`, `:action`, etc.) given to `url_for` is forwarded + # to the Routes module. + # + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', port: '8080' + # # => 'http://somehost.org:8080/tasks/testing' + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', anchor: 'ok', only_path: true + # # => '/tasks/testing#ok' + # url_for controller: 'tasks', action: 'testing', trailing_slash: true + # # => 'http://somehost.org/tasks/testing/' + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', number: '33' + # # => 'http://somehost.org/tasks/testing?number=33' + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp" + # # => 'http://somehost.org/myapp/tasks/testing' + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp", only_path: true + # # => '/myapp/tasks/testing' + # + # Missing routes keys may be filled in from the current request's parameters + # (e.g. `:controller`, `:action`, `:id`, and any other parameters that are + # placed in the path). Given that the current action has been reached through + # `GET /users/1`: + # + # url_for(only_path: true) # => '/users/1' + # url_for(only_path: true, action: 'edit') # => '/users/1/edit' + # url_for(only_path: true, action: 'edit', id: 2) # => '/users/2/edit' + # + # Notice that no `:id` parameter was provided to the first `url_for` call and + # the helper used the one from the route's path. Any path parameter implicitly + # used by `url_for` can always be overwritten like shown on the last `url_for` + # calls. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/url_for.rb:178 + def url_for(options = T.unsafe(nil)); end + + # Hook overridden in controller to add request information with + # `default_url_options`. Application logic should not go into url_options. + # + # pkg:gem/actionpack#lib/action_dispatch/routing/url_for.rb:118 + def url_options; end + + protected + + # pkg:gem/actionpack#lib/action_dispatch/routing/url_for.rb:227 + def optimize_routes_generation?; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/routing/url_for.rb:239 + def _routes_context; end + + # pkg:gem/actionpack#lib/action_dispatch/routing/url_for.rb:232 + def _with_routes(routes); end + + module GeneratedClassMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end + + module GeneratedInstanceMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end +end + +# # Action Dispatch SSL +# +# This middleware is added to the stack when `config.force_ssl = true`, and is +# passed the options set in `config.ssl_options`. It does three jobs to enforce +# secure HTTP requests: +# +# 1. **TLS redirect**: Permanently redirects `http://` requests to `https://` +# with the same URL host, path, etc. Enabled by default. Set +# `config.ssl_options` to modify the destination URL (e.g. `redirect: { +# host: "secure.widgets.com", port: 8080 }`), or set `redirect: false` to +# disable this feature. +# +# Requests can opt-out of redirection with `exclude`: +# +# config.ssl_options = { redirect: { exclude: -> request { request.path == "/up" } } } +# +# Cookies will not be flagged as secure for excluded requests. +# +# 2. **Secure cookies**: Sets the `secure` flag on cookies to tell browsers +# they must not be sent along with `http://` requests. Enabled by default. +# Set `config.ssl_options` with `secure_cookies: false` to disable this +# feature. +# +# 3. **HTTP Strict Transport Security (HSTS)**: Tells the browser to remember +# this site as TLS-only and automatically redirect non-TLS requests. Enabled +# by default. Configure `config.ssl_options` with `hsts: false` to disable. +# +# Set `config.ssl_options` with `hsts: { ... }` to configure HSTS: +# +# * `expires`: How long, in seconds, these settings will stick. The +# minimum required to qualify for browser preload lists is 1 year. +# Defaults to 2 years (recommended). +# +# * `subdomains`: Set to `true` to tell the browser to apply these +# settings to all subdomains. This protects your cookies from +# interception by a vulnerable site on a subdomain. Defaults to `true`. +# +# * `preload`: Advertise that this site may be included in browsers' +# preloaded HSTS lists. HSTS protects your site on every visit *except +# the first visit* since it hasn't seen your HSTS header yet. To close +# this gap, browser vendors include a baked-in list of HSTS-enabled +# sites. Go to https://hstspreload.org to submit your site for +# inclusion. Defaults to `false`. +# +# +# To turn off HSTS, omitting the header is not enough. Browsers will +# remember the original HSTS directive until it expires. Instead, use the +# header to tell browsers to expire HSTS immediately. Setting `hsts: false` +# is a shortcut for `hsts: { expires: 0 }`. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:56 +class ActionDispatch::SSL + # pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:66 + def initialize(app, redirect: T.unsafe(nil), hsts: T.unsafe(nil), secure_cookies: T.unsafe(nil), ssl_default_redirect_status: T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:78 + def call(env); end + + private + + # https://tools.ietf.org/html/rfc6797#section-6.1 + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:112 + def build_hsts_header(hsts); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:119 + def flag_cookies_as_secure!(headers); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:160 + def https_location_for(request); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:97 + def normalize_hsts_options(options); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:143 + def redirect_to_https(request); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:150 + def redirection_status(request); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:93 + def set_hsts_header!(headers); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:62 + def default_hsts_options; end + end +end + +# :stopdoc: Default to 2 years as recommended on hstspreload.org. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:58 +ActionDispatch::SSL::HSTS_EXPIRES_IN = T.let(T.unsafe(nil), Integer) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/ssl.rb:60 +ActionDispatch::SSL::PERMANENT_REDIRECT_REQUEST_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:8 +class ActionDispatch::ServerTiming + # pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:52 + def initialize(app); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:58 + def call(env); end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:48 + def unsubscribe; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:9 +class ActionDispatch::ServerTiming::Subscriber + include ::Singleton::SingletonInstanceMethods + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:13 + def initialize; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:17 + def call(event); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:23 + def collect_events; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:32 + def ensure_subscribed; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:40 + def unsubscribe; end + + class << self + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:10 + def allocate; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:10 + def new(*_arg0); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/server_timing.rb:11 +ActionDispatch::ServerTiming::Subscriber::KEY = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/actionpack#lib/action_dispatch.rb:104 +module ActionDispatch::Session + class << self + # pkg:gem/actionpack#lib/action_dispatch.rb:111 + def resolve_store(session_store); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:97 +class ActionDispatch::Session::AbstractSecureStore < ::Rack::Session::Abstract::PersistedSecure + include ::ActionDispatch::Session::Compatibility + include ::ActionDispatch::Session::StaleSessionCheck + include ::ActionDispatch::Session::SessionObject + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:102 + def generate_sid; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:107 + def set_cookie(request, response, cookie); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:86 +class ActionDispatch::Session::AbstractStore < ::Rack::Session::Abstract::Persisted + include ::ActionDispatch::Session::Compatibility + include ::ActionDispatch::Session::StaleSessionCheck + include ::ActionDispatch::Session::SessionObject + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:92 + def set_cookie(request, response, cookie); end +end + +# # Action Dispatch Session CacheStore +# +# A session store that uses an ActiveSupport::Cache::Store to store the +# sessions. This store is most useful if you don't store critical data in your +# sessions and you don't need them to live for extended periods of time. +# +# #### Options +# * `cache` - The cache to use. If it is not specified, `Rails.cache` +# will be used. +# * `expire_after` - The length of time a session will be stored before +# automatically expiring. By default, the `:expires_in` option of the cache +# is used. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/session/cache_store.rb:22 +class ActionDispatch::Session::CacheStore < ::ActionDispatch::Session::AbstractSecureStore + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cache_store.rb:23 + def initialize(app, options = T.unsafe(nil)); end + + # Remove a session from the cache. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cache_store.rb:49 + def delete_session(env, sid, options); end + + # Get a session from the cache. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cache_store.rb:30 + def find_session(env, sid); end + + # Set a session in the cache. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cache_store.rb:38 + def write_session(env, sid, session, options); end + + private + + # Turn the session id into a cache key. + # + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cache_store.rb:57 + def cache_key(id); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cache_store.rb:61 + def get_session_with_fallback(sid); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:22 +module ActionDispatch::Session::Compatibility + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:23 + def initialize(app, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:28 + def generate_sid; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:35 + def initialize_sid; end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:40 + def make_request(env); end +end + +# # Action Dispatch Session CookieStore +# +# This cookie-based session store is the Rails default. It is dramatically +# faster than the alternatives. +# +# Sessions typically contain at most a user ID and flash message; both fit +# within the 4096 bytes cookie size limit. A `CookieOverflow` exception is +# raised if you attempt to store more than 4096 bytes of data. +# +# The cookie jar used for storage is automatically configured to be the best +# possible option given your application's configuration. +# +# Your cookies will be encrypted using your application's `secret_key_base`. +# This goes a step further than signed cookies in that encrypted cookies cannot +# be altered or read by users. This is the default starting in Rails 4. +# +# Configure your session store in an initializer: +# +# Rails.application.config.session_store :cookie_store, key: '_your_app_session' +# +# In the development and test environments your application's `secret_key_base` +# is generated by Rails and stored in a temporary file in +# `tmp/local_secret.txt`. In all other environments, it is stored encrypted in +# the `config/credentials.yml.enc` file. +# +# If your application was not updated to Rails 5.2 defaults, the +# `secret_key_base` will be found in the old `config/secrets.yml` file. +# +# Note that changing your `secret_key_base` will invalidate all existing +# session. Additionally, you should take care to make sure you are not relying +# on the ability to decode signed cookies generated by your app in external +# applications or JavaScript before changing it. +# +# Because CookieStore extends `Rack::Session::Abstract::Persisted`, many of the +# options described there can be used to customize the session cookie that is +# generated. For example: +# +# Rails.application.config.session_store :cookie_store, expire_after: 14.days +# +# would set the session cookie to expire automatically 14 days after creation. +# Other useful options include `:key`, `:secure`, `:httponly`, and `:same_site`. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:52 +class ActionDispatch::Session::CookieStore < ::ActionDispatch::Session::AbstractSecureStore + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:64 + def initialize(app, options = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:70 + def delete_session(req, session_id, options); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:77 + def load_session(req); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:124 + def cookie_jar(request); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:86 + def extract_session_id(req); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:120 + def get_cookie(req); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:105 + def persistent_session_id!(data, sid = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:116 + def set_cookie(request, session_id, cookie); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:93 + def unpacked_cookie_data(req); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:111 + def write_session(req, sid, session_data, options); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:62 +ActionDispatch::Session::CookieStore::DEFAULT_SAME_SITE = T.let(T.unsafe(nil), Proc) + +# pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:53 +class ActionDispatch::Session::CookieStore::SessionId + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:56 + def initialize(session_id, cookie_value = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/cookie_store.rb:54 + def cookie_value; end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:71 +module ActionDispatch::Session::SessionObject + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:72 + def commit_session(req, res); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:81 + def loaded_session?(session); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:77 + def prepare_session(req); end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:13 +class ActionDispatch::Session::SessionRestoreError < ::StandardError + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:14 + def initialize; end +end + +# pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:45 +module ActionDispatch::Session::StaleSessionCheck + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:50 + def extract_session_id(env); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:46 + def load_session(env); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:54 + def stale_session_check!; end +end + +# # Action Dispatch ShowExceptions +# +# This middleware rescues any exception returned by the application and calls an +# exceptions app that will wrap it in a format for the end user. +# +# The exceptions app should be passed as a parameter on initialization of +# `ShowExceptions`. Every time there is an exception, `ShowExceptions` will +# store the exception in `env["action_dispatch.exception"]`, rewrite the +# `PATH_INFO` to the exception status code, and call the Rack app. +# +# In Rails applications, the exceptions app can be configured with +# `config.exceptions_app`, which defaults to ActionDispatch::PublicExceptions. +# +# If the application returns a response with the `X-Cascade` header set to +# `"pass"`, this middleware will send an empty response as a result with the +# correct status code. If any exception happens inside the exceptions app, this +# middleware catches the exceptions and returns a failsafe response. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/show_exceptions.rb:25 +class ActionDispatch::ShowExceptions + # pkg:gem/actionpack#lib/action_dispatch/middleware/show_exceptions.rb:26 + def initialize(app, exceptions_app); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/show_exceptions.rb:31 + def call(env); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/middleware/show_exceptions.rb:67 + def fallback_to_html_format_if_invalid_mime_type(request); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/show_exceptions.rb:83 + def pass_response(status); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/show_exceptions.rb:48 + def render_exception(request, wrapper); end +end + +# # Action Dispatch Static +# +# This middleware serves static files from disk, if available. If no file is +# found, it hands off to the main app. +# +# In Rails apps, this middleware is configured to serve assets from the +# `public/` directory. +# +# Only GET and HEAD requests are served. POST and other HTTP methods are handed +# off to the main app. +# +# Only files in the root directory are served; path traversal is denied. +# +# pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:20 +class ActionDispatch::Static + # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:21 + def initialize(app, path, index: T.unsafe(nil), headers: T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/middleware/static.rb:26 + def call(env); end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/test_helpers/page_dump_helper.rb:4 +module ActionDispatch::TestHelpers; end + +# pkg:gem/actionpack#lib/action_dispatch/testing/test_helpers/page_dump_helper.rb:5 +module ActionDispatch::TestHelpers::PageDumpHelper + # Saves the content of response body to a file and tries to open it in your browser. + # Launchy must be present in your Gemfile for the page to open automatically. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/test_helpers/page_dump_helper.rb:10 + def save_and_open_page(path = T.unsafe(nil)); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_helpers/page_dump_helper.rb:30 + def html_dump_default_path; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_helpers/page_dump_helper.rb:23 + def open_file(path); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_helpers/page_dump_helper.rb:15 + def save_page(path = T.unsafe(nil)); end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/test_helpers/page_dump_helper.rb:6 +class ActionDispatch::TestHelpers::PageDumpHelper::InvalidResponse < ::StandardError; end + +# pkg:gem/actionpack#lib/action_dispatch/testing/test_process.rb:9 +module ActionDispatch::TestProcess + include ::ActionDispatch::TestProcess::FixtureFile + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_process.rb:34 + def assigns(key = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_process.rb:48 + def cookies; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_process.rb:44 + def flash; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_process.rb:52 + def redirect_to_url; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_process.rb:40 + def session; end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/test_process.rb:10 +module ActionDispatch::TestProcess::FixtureFile + # Shortcut for + # `Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_fixture_path, path), type)`: + # + # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png') } + # + # Default fixture files location is `test/fixtures/files`. + # + # To upload binary files on Windows, pass `:binary` as the last parameter. This + # will not affect other platforms: + # + # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png', :binary) } + # + # pkg:gem/actionpack#lib/action_dispatch/testing/test_process.rb:22 + def file_fixture_upload(path, mime_type = T.unsafe(nil), binary = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_process.rb:29 + def fixture_file_upload(path, mime_type = T.unsafe(nil), binary = T.unsafe(nil)); end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:9 +class ActionDispatch::TestRequest < ::ActionDispatch::Request + # pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:68 + def accept=(mime_types); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:48 + def action=(action_name); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:32 + def host=(host); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:52 + def if_modified_since=(last_modified); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:56 + def if_none_match=(etag); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:44 + def path=(path); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:36 + def port=(number); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:60 + def remote_addr=(addr); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:28 + def request_method=(method); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:40 + def request_uri=(uri); end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:64 + def user_agent=(user_agent); end + + class << self + # Create a new test request with default `env` values. + # + # pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:17 + def create(env = T.unsafe(nil)); end + + private + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:23 + def default_env; end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/testing/test_request.rb:10 +ActionDispatch::TestRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) + +# Integration test methods such as Integration::RequestHelpers#get and +# Integration::RequestHelpers#post return objects of class TestResponse, which +# represent the HTTP response results of the requested controller actions. +# +# See Response for more information on controller response objects. +# +# pkg:gem/actionpack#lib/action_dispatch/testing/test_response.rb:13 +class ActionDispatch::TestResponse < ::ActionDispatch::Response + # Returns a parsed body depending on the response MIME type. When a parser + # corresponding to the MIME type is not found, it returns the raw body. + # + # #### Examples + # get "/posts" + # response.content_type # => "text/html; charset=utf-8" + # response.parsed_body.class # => Nokogiri::HTML5::Document + # response.parsed_body.to_html # => "\n\n..." + # + # assert_pattern { response.parsed_body.at("main") => { content: "Hello, world" } } + # + # response.parsed_body.at("main") => {name:, content:} + # assert_equal "main", name + # assert_equal "Some main content", content + # + # get "/posts.json" + # response.content_type # => "application/json; charset=utf-8" + # response.parsed_body.class # => Array + # response.parsed_body # => [{"id"=>42, "title"=>"Title"},... + # + # assert_pattern { response.parsed_body => [{ id: 42 }] } + # + # get "/posts/42.json" + # response.content_type # => "application/json; charset=utf-8" + # response.parsed_body.class # => ActiveSupport::HashWithIndifferentAccess + # response.parsed_body # => {"id"=>42, "title"=>"Title"} + # + # assert_pattern { response.parsed_body => [{ title: /title/i }] } + # + # response.parsed_body => {id:, title:} + # assert_equal 42, id + # assert_equal "Title", title + # + # pkg:gem/actionpack#lib/action_dispatch/testing/test_response.rb:50 + def parsed_body; end + + # pkg:gem/actionpack#lib/action_dispatch/testing/test_response.rb:54 + def response_parser; end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/testing/test_response.rb:14 + def from_response(response); end + end +end + +# :markup: markdown +# +# pkg:gem/actionpack#lib/action_pack/gem_version.rb:5 +module ActionPack + class << self + # Returns the currently loaded version of Action Pack as a `Gem::Version`. + # + # pkg:gem/actionpack#lib/action_pack/gem_version.rb:7 + def gem_version; end + + # Returns the currently loaded version of Action Pack as a `Gem::Version`. + # + # pkg:gem/actionpack#lib/action_pack/version.rb:9 + def version; end + end +end + +# pkg:gem/actionpack#lib/action_pack/gem_version.rb:11 +module ActionPack::VERSION; end + +# pkg:gem/actionpack#lib/action_pack/gem_version.rb:12 +ActionPack::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# pkg:gem/actionpack#lib/action_pack/gem_version.rb:13 +ActionPack::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# pkg:gem/actionpack#lib/action_pack/gem_version.rb:15 +ActionPack::VERSION::PRE = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_pack/gem_version.rb:17 +ActionPack::VERSION::STRING = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_pack/gem_version.rb:14 +ActionPack::VERSION::TINY = T.let(T.unsafe(nil), Integer) + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:7 +module Mime + class << self + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:51 + def [](type); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:64 + def fetch(type, &block); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:56 + def symbols; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:60 + def valid_symbols?(symbols); end + end +end + +# ALL isn't a real MIME type, so we don't register it for lookup with the other +# concrete types. It's a wildcard match that we use for `respond_to` negotiation +# internals. +# +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:363 +Mime::ALL = T.let(T.unsafe(nil), Mime::AllType) + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:349 +class Mime::AllType < ::Mime::Type + include ::Singleton::SingletonInstanceMethods + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:352 + def initialize; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:356 + def all?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:357 + def html?; end + + class << self + private + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:350 + def allocate; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:350 + def new(*_arg0); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:47 +Mime::EXTENSION_LOOKUP = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:48 +Mime::LOOKUP = T.let(T.unsafe(nil), Hash) + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:8 +class Mime::Mimes + include ::Enumerable + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:13 + def initialize; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:23 + def <<(type); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:30 + def delete_if; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:19 + def each(&block); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:9 + def symbols; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:41 + def valid_symbols?(symbols); end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:365 +class Mime::NullType + include ::Singleton::SingletonInstanceMethods + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:368 + def nil?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:376 + def ref; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:372 + def to_s; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:383 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:379 + def respond_to_missing?(method, _); end + + class << self + private + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:366 + def allocate; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:366 + def new(*_arg0); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:46 +Mime::SET = T.let(T.unsafe(nil), Mime::Mimes) + +# Encapsulates the notion of a MIME type. Can be used at render time, for +# example, with: +# +# class PostsController < ActionController::Base +# def show +# @post = Post.find(params[:id]) +# +# respond_to do |format| +# format.html +# format.ics { render body: @post.to_ics, mime_type: Mime::Type.lookup("text/calendar") } +# format.xml { render xml: @post } +# end +# end +# end +# +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:84 +class Mime::Type + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:264 + def initialize(string, symbol = T.unsafe(nil), synonyms = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:297 + def ==(mime_type); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:289 + def ===(list); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:311 + def =~(mime_type); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:327 + def all?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:304 + def eql?(other); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:255 + def hash; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:323 + def html?; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:317 + def match?(mime_type); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:285 + def ref; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:85 + def symbol; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:273 + def to_s; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:277 + def to_str; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:281 + def to_sym; end + + protected + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:330 + def string; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:330 + def synonyms; end + + private + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:336 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:344 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:334 + def to_a; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:333 + def to_ary; end + + class << self + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:167 + def lookup(string); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:175 + def lookup_by_extension(extension); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:200 + def parse(accept_header); end + + # For an input of `'text'`, returns `[Mime[:json], Mime[:xml], Mime[:ics], + # Mime[:html], Mime[:css], Mime[:csv], Mime[:js], Mime[:yaml], Mime[:text]]`. + # + # For an input of `'application'`, returns `[Mime[:html], Mime[:js], Mime[:xml], + # Mime[:yaml], Mime[:atom], Mime[:json], Mime[:rss], Mime[:url_encoded_form]]`. + # + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:236 + def parse_data_with_trailing_star(type); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:227 + def parse_trailing_star(accept_header); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:186 + def register(string, symbol, mime_type_synonyms = T.unsafe(nil), extension_synonyms = T.unsafe(nil), skip_lookup = T.unsafe(nil)); end + + # Registers an alias that's not used on MIME type lookup, but can be referenced + # directly. Especially useful for rendering different HTML versions depending on + # the user agent, like an iPhone. + # + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:182 + def register_alias(string, symbol, extension_synonyms = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:163 + def register_callback(&block); end + + # This method is opposite of register method. + # + # To unregister a MIME type: + # + # Mime::Type.unregister(:mobile) + # + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:245 + def unregister(symbol); end + end +end + +# A simple helper class used in parsing the accept header. +# +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:90 +class Mime::Type::AcceptItem + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:94 + def initialize(index, name, q = T.unsafe(nil)); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:101 + def <=>(item); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:91 + def index; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:91 + def index=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:91 + def name; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:91 + def name=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:91 + def q; end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:91 + def q=(_arg0); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:92 + def to_s; end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:108 +class Mime::Type::AcceptList + class << self + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:151 + def find_item_by_name(array, name); end + + # pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:109 + def sort!(list); end + end +end + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:262 +class Mime::Type::InvalidMimeType < ::StandardError; end + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:257 +Mime::Type::MIME_NAME = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:259 +Mime::Type::MIME_PARAMETER = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:258 +Mime::Type::MIME_PARAMETER_VALUE = T.let(T.unsafe(nil), String) + +# pkg:gem/actionpack#lib/action_dispatch/http/mime_type.rb:260 +Mime::Type::MIME_REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionpack#lib/action_dispatch.rb:36 +module Rack; end + +# pkg:gem/actionpack#lib/action_dispatch/http/response.rb:42 +class Rack::Headers < ::Hash; end diff --git a/sorbet/rbi/gems/actionview@7.0.8.7.rbi b/sorbet/rbi/gems/actionview@7.2.3.1.rbi similarity index 64% rename from sorbet/rbi/gems/actionview@7.0.8.7.rbi rename to sorbet/rbi/gems/actionview@7.2.3.1.rbi index 4d3269bf6..eba6004bb 100644 --- a/sorbet/rbi/gems/actionview@7.0.8.7.rbi +++ b/sorbet/rbi/gems/actionview@7.2.3.1.rbi @@ -4,543 +4,36 @@ # This is an autogenerated file for types exported from the `actionview` gem. # Please instead update this file by running `bin/tapioca gem actionview`. + class ActionController::Base < ::ActionController::Metal include ::ActionDispatch::Routing::PolymorphicRoutes include ::ActionController::Head include ::AbstractController::Caching::ConfigMethods include ::ActionController::BasicImplicitRender - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#11 - def _helper_methods; end - - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#11 - def _helper_methods=(_arg0); end - - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#11 - def _helper_methods?; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#940 - def _process_action_callbacks; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/renderers.rb#31 - def _renderers; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/renderers.rb#31 - def _renderers=(_arg0); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/renderers.rb#31 - def _renderers?; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#928 - def _run_process_action_callbacks(&block); end - - # source://actionpack/7.0.8.7/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies; end - - # source://actionpack/7.0.8.7/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies=(_arg0); end - - # source://actionpack/7.0.8.7/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies?; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options=(_arg0); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options?; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/flash.rb#36 - def alert; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def allow_forgery_protection; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def allow_forgery_protection=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def asset_host; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def asset_host=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def assets_dir; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def assets_dir=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def default_asset_host_protocol; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def default_asset_host_protocol=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def default_protect_from_forgery; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def default_protect_from_forgery=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def default_static_extension; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def default_static_extension=(value); end - - # source://actionpack/7.0.8.7/lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack/7.0.8.7/lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(_arg0); end - - # source://actionpack/7.0.8.7/lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def enable_fragment_cache_logging; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def enable_fragment_cache_logging=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest=(_arg0); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest?; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/conditional_get.rb#13 - def etaggers; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(_arg0); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/conditional_get.rb#13 - def etaggers?; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/flash.rb#10 - def flash(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def forgery_protection_origin_check; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def forgery_protection_origin_check=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def forgery_protection_strategy; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def forgery_protection_strategy=(value); end - - # source://actionpack/7.0.8.7/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys; end - - # source://actionpack/7.0.8.7/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys=(_arg0); end - - # source://actionpack/7.0.8.7/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys?; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/helpers.rb#63 - def helpers_path; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/helpers.rb#63 - def helpers_path=(_arg0); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/helpers.rb#63 - def helpers_path?; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/helpers.rb#64 - def include_all_helpers; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/helpers.rb#64 - def include_all_helpers=(_arg0); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/helpers.rb#64 - def include_all_helpers?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def javascripts_dir; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def javascripts_dir=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def log_warning_on_csrf_failure; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def log_warning_on_csrf_failure=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def logger; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def logger=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/flash.rb#36 - def notice; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def per_form_csrf_tokens; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def per_form_csrf_tokens=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def perform_caching; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def perform_caching=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/redirecting.rb#15 - def raise_on_open_redirects; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/redirecting.rb#15 - def raise_on_open_redirects=(val); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def relative_url_root; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def relative_url_root=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def request_forgery_protection_token; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def request_forgery_protection_token=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers=(_arg0); end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def stylesheets_dir; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def stylesheets_dir=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def urlsafe_csrf_tokens; end - - private - - # source://actionview//lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - # source://actionpack/7.0.8.7/lib/action_controller/base.rb#266 - def _protected_ivars; end - - class << self - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://actionpack/7.0.8.7/lib/action_controller/form_builder.rb#31 - def _default_form_builder; end - - # source://actionpack/7.0.8.7/lib/action_controller/form_builder.rb#31 - def _default_form_builder=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/form_builder.rb#31 - def _default_form_builder?; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/flash.rb#8 - def _flash_types; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/flash.rb#8 - def _flash_types=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/flash.rb#8 - def _flash_types?; end - - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#11 - def _helper_methods; end - - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#11 - def _helper_methods=(value); end - - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#11 - def _helper_methods?; end - - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#15 - def _helpers; end - - # source://actionview//lib/action_view/layouts.rb#209 - def _layout; end - - # source://actionview//lib/action_view/layouts.rb#209 - def _layout=(value); end - - # source://actionview//lib/action_view/layouts.rb#209 - def _layout?; end - - # source://actionview//lib/action_view/layouts.rb#210 - def _layout_conditions; end - - # source://actionview//lib/action_view/layouts.rb#210 - def _layout_conditions=(value); end - - # source://actionview//lib/action_view/layouts.rb#210 - def _layout_conditions?; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#932 - def _process_action_callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#936 - def _process_action_callbacks=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/renderers.rb#31 - def _renderers; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/renderers.rb#31 - def _renderers=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/renderers.rb#31 - def _renderers?; end - - # source://actionpack/7.0.8.7/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies; end - - # source://actionpack/7.0.8.7/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies=(value); end - - # source://actionpack/7.0.8.7/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies?; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/params_wrapper.rb#185 - def _wrapper_options?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def allow_forgery_protection; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def allow_forgery_protection=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def asset_host; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def asset_host=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def assets_dir; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def assets_dir=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def default_asset_host_protocol; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def default_asset_host_protocol=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def default_protect_from_forgery; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def default_protect_from_forgery=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def default_static_extension; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def default_static_extension=(value); end - - # source://actionpack/7.0.8.7/lib/action_dispatch/routing/url_for.rb#95 - def default_url_options; end - - # source://actionpack/7.0.8.7/lib/action_dispatch/routing/url_for.rb#95 - def default_url_options=(value); end - - # source://actionpack/7.0.8.7/lib/action_dispatch/routing/url_for.rb#95 - def default_url_options?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def enable_fragment_cache_logging; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def enable_fragment_cache_logging=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/etag_with_template_digest.rb#27 - def etag_with_template_digest?; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/conditional_get.rb#13 - def etaggers; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/conditional_get.rb#13 - def etaggers?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def forgery_protection_origin_check; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def forgery_protection_origin_check=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def forgery_protection_strategy; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def forgery_protection_strategy=(value); end - - # source://actionpack/7.0.8.7/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys; end - - # source://actionpack/7.0.8.7/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys=(value); end - - # source://actionpack/7.0.8.7/lib/abstract_controller/caching/fragments.rb#23 - def fragment_cache_keys?; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/helpers.rb#63 - def helpers_path; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/helpers.rb#63 - def helpers_path=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/helpers.rb#63 - def helpers_path?; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/helpers.rb#64 - def include_all_helpers; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/helpers.rb#64 - def include_all_helpers=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/helpers.rb#64 - def include_all_helpers?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def javascripts_dir; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def javascripts_dir=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def log_warning_on_csrf_failure; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def log_warning_on_csrf_failure=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def logger; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def logger=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal.rb#210 - def middleware_stack; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def per_form_csrf_tokens; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def per_form_csrf_tokens=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def perform_caching; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def perform_caching=(value); end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/redirecting.rb#15 - def raise_on_open_redirects; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/redirecting.rb#15 - def raise_on_open_redirects=(val); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def relative_url_root; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def relative_url_root=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def request_forgery_protection_token; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def request_forgery_protection_token=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers; end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/rescuable.rb#13 - def rescue_handlers?; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def stylesheets_dir; end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#114 - def stylesheets_dir=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/configurable.rb#113 - def urlsafe_csrf_tokens; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal/request_forgery_protection.rb#97 - def urlsafe_csrf_tokens=(urlsafe_csrf_tokens); end - - # source://actionpack/7.0.8.7/lib/action_controller/base.rb#198 - def without_modules(*modules); end - end + extend ::AbstractController::Helpers::Resolution end -# source://actionview//lib/action_view/gem_version.rb#3 +# :include: ../README.rdoc +# +# pkg:gem/actionview#lib/action_view/gem_version.rb:3 module ActionView extend ::ActiveSupport::Autoload class << self - # source://actionview//lib/action_view.rb#90 + # pkg:gem/actionview#lib/action_view/deprecator.rb:4 + def deprecator; end + + # pkg:gem/actionview#lib/action_view.rb:94 def eager_load!; end - # Returns the currently loaded version of Action View as a Gem::Version. + # Returns the currently loaded version of Action View as a +Gem::Version+. # - # source://actionview//lib/action_view/gem_version.rb#5 + # pkg:gem/actionview#lib/action_view/gem_version.rb:5 def gem_version; end - # Returns the currently loaded version of Action View as a Gem::Version. + # Returns the currently loaded version of Action View as a +Gem::Version+. # - # source://actionview//lib/action_view/version.rb#7 + # pkg:gem/actionview#lib/action_view/version.rb:7 def version; end end end @@ -561,56 +54,52 @@ end # that new object is called in turn. This abstracts the set up and rendering # into a separate classes for partials and templates. # -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#21 +# pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:21 class ActionView::AbstractRenderer - # @return [AbstractRenderer] a new instance of AbstractRenderer - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#24 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:24 def initialize(lookup_context); end - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#22 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:22 def any_templates?(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#22 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:22 def formats(*_arg0, **_arg1, &_arg2); end - # @raise [NotImplementedError] - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#28 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:28 def render; end - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#22 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:22 def template_exists?(*_arg0, **_arg1, &_arg2); end private - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#182 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:182 def build_rendered_collection(templates, spacer); end - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#178 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:178 def build_rendered_template(content, template); end - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#159 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:159 def extract_details(options); end - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#171 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:171 def prepend_formats(formats); end end -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#157 +# pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:157 ActionView::AbstractRenderer::NO_DETAILS = T.let(T.unsafe(nil), Hash) -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#32 +# pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:32 module ActionView::AbstractRenderer::ObjectRendering - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#37 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:37 def initialize(lookup_context, options); end private - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#43 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:43 def local_variable(path); end - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#92 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:92 def merge_prefix_into_object_path(prefix, object_path); end # Obtains the path to where the object's partial is located. If the object @@ -621,99 +110,81 @@ module ActionView::AbstractRenderer::ObjectRendering # If +prefix_partial_path_with_controller_namespace+ is true, then this # method will prefix the partial paths with a namespace. # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#76 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:76 def partial_path(object, view); end - # @raise [ArgumentError] - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#61 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:61 def raise_invalid_identifier(path); end - # @raise [ArgumentError] - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#65 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:65 def raise_invalid_option_as(as); end end -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#54 +# pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:54 ActionView::AbstractRenderer::ObjectRendering::IDENTIFIER_ERROR_MESSAGE = T.let(T.unsafe(nil), String) -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#57 +# pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:57 ActionView::AbstractRenderer::ObjectRendering::OPTION_AS_ERROR_MESSAGE = T.let(T.unsafe(nil), String) -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#33 +# pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:33 ActionView::AbstractRenderer::ObjectRendering::PREFIXED_PARTIAL_NAMES = T.let(T.unsafe(nil), Concurrent::Map) -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#110 +# pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:110 class ActionView::AbstractRenderer::RenderedCollection - # @return [RenderedCollection] a new instance of RenderedCollection - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#117 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:117 def initialize(rendered_templates, spacer); end - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#122 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:122 def body; end - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#126 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:126 def format; end - # Returns the value of attribute rendered_templates. - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#115 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:115 def rendered_templates; end class << self - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#111 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:111 def empty(format); end end end -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#130 +# pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:130 class ActionView::AbstractRenderer::RenderedCollection::EmptyCollection - # @return [EmptyCollection] a new instance of EmptyCollection - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#133 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:133 def initialize(format); end - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#137 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:137 def body; end - # Returns the value of attribute format. - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#131 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:131 def format; end end -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#141 +# pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:141 class ActionView::AbstractRenderer::RenderedTemplate - # @return [RenderedTemplate] a new instance of RenderedTemplate - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#144 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:144 def initialize(body, template); end - # Returns the value of attribute body. - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#142 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:142 def body; end - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#149 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:149 def format; end - # Returns the value of attribute template. - # - # source://actionview//lib/action_view/renderer/abstract_renderer.rb#142 + # pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:142 def template; end end -# source://actionview//lib/action_view/renderer/abstract_renderer.rb#153 +# pkg:gem/actionview#lib/action_view/renderer/abstract_renderer.rb:153 ActionView::AbstractRenderer::RenderedTemplate::EMPTY_SPACER = T.let(T.unsafe(nil), T.untyped) # = Action View Errors # -# source://actionview//lib/action_view/template/error.rb#7 +# pkg:gem/actionview#lib/action_view/template/error.rb:8 class ActionView::ActionViewError < ::StandardError; end -# = Action View Base +# = Action View \Base # # Action View templates can be written in several ways. # If the template file has a .erb extension, then it uses the erubi[https://rubygems.org/gems/erubi] @@ -747,9 +218,9 @@ class ActionView::ActionViewError < ::StandardError; end # Using sub templates allows you to sidestep tedious replication and extract common display structures in shared templates. The # classic example is the use of a header and footer (even though the Action Pack-way would be to use Layouts): # -# <%= render "shared/header" %> +# <%= render "application/header" %> # Something really specific and terrific -# <%= render "shared/footer" %> +# <%= render "application/footer" %> # # As you see, we use the output embeddings for the render methods. The render call itself will just return a string holding the # result of the rendering. The output embedding writes it to the current template. @@ -758,7 +229,7 @@ class ActionView::ActionViewError < ::StandardError; end # variables defined using the regular embedding tags. Like this: # # <% @page_title = "A Wonderful Hello" %> -# <%= render "shared/header" %> +# <%= render "application/header" %> # # Now the header can pick up on the @page_title variable and use it for outputting a title tag: # @@ -768,9 +239,9 @@ class ActionView::ActionViewError < ::StandardError; end # # You can pass local variables to sub templates by using a hash with the variable names as keys and the objects as values: # -# <%= render "shared/header", { headline: "Welcome", person: person } %> +# <%= render "application/header", { headline: "Welcome", person: person } %> # -# These can now be accessed in shared/header with: +# These can now be accessed in application/header with: # # Headline: <%= headline %> # First name: <%= person.first_name %> @@ -783,10 +254,27 @@ class ActionView::ActionViewError < ::StandardError; end # This is useful in cases where you aren't sure if the local variable has been assigned. Alternatively, you could also use # defined? headline to first check if the variable has been assigned before using it. # +# By default, templates will accept any locals as keyword arguments. To restrict what locals a template accepts, add a locals: magic comment: +# +# <%# locals: (headline:) %> +# +# Headline: <%= headline %> +# +# In cases where the local variables are optional, declare the keyword argument with a default value: +# +# <%# locals: (headline: nil) %> +# +# <% unless headline.nil? %> +# Headline: <%= headline %> +# <% end %> +# +# Read more about strict locals in {Action View Overview}[https://guides.rubyonrails.org/action_view_overview.html#strict-locals] +# in the guides. +# # === Template caching # -# By default, Rails will compile each template to a method in order to render it. When you alter a template, -# Rails will check the file's modification time and recompile it in development mode. +# By default, \Rails will compile each template to a method in order to render it. When you alter a template, +# \Rails will check the file's modification time and recompile it in development mode. # # == Builder # @@ -839,25 +327,27 @@ class ActionView::ActionViewError < ::StandardError; end # end # end # -# For more information on Builder please consult the {source -# code}[https://github.com/jimweirich/builder]. +# For more information on Builder please consult the {source code}[https://github.com/rails/builder]. # -# source://actionview//lib/action_view/base.rb#141 +# pkg:gem/actionview#lib/action_view/base.rb:157 class ActionView::Base include ::ActionView::Context include ::ERB::Escape include ::ERB::Util + include ::ActiveSupport::CoreExt::ERBUtil + include ::ActiveSupport::CoreExt::ERBUtilPrivate include ::ActiveSupport::Benchmarkable include ::ActionView::Helpers::ActiveModelHelper include ::ActionView::Helpers::AssetUrlHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper - include ::ActionView::Helpers::UrlHelper - include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::AssetTagHelper include ::ActionView::Helpers::AtomFeedHelper include ::ActionView::Helpers::CacheHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::ControllerHelper include ::ActionView::Helpers::CspHelper include ::ActionView::Helpers::CsrfHelper @@ -879,292 +369,269 @@ class ActionView::Base # :startdoc: # - # @return [Base] a new instance of Base - # - # source://actionview//lib/action_view/base.rb#227 + # pkg:gem/actionview#lib/action_view/base.rb:244 def initialize(lookup_context, assigns, controller); end - # source://actionview//lib/action_view/base.rb#165 + # pkg:gem/actionview#lib/action_view/base.rb:181 def _routes; end - # source://actionview//lib/action_view/base.rb#165 + # pkg:gem/actionview#lib/action_view/base.rb:181 def _routes=(_arg0); end - # source://actionview//lib/action_view/base.rb#165 + # pkg:gem/actionview#lib/action_view/base.rb:181 def _routes?; end - # source://actionview//lib/action_view/base.rb#240 - def _run(method, template, locals, buffer, add_to_stack: T.unsafe(nil), &block); end + # pkg:gem/actionview#lib/action_view/base.rb:261 + def _run(method, template, locals, buffer, add_to_stack: T.unsafe(nil), has_strict_locals: T.unsafe(nil), &block); end - # source://actionview//lib/action_view/base.rb#163 + # pkg:gem/actionview#lib/action_view/base.rb:179 def annotate_rendered_view_with_filenames; end - # source://actionview//lib/action_view/base.rb#163 + # pkg:gem/actionview#lib/action_view/base.rb:179 def annotate_rendered_view_with_filenames=(val); end - # source://actionview//lib/action_view/base.rb#207 + # pkg:gem/actionview#lib/action_view/base.rb:223 def assign(new_assigns); end - # source://activesupport/7.0.8.7/lib/active_support/core_ext/module/attr_internal.rb#33 + # pkg:gem/actionview#lib/action_view/base.rb:219 def assigns; end - # source://activesupport/7.0.8.7/lib/active_support/core_ext/module/attr_internal.rb#33 + # pkg:gem/actionview#lib/action_view/base.rb:219 def assigns=(_arg0); end - # source://actionview//lib/action_view/base.rb#160 + # pkg:gem/actionview#lib/action_view/base.rb:176 def automatically_disable_submit_tag; end - # source://actionview//lib/action_view/base.rb#160 + # pkg:gem/actionview#lib/action_view/base.rb:176 def automatically_disable_submit_tag=(val); end - # @raise [NotImplementedError] - # - # source://actionview//lib/action_view/base.rb#249 + # pkg:gem/actionview#lib/action_view/base.rb:284 def compiled_method_container; end - # source://activesupport/7.0.8.7/lib/active_support/core_ext/module/attr_internal.rb#33 + # pkg:gem/actionview#lib/action_view/base.rb:219 def config; end - # source://activesupport/7.0.8.7/lib/active_support/core_ext/module/attr_internal.rb#33 + # pkg:gem/actionview#lib/action_view/base.rb:219 def config=(_arg0); end - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 + # pkg:gem/actionview#lib/action_view/base.rb:158 def debug_missing_translation; end - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 + # pkg:gem/actionview#lib/action_view/base.rb:158 def debug_missing_translation=(val); end - # source://actionview//lib/action_view/base.rb#157 + # pkg:gem/actionview#lib/action_view/base.rb:173 def default_formats; end - # source://actionview//lib/action_view/base.rb#157 + # pkg:gem/actionview#lib/action_view/base.rb:173 def default_formats=(val); end - # source://actionview//lib/action_view/base.rb#145 + # pkg:gem/actionview#lib/action_view/base.rb:161 def field_error_proc; end - # source://actionview//lib/action_view/base.rb#145 + # pkg:gem/actionview#lib/action_view/base.rb:161 def field_error_proc=(val); end - # source://actionview//lib/action_view/base.rb#205 + # pkg:gem/actionview#lib/action_view/base.rb:221 def formats(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/base.rb#205 + # pkg:gem/actionview#lib/action_view/base.rb:221 def formats=(arg); end - # source://actionview//lib/action_view/base.rb#257 + # pkg:gem/actionview#lib/action_view/base.rb:292 def in_rendering_context(options); end - # source://actionview//lib/action_view/base.rb#205 + # pkg:gem/actionview#lib/action_view/base.rb:221 def locale(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/base.rb#205 + # pkg:gem/actionview#lib/action_view/base.rb:221 def locale=(arg); end - # source://actionview//lib/action_view/base.rb#166 + # pkg:gem/actionview#lib/action_view/base.rb:182 def logger; end - # source://actionview//lib/action_view/base.rb#166 + # pkg:gem/actionview#lib/action_view/base.rb:182 def logger=(_arg0); end - # source://actionview//lib/action_view/base.rb#166 + # pkg:gem/actionview#lib/action_view/base.rb:182 def logger?; end - # Returns the value of attribute lookup_context. - # - # source://actionview//lib/action_view/base.rb#202 + # pkg:gem/actionview#lib/action_view/base.rb:218 def lookup_context; end - # source://actionview//lib/action_view/base.rb#154 + # pkg:gem/actionview#lib/action_view/base.rb:170 def prefix_partial_path_with_controller_namespace; end - # source://actionview//lib/action_view/base.rb#154 + # pkg:gem/actionview#lib/action_view/base.rb:170 def prefix_partial_path_with_controller_namespace=(_arg0); end - # source://actionview//lib/action_view/base.rb#154 + # pkg:gem/actionview#lib/action_view/base.rb:170 def prefix_partial_path_with_controller_namespace?; end - # source://actionview//lib/action_view/base.rb#149 + # pkg:gem/actionview#lib/action_view/base.rb:165 def streaming_completion_on_exception; end - # source://actionview//lib/action_view/base.rb#149 + # pkg:gem/actionview#lib/action_view/base.rb:165 def streaming_completion_on_exception=(val); end - # source://actionview//lib/action_view/base.rb#205 + # pkg:gem/actionview#lib/action_view/base.rb:221 def view_paths(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/base.rb#205 + # pkg:gem/actionview#lib/action_view/base.rb:221 def view_paths=(arg); end - # Returns the value of attribute view_renderer. - # - # source://actionview//lib/action_view/base.rb#202 + # pkg:gem/actionview#lib/action_view/base.rb:218 def view_renderer; end class << self - # source://actionview//lib/action_view/base.rb#165 + # pkg:gem/actionview#lib/action_view/base.rb:181 def _routes; end - # source://actionview//lib/action_view/base.rb#165 + # pkg:gem/actionview#lib/action_view/base.rb:181 def _routes=(value); end - # source://actionview//lib/action_view/base.rb#165 + # pkg:gem/actionview#lib/action_view/base.rb:181 def _routes?; end - # source://actionview//lib/action_view/base.rb#163 + # pkg:gem/actionview#lib/action_view/base.rb:179 def annotate_rendered_view_with_filenames; end - # source://actionview//lib/action_view/base.rb#163 + # pkg:gem/actionview#lib/action_view/base.rb:179 def annotate_rendered_view_with_filenames=(val); end - # source://actionview//lib/action_view/base.rb#160 + # pkg:gem/actionview#lib/action_view/base.rb:176 def automatically_disable_submit_tag; end - # source://actionview//lib/action_view/base.rb#160 + # pkg:gem/actionview#lib/action_view/base.rb:176 def automatically_disable_submit_tag=(val); end - # source://actionview//lib/action_view/base.rb#171 + # pkg:gem/actionview#lib/action_view/base.rb:187 def cache_template_loading; end - # source://actionview//lib/action_view/base.rb#175 + # pkg:gem/actionview#lib/action_view/base.rb:191 def cache_template_loading=(value); end - # @return [Boolean] - # - # source://actionview//lib/action_view/base.rb#197 + # pkg:gem/actionview#lib/action_view/base.rb:213 def changed?(other); end - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 + # pkg:gem/actionview#lib/action_view/base.rb:158 def debug_missing_translation; end - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 + # pkg:gem/actionview#lib/action_view/base.rb:158 def debug_missing_translation=(val); end - # source://actionview//lib/action_view/helpers/form_helper.rb#2730 + # pkg:gem/actionview#lib/action_view/base.rb:311 def default_form_builder; end - # source://actionview//lib/action_view/helpers/form_helper.rb#2730 + # pkg:gem/actionview#lib/action_view/base.rb:311 def default_form_builder=(val); end - # source://actionview//lib/action_view/base.rb#157 + # pkg:gem/actionview#lib/action_view/base.rb:173 def default_formats; end - # source://actionview//lib/action_view/base.rb#157 + # pkg:gem/actionview#lib/action_view/base.rb:173 def default_formats=(val); end # :stopdoc: # - # source://actionview//lib/action_view/base.rb#213 + # pkg:gem/actionview#lib/action_view/base.rb:230 def empty; end - # source://actionview//lib/action_view/base.rb#169 + # pkg:gem/actionview#lib/action_view/base.rb:185 def erb_trim_mode=(arg); end - # source://actionview//lib/action_view/base.rb#145 + # pkg:gem/actionview#lib/action_view/base.rb:161 def field_error_proc; end - # source://actionview//lib/action_view/base.rb#145 + # pkg:gem/actionview#lib/action_view/base.rb:161 def field_error_proc=(val); end - # source://actionview//lib/action_view/base.rb#166 + # pkg:gem/actionview#lib/action_view/base.rb:182 def logger; end - # source://actionview//lib/action_view/base.rb#166 + # pkg:gem/actionview#lib/action_view/base.rb:182 def logger=(value); end - # source://actionview//lib/action_view/base.rb#166 + # pkg:gem/actionview#lib/action_view/base.rb:182 def logger?; end - # source://actionview//lib/action_view/base.rb#154 + # pkg:gem/actionview#lib/action_view/base.rb:170 def prefix_partial_path_with_controller_namespace; end - # source://actionview//lib/action_view/base.rb#154 + # pkg:gem/actionview#lib/action_view/base.rb:170 def prefix_partial_path_with_controller_namespace=(value); end - # source://actionview//lib/action_view/base.rb#154 + # pkg:gem/actionview#lib/action_view/base.rb:170 def prefix_partial_path_with_controller_namespace?; end - # source://actionview//lib/action_view/base.rb#149 + # pkg:gem/actionview#lib/action_view/base.rb:165 def streaming_completion_on_exception; end - # source://actionview//lib/action_view/base.rb#149 + # pkg:gem/actionview#lib/action_view/base.rb:165 def streaming_completion_on_exception=(val); end - # source://actionview//lib/action_view/base.rb#221 + # pkg:gem/actionview#lib/action_view/base.rb:238 def with_context(context, assigns = T.unsafe(nil), controller = T.unsafe(nil)); end - # source://actionview//lib/action_view/base.rb#183 + # pkg:gem/actionview#lib/action_view/base.rb:199 def with_empty_template_cache; end - # source://actionview//lib/action_view/base.rb#217 + # pkg:gem/actionview#lib/action_view/base.rb:234 def with_view_paths(view_paths, assigns = T.unsafe(nil), controller = T.unsafe(nil)); end - # @return [Boolean] - # - # source://actionview//lib/action_view/base.rb#179 + # pkg:gem/actionview#lib/action_view/base.rb:195 def xss_safe?; end end end -# source://actionview//lib/action_view/cache_expiry.rb#4 -class ActionView::CacheExpiry; end +# pkg:gem/actionview#lib/action_view/cache_expiry.rb:4 +module ActionView::CacheExpiry; end -# source://actionview//lib/action_view/cache_expiry.rb#5 -class ActionView::CacheExpiry::Executor - # @return [Executor] a new instance of Executor - # - # source://actionview//lib/action_view/cache_expiry.rb#6 - def initialize(watcher:); end +# pkg:gem/actionview#lib/action_view/cache_expiry.rb:5 +class ActionView::CacheExpiry::ViewReloader + # pkg:gem/actionview#lib/action_view/cache_expiry.rb:6 + def initialize(watcher:, &block); end - # source://actionview//lib/action_view/cache_expiry.rb#20 - def complete(_); end + # pkg:gem/actionview#lib/action_view/cache_expiry.rb:21 + def execute; end - # source://actionview//lib/action_view/cache_expiry.rb#13 - def run; end + # pkg:gem/actionview#lib/action_view/cache_expiry.rb:16 + def updated?; end private - # source://actionview//lib/action_view/cache_expiry.rb#25 - def clear_cache; end -end - -# source://actionview//lib/action_view/cache_expiry.rb#32 -class ActionView::CacheExpiry::ViewModificationWatcher - # @return [ViewModificationWatcher] a new instance of ViewModificationWatcher - # - # source://actionview//lib/action_view/cache_expiry.rb#33 - def initialize(watcher:, &block); end + # pkg:gem/actionview#lib/action_view/cache_expiry.rb:64 + def all_view_paths; end - # source://actionview//lib/action_view/cache_expiry.rb#41 - def execute_if_updated; end + # pkg:gem/actionview#lib/action_view/cache_expiry.rb:37 + def build_watcher; end - private + # pkg:gem/actionview#lib/action_view/cache_expiry.rb:60 + def dirs_to_watch; end - # source://actionview//lib/action_view/cache_expiry.rb#61 - def all_view_paths; end + # pkg:gem/actionview#lib/action_view/cache_expiry.rb:55 + def rebuild_watcher; end - # source://actionview//lib/action_view/cache_expiry.rb#57 - def dirs_to_watch; end + # pkg:gem/actionview#lib/action_view/cache_expiry.rb:33 + def reload!; end end -# source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#6 +# pkg:gem/actionview#lib/action_view/renderer/partial_renderer/collection_caching.rb:6 module ActionView::CollectionCaching extend ::ActiveSupport::Concern private - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#20 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer/collection_caching.rb:20 def cache_collection_render(instrumentation_payload, view, template, collection); end - # @return [Boolean] - # - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#54 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer/collection_caching.rb:54 def callable_cache_key?; end - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#58 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer/collection_caching.rb:58 def collection_by_cache_keys(view, template, collection); end - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#70 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer/collection_caching.rb:71 def expanded_cache_key(key, view, template, digest_path); end # `order_by` is an enumerable object containing keys of the cache, @@ -1183,92 +650,88 @@ module ActionView::CollectionCaching # If the partial is not already cached it will also be # written back to the underlying cache store. # - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#90 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer/collection_caching.rb:91 def fetch_or_cache_partial(cached_partials, template, order_by:); end - # @return [Boolean] - # - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#16 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer/collection_caching.rb:16 def will_cache?(options, view); end end -# source://actionview//lib/action_view/renderer/collection_renderer.rb#33 +# pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:33 class ActionView::CollectionRenderer < ::ActionView::PartialRenderer include ::ActionView::AbstractRenderer::ObjectRendering - # source://actionview//lib/action_view/renderer/collection_renderer.rb#122 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:130 def render_collection_derive_partial(collection, context, block); end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#104 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:112 def render_collection_with_partial(collection, partial, context, block); end private - # source://actionview//lib/action_view/renderer/collection_renderer.rb#174 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:182 def collection_with_template(view, template, layout, collection); end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#145 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:153 def render_collection(collection, view, path, template, layout, block); end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#140 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:148 def retrieve_variable(path); end end -# source://actionview//lib/action_view/renderer/collection_renderer.rb#36 +# pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:36 class ActionView::CollectionRenderer::CollectionIterator include ::Enumerable - # @return [CollectionIterator] a new instance of CollectionIterator - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#39 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:39 def initialize(collection); end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#43 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:43 def each(&blk); end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#51 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:51 def length; end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#47 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:55 + def preload!; end + + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:47 def size; end end -# source://actionview//lib/action_view/renderer/collection_renderer.rb#92 +# pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:100 class ActionView::CollectionRenderer::MixedCollectionIterator < ::ActionView::CollectionRenderer::CollectionIterator - # @return [MixedCollectionIterator] a new instance of MixedCollectionIterator - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#93 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:101 def initialize(collection, paths); end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#98 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:106 def each_with_info; end end -# source://actionview//lib/action_view/renderer/collection_renderer.rb#74 +# pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:78 class ActionView::CollectionRenderer::PreloadCollectionIterator < ::ActionView::CollectionRenderer::SameCollectionIterator - # @return [PreloadCollectionIterator] a new instance of PreloadCollectionIterator - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#75 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:79 def initialize(collection, path, variables, relation); end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#85 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:89 def each_with_info; end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#81 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:85 def from_collection(collection); end + + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:95 + def preload!; end end -# source://actionview//lib/action_view/renderer/collection_renderer.rb#56 +# pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:60 class ActionView::CollectionRenderer::SameCollectionIterator < ::ActionView::CollectionRenderer::CollectionIterator - # @return [SameCollectionIterator] a new instance of SameCollectionIterator - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#57 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:61 def initialize(collection, path, variables); end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#67 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:71 def each_with_info; end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#63 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:67 def from_collection(collection); end end @@ -1283,137 +746,117 @@ end # object that includes this module (although you can call _prepare_context # defined below). # -# source://actionview//lib/action_view/context.rb#14 +# pkg:gem/actionview#lib/action_view/context.rb:14 module ActionView::Context # Encapsulates the interaction with the view flow so it # returns the correct buffer on +yield+. This is usually # overwritten by helpers to add more behavior. # - # source://actionview//lib/action_view/context.rb#27 + # pkg:gem/actionview#lib/action_view/context.rb:27 def _layout_for(name = T.unsafe(nil)); end # Prepares the context by setting the appropriate instance variables. # - # source://actionview//lib/action_view/context.rb#18 + # pkg:gem/actionview#lib/action_view/context.rb:18 def _prepare_context; end - # Returns the value of attribute output_buffer. - # - # source://actionview//lib/action_view/context.rb#15 + # pkg:gem/actionview#lib/action_view/context.rb:15 def output_buffer; end - # Sets the attribute output_buffer - # - # @param value the value to set the attribute output_buffer to. - # - # source://actionview//lib/action_view/context.rb#15 + # pkg:gem/actionview#lib/action_view/context.rb:15 def output_buffer=(_arg0); end - # Returns the value of attribute view_flow. - # - # source://actionview//lib/action_view/context.rb#15 + # pkg:gem/actionview#lib/action_view/context.rb:15 def view_flow; end - # Sets the attribute view_flow - # - # @param value the value to set the attribute view_flow to. - # - # source://actionview//lib/action_view/context.rb#15 + # pkg:gem/actionview#lib/action_view/context.rb:15 def view_flow=(_arg0); end end -# source://actionview//lib/action_view/dependency_tracker.rb#8 +# pkg:gem/actionview#lib/action_view/dependency_tracker.rb:8 class ActionView::DependencyTracker extend ::ActiveSupport::Autoload class << self - # source://actionview//lib/action_view/dependency_tracker.rb#16 + # pkg:gem/actionview#lib/action_view/dependency_tracker.rb:16 def find_dependencies(name, template, view_paths = T.unsafe(nil)); end - # source://actionview//lib/action_view/dependency_tracker.rb#23 + # pkg:gem/actionview#lib/action_view/dependency_tracker.rb:23 def register_tracker(extension, tracker); end - # source://actionview//lib/action_view/dependency_tracker.rb#34 + # pkg:gem/actionview#lib/action_view/dependency_tracker.rb:34 def remove_tracker(handler); end end end -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#5 +# pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:5 class ActionView::DependencyTracker::ERBTracker - # @return [ERBTracker] a new instance of ERBTracker - # - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#72 + # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:72 def initialize(name, template, view_paths = T.unsafe(nil)); end - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#76 + # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:76 def dependencies; end private - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#104 + # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:104 def add_dependencies(render_dependencies, arguments, pattern); end - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#112 + # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:112 def add_dynamic_dependency(dependencies, dependency); end - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#118 + # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:118 def add_static_dependency(dependencies, dependency, quote_type); end - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#88 + # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:88 def directory; end - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#145 + # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:145 def explicit_dependencies; end - # Returns the value of attribute name. - # - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#80 + # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:80 def name; end - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#92 + # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:92 def render_dependencies; end - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#133 + # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:133 def resolve_directories(wildcard_dependencies); end - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#84 + # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:84 def source; end - # Returns the value of attribute template. - # - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#80 + # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:80 def template; end class << self - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#68 + # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:68 def call(name, template, view_paths = T.unsafe(nil)); end - # @return [Boolean] - # - # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#64 + # pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:64 def supports_view_paths?; end end end -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#6 +# pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:6 ActionView::DependencyTracker::ERBTracker::EXPLICIT_DEPENDENCY = T.let(T.unsafe(nil), Regexp) # A valid ruby identifier - suitable for class, method and specially variable names # -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#9 +# pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:9 ActionView::DependencyTracker::ERBTracker::IDENTIFIER = T.let(T.unsafe(nil), Regexp) -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#58 +# pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:58 ActionView::DependencyTracker::ERBTracker::LAYOUT_DEPENDENCY = T.let(T.unsafe(nil), Regexp) # Part of any hash containing the :layout key # -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#36 +# pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:36 ActionView::DependencyTracker::ERBTracker::LAYOUT_HASH_KEY = T.let(T.unsafe(nil), Regexp) # Part of any hash containing the :partial key # -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#30 +# pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:30 ActionView::DependencyTracker::ERBTracker::PARTIAL_HASH_KEY = T.let(T.unsafe(nil), Regexp) # Matches: @@ -1428,236 +871,210 @@ ActionView::DependencyTracker::ERBTracker::PARTIAL_HASH_KEY = T.let(T.unsafe(nil # topics => "topics/topic" # (message.topics) => "topics/topic" # -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#52 +# pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:52 ActionView::DependencyTracker::ERBTracker::RENDER_ARGUMENTS = T.let(T.unsafe(nil), Regexp) # A simple string literal. e.g. "School's out!" # -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#23 +# pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:23 ActionView::DependencyTracker::ERBTracker::STRING = T.let(T.unsafe(nil), Regexp) # Any kind of variable name. e.g. @instance, @@class, $global or local. # Possibly following a method call chain # -# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#16 +# pkg:gem/actionview#lib/action_view/dependency_tracker/erb_tracker.rb:16 ActionView::DependencyTracker::ERBTracker::VARIABLE_OR_METHOD_CHAIN = T.let(T.unsafe(nil), Regexp) -# source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#5 -class ActionView::DependencyTracker::RipperTracker - # @return [RipperTracker] a new instance of RipperTracker - # - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#20 - def initialize(name, template, view_paths = T.unsafe(nil)); end +# pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:5 +class ActionView::DependencyTracker::RubyTracker + # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:20 + def initialize(name, template, view_paths = T.unsafe(nil), parser_class: T.unsafe(nil)); end - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#12 + # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:12 def dependencies; end private - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#38 + # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:39 def explicit_dependencies; end - # Returns the value of attribute name. - # - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#25 + # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:26 def name; end - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#27 + # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:28 def render_dependencies; end - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#46 + # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:47 def resolve_directories(wildcard_dependencies); end - # Returns the value of attribute template. - # - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#25 + # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:26 def template; end - # Returns the value of attribute view_paths. - # - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#25 + # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:26 def view_paths; end class << self - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#8 + # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:8 def call(name, template, view_paths = T.unsafe(nil)); end - # @return [Boolean] - # - # source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#16 + # pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:16 def supports_view_paths?; end end end -# source://actionview//lib/action_view/dependency_tracker/ripper_tracker.rb#6 -ActionView::DependencyTracker::RipperTracker::EXPLICIT_DEPENDENCY = T.let(T.unsafe(nil), Regexp) +# pkg:gem/actionview#lib/action_view/dependency_tracker/ruby_tracker.rb:6 +ActionView::DependencyTracker::RubyTracker::EXPLICIT_DEPENDENCY = T.let(T.unsafe(nil), Regexp) -# source://actionview//lib/action_view/digestor.rb#6 +# pkg:gem/actionview#lib/action_view/digestor.rb:6 class ActionView::Digestor class << self # Supported options: # # * name - Template name # * format - Template format - # * finder - An instance of ActionView::LookupContext + # * +finder+ - An instance of ActionView::LookupContext # * dependencies - An array of dependent views # - # source://actionview//lib/action_view/digestor.rb#16 + # pkg:gem/actionview#lib/action_view/digestor.rb:16 def digest(name:, finder:, format: T.unsafe(nil), dependencies: T.unsafe(nil)); end - # source://actionview//lib/action_view/digestor.rb#38 + # pkg:gem/actionview#lib/action_view/digestor.rb:38 def logger; end # Create a dependency tree for template named +name+. # - # source://actionview//lib/action_view/digestor.rb#43 + # pkg:gem/actionview#lib/action_view/digestor.rb:43 def tree(name, finder, partial = T.unsafe(nil), seen = T.unsafe(nil)); end private - # source://actionview//lib/action_view/digestor.rb#71 + # pkg:gem/actionview#lib/action_view/digestor.rb:71 def find_template(finder, name, prefixes, partial, keys); end end end -# source://actionview//lib/action_view/digestor.rb#121 +# pkg:gem/actionview#lib/action_view/digestor.rb:125 class ActionView::Digestor::Injected < ::ActionView::Digestor::Node - # source://actionview//lib/action_view/digestor.rb#122 + # pkg:gem/actionview#lib/action_view/digestor.rb:126 def digest(finder, _ = T.unsafe(nil)); end end -# source://actionview//lib/action_view/digestor.rb#117 +# pkg:gem/actionview#lib/action_view/digestor.rb:121 class ActionView::Digestor::Missing < ::ActionView::Digestor::Node - # source://actionview//lib/action_view/digestor.rb#118 + # pkg:gem/actionview#lib/action_view/digestor.rb:122 def digest(finder, _ = T.unsafe(nil)); end end -# source://actionview//lib/action_view/digestor.rb#78 +# pkg:gem/actionview#lib/action_view/digestor.rb:78 class ActionView::Digestor::Node - # @return [Node] a new instance of Node - # - # source://actionview//lib/action_view/digestor.rb#86 + # pkg:gem/actionview#lib/action_view/digestor.rb:86 def initialize(name, logical_name, template, children = T.unsafe(nil)); end - # Returns the value of attribute children. - # - # source://actionview//lib/action_view/digestor.rb#79 + # pkg:gem/actionview#lib/action_view/digestor.rb:79 def children; end - # source://actionview//lib/action_view/digestor.rb#97 + # pkg:gem/actionview#lib/action_view/digestor.rb:97 def dependency_digest(finder, stack); end - # source://actionview//lib/action_view/digestor.rb#93 + # pkg:gem/actionview#lib/action_view/digestor.rb:93 def digest(finder, stack = T.unsafe(nil)); end - # Returns the value of attribute logical_name. - # - # source://actionview//lib/action_view/digestor.rb#79 + # pkg:gem/actionview#lib/action_view/digestor.rb:79 def logical_name; end - # Returns the value of attribute name. - # - # source://actionview//lib/action_view/digestor.rb#79 + # pkg:gem/actionview#lib/action_view/digestor.rb:79 def name; end - # Returns the value of attribute template. - # - # source://actionview//lib/action_view/digestor.rb#79 + # pkg:gem/actionview#lib/action_view/digestor.rb:79 def template; end - # source://actionview//lib/action_view/digestor.rb#110 - def to_dep_map; end + # pkg:gem/actionview#lib/action_view/digestor.rb:110 + def to_dep_map(seen = T.unsafe(nil)); end class << self - # source://actionview//lib/action_view/digestor.rb#81 + # pkg:gem/actionview#lib/action_view/digestor.rb:81 def create(name, logical_name, template, partial); end end end -# source://actionview//lib/action_view/digestor.rb#125 +# pkg:gem/actionview#lib/action_view/digestor.rb:129 class ActionView::Digestor::NullLogger class << self - # source://actionview//lib/action_view/digestor.rb#126 + # pkg:gem/actionview#lib/action_view/digestor.rb:130 def debug(_); end - # source://actionview//lib/action_view/digestor.rb#127 + # pkg:gem/actionview#lib/action_view/digestor.rb:131 def error(_); end end end -# source://actionview//lib/action_view/digestor.rb#115 +# pkg:gem/actionview#lib/action_view/digestor.rb:119 class ActionView::Digestor::Partial < ::ActionView::Digestor::Node; end -# source://actionview//lib/action_view.rb#33 +# pkg:gem/actionview#lib/action_view.rb:35 ActionView::ENCODING_FLAG = T.let(T.unsafe(nil), String) -# source://actionview//lib/action_view/template/error.rb#10 +# pkg:gem/actionview#lib/action_view/template/error.rb:11 class ActionView::EncodingError < ::StandardError; end # A resolver that loads files from the filesystem. # -# source://actionview//lib/action_view/template/resolver.rb#89 +# pkg:gem/actionview#lib/action_view/template/resolver.rb:91 class ActionView::FileSystemResolver < ::ActionView::Resolver - # @raise [ArgumentError] - # @return [FileSystemResolver] a new instance of FileSystemResolver - # - # source://actionview//lib/action_view/template/resolver.rb#92 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:94 def initialize(path); end - # @return [Boolean] - # - # source://actionview//lib/action_view/template/resolver.rb#111 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:116 def ==(resolver); end - # source://actionview//lib/action_view/template/resolver.rb#116 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:118 def all_template_paths; end - # source://actionview//lib/action_view/template/resolver.rb#100 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:127 + def built_templates; end + + # pkg:gem/actionview#lib/action_view/template/resolver.rb:102 def clear_cache; end - # @return [Boolean] - # - # source://actionview//lib/action_view/template/resolver.rb#111 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:113 def eql?(resolver); end - # Returns the value of attribute path. - # - # source://actionview//lib/action_view/template/resolver.rb#90 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:92 def path; end - # source://actionview//lib/action_view/template/resolver.rb#106 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:111 def to_path; end - # source://actionview//lib/action_view/template/resolver.rb#106 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:108 def to_s; end private - # source://actionview//lib/action_view/template/resolver.rb#126 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:132 def _find_all(name, prefix, partial, details, key, locals); end - # source://actionview//lib/action_view/template/resolver.rb#145 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:151 def build_unbound_template(template); end - # source://actionview//lib/action_view/template/resolver.rb#203 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:209 def escape_entry(entry); end - # source://actionview//lib/action_view/template/resolver.rb#175 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:181 def filter_and_sort_by_details(templates, requested_details); end - # source://actionview//lib/action_view/template/resolver.rb#141 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:147 def source_for_template(template); end # Safe glob within @path # - # source://actionview//lib/action_view/template/resolver.rb#190 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:196 def template_glob(glob); end - # source://actionview//lib/action_view/template/resolver.rb#158 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:164 def unbound_templates_from_path(path); end end -# source://actionview//lib/action_view/helpers/capture_helper.rb#7 +# pkg:gem/actionview#lib/action_view/helpers/capture_helper.rb:6 module ActionView::Helpers include ::ActiveSupport::Benchmarkable include ::ActionView::Helpers::ActiveModelHelper @@ -1669,6 +1086,7 @@ module ActionView::Helpers include ::ActionView::Helpers::AssetTagHelper include ::ActionView::Helpers::AtomFeedHelper include ::ActionView::Helpers::CacheHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper include ::ActionView::Helpers::ControllerHelper include ::ActionView::Helpers::CspHelper include ::ActionView::Helpers::CsrfHelper @@ -1692,49 +1110,47 @@ module ActionView::Helpers mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods class << self - # source://actionview//lib/action_view/helpers.rb#34 + # pkg:gem/actionview#lib/action_view/helpers.rb:35 def eager_load!; end end end -# source://actionview//lib/action_view/helpers/active_model_helper.rb#9 +# pkg:gem/actionview#lib/action_view/helpers/active_model_helper.rb:8 module ActionView::Helpers::ActiveModelHelper; end -# source://actionview//lib/action_view/helpers/active_model_helper.rb#12 +# = Active \Model Instance Tag \Helpers +# +# pkg:gem/actionview#lib/action_view/helpers/active_model_helper.rb:12 module ActionView::Helpers::ActiveModelInstanceTag - # source://actionview//lib/action_view/helpers/active_model_helper.rb#20 + # pkg:gem/actionview#lib/action_view/helpers/active_model_helper.rb:20 def content_tag(type, options, *_arg2); end - # source://actionview//lib/action_view/helpers/active_model_helper.rb#36 + # pkg:gem/actionview#lib/action_view/helpers/active_model_helper.rb:36 def error_message; end - # source://actionview//lib/action_view/helpers/active_model_helper.rb#28 + # pkg:gem/actionview#lib/action_view/helpers/active_model_helper.rb:28 def error_wrapping(html_tag); end - # source://actionview//lib/action_view/helpers/active_model_helper.rb#13 + # pkg:gem/actionview#lib/action_view/helpers/active_model_helper.rb:13 def object; end - # source://actionview//lib/action_view/helpers/active_model_helper.rb#24 + # pkg:gem/actionview#lib/action_view/helpers/active_model_helper.rb:24 def tag(type, options, *_arg2); end private - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/active_model_helper.rb#41 + # pkg:gem/actionview#lib/action_view/helpers/active_model_helper.rb:41 def object_has_errors?; end - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/active_model_helper.rb#45 + # pkg:gem/actionview#lib/action_view/helpers/active_model_helper.rb:45 def select_markup_helper?(type); end - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/active_model_helper.rb#49 + # pkg:gem/actionview#lib/action_view/helpers/active_model_helper.rb:49 def tag_generate_errors?(options); end end +# = Action View Asset Tag \Helpers +# # This module provides methods for generating HTML that links views to assets such # as images, JavaScripts, stylesheets, and feeds. These methods do not verify # the assets exist before linking to them: @@ -1744,24 +1160,24 @@ end # stylesheet_link_tag("application") # # => # -# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#20 +# pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:21 module ActionView::Helpers::AssetTagHelper include ::ActionView::Helpers::AssetUrlHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:28 def apply_stylesheet_media_default; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:28 def apply_stylesheet_media_default=(val); end # Returns an HTML audio tag for the +sources+. If +sources+ is a string, # a single audio tag will be returned. If +sources+ is an array, an audio # tag with nested source tags for each source will be returned. The - # +sources+ can be full paths or files that exist in your public audios - # directory. + # +sources+ can be full paths, files that exist in your public audios + # directory, or Active Storage attachments. # # When the last parameter is a hash you can add HTML attributes using that # parameter. @@ -1775,7 +1191,12 @@ module ActionView::Helpers::AssetTagHelper # audio_tag("sound.wav", "sound.mid") # # => # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#486 + # Active Storage blobs (audios that are uploaded by the users of your app): + # + # audio_tag(user.name_pronunciation_audio) + # # => + # + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:593 def audio_tag(*sources); end # Returns a link tag that browsers and feed readers can use to auto-detect @@ -1806,7 +1227,7 @@ module ActionView::Helpers::AssetTagHelper # auto_discovery_link_tag(:rss, "http://www.example.com/feed.rss", {title: "Example RSS"}) # # => # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#235 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:271 def auto_discovery_link_tag(type = T.unsafe(nil), url_options = T.unsafe(nil), tag_options = T.unsafe(nil)); end # Returns a link tag for a favicon managed by the asset pipeline. @@ -1837,19 +1258,19 @@ module ActionView::Helpers::AssetTagHelper # favicon_link_tag 'mb-icon.png', rel: 'apple-touch-icon', type: 'image/png' # # => # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#276 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:312 def favicon_link_tag(source = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:26 def image_decoding; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:26 def image_decoding=(val); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#24 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:25 def image_loading; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#24 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:25 def image_loading=(val); end # Returns an HTML image tag for the +source+. The +source+ can be a full @@ -1860,8 +1281,8 @@ module ActionView::Helpers::AssetTagHelper # You can add HTML attributes using the +options+. The +options+ supports # additional keys for convenience and conformance: # - # * :size - Supplied as "{Width}x{Height}" or "{Number}", so "30x45" becomes - # width="30" and height="45", and "50" becomes width="50" and height="50". + # * :size - Supplied as "#{width}x#{height}" or "#{number}", so "30x45" becomes + # width="30" height="45", and "50" becomes width="50" height="50". # :size will be ignored if the value is not in the correct format. # * :srcset - If supplied as a hash or array of [source, descriptor] # pairs, each image path will be expanded before the list is formatted as a string. @@ -1898,7 +1319,7 @@ module ActionView::Helpers::AssetTagHelper # image_tag(user.avatar.variant(resize_to_limit: [100, 100]), size: '100') # # => # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#394 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:430 def image_tag(source, options = T.unsafe(nil)); end # Returns an HTML script tag for each of the +sources+ provided. @@ -1916,13 +1337,14 @@ module ActionView::Helpers::AssetTagHelper # When the Asset Pipeline is enabled, you can pass the name of your manifest as # source, and include other JavaScript or CoffeeScript files inside the manifest. # - # If the server supports Early Hints, header links for these assets will be - # automatically pushed. + # If the server supports HTTP Early Hints, and the +defer+ option is not + # enabled, \Rails will push a 103 Early Hints response that links + # to the assets. # # ==== Options # # When the last parameter is a hash you can add HTML attributes using that - # parameter. The following options are supported: + # parameter. This includes but is not limited to the following options: # # * :extname - Append an extension to the generated URL unless the extension # already exists. This only applies for relative URLs. @@ -1934,6 +1356,22 @@ module ActionView::Helpers::AssetTagHelper # when it is set to true. # * :nonce - When set to true, adds an automatic nonce value if # you have Content Security Policy enabled. + # * :async - When set to +true+, adds the +async+ HTML + # attribute, allowing the script to be fetched in parallel to be parsed + # and evaluated as soon as possible. + # * :defer - When set to +true+, adds the +defer+ HTML + # attribute, which indicates to the browser that the script is meant to + # be executed after the document has been parsed. Additionally, prevents + # sending the Preload Links header. + # * :nopush - Specify if the use of server push is not desired + # for the script. Defaults to +true+. + # + # Any other specified options will be treated as HTML attributes for the + # +script+ tag. + # + # For more information regarding how the :async and :defer + # options affect the # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#89 + # javascript_include_tag "http://www.example.com/xmlhr.js", async: true + # # => + # + # javascript_include_tag "http://www.example.com/xmlhr.js", defer: true + # # => + # + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:113 def javascript_include_tag(*sources); end + # Returns an HTML picture tag for the +sources+. If +sources+ is a string, + # a single picture tag will be returned. If +sources+ is an array, a picture + # tag with nested source tags for each source will be returned. The + # +sources+ can be full paths, files that exist in your public images + # directory, or Active Storage attachments. Since the picture tag requires + # an img tag, the last element you provide will be used for the img tag. + # For complete control over the picture tag, a block can be passed, which + # will populate the contents of the tag accordingly. + # + # ==== Options + # + # When the last parameter is a hash you can add HTML attributes using that + # parameter. Apart from all the HTML supported options, the following are supported: + # + # * :image - Hash of options that are passed directly to the +image_tag+ helper. + # + # ==== Examples + # + # picture_tag("picture.webp") + # # => + # picture_tag("gold.png", :image => { :size => "20" }) + # # => + # picture_tag("gold.png", :image => { :size => "45x70" }) + # # => + # picture_tag("picture.webp", "picture.png") + # # => + # picture_tag("picture.webp", "picture.png", :image => { alt: "Image" }) + # # => Image + # picture_tag(["picture.webp", "picture.png"], :image => { alt: "Image" }) + # # => Image + # picture_tag(:class => "my-class") { tag(:source, :srcset => image_path("picture.webp")) + image_tag("picture.png", :alt => "Image") } + # # => Image + # picture_tag { tag(:source, :srcset => image_path("picture-small.webp"), :media => "(min-width: 600px)") + tag(:source, :srcset => image_path("picture-big.webp")) + image_tag("picture.png", :alt => "Image") } + # # => Image + # + # Active Storage blobs (images that are uploaded by the users of your app): + # + # picture_tag(user.profile_picture) + # # => + # + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:491 + def picture_tag(*sources, &block); end + # Returns a link tag that browsers can use to preload the +source+. # The +source+ can be the path of a resource managed by asset pipeline, # a full path, or an URI. @@ -2000,13 +1487,13 @@ module ActionView::Helpers::AssetTagHelper # preload_link_tag("/media/audio.ogg", nopush: true) # # => # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#319 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:355 def preload_link_tag(source, options = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:27 def preload_links_header; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:27 def preload_links_header=(val); end # Returns a stylesheet link tag for the sources specified as arguments. @@ -2017,8 +1504,8 @@ module ActionView::Helpers::AssetTagHelper # set extname: false in the options. # You can modify the link attributes by passing a hash as the last argument. # - # If the server supports Early Hints, header links for these assets will be - # automatically pushed. + # If the server supports HTTP Early Hints, \Rails will push a 103 Early + # Hints response that links to the assets. # # ==== Options # @@ -2030,6 +1517,10 @@ module ActionView::Helpers::AssetTagHelper # that path. # * :skip_pipeline - This option is used to bypass the asset pipeline # when it is set to true. + # * :nonce - When set to true, adds an automatic nonce value if + # you have Content Security Policy enabled. + # * :nopush - Specify if the use of server push is not desired + # for the stylesheet. Defaults to +true+. # # ==== Examples # @@ -2055,14 +1546,17 @@ module ActionView::Helpers::AssetTagHelper # # => # # # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#170 + # stylesheet_link_tag "style", nonce: true + # # => + # + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:202 def stylesheet_link_tag(*sources); end # Returns an HTML video tag for the +sources+. If +sources+ is a string, # a single video tag will be returned. If +sources+ is an array, a video # tag with nested source tags for each source will be returned. The - # +sources+ can be full paths or files that exist in your public videos - # directory. + # +sources+ can be full paths, files that exist in your public videos + # directory, or Active Storage attachments. # # ==== Options # @@ -2071,8 +1565,8 @@ module ActionView::Helpers::AssetTagHelper # # * :poster - Set an image (like a screenshot) to be shown # before the video loads. The path is calculated like the +src+ of +image_tag+. - # * :size - Supplied as "{Width}x{Height}" or "{Number}", so "30x45" becomes - # width="30" and height="45", and "50" becomes width="50" and height="50". + # * :size - Supplied as "#{width}x#{height}" or "#{number}", so "30x45" becomes + # width="30" height="45", and "50" becomes width="50" height="50". # :size will be ignored if the value is not in the correct format. # * :poster_skip_pipeline will bypass the asset pipeline when using # the :poster option instead using an asset in the public folder. @@ -2102,63 +1596,69 @@ module ActionView::Helpers::AssetTagHelper # video_tag(["trailer.ogg", "trailer.flv"], size: "160x120") # # => # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#459 + # Active Storage blobs (videos that are uploaded by the users of your app): + # + # video_tag(user.intro_video) + # # => + # + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:561 def video_tag(*sources); end private - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#527 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:634 def check_for_image_tag_errors(options); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#518 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:625 def extract_dimensions(size); end - # @yield [options] - # - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#491 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:598 def multiple_sources_tag_builder(type, sources); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#508 - def resolve_image_source(source, skip_pipeline); end + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:615 + def resolve_asset_source(asset_type, source, skip_pipeline); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#533 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:640 def resolve_link_as(extname, mime_type); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#544 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:654 def send_preload_links_header(preload_links, max_header_size: T.unsafe(nil)); end class << self - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:28 def apply_stylesheet_media_default; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:28 def apply_stylesheet_media_default=(val); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:26 def image_decoding; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:26 def image_decoding=(val); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#24 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:25 def image_loading; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#24 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:25 def image_loading=(val); end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:27 def preload_links_header; end - # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + # pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:27 def preload_links_header=(val); end end end -# Some HTTP client and proxies have a 8kiB header limit +# Some HTTP client and proxies have a 4kiB header limit, but more importantly +# including preload links has diminishing returns so it's best to not go overboard # -# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#543 +# pkg:gem/actionview#lib/action_view/helpers/asset_tag_helper.rb:652 ActionView::Helpers::AssetTagHelper::MAX_HEADER_SIZE = T.let(T.unsafe(nil), Integer) +# = Action View Asset URL \Helpers +# # This module provides methods for generating asset paths and # URLs. # @@ -2170,8 +1670,8 @@ ActionView::Helpers::AssetTagHelper::MAX_HEADER_SIZE = T.let(T.unsafe(nil), Inte # # === Using asset hosts # -# By default, Rails links to these assets on the current host in the public -# folder, but you can direct Rails to link to assets from a dedicated asset +# By default, \Rails links to these assets on the current host in the public +# folder, but you can direct \Rails to link to assets from a dedicated asset # server by setting ActionController::Base.asset_host in the application # configuration, typically in config/environments/production.rb. # For example, you'd define assets.example.com to be your asset @@ -2271,7 +1771,7 @@ ActionView::Helpers::AssetTagHelper::MAX_HEADER_SIZE = T.let(T.unsafe(nil), Inte # "http://asset%d.example.com", "https://asset1.example.com" # ) # -# source://actionview//lib/action_view/helpers/asset_url_helper.rb#120 +# pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:121 module ActionView::Helpers::AssetUrlHelper # This is the entry point for all assets. # When using an asset pipeline gem (e.g. propshaft or sprockets-rails), the @@ -2337,9 +1837,7 @@ module ActionView::Helpers::AssetUrlHelper # asset_path("foo", skip_pipeline: true, extname: ".js") # => "/foo.js" # asset_path("foo.css", skip_pipeline: true, extname: ".js") # => "/foo.css.js" # - # @raise [ArgumentError] - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#186 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:187 def asset_path(source, options = T.unsafe(nil)); end # Computes the full URL to an asset in the public directory. This @@ -2352,7 +1850,7 @@ module ActionView::Helpers::AssetUrlHelper # asset_url "application.js" # => http://example.com/assets/application.js # asset_url "application.js", host: "http://cdn.example.com" # => http://cdn.example.com/assets/application.js # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#230 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:231 def asset_url(source, options = T.unsafe(nil)); end # Computes the path to an audio asset in the public audios directory. @@ -2365,7 +1863,7 @@ module ActionView::Helpers::AssetUrlHelper # audio_path("/sounds/horse.wav") # => /sounds/horse.wav # audio_path("http://www.example.com/sounds/horse.wav") # => http://www.example.com/sounds/horse.wav # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#429 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:430 def audio_path(source, options = T.unsafe(nil)); end # Computes the full URL to an audio asset in the public audios directory. @@ -2375,13 +1873,13 @@ module ActionView::Helpers::AssetUrlHelper # # audio_url "horse.wav", host: "http://stage.example.com" # => http://stage.example.com/audios/horse.wav # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#441 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:442 def audio_url(source, options = T.unsafe(nil)); end # Compute extname to append to asset path. Returns +nil+ if # nothing should be added. # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#242 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:243 def compute_asset_extname(source, options = T.unsafe(nil)); end # Pick an asset host for this source. Returns +nil+ if no host is set, @@ -2390,14 +1888,14 @@ module ActionView::Helpers::AssetUrlHelper # or the value returned from invoking call on an object responding to call # (proc or otherwise). # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#276 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:277 def compute_asset_host(source = T.unsafe(nil), options = T.unsafe(nil)); end # Computes asset path to public directory. Plugins and # extensions can override this method to point to custom assets # or generate digested paths or query strings. # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#265 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:266 def compute_asset_path(source, options = T.unsafe(nil)); end # Computes the path to a font asset. @@ -2409,7 +1907,7 @@ module ActionView::Helpers::AssetUrlHelper # font_path("/dir/font.ttf") # => /dir/font.ttf # font_path("http://www.example.com/dir/font.ttf") # => http://www.example.com/dir/font.ttf # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#454 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:455 def font_path(source, options = T.unsafe(nil)); end # Computes the full URL to a font asset. @@ -2419,7 +1917,7 @@ module ActionView::Helpers::AssetUrlHelper # # font_url "font.ttf", host: "http://stage.example.com" # => http://stage.example.com/fonts/font.ttf # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#466 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:467 def font_url(source, options = T.unsafe(nil)); end # Computes the path to an image asset. @@ -2433,10 +1931,10 @@ module ActionView::Helpers::AssetUrlHelper # image_path("http://www.example.com/img/edit.png") # => "http://www.example.com/img/edit.png" # # If you have images as application resources this method may conflict with their named routes. - # The alias +path_to_image+ is provided to avoid that. Rails uses the alias internally, and + # The alias +path_to_image+ is provided to avoid that. \Rails uses the alias internally, and # plugin authors are encouraged to do so. # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#377 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:378 def image_path(source, options = T.unsafe(nil)); end # Computes the full URL to an image asset. @@ -2446,7 +1944,7 @@ module ActionView::Helpers::AssetUrlHelper # # image_url "edit.png", host: "http://stage.example.com" # => http://stage.example.com/assets/edit.png # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#389 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:390 def image_url(source, options = T.unsafe(nil)); end # Computes the path to a JavaScript asset in the public javascripts directory. @@ -2460,7 +1958,7 @@ module ActionView::Helpers::AssetUrlHelper # javascript_path "http://www.example.com/js/xmlhr" # => http://www.example.com/js/xmlhr # javascript_path "http://www.example.com/js/xmlhr.js" # => http://www.example.com/js/xmlhr.js # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#320 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:321 def javascript_path(source, options = T.unsafe(nil)); end # Computes the full URL to a JavaScript asset in the public javascripts directory. @@ -2470,173 +1968,31 @@ module ActionView::Helpers::AssetUrlHelper # # javascript_url "js/xmlhr.js", host: "http://stage.example.com" # => http://stage.example.com/assets/js/xmlhr.js # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#332 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:333 def javascript_url(source, options = T.unsafe(nil)); end - # This is the entry point for all assets. - # When using an asset pipeline gem (e.g. propshaft or sprockets-rails), the - # behavior is "enhanced". You can bypass the asset pipeline by passing in - # skip_pipeline: true to the options. - # - # All other asset *_path helpers delegate through this method. - # - # === With the asset pipeline - # - # All options passed to +asset_path+ will be passed to +compute_asset_path+ - # which is implemented by asset pipeline gems. - # - # asset_path("application.js") # => "/assets/application-60aa4fdc5cea14baf5400fba1abf4f2a46a5166bad4772b1effe341570f07de9.js" - # asset_path('application.js', host: 'example.com') # => "//example.com/assets/application.js" - # asset_path("application.js", host: 'example.com', protocol: 'https') # => "https://example.com/assets/application.js" - # - # === Without the asset pipeline (skip_pipeline: true) - # - # Accepts a type option that can specify the asset's extension. No error - # checking is done to verify the source passed into +asset_path+ is valid - # and that the file exists on disk. - # - # asset_path("application.js", skip_pipeline: true) # => "application.js" - # asset_path("filedoesnotexist.png", skip_pipeline: true) # => "filedoesnotexist.png" - # asset_path("application", type: :javascript, skip_pipeline: true) # => "/javascripts/application.js" - # asset_path("application", type: :stylesheet, skip_pipeline: true) # => "/stylesheets/application.css" - # - # === Options applying to all assets - # - # Below lists scenarios that apply to +asset_path+ whether or not you're - # using the asset pipeline. - # - # - All fully qualified URLs are returned immediately. This bypasses the - # asset pipeline and all other behavior described. - # - # asset_path("http://www.example.com/js/xmlhr.js") # => "http://www.example.com/js/xmlhr.js" - # - # - All assets that begin with a forward slash are assumed to be full - # URLs and will not be expanded. This will bypass the asset pipeline. - # - # asset_path("/foo.png") # => "/foo.png" - # - # - All blank strings will be returned immediately. This bypasses the - # asset pipeline and all other behavior described. - # - # asset_path("") # => "" - # - # - If config.relative_url_root is specified, all assets will have that - # root prepended. - # - # Rails.application.config.relative_url_root = "bar" - # asset_path("foo.js", skip_pipeline: true) # => "bar/foo.js" - # - # - A different asset host can be specified via config.action_controller.asset_host - # this is commonly used in conjunction with a CDN. - # - # Rails.application.config.action_controller.asset_host = "assets.example.com" - # asset_path("foo.js", skip_pipeline: true) # => "http://assets.example.com/foo.js" - # - # - An extension name can be specified manually with extname. - # - # asset_path("foo", skip_pipeline: true, extname: ".js") # => "/foo.js" - # asset_path("foo.css", skip_pipeline: true, extname: ".js") # => "/foo.css.js" - # aliased to avoid conflicts with an asset_path named route - # - # @raise [ArgumentError] - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#186 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:219 def path_to_asset(source, options = T.unsafe(nil)); end - # Computes the path to an audio asset in the public audios directory. - # Full paths from the document root will be passed through. - # Used internally by +audio_tag+ to build the audio path. - # - # audio_path("horse") # => /audios/horse - # audio_path("horse.wav") # => /audios/horse.wav - # audio_path("sounds/horse.wav") # => /audios/sounds/horse.wav - # audio_path("/sounds/horse.wav") # => /sounds/horse.wav - # audio_path("http://www.example.com/sounds/horse.wav") # => http://www.example.com/sounds/horse.wav - # aliased to avoid conflicts with an audio_path named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#429 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:433 def path_to_audio(source, options = T.unsafe(nil)); end - # Computes the path to a font asset. - # Full paths from the document root will be passed through. - # - # font_path("font") # => /fonts/font - # font_path("font.ttf") # => /fonts/font.ttf - # font_path("dir/font.ttf") # => /fonts/dir/font.ttf - # font_path("/dir/font.ttf") # => /dir/font.ttf - # font_path("http://www.example.com/dir/font.ttf") # => http://www.example.com/dir/font.ttf - # aliased to avoid conflicts with a font_path named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#454 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:458 def path_to_font(source, options = T.unsafe(nil)); end - # Computes the path to an image asset. - # Full paths from the document root will be passed through. - # Used internally by +image_tag+ to build the image path: - # - # image_path("edit") # => "/assets/edit" - # image_path("edit.png") # => "/assets/edit.png" - # image_path("icons/edit.png") # => "/assets/icons/edit.png" - # image_path("/icons/edit.png") # => "/icons/edit.png" - # image_path("http://www.example.com/img/edit.png") # => "http://www.example.com/img/edit.png" - # - # If you have images as application resources this method may conflict with their named routes. - # The alias +path_to_image+ is provided to avoid that. Rails uses the alias internally, and - # plugin authors are encouraged to do so. - # aliased to avoid conflicts with an image_path named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#377 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:381 def path_to_image(source, options = T.unsafe(nil)); end - # Computes the path to a JavaScript asset in the public javascripts directory. - # If the +source+ filename has no extension, .js will be appended (except for explicit URIs) - # Full paths from the document root will be passed through. - # Used internally by +javascript_include_tag+ to build the script path. - # - # javascript_path "xmlhr" # => /assets/xmlhr.js - # javascript_path "dir/xmlhr.js" # => /assets/dir/xmlhr.js - # javascript_path "/dir/xmlhr" # => /dir/xmlhr.js - # javascript_path "http://www.example.com/js/xmlhr" # => http://www.example.com/js/xmlhr - # javascript_path "http://www.example.com/js/xmlhr.js" # => http://www.example.com/js/xmlhr.js - # aliased to avoid conflicts with a javascript_path named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#320 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:324 def path_to_javascript(source, options = T.unsafe(nil)); end - # Computes the path to a stylesheet asset in the public stylesheets directory. - # If the +source+ filename has no extension, .css will be appended (except for explicit URIs). - # Full paths from the document root will be passed through. - # Used internally by +stylesheet_link_tag+ to build the stylesheet path. - # - # stylesheet_path "style" # => /assets/style.css - # stylesheet_path "dir/style.css" # => /assets/dir/style.css - # stylesheet_path "/dir/style.css" # => /dir/style.css - # stylesheet_path "http://www.example.com/css/style" # => http://www.example.com/css/style - # stylesheet_path "http://www.example.com/css/style.css" # => http://www.example.com/css/style.css - # aliased to avoid conflicts with a stylesheet_path named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#347 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:351 def path_to_stylesheet(source, options = T.unsafe(nil)); end - # Computes the path to a video asset in the public videos directory. - # Full paths from the document root will be passed through. - # Used internally by +video_tag+ to build the video path. - # - # video_path("hd") # => /videos/hd - # video_path("hd.avi") # => /videos/hd.avi - # video_path("trailers/hd.avi") # => /videos/trailers/hd.avi - # video_path("/trailers/hd.avi") # => /trailers/hd.avi - # video_path("http://www.example.com/vid/hd.avi") # => http://www.example.com/vid/hd.avi - # aliased to avoid conflicts with a video_path named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#403 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:407 def path_to_video(source, options = T.unsafe(nil)); end - # Computes asset path to public directory. Plugins and - # extensions can override this method to point to custom assets - # or generate digested paths or query strings. - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#265 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:270 def public_compute_asset_path(source, options = T.unsafe(nil)); end # Computes the path to a stylesheet asset in the public stylesheets directory. @@ -2650,7 +2006,7 @@ module ActionView::Helpers::AssetUrlHelper # stylesheet_path "http://www.example.com/css/style" # => http://www.example.com/css/style # stylesheet_path "http://www.example.com/css/style.css" # => http://www.example.com/css/style.css # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#347 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:348 def stylesheet_path(source, options = T.unsafe(nil)); end # Computes the full URL to a stylesheet asset in the public stylesheets directory. @@ -2660,87 +2016,28 @@ module ActionView::Helpers::AssetUrlHelper # # stylesheet_url "css/style.css", host: "http://stage.example.com" # => http://stage.example.com/assets/css/style.css # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#359 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:360 def stylesheet_url(source, options = T.unsafe(nil)); end - # Computes the full URL to an asset in the public directory. This - # will use +asset_path+ internally, so most of their behaviors - # will be the same. If +:host+ options is set, it overwrites global - # +config.action_controller.asset_host+ setting. - # - # All other options provided are forwarded to +asset_path+ call. - # - # asset_url "application.js" # => http://example.com/assets/application.js - # asset_url "application.js", host: "http://cdn.example.com" # => http://cdn.example.com/assets/application.js - # aliased to avoid conflicts with an asset_url named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#230 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:234 def url_to_asset(source, options = T.unsafe(nil)); end - # Computes the full URL to an audio asset in the public audios directory. - # This will use +audio_path+ internally, so most of their behaviors will be the same. - # Since +audio_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # audio_url "horse.wav", host: "http://stage.example.com" # => http://stage.example.com/audios/horse.wav - # aliased to avoid conflicts with an audio_url named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#441 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:445 def url_to_audio(source, options = T.unsafe(nil)); end - # Computes the full URL to a font asset. - # This will use +font_path+ internally, so most of their behaviors will be the same. - # Since +font_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # font_url "font.ttf", host: "http://stage.example.com" # => http://stage.example.com/fonts/font.ttf - # aliased to avoid conflicts with a font_url named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#466 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:470 def url_to_font(source, options = T.unsafe(nil)); end - # Computes the full URL to an image asset. - # This will use +image_path+ internally, so most of their behaviors will be the same. - # Since +image_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # image_url "edit.png", host: "http://stage.example.com" # => http://stage.example.com/assets/edit.png - # aliased to avoid conflicts with an image_url named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#389 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:393 def url_to_image(source, options = T.unsafe(nil)); end - # Computes the full URL to a JavaScript asset in the public javascripts directory. - # This will use +javascript_path+ internally, so most of their behaviors will be the same. - # Since +javascript_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # javascript_url "js/xmlhr.js", host: "http://stage.example.com" # => http://stage.example.com/assets/js/xmlhr.js - # aliased to avoid conflicts with a javascript_url named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#332 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:336 def url_to_javascript(source, options = T.unsafe(nil)); end - # Computes the full URL to a stylesheet asset in the public stylesheets directory. - # This will use +stylesheet_path+ internally, so most of their behaviors will be the same. - # Since +stylesheet_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # stylesheet_url "css/style.css", host: "http://stage.example.com" # => http://stage.example.com/assets/css/style.css - # aliased to avoid conflicts with a stylesheet_url named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#359 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:363 def url_to_stylesheet(source, options = T.unsafe(nil)); end - # Computes the full URL to a video asset in the public videos directory. - # This will use +video_path+ internally, so most of their behaviors will be the same. - # Since +video_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ - # options is set, it overwrites global +config.action_controller.asset_host+ setting. - # - # video_url "hd.avi", host: "http://stage.example.com" # => http://stage.example.com/videos/hd.avi - # aliased to avoid conflicts with a video_url named route - # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#415 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:419 def url_to_video(source, options = T.unsafe(nil)); end # Computes the path to a video asset in the public videos directory. @@ -2753,7 +2050,7 @@ module ActionView::Helpers::AssetUrlHelper # video_path("/trailers/hd.avi") # => /trailers/hd.avi # video_path("http://www.example.com/vid/hd.avi") # => http://www.example.com/vid/hd.avi # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#403 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:404 def video_path(source, options = T.unsafe(nil)); end # Computes the full URL to a video asset in the public videos directory. @@ -2763,22 +2060,26 @@ module ActionView::Helpers::AssetUrlHelper # # video_url "hd.avi", host: "http://stage.example.com" # => http://stage.example.com/videos/hd.avi # - # source://actionview//lib/action_view/helpers/asset_url_helper.rb#415 + # pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:416 def video_url(source, options = T.unsafe(nil)); end end -# source://actionview//lib/action_view/helpers/asset_url_helper.rb#235 +# aliased to avoid conflicts with an asset_url named route +# +# pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:236 ActionView::Helpers::AssetUrlHelper::ASSET_EXTENSIONS = T.let(T.unsafe(nil), Hash) # Maps asset types to public directory. # -# source://actionview//lib/action_view/helpers/asset_url_helper.rb#253 +# pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:254 ActionView::Helpers::AssetUrlHelper::ASSET_PUBLIC_DIRECTORIES = T.let(T.unsafe(nil), Hash) -# source://actionview//lib/action_view/helpers/asset_url_helper.rb#121 +# pkg:gem/actionview#lib/action_view/helpers/asset_url_helper.rb:122 ActionView::Helpers::AssetUrlHelper::URI_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#8 +# = Action View Atom Feed \Helpers +# +# pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:8 module ActionView::Helpers::AtomFeedHelper # Adds easy defaults to writing Atom feeds with the Builder template engine (this does not work on ERB or any other # template languages). @@ -2856,9 +2157,9 @@ module ActionView::Helpers::AtomFeedHelper # end # # The Atom spec defines five elements (content rights title subtitle - # summary) which may directly contain xhtml content if type: 'xhtml' + # summary) which may directly contain XHTML content if type: 'xhtml' # is specified as an attribute. If so, this helper will take care of - # the enclosing div and xhtml namespace declaration. Example usage: + # the enclosing div and XHTML namespace declaration. Example usage: # # entry.summary type: 'xhtml' do |xhtml| # xhtml.p pluralize(order.line_items.count, "line item") @@ -2870,49 +2171,43 @@ module ActionView::Helpers::AtomFeedHelper # atom_feed yields an +AtomFeedBuilder+ instance. Nested elements yield # an +AtomBuilder+ instance. # - # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#98 + # pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:98 def atom_feed(options = T.unsafe(nil), &block); end end -# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#129 +# pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:129 class ActionView::Helpers::AtomFeedHelper::AtomBuilder - # @return [AtomBuilder] a new instance of AtomBuilder - # - # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#132 + # pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:132 def initialize(xml); end private - # Delegate to xml builder, first wrapping the element in an xhtml + # Delegate to XML Builder, first wrapping the element in an XHTML # namespaced div element if the method and arguments indicate # that an xhtml_block? is desired. # - # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#140 + # pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:140 def method_missing(method, *arguments, &block); end # True if the method name matches one of the five elements defined # in the Atom spec as potentially containing XHTML content and # if type: 'xhtml' is, in fact, specified. # - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#155 + # pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:155 def xhtml_block?(method, arguments); end end -# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#130 +# pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:130 ActionView::Helpers::AtomFeedHelper::AtomBuilder::XHTML_TAG_NAMES = T.let(T.unsafe(nil), Set) -# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#163 +# pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:163 class ActionView::Helpers::AtomFeedHelper::AtomFeedBuilder < ::ActionView::Helpers::AtomFeedHelper::AtomBuilder - # @return [AtomFeedBuilder] a new instance of AtomFeedBuilder - # - # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#164 + # pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:164 def initialize(xml, view, feed_options = T.unsafe(nil)); end # Creates an entry tag for a specific record and prefills the id using class and id. # - # Options: + # ==== Options # # * :published: Time first published. Defaults to the created_at attribute on the record if one such exists. # * :updated: Time of update. Defaults to the updated_at attribute on the record if one such exists. @@ -2920,16 +2215,18 @@ class ActionView::Helpers::AtomFeedHelper::AtomFeedBuilder < ::ActionView::Helpe # * :id: The ID for this entry. Defaults to "tag:#{@view.request.host},#{@feed_options[:schema_date]}:#{record.class}/#{record.id}" # * :type: The TYPE for this entry. Defaults to "text/html". # - # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#182 + # pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:182 def entry(record, options = T.unsafe(nil)); end # Accepts a Date or Time object and inserts it in the proper format. If +nil+ is passed, current time in UTC is used. # - # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#169 + # pkg:gem/actionview#lib/action_view/helpers/atom_feed_helper.rb:169 def updated(date_or_time = T.unsafe(nil)); end end -# source://actionview//lib/action_view/helpers/cache_helper.rb#6 +# = Action View Cache \Helpers +# +# pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:6 module ActionView::Helpers::CacheHelper # This helper exposes a method for caching fragments of a view # rather than an entire action or page. This technique is useful @@ -3001,11 +2298,11 @@ module ActionView::Helpers::CacheHelper # render 'comments/comments' # render('comments/comments') # - # render "header" translates to render("comments/header") + # render "header" # translates to render("comments/header") # - # render(@topic) translates to render("topics/topic") - # render(topics) translates to render("topics/topic") - # render(message.topics) translates to render("topics/topic") + # render(@topic) # translates to render("topics/topic") + # render(topics) # translates to render("topics/topic") + # render(message.topics) # translates to render("topics/topic") # # It's not possible to derive all render calls like that, though. # Here are a few examples of things that can't be derived: @@ -3091,7 +2388,7 @@ module ActionView::Helpers::CacheHelper # This will include both records as part of the cache key and updating either of them will # expire the cache. # - # source://actionview//lib/action_view/helpers/cache_helper.rb#168 + # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:168 def cache(name = T.unsafe(nil), options = T.unsafe(nil), &block); end # This helper returns the name of a cache key for a given fragment cache @@ -3100,7 +2397,7 @@ module ActionView::Helpers::CacheHelper # cannot be manually expired unless you know the exact key which is the # case when using memcached. # - # source://actionview//lib/action_view/helpers/cache_helper.rb#240 + # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:240 def cache_fragment_name(name = T.unsafe(nil), skip_digest: T.unsafe(nil), digest_path: T.unsafe(nil)); end # Cache fragments of a view if +condition+ is true @@ -3110,7 +2407,7 @@ module ActionView::Helpers::CacheHelper # <%= render project.topics %> # <% end %> # - # source://actionview//lib/action_view/helpers/cache_helper.rb#215 + # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:215 def cache_if(condition, name = T.unsafe(nil), options = T.unsafe(nil), &block); end # Cache fragments of a view unless +condition+ is true @@ -3120,7 +2417,7 @@ module ActionView::Helpers::CacheHelper # <%= render project.topics %> # <% end %> # - # source://actionview//lib/action_view/helpers/cache_helper.rb#231 + # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:231 def cache_unless(condition, name = T.unsafe(nil), options = T.unsafe(nil), &block); end # Returns whether the current view fragment is within a +cache+ block. @@ -3131,15 +2428,13 @@ module ActionView::Helpers::CacheHelper # <% raise StandardError, "Caching private data!" if caching? %> # <% end %> # - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/cache_helper.rb#188 + # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:188 def caching?; end - # source://actionview//lib/action_view/helpers/cache_helper.rb#248 + # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:248 def digest_path_from_template(template); end - # Raises +UncacheableFragmentError+ when called from within a +cache+ block. + # Raises UncacheableFragmentError when called from within a +cache+ block. # # Useful to denote helper methods that can't participate in fragment caching: # @@ -3148,59 +2443,60 @@ module ActionView::Helpers::CacheHelper # "#{project.name} - #{Time.now}" # end # - # # Which will then raise if used within a +cache+ block: + # # Which will then raise if used within a `cache` block: # <% cache project do %> # <%= project_name_with_time(project) %> # <% end %> # - # @raise [UncacheableFragmentError] - # - # source://actionview//lib/action_view/helpers/cache_helper.rb#205 + # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:205 def uncacheable!; end private - # source://actionview//lib/action_view/helpers/cache_helper.rb#270 + # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:270 def fragment_for(name = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://actionview//lib/action_view/helpers/cache_helper.rb#259 + # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:259 def fragment_name_with_digest(name, digest_path); end - # source://actionview//lib/action_view/helpers/cache_helper.rb#280 + # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:280 def read_fragment_for(name, options); end - # source://actionview//lib/action_view/helpers/cache_helper.rb#284 - def write_fragment_for(name, options); end + # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:284 + def write_fragment_for(name, options, &block); end end -# source://actionview//lib/action_view/helpers/cache_helper.rb#295 +# pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:289 module ActionView::Helpers::CacheHelper::CachingRegistry extend ::ActionView::Helpers::CacheHelper::CachingRegistry - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/cache_helper.rb#298 + # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:292 def caching?; end - # source://actionview//lib/action_view/helpers/cache_helper.rb#302 + # pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:296 def track_caching; end end -# source://actionview//lib/action_view/helpers/cache_helper.rb#7 +# pkg:gem/actionview#lib/action_view/helpers/cache_helper.rb:7 class ActionView::Helpers::CacheHelper::UncacheableFragmentError < ::StandardError; end -# CaptureHelper exposes methods to let you extract generated markup which +# = Action View Capture \Helpers +# +# \CaptureHelper exposes methods to let you extract generated markup which # can be used in other parts of a template or layout file. # -# It provides a method to capture blocks into variables through capture and -# a way to capture a block of markup for use in a layout through {content_for}[rdoc-ref:ActionView::Helpers::CaptureHelper#content_for]. +# It provides a method to capture blocks into variables through #capture and +# a way to capture a block of markup for use in a layout through #content_for. +# +# As well as provides a method when using streaming responses through #provide. +# See ActionController::Streaming for more information. # -# source://actionview//lib/action_view/helpers/capture_helper.rb#13 +# pkg:gem/actionview#lib/action_view/helpers/capture_helper.rb:17 module ActionView::Helpers::CaptureHelper - # The capture method extracts part of a template as a String object. + # The capture method extracts part of a template as a string object. # You can then use this object anywhere in your templates, layout, or helpers. # - # The capture method can be used in ERB templates... + # The capture method can be used in \ERB templates... # # <% @greeting = capture do %> # Welcome to my shiny new web page! The date and time is @@ -3226,8 +2522,8 @@ module ActionView::Helpers::CaptureHelper # # @greeting # => "Welcome to my shiny new web page! The date and time is 2018-09-06 11:09:16 -0500" # - # source://actionview//lib/action_view/helpers/capture_helper.rb#43 - def capture(*args); end + # pkg:gem/actionview#lib/action_view/helpers/capture_helper.rb:47 + def capture(*args, &block); end # Calling content_for stores a block of markup in an identifier for later use. # In order to access this stored content in other templates, helper modules @@ -3334,10 +2630,11 @@ module ActionView::Helpers::CaptureHelper # # WARNING: content_for is ignored in caches. So you shouldn't use it for elements that will be fragment cached. # - # source://actionview//lib/action_view/helpers/capture_helper.rb#155 + # pkg:gem/actionview#lib/action_view/helpers/capture_helper.rb:172 def content_for(name, content = T.unsafe(nil), options = T.unsafe(nil), &block); end # content_for? checks whether any content has been captured yet using content_for. + # # Useful to render parts of your layout differently based on what is in your views. # # <%# This is the layout %> @@ -3352,9 +2649,7 @@ module ActionView::Helpers::CaptureHelper # # # - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/capture_helper.rb#195 + # pkg:gem/actionview#lib/action_view/helpers/capture_helper.rb:215 def content_for?(name); end # The same as +content_for+ but when used with streaming flushes @@ -3363,73 +2658,165 @@ module ActionView::Helpers::CaptureHelper # template, you should use +content_for+, if not, use +provide+ to tell # the layout to stop looking for more contents. # - # source://actionview//lib/action_view/helpers/capture_helper.rb#175 + # See ActionController::Streaming for more information. + # + # pkg:gem/actionview#lib/action_view/helpers/capture_helper.rb:194 def provide(name, content = T.unsafe(nil), &block); end # Use an alternate output buffer for the duration of the block. # Defaults to a new empty string. # - # source://actionview//lib/action_view/helpers/capture_helper.rb#201 + # pkg:gem/actionview#lib/action_view/helpers/capture_helper.rb:221 def with_output_buffer(buf = T.unsafe(nil)); end end -# This module keeps all methods and behavior in ActionView -# that simply delegates to the controller. -# -# source://actionview//lib/action_view/helpers/controller_helper.rb#9 -module ActionView::Helpers::ControllerHelper - # source://actionview//lib/action_view/helpers/controller_helper.rb#16 - def action_name(*_arg0, **_arg1, &_arg2); end +# pkg:gem/actionview#lib/action_view/helpers/content_exfiltration_prevention_helper.rb:5 +module ActionView::Helpers::ContentExfiltrationPreventionHelper + # pkg:gem/actionview#lib/action_view/helpers/content_exfiltration_prevention_helper.rb:6 + def prepend_content_exfiltration_prevention; end - # source://actionview//lib/action_view/helpers/controller_helper.rb#18 - def assign_controller(controller); end + # pkg:gem/actionview#lib/action_view/helpers/content_exfiltration_prevention_helper.rb:6 + def prepend_content_exfiltration_prevention=(val); end + # pkg:gem/actionview#lib/action_view/helpers/content_exfiltration_prevention_helper.rb:61 + def prevent_content_exfiltration(html); end + + class << self + # pkg:gem/actionview#lib/action_view/helpers/content_exfiltration_prevention_helper.rb:6 + def prepend_content_exfiltration_prevention; end + + # pkg:gem/actionview#lib/action_view/helpers/content_exfiltration_prevention_helper.rb:6 + def prepend_content_exfiltration_prevention=(val); end + end +end + +# Close any open tags that support CDATA (textarea, xmp) before each form tag. +# This prevents attackers from injecting unclosed tags that could capture +# form contents. +# +# For example, an attacker might inject: +# +#
or +# the end of the document would be captured by the attacker's +# # # text_area(:comment, :text, size: "20x30") @@ -6839,7 +6165,7 @@ module ActionView::Helpers::FormHelper # # #{@entry.body} # # # - # source://actionview//lib/action_view/helpers/form_helper.rb#1269 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1277 def text_area(object_name, method, options = T.unsafe(nil)); end # Returns an input tag of the "text" type tailored for accessing a specified attribute (identified by +method+) on an object @@ -6848,14 +6174,14 @@ module ActionView::Helpers::FormHelper # shown. # # ==== Examples - # text_field(:post, :title, size: 20) - # # => + # text_field(:article, :title, size: 20) + # # => # - # text_field(:post, :title, class: "create_input") - # # => + # text_field(:article, :title, class: "create_input") + # # => # - # text_field(:post, :title, maxlength: 30, class: "title_input") - # # => + # text_field(:article, :title, maxlength: 30, class: "title_input") + # # => # # text_field(:session, :user, onchange: "if ($('#session_user').val() === 'admin') { alert('Your login cannot be admin!'); }") # # => @@ -6863,7 +6189,7 @@ module ActionView::Helpers::FormHelper # text_field(:snippet, :code, size: 20, class: 'code_input') # # => # - # source://actionview//lib/action_view/helpers/form_helper.rb#1167 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1175 def text_field(object_name, method, options = T.unsafe(nil)); end # Returns a text_field of type "time". @@ -6901,7 +6227,7 @@ module ActionView::Helpers::FormHelper # time_field("task", "started_at", value: Time.now, include_seconds: false) # # => # - # source://actionview//lib/action_view/helpers/form_helper.rb#1469 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1477 def time_field(object_name, method, options = T.unsafe(nil)); end # Returns a text_field of type "url". @@ -6909,7 +6235,7 @@ module ActionView::Helpers::FormHelper # url_field("user", "homepage") # # => # - # source://actionview//lib/action_view/helpers/form_helper.rb#1543 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1557 def url_field(object_name, method, options = T.unsafe(nil)); end # Returns a text_field of type "week". @@ -6925,44 +6251,46 @@ module ActionView::Helpers::FormHelper # week_field("user", "born_on") # # => # - # source://actionview//lib/action_view/helpers/form_helper.rb#1534 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1548 def week_field(object_name, method, options = T.unsafe(nil)); end private - # source://actionview//lib/action_view/helpers/form_helper.rb#463 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:465 def apply_form_for_options!(object, options); end - # source://actionview//lib/action_view/helpers/form_helper.rb#1608 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1622 def default_form_builder_class; end - # source://actionview//lib/action_view/helpers/form_helper.rb#1579 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1593 def html_options_for_form_with(url_for_options = T.unsafe(nil), model = T.unsafe(nil), html: T.unsafe(nil), local: T.unsafe(nil), skip_enforcing_utf8: T.unsafe(nil), **options); end - # source://actionview//lib/action_view/helpers/form_helper.rb#1594 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:1608 def instantiate_builder(record_name, record_object, options); end class << self - # source://actionview//lib/action_view/helpers/form_helper.rb#480 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:481 def form_with_generates_ids; end - # source://actionview//lib/action_view/helpers/form_helper.rb#480 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:481 def form_with_generates_ids=(val); end - # source://actionview//lib/action_view/helpers/form_helper.rb#478 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:479 def form_with_generates_remote_forms; end - # source://actionview//lib/action_view/helpers/form_helper.rb#478 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:479 def form_with_generates_remote_forms=(val); end - # source://actionview//lib/action_view/helpers/form_helper.rb#482 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:483 def multiple_file_field_include_hidden; end - # source://actionview//lib/action_view/helpers/form_helper.rb#482 + # pkg:gem/actionview#lib/action_view/helpers/form_helper.rb:483 def multiple_file_field_include_hidden=(val); end end end +# = Action View Form Option \Helpers +# # Provides a number of methods for turning different kinds of containers into a set of option tags. # # The collection_select, select and time_zone_select methods take an options parameter, a hash: @@ -7044,7 +6372,7 @@ end # # # -# source://actionview//lib/action_view/helpers/form_options_helper.rb#93 +# pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:94 module ActionView::Helpers::FormOptionsHelper include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::CaptureHelper @@ -7134,7 +6462,7 @@ module ActionView::Helpers::FormOptionsHelper # In the rare case you don't want this hidden field, you can pass the # include_hidden: false option to the helper method. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#781 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:785 def collection_check_boxes(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Returns radio button tags for the collection of existing return values @@ -7217,7 +6545,7 @@ module ActionView::Helpers::FormOptionsHelper # In case if you don't want the helper to generate this hidden field you can specify # include_hidden: false option. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#697 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:701 def collection_radio_buttons(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Returns # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#198 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:199 def collection_select(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end # Returns # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#257 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:258 def grouped_collection_select(object, method, collection, group_method, group_label_method, option_key_method, option_value_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end # Returns a string of tags, like options_for_select, but @@ -7347,7 +6675,8 @@ module ActionView::Helpers::FormOptionsHelper # # # - # Parameters: + # ==== Parameters + # # * +grouped_options+ - Accepts a nested array or hash of strings. The first value serves as the # label while the second value must be an array of options. The second value can be a # nested array of text-value pairs. See options_for_select for more info. @@ -7358,7 +6687,8 @@ module ActionView::Helpers::FormOptionsHelper # which will have the +selected+ attribute set. Note: It is possible for this value to match multiple options # as you might have the same option in multiple groups. Each will then get selected="selected". # - # Options: + # ==== Options + # # * :prompt - set to true or a prompt string. When the select element doesn't have a value yet, this # prepends an option with a generic prompt - "Please select" - or the given prompt string. # * :divider - the divider for the options groups. @@ -7383,7 +6713,7 @@ module ActionView::Helpers::FormOptionsHelper # Note: Only the and tags are returned, so you still have to # wrap the output in an appropriate tag. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#461 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:462 def option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key = T.unsafe(nil)); end # Accepts a container (hash, array, enumerable, your type) and returns a string of option tags. Given a container @@ -7495,7 +6825,7 @@ module ActionView::Helpers::FormOptionsHelper # # NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#357 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:358 def options_for_select(container, selected = T.unsafe(nil)); end # Returns a string of option tags that have been compiled by iterating over the +collection+ and assigning @@ -7523,7 +6853,7 @@ module ActionView::Helpers::FormOptionsHelper # options_from_collection_for_select(@people, 'id', 'name', 1) # should produce the desired results. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#400 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:401 def options_from_collection_for_select(collection, value_method, text_method, selected = T.unsafe(nil)); end # Create a select tag and a series of contained option tags for the provided object and method. @@ -7588,7 +6918,7 @@ module ActionView::Helpers::FormOptionsHelper # In case if you don't want the helper to generate this hidden field you can specify # include_hidden: false option. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#158 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:159 def select(object, method, choices = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Returns a string of option tags for pretty much any time zone in the @@ -7611,7 +6941,7 @@ module ActionView::Helpers::FormOptionsHelper # NOTE: Only the option tags are returned, you have to wrap this call in # a regular HTML select tag. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#578 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:581 def time_zone_options_for_select(selected = T.unsafe(nil), priority_zones = T.unsafe(nil), model = T.unsafe(nil)); end # Returns select and option tags for the given object and method, using @@ -7645,12 +6975,13 @@ module ActionView::Helpers::FormOptionsHelper # # time_zone_select(:user, :time_zone, ActiveSupport::TimeZone.all.sort, model: ActiveSupport::TimeZone) # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#291 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:292 def time_zone_select(object, method, priority_zones = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil)); end # Returns a string of option tags for the days of the week. # - # Options: + # ====Options + # # * :index_as_value - Defaults to false, set to true to use the indexes from # I18n.translate("date.day_names") as the values. By default, Sunday is always 0. # * :day_format - The I18n key of the array to use for the weekday options. @@ -7660,49 +6991,50 @@ module ActionView::Helpers::FormOptionsHelper # NOTE: Only the option tags are returned, you have to wrap this call in # a regular HTML select tag. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#610 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:614 def weekday_options_for_select(selected = T.unsafe(nil), index_as_value: T.unsafe(nil), day_format: T.unsafe(nil), beginning_of_week: T.unsafe(nil)); end # Returns select and option tags for the given object and method, using # weekday_options_for_select to generate the list of option tags. # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#297 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:298 def weekday_select(object, method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end private - # source://actionview//lib/action_view/helpers/form_options_helper.rb#808 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:812 def extract_selected_and_disabled(selected); end - # source://actionview//lib/action_view/helpers/form_options_helper.rb#819 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:823 def extract_values_from_collection(collection, value_method, selected); end - # source://actionview//lib/action_view/helpers/form_options_helper.rb#786 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:790 def option_html_attributes(element); end - # source://actionview//lib/action_view/helpers/form_options_helper.rb#794 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:798 def option_text_and_value(option); end - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/form_options_helper.rb#804 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:808 def option_value_selected?(value, selected); end - # source://actionview//lib/action_view/helpers/form_options_helper.rb#833 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:837 def prompt_text(prompt); end - # source://actionview//lib/action_view/helpers/form_options_helper.rb#829 + # pkg:gem/actionview#lib/action_view/helpers/form_options_helper.rb:833 def value_for_collection(item, value); end end +# = Action View Form Tag \Helpers +# # Provides a number of methods for creating form tags that don't rely on an Active Record object assigned to the template like # FormHelper does. Instead, you provide the names and values manually. # # NOTE: The HTML options disabled, readonly, and multiple can all be treated as booleans. So specifying # disabled: true will give disabled="disabled". # -# source://actionview//lib/action_view/helpers/form_tag_helper.rb#17 +# pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:19 module ActionView::Helpers::FormTagHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper extend ::ActiveSupport::Concern include ::ActionView::Helpers::UrlHelper include ::ActionView::Helpers::SanitizeHelper @@ -7745,32 +7077,19 @@ module ActionView::Helpers::FormTagHelper # # Ask me! # # # - # ==== Deprecated: Rails UJS attributes - # - # Prior to Rails 7, Rails shipped with a JavaScript library called @rails/ujs on by default. Following Rails 7, - # this library is no longer on by default. This library integrated with the following options: - # - # * confirm: 'question?' - If present, the - # unobtrusive JavaScript drivers will provide a prompt with - # the question specified. If the user accepts, the form is - # processed normally, otherwise no action is taken. - # * :disable_with - Value of this parameter will be - # used as the value for a disabled version of the submit - # button when the form is submitted. This feature is provided - # by the unobtrusive JavaScript driver. - # - # button_tag "Save", data: { confirm: "Are you sure?" } - # # => - # - # button_tag "Checkout", data: { disable_with: "Please wait..." } - # # => - # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#578 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:566 def button_tag(content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end + # :call-seq: + # check_box_tag(name, options = {}) + # check_box_tag(name, value, options = {}) + # check_box_tag(name, value, checked, options = {}) + # # Creates a check box form input tag. # # ==== Options + # * :value - The value of the input. Defaults to "1". + # * :checked - If set to true, the checkbox will be checked by default. # * :disabled - If set to true, the user will not be able to use this input. # * Any other key creates standard HTML options for the tag. # @@ -7790,8 +7109,8 @@ module ActionView::Helpers::FormTagHelper # check_box_tag 'eula', 'accepted', false, disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#444 - def check_box_tag(name, value = T.unsafe(nil), checked = T.unsafe(nil), options = T.unsafe(nil)); end + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:455 + def check_box_tag(name, *args); end # Creates a text field of type "color". # @@ -7813,7 +7132,7 @@ module ActionView::Helpers::FormTagHelper # color_field_tag 'color', '#DEF726', class: 'special_input', disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#676 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:666 def color_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "date". @@ -7827,16 +7146,16 @@ module ActionView::Helpers::FormTagHelper # date_field_tag 'name' # # => # - # date_field_tag 'date', '01/01/2014' - # # => + # date_field_tag 'date', '2014-12-31' + # # => # # date_field_tag 'date', nil, class: 'special_input' # # => # - # date_field_tag 'date', '01/01/2014', class: 'special_input', disabled: true - # # => + # date_field_tag 'date', '2014-12-31', class: 'special_input', disabled: true + # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#746 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:736 def date_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "datetime-local". @@ -7848,27 +7167,32 @@ module ActionView::Helpers::FormTagHelper # * :min - The minimum acceptable value. # * :max - The maximum acceptable value. # * :step - The acceptable value granularity. + # * :include_seconds - Include seconds in the output timestamp format (true by default). # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#773 - def datetime_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end - - # Creates a text field of type "datetime-local". + # ==== Examples # - # ==== Options + # datetime_field_tag 'name' + # # => # - # Supports the same options as #text_field_tag. Additionally, supports: + # datetime_field_tag 'datetime', '2014-01-01T01:01' + # # => # - # * :min - The minimum acceptable value. - # * :max - The maximum acceptable value. - # * :step - The acceptable value granularity. + # datetime_field_tag 'datetime', nil, class: 'special_input' + # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#773 + # datetime_field_tag 'datetime', '2014-01-01T01:01', class: 'special_input', disabled: true + # # => + # + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:795 + def datetime_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:799 def datetime_local_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:29 def default_enforce_utf8; end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:29 def default_enforce_utf8=(val); end # Creates a text field of type "email". @@ -7891,13 +7215,13 @@ module ActionView::Helpers::FormTagHelper # email_field_tag 'email', 'email@example.com', class: 'special_input', disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#847 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:897 def email_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#23 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:26 def embed_authenticity_token_in_remote_forms; end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#23 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:26 def embed_authenticity_token_in_remote_forms=(val); end # Generate an HTML id attribute value for the given name and @@ -7907,16 +7231,16 @@ module ActionView::Helpers::FormTagHelper # attribute name. # # <%= label_tag :post, :title %> - # <%= text_field_tag :post, :title, aria: { describedby: field_id(:post, :title, :error) } %> + # <%= text_field :post, :title, aria: { describedby: field_id(:post, :title, :error) } %> # <%= tag.span("is blank", id: field_id(:post, :title, :error) %> # # In the example above, the element built by - # the call to text_field_tag declares an + # the call to text_field declares an # aria-describedby attribute referencing the # element, sharing a common id root (post_title, in this # case). # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#99 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:102 def field_id(object_name, method_name, *suffixes, index: T.unsafe(nil), namespace: T.unsafe(nil)); end # Generate an HTML name attribute value for the given name and @@ -7925,13 +7249,13 @@ module ActionView::Helpers::FormTagHelper # Return the value generated by the FormBuilder for the given # attribute name. # - # <%= text_field_tag :post, :title, name: field_name(:post, :title, :subtitle) %> - # <%# => + # <%= text_field :post, :title, name: field_name(:post, :title, :subtitle) %> + # <%# => %> # - # <%= text_field_tag :post, :tag, name: field_name(:post, :tag, multiple: true) %> - # <%# => + # <%= text_field :post, :tag, name: field_name(:post, :tag, multiple: true) %> + # <%# => %> # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#129 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:132 def field_name(object_name, method_name, *method_names, multiple: T.unsafe(nil), index: T.unsafe(nil)); end # Creates a field set for grouping HTML form elements. @@ -7955,9 +7279,12 @@ module ActionView::Helpers::FormTagHelper # <% end %> # # =>

# - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#650 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:638 def field_set_tag(legend = T.unsafe(nil), options = T.unsafe(nil), &block); end + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:645 + def fieldset_tag(legend = T.unsafe(nil), options = T.unsafe(nil), &block); end + # Creates a file upload field. If you are using file uploads then you will also need # to set the multipart option for the form tag: # @@ -7994,7 +7321,7 @@ module ActionView::Helpers::FormTagHelper # file_field_tag 'file', accept: 'text/html', class: 'upload', value: 'index.html' # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#344 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:347 def file_field_tag(name, options = T.unsafe(nil)); end # Starts a form tag that points the action to a URL configured with url_for_options just like @@ -8044,7 +7371,7 @@ module ActionView::Helpers::FormTagHelper # form_tag('http://far.away.com/form', authenticity_token: "cf50faa3fe97702ca1ae") # # form with custom authenticity token # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#75 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:78 def form_tag(url_for_options = T.unsafe(nil), options = T.unsafe(nil), &block); end # Creates a hidden form input field used to transmit data that would be lost due to HTTP's statelessness or @@ -8064,7 +7391,7 @@ module ActionView::Helpers::FormTagHelper # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#305 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:308 def hidden_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Displays an image which when clicked will submit the form. @@ -8098,7 +7425,7 @@ module ActionView::Helpers::FormTagHelper # image_submit_tag("save.png", data: { confirm: "Are you sure?" }) # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#624 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:612 def image_submit_tag(source, options = T.unsafe(nil)); end # Creates a label element. Accepts a block. @@ -8116,7 +7443,7 @@ module ActionView::Helpers::FormTagHelper # label_tag 'name', nil, class: 'small_label' # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#278 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:281 def label_tag(name = T.unsafe(nil), content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end # Creates a text field of type "month". @@ -8129,7 +7456,21 @@ module ActionView::Helpers::FormTagHelper # * :max - The maximum acceptable value. # * :step - The acceptable value granularity. # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#788 + # ==== Examples + # + # month_field_tag 'name' + # # => + # + # month_field_tag 'month', '2014-01' + # # => + # + # month_field_tag 'month', nil, class: 'special_input' + # # => + # + # month_field_tag 'month', '2014-01', class: 'special_input', disabled: true + # # => + # + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:824 def month_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a number field. @@ -8177,7 +7518,7 @@ module ActionView::Helpers::FormTagHelper # number_field_tag 'quantity', '1', class: 'special_input', disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#895 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:945 def number_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a password field, a masked text field that will hide the users input behind a mask character. @@ -8210,36 +7551,21 @@ module ActionView::Helpers::FormTagHelper # password_field_tag 'pin', '1234', maxlength: 4, size: 6, class: "pin_input" # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#377 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:380 def password_field_tag(name = T.unsafe(nil), value = T.unsafe(nil), options = T.unsafe(nil)); end - # Creates a text field of type "tel". - # - # ==== Options - # - # Supports the same options as #text_field_tag. - # - # ==== Examples - # - # telephone_field_tag 'name' - # # => - # - # telephone_field_tag 'tel', '0123456789' - # # => - # - # telephone_field_tag 'tel', nil, class: 'special_input' - # # => - # - # telephone_field_tag 'tel', '0123456789', class: 'special_input', disabled: true - # # => - # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#722 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:715 def phone_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + # :call-seq: + # radio_button_tag(name, value, options = {}) + # radio_button_tag(name, value, checked, options = {}) + # # Creates a radio button; use groups of radio buttons named the same to allow users to # select from a group of options. # # ==== Options + # * :checked - If set to true, the radio button will be selected by default. # * :disabled - If set to true, the user will not be able to use this input. # * Any other key creates standard HTML options for the tag. # @@ -8256,8 +7582,8 @@ module ActionView::Helpers::FormTagHelper # radio_button_tag 'color', "green", true, class: "color_input" # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#469 - def radio_button_tag(name, value, checked = T.unsafe(nil), options = T.unsafe(nil)); end + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:491 + def radio_button_tag(name, value, *args); end # Creates a range form element. # @@ -8265,7 +7591,18 @@ module ActionView::Helpers::FormTagHelper # # Supports the same options as #number_field_tag. # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#909 + # ==== Examples + # + # range_field_tag 'quantity', '1' + # # => + # + # range_field_tag 'quantity', in: 1...10 + # # => + # + # range_field_tag 'quantity', min: 1, max: 10, step: 2 + # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#699 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:689 def search_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a dropdown selection box, or if the :multiple option is set to true, a multiple @@ -8347,7 +7684,7 @@ module ActionView::Helpers::FormTagHelper # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#198 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:201 def select_tag(name, option_tags = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a submit button with the text value as the caption. @@ -8373,26 +7710,7 @@ module ActionView::Helpers::FormTagHelper # submit_tag "Edit", class: "edit_button" # # => # - # ==== Deprecated: Rails UJS attributes - # - # Prior to Rails 7, Rails shipped with the JavaScript library called @rails/ujs on by default. Following Rails 7, - # this library is no longer on by default. This library integrated with the following options: - # - # * confirm: 'question?' - If present the unobtrusive JavaScript - # drivers will provide a prompt with the question specified. If the user accepts, - # the form is processed normally, otherwise no action is taken. - # * :disable_with - Value of this parameter will be used as the value for a - # disabled version of the submit button when the form is submitted. This feature is - # provided by the unobtrusive JavaScript driver. To disable this feature for a single submit tag - # pass :data => { disable_with: false } Defaults to value attribute. - # - # submit_tag "Complete sale", data: { disable_with: "Submitting..." } - # # => - # - # submit_tag "Save", data: { confirm: "Are you sure?" } - # # => - # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#517 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:525 def submit_tag(value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "tel". @@ -8415,7 +7733,7 @@ module ActionView::Helpers::FormTagHelper # telephone_field_tag 'tel', '0123456789', class: 'special_input', disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#722 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:712 def telephone_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text input area; use a textarea for longer text inputs such as blog posts or descriptions. @@ -8448,7 +7766,7 @@ module ActionView::Helpers::FormTagHelper # text_area_tag 'comment', nil, class: 'comment_input' # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#410 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:413 def text_area_tag(name, content = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a standard text field; use these text fields to input smaller chunks of text like a username @@ -8488,7 +7806,7 @@ module ActionView::Helpers::FormTagHelper # text_field_tag 'ip', '0.0.0.0', maxlength: 15, size: 20, class: "ip-input" # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#260 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:263 def text_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "time". @@ -8502,7 +7820,24 @@ module ActionView::Helpers::FormTagHelper # * :step - The acceptable value granularity. # * :include_seconds - Include seconds and ms in the output timestamp format (true by default). # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#760 + # ==== Examples + # + # time_field_tag 'name' + # # => + # + # time_field_tag 'time', '01:01' + # # => + # + # time_field_tag 'time', nil, class: 'special_input' + # # => + # + # time_field_tag 'time', '01:01', include_seconds: true + # # => + # + # time_field_tag 'time', '01:01', min: '00:00', max: '23:59', step: 1 + # # => + # + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:767 def time_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "url". @@ -8525,13 +7860,13 @@ module ActionView::Helpers::FormTagHelper # url_field_tag 'url', 'http://rubyonrails.org', class: 'special_input', disabled: true # # => # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#824 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:874 def url_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates the hidden UTF-8 enforcer tag. Override this method in a helper # to customize the tag. # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#915 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:976 def utf8_enforcer_tag; end # Creates a text field of type "week". @@ -8544,50 +7879,66 @@ module ActionView::Helpers::FormTagHelper # * :max - The maximum acceptable value. # * :step - The acceptable value granularity. # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#801 + # ==== Examples + # + # week_field_tag 'name' + # # => + # + # week_field_tag 'week', '2014-W01' + # # => + # + # week_field_tag 'week', nil, class: 'special_input' + # # => + # + # week_field_tag 'week', '2014-W01', class: 'special_input', disabled: true + # # => + # + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:851 def week_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end private - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1011 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:1073 def convert_direct_upload_option_to_url(options); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#950 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:1011 def extra_tags_for_form(html_options); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#980 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:1041 def form_tag_html(html_options); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#985 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:1047 def form_tag_with_body(html_options, content); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#923 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:984 def html_options_for_form(url_for_options, options); end # see http://www.w3.org/TR/html4/types.html#type-name # - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#992 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:1054 def sanitize_to_id(name); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#996 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:1058 def set_default_disable_with(value, tag_options); end class << self - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:29 def default_enforce_utf8; end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:29 def default_enforce_utf8=(val); end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#23 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:26 def embed_authenticity_token_in_remote_forms; end - # source://actionview//lib/action_view/helpers/form_tag_helper.rb#23 + # pkg:gem/actionview#lib/action_view/helpers/form_tag_helper.rb:26 def embed_authenticity_token_in_remote_forms=(val); end end end -# source://actionview//lib/action_view/helpers/javascript_helper.rb#5 +# = Action View JavaScript \Helpers +# +# pkg:gem/actionview#lib/action_view/helpers/javascript_helper.rb:6 module ActionView::Helpers::JavaScriptHelper # Escapes carriage returns and single and double quotes for JavaScript segments. # @@ -8596,20 +7947,13 @@ module ActionView::Helpers::JavaScriptHelper # # $('some_element').replaceWith('<%= j render 'some/element_template' %>'); # - # source://actionview//lib/action_view/helpers/javascript_helper.rb#27 + # pkg:gem/actionview#lib/action_view/helpers/javascript_helper.rb:28 def escape_javascript(javascript); end - # Escapes carriage returns and single and double quotes for JavaScript segments. - # - # Also available through the alias j(). This is particularly helpful in JavaScript - # responses, like: - # - # $('some_element').replaceWith('<%= j render 'some/element_template' %>'); - # - # source://actionview//lib/action_view/helpers/javascript_helper.rb#27 + # pkg:gem/actionview#lib/action_view/helpers/javascript_helper.rb:38 def j(javascript); end - # source://actionview//lib/action_view/helpers/javascript_helper.rb#90 + # pkg:gem/actionview#lib/action_view/helpers/javascript_helper.rb:91 def javascript_cdata_section(content); end # Returns a JavaScript tag with the +content+ inside. Example: @@ -8648,13 +7992,15 @@ module ActionView::Helpers::JavaScriptHelper # alert('All is good') # <% end -%> # - # source://actionview//lib/action_view/helpers/javascript_helper.rb#74 + # pkg:gem/actionview#lib/action_view/helpers/javascript_helper.rb:75 def javascript_tag(content_or_options_with_block = T.unsafe(nil), html_options = T.unsafe(nil), &block); end end -# source://actionview//lib/action_view/helpers/javascript_helper.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/javascript_helper.rb:7 ActionView::Helpers::JavaScriptHelper::JS_ESCAPE_MAP = T.let(T.unsafe(nil), Hash) +# = Action View Number \Helpers +# # Provides methods for converting numbers into formatted strings. # Methods are provided for phone numbers, currency, percentage, # precision, positional notation, file size, and pretty printing. @@ -8662,439 +8008,127 @@ ActionView::Helpers::JavaScriptHelper::JS_ESCAPE_MAP = T.let(T.unsafe(nil), Hash # Most methods expect a +number+ argument, and will return it # unchanged if can't be converted into a valid number. # -# source://actionview//lib/action_view/helpers/number_helper.rb#16 +# pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:17 module ActionView::Helpers::NumberHelper - # Formats a +number+ into a currency string (e.g., $13.65). You - # can customize the format in the +options+ hash. - # - # The currency unit and number formatting of the current locale will be used - # unless otherwise specified in the provided options. No currency conversion - # is performed. If the user is given a way to change their locale, they will - # also be able to change the relative value of the currency displayed with - # this helper. If your application will ever support multiple locales, you - # may want to specify a constant :locale option or consider - # using a library capable of currency conversion. - # - # ==== Options + # Delegates to ActiveSupport::NumberHelper#number_to_currency. # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the level of precision (defaults - # to 2). - # * :unit - Sets the denomination of the currency - # (defaults to "$"). - # * :separator - Sets the separator between the units - # (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ","). - # * :format - Sets the format for non-negative numbers - # (defaults to "%u%n"). Fields are %u for the - # currency, and %n for the number. - # * :negative_format - Sets the format for negative - # numbers (defaults to prepending a hyphen to the formatted - # number given by :format). Accepts the same fields - # than :format, except %n is here the - # absolute value of the number. - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: # - # ==== Examples + # number_to_currency("12x34") # => "$12x34" + # number_to_currency("12x34", raise: true) # => InvalidNumberError # - # number_to_currency(1234567890.50) # => $1,234,567,890.50 - # number_to_currency(1234567890.506) # => $1,234,567,890.51 - # number_to_currency(1234567890.506, precision: 3) # => $1,234,567,890.506 - # number_to_currency(1234567890.506, locale: :fr) # => 1 234 567 890,51 € - # number_to_currency("123a456") # => $123a456 - # - # number_to_currency("123a456", raise: true) # => InvalidNumberError - # - # number_to_currency(-0.456789, precision: 0) - # # => "$0" - # number_to_currency(-1234567890.50, negative_format: "(%u%n)") - # # => ($1,234,567,890.50) - # number_to_currency(1234567890.50, unit: "R$", separator: ",", delimiter: "") - # # => R$1234567890,50 - # number_to_currency(1234567890.50, unit: "R$", separator: ",", delimiter: "", format: "%n %u") - # # => 1234567890,50 R$ - # number_to_currency(1234567890.50, strip_insignificant_zeros: true) - # # => "$1,234,567,890.5" - # - # source://actionview//lib/action_view/helpers/number_helper.rb#127 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:51 def number_to_currency(number, options = T.unsafe(nil)); end - # Pretty prints (formats and approximates) a number in a way it - # is more readable by humans (e.g.: 1200000000 becomes "1.2 - # Billion"). This is useful for numbers that can get very large - # (and too hard to read). - # - # See number_to_human_size if you want to print a file - # size. - # - # You can also define your own unit-quantifier names if you want - # to use other decimal units (e.g.: 1500 becomes "1.5 - # kilometers", 0.150 becomes "150 milliliters", etc). You may - # define a wide range of unit quantifiers, even fractional ones - # (centi, deci, mili, etc). - # - # ==== Options + # Delegates to ActiveSupport::NumberHelper#number_to_human. # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +true+) - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +true+) - # * :units - A Hash of unit quantifier names. Or a - # string containing an i18n scope where to find this hash. It - # might have the following keys: - # * *integers*: :unit, :ten, - # :hundred, :thousand, :million, - # :billion, :trillion, - # :quadrillion - # * *fractionals*: :deci, :centi, - # :mili, :micro, :nano, - # :pico, :femto - # * :format - Sets the format of the output string - # (defaults to "%n %u"). The field types are: - # * %u - The quantifier (ex.: 'thousand') - # * %n - The number - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: # - # ==== Examples + # number_to_human("12x34") # => "12x34" + # number_to_human("12x34", raise: true) # => InvalidNumberError # - # number_to_human(123) # => "123" - # number_to_human(1234) # => "1.23 Thousand" - # number_to_human(12345) # => "12.3 Thousand" - # number_to_human(1234567) # => "1.23 Million" - # number_to_human(1234567890) # => "1.23 Billion" - # number_to_human(1234567890123) # => "1.23 Trillion" - # number_to_human(1234567890123456) # => "1.23 Quadrillion" - # number_to_human(1234567890123456789) # => "1230 Quadrillion" - # number_to_human(489939, precision: 2) # => "490 Thousand" - # number_to_human(489939, precision: 4) # => "489.9 Thousand" - # number_to_human(1234567, precision: 4, - # significant: false) # => "1.2346 Million" - # number_to_human(1234567, precision: 1, - # separator: ',', - # significant: false) # => "1,2 Million" - # - # number_to_human(500000000, precision: 5) # => "500 Million" - # number_to_human(12345012345, significant: false) # => "12.345 Billion" - # - # Non-significant zeros after the decimal separator are stripped - # out by default (set :strip_insignificant_zeros to - # +false+ to change that): - # - # number_to_human(12.00001) # => "12" - # number_to_human(12.00001, strip_insignificant_zeros: false) # => "12.0" - # - # ==== Custom Unit Quantifiers - # - # You can also use your own custom unit quantifiers: - # - # number_to_human(500000, units: {unit: "ml", thousand: "lt"}) # => "500 lt" - # - # If in your I18n locale you have: - # distance: - # centi: - # one: "centimeter" - # other: "centimeters" - # unit: - # one: "meter" - # other: "meters" - # thousand: - # one: "kilometer" - # other: "kilometers" - # billion: "gazillion-distance" - # - # Then you could do: - # - # number_to_human(543934, units: :distance) # => "544 kilometers" - # number_to_human(54393498, units: :distance) # => "54400 kilometers" - # number_to_human(54393498000, units: :distance) # => "54.4 gazillion-distance" - # number_to_human(343, units: :distance, precision: 1) # => "300 meters" - # number_to_human(1, units: :distance) # => "1 meter" - # number_to_human(0.34, units: :distance) # => "34 centimeters" - # - # source://actionview//lib/action_view/helpers/number_helper.rb#404 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:111 def number_to_human(number, options = T.unsafe(nil)); end - # Formats the bytes in +number+ into a more understandable - # representation (e.g., giving it 1500 yields 1.46 KB). This - # method is useful for reporting file sizes to users. You can - # customize the format in the +options+ hash. - # - # See number_to_human if you want to pretty-print a - # generic number. - # - # ==== Options + # Delegates to ActiveSupport::NumberHelper#number_to_human_size. # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +true+) - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +true+) - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: # - # ==== Examples + # number_to_human_size("12x34") # => "12x34" + # number_to_human_size("12x34", raise: true) # => InvalidNumberError # - # number_to_human_size(123) # => 123 Bytes - # number_to_human_size(1234) # => 1.21 KB - # number_to_human_size(12345) # => 12.1 KB - # number_to_human_size(1234567) # => 1.18 MB - # number_to_human_size(1234567890) # => 1.15 GB - # number_to_human_size(1234567890123) # => 1.12 TB - # number_to_human_size(1234567890123456) # => 1.1 PB - # number_to_human_size(1234567890123456789) # => 1.07 EB - # number_to_human_size(1234567, precision: 2) # => 1.2 MB - # number_to_human_size(483989, precision: 2) # => 470 KB - # number_to_human_size(1234567, precision: 2, separator: ',') # => 1,2 MB - # number_to_human_size(1234567890123, precision: 5) # => "1.1228 TB" - # number_to_human_size(524288000, precision: 5) # => "500 MB" - # - # source://actionview//lib/action_view/helpers/number_helper.rb#297 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:99 def number_to_human_size(number, options = T.unsafe(nil)); end - # Formats a +number+ as a percentage string (e.g., 65%). You can - # customize the format in the +options+ hash. - # - # ==== Options + # Delegates to ActiveSupport::NumberHelper#number_to_percentage. # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +false+). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). - # * :format - Specifies the format of the percentage - # string The number field is %n (defaults to "%n%"). - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: # - # ==== Examples - # - # number_to_percentage(100) # => 100.000% - # number_to_percentage("98") # => 98.000% - # number_to_percentage(100, precision: 0) # => 100% - # number_to_percentage(1000, delimiter: '.', separator: ',') # => 1.000,000% - # number_to_percentage(302.24398923423, precision: 5) # => 302.24399% - # number_to_percentage(1000, locale: :fr) # => 1 000,000% - # number_to_percentage("98a") # => 98a% - # number_to_percentage(100, format: "%n %") # => 100.000 % + # number_to_percentage("99x") # => "99x%" + # number_to_percentage("99x", raise: true) # => InvalidNumberError # - # number_to_percentage("98a", raise: true) # => InvalidNumberError - # - # source://actionview//lib/action_view/helpers/number_helper.rb#167 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:63 def number_to_percentage(number, options = T.unsafe(nil)); end - # Formats a +number+ into a phone number (US by default e.g., (555) - # 123-9876). You can customize the format in the +options+ hash. + # Delegates to ActiveSupport::NumberHelper#number_to_phone. # - # ==== Options + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: # - # * :area_code - Adds parentheses around the area code. - # * :delimiter - Specifies the delimiter to use - # (defaults to "-"). - # * :extension - Specifies an extension to add to the - # end of the generated number. - # * :country_code - Sets the country code for the phone - # number. - # * :pattern - Specifies how the number is divided into three - # groups with the custom regexp to override the default format. - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. + # number_to_phone("12x34") # => "12x34" + # number_to_phone("12x34", raise: true) # => InvalidNumberError # - # ==== Examples - # - # number_to_phone(5551234) # => 555-1234 - # number_to_phone("5551234") # => 555-1234 - # number_to_phone(1235551234) # => 123-555-1234 - # number_to_phone(1235551234, area_code: true) # => (123) 555-1234 - # number_to_phone(1235551234, delimiter: " ") # => 123 555 1234 - # number_to_phone(1235551234, area_code: true, extension: 555) # => (123) 555-1234 x 555 - # number_to_phone(1235551234, country_code: 1) # => +1-123-555-1234 - # number_to_phone("123a456") # => 123a456 - # number_to_phone("1234a567", raise: true) # => InvalidNumberError - # - # number_to_phone(1235551234, country_code: 1, extension: 1343, delimiter: ".") - # # => +1.123.555.1234 x 1343 - # - # number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true) - # # => "(755) 6123-4567" - # number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/) - # # => "133-1234-5678" - # - # source://actionview//lib/action_view/helpers/number_helper.rb#62 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:35 def number_to_phone(number, options = T.unsafe(nil)); end - # Formats a +number+ with grouped thousands using +delimiter+ - # (e.g., 12,324). You can customize the format in the +options+ - # hash. - # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :delimiter - Sets the thousands delimiter (defaults - # to ","). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter_pattern - Sets a custom regular expression used for - # deriving the placement of delimiter. Helpful when using currency formats - # like INR. - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. - # - # ==== Examples - # - # number_with_delimiter(12345678) # => 12,345,678 - # number_with_delimiter("123456") # => 123,456 - # number_with_delimiter(12345678.05) # => 12,345,678.05 - # number_with_delimiter(12345678, delimiter: ".") # => 12.345.678 - # number_with_delimiter(12345678, delimiter: ",") # => 12,345,678 - # number_with_delimiter(12345678.05, separator: " ") # => 12,345,678 05 - # number_with_delimiter(12345678.05, locale: :fr) # => 12 345 678,05 - # number_with_delimiter("112a") # => 112a - # number_with_delimiter(98765432.98, delimiter: " ", separator: ",") - # # => 98 765 432,98 + # Delegates to ActiveSupport::NumberHelper#number_to_delimited. # - # number_with_delimiter("123456.78", - # delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) # => "1,23,456.78" + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: # - # number_with_delimiter("112a", raise: true) # => raise InvalidNumberError + # number_with_delimiter("12x34") # => "12x34" + # number_with_delimiter("12x34", raise: true) # => InvalidNumberError # - # source://actionview//lib/action_view/helpers/number_helper.rb#206 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:75 def number_with_delimiter(number, options = T.unsafe(nil)); end - # Formats a +number+ with the specified level of - # :precision (e.g., 112.32 has a precision of 2 if - # +:significant+ is +false+, and 5 if +:significant+ is +true+). - # You can customize the format in the +options+ hash. + # Delegates to ActiveSupport::NumberHelper#number_to_rounded. # - # ==== Options - # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +false+). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). - # * :raise - If true, raises +InvalidNumberError+ when - # the argument is invalid. - # - # ==== Examples + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: # - # number_with_precision(111.2345) # => 111.235 - # number_with_precision(111.2345, precision: 2) # => 111.23 - # number_with_precision(13, precision: 5) # => 13.00000 - # number_with_precision(389.32314, precision: 0) # => 389 - # number_with_precision(111.2345, significant: true) # => 111 - # number_with_precision(111.2345, precision: 1, significant: true) # => 100 - # number_with_precision(13, precision: 5, significant: true) # => 13.000 - # number_with_precision(111.234, locale: :fr) # => 111,234 + # number_with_precision("12x34") # => "12x34" + # number_with_precision("12x34", raise: true) # => InvalidNumberError # - # number_with_precision(13, precision: 5, significant: true, strip_insignificant_zeros: true) - # # => 13 - # - # number_with_precision(389.32314, precision: 4, significant: true) # => 389.3 - # number_with_precision(1111.2345, precision: 2, separator: ',', delimiter: '.') - # # => 1.111,23 - # - # source://actionview//lib/action_view/helpers/number_helper.rb#251 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:87 def number_with_precision(number, options = T.unsafe(nil)); end private - # source://actionview//lib/action_view/helpers/number_helper.rb#409 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:116 def delegate_number_helper_method(method, number, options); end - # source://actionview//lib/action_view/helpers/number_helper.rb#428 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:135 def escape_units(units); end - # source://actionview//lib/action_view/helpers/number_helper.rb#418 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:125 def escape_unsafe_options(options); end - # @raise [InvalidNumberError] - # - # source://actionview//lib/action_view/helpers/number_helper.rb#451 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:158 def parse_float(number, raise_error); end - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/number_helper.rb#447 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:154 def valid_float?(number); end - # @raise [InvalidNumberError] - # - # source://actionview//lib/action_view/helpers/number_helper.rb#434 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:141 def wrap_with_output_safety_handling(number, raise_on_invalid, &block); end end # Raised when argument +number+ param given to the helpers is invalid and # the option +:raise+ is set to +true+. # -# source://actionview//lib/action_view/helpers/number_helper.rb#19 +# pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:20 class ActionView::Helpers::NumberHelper::InvalidNumberError < ::StandardError - # @return [InvalidNumberError] a new instance of InvalidNumberError - # - # source://actionview//lib/action_view/helpers/number_helper.rb#21 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:22 def initialize(number); end - # Returns the value of attribute number. - # - # source://actionview//lib/action_view/helpers/number_helper.rb#20 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:21 def number; end - # Sets the attribute number - # - # @param value the value to set the attribute number to. - # - # source://actionview//lib/action_view/helpers/number_helper.rb#20 + # pkg:gem/actionview#lib/action_view/helpers/number_helper.rb:21 def number=(_arg0); end end -# source://actionview//lib/action_view/helpers/output_safety_helper.rb#8 +# = Action View Raw Output \Helpers +# +# pkg:gem/actionview#lib/action_view/helpers/output_safety_helper.rb:8 module ActionView::Helpers::OutputSafetyHelper # This method outputs without escaping a string. Since escaping tags is - # now default, this can be used when you don't want Rails to automatically + # now default, this can be used when you don't want \Rails to automatically # escape tags. This is not recommended if the data is coming from the user's # input. # @@ -9103,7 +8137,7 @@ module ActionView::Helpers::OutputSafetyHelper # raw @user.name # # => 'Jimmy Tables' # - # source://actionview//lib/action_view/helpers/output_safety_helper.rb#18 + # pkg:gem/actionview#lib/action_view/helpers/output_safety_helper.rb:18 def raw(stringish); end # This method returns an HTML safe string similar to what Array#join @@ -9111,30 +8145,30 @@ module ActionView::Helpers::OutputSafetyHelper # the supplied separator, are HTML escaped unless they are HTML # safe, and the returned string is marked as HTML safe. # - # safe_join([raw("

foo

"), "

bar

"], "
") - # # => "

foo

<br /><p>bar</p>" + # safe_join([tag.p("foo"), "

bar

"], "
") + # # => "

foo

<br><p>bar</p>" # - # safe_join([raw("

foo

"), raw("

bar

")], raw("
")) - # # => "

foo


bar

" + # safe_join([tag.p("foo"), tag.p("bar")], tag.br) + # # => "

foo


bar

" # - # source://actionview//lib/action_view/helpers/output_safety_helper.rb#33 + # pkg:gem/actionview#lib/action_view/helpers/output_safety_helper.rb:33 def safe_join(array, sep = T.unsafe(nil)); end # Converts the array to a comma-separated sentence where the last element is # joined by the connector word. This is the html_safe-aware version of - # ActiveSupport's {Array#to_sentence}[https://api.rubyonrails.org/classes/Array.html#method-i-to_sentence]. + # ActiveSupport's Array#to_sentence. # - # source://actionview//lib/action_view/helpers/output_safety_helper.rb#43 + # pkg:gem/actionview#lib/action_view/helpers/output_safety_helper.rb:42 def to_sentence(array, options = T.unsafe(nil)); end end -# = Action View Rendering +# = Action View \Rendering \Helpers # # Implements methods that allow rendering from a view context. # In order to use this module, all you need is to implement # view_renderer that returns an ActionView::Renderer object. # -# source://actionview//lib/action_view/helpers/rendering_helper.rb#10 +# pkg:gem/actionview#lib/action_view/helpers/rendering_helper.rb:10 module ActionView::Helpers::RenderingHelper # Overrides _layout_for in the context object so it supports the case a block is # passed to a partial. Returns the contents that are yielded to a layout, given a @@ -9184,7 +8218,7 @@ module ActionView::Helpers::RenderingHelper # Hello David # # - # source://actionview//lib/action_view/helpers/rendering_helper.rb#97 + # pkg:gem/actionview#lib/action_view/helpers/rendering_helper.rb:97 def _layout_for(*args, &block); end # Returns the result of a render that's dictated by the options hash. The primary options are: @@ -9207,14 +8241,16 @@ module ActionView::Helpers::RenderingHelper # # Otherwise, a partial is rendered using the second parameter as the locals hash. # - # source://actionview//lib/action_view/helpers/rendering_helper.rb#30 + # pkg:gem/actionview#lib/action_view/helpers/rendering_helper.rb:30 def render(options = T.unsafe(nil), locals = T.unsafe(nil), &block); end end +# = Action View Sanitize \Helpers +# # The SanitizeHelper module provides a set of methods for scrubbing text of undesired HTML elements. # These helper methods extend Action View making them callable within your template files. # -# source://actionview//lib/action_view/helpers/sanitize_helper.rb#10 +# pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:11 module ActionView::Helpers::SanitizeHelper extend ::ActiveSupport::Concern @@ -9222,12 +8258,11 @@ module ActionView::Helpers::SanitizeHelper # Sanitizes HTML input, stripping all but known-safe tags and attributes. # - # It also strips href/src attributes with unsafe protocols like - # javascript:, while also protecting against attempts to use Unicode, - # ASCII, and hex character references to work around these protocol filters. - # All special characters will be escaped. + # It also strips +href+ / +src+ attributes with unsafe protocols like +javascript:+, while + # also protecting against attempts to use Unicode, ASCII, and hex character references to work + # around these protocol filters. # - # The default sanitizer is Rails::Html::SafeListSanitizer. See {Rails HTML + # The default sanitizer is +Rails::HTML5::SafeListSanitizer+. See {Rails HTML # Sanitizers}[https://github.com/rails/rails-html-sanitizer] for more information. # # Custom sanitization rules can also be provided. @@ -9237,26 +8272,31 @@ module ActionView::Helpers::SanitizeHelper # # ==== Options # - # * :tags - An array of allowed tags. - # * :attributes - An array of allowed attributes. - # * :scrubber - A {Rails::Html scrubber}[https://github.com/rails/rails-html-sanitizer] + # [+:tags+] + # An array of allowed tags. + # + # [+:attributes+] + # An array of allowed attributes. + # + # [+:scrubber+] + # A {Rails::HTML scrubber}[https://github.com/rails/rails-html-sanitizer] # or {Loofah::Scrubber}[https://github.com/flavorjones/loofah] object that # defines custom sanitization rules. A custom scrubber takes precedence over # custom tags and attributes. # # ==== Examples # - # Normal use: + # ===== Normal use # # <%= sanitize @comment.body %> # - # Providing custom lists of permitted tags and attributes: + # ===== Providing custom lists of permitted tags and attributes # # <%= sanitize @comment.body, tags: %w(strong em a), attributes: %w(href) %> # - # Providing a custom Rails::Html scrubber: + # ===== Providing a custom +Rails::HTML+ scrubber # - # class CommentScrubber < Rails::Html::PermitScrubber + # class CommentScrubber < Rails::HTML::PermitScrubber # def initialize # super # self.tags = %w( form script comment blockquote ) @@ -9268,21 +8308,27 @@ module ActionView::Helpers::SanitizeHelper # end # end # + # + # # <%= sanitize @comment.body, scrubber: CommentScrubber.new %> # # See {Rails HTML Sanitizer}[https://github.com/rails/rails-html-sanitizer] for - # documentation about Rails::Html scrubbers. + # documentation about +Rails::HTML+ scrubbers. # - # Providing a custom Loofah::Scrubber: + # ===== Providing a custom +Loofah::Scrubber+ # # scrubber = Loofah::Scrubber.new do |node| # node.remove if node.name == 'script' # end # + # + # # <%= sanitize @comment.body, scrubber: scrubber %> # # See {Loofah's documentation}[https://github.com/flavorjones/loofah] for more - # information about defining custom Loofah::Scrubber objects. + # information about defining custom +Loofah::Scrubber+ objects. + # + # ==== Global Configuration # # To set the default allowed tags or attributes across your application: # @@ -9290,14 +8336,36 @@ module ActionView::Helpers::SanitizeHelper # config.action_view.sanitized_allowed_tags = ['strong', 'em', 'a'] # config.action_view.sanitized_allowed_attributes = ['href', 'title'] # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#81 + # The default, starting in \Rails 7.1, is to use an HTML5 parser for sanitization (if it is + # available, see NOTE below). If you wish to revert back to the previous HTML4 behavior, you + # can do so by setting the following in your application configuration: + # + # # In config/application.rb + # config.action_view.sanitizer_vendor = Rails::HTML4::Sanitizer + # + # Or, if you're upgrading from a previous version of \Rails and wish to opt into the HTML5 + # behavior: + # + # # In config/application.rb + # config.action_view.sanitizer_vendor = Rails::HTML5::Sanitizer + # + # NOTE: +Rails::HTML5::Sanitizer+ is not supported on JRuby, so on JRuby platforms \Rails will + # fall back to using +Rails::HTML4::Sanitizer+. + # + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:111 def sanitize(html, options = T.unsafe(nil)); end - # Sanitizes a block of CSS code. Used by +sanitize+ when it comes across a style attribute. + # Sanitizes a block of CSS code. Used by #sanitize when it comes across a style attribute. # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#86 + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:116 def sanitize_css(style); end + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:12 + def sanitizer_vendor; end + + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:12 + def sanitizer_vendor=(val); end + # Strips all link tags from +html+ leaving just the link text. # # strip_links('Ruby on Rails') @@ -9312,7 +8380,7 @@ module ActionView::Helpers::SanitizeHelper # strip_links('<malformed & link') # # => <malformed & link # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#120 + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:150 def strip_links(html); end # Strips all HTML tags from +html+, including comments and special characters. @@ -9329,130 +8397,96 @@ module ActionView::Helpers::SanitizeHelper # strip_tags("> A quote from Smith & Wesson") # # => > A quote from Smith & Wesson # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#103 + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:133 def strip_tags(html); end + + class << self + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:12 + def sanitizer_vendor; end + + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:12 + def sanitizer_vendor=(val); end + end end -# source://actionview//lib/action_view/helpers/sanitize_helper.rb#124 +# pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:154 module ActionView::Helpers::SanitizeHelper::ClassMethods - # Gets the Rails::Html::FullSanitizer instance used by +strip_tags+. Replace with + # Gets the Rails::HTML::FullSanitizer instance used by +strip_tags+. Replace with # any object that responds to +sanitize+. # # class Application < Rails::Application # config.action_view.full_sanitizer = MySpecialSanitizer.new # end # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#145 + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:175 def full_sanitizer; end - # Sets the attribute full_sanitizer + # Gets the Rails::HTML::FullSanitizer instance used by +strip_tags+. Replace with + # any object that responds to +sanitize+. # - # @param value the value to set the attribute full_sanitizer to. + # class Application < Rails::Application + # config.action_view.full_sanitizer = MySpecialSanitizer.new + # end # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#125 + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:155 def full_sanitizer=(_arg0); end - # Gets the Rails::Html::LinkSanitizer instance used by +strip_links+. + # Gets the Rails::HTML::LinkSanitizer instance used by +strip_links+. # Replace with any object that responds to +sanitize+. # # class Application < Rails::Application # config.action_view.link_sanitizer = MySpecialSanitizer.new # end # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#155 + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:185 def link_sanitizer; end - # Sets the attribute link_sanitizer + # Gets the Rails::HTML::LinkSanitizer instance used by +strip_links+. + # Replace with any object that responds to +sanitize+. # - # @param value the value to set the attribute link_sanitizer to. + # class Application < Rails::Application + # config.action_view.link_sanitizer = MySpecialSanitizer.new + # end # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#125 + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:155 def link_sanitizer=(_arg0); end - # Gets the Rails::Html::SafeListSanitizer instance used by sanitize and +sanitize_css+. + # Gets the Rails::HTML::SafeListSanitizer instance used by sanitize and +sanitize_css+. # Replace with any object that responds to +sanitize+. # # class Application < Rails::Application # config.action_view.safe_list_sanitizer = MySpecialSanitizer.new # end # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#165 + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:195 def safe_list_sanitizer; end - # Sets the attribute safe_list_sanitizer + # Gets the Rails::HTML::SafeListSanitizer instance used by sanitize and +sanitize_css+. + # Replace with any object that responds to +sanitize+. # - # @param value the value to set the attribute safe_list_sanitizer to. + # class Application < Rails::Application + # config.action_view.safe_list_sanitizer = MySpecialSanitizer.new + # end # - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#125 + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:155 def safe_list_sanitizer=(_arg0); end - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#135 + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:165 def sanitized_allowed_attributes; end - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#34 - def sanitized_allowed_attributes=(attributes); end - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#47 - def sanitized_allowed_css_keywords; end - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#48 - def sanitized_allowed_css_keywords=(_); end - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#47 - def sanitized_allowed_css_properties; end - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#48 - def sanitized_allowed_css_properties=(_); end - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#47 - def sanitized_allowed_protocols; end - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#48 - def sanitized_allowed_protocols=(_); end - - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#131 + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:161 def sanitized_allowed_tags; end - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#24 - def sanitized_allowed_tags=(tags); end - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#47 - def sanitized_bad_tags; end - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#48 - def sanitized_bad_tags=(_); end - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#47 - def sanitized_protocol_separator; end - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#48 - def sanitized_protocol_separator=(_); end - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#47 - def sanitized_shorthand_css_properties; end - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#48 - def sanitized_shorthand_css_properties=(_); end - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#47 - def sanitized_uri_attributes; end - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#48 - def sanitized_uri_attributes=(_); end - - # source://actionview//lib/action_view/helpers/sanitize_helper.rb#127 + # pkg:gem/actionview#lib/action_view/helpers/sanitize_helper.rb:157 def sanitizer_vendor; end - - private - - # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#52 - def deprecate_option(name); end end +# = Action View Tag \Helpers +# # Provides methods to generate HTML tags programmatically both as a modern # HTML5 compliant builder style and legacy XHTML compliant tags. # -# source://actionview//lib/action_view/helpers/tag_helper.rb#14 +# pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:17 module ActionView::Helpers::TagHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper @@ -9471,22 +8505,10 @@ module ActionView::Helpers::TagHelper # cdata_section("hello]]>world") # # => world]]> # - # source://actionview//lib/action_view/helpers/tag_helper.rb#408 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:574 def cdata_section(content); end - # Returns a string of tokens built from +args+. - # - # ==== Examples - # token_list("foo", "bar") - # # => "foo bar" - # token_list("foo", "foo bar") - # # => "foo bar" - # token_list({ foo: true, bar: false }) - # # => "foo" - # token_list(nil, false, 123, "", "foo", { bar: true }) - # # => "123 foo bar" - # - # source://actionview//lib/action_view/helpers/tag_helper.rb#388 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:559 def class_names(*args); end # Returns an HTML block tag of type +name+ surrounding the +content+. Add @@ -9518,7 +8540,7 @@ module ActionView::Helpers::TagHelper # <% end -%> # # =>
Hello world!
# - # source://actionview//lib/action_view/helpers/tag_helper.rb#368 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:532 def content_tag(name, content_or_options_with_block = T.unsafe(nil), options = T.unsafe(nil), escape = T.unsafe(nil), &block); end # Returns an escaped version of +html+ without affecting existing escaped entities. @@ -9529,7 +8551,7 @@ module ActionView::Helpers::TagHelper # escape_once("<< Accept & Checkout") # # => "<< Accept & Checkout" # - # source://actionview//lib/action_view/helpers/tag_helper.rb#420 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:586 def escape_once(html); end # Returns an HTML tag. @@ -9609,6 +8631,14 @@ module ActionView::Helpers::TagHelper # # A void element: # tag.br # =>
# + # Note that when using the block form options should be wrapped in + # parenthesis. + # + # <%= tag.a(href: "/about", class: "font-bold") do %> + # About the author + # <% end %> + # # => About the author + # # === Building HTML attributes # # Transforms a Hash into HTML attributes, ready to be interpolated into @@ -9625,7 +8655,7 @@ module ActionView::Helpers::TagHelper # # === Legacy syntax # - # The following format is for legacy syntax support. It will be deprecated in future versions of Rails. + # The following format is for legacy syntax support. It will be deprecated in future versions of \Rails. # # tag(name, options = nil, open = false, escape = true) # @@ -9671,7 +8701,7 @@ module ActionView::Helpers::TagHelper # tag("div", class: { highlight: current_user.admin? }) # # =>
# - # source://actionview//lib/action_view/helpers/tag_helper.rb#331 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:495 def tag(name = T.unsafe(nil), options = T.unsafe(nil), open = T.unsafe(nil), escape = T.unsafe(nil)); end # Returns a string of tokens built from +args+. @@ -9686,247 +8716,609 @@ module ActionView::Helpers::TagHelper # token_list(nil, false, 123, "", "foo", { bar: true }) # # => "123 foo bar" # - # source://actionview//lib/action_view/helpers/tag_helper.rb#388 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:554 def token_list(*args); end private - # source://actionview//lib/action_view/helpers/tag_helper.rb#425 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:596 def build_tag_values(*args); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#445 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:591 + def ensure_valid_html5_tag_name(name); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:616 def tag_builder; end class << self - # source://actionview//lib/action_view/helpers/tag_helper.rb#425 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:614 def build_tag_values(*args); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:594 + def ensure_valid_html5_tag_name(name); end end end -# source://actionview//lib/action_view/helpers/tag_helper.rb#31 +# pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:34 ActionView::Helpers::TagHelper::ARIA_PREFIXES = T.let(T.unsafe(nil), Set) -# source://actionview//lib/action_view/helpers/tag_helper.rb#18 +# pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:21 ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES = T.let(T.unsafe(nil), Set) -# source://actionview//lib/action_view/helpers/tag_helper.rb#32 +# pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:35 ActionView::Helpers::TagHelper::DATA_PREFIXES = T.let(T.unsafe(nil), Set) -# source://actionview//lib/action_view/helpers/tag_helper.rb#40 +# pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:43 ActionView::Helpers::TagHelper::PRE_CONTENT_STRINGS = T.let(T.unsafe(nil), Hash) -# source://actionview//lib/action_view/helpers/tag_helper.rb#34 +# pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:37 ActionView::Helpers::TagHelper::TAG_TYPES = T.let(T.unsafe(nil), Hash) -# source://actionview//lib/action_view/helpers/tag_helper.rb#44 +# pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:47 class ActionView::Helpers::TagHelper::TagBuilder include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper - # @return [TagBuilder] a new instance of TagBuilder - # - # source://actionview//lib/action_view/helpers/tag_helper.rb#51 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:229 def initialize(view_context); end + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def a(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def abbr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def address(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def animate(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def animate_motion(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def animate_transform(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def area(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def article(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def aside(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + # Transforms a Hash into HTML Attributes, ready to be interpolated into # ERB. # # > # # => # - # source://actionview//lib/action_view/helpers/tag_helper.rb#60 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:238 def attributes(attributes); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#133 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def audio(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def b(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def base(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def bdi(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def bdo(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def blockquote(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def body(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:306 def boolean_tag_option(key); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def br(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def button(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def canvas(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def caption(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def circle(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def cite(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def code(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def col(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def colgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:252 def content_tag_string(name, content, options, escape = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#64 - def p(*arguments, **options, &block); end + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def data(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def datalist(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def dd(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def del(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def details(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def dfn(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def dialog(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def div(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def dl(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def dt(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def ellipse(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def em(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#137 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def embed(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def fieldset(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def figcaption(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def figure(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def footer(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def form(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def h1(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def h2(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def h3(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def h4(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def h5(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def h6(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def head(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def header(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def hgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def hr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def html(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def i(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def iframe(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def img(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def input(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def ins(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def kbd(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def keygen(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def label(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def legend(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def li(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def line(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def link(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def main(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def map(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def mark(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def menu(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def meta(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def meter(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def nav(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def noscript(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def object(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def ol(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def optgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def option(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def output(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def p(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def path(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def picture(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def polygon(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def polyline(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def portal(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def pre(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def progress(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def q(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def rect(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def rp(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def rt(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def ruby(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def s(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def samp(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def script(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def search(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def section(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def select(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:248 + def self_closing_tag_string(name, options, escape = T.unsafe(nil), tag_suffix = T.unsafe(nil)); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def set(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def slot(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def small(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def source(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def span(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def stop(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def strong(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def style(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def sub(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def summary(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def sup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def table(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:310 def tag_option(key, value, escape); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#91 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:261 def tag_options(options, escape = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#68 - def tag_string(name, content = T.unsafe(nil), **options, &block); end + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:242 + def tag_string(name, content = T.unsafe(nil), options, escape: T.unsafe(nil), &block); end - private + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def tbody(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def td(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def template(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def textarea(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def tfoot(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def th(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#167 - def handle_deprecated_escape_options(options); end + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def thead(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#188 - def method_missing(called, *args, **options, &block); end + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def time(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end - # source://actionview//lib/action_view/helpers/tag_helper.rb#155 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def title(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def tr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def track(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def u(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def ul(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def use(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def var(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def video(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def view(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:96 + def wbr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + private + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:340 + def method_missing(called, *args, escape: T.unsafe(nil), **options, &block); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:328 def prefix_tag_option(prefix, key, value, escape); end - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tag_helper.rb#163 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:336 def respond_to_missing?(*args); end -end -# source://actionview//lib/action_view/helpers/tag_helper.rb#48 -ActionView::Helpers::TagHelper::TagBuilder::HTML_VOID_ELEMENTS = T.let(T.unsafe(nil), Set) + class << self + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:51 + def define_element(name, code_generator:, method_name: T.unsafe(nil)); end + + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:82 + def define_self_closing_element(name, code_generator:, method_name: T.unsafe(nil)); end -# source://actionview//lib/action_view/helpers/tag_helper.rb#49 -ActionView::Helpers::TagHelper::TagBuilder::SVG_SELF_CLOSING_ELEMENTS = T.let(T.unsafe(nil), Set) + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:61 + def define_void_element(name, code_generator:, method_name: T.unsafe(nil)); end + end +end -# source://actionview//lib/action_view/helpers/tags.rb#5 +# pkg:gem/actionview#lib/action_view/helpers/tags.rb:5 module ActionView::Helpers::Tags extend ::ActiveSupport::Autoload end -# source://actionview//lib/action_view/helpers/tags/base.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:6 class ActionView::Helpers::Tags::Base include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper include ::ActionView::Helpers::UrlHelper include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::TextHelper include ::ActionView::Helpers::FormTagHelper include ::ActionView::Helpers::ActiveModelInstanceTag - include ::ActionView::Helpers::FormOptionsHelper extend ::ActionView::Helpers::UrlHelper::ClassMethods extend ::ActionView::Helpers::SanitizeHelper::ClassMethods - # @return [Base] a new instance of Base - # - # source://actionview//lib/action_view/helpers/tags/base.rb#12 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:11 def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end - # Returns the value of attribute object. - # - # source://actionview//lib/action_view/helpers/tags/base.rb#10 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:9 def object; end # This is what child classes implement. # - # @raise [NotImplementedError] - # - # source://actionview//lib/action_view/helpers/tags/base.rb#32 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:31 def render; end private - # source://actionview//lib/action_view/helpers/tags/base.rb#95 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:96 def add_default_name_and_id(options); end - # source://actionview//lib/action_view/helpers/tags/base.rb#82 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:83 def add_default_name_and_id_for_value(tag_value, options); end - # source://actionview//lib/action_view/helpers/tags/base.rb#147 - def add_options(option_tags, options, value = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tags/base.rb#173 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:132 def generate_ids?; end - # source://actionview//lib/action_view/helpers/tags/base.rb#165 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:124 def name_and_id_index(options); end - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tags/base.rb#142 - def placeholder_required?(html_options); end - - # source://actionview//lib/action_view/helpers/tags/base.rb#73 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:74 def retrieve_autoindex(pre_match); end - # source://actionview//lib/action_view/helpers/tags/base.rb#62 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:63 def retrieve_object(object); end - # source://actionview//lib/action_view/helpers/tags/base.rb#115 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:116 def sanitized_method_name; end - # source://actionview//lib/action_view/helpers/tags/base.rb#119 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:120 def sanitized_value(value); end - # source://actionview//lib/action_view/helpers/tags/base.rb#123 - def select_content_tag(option_tags, options, html_options); end - - # source://actionview//lib/action_view/helpers/tags/base.rb#111 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:112 def tag_id(index = T.unsafe(nil), namespace = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/tags/base.rb#107 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:108 def tag_name(multiple = T.unsafe(nil), index = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/tags/base.rb#37 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:36 def value; end - # source://actionview//lib/action_view/helpers/tags/base.rb#45 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:46 def value_before_type_cast; end - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tags/base.rb#57 + # pkg:gem/actionview#lib/action_view/helpers/tags/base.rb:58 def value_came_from_user?; end end -# source://actionview//lib/action_view/helpers/tags/check_box.rb#8 +# pkg:gem/actionview#lib/action_view/helpers/tags/check_box.rb:8 class ActionView::Helpers::Tags::CheckBox < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::Checkable - # @return [CheckBox] a new instance of CheckBox - # - # source://actionview//lib/action_view/helpers/tags/check_box.rb#11 + # pkg:gem/actionview#lib/action_view/helpers/tags/check_box.rb:11 def initialize(object_name, method_name, template_object, checked_value, unchecked_value, options); end - # source://actionview//lib/action_view/helpers/tags/check_box.rb#17 + # pkg:gem/actionview#lib/action_view/helpers/tags/check_box.rb:17 def render; end private - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tags/check_box.rb#42 + # pkg:gem/actionview#lib/action_view/helpers/tags/check_box.rb:42 def checked?(value); end - # source://actionview//lib/action_view/helpers/tags/check_box.rb#59 + # pkg:gem/actionview#lib/action_view/helpers/tags/check_box.rb:59 def hidden_field_for_checkbox(options); end end -# source://actionview//lib/action_view/helpers/tags/checkable.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/checkable.rb:6 module ActionView::Helpers::Tags::Checkable - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tags/checkable.rb#7 + # pkg:gem/actionview#lib/action_view/helpers/tags/checkable.rb:7 def input_checked?(options); end end -# source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#8 +# pkg:gem/actionview#lib/action_view/helpers/tags/collection_check_boxes.rb:8 class ActionView::Helpers::Tags::CollectionCheckBoxes < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::CollectionHelpers + include ::ActionView::Helpers::FormOptionsHelper - # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#20 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_check_boxes.rb:21 def render(&block); end private - # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#29 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_check_boxes.rb:30 def hidden_field_name; end - # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#25 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_check_boxes.rb:26 def render_component(builder); end end -# source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#11 +# pkg:gem/actionview#lib/action_view/helpers/tags/collection_check_boxes.rb:12 class ActionView::Helpers::Tags::CollectionCheckBoxes::CheckBoxBuilder < ::ActionView::Helpers::Tags::CollectionHelpers::Builder - # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#12 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_check_boxes.rb:13 def check_box(extra_html_options = T.unsafe(nil)); end end -# source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:6 module ActionView::Helpers::Tags::CollectionHelpers - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#30 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:30 def initialize(object_name, method_name, template_object, collection, value_method, text_method, options, html_options); end private @@ -9934,291 +9326,281 @@ module ActionView::Helpers::Tags::CollectionHelpers # Generate default options for collection helpers, such as :checked and # :disabled. # - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#47 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:47 def default_html_options_for_collection(item, value); end - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#107 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:107 def hidden_field; end - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#112 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:113 def hidden_field_name; end - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#40 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:40 def instantiate_builder(builder_class, item, value, text, html_options); end - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#75 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:75 def render_collection; end - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#86 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:86 def render_collection_for(builder_class, &block); end - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#71 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:71 def sanitize_attribute_name(value); end end -# source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#7 +# pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:7 class ActionView::Helpers::Tags::CollectionHelpers::Builder - # @return [Builder] a new instance of Builder - # - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#10 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:10 def initialize(template_object, object_name, method_name, object, sanitized_attribute_name, text, value, input_html_options); end - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#22 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:22 def label(label_html_options = T.unsafe(nil), &block); end - # Returns the value of attribute object. - # - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#8 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:8 def object; end - # Returns the value of attribute text. - # - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#8 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:8 def text; end - # Returns the value of attribute value. - # - # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#8 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_helpers.rb:8 def value; end end -# source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#8 +# pkg:gem/actionview#lib/action_view/helpers/tags/collection_radio_buttons.rb:8 class ActionView::Helpers::Tags::CollectionRadioButtons < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::CollectionHelpers + include ::ActionView::Helpers::FormOptionsHelper - # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#19 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_radio_buttons.rb:20 def render(&block); end private - # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#24 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_radio_buttons.rb:25 def render_component(builder); end end -# source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#11 +# pkg:gem/actionview#lib/action_view/helpers/tags/collection_radio_buttons.rb:12 class ActionView::Helpers::Tags::CollectionRadioButtons::RadioButtonBuilder < ::ActionView::Helpers::Tags::CollectionHelpers::Builder - # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#12 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_radio_buttons.rb:13 def radio_button(extra_html_options = T.unsafe(nil)); end end -# source://actionview//lib/action_view/helpers/tags/collection_select.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/collection_select.rb:6 class ActionView::Helpers::Tags::CollectionSelect < ::ActionView::Helpers::Tags::Base - # @return [CollectionSelect] a new instance of CollectionSelect - # - # source://actionview//lib/action_view/helpers/tags/collection_select.rb#7 + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_select.rb:10 def initialize(object_name, method_name, template_object, collection, value_method, text_method, options, html_options); end - # source://actionview//lib/action_view/helpers/tags/collection_select.rb#16 + # pkg:gem/actionview#lib/action_view/helpers/tags/collection_select.rb:19 def render; end end -# source://actionview//lib/action_view/helpers/tags/color_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/color_field.rb:6 class ActionView::Helpers::Tags::ColorField < ::ActionView::Helpers::Tags::TextField - # source://actionview//lib/action_view/helpers/tags/color_field.rb#7 + # pkg:gem/actionview#lib/action_view/helpers/tags/color_field.rb:7 def render; end private - # source://actionview//lib/action_view/helpers/tags/color_field.rb#15 + # pkg:gem/actionview#lib/action_view/helpers/tags/color_field.rb:15 def validate_color_string(string); end end -# source://actionview//lib/action_view/helpers/tags/date_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/date_field.rb:6 class ActionView::Helpers::Tags::DateField < ::ActionView::Helpers::Tags::DatetimeField private - # source://actionview//lib/action_view/helpers/tags/date_field.rb#8 - def format_date(value); end + # pkg:gem/actionview#lib/action_view/helpers/tags/date_field.rb:8 + def format_datetime(value); end end -# source://actionview//lib/action_view/helpers/tags/date_select.rb#8 +# pkg:gem/actionview#lib/action_view/helpers/tags/date_select.rb:8 class ActionView::Helpers::Tags::DateSelect < ::ActionView::Helpers::Tags::Base - # @return [DateSelect] a new instance of DateSelect - # - # source://actionview//lib/action_view/helpers/tags/date_select.rb#9 + include ::ActionView::Helpers::Tags::SelectRenderer + + # pkg:gem/actionview#lib/action_view/helpers/tags/date_select.rb:11 def initialize(object_name, method_name, template_object, options, html_options); end - # source://actionview//lib/action_view/helpers/tags/date_select.rb#15 + # pkg:gem/actionview#lib/action_view/helpers/tags/date_select.rb:17 def render; end private - # source://actionview//lib/action_view/helpers/tags/date_select.rb#30 + # pkg:gem/actionview#lib/action_view/helpers/tags/date_select.rb:32 def datetime_selector(options, html_options); end - # source://actionview//lib/action_view/helpers/tags/date_select.rb#43 + # pkg:gem/actionview#lib/action_view/helpers/tags/date_select.rb:45 def default_datetime(options); end - # source://actionview//lib/action_view/helpers/tags/date_select.rb#26 + # pkg:gem/actionview#lib/action_view/helpers/tags/date_select.rb:28 def select_type; end class << self - # source://actionview//lib/action_view/helpers/tags/date_select.rb#20 + # pkg:gem/actionview#lib/action_view/helpers/tags/date_select.rb:22 def select_type; end end end -# source://actionview//lib/action_view/helpers/tags/datetime_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/datetime_field.rb:6 class ActionView::Helpers::Tags::DatetimeField < ::ActionView::Helpers::Tags::TextField - # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#7 + # pkg:gem/actionview#lib/action_view/helpers/tags/datetime_field.rb:7 def render; end private - # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#21 + # pkg:gem/actionview#lib/action_view/helpers/tags/datetime_field.rb:17 def datetime_value(value); end - # @raise [NotImplementedError] - # - # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#17 - def format_date(value); end + # pkg:gem/actionview#lib/action_view/helpers/tags/datetime_field.rb:25 + def format_datetime(value); end + + # pkg:gem/actionview#lib/action_view/helpers/tags/datetime_field.rb:29 + def parse_datetime(value); end end -# source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/datetime_local_field.rb:6 class ActionView::Helpers::Tags::DatetimeLocalField < ::ActionView::Helpers::Tags::DatetimeField + # pkg:gem/actionview#lib/action_view/helpers/tags/datetime_local_field.rb:7 + def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end + private - # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#14 - def format_date(value); end + # pkg:gem/actionview#lib/action_view/helpers/tags/datetime_local_field.rb:19 + def format_datetime(value); end class << self - # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#8 + # pkg:gem/actionview#lib/action_view/helpers/tags/datetime_local_field.rb:13 def field_type; end end end -# source://actionview//lib/action_view/helpers/tags/datetime_select.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/datetime_select.rb:6 class ActionView::Helpers::Tags::DatetimeSelect < ::ActionView::Helpers::Tags::DateSelect; end -# source://actionview//lib/action_view/helpers/tags/email_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/email_field.rb:6 class ActionView::Helpers::Tags::EmailField < ::ActionView::Helpers::Tags::TextField; end -# source://actionview//lib/action_view/helpers/tags/file_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/file_field.rb:6 class ActionView::Helpers::Tags::FileField < ::ActionView::Helpers::Tags::TextField - # source://actionview//lib/action_view/helpers/tags/file_field.rb#7 + # pkg:gem/actionview#lib/action_view/helpers/tags/file_field.rb:7 def render; end private - # source://actionview//lib/action_view/helpers/tags/file_field.rb#20 + # pkg:gem/actionview#lib/action_view/helpers/tags/file_field.rb:20 def hidden_field_for_multiple_file(options); end end -# source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/grouped_collection_select.rb:6 class ActionView::Helpers::Tags::GroupedCollectionSelect < ::ActionView::Helpers::Tags::Base - # @return [GroupedCollectionSelect] a new instance of GroupedCollectionSelect - # - # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#7 + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # pkg:gem/actionview#lib/action_view/helpers/tags/grouped_collection_select.rb:10 def initialize(object_name, method_name, template_object, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options); end - # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#18 + # pkg:gem/actionview#lib/action_view/helpers/tags/grouped_collection_select.rb:21 def render; end end -# source://actionview//lib/action_view/helpers/tags/hidden_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/hidden_field.rb:6 class ActionView::Helpers::Tags::HiddenField < ::ActionView::Helpers::Tags::TextField - # source://actionview//lib/action_view/helpers/tags/hidden_field.rb#7 + # pkg:gem/actionview#lib/action_view/helpers/tags/hidden_field.rb:7 def render; end end -# source://actionview//lib/action_view/helpers/tags/label.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/label.rb:6 class ActionView::Helpers::Tags::Label < ::ActionView::Helpers::Tags::Base - # @return [Label] a new instance of Label - # - # source://actionview//lib/action_view/helpers/tags/label.rb#34 + # pkg:gem/actionview#lib/action_view/helpers/tags/label.rb:34 def initialize(object_name, method_name, template_object, content_or_options = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/tags/label.rb#48 + # pkg:gem/actionview#lib/action_view/helpers/tags/label.rb:48 def render(&block); end private - # source://actionview//lib/action_view/helpers/tags/label.rb#78 + # pkg:gem/actionview#lib/action_view/helpers/tags/label.rb:78 def render_component(builder); end end -# source://actionview//lib/action_view/helpers/tags/label.rb#7 +# pkg:gem/actionview#lib/action_view/helpers/tags/label.rb:7 class ActionView::Helpers::Tags::Label::LabelBuilder - # @return [LabelBuilder] a new instance of LabelBuilder - # - # source://actionview//lib/action_view/helpers/tags/label.rb#10 + # pkg:gem/actionview#lib/action_view/helpers/tags/label.rb:10 def initialize(template_object, object_name, method_name, object, tag_value); end - # Returns the value of attribute object. - # - # source://actionview//lib/action_view/helpers/tags/label.rb#8 + # pkg:gem/actionview#lib/action_view/helpers/tags/label.rb:8 def object; end - # source://actionview//lib/action_view/helpers/tags/label.rb#29 + # pkg:gem/actionview#lib/action_view/helpers/tags/label.rb:29 def to_s; end - # source://actionview//lib/action_view/helpers/tags/label.rb#18 + # pkg:gem/actionview#lib/action_view/helpers/tags/label.rb:18 def translation; end end -# source://actionview//lib/action_view/helpers/tags/month_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/month_field.rb:6 class ActionView::Helpers::Tags::MonthField < ::ActionView::Helpers::Tags::DatetimeField private - # source://actionview//lib/action_view/helpers/tags/month_field.rb#8 - def format_date(value); end + # pkg:gem/actionview#lib/action_view/helpers/tags/month_field.rb:8 + def format_datetime(value); end end -# source://actionview//lib/action_view/helpers/tags/number_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/number_field.rb:6 class ActionView::Helpers::Tags::NumberField < ::ActionView::Helpers::Tags::TextField - # source://actionview//lib/action_view/helpers/tags/number_field.rb#7 + # pkg:gem/actionview#lib/action_view/helpers/tags/number_field.rb:7 def render; end end -# source://actionview//lib/action_view/helpers/tags/password_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/password_field.rb:6 class ActionView::Helpers::Tags::PasswordField < ::ActionView::Helpers::Tags::TextField - # source://actionview//lib/action_view/helpers/tags/password_field.rb#7 + # pkg:gem/actionview#lib/action_view/helpers/tags/password_field.rb:7 def render; end end -# source://actionview//lib/action_view/helpers/tags/placeholderable.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/placeholderable.rb:6 module ActionView::Helpers::Tags::Placeholderable - # source://actionview//lib/action_view/helpers/tags/placeholderable.rb#7 + # pkg:gem/actionview#lib/action_view/helpers/tags/placeholderable.rb:7 def initialize(*_arg0); end end -# source://actionview//lib/action_view/helpers/tags/radio_button.rb#8 +# pkg:gem/actionview#lib/action_view/helpers/tags/radio_button.rb:8 class ActionView::Helpers::Tags::RadioButton < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::Checkable - # @return [RadioButton] a new instance of RadioButton - # - # source://actionview//lib/action_view/helpers/tags/radio_button.rb#11 + # pkg:gem/actionview#lib/action_view/helpers/tags/radio_button.rb:11 def initialize(object_name, method_name, template_object, tag_value, options); end - # source://actionview//lib/action_view/helpers/tags/radio_button.rb#16 + # pkg:gem/actionview#lib/action_view/helpers/tags/radio_button.rb:16 def render; end private - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tags/radio_button.rb#26 + # pkg:gem/actionview#lib/action_view/helpers/tags/radio_button.rb:26 def checked?(value); end end -# source://actionview//lib/action_view/helpers/tags/range_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/range_field.rb:6 class ActionView::Helpers::Tags::RangeField < ::ActionView::Helpers::Tags::NumberField; end -# source://actionview//lib/action_view/helpers/tags/search_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/search_field.rb:6 class ActionView::Helpers::Tags::SearchField < ::ActionView::Helpers::Tags::TextField - # source://actionview//lib/action_view/helpers/tags/search_field.rb#7 + # pkg:gem/actionview#lib/action_view/helpers/tags/search_field.rb:7 def render; end end -# source://actionview//lib/action_view/helpers/tags/select.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/select.rb:6 class ActionView::Helpers::Tags::Select < ::ActionView::Helpers::Tags::Base - # @return [Select] a new instance of Select - # - # source://actionview//lib/action_view/helpers/tags/select.rb#7 + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # pkg:gem/actionview#lib/action_view/helpers/tags/select.rb:10 def initialize(object_name, method_name, template_object, choices, options, html_options); end - # source://actionview//lib/action_view/helpers/tags/select.rb#16 + # pkg:gem/actionview#lib/action_view/helpers/tags/select.rb:19 def render; end private @@ -10228,129 +9610,133 @@ class ActionView::Helpers::Tags::Select < ::ActionView::Helpers::Tags::Base # [nil, []] # { nil => [] } # - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/tags/select.rb#36 + # pkg:gem/actionview#lib/action_view/helpers/tags/select.rb:39 def grouped_choices?; end end -# source://actionview//lib/action_view/helpers/tags/tel_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/select_renderer.rb:6 +module ActionView::Helpers::Tags::SelectRenderer + private + + # pkg:gem/actionview#lib/action_view/helpers/tags/select_renderer.rb:36 + def add_options(option_tags, options, value = T.unsafe(nil)); end + + # pkg:gem/actionview#lib/action_view/helpers/tags/select_renderer.rb:31 + def placeholder_required?(html_options); end + + # pkg:gem/actionview#lib/action_view/helpers/tags/select_renderer.rb:8 + def select_content_tag(option_tags, options, html_options); end +end + +# pkg:gem/actionview#lib/action_view/helpers/tags/tel_field.rb:6 class ActionView::Helpers::Tags::TelField < ::ActionView::Helpers::Tags::TextField; end -# source://actionview//lib/action_view/helpers/tags/text_area.rb#8 +# pkg:gem/actionview#lib/action_view/helpers/tags/text_area.rb:8 class ActionView::Helpers::Tags::TextArea < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::Placeholderable - # source://actionview//lib/action_view/helpers/tags/text_area.rb#11 + # pkg:gem/actionview#lib/action_view/helpers/tags/text_area.rb:11 def render; end end -# source://actionview//lib/action_view/helpers/tags/text_field.rb#8 +# pkg:gem/actionview#lib/action_view/helpers/tags/text_field.rb:8 class ActionView::Helpers::Tags::TextField < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::Placeholderable - # source://actionview//lib/action_view/helpers/tags/text_field.rb#11 + # pkg:gem/actionview#lib/action_view/helpers/tags/text_field.rb:11 def render; end private - # source://actionview//lib/action_view/helpers/tags/text_field.rb#27 + # pkg:gem/actionview#lib/action_view/helpers/tags/text_field.rb:27 def field_type; end class << self - # source://actionview//lib/action_view/helpers/tags/text_field.rb#21 + # pkg:gem/actionview#lib/action_view/helpers/tags/text_field.rb:21 def field_type; end end end -# source://actionview//lib/action_view/helpers/tags/time_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/time_field.rb:6 class ActionView::Helpers::Tags::TimeField < ::ActionView::Helpers::Tags::DatetimeField - # @return [TimeField] a new instance of TimeField - # - # source://actionview//lib/action_view/helpers/tags/time_field.rb#7 + # pkg:gem/actionview#lib/action_view/helpers/tags/time_field.rb:7 def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end private - # source://actionview//lib/action_view/helpers/tags/time_field.rb#13 - def format_date(value); end + # pkg:gem/actionview#lib/action_view/helpers/tags/time_field.rb:13 + def format_datetime(value); end end -# source://actionview//lib/action_view/helpers/tags/time_select.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/time_select.rb:6 class ActionView::Helpers::Tags::TimeSelect < ::ActionView::Helpers::Tags::DateSelect; end -# source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/time_zone_select.rb:6 class ActionView::Helpers::Tags::TimeZoneSelect < ::ActionView::Helpers::Tags::Base - # @return [TimeZoneSelect] a new instance of TimeZoneSelect - # - # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#7 + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # pkg:gem/actionview#lib/action_view/helpers/tags/time_zone_select.rb:10 def initialize(object_name, method_name, template_object, priority_zones, options, html_options); end - # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#14 + # pkg:gem/actionview#lib/action_view/helpers/tags/time_zone_select.rb:17 def render; end end -# source://actionview//lib/action_view/helpers/tags/translator.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:6 class ActionView::Helpers::Tags::Translator - # @return [Translator] a new instance of Translator - # - # source://actionview//lib/action_view/helpers/tags/translator.rb#7 + # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:7 def initialize(object, object_name, method_and_value, scope:); end - # source://actionview//lib/action_view/helpers/tags/translator.rb#14 + # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:14 def translate; end private - # source://actionview//lib/action_view/helpers/tags/translator.rb#31 + # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:31 def human_attribute_name; end - # source://actionview//lib/action_view/helpers/tags/translator.rb#22 + # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:22 def i18n_default; end - # Returns the value of attribute method_and_value. - # - # source://actionview//lib/action_view/helpers/tags/translator.rb#20 + # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:20 def method_and_value; end - # Returns the value of attribute model. - # - # source://actionview//lib/action_view/helpers/tags/translator.rb#20 + # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:20 def model; end - # Returns the value of attribute object_name. - # - # source://actionview//lib/action_view/helpers/tags/translator.rb#20 + # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:20 def object_name; end - # Returns the value of attribute scope. - # - # source://actionview//lib/action_view/helpers/tags/translator.rb#20 + # pkg:gem/actionview#lib/action_view/helpers/tags/translator.rb:20 def scope; end end -# source://actionview//lib/action_view/helpers/tags/url_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/url_field.rb:6 class ActionView::Helpers::Tags::UrlField < ::ActionView::Helpers::Tags::TextField; end -# source://actionview//lib/action_view/helpers/tags/week_field.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/week_field.rb:6 class ActionView::Helpers::Tags::WeekField < ::ActionView::Helpers::Tags::DatetimeField private - # source://actionview//lib/action_view/helpers/tags/week_field.rb#8 - def format_date(value); end + # pkg:gem/actionview#lib/action_view/helpers/tags/week_field.rb:8 + def format_datetime(value); end end -# source://actionview//lib/action_view/helpers/tags/weekday_select.rb#6 +# pkg:gem/actionview#lib/action_view/helpers/tags/weekday_select.rb:6 class ActionView::Helpers::Tags::WeekdaySelect < ::ActionView::Helpers::Tags::Base - # @return [WeekdaySelect] a new instance of WeekdaySelect - # - # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#7 + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # pkg:gem/actionview#lib/action_view/helpers/tags/weekday_select.rb:10 def initialize(object_name, method_name, template_object, options, html_options); end - # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#13 + # pkg:gem/actionview#lib/action_view/helpers/tags/weekday_select.rb:16 def render; end end +# = Action View Text \Helpers +# # The TextHelper module provides a set of methods for filtering, formatting # and transforming strings, which can reduce the amount of inline Ruby code in # your views. These helper methods extend Action View making them callable @@ -10374,7 +9760,7 @@ end # simple_format h('Example') # # => "

<a href=\"http://example.com/\">Example</a>

" # -# source://actionview//lib/action_view/helpers/text_helper.rb#35 +# pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:36 module ActionView::Helpers::TextHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper @@ -10385,41 +9771,44 @@ module ActionView::Helpers::TextHelper mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods # The preferred method of outputting text in your views is to use the - # <%= "text" %> eRuby syntax. The regular _puts_ and _print_ methods + # <%= "text" %> eRuby syntax. The regular +puts+ and +print+ methods # do not operate as expected in an eRuby code block. If you absolutely must - # output text within a non-output code block (i.e., <% %>), you can use the concat method. + # output text within a non-output code block (i.e., <% %>), you + # can use the +concat+ method. # - # <% - # concat "hello" - # # is the equivalent of <%= "hello" %> + # <% concat "hello" %> is equivalent to <%= "hello" %> # - # if logged_in - # concat "Logged in!" - # else - # concat link_to('login', action: :login) - # end - # # will either display "Logged in!" or a login link + # <% + # unless signed_in? + # concat link_to("Sign In", action: :sign_in) + # end # %> # - # source://actionview//lib/action_view/helpers/text_helper.rb#58 + # is equivalent to + # + # <% unless signed_in? %> + # <%= link_to "Sign In", action: :sign_in %> + # <% end %> + # + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:63 def concat(string); end # Returns the current cycle string after a cycle has been started. Useful # for complex table highlighting or any other design need which requires # the current cycle string in more than one place. # - # # Alternate background colors - # @items = [1,2,3,4] + # <%# Alternate background colors %> + # <% @items = [1,2,3,4] %> # <% @items.each do |item| %> #
"> # <%= item %> #
# <% end %> # - # source://actionview//lib/action_view/helpers/text_helper.rb#382 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:461 def current_cycle(name = T.unsafe(nil)); end - # Creates a Cycle object whose _to_s_ method cycles through elements of an + # Creates a Cycle object whose +to_s+ method cycles through elements of an # array every time it is called. This can be used for example, to alternate # classes for table rows. You can use named cycles to allow nesting in loops. # Passing a Hash as the last parameter with a :name key will create a @@ -10428,8 +9817,8 @@ module ActionView::Helpers::TextHelper # and passing the name of the cycle. The current cycle string can be obtained # anytime using the current_cycle method. # - # # Alternate CSS classes for even and odd numbers... - # @items = [1,2,3,4] + # <%# Alternate CSS classes for even and odd numbers... %> + # <% @items = [1,2,3,4] %> # # <% @items.each do |item| %> # "> @@ -10439,10 +9828,12 @@ module ActionView::Helpers::TextHelper #
# # - # # Cycle CSS classes for rows, and text colors for values within each row - # @items = x = [{first: 'Robert', middle: 'Daniel', last: 'James'}, - # {first: 'Emily', middle: 'Shannon', maiden: 'Pike', last: 'Hicks'}, - # {first: 'June', middle: 'Dae', last: 'Jones'}] + # <%# Cycle CSS classes for rows, and text colors for values within each row %> + # <% @items = [ + # { first: "Robert", middle: "Daniel", last: "James" }, + # { first: "Emily", middle: "Shannon", maiden: "Pike", last: "Hicks" }, + # { first: "June", middle: "Dae", last: "Jones" }, + # ] %> # <% @items.each do |item| %> # "> # @@ -10457,100 +9848,129 @@ module ActionView::Helpers::TextHelper # # <% end %> # - # source://actionview//lib/action_view/helpers/text_helper.rb#358 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:437 def cycle(first_value, *values); end - # Extracts an excerpt from +text+ that matches the first instance of +phrase+. - # The :radius option expands the excerpt on each side of the first occurrence of +phrase+ by the number of characters - # defined in :radius (which defaults to 100). If the excerpt radius overflows the beginning or end of the +text+, - # then the :omission option (which defaults to "...") will be prepended/appended accordingly. Use the - # :separator option to choose the delimitation. The resulting string will be stripped in any case. If the +phrase+ - # isn't found, +nil+ is returned. + # Extracts the first occurrence of +phrase+ plus surrounding text from + # +text+. An omission marker is prepended / appended if the start / end of + # the result does not coincide with the start / end of +text+. The result + # is always stripped in any case. Returns +nil+ if +phrase+ isn't found. + # + # ==== Options + # + # [+:radius+] + # The number of characters (or tokens — see +:separator+ option) around + # +phrase+ to include in the result. Defaults to 100. + # + # [+:omission+] + # The marker to prepend / append when the start / end of the excerpt + # does not coincide with the start / end of +text+. Defaults to + # "...". + # + # [+:separator+] + # The separator between tokens to count for +:radius+. Defaults to + # "", which treats each character as a token. + # + # ==== Examples # # excerpt('This is an example', 'an', radius: 5) - # # => ...s is an exam... + # # => "...s is an exam..." # # excerpt('This is an example', 'is', radius: 5) - # # => This is a... + # # => "This is a..." # # excerpt('This is an example', 'is') - # # => This is an example + # # => "This is an example" # # excerpt('This next thing is an example', 'ex', radius: 2) - # # => ...next... + # # => "...next..." # # excerpt('This is also an example', 'an', radius: 8, omission: ' ') - # # => is also an example + # # => " is also an example" # # excerpt('This is a very beautiful morning', 'very', separator: ' ', radius: 1) - # # => ...a very beautiful... + # # => "...a very beautiful..." # - # source://actionview//lib/action_view/helpers/text_helper.rb#179 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:235 def excerpt(text, phrase, options = T.unsafe(nil)); end - # Highlights one or more +phrases+ everywhere in +text+ by inserting it into - # a :highlighter string. The highlighter can be specialized by passing :highlighter - # as a single-quoted string with \1 where the phrase is to be inserted (defaults to - # \1) or passing a block that receives each matched term. By default +text+ - # is sanitized to prevent possible XSS attacks. If the input is trustworthy, passing false - # for :sanitize will turn sanitizing off. + # Highlights occurrences of +phrases+ in +text+ by formatting them with a + # highlighter string. +phrases+ can be one or more strings or regular + # expressions. The result will be marked HTML safe. By default, +text+ is + # sanitized before highlighting to prevent possible XSS attacks. + # + # If a block is specified, it will be used instead of the highlighter + # string. Each occurrence of a phrase will be passed to the block, and its + # return value will be inserted into the final result. + # + # ==== Options + # + # [+:highlighter+] + # The highlighter string. Uses \1 as the placeholder for a + # phrase, similar to +String#sub+. Defaults to "\1". + # This option is ignored if a block is specified. + # + # [+:sanitize+] + # Whether to sanitize +text+ before highlighting. Defaults to true. + # + # ==== Examples # # highlight('You searched for: rails', 'rails') - # # => You searched for: rails + # # => "You searched for: rails" # # highlight('You searched for: rails', /for|rails/) - # # => You searched for: rails + # # => "You searched for: rails" # # highlight('You searched for: ruby, rails, dhh', 'actionpack') - # # => You searched for: ruby, rails, dhh + # # => "You searched for: ruby, rails, dhh" # # highlight('You searched for: rails', ['for', 'rails'], highlighter: '\1') - # # => You searched for: rails + # # => "You searched for: rails" # # highlight('You searched for: rails', 'rails', highlighter: '\1') - # # => You searched for: rails + # # => "You searched for: rails" # - # highlight('You searched for: rails', 'rails') { |match| link_to(search_path(q: match, match)) } - # # => You searched for: rails + # highlight('You searched for: rails', 'rails') { |match| link_to(search_path(q: match)) } + # # => "You searched for: rails" # # highlight('ruby on rails', 'rails', sanitize: false) - # # => ruby on rails + # # => "ruby on rails" # - # source://actionview//lib/action_view/helpers/text_helper.rb#136 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:174 def highlight(text, phrases, options = T.unsafe(nil), &block); end # Attempts to pluralize the +singular+ word unless +count+ is 1. If # +plural+ is supplied, it will use that when count is > 1, otherwise # it will use the Inflector to determine the plural form for the given locale, - # which defaults to I18n.locale + # which defaults to +I18n.locale+. # # The word will be pluralized using rules defined for the locale # (you must define your own inflection rules for languages other than English). - # See ActiveSupport::Inflector.pluralize + # See ActiveSupport::Inflector.pluralize. # # pluralize(1, 'person') - # # => 1 person + # # => "1 person" # # pluralize(2, 'person') - # # => 2 people + # # => "2 people" # # pluralize(3, 'person', plural: 'users') - # # => 3 users + # # => "3 users" # # pluralize(0, 'person') - # # => 0 people + # # => "0 people" # # pluralize(2, 'Person', locale: :de) - # # => 2 Personen + # # => "2 Personen" # - # source://actionview//lib/action_view/helpers/text_helper.rb#234 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:297 def pluralize(count, singular, plural_arg = T.unsafe(nil), plural: T.unsafe(nil), locale: T.unsafe(nil)); end # Resets a cycle so that it starts from the first element the next time # it is called. Pass in +name+ to reset a named cycle. # - # # Alternate CSS classes for even and odd numbers... - # @items = [[1,2,3,4], [5,6,3], [3,4,5,6,7,4]] + # <%# Alternate CSS classes for even and odd numbers... %> + # <% @items = [[1,2,3,4], [5,6,3], [3,4,5,6,7,4]] %> # # <% @items.each do |item| %> # "> @@ -10565,10 +9985,10 @@ module ActionView::Helpers::TextHelper # <% end %> #
# - # source://actionview//lib/action_view/helpers/text_helper.rb#405 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:484 def reset_cycle(name = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/text_helper.rb#62 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:67 def safe_concat(string); end # Returns +text+ transformed into HTML using simple formatting rules. @@ -10583,7 +10003,8 @@ module ActionView::Helpers::TextHelper # # ==== Options # * :sanitize - If +false+, does not sanitize +text+. - # * :wrapper_tag - String representing the wrapper tag, defaults to "p" + # * :sanitize_options - Any extra options you want appended to the sanitize. + # * :wrapper_tag - String representing the wrapper tag, defaults to "p". # # ==== Examples # my_text = "Here is some basic text...\n...with a line break." @@ -10608,20 +10029,42 @@ module ActionView::Helpers::TextHelper # simple_format("Blinkable! It's true.", {}, sanitize: false) # # => "

Blinkable! It's true.

" # - # source://actionview//lib/action_view/helpers/text_helper.rb#306 + # simple_format("Continue", {}, { sanitize_options: { attributes: %w[target href] } }) + # # => "

Continue

" + # + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:383 def simple_format(text, html_options = T.unsafe(nil), options = T.unsafe(nil)); end - # Truncates a given +text+ after a given :length if +text+ is longer than :length - # (defaults to 30). The last characters will be replaced with the :omission (defaults to "...") - # for a total length not exceeding :length. + # Truncates +text+ if it is longer than a specified +:length+. If +text+ + # is truncated, an omission marker will be appended to the result for a + # total length not exceeding +:length+. + # + # You can also pass a block to render and append extra content after the + # omission marker when +text+ is truncated. However, this content _can_ + # cause the total length to exceed +:length+ characters. + # + # The result will be escaped unless escape: false is specified. + # In any case, the result will be marked HTML-safe. Care should be taken + # if +text+ might contain HTML tags or entities, because truncation could + # produce invalid HTML, such as unbalanced or incomplete tags. + # + # ==== Options + # + # [+:length+] + # The maximum number of characters that should be returned, excluding + # any extra content from the block. Defaults to 30. + # + # [+:omission+] + # The string to append after truncating. Defaults to "...". # - # Pass a :separator to truncate +text+ at a natural break. + # [+:separator+] + # A string or regexp used to find a breaking point at which to truncate. + # By default, truncation can occur at any character in +text+. # - # Pass a block if you want to show extra content when the text is truncated. + # [+:escape+] + # Whether to escape the result. Defaults to true. # - # The result is marked as HTML-safe, but it is escaped by default, unless :escape is - # +false+. Care should be taken if +text+ contains HTML tags or entities, because truncation - # may produce invalid HTML (such as unbalanced or incomplete tags). + # ==== Examples # # truncate("Once upon a time in a world far far away") # # => "Once upon a time in a world..." @@ -10642,9 +10085,9 @@ module ActionView::Helpers::TextHelper # # => "

Once upon a time in a wo..." # # truncate("Once upon a time in a world far far away") { link_to "Continue", "#" } - # # => "Once upon a time in a wo...Continue" + # # => "Once upon a time in a world...Continue" # - # source://actionview//lib/action_view/helpers/text_helper.rb#98 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:122 def truncate(text, options = T.unsafe(nil), &block); end # Wraps the +text+ into lines no longer than +line_width+ width. This method @@ -10652,90 +10095,83 @@ module ActionView::Helpers::TextHelper # (which is 80 by default). # # word_wrap('Once upon a time') - # # => Once upon a time + # # => "Once upon a time" # # word_wrap('Once upon a time, in a kingdom called Far Far Away, a king fell ill, and finding a successor to the throne turned out to be more trouble than anyone could have imagined...') - # # => Once upon a time, in a kingdom called Far Far Away, a king fell ill, and finding\na successor to the throne turned out to be more trouble than anyone could have\nimagined... + # # => "Once upon a time, in a kingdom called Far Far Away, a king fell ill, and finding\na successor to the throne turned out to be more trouble than anyone could have\nimagined..." # # word_wrap('Once upon a time', line_width: 8) - # # => Once\nupon a\ntime + # # => "Once\nupon a\ntime" # # word_wrap('Once upon a time', line_width: 1) - # # => Once\nupon\na\ntime + # # => "Once\nupon\na\ntime" # - # You can also specify a custom +break_sequence+ ("\n" by default) + # You can also specify a custom +break_sequence+ ("\n" by default): # # word_wrap('Once upon a time', line_width: 1, break_sequence: "\r\n") - # # => Once\r\nupon\r\na\r\ntime + # # => "Once\r\nupon\r\na\r\ntime" # - # source://actionview//lib/action_view/helpers/text_helper.rb#264 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:327 def word_wrap(text, line_width: T.unsafe(nil), break_sequence: T.unsafe(nil)); end private - # source://actionview//lib/action_view/helpers/text_helper.rb#468 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:547 def cut_excerpt_part(part_position, part, separator, options); end # The cycle helpers need to store the cycles in a place that is # guaranteed to be reset every time a page is rendered, so it # uses an instance variable of ActionView::Base. # - # source://actionview//lib/action_view/helpers/text_helper.rb#450 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:529 def get_cycle(name); end - # source://actionview//lib/action_view/helpers/text_helper.rb#455 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:534 def set_cycle(name, cycle_object); end - # source://actionview//lib/action_view/helpers/text_helper.rb#460 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:539 def split_paragraphs(text); end end -# source://actionview//lib/action_view/helpers/text_helper.rb#410 +# pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:489 class ActionView::Helpers::TextHelper::Cycle - # @return [Cycle] a new instance of Cycle - # - # source://actionview//lib/action_view/helpers/text_helper.rb#413 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:492 def initialize(first_value, *values); end - # source://actionview//lib/action_view/helpers/text_helper.rb#422 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:501 def current_value; end - # source://actionview//lib/action_view/helpers/text_helper.rb#418 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:497 def reset; end - # source://actionview//lib/action_view/helpers/text_helper.rb#426 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:505 def to_s; end - # Returns the value of attribute values. - # - # source://actionview//lib/action_view/helpers/text_helper.rb#411 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:490 def values; end private - # source://actionview//lib/action_view/helpers/text_helper.rb#433 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:512 def next_index; end - # source://actionview//lib/action_view/helpers/text_helper.rb#437 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:516 def previous_index; end - # source://actionview//lib/action_view/helpers/text_helper.rb#441 + # pkg:gem/actionview#lib/action_view/helpers/text_helper.rb:520 def step_index(n); end end -# source://actionview//lib/action_view/helpers/translation_helper.rb#9 +# = Action View Translation \Helpers +# +# pkg:gem/actionview#lib/action_view/helpers/translation_helper.rb:9 module ActionView::Helpers::TranslationHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper extend ::ActiveSupport::Concern - # Delegates to I18n.localize with no additional functionality. - # - # See https://www.rubydoc.info/gems/i18n/I18n/Backend/Base:localize - # for more information. - # - # source://actionview//lib/action_view/helpers/translation_helper.rb#116 + # pkg:gem/actionview#lib/action_view/helpers/translation_helper.rb:119 def l(object, **options); end # Delegates to I18n.localize with no additional functionality. @@ -10743,62 +10179,10 @@ module ActionView::Helpers::TranslationHelper # See https://www.rubydoc.info/gems/i18n/I18n/Backend/Base:localize # for more information. # - # source://actionview//lib/action_view/helpers/translation_helper.rb#116 + # pkg:gem/actionview#lib/action_view/helpers/translation_helper.rb:116 def localize(object, **options); end - # Delegates to I18n#translate but also performs three additional - # functions. - # - # First, it will ensure that any thrown +MissingTranslation+ messages will - # be rendered as inline spans that: - # - # * Have a translation-missing class applied - # * Contain the missing key as the value of the +title+ attribute - # * Have a titleized version of the last key segment as text - # - # For example, the value returned for the missing translation key - # "blog.post.title" will be: - # - # Title - # - # This allows for views to display rather reasonable strings while still - # giving developers a way to find missing translations. - # - # If you would prefer missing translations to raise an error, you can - # opt out of span-wrapping behavior globally by setting - # config.i18n.raise_on_missing_translations = true or - # individually by passing raise: true as an option to - # translate. - # - # Second, if the key starts with a period translate will scope - # the key by the current partial. Calling translate(".foo") from - # the people/index.html.erb template is equivalent to calling - # translate("people.index.foo"). This makes it less - # repetitive to translate many keys within the same partial and provides - # a convention to scope keys consistently. - # - # Third, the translation will be marked as html_safe if the key - # has the suffix "_html" or the last element of the key is "html". Calling - # translate("footer_html") or translate("footer.html") - # will return an HTML safe string that won't be escaped by other HTML - # helper methods. This naming convention helps to identify translations - # that include HTML tags so that you know what kind of output to expect - # when you call translate in a template and translators know which keys - # they can provide HTML values for. - # - # To access the translated text along with the fully resolved - # translation key, translate accepts a block: - # - # <%= translate(".relative_key") do |translation, resolved_key| %> - # <%= translation %> - # <% end %> - # - # This enables annotate translated text to be aware of the scope it was - # resolved against. - # - # source://actionview//lib/action_view/helpers/translation_helper.rb#73 + # pkg:gem/actionview#lib/action_view/helpers/translation_helper.rb:110 def t(key, **options); end # Delegates to I18n#translate but also performs three additional @@ -10853,42 +10237,45 @@ module ActionView::Helpers::TranslationHelper # This enables annotate translated text to be aware of the scope it was # resolved against. # - # source://actionview//lib/action_view/helpers/translation_helper.rb#73 + # pkg:gem/actionview#lib/action_view/helpers/translation_helper.rb:73 def translate(key, **options); end private - # source://actionview//lib/action_view/helpers/translation_helper.rb#142 + # pkg:gem/actionview#lib/action_view/helpers/translation_helper.rb:142 def missing_translation(key, options); end - # source://actionview//lib/action_view/helpers/translation_helper.rb#128 + # pkg:gem/actionview#lib/action_view/helpers/translation_helper.rb:128 def scope_key_by_partial(key); end class << self - # source://actionview//lib/action_view/helpers/translation_helper.rb#15 + # pkg:gem/actionview#lib/action_view/helpers/translation_helper.rb:15 def raise_on_missing_translations; end - # source://actionview//lib/action_view/helpers/translation_helper.rb#15 + # pkg:gem/actionview#lib/action_view/helpers/translation_helper.rb:15 def raise_on_missing_translations=(_arg0); end end end -# source://actionview//lib/action_view/helpers/translation_helper.rb#122 +# pkg:gem/actionview#lib/action_view/helpers/translation_helper.rb:122 ActionView::Helpers::TranslationHelper::MISSING_TRANSLATION = T.let(T.unsafe(nil), Integer) -# source://actionview//lib/action_view/helpers/translation_helper.rb#125 +# pkg:gem/actionview#lib/action_view/helpers/translation_helper.rb:125 ActionView::Helpers::TranslationHelper::NO_DEFAULT = T.let(T.unsafe(nil), Array) +# = Action View URL \Helpers +# # Provides a set of methods for making links and getting URLs that # depend on the routing subsystem (see ActionDispatch::Routing). # This allows you to use the same format for links in views # and controllers. # -# source://actionview//lib/action_view/helpers/url_helper.rb#15 +# pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:17 module ActionView::Helpers::UrlHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods @@ -10896,9 +10283,6 @@ module ActionView::Helpers::UrlHelper # Generates a form containing a single button that submits to the URL created # by the set of +options+. This is the safest method to ensure links that # cause changes to your data are not triggered by search bots or accelerators. - # If the HTML button does not work with your layout, you can also consider - # using the +link_to+ method with the :method modifier as described in - # the +link_to+ documentation. # # You can control the form and button behavior with +html_options+. Most # values in +html_options+ are passed through to the button element. For @@ -10909,8 +10293,13 @@ module ActionView::Helpers::UrlHelper # +:form_class+ option within +html_options+. It defaults to # "button_to" to allow styling of the form and its children. # - # The form submits a POST request by default. You can specify a different - # HTTP verb via the +:method+ option within +html_options+. + # The form submits a POST request by default if the object is not persisted; + # conversely, if the object is persisted, it will submit a PATCH request. + # To specify a different HTTP verb use the +:method+ option within +html_options+. + # + # If the HTML button generated from +button_to+ does not work with your layout, you can + # consider using the +link_to+ method with the +data-turbo-method+ + # attribute as described in the +link_to+ documentation. # # ==== Options # The +options+ hash accepts the same options as +url_for+. To generate a @@ -10977,44 +10366,61 @@ module ActionView::Helpers::UrlHelper # # # #

" # - # ==== Deprecated: Rails UJS Attributes + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:296 + def button_to(name = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:35 + def button_to_generates_button_tag; end + + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:35 + def button_to_generates_button_tag=(val); end + + # True if the current request URI was generated by the given +options+. + # + # ==== Examples + # Let's say we're in the http://www.example.com/shop/checkout?order=desc&page=1 action. # - # Prior to Rails 7, Rails shipped with a JavaScript library called @rails/ujs on by default. Following Rails 7, - # this library is no longer on by default. This library integrated with the following options: + # current_page?(action: 'process') + # # => false # - # * :remote - If set to true, will allow @rails/ujs to control the - # submit behavior. By default this behavior is an Ajax submit. + # current_page?(action: 'checkout') + # # => true # - # @rails/ujs also integrated with the following +:data+ options: + # current_page?(controller: 'library', action: 'checkout') + # # => false # - # * confirm: "question?" - This will allow @rails/ujs - # to prompt with the question specified (in this case, the - # resulting text would be question?). If the user accepts, the - # button is processed normally, otherwise no action is taken. - # * :disable_with - Value of this parameter will be - # used as the value for a disabled version of the submit - # button when the form is submitted. + # current_page?(controller: 'shop', action: 'checkout') + # # => true # - # ===== Rails UJS Examples + # current_page?(controller: 'shop', action: 'checkout', order: 'asc') + # # => false # - # <%= button_to "Create", { action: "create" }, remote: true, form: { "data-type" => "json" } %> - # # => "
- # # - # # - # #
" + # current_page?(controller: 'shop', action: 'checkout', order: 'desc', page: '1') + # # => true # - # source://actionview//lib/action_view/helpers/url_helper.rb#331 - def button_to(name = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end - - # source://actionview//lib/action_view/helpers/url_helper.rb#32 - def button_to_generates_button_tag; end - - # source://actionview//lib/action_view/helpers/url_helper.rb#32 - def button_to_generates_button_tag=(val); end - - # @return [Boolean] + # current_page?(controller: 'shop', action: 'checkout', order: 'desc', page: '2') + # # => false # - # source://actionview//lib/action_view/helpers/url_helper.rb#582 + # current_page?('http://www.example.com/shop/checkout') + # # => true + # + # current_page?('http://www.example.com/shop/checkout', check_parameters: true) + # # => false + # + # current_page?('/shop/checkout') + # # => true + # + # current_page?('http://www.example.com/shop/checkout?order=desc&page=1') + # # => true + # + # Let's say we're in the http://www.example.com/products action with method POST in case of invalid product. + # + # current_page?(controller: 'product', action: 'index') + # # => false + # + # We can also pass in the symbol arguments instead of strings. + # + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:550 def current_page?(options = T.unsafe(nil), check_parameters: T.unsafe(nil), **options_as_kwargs); end # Creates an anchor element of the given +name+ using a URL created by the set of +options+. @@ -11050,7 +10456,7 @@ module ActionView::Helpers::UrlHelper # ==== Examples # # Because it relies on +url_for+, +link_to+ supports both older-style controller/action/id arguments - # and newer RESTful routes. Current Rails style favors RESTful routes whenever possible, so base + # and newer RESTful routes. Current \Rails style favors RESTful routes whenever possible, so base # your application on resources and use # # link_to "Profile", profile_path(@profile) @@ -11127,43 +10533,29 @@ module ActionView::Helpers::UrlHelper # link_to "External link", "http://www.rubyonrails.org/", target: "_blank", rel: "nofollow" # # => External link # - # ==== Deprecated: Rails UJS Attributes + # ==== Turbo # - # Prior to Rails 7, Rails shipped with a JavaScript library called @rails/ujs on by default. Following Rails 7, - # this library is no longer on by default. This library integrated with the following options: + # Rails 7 ships with Turbo enabled by default. Turbo provides the following +:data+ options: # - # * method: symbol of HTTP verb - This modifier will dynamically - # create an HTML form and immediately submit the form for processing using - # the HTTP verb specified. Useful for having links perform a POST operation - # in dangerous actions like deleting a record (which search bots can follow - # while spidering your site). Supported verbs are :post, :delete, :patch, and :put. - # Note that if the user has JavaScript disabled, the request will fall back - # to using GET. If href: '#' is used and the user has JavaScript - # disabled clicking the link will have no effect. If you are relying on the - # POST behavior, you should check for it in your controller's action by using - # the request object's methods for post?, delete?, patch?, or put?. - # * remote: true - This will allow @rails/ujs - # to make an Ajax request to the URL in question instead of following - # the link. + # * turbo_method: symbol of HTTP verb - Performs a Turbo link visit + # with the given HTTP verb. Forms are recommended when performing non-+GET+ requests. + # Only use data-turbo-method where a form is not possible. # - # @rails/ujs also integrated with the following +:data+ options: + # * turbo_confirm: "question?" - Adds a confirmation dialog to the link with the + # given value. # - # * confirm: "question?" - This will allow @rails/ujs - # to prompt with the question specified (in this case, the - # resulting text would be question?). If the user accepts, the - # link is processed normally, otherwise no action is taken. - # * :disable_with - Value of this parameter will be used as the - # name for a disabled version of the link. + # {Consult the Turbo Handbook for more information on the options + # above.}[https://turbo.hotwired.dev/handbook/drive#performing-visits-with-a-different-method] # - # ===== Rails UJS Examples + # ===== \Examples # - # link_to "Remove Profile", profile_path(@profile), method: :delete - # # => Remove Profile + # link_to "Delete profile", @profile, data: { turbo_method: :delete } + # # => Delete profile # - # link_to "Visit Other Site", "http://www.rubyonrails.org/", data: { confirm: "Are you sure?" } - # # => Visit Other Site + # link_to "Visit Other Site", "https://rubyonrails.org/", data: { turbo_confirm: "Are you sure?" } + # # => Visit Other Site # - # source://actionview//lib/action_view/helpers/url_helper.rb#209 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:198 def link_to(name = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a link tag of the given +name+ using a URL created by the set of @@ -11186,7 +10578,7 @@ module ActionView::Helpers::UrlHelper # # If they are logged in... # # => my_username # - # source://actionview//lib/action_view/helpers/url_helper.rb#471 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:437 def link_to_if(condition, name, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a link tag of the given +name+ using a URL created by the set of @@ -11210,7 +10602,7 @@ module ActionView::Helpers::UrlHelper # # If not... # # => Reply # - # source://actionview//lib/action_view/helpers/url_helper.rb#448 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:414 def link_to_unless(condition, name, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a link tag of the given +name+ using a URL created by the set of @@ -11252,7 +10644,7 @@ module ActionView::Helpers::UrlHelper # end # %> # - # source://actionview//lib/action_view/helpers/url_helper.rb#424 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:390 def link_to_unless_current(name, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a mailto link tag to the specified +email_address+, which is @@ -11270,7 +10662,7 @@ module ActionView::Helpers::UrlHelper # * :reply_to - Preset the +Reply-To+ field of the email. # # ==== Obfuscation - # Prior to Rails 4.0, +mail_to+ provided options for encoding the address + # Prior to \Rails 4.0, +mail_to+ provided options for encoding the address # in order to hinder email harvesters. To take advantage of these options, # install the +actionview-encoded_mail_to+ gem. # @@ -11294,7 +10686,7 @@ module ActionView::Helpers::UrlHelper # Email me: me@domain.com # # - # source://actionview//lib/action_view/helpers/url_helper.rb#521 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:487 def mail_to(email_address, name = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a TEL anchor link tag to the specified +phone_number+. When the @@ -11333,7 +10725,7 @@ module ActionView::Helpers::UrlHelper # Phone me: # # - # source://actionview//lib/action_view/helpers/url_helper.rb#716 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:671 def phone_to(phone_number, name = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates an SMS anchor link tag to the specified +phone_number+. When the @@ -11377,45 +10769,41 @@ module ActionView::Helpers::UrlHelper # Text me: # # - # source://actionview//lib/action_view/helpers/url_helper.rb#665 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:620 def sms_to(phone_number, name = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Basic implementation of url_for to allow use helpers without routes existence # - # source://actionview//lib/action_view/helpers/url_helper.rb#35 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:38 def url_for(options = T.unsafe(nil)); end private - # source://actionview//lib/action_view/helpers/url_helper.rb#47 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:50 def _back_url; end - # source://actionview//lib/action_view/helpers/url_helper.rb#52 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:55 def _filtered_referrer; end - # source://actionview//lib/action_view/helpers/url_helper.rb#759 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:714 def add_method_to_attributes!(html_options, method); end - # source://actionview//lib/action_view/helpers/url_helper.rb#730 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:685 def convert_options_to_data_attributes(options, html_options); end - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/url_helper.rb#753 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:708 def link_to_remote_options?(options); end - # source://actionview//lib/action_view/helpers/url_helper.rb#770 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:725 def method_for_options(options); end - # @return [Boolean] - # - # source://actionview//lib/action_view/helpers/url_helper.rb#788 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:743 def method_not_get_method?(method); end - # source://actionview//lib/action_view/helpers/url_helper.rb#807 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:762 def method_tag(method); end - # source://actionview//lib/action_view/helpers/url_helper.rb#853 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:808 def remove_trailing_slash!(url_string); end # Returns an array of hashes each containing :name and :value keys @@ -11435,20 +10823,20 @@ module ActionView::Helpers::UrlHelper # to_form_params({ name: 'Denmark' }, 'country') # # => [{name: 'country[name]', value: 'Denmark'}] # - # source://actionview//lib/action_view/helpers/url_helper.rb#827 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:782 def to_form_params(attribute, namespace = T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/url_helper.rb#793 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:748 def token_tag(token = T.unsafe(nil), form_options: T.unsafe(nil)); end - # source://actionview//lib/action_view/helpers/url_helper.rb#745 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:700 def url_target(name, options); end class << self - # source://actionview//lib/action_view/helpers/url_helper.rb#32 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:35 def button_to_generates_button_tag; end - # source://actionview//lib/action_view/helpers/url_helper.rb#32 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:35 def button_to_generates_button_tag=(val); end end end @@ -11459,47 +10847,50 @@ end # (link_to_unless_current, for instance), which must be provided # as a method called #request on the context. # -# source://actionview//lib/action_view/helpers/url_helper.rb#21 +# pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:23 ActionView::Helpers::UrlHelper::BUTTON_TAG_METHOD_VERBS = T.let(T.unsafe(nil), Array) -# source://actionview//lib/action_view/helpers/url_helper.rb#26 +# pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:29 module ActionView::Helpers::UrlHelper::ClassMethods - # source://actionview//lib/action_view/helpers/url_helper.rb#27 + # pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:30 def _url_for_modules; end end -# source://actionview//lib/action_view/helpers/url_helper.rb#780 +# pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:503 +ActionView::Helpers::UrlHelper::RFC2396_PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) + +# pkg:gem/actionview#lib/action_view/helpers/url_helper.rb:735 ActionView::Helpers::UrlHelper::STRINGIFIED_COMMON_METHODS = T.let(T.unsafe(nil), Hash) # This is a class to fix I18n global state. Whenever you provide I18n.locale during a request, # it will trigger the lookup_context and consequently expire the cache. # -# source://actionview//lib/action_view/rendering.rb#8 +# pkg:gem/actionview#lib/action_view/rendering.rb:8 class ActionView::I18nProxy < ::I18n::Config - # @return [I18nProxy] a new instance of I18nProxy - # - # source://actionview//lib/action_view/rendering.rb#11 + # pkg:gem/actionview#lib/action_view/rendering.rb:11 def initialize(original_config, lookup_context); end - # source://actionview//lib/action_view/rendering.rb#16 + # pkg:gem/actionview#lib/action_view/rendering.rb:17 def locale; end - # source://actionview//lib/action_view/rendering.rb#20 + # pkg:gem/actionview#lib/action_view/rendering.rb:21 def locale=(value); end - # source://actionview//lib/action_view/rendering.rb#9 + # pkg:gem/actionview#lib/action_view/rendering.rb:9 def lookup_context; end - # source://actionview//lib/action_view/rendering.rb#9 + # pkg:gem/actionview#lib/action_view/rendering.rb:9 def original_config; end end +# = Action View \Layouts +# # Layouts reverse the common pattern of including shared headers and footers in many templates to isolate changes in # repeated setups. The inclusion pattern has pages that look like this: # -# <%= render "shared/header" %> +# <%= render "application/header" %> # Hello World -# <%= render "shared/footer" %> +# <%= render "application/footer" %> # # This approach is a decent way of keeping common structures isolated from the changing content, but it's verbose # and if you ever want to change the structure of these two includes, you'll have to change all the templates. @@ -11640,7 +11031,7 @@ end # The template will be looked always in app/views/layouts/ folder. But you can point # layouts folder direct also. layout "layouts/demo" is the same as layout "demo". # -# Setting the layout to +nil+ forces it to be looked up in the filesystem and fallbacks to the parent behavior if none exists. +# Setting the layout to +nil+ forces it to be looked up in the filesystem and falls back to the parent behavior if none exists. # Setting it to +nil+ is useful to re-enable template lookup overriding a previous configuration set in the parent: # # class ApplicationController < ActionController::Base @@ -11652,7 +11043,7 @@ end # end # # class CommentsController < ApplicationController -# # Will search for "comments" layout and fallback "application" layout +# # Will search for "comments" layout and fall back to "application" layout # layout nil # end # @@ -11691,7 +11082,7 @@ end # # This will override the controller-wide "weblog_standard" layout, and will render the help action with the "help" layout instead. # -# source://actionview//lib/action_view/layouts.rb#203 +# pkg:gem/actionview#lib/action_view/layouts.rb:205 module ActionView::Layouts extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -11703,15 +11094,13 @@ module ActionView::Layouts mixes_in_class_methods ::ActionView::Rendering::ClassMethods mixes_in_class_methods ::ActionView::Layouts::ClassMethods - # source://actionview//lib/action_view/layouts.rb#361 + # pkg:gem/actionview#lib/action_view/layouts.rb:361 def initialize(*_arg0); end - # source://actionview//lib/action_view/layouts.rb#215 - def _layout_conditions(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/layouts.rb#350 + # pkg:gem/actionview#lib/action_view/layouts.rb:350 def _normalize_options(options); end + # pkg:gem/actionview#lib/action_view/layouts.rb:359 def action_has_layout=(_arg0); end # Controls whether an action should be rendered using a layout. @@ -11721,16 +11110,12 @@ module ActionView::Layouts # for that action or set the action_has_layout attribute # to false before rendering. # - # @return [Boolean] - # - # source://actionview//lib/action_view/layouts.rb#372 + # pkg:gem/actionview#lib/action_view/layouts.rb:372 def action_has_layout?; end private - # @return [Boolean] - # - # source://actionview//lib/action_view/layouts.rb#377 + # pkg:gem/actionview#lib/action_view/layouts.rb:377 def _conditional_layout?; end # Returns the default layout for this controller. @@ -11744,17 +11129,15 @@ module ActionView::Layouts # ==== Returns # * template - The template object for the default layout (or +nil+) # - # source://actionview//lib/action_view/layouts.rb#415 - def _default_layout(lookup_context, formats, require_layout = T.unsafe(nil)); end + # pkg:gem/actionview#lib/action_view/layouts.rb:415 + def _default_layout(lookup_context, formats, keys, require_layout = T.unsafe(nil)); end - # @return [Boolean] - # - # source://actionview//lib/action_view/layouts.rb#430 + # pkg:gem/actionview#lib/action_view/layouts.rb:430 def _include_layout?(options); end # This will be overwritten by _write_layout_method # - # source://actionview//lib/action_view/layouts.rb#382 + # pkg:gem/actionview#lib/action_view/layouts.rb:382 def _layout(*_arg0); end # Determine the layout for a given name, taking into account the name type. @@ -11762,10 +11145,10 @@ module ActionView::Layouts # ==== Parameters # * name - The name of the template # - # source://actionview//lib/action_view/layouts.rb#388 + # pkg:gem/actionview#lib/action_view/layouts.rb:388 def _layout_for_option(name); end - # source://actionview//lib/action_view/layouts.rb#401 + # pkg:gem/actionview#lib/action_view/layouts.rb:401 def _normalize_layout(value); end module GeneratedClassMethods @@ -11777,20 +11160,23 @@ module ActionView::Layouts def _layout_conditions?; end end - module GeneratedInstanceMethods; end + module GeneratedInstanceMethods + def _layout_conditions; end + def _layout_conditions?; end + end end -# source://actionview//lib/action_view/layouts.rb#217 +# pkg:gem/actionview#lib/action_view/layouts.rb:217 module ActionView::Layouts::ClassMethods # Creates a _layout method to be called by _default_layout . # # If a layout is not explicitly mentioned then look for a layout with the controller's name. # if nothing is found then try same procedure to find super class's layout. # - # source://actionview//lib/action_view/layouts.rb#283 + # pkg:gem/actionview#lib/action_view/layouts.rb:283 def _write_layout_method; end - # source://actionview//lib/action_view/layouts.rb#218 + # pkg:gem/actionview#lib/action_view/layouts.rb:218 def inherited(klass); end # Specify the layout to use for this class. @@ -11815,7 +11201,7 @@ module ActionView::Layouts::ClassMethods # * +:only+ - A list of actions to apply this layout to. # * +:except+ - Apply this layout to all actions but this one. # - # source://actionview//lib/action_view/layouts.rb#269 + # pkg:gem/actionview#lib/action_view/layouts.rb:269 def layout(layout, conditions = T.unsafe(nil)); end private @@ -11826,14 +11212,14 @@ module ActionView::Layouts::ClassMethods # ==== Returns # * String - A template name # - # source://actionview//lib/action_view/layouts.rb#345 + # pkg:gem/actionview#lib/action_view/layouts.rb:345 def _implied_layout_name; end end # This module is mixed in if layout conditions are provided. This means # that if no layout conditions are used, this method is not used # -# source://actionview//lib/action_view/layouts.rb#225 +# pkg:gem/actionview#lib/action_view/layouts.rb:225 module ActionView::Layouts::ClassMethods::LayoutConditions private @@ -11844,63 +11230,79 @@ module ActionView::Layouts::ClassMethods::LayoutConditions # ==== Returns # * Boolean - True if the action has a layout definition, false otherwise. # - # @return [Boolean] - # - # source://actionview//lib/action_view/layouts.rb#233 + # pkg:gem/actionview#lib/action_view/layouts.rb:233 def _conditional_layout?; end end # = Action View Log Subscriber # -# Provides functionality so that Rails can output logs from Action View. +# Provides functionality so that \Rails can output logs from Action View. # -# source://actionview//lib/action_view/log_subscriber.rb#9 +# pkg:gem/actionview#lib/action_view/log_subscriber.rb:9 class ActionView::LogSubscriber < ::ActiveSupport::LogSubscriber - # @return [LogSubscriber] a new instance of LogSubscriber - # - # source://actionview//lib/action_view/log_subscriber.rb#12 - def initialize; end + include ::ActionView::LogSubscriber::Utils - # source://actionview//lib/action_view/log_subscriber.rb#59 - def logger; end + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:12 + def initialize; end - # source://actionview//lib/action_view/log_subscriber.rb#42 + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:45 def render_collection(event); end - # source://actionview//lib/action_view/log_subscriber.rb#35 + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:37 def render_layout(event); end - # source://actionview//lib/action_view/log_subscriber.rb#25 + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:26 def render_partial(event); end - # source://actionview//lib/action_view/log_subscriber.rb#17 + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:17 def render_template(event); end - # source://actionview//lib/action_view/log_subscriber.rb#53 - def start(name, id, payload); end - private - # source://actionview//lib/action_view/log_subscriber.rb#83 + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:121 def cache_message(payload); end - # source://actionview//lib/action_view/log_subscriber.rb#65 - def from_rails_root(string); end + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:113 + def render_count(payload); end - # source://actionview//lib/action_view/log_subscriber.rb#92 - def log_rendering_start(payload, name); end + class << self + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:105 + def attach_to(*_arg0); end - # source://actionview//lib/action_view/log_subscriber.rb#71 - def rails_root; end + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:24 + def log_levels; end + end +end - # source://actionview//lib/action_view/log_subscriber.rb#75 - def render_count(payload); end +# pkg:gem/actionview#lib/action_view/log_subscriber.rb:76 +class ActionView::LogSubscriber::Start + include ::ActionView::LogSubscriber::Utils + + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:97 + def finish(name, id, payload); end + + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:100 + def silenced?(_); end + + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:79 + def start(name, id, payload); end end -# source://actionview//lib/action_view/log_subscriber.rb#64 -ActionView::LogSubscriber::EMPTY = T.let(T.unsafe(nil), String) +# pkg:gem/actionview#lib/action_view/log_subscriber.rb:57 +module ActionView::LogSubscriber::Utils + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:58 + def logger; end + + private + + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:63 + def from_rails_root(string); end + + # pkg:gem/actionview#lib/action_view/log_subscriber.rb:69 + def rails_root; end +end -# source://actionview//lib/action_view/log_subscriber.rb#10 +# pkg:gem/actionview#lib/action_view/log_subscriber.rb:10 ActionView::LogSubscriber::VIEWS_PATTERN = T.let(T.unsafe(nil), Regexp) # = Action View Lookup Context @@ -11911,210 +11313,191 @@ ActionView::LogSubscriber::VIEWS_PATTERN = T.let(T.unsafe(nil), Regexp) # view paths, used in the resolver cache lookup. Since this key is generated # only once during the request, it speeds up all cache accesses. # -# source://actionview//lib/action_view/lookup_context.rb#15 +# pkg:gem/actionview#lib/action_view/lookup_context.rb:15 class ActionView::LookupContext include ::ActionView::LookupContext::Accessors include ::ActionView::LookupContext::DetailsCache include ::ActionView::LookupContext::ViewPaths - # @return [LookupContext] a new instance of LookupContext - # - # source://actionview//lib/action_view/lookup_context.rb#216 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:232 def initialize(view_paths, details = T.unsafe(nil), prefixes = T.unsafe(nil)); end - # source://actionview//lib/action_view/lookup_context.rb#226 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:242 def digest_cache; end # Override formats= to expand ["*/*"] values and automatically # add :html as fallback to :js. # - # source://actionview//lib/action_view/lookup_context.rb#247 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:263 def formats=(values); end # Override locale to return a symbol instead of array. # - # source://actionview//lib/action_view/lookup_context.rb#267 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:283 def locale; end # Overload locale= to also set the I18n.locale. If the current I18n.config object responds # to original_config, it means that it has a copy of the original I18n configuration and it's # acting as proxy, which we need to skip. # - # source://actionview//lib/action_view/lookup_context.rb#274 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:290 def locale=(value); end - # source://actionview//lib/action_view/lookup_context.rb#16 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:16 def prefixes; end - # source://actionview//lib/action_view/lookup_context.rb#16 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:16 def prefixes=(_arg0); end - # source://actionview//lib/action_view/lookup_context.rb#16 - def rendered_format; end - - # source://actionview//lib/action_view/lookup_context.rb#16 - def rendered_format=(_arg0); end - - # source://actionview//lib/action_view/lookup_context.rb#230 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:246 def with_prepended_formats(formats); end private - # source://actionview//lib/action_view/lookup_context.rb#237 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:253 def initialize_details(target, details); end class << self - # source://actionview//lib/action_view/lookup_context.rb#21 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:21 def register_detail(name, &block); end - # source://actionview//lib/action_view/lookup_context.rb#18 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:18 def registered_details; end - # source://actionview//lib/action_view/lookup_context.rb#18 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:18 def registered_details=(_arg0); end end end # Holds accessors for the registered details. # -# source://actionview//lib/action_view/lookup_context.rb#39 +# pkg:gem/actionview#lib/action_view/lookup_context.rb:39 module ActionView::LookupContext::Accessors - # source://actionview//lib/action_view/lookup_context.rb#50 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:25 def default_formats; end - # source://actionview//lib/action_view/lookup_context.rb#52 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:25 def default_handlers; end - # source://actionview//lib/action_view/lookup_context.rb#43 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:25 def default_locale; end - # source://actionview//lib/action_view/lookup_context.rb#51 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:25 def default_variants; end - # source://actionview//lib/action_view/lookup_context.rb#27 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:26 def formats; end - # source://actionview//lib/action_view/lookup_context.rb#31 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:26 def formats=(value); end - # source://actionview//lib/action_view/lookup_context.rb#27 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:26 def handlers; end - # source://actionview//lib/action_view/lookup_context.rb#31 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:26 def handlers=(value); end - # source://actionview//lib/action_view/lookup_context.rb#27 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:26 def locale; end - # source://actionview//lib/action_view/lookup_context.rb#31 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:26 def locale=(value); end - # source://actionview//lib/action_view/lookup_context.rb#27 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:26 def variants; end - # source://actionview//lib/action_view/lookup_context.rb#31 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:26 def variants=(value); end end -# source://actionview//lib/action_view/lookup_context.rb#40 +# pkg:gem/actionview#lib/action_view/lookup_context.rb:40 ActionView::LookupContext::Accessors::DEFAULT_PROCS = T.let(T.unsafe(nil), Hash) # Add caching behavior on top of Details. # -# source://actionview//lib/action_view/lookup_context.rb#94 +# pkg:gem/actionview#lib/action_view/lookup_context.rb:98 module ActionView::LookupContext::DetailsCache - # Returns the value of attribute cache. - # - # source://actionview//lib/action_view/lookup_context.rb#95 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:99 def cache; end - # Sets the attribute cache - # - # @param value the value to set the attribute cache to. - # - # source://actionview//lib/action_view/lookup_context.rb#95 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:99 def cache=(_arg0); end # Calculate the details key. Remove the handlers from calculation to improve performance # since the user cannot modify it explicitly. # - # source://actionview//lib/action_view/lookup_context.rb#99 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:103 def details_key; end # Temporary skip passing the details_key forward. # - # source://actionview//lib/action_view/lookup_context.rb#104 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:108 def disable_cache; end private - # source://actionview//lib/action_view/lookup_context.rb#112 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:116 def _set_detail(key, value); end end -# source://actionview//lib/action_view/lookup_context.rb#54 +# pkg:gem/actionview#lib/action_view/lookup_context.rb:54 class ActionView::LookupContext::DetailsKey + # pkg:gem/actionview#lib/action_view/lookup_context.rb:55 def eql?(_arg0); end class << self - # source://actionview//lib/action_view/lookup_context.rb#73 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:77 def clear; end - # source://actionview//lib/action_view/lookup_context.rb#65 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:65 def details_cache_key(details); end - # source://actionview//lib/action_view/lookup_context.rb#61 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:61 def digest_cache(details); end - # source://actionview//lib/action_view/lookup_context.rb#82 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:86 def digest_caches; end - # source://actionview//lib/action_view/lookup_context.rb#86 - def view_context_class(klass); end + # pkg:gem/actionview#lib/action_view/lookup_context.rb:90 + def view_context_class; end end end # Helpers related to template lookup using the lookup context information. # -# source://actionview//lib/action_view/lookup_context.rb#121 +# pkg:gem/actionview#lib/action_view/lookup_context.rb:125 module ActionView::LookupContext::ViewPaths - # @return [Boolean] - # - # source://actionview//lib/action_view/lookup_context.rb#144 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:148 def any?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end - # @return [Boolean] - # - # source://actionview//lib/action_view/lookup_context.rb#144 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:153 def any_templates?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end - # @return [Boolean] - # - # source://actionview//lib/action_view/lookup_context.rb#137 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:155 + def append_view_paths(paths); end + + # pkg:gem/actionview#lib/action_view/lookup_context.rb:141 def exists?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), **options); end - # source://actionview//lib/action_view/lookup_context.rb#124 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:128 def find(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actionview//lib/action_view/lookup_context.rb#131 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:135 def find_all(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actionview//lib/action_view/lookup_context.rb#124 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:133 def find_template(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end - # Returns the value of attribute html_fallback_for_js. - # - # source://actionview//lib/action_view/lookup_context.rb#122 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:126 def html_fallback_for_js; end - # @return [Boolean] - # - # source://actionview//lib/action_view/lookup_context.rb#137 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:159 + def prepend_view_paths(paths); end + + # pkg:gem/actionview#lib/action_view/lookup_context.rb:146 def template_exists?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), **options); end - # Returns the value of attribute view_paths. - # - # source://actionview//lib/action_view/lookup_context.rb#122 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:126 def view_paths; end private @@ -12122,30 +11505,28 @@ module ActionView::LookupContext::ViewPaths # Whenever setting view paths, makes a copy so that we can manipulate them in # instance objects as we wish. # - # source://actionview//lib/action_view/lookup_context.rb#154 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:166 def build_view_paths(paths); end # Compute details hash and key according to user options (e.g. passed from #render). # - # source://actionview//lib/action_view/lookup_context.rb#159 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:175 def detail_args_for(options); end - # source://actionview//lib/action_view/lookup_context.rb#172 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:188 def detail_args_for_any; end # Fix when prefix is specified as part of the template name # - # source://actionview//lib/action_view/lookup_context.rb#193 + # pkg:gem/actionview#lib/action_view/lookup_context.rb:209 def normalize_name(name, prefixes); end end -# source://actionview//lib/action_view/template/error.rb#29 +# pkg:gem/actionview#lib/action_view/template/error.rb:41 class ActionView::MissingTemplate < ::ActionView::ActionViewError include ::DidYouMean::Correctable - # @return [MissingTemplate] a new instance of MissingTemplate - # - # source://actionview//lib/action_view/template/error.rb#32 + # pkg:gem/actionview#lib/action_view/template/error.rb:44 def initialize(paths, path, prefixes, partial, details, *_arg5); end # Apps may have thousands of candidate templates so we attempt to @@ -12153,114 +11534,99 @@ class ActionView::MissingTemplate < ::ActionView::ActionViewError # First we split templates into prefixes and basenames, so that those can # be matched separately. # - # source://actionview//lib/action_view/template/error.rb#92 + # pkg:gem/actionview#lib/action_view/template/error.rb:104 def corrections; end - # Returns the value of attribute partial. - # - # source://actionview//lib/action_view/template/error.rb#30 + # pkg:gem/actionview#lib/action_view/template/error.rb:42 def partial; end - # Returns the value of attribute path. - # - # source://actionview//lib/action_view/template/error.rb#30 + # pkg:gem/actionview#lib/action_view/template/error.rb:42 def path; end - # Returns the value of attribute paths. - # - # source://actionview//lib/action_view/template/error.rb#30 + # pkg:gem/actionview#lib/action_view/template/error.rb:42 def paths; end - # Returns the value of attribute prefixes. - # - # source://actionview//lib/action_view/template/error.rb#30 + # pkg:gem/actionview#lib/action_view/template/error.rb:42 def prefixes; end end -# source://actionview//lib/action_view/template/error.rb#59 +# pkg:gem/actionview#lib/action_view/template/error.rb:71 class ActionView::MissingTemplate::Results - # @return [Results] a new instance of Results - # - # source://actionview//lib/action_view/template/error.rb#62 + # pkg:gem/actionview#lib/action_view/template/error.rb:74 def initialize(size); end - # source://actionview//lib/action_view/template/error.rb#79 + # pkg:gem/actionview#lib/action_view/template/error.rb:91 def add(path, score); end - # @return [Boolean] - # - # source://actionview//lib/action_view/template/error.rb#71 + # pkg:gem/actionview#lib/action_view/template/error.rb:83 def should_record?(score); end - # source://actionview//lib/action_view/template/error.rb#67 + # pkg:gem/actionview#lib/action_view/template/error.rb:79 def to_a; end end -# source://actionview//lib/action_view/template/error.rb#60 +# pkg:gem/actionview#lib/action_view/template/error.rb:72 class ActionView::MissingTemplate::Results::Result < ::Struct - # Returns the value of attribute path - # - # @return [Object] the current value of path + # pkg:gem/actionview#lib/action_view/template/error.rb:72 def path; end - # Sets the attribute path - # - # @param value [Object] the value to set the attribute path to. - # @return [Object] the newly set value + # pkg:gem/actionview#lib/action_view/template/error.rb:72 def path=(_); end - # Returns the value of attribute score - # - # @return [Object] the current value of score + # pkg:gem/actionview#lib/action_view/template/error.rb:72 def score; end - # Sets the attribute score - # - # @param value [Object] the value to set the attribute score to. - # @return [Object] the newly set value + # pkg:gem/actionview#lib/action_view/template/error.rb:72 def score=(_); end class << self + # pkg:gem/actionview#lib/action_view/template/error.rb:72 def [](*_arg0); end + + # pkg:gem/actionview#lib/action_view/template/error.rb:72 def inspect; end + + # pkg:gem/actionview#lib/action_view/template/error.rb:72 def keyword_init?; end + + # pkg:gem/actionview#lib/action_view/template/error.rb:72 def members; end + + # pkg:gem/actionview#lib/action_view/template/error.rb:72 def new(*_arg0); end end end -# source://actionview//lib/action_view/model_naming.rb#4 +# pkg:gem/actionview#lib/action_view/model_naming.rb:4 module ActionView::ModelNaming # Converts the given object to an Active Model compliant one. # - # source://actionview//lib/action_view/model_naming.rb#6 + # pkg:gem/actionview#lib/action_view/model_naming.rb:6 def convert_to_model(object); end - # source://actionview//lib/action_view/model_naming.rb#10 + # pkg:gem/actionview#lib/action_view/model_naming.rb:10 def model_name_from_record_or_class(record_or_class); end end -# source://actionview//lib/action_view/renderer/object_renderer.rb#4 +# pkg:gem/actionview#lib/action_view/renderer/object_renderer.rb:4 class ActionView::ObjectRenderer < ::ActionView::PartialRenderer include ::ActionView::AbstractRenderer::ObjectRendering - # @return [ObjectRenderer] a new instance of ObjectRenderer - # - # source://actionview//lib/action_view/renderer/object_renderer.rb#7 + # pkg:gem/actionview#lib/action_view/renderer/object_renderer.rb:7 def initialize(lookup_context, options); end - # source://actionview//lib/action_view/renderer/object_renderer.rb#19 + # pkg:gem/actionview#lib/action_view/renderer/object_renderer.rb:19 def render_object_derive_partial(object, context, block); end - # source://actionview//lib/action_view/renderer/object_renderer.rb#13 + # pkg:gem/actionview#lib/action_view/renderer/object_renderer.rb:13 def render_object_with_partial(object, partial, context, block); end private - # source://actionview//lib/action_view/renderer/object_renderer.rb#29 + # pkg:gem/actionview#lib/action_view/renderer/object_renderer.rb:29 def render_partial_template(view, locals, template, layout, block); end - # source://actionview//lib/action_view/renderer/object_renderer.rb#25 + # pkg:gem/actionview#lib/action_view/renderer/object_renderer.rb:25 def template_keys(path); end end @@ -12279,91 +11645,130 @@ end # sbuf << 5 # puts sbuf # => "hello\u0005" # -# source://actionview//lib/action_view/buffers.rb#21 -class ActionView::OutputBuffer < ::ActiveSupport::SafeBuffer - # @return [OutputBuffer] a new instance of OutputBuffer - # - # source://actionview//lib/action_view/buffers.rb#22 - def initialize(*_arg0); end +# pkg:gem/actionview#lib/action_view/buffers.rb:21 +class ActionView::OutputBuffer + # pkg:gem/actionview#lib/action_view/buffers.rb:22 + def initialize(buffer = T.unsafe(nil)); end - # source://actionview//lib/action_view/buffers.rb#27 + # pkg:gem/actionview#lib/action_view/buffers.rb:42 def <<(value); end - # source://actionview//lib/action_view/buffers.rb#27 + # pkg:gem/actionview#lib/action_view/buffers.rb:81 + def ==(other); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:54 def append=(value); end - # source://activesupport/7.0.8.7/lib/active_support/core_ext/string/output_safety.rb#195 + # pkg:gem/actionview#lib/action_view/buffers.rb:27 + def blank?(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:72 + def capture(*args); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:53 + def concat(value); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:27 + def empty?(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:27 + def encode!(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:27 + def encoding(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:27 + def force_encoding(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:32 + def html_safe; end + + # pkg:gem/actionview#lib/action_view/buffers.rb:38 + def html_safe?; end + + # pkg:gem/actionview#lib/action_view/buffers.rb:27 + def length(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:85 + def raw; end + + # pkg:gem/actionview#lib/action_view/buffers.rb:89 + def raw_buffer; end + + # pkg:gem/actionview#lib/action_view/buffers.rb:60 def safe_append=(value); end - # source://actionview//lib/action_view/buffers.rb#33 + # pkg:gem/actionview#lib/action_view/buffers.rb:56 + def safe_concat(value); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:62 def safe_expr_append=(val); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:29 + def to_s; end + + # pkg:gem/actionview#lib/action_view/buffers.rb:34 + def to_str; end + + private + + # pkg:gem/actionview#lib/action_view/buffers.rb:68 + def initialize_copy(other); end end -# source://actionview//lib/action_view/flows.rb#6 +# pkg:gem/actionview#lib/action_view/flows.rb:6 class ActionView::OutputFlow - # @return [OutputFlow] a new instance of OutputFlow - # - # source://actionview//lib/action_view/flows.rb#9 + # pkg:gem/actionview#lib/action_view/flows.rb:9 def initialize; end # Called by content_for # - # source://actionview//lib/action_view/flows.rb#24 + # pkg:gem/actionview#lib/action_view/flows.rb:24 def append(key, value); end - # Called by content_for - # - # source://actionview//lib/action_view/flows.rb#24 + # pkg:gem/actionview#lib/action_view/flows.rb:27 def append!(key, value); end - # Returns the value of attribute content. - # - # source://actionview//lib/action_view/flows.rb#7 + # pkg:gem/actionview#lib/action_view/flows.rb:7 def content; end # Called by _layout_for to read stored values. # - # source://actionview//lib/action_view/flows.rb#14 + # pkg:gem/actionview#lib/action_view/flows.rb:14 def get(key); end # Called by each renderer object to set the layout contents. # - # source://actionview//lib/action_view/flows.rb#19 + # pkg:gem/actionview#lib/action_view/flows.rb:19 def set(key, value); end end -# source://actionview//lib/action_view/renderer/collection_renderer.rb#6 +# pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:6 class ActionView::PartialIteration - # @return [PartialIteration] a new instance of PartialIteration - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#13 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:13 def initialize(size); end # Check if this is the first iteration of the partial. # - # @return [Boolean] - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#19 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:19 def first?; end # The current iteration of the partial. # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#11 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:11 def index; end - # source://actionview//lib/action_view/renderer/collection_renderer.rb#28 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:28 def iterate!; end # Check if this is the last iteration of the partial. # - # @return [Boolean] - # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#24 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:24 def last?; end # The number of iterations that will be done by the partial. # - # source://actionview//lib/action_view/renderer/collection_renderer.rb#8 + # pkg:gem/actionview#lib/action_view/renderer/collection_renderer.rb:8 def size; end end @@ -12458,7 +11863,7 @@ end # # <%= render partial: "accounts/account", locals: { account: @account} %> # <%= render partial: @account %> # -# # @posts is an array of Post instances, so every post record returns 'posts/post' on +to_partial_path+, +# # @posts is an array of Post instances, so every post record returns 'posts/post' on #to_partial_path, # # that's why we can replace: # # <%= render partial: "posts/post", collection: @posts %> # <%= render partial: @posts %> @@ -12478,7 +11883,7 @@ end # # <%= render partial: "accounts/account", locals: { account: @account} %> # <%= render @account %> # -# # @posts is an array of Post instances, so every post record returns 'posts/post' on +to_partial_path+, +# # @posts is an array of Post instances, so every post record returns 'posts/post' on #to_partial_path, # # that's why we can replace: # # <%= render partial: "posts/post", collection: @posts %> # <%= render @posts %> @@ -12582,44 +11987,65 @@ end # # As you can see, the :locals hash is shared between both the partial and its layout. # -# source://actionview//lib/action_view/renderer/partial_renderer.rb#220 +# pkg:gem/actionview#lib/action_view/renderer/partial_renderer.rb:220 class ActionView::PartialRenderer < ::ActionView::AbstractRenderer include ::ActionView::CollectionCaching - # @return [PartialRenderer] a new instance of PartialRenderer - # - # source://actionview//lib/action_view/renderer/partial_renderer.rb#223 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer.rb:223 def initialize(lookup_context, options); end - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer.rb:221 def collection_cache; end - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer.rb:221 def collection_cache=(val); end - # source://actionview//lib/action_view/renderer/partial_renderer.rb#230 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer.rb:230 def render(partial, context, block); end private - # source://actionview//lib/action_view/renderer/partial_renderer.rb#261 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer.rb:262 def find_template(path, locals); end - # source://actionview//lib/action_view/renderer/partial_renderer.rb#245 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer.rb:245 def render_partial_template(view, locals, template, layout, block); end - # source://actionview//lib/action_view/renderer/partial_renderer.rb#241 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer.rb:241 def template_keys(_); end class << self - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer.rb:221 def collection_cache; end - # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 + # pkg:gem/actionview#lib/action_view/renderer/partial_renderer.rb:221 def collection_cache=(val); end end end +# pkg:gem/actionview#lib/action_view/path_registry.rb:4 +module ActionView::PathRegistry + class << self + # pkg:gem/actionview#lib/action_view/path_registry.rb:53 + def all_file_system_resolvers; end + + # pkg:gem/actionview#lib/action_view/path_registry.rb:47 + def all_resolvers; end + + # pkg:gem/actionview#lib/action_view/path_registry.rb:22 + def cast_file_system_resolvers(paths); end + + # pkg:gem/actionview#lib/action_view/path_registry.rb:11 + def file_system_resolver_hooks; end + + # pkg:gem/actionview#lib/action_view/path_registry.rb:14 + def get_view_paths(klass); end + + # pkg:gem/actionview#lib/action_view/path_registry.rb:18 + def set_view_paths(klass, paths); end + end +end + # = Action View PathSet # # This class is used to store and access paths in Action View. A number of @@ -12628,92 +12054,84 @@ end # # A +LookupContext+ will use a +PathSet+ to store the paths in its context. # -# source://actionview//lib/action_view/path_set.rb#11 +# pkg:gem/actionview#lib/action_view/path_set.rb:11 class ActionView::PathSet include ::Enumerable - # @return [PathSet] a new instance of PathSet - # - # source://actionview//lib/action_view/path_set.rb#18 + # pkg:gem/actionview#lib/action_view/path_set.rb:18 def initialize(paths = T.unsafe(nil)); end - # source://actionview//lib/action_view/path_set.rb#35 - def +(array); end + # pkg:gem/actionview#lib/action_view/path_set.rb:35 + def +(other); end - # source://actionview//lib/action_view/path_set.rb#41 - def <<(*args); end - - # source://actionview//lib/action_view/path_set.rb#16 + # pkg:gem/actionview#lib/action_view/path_set.rb:16 def [](*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/path_set.rb#31 + # pkg:gem/actionview#lib/action_view/path_set.rb:31 def compact; end - # source://actionview//lib/action_view/path_set.rb#41 - def concat(*args); end - - # source://actionview//lib/action_view/path_set.rb#16 + # pkg:gem/actionview#lib/action_view/path_set.rb:16 def each(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # - # source://actionview//lib/action_view/path_set.rb#60 + # pkg:gem/actionview#lib/action_view/path_set.rb:53 def exists?(path, prefixes, partial, details, details_key, locals); end - # source://actionview//lib/action_view/path_set.rb#47 + # pkg:gem/actionview#lib/action_view/path_set.rb:40 def find(path, prefixes, partial, details, details_key, locals); end - # source://actionview//lib/action_view/path_set.rb#52 + # pkg:gem/actionview#lib/action_view/path_set.rb:45 def find_all(path, prefixes, partial, details, details_key, locals); end - # source://actionview//lib/action_view/path_set.rb#16 + # pkg:gem/actionview#lib/action_view/path_set.rb:16 def include?(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/path_set.rb#41 - def insert(*args); end - - # Returns the value of attribute paths. - # - # source://actionview//lib/action_view/path_set.rb#14 + # pkg:gem/actionview#lib/action_view/path_set.rb:14 def paths; end - # source://actionview//lib/action_view/path_set.rb#16 - def pop(*_arg0, **_arg1, &_arg2); end - - # source://actionview//lib/action_view/path_set.rb#41 - def push(*args); end - - # source://actionview//lib/action_view/path_set.rb#16 + # pkg:gem/actionview#lib/action_view/path_set.rb:16 def size(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/path_set.rb#27 + # pkg:gem/actionview#lib/action_view/path_set.rb:27 def to_ary; end - # source://actionview//lib/action_view/path_set.rb#41 - def unshift(*args); end - private - # source://actionview//lib/action_view/path_set.rb#22 + # pkg:gem/actionview#lib/action_view/path_set.rb:22 def initialize_copy(other); end - # source://actionview//lib/action_view/path_set.rb#65 + # pkg:gem/actionview#lib/action_view/path_set.rb:58 def search_combinations(prefixes); end - # source://actionview//lib/action_view/path_set.rb#74 + # pkg:gem/actionview#lib/action_view/path_set.rb:67 def typecast(paths); end end -# = Action View Railtie -# -# source://actionview//lib/action_view/railtie.rb#8 -class ActionView::Railtie < ::Rails::Engine - class << self - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - end +# pkg:gem/actionview#lib/action_view/buffers.rb:92 +class ActionView::RawOutputBuffer + # pkg:gem/actionview#lib/action_view/buffers.rb:93 + def initialize(buffer); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:97 + def <<(value); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:103 + def raw; end end +# pkg:gem/actionview#lib/action_view/buffers.rb:150 +class ActionView::RawStreamingBuffer + # pkg:gem/actionview#lib/action_view/buffers.rb:151 + def initialize(buffer); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:155 + def <<(value); end + + # pkg:gem/actionview#lib/action_view/buffers.rb:161 + def raw; end +end + +# = Action View \Record \Identifier +# # RecordIdentifier encapsulates methods used by various ActionView helpers # to associate records with DOM elements. # @@ -12741,6 +12159,8 @@ end # automatically generated, following naming conventions encapsulated by the # RecordIdentifier methods #dom_id and #dom_class: # +# dom_id(Post) # => "new_post" +# dom_class(Post) # => "post" # dom_id(Post.new) # => "new_post" # dom_class(Post.new) # => "post" # dom_id(Post.find 42) # => "post_42" @@ -12764,7 +12184,7 @@ end # end # end # -# source://actionview//lib/action_view/record_identifier.rb#56 +# pkg:gem/actionview#lib/action_view/record_identifier.rb:60 module ActionView::RecordIdentifier include ::ActionView::ModelNaming extend ::ActionView::RecordIdentifier @@ -12780,22 +12200,22 @@ module ActionView::RecordIdentifier # dom_class(post, :edit) # => "edit_post" # dom_class(Person, :edit) # => "edit_person" # - # source://actionview//lib/action_view/record_identifier.rb#74 + # pkg:gem/actionview#lib/action_view/record_identifier.rb:78 def dom_class(record_or_class, prefix = T.unsafe(nil)); end # The DOM id convention is to use the singular form of an object or class with the id following an underscore. # If no id is found, prefix with "new_" instead. # - # dom_id(Post.find(45)) # => "post_45" - # dom_id(Post.new) # => "new_post" + # dom_id(Post.find(45)) # => "post_45" + # dom_id(Post) # => "new_post" # # If you need to address multiple instances of the same class in the same view, you can prefix the dom_id: # # dom_id(Post.find(45), :edit) # => "edit_post_45" - # dom_id(Post.new, :custom) # => "custom_post" + # dom_id(Post, :custom) # => "custom_post" # - # source://actionview//lib/action_view/record_identifier.rb#89 - def dom_id(record, prefix = T.unsafe(nil)); end + # pkg:gem/actionview#lib/action_view/record_identifier.rb:93 + def dom_id(record_or_class, prefix = T.unsafe(nil)); end private @@ -12808,779 +12228,65 @@ module ActionView::RecordIdentifier # method that replaces all characters that are invalid inside DOM ids, with valid ones. You need to # make sure yourself that your dom ids are valid, in case you override this method. # - # source://actionview//lib/action_view/record_identifier.rb#106 + # pkg:gem/actionview#lib/action_view/record_identifier.rb:113 def record_key_for_dom_id(record); end end -# source://actionview//lib/action_view/record_identifier.rb#62 +# pkg:gem/actionview#lib/action_view/record_identifier.rb:66 ActionView::RecordIdentifier::JOIN = T.let(T.unsafe(nil), String) -# source://actionview//lib/action_view/record_identifier.rb#63 +# pkg:gem/actionview#lib/action_view/record_identifier.rb:67 ActionView::RecordIdentifier::NEW = T.let(T.unsafe(nil), String) -# source://actionview//lib/action_view/ripper_ast_parser.rb#6 -class ActionView::RenderParser - # @return [RenderParser] a new instance of RenderParser - # - # source://actionview//lib/action_view/render_parser.rb#7 - def initialize(name, code); end +# pkg:gem/actionview#lib/action_view/render_parser.rb:4 +module ActionView::RenderParser; end - # source://actionview//lib/action_view/render_parser.rb#13 - def render_calls; end +# pkg:gem/actionview#lib/action_view/render_parser.rb:5 +ActionView::RenderParser::ALL_KNOWN_KEYS = T.let(T.unsafe(nil), Array) + +# pkg:gem/actionview#lib/action_view/render_parser.rb:8 +class ActionView::RenderParser::Base + # pkg:gem/actionview#lib/action_view/render_parser.rb:9 + def initialize(name, code); end private - # source://actionview//lib/action_view/render_parser.rb#22 + # pkg:gem/actionview#lib/action_view/render_parser.rb:15 def directory; end - # source://actionview//lib/action_view/render_parser.rb#184 - def layout_to_virtual_path(layout_path); end - - # Convert - # render("foo", ...) - # into either - # render(template: "foo", ...) - # or - # render(partial: "foo", ...) - # - # source://actionview//lib/action_view/render_parser.rb#40 - def normalize_args(string, options_hash); end - - # source://actionview//lib/action_view/render_parser.rb#72 - def parse_hash(node); end - - # source://actionview//lib/action_view/render_parser.rb#76 - def parse_hash_to_symbols(node); end - - # source://actionview//lib/action_view/render_parser.rb#48 - def parse_render(node); end - - # source://actionview//lib/action_view/render_parser.rb#95 - def parse_render_from_options(options_hash); end - - # source://actionview//lib/action_view/render_parser.rb#155 - def parse_str(node); end - - # source://actionview//lib/action_view/render_parser.rb#159 - def parse_sym(node); end - - # source://actionview//lib/action_view/render_parser.rb#176 + # pkg:gem/actionview#lib/action_view/render_parser.rb:19 def partial_to_virtual_path(render_type, partial_path); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/render_parser.rb#164 - def render_template_with_layout?(render_type, options_hash); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/render_parser.rb#170 - def render_template_with_spacer?(options_hash); end - - # source://actionview//lib/action_view/render_parser.rb#26 - def resolve_path_directory(path); end -end - -# source://actionview//lib/action_view/render_parser.rb#90 -ActionView::RenderParser::ALL_KNOWN_KEYS = T.let(T.unsafe(nil), Array) - -# source://actionview//lib/action_view/render_parser.rb#92 -ActionView::RenderParser::RENDER_TYPE_KEYS = T.let(T.unsafe(nil), Array) - -# source://actionview//lib/action_view/ripper_ast_parser.rb#7 -module ActionView::RenderParser::RipperASTParser - extend ::ActionView::RenderParser::RipperASTParser - - # source://actionview//lib/action_view/ripper_ast_parser.rb#188 - def parse_render_nodes(code); end -end - -# source://actionview//lib/action_view/ripper_ast_parser.rb#8 -class ActionView::RenderParser::RipperASTParser::Node < ::Array - # @return [Node] a new instance of Node - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#11 - def initialize(type, arr, opts = T.unsafe(nil)); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#35 - def argument_nodes; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#57 - def call?; end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#65 - def call_method_name; end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#16 - def children; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#25 - def fcall?; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#29 - def fcall_named?(name); end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#74 - def hash?; end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#88 - def hash_from_body(body); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#20 - def inspect; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#45 - def string?; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#96 - def symbol?; end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#78 - def to_hash; end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#69 - def to_string; end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#100 - def to_symbol; end - - # Returns the value of attribute type. - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#9 - def type; end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#61 - def variable_name; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#49 - def variable_reference?; end - - # @return [Boolean] - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#53 - def vcall?; end end -# source://actionview//lib/action_view/ripper_ast_parser.rb#111 -class ActionView::RenderParser::RipperASTParser::NodeParser < ::Ripper - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_BEGIN(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_CHAR(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_END(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on___end__(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_alias(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_alias_error(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_aref(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_aref_field(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_arg_ambiguous(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_arg_paren(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_args_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_args_add_block(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_args_add_star(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_args_forward(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_args_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_array(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_aryptn(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_assign(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_assign_error(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_assoc_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_assoc_splat(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_assoclist_from_args(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_backref(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_backtick(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_bare_assoc_hash(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_begin(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_binary(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_block_var(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_blockarg(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_bodystmt(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_brace_block(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_break(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_call(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_case(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_class(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_class_name_error(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_comma(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_command(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_command_call(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_comment(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_const(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_const_path_field(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_const_path_ref(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_const_ref(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_cvar(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_def(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_defined(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_defs(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_do_block(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_dot2(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_dot3(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_dyna_symbol(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_else(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_elsif(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_embdoc(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_embdoc_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_embdoc_end(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_embexpr_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_embexpr_end(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_embvar(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_ensure(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_excessed_comma(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_fcall(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_field(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_float(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_fndptn(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_for(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_gvar(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_hash(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_heredoc_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_heredoc_dedent(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_heredoc_end(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_hshptn(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_ident(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_if(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_if_mod(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_ifop(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_ignored_nl(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_ignored_sp(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_imaginary(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_in(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_int(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_ivar(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_kw(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_kwrest_param(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_label(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_label_end(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_lambda(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_lbrace(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_lbracket(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_lparen(tok); end +# pkg:gem/actionview#lib/action_view/render_parser.rb:37 +ActionView::RenderParser::Default = ActionView::RenderParser::PrismRenderParser - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_magic_comment(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_massign(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_method_add_arg(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_method_add_block(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_mlhs_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_mlhs_add_post(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_mlhs_add_star(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_mlhs_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_mlhs_paren(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_module(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_mrhs_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_mrhs_add_star(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_mrhs_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_mrhs_new_from_args(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_next(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_nl(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_nokw_param(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_op(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_opassign(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_operator_ambiguous(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_param_error(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_params(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_paren(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_parse_error(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_period(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_program(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_qsymbols_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_qsymbols_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_qsymbols_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_qwords_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_qwords_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_qwords_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_rational(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_rbrace(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_rbracket(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_redo(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_regexp_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_regexp_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_regexp_end(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_regexp_literal(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_regexp_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_rescue(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_rescue_mod(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_rest_param(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_retry(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_return(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_return0(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_rparen(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_sclass(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_semicolon(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_sp(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_stmts_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_stmts_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_string_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_string_concat(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_string_content(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_string_dvar(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_string_embexpr(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_string_literal(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_super(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_symbeg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_symbol(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_symbol_literal(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_symbols_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_symbols_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_symbols_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_tlambda(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_tlambeg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_top_const_field(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_top_const_ref(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_tstring_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_tstring_content(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_tstring_end(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_unary(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_undef(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_unless(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_unless_mod(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_until(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_until_mod(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_var_alias(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_var_field(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_var_ref(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_vcall(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_void_stmt(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_when(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_while(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_while_mod(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_word_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_word_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_words_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_words_beg(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_words_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#140 - def on_words_sep(tok); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#123 - def on_xstring_add(list, item); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_xstring_literal(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#116 - def on_xstring_new(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_yield(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_yield0(*args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#131 - def on_zsuper(*args); end -end - -# source://actionview//lib/action_view/ripper_ast_parser.rb#147 -class ActionView::RenderParser::RipperASTParser::RenderCallExtractor < ::ActionView::RenderParser::RipperASTParser::NodeParser - # @return [RenderCallExtractor] a new instance of RenderCallExtractor - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#152 - def initialize(*args); end - - # Returns the value of attribute render_calls. - # - # source://actionview//lib/action_view/ripper_ast_parser.rb#148 +# pkg:gem/actionview#lib/action_view/render_parser/prism_render_parser.rb:5 +class ActionView::RenderParser::PrismRenderParser < ::ActionView::RenderParser::Base + # pkg:gem/actionview#lib/action_view/render_parser/prism_render_parser.rb:6 def render_calls; end private - # source://actionview//lib/action_view/ripper_ast_parser.rb#177 - def on_arg_paren(content); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#163 - def on_command(name, *args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#159 - def on_fcall(name, *args); end - - # source://actionview//lib/action_view/ripper_ast_parser.rb#181 - def on_paren(content); end + # Accept a call node and return a hash of options for the render call. + # If it doesn't match the expected format, return nil. + # + # pkg:gem/actionview#lib/action_view/render_parser/prism_render_parser.rb:43 + def render_call_options(node); end - # source://actionview//lib/action_view/ripper_ast_parser.rb#167 - def on_render_call(node); end + # Accept the node that is being passed in the position of the template + # and return the template name and whether or not it is an object + # template. + # + # pkg:gem/actionview#lib/action_view/render_parser/prism_render_parser.rb:97 + def render_call_template(node); end end -# source://actionview//lib/action_view/ripper_ast_parser.rb#150 -ActionView::RenderParser::RipperASTParser::RenderCallExtractor::METHODS_TO_PARSE = T.let(T.unsafe(nil), Array) +# pkg:gem/actionview#lib/action_view/render_parser.rb:6 +ActionView::RenderParser::RENDER_TYPE_KEYS = T.let(T.unsafe(nil), Array) +# = Action View \Renderer +# # This is the main entry point for rendering. It basically delegates # to other objects like TemplateRenderer and PartialRenderer which # actually renders the template. @@ -13591,31 +12297,23 @@ ActionView::RenderParser::RipperASTParser::RenderCallExtractor::METHODS_TO_PARSE # the setup and logic necessary to render a view and a new object is created # each time +render+ is called. # -# source://actionview//lib/action_view/renderer/renderer.rb#13 +# pkg:gem/actionview#lib/action_view/renderer/renderer.rb:15 class ActionView::Renderer - # @return [Renderer] a new instance of Renderer - # - # source://actionview//lib/action_view/renderer/renderer.rb#16 + # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:18 def initialize(lookup_context); end - # source://actionview//lib/action_view/renderer/renderer.rb#56 + # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:52 def cache_hits; end - # Returns the value of attribute lookup_context. - # - # source://actionview//lib/action_view/renderer/renderer.rb#14 + # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:16 def lookup_context; end - # Sets the attribute lookup_context - # - # @param value the value to set the attribute lookup_context to. - # - # source://actionview//lib/action_view/renderer/renderer.rb#14 + # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:16 def lookup_context=(_arg0); end # Main render entry point shared by Action View and Action Controller. # - # source://actionview//lib/action_view/renderer/renderer.rb#21 + # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:23 def render(context, options); end # Render but returns a valid Rack body. If fibers are defined, we return @@ -13624,38 +12322,31 @@ class ActionView::Renderer # Note that partials are not supported to be rendered with streaming, # so in such cases, we just wrap them in an array. # - # source://actionview//lib/action_view/renderer/renderer.rb#38 + # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:40 def render_body(context, options); end - # Direct access to partial rendering. - # - # source://actionview//lib/action_view/renderer/renderer.rb#52 + # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:48 def render_partial(context, options, &block); end - # source://actionview//lib/action_view/renderer/renderer.rb#64 - def render_partial_to_object(context, options, &block); end - - # Direct access to template rendering. - # - # source://actionview//lib/action_view/renderer/renderer.rb#47 - def render_template(context, options); end - - # source://actionview//lib/action_view/renderer/renderer.rb#60 - def render_template_to_object(context, options); end - - # source://actionview//lib/action_view/renderer/renderer.rb#25 + # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:27 def render_to_object(context, options); end private - # source://actionview//lib/action_view/renderer/renderer.rb#107 + # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:103 def collection_from_object(object); end - # source://actionview//lib/action_view/renderer/renderer.rb#100 + # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:96 def collection_from_options(options); end + + # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:61 + def render_partial_to_object(context, options, &block); end + + # pkg:gem/actionview#lib/action_view/renderer/renderer.rb:57 + def render_template_to_object(context, options); end end -# source://actionview//lib/action_view/rendering.rb#25 +# pkg:gem/actionview#lib/action_view/rendering.rb:26 module ActionView::Rendering extend ::ActiveSupport::Concern include ::ActionView::ViewPaths @@ -13663,20 +12354,18 @@ module ActionView::Rendering mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods mixes_in_class_methods ::ActionView::Rendering::ClassMethods - # source://actionview//lib/action_view/rendering.rb#31 + # pkg:gem/actionview#lib/action_view/rendering.rb:32 def initialize; end # Override process to set up I18n proxy. # - # source://actionview//lib/action_view/rendering.rb#37 + # pkg:gem/actionview#lib/action_view/rendering.rb:38 def process(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/rendering.rb#101 + # pkg:gem/actionview#lib/action_view/rendering.rb:119 def render_to_body(options = T.unsafe(nil)); end - # Returns the value of attribute rendered_format. - # - # source://actionview//lib/action_view/rendering.rb#29 + # pkg:gem/actionview#lib/action_view/rendering.rb:30 def rendered_format; end # An instance of a view class. The default view class is ActionView::Base. @@ -13690,158 +12379,156 @@ module ActionView::Rendering # # Override this method in a module to change the default behavior. # - # source://actionview//lib/action_view/rendering.rb#91 + # pkg:gem/actionview#lib/action_view/rendering.rb:109 def view_context; end - # source://actionview//lib/action_view/rendering.rb#77 + # pkg:gem/actionview#lib/action_view/rendering.rb:95 def view_context_class; end # Returns an object that is able to render templates. # - # source://actionview//lib/action_view/rendering.rb#96 + # pkg:gem/actionview#lib/action_view/rendering.rb:114 def view_renderer; end private - # Normalize args by converting render "foo" to render :action => "foo" and - # render "foo/bar" to render :template => "foo/bar". + # Normalize args by converting render "foo" to render action: "foo" and + # render "foo/bar" to render template: "foo/bar". # - # source://actionview//lib/action_view/rendering.rb#134 + # pkg:gem/actionview#lib/action_view/rendering.rb:152 def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end # Normalize options. # - # source://actionview//lib/action_view/rendering.rb#158 + # pkg:gem/actionview#lib/action_view/rendering.rb:176 def _normalize_options(options); end # Assign the rendered format to look up context. # - # source://actionview//lib/action_view/rendering.rb#127 + # pkg:gem/actionview#lib/action_view/rendering.rb:145 def _process_format(format); end # Find and render a template based on the options given. # - # source://actionview//lib/action_view/rendering.rb#108 + # pkg:gem/actionview#lib/action_view/rendering.rb:126 def _render_template(options); end end -# source://actionview//lib/action_view/rendering.rb#44 +# pkg:gem/actionview#lib/action_view/rendering.rb:45 module ActionView::Rendering::ClassMethods - # source://actionview//lib/action_view/rendering.rb#48 + # pkg:gem/actionview#lib/action_view/rendering.rb:49 def _helpers; end - # source://actionview//lib/action_view/rendering.rb#45 + # pkg:gem/actionview#lib/action_view/rendering.rb:46 def _routes; end - # source://actionview//lib/action_view/rendering.rb#51 + # pkg:gem/actionview#lib/action_view/rendering.rb:59 def build_view_context_class(klass, supports_path, routes, helpers); end - # source://actionview//lib/action_view/rendering.rb#64 + # pkg:gem/actionview#lib/action_view/rendering.rb:76 + def eager_load!; end + + # pkg:gem/actionview#lib/action_view/rendering.rb:52 + def inherit_view_context_class?; end + + # pkg:gem/actionview#lib/action_view/rendering.rb:82 def view_context_class; end end # = Action View Resolver # -# source://actionview//lib/action_view/template/resolver.rb#12 +# pkg:gem/actionview#lib/action_view/template/resolver.rb:12 class ActionView::Resolver - # source://actionview//lib/action_view/template/resolver.rb#68 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:70 def all_template_paths; end - # source://actionview//lib/action_view/template/resolver.rb#54 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:65 + def built_templates; end + + # pkg:gem/actionview#lib/action_view/template/resolver.rb:51 def caching; end - # source://actionview//lib/action_view/template/resolver.rb#54 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:51 def caching=(val); end - # source://actionview//lib/action_view/template/resolver.rb#78 - def caching?(*_arg0, **_arg1, &_arg2); end + # pkg:gem/actionview#lib/action_view/template/resolver.rb:80 + def caching?(&_arg0); end - # source://actionview//lib/action_view/template/resolver.rb#60 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:57 def clear_cache; end # Normalizes the arguments and passes it on to find_templates. # - # source://actionview//lib/action_view/template/resolver.rb#64 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:61 def find_all(name, prefix = T.unsafe(nil), partial = T.unsafe(nil), details = T.unsafe(nil), key = T.unsafe(nil), locals = T.unsafe(nil)); end private - # source://actionview//lib/action_view/template/resolver.rb#74 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:76 def _find_all(name, prefix, partial, details, key, locals); end # This is what child classes implement. No defaults are needed # because Resolver guarantees that the arguments are present and # normalized. # - # @raise [NotImplementedError] - # - # source://actionview//lib/action_view/template/resolver.rb#83 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:85 def find_templates(name, prefix, partial, details, locals = T.unsafe(nil)); end class << self - # source://actionview//lib/action_view/template/resolver.rb#54 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:51 def caching; end - # source://actionview//lib/action_view/template/resolver.rb#54 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:51 def caching=(val); end - # source://actionview//lib/action_view/template/resolver.rb#54 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:54 def caching?; end end end -# source://actionview//lib/action_view/template/resolver.rb#13 -ActionView::Resolver::Path = ActionView::TemplatePath - -# source://actionview//lib/action_view/template/resolver.rb#16 +# pkg:gem/actionview#lib/action_view/template/resolver.rb:13 class ActionView::Resolver::PathParser - # source://actionview//lib/action_view/template/resolver.rb#19 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:16 def build_path_regex; end - # source://actionview//lib/action_view/template/resolver.rb#40 + # pkg:gem/actionview#lib/action_view/template/resolver.rb:37 def parse(path); end end -# source://actionview//lib/action_view/template/resolver.rb#17 +# pkg:gem/actionview#lib/action_view/template/resolver.rb:14 class ActionView::Resolver::PathParser::ParsedPath < ::Struct - # Returns the value of attribute details - # - # @return [Object] the current value of details + # pkg:gem/actionview#lib/action_view/template/resolver.rb:14 def details; end - # Sets the attribute details - # - # @param value [Object] the value to set the attribute details to. - # @return [Object] the newly set value + # pkg:gem/actionview#lib/action_view/template/resolver.rb:14 def details=(_); end - # Returns the value of attribute path - # - # @return [Object] the current value of path + # pkg:gem/actionview#lib/action_view/template/resolver.rb:14 def path; end - # Sets the attribute path - # - # @param value [Object] the value to set the attribute path to. - # @return [Object] the newly set value + # pkg:gem/actionview#lib/action_view/template/resolver.rb:14 def path=(_); end class << self + # pkg:gem/actionview#lib/action_view/template/resolver.rb:14 def [](*_arg0); end + + # pkg:gem/actionview#lib/action_view/template/resolver.rb:14 def inspect; end + + # pkg:gem/actionview#lib/action_view/template/resolver.rb:14 def keyword_init?; end + + # pkg:gem/actionview#lib/action_view/template/resolver.rb:14 def members; end + + # pkg:gem/actionview#lib/action_view/template/resolver.rb:14 def new(*_arg0); end end end -# source://actionview//lib/action_view/routing_url_for.rb#6 +# pkg:gem/actionview#lib/action_view/routing_url_for.rb:6 module ActionView::RoutingUrlFor - include ::ActionDispatch::Routing::PolymorphicRoutes - - # source://actionpack/7.0.8.7/lib/action_dispatch/routing/url_for.rb#97 - def default_url_options=(val); end - # Returns the URL for the set of +options+ provided. This takes the # same options as +url_for+ in Action Controller (see the # documentation for ActionDispatch::Routing::UrlFor#url_for). Note that by default @@ -13918,91 +12605,85 @@ module ActionView::RoutingUrlFor # # Specify absolute path with beginning slash # # => /users # - # source://actionview//lib/action_view/routing_url_for.rb#82 + # pkg:gem/actionview#lib/action_view/routing_url_for.rb:82 def url_for(options = T.unsafe(nil)); end - # source://actionview//lib/action_view/routing_url_for.rb#124 + # pkg:gem/actionview#lib/action_view/routing_url_for.rb:124 def url_options; end private - # source://actionview//lib/action_view/routing_url_for.rb#139 + # pkg:gem/actionview#lib/action_view/routing_url_for.rb:139 def _generate_paths_by_default; end - # source://actionview//lib/action_view/routing_url_for.rb#130 + # pkg:gem/actionview#lib/action_view/routing_url_for.rb:130 def _routes_context; end - # source://actionview//lib/action_view/routing_url_for.rb#143 + # pkg:gem/actionview#lib/action_view/routing_url_for.rb:143 def ensure_only_path_option(options); end - # @return [Boolean] - # - # source://actionview//lib/action_view/routing_url_for.rb#134 + # pkg:gem/actionview#lib/action_view/routing_url_for.rb:134 def optimize_routes_generation?; end - - class << self - # source://actionpack/7.0.8.7/lib/action_dispatch/routing/url_for.rb#97 - def default_url_options=(val); end - end end -# source://actionview//lib/action_view/buffers.rb#41 +# pkg:gem/actionview#lib/action_view/buffers.rb:108 class ActionView::StreamingBuffer - # @return [StreamingBuffer] a new instance of StreamingBuffer - # - # source://actionview//lib/action_view/buffers.rb#42 + # pkg:gem/actionview#lib/action_view/buffers.rb:109 def initialize(block); end - # source://actionview//lib/action_view/buffers.rb#46 + # pkg:gem/actionview#lib/action_view/buffers.rb:113 def <<(value); end - # source://actionview//lib/action_view/buffers.rb#46 + # pkg:gem/actionview#lib/action_view/buffers.rb:119 def append=(value); end - # source://actionview//lib/action_view/buffers.rb#46 + # pkg:gem/actionview#lib/action_view/buffers.rb:147 + def block; end + + # pkg:gem/actionview#lib/action_view/buffers.rb:126 + def capture; end + + # pkg:gem/actionview#lib/action_view/buffers.rb:118 def concat(value); end - # source://actionview//lib/action_view/buffers.rb#63 + # pkg:gem/actionview#lib/action_view/buffers.rb:139 def html_safe; end - # @return [Boolean] - # - # source://actionview//lib/action_view/buffers.rb#59 + # pkg:gem/actionview#lib/action_view/buffers.rb:135 def html_safe?; end - # source://actionview//lib/action_view/buffers.rb#54 + # pkg:gem/actionview#lib/action_view/buffers.rb:143 + def raw; end + + # pkg:gem/actionview#lib/action_view/buffers.rb:124 def safe_append=(value); end - # source://actionview//lib/action_view/buffers.rb#54 + # pkg:gem/actionview#lib/action_view/buffers.rb:121 def safe_concat(value); end end -# source://actionview//lib/action_view/flows.rb#30 +# pkg:gem/actionview#lib/action_view/flows.rb:30 class ActionView::StreamingFlow < ::ActionView::OutputFlow - # @return [StreamingFlow] a new instance of StreamingFlow - # - # source://actionview//lib/action_view/flows.rb#31 + # pkg:gem/actionview#lib/action_view/flows.rb:31 def initialize(view, fiber); end # Appends the contents for the given key. This is called # by providing and resuming back to the fiber, # if that's the key it's waiting for. # - # source://actionview//lib/action_view/flows.rb#65 + # pkg:gem/actionview#lib/action_view/flows.rb:65 def append!(key, value); end # Try to get stored content. If the content # is not available and we're inside the layout fiber, # then it will begin waiting for the given key and yield. # - # source://actionview//lib/action_view/flows.rb#43 + # pkg:gem/actionview#lib/action_view/flows.rb:43 def get(key); end private - # @return [Boolean] - # - # source://actionview//lib/action_view/flows.rb#71 + # pkg:gem/actionview#lib/action_view/flows.rb:71 def inside_fiber?; end end @@ -14011,18 +12692,18 @@ end # * Support streaming from child templates, partials and so on. # * Rack::Cache needs to support streaming bodies # -# source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#13 +# pkg:gem/actionview#lib/action_view/renderer/streaming_template_renderer.rb:13 class ActionView::StreamingTemplateRenderer < ::ActionView::TemplateRenderer # For streaming, instead of rendering a given a template, we return a Body # object that responds to each. This object is initialized with a block # that knows how to render the template. # - # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#45 + # pkg:gem/actionview#lib/action_view/renderer/streaming_template_renderer.rb:45 def render_template(view, template, layout_name = T.unsafe(nil), locals = T.unsafe(nil)); end private - # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#57 + # pkg:gem/actionview#lib/action_view/renderer/streaming_template_renderer.rb:57 def delayed_render(buffer, template, layout, view, locals); end end @@ -14030,48 +12711,48 @@ end # It is initialized with a block that, when called, starts # rendering the template. # -# source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#14 +# pkg:gem/actionview#lib/action_view/renderer/streaming_template_renderer.rb:14 class ActionView::StreamingTemplateRenderer::Body - # @return [Body] a new instance of Body - # - # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#15 + # pkg:gem/actionview#lib/action_view/renderer/streaming_template_renderer.rb:15 def initialize(&start); end - # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#19 + # pkg:gem/actionview#lib/action_view/renderer/streaming_template_renderer.rb:19 def each(&block); end private # This is the same logging logic as in ShowExceptions middleware. # - # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#31 + # pkg:gem/actionview#lib/action_view/renderer/streaming_template_renderer.rb:31 def log_error(exception); end end -# source://actionview//lib/action_view/template/error.rb#232 +# pkg:gem/actionview#lib/action_view/template/error.rb:30 +class ActionView::StrictLocalsError < ::ArgumentError + # pkg:gem/actionview#lib/action_view/template/error.rb:31 + def initialize(argument_error, template); end +end + +# pkg:gem/actionview#lib/action_view/template/error.rb:256 class ActionView::SyntaxErrorInTemplate < ::ActionView::Template::Error - # @return [SyntaxErrorInTemplate] a new instance of SyntaxErrorInTemplate - # - # source://actionview//lib/action_view/template/error.rb#233 + # pkg:gem/actionview#lib/action_view/template/error.rb:257 def initialize(template, offending_code_string); end - # source://actionview//lib/action_view/template/error.rb#244 + # pkg:gem/actionview#lib/action_view/template/error.rb:268 def annotated_source_code; end - # source://actionview//lib/action_view/template/error.rb#238 + # pkg:gem/actionview#lib/action_view/template/error.rb:262 def message; end end -# = Action View Template +# = Action View \Template # -# source://actionview//lib/action_view/template.rb#8 +# pkg:gem/actionview#lib/action_view/template.rb:8 class ActionView::Template extend ::ActiveSupport::Autoload extend ::ActionView::Template::Handlers - # @return [Template] a new instance of Template - # - # source://actionview//lib/action_view/template.rb#123 + # pkg:gem/actionview#lib/action_view/template.rb:200 def initialize(source, identifier, handler, locals:, format: T.unsafe(nil), variant: T.unsafe(nil), virtual_path: T.unsafe(nil)); end # This method is responsible for properly setting the encoding of the @@ -14084,42 +12765,40 @@ class ActionView::Template # before passing the source on to the template engine, leaving a # blank line in its stead. # - # source://actionview//lib/action_view/template.rb#189 + # pkg:gem/actionview#lib/action_view/template.rb:322 def encode!; end - # Returns the value of attribute format. - # - # source://actionview//lib/action_view/template.rb#121 + # pkg:gem/actionview#lib/action_view/template.rb:196 def format; end - # Returns the value of attribute handler. - # - # source://actionview//lib/action_view/template.rb#120 + # pkg:gem/actionview#lib/action_view/template.rb:195 def handler; end - # Returns the value of attribute identifier. - # - # source://actionview//lib/action_view/template.rb#120 + # pkg:gem/actionview#lib/action_view/template.rb:195 def identifier; end - # source://actionview//lib/action_view/template.rb#171 + # pkg:gem/actionview#lib/action_view/template.rb:301 def inspect; end - # Returns the value of attribute locals. + # The locals this template has been or will be compiled for, or nil if this + # is a strict locals template. # - # source://actionview//lib/action_view/template.rb#121 + # pkg:gem/actionview#lib/action_view/template.rb:224 def locals; end # Exceptions are marshalled when using the parallel test runner with DRb, so we need # to ensure that references to the template object can be marshalled as well. This means forgoing # the marshalling of the compiler mutex and instantiating that again on unmarshalling. # - # source://actionview//lib/action_view/template.rb#229 + # pkg:gem/actionview#lib/action_view/template.rb:388 def marshal_dump; end - # source://actionview//lib/action_view/template.rb#233 + # pkg:gem/actionview#lib/action_view/template.rb:392 def marshal_load(array); end + # pkg:gem/actionview#lib/action_view/template.rb:397 + def method_name; end + # Render a template. If the template was not compiled yet, it is done # exactly before rendering. # @@ -14127,39 +12806,58 @@ class ActionView::Template # we use a bang in this instrumentation because you don't want to # consume this in production. This is only slow if it's being listened to. # - # source://actionview//lib/action_view/template.rb#154 - def render(view, locals, buffer = T.unsafe(nil), add_to_stack: T.unsafe(nil), &block); end + # pkg:gem/actionview#lib/action_view/template.rb:272 + def render(view, locals, buffer = T.unsafe(nil), implicit_locals: T.unsafe(nil), add_to_stack: T.unsafe(nil), &block); end - # source://actionview//lib/action_view/template.rb#167 + # pkg:gem/actionview#lib/action_view/template.rb:297 def short_identifier; end - # source://actionview//lib/action_view/template.rb#175 + # pkg:gem/actionview#lib/action_view/template.rb:305 def source; end + # pkg:gem/actionview#lib/action_view/template.rb:232 + def spot(location); end + + # This method is responsible for marking a template as having strict locals + # which means the template can only accept the locals defined in a magic + # comment. For example, if your template acceps the locals +title+ and + # +comment_count+, add the following to your template file: + # + # <%# locals: (title: "Default title", comment_count: 0) %> + # + # Strict locals are useful for validating template arguments and for + # specifying defaults. + # + # pkg:gem/actionview#lib/action_view/template.rb:367 + def strict_locals!; end + + # Returns whether a template is using strict locals. + # + # pkg:gem/actionview#lib/action_view/template.rb:381 + def strict_locals?; end + # Returns whether the underlying handler supports streaming. If so, # a streaming buffer *may* be passed when it starts rendering. # - # @return [Boolean] - # - # source://actionview//lib/action_view/template.rb#144 + # pkg:gem/actionview#lib/action_view/template.rb:262 def supports_streaming?; end - # source://actionview//lib/action_view/template.rb#163 + # Translate an error location returned by ErrorHighlight to the correct + # source location inside the template. + # + # pkg:gem/actionview#lib/action_view/template.rb:252 + def translate_location(backtrace_location, spot); end + + # pkg:gem/actionview#lib/action_view/template.rb:293 def type; end - # Returns the value of attribute variable. - # - # source://actionview//lib/action_view/template.rb#121 + # pkg:gem/actionview#lib/action_view/template.rb:196 def variable; end - # Returns the value of attribute variant. - # - # source://actionview//lib/action_view/template.rb#121 + # pkg:gem/actionview#lib/action_view/template.rb:196 def variant; end - # Returns the value of attribute virtual_path. - # - # source://actionview//lib/action_view/template.rb#121 + # pkg:gem/actionview#lib/action_view/template.rb:196 def virtual_path; end private @@ -14176,42 +12874,55 @@ class ActionView::Template # In general, this means that templates will be UTF-8 inside of Rails, # regardless of the original source encoding. # - # source://actionview//lib/action_view/template.rb#275 + # pkg:gem/actionview#lib/action_view/template.rb:501 def compile(mod); end # Compile a template. This method ensures a template is compiled # just once and removes the source after it is compiled. # - # source://actionview//lib/action_view/template.rb#241 + # pkg:gem/actionview#lib/action_view/template.rb:419 def compile!(view); end - # source://actionview//lib/action_view/template.rb#316 + # This method compiles the source of the template. The compilation of templates + # involves setting strict_locals! if applicable, encoding the template, and setting + # frozen string literal. + # + # pkg:gem/actionview#lib/action_view/template.rb:444 + def compiled_source; end + + # pkg:gem/actionview#lib/action_view/template.rb:406 + def find_node_by_id(node, node_id); end + + # pkg:gem/actionview#lib/action_view/template.rb:550 def handle_render_error(view, e); end - # source://actionview//lib/action_view/template.rb#352 + # pkg:gem/actionview#lib/action_view/template.rb:575 def identifier_method_name; end - # source://actionview//lib/action_view/template.rb#356 + # pkg:gem/actionview#lib/action_view/template.rb:579 def instrument(action, &block); end - # source://actionview//lib/action_view/template.rb#364 + # pkg:gem/actionview#lib/action_view/template.rb:587 def instrument_payload; end - # source://actionview//lib/action_view/template.rb#360 + # pkg:gem/actionview#lib/action_view/template.rb:583 def instrument_render_template(&block); end - # source://actionview//lib/action_view/template.rb#325 + # pkg:gem/actionview#lib/action_view/template.rb:562 def locals_code; end - # source://actionview//lib/action_view/template.rb#344 - def method_name; end + # pkg:gem/actionview#lib/action_view/template.rb:542 + def offset; end class << self - # source://actionview//lib/action_view/template.rb#117 + # pkg:gem/actionview#lib/action_view/template.rb:181 def frozen_string_literal; end - # source://actionview//lib/action_view/template.rb#117 + # pkg:gem/actionview#lib/action_view/template.rb:181 def frozen_string_literal=(_arg0); end + + # pkg:gem/actionview#lib/action_view/template.rb:185 + def mime_types_implementation=(implementation); end end end @@ -14219,80 +12930,89 @@ end # fails. This exception then gathers a bunch of intimate details and uses it to report a # precise exception message. # -# source://actionview//lib/action_view/template/error.rb#153 +# pkg:gem/actionview#lib/action_view/template/error.rb:165 class ActionView::Template::Error < ::ActionView::ActionViewError - # @return [Error] a new instance of Error - # - # source://actionview//lib/action_view/template/error.rb#159 + # pkg:gem/actionview#lib/action_view/template/error.rb:173 def initialize(template); end - # source://actionview//lib/action_view/template/error.rb#207 - def annotated_source_code; end + # pkg:gem/actionview#lib/action_view/template/error.rb:231 + def annotated_source_code; end + + # pkg:gem/actionview#lib/action_view/template/error.rb:182 + def backtrace; end + + # pkg:gem/actionview#lib/action_view/template/error.rb:186 + def backtrace_locations; end # Override to prevent #cause resetting during re-raise. # - # source://actionview//lib/action_view/template/error.rb#157 + # pkg:gem/actionview#lib/action_view/template/error.rb:169 def cause; end - # source://actionview//lib/action_view/template/error.rb#166 + # pkg:gem/actionview#lib/action_view/template/error.rb:190 def file_name; end - # source://actionview//lib/action_view/template/error.rb#199 + # pkg:gem/actionview#lib/action_view/template/error.rb:223 def line_number; end - # source://actionview//lib/action_view/template/error.rb#179 + # pkg:gem/actionview#lib/action_view/template/error.rb:203 def source_extract(indentation = T.unsafe(nil)); end - # source://actionview//lib/action_view/template/error.rb#170 + # pkg:gem/actionview#lib/action_view/template/error.rb:194 def sub_template_message; end - # source://actionview//lib/action_view/template/error.rb#194 + # pkg:gem/actionview#lib/action_view/template/error.rb:218 def sub_template_of(template_path); end + # pkg:gem/actionview#lib/action_view/template/error.rb:171 + def template; end + private - # source://actionview//lib/action_view/template/error.rb#220 + # pkg:gem/actionview#lib/action_view/template/error.rb:244 def formatted_code_for(source_code, line_counter, indent); end - # source://actionview//lib/action_view/template/error.rb#212 + # pkg:gem/actionview#lib/action_view/template/error.rb:236 def source_location; end end -# source://actionview//lib/action_view/template/error.rb#154 +# pkg:gem/actionview#lib/action_view/template/error.rb:166 ActionView::Template::Error::SOURCE_CODE_RADIUS = T.let(T.unsafe(nil), Integer) -# source://actionview//lib/action_view/template/html.rb#6 +# = Action View HTML Template +# +# pkg:gem/actionview#lib/action_view/template/html.rb:6 class ActionView::Template::HTML - # @return [HTML] a new instance of HTML - # - # source://actionview//lib/action_view/template/html.rb#9 + # pkg:gem/actionview#lib/action_view/template/html.rb:9 def initialize(string, type); end - # source://actionview//lib/action_view/template/html.rb#28 + # pkg:gem/actionview#lib/action_view/template/html.rb:28 def format; end - # source://actionview//lib/action_view/template/html.rb#14 + # pkg:gem/actionview#lib/action_view/template/html.rb:14 def identifier; end - # source://actionview//lib/action_view/template/html.rb#14 + # pkg:gem/actionview#lib/action_view/template/html.rb:18 def inspect; end - # source://actionview//lib/action_view/template/html.rb#24 + # pkg:gem/actionview#lib/action_view/template/html.rb:24 def render(*args); end - # source://actionview//lib/action_view/template/html.rb#20 + # pkg:gem/actionview#lib/action_view/template/html.rb:20 def to_str; end - # source://actionview//lib/action_view/template/html.rb#7 + # pkg:gem/actionview#lib/action_view/template/html.rb:7 def type; end end -# source://actionview//lib/action_view/template/handlers.rb#6 +# = Action View Template Handlers +# +# pkg:gem/actionview#lib/action_view/template/handlers.rb:6 module ActionView::Template::Handlers - # source://actionview//lib/action_view/template/handlers.rb#61 + # pkg:gem/actionview#lib/action_view/template/handlers.rb:61 def handler_for_extension(extension); end - # source://actionview//lib/action_view/template/handlers.rb#56 + # pkg:gem/actionview#lib/action_view/template/handlers.rb:56 def register_default_template_handler(extension, klass); end # Register an object that knows how to handle template files with the given @@ -14300,593 +13020,562 @@ module ActionView::Template::Handlers # The handler must respond to +:call+, which will be passed the template # and should return the rendered template as a String. # - # @raise [ArgumentError] - # - # source://actionview//lib/action_view/template/handlers.rb#31 + # pkg:gem/actionview#lib/action_view/template/handlers.rb:31 def register_template_handler(*extensions, handler); end - # source://actionview//lib/action_view/template/handlers.rb#52 + # pkg:gem/actionview#lib/action_view/template/handlers.rb:52 def registered_template_handler(extension); end - # source://actionview//lib/action_view/template/handlers.rb#48 + # pkg:gem/actionview#lib/action_view/template/handlers.rb:48 def template_handler_extensions; end # Opposite to register_template_handler. # - # source://actionview//lib/action_view/template/handlers.rb#40 + # pkg:gem/actionview#lib/action_view/template/handlers.rb:40 def unregister_template_handler(*extensions); end class << self - # @private - # - # source://actionview//lib/action_view/template/handlers.rb#12 + # pkg:gem/actionview#lib/action_view/template/handlers.rb:12 def extended(base); end - # source://actionview//lib/action_view/template/handlers.rb#23 + # pkg:gem/actionview#lib/action_view/template/handlers.rb:23 def extensions; end end end -# source://actionview//lib/action_view/template/handlers/builder.rb#5 +# pkg:gem/actionview#lib/action_view/template/handlers/builder.rb:5 class ActionView::Template::Handlers::Builder - # source://actionview//lib/action_view/template/handlers/builder.rb#8 + # pkg:gem/actionview#lib/action_view/template/handlers/builder.rb:8 def call(template, source); end - # source://actionview//lib/action_view/template/handlers/builder.rb#6 + # pkg:gem/actionview#lib/action_view/template/handlers/builder.rb:6 def default_format; end - # source://actionview//lib/action_view/template/handlers/builder.rb#6 + # pkg:gem/actionview#lib/action_view/template/handlers/builder.rb:6 def default_format=(_arg0); end - # source://actionview//lib/action_view/template/handlers/builder.rb#6 + # pkg:gem/actionview#lib/action_view/template/handlers/builder.rb:6 def default_format?; end private - # source://actionview//lib/action_view/template/handlers/builder.rb#17 + # pkg:gem/actionview#lib/action_view/template/handlers/builder.rb:17 def require_engine; end class << self - # source://actionview//lib/action_view/template/handlers/builder.rb#6 + # pkg:gem/actionview#lib/action_view/template/handlers/builder.rb:6 def default_format; end - # source://actionview//lib/action_view/template/handlers/builder.rb#6 + # pkg:gem/actionview#lib/action_view/template/handlers/builder.rb:6 def default_format=(value); end - # source://actionview//lib/action_view/template/handlers/builder.rb#6 + # pkg:gem/actionview#lib/action_view/template/handlers/builder.rb:6 def default_format?; end end end -# source://actionview//lib/action_view/template/handlers/erb.rb#6 +# pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:9 class ActionView::Template::Handlers::ERB - # source://actionview//lib/action_view/template/handlers/erb.rb#36 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:63 def call(template, source); end - # source://actionview//lib/action_view/template/handlers/erb.rb#14 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:17 def erb_implementation; end - # source://actionview//lib/action_view/template/handlers/erb.rb#14 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:17 def erb_implementation=(_arg0); end - # source://actionview//lib/action_view/template/handlers/erb.rb#14 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:17 def erb_implementation?; end - # source://actionview//lib/action_view/template/handlers/erb.rb#11 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:14 def erb_trim_mode; end - # source://actionview//lib/action_view/template/handlers/erb.rb#11 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:14 def erb_trim_mode=(_arg0); end - # source://actionview//lib/action_view/template/handlers/erb.rb#11 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:14 def erb_trim_mode?; end - # source://actionview//lib/action_view/template/handlers/erb.rb#17 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:20 def escape_ignore_list; end - # source://actionview//lib/action_view/template/handlers/erb.rb#17 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:20 def escape_ignore_list=(_arg0); end - # source://actionview//lib/action_view/template/handlers/erb.rb#17 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:20 def escape_ignore_list?; end - # @return [Boolean] - # - # source://actionview//lib/action_view/template/handlers/erb.rb#32 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:37 def handles_encoding?; end - # source://actionview//lib/action_view/template/handlers/erb.rb#20 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:23 def strip_trailing_newlines; end - # source://actionview//lib/action_view/template/handlers/erb.rb#20 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:23 def strip_trailing_newlines=(_arg0); end - # source://actionview//lib/action_view/template/handlers/erb.rb#20 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:23 def strip_trailing_newlines?; end - # @return [Boolean] - # - # source://actionview//lib/action_view/template/handlers/erb.rb#28 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:33 def supports_streaming?; end + # Translate an error location returned by ErrorHighlight to the correct + # source location inside the template. + # + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:43 + def translate_location(spot, backtrace_location, source); end + private - # @raise [WrongEncodingError] + # Find which token in the source template spans the byte range that + # contains the error_column, then return the offset compared to the + # original source template. # - # source://actionview//lib/action_view/template/handlers/erb.rb#68 + # Iterate consecutive pairs of CODE or TEXT tokens, requiring + # a match of the first token before matching either token. + # + # For example, if we want to find tokens A, B, C, we do the following: + # 1. Find a match for A: test error_column or advance scanner. + # 2. Find a match for B or A: + # a. If B: start over with next token set (B, C). + # b. If A: test error_column or advance scanner. + # c. Otherwise: Advance 1 byte + # + # Prioritize matching the next token over the current token once + # a match for the current token has been found. This is to prevent + # the current token from looping past the next token if they both + # match (i.e. if the current token is a single space character). + # + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:128 + def find_offset(compiled, source_tokens, error_column); end + + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:153 + def offset_source_tokens(source_tokens); end + + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:95 def valid_encoding(string, encoding); end class << self - # source://actionview//lib/action_view/template/handlers/erb.rb#24 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:29 def call(template, source); end - # source://actionview//lib/action_view/template/handlers/erb.rb#14 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:17 def erb_implementation; end - # source://actionview//lib/action_view/template/handlers/erb.rb#14 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:17 def erb_implementation=(value); end - # source://actionview//lib/action_view/template/handlers/erb.rb#14 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:17 def erb_implementation?; end - # source://actionview//lib/action_view/template/handlers/erb.rb#11 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:14 def erb_trim_mode; end - # source://actionview//lib/action_view/template/handlers/erb.rb#11 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:14 def erb_trim_mode=(value); end - # source://actionview//lib/action_view/template/handlers/erb.rb#11 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:14 def erb_trim_mode?; end - # source://actionview//lib/action_view/template/handlers/erb.rb#17 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:20 def escape_ignore_list; end - # source://actionview//lib/action_view/template/handlers/erb.rb#17 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:20 def escape_ignore_list=(value); end - # source://actionview//lib/action_view/template/handlers/erb.rb#17 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:20 def escape_ignore_list?; end - # source://actionview//lib/action_view/template/handlers/erb.rb#20 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:23 def strip_trailing_newlines; end - # source://actionview//lib/action_view/template/handlers/erb.rb#20 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:23 def strip_trailing_newlines=(value); end - # source://actionview//lib/action_view/template/handlers/erb.rb#20 + # pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:23 def strip_trailing_newlines?; end end end -# source://actionview//lib/action_view/template/handlers/erb.rb#22 +# pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:25 ActionView::Template::Handlers::ERB::ENCODING_TAG = T.let(T.unsafe(nil), Regexp) -# source://actionview//lib/action_view/template/handlers/erb/erubi.rb#9 +# pkg:gem/actionview#lib/action_view/template/handlers/erb/erubi.rb:9 class ActionView::Template::Handlers::ERB::Erubi < ::Erubi::Engine - # @return [Erubi] a new instance of Erubi - # - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#11 + # pkg:gem/actionview#lib/action_view/template/handlers/erb/erubi.rb:11 def initialize(input, properties = T.unsafe(nil)); end - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#26 - def evaluate(action_view_erb_handler_context); end - private - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#69 + # pkg:gem/actionview#lib/action_view/template/handlers/erb/erubi.rb:65 def add_code(code); end - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#53 + # pkg:gem/actionview#lib/action_view/template/handlers/erb/erubi.rb:47 def add_expression(indicator, code); end - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#74 + # pkg:gem/actionview#lib/action_view/template/handlers/erb/erubi.rb:70 def add_postamble(_); end - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#36 + # pkg:gem/actionview#lib/action_view/template/handlers/erb/erubi.rb:30 def add_text(text); end - # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#79 + # pkg:gem/actionview#lib/action_view/template/handlers/erb/erubi.rb:75 def flush_newline_if_pending(src); end end -# source://actionview//lib/action_view/template/handlers/erb/erubi.rb#51 +# pkg:gem/actionview#lib/action_view/template/handlers/erb/erubi.rb:45 ActionView::Template::Handlers::ERB::Erubi::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) -# source://actionview//lib/action_view/template/handlers/html.rb#5 +# pkg:gem/actionview#lib/action_view/template/handlers/erb.rb:27 +class ActionView::Template::Handlers::ERB::LocationParsingError < ::StandardError; end + +# pkg:gem/actionview#lib/action_view/template/handlers/html.rb:5 class ActionView::Template::Handlers::Html < ::ActionView::Template::Handlers::Raw - # source://actionview//lib/action_view/template/handlers/html.rb#6 + # pkg:gem/actionview#lib/action_view/template/handlers/html.rb:6 def call(template, source); end end -# source://actionview//lib/action_view/template/handlers/raw.rb#5 +# pkg:gem/actionview#lib/action_view/template/handlers/raw.rb:5 class ActionView::Template::Handlers::Raw - # source://actionview//lib/action_view/template/handlers/raw.rb#6 + # pkg:gem/actionview#lib/action_view/template/handlers/raw.rb:6 def call(template, source); end end -# source://actionview//lib/action_view/template/inline.rb#7 +# pkg:gem/actionview#lib/action_view/template/inline.rb:7 class ActionView::Template::Inline < ::ActionView::Template - # source://actionview//lib/action_view/template/inline.rb#16 + # pkg:gem/actionview#lib/action_view/template/inline.rb:16 def compile(mod); end end # This finalizer is needed (and exactly with a proc inside another proc) # otherwise templates leak in development. # -# source://actionview//lib/action_view/template/inline.rb#8 +# pkg:gem/actionview#lib/action_view/template/inline.rb:8 ActionView::Template::Inline::Finalizer = T.let(T.unsafe(nil), Proc) -# source://actionview//lib/action_view/template/raw_file.rb#6 +# pkg:gem/actionview#lib/action_view/template.rb:309 +ActionView::Template::LEADING_ENCODING_REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/actionview#lib/action_view/template.rb:198 +ActionView::Template::NONE = T.let(T.unsafe(nil), Object) + +# pkg:gem/actionview#lib/action_view/template.rb:559 +ActionView::Template::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) + +# = Action View RawFile Template +# +# pkg:gem/actionview#lib/action_view/template/raw_file.rb:6 class ActionView::Template::RawFile - # @return [RawFile] a new instance of RawFile - # - # source://actionview//lib/action_view/template/raw_file.rb#9 + # pkg:gem/actionview#lib/action_view/template/raw_file.rb:9 def initialize(filename); end - # source://actionview//lib/action_view/template/raw_file.rb#7 + # pkg:gem/actionview#lib/action_view/template/raw_file.rb:7 def format; end - # source://actionview//lib/action_view/template/raw_file.rb#7 + # pkg:gem/actionview#lib/action_view/template/raw_file.rb:7 def format=(_arg0); end - # source://actionview//lib/action_view/template/raw_file.rb#16 + # pkg:gem/actionview#lib/action_view/template/raw_file.rb:16 def identifier; end - # source://actionview//lib/action_view/template/raw_file.rb#20 + # pkg:gem/actionview#lib/action_view/template/raw_file.rb:20 def render(*args); end - # source://actionview//lib/action_view/template/raw_file.rb#7 + # pkg:gem/actionview#lib/action_view/template/raw_file.rb:7 def type; end - # source://actionview//lib/action_view/template/raw_file.rb#7 + # pkg:gem/actionview#lib/action_view/template/raw_file.rb:7 def type=(_arg0); end end -# source://actionview//lib/action_view/template/renderable.rb#6 +# = Action View Renderable Template for objects that respond to #render_in +# +# pkg:gem/actionview#lib/action_view/template/renderable.rb:6 class ActionView::Template::Renderable - # @return [Renderable] a new instance of Renderable - # - # source://actionview//lib/action_view/template/renderable.rb#7 + # pkg:gem/actionview#lib/action_view/template/renderable.rb:7 def initialize(renderable); end - # source://actionview//lib/action_view/template/renderable.rb#19 + # pkg:gem/actionview#lib/action_view/template/renderable.rb:25 def format; end - # source://actionview//lib/action_view/template/renderable.rb#11 + # pkg:gem/actionview#lib/action_view/template/renderable.rb:11 def identifier; end - # source://actionview//lib/action_view/template/renderable.rb#15 + # pkg:gem/actionview#lib/action_view/template/renderable.rb:15 def render(context, *args); end end -# source://actionview//lib/action_view/template/sources.rb#5 +# pkg:gem/actionview#lib/action_view/template.rb:11 +ActionView::Template::STRICT_LOCALS_REGEX = T.let(T.unsafe(nil), Regexp) + +# SimpleType is mostly just a stub implementation for when Action View +# is used without Action Dispatch. +# +# pkg:gem/actionview#lib/action_view/template/types.rb:9 +class ActionView::Template::SimpleType + # pkg:gem/actionview#lib/action_view/template/types.rb:29 + def initialize(symbol); end + + # pkg:gem/actionview#lib/action_view/template/types.rb:43 + def ==(type); end + + # pkg:gem/actionview#lib/action_view/template/types.rb:38 + def ref; end + + # pkg:gem/actionview#lib/action_view/template/types.rb:27 + def symbol; end + + # pkg:gem/actionview#lib/action_view/template/types.rb:33 + def to_s; end + + # pkg:gem/actionview#lib/action_view/template/types.rb:36 + def to_str; end + + # pkg:gem/actionview#lib/action_view/template/types.rb:41 + def to_sym; end + + class << self + # pkg:gem/actionview#lib/action_view/template/types.rb:14 + def [](type); end + + # pkg:gem/actionview#lib/action_view/template/types.rb:12 + def symbols; end + + # pkg:gem/actionview#lib/action_view/template/types.rb:22 + def valid_symbols?(symbols); end + end +end + +# pkg:gem/actionview#lib/action_view/template/sources.rb:5 module ActionView::Template::Sources extend ::ActiveSupport::Autoload end -# source://actionview//lib/action_view/template/sources/file.rb#6 +# pkg:gem/actionview#lib/action_view/template/sources/file.rb:6 class ActionView::Template::Sources::File - # @return [File] a new instance of File - # - # source://actionview//lib/action_view/template/sources/file.rb#7 + # pkg:gem/actionview#lib/action_view/template/sources/file.rb:7 def initialize(filename); end - # source://actionview//lib/action_view/template/sources/file.rb#11 + # pkg:gem/actionview#lib/action_view/template/sources/file.rb:11 def to_s; end end -# source://actionview//lib/action_view/template/text.rb#6 +# = Action View Text Template +# +# pkg:gem/actionview#lib/action_view/template/text.rb:6 class ActionView::Template::Text - # @return [Text] a new instance of Text - # - # source://actionview//lib/action_view/template/text.rb#9 + # pkg:gem/actionview#lib/action_view/template/text.rb:9 def initialize(string); end - # source://actionview//lib/action_view/template/text.rb#27 + # pkg:gem/actionview#lib/action_view/template/text.rb:27 def format; end - # source://actionview//lib/action_view/template/text.rb#13 + # pkg:gem/actionview#lib/action_view/template/text.rb:13 def identifier; end - # source://actionview//lib/action_view/template/text.rb#13 + # pkg:gem/actionview#lib/action_view/template/text.rb:17 def inspect; end - # source://actionview//lib/action_view/template/text.rb#23 + # pkg:gem/actionview#lib/action_view/template/text.rb:23 def render(*args); end - # source://actionview//lib/action_view/template/text.rb#19 + # pkg:gem/actionview#lib/action_view/template/text.rb:19 def to_str; end - # source://actionview//lib/action_view/template/text.rb#7 + # pkg:gem/actionview#lib/action_view/template/text.rb:7 def type; end - # source://actionview//lib/action_view/template/text.rb#7 + # pkg:gem/actionview#lib/action_view/template/text.rb:7 def type=(_arg0); end end -# source://actionview//lib/action_view/template/types.rb#7 -module ActionView::Template::Types - class << self - # source://actionview//lib/action_view/template/types.rb#47 - def [](type); end - - # source://actionview//lib/action_view/template/types.rb#43 - def delegate_to(klass); end - - # source://actionview//lib/action_view/template/types.rb#51 - def symbols; end - - # Returns the value of attribute type_klass. - # - # source://actionview//lib/action_view/template/types.rb#41 - def type_klass; end - - # Sets the attribute type_klass - # - # @param value the value to set the attribute type_klass to. - # - # source://actionview//lib/action_view/template/types.rb#41 - def type_klass=(_arg0); end - end -end - -# source://actionview//lib/action_view/template/types.rb#8 -class ActionView::Template::Types::Type - # @return [Type] a new instance of Type - # - # source://actionview//lib/action_view/template/types.rb#21 - def initialize(symbol); end - - # source://actionview//lib/action_view/template/types.rb#35 - def ==(type); end - - # source://actionview//lib/action_view/template/types.rb#30 - def ref; end - - # Returns the value of attribute symbol. - # - # source://actionview//lib/action_view/template/types.rb#19 - def symbol; end - - # source://actionview//lib/action_view/template/types.rb#25 - def to_s; end - - # source://actionview//lib/action_view/template/types.rb#25 - def to_str; end - - # source://actionview//lib/action_view/template/types.rb#30 - def to_sym; end - - class << self - # source://actionview//lib/action_view/template/types.rb#11 - def [](type); end - end -end - -# source://actionview//lib/action_view/template/types.rb#9 -ActionView::Template::Types::Type::SET = T.let(T.unsafe(nil), T.untyped) +# pkg:gem/actionview#lib/action_view/template.rb:190 +ActionView::Template::Types = Mime -# source://actionview//lib/action_view/template_details.rb#4 +# pkg:gem/actionview#lib/action_view/template_details.rb:4 class ActionView::TemplateDetails - # @return [TemplateDetails] a new instance of TemplateDetails - # - # source://actionview//lib/action_view/template_details.rb#35 + # pkg:gem/actionview#lib/action_view/template_details.rb:35 def initialize(locale, handler, format, variant); end - # Returns the value of attribute format. - # - # source://actionview//lib/action_view/template_details.rb#33 + # pkg:gem/actionview#lib/action_view/template_details.rb:33 def format; end - # source://actionview//lib/action_view/template_details.rb#62 + # pkg:gem/actionview#lib/action_view/template_details.rb:62 def format_or_default; end - # Returns the value of attribute handler. - # - # source://actionview//lib/action_view/template_details.rb#33 + # pkg:gem/actionview#lib/action_view/template_details.rb:33 def handler; end - # source://actionview//lib/action_view/template_details.rb#58 + # pkg:gem/actionview#lib/action_view/template_details.rb:58 def handler_class; end - # Returns the value of attribute locale. - # - # source://actionview//lib/action_view/template_details.rb#33 + # pkg:gem/actionview#lib/action_view/template_details.rb:33 def locale; end - # @return [Boolean] - # - # source://actionview//lib/action_view/template_details.rb#42 + # pkg:gem/actionview#lib/action_view/template_details.rb:42 def matches?(requested); end - # source://actionview//lib/action_view/template_details.rb#49 + # pkg:gem/actionview#lib/action_view/template_details.rb:49 def sort_key_for(requested); end - # Returns the value of attribute variant. - # - # source://actionview//lib/action_view/template_details.rb#33 + # pkg:gem/actionview#lib/action_view/template_details.rb:33 def variant; end end -# source://actionview//lib/action_view/template_details.rb#5 +# pkg:gem/actionview#lib/action_view/template_details.rb:5 class ActionView::TemplateDetails::Requested - # @return [Requested] a new instance of Requested - # - # source://actionview//lib/action_view/template_details.rb#11 + # pkg:gem/actionview#lib/action_view/template_details.rb:11 def initialize(locale:, handlers:, formats:, variants:); end - # Returns the value of attribute formats. - # - # source://actionview//lib/action_view/template_details.rb#6 + # pkg:gem/actionview#lib/action_view/template_details.rb:6 def formats; end - # Returns the value of attribute formats_idx. - # - # source://actionview//lib/action_view/template_details.rb#7 + # pkg:gem/actionview#lib/action_view/template_details.rb:7 def formats_idx; end - # Returns the value of attribute handlers. - # - # source://actionview//lib/action_view/template_details.rb#6 + # pkg:gem/actionview#lib/action_view/template_details.rb:6 def handlers; end - # Returns the value of attribute handlers_idx. - # - # source://actionview//lib/action_view/template_details.rb#7 + # pkg:gem/actionview#lib/action_view/template_details.rb:7 def handlers_idx; end - # Returns the value of attribute locale. - # - # source://actionview//lib/action_view/template_details.rb#6 + # pkg:gem/actionview#lib/action_view/template_details.rb:6 def locale; end - # Returns the value of attribute locale_idx. - # - # source://actionview//lib/action_view/template_details.rb#7 + # pkg:gem/actionview#lib/action_view/template_details.rb:7 def locale_idx; end - # Returns the value of attribute variants. - # - # source://actionview//lib/action_view/template_details.rb#6 + # pkg:gem/actionview#lib/action_view/template_details.rb:6 def variants; end - # Returns the value of attribute variants_idx. - # - # source://actionview//lib/action_view/template_details.rb#7 + # pkg:gem/actionview#lib/action_view/template_details.rb:7 def variants_idx; end private - # source://actionview//lib/action_view/template_details.rb#28 + # pkg:gem/actionview#lib/action_view/template_details.rb:28 def build_idx_hash(arr); end end -# source://actionview//lib/action_view/template_details.rb#9 +# pkg:gem/actionview#lib/action_view/template_details.rb:9 ActionView::TemplateDetails::Requested::ANY_HASH = T.let(T.unsafe(nil), Hash) -# source://actionview//lib/action_view/template/error.rb#230 +# pkg:gem/actionview#lib/action_view/template/error.rb:254 ActionView::TemplateError = ActionView::Template::Error +# = Action View \TemplatePath +# # Represents a template path within ActionView's lookup and rendering system, # like "users/show" # # TemplatePath makes it convenient to convert between separate name, prefix, # partial arguments and the virtual path. # -# source://actionview//lib/action_view/template_path.rb#9 +# pkg:gem/actionview#lib/action_view/template_path.rb:11 class ActionView::TemplatePath - # @return [TemplatePath] a new instance of TemplatePath - # - # source://actionview//lib/action_view/template_path.rb#45 + # pkg:gem/actionview#lib/action_view/template_path.rb:47 def initialize(name, prefix, partial, virtual); end - # @return [Boolean] - # - # source://actionview//lib/action_view/template_path.rb#59 + # pkg:gem/actionview#lib/action_view/template_path.rb:64 def ==(other); end - # @return [Boolean] - # - # source://actionview//lib/action_view/template_path.rb#59 + # pkg:gem/actionview#lib/action_view/template_path.rb:61 def eql?(other); end - # source://actionview//lib/action_view/template_path.rb#55 + # pkg:gem/actionview#lib/action_view/template_path.rb:57 def hash; end - # Returns the value of attribute name. - # - # source://actionview//lib/action_view/template_path.rb#10 + # pkg:gem/actionview#lib/action_view/template_path.rb:12 def name; end - # Returns the value of attribute partial. - # - # source://actionview//lib/action_view/template_path.rb#10 + # pkg:gem/actionview#lib/action_view/template_path.rb:12 def partial; end - # Returns the value of attribute partial. - # - # source://actionview//lib/action_view/template_path.rb#10 + # pkg:gem/actionview#lib/action_view/template_path.rb:13 def partial?; end - # Returns the value of attribute prefix. - # - # source://actionview//lib/action_view/template_path.rb#10 + # pkg:gem/actionview#lib/action_view/template_path.rb:12 def prefix; end - # Returns the value of attribute virtual. - # - # source://actionview//lib/action_view/template_path.rb#10 + # pkg:gem/actionview#lib/action_view/template_path.rb:55 def to_s; end - # Returns the value of attribute virtual. - # - # source://actionview//lib/action_view/template_path.rb#10 + # pkg:gem/actionview#lib/action_view/template_path.rb:54 def to_str; end - # Returns the value of attribute virtual. - # - # source://actionview//lib/action_view/template_path.rb#10 + # pkg:gem/actionview#lib/action_view/template_path.rb:12 def virtual; end - # Returns the value of attribute virtual. - # - # source://actionview//lib/action_view/template_path.rb#10 + # pkg:gem/actionview#lib/action_view/template_path.rb:14 def virtual_path; end class << self # Convert name, prefix, and partial into a TemplatePath # - # source://actionview//lib/action_view/template_path.rb#41 + # pkg:gem/actionview#lib/action_view/template_path.rb:43 def build(name, prefix, partial); end # Build a TemplatePath form a virtual path # - # source://actionview//lib/action_view/template_path.rb#26 + # pkg:gem/actionview#lib/action_view/template_path.rb:28 def parse(virtual); end # Convert name, prefix, and partial into a virtual path string # - # source://actionview//lib/action_view/template_path.rb#15 + # pkg:gem/actionview#lib/action_view/template_path.rb:17 def virtual(name, prefix, partial); end end end -# source://actionview//lib/action_view/renderer/template_renderer.rb#4 +# pkg:gem/actionview#lib/action_view/renderer/template_renderer.rb:4 class ActionView::TemplateRenderer < ::ActionView::AbstractRenderer - # source://actionview//lib/action_view/renderer/template_renderer.rb#5 + # pkg:gem/actionview#lib/action_view/renderer/template_renderer.rb:5 def render(context, options); end private # Determine the template to be rendered using the given options. # - # source://actionview//lib/action_view/renderer/template_renderer.rb#16 + # pkg:gem/actionview#lib/action_view/renderer/template_renderer.rb:16 def determine_template(options); end # This is the method which actually finds the layout using details in the lookup # context object. If no layout is found, it checks if at least a layout with # the given name exists across all details before raising the error. # - # source://actionview//lib/action_view/renderer/template_renderer.rb#87 + # pkg:gem/actionview#lib/action_view/renderer/template_renderer.rb:88 def find_layout(layout, keys, formats); end # Renders the given template. A string representing the layout can be # supplied as well. # - # source://actionview//lib/action_view/renderer/template_renderer.rb#58 + # pkg:gem/actionview#lib/action_view/renderer/template_renderer.rb:58 def render_template(view, template, layout_name, locals); end - # source://actionview//lib/action_view/renderer/template_renderer.rb#70 + # pkg:gem/actionview#lib/action_view/renderer/template_renderer.rb:71 def render_with_layout(view, template, path, locals); end - # source://actionview//lib/action_view/renderer/template_renderer.rb#91 + # pkg:gem/actionview#lib/action_view/renderer/template_renderer.rb:92 def resolve_layout(layout, keys, formats); end end # = Action View Test Case # -# source://actionview//lib/action_view/test_case.rb#12 +# Read more about ActionView::TestCase in {Testing Rails Applications}[https://guides.rubyonrails.org/testing.html#testing-view-partials] +# in the guides. +# +# pkg:gem/actionview#lib/action_view/test_case.rb:15 class ActionView::TestCase < ::ActiveSupport::TestCase + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions include ::AbstractController::Helpers include ::ActiveSupport::Benchmarkable include ::ActionView::Helpers::ActiveModelHelper @@ -14894,11 +13583,12 @@ class ActionView::TestCase < ::ActiveSupport::TestCase include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper - include ::ActionView::Helpers::UrlHelper - include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::AssetTagHelper include ::ActionView::Helpers::AtomFeedHelper include ::ActionView::Helpers::CacheHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::ControllerHelper include ::ActionView::Helpers::CspHelper include ::ActionView::Helpers::CsrfHelper @@ -14906,14 +13596,6 @@ class ActionView::TestCase < ::ActiveSupport::TestCase include ::ActionView::Helpers::DebugHelper include ::ActionView::Helpers::TextHelper include ::ActionView::Helpers::FormTagHelper - include ::ActionDispatch::TestProcess::FixtureFile - include ::ActionDispatch::TestProcess - include ::ActionDispatch::Assertions::ResponseAssertions - include ::ActionDispatch::Assertions::RoutingAssertions - include ::Rails::Dom::Testing::Assertions::DomAssertions - include ::Rails::Dom::Testing::Assertions::SelectorAssertions - include ::Rails::Dom::Testing::Assertions - include ::ActionDispatch::Assertions include ::ActionController::TemplateAssertions include ::ActionView::Context include ::ActionDispatch::Routing::PolymorphicRoutes @@ -14927,73 +13609,81 @@ class ActionView::TestCase < ::ActiveSupport::TestCase include ::ActionView::Helpers::RenderingHelper include ::ActionView::Helpers include ::ActiveSupport::Testing::ConstantLookup - include ::ActionDispatch::Routing::UrlFor include ::ActionView::RoutingUrlFor include ::ActionView::TestCase::Behavior + extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + extend ::AbstractController::Helpers::Resolution extend ::AbstractController::Helpers::ClassMethods extend ::ActionView::Helpers::UrlHelper::ClassMethods extend ::ActionView::Helpers::SanitizeHelper::ClassMethods extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods extend ::ActionView::TestCase::Behavior::ClassMethods - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#11 + # pkg:gem/actionview#lib/action_view/test_case.rb:446 def _helper_methods; end - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#11 + # pkg:gem/actionview#lib/action_view/test_case.rb:446 def _helper_methods=(_arg0); end - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#11 + # pkg:gem/actionview#lib/action_view/test_case.rb:446 def _helper_methods?; end - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 + # pkg:gem/actionview#lib/action_view/test_case.rb:446 def debug_missing_translation; end - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 + # pkg:gem/actionview#lib/action_view/test_case.rb:446 def debug_missing_translation=(val); end class << self - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 + # pkg:gem/actionview#lib/action_view/test_case.rb:202 def __callbacks; end - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#11 + # pkg:gem/actionview#lib/action_view/test_case.rb:446 def _helper_methods; end - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#11 + # pkg:gem/actionview#lib/action_view/test_case.rb:446 def _helper_methods=(value); end - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#11 + # pkg:gem/actionview#lib/action_view/test_case.rb:446 def _helper_methods?; end - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#15 + # pkg:gem/actionview#lib/action_view/test_case.rb:446 def _helpers; end - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 + # pkg:gem/actionview#lib/action_view/test_case.rb:200 + def content_class; end + + # pkg:gem/actionview#lib/action_view/test_case.rb:200 + def content_class=(value); end + + # pkg:gem/actionview#lib/action_view/test_case.rb:200 + def content_class?; end + + # pkg:gem/actionview#lib/action_view/test_case.rb:446 def debug_missing_translation; end - # source://actionview//lib/action_view/helpers/translation_helper.rb#18 + # pkg:gem/actionview#lib/action_view/test_case.rb:446 def debug_missing_translation=(val); end end end -# source://actionview//lib/action_view/test_case.rb#42 +# pkg:gem/actionview#lib/action_view/test_case.rb:45 module ActionView::TestCase::Behavior include ::ActionDispatch::TestProcess::FixtureFile include ::ActionDispatch::TestProcess - include ::ActionDispatch::Assertions::ResponseAssertions - include ::ActionDispatch::Assertions::RoutingAssertions include ::Rails::Dom::Testing::Assertions::DomAssertions include ::Rails::Dom::Testing::Assertions::SelectorAssertions include ::Rails::Dom::Testing::Assertions - include ::ActionDispatch::Assertions include ::ActionController::TemplateAssertions include ::ActionView::Context include ::ActionDispatch::Routing::PolymorphicRoutes include ::ActionView::ModelNaming include ::ActionView::RecordIdentifier - include ::ActionDispatch::Routing::UrlFor include ::ActionView::RoutingUrlFor extend ::ActiveSupport::Concern include GeneratedInstanceMethods + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions include ::AbstractController::Helpers include ::ActionView::Helpers::UrlHelper include ::ActionView::Helpers::SanitizeHelper @@ -15005,104 +13695,127 @@ module ActionView::TestCase::Behavior include ::ActiveSupport::Testing::ConstantLookup mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods mixes_in_class_methods ::AbstractController::Helpers::ClassMethods mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods mixes_in_class_methods ::ActionView::TestCase::Behavior::ClassMethods - # source://actionview//lib/action_view/test_case.rb#136 + # :method: rendered + # + # Returns the content rendered by the last +render+ call. + # + # The returned object behaves like a string but also exposes a number of methods + # that allows you to parse the content string in formats registered using + # .register_parser. + # + # By default includes the following parsers: + # + # +.html+ + # + # Parse the rendered content String into HTML. By default, this means + # a Nokogiri::XML::Node. + # + # test "renders HTML" do + # article = Article.create!(title: "Hello, world") + # + # render partial: "articles/article", locals: { article: article } + # + # assert_pattern { rendered.html.at("main h1") => { content: "Hello, world" } } + # end + # + # To parse the rendered content into a Capybara::Simple::Node, + # re-register an :html parser with a call to + # Capybara.string: + # + # register_parser :html, -> rendered { Capybara.string(rendered) } + # + # test "renders HTML" do + # article = Article.create!(title: "Hello, world") + # + # render partial: article + # + # rendered.html.assert_css "h1", text: "Hello, world" + # end + # + # +.json+ + # + # Parse the rendered content String into JSON. By default, this means + # a ActiveSupport::HashWithIndifferentAccess. + # + # test "renders JSON" do + # article = Article.create!(title: "Hello, world") + # + # render formats: :json, partial: "articles/article", locals: { article: article } + # + # assert_pattern { rendered.json => { title: "Hello, world" } } + # end + # + # pkg:gem/actionview#lib/action_view/test_case.rb:297 def _routes; end - # source://actionview//lib/action_view/test_case.rb#122 + # pkg:gem/actionview#lib/action_view/test_case.rb:232 def config; end - # Returns the value of attribute controller. - # - # source://actionview//lib/action_view/test_case.rb#60 + # pkg:gem/actionview#lib/action_view/test_case.rb:63 def controller; end - # Sets the attribute controller - # - # @param value the value to set the attribute controller to. - # - # source://actionview//lib/action_view/test_case.rb#60 + # pkg:gem/actionview#lib/action_view/test_case.rb:63 def controller=(_arg0); end - # source://actionview//lib/action_view/test_case.rb#59 + # pkg:gem/actionview#lib/action_view/test_case.rb:62 def lookup_context(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute output_buffer. - # - # source://actionview//lib/action_view/test_case.rb#60 + # pkg:gem/actionview#lib/action_view/test_case.rb:63 def output_buffer; end - # Sets the attribute output_buffer - # - # @param value the value to set the attribute output_buffer to. - # - # source://actionview//lib/action_view/test_case.rb#60 + # pkg:gem/actionview#lib/action_view/test_case.rb:63 def output_buffer=(_arg0); end - # source://actionview//lib/action_view/test_case.rb#126 + # pkg:gem/actionview#lib/action_view/test_case.rb:236 def render(options = T.unsafe(nil), local_assigns = T.unsafe(nil), &block); end - # Returns the value of attribute rendered. - # - # source://actionview//lib/action_view/test_case.rb#60 + # pkg:gem/actionview#lib/action_view/test_case.rb:63 def rendered; end - # Sets the attribute rendered - # - # @param value the value to set the attribute rendered to. - # - # source://actionview//lib/action_view/test_case.rb#60 + # pkg:gem/actionview#lib/action_view/test_case.rb:63 def rendered=(_arg0); end - # source://actionview//lib/action_view/test_case.rb#132 + # pkg:gem/actionview#lib/action_view/test_case.rb:242 def rendered_views; end - # Returns the value of attribute request. - # - # source://actionview//lib/action_view/test_case.rb#60 + # pkg:gem/actionview#lib/action_view/test_case.rb:63 def request; end - # Sets the attribute request - # - # @param value the value to set the attribute request to. - # - # source://actionview//lib/action_view/test_case.rb#60 + # pkg:gem/actionview#lib/action_view/test_case.rb:63 def request=(_arg0); end - # source://actionview//lib/action_view/test_case.rb#108 + # pkg:gem/actionview#lib/action_view/test_case.rb:220 def setup_with_controller; end private - # source://actionview//lib/action_view/test_case.rb#251 + # pkg:gem/actionview#lib/action_view/test_case.rb:403 def _user_defined_ivars; end - # The instance of ActionView::Base that is used by +render+. - # - # source://actionview//lib/action_view/test_case.rb#207 + # pkg:gem/actionview#lib/action_view/test_case.rb:366 def _view; end # Need to experiment if this priority is the best one: rendered => output_buffer # - # source://actionview//lib/action_view/test_case.rb#183 + # pkg:gem/actionview#lib/action_view/test_case.rb:331 def document_root_element; end - # source://actionview//lib/action_view/test_case.rb#265 - def method_missing(selector, *args); end + # pkg:gem/actionview#lib/action_view/test_case.rb:417 + def method_missing(selector, *_arg1, **_arg2, &_arg3); end - # @return [Boolean] - # - # source://actionview//lib/action_view/test_case.rb#281 + # pkg:gem/actionview#lib/action_view/test_case.rb:433 def respond_to_missing?(name, include_private = T.unsafe(nil)); end # The instance of ActionView::Base that is used by +render+. # - # source://actionview//lib/action_view/test_case.rb#207 + # pkg:gem/actionview#lib/action_view/test_case.rb:355 def view; end # Returns a Hash of instance variables and their values, as defined by @@ -15110,13 +13823,16 @@ module ActionView::TestCase::Behavior # rendered. This is generally intended for internal use and extension # frameworks. # - # source://actionview//lib/action_view/test_case.rb#259 + # pkg:gem/actionview#lib/action_view/test_case.rb:411 def view_assigns; end module GeneratedClassMethods def _helper_methods; end def _helper_methods=(value); end def _helper_methods?; end + def content_class; end + def content_class=(value); end + def content_class?; end end module GeneratedInstanceMethods @@ -15126,223 +13842,269 @@ module ActionView::TestCase::Behavior end end -# source://actionview//lib/action_view/test_case.rb#62 +# pkg:gem/actionview#lib/action_view/test_case.rb:65 module ActionView::TestCase::Behavior::ClassMethods - # source://actionview//lib/action_view/test_case.rb#72 + # pkg:gem/actionview#lib/action_view/test_case.rb:164 def determine_default_helper_class(name); end - # source://actionview//lib/action_view/test_case.rb#92 + # pkg:gem/actionview#lib/action_view/test_case.rb:183 def helper_class; end - # Sets the attribute helper_class - # - # @param value the value to set the attribute helper_class to. - # - # source://actionview//lib/action_view/test_case.rb#90 + # pkg:gem/actionview#lib/action_view/test_case.rb:181 def helper_class=(_arg0); end - # source://actionview//lib/action_view/test_case.rb#78 + # pkg:gem/actionview#lib/action_view/test_case.rb:170 def helper_method(*methods); end - # source://actionview//lib/action_view/test_case.rb#96 + # pkg:gem/actionview#lib/action_view/test_case.rb:66 + def inherited(descendant); end + + # pkg:gem/actionview#lib/action_view/test_case.rb:187 def new(*_arg0); end - # source://actionview//lib/action_view/test_case.rb#63 + # Register a callable to parse rendered content for a given template + # format. + # + # Each registered parser will also define a +#rendered.[FORMAT]+ helper + # method, where +[FORMAT]+ corresponds to the value of the + # +format+ argument. + # + # By default, ActionView::TestCase defines parsers for: + # + # * +:html+ - returns an instance of +Nokogiri::XML::Node+ + # * +:json+ - returns an instance of ActiveSupport::HashWithIndifferentAccess + # + # These pre-registered parsers also define corresponding helpers: + # + # * +:html+ - defines +rendered.html+ + # * +:json+ - defines +rendered.json+ + # + # ==== Parameters + # + # [+format+] + # The name (as a +Symbol+) of the format used to render the content. + # + # [+callable+] + # The parser. A callable object that accepts the rendered string as + # its sole argument. Alternatively, the parser can be specified as a + # block. + # + # ==== Examples + # + # test "renders HTML" do + # article = Article.create!(title: "Hello, world") + # + # render partial: "articles/article", locals: { article: article } + # + # assert_pattern { rendered.html.at("main h1") => { content: "Hello, world" } } + # end + # + # test "renders JSON" do + # article = Article.create!(title: "Hello, world") + # + # render formats: :json, partial: "articles/article", locals: { article: article } + # + # assert_pattern { rendered.json => { title: "Hello, world" } } + # end + # + # To parse the rendered content into RSS, register a call to +RSS::Parser.parse+: + # + # register_parser :rss, -> rendered { RSS::Parser.parse(rendered) } + # + # test "renders RSS" do + # article = Article.create!(title: "Hello, world") + # + # render formats: :rss, partial: article + # + # assert_equal "Hello, world", rendered.rss.items.last.title + # end + # + # To parse the rendered content into a +Capybara::Simple::Node+, + # re-register an +:html+ parser with a call to +Capybara.string+: + # + # register_parser :html, -> rendered { Capybara.string(rendered) } + # + # test "renders HTML" do + # article = Article.create!(title: "Hello, world") + # + # render partial: article + # + # rendered.html.assert_css "h1", text: "Hello, world" + # end + # + # pkg:gem/actionview#lib/action_view/test_case.rb:148 + def register_parser(format, callable = T.unsafe(nil), &block); end + + # pkg:gem/actionview#lib/action_view/test_case.rb:155 def tests(helper_class); end private - # source://actionview//lib/action_view/test_case.rb#102 + # pkg:gem/actionview#lib/action_view/test_case.rb:193 def include_helper_modules!; end end -# source://actionview//lib/action_view/test_case.rb#220 +# pkg:gem/actionview#lib/action_view/test_case.rb:368 ActionView::TestCase::Behavior::INTERNAL_IVARS = T.let(T.unsafe(nil), Array) -# source://actionview//lib/action_view/test_case.rb#187 +# pkg:gem/actionview#lib/action_view/test_case.rb:335 module ActionView::TestCase::Behavior::Locals - # source://actionview//lib/action_view/test_case.rb#190 + # pkg:gem/actionview#lib/action_view/test_case.rb:338 def render(options = T.unsafe(nil), local_assigns = T.unsafe(nil)); end - # Returns the value of attribute rendered_views. - # - # source://actionview//lib/action_view/test_case.rb#188 + # pkg:gem/actionview#lib/action_view/test_case.rb:336 def rendered_views; end - # Sets the attribute rendered_views - # - # @param value the value to set the attribute rendered_views to. - # - # source://actionview//lib/action_view/test_case.rb#188 + # pkg:gem/actionview#lib/action_view/test_case.rb:336 def rendered_views=(_arg0); end end -# Need to experiment if this priority is the best one: rendered => output_buffer -# -# source://actionview//lib/action_view/test_case.rb#141 +# pkg:gem/actionview#lib/action_view/test_case.rb:301 +class ActionView::TestCase::Behavior::RenderedViewContent < ::String + # pkg:gem/actionview#lib/action_view/test_case.rb:150 + def html; end + + # pkg:gem/actionview#lib/action_view/test_case.rb:150 + def json; end +end + +# pkg:gem/actionview#lib/action_view/test_case.rb:304 class ActionView::TestCase::Behavior::RenderedViewsCollection - # @return [RenderedViewsCollection] a new instance of RenderedViewsCollection - # - # source://actionview//lib/action_view/test_case.rb#142 + # pkg:gem/actionview#lib/action_view/test_case.rb:305 def initialize; end - # source://actionview//lib/action_view/test_case.rb#146 + # pkg:gem/actionview#lib/action_view/test_case.rb:309 def add(view, locals); end - # source://actionview//lib/action_view/test_case.rb#151 + # pkg:gem/actionview#lib/action_view/test_case.rb:314 def locals_for(view); end - # source://actionview//lib/action_view/test_case.rb#155 + # pkg:gem/actionview#lib/action_view/test_case.rb:318 def rendered_views; end - # @return [Boolean] - # - # source://actionview//lib/action_view/test_case.rb#159 + # pkg:gem/actionview#lib/action_view/test_case.rb:322 def view_rendered?(view, expected_locals); end end -# source://actionview//lib/action_view/test_case.rb#0 +# pkg:gem/actionview#lib/action_view/test_case.rb:446 module ActionView::TestCase::HelperMethods - # source://actionview//lib/action_view/test_case.rb#175 + # pkg:gem/actionview#lib/action_view/test_case.rb:214 def _test_case; end - # source://actionview//lib/action_view/test_case.rb#171 + # pkg:gem/actionview#lib/action_view/test_case.rb:210 def protect_against_forgery?; end end -# source://actionview//lib/action_view/test_case.rb#13 +# pkg:gem/actionview#lib/action_view/test_case.rb:16 class ActionView::TestCase::TestController < ::ActionController::Base include ::ActionDispatch::TestProcess::FixtureFile include ::ActionDispatch::TestProcess - # @return [TestController] a new instance of TestController - # - # source://actionview//lib/action_view/test_case.rb#31 + # pkg:gem/actionview#lib/action_view/test_case.rb:34 def initialize; end - # source://actionview//lib/action_view/test_case.rb#23 + # pkg:gem/actionview#lib/action_view/test_case.rb:26 def controller_path=(path); end - # Returns the value of attribute params. - # - # source://actionview//lib/action_view/test_case.rb#16 + # pkg:gem/actionview#lib/action_view/test_case.rb:19 def params; end - # Sets the attribute params - # - # @param value the value to set the attribute params to. - # - # source://actionview//lib/action_view/test_case.rb#16 + # pkg:gem/actionview#lib/action_view/test_case.rb:19 def params=(_arg0); end - # Returns the value of attribute request. - # - # source://actionview//lib/action_view/test_case.rb#16 + # pkg:gem/actionview#lib/action_view/test_case.rb:19 def request; end - # Sets the attribute request - # - # @param value the value to set the attribute request to. - # - # source://actionview//lib/action_view/test_case.rb#16 + # pkg:gem/actionview#lib/action_view/test_case.rb:19 def request=(_arg0); end - # Returns the value of attribute response. - # - # source://actionview//lib/action_view/test_case.rb#16 + # pkg:gem/actionview#lib/action_view/test_case.rb:19 def response; end - # Sets the attribute response - # - # @param value the value to set the attribute response to. - # - # source://actionview//lib/action_view/test_case.rb#16 + # pkg:gem/actionview#lib/action_view/test_case.rb:19 def response=(_arg0); end private - # source://actionview//lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end + # pkg:gem/actionview#lib/action_view/test_case.rb:16 + def _layout(lookup_context, formats, keys); end class << self - # source://actionview//lib/action_view/test_case.rb#27 + # pkg:gem/actionview#lib/action_view/test_case.rb:30 def controller_name; end # Overrides AbstractController::Base#controller_path # - # source://actionview//lib/action_view/test_case.rb#20 + # pkg:gem/actionview#lib/action_view/test_case.rb:23 def controller_path; end # Overrides AbstractController::Base#controller_path # - # source://actionview//lib/action_view/test_case.rb#20 + # pkg:gem/actionview#lib/action_view/test_case.rb:23 def controller_path=(_arg0); end - # source://actionpack/7.0.8.7/lib/action_controller/metal.rb#210 + # pkg:gem/actionview#lib/action_view/test_case.rb:16 def middleware_stack; end end end -# source://actionview//lib/action_view/unbound_template.rb#6 +# pkg:gem/actionview#lib/action_view/unbound_template.rb:6 class ActionView::UnboundTemplate - # @return [UnboundTemplate] a new instance of UnboundTemplate - # - # source://actionview//lib/action_view/unbound_template.rb#10 + # pkg:gem/actionview#lib/action_view/unbound_template.rb:10 def initialize(source, identifier, details:, virtual_path:); end - # source://actionview//lib/action_view/unbound_template.rb#20 + # pkg:gem/actionview#lib/action_view/unbound_template.rb:20 def bind_locals(locals); end - # Returns the value of attribute details. - # - # source://actionview//lib/action_view/unbound_template.rb#7 + # pkg:gem/actionview#lib/action_view/unbound_template.rb:44 + def built_templates; end + + # pkg:gem/actionview#lib/action_view/unbound_template.rb:7 def details; end - # source://actionview//lib/action_view/unbound_template.rb#8 + # pkg:gem/actionview#lib/action_view/unbound_template.rb:8 def format(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/unbound_template.rb#8 + # pkg:gem/actionview#lib/action_view/unbound_template.rb:8 def handler(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/unbound_template.rb#8 + # pkg:gem/actionview#lib/action_view/unbound_template.rb:8 def locale(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/unbound_template.rb#8 + # pkg:gem/actionview#lib/action_view/unbound_template.rb:8 def variant(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute virtual_path. - # - # source://actionview//lib/action_view/unbound_template.rb#7 + # pkg:gem/actionview#lib/action_view/unbound_template.rb:7 def virtual_path; end private - # source://actionview//lib/action_view/unbound_template.rb#39 + # pkg:gem/actionview#lib/action_view/unbound_template.rb:49 def build_template(locals); end - # source://actionview//lib/action_view/unbound_template.rb#53 + # pkg:gem/actionview#lib/action_view/unbound_template.rb:63 def normalize_locals(locals); end end -# source://actionview//lib/action_view/gem_version.rb#9 +# pkg:gem/actionview#lib/action_view/gem_version.rb:9 module ActionView::VERSION; end -# source://actionview//lib/action_view/gem_version.rb#10 +# pkg:gem/actionview#lib/action_view/gem_version.rb:10 ActionView::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) -# source://actionview//lib/action_view/gem_version.rb#11 +# pkg:gem/actionview#lib/action_view/gem_version.rb:11 ActionView::VERSION::MINOR = T.let(T.unsafe(nil), Integer) -# source://actionview//lib/action_view/gem_version.rb#13 +# pkg:gem/actionview#lib/action_view/gem_version.rb:13 ActionView::VERSION::PRE = T.let(T.unsafe(nil), String) -# source://actionview//lib/action_view/gem_version.rb#15 +# pkg:gem/actionview#lib/action_view/gem_version.rb:15 ActionView::VERSION::STRING = T.let(T.unsafe(nil), String) -# source://actionview//lib/action_view/gem_version.rb#12 +# pkg:gem/actionview#lib/action_view/gem_version.rb:12 ActionView::VERSION::TINY = T.let(T.unsafe(nil), Integer) -# source://actionview//lib/action_view/view_paths.rb#4 +# pkg:gem/actionview#lib/action_view/view_paths.rb:4 module ActionView::ViewPaths extend ::ActiveSupport::Concern @@ -15350,10 +14112,10 @@ module ActionView::ViewPaths # The prefixes used in render "foo" shortcuts. # - # source://actionview//lib/action_view/view_paths.rb#90 + # pkg:gem/actionview#lib/action_view/view_paths.rb:81 def _prefixes; end - # source://actionview//lib/action_view/view_paths.rb#11 + # pkg:gem/actionview#lib/action_view/view_paths.rb:11 def any_templates?(*_arg0, **_arg1, &_arg2); end # Append a path to the list of view paths for the current LookupContext. @@ -15363,29 +14125,29 @@ module ActionView::ViewPaths # the default view path. You may also provide a custom view path # (see ActionView::PathSet for more information) # - # source://actionview//lib/action_view/view_paths.rb#112 + # pkg:gem/actionview#lib/action_view/view_paths.rb:103 def append_view_path(path); end - # source://actionview//lib/action_view/view_paths.rb#102 + # pkg:gem/actionview#lib/action_view/view_paths.rb:93 def details_for_lookup; end - # source://actionview//lib/action_view/view_paths.rb#11 + # pkg:gem/actionview#lib/action_view/view_paths.rb:11 def formats(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/view_paths.rb#11 + # pkg:gem/actionview#lib/action_view/view_paths.rb:11 def formats=(arg); end - # source://actionview//lib/action_view/view_paths.rb#11 + # pkg:gem/actionview#lib/action_view/view_paths.rb:11 def locale(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/view_paths.rb#11 + # pkg:gem/actionview#lib/action_view/view_paths.rb:11 def locale=(arg); end # LookupContext is the object responsible for holding all # information required for looking up templates, i.e. view paths and # details. Check ActionView::LookupContext for more information. # - # source://actionview//lib/action_view/view_paths.rb#97 + # pkg:gem/actionview#lib/action_view/view_paths.rb:88 def lookup_context; end # Prepend a path to the list of view paths for the current LookupContext. @@ -15395,36 +14157,28 @@ module ActionView::ViewPaths # the default view path. You may also provide a custom view path # (see ActionView::PathSet for more information) # - # source://actionview//lib/action_view/view_paths.rb#122 + # pkg:gem/actionview#lib/action_view/view_paths.rb:113 def prepend_view_path(path); end - # source://actionview//lib/action_view/view_paths.rb#11 + # pkg:gem/actionview#lib/action_view/view_paths.rb:11 def template_exists?(*_arg0, **_arg1, &_arg2); end - # source://actionview//lib/action_view/view_paths.rb#11 + # pkg:gem/actionview#lib/action_view/view_paths.rb:11 def view_paths(*_arg0, **_arg1, &_arg2); end - - class << self - # source://actionview//lib/action_view/view_paths.rb#84 - def all_view_paths; end - - # source://actionview//lib/action_view/view_paths.rb#76 - def get_view_paths(klass); end - - # source://actionview//lib/action_view/view_paths.rb#80 - def set_view_paths(klass, paths); end - end end -# source://actionview//lib/action_view/view_paths.rb#14 +# pkg:gem/actionview#lib/action_view/view_paths.rb:14 module ActionView::ViewPaths::ClassMethods - # source://actionview//lib/action_view/view_paths.rb#23 + # pkg:gem/actionview#lib/action_view/view_paths.rb:31 + def _build_view_paths(paths); end + + # pkg:gem/actionview#lib/action_view/view_paths.rb:23 def _prefixes; end - # source://actionview//lib/action_view/view_paths.rb#15 + # pkg:gem/actionview#lib/action_view/view_paths.rb:15 def _view_paths; end - # source://actionview//lib/action_view/view_paths.rb#19 + # pkg:gem/actionview#lib/action_view/view_paths.rb:19 def _view_paths=(paths); end # Append a path to the list of view paths for this controller. @@ -15434,7 +14188,7 @@ module ActionView::ViewPaths::ClassMethods # the default view path. You may also provide a custom view path # (see ActionView::PathSet for more information) # - # source://actionview//lib/action_view/view_paths.rb#37 + # pkg:gem/actionview#lib/action_view/view_paths.rb:44 def append_view_path(path); end # Prepend a path to the list of view paths for this controller. @@ -15444,12 +14198,12 @@ module ActionView::ViewPaths::ClassMethods # the default view path. You may also provide a custom view path # (see ActionView::PathSet for more information) # - # source://actionview//lib/action_view/view_paths.rb#47 + # pkg:gem/actionview#lib/action_view/view_paths.rb:54 def prepend_view_path(path); end # A list of all of the default view paths for this controller. # - # source://actionview//lib/action_view/view_paths.rb#52 + # pkg:gem/actionview#lib/action_view/view_paths.rb:59 def view_paths; end # Set the view paths. @@ -15458,7 +14212,7 @@ module ActionView::ViewPaths::ClassMethods # * paths - If a PathSet is provided, use that; # otherwise, process the parameter into a PathSet. # - # source://actionview//lib/action_view/view_paths.rb#61 + # pkg:gem/actionview#lib/action_view/view_paths.rb:68 def view_paths=(paths); end private @@ -15466,27 +14220,15 @@ module ActionView::ViewPaths::ClassMethods # Override this method in your controller if you want to change paths prefixes for finding views. # Prefixes defined here will still be added to parents' ._prefixes. # - # source://actionview//lib/action_view/view_paths.rb#68 + # pkg:gem/actionview#lib/action_view/view_paths.rb:75 def local_prefixes; end end -# source://actionview//lib/action_view/template/error.rb#13 +# pkg:gem/actionview#lib/action_view/template/error.rb:14 class ActionView::WrongEncodingError < ::ActionView::EncodingError - # @return [WrongEncodingError] a new instance of WrongEncodingError - # - # source://actionview//lib/action_view/template/error.rb#14 + # pkg:gem/actionview#lib/action_view/template/error.rb:15 def initialize(string, encoding); end - # source://actionview//lib/action_view/template/error.rb#18 + # pkg:gem/actionview#lib/action_view/template/error.rb:19 def message; end end - -module ERB::Escape - private - - def html_escape(_arg0); end - - class << self - def html_escape(_arg0); end - end -end diff --git a/sorbet/rbi/gems/activesupport@7.0.8.7.rbi b/sorbet/rbi/gems/activesupport@7.2.3.1.rbi similarity index 55% rename from sorbet/rbi/gems/activesupport@7.0.8.7.rbi rename to sorbet/rbi/gems/activesupport@7.2.3.1.rbi index 4cc1dc49d..11a362cb3 100644 --- a/sorbet/rbi/gems/activesupport@7.0.8.7.rbi +++ b/sorbet/rbi/gems/activesupport@7.2.3.1.rbi @@ -4,118 +4,147 @@ # This is an autogenerated file for types exported from the `activesupport` gem. # Please instead update this file by running `bin/tapioca gem activesupport`. -# source://activesupport//lib/active_support/lazy_load_hooks.rb#3 + +# :include: ../README.rdoc +# -- +# The JSON gem adds a few modules to Ruby core classes containing :to_json definition, overwriting +# their default behavior. That said, we need to define the basic to_json method in all of them, +# otherwise they will always use to_json gem implementation, which is backwards incompatible in +# several cases (for instance, the JSON implementation for Hash does not work) with inheritance. +# +# On the other hand, we should avoid conflict with ::JSON.{generate,dump}(obj). Unfortunately, the +# JSON gem's encoder relies on its own to_json implementation to encode objects. Since it always +# passes a ::JSON::State object as the only argument to to_json, we can detect that and forward the +# calls to the original to_json method. +# +# It should be noted that when using ::JSON.{generate,dump} directly, ActiveSupport's encoder is +# bypassed completely. This means that as_json won't be invoked and the JSON gem will simply +# ignore any options it does not natively understand. This also means that ::JSON.{generate,dump} +# should give exactly the same results with or without Active Support. +# -- +# Defines the standard inflection rules. These are the starting point for +# new projects and are not considered complete. The current set of inflection +# rules is frozen. This means, we do not change them to become more complete. +# This is a safety measure to keep existing applications from breaking. +# ++ +# +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/json/decoding.rb:9 def parse_json_times; end - # source://activesupport//lib/active_support/json/decoding.rb#9 + # pkg:gem/activesupport#lib/active_support/json/decoding.rb:9 def parse_json_times=(val); end - # source://activesupport//lib/active_support.rb#94 + # pkg:gem/activesupport#lib/active_support.rb:99 def test_order; end - # source://activesupport//lib/active_support.rb#94 + # pkg:gem/activesupport#lib/active_support.rb:99 def test_order=(val); end - # source://activesupport//lib/active_support.rb#95 + # pkg:gem/activesupport#lib/active_support.rb:100 def test_parallelization_threshold; end - # source://activesupport//lib/active_support.rb#95 + # pkg:gem/activesupport#lib/active_support.rb:100 def test_parallelization_threshold=(val); end class << self - # source://activesupport//lib/active_support.rb#99 + # pkg:gem/activesupport#lib/active_support.rb:105 def cache_format_version; end - # source://activesupport//lib/active_support.rb#103 + # pkg:gem/activesupport#lib/active_support.rb:109 def cache_format_version=(value); end - # source://activesupport//lib/active_support.rb#88 + # pkg:gem/activesupport#lib/active_support/deprecator.rb:4 + def deprecator; end + + # pkg:gem/activesupport#lib/active_support.rb:93 def eager_load!; end - # source://activesupport//lib/active_support.rb#97 + # pkg:gem/activesupport#lib/active_support.rb:103 def error_reporter; end - # source://activesupport//lib/active_support.rb#97 + # pkg:gem/activesupport#lib/active_support.rb:103 def error_reporter=(_arg0); end - # source://activesupport//lib/active_support/json/encoding.rb#8 + # pkg:gem/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 + # pkg:gem/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. + # Returns the currently loaded version of Active Support as a +Gem::Version+. # - # source://activesupport//lib/active_support/gem_version.rb#5 + # pkg:gem/activesupport#lib/active_support/gem_version.rb:5 def gem_version; end - # source://activesupport//lib/active_support/json/encoding.rb#8 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:8 def json_encoder(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/json/encoding.rb#8 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:8 def json_encoder=(arg); end - # source://activesupport//lib/active_support/json/decoding.rb#9 + # pkg:gem/activesupport#lib/active_support/json/decoding.rb:9 def parse_json_times; end - # source://activesupport//lib/active_support/json/decoding.rb#9 + # pkg:gem/activesupport#lib/active_support/json/decoding.rb:9 def parse_json_times=(val); end - # source://activesupport//lib/active_support.rb#94 + # pkg:gem/activesupport#lib/active_support.rb:99 def test_order; end - # source://activesupport//lib/active_support.rb#94 + # pkg:gem/activesupport#lib/active_support.rb:99 def test_order=(val); end - # source://activesupport//lib/active_support.rb#95 + # pkg:gem/activesupport#lib/active_support.rb:100 def test_parallelization_threshold; end - # source://activesupport//lib/active_support.rb#95 + # pkg:gem/activesupport#lib/active_support.rb:100 def test_parallelization_threshold=(val); end - # source://activesupport//lib/active_support/json/encoding.rb#8 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:8 def time_precision(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/json/encoding.rb#8 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:8 def time_precision=(arg); end - # source://activesupport//lib/active_support.rb#107 + # pkg:gem/activesupport#lib/active_support.rb:113 def to_time_preserves_timezone; end - # source://activesupport//lib/active_support.rb#111 + # pkg:gem/activesupport#lib/active_support.rb:117 def to_time_preserves_timezone=(value); end - # source://activesupport//lib/active_support/json/encoding.rb#8 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:8 def use_standard_json_time_format=(arg); end - # source://activesupport//lib/active_support.rb#115 + # pkg:gem/activesupport#lib/active_support.rb:127 def utc_to_local_returns_utc_offset_times; end - # source://activesupport//lib/active_support.rb#119 + # pkg:gem/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. + # Returns the currently loaded version of Active Support as a +Gem::Version+. # - # source://activesupport//lib/active_support/version.rb#7 + # pkg:gem/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 +# To make an error actionable, include the +ActiveSupport::ActionableError+ # module and invoke the +action+ class macro to define the action. An action # needs a name and a block to execute. # -# source://activesupport//lib/active_support/actionable_error.rb#9 +# pkg:gem/activesupport#lib/active_support/actionable_error.rb:11 module ActiveSupport::ActionableError extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -124,10 +153,10 @@ module ActiveSupport::ActionableError mixes_in_class_methods ::ActiveSupport::ActionableError::ClassMethods class << self - # source://activesupport//lib/active_support/actionable_error.rb#18 + # pkg:gem/activesupport#lib/active_support/actionable_error.rb:20 def actions(error); end - # source://activesupport//lib/active_support/actionable_error.rb#27 + # pkg:gem/activesupport#lib/active_support/actionable_error.rb:29 def dispatch(error, name); end end @@ -144,7 +173,7 @@ module ActiveSupport::ActionableError end end -# source://activesupport//lib/active_support/actionable_error.rb#33 +# pkg:gem/activesupport#lib/active_support/actionable_error.rb:35 module ActiveSupport::ActionableError::ClassMethods # Defines an action that can resolve the error. # @@ -156,13 +185,15 @@ module ActiveSupport::ActionableError::ClassMethods # end # end # - # source://activesupport//lib/active_support/actionable_error.rb#43 + # pkg:gem/activesupport#lib/active_support/actionable_error.rb:45 def action(name, &block); end end -# source://activesupport//lib/active_support/actionable_error.rb#12 +# pkg:gem/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: # @@ -172,7 +203,7 @@ class ActiveSupport::ActionableError::NonActionable < ::StandardError; end # variants.tablet? # => true # variants.desktop? # => false # -# source://activesupport//lib/active_support/array_inquirer.rb#12 +# pkg:gem/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 @@ -187,26 +218,24 @@ class ActiveSupport::ArrayInquirer < ::Array # variants.any?('phone', 'desktop') # => true # variants.any?(:desktop, :watch) # => false # - # @return [Boolean] - # - # source://activesupport//lib/active_support/array_inquirer.rb#25 + # pkg:gem/activesupport#lib/active_support/array_inquirer.rb:27 def any?(*candidates); end private - # source://activesupport//lib/active_support/array_inquirer.rb#40 - def method_missing(name, *args); end + # pkg:gem/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#36 + # pkg:gem/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 +# \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: @@ -225,32 +254,26 @@ end # # MyLib.eager_load! # -# source://activesupport//lib/active_support/dependencies/autoload.rb#27 +# pkg:gem/activesupport#lib/active_support/dependencies/autoload.rb:29 module ActiveSupport::Autoload - # source://activesupport//lib/active_support/dependencies/autoload.rb#37 + # pkg:gem/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#57 + # pkg:gem/activesupport#lib/active_support/dependencies/autoload.rb:51 def autoload_at(path); end - # source://activesupport//lib/active_support/dependencies/autoload.rb#50 + # pkg:gem/activesupport#lib/active_support/dependencies/autoload.rb:44 def autoload_under(path); end - # source://activesupport//lib/active_support/dependencies/autoload.rb#75 - def autoloads; end - - # source://activesupport//lib/active_support/dependencies/autoload.rb#64 + # pkg:gem/activesupport#lib/active_support/dependencies/autoload.rb:58 def eager_autoload; end - # source://activesupport//lib/active_support/dependencies/autoload.rb#71 + # pkg:gem/activesupport#lib/active_support/dependencies/autoload.rb:65 def eager_load!; end - - class << self - # source://activesupport//lib/active_support/dependencies/autoload.rb#28 - def extended(base); end - 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 @@ -265,11 +288,12 @@ end # can focus on the rest. # # bc = ActiveSupport::BacktraceCleaner.new -# bc.add_filter { |line| line.gsub(Rails.root.to_s, '') } # strip the Rails.root prefix +# 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) +# 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 @@ -279,20 +303,19 @@ end # # Inspired by the Quiet Backtrace gem by thoughtbot. # -# source://activesupport//lib/active_support/backtrace_cleaner.rb#31 +# pkg:gem/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#32 + # pkg:gem/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" - # backtrace_cleaner.add_filter { |line| line.gsub(Rails.root, '') } + # # Will turn "/my/rails/root/app/models/person.rb" into "app/models/person.rb" + # root = "#{Rails.root}/" + # backtrace_cleaner.add_filter { |line| line.delete_prefix(root) } # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#60 + # pkg:gem/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+ @@ -301,60 +324,71 @@ class ActiveSupport::BacktraceCleaner # # Will reject all lines that include the word "puma", like "/gems/puma/server.rb" or "/app/my_puma_server/rb" # backtrace_cleaner.add_silencer { |line| /puma/.match?(line) } # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#69 + # pkg:gem/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#41 + # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:45 def clean(backtrace, kind = T.unsafe(nil)); end - # Returns the backtrace after all filters and silencers have been run - # against it. Filters run first, then silencers. + # Returns the frame with all filters applied. + # returns +nil+ if the frame was silenced. # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#41 + # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:61 + def clean_frame(frame, kind = T.unsafe(nil)); end + + # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:57 def filter(backtrace, kind = T.unsafe(nil)); end # Removes all filters, but leaves in the silencers. Useful if you suddenly # need to see entire filepaths in the backtrace that you had already # filtered out. # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#83 + # pkg:gem/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#76 + # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:99 def remove_silencers!; end private - # source://activesupport//lib/active_support/backtrace_cleaner.rb#90 + # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:127 + def add_core_silencer; end + + # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:118 def add_gem_filter; end - # source://activesupport//lib/active_support/backtrace_cleaner.rb#99 + # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:131 def add_gem_silencer; end - # source://activesupport//lib/active_support/backtrace_cleaner.rb#103 + # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:135 def add_stdlib_silencer; end - # source://activesupport//lib/active_support/backtrace_cleaner.rb#107 + # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:139 def filter_backtrace(backtrace); end - # source://activesupport//lib/active_support/backtrace_cleaner.rb#123 + # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:113 + def initialize_copy(_other); end + + # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:155 def noise(backtrace); end - # source://activesupport//lib/active_support/backtrace_cleaner.rb#115 + # pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:147 def silence(backtrace); end end -# source://activesupport//lib/active_support/backtrace_cleaner.rb#88 +# pkg:gem/activesupport#lib/active_support/backtrace_cleaner.rb:111 ActiveSupport::BacktraceCleaner::FORMATTED_GEMS_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://activesupport//lib/active_support/benchmarkable.rb#7 +# = \Benchmarkable +# +# pkg:gem/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 @@ -386,19 +420,270 @@ module ActiveSupport::Benchmarkable # <%= expensive_and_chatty_files_operation %> # <% end %> # - # source://activesupport//lib/active_support/benchmarkable.rb#37 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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] +# +# pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:74 +class ActiveSupport::BroadcastLogger + include ::ActiveSupport::LoggerSilence + include ::ActiveSupport::LoggerThreadSafeLevel + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:81 + def initialize(*loggers); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 + def <<(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 + 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)) + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:92 + def broadcast_to(*loggers); end + + # Returns all the logger that are part of this broadcast. + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:78 + def broadcasts; end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 + def close(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 + def debug(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to +Logger::DEBUG+ for the whole broadcast. + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:146 + def debug!; end + + # True if the log level allows entries with severity +Logger::DEBUG+ to be written + # to at least one broadcast. False otherwise. + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:141 + def debug?; end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 + def error(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to +Logger::ERROR+ for the whole broadcast. + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:179 + def error!; end + + # True if the log level allows entries with severity +Logger::ERROR+ to be written + # to at least one broadcast. False otherwise. + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:174 + def error?; end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 + def fatal(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to +Logger::FATAL+ for the whole broadcast. + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:190 + def fatal!; end + + # True if the log level allows entries with severity +Logger::FATAL+ to be written + # to at least one broadcast. False otherwise. + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:185 + def fatal?; end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 + def formatter(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 + def formatter=(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 + def info(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to +Logger::INFO+ for the whole broadcast. + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:157 + def info!; end + + # True if the log level allows entries with severity +Logger::INFO+ to be written + # to at least one broadcast. False otherwise. + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:152 + def info?; end + + # Returns the lowest level of all the loggers in the broadcast. + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:135 + def level; end + + # Returns the lowest level of all the loggers in the broadcast. + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 + def level=(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:113 + def local_level; end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:107 + def local_level=(level); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 + def log(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:79 + def progname; end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:79 + def progname=(_arg0); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 + def sev_threshold=(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:75 + def silencer; end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:75 + 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) + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:103 + def stop_broadcasting_to(logger); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 + def unknown(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:127 + def warn(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to +Logger::WARN+ for the whole broadcast. + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:168 + def warn!; end + + # True if the log level allows entries with severity +Logger::WARN+ to be written + # to at least one broadcast. False otherwise. + # + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:163 + def warn?; end + + private + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:202 + def dispatch(method, *args, **kwargs, &block); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:194 + def initialize_copy(other); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:222 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:234 + def respond_to_missing?(method, include_all); end + + class << self + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:75 + def silencer; end + + # pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:75 + def silencer=(val); end + end +end + +# pkg:gem/activesupport#lib/active_support/broadcast_logger.rb:121 +ActiveSupport::BroadcastLogger::LOGGER_METHODS = T.let(T.unsafe(nil), Array) + # See ActiveSupport::Cache::Store for documentation. # -# source://activesupport//lib/active_support/cache.rb#16 +# pkg:gem/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 @@ -414,19 +699,13 @@ module ActiveSupport::Cache # # The +key+ argument can also respond to +cache_key+ or +to_param+. # - # source://activesupport//lib/active_support/cache.rb#100 + # pkg:gem/activesupport#lib/active_support/cache.rb:112 def expand_cache_key(key, namespace = T.unsafe(nil)); end - # Returns the value of attribute format_version. - # - # source://activesupport//lib/active_support/cache.rb#41 + # pkg:gem/activesupport#lib/active_support/cache.rb:59 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#41 + # pkg:gem/activesupport#lib/active_support/cache.rb:59 def format_version=(_arg0); end # Creates a new Store object according to the given options. @@ -455,78 +734,117 @@ module ActiveSupport::Cache # ActiveSupport::Cache.lookup_store(MyOwnCacheStore.new) # # => returns MyOwnCacheStore.new # - # source://activesupport//lib/active_support/cache.rb#68 + # pkg:gem/activesupport#lib/active_support/cache.rb:86 def lookup_store(store = T.unsafe(nil), *parameters); end private - # source://activesupport//lib/active_support/cache.rb#112 + # pkg:gem/activesupport#lib/active_support/cache.rb:124 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#124 + # pkg:gem/activesupport#lib/active_support/cache.rb:136 def retrieve_store_class(store); end end end -# source://activesupport//lib/active_support/cache.rb#833 -module ActiveSupport::Cache::Coders - class << self - # source://activesupport//lib/active_support/cache.rb#839 - def [](version); end - end +# pkg:gem/activesupport#lib/active_support/cache/coder.rb:7 +class ActiveSupport::Cache::Coder + # pkg:gem/activesupport#lib/active_support/cache/coder.rb:8 + def initialize(serializer, compressor, legacy_serializer: T.unsafe(nil)); end + + # pkg:gem/activesupport#lib/active_support/cache/coder.rb:14 + def dump(entry); end + + # pkg:gem/activesupport#lib/active_support/cache/coder.rb:20 + def dump_compressed(entry, threshold); end + + # pkg:gem/activesupport#lib/active_support/cache/coder.rb:48 + def load(dumped); end + + private + + # pkg:gem/activesupport#lib/active_support/cache/coder.rb:136 + def dump_version(version); end + + # pkg:gem/activesupport#lib/active_support/cache/coder.rb:144 + def load_version(dumped_version); end + + # pkg:gem/activesupport#lib/active_support/cache/coder.rb:121 + def signature?(dumped); end + + # pkg:gem/activesupport#lib/active_support/cache/coder.rb:129 + def try_compress(string, threshold); end + + # pkg:gem/activesupport#lib/active_support/cache/coder.rb:125 + def type_for_string(value); end end -# source://activesupport//lib/active_support/cache.rb#851 -module ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Loader +# pkg:gem/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.rb#854 - def load(payload); end +# pkg:gem/activesupport#lib/active_support/cache/coder.rb:98 +class ActiveSupport::Cache::Coder::LazyEntry < ::ActiveSupport::Cache::Entry + # pkg:gem/activesupport#lib/active_support/cache/coder.rb:99 + def initialize(serializer, compressor, payload, **options); end + + # pkg:gem/activesupport#lib/active_support/cache/coder.rb:114 + def mismatched?(version); end + + # pkg:gem/activesupport#lib/active_support/cache/coder.rb:106 + def value; end end -# The one set by Marshal. -# -# source://activesupport//lib/active_support/cache.rb#834 -ActiveSupport::Cache::Coders::MARK_61 = T.let(T.unsafe(nil), String) +# pkg:gem/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.rb#836 -ActiveSupport::Cache::Coders::MARK_70_COMPRESSED = T.let(T.unsafe(nil), String) +# pkg:gem/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.rb#835 -ActiveSupport::Cache::Coders::MARK_70_UNCOMPRESSED = T.let(T.unsafe(nil), String) +# pkg:gem/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.rb#874 -module ActiveSupport::Cache::Coders::Rails61Coder - include ::ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Rails61Coder +# pkg:gem/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.rb#878 - def dump(entry); end +# pkg:gem/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.rb#882 - def dump_compressed(entry, threshold); end -end +# pkg:gem/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.rb#887 -module ActiveSupport::Cache::Coders::Rails70Coder - include ::ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Rails70Coder +# pkg:gem/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.rb#891 - def dump(entry); end +# pkg:gem/activesupport#lib/active_support/cache/coder.rb:66 +ActiveSupport::Cache::Coder::SIGNATURE = T.let(T.unsafe(nil), String) - # source://activesupport//lib/active_support/cache.rb#895 - def dump_compressed(entry, threshold); end +# pkg:gem/activesupport#lib/active_support/cache/coder.rb:96 +ActiveSupport::Cache::Coder::STRING_DESERIALIZERS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/activesupport#lib/active_support/cache/coder.rb:70 +ActiveSupport::Cache::Coder::STRING_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/activesupport#lib/active_support/cache/coder.rb:86 +class ActiveSupport::Cache::Coder::StringDeserializer + # pkg:gem/activesupport#lib/active_support/cache/coder.rb:87 + def initialize(encoding); end + + # pkg:gem/activesupport#lib/active_support/cache/coder.rb:91 + def load(payload); end end -# source://activesupport//lib/active_support/cache.rb#27 +# pkg:gem/activesupport#lib/active_support/cache.rb:46 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. +# +# pkg:gem/activesupport#lib/active_support/cache.rb:50 +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 @@ -535,207 +853,213 @@ ActiveSupport::Cache::DEFAULT_COMPRESS_LIMIT = T.let(T.unsafe(nil), Integer) # Since cache entries in most instances will be serialized, the internals of this class are highly optimized # using short instance variable names that are lazily defined. # -# source://activesupport//lib/active_support/cache.rb#916 +# pkg:gem/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.rb#927 + # pkg:gem/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.rb#963 + # pkg:gem/activesupport#lib/active_support/cache/entry.rb:61 def bytesize; end - # source://activesupport//lib/active_support/cache.rb#978 + # pkg:gem/activesupport#lib/active_support/cache/entry.rb:76 def compressed(compress_threshold); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache.rb#974 + # pkg:gem/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.rb#1008 + # pkg:gem/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.rb#945 + # pkg:gem/activesupport#lib/active_support/cache/entry.rb:43 def expired?; end - # source://activesupport//lib/active_support/cache.rb#949 + # pkg:gem/activesupport#lib/active_support/cache/entry.rb:47 def expires_at; end - # source://activesupport//lib/active_support/cache.rb#953 + # pkg:gem/activesupport#lib/active_support/cache/entry.rb:51 def expires_at=(value); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache.rb#1002 + # pkg:gem/activesupport#lib/active_support/cache/entry.rb:100 def local?; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache.rb#939 + # pkg:gem/activesupport#lib/active_support/cache/entry.rb:37 def mismatched?(version); end - # source://activesupport//lib/active_support/cache.rb#1018 + # pkg:gem/activesupport#lib/active_support/cache/entry.rb:116 def pack; end - # source://activesupport//lib/active_support/cache.rb#935 + # pkg:gem/activesupport#lib/active_support/cache/entry.rb:33 def value; end - # Returns the value of attribute version. - # - # source://activesupport//lib/active_support/cache.rb#923 + # pkg:gem/activesupport#lib/active_support/cache/entry.rb:21 def version; end private - # source://activesupport//lib/active_support/cache.rb#1025 + # pkg:gem/activesupport#lib/active_support/cache/entry.rb:127 + def marshal_load(payload); end + + # pkg:gem/activesupport#lib/active_support/cache/entry.rb:123 def uncompress(value); end class << self - # source://activesupport//lib/active_support/cache.rb#918 + # pkg:gem/activesupport#lib/active_support/cache/entry.rb:16 def unpack(members); end end end -# A cache store implementation which stores everything on the filesystem. +# = \File \Cache \Store # -# FileStore implements the Strategy::LocalCache strategy which implements -# an in-memory cache inside of a block. +# A cache store implementation which stores everything on the filesystem. # -# source://activesupport//lib/active_support/cache/file_store.rb#13 +# pkg:gem/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#21 + # pkg:gem/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#14 + # pkg:gem/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#41 + # pkg:gem/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#34 + # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:33 def clear(options = T.unsafe(nil)); end - # Decrements an already existing integer value that is stored in the cache. - # If the key is not found nothing is done. + # Decrement a cached integer value. Returns the updated value. # - # source://activesupport//lib/active_support/cache/file_store.rb#57 - def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + # 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 + # + # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:75 + def decrement(name, amount = T.unsafe(nil), **options); end - # source://activesupport//lib/active_support/cache/file_store.rb#61 + # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:79 def delete_matched(matcher, options = T.unsafe(nil)); end - # Increments an already existing integer value that is stored in the cache. - # If the key is not found nothing is done. + # Increment a cached integer value. Returns the updated value. # - # source://activesupport//lib/active_support/cache/file_store.rb#51 - def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + # 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 + # + # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:60 + def increment(name, amount = T.unsafe(nil), **options); end + + # pkg:gem/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#160 + # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:185 def delete_empty_directories(dir); end - # source://activesupport//lib/active_support/cache/file_store.rb#98 + # pkg:gem/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#169 + # pkg:gem/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#154 + # pkg:gem/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#113 + # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:138 def lock_file(file_name, &block); end - # Modifies the amount of an already existing integer value that is stored in the cache. - # If the key is not found nothing is done. + # 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#187 + # pkg:gem/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#127 + # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:152 def normalize_key(key, options); end - # source://activesupport//lib/active_support/cache/file_store.rb#73 + # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:96 def read_entry(key, **options); end - # source://activesupport//lib/active_support/cache/file_store.rb#80 + # pkg:gem/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#173 + # pkg:gem/activesupport#lib/active_support/cache/file_store.rb:198 def search_dir(dir, &callback); end - # source://activesupport//lib/active_support/cache/file_store.rb#87 + # pkg:gem/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#91 + # pkg:gem/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#27 + # pkg:gem/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#16 +# pkg:gem/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#17 +# pkg:gem/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 +# 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#18 +# pkg:gem/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#19 +# max is 1024, plus some room +# +# pkg:gem/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 +# 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 +# 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. # @@ -744,129 +1068,141 @@ ActiveSupport::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array) # 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 +# 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. +# +MemoryStore+ is thread-safe. # -# source://activesupport//lib/active_support/cache/memory_store.rb#26 +# pkg:gem/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#48 + # pkg:gem/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#75 + # pkg:gem/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#67 + # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:93 def clear(options = T.unsafe(nil)); end - # Decrement an integer value in the cache. + # Decrement a cached integer value. Returns the updated value. # - # source://activesupport//lib/active_support/cache/memory_store.rb#117 - def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + # 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 + # + # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:164 + def decrement(name, amount = T.unsafe(nil), **options); end # Deletes cache entries if the cache key matches a given pattern. # - # source://activesupport//lib/active_support/cache/memory_store.rb#122 + # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:169 def delete_matched(matcher, options = T.unsafe(nil)); end - # Increment an integer value in the cache. + # Increment a cached integer value. Returns the updated value. # - # source://activesupport//lib/active_support/cache/memory_store.rb#112 - def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + # 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 + # + # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:149 + def increment(name, amount = T.unsafe(nil), **options); end - # source://activesupport//lib/active_support/cache/memory_store.rb#133 + # pkg:gem/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#88 + # pkg:gem/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#107 + # pkg:gem/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#139 + # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:187 def synchronize(&block); end private - # source://activesupport//lib/active_support/cache/memory_store.rb#150 + # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:194 def cached_size(key, payload); end - # source://activesupport//lib/active_support/cache/memory_store.rb#146 - def default_coder; end - - # source://activesupport//lib/active_support/cache/memory_store.rb#183 + # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:227 def delete_entry(key, **options); end - # source://activesupport//lib/active_support/cache/memory_store.rb#191 - def modify_value(name, amount, 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+. + # + # pkg:gem/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#154 + # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:198 def read_entry(key, **options); end - # source://activesupport//lib/active_support/cache/memory_store.rb#166 + # pkg:gem/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#62 + # pkg:gem/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#27 +# pkg:gem/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#30 + # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:32 def dump(entry); end - # source://activesupport//lib/active_support/cache/memory_store.rb#35 + # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:40 def dump_compressed(entry, threshold); end - # source://activesupport//lib/active_support/cache/memory_store.rb#41 + # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:45 def load(entry); end -end -# source://activesupport//lib/active_support/cache/memory_store.rb#144 -ActiveSupport::Cache::MemoryStore::PER_ENTRY_OVERHEAD = T.let(T.unsafe(nil), Integer) + private -# source://activesupport//lib/active_support/cache.rb#817 -module ActiveSupport::Cache::NullCoder - extend ::ActiveSupport::Cache::NullCoder + # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:56 + def dump_value(value); end - # source://activesupport//lib/active_support/cache.rb#820 - def dump(entry); end + # pkg:gem/activesupport#lib/active_support/cache/memory_store.rb:64 + def load_value(string); end +end - # source://activesupport//lib/active_support/cache.rb#824 - def dump_compressed(entry, threshold); end +# pkg:gem/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.rb#828 - def load(payload); end -end +# pkg:gem/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. @@ -875,88 +1211,194 @@ end # be cached inside blocks that utilize this strategy. See # ActiveSupport::Cache::Strategy::LocalCache for more details. # -# source://activesupport//lib/active_support/cache/null_store.rb#12 +# pkg:gem/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#81 - def cleanup(**options); end + # pkg:gem/activesupport#lib/active_support/cache/null_store.rb:25 + def cleanup(options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#75 - def clear(**options); end + # pkg:gem/activesupport#lib/active_support/cache/null_store.rb:22 + def clear(options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#100 + # pkg:gem/activesupport#lib/active_support/cache/null_store.rb:31 def decrement(name, amount = T.unsafe(nil), **options); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#87 + # pkg:gem/activesupport#lib/active_support/cache/null_store.rb:34 def delete_matched(matcher, options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#93 + # pkg:gem/activesupport#lib/active_support/cache/null_store.rb:28 def increment(name, amount = T.unsafe(nil), **options); end + # pkg:gem/activesupport#lib/active_support/cache/null_store.rb:37 + def inspect; end + private - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#147 + # pkg:gem/activesupport#lib/active_support/cache/null_store.rb:57 def delete_entry(key, **_arg1); end - # source://activesupport//lib/active_support/cache/null_store.rb#36 + # pkg:gem/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#108 + # pkg:gem/activesupport#lib/active_support/cache/null_store.rb:46 def read_serialized_entry(key, raw: T.unsafe(nil), **options); end - # source://activesupport//lib/active_support/cache/null_store.rb#43 + # pkg:gem/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#138 + # pkg:gem/activesupport#lib/active_support/cache/null_store.rb:53 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#16 + # pkg:gem/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#30 +# pkg:gem/activesupport#lib/active_support/cache.rb:42 ActiveSupport::Cache::OPTION_ALIASES = T.let(T.unsafe(nil), Hash) -# 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") -# 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. -# +# pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:8 +module ActiveSupport::Cache::SerializerWithFallback + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:17 + def load(dumped); end + + private + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:39 + def marshal_load(payload); end + + class << self + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:9 + def [](format); end + end +end + +# pkg:gem/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 + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:88 + def _load(marked); end + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:73 + def dump(entry); end + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:77 + def dump_compressed(entry, threshold); end + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:94 + def dumped?(dumped); end +end + +# pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:71 +ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback::MARK_COMPRESSED = T.let(T.unsafe(nil), String) + +# pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:70 +ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback::MARK_UNCOMPRESSED = T.let(T.unsafe(nil), String) + +# pkg:gem/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 + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:109 + def _load(dumped); end + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:105 + def dump(value); end + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:113 + def dumped?(dumped); end +end + +# pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:103 +ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# pkg:gem/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 + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:126 + def _load(dumped); end + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:122 + def dump(value); end + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:130 + def dumped?(dumped); end + + private + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:135 + def available?; end +end + +# pkg:gem/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 + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:57 + def _load(entry); end + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:49 + def dump(entry); end + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:53 + def dump_compressed(entry, threshold); end + + # pkg:gem/activesupport#lib/active_support/cache/serializer_with_fallback.rb:61 + def dumped?(dumped); end +end + +# pkg:gem/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 @@ -966,25 +1408,81 @@ ActiveSupport::Cache::OPTION_ALIASES = T.let(T.unsafe(nil), Hash) # 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#175 +# pkg:gem/activesupport#lib/active_support/cache.rb:189 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. - # * +:coder+ - Replaces the default cache entry serialization mechanism - # with a custom one. The +coder+ must respond to +dump+ and +load+. - # Using a custom coder disables automatic compression. + # [+: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#211 + # pkg:gem/activesupport#lib/active_support/cache.rb:296 def initialize(options = T.unsafe(nil)); end # Cleans up the cache by removing expired entries. @@ -993,9 +1491,7 @@ class ActiveSupport::Cache::Store # # Some implementations may not support this method. # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#582 + # pkg:gem/activesupport#lib/active_support/cache.rb:748 def cleanup(options = T.unsafe(nil)); end # Clears the entire cache. Be careful with this method since it could @@ -1005,9 +1501,7 @@ class ActiveSupport::Cache::Store # # Some implementations may not support this method. # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#592 + # pkg:gem/activesupport#lib/active_support/cache.rb:758 def clear(options = T.unsafe(nil)); end # Decrements an integer value in the cache. @@ -1016,16 +1510,15 @@ class ActiveSupport::Cache::Store # # Some implementations may not support this method. # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#573 + # pkg:gem/activesupport#lib/active_support/cache.rb:739 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. + # 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#514 + # pkg:gem/activesupport#lib/active_support/cache.rb:675 def delete(name, options = T.unsafe(nil)); end # Deletes all entries with keys matching the pattern. @@ -1034,25 +1527,22 @@ class ActiveSupport::Cache::Store # # Some implementations may not support this method. # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#555 + # pkg:gem/activesupport#lib/active_support/cache.rb:721 def delete_matched(matcher, options = T.unsafe(nil)); end - # Deletes multiple entries in the cache. + # 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#525 + # pkg:gem/activesupport#lib/active_support/cache.rb:688 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#537 + # pkg:gem/activesupport#lib/active_support/cache.rb:702 def exist?(name, options = T.unsafe(nil)); end # Fetches data from the cache, using the given key. If there is data in @@ -1075,8 +1565,8 @@ class ActiveSupport::Cache::Store # # ==== Options # - # Internally, +fetch+ calls #read_entry, and calls #write_entry on a cache - # miss. Thus, +fetch+ supports the same options as #read and #write. + # 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 @@ -1115,34 +1605,62 @@ class ActiveSupport::Cache::Store # 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.minute) + # # Set all values to expire after one second. + # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 1) # - # cache.write('foo', 'original value') + # cache.write("foo", "original value") # val_1 = nil # val_2 = nil - # sleep 60 + # p cache.read("foo") # => "original value" # - # Thread.new do - # val_1 = cache.fetch('foo', race_condition_ttl: 10.seconds) do + # 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' + # "new value 1" # end # end # - # Thread.new do - # val_2 = cache.fetch('foo', race_condition_ttl: 10.seconds) do - # 'new value 2' - # 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 # - # cache.fetch('foo') # => "original value" - # sleep 10 # First thread extended the life of cache by another 10 seconds - # cache.fetch('foo') # => "new value 1" - # val_1 # => "new value 1" - # val_2 # => "original value" + # 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#321 + # pkg:gem/activesupport#lib/active_support/cache.rb:445 def fetch(name, options = T.unsafe(nil), &block); end # Fetches data from the cache, using the given keys. If there is data in @@ -1162,7 +1680,8 @@ class ActiveSupport::Cache::Store # # => { "bim" => "bam", # # "unknown_key" => "Fallback value for key: unknown_key" } # - # Options are passed to the underlying cache implementation. For example: + # 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" @@ -1174,9 +1693,7 @@ class ActiveSupport::Cache::Store # cache.read("fizz") # # => nil # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/cache.rb#447 + # pkg:gem/activesupport#lib/active_support/cache.rb:594 def fetch_multi(*names); end # Increments an integer value in the cache. @@ -1185,30 +1702,32 @@ class ActiveSupport::Cache::Store # # Some implementations may not support this method. # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#564 + # pkg:gem/activesupport#lib/active_support/cache.rb:730 def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/cache.rb#176 + # pkg:gem/activesupport#lib/active_support/cache.rb:190 def logger; end - # source://activesupport//lib/active_support/cache.rb#176 + # pkg:gem/activesupport#lib/active_support/cache.rb:190 def logger=(val); end # Silences the logger within a block. # - # source://activesupport//lib/active_support/cache.rb#227 + # pkg:gem/activesupport#lib/active_support/cache.rb:323 def mute; end - # source://activesupport//lib/active_support/cache.rb#546 + # pkg:gem/activesupport#lib/active_support/cache.rb:712 def new_entry(value, options = T.unsafe(nil)); end - # Returns the value of attribute options. - # - # source://activesupport//lib/active_support/cache.rb#178 + # pkg:gem/activesupport#lib/active_support/cache.rb:193 def options; end + # pkg:gem/activesupport#lib/active_support/cache.rb:191 + def raise_on_invalid_cache_expiration_time; end + + # pkg:gem/activesupport#lib/active_support/cache.rb:191 + 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. @@ -1219,13 +1738,14 @@ class ActiveSupport::Cache::Store # # ==== 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#362 + # pkg:gem/activesupport#lib/active_support/cache.rb:499 def read(name, options = T.unsafe(nil)); end # Reads multiple values at once from the cache. Options can be passed @@ -1235,27 +1755,26 @@ class ActiveSupport::Cache::Store # # Returns a hash mapping the names provided to the values found. # - # source://activesupport//lib/active_support/cache.rb#395 + # pkg:gem/activesupport#lib/active_support/cache.rb:537 def read_multi(*names); end - # Returns the value of attribute silence. - # - # source://activesupport//lib/active_support/cache.rb#178 + # pkg:gem/activesupport#lib/active_support/cache.rb:193 def silence; end # Silences the logger. # - # source://activesupport//lib/active_support/cache.rb#221 + # pkg:gem/activesupport#lib/active_support/cache.rb:317 def silence!; end - # Returns the value of attribute silence. - # - # source://activesupport//lib/active_support/cache.rb#178 + # pkg:gem/activesupport#lib/active_support/cache.rb:194 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. @@ -1287,66 +1806,73 @@ class ActiveSupport::Cache::Store # # Other options will be handled by the specific cache store implementation. # - # source://activesupport//lib/active_support/cache.rb#502 + # pkg:gem/activesupport#lib/active_support/cache.rb:661 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#407 + # pkg:gem/activesupport#lib/active_support/cache.rb:551 def write_multi(hash, options = T.unsafe(nil)); end private - # source://activesupport//lib/active_support/cache.rb#597 - def default_coder; end + # pkg:gem/activesupport#lib/active_support/cache.rb:1006 + def _instrument(operation, multi: T.unsafe(nil), options: T.unsafe(nil), **payload, &block); end + + # pkg:gem/activesupport#lib/active_support/cache.rb:763 + 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#674 + # pkg:gem/activesupport#lib/active_support/cache.rb:849 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#680 + # pkg:gem/activesupport#lib/active_support/cache.rb:855 def delete_multi_entries(entries, **options); end - # source://activesupport//lib/active_support/cache.rb#641 - def deserialize_entry(payload); end + # pkg:gem/activesupport#lib/active_support/cache.rb:814 + 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#747 + # pkg:gem/activesupport#lib/active_support/cache.rb:969 def expanded_key(key); end - # source://activesupport//lib/active_support/cache.rb#768 + # pkg:gem/activesupport#lib/active_support/cache.rb:990 def expanded_version(key); end - # source://activesupport//lib/active_support/cache.rb#802 + # pkg:gem/activesupport#lib/active_support/cache.rb:1043 def get_entry_value(entry, name, options); end - # source://activesupport//lib/active_support/cache.rb#786 + # pkg:gem/activesupport#lib/active_support/cache.rb:1027 def handle_expired_entry(entry, key, options); end - # source://activesupport//lib/active_support/cache.rb#776 - def instrument(operation, key, options = T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/cache.rb:889 + def handle_invalid_expires_in(message); end + + # pkg:gem/activesupport#lib/active_support/cache.rb:998 + def instrument(operation, key, options = T.unsafe(nil), &block); end + + # pkg:gem/activesupport#lib/active_support/cache.rb:1002 + 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#605 + # pkg:gem/activesupport#lib/active_support/cache.rb:778 def key_matcher(pattern, options); end # Merges the default options with ones specific to a method call. # - # source://activesupport//lib/active_support/cache.rb#685 + # pkg:gem/activesupport#lib/active_support/cache.rb:860 def merged_options(call_options); end # Prefix the key with a namespace string: @@ -1359,178 +1885,186 @@ class ActiveSupport::Cache::Store # namespace_key 'foo', namespace: -> { 'cache' } # # => 'cache:foo' # - # source://activesupport//lib/active_support/cache.rb#725 + # pkg:gem/activesupport#lib/active_support/cache.rb:947 def namespace_key(key, options = T.unsafe(nil)); end - # Expands and namespaces the cache key. May be overridden by - # cache stores to do additional normalization. + # 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. # - # source://activesupport//lib/active_support/cache.rb#712 + # pkg:gem/activesupport#lib/active_support/cache.rb:931 def normalize_key(key, options = T.unsafe(nil)); end # Normalize aliased options to their canonical form # - # source://activesupport//lib/active_support/cache.rb#699 + # pkg:gem/activesupport#lib/active_support/cache.rb:900 def normalize_options(options); end - # source://activesupport//lib/active_support/cache.rb#764 + # pkg:gem/activesupport#lib/active_support/cache.rb:986 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#622 + # pkg:gem/activesupport#lib/active_support/cache.rb:795 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#647 + # pkg:gem/activesupport#lib/active_support/cache.rb:822 def read_multi_entries(names, **options); end - # source://activesupport//lib/active_support/cache.rb#807 - def save_block_result_to_cache(name, options); end + # pkg:gem/activesupport#lib/active_support/cache.rb:1048 + def save_block_result_to_cache(name, key, options); end - # source://activesupport//lib/active_support/cache.rb#632 + # pkg:gem/activesupport#lib/active_support/cache.rb:805 def serialize_entry(entry, **options); end + # pkg:gem/activesupport#lib/active_support/cache.rb:911 + 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#628 + # pkg:gem/activesupport#lib/active_support/cache.rb:801 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#666 + # pkg:gem/activesupport#lib/active_support/cache.rb:841 def write_multi_entries(hash, **options); end class << self - # source://activesupport//lib/active_support/cache.rb#176 + # pkg:gem/activesupport#lib/active_support/cache.rb:190 def logger; end - # source://activesupport//lib/active_support/cache.rb#176 + # pkg:gem/activesupport#lib/active_support/cache.rb:190 def logger=(val); end - private + # pkg:gem/activesupport#lib/active_support/cache.rb:191 + def raise_on_invalid_cache_expiration_time; end + + # pkg:gem/activesupport#lib/active_support/cache.rb:191 + def raise_on_invalid_cache_expiration_time=(val); end - # source://activesupport//lib/active_support/cache.rb#190 - def ensure_connection_pool_added!; end + private - # source://activesupport//lib/active_support/cache.rb#183 + # pkg:gem/activesupport#lib/active_support/cache.rb:201 def retrieve_pool_options(options); end end end -# source://activesupport//lib/active_support/cache.rb#34 +# pkg:gem/activesupport#lib/active_support/cache.rb:52 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#11 +# pkg:gem/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#81 - def cleanup(**options); end + # pkg:gem/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#75 - def clear(**options); end + # pkg:gem/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#100 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:104 def decrement(name, amount = T.unsafe(nil), **options); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#87 + # pkg:gem/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#93 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:111 + def fetch_multi(*names, &block); end + + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:97 def increment(name, amount = T.unsafe(nil), **options); end # Middleware class can be inserted as a Rack handler to be local cache for the # duration of request. # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#69 + # pkg:gem/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#63 + # pkg:gem/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#170 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:221 def bypass_local_cache(&block); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#147 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:198 def delete_entry(key, **_arg1); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#166 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:217 def local_cache; end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#162 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:213 def local_cache_key; end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#122 - def read_multi_entries(keys, **options); end + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:160 + def read_multi_entries(names, **options); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:146 def read_serialized_entry(key, raw: T.unsafe(nil), **options); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#174 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:225 def use_temporary_local_cache(temporary_cache); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#152 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:203 def write_cache_value(name, value, **options); end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#138 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:189 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#15 +# pkg:gem/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#18 + # pkg:gem/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#23 + # pkg:gem/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#31 +# pkg:gem/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#32 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:36 def initialize; end - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#36 + # pkg:gem/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#53 + # pkg:gem/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#57 + # pkg:gem/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#40 + # pkg:gem/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#44 + # pkg:gem/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#48 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache.rb:52 def write_entry(key, entry); end end @@ -1538,50 +2072,87 @@ end # This class wraps up local storage for middlewares. Only the middleware method should # construct them. # -# source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#13 +# pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache_middleware.rb:13 class ActiveSupport::Cache::Strategy::LocalCache::Middleware - # @return [Middleware] a new instance of Middleware - # - # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#16 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache_middleware.rb:16 def initialize(name, local_cache_key); end - # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#27 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache_middleware.rb:27 def call(env); end - # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#14 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache_middleware.rb:14 def local_cache_key; end - # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#14 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache_middleware.rb:14 def name; end - # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#22 + # pkg:gem/activesupport#lib/active_support/cache/strategy/local_cache_middleware.rb:22 def new(app); end end # These options mean something to all cache implementations. Individual cache # implementations may support additional options. # -# source://activesupport//lib/active_support/cache.rb#25 +# pkg:gem/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+. +# +# pkg:gem/activesupport#lib/active_support/cache.rb:1064 +class ActiveSupport::Cache::WriteOptions + # pkg:gem/activesupport#lib/active_support/cache.rb:1065 + def initialize(options); end + + # pkg:gem/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. + # + # pkg:gem/activesupport#lib/active_support/cache.rb:1096 + def expires_at=(expires_at); end + + # pkg:gem/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. + # + # pkg:gem/activesupport#lib/active_support/cache.rb:1084 + def expires_in=(expires_in); end + + # pkg:gem/activesupport#lib/active_support/cache.rb:1069 + def version; end + + # pkg:gem/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#47 +# pkg:gem/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#48 + # pkg:gem/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#54 + # pkg:gem/activesupport#lib/active_support/key_generator.rb:62 def generate_key(*args); end end -# Callbacks are code hooks that are run at key points in an object's life cycle. +# = 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 @@ -1633,7 +2204,7 @@ end # - save # saved # -# source://activesupport//lib/active_support/callbacks.rb#63 +# pkg:gem/activesupport#lib/active_support/callbacks.rb:65 module ActiveSupport::Callbacks extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -1665,8 +2236,8 @@ module ActiveSupport::Callbacks # 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#95 - def run_callbacks(kind); end + # pkg:gem/activesupport#lib/active_support/callbacks.rb:97 + def run_callbacks(kind, type = T.unsafe(nil)); end private @@ -1674,7 +2245,7 @@ module ActiveSupport::Callbacks # This can be overridden in ActiveSupport::Callbacks implementors in order # to provide better debugging/logging. # - # source://activesupport//lib/active_support/callbacks.rb#147 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:150 def halted_callback_hook(filter, name); end module GeneratedClassMethods @@ -1689,13 +2260,13 @@ module ActiveSupport::Callbacks end end -# source://activesupport//lib/active_support/callbacks.rb#71 +# pkg:gem/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#375 +# pkg:gem/activesupport#lib/active_support/callbacks.rb:337 module ActiveSupport::Callbacks::CallTemplate class << self # Filters support: @@ -1707,69 +2278,59 @@ module ActiveSupport::Callbacks::CallTemplate # All of these objects are converted into a CallTemplate and handled # the same after this point. # - # source://activesupport//lib/active_support/callbacks.rb#533 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:495 def build(filter, callback); end end end -# source://activesupport//lib/active_support/callbacks.rb#434 +# pkg:gem/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#435 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:397 def initialize(block); end - # source://activesupport//lib/active_support/callbacks.rb#439 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:401 def expand(target, value, block); end - # source://activesupport//lib/active_support/callbacks.rb#449 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:411 def inverted_lambda; end - # source://activesupport//lib/active_support/callbacks.rb#443 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:405 def make_lambda; end end -# source://activesupport//lib/active_support/callbacks.rb#456 +# pkg:gem/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#457 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:419 def initialize(block); end - # source://activesupport//lib/active_support/callbacks.rb#461 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:423 def expand(target, value, block); end - # source://activesupport//lib/active_support/callbacks.rb#471 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:433 def inverted_lambda; end - # source://activesupport//lib/active_support/callbacks.rb#465 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:427 def make_lambda; end end -# source://activesupport//lib/active_support/callbacks.rb#478 +# pkg:gem/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#479 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:441 def initialize(block); end - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/callbacks.rb#483 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:445 def expand(target, value, block); end - # source://activesupport//lib/active_support/callbacks.rb#495 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:457 def inverted_lambda; end - # source://activesupport//lib/active_support/callbacks.rb#488 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:450 def make_lambda; end end -# source://activesupport//lib/active_support/callbacks.rb#376 +# pkg:gem/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#377 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:339 def initialize(method); end # Return the parts needed to make this call, with the given @@ -1786,199 +2347,166 @@ class ActiveSupport::Callbacks::CallTemplate::MethodCall # The actual invocation is left up to the caller to minimize # call stack pollution. # - # source://activesupport//lib/active_support/callbacks.rb#394 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:356 def expand(target, value, block); end - # source://activesupport//lib/active_support/callbacks.rb#404 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:366 def inverted_lambda; end - # source://activesupport//lib/active_support/callbacks.rb#398 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:360 def make_lambda; end end -# source://activesupport//lib/active_support/callbacks.rb#411 +# pkg:gem/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#412 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:374 def initialize(target, method); end - # source://activesupport//lib/active_support/callbacks.rb#417 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:379 def expand(target, value, block); end - # source://activesupport//lib/active_support/callbacks.rb#427 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:389 def inverted_lambda; end - # source://activesupport//lib/active_support/callbacks.rb#421 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:383 def make_lambda; end end -# source://activesupport//lib/active_support/callbacks.rb#503 +# pkg:gem/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#504 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:466 def initialize(target); end - # source://activesupport//lib/active_support/callbacks.rb#508 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:470 def expand(target, value, block); end - # source://activesupport//lib/active_support/callbacks.rb#518 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:480 def inverted_lambda; end - # source://activesupport//lib/active_support/callbacks.rb#512 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:474 def make_lambda; end end -# source://activesupport//lib/active_support/callbacks.rb#280 +# pkg:gem/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#295 + # pkg:gem/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#330 + # pkg:gem/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#293 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:244 def chain_config; end - # source://activesupport//lib/active_support/callbacks.rb#344 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:282 + def compiled; end + + # pkg:gem/activesupport#lib/active_support/callbacks.rb:304 def current_scopes; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#320 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:273 def duplicates?(other); end - # Returns the value of attribute filter. - # - # source://activesupport//lib/active_support/callbacks.rb#293 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:244 def filter; end - # Returns the value of attribute kind. - # - # source://activesupport//lib/active_support/callbacks.rb#292 + # pkg:gem/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#292 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:243 def kind=(_arg0); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#316 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:269 def matches?(_kind, _filter); end - # source://activesupport//lib/active_support/callbacks.rb#304 + # pkg:gem/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#292 + # pkg:gem/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#292 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:243 def name=(_arg0); end private - # source://activesupport//lib/active_support/callbacks.rb#352 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:312 def check_conditionals(conditionals); end - # source://activesupport//lib/active_support/callbacks.rb#367 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:327 def conditions_lambdas; end class << self - # source://activesupport//lib/active_support/callbacks.rb#281 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:232 def build(chain, filter, kind, options); end end end -# source://activesupport//lib/active_support/callbacks.rb#349 +# pkg:gem/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#603 +# pkg:gem/activesupport#lib/active_support/callbacks.rb:568 class ActiveSupport::Callbacks::CallbackChain include ::Enumerable - # @return [CallbackChain] a new instance of CallbackChain - # - # source://activesupport//lib/active_support/callbacks.rb#608 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:573 def initialize(name, config); end - # source://activesupport//lib/active_support/callbacks.rb#654 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:633 def append(*callbacks); end - # source://activesupport//lib/active_support/callbacks.rb#633 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:601 def clear; end - # source://activesupport//lib/active_support/callbacks.rb#645 - def compile; end + # pkg:gem/activesupport#lib/active_support/callbacks.rb:615 + def compile(type); end - # Returns the value of attribute config. - # - # source://activesupport//lib/active_support/callbacks.rb#606 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:571 def config; end - # source://activesupport//lib/active_support/callbacks.rb#628 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:595 def delete(o); end - # source://activesupport//lib/active_support/callbacks.rb#619 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:585 def each(&block); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#621 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:587 def empty?; end - # source://activesupport//lib/active_support/callbacks.rb#620 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:586 def index(o); end - # source://activesupport//lib/active_support/callbacks.rb#623 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:589 def insert(index, o); end - # Returns the value of attribute name. - # - # source://activesupport//lib/active_support/callbacks.rb#606 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:571 def name; end - # source://activesupport//lib/active_support/callbacks.rb#658 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:637 def prepend(*callbacks); end protected - # Returns the value of attribute chain. - # - # source://activesupport//lib/active_support/callbacks.rb#663 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:642 def chain; end private - # source://activesupport//lib/active_support/callbacks.rb#666 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:645 def append_one(callback); end - # source://activesupport//lib/active_support/callbacks.rb#683 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:665 def default_terminator; end - # source://activesupport//lib/active_support/callbacks.rb#639 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:608 def initialize_copy(other); end - # source://activesupport//lib/active_support/callbacks.rb#672 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:652 def prepend_one(callback); end - # source://activesupport//lib/active_support/callbacks.rb#678 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:659 def remove_duplicates(callback); end end @@ -1986,53 +2514,45 @@ end # chaining them with nested lambda calls, see: # https://github.com/rails/rails/issues/18011 # -# source://activesupport//lib/active_support/callbacks.rb#556 +# pkg:gem/activesupport#lib/active_support/callbacks.rb:519 class ActiveSupport::Callbacks::CallbackSequence - # @return [CallbackSequence] a new instance of CallbackSequence - # - # source://activesupport//lib/active_support/callbacks.rb#557 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:520 def initialize(nested = T.unsafe(nil), call_template = T.unsafe(nil), user_conditions = T.unsafe(nil)); end - # source://activesupport//lib/active_support/callbacks.rb#571 - def after(&after); end + # pkg:gem/activesupport#lib/active_support/callbacks.rb:535 + def after(after); end - # source://activesupport//lib/active_support/callbacks.rb#576 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:541 def around(call_template, user_conditions); end - # source://activesupport//lib/active_support/callbacks.rb#566 - def before(&before); end + # pkg:gem/activesupport#lib/active_support/callbacks.rb:529 + def before(before); end - # source://activesupport//lib/active_support/callbacks.rb#590 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:555 def expand_call_template(arg, block); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#586 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:551 def final?; end - # source://activesupport//lib/active_support/callbacks.rb#598 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:563 def invoke_after(arg); end - # source://activesupport//lib/active_support/callbacks.rb#594 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:559 def invoke_before(arg); end - # Returns the value of attribute nested. - # - # source://activesupport//lib/active_support/callbacks.rb#584 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:549 def nested; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#580 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:545 def skip?(arg); end end -# source://activesupport//lib/active_support/callbacks.rb#695 +# pkg:gem/activesupport#lib/active_support/callbacks.rb:677 module ActiveSupport::Callbacks::ClassMethods # This is used internally to append, prepend and skip callbacks to the # CallbackChain. # - # source://activesupport//lib/active_support/callbacks.rb#705 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:687 def __update_callbacks(name); end # Define sets of events in the object life cycle that support callbacks. @@ -2112,17 +2632,17 @@ module ActiveSupport::Callbacks::ClassMethods # !, ? or =. # # Calling +define_callbacks+ multiple times with the same +names+ will - # overwrite previous callbacks registered with +set_callback+. + # overwrite previous callbacks registered with #set_callback. # - # source://activesupport//lib/active_support/callbacks.rb#917 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:902 def define_callbacks(*names); end - # source://activesupport//lib/active_support/callbacks.rb#696 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:678 def normalize_callback_params(filters, block); end # Remove all set callbacks for the given event. # - # source://activesupport//lib/active_support/callbacks.rb#827 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:812 def reset_callbacks(name); end # Install a callback for the given event. @@ -2139,7 +2659,7 @@ module ActiveSupport::Callbacks::ClassMethods # # 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+. + # 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 @@ -2170,13 +2690,16 @@ module ActiveSupport::Callbacks::ClassMethods # * :prepend - If +true+, the callback will be prepended to the # existing chain rather than appended. # - # source://activesupport//lib/active_support/callbacks.rb#756 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:738 def set_callback(name, *filter_list, &block); end - # Skip a previously set callback. Like +set_callback+, :if or + # 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 } @@ -2206,153 +2729,162 @@ module ActiveSupport::Callbacks::ClassMethods # 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#802 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:787 def skip_callback(name, *filter_list, &block); end protected - # source://activesupport//lib/active_support/callbacks.rb#948 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:933 def get_callbacks(name); end - # source://activesupport//lib/active_support/callbacks.rb#952 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:937 def set_callbacks(name, callbacks); end end -# source://activesupport//lib/active_support/callbacks.rb#150 +# pkg:gem/activesupport#lib/active_support/callbacks.rb:153 module ActiveSupport::Callbacks::Conditionals; end -# source://activesupport//lib/active_support/callbacks.rb#151 +# pkg:gem/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#152 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:155 def initialize(&block); end - # source://activesupport//lib/active_support/callbacks.rb#155 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:158 def call(target, value); end end -# source://activesupport//lib/active_support/callbacks.rb#159 +# pkg:gem/activesupport#lib/active_support/callbacks.rb:162 module ActiveSupport::Callbacks::Filters; end -# source://activesupport//lib/active_support/callbacks.rb#212 +# pkg:gem/activesupport#lib/active_support/callbacks.rb:194 class ActiveSupport::Callbacks::Filters::After - class << self - # source://activesupport//lib/active_support/callbacks.rb#213 - def build(callback_sequence, user_callback, user_conditions, chain_config); end + # pkg:gem/activesupport#lib/active_support/callbacks.rb:196 + def initialize(user_callback, user_conditions, chain_config); end - private + # pkg:gem/activesupport#lib/active_support/callbacks.rb:214 + def apply(callback_sequence); end - # source://activesupport//lib/active_support/callbacks.rb#255 - def conditional(callback_sequence, user_callback, user_conditions); end + # pkg:gem/activesupport#lib/active_support/callbacks.rb:202 + def call(env); end - # source://activesupport//lib/active_support/callbacks.rb#244 - def halting(callback_sequence, user_callback); end + # pkg:gem/activesupport#lib/active_support/callbacks.rb:195 + def halting; end - # source://activesupport//lib/active_support/callbacks.rb#229 - def halting_and_conditional(callback_sequence, user_callback, user_conditions); end + # pkg:gem/activesupport#lib/active_support/callbacks.rb:195 + def user_callback; end - # source://activesupport//lib/active_support/callbacks.rb#269 - def simple(callback_sequence, user_callback); end - end + # pkg:gem/activesupport#lib/active_support/callbacks.rb:195 + def user_conditions; end +end + +# pkg:gem/activesupport#lib/active_support/callbacks.rb:219 +class ActiveSupport::Callbacks::Filters::Around + # pkg:gem/activesupport#lib/active_support/callbacks.rb:220 + def initialize(user_callback, user_conditions); end + + # pkg:gem/activesupport#lib/active_support/callbacks.rb:225 + def apply(callback_sequence); end end -# source://activesupport//lib/active_support/callbacks.rb#162 +# pkg:gem/activesupport#lib/active_support/callbacks.rb:165 class ActiveSupport::Callbacks::Filters::Before - class << self - # source://activesupport//lib/active_support/callbacks.rb#163 - def build(callback_sequence, user_callback, user_conditions, chain_config, filter, name); end + # pkg:gem/activesupport#lib/active_support/callbacks.rb:166 + def initialize(user_callback, user_conditions, chain_config, filter, name); end - private + # pkg:gem/activesupport#lib/active_support/callbacks.rb:189 + def apply(callback_sequence); end - # source://activesupport//lib/active_support/callbacks.rb#192 - def halting(callback_sequence, user_callback, halted_lambda, filter, name); end + # pkg:gem/activesupport#lib/active_support/callbacks.rb:173 + def call(env); end - # source://activesupport//lib/active_support/callbacks.rb#173 - def halting_and_conditional(callback_sequence, user_callback, user_conditions, halted_lambda, filter, name); end - end + # pkg:gem/activesupport#lib/active_support/callbacks.rb:171 + def filter; end + + # pkg:gem/activesupport#lib/active_support/callbacks.rb:171 + def halted_lambda; end + + # pkg:gem/activesupport#lib/active_support/callbacks.rb:171 + def name; end + + # pkg:gem/activesupport#lib/active_support/callbacks.rb:171 + def user_callback; end + + # pkg:gem/activesupport#lib/active_support/callbacks.rb:171 + def user_conditions; end end -# source://activesupport//lib/active_support/callbacks.rb#160 +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def halted; end - # Sets the attribute halted - # - # @param value [Object] the value to set the attribute halted to. - # @return [Object] the newly set value + # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def halted=(_); end - # Returns the value of attribute target - # - # @return [Object] the current value of target + # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def target; end - # Sets the attribute target - # - # @param value [Object] the value to set the attribute target to. - # @return [Object] the newly set value + # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def target=(_); end - # Returns the value of attribute value - # - # @return [Object] the current value of value + # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def value; end - # Sets the attribute value - # - # @param value [Object] the value to set the attribute value to. - # @return [Object] the newly set value + # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def value=(_); end class << self + # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def [](*_arg0); end + + # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def inspect; end + + # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def keyword_init?; end + + # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def members; end + + # pkg:gem/activesupport#lib/active_support/callbacks.rb:163 def new(*_arg0); end end end -# source://activesupport//lib/active_support/code_generator.rb#4 +# pkg:gem/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#48 + # pkg:gem/activesupport#lib/active_support/code_generator.rb:53 def initialize(owner, path, line); end - # source://activesupport//lib/active_support/code_generator.rb#55 - def define_cached_method(name, namespace:, as: T.unsafe(nil), &block); end + # pkg:gem/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#59 + # pkg:gem/activesupport#lib/active_support/code_generator.rb:64 def execute; end class << self - # source://activesupport//lib/active_support/code_generator.rb#36 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/code_generator.rb:8 def initialize(namespace); end - # source://activesupport//lib/active_support/code_generator.rb#25 + # pkg:gem/activesupport#lib/active_support/code_generator.rb:28 def apply(owner, path, line); end - # source://activesupport//lib/active_support/code_generator.rb#14 - def define_cached_method(name, as: T.unsafe(nil)); end + # pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/code_generator.rb:6 ActiveSupport::CodeGenerator::MethodSet::METHOD_CACHES = T.let(T.unsafe(nil), Hash) +# = Active Support \Concern +# # A typical module looks like this: # # module M @@ -2368,7 +2900,7 @@ ActiveSupport::CodeGenerator::MethodSet::METHOD_CACHES = T.let(T.unsafe(nil), Ha # end # end # -# By using ActiveSupport::Concern the above module could instead be +# By using +ActiveSupport::Concern+ the above module could instead be # written as: # # require "active_support/concern" @@ -2425,7 +2957,7 @@ ActiveSupport::CodeGenerator::MethodSet::METHOD_CACHES = T.let(T.unsafe(nil), Ha # end # # Unfortunately this won't work, since when +Foo+ is included, its base -# is the +Bar+ module, not the +Host+ class. With ActiveSupport::Concern, +# is the +Bar+ module, not the +Host+ class. With +ActiveSupport::Concern+, # module dependencies are properly resolved: # # require "active_support/concern" @@ -2460,9 +2992,9 @@ ActiveSupport::CodeGenerator::MethodSet::METHOD_CACHES = T.let(T.unsafe(nil), Ha # # prepend is also used for any dependencies. # -# source://activesupport//lib/active_support/concern.rb#110 +# pkg:gem/activesupport#lib/active_support/concern.rb:112 module ActiveSupport::Concern - # source://activesupport//lib/active_support/concern.rb#127 + # pkg:gem/activesupport#lib/active_support/concern.rb:129 def append_features(base); end # Define class methods from given block. @@ -2486,62 +3018,56 @@ module ActiveSupport::Concern # Buzz.foo # => "foo" # Buzz.bar # => private method 'bar' called for Buzz:Class(NoMethodError) # - # source://activesupport//lib/active_support/concern.rb#207 + # pkg:gem/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#156 + # pkg:gem/activesupport#lib/active_support/concern.rb:158 def included(base = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/concern.rb#140 + # pkg:gem/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#173 + # pkg:gem/activesupport#lib/active_support/concern.rb:175 def prepended(base = T.unsafe(nil), &block); end class << self - # source://activesupport//lib/active_support/concern.rb#123 + # pkg:gem/activesupport#lib/active_support/concern.rb:125 def extended(base); end end end -# source://activesupport//lib/active_support/concern.rb#111 +# pkg:gem/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#112 + # pkg:gem/activesupport#lib/active_support/concern.rb:114 def initialize; end end -# source://activesupport//lib/active_support/concern.rb#117 +# pkg:gem/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#118 + # pkg:gem/activesupport#lib/active_support/concern.rb:120 def initialize; end end -# source://activesupport//lib/active_support/concurrency/share_lock.rb#7 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/concurrency/share_lock.rb:50 def initialize; end # Execute the supplied block while holding the Exclusive lock. If @@ -2551,19 +3077,19 @@ class ActiveSupport::Concurrency::ShareLock # # See +start_exclusive+ for other options. # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#148 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/concurrency/share_lock.rb:159 def sharing; end # Returns false if +no_wait+ is set and the lock is not @@ -2581,55 +3107,51 @@ class ActiveSupport::Concurrency::ShareLock # +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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/concurrency/share_lock.rb:214 def eligible_waiters?(compatible); end - # source://activesupport//lib/active_support/concurrency/share_lock.rb#218 + # pkg:gem/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#9 +# pkg:gem/activesupport#lib/active_support/configurable.rb:11 module ActiveSupport::Configurable extend ::ActiveSupport::Concern @@ -2651,18 +3173,16 @@ module ActiveSupport::Configurable # user.config.allowed_access # => true # user.config.level # => 1 # - # source://activesupport//lib/active_support/configurable.rb#145 + # pkg:gem/activesupport#lib/active_support/configurable.rb:155 def config; end end -# source://activesupport//lib/active_support/configurable.rb#27 +# pkg:gem/activesupport#lib/active_support/configurable.rb:29 module ActiveSupport::Configurable::ClassMethods - # source://activesupport//lib/active_support/configurable.rb#28 + # pkg:gem/activesupport#lib/active_support/configurable.rb:30 def config; end - # @yield [config] - # - # source://activesupport//lib/active_support/configurable.rb#37 + # pkg:gem/activesupport#lib/active_support/configurable.rb:39 def configure; end private @@ -2736,19 +3256,22 @@ module ActiveSupport::Configurable::ClassMethods # User.allowed_access # => false # User.hair_colors # => [:brown, :black, :blonde, :red] # - # source://activesupport//lib/active_support/configurable.rb#109 + # pkg:gem/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 + + # pkg:gem/activesupport#lib/active_support/configurable.rb:132 + def inherited(subclass); end end -# source://activesupport//lib/active_support/configurable.rb#12 +# pkg:gem/activesupport#lib/active_support/configurable.rb:14 class ActiveSupport::Configurable::Configuration < ::ActiveSupport::InheritableOptions - # source://activesupport//lib/active_support/configurable.rb#13 + # pkg:gem/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#18 + # pkg:gem/activesupport#lib/active_support/configurable.rb:20 def compile_methods!(keys); end end end @@ -2759,33 +3282,72 @@ end # Warns in case of YAML confusing characters, like invisible # non-breaking spaces. # -# source://activesupport//lib/active_support/configuration_file.rb#9 +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/configuration_file.rb:12 def initialize(content_path); end - # source://activesupport//lib/active_support/configuration_file.rb#21 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/configuration_file.rb:35 def read(content_path); end - # source://activesupport//lib/active_support/configuration_file.rb#46 + # pkg:gem/activesupport#lib/active_support/configuration_file.rb:46 def render(context); end class << self - # source://activesupport//lib/active_support/configuration_file.rb#17 + # pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/configuration_file.rb:10 class ActiveSupport::ConfigurationFile::FormatError < ::StandardError; end +# pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:6 +module ActiveSupport::CoreExt; end + +# pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:7 +module ActiveSupport::CoreExt::ERBUtil + # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:28 + def h(s); end + + # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. + # This method is not for public consumption! Seriously! + # 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? + # + # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:10 + def html_escape(s); end + + # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:18 + def unwrapped_html_escape(s); end +end + +# pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:31 +module ActiveSupport::CoreExt::ERBUtilPrivate + include ::ActiveSupport::CoreExt::ERBUtil + + private + + # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:33 + def h(s); end + + # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:33 + def html_escape(s); end + + # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:33 + 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. @@ -2868,44 +3430,42 @@ class ActiveSupport::ConfigurationFile::FormatError < ::StandardError; end # The attributes stuck in Current should be used by more or less all actions on all requests. If you start # sticking controller-specific attributes in there, you're going to create a mess. # -# source://activesupport//lib/active_support/current_attributes.rb#89 +# pkg:gem/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#188 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:187 def initialize; end - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:93 def __callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:93 def __callbacks?; end - # source://activesupport//lib/active_support/callbacks.rb#940 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:94 def _reset_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#928 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:94 def _run_reset_callbacks(&block); end - # Returns the value of attribute attributes. - # - # source://activesupport//lib/active_support/current_attributes.rb#186 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:187 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#186 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:187 def attributes=(_arg0); end + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:187 + def defaults; end + + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:187 + 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#211 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:187 def reset; end # Expose one or more attributes within a block. Old values are returned after the block concludes. @@ -2919,122 +3479,230 @@ class ActiveSupport::CurrentAttributes # end # end # - # source://activesupport//lib/active_support/current_attributes.rb#202 - def set(set_attributes); end + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:187 + def set(attributes, &block); end private - # source://activesupport//lib/active_support/current_attributes.rb#218 - def assign_attributes(new_attributes); end - - # source://activesupport//lib/active_support/current_attributes.rb#222 - def compute_attributes(keys); end + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:187 + def resolve_defaults; end class << self - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:93 def __callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:93 def __callbacks=(value); end - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:93 def __callbacks?; end - # source://activesupport//lib/active_support/callbacks.rb#932 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:94 def _reset_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#936 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:94 def _reset_callbacks=(value); end - # Calls this block after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. - # - # source://activesupport//lib/active_support/current_attributes.rb#142 - def after_reset(&block); end + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:152 + def after_reset(*methods, &block); end # Declares one or more attributes that will be given both class and instance accessor methods. # - # source://activesupport//lib/active_support/current_attributes.rb#100 - def attribute(*names); end + # ==== 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. + # + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:114 + def attribute(*names, default: T.unsafe(nil)); end + + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:198 + def attributes(&_arg0); end + + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:198 + def attributes=(arg); end - # Calls this block before #reset is called on the instance. Used for resetting external collaborators that depend on current values. + # 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#137 - def before_reset(&block); end + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:144 + def before_reset(*methods, &block); end - # source://activesupport//lib/active_support/current_attributes.rb#153 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:160 def clear_all; end + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:202 + def defaults; end + + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:202 + def defaults=(value); end + + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:202 + 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#95 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:102 def instance; end - # source://activesupport//lib/active_support/current_attributes.rb#147 + # Reset all attributes. Should be called before and after actions, when used as a per-request singleton. + # + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:154 def reset(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/current_attributes.rb#149 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:156 def reset_all; end - # Calls this block after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. + # 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#142 - def resets(&block); end + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:149 + def resets(*methods, &block); end - # source://activesupport//lib/active_support/current_attributes.rb#147 + # 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 + # + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:154 def set(*_arg0, **_arg1, &_arg2); end private - # source://activesupport//lib/active_support/current_attributes.rb#163 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:170 def current_instances; end - # source://activesupport//lib/active_support/current_attributes.rb#167 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:174 def current_instances_key; end - # source://activesupport//lib/active_support/current_attributes.rb#159 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:166 def generated_attribute_methods; end - # source://activesupport//lib/active_support/current_attributes.rb#171 - def method_missing(name, *args, **_arg2, &block); end + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:186 + def method_added(name); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/current_attributes.rb#181 + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:178 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + + # pkg:gem/activesupport#lib/active_support/current_attributes.rb:182 def respond_to_missing?(name, _); end end end -# source://activesupport//lib/active_support/dependencies/interlock.rb#6 +# pkg:gem/activesupport#lib/active_support/current_attributes.rb:96 +ActiveSupport::CurrentAttributes::INVALID_ATTRIBUTE_NAMES = T.let(T.unsafe(nil), Array) + +# pkg:gem/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. +# +# pkg:gem/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 } } + # + # pkg:gem/activesupport#lib/active_support/deep_mergeable.rb:29 + def deep_merge(other, &block); end + + # Same as #deep_merge, but modifies +self+. + # + # pkg:gem/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+. + # + # pkg:gem/activesupport#lib/active_support/deep_mergeable.rb:49 + def deep_merge?(other); end +end + +# pkg:gem/activesupport#lib/active_support/delegation.rb:16 +module ActiveSupport::Delegation + class << self + # pkg:gem/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 + + # pkg:gem/activesupport#lib/active_support/delegation.rb:152 + def generate_method_missing(owner, target, allow_nil: T.unsafe(nil)); end + end +end + +# pkg:gem/activesupport#lib/active_support/delegation.rb:20 +ActiveSupport::Delegation::RESERVED_METHOD_NAMES = T.let(T.unsafe(nil), Set) + +# pkg:gem/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. +# +# pkg:gem/activesupport#lib/active_support/delegation.rb:8 +class ActiveSupport::DelegationError < ::NoMethodError + class << self + # pkg:gem/activesupport#lib/active_support/delegation.rb:10 + def nil_target(method_name, target); end + end +end + +# pkg:gem/activesupport#lib/active_support/dependencies/interlock.rb:6 module ActiveSupport::Dependencies class << self - # source://activesupport//lib/active_support/dependencies.rb#62 + # pkg:gem/activesupport#lib/active_support/dependencies.rb:62 def _autoloaded_tracked_classes; end - # source://activesupport//lib/active_support/dependencies.rb#62 + # pkg:gem/activesupport#lib/active_support/dependencies.rb:62 def _autoloaded_tracked_classes=(_arg0); end - # source://activesupport//lib/active_support/dependencies.rb#56 + # pkg:gem/activesupport#lib/active_support/dependencies.rb:56 def _eager_load_paths; end - # source://activesupport//lib/active_support/dependencies.rb#56 + # pkg:gem/activesupport#lib/active_support/dependencies.rb:56 def _eager_load_paths=(_arg0); end - # source://activesupport//lib/active_support/dependencies.rb#49 + # pkg:gem/activesupport#lib/active_support/dependencies.rb:49 def autoload_once_paths; end - # source://activesupport//lib/active_support/dependencies.rb#49 + # pkg:gem/activesupport#lib/active_support/dependencies.rb:49 def autoload_once_paths=(_arg0); end - # source://activesupport//lib/active_support/dependencies.rb#43 + # pkg:gem/activesupport#lib/active_support/dependencies.rb:43 def autoload_paths; end - # source://activesupport//lib/active_support/dependencies.rb#43 + # pkg:gem/activesupport#lib/active_support/dependencies.rb:43 def autoload_paths=(_arg0); end - # source://activesupport//lib/active_support/dependencies.rb#69 + # pkg:gem/activesupport#lib/active_support/dependencies.rb:69 def autoloader; end - # source://activesupport//lib/active_support/dependencies.rb#69 + # pkg:gem/activesupport#lib/active_support/dependencies.rb:69 def autoloader=(_arg0); end # Private method that reloads constants autoloaded by the main autoloader. @@ -3043,85 +3711,81 @@ module ActiveSupport::Dependencies # 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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/dependencies.rb:94 def eager_load?(path); end - # source://activesupport//lib/active_support/dependencies.rb#10 + # pkg:gem/activesupport#lib/active_support/dependencies.rb:10 def interlock; end - # source://activesupport//lib/active_support/dependencies.rb#10 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/dependencies.rb:31 def unload_interlock(&block); end end end -# source://activesupport//lib/active_support/dependencies/interlock.rb#7 +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/dependencies/interlock.rb:8 def initialize; end - # source://activesupport//lib/active_support/dependencies/interlock.rb#32 + # pkg:gem/activesupport#lib/active_support/dependencies/interlock.rb:32 def done_running; end - # source://activesupport//lib/active_support/dependencies/interlock.rb#24 + # pkg:gem/activesupport#lib/active_support/dependencies/interlock.rb:24 def done_unloading; end - # source://activesupport//lib/active_support/dependencies/interlock.rb#12 + # pkg:gem/activesupport#lib/active_support/dependencies/interlock.rb:12 def loading(&block); end - # source://activesupport//lib/active_support/dependencies/interlock.rb#40 + # pkg:gem/activesupport#lib/active_support/dependencies/interlock.rb:40 def permit_concurrent_loads(&block); end - # source://activesupport//lib/active_support/dependencies/interlock.rb#44 + # pkg:gem/activesupport#lib/active_support/dependencies/interlock.rb:44 def raw_state(&block); end - # source://activesupport//lib/active_support/dependencies/interlock.rb#36 + # pkg:gem/activesupport#lib/active_support/dependencies/interlock.rb:36 def running(&block); end - # source://activesupport//lib/active_support/dependencies/interlock.rb#28 + # pkg:gem/activesupport#lib/active_support/dependencies/interlock.rb:28 def start_running; end - # source://activesupport//lib/active_support/dependencies/interlock.rb#20 + # pkg:gem/activesupport#lib/active_support/dependencies/interlock.rb:20 def start_unloading; end - # source://activesupport//lib/active_support/dependencies/interlock.rb#16 + # pkg:gem/activesupport#lib/active_support/dependencies/interlock.rb:16 def unloading(&block); end end -# source://activesupport//lib/active_support/dependencies/require_dependency.rb#3 +# pkg:gem/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. @@ -3131,108 +3795,68 @@ module ActiveSupport::Dependencies::RequireDependency # should call +require_dependency+ where needed in case the runtime mode is # +:classic+. # - # source://activesupport//lib/active_support/dependencies/require_dependency.rb#11 + # pkg:gem/activesupport#lib/active_support/dependencies/require_dependency.rb:11 def require_dependency(filename); end end -# \Deprecation specifies the API used by Rails to deprecate methods, instance -# variables, objects, and constants. +# = 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. # -# source://activesupport//lib/active_support/deprecation.rb#8 +# 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 +# +# pkg:gem/activesupport#lib/active_support/deprecation.rb:33 class ActiveSupport::Deprecation - include ::Singleton - include ::ActiveSupport::Deprecation::InstanceDelegator include ::ActiveSupport::Deprecation::Behavior include ::ActiveSupport::Deprecation::Reporting include ::ActiveSupport::Deprecation::Disallowed include ::ActiveSupport::Deprecation::MethodWrapper - extend ::Singleton::SingletonClassMethods - extend ::ActiveSupport::Deprecation::InstanceDelegator::ClassMethods - extend ::ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators # It accepts two parameters on initialization. The first is a version of library # and the second is a library name. # # ActiveSupport::Deprecation.new('2.0', 'MyLibrary') # - # @return [Deprecation] a new instance of Deprecation - # - # source://activesupport//lib/active_support/deprecation.rb#41 + # pkg:gem/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#35 + # pkg:gem/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#35 + # pkg:gem/activesupport#lib/active_support/deprecation.rb:65 def deprecation_horizon=(_arg0); end class << self - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def allow(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def behavior(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def behavior=(arg); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def debug(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def debug=(arg); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def deprecate_methods(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def deprecation_horizon(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def deprecation_horizon=(arg); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#31 - def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def disallowed_behavior(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def disallowed_behavior=(arg); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def disallowed_warnings(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def disallowed_warnings=(arg); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def gem_name(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def gem_name=(arg); end - - def new(*_arg0); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def silence(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def silenced(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 - def silenced=(arg); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#26 - def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end - - private - - def allocate; end + # pkg:gem/activesupport#lib/active_support/deprecation.rb:60 + def _instance; end end end @@ -3240,20 +3864,21 @@ end # You can create a custom behavior or set any from the +DEFAULT_BEHAVIORS+ # constant. Available behaviors are: # -# [+raise+] Raise ActiveSupport::DeprecationException. -# [+stderr+] Log all deprecation warnings to $stderr. -# [+log+] Log all deprecation warnings to +Rails.logger+. -# [+notify+] Use +ActiveSupport::Notifications+ to notify +deprecation.rails+. -# [+silence+] Do nothing. On Rails, set config.active_support.report_deprecations = false to disable all 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. 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. +# For more information you can read the documentation of the #behavior= method. # -# source://activesupport//lib/active_support/deprecation/behaviors.rb#61 +# pkg:gem/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#66 + # pkg:gem/activesupport#lib/active_support/deprecation/behaviors.rb:74 def behavior; end # Sets the behavior to the specified value. Can be a single value, array, @@ -3261,121 +3886,101 @@ module ActiveSupport::Deprecation::Behavior # # Available behaviors: # - # [+raise+] Raise ActiveSupport::DeprecationException. - # [+stderr+] Log all deprecation warnings to $stderr. - # [+log+] Log all deprecation warnings to +Rails.logger+. - # [+notify+] Use +ActiveSupport::Notifications+ to notify +deprecation.rails+. - # [+silence+] Do nothing. + # [+: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. + # because they happen before \Rails boots up. # - # ActiveSupport::Deprecation.behavior = :stderr - # ActiveSupport::Deprecation.behavior = [:stderr, :log] - # ActiveSupport::Deprecation.behavior = MyCustomHandler - # ActiveSupport::Deprecation.behavior = ->(message, callstack, deprecation_horizon, gem_name) { + # 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. + # 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#99 + # pkg:gem/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#63 + # pkg:gem/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#63 + # pkg:gem/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#71 + # pkg:gem/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 + # 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#107 + # pkg:gem/activesupport#lib/active_support/deprecation/behaviors.rb:119 def disallowed_behavior=(behavior); end private - # source://activesupport//lib/active_support/deprecation/behaviors.rb#112 + # pkg:gem/activesupport#lib/active_support/deprecation/behaviors.rb:124 def arity_coerce(behavior); end + + # pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/deprecation/behaviors.rb:13 ActiveSupport::Deprecation::DEFAULT_BEHAVIORS = T.let(T.unsafe(nil), Hash) -# DeprecatedConstantAccessor transforms a constant into a deprecated one by -# hooking +const_missing+. -# -# It takes the names of an old (deprecated) constant and of a new constant -# (both in string form) and optionally a deprecator. The deprecator defaults -# to +ActiveSupport::Deprecator+ if none is specified. -# -# The deprecated constant now returns the same object as the new one rather -# than a proxy object, so it can be used transparently in +rescue+ blocks -# etc. -# -# PLANETS = %w(mercury venus earth mars jupiter saturn uranus neptune pluto) -# -# # (In a later update, the original implementation of `PLANETS` has been removed.) -# -# PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) -# include ActiveSupport::Deprecation::DeprecatedConstantAccessor -# deprecate_constant 'PLANETS', 'PLANETS_POST_2006' -# -# PLANETS.map { |planet| planet.capitalize } -# # => DEPRECATION WARNING: PLANETS is deprecated! Use PLANETS_POST_2006 instead. -# (Backtrace information…) -# ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] -# -# source://activesupport//lib/active_support/deprecation/constant_accessor.rb#28 +# pkg:gem/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#29 + # pkg:gem/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 names of an old (deprecated) constant and of a new constant -# (both in string form) and optionally a deprecator. The deprecator defaults -# to +ActiveSupport::Deprecator+ if none is specified. The deprecated constant -# now returns the value of the new one. +# 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') +# 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#123 +# pkg:gem/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#131 - def initialize(old_const, new_const, deprecator = T.unsafe(nil), message: T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:128 + def initialize(old_const, new_const, deprecator, message: T.unsafe(nil)); end + + # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:158 + def append_features(base); end # Returns the class of the new constant. # @@ -3383,53 +3988,59 @@ class ActiveSupport::Deprecation::DeprecatedConstantProxy < ::Module # PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('PLANETS', 'PLANETS_POST_2006') # PLANETS.class # => Array # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#157 + # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:154 def class; end - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 + # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:168 + def extended(base); end + + # pkg:gem/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#144 + # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:141 def inspect; end - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 + # pkg:gem/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#150 + # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:147 def name(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 + # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:163 + def prepend_features(base); end + + # pkg:gem/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#166 + # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:178 def const_missing(name); end - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#171 - def method_missing(called, *args, &block); end + # pkg:gem/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#162 + # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:174 def target; end class << self - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#124 + # pkg:gem/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 -# and an instance variable. It optionally takes a deprecator as the last -# argument. The deprecator defaults to +ActiveSupport::Deprecator+ if none -# is specified. +# 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) +# @request = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :request, :@request, ActiveSupport::Deprecation.new) # @_request = :special_request # end # @@ -3454,27 +4065,24 @@ end # example.request.to_s # # => "special_request" # -# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#88 +# pkg:gem/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#89 - def initialize(instance, method, var = T.unsafe(nil), deprecator = T.unsafe(nil)); end + # pkg:gem/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#97 + # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:96 def target; end - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#101 + # pkg:gem/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 optionally a deprecator. The -# deprecator defaults to +ActiveSupport::Deprecator+ if none is specified. +# 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") +# deprecated_object = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(Object.new, "This object is now deprecated", ActiveSupport::Deprecation.new) # # => # # # deprecated_object.to_s @@ -3482,47 +4090,145 @@ end # (Backtrace) # # => "#" # -# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#39 +# pkg:gem/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#40 - def initialize(object, message, deprecator = T.unsafe(nil)); end + # pkg:gem/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#47 + # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:46 def target; end - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#51 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:17 def inspect; end private - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#22 + # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:22 def method_missing(called, *args, &block); end class << self - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#6 - def new(*args, &block); end + # pkg:gem/activesupport#lib/active_support/deprecation/proxy_wrappers.rb:6 + def new(*args, **kwargs, &block); end end end -# source://activesupport//lib/active_support/deprecation/disallowed.rb#5 +# 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. +# +# pkg:gem/activesupport#lib/active_support/deprecation/deprecators.rb:9 +class ActiveSupport::Deprecation::Deprecators + # pkg:gem/activesupport#lib/active_support/deprecation/deprecators.rb:10 + def initialize; end + + # Returns a deprecator added to this collection via #[]=. + # + # pkg:gem/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 + # + # pkg:gem/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=. + # + # pkg:gem/activesupport#lib/active_support/deprecation/deprecators.rb:60 + def behavior=(behavior); end + + # Sets the debug flag for all deprecators in this collection. + # + # pkg:gem/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=. + # + # pkg:gem/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=. + # + # pkg:gem/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+. + # + # pkg:gem/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. + # + # pkg:gem/activesupport#lib/active_support/deprecation/deprecators.rb:84 + def silence(&block); end + + # Sets the silenced flag for all deprecators in this collection. + # + # pkg:gem/activesupport#lib/active_support/deprecation/deprecators.rb:47 + def silenced=(silenced); end + + private + + # pkg:gem/activesupport#lib/active_support/deprecation/deprecators.rb:97 + def apply_options(deprecator); end + + # pkg:gem/activesupport#lib/active_support/deprecation/deprecators.rb:92 + def set_option(name, value); end +end + +# pkg:gem/activesupport#lib/active_support/deprecation/disallowed.rb:5 module ActiveSupport::Deprecation::Disallowed + # 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. # Returns the configured criteria used to identify deprecation messages # which should be treated as disallowed. # - # source://activesupport//lib/active_support/deprecation/disallowed.rb#21 + # pkg:gem/activesupport#lib/active_support/deprecation/disallowed.rb:21 def disallowed_warnings; end # Sets the criteria used to identify deprecation messages which should be @@ -3536,55 +4242,25 @@ module ActiveSupport::Deprecation::Disallowed # Deprecations matching a substring or regular expression will be handled # using the configured Behavior#disallowed_behavior rather than # Behavior#behavior. + # Returns the configured criteria used to identify deprecation messages + # which should be treated as disallowed. # - # source://activesupport//lib/active_support/deprecation/disallowed.rb#17 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/deprecation/disallowed.rb:26 def deprecation_disallowed?(message); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/deprecation/disallowed.rb#40 + # pkg:gem/activesupport#lib/active_support/deprecation/disallowed.rb:39 def explicitly_allowed?(message); end end -# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#7 -module ActiveSupport::Deprecation::InstanceDelegator - mixes_in_class_methods ::ActiveSupport::Deprecation::InstanceDelegator::ClassMethods - mixes_in_class_methods ::ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators - - class << self - # @private - # - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#8 - def included(base); end - end -end - -# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#14 -module ActiveSupport::Deprecation::InstanceDelegator::ClassMethods - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#15 - def include(included_module); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#20 - def method_added(method_name); end -end - -# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#25 -module ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#31 - def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#26 - def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end -end +# pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/deprecation/method_wrappers.rb:8 module ActiveSupport::Deprecation::MethodWrapper # Declare that a method has been deprecated. # @@ -3596,124 +4272,117 @@ module ActiveSupport::Deprecation::MethodWrapper # def eee; end # end # - # Using the default deprecator: - # ActiveSupport::Deprecation.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead') + # 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 Rails 5.1. (called from irb_binding at (irb):10) + # # 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 Rails 5.1 (use zzz instead). (called from irb_binding at (irb):11) + # # 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 Rails 5.1 (use Bar#ccc instead). (called from irb_binding at (irb):12) - # # => nil - # - # Passing in a custom deprecator: - # custom_deprecator = ActiveSupport::Deprecation.new('next-release', 'MyGem') - # ActiveSupport::Deprecation.deprecate_methods(Fred, ddd: :zzz, deprecator: custom_deprecator) - # # => [:ddd] - # - # Fred.new.ddd - # DEPRECATION WARNING: ddd is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):15) - # # => nil - # - # Using a custom deprecator directly: - # custom_deprecator = ActiveSupport::Deprecation.new('next-release', 'MyGem') - # custom_deprecator.deprecate_methods(Fred, eee: :zzz) - # # => [:eee] - # - # Fred.new.eee - # DEPRECATION WARNING: eee is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):18) + # # 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#52 + # pkg:gem/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 +# pkg:gem/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+ + # ActiveSupport::Deprecation#disallowed_warnings. # # The optional if: argument accepts a truthy/falsy value or an object that # responds to .call. If truthy, then matching warnings will be allowed. # If falsey then the method yields to the block without allowing the warning. # - # ActiveSupport::Deprecation.disallowed_behavior = :raise - # ActiveSupport::Deprecation.disallowed_warnings = [ + # deprecator = ActiveSupport::Deprecation.new + # deprecator.disallowed_behavior = :raise + # deprecator.disallowed_warnings = [ # "something broke" # ] # - # ActiveSupport::Deprecation.warn('something broke!') + # deprecator.warn('something broke!') # # => ActiveSupport::DeprecationException # - # ActiveSupport::Deprecation.allow ['something broke'] do - # ActiveSupport::Deprecation.warn('something broke!') + # deprecator.allow ['something broke'] do + # deprecator.warn('something broke!') # end # # => nil # - # ActiveSupport::Deprecation.allow ['something broke'], if: Rails.env.production? do - # ActiveSupport::Deprecation.warn('something broke!') + # 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#72 + # pkg:gem/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#86 + # pkg:gem/activesupport#lib/active_support/deprecation/reporting.rb:48 + def begin_silence; end + + # pkg:gem/activesupport#lib/active_support/deprecation/reporting.rb:99 def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/deprecation/reporting.rb:11 def gem_name=(_arg0); end # Silence deprecation warnings within the block. # - # ActiveSupport::Deprecation.warn('something broke!') + # deprecator = ActiveSupport::Deprecation.new + # deprecator.warn('something broke!') # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" # - # ActiveSupport::Deprecation.silence do - # ActiveSupport::Deprecation.warn('something broke!') + # deprecator.silence do + # deprecator.warn('something broke!') # end # # => nil # - # source://activesupport//lib/active_support/deprecation/reporting.rb#40 + # pkg:gem/activesupport#lib/active_support/deprecation/reporting.rb:41 def silence(&block); end - # source://activesupport//lib/active_support/deprecation/reporting.rb#82 + # Whether to print a message (silent mode) + # + # pkg:gem/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 + # pkg:gem/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#behavior. # - # ActiveSupport::Deprecation.warn('something broke!') + # 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 + # pkg:gem/activesupport#lib/active_support/deprecation/reporting.rb:18 def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end private - # source://activesupport//lib/active_support/deprecation/reporting.rb#137 + # pkg:gem/activesupport#lib/active_support/deprecation/reporting.rb:153 def _extract_callstack(callstack); end # Outputs a deprecation warning message @@ -3725,293 +4394,292 @@ module ActiveSupport::Deprecation::Reporting # deprecated_method_warning(:method_name, "Optional message") # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (Optional message)" # - # source://activesupport//lib/active_support/deprecation/reporting.rb#102 + # pkg:gem/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#116 + # pkg:gem/activesupport#lib/active_support/deprecation/reporting.rb:129 def deprecation_caller_message(callstack); end - # source://activesupport//lib/active_support/deprecation/reporting.rb#111 + # pkg:gem/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#127 + # pkg:gem/activesupport#lib/active_support/deprecation/reporting.rb:140 def extract_callstack(callstack); end - # source://activesupport//lib/active_support/deprecation/reporting.rb#152 - def ignored_callstack(path); end + # pkg:gem/activesupport#lib/active_support/deprecation/reporting.rb:174 + def ignored_callstack?(path); end end -# source://activesupport//lib/active_support/deprecation/reporting.rb#150 +# pkg:gem/activesupport#lib/active_support/deprecation/reporting.rb:172 +ActiveSupport::Deprecation::Reporting::LIB_DIR = T.let(T.unsafe(nil), String) + +# pkg:gem/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 +# pkg:gem/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. +# 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#9 +# pkg:gem/activesupport#lib/active_support/descendants_tracker.rb:14 module ActiveSupport::DescendantsTracker - # source://activesupport//lib/active_support/descendants_tracker.rb#88 + # pkg:gem/activesupport#lib/active_support/descendants_tracker.rb:107 def descendants; end - # source://activesupport//lib/active_support/descendants_tracker.rb#92 - def direct_descendants; end - - # source://activesupport//lib/active_support/descendants_tracker.rb#82 - def subclasses; end - class << self - # source://activesupport//lib/active_support/descendants_tracker.rb#66 + # pkg:gem/activesupport#lib/active_support/descendants_tracker.rb:78 def clear(classes); end - # source://activesupport//lib/active_support/descendants_tracker.rb#62 + # pkg:gem/activesupport#lib/active_support/descendants_tracker.rb:102 def descendants(klass); end - # source://activesupport//lib/active_support/descendants_tracker.rb#11 - def direct_descendants(klass); end - - # source://activesupport//lib/active_support/descendants_tracker.rb#50 + # pkg:gem/activesupport#lib/active_support/descendants_tracker.rb:69 def disable_clear!; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/descendants_tracker.rb#77 - def native?; end + # pkg:gem/activesupport#lib/active_support/descendants_tracker.rb:89 + def reject!(classes); end - # source://activesupport//lib/active_support/descendants_tracker.rb#58 + # pkg:gem/activesupport#lib/active_support/descendants_tracker.rb:98 def subclasses(klass); end end end -# source://activesupport//lib/active_support/digest.rb#6 +# pkg:gem/activesupport#lib/active_support/descendants_tracker.rb:58 +module ActiveSupport::DescendantsTracker::ReloadedClassesFiltering + # pkg:gem/activesupport#lib/active_support/descendants_tracker.rb:63 + def descendants; end + + # pkg:gem/activesupport#lib/active_support/descendants_tracker.rb:59 + def subclasses; end +end + +# On MRI `ObjectSpace::WeakMap` keys are weak references. +# So we can simply use WeakMap as a `Set`. +# 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. +# +# pkg:gem/activesupport#lib/active_support/descendants_tracker.rb:20 +class ActiveSupport::DescendantsTracker::WeakSet < ::ObjectSpace::WeakMap + # pkg:gem/activesupport#lib/active_support/descendants_tracker.rb:23 + def <<(object); end + + # pkg:gem/activesupport#lib/active_support/descendants_tracker.rb:21 + def to_a; end +end + +# pkg:gem/activesupport#lib/active_support/digest.rb:6 class ActiveSupport::Digest class << self - # source://activesupport//lib/active_support/digest.rb#8 + # pkg:gem/activesupport#lib/active_support/digest.rb:8 def hash_digest_class; end - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/digest.rb#12 + # pkg:gem/activesupport#lib/active_support/digest.rb:12 def hash_digest_class=(klass); end - # source://activesupport//lib/active_support/digest.rb#17 + # pkg:gem/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#13 +# pkg:gem/activesupport#lib/active_support/duration.rb:14 class ActiveSupport::Duration - # @return [Duration] a new instance of Duration - # - # source://activesupport//lib/active_support/duration.rb#223 + # pkg:gem/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#306 + # pkg:gem/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#281 + # pkg:gem/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#262 + # pkg:gem/activesupport#lib/active_support/duration.rb:268 def +(other); end - # source://activesupport//lib/active_support/duration.rb#320 + # pkg:gem/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#276 + # pkg:gem/activesupport#lib/active_support/duration.rb:282 def -(other); end - # source://activesupport//lib/active_support/duration.rb#316 + # pkg:gem/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#292 + # pkg:gem/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#252 + # pkg:gem/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#335 + # pkg:gem/activesupport#lib/active_support/duration.rb:341 def ==(other); end - # source://activesupport//lib/active_support/duration.rb#475 + # pkg:gem/activesupport#lib/active_support/duration.rb:481 def _parts; 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#430 + # pkg:gem/activesupport#lib/active_support/duration.rb:224 + def abs(&_arg0); end + + # pkg:gem/activesupport#lib/active_support/duration.rb:440 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#438 + # pkg:gem/activesupport#lib/active_support/duration.rb:444 def ago(time = T.unsafe(nil)); end - # source://activesupport//lib/active_support/duration.rb#453 + # pkg:gem/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#438 + # pkg:gem/activesupport#lib/active_support/duration.rb:448 def before(time = T.unsafe(nil)); end - # source://activesupport//lib/active_support/duration.rb#239 + # pkg:gem/activesupport#lib/active_support/duration.rb:245 def coerce(other); end - # source://activesupport//lib/active_support/duration.rb#461 + # pkg:gem/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#420 + # pkg:gem/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#430 + # pkg:gem/activesupport#lib/active_support/duration.rb:439 def from_now(time = T.unsafe(nil)); end - # source://activesupport//lib/active_support/duration.rb#424 + # pkg:gem/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#393 + # pkg:gem/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#386 + # pkg:gem/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#379 + # pkg:gem/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#407 + # pkg:gem/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://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and - # Time[https://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be used for precision - # date and time arithmetic. - # - # source://activesupport//lib/active_support/duration.rb#371 + # pkg:gem/activesupport#lib/active_support/duration.rb:380 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#400 + # pkg:gem/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#414 + # pkg:gem/activesupport#lib/active_support/duration.rb:420 def in_years; end - # source://activesupport//lib/active_support/duration.rb#457 + # pkg:gem/activesupport#lib/active_support/duration.rb:463 def init_with(coder); end - # source://activesupport//lib/active_support/duration.rb#444 + # pkg:gem/activesupport#lib/active_support/duration.rb:450 def inspect; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#329 + # pkg:gem/activesupport#lib/active_support/duration.rb:335 def instance_of?(klass); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#324 + # pkg:gem/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#467 + # pkg:gem/activesupport#lib/active_support/duration.rb:473 def iso8601(precision: T.unsafe(nil)); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#324 + # pkg:gem/activesupport#lib/active_support/duration.rb:333 def kind_of?(klass); end - # Returns a copy of the parts hash that defines the duration + # pkg:gem/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#235 + # pkg:gem/activesupport#lib/active_support/duration.rb:241 def parts; end + # pkg:gem/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#430 + # pkg:gem/activesupport#lib/active_support/duration.rb:436 def since(time = T.unsafe(nil)); end + # pkg:gem/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 @@ -4029,11 +4697,11 @@ class ActiveSupport::Duration # 1.year.to_i # => 31556952 # # In such cases, Ruby's core - # Date[https://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and - # Time[https://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be used for precision + # Date[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#371 + # pkg:gem/activesupport#lib/active_support/duration.rb:377 def to_i; end # Returns the amount of seconds a duration covers as a string. @@ -4041,45 +4709,37 @@ class ActiveSupport::Duration # # 1.day.to_s # => "86400" # - # source://activesupport//lib/active_support/duration.rb#347 + # pkg:gem/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#438 + # pkg:gem/activesupport#lib/active_support/duration.rb:447 def until(time = T.unsafe(nil)); end - # Returns the value of attribute value. - # - # source://activesupport//lib/active_support/duration.rb#132 + # pkg:gem/activesupport#lib/active_support/duration.rb:133 def value; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#471 + # pkg:gem/activesupport#lib/active_support/duration.rb:477 def variable?; end + # pkg:gem/activesupport#lib/active_support/duration.rb:224 + def zero?(&_arg0); end + private - # source://activesupport//lib/active_support/duration.rb#506 - def method_missing(method, *args, &block); end + # pkg:gem/activesupport#lib/active_support/duration.rb:512 + def method_missing(*_arg0, **_arg1, &_arg2); end - # @raise [TypeError] - # - # source://activesupport//lib/active_support/duration.rb#510 + # pkg:gem/activesupport#lib/active_support/duration.rb:516 def raise_type_error(other); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#502 + # pkg:gem/activesupport#lib/active_support/duration.rb:508 def respond_to_missing?(method, _); end - # source://activesupport//lib/active_support/duration.rb#480 + # pkg:gem/activesupport#lib/active_support/duration.rb:486 def sum(sign, time = T.unsafe(nil)); end class << self - # source://activesupport//lib/active_support/duration.rb#148 + # pkg:gem/activesupport#lib/active_support/duration.rb:149 def ===(other); end # Creates a new Duration from a seconds value that is converted @@ -4088,19 +4748,19 @@ class ActiveSupport::Duration # ActiveSupport::Duration.build(31556952).parts # => {:years=>1} # ActiveSupport::Duration.build(2716146).parts # => {:months=>1, :days=>1} # - # source://activesupport//lib/active_support/duration.rb#188 + # pkg:gem/activesupport#lib/active_support/duration.rb:189 def build(value); end - # source://activesupport//lib/active_support/duration.rb#166 + # pkg:gem/activesupport#lib/active_support/duration.rb:167 def days(value); end - # source://activesupport//lib/active_support/duration.rb#162 + # pkg:gem/activesupport#lib/active_support/duration.rb:163 def hours(value); end - # source://activesupport//lib/active_support/duration.rb#158 + # pkg:gem/activesupport#lib/active_support/duration.rb:159 def minutes(value); end - # source://activesupport//lib/active_support/duration.rb#174 + # pkg:gem/activesupport#lib/active_support/duration.rb:175 def months(value); end # Creates a new Duration from string formatted according to ISO 8601 Duration. @@ -4109,21 +4769,21 @@ class ActiveSupport::Duration # 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#143 + # pkg:gem/activesupport#lib/active_support/duration.rb:144 def parse(iso8601duration); end - # source://activesupport//lib/active_support/duration.rb#154 + # pkg:gem/activesupport#lib/active_support/duration.rb:155 def seconds(value); end - # source://activesupport//lib/active_support/duration.rb#170 + # pkg:gem/activesupport#lib/active_support/duration.rb:171 def weeks(value); end - # source://activesupport//lib/active_support/duration.rb#178 + # pkg:gem/activesupport#lib/active_support/duration.rb:179 def years(value); end private - # source://activesupport//lib/active_support/duration.rb#216 + # pkg:gem/activesupport#lib/active_support/duration.rb:217 def calculate_total_seconds(parts); end end end @@ -4134,243 +4794,210 @@ end # # This parser allows negative parts to be present in pattern. # -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#12 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:32 def mode=(_arg0); end - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#41 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:88 def number; end - # @raise [ParsingError] - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#96 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:101 def validate!; end end -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#17 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/duration/iso8601_parser.rb:26 ActiveSupport::Duration::ISO8601Parser::TIME_TO_PART = T.let(T.unsafe(nil), Hash) # Serializes duration to string according to ISO 8601 Duration format. # -# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#8 +# pkg:gem/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#11 + # pkg:gem/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#17 + # pkg:gem/activesupport#lib/active_support/duration/iso8601_serializer.rb:15 def serialize; end private - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#58 + # pkg:gem/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. - # If all parts are negative it will negate all of them and return minus as a sign. # - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#41 + # pkg:gem/activesupport#lib/active_support/duration/iso8601_serializer.rb:38 def normalize; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#54 + # pkg:gem/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#9 +# pkg:gem/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#129 +# pkg:gem/activesupport#lib/active_support/duration.rb:130 ActiveSupport::Duration::PARTS = T.let(T.unsafe(nil), Array) -# source://activesupport//lib/active_support/duration.rb#119 +# length of a gregorian year (365.2425 days) +# +# pkg:gem/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#114 +# pkg:gem/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#113 +# pkg:gem/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#112 +# pkg:gem/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#116 +# pkg:gem/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#115 +# pkg:gem/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) +# 1/12 of a gregorian year # -# source://activesupport//lib/active_support/duration.rb#117 +# pkg:gem/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#14 +# pkg:gem/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#18 + # pkg:gem/activesupport#lib/active_support/duration.rb:19 def initialize(value); end - # source://activesupport//lib/active_support/duration.rb#84 + # pkg:gem/activesupport#lib/active_support/duration.rb:85 def %(other); end - # source://activesupport//lib/active_support/duration.rb#65 + # pkg:gem/activesupport#lib/active_support/duration.rb:66 def *(other); end - # source://activesupport//lib/active_support/duration.rb#40 + # pkg:gem/activesupport#lib/active_support/duration.rb:41 def +(other); end - # source://activesupport//lib/active_support/duration.rb#52 + # pkg:gem/activesupport#lib/active_support/duration.rb:53 def -(other); end - # source://activesupport//lib/active_support/duration.rb#26 + # pkg:gem/activesupport#lib/active_support/duration.rb:27 def -@; end - # source://activesupport//lib/active_support/duration.rb#76 + # pkg:gem/activesupport#lib/active_support/duration.rb:77 def /(other); end - # source://activesupport//lib/active_support/duration.rb#30 + # pkg:gem/activesupport#lib/active_support/duration.rb:31 def <=>(other); end - # source://activesupport//lib/active_support/duration.rb#22 + # pkg:gem/activesupport#lib/active_support/duration.rb:23 def coerce(other); end - # source://activesupport//lib/active_support/duration.rb#16 + # pkg:gem/activesupport#lib/active_support/duration.rb:17 def to_f(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/duration.rb#16 + # pkg:gem/activesupport#lib/active_support/duration.rb:17 def to_i(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/duration.rb#16 + # pkg:gem/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#15 + # pkg:gem/activesupport#lib/active_support/duration.rb:16 def value; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#92 + # pkg:gem/activesupport#lib/active_support/duration.rb:93 def variable?; end private - # source://activesupport//lib/active_support/duration.rb#97 + # pkg:gem/activesupport#lib/active_support/duration.rb:98 def calculate(op, other); end - # @raise [TypeError] - # - # source://activesupport//lib/active_support/duration.rb#107 + # pkg:gem/activesupport#lib/active_support/duration.rb:108 def raise_type_error(other); end end -# source://activesupport//lib/active_support/duration.rb#130 +# pkg:gem/activesupport#lib/active_support/duration.rb:131 ActiveSupport::Duration::VARIABLE_PARTS = T.let(T.unsafe(nil), Array) +# = Encrypted Configuration +# # Provides convenience methods on top of EncryptedFile to access values stored # as encrypted YAML. # @@ -4393,16 +5020,11 @@ ActiveSupport::Duration::VARIABLE_PARTS = T.let(T.unsafe(nil), Array) # my_config.foo! # # => KeyError # -# source://activesupport//lib/active_support/encrypted_configuration.rb#32 +# pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:35 class ActiveSupport::EncryptedConfiguration < ::ActiveSupport::EncryptedFile - # @return [EncryptedConfiguration] a new instance of EncryptedConfiguration - # - # source://activesupport//lib/active_support/encrypted_configuration.rb#36 + # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:48 def initialize(config_path:, key_path:, env_key:, raise_if_missing_key:); end - # source://activesupport//lib/active_support/encrypted_configuration.rb#33 - def [](*_arg0, **_arg1, &_arg2); end - # Returns the decrypted content as a Hash with symbolized keys. # # my_config = ActiveSupport::EncryptedConfiguration.new(...) @@ -4411,56 +5033,59 @@ class ActiveSupport::EncryptedConfiguration < ::ActiveSupport::EncryptedFile # my_config.config # # => { some_secret: 123, some_namespace: { another_secret: 789 } } # - # source://activesupport//lib/active_support/encrypted_configuration.rb#63 + # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:75 def config; end - # source://activesupport//lib/active_support/encrypted_configuration.rb#33 - def fetch(*_arg0, **_arg1, &_arg2); end + # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:79 + def inspect; end - # source://activesupport//lib/active_support/core_ext/module/delegation.rb#302 - def method_missing(method, *args, **_arg2, &block); end + # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:46 + def method_missing(method, *_arg1, **_arg2, &_arg3); end # Reads the file and returns the decrypted content. See EncryptedFile#read. # - # source://activesupport//lib/active_support/encrypted_configuration.rb#42 + # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:56 def read; end - # source://activesupport//lib/active_support/encrypted_configuration.rb#49 - def write(contents); end + # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:63 + def validate!; end private - # source://activesupport//lib/active_support/encrypted_configuration.rb#68 + # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:84 def deep_transform(hash); end - # source://activesupport//lib/active_support/encrypted_configuration.rb#82 - def deserialize(config); end + # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:98 + def deserialize(content); end - # source://activesupport//lib/active_support/encrypted_configuration.rb#78 + # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:94 def options; end - # source://activesupport//lib/active_support/core_ext/module/delegation.rb#294 + # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:46 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end -# source://activesupport//lib/active_support/encrypted_file.rb#8 +# pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:36 +class ActiveSupport::EncryptedConfiguration::InvalidContentError < ::RuntimeError + # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:37 + def initialize(content_path); end + + # pkg:gem/activesupport#lib/active_support/encrypted_configuration.rb:41 + def message; end +end + +# pkg:gem/activesupport#lib/active_support/encrypted_file.rb:8 class ActiveSupport::EncryptedFile - # @return [EncryptedFile] a new instance of EncryptedFile - # - # source://activesupport//lib/active_support/encrypted_file.rb#42 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:42 def initialize(content_path:, key_path:, env_key:, raise_if_missing_key:); end - # source://activesupport//lib/active_support/encrypted_file.rb#77 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:83 def change(&block); end - # Returns the value of attribute content_path. - # - # source://activesupport//lib/active_support/encrypted_file.rb#40 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:40 def content_path; end - # Returns the value of attribute env_key. - # - # source://activesupport//lib/active_support/encrypted_file.rb#40 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:40 def env_key; end # Returns the encryption key, first trying the environment variable @@ -4468,17 +5093,19 @@ class ActiveSupport::EncryptedFile # If +raise_if_missing_key+ is true, raises MissingKeyError if the # environment variable is not set and the key file does not exist. # - # source://activesupport//lib/active_support/encrypted_file.rb#52 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:52 def key; end - # Returns the value of attribute key_path. + # Returns truthy if #key is truthy. Returns falsy otherwise. Unlike #key, + # does not raise MissingKeyError when +raise_if_missing_key+ is true. # - # source://activesupport//lib/active_support/encrypted_file.rb#40 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:58 + def key?; end + + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:40 def key_path; end - # Returns the value of attribute raise_if_missing_key. - # - # source://activesupport//lib/active_support/encrypted_file.rb#40 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:40 def raise_if_missing_key; end # Reads the file and returns the decrypted content. @@ -4490,113 +5117,118 @@ class ActiveSupport::EncryptedFile # - ActiveSupport::MessageEncryptor::InvalidMessage if the content cannot be # decrypted or verified. # - # source://activesupport//lib/active_support/encrypted_file.rb#64 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:70 def read; end - # source://activesupport//lib/active_support/encrypted_file.rb#72 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:78 def write(contents); end private - # @raise [InvalidKeyLengthError] - # - # source://activesupport//lib/active_support/encrypted_file.rb#124 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:129 def check_key_length; end - # source://activesupport//lib/active_support/encrypted_file.rb#102 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:108 def decrypt(contents); end - # source://activesupport//lib/active_support/encrypted_file.rb#97 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:103 def encrypt(contents); end - # source://activesupport//lib/active_support/encrypted_file.rb#106 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:112 def encryptor; end - # @raise [MissingKeyError] - # - # source://activesupport//lib/active_support/encrypted_file.rb#120 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:125 def handle_missing_key; end - # source://activesupport//lib/active_support/encrypted_file.rb#111 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:117 def read_env_key; end - # source://activesupport//lib/active_support/encrypted_file.rb#115 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:121 def read_key_file; end - # source://activesupport//lib/active_support/encrypted_file.rb#83 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:89 def writing(contents); end class << self - # source://activesupport//lib/active_support/encrypted_file.rb#35 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:35 def expected_key_length; end - # source://activesupport//lib/active_support/encrypted_file.rb#31 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:31 def generate_key; end end end -# source://activesupport//lib/active_support/encrypted_file.rb#29 +# pkg:gem/activesupport#lib/active_support/encrypted_file.rb:29 ActiveSupport::EncryptedFile::CIPHER = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/encrypted_file.rb#23 +# pkg:gem/activesupport#lib/active_support/encrypted_file.rb:23 class ActiveSupport::EncryptedFile::InvalidKeyLengthError < ::RuntimeError - # @return [InvalidKeyLengthError] a new instance of InvalidKeyLengthError - # - # source://activesupport//lib/active_support/encrypted_file.rb#24 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:24 def initialize; end end -# source://activesupport//lib/active_support/encrypted_file.rb#9 +# pkg:gem/activesupport#lib/active_support/encrypted_file.rb:9 class ActiveSupport::EncryptedFile::MissingContentError < ::RuntimeError - # @return [MissingContentError] a new instance of MissingContentError - # - # source://activesupport//lib/active_support/encrypted_file.rb#10 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:10 def initialize(content_path); end end -# source://activesupport//lib/active_support/encrypted_file.rb#15 +# pkg:gem/activesupport#lib/active_support/encrypted_file.rb:15 class ActiveSupport::EncryptedFile::MissingKeyError < ::RuntimeError - # @return [MissingKeyError] a new instance of MissingKeyError - # - # source://activesupport//lib/active_support/encrypted_file.rb#16 + # pkg:gem/activesupport#lib/active_support/encrypted_file.rb:16 def initialize(key_path:, env_key:); end end -# source://activesupport//lib/active_support/core_ext/enumerable.rb#4 +# pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:4 module ActiveSupport::EnumerableCoreExt; end -# source://activesupport//lib/active_support/core_ext/enumerable.rb#5 +# pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:5 module ActiveSupport::EnumerableCoreExt::Constants private - # source://activesupport//lib/active_support/core_ext/enumerable.rb#7 + # pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:25 ActiveSupport::EnumerableCoreExt::SoleItemExpectedError = Enumerable::SoleItemExpectedError -# source://activesupport//lib/active_support/environment_inquirer.rb#6 +# pkg:gem/activesupport#lib/active_support/environment_inquirer.rb:9 class ActiveSupport::EnvironmentInquirer < ::ActiveSupport::StringInquirer - # @return [EnvironmentInquirer] a new instance of EnvironmentInquirer - # - # source://activesupport//lib/active_support/environment_inquirer.rb#8 + # pkg:gem/activesupport#lib/active_support/environment_inquirer.rb:15 def initialize(env); end + # pkg:gem/activesupport#lib/active_support/environment_inquirer.rb:28 def development?; end + + # Returns true if we're in the development or test environment. + # + # pkg:gem/activesupport#lib/active_support/environment_inquirer.rb:36 + def local?; end + + # pkg:gem/activesupport#lib/active_support/environment_inquirer.rb:28 def production?; end + + # pkg:gem/activesupport#lib/active_support/environment_inquirer.rb:28 def test?; end end -# source://activesupport//lib/active_support/environment_inquirer.rb#7 +# 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. +# +# pkg:gem/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? +# +# pkg:gem/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: +# To rescue and report any unhandled error, you can use the #handle method: # # Rails.error.handle do # do_something! @@ -4604,147 +5236,245 @@ ActiveSupport::EnvironmentInquirer::DEFAULT_ENVIRONMENTS = T.let(T.unsafe(nil), # # 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+ +# 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 only handle a specific exception class +# Both methods can be restricted to handle only a specific error class: # # maybe_tags = Rails.error.handle(Redis::BaseError) { redis.get("tags") } # -# You can also pass some extra context information that may be used by the error subscribers: -# -# Rails.error.handle(context: { section: "admin" }) do -# # ... -# end -# -# Additionally a +severity+ can be passed along to communicate how important the error report is. -# +severity+ can be one of +:error+, +:warning+, or +:info+. Handled errors default to the +:warning+ -# severity, and unhandled ones to +:error+. -# -# Both +handle+ and +record+ pass through the return value from the block. In the case of +handle+ -# rescuing an error, a fallback can be provided. The fallback must be a callable whose result will -# be returned when the block raises and is handled: -# -# user = Rails.error.handle(fallback: -> { User.anonymous }) do -# User.find_by(params) -# end -# -# source://activesupport//lib/active_support/error_reporter.rb#41 +# pkg:gem/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#46 + # pkg:gem/activesupport#lib/active_support/error_reporter.rb:35 def initialize(*subscribers, logger: T.unsafe(nil)); end - # Report any unhandled exception, and swallow it. + # pkg:gem/activesupport#lib/active_support/error_reporter.rb:31 + def debug_mode; end + + # pkg:gem/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. + # + # pkg:gem/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 # - # source://activesupport//lib/active_support/error_reporter.rb#57 - def handle(error_class = T.unsafe(nil), severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil)); end - - # Returns the value of attribute logger. + # Can be restricted to handle only specific error classes: # - # source://activesupport//lib/active_support/error_reporter.rb#44 - def logger; end - - # Sets the attribute logger + # maybe_tags = Rails.error.handle(Redis::BaseError) { redis.get("tags") } # - # @param value the value to set the attribute logger to. + # ==== 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#44 + # pkg:gem/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 + + # pkg:gem/activesupport#lib/active_support/error_reporter.rb:31 + def logger; end + + # pkg:gem/activesupport#lib/active_support/error_reporter.rb:31 def logger=(_arg0); end - # source://activesupport//lib/active_support/error_reporter.rb#64 - def record(error_class = T.unsafe(nil), severity: T.unsafe(nil), context: T.unsafe(nil)); 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". + # + # pkg:gem/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 - # When the block based +handle+ and +record+ methods are not suitable, you can directly use +report+ + # 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, handled: true) + # Rails.error.report(error) # - # source://activesupport//lib/active_support/error_reporter.rb#95 - def report(error, handled:, severity: T.unsafe(nil), context: T.unsafe(nil)); end + # pkg:gem/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 + # 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) # - # See +ActiveSupport::ExecutionContext.set+ - # - # source://activesupport//lib/active_support/error_reporter.rb#88 + # pkg:gem/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, context: Hash) + # report(Exception, handled: Boolean, severity: (:error OR :warning OR :info), context: Hash, source: String) # - # The +report+ method +should+ never raise an error. + # The +report+ method should never raise an error. # - # source://activesupport//lib/active_support/error_reporter.rb#76 + # pkg:gem/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 + # + # pkg:gem/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) + # + # pkg:gem/activesupport#lib/active_support/error_reporter.rb:176 + def unsubscribe(subscriber); end end -# source://activesupport//lib/active_support/error_reporter.rb#42 +# pkg:gem/activesupport#lib/active_support/error_reporter.rb:29 +ActiveSupport::ErrorReporter::DEFAULT_RESCUE = T.let(T.unsafe(nil), Array) + +# pkg:gem/activesupport#lib/active_support/error_reporter.rb:28 +ActiveSupport::ErrorReporter::DEFAULT_SOURCE = T.let(T.unsafe(nil), String) + +# pkg:gem/activesupport#lib/active_support/error_reporter.rb:27 ActiveSupport::ErrorReporter::SEVERITIES = T.let(T.unsafe(nil), Array) -# source://activesupport//lib/active_support/execution_context.rb#4 +# pkg:gem/activesupport#lib/active_support/error_reporter.rb:33 +class ActiveSupport::ErrorReporter::UnexpectedError < ::Exception; end + +# pkg:gem/activesupport#lib/active_support/execution_context.rb:4 module ActiveSupport::ExecutionContext class << self - # source://activesupport//lib/active_support/execution_context.rb#34 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:34 def []=(key, value); end - # source://activesupport//lib/active_support/execution_context.rb#7 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:7 def after_change(&block); end - # source://activesupport//lib/active_support/execution_context.rb#43 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:13 def set(**options); end - # source://activesupport//lib/active_support/execution_context.rb#39 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:39 def to_h; end private - # source://activesupport//lib/active_support/execution_context.rb#48 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:48 def store; end end end -# source://activesupport//lib/active_support/execution_wrapper.rb#8 +# pkg:gem/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#68 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:8 def __callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:8 def __callbacks?; end - # source://activesupport//lib/active_support/callbacks.rb#940 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:15 def _complete_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#940 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:14 def _run_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#928 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:15 def _run_complete_callbacks(&block); end - # source://activesupport//lib/active_support/callbacks.rb#928 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:14 def _run_run_callbacks(&block); end - # source://activesupport//lib/active_support/execution_wrapper.rb#142 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:141 def complete; end # Complete this in-flight execution. This method *must* be called @@ -4752,54 +5482,52 @@ class ActiveSupport::ExecutionWrapper # # Where possible, prefer +wrap+. # - # source://activesupport//lib/active_support/execution_wrapper.rb#136 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:135 def complete!; end - # source://activesupport//lib/active_support/execution_wrapper.rb#128 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:127 def run; end - # source://activesupport//lib/active_support/execution_wrapper.rb#123 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:122 def run!; end private - # source://activesupport//lib/active_support/execution_wrapper.rb#147 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:146 def hook_state; end class << self - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:8 def __callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:8 def __callbacks=(value); end - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:8 def __callbacks?; end - # source://activesupport//lib/active_support/callbacks.rb#932 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:15 def _complete_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#936 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:15 def _complete_callbacks=(value); end - # source://activesupport//lib/active_support/callbacks.rb#932 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:14 def _run_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#936 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:14 def _run_callbacks=(value); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/execution_wrapper.rb#119 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:118 def active?; end - # source://activesupport//lib/active_support/execution_wrapper.rb#115 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:114 def active_key; end - # source://activesupport//lib/active_support/execution_wrapper.rb#111 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:110 def error_reporter; end - # source://activesupport//lib/active_support/execution_wrapper.rb#101 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:100 def perform; end # Register an object to be invoked during both the +run+ and @@ -4811,7 +5539,7 @@ class ActiveSupport::ExecutionWrapper # a preceding +to_run+ block; all ordinary +to_complete+ blocks are # invoked in that situation.) # - # source://activesupport//lib/active_support/execution_wrapper.rb#51 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:50 def register_hook(hook, outer: T.unsafe(nil)); end # Run this execution. @@ -4821,82 +5549,92 @@ class ActiveSupport::ExecutionWrapper # # Where possible, prefer +wrap+. # - # source://activesupport//lib/active_support/execution_wrapper.rb#67 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:66 def run!(reset: T.unsafe(nil)); end - # source://activesupport//lib/active_support/execution_wrapper.rb#22 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:21 def to_complete(*args, &block); end - # source://activesupport//lib/active_support/execution_wrapper.rb#18 + # pkg:gem/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#87 - def wrap; end + # pkg:gem/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#33 +# pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:32 class ActiveSupport::ExecutionWrapper::CompleteHook < ::Struct - # source://activesupport//lib/active_support/execution_wrapper.rb#34 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:39 def after(target); end - # source://activesupport//lib/active_support/execution_wrapper.rb#34 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:32 def hook; end - # Sets the attribute hook - # - # @param value [Object] the value to set the attribute hook to. - # @return [Object] the newly set value + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:32 def hook=(_); end class << self + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:32 def [](*_arg0); end + + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:32 def inspect; end + + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:32 def keyword_init?; end + + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:32 def members; end + + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:32 def new(*_arg0); end end end -# source://activesupport//lib/active_support/execution_wrapper.rb#11 +# pkg:gem/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#26 +# pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:25 class ActiveSupport::ExecutionWrapper::RunHook < ::Struct - # source://activesupport//lib/active_support/execution_wrapper.rb#27 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:25 def hook; end - # Sets the attribute hook - # - # @param value [Object] the value to set the attribute hook to. - # @return [Object] the newly set value + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:25 def hook=(_); end class << self + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:25 def [](*_arg0); end + + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:25 def inspect; end + + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:25 def keyword_init?; end + + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:25 def members; end + + # pkg:gem/activesupport#lib/active_support/execution_wrapper.rb:25 def new(*_arg0); end end end -# source://activesupport//lib/active_support/executor.rb#6 +# pkg:gem/activesupport#lib/active_support/executor.rb:6 class ActiveSupport::Executor < ::ActiveSupport::ExecutionWrapper; end -# FileUpdateChecker specifies the API used by Rails to watch files +# = \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 @@ -4913,7 +5651,7 @@ class ActiveSupport::Executor < ::ActiveSupport::ExecutionWrapper; end # 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 +# 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 @@ -4924,7 +5662,7 @@ class ActiveSupport::Executor < ::ActiveSupport::ExecutionWrapper; end # i18n_reloader.execute_if_updated # end # -# source://activesupport//lib/active_support/file_update_checker.rb#33 +# pkg:gem/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 @@ -4935,40 +5673,36 @@ class ActiveSupport::FileUpdateChecker # changes. The array of files and list of directories cannot be changed # after FileUpdateChecker has been initialized. # - # @return [FileUpdateChecker] a new instance of FileUpdateChecker - # - # source://activesupport//lib/active_support/file_update_checker.rb#42 + # pkg:gem/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#80 + # pkg:gem/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#90 + # pkg:gem/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#61 + # pkg:gem/activesupport#lib/active_support/file_update_checker.rb:63 def updated?; end private - # source://activesupport//lib/active_support/file_update_checker.rb#156 + # pkg:gem/activesupport#lib/active_support/file_update_checker.rb:158 def compile_ext(array); end - # source://activesupport//lib/active_support/file_update_checker.rb#142 + # pkg:gem/activesupport#lib/active_support/file_update_checker.rb:144 def compile_glob(hash); end - # source://activesupport//lib/active_support/file_update_checker.rb#152 + # pkg:gem/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+ @@ -4979,55 +5713,41 @@ class ActiveSupport::FileUpdateChecker # healthy to consider this edge case because with mtimes in the future # reloading is not triggered. # - # source://activesupport//lib/active_support/file_update_checker.rb#120 + # pkg:gem/activesupport#lib/active_support/file_update_checker.rb:122 def max_mtime(paths); end - # source://activesupport//lib/active_support/file_update_checker.rb#109 + # pkg:gem/activesupport#lib/active_support/file_update_checker.rb:111 def updated_at(paths); end - # source://activesupport//lib/active_support/file_update_checker.rb#101 + # pkg:gem/activesupport#lib/active_support/file_update_checker.rb:103 def watched; end end -# source://activesupport//lib/active_support/fork_tracker.rb#4 +# pkg:gem/activesupport#lib/active_support/fork_tracker.rb:4 module ActiveSupport::ForkTracker class << self - # source://activesupport//lib/active_support/fork_tracker.rb#59 + # pkg:gem/activesupport#lib/active_support/fork_tracker.rb:31 def after_fork(&block); end - # source://activesupport//lib/active_support/fork_tracker.rb#40 - def check!; end + # pkg:gem/activesupport#lib/active_support/fork_tracker.rb:19 + def after_fork_callback; end - # source://activesupport//lib/active_support/fork_tracker.rb#48 + # pkg:gem/activesupport#lib/active_support/fork_tracker.rb:27 def hook!; end - # source://activesupport//lib/active_support/fork_tracker.rb#64 + # pkg:gem/activesupport#lib/active_support/fork_tracker.rb:36 def unregister(callback); end end end -# source://activesupport//lib/active_support/fork_tracker.rb#15 +# pkg:gem/activesupport#lib/active_support/fork_tracker.rb:5 module ActiveSupport::ForkTracker::CoreExt - # source://activesupport//lib/active_support/fork_tracker.rb#16 - def fork(*_arg0, **_arg1, &_arg2); end -end - -# source://activesupport//lib/active_support/fork_tracker.rb#31 -module ActiveSupport::ForkTracker::CoreExtPrivate - include ::ActiveSupport::ForkTracker::CoreExt - - private - - # source://activesupport//lib/active_support/fork_tracker.rb#16 - def fork(*_arg0, **_arg1, &_arg2); end -end - -# source://activesupport//lib/active_support/fork_tracker.rb#5 -module ActiveSupport::ForkTracker::ModernCoreExt - # source://activesupport//lib/active_support/fork_tracker.rb#6 + # pkg:gem/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. # @@ -5037,32 +5757,32 @@ end # ActiveSupport::Gzip.decompress(gzip) # # => "compress me!" # -# source://activesupport//lib/active_support/gzip.rb#15 +# pkg:gem/activesupport#lib/active_support/gzip.rb:17 module ActiveSupport::Gzip class << self # Compresses a string using gzip. # - # source://activesupport//lib/active_support/gzip.rb#30 + # pkg:gem/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#25 + # pkg:gem/activesupport#lib/active_support/gzip.rb:27 def decompress(source); end end end -# source://activesupport//lib/active_support/gzip.rb#16 +# pkg:gem/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#17 + # pkg:gem/activesupport#lib/active_support/gzip.rb:19 def initialize(*_arg0); end - # source://activesupport//lib/active_support/gzip.rb#21 + # pkg:gem/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. # @@ -5094,7 +5814,7 @@ end # # 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. +# example the +params+ hash in Ruby on \Rails. # # Note that core extensions define Hash#with_indifferent_access: # @@ -5102,17 +5822,15 @@ end # # which may be handy. # -# To access this class outside of Rails, require the core extension with: +# 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#53 +# pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:55 class ActiveSupport::HashWithIndifferentAccess < ::Hash - # @return [HashWithIndifferentAccess] a new instance of HashWithIndifferentAccess - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#68 + # pkg:gem/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 @@ -5125,7 +5843,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # counters[:foo] # => 1 # counters[:zoo] # => nil # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#166 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:168 def [](key); end # Assigns a new value to the hash: @@ -5135,7 +5853,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # # This value can be later fetched using either +:key+ or 'key'. # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#96 + # pkg:gem/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 @@ -5148,19 +5866,19 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # counters.assoc(:foo) # => ["foo", 1] # counters.assoc(:zoo) # => nil # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#179 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:181 def assoc(key); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#357 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:378 def compact; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#311 + # pkg:gem/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#309 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:315 def deep_stringify_keys!; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#316 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:322 def deep_symbolize_keys; end # Same as Hash#default where the key passed as argument can be @@ -5174,12 +5892,12 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash.default('foo') # => 'foo' # hash.default(:foo) # => 'foo' # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#221 - def default(*args); end + # pkg:gem/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#295 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:301 def delete(key); end # Same as Hash#dig where the key passed as argument can be @@ -5192,7 +5910,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # counters.dig(:foo, :bar) # => 1 # counters.dig(:zoo) # => nil # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#206 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:208 def dig(*args); end # Returns a shallow copy of the hash. @@ -5204,7 +5922,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash[:a][:c] # => "c" # dup[:a][:c] # => "c" # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#256 + # pkg:gem/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. @@ -5212,15 +5930,13 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # 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#303 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:309 def except(*keys); end # Returns +true+ so that Array#extract_options! finds members of # this class. # - # @return [Boolean] - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#56 + # pkg:gem/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 @@ -5234,7 +5950,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # counters.fetch(:bar) { |key| 0 } # => 0 # counters.fetch(:zoo) # => KeyError: key not found: "zoo" # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#193 + # pkg:gem/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 @@ -5247,31 +5963,13 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # 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#244 + # pkg:gem/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#149 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:156 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#149 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:155 def include?(key); end # Checks the hash for a key matching the argument passed in: @@ -5281,69 +5979,32 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash.key?(:key) # => true # hash.key?('key') # => true # - # @return [Boolean] - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#149 + # pkg:gem/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#149 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:157 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#265 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:271 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#130 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:143 def merge!(*other_hashes, &block); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#64 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:66 def nested_under_indifferent_access; end + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:90 def regular_update(*_arg0); end + + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:89 def regular_writer(_arg0, _arg1); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#324 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:330 def reject(*args, &block); end # Replaces the contents of this hash with other_hash. @@ -5351,7 +6012,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::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#290 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:296 def replace(other_hash); end # Like +merge+ but the other way around: Merges the receiver into the @@ -5361,61 +6022,57 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash['a'] = nil # hash.reverse_merge(a: 0, b: 1) # => {"a"=>nil, "b"=>1} # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#275 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:281 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#281 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:287 def reverse_merge!(other_hash); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#319 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:325 def select(*args, &block); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#347 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:368 def slice(*keys); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#352 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:373 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#96 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:102 def store(key, value); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#310 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:316 def stringify_keys; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#308 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:314 def stringify_keys!; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#314 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:320 def symbolize_keys; end # Convert to a regular hash with string keys. # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#362 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:383 def to_hash; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#314 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:321 def to_options; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#317 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:323 def to_options!; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#334 - def transform_keys(*args, &block); end + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:393 + def to_proc; end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#339 - def transform_keys!; end + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:342 + def transform_keys(hash = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#329 - def transform_values(*args, &block); end + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:354 + def transform_keys!(hash = T.unsafe(nil), &block); end + + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:335 + def transform_values(&block); end # Updates the receiver in-place, merging in the hashes passed as arguments: # @@ -5431,7 +6088,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash.update({ "a" => 1 }, { "b" => 2 }) # => { "a" => 1, "b" => 2 } # # The arguments can be either an - # ActiveSupport::HashWithIndifferentAccess or a regular +Hash+. + # +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 @@ -5446,7 +6103,7 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # 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#130 + # pkg:gem/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: @@ -5456,93 +6113,80 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # hash[:b] = 'y' # hash.values_at('a', 'b') # => ["x", "y"] # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#231 + # pkg:gem/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#275 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:284 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#281 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:290 def with_defaults!(other_hash); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#60 + # pkg:gem/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#303 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:312 def without(*keys); end private - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#374 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:398 def convert_key(key); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#383 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:402 def convert_value(value, conversion: T.unsafe(nil)); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#400 - def set_defaults(target); end + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:419 + def copy_defaults(target); end - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#408 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:428 def update_with_single_argument(other_hash, block); end class << self - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#83 + # pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:85 def [](*args); end end end -# source://activesupport//lib/active_support/html_safe_translation.rb#4 +# pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:340 +ActiveSupport::HashWithIndifferentAccess::NOT_GIVEN = T.let(T.unsafe(nil), Object) + +# pkg:gem/activesupport#lib/active_support/html_safe_translation.rb:4 module ActiveSupport::HtmlSafeTranslation extend ::ActiveSupport::HtmlSafeTranslation - # source://activesupport//lib/active_support/html_safe_translation.rb#7 + # pkg:gem/activesupport#lib/active_support/html_safe_translation.rb:30 + def html_safe_translation_key?(key); end + + # pkg:gem/activesupport#lib/active_support/html_safe_translation.rb:7 def translate(key, **options); end private - # source://activesupport//lib/active_support/html_safe_translation.rb#22 + # pkg:gem/activesupport#lib/active_support/html_safe_translation.rb:35 def html_escape_translation_options(options); end - # source://activesupport//lib/active_support/html_safe_translation.rb#35 + # pkg:gem/activesupport#lib/active_support/html_safe_translation.rb:48 def html_safe_translation(translation); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/html_safe_translation.rb#18 - def html_safe_translation_key?(key); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/html_safe_translation.rb#30 + # pkg:gem/activesupport#lib/active_support/html_safe_translation.rb:43 def i18n_option?(name); end end +# = 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 +# 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 +# pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:7 module ActiveSupport::Inflector extend ::ActiveSupport::Inflector @@ -5563,10 +6207,10 @@ module ActiveSupport::Inflector # # camelize(underscore('SSLError')) # => "SslError" # - # source://activesupport//lib/active_support/inflector/methods.rb#69 + # pkg:gem/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 + # 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.) # @@ -5577,7 +6221,7 @@ module ActiveSupport::Inflector # # classify('calculus') # => "Calculu" # - # source://activesupport//lib/active_support/inflector/methods.rb#206 + # pkg:gem/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. @@ -5599,14 +6243,14 @@ module ActiveSupport::Inflector # NameError is raised when the name is not in CamelCase or the constant is # unknown. # - # source://activesupport//lib/active_support/inflector/methods.rb#277 + # pkg:gem/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#214 + # pkg:gem/activesupport#lib/active_support/inflector/methods.rb:226 def dasherize(underscored_word); end # Removes the rightmost segment from the constant expression in the string. @@ -5619,7 +6263,7 @@ module ActiveSupport::Inflector # # See also #demodulize. # - # source://activesupport//lib/active_support/inflector/methods.rb#244 + # pkg:gem/activesupport#lib/active_support/inflector/methods.rb:256 def deconstantize(path); end # Removes the module part from the expression in the string. @@ -5631,9 +6275,18 @@ module ActiveSupport::Inflector # # See also #deconstantize. # - # source://activesupport//lib/active_support/inflector/methods.rb#226 + # pkg:gem/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('') # => "" + # + # pkg:gem/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'. @@ -5642,7 +6295,7 @@ module ActiveSupport::Inflector # foreign_key('Message', false) # => "messageid" # foreign_key('Admin::Post') # => "post_id" # - # source://activesupport//lib/active_support/inflector/methods.rb#255 + # pkg:gem/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. @@ -5671,7 +6324,7 @@ module ActiveSupport::Inflector # # humanize('ssl_error') # => "SSL error" # - # source://activesupport//lib/active_support/inflector/methods.rb#132 + # pkg:gem/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 @@ -5683,7 +6336,7 @@ module ActiveSupport::Inflector # inflect.uncountable 'rails' # end # - # source://activesupport//lib/active_support/inflector/inflections.rb#263 + # pkg:gem/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 @@ -5696,7 +6349,7 @@ module ActiveSupport::Inflector # ordinal(-11) # => "th" # ordinal(-1021) # => "st" # - # source://activesupport//lib/active_support/inflector/methods.rb#322 + # pkg:gem/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 @@ -5709,7 +6362,7 @@ module ActiveSupport::Inflector # ordinalize(-11) # => "-11th" # ordinalize(-1021) # => "-1021st" # - # source://activesupport//lib/active_support/inflector/methods.rb#335 + # pkg:gem/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 @@ -5739,7 +6392,7 @@ module ActiveSupport::Inflector # By default, this parameter is set to nil and it will use # the configured I18n.locale. # - # source://activesupport//lib/active_support/inflector/transliterate.rb#121 + # pkg:gem/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. @@ -5755,7 +6408,7 @@ module ActiveSupport::Inflector # pluralize('CamelOctopus') # => "CamelOctopi" # pluralize('ley', :es) # => "leyes" # - # source://activesupport//lib/active_support/inflector/methods.rb#32 + # pkg:gem/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. @@ -5781,7 +6434,7 @@ module ActiveSupport::Inflector # safe_constantize('UnknownModule') # => nil # safe_constantize('UnknownModule::Foo::Bar') # => nil # - # source://activesupport//lib/active_support/inflector/methods.rb#303 + # pkg:gem/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 @@ -5798,22 +6451,22 @@ module ActiveSupport::Inflector # singularize('CamelOctopi') # => "CamelOctopus" # singularize('leyes', :es) # => "ley" # - # source://activesupport//lib/active_support/inflector/methods.rb#49 + # pkg:gem/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. + # 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#192 + # pkg:gem/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. + # 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. @@ -5825,7 +6478,7 @@ module ActiveSupport::Inflector # 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#180 + # pkg:gem/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 @@ -5883,9 +6536,7 @@ module ActiveSupport::Inflector # 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 + # pkg:gem/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. @@ -5900,16 +6551,16 @@ module ActiveSupport::Inflector # # camelize(underscore('SSLError')) # => "SslError" # - # source://activesupport//lib/active_support/inflector/methods.rb#96 + # pkg:gem/activesupport#lib/active_support/inflector/methods.rb:99 def underscore(camel_cased_word); end - # Converts just the first character to uppercase. + # 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#163 + # pkg:gem/activesupport#lib/active_support/inflector/methods.rb:166 def upcase_first(string); end private @@ -5922,7 +6573,7 @@ module ActiveSupport::Inflector # apply_inflections('post', inflections.plurals, :en) # => "posts" # apply_inflections('posts', inflections.singulars, :en) # => "post" # - # source://activesupport//lib/active_support/inflector/methods.rb#364 + # pkg:gem/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, @@ -5931,13 +6582,15 @@ module ActiveSupport::Inflector # const_regexp("Foo::Bar::Baz") # => "Foo(::Bar(::Baz)?)?" # const_regexp("::") # => "::" # - # source://activesupport//lib/active_support/inflector/methods.rb#345 + # pkg:gem/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 +# pkg:gem/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 @@ -5957,11 +6610,9 @@ ActiveSupport::Inflector::ALLOWED_ENCODINGS_FOR_TRANSLITERATE = T.let(T.unsafe(n # singularization rules that is runs. This guarantees that your rules run # before any of the rules that may already have been loaded. # -# source://activesupport//lib/active_support/inflector/inflections.rb#28 +# pkg:gem/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#78 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:80 def initialize; end # Specifies a new acronym. An acronym must be specified as it will appear @@ -6014,18 +6665,16 @@ class ActiveSupport::Inflector::Inflections # underscore 'McDonald' # => 'mcdonald' # camelize 'mcdonald' # => 'McDonald' # - # source://activesupport//lib/active_support/inflector/inflections.rb#140 + # pkg:gem/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#74 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:76 def acronyms; end - # source://activesupport//lib/active_support/inflector/inflections.rb#76 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:78 def acronyms_camelize_regex; end - # source://activesupport//lib/active_support/inflector/inflections.rb#76 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:78 def acronyms_underscore_regex; end # Clears the loaded inflections within a given scope (default is @@ -6036,7 +6685,7 @@ class ActiveSupport::Inflector::Inflections # clear :all # clear :plurals # - # source://activesupport//lib/active_support/inflector/inflections.rb#229 + # pkg:gem/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 @@ -6048,12 +6697,10 @@ class ActiveSupport::Inflector::Inflections # human /_cnt$/i, '\1_count' # human 'legacy_col_person_name', 'Name' # - # source://activesupport//lib/active_support/inflector/inflections.rb#218 + # pkg:gem/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#74 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:76 def humans; end # Specifies a new irregular that applies to both pluralization and @@ -6064,7 +6711,7 @@ class ActiveSupport::Inflector::Inflections # irregular 'cactus', 'cacti' # irregular 'person', 'people' # - # source://activesupport//lib/active_support/inflector/inflections.rb#172 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:174 def irregular(singular, plural); end # Specifies a new pluralization rule and its replacement. The rule can @@ -6072,12 +6719,10 @@ class ActiveSupport::Inflector::Inflections # always be a string that may include references to the matched data from # the rule. # - # source://activesupport//lib/active_support/inflector/inflections.rb#149 + # pkg:gem/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#74 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:76 def plurals; end # Specifies a new singularization rule and its replacement. The rule can @@ -6085,12 +6730,10 @@ class ActiveSupport::Inflector::Inflections # always be a string that may include references to the matched data from # the rule. # - # source://activesupport//lib/active_support/inflector/inflections.rb#159 + # pkg:gem/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#74 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:76 def singulars; end # Specifies words that are uncountable and should not be inflected. @@ -6099,60 +6742,56 @@ class ActiveSupport::Inflector::Inflections # uncountable 'money', 'information' # uncountable %w( money information rice ) # - # source://activesupport//lib/active_support/inflector/inflections.rb#206 + # pkg:gem/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#74 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:76 def uncountables; end private - # source://activesupport//lib/active_support/inflector/inflections.rb#248 + # pkg:gem/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#84 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:86 def initialize_dup(orig); end class << self - # source://activesupport//lib/active_support/inflector/inflections.rb#63 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:65 def instance(locale = T.unsafe(nil)); end - # source://activesupport//lib/active_support/inflector/inflections.rb#67 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:69 def instance_or_fallback(locale); end end end -# source://activesupport//lib/active_support/inflector/inflections.rb#31 +# pkg:gem/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#32 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:34 def initialize; end - # source://activesupport//lib/active_support/inflector/inflections.rb#42 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:44 def <<(*word); end - # source://activesupport//lib/active_support/inflector/inflections.rb#46 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:48 def add(words); end - # source://activesupport//lib/active_support/inflector/inflections.rb#37 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:39 def delete(entry); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/inflector/inflections.rb#53 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:55 def uncountable?(str); end private - # source://activesupport//lib/active_support/inflector/inflections.rb#58 + # pkg:gem/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. # @@ -6162,85 +6801,141 @@ end # h.girl # => 'Mary' # h.boy # => 'John' # -# source://activesupport//lib/active_support/ordered_options.rb#79 +# 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' +# +# pkg:gem/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#80 + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:90 def initialize(parent = T.unsafe(nil)); end - # source://activesupport//lib/active_support/ordered_options.rb#91 + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:107 + def ==(other); end + + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:142 + def each(&block); end + + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:134 def inheritable_copy; 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#32 - def [](key); end + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:111 + def inspect; end - # source://activesupport//lib/active_support/isolated_execution_state.rb#36 - def []=(key, value); end + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:126 + def key?(key); end - # source://activesupport//lib/active_support/isolated_execution_state.rb#48 - def clear; end + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:130 + def overridden?(key); end - # source://activesupport//lib/active_support/isolated_execution_state.rb#44 - def delete(key); end + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:119 + def pretty_print(pp); end - # Returns the value of attribute isolation_level. - # - # source://activesupport//lib/active_support/isolated_execution_state.rb#13 + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:138 + def to_a; end + + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:103 + def to_h; end + + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:115 + def to_s; end + + private + + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:123 + def own_key?(_arg0); end +end + +# pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:6 +module ActiveSupport::IsolatedExecutionState + class << self + # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:37 + def [](key); end + + # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:41 + def []=(key, value); end + + # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:53 + def clear; end + + # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:57 + def context; end + + # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:49 + def delete(key); end + + # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:13 def isolation_level; end - # source://activesupport//lib/active_support/isolated_execution_state.rb#15 + # pkg:gem/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#40 + # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:45 def key?(key); end - # source://activesupport//lib/active_support/isolated_execution_state.rb#52 + # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:13 + def scope; end + + # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:61 def share_with(other); end - # source://activesupport//lib/active_support/isolated_execution_state.rb#28 + # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:33 def unique_id; end private - # source://activesupport//lib/active_support/isolated_execution_state.rb#61 - def current; end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#65 - def current_fiber; end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#61 - def current_thread; end + # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:69 + def state; end end end -# source://activesupport//lib/active_support/json/decoding.rb#11 +# pkg:gem/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"} + # # => {"team" => "rails", "players" => "36"} # - # source://activesupport//lib/active_support/json/decoding.rb#22 + # pkg:gem/activesupport#lib/active_support/json/decoding.rb:22 def decode(json); end + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:43 + def dump(value, options = T.unsafe(nil)); end + # Dumps objects in JSON (JavaScript Object Notation). # See http://www.json.org for more info. # # ActiveSupport::JSON.encode({ team: 'rails', players: '36' }) # # => "{\"team\":\"rails\",\"players\":\"36\"}" # - # source://activesupport//lib/active_support/json/encoding.rb#21 + # Generates JSON that is safe to include in JavaScript as it escapes + # U+2028 (Line Separator) and U+2029 (Paragraph Separator): + # + # ActiveSupport::JSON.encode({ key: "\u2028" }) + # # => "{\"key\":\"\\u2028\"}" + # + # By default, it also generates JSON that is safe to include in HTML, as + # it escapes <, >, and &: + # + # ActiveSupport::JSON.encode({ key: "<>&" }) + # # => "{\"key\":\"\\u003c\\u003e\\u0026\"}" + # + # This can be changed with the +escape_html_entities+ option, or the + # global escape_html_entities_in_json configuration option. + # + # ActiveSupport::JSON.encode({ key: "<>&" }, escape_html_entities: false) + # # => "{\"key\":\"<>&\"}" + # + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:40 def encode(value, options = T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/json/decoding.rb:31 + 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 @@ -6252,98 +6947,94 @@ module ActiveSupport::JSON # Rails.logger.warn("Attempted to decode invalid JSON: #{some_string}") # end # - # source://activesupport//lib/active_support/json/decoding.rb#42 + # pkg:gem/activesupport#lib/active_support/json/decoding.rb:43 def parse_error; end private - # source://activesupport//lib/active_support/json/decoding.rb#47 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/json/decoding.rb:13 ActiveSupport::JSON::DATE_REGEX = T.let(T.unsafe(nil), Regexp) -# source://activesupport//lib/active_support/json/encoding.rb#25 +# pkg:gem/activesupport#lib/active_support/json/encoding.rb:46 module ActiveSupport::JSON::Encoding class << self # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) # as a safety measure. # - # source://activesupport//lib/active_support/json/encoding.rb#121 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:121 def escape_html_entities_in_json; end # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) # as a safety measure. # - # source://activesupport//lib/active_support/json/encoding.rb#121 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:121 def escape_html_entities_in_json=(_arg0); end - # Sets the encoder used by Rails to encode Ruby objects into JSON strings + # Sets the encoder used by \Rails to encode Ruby objects into JSON strings # in +Object#to_json+ and +ActiveSupport::JSON.encode+. # - # source://activesupport//lib/active_support/json/encoding.rb#129 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:129 def json_encoder; end - # Sets the encoder used by Rails to encode Ruby objects into JSON strings + # Sets the encoder used by \Rails to encode Ruby objects into JSON strings # in +Object#to_json+ and +ActiveSupport::JSON.encode+. # - # source://activesupport//lib/active_support/json/encoding.rb#129 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:129 def json_encoder=(_arg0); end # Sets the precision of encoded time values. # Defaults to 3 (equivalent to millisecond precision) # - # source://activesupport//lib/active_support/json/encoding.rb#125 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:125 def time_precision; end # Sets the precision of encoded time values. # Defaults to 3 (equivalent to millisecond precision) # - # source://activesupport//lib/active_support/json/encoding.rb#125 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:125 def time_precision=(_arg0); end # If true, use ISO 8601 format for dates and times. Otherwise, fall back # to the Active Support legacy format. # - # source://activesupport//lib/active_support/json/encoding.rb#117 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:117 def use_standard_json_time_format; end # If true, use ISO 8601 format for dates and times. Otherwise, fall back # to the Active Support legacy format. # - # source://activesupport//lib/active_support/json/encoding.rb#117 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:117 def use_standard_json_time_format=(_arg0); end end end -# source://activesupport//lib/active_support/json/encoding.rb#26 +# pkg:gem/activesupport#lib/active_support/json/encoding.rb:47 class ActiveSupport::JSON::Encoding::JSONGemEncoder - # @return [JSONGemEncoder] a new instance of JSONGemEncoder - # - # source://activesupport//lib/active_support/json/encoding.rb#29 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:50 def initialize(options = T.unsafe(nil)); end # Encode the given object into a JSON string # - # source://activesupport//lib/active_support/json/encoding.rb#34 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:55 def encode(value); end - # Returns the value of attribute options. - # - # source://activesupport//lib/active_support/json/encoding.rb#27 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:48 def options; end private # Convert an object into a "JSON-ready" representation composed of - # primitives like Hash, Array, String, Numeric, + # 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. @@ -6356,72 +7047,53 @@ class ActiveSupport::JSON::Encoding::JSONGemEncoder # to +object.as_json+, not any of this method's recursive +#as_json+ # calls. # - # source://activesupport//lib/active_support/json/encoding.rb#89 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:88 def jsonify(value); end # Encode a "jsonified" Ruby data structure using the JSON gem # - # source://activesupport//lib/active_support/json/encoding.rb#109 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:109 def stringify(jsonified); end end -# Rails does more escaping than the JSON gem natively does (we -# escape \u2028 and \u2029 and optionally >, <, & to work around -# certain browser problems). -# -# source://activesupport//lib/active_support/json/encoding.rb#42 -ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPED_CHARS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/json/encoding.rb#51 -ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPE_REGEX_WITHOUT_HTML_ENTITIES = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/json/encoding.rb#50 -ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPE_REGEX_WITH_HTML_ENTITIES = T.let(T.unsafe(nil), Regexp) - -# This class wraps all the strings we see and does the extra escaping +# = Key Generator # -# source://activesupport//lib/active_support/json/encoding.rb#54 -class ActiveSupport::JSON::Encoding::JSONGemEncoder::EscapedString < ::String - # source://activesupport//lib/active_support/json/encoding.rb#55 - def to_json(*_arg0); end - - # source://activesupport//lib/active_support/json/encoding.rb#67 - def to_s; end -end - # KeyGenerator is a simple wrapper around OpenSSL's implementation of PBKDF2. # It can be used to derive a number of keys for various purposes from a given secret. -# This lets Rails applications have a single secure secret, but avoid reusing that +# This lets \Rails applications have a single secure secret, but avoid reusing that # key in multiple incompatible contexts. # -# source://activesupport//lib/active_support/key_generator.rb#11 +# pkg:gem/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#26 + # pkg:gem/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#39 + # pkg:gem/activesupport#lib/active_support/key_generator.rb:41 def generate_key(salt, key_size = T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/key_generator.rb:45 + def inspect; end + class << self - # source://activesupport//lib/active_support/key_generator.rb#21 + # pkg:gem/activesupport#lib/active_support/key_generator.rb:23 def hash_digest_class; end - # source://activesupport//lib/active_support/key_generator.rb#13 + # pkg:gem/activesupport#lib/active_support/key_generator.rb:15 def hash_digest_class=(klass); end end end -# LazyLoadHooks allows Rails to lazily load a lot of components and thus +# = 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 +# 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 +# +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. @@ -6455,18 +7127,18 @@ end # end # end # -# source://activesupport//lib/active_support/lazy_load_hooks.rb#41 +# pkg:gem/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 + # 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: + # ==== 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#58 + # pkg:gem/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 @@ -6477,24 +7149,26 @@ module ActiveSupport::LazyLoadHooks # 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#73 + # pkg:gem/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#89 + # pkg:gem/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#81 + # pkg:gem/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#42 + # pkg:gem/activesupport#lib/active_support/lazy_load_hooks.rb:44 def extended(base); end end end -# ActiveSupport::LogSubscriber is an object set to consume +# = 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. @@ -6504,29 +7178,23 @@ end # # 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 # -# And it's finally registered as: +# ActiveRecord::LogSubscriber.logger must be set as well, but it is assigned +# automatically in a \Rails environment. # -# ActiveRecord::LogSubscriber.attach_to :active_record -# -# Since we need to know all instance methods before attaching the log -# subscriber, the line above should be called after your -# ActiveRecord::LogSubscriber definition. -# -# A logger also needs to be set with ActiveRecord::LogSubscriber.logger=. -# This is assigned automatically in a Rails environment. -# -# After configured, whenever a "sql.active_record" notification is published, -# it will properly dispatch the event -# (ActiveSupport::Notifications::Event) to the sql method. +# 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 +# +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: @@ -6548,232 +7216,236 @@ end # end # end # -# Log subscriber also has some helpers to deal with logging and automatically -# flushes all logs when the request finishes -# (via action_dispatch.callback notification) in a Rails environment. +# +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#65 +# pkg:gem/activesupport#lib/active_support/log_subscriber.rb:64 class ActiveSupport::LogSubscriber < ::ActiveSupport::Subscriber - # source://activesupport//lib/active_support/log_subscriber.rb#80 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:133 + def initialize; end + + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:146 + def call(event); end + + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:83 def colorize_logging; end - # source://activesupport//lib/active_support/log_subscriber.rb#80 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:83 def colorize_logging=(val); end - # source://activesupport//lib/active_support/log_subscriber.rb#129 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:162 def debug(progname = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/log_subscriber.rb#129 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:162 def error(progname = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/log_subscriber.rb#129 - def fatal(progname = T.unsafe(nil), &block); end + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:158 + def event_levels=(_arg0); end - # source://activesupport//lib/active_support/log_subscriber.rb#114 - def finish(name, id, payload); end + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:162 + def fatal(progname = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/log_subscriber.rb#129 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:162 def info(progname = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/log_subscriber.rb#106 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:138 def logger; end - # source://activesupport//lib/active_support/log_subscriber.rb#120 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:152 def publish_event(event); end - # source://activesupport//lib/active_support/log_subscriber.rb#110 - def start(name, id, payload); end + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:142 + def silenced?(event); end - # source://activesupport//lib/active_support/log_subscriber.rb#129 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:162 def unknown(progname = T.unsafe(nil), &block); end - # source://activesupport//lib/active_support/log_subscriber.rb#129 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:162 def warn(progname = T.unsafe(nil), &block); end private - # Set color by using a symbol or one of the defined constants. If a third - # option is set to +true+, it also adds bold to the string. This is based - # on the Highline implementation and will automatically append CLEAR to the - # end of the returned String. + # 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#139 - def color(text, color, bold = T.unsafe(nil)); end + # pkg:gem/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#146 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:186 def log_exception(name, e); end + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:180 + def mode_from(options); end + class << self - # source://activesupport//lib/active_support/log_subscriber.rb#80 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:99 + def attach_to(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:83 def colorize_logging; end - # source://activesupport//lib/active_support/log_subscriber.rb#80 + # pkg:gem/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#96 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:112 def flush_all!; end - # source://activesupport//lib/active_support/log_subscriber.rb#91 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:84 + def log_levels; end + + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:84 + def log_levels=(value); end + + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:84 + def log_levels?; end + + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:107 def log_subscribers; end - # source://activesupport//lib/active_support/log_subscriber.rb#83 + # pkg:gem/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#89 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:105 def logger=(_arg0); end private - # source://activesupport//lib/active_support/log_subscriber.rb#101 + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:117 def fetch_public_methods(subscriber, inherit_all); end + + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:121 + def set_event_levels; end + + # pkg:gem/activesupport#lib/active_support/log_subscriber.rb:127 + def subscribe_log_level(method, level); end end end -# Colors +# ANSI sequence colors # -# source://activesupport//lib/active_support/log_subscriber.rb#71 +# pkg:gem/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#75 +# pkg:gem/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#68 -ActiveSupport::LogSubscriber::BOLD = T.let(T.unsafe(nil), String) - -# Embed in a String to clear all previous ANSI sequences. -# -# source://activesupport//lib/active_support/log_subscriber.rb#67 -ActiveSupport::LogSubscriber::CLEAR = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/log_subscriber.rb#77 +# pkg:gem/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#73 +# pkg:gem/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#76 +# pkg:gem/activesupport#lib/active_support/log_subscriber.rb:86 +ActiveSupport::LogSubscriber::LEVEL_CHECKS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/activesupport#lib/active_support/log_subscriber.rb:79 ActiveSupport::LogSubscriber::MAGENTA = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/log_subscriber.rb#72 +# ANSI sequence modes +# +# pkg:gem/activesupport#lib/active_support/log_subscriber.rb:66 +ActiveSupport::LogSubscriber::MODES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/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#78 +# pkg:gem/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#74 +# pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/logger.rb:8 class ActiveSupport::Logger < ::Logger include ::ActiveSupport::LoggerSilence include ::ActiveSupport::LoggerThreadSafeLevel - # @return [Logger] a new instance of Logger - # - # source://activesupport//lib/active_support/logger.rb#80 + # pkg:gem/activesupport#lib/active_support/logger.rb:33 def initialize(*args, **kwargs); end - # source://activesupport//lib/active_support/logger_silence.rb#12 + # pkg:gem/activesupport#lib/active_support/logger.rb:9 def silencer; end - # source://activesupport//lib/active_support/logger_silence.rb#12 + # pkg:gem/activesupport#lib/active_support/logger.rb:9 def silencer=(val); end class << self - # Broadcasts logs to multiple loggers. - # - # source://activesupport//lib/active_support/logger.rb#23 - def broadcast(logger); end - # Returns true if the logger destination matches one of the sources # # logger = Logger.new(STDOUT) # ActiveSupport::Logger.logger_outputs_to?(logger, STDOUT) # # => true # - # @return [Boolean] + # logger = Logger.new('/var/log/rails.log') + # ActiveSupport::Logger.logger_outputs_to?(logger, '/var/log/rails.log') + # # => true # - # source://activesupport//lib/active_support/logger.rb#16 + # pkg:gem/activesupport#lib/active_support/logger.rb:20 def logger_outputs_to?(logger, *sources); end - # source://activesupport//lib/active_support/logger_silence.rb#12 + # pkg:gem/activesupport#lib/active_support/logger.rb:47 + def normalize_sources(sources); end + + # pkg:gem/activesupport#lib/active_support/logger.rb:9 def silencer; end - # source://activesupport//lib/active_support/logger_silence.rb#12 + # pkg:gem/activesupport#lib/active_support/logger.rb:9 def silencer=(val); end end end # Simple formatter which only displays the message. # -# source://activesupport//lib/active_support/logger.rb#86 +# pkg:gem/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#88 + # pkg:gem/activesupport#lib/active_support/logger.rb:41 def call(severity, timestamp, progname, msg); end end -# source://activesupport//lib/active_support/logger_silence.rb#8 +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/logger_silence.rb:17 def silence(severity = T.unsafe(nil)); end end -# source://activesupport//lib/active_support/logger_thread_safe_level.rb#9 +# pkg:gem/activesupport#lib/active_support/logger_thread_safe_level.rb:7 module ActiveSupport::LoggerThreadSafeLevel extend ::ActiveSupport::Concern - # Redefined to check severity against #level, and thus the thread-local level, rather than +@level+. - # FIXME: Remove when the minimum Ruby version supports overriding Logger#level. - # - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#50 - def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 - def debug?; end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 - def error?; end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 - def fatal?; end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 - def info?; end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#36 + # pkg:gem/activesupport#lib/active_support/logger_thread_safe_level.rb:30 def level; end - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#20 + # pkg:gem/activesupport#lib/active_support/logger_thread_safe_level.rb:10 def local_level; end - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#24 + # pkg:gem/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#41 + # pkg:gem/activesupport#lib/active_support/logger_thread_safe_level.rb:35 def log_at(level); end - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 - def unknown?; end + private - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 - def warn?; end + # pkg:gem/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. # @@ -6791,7 +7463,7 @@ end # crypt.decrypt_and_verify(encrypted_data) # => "my secret data" # # The +decrypt_and_verify+ method will raise an -# ActiveSupport::MessageEncryptor::InvalidMessage exception if the data +# +ActiveSupport::MessageEncryptor::InvalidMessage+ exception if the data # provided cannot be decrypted or verified. # # crypt.decrypt_and_verify('not encrypted data') # => ActiveSupport::MessageEncryptor::InvalidMessage @@ -6852,10 +7524,9 @@ end # # crypt.rotate old_secret, cipher: "aes-256-cbc" # -# source://activesupport//lib/active_support/message_encryptor.rb#87 -class ActiveSupport::MessageEncryptor +# pkg:gem/activesupport#lib/active_support/message_encryptor.rb:90 +class ActiveSupport::MessageEncryptor < ::ActiveSupport::Messages::Codec include ::ActiveSupport::Messages::Rotator - include ::ActiveSupport::Messages::Rotator::Encryptor # Initialize a new MessageEncryptor. +secret+ must be at least as long as # the cipher key size. For the default 'aes-256-gcm' cipher, this is 256 @@ -6863,171 +7534,290 @@ class ActiveSupport::MessageEncryptor # key by using ActiveSupport::KeyGenerator or a similar key # derivation function. # - # First additional parameter is used as the signature key for MessageVerifier. - # This allows you to specify keys to encrypt and sign data. + # 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 - String of digest to use for signing. Default is - # +SHA1+. Ignored when using an AEAD cipher like 'aes-256-gcm'. - # * :serializer - Object serializer to use. Default is +Marshal+. - # - # @return [MessageEncryptor] a new instance of MessageEncryptor + # ==== Options # - # source://activesupport//lib/active_support/messages/rotator.rb#6 - def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + # [+: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+. + # + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:183 + def initialize(*args, on_rotation: T.unsafe(nil), **options); end + + # pkg:gem/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/. # - # source://activesupport//lib/active_support/messages/rotator.rb#21 - def decrypt_and_verify(*args, on_rotation: T.unsafe(nil), **options); end + # ==== 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 + # + # pkg:gem/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/. # - # source://activesupport//lib/active_support/message_encryptor.rb#153 - def encrypt_and_sign(value, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + # ==== 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.) + # + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:220 + def encrypt_and_sign(value, **options); end - private + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:264 + def inspect; end + + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:260 + def read_message(message, on_rotation: T.unsafe(nil), **options); end - # source://activesupport//lib/active_support/message_encryptor.rb#186 - def _decrypt(encrypted_message, purpose); end + private - # source://activesupport//lib/active_support/message_encryptor.rb#169 - def _encrypt(value, **metadata_options); end + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:371 + def aead_mode; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/message_encryptor.rb#218 + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:372 def aead_mode?; end - # source://activesupport//lib/active_support/message_encryptor.rb#212 + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:295 + def decrypt(encrypted_message); end + + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:277 + def encrypt(data); end + + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:340 + def extract_part(encrypted_message, rindex, length); end + + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:350 + def extract_parts(encrypted_message); end + + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:336 + def join_parts(parts); end + + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:320 + def length_after_encode(length_before_encode); end + + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:332 + def length_of_encoded_auth_tag; end + + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:328 + def length_of_encoded_iv; end + + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:367 def new_cipher; end - # source://activesupport//lib/active_support/message_encryptor.rb#222 - def resolve_verifier; end + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:269 + def sign(data); end - # Returns the value of attribute verifier. - # - # source://activesupport//lib/active_support/message_encryptor.rb#216 - def verifier; end + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:273 + def verify(data); end class << self - # source://activesupport//lib/active_support/message_encryptor.rb#93 + # pkg:gem/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#164 + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:252 def key_len(cipher = T.unsafe(nil)); end - # source://activesupport//lib/active_support/message_encryptor.rb#90 + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:93 def use_authenticated_message_encryption; end - # source://activesupport//lib/active_support/message_encryptor.rb#90 + # pkg:gem/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#122 +# pkg:gem/activesupport#lib/active_support/message_encryptor.rb:118 +ActiveSupport::MessageEncryptor::AUTH_TAG_LENGTH = T.let(T.unsafe(nil), Integer) + +# pkg:gem/activesupport#lib/active_support/message_encryptor.rb:115 class ActiveSupport::MessageEncryptor::InvalidMessage < ::StandardError; end -# source://activesupport//lib/active_support/message_encryptor.rb#102 +# pkg:gem/activesupport#lib/active_support/message_encryptor.rb:105 module ActiveSupport::MessageEncryptor::NullSerializer class << self - # source://activesupport//lib/active_support/message_encryptor.rb#107 + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:110 def dump(value); end - # source://activesupport//lib/active_support/message_encryptor.rb#103 + # pkg:gem/activesupport#lib/active_support/message_encryptor.rb:106 def load(value); end end end -# source://activesupport//lib/active_support/message_encryptor.rb#112 -module ActiveSupport::MessageEncryptor::NullVerifier - class << self - # source://activesupport//lib/active_support/message_encryptor.rb#117 - def generate(value); end +# pkg:gem/activesupport#lib/active_support/message_encryptor.rb:116 +ActiveSupport::MessageEncryptor::OpenSSLCipherError = OpenSSL::Cipher::CipherError - # source://activesupport//lib/active_support/message_encryptor.rb#113 - def verify(value); end - end -end +# pkg:gem/activesupport#lib/active_support/message_encryptor.rb:119 +ActiveSupport::MessageEncryptor::SEPARATOR = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/message_encryptor.rb#123 -ActiveSupport::MessageEncryptor::OpenSSLCipherError = OpenSSL::Cipher::CipherError +# pkg:gem/activesupport#lib/active_support/message_encryptors.rb:6 +class ActiveSupport::MessageEncryptors < ::ActiveSupport::Messages::RotationCoordinator + private + + # pkg:gem/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. # -# Remember Me: -# cookies[:remember_me] = @verifier.generate([@user.id, 2.weeks.from_now]) +# First, generate a signed message: +# cookies[:remember_me] = Rails.application.message_verifier(:remember_me).generate([@user.id, 2.weeks.from_now]) # -# In the authentication filter: +# Later verify that message: # -# id, time = @verifier.verify(cookies[:remember_me]) -# if Time.now < time +# id, time = Rails.application.message_verifier(:remember_me).verify(cookies[:remember_me]) +# if time.future? # self.current_user = User.find(id) # end # -# By default it uses Marshal to serialize the message. If you want to use -# another serialization method, you can set the serializer in the options -# hash upon initialization: +# === Signing is not encryption # -# @verifier = ActiveSupport::MessageVerifier.new('s3Krit', serializer: YAML) +# 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: # -# +MessageVerifier+ creates HMAC signatures using SHA1 hash algorithm by default. -# If you want to use a different hash algorithm, you can change it by providing -# +:digest+ key as an option while initializing the verifier: +# 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' # -# @verifier = ActiveSupport::MessageVerifier.new('s3Krit', digest: 'SHA256') +# If you also need to encrypt the contents, you must use ActiveSupport::MessageEncryptor instead. # -# === Confining messages to a specific purpose +# === Confine 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+. +# 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("this is the chair", purpose: :login) +# 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) # => "this is the chair" +# @verifier.verified(token, purpose: :login) # => "signed message" # @verifier.verified(token, purpose: :shipping) # => nil # @verifier.verified(token) # => nil # -# @verifier.verify(token, purpose: :login) # => "this is the chair" -# @verifier.verify(token, purpose: :shipping) # => ActiveSupport::MessageVerifier::InvalidSignature -# @verifier.verify(token) # => ActiveSupport::MessageVerifier::InvalidSignature +# @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("the conversation is lively") -# @verifier.verified(token, purpose: :scare_tactics) # => nil -# @verifier.verified(token) # => "the conversation is lively" +# token = @verifier.generate("signed message") +# @verifier.verified(token, purpose: :redirect) # => nil +# @verifier.verified(token) # => "signed message" # -# @verifier.verify(token, purpose: :scare_tactics) # => ActiveSupport::MessageVerifier::InvalidSignature -# @verifier.verify(token) # => "the conversation is lively" +# @verifier.verify(token, purpose: :redirect) # => raises ActiveSupport::MessageVerifier::InvalidSignature +# @verifier.verify(token) # => "signed message" # -# === Making messages expire +# === 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("parcel", expires_in: 1.month) -# @verifier.generate("doowad", expires_at: Time.now.end_of_year) +# @verifier.generate("signed message", expires_in: 1.month) +# @verifier.generate("signed message", expires_at: Time.now.end_of_year) # -# Then the messages can be verified and returned up to the expire time. +# Messages can then be verified and returned until expiry. # Thereafter, the +verified+ method returns +nil+ while +verify+ raises -# ActiveSupport::MessageVerifier::InvalidSignature. +# +ActiveSupport::MessageVerifier::InvalidSignature+. # # === Rotating keys # @@ -7045,61 +7835,141 @@ ActiveSupport::MessageEncryptor::OpenSSLCipherError = OpenSSL::Cipher::CipherErr # 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. +# 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 +# verifier.rotate(old_secret, digest: "SHA256", serializer: Marshal) # -# source://activesupport//lib/active_support/message_verifier.rb#102 -class ActiveSupport::MessageVerifier +# pkg:gem/activesupport#lib/active_support/message_verifier.rb:110 +class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec include ::ActiveSupport::Messages::Rotator - include ::ActiveSupport::Messages::Rotator::Verifier - # @raise [ArgumentError] - # @return [MessageVerifier] a new instance of MessageVerifier + # Initialize a new MessageVerifier with a secret for the signature. + # + # ==== Options # - # source://activesupport//lib/active_support/messages/rotator.rb#6 - def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + # [+: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+. + # Note that MessageVerifier will always accept both URL-safe and URL-unsafe + # encoded messages, to allow a smooth transition between the two settings. + # + # [+: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+. + # + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:167 + def initialize(*args, on_rotation: T.unsafe(nil), **options); end + + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:310 + 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 's3Krit' - # verifier.generate 'a private message' # => "BAhJIhRwcml2YXRlLW1lc3NhZ2UGOgZFVA==--e2d724331ebdee96a10fb99b089508d1c72bd772" + # 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. # - # source://activesupport//lib/active_support/message_verifier.rb#188 - def generate(value, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + # 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.) + # + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:306 + def generate(value, **options); end + + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:318 + def inspect; end + + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:314 + 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 's3Krit' - # signed_message = verifier.generate 'a private message' + # 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#126 - def valid_message?(signed_message); end + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:183 + def valid_message?(message); end # Decodes the signed message using the +MessageVerifier+'s secret. # - # verifier = ActiveSupport::MessageVerifier.new 's3Krit' + # verifier = ActiveSupport::MessageVerifier.new("secret") # - # signed_message = verifier.generate 'a private message' - # verifier.verified(signed_message) # => 'a private message' + # 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 'd1ff3r3nt-s3Krit' + # other_verifier = ActiveSupport::MessageVerifier.new("different_secret") # other_verifier.verified(signed_message) # => nil # # Returns +nil+ if the message is not Base64-encoded. @@ -7112,197 +7982,439 @@ class ActiveSupport::MessageVerifier # incompatible_message = "test--dad7b06c94abba8d46a15fafaef56c327665d5ff" # verifier.verified(incompatible_message) # => TypeError: incompatible marshal file format # - # source://activesupport//lib/active_support/messages/rotator.rb#36 - def verified(*args, on_rotation: T.unsafe(nil), **options); end + # ==== 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 + # + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:224 + def verified(message, **options); end # Decodes the signed message using the +MessageVerifier+'s secret. # - # verifier = ActiveSupport::MessageVerifier.new 's3Krit' - # signed_message = verifier.generate 'a private message' + # verifier = ActiveSupport::MessageVerifier.new("secret") + # signed_message = verifier.generate("signed message") # - # verifier.verify(signed_message) # => 'a private 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 'd1ff3r3nt-s3Krit' + # other_verifier = ActiveSupport::MessageVerifier.new("different_secret") # other_verifier.verify(signed_message) # => ActiveSupport::MessageVerifier::InvalidSignature # - # source://activesupport//lib/active_support/message_verifier.rb#177 - def verify(*args, **options); end + # ==== 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 + # + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:262 + def verify(message, **options); end private - # source://activesupport//lib/active_support/message_verifier.rb#198 - def decode(data); end + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:323 + def decode(encoded, url_safe: T.unsafe(nil)); end - # source://activesupport//lib/active_support/message_verifier.rb#206 + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:356 def digest_length_in_hex; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/message_verifier.rb#233 + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:373 def digest_matches_data?(digest, data); end - # source://activesupport//lib/active_support/message_verifier.rb#194 - def encode(data); end + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:335 + def extract_encoded(signed); end - # source://activesupport//lib/active_support/message_verifier.rb#202 + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:352 def generate_digest(data); end - # source://activesupport//lib/active_support/message_verifier.rb#221 - def get_data_and_digest_from(signed_message); end + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:364 + def separator_at?(signed_message, index); end - # source://activesupport//lib/active_support/message_verifier.rb#214 + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:368 def separator_index_for(signed_message); end + + # pkg:gem/activesupport#lib/active_support/message_verifier.rb:330 + def sign_encoded(encoded); end end -# source://activesupport//lib/active_support/message_verifier.rb#105 +# pkg:gem/activesupport#lib/active_support/message_verifier.rb:113 class ActiveSupport::MessageVerifier::InvalidSignature < ::StandardError; end -# source://activesupport//lib/active_support/message_verifier.rb#107 +# pkg:gem/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#108 +# pkg:gem/activesupport#lib/active_support/message_verifier.rb:116 ActiveSupport::MessageVerifier::SEPARATOR_LENGTH = T.let(T.unsafe(nil), Integer) -# source://activesupport//lib/active_support/messages/metadata.rb#6 -module ActiveSupport::Messages; end +# pkg:gem/activesupport#lib/active_support/message_verifiers.rb:6 +class ActiveSupport::MessageVerifiers < ::ActiveSupport::Messages::RotationCoordinator + private -# source://activesupport//lib/active_support/messages/metadata.rb#7 -class ActiveSupport::Messages::Metadata - # @return [Metadata] a new instance of Metadata - # - # source://activesupport//lib/active_support/messages/metadata.rb#8 - def initialize(message, expires_at = T.unsafe(nil), purpose = T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/message_verifiers.rb:133 + def build(salt, secret_generator:, secret_generator_options:, **options); end +end - # source://activesupport//lib/active_support/messages/metadata.rb#13 - def as_json(options = T.unsafe(nil)); end +# pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:6 +module ActiveSupport::Messages; end - # source://activesupport//lib/active_support/messages/metadata.rb#58 - def verify(purpose); end +# pkg:gem/activesupport#lib/active_support/messages/codec.rb:9 +class ActiveSupport::Messages::Codec + include ::ActiveSupport::Messages::Metadata + + # pkg:gem/activesupport#lib/active_support/messages/codec.rb:15 + def initialize(**options); end private - # @return [Boolean] - # - # source://activesupport//lib/active_support/messages/metadata.rb#67 - def fresh?; end + # pkg:gem/activesupport#lib/active_support/messages/codec.rb:45 + def catch_and_ignore(throwable, &block); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/messages/metadata.rb#63 - def match?(purpose); end + # pkg:gem/activesupport#lib/active_support/messages/codec.rb:52 + def catch_and_raise(throwable, as: T.unsafe(nil), &block); end + + # pkg:gem/activesupport#lib/active_support/messages/codec.rb:29 + def decode(encoded, url_safe: T.unsafe(nil)); end + + # pkg:gem/activesupport#lib/active_support/messages/codec.rb:39 + def deserialize(serialized); end + + # pkg:gem/activesupport#lib/active_support/messages/codec.rb:25 + def encode(data, url_safe: T.unsafe(nil)); end - # source://activesupport//lib/active_support/messages/metadata.rb#71 - def parse_expires_at(expires_at); end + # pkg:gem/activesupport#lib/active_support/messages/codec.rb:35 + def serialize(data); end + + # pkg:gem/activesupport#lib/active_support/messages/codec.rb:23 + def serializer; end + + # pkg:gem/activesupport#lib/active_support/messages/codec.rb:60 + def use_message_serializer_for_metadata?; end class << self - # source://activesupport//lib/active_support/messages/metadata.rb#26 - def verify(message, purpose); end + # pkg:gem/activesupport#lib/active_support/messages/codec.rb:12 + def default_serializer; end + + # pkg:gem/activesupport#lib/active_support/messages/codec.rb:12 + def default_serializer=(value); end + end +end + +# pkg:gem/activesupport#lib/active_support/messages/metadata.rb:9 +module ActiveSupport::Messages::Metadata + private - # source://activesupport//lib/active_support/messages/metadata.rb#18 - def wrap(message, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:128 + def deserialize_from_json(serialized); end - private + # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:141 + def deserialize_from_json_safe_string(string); end + + # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:43 + def deserialize_with_metadata(message, **expected_metadata); end + + # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:96 + def dual_serialized_metadata_envelope_json?(string); end + + # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:78 + def extract_from_metadata_envelope(envelope, purpose: T.unsafe(nil)); end + + # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:92 + def metadata_envelope?(object); end + + # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:114 + def parse_expiry(expires_at); end + + # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:100 + def pick_expiry(expires_at, expires_in); end + + # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:124 + def serialize_to_json(data); end + + # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:137 + def serialize_to_json_safe_string(data); end - # source://activesupport//lib/active_support/messages/metadata.rb#53 - def decode(message); end + # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:30 + def serialize_with_metadata(data, **metadata); end - # source://activesupport//lib/active_support/messages/metadata.rb#49 - def encode(message); end + # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:60 + def use_message_serializer_for_metadata?; end - # source://activesupport//lib/active_support/messages/metadata.rb#39 - def extract_metadata(message); end + # pkg:gem/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#31 - def pick_expiry(expires_at, expires_in); end + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:10 + def use_message_serializer_for_metadata; end + + # pkg:gem/activesupport#lib/active_support/messages/metadata.rb:10 + def use_message_serializer_for_metadata=(_arg0); end end end -# source://activesupport//lib/active_support/messages/rotation_configuration.rb#5 +# pkg:gem/activesupport#lib/active_support/messages/metadata.rb:12 +ActiveSupport::Messages::Metadata::ENVELOPE_SERIALIZERS = T.let(T.unsafe(nil), Array) + +# pkg:gem/activesupport#lib/active_support/messages/metadata.rb:19 +ActiveSupport::Messages::Metadata::TIMESTAMP_SERIALIZERS = T.let(T.unsafe(nil), Array) + +# pkg:gem/activesupport#lib/active_support/messages/rotation_configuration.rb:5 class ActiveSupport::Messages::RotationConfiguration - # @return [RotationConfiguration] a new instance of RotationConfiguration - # - # source://activesupport//lib/active_support/messages/rotation_configuration.rb#8 + # pkg:gem/activesupport#lib/active_support/messages/rotation_configuration.rb:8 def initialize; end - # Returns the value of attribute encrypted. - # - # source://activesupport//lib/active_support/messages/rotation_configuration.rb#6 + # pkg:gem/activesupport#lib/active_support/messages/rotation_configuration.rb:6 def encrypted; end - # source://activesupport//lib/active_support/messages/rotation_configuration.rb#12 + # pkg:gem/activesupport#lib/active_support/messages/rotation_configuration.rb:12 def rotate(kind, *args, **options); end - # Returns the value of attribute signed. - # - # source://activesupport//lib/active_support/messages/rotation_configuration.rb#6 + # pkg:gem/activesupport#lib/active_support/messages/rotation_configuration.rb:6 def signed; end end -# source://activesupport//lib/active_support/messages/rotator.rb#5 +# pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:7 +class ActiveSupport::Messages::RotationCoordinator + # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:10 + def initialize(&secret_generator); end + + # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:18 + def [](salt); end + + # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:22 + def []=(salt, codec); end + + # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:39 + def clear_rotations; end + + # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:45 + def on_rotation(&callback); end + + # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:26 + def rotate(**options, &block); end + + # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:35 + def rotate_defaults; end + + # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:8 + def transitional; end + + # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:8 + def transitional=(_arg0); end + + private + + # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:88 + def build(salt, secret_generator:, secret_generator_options:, **options); end + + # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:76 + def build_with_rotations(salt); end + + # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:51 + def changing_configuration!; end + + # pkg:gem/activesupport#lib/active_support/messages/rotation_coordinator.rb:62 + def normalize_options(options); end +end + +# pkg:gem/activesupport#lib/active_support/messages/rotator.rb:5 module ActiveSupport::Messages::Rotator - # source://activesupport//lib/active_support/messages/rotator.rb#6 - def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + # pkg:gem/activesupport#lib/active_support/messages/rotator.rb:6 + def initialize(*args, on_rotation: T.unsafe(nil), **options); end + + # pkg:gem/activesupport#lib/active_support/messages/rotator.rb:23 + def fall_back_to(fallback); end + + # pkg:gem/activesupport#lib/active_support/messages/rotator.rb:18 + def on_rotation(&on_rotation); end + + # pkg:gem/activesupport#lib/active_support/messages/rotator.rb:28 + def read_message(message, on_rotation: T.unsafe(nil), **options); end - # source://activesupport//lib/active_support/messages/rotator.rb#14 - def rotate(*secrets, **options); end + # pkg:gem/activesupport#lib/active_support/messages/rotator.rb:14 + def rotate(*args, **options); end private - # source://activesupport//lib/active_support/messages/rotator.rb#47 - def run_rotations(on_rotation); end + # pkg:gem/activesupport#lib/active_support/messages/rotator.rb:49 + def build_rotation(*args, **options); end + + # pkg:gem/activesupport#lib/active_support/messages/rotator.rb:53 + def catch_rotation_error(&block); end end -# source://activesupport//lib/active_support/messages/rotator.rb#18 -module ActiveSupport::Messages::Rotator::Encryptor - include ::ActiveSupport::Messages::Rotator +# pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:8 +module ActiveSupport::Messages::SerializerWithFallback + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:17 + def load(dumped); end + + private - # source://activesupport//lib/active_support/messages/rotator.rb#21 - def decrypt_and_verify(*args, on_rotation: T.unsafe(nil), **options); end + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:33 + def detect_format(dumped); end + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:44 + def fallback?(format); end + + class << self + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:9 + def [](format); end + end +end + +# pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:48 +module ActiveSupport::Messages::SerializerWithFallback::AllowMarshal private - # source://activesupport//lib/active_support/messages/rotator.rb#28 - def build_rotation(secret = T.unsafe(nil), sign_secret = T.unsafe(nil), options); end + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:50 + def fallback?(format); end end -# source://activesupport//lib/active_support/messages/rotator.rb#33 -module ActiveSupport::Messages::Rotator::Verifier - include ::ActiveSupport::Messages::Rotator +# pkg:gem/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 + + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:90 + def _load(dumped); end + + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:86 + def dump(object); end - # source://activesupport//lib/active_support/messages/rotator.rb#36 - def verified(*args, on_rotation: T.unsafe(nil), **options); end + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:96 + def dumped?(dumped); end + + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:82 + def format; end private - # source://activesupport//lib/active_support/messages/rotator.rb#41 - def build_rotation(secret = T.unsafe(nil), options); end + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:101 + def detect_format(dumped); end end -# source://activesupport//lib/active_support/multibyte.rb#4 -module ActiveSupport::Multibyte - class << self - # Returns the current proxy class. - # - # source://activesupport//lib/active_support/multibyte.rb#19 - def proxy_class; end +# pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:94 +ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback::JSON_START_WITH = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/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 - # 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 +# pkg:gem/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 + + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:67 + def _load(dumped); end + + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:63 + def dump(object); end + + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:73 + def dumped?(dumped); end + + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:59 + def format; end end -# Chars enables you to work transparently with UTF-8 encoding in the Ruby -# String class without having extensive knowledge about the encoding. A +# pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:71 +ActiveSupport::Messages::SerializerWithFallback::MarshalWithFallback::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# pkg:gem/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 + + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:125 + def _load(dumped); end + + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:121 + def dump(object); end + + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:129 + def dumped?(dumped); end + + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:117 + def format; end + + private + + # pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:134 + def available?; end +end + +# pkg:gem/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 + +# pkg:gem/activesupport#lib/active_support/messages/serializer_with_fallback.rb:149 +ActiveSupport::Messages::SerializerWithFallback::SERIALIZERS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/activesupport#lib/active_support/multibyte.rb:4 +module ActiveSupport::Multibyte + class << self + # Returns the current proxy class. + # + # pkg:gem/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 + # + # pkg:gem/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. @@ -7337,27 +8449,25 @@ end # # ActiveSupport::Multibyte.proxy_class = CharsForUTF32 # -# source://activesupport//lib/active_support/multibyte/chars.rb#45 +# pkg:gem/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#54 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:56 def initialize(string); end - # source://activesupport//lib/active_support/multibyte/chars.rb#51 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:53 def <=>(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/multibyte/chars.rb#51 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:53 def =~(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/multibyte/chars.rb#51 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:53 def acts_like_string?(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/multibyte/chars.rb#159 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:164 def as_json(options = T.unsafe(nil)); end # Performs composition on all the characters. @@ -7365,7 +8475,7 @@ class ActiveSupport::Multibyte::Chars # 'é'.length # => 1 # 'é'.mb_chars.compose.to_s.length # => 1 # - # source://activesupport//lib/active_support/multibyte/chars.rb#138 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:143 def compose; end # Performs canonical decomposition on all the characters. @@ -7373,7 +8483,7 @@ class ActiveSupport::Multibyte::Chars # 'é'.length # => 1 # 'é'.mb_chars.decompose.to_s.length # => 2 # - # source://activesupport//lib/active_support/multibyte/chars.rb#130 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:135 def decompose; end # Returns the number of grapheme clusters in the string. @@ -7381,7 +8491,7 @@ class ActiveSupport::Multibyte::Chars # 'क्षि'.mb_chars.length # => 4 # 'क्षि'.mb_chars.grapheme_length # => 2 # - # source://activesupport//lib/active_support/multibyte/chars.rb#146 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:151 def grapheme_length; end # Limits the byte size of the string to a number of bytes without breaking @@ -7390,25 +8500,25 @@ class ActiveSupport::Multibyte::Chars # # 'こんにちは'.mb_chars.limit(7).to_s # => "こん" # - # source://activesupport//lib/active_support/multibyte/chars.rb#113 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:118 def limit(limit); end - # source://activesupport//lib/active_support/multibyte/chars.rb#51 + # pkg:gem/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#60 - def method_missing(method, *args, &block); end + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:65 + 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#104 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:109 def reverse; end - # source://activesupport//lib/active_support/multibyte/chars.rb#164 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:169 def reverse!(*args); end # Works like String#slice!, but returns an instance of @@ -7421,7 +8531,7 @@ class ActiveSupport::Multibyte::Chars # string.mb_chars.slice!(0..3) # => # # string # => 'me' # - # source://activesupport//lib/active_support/multibyte/chars.rb#94 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:99 def slice!(*args); end # Works just like String#split, with the exception that the items @@ -7430,7 +8540,7 @@ class ActiveSupport::Multibyte::Chars # # '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#81 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:86 def split(*args); end # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent @@ -7439,18 +8549,13 @@ class ActiveSupport::Multibyte::Chars # 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#155 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:160 def tidy_bytes(force = T.unsafe(nil)); end - # source://activesupport//lib/active_support/multibyte/chars.rb#164 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:169 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#121 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:129 def titlecase; end # Capitalizes the first letter of every word, when possible. @@ -7458,51 +8563,43 @@ class ActiveSupport::Multibyte::Chars # "É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#121 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:126 def titleize; end - # Returns the value of attribute wrapped_string. - # - # source://activesupport//lib/active_support/multibyte/chars.rb#47 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:50 def to_s; end - # Returns the value of attribute wrapped_string. - # - # source://activesupport//lib/active_support/multibyte/chars.rb#47 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:51 def to_str; end - # Returns the value of attribute wrapped_string. - # - # source://activesupport//lib/active_support/multibyte/chars.rb#47 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:49 def wrapped_string; end private - # source://activesupport//lib/active_support/multibyte/chars.rb#171 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:176 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#72 + # pkg:gem/activesupport#lib/active_support/multibyte/chars.rb:77 def respond_to_missing?(method, include_private); end end -# source://activesupport//lib/active_support/multibyte/unicode.rb#5 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 @@ -7511,23 +8608,23 @@ module ActiveSupport::Multibyte::Unicode # 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#32 + # pkg:gem/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#65 + # pkg:gem/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 +# pkg:gem/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 +# +ActiveSupport::Notifications+ provides an instrumentation API for # Ruby. # # == Instrumenters @@ -7550,6 +8647,16 @@ ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String # 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 @@ -7563,20 +8670,18 @@ ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String # # ActiveSupport::Notifications.monotonic_subscribe('render') do |name, start, finish, id, payload| # name # => String, name of the event (such as 'render' from above) -# start # => Monotonic time, when the instrumented block started execution -# finish # => Monotonic time, when the instrumented block ended execution +# 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 # -# The +start+ and +finish+ values above represent monotonic time. -# # For instance, let's store all "render" events in an array: # # events = [] # -# ActiveSupport::Notifications.subscribe('render') do |*args| -# events << ActiveSupport::Notifications::Event.new(*args) +# ActiveSupport::Notifications.subscribe('render') do |event| +# events << event # end # # That code returns right away, you are just subscribing to "render" events. @@ -7587,14 +8692,10 @@ ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String # end # # event = events.first -# event.name # => "render" -# event.duration # => 10 (in milliseconds) -# event.payload # => { extra: :information } -# -# The block in the subscribe call gets the name of the event, start -# timestamp, end timestamp, a string with a unique identifier for that event's instrumenter -# (something like "535801666f04d0298cd6"), and a hash with the payload, in -# that order. +# 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 @@ -7659,7 +8760,7 @@ ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String # You can subscribe to some event temporarily while some block runs. For # example, in # -# callback = lambda {|*args| ... } +# callback = lambda {|event| ... } # ActiveSupport::Notifications.subscribed(callback, "sql.active_record") do # ... # end @@ -7682,7 +8783,7 @@ ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String # # The +subscribe+ method returns a subscriber object: # -# subscriber = ActiveSupport::Notifications.subscribe("render") do |*args| +# subscriber = ActiveSupport::Notifications.subscribe("render") do |event| # ... # end # @@ -7710,13 +8811,13 @@ ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String # Notifications ships with a queue implementation that consumes and publishes events # to all log subscribers. You can use any queue implementation you want. # -# source://activesupport//lib/active_support/notifications/instrumenter.rb#6 +# pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:7 module ActiveSupport::Notifications class << self - # source://activesupport//lib/active_support/notifications.rb#204 + # pkg:gem/activesupport#lib/active_support/notifications.rb:208 def instrument(name, payload = T.unsafe(nil)); end - # source://activesupport//lib/active_support/notifications.rb#268 + # pkg:gem/activesupport#lib/active_support/notifications.rb:269 def instrumenter; end # Performs the same functionality as #subscribe, but the +start+ and @@ -7726,25 +8827,19 @@ module ActiveSupport::Notifications # duration is important. For example, computing elapsed time between # two events. # - # source://activesupport//lib/active_support/notifications.rb#253 + # pkg:gem/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#194 + # pkg:gem/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#194 + # pkg:gem/activesupport#lib/active_support/notifications.rb:198 def notifier=(_arg0); end - # source://activesupport//lib/active_support/notifications.rb#196 + # pkg:gem/activesupport#lib/active_support/notifications.rb:200 def publish(name, *args); end - # source://activesupport//lib/active_support/notifications.rb#200 + # pkg:gem/activesupport#lib/active_support/notifications.rb:204 def publish_event(event); end # Subscribe to a given event name with the passed +block+. @@ -7752,11 +8847,15 @@ module ActiveSupport::Notifications # You can subscribe to events by passing a String to match exact event # names, or by passing a Regexp to match all events that match a pattern. # - # ActiveSupport::Notifications.subscribe(/render/) do |*args| - # @event = ActiveSupport::Notifications::Event.new(*args) + # 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 # - # The +block+ will receive five parameters with information about the event: + # 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) @@ -7766,66 +8865,49 @@ module ActiveSupport::Notifications # payload # => Hash, the payload # end # - # If the block passed to the method only takes one parameter, - # it will yield an event object to the block: - # - # ActiveSupport::Notifications.subscribe(/render/) do |event| - # @event = event - # end - # # Raises an error if invalid event name type is passed: # - # ActiveSupport::Notifications.subscribe(:render) {|*args| ...} + # ActiveSupport::Notifications.subscribe(:render) {|event| ...} # #=> ArgumentError (pattern must be specified as a String, Regexp or empty) # - # source://activesupport//lib/active_support/notifications.rb#243 + # pkg:gem/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#257 + # pkg:gem/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#264 + # pkg:gem/activesupport#lib/active_support/notifications.rb:265 def unsubscribe(subscriber_or_name); end private - # source://activesupport//lib/active_support/notifications.rb#273 + # pkg:gem/activesupport#lib/active_support/notifications.rb:274 def registry; end end end -# source://activesupport//lib/active_support/notifications/instrumenter.rb#58 +# pkg:gem/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#62 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:110 def initialize(name, start, ending, transaction_id, payload); end - # source://activesupport//lib/active_support/notifications/instrumenter.rb#136 - def <<(event); end - - # Returns the number of allocations made since the call to +start!+ and - # the call to +finish!+ + # Returns the number of allocations made between the call to #start! and + # the call to #finish!. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#116 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:176 def allocations; end - # Returns the value of attribute children. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 - def children; end - - # Returns the CPU time (in milliseconds) passed since the call to - # +start!+ and the call to +finish!+ + # 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#104 + # pkg:gem/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 |*args| - # @event = ActiveSupport::Notifications::Event.new(*args) + # ActiveSupport::Notifications.subscribe('wait') do |event| + # @event = event # end # # ActiveSupport::Notifications.instrument('wait') do @@ -7834,77 +8916,67 @@ class ActiveSupport::Notifications::Event # # @event.duration # => 1000.138 # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#132 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:198 def duration; end - # Returns the value of attribute end. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 + # pkg:gem/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#96 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:154 def finish!; end - # Returns the idle time time (in milliseconds) passed since the call to - # +start!+ and the call to +finish!+ + # 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#110 - def idle_time; end + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:182 + def gc_time; end - # Returns the value of attribute name. + # 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#59 - def name; end + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:169 + def idle_time; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#140 - def parent_of?(event); end + # pkg:gem/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#60 + # pkg:gem/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#60 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:108 def payload=(_arg0); end - # source://activesupport//lib/active_support/notifications/instrumenter.rb#75 + # pkg:gem/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#89 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:146 def start!; end - # Returns the value of attribute time. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 + # pkg:gem/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#59 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:107 def transaction_id; end private - # source://activesupport//lib/active_support/notifications/instrumenter.rb#145 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:203 def now; end # Likely on JRuby, TruffleRuby # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#162 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:230 def now_allocations; end - # source://activesupport//lib/active_support/notifications/instrumenter.rb#152 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:210 def now_cpu; end + + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:220 + def now_gc; end end # This is a default queue implementation that ships with Notifications. @@ -7912,218 +8984,298 @@ end # # This class is thread safe. All methods are reentrant. # -# source://activesupport//lib/active_support/notifications/fanout.rb#24 +# pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:50 class ActiveSupport::Notifications::Fanout - include ::Mutex_m + include ::ActiveSupport::Notifications::FanoutIteration - # @return [Fanout] a new instance of Fanout - # - # source://activesupport//lib/active_support/notifications/fanout.rb#27 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:51 def initialize; end - # source://activesupport//lib/active_support/notifications/fanout.rb#75 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:298 + def all_listeners_for(name); end + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:273 + def build_handle(name, id, payload); end + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:102 + def clear_cache(key = T.unsafe(nil)); end + + # pkg:gem/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#87 - def iterate_guarding_exceptions(listeners); end + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:188 + def groups_for(name); end - # source://activesupport//lib/active_support/notifications/fanout.rb#108 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:60 + def inspect; end + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:307 def listeners_for(name); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/notifications/fanout.rb#117 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:311 def listening?(name); end - # source://mutex_m/0.1.2/mutex_m.rb#93 - def lock; end - - # source://mutex_m/0.1.2/mutex_m.rb#83 - def locked?; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#79 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:290 def publish(name, *args); end - # source://activesupport//lib/active_support/notifications/fanout.rb#83 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:294 def publish_event(event); end - # source://activesupport//lib/active_support/notifications/fanout.rb#71 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:277 def start(name, id, payload); end - # source://activesupport//lib/active_support/notifications/fanout.rb#34 + # pkg:gem/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://mutex_m/0.1.2/mutex_m.rb#78 - def synchronize(&block); end - - # source://mutex_m/0.1.2/mutex_m.rb#88 - def try_lock; end - - # source://mutex_m/0.1.2/mutex_m.rb#98 - def unlock; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#51 + # pkg:gem/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#122 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:316 def wait; end end -# source://activesupport//lib/active_support/notifications/fanout.rb#125 -module ActiveSupport::Notifications::Fanout::Subscribers - class << self - # source://activesupport//lib/active_support/notifications/fanout.rb#126 - def new(pattern, listener, monotonic); end - end +# pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:114 +class ActiveSupport::Notifications::Fanout::BaseGroup + include ::ActiveSupport::Notifications::FanoutIteration + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:117 + def initialize(listeners, name, id, payload); end + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:121 + def each(&block); end end -# source://activesupport//lib/active_support/notifications/fanout.rb#257 -class ActiveSupport::Notifications::Fanout::Subscribers::EventObject < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented - # source://activesupport//lib/active_support/notifications/fanout.rb#265 +# pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:126 +class ActiveSupport::Notifications::Fanout::BaseTimeGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:131 def finish(name, id, payload); end - # source://activesupport//lib/active_support/notifications/fanout.rb#273 - def publish_event(event); end + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:127 + def start(name, id, payload); end +end + +# pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:167 +class ActiveSupport::Notifications::Fanout::EventObjectGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:173 + def finish(name, id, payload); end - # source://activesupport//lib/active_support/notifications/fanout.rb#258 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:168 def start(name, id, payload); end private - # source://activesupport//lib/active_support/notifications/fanout.rb#278 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:183 def build_event(name, id, payload); end end -# source://activesupport//lib/active_support/notifications/fanout.rb#182 +# pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:153 +class ActiveSupport::Notifications::Fanout::EventedGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:160 + def finish(name, id, payload); end + + # pkg:gem/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 +# +# pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:228 +class ActiveSupport::Notifications::Fanout::Handle + include ::ActiveSupport::Notifications::FanoutIteration + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:231 + def initialize(notifier, name, id, payload); end + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:250 + def finish; end + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:254 + def finish_with_values(name, id, payload); end + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:241 + def start; end + + private + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:264 + def ensure_state!(expected); end +end + +# pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:139 +class ActiveSupport::Notifications::Fanout::MonotonicTimedGroup < ::ActiveSupport::Notifications::Fanout::BaseTimeGroup + private + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:141 + def now; end +end + +# pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:319 +module ActiveSupport::Notifications::Fanout::Subscribers + class << self + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:320 + def new(pattern, listener, monotonic); end + end +end + +# pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:434 +class ActiveSupport::Notifications::Fanout::Subscribers::EventObject < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:435 + def group_class; end + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:439 + def publish_event(event); end +end + +# pkg:gem/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#185 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:379 def initialize(pattern, delegate); end - # source://activesupport//lib/active_support/notifications/fanout.rb#210 - def finish(name, id, payload); end + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:377 + def delegate; end - # Returns the value of attribute pattern. - # - # source://activesupport//lib/active_support/notifications/fanout.rb#183 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:387 + def group_class; end + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:377 def pattern; end - # source://activesupport//lib/active_support/notifications/fanout.rb#192 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:391 def publish(name, *args); end - # source://activesupport//lib/active_support/notifications/fanout.rb#198 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:397 def publish_event(event); end - # source://activesupport//lib/active_support/notifications/fanout.rb#206 - def start(name, id, payload); end + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:377 + def silenceable; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/notifications/fanout.rb#214 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:405 + def silenced?(name); end + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:409 def subscribed_to?(name); end - # source://activesupport//lib/active_support/notifications/fanout.rb#218 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:413 def unsubscribe!(name); end end -# source://activesupport//lib/active_support/notifications/fanout.rb#145 +# pkg:gem/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#158 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:352 def initialize(pattern); end - # source://activesupport//lib/active_support/notifications/fanout.rb#167 + # pkg:gem/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#146 + # pkg:gem/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#146 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:340 def pattern; end - # source://activesupport//lib/active_support/notifications/fanout.rb#163 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:357 def unsubscribe!(name); end class << self - # source://activesupport//lib/active_support/notifications/fanout.rb#148 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:342 def wrap(pattern); end end end -# source://activesupport//lib/active_support/notifications/fanout.rb#171 +# pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:365 class ActiveSupport::Notifications::Fanout::Subscribers::Matcher::AllMessages - # source://activesupport//lib/active_support/notifications/fanout.rb#172 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:366 def ===(name); end - # source://activesupport//lib/active_support/notifications/fanout.rb#176 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:370 def unsubscribe!(*_arg0); end end -# source://activesupport//lib/active_support/notifications/fanout.rb#240 -class ActiveSupport::Notifications::Fanout::Subscribers::MonotonicTimed < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented - # source://activesupport//lib/active_support/notifications/fanout.rb#250 - def finish(name, id, payload); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#241 - def publish(name, *args); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#245 - def start(name, id, payload); end +# pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:428 +class ActiveSupport::Notifications::Fanout::Subscribers::MonotonicTimed < ::ActiveSupport::Notifications::Fanout::Subscribers::Timed + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:429 + def group_class; end end -# source://activesupport//lib/active_support/notifications/fanout.rb#223 +# pkg:gem/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#233 - def finish(name, id, payload); end + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:419 + def group_class; end - # source://activesupport//lib/active_support/notifications/fanout.rb#224 + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:423 def publish(name, *args); end +end - # source://activesupport//lib/active_support/notifications/fanout.rb#228 - def start(name, id, payload); end +# pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:146 +class ActiveSupport::Notifications::Fanout::TimedGroup < ::ActiveSupport::Notifications::Fanout::BaseTimeGroup + private + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:148 + def now; end end -# source://activesupport//lib/active_support/notifications/fanout.rb#10 +# pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:19 +module ActiveSupport::Notifications::FanoutIteration + private + + # pkg:gem/activesupport#lib/active_support/notifications/fanout.rb:21 + def iterate_guarding_exceptions(collection); end +end + +# pkg:gem/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#13 + # pkg:gem/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#11 + # pkg:gem/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#8 +# pkg:gem/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#11 + # pkg:gem/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. + # + # pkg:gem/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#44 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:92 def finish(name, payload); end - # source://activesupport//lib/active_support/notifications/instrumenter.rb#48 + # pkg:gem/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#9 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:10 def id; end # Given a block, instrument it by measuring the time taken to execute @@ -8131,724 +9283,785 @@ class ActiveSupport::Notifications::Instrumenter # notifier. Notice that events get sent even if an error occurs in the # passed-in block. # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#20 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:54 def instrument(name, payload = T.unsafe(nil)); end - # source://activesupport//lib/active_support/notifications/instrumenter.rb#34 + # pkg:gem/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#39 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:87 def start(name, payload); end private - # source://activesupport//lib/active_support/notifications/instrumenter.rb#53 + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:101 def unique_id; end end -# source://activesupport//lib/active_support/number_helper.rb#4 +# pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:21 +class ActiveSupport::Notifications::Instrumenter::LegacyHandle + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:34 + def initialize(notifier, name, id, payload); end + + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:45 + def finish; end + + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:41 + def start; end +end + +# pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:22 +class ActiveSupport::Notifications::Instrumenter::LegacyHandle::Wrapper + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:23 + def initialize(notifier); end + + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:27 + def build_handle(name, id, payload); end + + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:31 + def finish(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/activesupport#lib/active_support/notifications/instrumenter.rb:31 + def start(*_arg0, **_arg1, &_arg2); end +end + +# pkg:gem/activesupport#lib/active_support/number_helper.rb:4 module ActiveSupport::NumberHelper extend ::ActiveSupport::Autoload extend ::ActiveSupport::NumberHelper - # Formats a +number+ into a currency string (e.g., $13.65). You - # can customize the format in the +options+ hash. + # 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 in the provided options. No currency conversion - # is performed. If the user is given a way to change their locale, they will + # 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. + # may want to specify a constant +:locale+ option or consider using a + # library capable of currency conversion. # # ==== Options # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the level of precision (defaults - # to 2). - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :unit - Sets the denomination of the currency - # (defaults to "$"). - # * :separator - Sets the separator between the units - # (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ","). - # * :format - Sets the format for non-negative numbers - # (defaults to "%u%n"). Fields are %u for the - # currency, and %n for the number. - # * :negative_format - Sets the format for negative - # numbers (defaults to prepending a hyphen to the formatted - # number given by :format). Accepts the same fields - # than :format, except %n is here the - # absolute value of the number. - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. # - # ==== Examples + # number_to_currency(1234567890.506, locale: :fr) + # # => "1 234 567 890,51 €" # - # number_to_currency(1234567890.50) # => "$1,234,567,890.50" - # number_to_currency(1234567890.506) # => "$1,234,567,890.51" - # number_to_currency(1234567890.506, precision: 3) # => "$1,234,567,890.506" - # number_to_currency(1234567890.506, locale: :fr) # => "1 234 567 890,51 €" - # number_to_currency('123a456') # => "$123a456" - # - # number_to_currency(-0.456789, precision: 0) - # # => "$0" - # number_to_currency(-1234567890.50, negative_format: '(%u%n)') - # # => "($1,234,567,890.50)" - # number_to_currency(1234567890.50, unit: '£', separator: ',', delimiter: '') - # # => "£1234567890,50" - # number_to_currency(1234567890.50, unit: '£', separator: ',', delimiter: '', format: '%n %u') - # # => "1234567890,50 £" - # number_to_currency(1234567890.50, strip_insignificant_zeros: true) - # # => "$1,234,567,890.5" - # number_to_currency(1234567890.50, precision: 0, round_mode: :up) - # # => "$1,234,567,891" - # - # source://activesupport//lib/active_support/number_helper.rb#114 + # [+: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" + # + # pkg:gem/activesupport#lib/active_support/number_helper.rb:139 def number_to_currency(number, options = T.unsafe(nil)); end - # Formats a +number+ with grouped thousands using +delimiter+ - # (e.g., 12,324). You can customize the format in the +options+ - # hash. + # 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 - Sets the locale to be used for formatting - # (defaults to current locale). - # * :delimiter - Sets the thousands delimiter (defaults - # to ","). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter_pattern - Sets a custom regular expression used for - # deriving the placement of delimiter. Helpful when using currency formats - # like INR. + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. # - # ==== Examples + # 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) # => "12,345,678" - # number_to_delimited('123456') # => "123,456" - # number_to_delimited(12345678.05) # => "12,345,678.05" - # number_to_delimited(12345678, delimiter: '.') # => "12.345.678" - # number_to_delimited(12345678, delimiter: ',') # => "12,345,678" - # number_to_delimited(12345678.05, separator: ' ') # => "12,345,678 05" - # number_to_delimited(12345678.05, locale: :fr) # => "12 345 678,05" - # number_to_delimited('112a') # => "112a" - # number_to_delimited(98765432.98, delimiter: ' ', separator: ',') - # # => "98 765 432,98" - # number_to_delimited("123456.78", - # delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) - # # => "1,23,456.78" - # - # source://activesupport//lib/active_support/number_helper.rb#189 + # 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" + # + # pkg:gem/activesupport#lib/active_support/number_helper.rb:242 def number_to_delimited(number, options = T.unsafe(nil)); end - # Pretty prints (formats and approximates) a number in a way it - # is more readable by humans (e.g.: 1200000000 becomes "1.2 - # Billion"). This is useful for numbers that can get very large - # (and too hard to read). + # Formats +number+ into a more human-friendly representation. Useful for + # numbers that can become very large and too hard to read. # - # See number_to_human_size if you want to print a file - # size. + # 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" # - # You can also define your own unit-quantifier names if you want - # to use other decimal units (e.g.: 1500 becomes "1.5 - # kilometers", 0.150 becomes "150 milliliters", etc). You may - # define a wide range of unit quantifiers, even fractional ones - # (centi, deci, mili, etc). + # See #number_to_human_size if you want to pretty-print a file size. # # ==== Options # - # * :locale - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +true+) - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +true+) - # * :units - A Hash of unit quantifier names. Or a - # string containing an i18n scope where to find this hash. It - # might have the following keys: - # * *integers*: :unit, :ten, - # :hundred, :thousand, :million, - # :billion, :trillion, - # :quadrillion - # * *fractionals*: :deci, :centi, - # :mili, :micro, :nano, - # :pico, :femto - # * :format - Sets the format of the output string - # (defaults to "%n %u"). The field types are: - # * %u - The quantifier (ex.: 'thousand') - # * %n - The number - # - # ==== Examples - # - # number_to_human(123) # => "123" - # number_to_human(1234) # => "1.23 Thousand" - # number_to_human(12345) # => "12.3 Thousand" - # number_to_human(1234567) # => "1.23 Million" - # number_to_human(1234567890) # => "1.23 Billion" - # number_to_human(1234567890123) # => "1.23 Trillion" - # number_to_human(1234567890123456) # => "1.23 Quadrillion" - # number_to_human(1234567890123456789) # => "1230 Quadrillion" - # number_to_human(489939, precision: 2) # => "490 Thousand" - # number_to_human(489939, precision: 4) # => "489.9 Thousand" - # number_to_human(489939, precision: 2 - # , round_mode: :down) # => "480 Thousand" - # number_to_human(1234567, precision: 4, - # significant: false) # => "1.2346 Million" - # number_to_human(1234567, precision: 1, - # separator: ',', - # significant: false) # => "1,2 Million" - # - # number_to_human(500000000, precision: 5) # => "500 Million" - # number_to_human(12345012345, significant: false) # => "12.345 Billion" - # - # Non-significant zeros after the decimal separator are stripped - # out by default (set :strip_insignificant_zeros to - # +false+ to change that): - # - # number_to_human(12.00001) # => "12" - # number_to_human(12.00001, strip_insignificant_zeros: false) # => "12.0" - # - # ==== Custom Unit Quantifiers - # - # You can also use your own custom unit quantifiers: - # - # number_to_human(500000, units: { unit: 'ml', thousand: 'lt' }) # => "500 lt" - # - # If in your I18n locale you have: - # - # distance: - # centi: - # one: "centimeter" - # other: "centimeters" - # unit: - # one: "meter" - # other: "meters" - # thousand: - # one: "kilometer" - # other: "kilometers" - # billion: "gazillion-distance" - # - # Then you could do: - # - # number_to_human(543934, units: :distance) # => "544 kilometers" - # number_to_human(54393498, units: :distance) # => "54400 kilometers" - # number_to_human(54393498000, units: :distance) # => "54.4 gazillion-distance" - # number_to_human(343, units: :distance, precision: 1) # => "300 meters" - # number_to_human(1, units: :distance) # => "1 meter" - # number_to_human(0.34, units: :distance) # => "34 centimeters" - # - # source://activesupport//lib/active_support/number_helper.rb#392 + # [+: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" + # + # pkg:gem/activesupport#lib/active_support/number_helper.rb:453 def number_to_human(number, options = T.unsafe(nil)); end - # Formats the bytes in +number+ into a more understandable - # representation (e.g., giving it 1500 yields 1.46 KB). This - # method is useful for reporting file sizes to users. You can - # customize the format in the +options+ hash. + # Formats +number+ as bytes into a more human-friendly representation. + # Useful for reporting file sizes to users. # - # See number_to_human if you want to pretty-print a - # generic number. + # 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 - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +true+) - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +true+) + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. # - # ==== Examples + # [+: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. # - # number_to_human_size(123) # => "123 Bytes" - # number_to_human_size(1234) # => "1.21 KB" - # number_to_human_size(12345) # => "12.1 KB" - # number_to_human_size(1234567) # => "1.18 MB" - # number_to_human_size(1234567890) # => "1.15 GB" - # number_to_human_size(1234567890123) # => "1.12 TB" - # number_to_human_size(1234567890123456) # => "1.1 PB" - # number_to_human_size(1234567890123456789) # => "1.07 EB" - # number_to_human_size(1234567, precision: 2) # => "1.2 MB" - # number_to_human_size(483989, precision: 2) # => "470 KB" - # number_to_human_size(483989, precision: 2, round_mode: :up) # => "480 KB" - # number_to_human_size(1234567, precision: 2, separator: ',') # => "1,2 MB" - # number_to_human_size(1234567890123, precision: 5) # => "1.1228 TB" - # number_to_human_size(524288000, precision: 5) # => "500 MB" - # - # source://activesupport//lib/active_support/number_helper.rb#283 + # pkg:gem/activesupport#lib/active_support/number_helper.rb:351 def number_to_human_size(number, options = T.unsafe(nil)); end - # Formats a +number+ as a percentage string (e.g., 65%). You can - # customize the format in the +options+ hash. + # 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 - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). Keeps the number's precision if +nil+. - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +false+). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). - # * :format - Specifies the format of the percentage - # string The number field is %n (defaults to "%n%"). + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. # - # ==== Examples + # 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(100) # => "100.000%" - # number_to_percentage('98') # => "98.000%" - # number_to_percentage(100, precision: 0) # => "100%" - # number_to_percentage(1000, delimiter: '.', separator: ',') # => "1.000,000%" - # number_to_percentage(302.24398923423, precision: 5) # => "302.24399%" - # number_to_percentage(1000, locale: :fr) # => "1000,000%" - # number_to_percentage(1000, precision: nil) # => "1000%" - # number_to_percentage('98a') # => "98a%" - # number_to_percentage(100, format: '%n %') # => "100.000 %" - # number_to_percentage(302.24398923423, precision: 5, round_mode: :down) # => "302.24398%" - # - # source://activesupport//lib/active_support/number_helper.rb#154 + # 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 %" + # + # pkg:gem/activesupport#lib/active_support/number_helper.rb:201 def number_to_percentage(number, options = T.unsafe(nil)); end - # Formats a +number+ into a phone number (US by default e.g., (555) - # 123-9876). You can customize the format in the +options+ hash. + # 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 - Adds parentheses around the area code. - # * :delimiter - Specifies the delimiter to use - # (defaults to "-"). - # * :extension - Specifies an extension to add to the - # end of the generated number. - # * :country_code - Sets the country code for the phone - # number. - # * :pattern - Specifies how the number is divided into three - # groups with the custom regexp to override the default format. - # ==== Examples + # [+:area_code+] + # Whether to use parentheses for the area code. Defaults to false. # - # number_to_phone(5551234) # => "555-1234" - # number_to_phone('5551234') # => "555-1234" - # number_to_phone(1235551234) # => "123-555-1234" - # number_to_phone(1235551234, area_code: true) # => "(123) 555-1234" - # number_to_phone(1235551234, delimiter: ' ') # => "123 555 1234" - # number_to_phone(1235551234, area_code: true, extension: 555) # => "(123) 555-1234 x 555" - # number_to_phone(1235551234, country_code: 1) # => "+1-123-555-1234" - # number_to_phone('123a456') # => "123a456" + # number_to_phone(1235551234, area_code: true) + # # => "(123) 555-1234" # - # number_to_phone(1235551234, country_code: 1, extension: 1343, delimiter: '.') - # # => "+1.123.555.1234 x 1343" + # [+: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" # - # number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true) - # # => "(755) 6123-4567" - # number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/) - # # => "133-1234-5678" + # [+:pattern+] + # A regexp that specifies how the digits should be grouped. The first + # three captures from the regexp are treated as digit groups. # - # source://activesupport//lib/active_support/number_helper.rb#53 + # 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" + # + # pkg:gem/activesupport#lib/active_support/number_helper.rb:66 def number_to_phone(number, options = T.unsafe(nil)); end - # Formats a +number+ with the specified level of - # :precision (e.g., 112.32 has a precision of 2 if - # +:significant+ is +false+, and 5 if +:significant+ is +true+). - # You can customize the format in the +options+ hash. + # 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 - Sets the locale to be used for formatting - # (defaults to current locale). - # * :precision - Sets the precision of the number - # (defaults to 3). Keeps the number's precision if +nil+. - # * :round_mode - Determine how rounding is performed - # (defaults to :default. See BigDecimal::mode) - # * :significant - If +true+, precision will be the number - # of significant_digits. If +false+, the number of fractional - # digits (defaults to +false+). - # * :separator - Sets the separator between the - # fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults - # to ""). - # * :strip_insignificant_zeros - If +true+ removes - # insignificant zeros after the decimal separator (defaults to - # +false+). + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. # - # ==== Examples + # number_to_rounded(111.234, locale: :fr) + # # => "111,234" # - # number_to_rounded(111.2345) # => "111.235" - # number_to_rounded(111.2345, precision: 2) # => "111.23" - # number_to_rounded(13, precision: 5) # => "13.00000" - # number_to_rounded(389.32314, precision: 0) # => "389" - # number_to_rounded(111.2345, significant: true) # => "111" - # number_to_rounded(111.2345, precision: 1, significant: true) # => "100" - # number_to_rounded(13, precision: 5, significant: true) # => "13.000" - # number_to_rounded(13, precision: nil) # => "13" - # number_to_rounded(389.32314, precision: 0, round_mode: :up) # => "390" - # number_to_rounded(111.234, locale: :fr) # => "111,234" - # - # number_to_rounded(13, precision: 5, significant: true, strip_insignificant_zeros: true) - # # => "13" - # - # number_to_rounded(389.32314, precision: 4, significant: true) # => "389.3" - # number_to_rounded(1111.2345, precision: 2, separator: ',', delimiter: '.') - # # => "1.111,23" - # - # source://activesupport//lib/active_support/number_helper.rb#236 - def number_to_rounded(number, options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/number_helper/number_converter.rb#11 -class ActiveSupport::NumberHelper::NumberConverter - # @return [NumberConverter] a new instance of NumberConverter + # [+:precision+] + # The level of precision, or +nil+ to preserve +number+'s precision. + # Defaults to 3. # - # source://activesupport//lib/active_support/number_helper/number_converter.rb#123 - def initialize(number, options); end + # 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" + # + # pkg:gem/activesupport#lib/active_support/number_helper.rb:298 + def number_to_rounded(number, options = T.unsafe(nil)); end +end + +# pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:12 +class ActiveSupport::NumberHelper::NumberConverter + # pkg:gem/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#128 + # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:130 def execute; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:14 def namespace; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:14 def namespace=(_arg0); end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # pkg:gem/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#18 + # pkg:gem/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#18 + # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:19 def opts; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:17 def validate_float; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # pkg:gem/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#16 + # pkg:gem/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#147 + # pkg:gem/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#172 + # pkg:gem/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#143 + # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:145 def format_options; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#153 + # pkg:gem/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#139 + # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:141 def options; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#168 + # pkg:gem/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#164 + # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:166 def translate_number_value_with_default(key, **i18n_options); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/number_helper/number_converter.rb#176 - def valid_float?; end + # pkg:gem/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#119 + # pkg:gem/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#13 + # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:14 def namespace; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:14 def namespace=(value); end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:14 def namespace?; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # pkg:gem/activesupport#lib/active_support/number_helper/number_converter.rb:17 def validate_float; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # pkg:gem/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#16 + # pkg:gem/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#20 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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#13 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_currency_converter.rb:8 def namespace; end end end -# source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#7 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_delimited_converter.rb:40 def delimiter_pattern; end - # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#17 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_delimited_converter.rb:17 def parts; end class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_delimited_converter.rb:8 def validate_float; end end end -# source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#10 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_human_converter.rb:55 def unit_exponents(units); end class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_human_converter.rb:12 def namespace; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_human_converter.rb:13 def validate_float; end end end -# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#8 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_human_size_converter.rb:35 def unit; end class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_human_size_converter.rb:10 def namespace; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_human_size_converter.rb:11 def validate_float; end end end -# source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#8 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_percentage_converter.rb:10 def convert; end class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_percentage_converter.rb:8 def namespace; end end end -# source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#7 +# pkg:gem/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#8 + # pkg:gem/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#15 + # pkg:gem/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#23 + # pkg:gem/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#30 + # pkg:gem/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#46 + # pkg:gem/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#42 + # pkg:gem/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#50 + # pkg:gem/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#54 + # pkg:gem/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#38 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_rounded_converter.rb:45 def strip_insignificant_zeros; end class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_rounded_converter.rb:8 def namespace; end - # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_rounded_converter.rb:9 def validate_float; end end end -# source://activesupport//lib/active_support/number_helper/rounding_helper.rb#5 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/number_helper/rounding_helper.rb:6 def options; end - # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#12 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/number_helper/rounding_helper.rb:26 def convert_to_decimal(number); end end -# source://activesupport//lib/active_support/option_merger.rb#6 +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/option_merger.rb:11 def initialize(context, options); end private - # source://activesupport//lib/active_support/option_merger.rb#16 + # pkg:gem/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?(*arguments); end + # pkg:gem/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 +# DEPRECATED: +ActiveSupport::OrderedHash+ implements a hash that preserves # insertion order. # # oh = ActiveSupport::OrderedHash.new @@ -8858,36 +10071,36 @@ end # # Also, maps the +omap+ feature for YAML files # (See https://yaml.org/type/omap.html) to support ordered items -# when loading from yaml. +# when loading from YAML. # -# ActiveSupport::OrderedHash is namespaced to prevent conflicts +# +ActiveSupport::OrderedHash+ is namespaced to prevent conflicts # with other implementations. # -# source://activesupport//lib/active_support/ordered_hash.rb#24 +# pkg:gem/activesupport#lib/active_support/ordered_hash.rb:24 class ActiveSupport::OrderedHash < ::Hash - # source://activesupport//lib/active_support/ordered_hash.rb#29 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/ordered_hash.rb:46 def extractable_options?; end - # source://activesupport//lib/active_support/ordered_hash.rb#41 + # pkg:gem/activesupport#lib/active_support/ordered_hash.rb:41 def nested_under_indifferent_access; end - # source://activesupport//lib/active_support/ordered_hash.rb#37 + # pkg:gem/activesupport#lib/active_support/ordered_hash.rb:37 def reject(*args, &block); end - # source://activesupport//lib/active_support/ordered_hash.rb#33 + # pkg:gem/activesupport#lib/active_support/ordered_hash.rb:33 def select(*args, &block); end - # source://activesupport//lib/active_support/ordered_hash.rb#25 + # pkg:gem/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: @@ -8913,38 +10126,41 @@ end # # h.dog! # => raises KeyError: :dog is blank # -# source://activesupport//lib/active_support/ordered_options.rb#31 +# pkg:gem/activesupport#lib/active_support/ordered_options.rb:33 class ActiveSupport::OrderedOptions < ::Hash - # source://activesupport//lib/active_support/ordered_options.rb#39 + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:41 def [](key); end - # source://activesupport//lib/active_support/ordered_options.rb#35 + # make it protected + # + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:37 def []=(key, value); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/ordered_options.rb#62 + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:45 + def dig(key, *identifiers); end + + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:64 def extractable_options?; end - # source://activesupport//lib/active_support/ordered_options.rb#66 + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:68 def inspect; end - # source://activesupport//lib/active_support/ordered_options.rb#43 - def method_missing(name, *args); end + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:49 + def method_missing(method, *args); end protected - # preserve the original #[] method + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:34 def _get(_arg0); end private - # @return [Boolean] - # - # source://activesupport//lib/active_support/ordered_options.rb#58 + # pkg:gem/activesupport#lib/active_support/ordered_options.rb:60 def respond_to_missing?(name, include_private); end end +# = Active Support Parameter Filter +# # +ParameterFilter+ replaces values in a Hash-like object if their # keys match one of the specified filters. # @@ -8975,7 +10191,7 @@ end # v.reverse! if /secret/i.match?(k) # end]) # -# source://activesupport//lib/active_support/parameter_filter.rb#36 +# pkg:gem/activesupport#lib/active_support/parameter_filter.rb:39 class ActiveSupport::ParameterFilter # Create instance with given filters. Supported type of filters are +String+, +Regexp+, and +Proc+. # Other types of filters are treated as +String+ using +to_s+. @@ -8985,133 +10201,70 @@ class ActiveSupport::ParameterFilter # # * :mask - A replaced object when filtered. Defaults to "[FILTERED]". # - # @return [ParameterFilter] a new instance of ParameterFilter - # - # source://activesupport//lib/active_support/parameter_filter.rb#46 + # pkg:gem/activesupport#lib/active_support/parameter_filter.rb:77 def initialize(filters = T.unsafe(nil), mask: T.unsafe(nil)); end # Mask value of +params+ if key matches one of filters. # - # source://activesupport//lib/active_support/parameter_filter.rb#52 + # pkg:gem/activesupport#lib/active_support/parameter_filter.rb:83 def filter(params); end # Returns filtered value for given key. For +Proc+ filters, third block argument is not populated. # - # source://activesupport//lib/active_support/parameter_filter.rb#57 + # pkg:gem/activesupport#lib/active_support/parameter_filter.rb:88 def filter_param(key, value); end private - # source://activesupport//lib/active_support/parameter_filter.rb#62 - def compiled_filter; end -end - -# source://activesupport//lib/active_support/parameter_filter.rb#66 -class ActiveSupport::ParameterFilter::CompiledFilter - # @return [CompiledFilter] a new instance of CompiledFilter - # - # source://activesupport//lib/active_support/parameter_filter.rb#100 - def initialize(regexps, deep_regexps, blocks, mask:); end - - # Returns the value of attribute blocks. - # - # source://activesupport//lib/active_support/parameter_filter.rb#98 - def blocks; end - - # source://activesupport//lib/active_support/parameter_filter.rb#107 - def call(params, parents = T.unsafe(nil), original_params = T.unsafe(nil)); end - - # Returns the value of attribute deep_regexps. - # - # source://activesupport//lib/active_support/parameter_filter.rb#98 - def deep_regexps; end + # pkg:gem/activesupport#lib/active_support/parameter_filter.rb:125 + def call(params, full_parent_key = T.unsafe(nil), original_params = T.unsafe(nil)); end - # Returns the value of attribute regexps. - # - # source://activesupport//lib/active_support/parameter_filter.rb#98 - def regexps; end + # pkg:gem/activesupport#lib/active_support/parameter_filter.rb:93 + def compile_filters!(filters); end - # source://activesupport//lib/active_support/parameter_filter.rb#117 - def value_for_key(key, value, parents = T.unsafe(nil), original_params = T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/parameter_filter.rb:135 + def value_for_key(key, value, full_parent_key = T.unsafe(nil), original_params = T.unsafe(nil)); end class << self - # source://activesupport//lib/active_support/parameter_filter.rb#67 - def compile(filters, mask:); end + # Precompiles an array of filters that otherwise would be passed directly to + # #initialize. Depending on the quantity and types of filters, + # precompilation can improve filtering performance, especially in the case + # where the ParameterFilter instance itself cannot be retained (but the + # precompiled filters can be retained). + # + # filters = [/foo/, :bar, "nested.baz", /nested\.qux/] + # + # precompiled = ActiveSupport::ParameterFilter.precompile_filters(filters) + # # => [/(?-mix:foo)|(?i:bar)/, /(?i:nested\.baz)|(?-mix:nested\.qux)/] + # + # ActiveSupport::ParameterFilter.new(precompiled) + # + # pkg:gem/activesupport#lib/active_support/parameter_filter.rb:55 + def precompile_filters(filters); end end end -# source://activesupport//lib/active_support/parameter_filter.rb#37 +# pkg:gem/activesupport#lib/active_support/parameter_filter.rb:40 ActiveSupport::ParameterFilter::FILTERED = T.let(T.unsafe(nil), String) -# NOTE: This approach has been deprecated for end-user code in favor of {thread_mattr_accessor}[rdoc-ref:Module#thread_mattr_accessor] and friends. -# Please use that approach instead. -# -# This module is used to encapsulate access to thread local variables. -# -# Instead of polluting the thread locals namespace: -# -# Thread.current[:connection_handler] -# -# you define a class that extends this module: -# -# module ActiveRecord -# class RuntimeRegistry -# extend ActiveSupport::PerThreadRegistry -# -# attr_accessor :connection_handler -# end -# end -# -# and invoke the declared instance accessors as class methods. So -# -# ActiveRecord::RuntimeRegistry.connection_handler = connection_handler -# -# sets a connection handler local to the current thread, and -# -# ActiveRecord::RuntimeRegistry.connection_handler -# -# returns a connection handler local to the current thread. -# -# This feature is accomplished by instantiating the class and storing the -# instance as a thread local keyed by the class name. In the example above -# a key "ActiveRecord::RuntimeRegistry" is stored in Thread.current. -# The class methods proxy to said thread local instance. -# -# If the class has an initializer, it must accept no arguments. -# -# source://activesupport//lib/active_support/per_thread_registry.rb#41 -module ActiveSupport::PerThreadRegistry - # source://activesupport//lib/active_support/per_thread_registry.rb#50 - def instance; end - - private - - # source://activesupport//lib/active_support/per_thread_registry.rb#55 - def method_missing(name, *args, **_arg2, &block); end - - class << self - # @private - # - # source://activesupport//lib/active_support/per_thread_registry.rb#42 - def extended(object); end - end -end - -# A class with no predefined methods that behaves similarly to Builder's -# BlankSlate. Used for proxy classes. -# -# source://activesupport//lib/active_support/proxy_object.rb#6 +# pkg:gem/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#11 + # pkg:gem/activesupport#lib/active_support/proxy_object.rb:9 def raise(*args); end + + class << self + # pkg:gem/activesupport#lib/active_support/proxy_object.rb:13 + def inherited(_subclass); end + end end -# source://activesupport//lib/active_support/railtie.rb#7 +# pkg:gem/activesupport#lib/active_support/railtie.rb:7 class ActiveSupport::Railtie < ::Rails::Railtie; end -# -- +# = Active Support \Reloader +# # This class defines several callbacks: # # to_prepare -- Run once at application startup, and also from @@ -9131,139 +10284,139 @@ class ActiveSupport::Railtie < ::Rails::Railtie; end # after_class_unload -- Run immediately after the classes are # unloaded. # -# source://activesupport//lib/active_support/reloader.rb#27 +# pkg:gem/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#91 + # pkg:gem/activesupport#lib/active_support/reloader.rb:99 def initialize; end - # source://activesupport//lib/active_support/callbacks.rb#940 + # pkg:gem/activesupport#lib/active_support/reloader.rb:31 def _class_unload_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#940 + # pkg:gem/activesupport#lib/active_support/reloader.rb:29 def _prepare_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#928 + # pkg:gem/activesupport#lib/active_support/reloader.rb:31 def _run_class_unload_callbacks(&block); end - # source://activesupport//lib/active_support/callbacks.rb#928 + # pkg:gem/activesupport#lib/active_support/reloader.rb:29 def _run_prepare_callbacks(&block); end - # source://activesupport//lib/active_support/reloader.rb#77 + # pkg:gem/activesupport#lib/active_support/reloader.rb:85 def check; end - # source://activesupport//lib/active_support/reloader.rb#77 + # pkg:gem/activesupport#lib/active_support/reloader.rb:85 def check=(_arg0); end - # source://activesupport//lib/active_support/reloader.rb#77 + # pkg:gem/activesupport#lib/active_support/reloader.rb:85 def check?; end - # source://activesupport//lib/active_support/reloader.rb#118 + # pkg:gem/activesupport#lib/active_support/reloader.rb:126 def class_unload!(&block); end - # source://activesupport//lib/active_support/reloader.rb#123 + # pkg:gem/activesupport#lib/active_support/reloader.rb:131 def complete!; end - # source://activesupport//lib/active_support/reloader.rb#76 + # pkg:gem/activesupport#lib/active_support/reloader.rb:84 def executor; end - # source://activesupport//lib/active_support/reloader.rb#76 + # pkg:gem/activesupport#lib/active_support/reloader.rb:84 def executor=(_arg0); end - # source://activesupport//lib/active_support/reloader.rb#76 + # pkg:gem/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#106 + # pkg:gem/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#98 + # pkg:gem/activesupport#lib/active_support/reloader.rb:106 def require_unload_lock!; end - # source://activesupport//lib/active_support/reloader.rb#113 + # pkg:gem/activesupport#lib/active_support/reloader.rb:121 def run!; end class << self - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/reloader.rb:29 def __callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#932 + # pkg:gem/activesupport#lib/active_support/reloader.rb:31 def _class_unload_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#936 + # pkg:gem/activesupport#lib/active_support/reloader.rb:31 def _class_unload_callbacks=(value); end - # source://activesupport//lib/active_support/callbacks.rb#932 + # pkg:gem/activesupport#lib/active_support/reloader.rb:29 def _prepare_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#936 + # pkg:gem/activesupport#lib/active_support/reloader.rb:29 def _prepare_callbacks=(value); end # Registers a callback that will run immediately after the classes are unloaded. # - # source://activesupport//lib/active_support/reloader.rb#43 + # pkg:gem/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#38 + # pkg:gem/activesupport#lib/active_support/reloader.rb:39 def before_class_unload(*args, &block); end - # source://activesupport//lib/active_support/reloader.rb#77 + # pkg:gem/activesupport#lib/active_support/reloader.rb:85 def check; end - # source://activesupport//lib/active_support/reloader.rb#79 + # pkg:gem/activesupport#lib/active_support/reloader.rb:87 def check!; end - # source://activesupport//lib/active_support/reloader.rb#77 + # pkg:gem/activesupport#lib/active_support/reloader.rb:85 def check=(value); end - # source://activesupport//lib/active_support/reloader.rb#77 + # pkg:gem/activesupport#lib/active_support/reloader.rb:85 def check?; end - # source://activesupport//lib/active_support/reloader.rb#76 + # pkg:gem/activesupport#lib/active_support/reloader.rb:84 def executor; end - # source://activesupport//lib/active_support/reloader.rb#76 + # pkg:gem/activesupport#lib/active_support/reloader.rb:84 def executor=(value); end - # source://activesupport//lib/active_support/reloader.rb#76 + # pkg:gem/activesupport#lib/active_support/reloader.rb:84 def executor?; end - # source://activesupport//lib/active_support/reloader.rb#87 + # pkg:gem/activesupport#lib/active_support/reloader.rb:95 def prepare!; end # Initiate a manual reload # - # source://activesupport//lib/active_support/reloader.rb#50 + # pkg:gem/activesupport#lib/active_support/reloader.rb:51 def reload!; end - # source://activesupport//lib/active_support/reloader.rb#83 + # pkg:gem/activesupport#lib/active_support/reloader.rb:91 def reloaded!; end - # source://activesupport//lib/active_support/reloader.rb#61 + # pkg:gem/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#33 + # pkg:gem/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#70 - def wrap; end + # pkg:gem/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#9 +# pkg:gem/activesupport#lib/active_support/rescuable.rb:11 module ActiveSupport::Rescuable extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -9274,13 +10427,13 @@ module ActiveSupport::Rescuable # Internal handler lookup. Delegates to class method. Some libraries call # this directly, so keeping it around for compatibility. # - # source://activesupport//lib/active_support/rescuable.rb#170 + # pkg:gem/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#164 + # pkg:gem/activesupport#lib/active_support/rescuable.rb:166 def rescue_with_handler(exception); end module GeneratedClassMethods @@ -9296,9 +10449,9 @@ module ActiveSupport::Rescuable end end -# source://activesupport//lib/active_support/rescuable.rb#16 +# pkg:gem/activesupport#lib/active_support/rescuable.rb:18 module ActiveSupport::Rescuable::ClassMethods - # source://activesupport//lib/active_support/rescuable.rb#103 + # pkg:gem/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. @@ -9336,7 +10489,7 @@ module ActiveSupport::Rescuable::ClassMethods # # Exceptions raised inside exception handlers are not propagated up. # - # source://activesupport//lib/active_support/rescuable.rb#51 + # pkg:gem/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. @@ -9354,259 +10507,249 @@ module ActiveSupport::Rescuable::ClassMethods # # Returns the exception if it was handled and +nil+ if it was not. # - # source://activesupport//lib/active_support/rescuable.rb#88 + # pkg:gem/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#137 + # pkg:gem/activesupport#lib/active_support/rescuable.rb:139 def constantize_rescue_handler_class(class_or_name); end - # source://activesupport//lib/active_support/rescuable.rb#122 + # pkg:gem/activesupport#lib/active_support/rescuable.rb:124 def find_rescue_handler(exception); end end -# source://activesupport//lib/active_support/ruby_features.rb#4 -module ActiveSupport::RubyFeatures; end - -# RUBY_VERSION >= "3.1" -# -# source://activesupport//lib/active_support/ruby_features.rb#5 -ActiveSupport::RubyFeatures::CLASS_SUBCLASSES = T.let(T.unsafe(nil), TrueClass) - -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#162 +# pkg:gem/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#200 + # pkg:gem/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#257 + # pkg:gem/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#250 - def *(*_arg0); end + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:116 + def *(_); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#246 + # pkg:gem/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#214 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:86 def <<(value); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#181 + # pkg:gem/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#238 - def []=(*args); end + # pkg:gem/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#222 + # pkg:gem/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#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def capitalize(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def capitalize!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def chomp(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def chomp!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def chop(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def chop!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#210 - def clone_empty; end + # pkg:gem/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#214 + # pkg:gem/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#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def delete(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def delete!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def delete_prefix(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def delete_prefix!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def delete_suffix(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def delete_suffix!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def downcase(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def downcase!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#280 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:148 def encode_with(coder); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#301 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:168 def gsub(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#312 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:168 def gsub!(*args, &block); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#268 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:137 def html_safe?; end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#226 + # pkg:gem/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#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def lstrip(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def lstrip!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def next(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def next!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#230 + # pkg:gem/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#234 + # pkg:gem/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#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def reverse(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def reverse!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def rstrip(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def rstrip!(*args); end - # @raise [SafeConcatError] - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#195 + # pkg:gem/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#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def scrub(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def scrub!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 - def slice(*args, &block); end + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:49 + def slice(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/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#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def squeeze(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def squeeze!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def strip(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def strip!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#301 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:168 def sub(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#312 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:168 def sub!(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def succ(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def succ!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def swapcase(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def swapcase!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#276 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:144 def to_param; end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#272 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:140 def to_s; end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def tr(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def tr!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def tr_s(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def tr_s!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def unicode_normalize(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def unicode_normalize!(*args); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def upcase(*args, &block); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:154 def upcase!(*args); end private - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#327 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:195 def explicit_html_escape_interpolated_argument(arg); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#331 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:199 def implicit_html_escape_interpolated_argument(arg); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#205 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:75 def initialize_copy(other); end + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:28 def original_concat(*_arg0); end - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#354 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:207 def set_block_back_references(block, match_data); end + + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:213 + 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#175 +# pkg:gem/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#176 + # pkg:gem/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#163 +# pkg:gem/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#169 +# pkg:gem/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. # @@ -9631,35 +10774,28 @@ ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS_WITH_BACKREF = T.let(T.unsafe(n # end # end # -# source://activesupport//lib/active_support/secure_compare_rotator.rb#30 +# pkg:gem/activesupport#lib/active_support/secure_compare_rotator.rb:32 class ActiveSupport::SecureCompareRotator - include ::ActiveSupport::Messages::Rotator include ::ActiveSupport::SecurityUtils - # @return [SecureCompareRotator] a new instance of SecureCompareRotator - # - # source://activesupport//lib/active_support/messages/rotator.rb#6 - def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/secure_compare_rotator.rb#40 - def secure_compare!(other_value, on_rotation: T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/secure_compare_rotator.rb:37 + def initialize(value, on_rotation: T.unsafe(nil)); end - private + # pkg:gem/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 build_rotation(previous_value, _options); end + # pkg:gem/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#34 +# pkg:gem/activesupport#lib/active_support/secure_compare_rotator.rb:35 class ActiveSupport::SecureCompareRotator::InvalidMatch < ::StandardError; end -# source://activesupport//lib/active_support/security_utils.rb#4 +# pkg:gem/activesupport#lib/active_support/security_utils.rb:4 module ActiveSupport::SecurityUtils private - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/security_utils.rb#11 + # pkg:gem/activesupport#lib/active_support/security_utils.rb:11 def fixed_length_secure_compare(a, b); end # Secure string comparison for strings of variable length. @@ -9669,13 +10805,11 @@ module ActiveSupport::SecurityUtils # 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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/security_utils.rb:25 def fixed_length_secure_compare(a, b); end # Secure string comparison for strings of variable length. @@ -9685,11 +10819,13 @@ module ActiveSupport::SecurityUtils # 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 + # pkg:gem/activesupport#lib/active_support/security_utils.rb:36 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: @@ -9700,26 +10836,26 @@ end # # Rails.env.production? # -# == Instantiating a new StringInquirer +# == Instantiating a new \StringInquirer # # vehicle = ActiveSupport::StringInquirer.new('car') # vehicle.car? # => true # vehicle.bike? # => false # -# source://activesupport//lib/active_support/string_inquirer.rb#19 +# pkg:gem/activesupport#lib/active_support/string_inquirer.rb:21 class ActiveSupport::StringInquirer < ::String private - # source://activesupport//lib/active_support/string_inquirer.rb#25 - def method_missing(method_name, *arguments); end + # pkg:gem/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#21 + # pkg:gem/activesupport#lib/active_support/string_inquirer.rb:23 def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end end -# ActiveSupport::Subscriber is an object set to consume +# = 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. # @@ -9736,109 +10872,128 @@ 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. +# 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#30 +# pkg:gem/activesupport#lib/active_support/subscriber.rb:32 class ActiveSupport::Subscriber - # @return [Subscriber] a new instance of Subscriber - # - # source://activesupport//lib/active_support/subscriber.rb#128 + # pkg:gem/activesupport#lib/active_support/subscriber.rb:70 def initialize; end - # source://activesupport//lib/active_support/subscriber.rb#143 - def finish(name, id, payload); end + # pkg:gem/activesupport#lib/active_support/subscriber.rb:70 + def call(event); end - # source://activesupport//lib/active_support/subscriber.rb#126 + # pkg:gem/activesupport#lib/active_support/subscriber.rb:70 def patterns; end - # source://activesupport//lib/active_support/subscriber.rb#152 + # pkg:gem/activesupport#lib/active_support/subscriber.rb:70 def publish_event(event); end - # source://activesupport//lib/active_support/subscriber.rb#134 - def start(name, id, payload); end - - private - - # source://activesupport//lib/active_support/subscriber.rb#158 - def event_stack; end - class << self # Attach the subscriber to a namespace. # - # source://activesupport//lib/active_support/subscriber.rb#33 + # pkg:gem/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#48 + # pkg:gem/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#67 + # pkg:gem/activesupport#lib/active_support/subscriber.rb:69 def method_added(event); end - # source://activesupport//lib/active_support/subscriber.rb#76 + # pkg:gem/activesupport#lib/active_support/subscriber.rb:79 def subscribers; end private - # source://activesupport//lib/active_support/subscriber.rb#83 + # pkg:gem/activesupport#lib/active_support/subscriber.rb:86 def add_event_subscriber(event); end - # source://activesupport//lib/active_support/subscriber.rb#121 + # pkg:gem/activesupport#lib/active_support/subscriber.rb:124 def fetch_public_methods(subscriber, inherit_all); end - # source://activesupport//lib/active_support/subscriber.rb#105 + # pkg:gem/activesupport#lib/active_support/subscriber.rb:108 def find_attached_subscriber; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/subscriber.rb#109 + # pkg:gem/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#81 + # pkg:gem/activesupport#lib/active_support/subscriber.rb:84 def namespace; end - # Returns the value of attribute notifier. - # - # source://activesupport//lib/active_support/subscriber.rb#81 + # pkg:gem/activesupport#lib/active_support/subscriber.rb:84 def notifier; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/subscriber.rb#117 + # pkg:gem/activesupport#lib/active_support/subscriber.rb:120 def pattern_subscribed?(pattern); end - # source://activesupport//lib/active_support/subscriber.rb#113 + # pkg:gem/activesupport#lib/active_support/subscriber.rb:116 def prepare_pattern(event); end - # source://activesupport//lib/active_support/subscriber.rb#94 + # pkg:gem/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#81 + # pkg:gem/activesupport#lib/active_support/subscriber.rb:84 def subscriber; end end end +# This is a class for wrapping syntax errors. The purpose of this class +# is to enhance the backtraces on SyntaxError exceptions to include the +# source location of the syntax error. That way we can display the error +# source on error pages in development. +# +# pkg:gem/activesupport#lib/active_support/syntax_error_proxy.rb:10 +class ActiveSupport::SyntaxErrorProxy + # pkg:gem/activesupport#lib/active_support/syntax_error_proxy.rb:11 + def backtrace; end + + # pkg:gem/activesupport#lib/active_support/syntax_error_proxy.rb:34 + def backtrace_locations; end + + private + + # pkg:gem/activesupport#lib/active_support/syntax_error_proxy.rb:47 + def parse_message_for_trace; end +end + +# pkg:gem/activesupport#lib/active_support/syntax_error_proxy.rb:15 +class ActiveSupport::SyntaxErrorProxy::BacktraceLocation < ::Struct + # pkg:gem/activesupport#lib/active_support/syntax_error_proxy.rb:19 + def label; end + + # pkg:gem/activesupport#lib/active_support/syntax_error_proxy.rb:16 + def spot(_); end +end + +# pkg:gem/activesupport#lib/active_support/syntax_error_proxy.rb:23 +class ActiveSupport::SyntaxErrorProxy::BacktraceLocationProxy + # pkg:gem/activesupport#lib/active_support/syntax_error_proxy.rb:24 + def initialize(loc, ex); end + + # pkg:gem/activesupport#lib/active_support/syntax_error_proxy.rb:29 + def spot(_); 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") { logger.info 'Stuff' } # Logs "[BCX] [Jason] Stuff" -# logger.tagged('BCX') { logger.tagged('Jason') { logger.info 'Stuff' } } # Logs "[BCX] [Jason] Stuff" +# 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: # @@ -9851,84 +11006,103 @@ end # it easy to stamp log lines with subdomains, request ids, and anything else # to aid debugging of multi-user production applications. # -# source://activesupport//lib/active_support/tagged_logging.rb#28 +# pkg:gem/activesupport#lib/active_support/tagged_logging.rb:29 module ActiveSupport::TaggedLogging - # source://activesupport//lib/active_support/tagged_logging.rb#95 + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:134 def clear_tags!(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/tagged_logging.rb#108 + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:147 def flush; end - # source://activesupport//lib/active_support/tagged_logging.rb#95 + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:134 def pop_tags(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/tagged_logging.rb#95 + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:134 def push_tags(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/tagged_logging.rb#97 + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:136 def tagged(*tags); end class << self - # source://activesupport//lib/active_support/tagged_logging.rb#81 + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:116 def new(logger); end end end -# source://activesupport//lib/active_support/tagged_logging.rb#29 +# pkg:gem/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#31 + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:32 def call(severity, timestamp, progname, msg); end - # source://activesupport//lib/active_support/tagged_logging.rb#53 + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:51 def clear_tags!; end - # source://activesupport//lib/active_support/tagged_logging.rb#57 + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:61 def current_tags; end - # source://activesupport//lib/active_support/tagged_logging.rb#49 - def pop_tags(size = T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:47 + def pop_tags(count = T.unsafe(nil)); end - # source://activesupport//lib/active_support/tagged_logging.rb#42 + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:43 def push_tags(*tags); end - # source://activesupport//lib/active_support/tagged_logging.rb#35 + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:55 + def tag_stack; end + + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:36 def tagged(*tags); end - # source://activesupport//lib/active_support/tagged_logging.rb#63 + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:65 def tags_text; end end -# source://activesupport//lib/active_support/tagged_logging.rb#73 +# pkg:gem/activesupport#lib/active_support/tagged_logging.rb:108 module ActiveSupport::TaggedLogging::LocalTagStorage - # Returns the value of attribute current_tags. - # - # source://activesupport//lib/active_support/tagged_logging.rb#74 - def current_tags; end + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:109 + def tag_stack; end - # Sets the attribute current_tags - # - # @param value the value to set the attribute current_tags to. - # - # source://activesupport//lib/active_support/tagged_logging.rb#74 - def current_tags=(_arg0); end + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:109 + def tag_stack=(_arg0); end class << self - # @private - # - # source://activesupport//lib/active_support/tagged_logging.rb#76 + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:111 def extended(base); end end end -# source://activesupport//lib/active_support/test_case.rb#19 +# pkg:gem/activesupport#lib/active_support/tagged_logging.rb:70 +class ActiveSupport::TaggedLogging::TagStack + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:73 + def initialize; end + + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:91 + def clear; end + + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:96 + def format_message(message); end + + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:86 + def pop_tags(count); end + + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:78 + def push_tags(tags); end + + # pkg:gem/activesupport#lib/active_support/tagged_logging.rb:71 + def tags; end +end + +# pkg:gem/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 @@ -9936,109 +11110,104 @@ class ActiveSupport::TestCase < ::Minitest::Test extend ::ActiveSupport::Testing::SetupAndTeardown::ClassMethods extend ::ActiveSupport::Testing::Declarative - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/test_case.rb:145 def __callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/test_case.rb:145 def __callbacks?; end - # source://activesupport//lib/active_support/callbacks.rb#928 + # pkg:gem/activesupport#lib/active_support/test_case.rb:145 def _run_setup_callbacks(&block); end - # source://activesupport//lib/active_support/callbacks.rb#928 + # pkg:gem/activesupport#lib/active_support/test_case.rb:145 def _run_teardown_callbacks(&block); end - # source://activesupport//lib/active_support/callbacks.rb#940 + # pkg:gem/activesupport#lib/active_support/test_case.rb:145 def _setup_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#940 + # pkg:gem/activesupport#lib/active_support/test_case.rb:145 def _teardown_callbacks; end - # source://minitest/5.25.4/lib/minitest/assertions.rb#731 + # pkg:gem/activesupport#lib/active_support/test_case.rb:241 def assert_no_match(matcher, obj, msg = T.unsafe(nil)); end - # source://minitest/5.25.4/lib/minitest/assertions.rb#660 + # pkg:gem/activesupport#lib/active_support/test_case.rb:164 def assert_not_empty(obj, msg = T.unsafe(nil)); end - # source://minitest/5.25.4/lib/minitest/assertions.rb#671 + # pkg:gem/activesupport#lib/active_support/test_case.rb:175 def assert_not_equal(exp, act, msg = T.unsafe(nil)); end - # source://minitest/5.25.4/lib/minitest/assertions.rb#683 + # pkg:gem/activesupport#lib/active_support/test_case.rb:186 def assert_not_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end - # source://minitest/5.25.4/lib/minitest/assertions.rb#695 - def assert_not_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/test_case.rb:197 + def assert_not_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end - # source://minitest/5.25.4/lib/minitest/assertions.rb#702 + # pkg:gem/activesupport#lib/active_support/test_case.rb:208 def assert_not_includes(collection, obj, msg = T.unsafe(nil)); end - # source://minitest/5.25.4/lib/minitest/assertions.rb#713 + # pkg:gem/activesupport#lib/active_support/test_case.rb:219 def assert_not_instance_of(cls, obj, msg = T.unsafe(nil)); end - # source://minitest/5.25.4/lib/minitest/assertions.rb#723 + # pkg:gem/activesupport#lib/active_support/test_case.rb:230 def assert_not_kind_of(cls, obj, msg = T.unsafe(nil)); end - # source://minitest/5.25.4/lib/minitest/assertions.rb#741 + # pkg:gem/activesupport#lib/active_support/test_case.rb:252 def assert_not_nil(obj, msg = T.unsafe(nil)); end - # source://minitest/5.25.4/lib/minitest/assertions.rb#776 + # pkg:gem/activesupport#lib/active_support/test_case.rb:263 def assert_not_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end - # source://minitest/5.25.4/lib/minitest/assertions.rb#799 + # pkg:gem/activesupport#lib/active_support/test_case.rb:274 def assert_not_predicate(o1, op, msg = T.unsafe(nil)); end - # source://minitest/5.25.4/lib/minitest/assertions.rb#808 + # pkg:gem/activesupport#lib/active_support/test_case.rb:285 def assert_not_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end - # source://minitest/5.25.4/lib/minitest/assertions.rb#817 + # pkg:gem/activesupport#lib/active_support/test_case.rb:296 def assert_not_same(exp, act, msg = T.unsafe(nil)); end - # test/unit backwards compatibility methods - # - # source://minitest/5.25.4/lib/minitest/assertions.rb#418 - def assert_raise(*exp); end - - # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 + # pkg:gem/activesupport#lib/active_support/test_case.rb:152 def file_fixture_path; end - # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 + # pkg:gem/activesupport#lib/active_support/test_case.rb:152 def file_fixture_path?; end - # source://activesupport//lib/active_support/test_case.rb#151 + # pkg:gem/activesupport#lib/active_support/test_case.rb:300 def inspect; end - # source://minitest/5.25.4/lib/minitest.rb#376 + # pkg:gem/activesupport#lib/active_support/test_case.rb:142 def method_name; end class << self - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/test_case.rb:145 def __callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/test_case.rb:145 def __callbacks=(value); end - # source://activesupport//lib/active_support/callbacks.rb#68 + # pkg:gem/activesupport#lib/active_support/test_case.rb:145 def __callbacks?; end - # source://activesupport//lib/active_support/callbacks.rb#932 + # pkg:gem/activesupport#lib/active_support/test_case.rb:145 def _setup_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#936 + # pkg:gem/activesupport#lib/active_support/test_case.rb:145 def _setup_callbacks=(value); end - # source://activesupport//lib/active_support/callbacks.rb#932 + # pkg:gem/activesupport#lib/active_support/test_case.rb:145 def _teardown_callbacks; end - # source://activesupport//lib/active_support/callbacks.rb#936 + # pkg:gem/activesupport#lib/active_support/test_case.rb:145 def _teardown_callbacks=(value); end - # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 + # pkg:gem/activesupport#lib/active_support/test_case.rb:152 def file_fixture_path; end - # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 + # pkg:gem/activesupport#lib/active_support/test_case.rb:152 def file_fixture_path=(value); end - # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 + # pkg:gem/activesupport#lib/active_support/test_case.rb:152 def file_fixture_path?; end # Parallelizes the test suite. @@ -10064,7 +11233,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # The default parallelization method is to fork processes. If you'd like to # use threads instead you can pass with: :threads to the +parallelize+ # method. Note the threaded parallelization does not create multiple - # database and will not work with system tests at this time. + # databases and will not work with system tests. # # parallelize(workers: :number_of_processors, with: :threads) # @@ -10075,7 +11244,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # 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#79 + # pkg:gem/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 @@ -10092,7 +11261,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # end # end # - # source://activesupport//lib/active_support/test_case.rb#101 + # pkg:gem/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 @@ -10109,7 +11278,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # end # end # - # source://activesupport//lib/active_support/test_case.rb#118 + # pkg:gem/activesupport#lib/active_support/test_case.rb:118 def parallelize_teardown(&block); end # Returns the order in which test cases are run. @@ -10119,7 +11288,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # Possible values are +:random+, +:parallel+, +:alpha+, +:sorted+. # Defaults to +:random+. # - # source://activesupport//lib/active_support/test_case.rb#42 + # pkg:gem/activesupport#lib/active_support/test_case.rb:44 def test_order; end # Sets the order in which test cases are run. @@ -10132,18 +11301,18 @@ class ActiveSupport::TestCase < ::Minitest::Test # * +:sorted+ (to run tests alphabetically by method name) # * +:alpha+ (equivalent to +:sorted+) # - # source://activesupport//lib/active_support/test_case.rb#32 + # pkg:gem/activesupport#lib/active_support/test_case.rb:34 def test_order=(new_order); end end end -# source://activesupport//lib/active_support/test_case.rb#20 +# pkg:gem/activesupport#lib/active_support/test_case.rb:22 ActiveSupport::TestCase::Assertion = Minitest::Assertion -# source://activesupport//lib/active_support/testing/tagged_logging.rb#4 +# pkg:gem/activesupport#lib/active_support/testing/tagged_logging.rb:4 module ActiveSupport::Testing; end -# source://activesupport//lib/active_support/testing/assertions.rb#7 +# pkg:gem/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. @@ -10180,7 +11349,7 @@ module ActiveSupport::Testing::Assertions # post :create, params: { status: { incident: true } } # end # - # source://activesupport//lib/active_support/testing/assertions.rb#175 + # pkg:gem/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 @@ -10197,7 +11366,7 @@ module ActiveSupport::Testing::Assertions # end # # An arbitrary positive or negative difference can be specified. - # The default is 1. + # The default is +1+. # # assert_difference 'Article.count', -1 do # post :delete, params: { id: ... } @@ -10231,7 +11400,7 @@ module ActiveSupport::Testing::Assertions # post :delete, params: { id: ... } # end # - # source://activesupport//lib/active_support/testing/assertions.rb#86 + # pkg:gem/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 @@ -10241,7 +11410,7 @@ module ActiveSupport::Testing::Assertions # post :create, params: { status: { ok: true } } # end # - # Provide the optional keyword argument :from to specify the expected + # Provide the optional keyword argument +:from+ to specify the expected # initial value. # # assert_no_changes -> { Status.all_good? }, from: true do @@ -10254,7 +11423,7 @@ module ActiveSupport::Testing::Assertions # post :create, params: { status: { ok: false } } # end # - # source://activesupport//lib/active_support/testing/assertions.rb#222 + # pkg:gem/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 @@ -10282,12 +11451,12 @@ module ActiveSupport::Testing::Assertions # post :create, params: { article: invalid_attributes } # end # - # source://activesupport//lib/active_support/testing/assertions.rb#137 + # pkg:gem/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. + # 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 @@ -10297,7 +11466,7 @@ module ActiveSupport::Testing::Assertions # # assert_not foo, 'foo should be false' # - # source://activesupport//lib/active_support/testing/assertions.rb#21 + # pkg:gem/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. @@ -10308,16 +11477,30 @@ module ActiveSupport::Testing::Assertions # perform_service(param: 'no_exception') # end # - # source://activesupport//lib/active_support/testing/assertions.rb#33 + # pkg:gem/activesupport#lib/active_support/testing/assertions.rb:48 def assert_nothing_raised; end + # pkg:gem/activesupport#lib/active_support/testing/assertions.rb:39 + 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 + # + # pkg:gem/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#249 + # pkg:gem/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 +# pkg:gem/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. @@ -10345,20 +11528,49 @@ ActiveSupport::Testing::Assertions::UNTRACKED = T.let(T.unsafe(nil), Object) # Class === constant && constant < ::ActionController::Metal # end # -# source://activesupport//lib/active_support/testing/constant_lookup.rb#32 +# pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/testing/constant_lookup.rb:35 module ActiveSupport::Testing::ConstantLookup::ClassMethods - # source://activesupport//lib/active_support/testing/constant_lookup.rb#36 + # pkg:gem/activesupport#lib/active_support/testing/constant_lookup.rb:36 def determine_constant_from_test_name(test_name); end end -# source://activesupport//lib/active_support/testing/declarative.rb#5 +# pkg:gem/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. + # + # pkg:gem/activesupport#lib/active_support/testing/constant_stubbing.rb:28 + def stub_const(mod, constant, new_value, exists: T.unsafe(nil)); end +end + +# pkg:gem/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. @@ -10367,12 +11579,16 @@ module ActiveSupport::Testing::Declarative # ... # end # - # source://activesupport//lib/active_support/testing/declarative.rb#13 + # pkg:gem/activesupport#lib/active_support/testing/declarative.rb:13 def test(name, &block); end end -# source://activesupport//lib/active_support/testing/deprecation.rb#7 +# pkg:gem/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 @@ -10387,17 +11603,11 @@ module ActiveSupport::Testing::Deprecation # # If the +match+ is omitted (or explicitly +nil+), any deprecation warning will match. # - # assert_deprecated(nil, CustomDeprecator) do + # assert_deprecated(CustomDeprecator) do # CustomDeprecator.warn "foo should no longer be used" # end # - # If no +deprecator+ is given, defaults to ActiveSupport::Deprecation. - # - # assert_deprecated do - # ActiveSupport::Deprecation.warn "foo should no longer be used" - # end - # - # source://activesupport//lib/active_support/testing/deprecation.rb#31 + # pkg:gem/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. @@ -10406,35 +11616,131 @@ module ActiveSupport::Testing::Deprecation # CustomDeprecator.warn "message" # fails assertion # end # - # If no +deprecator+ is given, defaults to ActiveSupport::Deprecation. - # - # assert_not_deprecated do - # ActiveSupport::Deprecation.warn "message" # fails assertion - # end - # - # assert_not_deprecated do - # CustomDeprecator.warn "message" # passes assertion + # assert_not_deprecated(ActiveSupport::Deprecation.new) do + # CustomDeprecator.warn "message" # passes assertion, different deprecator # end # - # source://activesupport//lib/active_support/testing/deprecation.rb#56 - def assert_not_deprecated(deprecator = T.unsafe(nil), &block); end + # pkg:gem/activesupport#lib/active_support/testing/deprecation.rb:55 + def assert_not_deprecated(deprecator, &block); end - # Returns an array of all the deprecation warnings emitted by the given + # 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" - # end # => ["message"] + # ActiveSupport::Deprecation.new.warn "other message" + # :result + # end # => [:result, ["message"]] + # + # pkg:gem/activesupport#lib/active_support/testing/deprecation.rb:69 + def collect_deprecations(deprecator); end +end + +# pkg:gem/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. # - # If no +deprecator+ is given, defaults to ActiveSupport::Deprecation. + # 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? # - # collect_deprecations do - # CustomDeprecator.warn "custom message" - # ActiveSupport::Deprecation.warn "message" - # end # => ["message"] + # pkg:gem/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/deprecation.rb#75 - def collect_deprecations(deprecator = T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:62 + def assert_no_error_reported(&block); end +end + +# pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:6 +module ActiveSupport::Testing::ErrorReporterAssertions::ErrorCollector + class << self + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:16 + def record; end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:29 + def report(error, **kwargs); end + + private + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:38 + def subscribe; end + end +end + +# pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 +class ActiveSupport::Testing::ErrorReporterAssertions::ErrorCollector::Report < ::Struct + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def context; end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def context=(_); end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def error; end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def error=(_); end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def handled; end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def handled=(_); end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:12 + def handled?; end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def severity; end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def severity=(_); end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def source; end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def source=(_); end + + class << self + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def [](*_arg0); end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def inspect; end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def keyword_init?; end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def members; end + + # pkg:gem/activesupport#lib/active_support/testing/error_reporter_assertions.rb:10 + def new(*_arg0); end + end end # Adds simple access to sample files called file fixtures. @@ -10447,7 +11753,7 @@ end # 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 +# pkg:gem/activesupport#lib/active_support/testing/file_fixtures.rb:16 module ActiveSupport::Testing::FileFixtures extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -10458,7 +11764,7 @@ module ActiveSupport::Testing::FileFixtures # # Raises +ArgumentError+ if +fixture_name+ can't be found. # - # source://activesupport//lib/active_support/testing/file_fixtures.rb#26 + # pkg:gem/activesupport#lib/active_support/testing/file_fixtures.rb:26 def file_fixture(fixture_name); end module GeneratedClassMethods @@ -10473,213 +11779,224 @@ module ActiveSupport::Testing::FileFixtures end end -# source://activesupport//lib/active_support/testing/isolation.rb#5 +# pkg:gem/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#18 + # pkg:gem/activesupport#lib/active_support/testing/isolation.rb:22 def run; end class << self - # @return [Boolean] - # - # source://activesupport//lib/active_support/testing/isolation.rb#14 + # pkg:gem/activesupport#lib/active_support/testing/isolation.rb:18 def forking_env?; end - # source://activesupport//lib/active_support/testing/isolation.rb#8 + # pkg:gem/activesupport#lib/active_support/testing/isolation.rb:12 def included(klass); end end end -# source://activesupport//lib/active_support/testing/isolation.rb#26 +# pkg:gem/activesupport#lib/active_support/testing/isolation.rb:37 module ActiveSupport::Testing::Isolation::Forking - # source://activesupport//lib/active_support/testing/isolation.rb#27 + # pkg:gem/activesupport#lib/active_support/testing/isolation.rb:38 def run_in_isolation(&blk); end end -# source://activesupport//lib/active_support/testing/isolation.rb#64 +# pkg:gem/activesupport#lib/active_support/testing/isolation.rb:75 module ActiveSupport::Testing::Isolation::Subprocess - # Complicated H4X to get this working in windows / jruby with + # Complicated H4X to get this working in Windows / JRuby with # no forking. # - # source://activesupport//lib/active_support/testing/isolation.rb#69 + # pkg:gem/activesupport#lib/active_support/testing/isolation.rb:80 def run_in_isolation(&blk); end end -# source://activesupport//lib/active_support/testing/isolation.rb#65 +# pkg:gem/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/parallelization/server.rb#8 +# pkg:gem/activesupport#lib/active_support/testing/isolation.rb:10 +class ActiveSupport::Testing::Isolation::SubprocessCrashed < ::StandardError; end + +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/testing/parallelization.rb:28 def initialize(worker_count); end - # source://activesupport//lib/active_support/testing/parallelization.rb#41 + # pkg:gem/activesupport#lib/active_support/testing/parallelization.rb:41 def <<(work); end - # source://activesupport//lib/active_support/testing/parallelization.rb#18 + # pkg:gem/activesupport#lib/active_support/testing/parallelization.rb:18 def after_fork_hooks; end - # source://activesupport//lib/active_support/testing/parallelization.rb#26 + # pkg:gem/activesupport#lib/active_support/testing/parallelization.rb:26 def run_cleanup_hooks; end - # source://activesupport//lib/active_support/testing/parallelization.rb#49 + # pkg:gem/activesupport#lib/active_support/testing/parallelization.rb:49 def shutdown; end - # source://activesupport//lib/active_support/testing/parallelization.rb#45 + # pkg:gem/activesupport#lib/active_support/testing/parallelization.rb:45 def size; end - # source://activesupport//lib/active_support/testing/parallelization.rb#35 + # pkg:gem/activesupport#lib/active_support/testing/parallelization.rb:35 def start; end class << self - # source://activesupport//lib/active_support/testing/parallelization.rb#14 + # pkg:gem/activesupport#lib/active_support/testing/parallelization.rb:14 def after_fork_hook(&blk); end - # source://activesupport//lib/active_support/testing/parallelization.rb#18 + # pkg:gem/activesupport#lib/active_support/testing/parallelization.rb:18 def after_fork_hooks; end - # source://activesupport//lib/active_support/testing/parallelization.rb#22 + # pkg:gem/activesupport#lib/active_support/testing/parallelization.rb:22 def run_cleanup_hook(&blk); end - # source://activesupport//lib/active_support/testing/parallelization.rb#26 + # pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:9 +class ActiveSupport::Testing::Parallelization::PrerecordResultClass < ::Struct + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:9 + def name; end + + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:9 + def name=(_); end + + class << self + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:9 + def [](*_arg0); end + + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:9 + def inspect; end + + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:9 + def keyword_init?; end + + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:9 + def members; end + + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:9 + def new(*_arg0); end + end +end + +# pkg:gem/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#12 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:14 def initialize; end - # source://activesupport//lib/active_support/testing/parallelization/server.rb#28 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:32 def <<(o); end - # @return [Boolean] - # - # source://activesupport//lib/active_support/testing/parallelization/server.rb#48 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:64 def active_workers?; end - # source://activesupport//lib/active_support/testing/parallelization/server.rb#52 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:68 def interrupt; end - # source://activesupport//lib/active_support/testing/parallelization/server.rb#33 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:37 def pop; end - # @raise [DRb::DRbConnError] - # - # source://activesupport//lib/active_support/testing/parallelization/server.rb#18 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:21 def record(reporter, result); end - # source://activesupport//lib/active_support/testing/parallelization/server.rb#56 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:54 + def remove_dead_workers(dead_pids); end + + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:72 def shutdown; end - # source://activesupport//lib/active_support/testing/parallelization/server.rb#40 - def start_worker(worker_id); end + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:44 + def start_worker(worker_id, worker_pid); end - # source://activesupport//lib/active_support/testing/parallelization/server.rb#44 - def stop_worker(worker_id); end + # pkg:gem/activesupport#lib/active_support/testing/parallelization/server.rb:49 + def stop_worker(worker_id, worker_pid); end end -# source://activesupport//lib/active_support/testing/parallelization/worker.rb#6 +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:7 def initialize(number, url); end - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#80 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:80 def after_fork; end - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#42 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:42 def perform_job(job); end - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#86 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:86 def run_cleanup; end - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#56 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:14 def start; end - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#36 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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#21 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:6 def parallelize_with; end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#25 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:6 def size; end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#14 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:6 def threshold; end private - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#34 + # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:35 def build_parallel_executor; end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#67 + # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:72 def execution_info; end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#30 + # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:60 + def many_workers?; end + + # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:31 def parallel_executor; end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#46 + # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:47 def parallelize; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#51 + # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:52 def parallelized?; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#55 + # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:56 def should_parallelize?; end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#63 + # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:68 def show_execution_info; end - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#59 + # pkg:gem/activesupport#lib/active_support/testing/parallelize_executor.rb:64 def tests_count; end end @@ -10697,40 +12014,38 @@ end # end # end # -# source://activesupport//lib/active_support/testing/setup_and_teardown.rb#20 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/testing/setup_and_teardown.rb:34 def teardown(*args, &block); end end # Manages stubs for TimeHelpers # -# source://activesupport//lib/active_support/testing/time_helpers.rb#10 +# pkg:gem/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#13 + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:12 def initialize; end # Stubs object.method_name with the given block @@ -10741,75 +12056,67 @@ class ActiveSupport::Testing::SimpleStubs # simple_stubs.stub_object(Time, :now) { at(target.to_i) } # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 # - # source://activesupport//lib/active_support/testing/time_helpers.rb#24 + # pkg:gem/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#54 + # pkg:gem/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#49 + # pkg:gem/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#38 + # pkg:gem/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#60 + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:59 def unstub_object(stub); end end -# source://activesupport//lib/active_support/testing/time_helpers.rb#11 +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 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 + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def method_name=(_); end - # Returns the value of attribute object - # - # @return [Object] the current value of object + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def object; end - # Sets the attribute object - # - # @param value [Object] the value to set the attribute object to. - # @return [Object] the newly set value + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def object=(_); end - # Returns the value of attribute original_method - # - # @return [Object] the current value of original_method + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 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 + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def original_method=(_); end class << self + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def [](*_arg0); end + + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def inspect; end + + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def keyword_init?; end + + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def members; end + + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:10 def new(*_arg0); end end end @@ -10817,28 +12124,38 @@ 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 +# pkg:gem/activesupport#lib/active_support/testing/tagged_logging.rb:7 module ActiveSupport::Testing::TaggedLogging - # source://activesupport//lib/active_support/testing/tagged_logging.rb#10 + # pkg:gem/activesupport#lib/active_support/testing/tagged_logging.rb:10 def before_setup; end - # source://activesupport//lib/active_support/testing/tagged_logging.rb#8 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/testing/tagged_logging.rb:22 def tagged_logger; end end -# Contains helpers that help you test passage of time. +# Warns when a test case does not perform any assertions. # -# source://activesupport//lib/active_support/testing/time_helpers.rb#69 -module ActiveSupport::Testing::TimeHelpers - # source://activesupport//lib/active_support/testing/time_helpers.rb#70 +# This is helpful in detecting broken tests that do not perform intended assertions. +# +# pkg:gem/activesupport#lib/active_support/testing/tests_without_assertions.rb:8 +module ActiveSupport::Testing::TestsWithoutAssertions + # pkg:gem/activesupport#lib/active_support/testing/tests_without_assertions.rb:9 def after_teardown; end +end - # Calls +travel_to+ with +Time.now+. +# Contains helpers that help you test passage of time. +# +# pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:68 +module ActiveSupport::Testing::TimeHelpers + # pkg:gem/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 @@ -10855,13 +12172,18 @@ module ActiveSupport::Testing::TimeHelpers # end # Time.current # => Sun, 09 Jul 2017 15:34:50 EST -05:00 # - # source://activesupport//lib/active_support/testing/time_helpers.rb#234 - def freeze_time(&block); end + # pkg:gem/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 @@ -10877,8 +12199,8 @@ module ActiveSupport::Testing::TimeHelpers # end # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 # - # source://activesupport//lib/active_support/testing/time_helpers.rb#93 - def travel(duration, &block); end + # pkg:gem/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+. @@ -10904,10 +12226,10 @@ module ActiveSupport::Testing::TimeHelpers # # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 # - # source://activesupport//lib/active_support/testing/time_helpers.rb#208 + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:230 def travel_back; end - # Changes current time to the given time by stubbing +Time.now+, + # 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. # @@ -10928,7 +12250,8 @@ module ActiveSupport::Testing::TimeHelpers # # 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). + # 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: @@ -10939,54 +12262,26 @@ module ActiveSupport::Testing::TimeHelpers # end # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 # - # source://activesupport//lib/active_support/testing/time_helpers.rb#128 - def travel_to(date_or_time); end + # pkg:gem/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#208 + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:238 def unfreeze_time; end private - # Returns the value of attribute in_block. - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#243 + # pkg:gem/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#243 + # pkg:gem/activesupport#lib/active_support/testing/time_helpers.rb:265 def in_block=(_arg0); end - # source://activesupport//lib/active_support/testing/time_helpers.rb#239 + # pkg:gem/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. @@ -11019,14 +12314,12 @@ end # t.is_a?(Time) # => true # t.is_a?(ActiveSupport::TimeWithZone) # => true # -# source://activesupport//lib/active_support/time_with_zone.rb#42 +# pkg:gem/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#61 + # pkg:gem/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 @@ -11046,7 +12339,7 @@ class ActiveSupport::TimeWithZone # 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#309 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:299 def +(other); end # Subtracts an interval of time and returns a new TimeWithZone object unless @@ -11072,19 +12365,17 @@ class ActiveSupport::TimeWithZone # # Time.zone.now - 1.day.ago # => 86399.999967 # - # source://activesupport//lib/active_support/time_with_zone.rb#343 + # pkg:gem/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#242 + # pkg:gem/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#504 + # pkg:gem/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 @@ -11109,9 +12400,10 @@ class ActiveSupport::TimeWithZone # 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#432 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:422 def advance(options); end + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:236 def after?(_arg0); end # Subtracts an interval of time from the current object's time and returns @@ -11132,7 +12424,7 @@ class ActiveSupport::TimeWithZone # 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#371 + # pkg:gem/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. @@ -11148,24 +12440,21 @@ class ActiveSupport::TimeWithZone # 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#176 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:166 def as_json(options = T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:235 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#250 + # pkg:gem/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#515 + # pkg:gem/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 @@ -11181,42 +12470,36 @@ class ActiveSupport::TimeWithZone # # t = Time.zone.now # => Fri, 14 Apr 2017 11:45:15.116992711 EST -05:00 # t.change(year: 2020) # => Tue, 14 Apr 2020 11:45:15.116992711 EST -05:00 - # t.change(hour: 12) # => Fri, 14 Apr 2017 12:00:00.116992711 EST -05:00 - # t.change(min: 30) # => Fri, 14 Apr 2017 11:30:00.116992711 EST -05:00 + # t.change(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#392 + # pkg:gem/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#73 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:66 def comparable_time; end - # source://activesupport//lib/active_support/time_with_zone.rb#444 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:433 def day; end - # Returns true if the current time is within Daylight Savings Time for the + # 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#104 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:94 def dst?; end - # source://activesupport//lib/active_support/time_with_zone.rb#188 + # pkg:gem/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#285 + # pkg:gem/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 @@ -11228,65 +12511,42 @@ class ActiveSupport::TimeWithZone # Time.zone = 'UTC' # => "UTC" # Time.zone.now.formatted_offset(true, "0") # => "0" # - # source://activesupport//lib/active_support/time_with_zone.rb#135 + # pkg:gem/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#519 + # pkg:gem/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#280 + # pkg:gem/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#73 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:67 def getgm; end - # Returns a Time instance of the simultaneous time in the system timezone. - # - # source://activesupport//lib/active_support/time_with_zone.rb#93 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:86 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#73 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:68 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#115 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:108 def gmt?; end - # Returns the offset from current time to UTC time in seconds. - # - # source://activesupport//lib/active_support/time_with_zone.rb#121 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:114 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#73 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:69 def gmtime; end - # Returns the offset from current time to UTC time in seconds. - # - # source://activesupport//lib/active_support/time_with_zone.rb#121 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:115 def gmtoff; end - # source://activesupport//lib/active_support/time_with_zone.rb#289 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:279 def hash; end - # source://activesupport//lib/active_support/time_with_zone.rb#444 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:433 def hour; end # Returns a string of the object's date and time in the format used by @@ -11294,144 +12554,96 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.httpdate # => "Tue, 01 Jan 2013 04:39:43 GMT" # - # source://activesupport//lib/active_support/time_with_zone.rb#196 + # pkg:gem/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#309 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:308 def in(other); end # Returns the simultaneous time in Time.zone, or the specified zone. # - # source://activesupport//lib/active_support/time_with_zone.rb#87 + # pkg:gem/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#184 + # pkg:gem/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#150 + # pkg:gem/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#509 + # pkg:gem/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#104 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:97 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#158 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:151 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#509 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:502 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#93 + # pkg:gem/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#525 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:519 def marshal_dump; end - # source://activesupport//lib/active_support/time_with_zone.rb#529 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:523 def marshal_load(variables); end - # source://activesupport//lib/active_support/time_with_zone.rb#444 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:433 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#550 + # pkg:gem/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#444 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:433 def min; end - # source://activesupport//lib/active_support/time_with_zone.rb#444 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:433 def mon; end - # source://activesupport//lib/active_support/time_with_zone.rb#444 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:433 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#267 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:260 def next_day?; end - # source://activesupport//lib/active_support/time_with_zone.rb#444 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:433 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#255 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:245 def past?; end - # Returns the underlying TZInfo::TimezonePeriod. + # Returns the underlying +TZInfo::TimezonePeriod+. # - # source://activesupport//lib/active_support/time_with_zone.rb#82 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:72 def period; end - # Returns true if the current object's time falls within - # the previous day (yesterday). - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#274 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:509 + def present?; end + + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:267 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#535 + # pkg:gem/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 @@ -11439,62 +12651,33 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.rfc2822 # => "Tue, 01 Jan 2013 04:51:39 +0000" # - # source://activesupport//lib/active_support/time_with_zone.rb#204 + # pkg:gem/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#158 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:152 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#204 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:197 def rfc822; end - # source://activesupport//lib/active_support/time_with_zone.rb#444 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:433 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#309 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:307 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#236 + # pkg:gem/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#68 + # pkg:gem/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#59 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:49 def time_zone; end # Returns Array of parts of Time in sequence of @@ -11503,10 +12686,10 @@ class ActiveSupport::TimeWithZone # 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#455 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:445 def to_a; end - # source://activesupport//lib/active_support/time_with_zone.rb#444 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:433 def to_date; end # Returns an instance of DateTime with the timezone's UTC offset @@ -11514,7 +12697,7 @@ class ActiveSupport::TimeWithZone # 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#488 + # pkg:gem/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 @@ -11522,19 +12705,10 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.to_f # => 1417709320.285418 # - # source://activesupport//lib/active_support/time_with_zone.rb#463 + # pkg:gem/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#222 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:222 def to_formatted_s(format = T.unsafe(nil)); end # Returns a string of the object's date and time. @@ -11544,9 +12718,9 @@ class ActiveSupport::TimeWithZone # 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. + # * 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#222 + # pkg:gem/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 @@ -11554,7 +12728,7 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.to_i # => 1417709320 # - # source://activesupport//lib/active_support/time_with_zone.rb#471 + # pkg:gem/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 @@ -11562,51 +12736,42 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.to_r # => (708854548642709/500000) # - # source://activesupport//lib/active_support/time_with_zone.rb#480 + # pkg:gem/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#210 + # pkg:gem/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#495 + # pkg:gem/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#261 + # pkg:gem/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#267 + # pkg:gem/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#471 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:464 def tv_sec; end - # source://activesupport//lib/active_support/time_with_zone.rb#444 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:433 def usec; end # Returns a Time instance of the simultaneous time in the UTC timezone. # - # source://activesupport//lib/active_support/time_with_zone.rb#73 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:63 def utc; end # Returns true if the current time zone is set to UTC. @@ -11616,17 +12781,15 @@ class ActiveSupport::TimeWithZone # 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#115 + # pkg:gem/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#121 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:111 def utc_offset; end - # source://activesupport//lib/active_support/time_with_zone.rb#444 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:433 def wday; end # Returns a string of the object's date and time in the ISO 8601 standard @@ -11634,21 +12797,19 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" # - # source://activesupport//lib/active_support/time_with_zone.rb#158 + # pkg:gem/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#444 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:433 def yday; end - # source://activesupport//lib/active_support/time_with_zone.rb#444 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:433 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#274 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:264 def yesterday?; end # Returns the time zone abbreviation. @@ -11656,62 +12817,53 @@ class ActiveSupport::TimeWithZone # Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)" # Time.zone.now.zone # => "EST" # - # source://activesupport//lib/active_support/time_with_zone.rb#143 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:133 def zone; end private - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#586 + # pkg:gem/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#567 + # pkg:gem/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#559 + # pkg:gem/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#543 + # pkg:gem/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#580 + # pkg:gem/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#590 + # pkg:gem/activesupport#lib/active_support/time_with_zone.rb:584 def wrap_with_time_zone(time); end - - class << self - # Report class name as 'Time' to thwart type checking. - # - # source://activesupport//lib/active_support/time_with_zone.rb#44 - def name; end - end end -# source://activesupport//lib/active_support/time_with_zone.rb#55 +# pkg:gem/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#557 +# pkg:gem/activesupport#lib/active_support/time_with_zone.rb:551 ActiveSupport::TimeWithZone::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) -# The TimeZone class serves as a wrapper around TZInfo::Timezone instances. +# = 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. +# (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 +# If you set config.time_zone in the \Rails Application, you can # access this TimeZone object via Time.zone: # # # application.rb: @@ -11723,33 +12875,28 @@ ActiveSupport::TimeWithZone::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) # Time.zone.name # => "Eastern Time (US & Canada)" # Time.zone.now # => Sun, 18 May 2008 14:30:44 EDT -04:00 # -# source://activesupport//lib/active_support/values/time_zone.rb#29 +# pkg:gem/activesupport#lib/active_support/values/time_zone.rb:31 class ActiveSupport::TimeZone include ::Comparable - # Create a new TimeZone object with the given name and offset. The - # offset is the number of seconds that this time zone is offset from UTC - # (GMT). Seconds were chosen as the offset unit because that is the unit - # that Ruby uses to represent time zone offsets (see Time#utc_offset). - # - # @return [TimeZone] a new instance of TimeZone + # :stopdoc: # - # source://activesupport//lib/active_support/values/time_zone.rb#301 + # pkg:gem/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#324 + # pkg:gem/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#333 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:344 def =~(re); end - # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # \Method for creating new ActiveSupport::TimeWithZone instance in time zone # of +self+ from number of seconds since the Unix epoch. # # Time.zone = 'Hawaii' # => "Hawaii" @@ -11761,10 +12908,10 @@ class ActiveSupport::TimeZone # Time.zone = 'Hawaii' # => "Hawaii" # Time.at(946684800, 123456.789).nsec # => 123456789 # - # source://activesupport//lib/active_support/values/time_zone.rb#370 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:381 def at(*args); end - # source://activesupport//lib/active_support/values/time_zone.rb#566 + # pkg:gem/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 @@ -11774,13 +12921,13 @@ class ActiveSupport::TimeZone # zone.formatted_offset # => "-06:00" # zone.formatted_offset(false) # => "-0600" # - # source://activesupport//lib/active_support/values/time_zone.rb#318 + # pkg:gem/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#562 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:573 def init_with(coder); end - # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # \Method for creating new ActiveSupport::TimeWithZone instance in time zone # of +self+ from an ISO 8601 string. # # Time.zone = 'Hawaii' # => "Hawaii" @@ -11794,35 +12941,31 @@ class ActiveSupport::TimeZone # 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#387 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:398 def iso8601(str); end - # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # \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#354 + # pkg:gem/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#542 + # pkg:gem/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#339 + # pkg:gem/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#294 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:298 def name; end # Returns an ActiveSupport::TimeWithZone instance representing the current @@ -11831,10 +12974,10 @@ class ActiveSupport::TimeZone # 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#507 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:518 def now; end - # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # \Method for creating new ActiveSupport::TimeWithZone instance in time zone # of +self+ from parsed string. # # Time.zone = 'Hawaii' # => "Hawaii" @@ -11853,25 +12996,25 @@ class ActiveSupport::TimeZone # # If the string is invalid then an +ArgumentError+ could be raised. # - # source://activesupport//lib/active_support/values/time_zone.rb#444 + # pkg:gem/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 + # Available so that TimeZone instances respond like +TZInfo::Timezone+ # instances. # - # source://activesupport//lib/active_support/values/time_zone.rb#554 + # pkg:gem/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 + # Available so that TimeZone instances respond like +TZInfo::Timezone+ # instances. # - # source://activesupport//lib/active_support/values/time_zone.rb#548 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:559 def period_for_utc(time); end - # source://activesupport//lib/active_support/values/time_zone.rb#558 + # pkg:gem/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 + # \Method for creating new ActiveSupport::TimeWithZone instance in time zone # of +self+ from an RFC 3339 string. # # Time.zone = 'Hawaii' # => "Hawaii" @@ -11884,9 +13027,7 @@ class ActiveSupport::TimeZone # Time.zone = 'Hawaii' # => "Hawaii" # Time.zone.rfc3339('1999-12-31') # => ArgumentError: invalid date # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/values/time_zone.rb#460 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:471 def rfc3339(str); end # Parses +str+ according to +format+ and returns an ActiveSupport::TimeWithZone. @@ -11910,32 +13051,30 @@ class ActiveSupport::TimeZone # # 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#498 + # pkg:gem/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#345 + # pkg:gem/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#512 + # pkg:gem/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#517 + # pkg:gem/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#295 + # pkg:gem/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#308 + # pkg:gem/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 @@ -11946,22 +13085,20 @@ class ActiveSupport::TimeZone # 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#533 + # pkg:gem/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#522 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:533 def yesterday; end private - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/values/time_zone.rb#572 + # pkg:gem/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#597 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:608 def time_now; end class << self @@ -11971,35 +13108,38 @@ class ActiveSupport::TimeZone # timezone to find. (The first one with that offset will be returned.) # Returns +nil+ if no such time zone is known to the system. # - # source://activesupport//lib/active_support/values/time_zone.rb#230 + # pkg:gem/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#221 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:225 def all; end - # source://activesupport//lib/active_support/values/time_zone.rb#263 + # pkg:gem/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#258 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:262 def country_zones(country_code); end + # :stopdoc: + # + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:212 def create(*_arg0); end - # source://activesupport//lib/active_support/values/time_zone.rb#205 + # pkg:gem/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#214 + # pkg:gem/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 @@ -12007,235 +13147,214 @@ class ActiveSupport::TimeZone # # ActiveSupport::TimeZone.seconds_to_utc_offset(-21_600) # => "-06:00" # - # source://activesupport//lib/active_support/values/time_zone.rb#197 + # pkg:gem/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#252 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:256 def us_zones; end private - # source://activesupport//lib/active_support/values/time_zone.rb#271 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:275 def load_country_zones(code); end - # source://activesupport//lib/active_support/values/time_zone.rb#285 + # pkg:gem/activesupport#lib/active_support/values/time_zone.rb:289 def zones_map; end end end -# Keys are Rails TimeZone names, values are TZInfo identifiers. +# Keys are \Rails TimeZone names, values are TZInfo identifiers. # -# source://activesupport//lib/active_support/values/time_zone.rb#31 +# pkg:gem/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#186 +# pkg:gem/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#185 +# pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:35 module ActiveSupport::ToJsonWithActiveSupportEncoder - # source://activesupport//lib/active_support/core_ext/object/json.rb#36 + # pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/core_ext/object/try.rb:6 module ActiveSupport::Tryable - # source://activesupport//lib/active_support/core_ext/object/try.rb#7 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/gem_version.rb:9 module ActiveSupport::VERSION; end -# source://activesupport//lib/active_support/gem_version.rb#10 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/gem_version.rb:13 ActiveSupport::VERSION::PRE = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/gem_version.rb#15 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/hash/conversions.rb:144 def initialize(type); end end -# = XmlMini +# = \XmlMini # # To use the much faster libxml parser: -# gem 'libxml-ruby', '=0.9.7' +# gem "libxml-ruby" # XmlMini.backend = 'LibXML' # -# source://activesupport//lib/active_support/xml_mini.rb#17 +# pkg:gem/activesupport#lib/active_support/xml_mini.rb:17 module ActiveSupport::XmlMini extend ::ActiveSupport::XmlMini - # source://activesupport//lib/active_support/xml_mini.rb#97 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:103 def backend; end - # source://activesupport//lib/active_support/xml_mini.rb#101 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:107 def backend=(name); end - # Returns the value of attribute depth. - # - # source://activesupport//lib/active_support/xml_mini.rb#92 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:98 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#92 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:98 def depth=(_arg0); end - # source://activesupport//lib/active_support/xml_mini.rb#95 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:101 def parse(*_arg0, **_arg1, &_arg2); end - # source://activesupport//lib/active_support/xml_mini.rb#148 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:154 def rename_key(key, options = T.unsafe(nil)); end - # source://activesupport//lib/active_support/xml_mini.rb#115 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:121 def to_tag(key, value, options); end - # source://activesupport//lib/active_support/xml_mini.rb#107 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:113 def with_backend(name); end private - # source://activesupport//lib/active_support/xml_mini.rb#159 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:165 def _dasherize(key); end - # TODO: Add support for other encodings - # - # source://activesupport//lib/active_support/xml_mini.rb#166 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:171 def _parse_binary(bin, entity); end - # source://activesupport//lib/active_support/xml_mini.rb#175 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:182 def _parse_file(file, entity); end - # source://activesupport//lib/active_support/xml_mini.rb#191 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:190 + def _parse_hex_binary(bin); end + + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:202 def cast_backend_name_to_module(name); end - # source://activesupport//lib/active_support/xml_mini.rb#183 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:194 def current_thread_backend; end - # source://activesupport//lib/active_support/xml_mini.rb#187 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:198 def current_thread_backend=(name); end end -# source://activesupport//lib/active_support/xml_mini.rb#34 +# pkg:gem/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#55 +# pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/xml_mini.rb:22 module ActiveSupport::XmlMini::FileLike - # source://activesupport//lib/active_support/xml_mini.rb#29 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:29 def content_type; end - # source://activesupport//lib/active_support/xml_mini.rb#23 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:23 def content_type=(_arg0); end - # source://activesupport//lib/active_support/xml_mini.rb#25 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:25 def original_filename; end - # source://activesupport//lib/active_support/xml_mini.rb#23 + # pkg:gem/activesupport#lib/active_support/xml_mini.rb:23 def original_filename=(_arg0); end end -# source://activesupport//lib/active_support/xml_mini.rb#65 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/xml_mini/rexml.rb:8 module ActiveSupport::XmlMini_REXML extend ::ActiveSupport::XmlMini_REXML @@ -12247,7 +13366,7 @@ module ActiveSupport::XmlMini_REXML # data:: # XML Document string or IO to parse # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#20 + # pkg:gem/activesupport#lib/active_support/xml_mini/rexml.rb:20 def parse(data); end private @@ -12257,7 +13376,7 @@ module ActiveSupport::XmlMini_REXML # element:: # The document element to be collapsed. # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#63 + # pkg:gem/activesupport#lib/active_support/xml_mini/rexml.rb:63 def collapse(element, depth); end # Determines if a document element has text content @@ -12265,9 +13384,7 @@ module ActiveSupport::XmlMini_REXML # element:: # XML element to be checked. # - # @return [Boolean] - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#133 + # pkg:gem/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. @@ -12276,7 +13393,7 @@ module ActiveSupport::XmlMini_REXML # element:: # XML element to extract attributes from. # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#123 + # pkg:gem/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 @@ -12291,7 +13408,7 @@ module ActiveSupport::XmlMini_REXML # value:: # Value to be associated with key. # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#103 + # pkg:gem/activesupport#lib/active_support/xml_mini/rexml.rb:103 def merge!(hash, key, value); end # Convert an XML element and merge into the hash @@ -12301,9 +13418,7 @@ module ActiveSupport::XmlMini_REXML # element:: # XML element to merge into hash # - # @raise [REXML::ParseException] - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#54 + # pkg:gem/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 @@ -12313,23 +13428,33 @@ module ActiveSupport::XmlMini_REXML # element:: # XML element whose texts are to me merged into the hash # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#81 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/xml_mini/rexml.rb:41 def require_rexml; end end -# source://activesupport//lib/active_support/xml_mini/rexml.rb#11 +# pkg:gem/activesupport#lib/active_support/xml_mini/rexml.rb:11 ActiveSupport::XmlMini_REXML::CONTENT_KEY = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/core_ext/object/blank.rb#83 +# pkg:gem/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#158 + # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:166 def as_json(options = T.unsafe(nil)); end + # An array is blank if it's empty: + # + # [].blank? # => true + # [1,2,3].blank? # => false + # + # @return [true, false] + # + # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:102 + def blank?; end + # Removes all blank elements from the +Array+ in place and returns self. # Uses Object#blank? for determining if an item is blank. # @@ -12337,7 +13462,7 @@ class Array # a.compact_blank! # # => [1, 2, true] # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#330 + # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:270 def compact_blank!; end # Returns a deep copy of array. @@ -12349,7 +13474,7 @@ class Array # array[1][2] # => nil # dup[1][2] # => 4 # - # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#29 + # pkg:gem/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. @@ -12360,9 +13485,19 @@ class Array # 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 + # pkg:gem/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] + # + # pkg:gem/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. # @@ -12373,28 +13508,28 @@ class Array # options(1, 2) # => {} # options(1, 2, a: :b) # => {:a=>:b} # - # source://activesupport//lib/active_support/core_ext/array/extract_options.rb#24 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/array/access.rb:69 def fourth; end # Returns the tail of the array from +position+. @@ -12406,7 +13541,7 @@ class Array # %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 + # pkg:gem/activesupport#lib/active_support/core_ext/array/access.rb:12 def from(position); end # Returns a new array that includes the passed elements. @@ -12414,38 +13549,38 @@ class Array # [ 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 + # pkg:gem/activesupport#lib/active_support/core_ext/array/access.rb:36 def including(*elements); end + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/array/access.rb:97 def second_to_last; end - # source://activesupport//lib/active_support/core_ext/enumerable.rb#315 - def sum(init = T.unsafe(nil), &block); end - # Equal to self[2]. # # %w( a b c d e ).third # => "c" # - # source://activesupport//lib/active_support/core_ext/array/access.rb#62 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/array/access.rb:90 def third_to_last; end # Returns the beginning of the array up to +position+. @@ -12457,19 +13592,10 @@ class Array # %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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/array/conversions.rb:106 def to_formatted_s(format = T.unsafe(nil)); end # Extends Array#to_s to convert a collection of elements into a @@ -12481,13 +13607,13 @@ class Array # Blog.none.to_fs(:db) # => "null" # [1,2].to_fs # => "[1, 2]" # - # source://activesupport//lib/active_support/core_ext/array/conversions.rb#94 + # pkg:gem/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 + # pkg:gem/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, @@ -12495,7 +13621,7 @@ class Array # # ['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 + # pkg:gem/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 @@ -12550,7 +13676,7 @@ class Array # ['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 + # pkg:gem/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+ @@ -12628,18 +13754,10 @@ class Array # # # - # source://activesupport//lib/active_support/core_ext/array/conversions.rb#184 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/array/access.rb:50 def without(*elements); end class << self @@ -12679,12 +13797,12 @@ class Array # The differences with Kernel#Array explained above # apply to the rest of objects. # - # source://activesupport//lib/active_support/core_ext/array/wrap.rb#39 + # pkg:gem/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#118 +# pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:126 class BigDecimal < ::Numeric include ::ActiveSupport::BigDecimalWithDefaultFormat @@ -12698,15 +13816,14 @@ class BigDecimal < ::Numeric # 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#128 + # pkg:gem/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 +# pkg:gem/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. # @@ -12787,7 +13904,7 @@ class Class < ::Module # # class_attribute :settings, default: {} # - # source://activesupport//lib/active_support/core_ext/class/attribute.rb#85 + # pkg:gem/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. @@ -12804,32 +13921,37 @@ class Class < ::Module # class D < C; end # C.descendants # => [B, A, D] # - # source://activesupport//lib/active_support/core_ext/class/subclasses.rb#20 + # pkg:gem/activesupport#lib/active_support/core_ext/class/subclasses.rb:19 def descendants; end + + # pkg:gem/activesupport#lib/active_support/descendants_tracker.rb:59 + def subclasses; end +end + +# pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:69 +class Data + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:98 def +(other); end - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#100 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:108 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:160 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 + # pkg:gem/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 @@ -12849,51 +13971,39 @@ class Date # 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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:55 def ago(seconds); end - # source://activesupport//lib/active_support/core_ext/object/json.rb#197 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:72 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:88 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:80 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:82 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:71 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:81 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:67 def beginning_of_day; end # Returns a new Date where one or more of the elements have been changed according to the +options+ parameter. @@ -12902,67 +14012,71 @@ class Date # 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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:152 def compare_with_coercion(other); end + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:159 + def compare_without_coercion(_arg0); end + + # pkg:gem/activesupport#lib/active_support/core_ext/date/conversions.rb:64 + def default_inspect; 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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:64 def in(seconds); end - # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" - # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#62 + # pkg:gem/activesupport#lib/active_support/core_ext/date/conversions.rb:65 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:78 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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:70 def midnight; end - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#100 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:107 + def minus_without_duration(_arg0); end + + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:79 def noon; end - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#90 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:90 def plus_with_duration(other); end + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:97 + def plus_without_duration(_arg0); end + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#62 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date/calculations.rb:61 def since(seconds); end + # pkg:gem/activesupport#lib/active_support/core_ext/date/conversions.rb:58 + 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. @@ -12988,36 +14102,8 @@ class Date # 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 + # pkg:gem/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+). @@ -13032,9 +14118,7 @@ class Date # NOTE: The +:local+ timezone is Ruby's *process* timezone, i.e. ENV['TZ']. # If the application's timezone is needed, then use +in_time_zone+ instead. # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#82 + # pkg:gem/activesupport#lib/active_support/core_ext/date/conversions.rb:67 def to_time(form = T.unsafe(nil)); end # Returns a string which represents the time in used time zone as DateTime @@ -13043,7 +14127,7 @@ class Date # date = Date.new(2015, 05, 23) # => Sat, 23 May 2015 # date.xmlschema # => "2015-05-23T00:00:00+04:00" # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#94 + # pkg:gem/activesupport#lib/active_support/core_ext/date/conversions.rb:86 def xmlschema; end class << self @@ -13051,7 +14135,7 @@ class Date # 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 + # pkg:gem/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. @@ -13059,171 +14143,103 @@ class Date # 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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#5 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:72 def after?(date_or_time); end # Returns a Range representing the whole day of the current date/time. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#300 + # pkg:gem/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#311 + # pkg:gem/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#316 + # pkg:gem/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#306 + # pkg:gem/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#321 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:128 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:143 def at_beginning_of_quarter; end - # Returns a new date/time representing the start of this week on the given day. - # Week is assumed to start on +start_day+, default is - # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. - # +DateTime+ objects have their time set to 0:00. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#257 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:271 def at_beginning_of_week(start_day = T.unsafe(nil)); end - # Returns a new date/time at the beginning of the year. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.beginning_of_year # => Thu, 01 Jan 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 - # now.beginning_of_year # => Thu, 01 Jan 2015 00:00:00 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#169 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:182 def at_beginning_of_year; end - # Returns a new date/time representing the end of the month. - # DateTime objects will have a time set to 23:59:59. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#286 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:300 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:158 def at_end_of_quarter; end - # Returns a new date/time representing the end of this week on the given day. - # Week is assumed to start on +start_day+, default is - # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. - # DateTime objects have their time set to 23:59:59. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#273 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:286 def at_end_of_week(start_day = T.unsafe(nil)); end - # Returns a new date/time representing the end of the year. - # DateTime objects will have a time set to 23:59:59. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#294 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:307 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 + # pkg:gem/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. @@ -13236,7 +14252,7 @@ module DateAndTime::Calculations # 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 + # pkg:gem/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. @@ -13249,7 +14265,7 @@ module DateAndTime::Calculations # 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 + # pkg:gem/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. @@ -13257,7 +14273,7 @@ module DateAndTime::Calculations # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. # +DateTime+ objects have their time set to 0:00. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#257 + # pkg:gem/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. @@ -13270,30 +14286,30 @@ module DateAndTime::Calculations # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 # now.beginning_of_year # => Thu, 01 Jan 2015 00:00:00 +0000 # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#169 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:82 def days_since(days); end # Returns the number of days to the start of the week on the given day. # Week is assumed to start on +start_day+, default is # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#248 + # pkg:gem/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#286 + # pkg:gem/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. @@ -13306,7 +14322,7 @@ module DateAndTime::Calculations # 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 + # pkg:gem/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. @@ -13314,71 +14330,56 @@ module DateAndTime::Calculations # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. # DateTime objects have their time set to 23:59:59. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#273 + # pkg:gem/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#294 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:52 def future?; end # Short-hand for months_ago(1). # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#230 + # pkg:gem/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#235 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:248 def last_quarter; end - # Returns a new date/time representing the given day in the previous week. - # Week is assumed to start on +start_day+, default is - # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. - # DateTime objects have their time set to 0:00 unless +same_time+ is true. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#213 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:227 def last_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end - # Returns a new date/time representing the previous weekday. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#220 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:237 def last_weekday; end # Short-hand for years_ago(1). # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#241 + # pkg:gem/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#265 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:38 def next_day?; end # Returns a new date/time representing the next occurrence of the specified day of week. @@ -13387,12 +14388,12 @@ module DateAndTime::Calculations # today.next_occurring(:monday) # => Mon, 18 Dec 2017 # today.next_occurring(:thursday) # => Thu, 21 Dec 2017 # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#330 + # pkg:gem/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#205 + # pkg:gem/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. @@ -13412,40 +14413,30 @@ module DateAndTime::Calculations # now = DateTime.current # => Thu, 07 May 2015 13:31:16 +0000 # now.next_week # => Mon, 11 May 2015 00:00:00 +0000 # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#190 + # pkg:gem/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#196 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:44 def prev_day?; end # Returns a new date/time representing the previous occurrence of the specified day of week. @@ -13454,12 +14445,12 @@ module DateAndTime::Calculations # today.prev_occurring(:monday) # => Mon, 11 Dec 2017 # today.prev_occurring(:thursday) # => Thu, 07 Dec 2017 # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#341 + # pkg:gem/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#235 + # pkg:gem/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. @@ -13467,116 +14458,132 @@ module DateAndTime::Calculations # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. # DateTime objects have their time set to 0:00 unless +same_time+ is true. # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#213 + # pkg:gem/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#220 + # pkg:gem/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 + # + # pkg:gem/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#280 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:41 def yesterday?; end private - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#360 + # pkg:gem/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#356 + # pkg:gem/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#348 + # pkg:gem/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#352 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/calculations.rb:17 DateAndTime::Calculations::WEEKEND_DAYS = T.let(T.unsafe(nil), Array) -# source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#6 +# pkg:gem/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#14 + # pkg:gem/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#29 + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/compatibility.rb:56 def utc_to_local_returns_utc_offset_times; end class << self - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#14 + # -- + # 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. + # + # pkg:gem/activesupport#lib/active_support/core_ext/date_and_time/compatibility.rb:15 def preserve_timezone; end - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#14 + # -- + # 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. + # + # pkg:gem/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#29 + # pkg:gem/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#29 + # pkg:gem/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 +# pkg:gem/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. @@ -13594,21 +14601,21 @@ module DateAndTime::Zones # 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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:5 class DateTime < ::Date # 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:208 def <=>(other); end # Uses Date to provide precise Time calculations for years, months, and days. @@ -13620,81 +14627,61 @@ class DateTime < ::Date # 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 + # pkg:gem/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 + # pkg:gem/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#207 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:127 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:149 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:161 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:143 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:155 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:167 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:135 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:137 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:126 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:136 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:158 def beginning_of_minute; end # Returns a new DateTime where one or more of the elements have been changed @@ -13709,24 +14696,25 @@ class DateTime < ::Date # 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:51 def change(options); end + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:61 + def default_inspect; 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 @@ -13736,83 +14724,54 @@ class DateTime < ::Date # datetime.formatted_offset # => "-06:00" # datetime.formatted_offset(false) # => "-0600" # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#51 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:53 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:192 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:178 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:193 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:194 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:119 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:62 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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:133 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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:125 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/calculations.rb:134 def noon; end # Returns the fraction of a second as nanoseconds # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#94 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:96 def nsec; end # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000". # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#56 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:58 def readable_inspect; end # Returns the number of seconds since 00:00:00. @@ -13821,7 +14780,7 @@ class DateTime < ::Date # 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 + # pkg:gem/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. @@ -13830,62 +14789,37 @@ class DateTime < ::Date # 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:81 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:44 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 + # ==== 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" @@ -13897,7 +14831,8 @@ class DateTime < ::Date # 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 + # ==== 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 @@ -13907,17 +14842,17 @@ class DateTime < ::Date # 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:37 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:86 def to_i; end # Returns the fraction of a second as microseconds # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#89 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:91 def usec; end # Returns a Time instance of the simultaneous time in the UTC timezone. @@ -13925,27 +14860,25 @@ class DateTime < ::Date # 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:101 def offset_in_seconds; end - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#103 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:105 def seconds_since_unix_epoch; end class << self @@ -13957,44 +14890,30 @@ class DateTime < ::Date # 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 + # pkg:gem/activesupport#lib/active_support/core_ext/date_time/conversions.rb:71 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 + # pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/core_ext/object/try.rb:117 class Delegator < ::BasicObject include ::ActiveSupport::Tryable end -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#8 +# pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:39 module ERB::Util - private - - # A utility method for escaping HTML tag characters. - # This method is also aliased as h. - # - # puts html_escape('is a > 0 & a < 10?') - # # => is a > 0 & a < 10? - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 - def h(s); end + include ::ActiveSupport::CoreExt::ERBUtil + include ::ActiveSupport::CoreExt::ERBUtilPrivate + extend ::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/string/output_safety.rb#27 - def html_escape(s); end + private # A utility method for escaping HTML without affecting existing escaped entities. # @@ -14004,7 +14923,7 @@ module ERB::Util # html_escape_once('<< Accept & Checkout') # # => "<< Accept & Checkout" # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#58 + # pkg:gem/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 @@ -14063,15 +14982,9 @@ module ERB::Util # JSON gem, do not provide this kind of protection by default; also some gems # might override +to_json+ to bypass Active Support's encoder). # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#120 + # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:124 def json_escape(s); end - # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. - # This method is not for public consumption! Seriously! - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#41 - def unwrapped_html_escape(s); end - # A utility method for escaping XML names of tags and names of attributes. # # xml_name_escape('1 < 2 & 3') @@ -14079,28 +14992,10 @@ module ERB::Util # # It follows the requirements of the specification: https://www.w3.org/TR/REC-xml/#NT-Name # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#133 + # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:142 def xml_name_escape(name); end class << self - # A utility method for escaping HTML tag characters. - # This method is also aliased as h. - # - # puts html_escape('is a > 0 & a < 10?') - # # => is a > 0 & a < 10? - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 - def h(s); end - - # A utility method for escaping HTML tag characters. - # This method is also aliased as h. - # - # puts html_escape('is a > 0 & a < 10?') - # # => is a > 0 & a < 10? - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 - def html_escape(s); end - # A utility method for escaping HTML without affecting existing escaped entities. # # html_escape_once('1 < 2 & 3') @@ -14109,7 +15004,7 @@ module ERB::Util # html_escape_once('<< Accept & Checkout') # # => "<< Accept & Checkout" # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#58 + # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:67 def html_escape_once(s); end # A utility method for escaping HTML entities in JSON strings. Specifically, the @@ -14168,13 +15063,16 @@ module ERB::Util # JSON gem, do not provide this kind of protection by default; also some gems # might override +to_json+ to bypass Active Support's encoder). # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#120 + # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:134 def json_escape(s); end - # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. - # This method is not for public consumption! Seriously! + # Tokenizes a line of ERB. This is really just for error reporting and + # nobody should use it. # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#41 + # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:161 + def tokenize(source); end + + # pkg:gem/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. @@ -14184,43 +15082,43 @@ module ERB::Util # # It follows the requirements of the specification: https://www.w3.org/TR/REC-xml/#NT-Name # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#133 + # pkg:gem/activesupport#lib/active_support/core_ext/erb/util.rb:157 def xml_name_escape(name); end end end -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#9 +# pkg:gem/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/string/output_safety.rb#11 +# pkg:gem/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/string/output_safety.rb#10 -ERB::Util::JSON_ESCAPE = T.let(T.unsafe(nil), Hash) +# pkg:gem/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/string/output_safety.rb#12 -ERB::Util::JSON_ESCAPE_REGEXP = T.let(T.unsafe(nil), Regexp) +# pkg:gem/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/string/output_safety.rb#19 -ERB::Util::TAG_NAME_FOLLOWING_REGEXP = T.let(T.unsafe(nil), Regexp) +# pkg:gem/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/string/output_safety.rb#20 -ERB::Util::TAG_NAME_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) +# pkg:gem/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/string/output_safety.rb#18 -ERB::Util::TAG_NAME_START_REGEXP = T.let(T.unsafe(nil), Regexp) +# pkg:gem/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/string/output_safety.rb#15 -ERB::Util::TAG_NAME_START_REGEXP_SET = T.let(T.unsafe(nil), String) +# pkg:gem/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/object/json.rb#139 +# pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:147 module Enumerable include ::ActiveSupport::ToJsonWithActiveSupportEncoder extend ::ActiveSupport::EnumerableCoreExt::Constants - # source://activesupport//lib/active_support/core_ext/object/json.rb#140 + # pkg:gem/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. @@ -14237,15 +15135,13 @@ module Enumerable # { 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#240 + # pkg:gem/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#174 + # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:118 def exclude?(object); end # Returns a copy of the enumerable excluding the specified elements. @@ -14259,7 +15155,7 @@ module Enumerable # {foo: 1, bar: 2, baz: 3}.excluding :bar # # => {foo: 1, baz: 3} # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#188 + # pkg:gem/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 @@ -14271,7 +15167,7 @@ module Enumerable # 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#252 + # pkg:gem/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. @@ -14282,7 +15178,7 @@ module Enumerable # ["David", "Rafael"].including %w[ Aaron Todd ] # # => ["David", "Rafael", "Aaron", "Todd"] # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#168 + # pkg:gem/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 @@ -14294,7 +15190,7 @@ module Enumerable # 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#108 + # pkg:gem/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 @@ -14311,7 +15207,7 @@ module Enumerable # %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#131 + # pkg:gem/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 @@ -14319,9 +15215,7 @@ module Enumerable # 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#149 + # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:93 def many?; end # Calculates the maximum from the extracted elements. @@ -14329,7 +15223,7 @@ module Enumerable # payments = [Payment.new(5), Payment.new(15), Payment.new(10)] # payments.maximum(:price) # => 15 # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#52 + # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:40 def maximum(key); end # Calculates the minimum from the extracted elements. @@ -14337,7 +15231,7 @@ module Enumerable # payments = [Payment.new(5), Payment.new(15), Payment.new(10)] # payments.minimum(:price) # => 5 # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#44 + # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:32 def minimum(key); end # Extract the given key from the first element in the enumerable. @@ -14348,7 +15242,7 @@ module Enumerable # [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pick(:id, :name) # # => [1, "David"] # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#217 + # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:161 def pick(*keys); end # Extract the given key from each element in the enumerable. @@ -14359,71 +15253,38 @@ module Enumerable # [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pluck(:id, :name) # # => [[1, "David"], [2, "Rafael"]] # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#201 + # pkg:gem/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+. + # 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#262 + # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:206 def sole; end - # Calculates a sum from the elements. - # - # payments.sum { |p| p.price * p.tax_rate } - # payments.sum(&:price) - # - # The latter is a shortcut for: - # - # payments.inject(0) { |sum, p| sum + p.price } - # - # It can also calculate the sum without the use of a block. - # - # [5, 15, 10].sum # => 30 - # ['foo', 'bar'].sum('') # => "foobar" - # [[1, 2], [3, 1, 5]].sum([]) # => [1, 2, 3, 1, 5] - # - # The default sum of an empty list is zero. You can override this default: - # - # [].sum(Payment.new(0)) { |i| i.amount } # => Payment.new(0) - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#74 - def sum(identity = T.unsafe(nil), &block); 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#188 + # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:136 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 +# pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:21 class Enumerable::SoleItemExpectedError < ::StandardError; end -# source://activesupport//lib/active_support/core_ext/object/json.rb#240 +# pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:250 class Exception - # source://activesupport//lib/active_support/core_ext/object/json.rb#241 + # pkg:gem/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/blank.rb#61 +# pkg:gem/activesupport#lib/active_support/core_ext/object/to_query.rb:32 class FalseClass - # source://activesupport//lib/active_support/core_ext/object/json.rb#81 + # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:89 def as_json(options = T.unsafe(nil)); end # +false+ is blank: @@ -14432,16 +15293,19 @@ class FalseClass # # @return [true] # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#67 + # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:71 def blank?; end + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 @@ -14460,30 +15324,31 @@ class File < ::IO # file.write('hello') # end # - # source://activesupport//lib/active_support/core_ext/file/atomic.rb#21 + # pkg:gem/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 + # pkg:gem/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#110 +# pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:118 class Float < ::Numeric # 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#113 + # pkg:gem/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#3 +# pkg:gem/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#164 + # pkg:gem/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 @@ -14496,12 +15361,22 @@ class Hash # { 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 + # pkg:gem/activesupport#lib/active_support/core_ext/hash/keys.rb:48 def assert_valid_keys(*valid_keys); end + # A hash is blank if it's empty: + # + # {}.blank? # => true + # { key: 'value' }.blank? # => false + # + # @return [true, false] + # + # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:116 + def blank?; end + # Hash#reject has its own definition, so this needs one too. # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#273 + # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:229 def compact_blank; end # Removes all blank values from the +Hash+ in place and returns self. @@ -14511,7 +15386,7 @@ class Hash # h.compact_blank! # # => { b: 1, f: true } # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#283 + # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:239 def compact_blank!; end # Returns a deep copy of hash. @@ -14523,31 +15398,19 @@ class Hash # hash[:a][:c] # => nil # dup[:a][:c] # => "c" # - # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#43 + # pkg:gem/activesupport#lib/active_support/core_ext/object/deep_dup.rb:43 def deep_dup; end - # Returns a new hash with +self+ and +other_hash+ merged recursively. + # :method: deep_merge! + # :call-seq: deep_merge!(other_hash, &block) # - # h1 = { a: true, b: { c: [1, 2, 3] } } - # h2 = { a: false, b: { x: [3, 4, 5] } } + # Same as #deep_merge, but modifies +self+. # - # h1.deep_merge(h2) # => { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } } + # -- + # Implemented by ActiveSupport::DeepMergeable#deep_merge!. # - # Like with Hash#merge in the standard library, a block can be provided - # to merge values: - # - # h1 = { a: 100, b: 200, c: { c1: 100 } } - # h2 = { b: 250, c: { c1: 200 } } - # h1.deep_merge(h2) { |key, this_val, other_val| this_val + other_val } - # # => { a: 100, b: 450, c: { c1: 300 } } - # - # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#18 - def deep_merge(other_hash, &block); end - - # Same as +deep_merge+, but modifies +self+. - # - # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#23 - def deep_merge!(other_hash, &block); end + # pkg:gem/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 @@ -14558,14 +15421,14 @@ class Hash # hash.deep_stringify_keys # # => {"person"=>{"name"=>"Rob", "age"=>"28"}} # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#84 + # pkg:gem/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 + # pkg:gem/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 @@ -14577,14 +15440,14 @@ class Hash # hash.deep_symbolize_keys # # => {:person=>{:name=>"Rob", :age=>"28"}} # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#103 + # pkg:gem/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 + # pkg:gem/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. @@ -14596,14 +15459,14 @@ class Hash # 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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/hash/keys.rb:72 def deep_transform_keys!(&block); end # Removes the given keys from hash and returns it. @@ -14611,7 +15474,7 @@ class Hash # hash.except!(:c) # => { a: true, b: false } # hash # => { a: true, b: false } # - # source://activesupport//lib/active_support/core_ext/hash/except.rb#20 + # pkg:gem/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. @@ -14620,7 +15483,7 @@ class Hash # hash.extract!(:a, :b) # => {:a=>1, :b=>2} # hash # => {:c=>3, :d=>4} # - # source://activesupport//lib/active_support/core_ext/hash/slice.rb#24 + # pkg:gem/activesupport#lib/active_support/core_ext/hash/slice.rb:24 def extract!(*keys); end # By default, only instances of Hash itself are extractable. @@ -14629,14 +15492,9 @@ class 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 + # pkg:gem/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 @@ -14648,9 +15506,12 @@ class Hash # { 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 + # pkg:gem/activesupport#lib/active_support/core_ext/hash/indifferent_access.rb:23 def nested_under_indifferent_access; end + # pkg:gem/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) @@ -14662,17 +15523,15 @@ class Hash # This is particularly useful for initializing an options hash # with default values. # - # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#14 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/hash/reverse_merge.rb:23 def reverse_update(other_hash); end # Replaces the hash with only the given keys. @@ -14682,7 +15541,7 @@ class Hash # hash.slice!(:a, :b) # => {:c=>3, :d=>4} # hash # => {:a=>1, :b=>2} # - # source://activesupport//lib/active_support/core_ext/hash/slice.rb#10 + # pkg:gem/activesupport#lib/active_support/core_ext/hash/slice.rb:10 def slice!(*keys); end # Returns a new hash with all keys converted to strings. @@ -14692,13 +15551,13 @@ class Hash # hash.stringify_keys # # => {"name"=>"Rob", "age"=>"28"} # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#10 + # pkg:gem/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 + # pkg:gem/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 @@ -14709,47 +15568,22 @@ class Hash # hash.symbolize_keys # # => {:name=>"Rob", :age=>"28"} # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#27 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/hash/keys.rb:30 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 + # pkg:gem/activesupport#lib/active_support/core_ext/hash/keys.rb:37 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 + # pkg:gem/activesupport#lib/active_support/core_ext/object/to_query.rb:86 def to_param(namespace = T.unsafe(nil)); end # Returns a string representation of the receiver suitable for use as a URL @@ -14766,7 +15600,7 @@ class Hash # 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 + # pkg:gem/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: @@ -14828,53 +15662,40 @@ class Hash # # 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 + # 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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/hash/reverse_merge.rb:17 def with_defaults(other_hash); end - # Destructive +reverse_merge+. - # - # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#20 + # pkg:gem/activesupport#lib/active_support/core_ext/hash/reverse_merge.rb:24 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/hash/keys.rb:129 def _deep_transform_keys_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 + # pkg:gem/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 @@ -14912,96 +15733,52 @@ class Hash # 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 + # pkg:gem/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#425 +# pkg:gem/activesupport#lib/active_support/hash_with_indifferent_access.rb:445 HashWithIndifferentAccess = ActiveSupport::HashWithIndifferentAccess # :enddoc: # -# source://activesupport//lib/active_support/i18n_railtie.rb#8 -module I18n - class << self - # source://i18n/1.14.7/lib/i18n/backend/cache.rb#64 - def cache_key_digest; end - - # source://i18n/1.14.7/lib/i18n/backend/cache.rb#68 - def cache_key_digest=(key_digest); end - - # source://i18n/1.14.7/lib/i18n/backend/cache.rb#56 - def cache_namespace; end - - # source://i18n/1.14.7/lib/i18n/backend/cache.rb#60 - def cache_namespace=(namespace); end - - # source://i18n/1.14.7/lib/i18n/backend/cache.rb#48 - def cache_store; end - - # source://i18n/1.14.7/lib/i18n/backend/cache.rb#52 - def cache_store=(store); end - - # source://i18n/1.14.7/lib/i18n/backend/fallbacks.rb#17 - def fallbacks; end +# pkg:gem/activesupport#lib/active_support/i18n_railtie.rb:8 +module I18n; end - # source://i18n/1.14.7/lib/i18n/backend/fallbacks.rb#23 - def fallbacks=(fallbacks); end - - # source://i18n/1.14.7/lib/i18n/interpolate/ruby.rb#23 - def interpolate(string, values); end - - # source://i18n/1.14.7/lib/i18n/interpolate/ruby.rb#29 - def interpolate_hash(string, values); end - - # source://i18n/1.14.7/lib/i18n.rb#38 - def new_double_nested_cache; end - - # source://i18n/1.14.7/lib/i18n/backend/cache.rb#72 - def perform_caching?; end - - # source://i18n/1.14.7/lib/i18n.rb#46 - def reserve_key(key); end - - # source://i18n/1.14.7/lib/i18n.rb#51 - def reserved_keys_pattern; end - end -end - -# source://activesupport//lib/active_support/i18n_railtie.rb#9 +# pkg:gem/activesupport#lib/active_support/i18n_railtie.rb:9 class I18n::Railtie < ::Rails::Railtie class << self - # source://activesupport//lib/active_support/i18n_railtie.rb#78 - def forward_raise_on_missing_translations_config(app); end - - # source://activesupport//lib/active_support/i18n_railtie.rb#88 + # pkg:gem/activesupport#lib/active_support/i18n_railtie.rb:95 def include_fallbacks_module; end - # source://activesupport//lib/active_support/i18n_railtie.rb#92 + # pkg:gem/activesupport#lib/active_support/i18n_railtie.rb:99 def init_fallbacks(fallbacks); end # Setup i18n configuration. # - # source://activesupport//lib/active_support/i18n_railtie.rb#32 + # pkg:gem/activesupport#lib/active_support/i18n_railtie.rb:32 def initialize_i18n(app); end - # source://activesupport//lib/active_support/i18n_railtie.rb#108 + # pkg:gem/activesupport#lib/active_support/i18n_railtie.rb:80 + def setup_raise_on_missing_translations_config(app); end + + # pkg:gem/activesupport#lib/active_support/i18n_railtie.rb:115 def validate_fallbacks(fallbacks); end - # source://activesupport//lib/active_support/i18n_railtie.rb#119 + # pkg:gem/activesupport#lib/active_support/i18n_railtie.rb:126 def watched_dirs_with_extensions(paths); end end end -# source://activesupport//lib/active_support/core_ext/object/json.rb#145 +# pkg:gem/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#146 + # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:154 def as_json(options = T.unsafe(nil)); end end @@ -15024,7 +15801,7 @@ class IO::Buffer def get_string(*_arg0); end def get_value(_arg0, _arg1); end def get_values(_arg0, _arg1); end - def hexdump; end + def hexdump(*_arg0); end def inspect; end def internal?; end def locked; end @@ -15034,6 +15811,7 @@ class IO::Buffer 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 @@ -15061,6 +15839,7 @@ class IO::Buffer def for(_arg0); end def map(*_arg0); end def size_of(_arg0); end + def string(_arg0); end end end @@ -15083,16 +15862,6 @@ 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 @@ -15113,56 +15882,39 @@ 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#228 -class IPAddr - # source://activesupport//lib/active_support/core_ext/object/json.rb#229 - def as_json(options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/integer/time.rb#6 +# pkg:gem/activesupport#lib/active_support/core_ext/integer/time.rb:6 class Integer < ::Numeric - # 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 + # pkg:gem/activesupport#lib/active_support/core_ext/integer/time.rb:13 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 + # pkg:gem/activesupport#lib/active_support/core_ext/integer/time.rb:10 def months; 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 + # pkg:gem/activesupport#lib/active_support/core_ext/integer/time.rb:21 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 + # pkg:gem/activesupport#lib/active_support/core_ext/integer/time.rb:18 def years; end end -Integer::GMP_VERSION = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#3 +# pkg:gem/activesupport#lib/active_support/core_ext/kernel/reporting.rb:3 module Kernel private # 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 + # pkg:gem/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 @@ -15174,7 +15926,7 @@ module Kernel # # noisy_call # warning voiced # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#14 + # pkg:gem/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. @@ -15186,20 +15938,20 @@ module Kernel # # puts 'This code gets executed and nothing related to ZeroDivisionError was seen' # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#41 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/kernel/reporting.rb:26 def with_warnings(flag); end class << self # 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 + # pkg:gem/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 @@ -15211,7 +15963,7 @@ module Kernel # # noisy_call # warning voiced # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#14 + # pkg:gem/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. @@ -15223,43 +15975,22 @@ module Kernel # # puts 'This code gets executed and nothing related to ZeroDivisionError was seen' # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#41 + # pkg:gem/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 + # pkg:gem/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 - -# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#39 -class Method - # Methods are not duplicable: - # - # method(:puts).duplicable? # => false - # method(:puts).dup # => TypeError: allocator undefined for Method - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#44 - def duplicable?; end -end - +# == Attribute Accessors +# +# Extends the module object with class/module and instance accessors for +# class/module attributes, just like the native attr* accessors for instance +# attributes. # == Attribute Accessors per Thread # # Extends the module object with class/module and instance accessors for @@ -15272,7 +16003,7 @@ end # 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 +# pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors.rb:8 class Module include ::Module::Concerning @@ -15294,7 +16025,7 @@ class Module # e.subject = "Megastars" # e.title # => "Megastars" # - # source://activesupport//lib/active_support/core_ext/module/aliasing.rb#21 + # pkg:gem/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. @@ -15321,201 +16052,49 @@ class Module # m.name # => "M" # m.anonymous? # => false # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/module/anonymous.rb#27 + # pkg:gem/activesupport#lib/active_support/core_ext/module/anonymous.rb:27 def anonymous?; end - # source://activesupport//lib/active_support/core_ext/object/json.rb#53 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/module/attr_internal.rb:20 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/module/attr_internal.rb:10 def attr_internal_writer(*attrs); end - # Defines both class and instance accessors for class attributes. - # All class and instance methods created will be public, even if - # this method is called with a private or protected access modifier. - # - # module HairColors - # mattr_accessor :hair_colors - # end - # - # class Person - # include HairColors - # end - # - # HairColors.hair_colors = [:brown, :black, :blonde, :red] - # HairColors.hair_colors # => [:brown, :black, :blonde, :red] - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] - # - # If a subclass changes the value then that would also change the value for - # parent class. Similarly if parent class changes the value then that would - # change the value of subclasses too. - # - # class Citizen < Person - # end - # - # Citizen.new.hair_colors << :blue - # Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue] - # - # To omit the instance writer method, pass instance_writer: false. - # To omit the instance reader method, pass instance_reader: false. - # - # module HairColors - # mattr_accessor :hair_colors, instance_writer: false, instance_reader: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:brown] # => NoMethodError - # Person.new.hair_colors # => NoMethodError - # - # Or pass instance_accessor: false, to omit both instance methods. - # - # module HairColors - # mattr_accessor :hair_colors, instance_accessor: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:brown] # => NoMethodError - # Person.new.hair_colors # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] - # end - # - # class Person - # include HairColors - # end - # - # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#202 + # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors.rb:213 def cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end - # Defines a class attribute and creates a class and instance reader methods. - # The underlying class variable is set to +nil+, if it is not previously - # defined. All class and instance methods created will be public, even if - # this method is called with a private or protected access modifier. - # - # module HairColors - # mattr_reader :hair_colors - # end - # - # HairColors.hair_colors # => nil - # HairColors.class_variable_set("@@hair_colors", [:brown, :black]) - # HairColors.hair_colors # => [:brown, :black] - # - # The attribute name must be a valid method name in Ruby. - # - # module Foo - # mattr_reader :"1_Badname" - # end - # # => NameError: invalid attribute name: 1_Badname - # - # To omit the instance reader method, pass - # instance_reader: false or instance_accessor: false. - # - # module HairColors - # mattr_reader :hair_colors, instance_reader: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] - # - # @raise [TypeError] - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#53 + # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors.rb:75 def cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end - # Defines a class attribute and creates a class and instance writer methods to - # allow assignment to the attribute. All class and instance methods created - # will be public, even if this method is called with a private or protected - # access modifier. - # - # module HairColors - # mattr_writer :hair_colors - # end - # - # class Person - # include HairColors - # end - # - # HairColors.hair_colors = [:brown, :black] - # Person.class_variable_get("@@hair_colors") # => [:brown, :black] - # Person.new.hair_colors = [:blonde, :red] - # HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red] - # - # To omit the instance writer method, pass - # instance_writer: false or instance_accessor: false. - # - # module HairColors - # mattr_writer :hair_colors, instance_writer: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:blonde, :red] # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] - # end - # - # class Person - # include HairColors - # end - # - # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors.rb:140 + 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+. # - # @raise [TypeError] + # Object.deep_dup == Object # => true + # klass = Class.new + # klass.deep_dup == klass # => false # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#117 - def cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + # pkg:gem/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. @@ -15523,7 +16102,7 @@ class Module # ==== Options # * :to - Specifies the target object name as a symbol or string # * :prefix - Prefixes the new method with the target name or a custom prefix - # * :allow_nil - If set to true, prevents a +Module::DelegationError+ + # * :allow_nil - If set to true, prevents a +ActiveSupport::DelegationError+ # from being raised # * :private - If set to true, changes method visibility to private # @@ -15634,7 +16213,7 @@ class Module # User.new.age # => 2 # # If the target is +nil+ and does not respond to the delegated method a - # +Module::DelegationError+ is raised. If you wish to instead return +nil+, + # +ActiveSupport::DelegationError+ is raised. If you wish to instead return +nil+, # use the :allow_nil option. # # class User < ActiveRecord::Base @@ -15643,7 +16222,7 @@ class Module # end # # User.new.age - # # => Module::DelegationError: User#age delegated to profile.age, but profile is nil + # # => 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: @@ -15671,7 +16250,7 @@ class Module # # The target method must be public, otherwise it will raise +NoMethodError+. # - # source://activesupport//lib/active_support/core_ext/module/delegation.rb#171 + # pkg:gem/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: @@ -15713,7 +16292,7 @@ class Module # variables, methods, constants, etc. # # The delegated method must be public on the target, otherwise it will - # raise +DelegationError+. If you wish to instead return +nil+, + # raise +ActiveSupport::DelegationError+. If you wish to instead return +nil+, # use the :allow_nil option. # # The marshal_dump and _dump methods are exempt from @@ -15721,20 +16300,15 @@ class Module # 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#289 + # pkg:gem/activesupport#lib/active_support/core_ext/module/delegation.rb:218 def delegate_missing_to(target, allow_nil: T.unsafe(nil)); end - # deprecate :foo - # deprecate bar: 'message' - # deprecate :foo, :bar, baz: 'warning!', qux: 'gone!' - # - # You can also use custom deprecator instance: + # deprecate :foo, deprecator: MyLib.deprecator + # deprecate :foo, bar: "warning!", deprecator: MyLib.deprecator # - # deprecate :foo, deprecator: MyLib::Deprecator.new - # deprecate :foo, bar: "warning!", deprecator: MyLib::Deprecator.new - # - # \Custom deprecators must respond to deprecation_warning(deprecated_method_name, message, caller_backtrace) - # method where you can implement your custom warning behavior. + # 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) @@ -15743,8 +16317,8 @@ class Module # end # end # - # source://activesupport//lib/active_support/core_ext/module/deprecation.rb#22 - def deprecate(*method_names); end + # pkg:gem/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 @@ -15803,6 +16377,7 @@ class Module # # module HairColors # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_accessor(:hair_styles) { [:long, :short] } # end # # class Person @@ -15810,8 +16385,9 @@ class Module # 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#202 + # pkg:gem/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. @@ -15851,6 +16427,7 @@ class Module # # module HairColors # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_reader(:hair_styles) { [:long, :short] } # end # # class Person @@ -15858,10 +16435,9 @@ class Module # 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#53 + # pkg:gem/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 @@ -15899,6 +16475,7 @@ class Module # # module HairColors # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_writer(:hair_styles) { [:long, :short] } # end # # class Person @@ -15906,13 +16483,12 @@ class Module # 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#117 + # pkg:gem/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 + # pkg:gem/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. @@ -15931,14 +16507,14 @@ class Module # M.module_parent # => Object # Module.new.module_parent # => Object # - # source://activesupport//lib/active_support/core_ext/module/introspection.rb#35 + # pkg:gem/activesupport#lib/active_support/core_ext/module/introspection.rb:37 def module_parent; end # Returns the name of the module containing this one. # # M::N.module_parent_name # => "M" # - # source://activesupport//lib/active_support/core_ext/module/introspection.rb#10 + # pkg:gem/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 @@ -15954,134 +16530,46 @@ class Module # M::N.module_parents # => [M, Object] # X.module_parents # => [M, Object] # - # source://activesupport//lib/active_support/core_ext/module/introspection.rb#51 + # pkg:gem/activesupport#lib/active_support/core_ext/module/introspection.rb:53 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 + # pkg:gem/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 - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#152 - 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. + # pkg:gem/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. # - # class Current - # thread_mattr_writer :user, instance_writer: false - # end + # pkg:gem/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. # - # Current.new.user = "DHH" # => NoMethodError + # pkg:gem/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/attribute_accessors_per_thread.rb#85 - def thread_cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/core_ext/module/redefine_method.rb:7 + def silence_redefinition_of_method(method); end + + # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors_per_thread.rb:174 + 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 + + # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors_per_thread.rb:81 + def thread_cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors_per_thread.rb:123 + 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. # @@ -16125,7 +16613,11 @@ class Module # Current.new.user = "DHH" # => NoMethodError # Current.new.user # => NoMethodError # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#152 + # 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. + # + # pkg:gem/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. @@ -16155,7 +16647,7 @@ class Module # # Current.new.user # => NoMethodError # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#41 + # pkg:gem/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 @@ -16177,33 +16669,24 @@ class Module # # Current.new.user = "DHH" # => NoMethodError # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#85 - def thread_mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/core_ext/module/attribute_accessors_per_thread.rb:101 + def thread_mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil)); end private - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#30 + # pkg:gem/activesupport#lib/active_support/core_ext/module/attr_internal.rb:41 def attr_internal_define(attr_name, type); end - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#26 - def attr_internal_ivar_name(attr); end - class << self - # Returns the value of attribute attr_internal_naming_format. - # - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#22 + # pkg:gem/activesupport#lib/active_support/core_ext/module/attr_internal.rb:23 def attr_internal_naming_format; end - # Sets the attribute attr_internal_naming_format - # - # @param value the value to set the attribute attr_internal_naming_format to. - # - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#22 - def attr_internal_naming_format=(_arg0); end + # pkg:gem/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 +# == 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. @@ -16218,9 +16701,9 @@ end # 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 +# == Dissatisfying ways to separate small concerns # -# == Using comments: +# === Using comments: # # class Todo < ApplicationRecord # # Other todo implementation @@ -16237,7 +16720,7 @@ end # end # end # -# == With an inline module: +# === With an inline module: # # Noisy syntax. # @@ -16261,7 +16744,7 @@ end # include EventTracking # end # -# == Mix-in noise exiled to its own file: +# === 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 @@ -16275,7 +16758,7 @@ end # include TodoEventTracking # end # -# = Introducing Module#concerning +# == Introducing Module#concerning # # By quieting the mix-in noise, we arrive at a natural, low-ceremony way to # separate bite-sized concerns. @@ -16310,7 +16793,7 @@ end # 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 +# pkg:gem/activesupport#lib/active_support/core_ext/module/concerning.rb:112 module Module::Concerning # A low-cruft shortcut to define a concern. # @@ -16326,31 +16809,19 @@ module Module::Concerning # ... # end # - # source://activesupport//lib/active_support/core_ext/module/concerning.rb#132 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/module/concerning.rb:114 def concerning(topic, prepend: T.unsafe(nil), &block); end end -# source://activesupport//lib/active_support/core_ext/module/delegation.rb#13 -Module::DELEGATION_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/core_ext/module/delegation.rb#14 -Module::DELEGATION_RESERVED_METHOD_NAMES = T.let(T.unsafe(nil), Set) - -# Error generated by +delegate+ when a method is called on +nil+ and +allow_nil+ -# option is not used. -# -# source://activesupport//lib/active_support/core_ext/module/delegation.rb#8 -class Module::DelegationError < ::NoMethodError; end - -# source://activesupport//lib/active_support/core_ext/module/delegation.rb#10 -Module::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) +# pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/core_ext/name_error.rb:3 class NameError < ::StandardError include ::ErrorHighlight::CoreExt include ::DidYouMean::Correctable @@ -16364,7 +16835,7 @@ class NameError < ::StandardError # end # # => "HelloWorld" # - # source://activesupport//lib/active_support/core_ext/name_error.rb#12 + # pkg:gem/activesupport#lib/active_support/core_ext/name_error.rb:12 def missing_name; end # Was this exception raised because the given name was missing? @@ -16376,23 +16847,21 @@ class NameError < ::StandardError # end # # => true # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/name_error.rb#44 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/core_ext/name_error.rb:53 NameError::UNBOUND_METHOD_MODULE_NAME = T.let(T.unsafe(nil), UnboundMethod) -# source://activesupport//lib/active_support/core_ext/object/blank.rb#50 +# pkg:gem/activesupport#lib/active_support/core_ext/object/to_query.rb:18 class NilClass - # source://activesupport//lib/active_support/core_ext/object/json.rb#87 + # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:95 def as_json(options = T.unsafe(nil)); end # +nil+ is blank: @@ -16401,12 +16870,15 @@ class NilClass # # @return [true] # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#56 + # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:56 def blank?; end + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/object/to_query.rb:20 def to_param; end # Calling +try+ on +nil+ always returns +nil+. @@ -16420,22 +16892,22 @@ class NilClass # With +try+ # @person.try(:children).try(:first).try(:name) # - # source://activesupport//lib/active_support/core_ext/object/try.rb#148 - def try(*_arg0); end + # pkg:gem/activesupport#lib/active_support/core_ext/object/try.rb:148 + def try(*_arg0, &_arg1); end # Calling +try!+ on +nil+ always returns +nil+. # # nil.try!(:name) # => nil # - # source://activesupport//lib/active_support/core_ext/object/try.rb#155 - def try!(*_arg0); end + # pkg:gem/activesupport#lib/active_support/core_ext/object/try.rb:155 + def try!(*_arg0, &_arg1); end end -# source://activesupport//lib/active_support/core_ext/object/blank.rb#134 +# pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:12 class Numeric include ::Comparable - # source://activesupport//lib/active_support/core_ext/object/json.rb#105 + # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:113 def as_json(options = T.unsafe(nil)); end # No number is blank: @@ -16445,96 +16917,70 @@ class Numeric # # @return [false] # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#141 + # pkg:gem/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#14 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:18 def byte; end # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes # # 2.bytes # => 2 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#14 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:40 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 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:37 def days; end - # Returns the number of bytes equivalent to the exabytes provided. - # - # 2.exabytes # => 2_305_843_009_213_693_952 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#62 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:66 def exabyte; end # Returns the number of bytes equivalent to the exabytes provided. # # 2.exabytes # => 2_305_843_009_213_693_952 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#62 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:56 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 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:53 def fortnights; end - # Returns the number of bytes equivalent to the gigabytes provided. - # - # 2.gigabytes # => 2_147_483_648 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#38 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:42 def gigabyte; end # Returns the number of bytes equivalent to the gigabytes provided. # # 2.gigabytes # => 2_147_483_648 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#38 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:32 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 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:29 def hours; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#156 + # pkg:gem/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. @@ -16543,126 +16989,114 @@ class Numeric # 2.in_milliseconds # => 2000 # 1.hour.in_milliseconds # => 3600000 # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#63 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:63 def in_milliseconds; end - # Returns the number of bytes equivalent to the kilobytes provided. - # - # 2.kilobytes # => 2048 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#22 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:26 def kilobyte; end # Returns the number of bytes equivalent to the kilobytes provided. # # 2.kilobytes # => 2048 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#22 + # pkg:gem/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#30 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:34 def megabyte; end # Returns the number of bytes equivalent to the megabytes provided. # # 2.megabytes # => 2_097_152 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#30 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:24 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 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:21 def minutes; end - # Returns the number of bytes equivalent to the petabytes provided. - # - # 2.petabytes # => 2_251_799_813_685_248 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#54 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:58 def petabyte; end # Returns the number of bytes equivalent to the petabytes provided. # # 2.petabytes # => 2_251_799_813_685_248 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#54 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:55 def petabytes; end - # Returns a Duration instance matching the number of seconds provided. - # - # 2.seconds # => 2 seconds - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#13 + # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:181 + def present?; end + + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:16 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 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:13 def seconds; end - # Returns the number of bytes equivalent to the terabytes provided. - # - # 2.terabytes # => 2_199_023_255_552 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#46 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:50 def terabyte; end # Returns the number of bytes equivalent to the terabytes provided. # # 2.terabytes # => 2_199_023_255_552 # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#46 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:48 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 + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/time.rb:45 def weeks; end + + # pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:74 + def zettabyte; end + + # Returns the number of bytes equivalent to the zettabytes provided. + # + # 2.zettabytes # => 2_361_183_241_434_822_606_848 + # + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/core_ext/numeric/bytes.rb:7 Numeric::TERABYTE = T.let(T.unsafe(nil), Integer) +# pkg:gem/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: # @@ -16682,13 +17116,13 @@ Numeric::TERABYTE = T.let(T.unsafe(nil), Integer) # using that rescue idiom. # ++ # -# source://activesupport//lib/active_support/core_ext/object/blank.rb#5 +# pkg:gem/activesupport#lib/active_support/core_ext/object/to_query.rb:5 class Object < ::BasicObject - include ::ActiveSupport::ToJsonWithActiveSupportEncoder 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. @@ -16719,12 +17153,10 @@ class Object < ::BasicObject # # Stringish.new.acts_like?(:string) # => true # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/acts_like.rb#33 + # pkg:gem/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 + # pkg:gem/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. @@ -16740,7 +17172,7 @@ class Object < ::BasicObject # # @return [true, false] # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#18 + # pkg:gem/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 @@ -16753,7 +17185,7 @@ class Object < ::BasicObject # object.instance_variable_defined?(:@a) # => false # dup.instance_variable_defined?(:@a) # => true # - # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#15 + # pkg:gem/activesupport#lib/active_support/core_ext/object/deep_dup.rb:15 def deep_dup; end # Can you safely dup this object? @@ -16761,28 +17193,25 @@ class Object < ::BasicObject # False for method objects; # true otherwise. # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#26 + # pkg:gem/activesupport#lib/active_support/core_ext/object/duplicable.rb:26 def duplicable?; end - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#150 + # pkg:gem/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. Argument must be - # any object which responds to +#include?+. Usage: + # 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 # - # This will throw an +ArgumentError+ if the argument doesn't respond - # to +#include?+. - # - # @return [Boolean] + # For non +Range+ arguments, this will throw an +ArgumentError+ if the argument + # doesn't respond to +#include?+. # - # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#12 + # pkg:gem/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 @@ -16796,7 +17225,7 @@ class Object < ::BasicObject # # C.new(0, 1).instance_values # => {"x" => 0, "y" => 1} # - # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#14 + # pkg:gem/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 "@". @@ -16809,7 +17238,7 @@ class Object < ::BasicObject # # C.new(0, 1).instance_variable_names # => ["@y", "@x"] # - # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#27 + # pkg:gem/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+. @@ -16829,7 +17258,7 @@ class Object < ::BasicObject # # @return [Object] # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#45 + # pkg:gem/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+. @@ -16841,32 +17270,58 @@ class Object < ::BasicObject # # @return [Object] # - # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#26 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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. + # + # pkg:gem/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 - # provided. Each method called on the block variable must take an options - # hash as its final argument. + # 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: # @@ -16927,7 +17382,7 @@ class Object < ::BasicObject # You can access these methods using the class name instead: # # class Phone < ActiveRecord::Base - # enum phone_number_type: { home: 0, office: 1, mobile: 2 } + # 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 } @@ -16948,48 +17403,48 @@ class Object < ::BasicObject # styled.button_tag "I'm red too!" # # => # - # source://activesupport//lib/active_support/core_ext/object/with_options.rb#92 + # pkg:gem/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#222 +# pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:230 class Pathname - # source://activesupport//lib/active_support/core_ext/object/json.rb#223 + # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:231 def as_json(options = T.unsafe(nil)); end end module Process - extend ::ActiveSupport::ForkTracker::ModernCoreExt + extend ::ActiveSupport::ForkTracker::CoreExt class << self - # source://activesupport//lib/active_support/fork_tracker.rb#6 + # pkg:gem/activesupport#lib/active_support/fork_tracker.rb:6 def _fork; end end end -# source://activesupport//lib/active_support/core_ext/object/json.rb#234 +# pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:244 class Process::Status - # source://activesupport//lib/active_support/core_ext/object/json.rb#235 + # pkg:gem/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/object/json.rb#151 +# pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:159 class Range include ::Enumerable - # source://activesupport//lib/active_support/core_ext/object/json.rb#152 + # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:160 def as_json(options = T.unsafe(nil)); 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#292 - def sum(identity = T.unsafe(nil)); end + # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:248 + def sum(initial_value = T.unsafe(nil)); end end -# source://activesupport//lib/active_support/core_ext/object/json.rb#133 +# pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:141 class Regexp - # source://activesupport//lib/active_support/core_ext/object/json.rb#134 + # pkg:gem/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. @@ -17000,13 +17455,11 @@ class Regexp # Regexp.new(".").multiline? # => false # Regexp.new(".", Regexp::MULTILINE).multiline? # => true # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/regexp.rb#11 + # pkg:gem/activesupport#lib/active_support/core_ext/regexp.rb:11 def multiline?; end end -# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#62 +# pkg:gem/activesupport#lib/active_support/core_ext/object/duplicable.rb:62 module Singleton mixes_in_class_methods ::Singleton::SingletonClassMethods @@ -17014,9 +17467,7 @@ module Singleton # # 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 + # pkg:gem/activesupport#lib/active_support/core_ext/object/duplicable.rb:66 def duplicable?; end end @@ -17025,18 +17476,16 @@ end # # 'ScaleScore'.tableize # => "scale_scores" # -# source://activesupport//lib/active_support/core_ext/object/blank.rb#103 +# pkg:gem/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 + # pkg:gem/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#93 + # pkg:gem/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 @@ -17065,7 +17514,7 @@ class String # str.at("lo") # => "lo" # str.at("ol") # => nil # - # source://activesupport//lib/active_support/core_ext/string/access.rb#29 + # pkg:gem/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: @@ -17081,22 +17530,10 @@ class String # # @return [true, false] # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#121 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/string/inflections.rb:111 def camelcase(first_letter = T.unsafe(nil)); end # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize @@ -17111,10 +17548,10 @@ class String # # See ActiveSupport::Inflector.camelize. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#101 + # pkg:gem/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. + # 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+.) # @@ -17123,7 +17560,7 @@ class String # # See ActiveSupport::Inflector.classify. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#239 + # pkg:gem/activesupport#lib/active_support/core_ext/string/inflections.rb:239 def classify; end # +constantize+ tries to find a declared constant with the name specified @@ -17136,7 +17573,7 @@ class String # # See ActiveSupport::Inflector.constantize. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#73 + # pkg:gem/activesupport#lib/active_support/core_ext/string/inflections.rb:73 def constantize; end # Replaces underscores with dashes in the string. @@ -17145,7 +17582,7 @@ class String # # See ActiveSupport::Inflector.dasherize. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#148 + # pkg:gem/activesupport#lib/active_support/core_ext/string/inflections.rb:148 def dasherize; end # Removes the rightmost segment from the constant expression in the string. @@ -17160,7 +17597,7 @@ class String # # See also +demodulize+. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#177 + # pkg:gem/activesupport#lib/active_support/core_ext/string/inflections.rb:177 def deconstantize; end # Removes the module part from the constant expression in the string. @@ -17174,9 +17611,23 @@ class String # # See also +deconstantize+. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#162 + # pkg:gem/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. + # + # pkg:gem/activesupport#lib/active_support/core_ext/string/inflections.rb:284 + def downcase_first; end + + # pkg:gem/activesupport#lib/active_support/core_ext/string/starts_ends_with.rb:5 + def ends_with?(*_arg0); end + # The inverse of String#include?. Returns true if the string # does not include the other string. # @@ -17184,9 +17635,7 @@ class String # "hello".exclude? "ol" # => true # "hello".exclude? ?h # => false # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/string/exclude.rb#10 + # pkg:gem/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 @@ -17200,7 +17649,7 @@ class String # str.first(0) # => "" # str.first(6) # => "hello" # - # source://activesupport//lib/active_support/core_ext/string/access.rb#78 + # pkg:gem/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. @@ -17213,7 +17662,7 @@ class String # # See ActiveSupport::Inflector.foreign_key. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#286 + # pkg:gem/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. @@ -17230,7 +17679,7 @@ class String # str.from(0).to(-1) # => "hello" # str.from(1).to(-2) # => "ell" # - # source://activesupport//lib/active_support/core_ext/string/access.rb#46 + # pkg:gem/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 @@ -17239,10 +17688,10 @@ class String # +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#368 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:227 def html_safe; end - # Capitalizes the first word, turns underscores into spaces, and (by default)strips a + # 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. # @@ -17262,13 +17711,13 @@ class String # # See ActiveSupport::Inflector.humanize. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#262 + # pkg:gem/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 + # pkg:gem/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: @@ -17285,7 +17734,7 @@ class String # # The second argument, +indent_string+, specifies which indent string to # use. The default is +nil+, which tells the method to make a guess by - # peeking at the first indented line, and fallback to a space if there is + # peeking at the first indented line, and fall back to a space if there is # none. # # " foo".indent(2) # => " foo" @@ -17300,14 +17749,14 @@ class String # "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 + # pkg:gem/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 + # pkg:gem/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, @@ -17317,7 +17766,7 @@ class String # env.production? # => true # env.development? # => false # - # source://activesupport//lib/active_support/core_ext/string/inquiry.rb#13 + # pkg:gem/activesupport#lib/active_support/core_ext/string/inquiry.rb:13 def inquiry; end # Returns +true+ if string has utf_8 encoding. @@ -17328,9 +17777,7 @@ class String # utf_8_str.is_utf8? # => true # iso_str.is_utf8? # => false # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/string/multibyte.rb#48 + # pkg:gem/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 @@ -17344,7 +17791,7 @@ class String # str.last(0) # => "" # str.last(6) # => "hello" # - # source://activesupport//lib/active_support/core_ext/string/access.rb#92 + # pkg:gem/activesupport#lib/active_support/core_ext/string/access.rb:92 def last(limit = T.unsafe(nil)); end # == Multibyte proxy @@ -17356,14 +17803,14 @@ class String # 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" + # # => "LJ" # # NOTE: Ruby 2.4 and later support native Unicode case mappings: # # >> "lj".upcase - # => "LJ" + # # => "LJ" # - # == Method chaining + # == \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. @@ -17379,7 +17826,7 @@ class String # 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 + # pkg:gem/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. @@ -17417,7 +17864,7 @@ class String # # See ActiveSupport::Inflector.parameterize. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#215 + # pkg:gem/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. @@ -17444,16 +17891,19 @@ class String # # See ActiveSupport::Inflector.pluralize. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#35 + # pkg:gem/activesupport#lib/active_support/core_ext/string/inflections.rb:35 def pluralize(count = T.unsafe(nil), locale = T.unsafe(nil)); end + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/string/filters.rb:32 def remove(*patterns); end # Alters the string by removing all occurrences of the patterns. @@ -17461,7 +17911,7 @@ class String # str.remove!(" test", /bar/) # => "foo " # str # => "foo " # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#40 + # pkg:gem/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 @@ -17474,7 +17924,7 @@ class String # # See ActiveSupport::Inflector.safe_constantize. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#86 + # pkg:gem/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. @@ -17494,7 +17944,7 @@ class String # # See ActiveSupport::Inflector.singularize. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#60 + # pkg:gem/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 @@ -17507,7 +17957,7 @@ class String # 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 + # pkg:gem/activesupport#lib/active_support/core_ext/string/filters.rb:13 def squish; end # Performs a destructive squish. See String#squish. @@ -17515,9 +17965,12 @@ class String # str.squish! # => "foo bar boo" # str # => "foo bar boo" # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#21 + # pkg:gem/activesupport#lib/active_support/core_ext/string/filters.rb:21 def squish!; end + # pkg:gem/activesupport#lib/active_support/core_ext/string/starts_ends_with.rb:4 + def starts_with?(*_arg0); end + # Strips indentation in heredocs. # # For example in @@ -17537,10 +17990,10 @@ class String # 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 + # pkg:gem/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 + # 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" @@ -17549,29 +18002,15 @@ class String # # See ActiveSupport::Inflector.tableize. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#227 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/string/inflections.rb:129 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. + # used in the \Rails internals. # # The trailing '_id','Id'.. can be kept and capitalized by setting the # optional parameter +keep_id_suffix+ to true. @@ -17583,7 +18022,7 @@ class String # # See ActiveSupport::Inflector.titleize. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#126 + # pkg:gem/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. @@ -17600,7 +18039,7 @@ class String # str.from(0).to(-1) # => "hello" # str.from(1).to(-2) # => "ell" # - # source://activesupport//lib/active_support/core_ext/string/access.rb#63 + # pkg:gem/activesupport#lib/active_support/core_ext/string/access.rb:63 def to(position); end # Converts a string to a Date value. @@ -17610,7 +18049,7 @@ class String # "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 + # pkg:gem/activesupport#lib/active_support/core_ext/string/conversions.rb:47 def to_date; end # Converts a string to a DateTime value. @@ -17620,7 +18059,7 @@ class String # "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 + # pkg:gem/activesupport#lib/active_support/core_ext/string/conversions.rb:57 def to_datetime; end # Converts a string to a Time value. @@ -17639,10 +18078,10 @@ class String # "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 + # pkg:gem/activesupport#lib/active_support/core_ext/string/conversions.rb:22 def to_time(form = T.unsafe(nil)); end - # Truncates a given +text+ after a given length if +text+ is longer than length: + # 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..." @@ -17655,32 +18094,38 @@ class String # 'Once upon a time in a world far far away'.truncate(27, separator: /\s/) # # => "Once upon a time in a..." # - # The last characters will be replaced with the :omission string (defaults to "...") - # for a total length not exceeding length: + # 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)" # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#66 - def truncate(truncate_at, options = T.unsafe(nil)); end + # 'And they found that many people were sleeping better.'.truncate(4, omission: '... (continued)') + # # => "... (continued)" + # + # pkg:gem/activesupport#lib/active_support/core_ext/string/filters.rb:70 + def truncate(truncate_to, options = T.unsafe(nil)); end - # Truncates +text+ to at most bytesize bytes in length without + # 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 + # # => 20 # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".bytesize - # => 80 + # # => 80 # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".truncate_bytes(20) - # => "🔪🔪🔪🔪…" + # # => "🔪🔪🔪🔪…" # # The truncated text ends with the :omission string, defaulting - # to "…", for a total length not exceeding bytesize. + # 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#95 - def truncate_bytes(truncate_at, omission: T.unsafe(nil)); end + # pkg:gem/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): # @@ -17697,7 +18142,7 @@ class String # 'And they found that many people were sleeping better.'.truncate_words(5, omission: '... (continued)') # # => "And they found that many... (continued)" # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#136 + # pkg:gem/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. @@ -17709,10 +18154,10 @@ class String # # See ActiveSupport::Inflector.underscore. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#139 + # pkg:gem/activesupport#lib/active_support/core_ext/string/inflections.rb:139 def underscore; end - # Converts just the first character to uppercase. + # Converts the first character to uppercase. # # 'what a Lovely Day'.upcase_first # => "What a Lovely Day" # 'w'.upcase_first # => "W" @@ -17720,59 +18165,75 @@ class String # # See ActiveSupport::Inflector.upcase_first. # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#273 + # pkg:gem/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#104 +# pkg:gem/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#105 +# pkg:gem/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#68 +# pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:76 class Struct include ::Enumerable - # source://activesupport//lib/active_support/core_ext/object/json.rb#69 + # pkg:gem/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/json.rb#98 +# pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:106 class Symbol include ::Comparable - # source://activesupport//lib/active_support/core_ext/object/json.rb#99 + # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:107 def as_json(options = T.unsafe(nil)); end + + # A Symbol is blank if it's empty: + # + # :''.blank? # => true + # :symbol.blank? # => false + # + # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:128 + def blank?; end + + # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:130 + def present?; end end -# source://activesupport//lib/active_support/core_ext/object/blank.rb#146 +class Thread + # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:9 + def active_support_execution_state; end + + # pkg:gem/activesupport#lib/active_support/isolated_execution_state.rb:9 + def active_support_execution_state=(_arg0); end +end + +# pkg:gem/activesupport#lib/active_support/core_ext/thread/backtrace/location.rb:3 +class Thread::Backtrace::Location + # pkg:gem/activesupport#lib/active_support/core_ext/thread/backtrace/location.rb:5 + def spot(ex); end +end + +# pkg:gem/activesupport#lib/active_support/core_ext/time/conversions.rb:7 class Time include ::Comparable include ::DateAndTime::Zones include ::DateAndTime::Calculations - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#284 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:293 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#307 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:303 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#316 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:333 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 + # pkg:gem/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 @@ -17791,80 +18252,60 @@ class Time # 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#186 + # pkg:gem/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#212 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:213 def ago(seconds); end - # source://activesupport//lib/active_support/core_ext/object/json.rb#187 + # pkg:gem/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#225 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:231 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#254 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:258 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#270 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:274 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#243 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:252 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#260 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:268 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#276 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:283 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#233 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:239 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#233 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:241 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#225 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:230 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#233 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:240 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#225 + # pkg:gem/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#254 + # pkg:gem/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#270 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:271 def beginning_of_minute; end # No Time is blank: @@ -17873,7 +18314,7 @@ class Time # # @return [false] # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#152 + # pkg:gem/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 @@ -17889,129 +18330,136 @@ class Time # 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#138 + # pkg:gem/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#316 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:317 def compare_with_coercion(other); end + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:332 + def compare_without_coercion(_arg0); 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#243 + # pkg:gem/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#260 + # pkg:gem/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#276 + # pkg:gem/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#331 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:343 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#331 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:337 def eql_with_coercion(other); end + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:342 + def eql_without_coercion(_arg0); 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#69 + # pkg:gem/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#217 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:223 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#233 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:237 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#233 + # pkg:gem/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#225 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:229 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#307 + # pkg:gem/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#294 + # pkg:gem/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#294 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:312 def minus_without_coercion(other); end + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:302 + def minus_without_duration(_arg0); end + # Returns a new time the specified number of days in the future. # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#345 + # pkg:gem/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#355 + # pkg:gem/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#365 + # pkg:gem/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#233 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:238 def noon; end - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#284 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:285 def plus_with_duration(other); end + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:292 + def plus_without_duration(_arg0); end + + # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:196 + def present?; end + # Returns a new time the specified number of days ago. # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#340 + # pkg:gem/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#350 + # pkg:gem/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#360 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:366 def prev_year(years = T.unsafe(nil)); end + # Aliased to +xmlschema+ for compatibility with +DateTime+ + # + # pkg:gem/activesupport#lib/active_support/core_ext/time/conversions.rb:72 + def rfc3339(*_arg0); 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 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:107 def sec_fraction; end # Returns the number of seconds since 00:00:00. @@ -18020,7 +18468,7 @@ class Time # 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 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:91 def seconds_since_midnight; end # Returns the number of seconds until 23:59:59. @@ -18029,41 +18477,15 @@ class Time # 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 + # pkg:gem/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#217 + # pkg:gem/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 + # pkg:gem/activesupport#lib/active_support/core_ext/time/conversions.rb:60 def to_formatted_s(format = T.unsafe(nil)); end # Converts to a formatted string. See DATE_FORMATS for built-in formats. @@ -18092,42 +18514,42 @@ class Time # 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 + # pkg:gem/activesupport#lib/active_support/core_ext/time/conversions.rb:53 def to_fs(format = T.unsafe(nil)); 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 + # pkg:gem/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(*args, **kwargs); end + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:60 + 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(*args, **kwargs); end + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:45 + def at_with_coercion(time_or_number, *args, **_arg2); end + + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:59 + def at_without_coercion(time, subsec = T.unsafe(nil), unit = T.unsafe(nil), in: T.unsafe(nil)); 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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. @@ -18137,7 +18559,7 @@ class Time # Time.find_zone "America/New_York" # => # # Time.find_zone "NOT-A-TIMEZONE" # => nil # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#93 + # pkg:gem/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. @@ -18151,7 +18573,7 @@ class Time # 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 + # pkg:gem/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. @@ -18162,9 +18584,7 @@ class Time # # Time.rfc3339('1999-12-31') # => ArgumentError: invalid date # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#69 + # pkg:gem/activesupport#lib/active_support/core_ext/time/calculations.rb:69 def rfc3339(str); end # Allows override of Time.zone locally inside supplied block; @@ -18184,23 +18604,23 @@ class Time # 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 + # pkg:gem/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 + # pkg:gem/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"). + # * 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: @@ -18217,32 +18637,26 @@ class Time # end # end # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#41 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/activesupport#lib/active_support/core_ext/time/conversions.rb:8 Time::DATE_FORMATS = T.let(T.unsafe(nil), Hash) -# source://activesupport//lib/active_support/core_ext/object/blank.rb#72 +# pkg:gem/activesupport#lib/active_support/core_ext/object/to_query.rb:25 class TrueClass - # source://activesupport//lib/active_support/core_ext/object/json.rb#75 + # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:83 def as_json(options = T.unsafe(nil)); end # +true+ is not blank: @@ -18251,33 +18665,20 @@ class TrueClass # # @return [false] # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#78 + # pkg:gem/activesupport#lib/active_support/core_ext/object/blank.rb:86 def blank?; end + # pkg:gem/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 + # pkg:gem/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#216 +# pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:224 class URI::Generic - include ::URI::RFC2396_REGEXP - include ::URI - - # source://activesupport//lib/active_support/core_ext/object/json.rb#217 + # pkg:gem/activesupport#lib/active_support/core_ext/object/json.rb:225 def as_json(options = T.unsafe(nil)); end end - -# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#49 -class UnboundMethod - # Unbound methods are not duplicable: - # - # method(:puts).unbind.duplicable? # => false - # method(:puts).unbind.dup # => TypeError: allocator undefined for UnboundMethod - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#54 - def duplicable?; end -end diff --git a/sorbet/rbi/gems/ast@2.4.2.rbi b/sorbet/rbi/gems/ast@2.4.3.rbi similarity index 86% rename from sorbet/rbi/gems/ast@2.4.2.rbi rename to sorbet/rbi/gems/ast@2.4.3.rbi index 3fc4495da..e946b0083 100644 --- a/sorbet/rbi/gems/ast@2.4.2.rbi +++ b/sorbet/rbi/gems/ast@2.4.3.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `ast` gem. # Please instead update this file by running `bin/tapioca gem ast`. + # {AST} is a library for manipulating abstract syntax trees. # # It embraces immutability; each AST node is inherently frozen at @@ -16,7 +17,7 @@ # See also {AST::Node}, {AST::Processor::Mixin} and {AST::Sexp} for # additional recommendations and design patterns. # -# source://ast//lib/ast.rb#13 +# pkg:gem/ast#lib/ast.rb:13 module AST; end # Node is an immutable class, instances of which represent abstract @@ -55,7 +56,7 @@ module AST; end # temporary node type requires making globally visible changes to # the codebase. # -# source://ast//lib/ast/node.rb#40 +# pkg:gem/ast#lib/ast/node.rb:40 class AST::Node # Constructs a new instance of Node. # @@ -67,23 +68,13 @@ class AST::Node # # The `properties` hash is passed to {#assign_properties}. # - # @return [Node] a new instance of Node - # - # source://ast//lib/ast/node.rb#72 + # pkg:gem/ast#lib/ast/node.rb:72 def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end - # Concatenates `array` with `children` and returns the resulting node. - # - # @return [AST::Node] - # - # source://ast//lib/ast/node.rb#168 + # pkg:gem/ast#lib/ast/node.rb:172 def +(array); end - # Appends `element` to `children` and returns the resulting node. - # - # @return [AST::Node] - # - # source://ast//lib/ast/node.rb#177 + # pkg:gem/ast#lib/ast/node.rb:181 def <<(element); end # Compares `self` to `other`, possibly converting with `to_ast`. Only @@ -91,14 +82,14 @@ class AST::Node # # @return [Boolean] # - # source://ast//lib/ast/node.rb#153 + # pkg:gem/ast#lib/ast/node.rb:153 def ==(other); end # Appends `element` to `children` and returns the resulting node. # # @return [AST::Node] # - # source://ast//lib/ast/node.rb#177 + # pkg:gem/ast#lib/ast/node.rb:177 def append(element); end # Returns the children of this node. @@ -113,23 +104,17 @@ class AST::Node # # @return [Array] # - # source://ast//lib/ast/node.rb#56 + # pkg:gem/ast#lib/ast/node.rb:56 def children; end - # Nodes are already frozen, so there is no harm in returning the - # current node as opposed to initializing from scratch and freezing - # another one. - # - # @return self - # - # source://ast//lib/ast/node.rb#115 + # pkg:gem/ast#lib/ast/node.rb:118 def clone; end # Concatenates `array` with `children` and returns the resulting node. # # @return [AST::Node] # - # source://ast//lib/ast/node.rb#168 + # pkg:gem/ast#lib/ast/node.rb:168 def concat(array); end # Enables matching for Node, where type is the first element @@ -137,7 +122,7 @@ class AST::Node # # @return [Array] # - # source://ast//lib/ast/node.rb#253 + # pkg:gem/ast#lib/ast/node.rb:253 def deconstruct; end # Nodes are already frozen, so there is no harm in returning the @@ -146,67 +131,48 @@ class AST::Node # # @return self # - # source://ast//lib/ast/node.rb#115 + # pkg:gem/ast#lib/ast/node.rb:115 def dup; end # Test if other object is equal to - # - # @param other [Object] + # @param [Object] other # @return [Boolean] # - # source://ast//lib/ast/node.rb#85 + # pkg:gem/ast#lib/ast/node.rb:85 def eql?(other); end # Returns the precomputed hash value for this node + # @return [Integer] # - # @return [Fixnum] - # - # source://ast//lib/ast/node.rb#61 + # pkg:gem/ast#lib/ast/node.rb:61 def hash; end # Converts `self` to a s-expression ruby string. # The code return will recreate the node, using the sexp module s() # - # @param indent [Integer] Base indentation level. + # @param [Integer] indent Base indentation level. # @return [String] # - # source://ast//lib/ast/node.rb#211 + # pkg:gem/ast#lib/ast/node.rb:211 def inspect(indent = T.unsafe(nil)); end - # Returns the children of this node. - # The returned value is frozen. - # The to_a alias is useful for decomposing nodes concisely. - # For example: - # - # node = s(:gasgn, :$foo, s(:integer, 1)) - # var_name, value = *node - # p var_name # => :$foo - # p value # => (integer 1) - # - # @return [Array] - # - # source://ast//lib/ast/node.rb#56 + # pkg:gem/ast#lib/ast/node.rb:57 def to_a; end # @return [AST::Node] self # - # source://ast//lib/ast/node.rb#229 + # pkg:gem/ast#lib/ast/node.rb:229 def to_ast; end - # Converts `self` to a pretty-printed s-expression. - # - # @param indent [Integer] Base indentation level. - # @return [String] - # - # source://ast//lib/ast/node.rb#187 + # pkg:gem/ast#lib/ast/node.rb:204 def to_s(indent = T.unsafe(nil)); end # Converts `self` to a pretty-printed s-expression. # - # @param indent [Integer] Base indentation level. + # @param [Integer] indent Base indentation level. # @return [String] # - # source://ast//lib/ast/node.rb#187 + # pkg:gem/ast#lib/ast/node.rb:187 def to_sexp(indent = T.unsafe(nil)); end # Converts `self` to an Array where the first element is the type as a Symbol, @@ -214,14 +180,13 @@ class AST::Node # # @return [Array] # - # source://ast//lib/ast/node.rb#237 + # pkg:gem/ast#lib/ast/node.rb:237 def to_sexp_array; end # Returns the type of this node. - # # @return [Symbol] # - # source://ast//lib/ast/node.rb#43 + # pkg:gem/ast#lib/ast/node.rb:43 def type; end # Returns a new instance of Node where non-nil arguments replace the @@ -233,12 +198,12 @@ class AST::Node # # If the resulting node would be identical to `self`, does nothing. # - # @param type [Symbol, nil] - # @param children [Array, nil] - # @param properties [Hash, nil] + # @param [Symbol, nil] type + # @param [Array, nil] children + # @param [Hash, nil] properties # @return [AST::Node] # - # source://ast//lib/ast/node.rb#133 + # pkg:gem/ast#lib/ast/node.rb:133 def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end protected @@ -251,7 +216,7 @@ class AST::Node # # @return [nil] # - # source://ast//lib/ast/node.rb#98 + # pkg:gem/ast#lib/ast/node.rb:98 def assign_properties(properties); end # Returns `@type` with all underscores replaced by dashes. This allows @@ -260,11 +225,12 @@ class AST::Node # # @return [String] # - # source://ast//lib/ast/node.rb#264 + # pkg:gem/ast#lib/ast/node.rb:264 def fancy_type; end private + # pkg:gem/ast#lib/ast/node.rb:107 def original_dup; end end @@ -275,7 +241,7 @@ end # # @deprecated Use {AST::Processor::Mixin} instead. # -# source://ast//lib/ast/processor.rb#8 +# pkg:gem/ast#lib/ast/processor.rb:8 class AST::Processor include ::AST::Processor::Mixin end @@ -518,14 +484,14 @@ end # use some partial evaluation before! The possibilites are # endless. Have fun. # -# source://ast//lib/ast/processor/mixin.rb#240 +# pkg:gem/ast#lib/ast/processor/mixin.rb:240 module AST::Processor::Mixin # Default handler. Does nothing. # - # @param node [AST::Node] + # @param [AST::Node] node # @return [AST::Node, nil] # - # source://ast//lib/ast/processor/mixin.rb#284 + # pkg:gem/ast#lib/ast/processor/mixin.rb:284 def handler_missing(node); end # Dispatches `node`. If a node has type `:foo`, then a handler @@ -536,19 +502,19 @@ module AST::Processor::Mixin # If the handler returns `nil`, `node` is returned; otherwise, # the return value of the handler is passed along. # - # @param node [AST::Node, nil] + # @param [AST::Node, nil] node # @return [AST::Node, nil] # - # source://ast//lib/ast/processor/mixin.rb#251 + # pkg:gem/ast#lib/ast/processor/mixin.rb:251 def process(node); end # {#process}es each node from `nodes` and returns an array of # results. # - # @param nodes [Array] + # @param [Array] nodes # @return [Array] # - # source://ast//lib/ast/processor/mixin.rb#274 + # pkg:gem/ast#lib/ast/processor/mixin.rb:274 def process_all(nodes); end end @@ -556,8 +522,8 @@ end # to define deeply nested ASTs from Ruby code, for example, in # tests. It should be used like this: # -# describe YourLanguage::AST do -# include Sexp +# describe YourLanguage do +# include ::AST::Sexp # # it "should correctly parse expressions" do # YourLanguage.parse("1 + 2 * 3").should == @@ -571,7 +537,7 @@ end # # This way the amount of boilerplate code is greatly reduced. # -# source://ast//lib/ast/sexp.rb#20 +# pkg:gem/ast#lib/ast/sexp.rb:20 module AST::Sexp # Creates a {Node} with type `type` and children `children`. # Note that the resulting node is of the type AST::Node and not a @@ -579,6 +545,6 @@ module AST::Sexp # This would not pose a problem with comparisons, as {Node#==} # ignores metadata. # - # source://ast//lib/ast/sexp.rb#26 + # pkg:gem/ast#lib/ast/sexp.rb:26 def s(type, *children); end end diff --git a/sorbet/rbi/gems/base64@0.3.0.rbi b/sorbet/rbi/gems/base64@0.3.0.rbi new file mode 100644 index 000000000..9995f72b3 --- /dev/null +++ b/sorbet/rbi/gems/base64@0.3.0.rbi @@ -0,0 +1,545 @@ +# 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`. + + +# \Module \Base64 provides methods for: +# +# - \Encoding a binary string (containing non-ASCII characters) +# as a string of printable ASCII characters. +# - Decoding such an encoded string. +# +# \Base64 is commonly used in contexts where binary data +# is not allowed or supported: +# +# - Images in HTML or CSS files, or in URLs. +# - Email attachments. +# +# A \Base64-encoded string is about one-third larger that its source. +# See the {Wikipedia article}[https://en.wikipedia.org/wiki/Base64] +# for more information. +# +# This module provides three pairs of encode/decode methods. +# Your choices among these methods should depend on: +# +# - Which character set is to be used for encoding and decoding. +# - Whether "padding" is to be used. +# - Whether encoded strings are to contain newlines. +# +# Note: Examples on this page assume that the including program has executed: +# +# require 'base64' +# +# == \Encoding Character Sets +# +# A \Base64-encoded string consists only of characters from a 64-character set: +# +# - ('A'..'Z'). +# - ('a'..'z'). +# - ('0'..'9'). +# - =, the 'padding' character. +# - Either: +# - %w[+ /]: +# {RFC-2045-compliant}[https://datatracker.ietf.org/doc/html/rfc2045]; +# _not_ safe for URLs. +# - %w[- _]: +# {RFC-4648-compliant}[https://datatracker.ietf.org/doc/html/rfc4648]; +# safe for URLs. +# +# If you are working with \Base64-encoded strings that will come from +# or be put into URLs, you should choose this encoder-decoder pair +# of RFC-4648-compliant methods: +# +# - Base64.urlsafe_encode64 and Base64.urlsafe_decode64. +# +# Otherwise, you may choose any of the pairs in this module, +# including the pair above, or the RFC-2045-compliant pairs: +# +# - Base64.encode64 and Base64.decode64. +# - Base64.strict_encode64 and Base64.strict_decode64. +# +# == Padding +# +# \Base64-encoding changes a triplet of input bytes +# into a quartet of output characters. +# +# Padding in Encode Methods +# +# Padding -- extending an encoded string with zero, one, or two trailing +# = characters -- is performed by methods Base64.encode64, +# Base64.strict_encode64, and, by default, Base64.urlsafe_encode64: +# +# Base64.encode64('s') # => "cw==\n" +# Base64.strict_encode64('s') # => "cw==" +# Base64.urlsafe_encode64('s') # => "cw==" +# Base64.urlsafe_encode64('s', padding: false) # => "cw" +# +# When padding is performed, the encoded string is always of length 4n, +# where +n+ is a non-negative integer: +# +# - Input bytes of length 3n generate unpadded output characters +# of length 4n: +# +# # n = 1: 3 bytes => 4 characters. +# Base64.strict_encode64('123') # => "MDEy" +# # n = 2: 6 bytes => 8 characters. +# Base64.strict_encode64('123456') # => "MDEyMzQ1" +# +# - Input bytes of length 3n+1 generate padded output characters +# of length 4(n+1), with two padding characters at the end: +# +# # n = 1: 4 bytes => 8 characters. +# Base64.strict_encode64('1234') # => "MDEyMw==" +# # n = 2: 7 bytes => 12 characters. +# Base64.strict_encode64('1234567') # => "MDEyMzQ1Ng==" +# +# - Input bytes of length 3n+2 generate padded output characters +# of length 4(n+1), with one padding character at the end: +# +# # n = 1: 5 bytes => 8 characters. +# Base64.strict_encode64('12345') # => "MDEyMzQ=" +# # n = 2: 8 bytes => 12 characters. +# Base64.strict_encode64('12345678') # => "MDEyMzQ1Njc=" +# +# When padding is suppressed, for a positive integer n: +# +# - Input bytes of length 3n generate unpadded output characters +# of length 4n: +# +# # n = 1: 3 bytes => 4 characters. +# Base64.urlsafe_encode64('123', padding: false) # => "MDEy" +# # n = 2: 6 bytes => 8 characters. +# Base64.urlsafe_encode64('123456', padding: false) # => "MDEyMzQ1" +# +# - Input bytes of length 3n+1 generate unpadded output characters +# of length 4n+2, with two padding characters at the end: +# +# # n = 1: 4 bytes => 6 characters. +# Base64.urlsafe_encode64('1234', padding: false) # => "MDEyMw" +# # n = 2: 7 bytes => 10 characters. +# Base64.urlsafe_encode64('1234567', padding: false) # => "MDEyMzQ1Ng" +# +# - Input bytes of length 3n+2 generate unpadded output characters +# of length 4n+3, with one padding character at the end: +# +# # n = 1: 5 bytes => 7 characters. +# Base64.urlsafe_encode64('12345', padding: false) # => "MDEyMzQ" +# # m = 2: 8 bytes => 11 characters. +# Base64.urlsafe_encode64('12345678', padding: false) # => "MDEyMzQ1Njc" +# +# Padding in Decode Methods +# +# All of the \Base64 decode methods support (but do not require) padding. +# +# \Method Base64.decode64 does not check the size of the padding: +# +# Base64.decode64("MDEyMzQ1Njc") # => "01234567" +# Base64.decode64("MDEyMzQ1Njc=") # => "01234567" +# Base64.decode64("MDEyMzQ1Njc==") # => "01234567" +# +# \Method Base64.strict_decode64 strictly enforces padding size: +# +# Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError +# Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" +# Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError +# +# \Method Base64.urlsafe_decode64 allows padding in the encoded string, +# which if present, must be correct: +# see {Padding}[Base64.html#module-Base64-label-Padding], above: +# +# Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" +# Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" +# Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. +# +# == Newlines +# +# An encoded string returned by Base64.encode64 or Base64.urlsafe_encode64 +# has an embedded newline character +# after each 60-character sequence, and, if non-empty, at the end: +# +# # No newline if empty. +# encoded = Base64.encode64("\x00" * 0) +# encoded.index("\n") # => nil +# +# # Newline at end of short output. +# encoded = Base64.encode64("\x00" * 1) +# encoded.size # => 4 +# encoded.index("\n") # => 4 +# +# # Newline at end of longer output. +# encoded = Base64.encode64("\x00" * 45) +# encoded.size # => 60 +# encoded.index("\n") # => 60 +# +# # Newlines embedded and at end of still longer output. +# encoded = Base64.encode64("\x00" * 46) +# encoded.size # => 65 +# encoded.rindex("\n") # => 65 +# encoded.split("\n").map {|s| s.size } # => [60, 4] +# +# The string to be encoded may itself contain newlines, +# which are encoded as \Base64: +# +# # Base64.encode64("\n\n\n") # => "CgoK\n" +# s = "This is line 1\nThis is line 2\n" +# Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" +# +# pkg:gem/base64#lib/base64.rb:184 +module Base64 + private + + # :call-seq: + # Base64.decode(encoded_string) -> decoded_string + # + # Returns a string containing the decoding of an RFC-2045-compliant + # \Base64-encoded string +encoded_string+: + # + # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" + # Base64.decode64(s) # => "This is line 1\nThis is line 2\n" + # + # Non-\Base64 characters in +encoded_string+ are ignored; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # these include newline characters and characters - and /: + # + # Base64.decode64("\x00\n-_") # => "" + # + # Padding in +encoded_string+ (even if incorrect) is ignored: + # + # Base64.decode64("MDEyMzQ1Njc") # => "01234567" + # Base64.decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.decode64("MDEyMzQ1Njc==") # => "01234567" + # + # pkg:gem/base64#lib/base64.rb:247 + def decode64(str); end + + # :call-seq: + # Base64.encode64(string) -> encoded_string + # + # Returns a string containing the RFC-2045-compliant \Base64-encoding of +string+. + # + # Per RFC 2045, the returned string may contain the URL-unsafe characters + # + or /; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.encode64("\xFB\xEF\xBE") # => "++++\n" + # Base64.encode64("\xFF\xFF\xFF") # => "////\n" + # + # The returned string may include padding; + # see {Padding}[Base64.html#module-Base64-label-Padding] above. + # + # Base64.encode64('*') # => "Kg==\n" + # + # The returned string ends with a newline character, and if sufficiently long + # will have one or more embedded newline characters; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.encode64('*') # => "Kg==\n" + # Base64.encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n" + # + # The string to be encoded may itself contain newlines, + # which will be encoded as ordinary \Base64: + # + # Base64.encode64("\n\n\n") # => "CgoK\n" + # s = "This is line 1\nThis is line 2\n" + # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" + # + # pkg:gem/base64#lib/base64.rb:222 + def encode64(bin); end + + # :call-seq: + # Base64.strict_decode64(encoded_string) -> decoded_string + # + # Returns a string containing the decoding of an RFC-2045-compliant + # \Base64-encoded string +encoded_string+: + # + # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" + # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n" + # + # Non-\Base64 characters in +encoded_string+ are not allowed; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # these include newline characters and characters - and /: + # + # Base64.strict_decode64("\n") # Raises ArgumentError + # Base64.strict_decode64('-') # Raises ArgumentError + # Base64.strict_decode64('_') # Raises ArgumentError + # + # Padding in +encoded_string+, if present, must be correct: + # + # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError + # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError + # + # pkg:gem/base64#lib/base64.rb:309 + def strict_decode64(str); end + + # :call-seq: + # Base64.strict_encode64(string) -> encoded_string + # + # Returns a string containing the RFC-2045-compliant \Base64-encoding of +string+. + # + # Per RFC 2045, the returned string may contain the URL-unsafe characters + # + or /; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n" + # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n" + # + # The returned string may include padding; + # see {Padding}[Base64.html#module-Base64-label-Padding] above. + # + # Base64.strict_encode64('*') # => "Kg==\n" + # + # The returned string will have no newline characters, regardless of its length; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.strict_encode64('*') # => "Kg==" + # Base64.strict_encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" + # + # The string to be encoded may itself contain newlines, + # which will be encoded as ordinary \Base64: + # + # Base64.strict_encode64("\n\n\n") # => "CgoK" + # s = "This is line 1\nThis is line 2\n" + # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" + # + # pkg:gem/base64#lib/base64.rb:282 + def strict_encode64(bin); end + + # :call-seq: + # Base64.urlsafe_decode64(encoded_string) -> decoded_string + # + # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +encoded_string+: + # + # +encoded_string+ may not contain non-Base64 characters; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.urlsafe_decode64('+') # Raises ArgumentError. + # Base64.urlsafe_decode64('/') # Raises ArgumentError. + # Base64.urlsafe_decode64("\n") # Raises ArgumentError. + # + # Padding in +encoded_string+, if present, must be correct: + # see {Padding}[Base64.html#module-Base64-label-Padding], above: + # + # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" + # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. + # + # pkg:gem/base64#lib/base64.rb:369 + def urlsafe_decode64(str); end + + # :call-seq: + # Base64.urlsafe_encode64(string) -> encoded_string + # + # Returns the RFC-4648-compliant \Base64-encoding of +string+. + # + # Per RFC 4648, the returned string will not contain the URL-unsafe characters + # + or /, + # but instead may contain the URL-safe characters + # - and _; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----" + # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____" + # + # By default, the returned string may have padding; + # see {Padding}[Base64.html#module-Base64-label-Padding], above: + # + # Base64.urlsafe_encode64('*') # => "Kg==" + # + # Optionally, you can suppress padding: + # + # Base64.urlsafe_encode64('*', padding: false) # => "Kg" + # + # The returned string will have no newline characters, regardless of its length; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.urlsafe_encode64('*') # => "Kg==" + # Base64.urlsafe_encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" + # + # pkg:gem/base64#lib/base64.rb:343 + def urlsafe_encode64(bin, padding: T.unsafe(nil)); end + + class << self + # :call-seq: + # Base64.decode(encoded_string) -> decoded_string + # + # Returns a string containing the decoding of an RFC-2045-compliant + # \Base64-encoded string +encoded_string+: + # + # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" + # Base64.decode64(s) # => "This is line 1\nThis is line 2\n" + # + # Non-\Base64 characters in +encoded_string+ are ignored; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # these include newline characters and characters - and /: + # + # Base64.decode64("\x00\n-_") # => "" + # + # Padding in +encoded_string+ (even if incorrect) is ignored: + # + # Base64.decode64("MDEyMzQ1Njc") # => "01234567" + # Base64.decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.decode64("MDEyMzQ1Njc==") # => "01234567" + # + # pkg:gem/base64#lib/base64.rb:247 + def decode64(str); end + + # :call-seq: + # Base64.encode64(string) -> encoded_string + # + # Returns a string containing the RFC-2045-compliant \Base64-encoding of +string+. + # + # Per RFC 2045, the returned string may contain the URL-unsafe characters + # + or /; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.encode64("\xFB\xEF\xBE") # => "++++\n" + # Base64.encode64("\xFF\xFF\xFF") # => "////\n" + # + # The returned string may include padding; + # see {Padding}[Base64.html#module-Base64-label-Padding] above. + # + # Base64.encode64('*') # => "Kg==\n" + # + # The returned string ends with a newline character, and if sufficiently long + # will have one or more embedded newline characters; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.encode64('*') # => "Kg==\n" + # Base64.encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n" + # + # The string to be encoded may itself contain newlines, + # which will be encoded as ordinary \Base64: + # + # Base64.encode64("\n\n\n") # => "CgoK\n" + # s = "This is line 1\nThis is line 2\n" + # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" + # + # pkg:gem/base64#lib/base64.rb:222 + def encode64(bin); end + + # :call-seq: + # Base64.strict_decode64(encoded_string) -> decoded_string + # + # Returns a string containing the decoding of an RFC-2045-compliant + # \Base64-encoded string +encoded_string+: + # + # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" + # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n" + # + # Non-\Base64 characters in +encoded_string+ are not allowed; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # these include newline characters and characters - and /: + # + # Base64.strict_decode64("\n") # Raises ArgumentError + # Base64.strict_decode64('-') # Raises ArgumentError + # Base64.strict_decode64('_') # Raises ArgumentError + # + # Padding in +encoded_string+, if present, must be correct: + # + # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError + # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError + # + # pkg:gem/base64#lib/base64.rb:309 + def strict_decode64(str); end + + # :call-seq: + # Base64.strict_encode64(string) -> encoded_string + # + # Returns a string containing the RFC-2045-compliant \Base64-encoding of +string+. + # + # Per RFC 2045, the returned string may contain the URL-unsafe characters + # + or /; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n" + # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n" + # + # The returned string may include padding; + # see {Padding}[Base64.html#module-Base64-label-Padding] above. + # + # Base64.strict_encode64('*') # => "Kg==\n" + # + # The returned string will have no newline characters, regardless of its length; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.strict_encode64('*') # => "Kg==" + # Base64.strict_encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" + # + # The string to be encoded may itself contain newlines, + # which will be encoded as ordinary \Base64: + # + # Base64.strict_encode64("\n\n\n") # => "CgoK" + # s = "This is line 1\nThis is line 2\n" + # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" + # + # pkg:gem/base64#lib/base64.rb:282 + def strict_encode64(bin); end + + # :call-seq: + # Base64.urlsafe_decode64(encoded_string) -> decoded_string + # + # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +encoded_string+: + # + # +encoded_string+ may not contain non-Base64 characters; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.urlsafe_decode64('+') # Raises ArgumentError. + # Base64.urlsafe_decode64('/') # Raises ArgumentError. + # Base64.urlsafe_decode64("\n") # Raises ArgumentError. + # + # Padding in +encoded_string+, if present, must be correct: + # see {Padding}[Base64.html#module-Base64-label-Padding], above: + # + # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" + # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. + # + # pkg:gem/base64#lib/base64.rb:369 + def urlsafe_decode64(str); end + + # :call-seq: + # Base64.urlsafe_encode64(string) -> encoded_string + # + # Returns the RFC-4648-compliant \Base64-encoding of +string+. + # + # Per RFC 4648, the returned string will not contain the URL-unsafe characters + # + or /, + # but instead may contain the URL-safe characters + # - and _; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----" + # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____" + # + # By default, the returned string may have padding; + # see {Padding}[Base64.html#module-Base64-label-Padding], above: + # + # Base64.urlsafe_encode64('*') # => "Kg==" + # + # Optionally, you can suppress padding: + # + # Base64.urlsafe_encode64('*', padding: false) # => "Kg" + # + # The returned string will have no newline characters, regardless of its length; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.urlsafe_encode64('*') # => "Kg==" + # Base64.urlsafe_encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" + # + # pkg:gem/base64#lib/base64.rb:343 + def urlsafe_encode64(bin, padding: T.unsafe(nil)); end + end +end + +# pkg:gem/base64#lib/base64.rb:186 +Base64::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/benchmark@0.5.0.rbi b/sorbet/rbi/gems/benchmark@0.5.0.rbi new file mode 100644 index 000000000..1c75f8e13 --- /dev/null +++ b/sorbet/rbi/gems/benchmark@0.5.0.rbi @@ -0,0 +1,621 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `benchmark` gem. +# Please instead update this file by running `bin/tapioca gem benchmark`. + + +# The Benchmark module provides methods to measure and report the time +# used to execute Ruby code. +# +# * Measure the time to construct the string given by the expression +# "a"*1_000_000_000: +# +# require 'benchmark' +# +# puts Benchmark.measure { "a"*1_000_000_000 } +# +# On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates: +# +# 0.350000 0.400000 0.750000 ( 0.835234) +# +# This report shows the user CPU time, system CPU time, the total time +# (sum of user CPU time, system CPU time, children's user CPU time, +# and children's system CPU time), and the elapsed real time. The unit +# of time is seconds. +# +# * Do some experiments sequentially using the #bm method: +# +# require 'benchmark' +# +# n = 5000000 +# Benchmark.bm do |x| +# x.report { for i in 1..n; a = "1"; end } +# x.report { n.times do ; a = "1"; end } +# x.report { 1.upto(n) do ; a = "1"; end } +# end +# +# The result: +# +# user system total real +# 1.010000 0.000000 1.010000 ( 1.014479) +# 1.000000 0.000000 1.000000 ( 0.998261) +# 0.980000 0.000000 0.980000 ( 0.981335) +# +# * Continuing the previous example, put a label in each report: +# +# require 'benchmark' +# +# n = 5000000 +# Benchmark.bm(7) do |x| +# x.report("for:") { for i in 1..n; a = "1"; end } +# x.report("times:") { n.times do ; a = "1"; end } +# x.report("upto:") { 1.upto(n) do ; a = "1"; end } +# end +# +# The result: +# +# user system total real +# for: 1.010000 0.000000 1.010000 ( 1.015688) +# times: 1.000000 0.000000 1.000000 ( 1.003611) +# upto: 1.030000 0.000000 1.030000 ( 1.028098) +# +# * The times for some benchmarks depend on the order in which items +# are run. These differences are due to the cost of memory +# allocation and garbage collection. To avoid these discrepancies, +# the #bmbm method is provided. For example, to compare ways to +# sort an array of floats: +# +# require 'benchmark' +# +# array = (1..1000000).map { rand } +# +# Benchmark.bmbm do |x| +# x.report("sort!") { array.dup.sort! } +# x.report("sort") { array.dup.sort } +# end +# +# The result: +# +# Rehearsal ----------------------------------------- +# sort! 1.490000 0.010000 1.500000 ( 1.490520) +# sort 1.460000 0.000000 1.460000 ( 1.463025) +# -------------------------------- total: 2.960000sec +# +# user system total real +# sort! 1.460000 0.000000 1.460000 ( 1.460465) +# sort 1.450000 0.010000 1.460000 ( 1.448327) +# +# * Report statistics of sequential experiments with unique labels, +# using the #benchmark method: +# +# require 'benchmark' +# include Benchmark # we need the CAPTION and FORMAT constants +# +# n = 5000000 +# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| +# tf = x.report("for:") { for i in 1..n; a = "1"; end } +# tt = x.report("times:") { n.times do ; a = "1"; end } +# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } +# [tf+tt+tu, (tf+tt+tu)/3] +# end +# +# The result: +# +# user system total real +# for: 0.950000 0.000000 0.950000 ( 0.952039) +# times: 0.980000 0.000000 0.980000 ( 0.984938) +# upto: 0.950000 0.000000 0.950000 ( 0.946787) +# >total: 2.880000 0.000000 2.880000 ( 2.883764) +# >avg: 0.960000 0.000000 0.960000 ( 0.961255) +# +# pkg:gem/benchmark#lib/benchmark.rb:123 +module Benchmark + private + + # Invokes the block with a Benchmark::Report object, which + # may be used to collect and report on the results of individual + # benchmark tests. Reserves +label_width+ leading spaces for + # labels on each line. Prints +caption+ at the top of the + # report, and uses +format+ to format each line. + # (Note: +caption+ must contain a terminating newline character, + # see the default Benchmark::Tms::CAPTION for an example.) + # + # Returns an array of Benchmark::Tms objects. + # + # If the block returns an array of + # Benchmark::Tms objects, these will be used to format + # additional lines of output. If +labels+ parameter are + # given, these are used to label these extra lines. + # + # _Note_: Other methods provide a simpler interface to this one, and are + # suitable for nearly all benchmarking requirements. See the examples in + # Benchmark, and the #bm and #bmbm methods. + # + # Example: + # + # require 'benchmark' + # include Benchmark # we need the CAPTION and FORMAT constants + # + # n = 5000000 + # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| + # tf = x.report("for:") { for i in 1..n; a = "1"; end } + # tt = x.report("times:") { n.times do ; a = "1"; end } + # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # [tf+tt+tu, (tf+tt+tu)/3] + # end + # + # Generates: + # + # user system total real + # for: 0.970000 0.000000 0.970000 ( 0.970493) + # times: 0.990000 0.000000 0.990000 ( 0.989542) + # upto: 0.970000 0.000000 0.970000 ( 0.972854) + # >total: 2.930000 0.000000 2.930000 ( 2.932889) + # >avg: 0.976667 0.000000 0.976667 ( 0.977630) + # + # pkg:gem/benchmark#lib/benchmark.rb:171 + def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end + + # A simple interface to the #benchmark method, #bm generates sequential + # reports with labels. +label_width+ and +labels+ parameters have the same + # meaning as for #benchmark. + # + # require 'benchmark' + # + # n = 5000000 + # Benchmark.bm(7) do |x| + # x.report("for:") { for i in 1..n; a = "1"; end } + # x.report("times:") { n.times do ; a = "1"; end } + # x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # end + # + # Generates: + # + # user system total real + # for: 0.960000 0.000000 0.960000 ( 0.957966) + # times: 0.960000 0.000000 0.960000 ( 0.960423) + # upto: 0.950000 0.000000 0.950000 ( 0.954864) + # + # pkg:gem/benchmark#lib/benchmark.rb:216 + def bm(label_width = T.unsafe(nil), *labels, &blk); end + + # Sometimes benchmark results are skewed because code executed + # earlier encounters different garbage collection overheads than + # that run later. #bmbm attempts to minimize this effect by running + # the tests twice, the first time as a rehearsal in order to get the + # runtime environment stable, the second time for + # real. GC.start is executed before the start of each of + # the real timings; the cost of this is not included in the + # timings. In reality, though, there's only so much that #bmbm can + # do, and the results are not guaranteed to be isolated from garbage + # collection and other effects. + # + # Because #bmbm takes two passes through the tests, it can + # calculate the required label width. + # + # require 'benchmark' + # + # array = (1..1000000).map { rand } + # + # Benchmark.bmbm do |x| + # x.report("sort!") { array.dup.sort! } + # x.report("sort") { array.dup.sort } + # end + # + # Generates: + # + # Rehearsal ----------------------------------------- + # sort! 1.440000 0.010000 1.450000 ( 1.446833) + # sort 1.440000 0.000000 1.440000 ( 1.448257) + # -------------------------------- total: 2.890000sec + # + # user system total real + # sort! 1.460000 0.000000 1.460000 ( 1.458065) + # sort 1.450000 0.000000 1.450000 ( 1.455963) + # + # #bmbm yields a Benchmark::Job object and returns an array of + # Benchmark::Tms objects. + # + # pkg:gem/benchmark#lib/benchmark.rb:258 + def bmbm(width = T.unsafe(nil)); end + + # Returns the time used to execute the given block as a + # Benchmark::Tms object. Takes +label+ option. + # + # require 'benchmark' + # + # n = 1000000 + # + # time = Benchmark.measure do + # n.times { a = "1" } + # end + # puts time + # + # Generates: + # + # 0.220000 0.000000 0.220000 ( 0.227313) + # + # pkg:gem/benchmark#lib/benchmark.rb:303 + def measure(label = T.unsafe(nil)); end + + # Returns the elapsed real time used to execute the given block. + # The unit of time is milliseconds. + # + # Benchmark.ms { "a" * 1_000_000_000 } + # #=> 509.8029999935534 + # + # pkg:gem/benchmark#lib/benchmark.rb:335 + def ms; end + + # Returns the elapsed real time used to execute the given block. + # The unit of time is seconds. + # + # Benchmark.realtime { "a" * 1_000_000_000 } + # #=> 0.5098029999935534 + # + # pkg:gem/benchmark#lib/benchmark.rb:322 + def realtime; end + + class << self + # Invokes the block with a Benchmark::Report object, which + # may be used to collect and report on the results of individual + # benchmark tests. Reserves +label_width+ leading spaces for + # labels on each line. Prints +caption+ at the top of the + # report, and uses +format+ to format each line. + # (Note: +caption+ must contain a terminating newline character, + # see the default Benchmark::Tms::CAPTION for an example.) + # + # Returns an array of Benchmark::Tms objects. + # + # If the block returns an array of + # Benchmark::Tms objects, these will be used to format + # additional lines of output. If +labels+ parameter are + # given, these are used to label these extra lines. + # + # _Note_: Other methods provide a simpler interface to this one, and are + # suitable for nearly all benchmarking requirements. See the examples in + # Benchmark, and the #bm and #bmbm methods. + # + # Example: + # + # require 'benchmark' + # include Benchmark # we need the CAPTION and FORMAT constants + # + # n = 5000000 + # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| + # tf = x.report("for:") { for i in 1..n; a = "1"; end } + # tt = x.report("times:") { n.times do ; a = "1"; end } + # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # [tf+tt+tu, (tf+tt+tu)/3] + # end + # + # Generates: + # + # user system total real + # for: 0.970000 0.000000 0.970000 ( 0.970493) + # times: 0.990000 0.000000 0.990000 ( 0.989542) + # upto: 0.970000 0.000000 0.970000 ( 0.972854) + # >total: 2.930000 0.000000 2.930000 ( 2.932889) + # >avg: 0.976667 0.000000 0.976667 ( 0.977630) + # + # pkg:gem/benchmark#lib/benchmark.rb:341 + def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end + + # A simple interface to the #benchmark method, #bm generates sequential + # reports with labels. +label_width+ and +labels+ parameters have the same + # meaning as for #benchmark. + # + # require 'benchmark' + # + # n = 5000000 + # Benchmark.bm(7) do |x| + # x.report("for:") { for i in 1..n; a = "1"; end } + # x.report("times:") { n.times do ; a = "1"; end } + # x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # end + # + # Generates: + # + # user system total real + # for: 0.960000 0.000000 0.960000 ( 0.957966) + # times: 0.960000 0.000000 0.960000 ( 0.960423) + # upto: 0.950000 0.000000 0.950000 ( 0.954864) + # + # pkg:gem/benchmark#lib/benchmark.rb:341 + def bm(label_width = T.unsafe(nil), *labels, &blk); end + + # Sometimes benchmark results are skewed because code executed + # earlier encounters different garbage collection overheads than + # that run later. #bmbm attempts to minimize this effect by running + # the tests twice, the first time as a rehearsal in order to get the + # runtime environment stable, the second time for + # real. GC.start is executed before the start of each of + # the real timings; the cost of this is not included in the + # timings. In reality, though, there's only so much that #bmbm can + # do, and the results are not guaranteed to be isolated from garbage + # collection and other effects. + # + # Because #bmbm takes two passes through the tests, it can + # calculate the required label width. + # + # require 'benchmark' + # + # array = (1..1000000).map { rand } + # + # Benchmark.bmbm do |x| + # x.report("sort!") { array.dup.sort! } + # x.report("sort") { array.dup.sort } + # end + # + # Generates: + # + # Rehearsal ----------------------------------------- + # sort! 1.440000 0.010000 1.450000 ( 1.446833) + # sort 1.440000 0.000000 1.440000 ( 1.448257) + # -------------------------------- total: 2.890000sec + # + # user system total real + # sort! 1.460000 0.000000 1.460000 ( 1.458065) + # sort 1.450000 0.000000 1.450000 ( 1.455963) + # + # #bmbm yields a Benchmark::Job object and returns an array of + # Benchmark::Tms objects. + # + # pkg:gem/benchmark#lib/benchmark.rb:341 + def bmbm(width = T.unsafe(nil)); end + + # Returns the time used to execute the given block as a + # Benchmark::Tms object. Takes +label+ option. + # + # require 'benchmark' + # + # n = 1000000 + # + # time = Benchmark.measure do + # n.times { a = "1" } + # end + # puts time + # + # Generates: + # + # 0.220000 0.000000 0.220000 ( 0.227313) + # + # pkg:gem/benchmark#lib/benchmark.rb:341 + def measure(label = T.unsafe(nil)); end + + # Returns the elapsed real time used to execute the given block. + # The unit of time is milliseconds. + # + # Benchmark.ms { "a" * 1_000_000_000 } + # #=> 509.8029999935534 + # + # pkg:gem/benchmark#lib/benchmark.rb:341 + def ms; end + + # Returns the elapsed real time used to execute the given block. + # The unit of time is seconds. + # + # Benchmark.realtime { "a" * 1_000_000_000 } + # #=> 0.5098029999935534 + # + # pkg:gem/benchmark#lib/benchmark.rb:341 + def realtime; end + end +end + +# A Job is a sequence of labelled blocks to be processed by the +# Benchmark.bmbm method. It is of little direct interest to the user. +# +# pkg:gem/benchmark#lib/benchmark.rb:347 +class Benchmark::Job + # Returns an initialized Job instance. + # Usually, one doesn't call this method directly, as new + # Job objects are created by the #bmbm method. + # +width+ is a initial value for the label offset used in formatting; + # the #bmbm method passes its +width+ argument to this constructor. + # + # pkg:gem/benchmark#lib/benchmark.rb:355 + def initialize(width); end + + # Registers the given label and block pair in the job list. + # + # pkg:gem/benchmark#lib/benchmark.rb:363 + def item(label = T.unsafe(nil), &blk); end + + # An array of 2-element arrays, consisting of label and block pairs. + # + # pkg:gem/benchmark#lib/benchmark.rb:375 + def list; end + + # pkg:gem/benchmark#lib/benchmark.rb:372 + def report(label = T.unsafe(nil), &blk); end + + # Length of the widest label in the #list. + # + # pkg:gem/benchmark#lib/benchmark.rb:378 + def width; end +end + +# This class is used by the Benchmark.benchmark and Benchmark.bm methods. +# It is of little direct interest to the user. +# +# pkg:gem/benchmark#lib/benchmark.rb:385 +class Benchmark::Report + # Returns an initialized Report instance. + # Usually, one doesn't call this method directly, as new + # Report objects are created by the #benchmark and #bm methods. + # +width+ and +format+ are the label offset and + # format string used by Tms#format. + # + # pkg:gem/benchmark#lib/benchmark.rb:393 + def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end + + # An array of Benchmark::Tms objects representing each item. + # + # pkg:gem/benchmark#lib/benchmark.rb:412 + def format; end + + # Prints the +label+ and measured time for the block, + # formatted by +format+. See Tms#format for the + # formatting rules. + # + # pkg:gem/benchmark#lib/benchmark.rb:402 + def item(label = T.unsafe(nil), *format, &blk); end + + # An array of Benchmark::Tms objects representing each item. + # + # pkg:gem/benchmark#lib/benchmark.rb:412 + def list; end + + # pkg:gem/benchmark#lib/benchmark.rb:409 + def report(label = T.unsafe(nil), *format, &blk); end + + # An array of Benchmark::Tms objects representing each item. + # + # pkg:gem/benchmark#lib/benchmark.rb:412 + def width; end +end + +# A data object, representing the times associated with a benchmark +# measurement. +# +# pkg:gem/benchmark#lib/benchmark.rb:421 +class Benchmark::Tms + # Returns an initialized Tms object which has + # +utime+ as the user CPU time, +stime+ as the system CPU time, + # +cutime+ as the children's user CPU time, +cstime+ as the children's + # system CPU time, +real+ as the elapsed real time and +label+ as the label. + # + # pkg:gem/benchmark#lib/benchmark.rb:456 + def initialize(utime = T.unsafe(nil), stime = T.unsafe(nil), cutime = T.unsafe(nil), cstime = T.unsafe(nil), real = T.unsafe(nil), label = T.unsafe(nil)); end + + # Returns a new Tms object obtained by memberwise multiplication + # of the individual times for this Tms object by +x+. + # + # pkg:gem/benchmark#lib/benchmark.rb:504 + def *(x); end + + # Returns a new Tms object obtained by memberwise summation + # of the individual times for this Tms object with those of the +other+ + # Tms object. + # This method and #/() are useful for taking statistics. + # + # pkg:gem/benchmark#lib/benchmark.rb:491 + def +(other); end + + # Returns a new Tms object obtained by memberwise subtraction + # of the individual times for the +other+ Tms object from those of this + # Tms object. + # + # pkg:gem/benchmark#lib/benchmark.rb:498 + def -(other); end + + # Returns a new Tms object obtained by memberwise division + # of the individual times for this Tms object by +x+. + # This method and #+() are useful for taking statistics. + # + # pkg:gem/benchmark#lib/benchmark.rb:511 + def /(x); end + + # Returns a new Tms object whose times are the sum of the times for this + # Tms object, plus the time required to execute the code block (+blk+). + # + # pkg:gem/benchmark#lib/benchmark.rb:465 + def add(&blk); end + + # An in-place version of #add. + # Changes the times of this Tms object by making it the sum of the times + # for this Tms object, plus the time required to execute + # the code block (+blk+). + # + # pkg:gem/benchmark#lib/benchmark.rb:475 + def add!(&blk); end + + # System CPU time of children + # + # pkg:gem/benchmark#lib/benchmark.rb:439 + def cstime; end + + # User CPU time of children + # + # pkg:gem/benchmark#lib/benchmark.rb:436 + def cutime; end + + # Returns the contents of this Tms object as + # a formatted string, according to a +format+ string + # like that passed to Kernel.format. In addition, #format + # accepts the following extensions: + # + # %u:: Replaced by the user CPU time, as reported by Tms#utime. + # %y:: Replaced by the system CPU time, as reported by Tms#stime (Mnemonic: y of "s*y*stem") + # %U:: Replaced by the children's user CPU time, as reported by Tms#cutime + # %Y:: Replaced by the children's system CPU time, as reported by Tms#cstime + # %t:: Replaced by the total CPU time, as reported by Tms#total + # %r:: Replaced by the elapsed real time, as reported by Tms#real + # %n:: Replaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame") + # + # If +format+ is not given, FORMAT is used as default value, detailing the + # user, system, total and real elapsed time. + # + # pkg:gem/benchmark#lib/benchmark.rb:530 + def format(format = T.unsafe(nil), *args); end + + # Label + # + # pkg:gem/benchmark#lib/benchmark.rb:448 + def label; end + + # Elapsed real time + # + # pkg:gem/benchmark#lib/benchmark.rb:442 + def real; end + + # System CPU time + # + # pkg:gem/benchmark#lib/benchmark.rb:433 + def stime; end + + # Returns a new 6-element array, consisting of the + # label, user CPU time, system CPU time, children's + # user CPU time, children's system CPU time and elapsed + # real time. + # + # pkg:gem/benchmark#lib/benchmark.rb:555 + def to_a; end + + # Returns a hash containing the same data as `to_a`. + # + # pkg:gem/benchmark#lib/benchmark.rb:562 + def to_h; end + + # Same as #format. + # + # pkg:gem/benchmark#lib/benchmark.rb:545 + def to_s; end + + # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+ + # + # pkg:gem/benchmark#lib/benchmark.rb:445 + def total; end + + # User CPU time + # + # pkg:gem/benchmark#lib/benchmark.rb:430 + def utime; end + + protected + + # Returns a new Tms object obtained by memberwise operation +op+ + # of the individual times for this Tms object with those of the other + # Tms object (+x+). + # + # +op+ can be a mathematical operation such as +, -, + # *, / + # + # pkg:gem/benchmark#lib/benchmark.rb:583 + def memberwise(op, x); end +end + +# pkg:gem/benchmark#lib/benchmark.rb:125 +Benchmark::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/better_html@2.1.1.rbi b/sorbet/rbi/gems/better_html@2.1.1.rbi deleted file mode 100644 index 984d10b84..000000000 --- a/sorbet/rbi/gems/better_html@2.1.1.rbi +++ /dev/null @@ -1,529 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `better_html` gem. -# Please instead update this file by running `bin/tapioca gem better_html`. - -# source://better_html//lib/better_html.rb#7 -module BetterHtml - class << self - # source://better_html//lib/better_html.rb#11 - def config; end - - # Sets the attribute config - # - # @param value the value to set the attribute config to. - # - # source://better_html//lib/better_html.rb#9 - def config=(_arg0); end - - # @yield [config] - # - # source://better_html//lib/better_html.rb#15 - def configure; end - end -end - -# source://better_html//lib/better_html/ast/iterator.rb#7 -module BetterHtml::AST; end - -# source://better_html//lib/better_html/ast/iterator.rb#8 -class BetterHtml::AST::Iterator - # @return [Iterator] a new instance of Iterator - # - # source://better_html//lib/better_html/ast/iterator.rb#18 - def initialize(types, &block); end - - # source://better_html//lib/better_html/ast/iterator.rb#23 - def traverse(node); end - - # source://better_html//lib/better_html/ast/iterator.rb#30 - def traverse_all(nodes); end - - class << self - # source://better_html//lib/better_html/ast/iterator.rb#10 - def descendants(root_node, type); end - end -end - -# source://better_html//lib/better_html/ast/node.rb#8 -class BetterHtml::AST::Node < ::AST::Node - # source://better_html//lib/better_html/ast/node.rb#11 - def descendants(*types); end - - # Returns the value of attribute loc. - # - # source://better_html//lib/better_html/ast/node.rb#9 - def loc; end - - # source://better_html//lib/better_html/ast/node.rb#15 - def location; end -end - -# source://better_html//lib/better_html/config.rb#6 -class BetterHtml::Config - include ::SmartProperties - extend ::SmartProperties::ClassMethods - - # @return [Boolean] - # - # source://better_html//lib/better_html/config.rb#20 - def javascript_attribute_name?(name); end - - # @return [Boolean] - # - # source://better_html//lib/better_html/config.rb#28 - def javascript_safe_method?(name); end - - # @return [Boolean] - # - # source://better_html//lib/better_html/config.rb#24 - def lodash_safe_javascript_expression?(code); end -end - -# source://better_html//lib/better_html/errors.rb#8 -class BetterHtml::DontInterpolateHere < ::BetterHtml::InterpolatorError; end - -# source://better_html//lib/better_html/errors.rb#12 -class BetterHtml::Errors < ::Array - def add(_arg0); end -end - -# source://better_html//lib/better_html/helpers.rb#4 -module BetterHtml::Helpers - # source://better_html//lib/better_html/helpers.rb#5 - def html_attributes(args); end -end - -# source://better_html//lib/better_html/html_attributes.rb#4 -class BetterHtml::HtmlAttributes - # @return [HtmlAttributes] a new instance of HtmlAttributes - # - # source://better_html//lib/better_html/html_attributes.rb#5 - def initialize(data); end - - # source://better_html//lib/better_html/html_attributes.rb#9 - def to_s; end -end - -# source://better_html//lib/better_html/errors.rb#10 -class BetterHtml::HtmlError < ::RuntimeError; end - -# source://better_html//lib/better_html/errors.rb#7 -class BetterHtml::InterpolatorError < ::RuntimeError; end - -# source://better_html//lib/better_html/parser.rb#13 -class BetterHtml::Parser - # @raise [ArgumentError] - # @return [Parser] a new instance of Parser - # - # source://better_html//lib/better_html/parser.rb#26 - def initialize(buffer, template_language: T.unsafe(nil)); end - - # source://better_html//lib/better_html/parser.rb#48 - def ast; end - - # source://better_html//lib/better_html/parser.rb#61 - def inspect; end - - # source://better_html//lib/better_html/parser.rb#43 - def nodes_with_type(*type); end - - # source://better_html//lib/better_html/parser.rb#52 - def parser_errors; end - - # Returns the value of attribute template_language. - # - # source://better_html//lib/better_html/parser.rb#14 - def template_language; end - - private - - # source://better_html//lib/better_html/parser.rb#180 - def build_attribute_name_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#170 - def build_attribute_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#185 - def build_attribute_value_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#115 - def build_cdata_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#120 - def build_comment_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#69 - def build_document_node; end - - # source://better_html//lib/better_html/parser.rb#91 - def build_erb_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#249 - def build_interpolation_node(tokens); end - - # @raise [ArgumentError] - # - # source://better_html//lib/better_html/parser.rb#210 - def build_location(enumerable); end - - # source://better_html//lib/better_html/parser.rb#104 - def build_lodash_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#165 - def build_nameless_attribute_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#202 - def build_node(type, tokens, pre: T.unsafe(nil), post: T.unsafe(nil)); end - - # source://better_html//lib/better_html/parser.rb#145 - def build_tag_attributes_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#140 - def build_tag_name_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#125 - def build_tag_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#197 - def build_text_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#217 - def empty_location; end - - # source://better_html//lib/better_html/parser.rb#221 - def shift_all(tokens, *types); end - - # source://better_html//lib/better_html/parser.rb#259 - def shift_all_with_interpolation(tokens, *types); end - - # source://better_html//lib/better_html/parser.rb#284 - def shift_between(tokens, start_type, end_type); end - - # source://better_html//lib/better_html/parser.rb#292 - def shift_between_with_interpolation(tokens, start_type, end_type); end - - # source://better_html//lib/better_html/parser.rb#233 - def shift_single(tokens, *types); end - - # source://better_html//lib/better_html/parser.rb#237 - def shift_until(tokens, *types); end - - # source://better_html//lib/better_html/parser.rb#272 - def shift_until_with_interpolation(tokens, *types); end - - # source://better_html//lib/better_html/parser.rb#300 - def wrap_token(object); end - - # source://better_html//lib/better_html/parser.rb#322 - def wrap_tokens(enumerable); end -end - -# source://better_html//lib/better_html/parser.rb#16 -class BetterHtml::Parser::Error < ::BetterHtml::HtmlError - # @return [Error] a new instance of Error - # - # source://better_html//lib/better_html/parser.rb#20 - def initialize(message, location:); end - - # Returns the value of attribute location. - # - # source://better_html//lib/better_html/parser.rb#17 - def loc; end - - # Returns the value of attribute location. - # - # source://better_html//lib/better_html/parser.rb#17 - def location; end -end - -# source://better_html//lib/better_html/parser.rb#67 -BetterHtml::Parser::INTERPOLATION_TYPES = T.let(T.unsafe(nil), Array) - -# source://better_html//lib/better_html/errors.rb#16 -class BetterHtml::ParserError < ::RuntimeError - # @return [ParserError] a new instance of ParserError - # - # source://better_html//lib/better_html/errors.rb#19 - def initialize(message, position, line, column); end - - # Returns the value of attribute column. - # - # source://better_html//lib/better_html/errors.rb#17 - def column; end - - # Returns the value of attribute line. - # - # source://better_html//lib/better_html/errors.rb#17 - def line; end - - # Returns the value of attribute position. - # - # source://better_html//lib/better_html/errors.rb#17 - def position; end -end - -# source://better_html//lib/better_html/tokenizer/token.rb#4 -module BetterHtml::Tokenizer; end - -# source://better_html//lib/better_html/tokenizer/base_erb.rb#10 -class BetterHtml::Tokenizer::BaseErb < ::Erubi::Engine - # @raise [ArgumentError] - # @return [BaseErb] a new instance of BaseErb - # - # source://better_html//lib/better_html/tokenizer/base_erb.rb#18 - def initialize(buffer); end - - # Returns the value of attribute current_position. - # - # source://better_html//lib/better_html/tokenizer/base_erb.rb#16 - def current_position; end - - # Returns the value of attribute tokens. - # - # source://better_html//lib/better_html/tokenizer/base_erb.rb#15 - def tokens; end - - private - - # source://better_html//lib/better_html/tokenizer/base_erb.rb#34 - def add_code(code); end - - # source://better_html//lib/better_html/tokenizer/base_erb.rb#53 - def add_erb_tokens(ltrim, indicator, code, rtrim); end - - # source://better_html//lib/better_html/tokenizer/base_erb.rb#47 - def add_expression(indicator, code); end - - # source://better_html//lib/better_html/tokenizer/base_erb.rb#80 - def add_token(type, begin_pos, end_pos); end - - # source://better_html//lib/better_html/tokenizer/base_erb.rb#30 - def append(text); end -end - -# source://better_html//lib/better_html/tokenizer/base_erb.rb#13 -BetterHtml::Tokenizer::BaseErb::EXPR_TRIM_MATCHER = T.let(T.unsafe(nil), Regexp) - -# source://better_html//lib/better_html/tokenizer/base_erb.rb#11 -BetterHtml::Tokenizer::BaseErb::REGEXP_WITHOUT_TRIM = T.let(T.unsafe(nil), Regexp) - -# source://better_html//lib/better_html/tokenizer/base_erb.rb#12 -BetterHtml::Tokenizer::BaseErb::STMT_TRIM_MATCHER = T.let(T.unsafe(nil), Regexp) - -# source://better_html//lib/better_html/tokenizer/html_erb.rb#7 -class BetterHtml::Tokenizer::HtmlErb < ::BetterHtml::Tokenizer::BaseErb - # @return [HtmlErb] a new instance of HtmlErb - # - # source://better_html//lib/better_html/tokenizer/html_erb.rb#10 - def initialize(buffer); end - - # source://better_html//lib/better_html/tokenizer/html_erb.rb#15 - def current_position; end - - # Returns the value of attribute parser. - # - # source://better_html//lib/better_html/tokenizer/html_erb.rb#8 - def parser; end - - private - - # source://better_html//lib/better_html/tokenizer/html_erb.rb#25 - def add_text(text); end - - # source://better_html//lib/better_html/tokenizer/html_erb.rb#21 - def append(text); end -end - -# source://better_html//lib/better_html/tokenizer/html_lodash.rb#9 -class BetterHtml::Tokenizer::HtmlLodash - # @return [HtmlLodash] a new instance of HtmlLodash - # - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#18 - def initialize(buffer); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_escape; end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_escape=(val); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_evaluate; end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_evaluate=(val); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_interpolate; end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_interpolate=(val); end - - # Returns the value of attribute parser. - # - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#11 - def parser; end - - # Returns the value of attribute tokens. - # - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#10 - def tokens; end - - private - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#79 - def add_lodash_tokens(indicator, code); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#73 - def add_text(text); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#96 - def add_token(type, begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#28 - def scan!; end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#62 - def scan_pattern; end - - class << self - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_escape; end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_escape=(val); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_evaluate; end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_evaluate=(val); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_interpolate; end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_interpolate=(val); end - end -end - -# source://better_html//lib/better_html/tokenizer/javascript_erb.rb#7 -class BetterHtml::Tokenizer::JavascriptErb < ::BetterHtml::Tokenizer::BaseErb - private - - # source://better_html//lib/better_html/tokenizer/javascript_erb.rb#10 - def add_text(text); end -end - -# source://better_html//lib/better_html/tokenizer/location.rb#8 -class BetterHtml::Tokenizer::Location < ::Parser::Source::Range - # @raise [ArgumentError] - # @return [Location] a new instance of Location - # - # source://better_html//lib/better_html/tokenizer/location.rb#9 - def initialize(buffer, begin_pos, end_pos); end - - # source://better_html//lib/better_html/tokenizer/location.rb#50 - def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end - - # source://better_html//lib/better_html/tokenizer/location.rb#62 - def begin; end - - # source://better_html//lib/better_html/tokenizer/location.rb#66 - def end; end - - # source://better_html//lib/better_html/tokenizer/location.rb#30 - def line_range; end - - # source://better_html//lib/better_html/tokenizer/location.rb#39 - def line_source_with_underline; end - - # source://better_html//lib/better_html/tokenizer/location.rb#58 - def offset(offset); end - - # source://better_html//lib/better_html/tokenizer/location.rb#26 - def range; end - - # source://better_html//lib/better_html/tokenizer/location.rb#54 - def resize(new_size); end - - # source://parser/3.3.3.0/lib/parser/source/range.rb#92 - def start_column; end - - # source://parser/3.3.3.0/lib/parser/source/range.rb#83 - def start_line; end - - # source://parser/3.3.3.0/lib/parser/source/range.rb#106 - def stop_column; end - - # source://parser/3.3.3.0/lib/parser/source/range.rb#99 - def stop_line; end - - # source://better_html//lib/better_html/tokenizer/location.rb#46 - def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end -end - -# source://better_html//lib/better_html/tokenizer/token.rb#5 -class BetterHtml::Tokenizer::Token - # @return [Token] a new instance of Token - # - # source://better_html//lib/better_html/tokenizer/token.rb#8 - def initialize(type:, loc:); end - - # source://better_html//lib/better_html/tokenizer/token.rb#13 - def inspect; end - - # Returns the value of attribute loc. - # - # source://better_html//lib/better_html/tokenizer/token.rb#6 - def loc; end - - # Returns the value of attribute type. - # - # source://better_html//lib/better_html/tokenizer/token.rb#6 - def type; end -end - -# source://better_html//lib/better_html/tokenizer/token_array.rb#5 -class BetterHtml::Tokenizer::TokenArray - # @return [TokenArray] a new instance of TokenArray - # - # source://better_html//lib/better_html/tokenizer/token_array.rb#6 - def initialize(list); end - - # @return [Boolean] - # - # source://better_html//lib/better_html/tokenizer/token_array.rb#37 - def any?; end - - # source://better_html//lib/better_html/tokenizer/token_array.rb#41 - def current; end - - # @return [Boolean] - # - # source://better_html//lib/better_html/tokenizer/token_array.rb#33 - def empty?; end - - # source://better_html//lib/better_html/tokenizer/token_array.rb#45 - def last; end - - # source://better_html//lib/better_html/tokenizer/token_array.rb#20 - def pop; end - - # source://better_html//lib/better_html/tokenizer/token_array.rb#12 - def shift; end - - # source://better_html//lib/better_html/tokenizer/token_array.rb#49 - def size; end - - # source://better_html//lib/better_html/tokenizer/token_array.rb#28 - def trim(type); end -end - -# source://better_html//lib/better_html/errors.rb#9 -class BetterHtml::UnsafeHtmlError < ::BetterHtml::InterpolatorError; end - -# source://better_html//lib/better_html/version.rb#4 -BetterHtml::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/bigdecimal@4.1.2.rbi b/sorbet/rbi/gems/bigdecimal@4.1.2.rbi new file mode 100644 index 000000000..f4111c55a --- /dev/null +++ b/sorbet/rbi/gems/bigdecimal@4.1.2.rbi @@ -0,0 +1,478 @@ +# typed: false + +# 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`. + + +# pkg:gem/bigdecimal#lib/bigdecimal.rb:10 +class BigDecimal < ::Numeric + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def %(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def *(_arg0); end + + # call-seq: + # self ** other -> bigdecimal + # + # Returns the \BigDecimal value of +self+ raised to power +other+: + # + # b = BigDecimal('3.14') + # b ** 2 # => 0.98596e1 + # b ** 2.0 # => 0.98596e1 + # b ** Rational(2, 1) # => 0.98596e1 + # + # Related: BigDecimal#power. + # + # pkg:gem/bigdecimal#lib/bigdecimal.rb:127 + def **(y); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def +(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def +@; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def -(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def -@; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def /(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def <(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def <=(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def <=>(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def ==(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def ===(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def >(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def >=(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def _decimal_shift(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def _dump(*_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def abs; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def add(_arg0, _arg1); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def ceil(*_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def clone; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def coerce(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def div(*_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def divmod(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def dup; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def eql?(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def exponent; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def finite?; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def fix; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def floor(*_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def frac; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def hash; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def infinite?; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def inspect; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def modulo(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def mult(_arg0, _arg1); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def n_significant_digits; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def nan?; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def nonzero?; end + + # call-seq: + # power(n) + # power(n, prec) + # + # Returns the value raised to the power of n. + # + # Also available as the operator **. + # + # pkg:gem/bigdecimal#lib/bigdecimal.rb:147 + def power(y, prec = T.unsafe(nil)); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def precision; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def precision_scale; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def quo(*_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def remainder(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def round(*_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def scale; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def sign; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def split; end + + # Returns the square root of the value. + # + # Result has at least prec significant digits. + # + # pkg:gem/bigdecimal#lib/bigdecimal.rb:262 + def sqrt(prec); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def sub(_arg0, _arg1); end + + # call-seq: + # a.to_d -> bigdecimal + # + # Returns self. + # + # require 'bigdecimal/util' + # + # d = BigDecimal("3.14") + # d.to_d # => 0.314e1 + # + # pkg:gem/bigdecimal#lib/bigdecimal/util.rb:110 + def to_d; end + + # call-seq: + # a.to_digits -> string + # + # Converts a BigDecimal to a String of the form "nnnnnn.mmm". + # This method is deprecated; use BigDecimal#to_s("F") instead. + # + # require 'bigdecimal/util' + # + # d = BigDecimal("3.14") + # d.to_digits # => "3.14" + # + # pkg:gem/bigdecimal#lib/bigdecimal/util.rb:90 + def to_digits; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def to_f; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def to_i; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def to_int; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def to_r; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def to_s(format = T.unsafe(nil)); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def truncate(*_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def zero?; end + + class << self + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def _load(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def double_fig; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def interpret_loosely(_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def limit(*_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def mode(*_arg0); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def save_exception_mode; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def save_limit; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 + def save_rounding_mode; end + end +end + +# pkg:gem/bigdecimal#lib/bigdecimal.rb:14 +module BigDecimal::Internal + class << self + # Coerce x to BigDecimal with the specified precision. + # TODO: some methods (example: BigMath.exp) require more precision than specified to coerce. + # + # pkg:gem/bigdecimal#lib/bigdecimal.rb:21 + def coerce_to_bigdecimal(x, prec, method_name); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:33 + def coerce_validate_prec(prec, method_name, accept_zero: T.unsafe(nil)); end + + # Calculates Math.log(x.to_f) considering large or small exponent + # + # pkg:gem/bigdecimal#lib/bigdecimal.rb:87 + def float_log(x); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:53 + def infinity_computation_result; end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:67 + def nan_computation_result; end + + # Iteration for Newton's method with increasing precision + # + # pkg:gem/bigdecimal#lib/bigdecimal.rb:75 + def newton_loop(prec, initial_precision: T.unsafe(nil), safe_margin: T.unsafe(nil)); end + + # Calculating Taylor series sum using binary splitting method + # Calculates f(x) = (x/d0)*(1+(x/d1)*(1+(x/d2)*(1+(x/d3)*(1+...)))) + # x.n_significant_digits or ds.size must be small to be performant. + # + # pkg:gem/bigdecimal#lib/bigdecimal.rb:94 + def taylor_sum_binary_splitting(x, ds, prec); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:60 + def underflow_computation_result; end + end +end + +# Default extra precision for intermediate calculations +# This value is currently the same as BigDecimal.double_fig, but defined separately for future changes. +# +# pkg:gem/bigdecimal#lib/bigdecimal.rb:17 +BigDecimal::Internal::EXTRA_PREC = T.let(T.unsafe(nil), Integer) + +BigDecimal::VERSION = T.let(T.unsafe(nil), String) + +# Core BigMath methods for BigDecimal (log, exp) are defined here. +# Other methods (sin, cos, atan) are defined in 'bigdecimal/math.rb'. +# +# -- +# Contents: +# sqrt(x, prec) +# cbrt(x, prec) +# hypot(x, y, prec) +# sin (x, prec) +# cos (x, prec) +# tan (x, prec) +# asin(x, prec) +# acos(x, prec) +# atan(x, prec) +# atan2(y, x, prec) +# sinh (x, prec) +# cosh (x, prec) +# tanh (x, prec) +# asinh(x, prec) +# acosh(x, prec) +# atanh(x, prec) +# log2 (x, prec) +# log10(x, prec) +# log1p(x, prec) +# expm1(x, prec) +# erf (x, prec) +# erfc(x, prec) +# gamma(x, prec) +# lgamma(x, prec) +# frexp(x) +# ldexp(x, exponent) +# PI (prec) +# E (prec) == exp(1.0,prec) +# +# where: +# x, y ... BigDecimal number to be computed. +# prec ... Number of digits to be obtained. +# ++ +# +# Provides mathematical functions. +# +# Example: +# +# require "bigdecimal/math" +# +# include BigMath +# +# a = BigDecimal((PI(49)/2).to_s) +# puts sin(a,100) # => 0.9999999999...9999999986e0 +# +# pkg:gem/bigdecimal#lib/bigdecimal.rb:288 +module BigMath + private + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:336 + def _exp_binary_splitting(x, prec); end + + # call-seq: + # BigMath.exp(decimal, numeric) -> BigDecimal + # + # Computes the value of e (the base of natural logarithms) raised to the + # power of +decimal+, to the specified number of digits of precision. + # + # If +decimal+ is infinity, returns Infinity. + # + # If +decimal+ is NaN, returns NaN. + # + # pkg:gem/bigdecimal#lib/bigdecimal.rb:356 + def exp(x, prec); end + + # call-seq: + # BigMath.log(decimal, numeric) -> BigDecimal + # + # Computes the natural logarithm of +decimal+ to the specified number of + # digits of precision, +numeric+. + # + # If +decimal+ is zero or negative, raises Math::DomainError. + # + # If +decimal+ is positive infinity, returns Infinity. + # + # If +decimal+ is NaN, returns NaN. + # + # pkg:gem/bigdecimal#lib/bigdecimal.rb:303 + def log(x, prec); end + + class << self + # call-seq: + # BigMath.exp(decimal, numeric) -> BigDecimal + # + # Computes the value of e (the base of natural logarithms) raised to the + # power of +decimal+, to the specified number of digits of precision. + # + # If +decimal+ is infinity, returns Infinity. + # + # If +decimal+ is NaN, returns NaN. + # + # pkg:gem/bigdecimal#lib/bigdecimal.rb:356 + def exp(x, prec); end + + # call-seq: + # BigMath.log(decimal, numeric) -> BigDecimal + # + # Computes the natural logarithm of +decimal+ to the specified number of + # digits of precision, +numeric+. + # + # If +decimal+ is zero or negative, raises Math::DomainError. + # + # If +decimal+ is positive infinity, returns Infinity. + # + # If +decimal+ is NaN, returns NaN. + # + # pkg:gem/bigdecimal#lib/bigdecimal.rb:303 + def log(x, prec); end + + private + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:336 + def _exp_binary_splitting(x, prec); end + end +end + +# pkg:gem/bigdecimal#lib/bigdecimal/util.rb:141 +class Complex < ::Numeric + # call-seq: + # cmp.to_d -> bigdecimal + # cmp.to_d(precision) -> bigdecimal + # + # Returns the value as a BigDecimal. + # If the imaginary part is not +0+, an error is raised + # + # The +precision+ parameter is used to determine the number of + # significant digits for the result. When +precision+ is set to +0+, + # the number of digits to represent the float being converted is determined + # automatically. + # The default +precision+ is +0+. + # + # require 'bigdecimal' + # require 'bigdecimal/util' + # + # Complex(0.1234567, 0).to_d(4) # => 0.1235e0 + # Complex(Rational(22, 7), 0).to_d(3) # => 0.314e1 + # Complex(1, 1).to_d # raises ArgumentError + # + # See also Kernel.BigDecimal. + # + # pkg:gem/bigdecimal#lib/bigdecimal/util.rb:164 + def to_d(precision = T.unsafe(nil)); end +end + +# pkg:gem/bigdecimal#lib/bigdecimal/util.rb:116 +class Rational < ::Numeric + # call-seq: + # rat.to_d(precision) -> bigdecimal + # + # Returns the value as a BigDecimal. + # + # The +precision+ parameter is used to determine the number of + # significant digits for the result. When +precision+ is set to +0+, + # the number of digits to represent the float being converted is determined + # automatically. + # The default +precision+ is +0+. + # + # require 'bigdecimal' + # require 'bigdecimal/util' + # + # Rational(22, 7).to_d(3) # => 0.314e1 + # + # See also Kernel.BigDecimal. + # + # pkg:gem/bigdecimal#lib/bigdecimal/util.rb:135 + def to_d(precision = T.unsafe(nil)); end +end diff --git a/sorbet/rbi/gems/builder@3.3.0.rbi b/sorbet/rbi/gems/builder@3.3.0.rbi index 344a340cc..177ba9aeb 100644 --- a/sorbet/rbi/gems/builder@3.3.0.rbi +++ b/sorbet/rbi/gems/builder@3.3.0.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `builder` gem. # Please instead update this file by running `bin/tapioca gem builder`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/byebug@11.1.3.rbi b/sorbet/rbi/gems/byebug@11.1.3.rbi index f61e06845..3933c39f1 100644 --- a/sorbet/rbi/gems/byebug@11.1.3.rbi +++ b/sorbet/rbi/gems/byebug@11.1.3.rbi @@ -4,17 +4,30 @@ # This is an autogenerated file for types exported from the `byebug` gem. # Please instead update this file by running `bin/tapioca gem byebug`. + +# Main Container for all of Byebug's code +# +# +# Main debugger's container module. Everything is defined under this module +# +# +# Namespace for all of byebug's code +# +# +# Remote debugging functionality. +# +# # Reopen main module to define the library version # -# source://byebug//lib/byebug/attacher.rb#6 +# pkg:gem/byebug#lib/byebug/attacher.rb:6 module Byebug class << self # Starts byebug, and stops at the first line of user's code. # - # source://byebug//lib/byebug/attacher.rb#10 + # pkg:gem/byebug#lib/byebug/attacher.rb:10 def attach; end - # source://byebug//lib/byebug/attacher.rb#21 + # pkg:gem/byebug#lib/byebug/attacher.rb:21 def spawn(host = T.unsafe(nil), port = T.unsafe(nil)); end end end @@ -23,14 +36,14 @@ end # # Dropping a `byebug` call anywhere in your code, you get a debug prompt. # -# source://byebug//lib/byebug/attacher.rb#34 +# pkg:gem/byebug#lib/byebug/attacher.rb:34 module Kernel - # source://byebug//lib/byebug/attacher.rb#35 + # pkg:gem/byebug#lib/byebug/attacher.rb:35 def byebug; end - # source://byebug//lib/byebug/attacher.rb#35 + # pkg:gem/byebug#lib/byebug/attacher.rb:47 def debugger; end - # source://byebug//lib/byebug/attacher.rb#41 + # pkg:gem/byebug#lib/byebug/attacher.rb:41 def remote_byebug(host = T.unsafe(nil), port = T.unsafe(nil)); end end diff --git a/sorbet/rbi/gems/cgi@0.5.1.rbi b/sorbet/rbi/gems/cgi@0.5.1.rbi new file mode 100644 index 000000000..86a5960ca --- /dev/null +++ b/sorbet/rbi/gems/cgi@0.5.1.rbi @@ -0,0 +1,2958 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `cgi` gem. +# Please instead update this file by running `bin/tapioca gem cgi`. + + +# == Overview +# +# The Common Gateway Interface (CGI) is a simple protocol for passing an HTTP +# request from a web server to a standalone program, and returning the output +# to the web browser. Basically, a CGI program is called with the parameters +# of the request passed in either in the environment (GET) or via $stdin +# (POST), and everything it prints to $stdout is returned to the client. +# +# This file holds the CGI class. This class provides functionality for +# retrieving HTTP request parameters, managing cookies, and generating HTML +# output. +# +# The file CGI::Session provides session management functionality; see that +# class for more details. +# +# See http://www.w3.org/CGI/ for more information on the CGI protocol. +# +# == Introduction +# +# CGI is a large class, providing several categories of methods, many of which +# are mixed in from other modules. Some of the documentation is in this class, +# some in the modules CGI::QueryExtension and CGI::HtmlExtension. See +# CGI::Cookie for specific information on handling cookies, and cgi/session.rb +# (CGI::Session) for information on sessions. +# +# For queries, CGI provides methods to get at environmental variables, +# parameters, cookies, and multipart request data. For responses, CGI provides +# methods for writing output and generating HTML. +# +# Read on for more details. Examples are provided at the bottom. +# +# == About the Examples +# +# Examples on this page assume that \CGI has been required: +# +# require 'cgi' +# +# Unless otherwise stated, examples also assume that environment variable 'REQUEST_METHOD' exists +# (which prevents CGI.new from entering its online mode): +# +# ENV.include?('REQUEST_METHOD') # => true +# +# == Queries +# +# The CGI class dynamically mixes in parameter and cookie-parsing +# functionality, environmental variable access, and support for +# parsing multipart requests (including uploaded files) from the +# CGI::QueryExtension module. +# +# === Environmental Variables +# +# The standard CGI environmental variables are available as read-only +# attributes of a CGI object. The following is a list of these variables: +# +# +# AUTH_TYPE HTTP_HOST REMOTE_IDENT +# CONTENT_LENGTH HTTP_NEGOTIATE REMOTE_USER +# CONTENT_TYPE HTTP_PRAGMA REQUEST_METHOD +# GATEWAY_INTERFACE HTTP_REFERER SCRIPT_NAME +# HTTP_ACCEPT HTTP_USER_AGENT SERVER_NAME +# HTTP_ACCEPT_CHARSET PATH_INFO SERVER_PORT +# HTTP_ACCEPT_ENCODING PATH_TRANSLATED SERVER_PROTOCOL +# HTTP_ACCEPT_LANGUAGE QUERY_STRING SERVER_SOFTWARE +# HTTP_CACHE_CONTROL REMOTE_ADDR +# HTTP_FROM REMOTE_HOST +# +# +# For each of these variables, there is a corresponding attribute with the +# same name, except all lower case and without a preceding HTTP_. +# +content_length+ and +server_port+ are integers; the rest are strings. +# +# === Parameters +# +# The method #params() returns a hash of all parameters in the request as +# name/value-list pairs, where the value-list is an Array of one or more +# values. The CGI object itself also behaves as a hash of parameter names +# to values, but only returns a single value (as a String) for each +# parameter name. +# +# For instance, suppose the request contains the parameter +# "favourite_colours" with the multiple values "blue" and "green". The +# following behavior would occur: +# +# cgi.params["favourite_colours"] # => ["blue", "green"] +# cgi["favourite_colours"] # => "blue" +# +# If a parameter does not exist, the former method will return an empty +# array, the latter an empty string. The simplest way to test for existence +# of a parameter is by the #has_key? method. +# +# === Cookies +# +# HTTP Cookies are automatically parsed from the request. They are available +# from the #cookies() accessor, which returns a hash from cookie name to +# CGI::Cookie object. +# +# === Multipart requests +# +# If a request's method is POST and its content type is multipart/form-data, +# then it may contain uploaded files. These are stored by the QueryExtension +# module in the parameters of the request. The parameter name is the name +# attribute of the file input field, as usual. However, the value is not +# a string, but an IO object, either an IOString for small files, or a +# Tempfile for larger ones. This object also has the additional singleton +# methods: +# +# #local_path():: the path of the uploaded file on the local filesystem +# #original_filename():: the name of the file on the client computer +# #content_type():: the content type of the file +# +# == Responses +# +# The CGI class provides methods for sending header and content output to +# the HTTP client, and mixes in methods for programmatic HTML generation +# from CGI::HtmlExtension and CGI::TagMaker modules. The precise version of HTML +# to use for HTML generation is specified at object creation time. +# +# === Writing output +# +# The simplest way to send output to the HTTP client is using the #out() method. +# This takes the HTTP headers as a hash parameter, and the body content +# via a block. The headers can be generated as a string using the #http_header() +# method. The output stream can be written directly to using the #print() +# method. +# +# === Generating HTML +# +# Each HTML element has a corresponding method for generating that +# element as a String. The name of this method is the same as that +# of the element, all lowercase. The attributes of the element are +# passed in as a hash, and the body as a no-argument block that evaluates +# to a String. The HTML generation module knows which elements are +# always empty, and silently drops any passed-in body. It also knows +# which elements require matching closing tags and which don't. However, +# it does not know what attributes are legal for which elements. +# +# There are also some additional HTML generation methods mixed in from +# the CGI::HtmlExtension module. These include individual methods for the +# different types of form inputs, and methods for elements that commonly +# take particular attributes where the attributes can be directly specified +# as arguments, rather than via a hash. +# +# === Utility HTML escape and other methods like a function. +# +# There are some utility tools defined in cgi/util.rb and cgi/escape.rb. +# Escape and unescape methods are defined in cgi/escape.rb. +# And when include, you can use utility methods like a function. +# +# == Examples of Use +# +# === Form Values +# +# ==== Get Form Values +# +# You can use method +cgi.params+ to retrieve form values +# in a {Hash}[https://docs.ruby-lang.org/en/3.4/Hash.html]: +# +# ENV.update( +# 'REQUEST_METHOD' => 'GET', +# 'QUERY_STRING' => 'a=111&&b=222&c&d=' +# ) +# cgi = CGI.new +# cgi.params.class # => Hash +# cgi.params # => {"a" => ["111"], "b" => ["222"], "c" => [], "d" => [""]} +# cgi.params.keys # => ["a", "b", "c", "d"] +# cgi.params['a'] # => ["111"] # Returns an array. +# cgi.params['d'] # => [""] # Returns empty string in array if no value. +# cgi.params['x'] # => [] # Returns empty array if no key. +# +# A \CGI instance has these convenience methods: +# +# # Convenience method for cgi.params.keys. +# cgi.keys # => ["a", "b", "c", "d"] +# # Convenience method for cgi.params[key].first. +# cgi['a'] # => "111" # Returns string, not array. +# cgi['d'] # => "" # Returns empty string if no value. +# cgi['x'] # => "" # Returns empty string if no key. +# # Convenience method for cgi.params.include?. +# cgi.include?('a') # => true +# cgi.include?('x') # => false +# +# ==== Save and Restore Form Values +# +# This example uses {Pstore}[https://docs.ruby-lang.org/en/3.4/PStore.html] +# to store and retrieve form values: +# +# ENV.update( +# 'REQUEST_METHOD' => 'GET', +# 'QUERY_STRING' => 'a=111&&b=222&c&d=' +# ) +# cgi = CGI.new +# require 'pstore' +# store = PStore.new('params.store') +# store.transaction do +# store['params'] = cgi.params +# end +# cgi.params.clear # Oops! Lost my params! +# store.transaction do +# cgi.params = store['params'] +# end +# cgi.params # => {"a" => ["111"], "b" => ["222"], "c" => [], "d" => [""]} +# +# ==== Get multipart form values +# +# cgi = CGI.new +# value = cgi['field_name'] # <== value string for 'field_name' +# value.read # <== body of value +# value.local_path # <== path to local file of value +# value.original_filename # <== original filename of value +# value.content_type # <== content_type of value +# +# and value has StringIO or Tempfile class methods. +# +# === Get cookie values +# +# cgi = CGI.new +# values = cgi.cookies['name'] # <== array of 'name' +# # if not 'name' included, then return []. +# names = cgi.cookies.keys # <== array of cookie names +# +# and cgi.cookies is a hash. +# +# === Get cookie objects +# +# cgi = CGI.new +# for name, cookie in cgi.cookies +# cookie.expires = Time.now + 30 +# end +# cgi.out("cookie" => cgi.cookies) {"string"} +# +# cgi.cookies # { "name1" => cookie1, "name2" => cookie2, ... } +# +# cgi = CGI.new +# cgi.cookies['name'].expires = Time.now + 30 +# cgi.out("cookie" => cgi.cookies['name']) {"string"} +# +# === Print http header and html string to $DEFAULT_OUTPUT ($>) +# +# cgi = CGI.new("html4") # add HTML generation methods +# cgi.out do +# cgi.html do +# cgi.head do +# cgi.title { "TITLE" } +# end + +# cgi.body do +# cgi.form("ACTION" => "uri") do +# cgi.p do +# cgi.textarea("get_text") + +# cgi.br + +# cgi.submit +# end +# end + +# cgi.pre do +# CGI.escapeHTML( +# "params: #{cgi.params.inspect}\n" + +# "cookies: #{cgi.cookies.inspect}\n" + +# ENV.collect do |key, value| +# "#{key} --> #{value}\n" +# end.join("") +# ) +# end +# end +# end +# end +# +# # add HTML generation methods +# CGI.new("html3") # html3.2 +# CGI.new("html4") # html4.01 (Strict) +# CGI.new("html4Tr") # html4.01 Transitional +# CGI.new("html4Fr") # html4.01 Frameset +# CGI.new("html5") # html5 +# +# === Some utility methods +# +# require 'cgi/escape' +# CGI.escapeHTML('Usage: foo "bar" ') +# +# +# === Some utility methods like a function +# +# require 'cgi/escape' +# include CGI::Escape +# escapeHTML('Usage: foo "bar" ') +# h('Usage: foo "bar" ') # alias +# +# +# -- +# Methods for generating HTML, parsing CGI-related parameters, and +# generating HTTP responses. +# ++ +# :stopdoc +# +# pkg:gem/cgi#lib/cgi/util.rb:2 +class CGI + include ::CGI::Util + include ::CGI::Escape + include ::CGI::EscapeExt + extend ::CGI::Util + extend ::CGI::Escape + extend ::CGI::EscapeExt + + # :call-seq: + # CGI.new(options = {}) -> new_cgi + # CGI.new(tag_maker) -> new_cgi + # CGI.new(options = {}) {|name, value| ... } -> new_cgi + # CGI.new(tag_maker) {|name, value| ... } -> new_cgi + # + # Returns a new \CGI object. + # + # The behavior of this method depends _strongly_ on whether it is called + # within a standard \CGI call environment; + # that is, whether ENV['REQUEST_METHOD'] is defined. + # + # Within a Standard Call Environment + # + # This section assumes that ENV['REQUEST_METHOD'] is defined; + # for example: + # + # ENV['REQUEST_METHOD'] # => "GET" + # + # With no argument and no block given, returns a new \CGI object with default values: + # + # cgi = CGI.new + # puts cgi.pretty_inspect + # #, + # @accept_charset_error_block=nil, + # @cookies={}, + # @max_multipart_length=134217728, + # @multipart=false, + # @output_cookies=nil, + # @output_hidden=nil, + # @params={}> + # + # With hash argument +options+ given and no block given, + # returns a new \CGI object with the given options. + # + # The options may be: + # + # - accept_charset: _encoding_: + # specifies the encoding of the received query string. + # + # Value _encoding_ may be + # an {Encoding object}[https://docs.ruby-lang.org/en/master/encodings_rdoc.html#label-Encoding+Objects] + # or an {encoding name}[https://docs.ruby-lang.org/en/master/encodings_rdoc.html#label-Names+and+Aliases]: + # + # CGI.new(accept_charset: 'EUC-JP') + # + # If the option is not given, + # the default value is the class default encoding. + # + # Note: The accept_charset method returns the HTTP Accept-Charset + # header value, not the configured encoding. The configured encoding is used + # internally for query string parsing. + # + # - max_multipart_length: _size_: + # specifies maximum size (in bytes) of multipart data. + # + # The _size_ may be: + # + # - A positive integer. + # + # CGI.new(max_multipart_length: 1024 * 1024) + # + # + # - A lambda to be evaluated when the request is parsed. + # This is useful when determining whether to accept multipart data + # (e.g. by consulting a registered user's upload allowance). + # + # CGI.new(max_multipart_length: -> {check_filesystem}) + # + # If the option is not given, the default is +134217728+, specifying a maximum size of 128 megabytes. + # + # Note: This option configures internal behavior only. + # There is no public method to retrieve this value after initialization. + # + # - tag_maker: _html_version_: + # specifies which version of HTML to use in generating tags. + # + # Value _html_version_ may be one of: + # + # - 'html3': {HTML version 3}[https://en.wikipedia.org/wiki/HTML#HTML_3]. + # - 'html4': {HTML version 4}[https://en.wikipedia.org/wiki/HTML#HTML_4]. + # - 'html4Tr': HTML 4.0 Transitional. + # - 'html4Fr': HTML 4.0 with Framesets. + # - 'html5': {HTML version 5}[https://en.wikipedia.org/wiki/HTML#HTML_5]. + # + # Example: + # + # CGI.new(tag_maker: 'html5') + # + # If the option is not given, + # no HTML generation methods are loaded. + # + # With string argument +tag_maker+ given as _tag_maker_ and no block given, + # equivalent to CGI.new(tag_maker: _tag_maker_): + # + # CGI.new('html5') + # + # Outside a Standard Call Environment + # + # This section assumes that ENV['REQUEST_METHOD'] is not defined; + # for example: + # + # ENV['REQUEST_METHOD'] # => nil + # + # In this mode, the method reads its parameters + # from the command line or (failing that) from standard input; + # returns a new \CGI object. + # + # Otherwise, cookies and other parameters are parsed automatically from the standard CGI locations, + # which vary according to the request method. + # + # Options vs Public Methods + # + # Some initialization options configure internal behavior only and do not provide + # corresponding public getter methods: + # + # - accept_charset: Configures internal encoding for parsing. + # The accept_charset method returns the HTTP Accept-Charset header. + # - max_multipart_length: Configures internal multipart size limits. + # No public getter method is available. + # - tag_maker: Loads HTML generation methods (publicly accessible). + # + # Block + # + # If a block is given, its code is stored as a Proc; + # whenever CGI::InvalidEncoding would be raised, the proc is called instead. + # + # In this example, the proc simply saves the error: + # + # encoding_errors={} + # CGI.new(accept_charset: 'EUC-JP') do |name,value| + # encoding_errors[name] = value + # end + # # => + # #, + # @cookies={}, + # @max_multipart_length=134217728, + # @multipart=false, + # @options={accept_charset: "EUC-JP", max_multipart_length: 134217728}, + # @output_cookies=nil, + # @output_hidden=nil, + # @params={}> + # + # pkg:gem/cgi#lib/cgi/core.rb:930 + def initialize(options = T.unsafe(nil), &block); end + + # Return the accept character set for this CGI instance. + # + # pkg:gem/cgi#lib/cgi/core.rb:772 + def accept_charset; end + + # This method is an alias for #http_header, when HTML5 tag maker is inactive. + # + # NOTE: use #http_header to create HTTP header blocks, this alias is only + # provided for backwards compatibility. + # + # Using #header with the HTML5 tag maker will create a
element. + # + # pkg:gem/cgi#lib/cgi/core.rb:189 + def header(options = T.unsafe(nil)); end + + # Create an HTTP header block as a string. + # + # :call-seq: + # http_header(content_type_string="text/html") + # http_header(headers_hash) + # + # Includes the empty line that ends the header block. + # + # +content_type_string+:: + # If this form is used, this string is the Content-Type + # +headers_hash+:: + # A Hash of header values. The following header keys are recognized: + # + # type:: The Content-Type header. Defaults to "text/html" + # charset:: The charset of the body, appended to the Content-Type header. + # nph:: A boolean value. If true, prepend protocol string and status + # code, and date; and sets default values for "server" and + # "connection" if not explicitly set. + # status:: + # The HTTP status code as a String, returned as the Status header. The + # values are: + # + # OK:: 200 OK + # PARTIAL_CONTENT:: 206 Partial Content + # MULTIPLE_CHOICES:: 300 Multiple Choices + # MOVED:: 301 Moved Permanently + # REDIRECT:: 302 Found + # NOT_MODIFIED:: 304 Not Modified + # BAD_REQUEST:: 400 Bad Request + # AUTH_REQUIRED:: 401 Authorization Required + # FORBIDDEN:: 403 Forbidden + # NOT_FOUND:: 404 Not Found + # METHOD_NOT_ALLOWED:: 405 Method Not Allowed + # NOT_ACCEPTABLE:: 406 Not Acceptable + # LENGTH_REQUIRED:: 411 Length Required + # PRECONDITION_FAILED:: 412 Precondition Failed + # SERVER_ERROR:: 500 Internal Server Error + # NOT_IMPLEMENTED:: 501 Method Not Implemented + # BAD_GATEWAY:: 502 Bad Gateway + # VARIANT_ALSO_VARIES:: 506 Variant Also Negotiates + # + # server:: The server software, returned as the Server header. + # connection:: The connection type, returned as the Connection header (for + # instance, "close". + # length:: The length of the content that will be sent, returned as the + # Content-Length header. + # language:: The language of the content, returned as the Content-Language + # header. + # expires:: The time on which the current content expires, as a +Time+ + # object, returned as the Expires header. + # cookie:: + # A cookie or cookies, returned as one or more Set-Cookie headers. The + # value can be the literal string of the cookie; a CGI::Cookie object; + # an Array of literal cookie strings or Cookie objects; or a hash all of + # whose values are literal cookie strings or Cookie objects. + # + # These cookies are in addition to the cookies held in the + # @output_cookies field. + # + # Other headers can also be set; they are appended as key: value. + # + # Examples: + # + # http_header + # # Content-Type: text/html + # + # http_header("text/plain") + # # Content-Type: text/plain + # + # http_header("nph" => true, + # "status" => "OK", # == "200 OK" + # # "status" => "200 GOOD", + # "server" => ENV['SERVER_SOFTWARE'], + # "connection" => "close", + # "type" => "text/html", + # "charset" => "iso-2022-jp", + # # Content-Type: text/html; charset=iso-2022-jp + # "length" => 103, + # "language" => "ja", + # "expires" => Time.now + 30, + # "cookie" => [cookie1, cookie2], + # "my_header1" => "my_value", + # "my_header2" => "my_value") + # + # This method does not perform charset conversion. + # + # pkg:gem/cgi#lib/cgi/core.rb:160 + def http_header(options = T.unsafe(nil)); end + + # pkg:gem/cgi#lib/cgi/core.rb:274 + def nph?; end + + # Print an HTTP header and body to $DEFAULT_OUTPUT ($>) + # + # :call-seq: + # cgi.out(content_type_string='text/html') + # cgi.out(headers_hash) + # + # +content_type_string+:: + # If a string is passed, it is assumed to be the content type. + # +headers_hash+:: + # This is a Hash of headers, similar to that used by #http_header. + # +block+:: + # A block is required and should evaluate to the body of the response. + # + # Content-Length is automatically calculated from the size of + # the String returned by the content block. + # + # If ENV['REQUEST_METHOD'] == "HEAD", then only the header + # is output (the content block is still required, but it is ignored). + # + # If the charset is "iso-2022-jp" or "euc-jp" or "shift_jis" then the + # content is converted to this charset, and the language is set to "ja". + # + # Example: + # + # cgi = CGI.new + # cgi.out{ "string" } + # # Content-Type: text/html + # # Content-Length: 6 + # # + # # string + # + # cgi.out("text/plain") { "string" } + # # Content-Type: text/plain + # # Content-Length: 6 + # # + # # string + # + # cgi.out("nph" => true, + # "status" => "OK", # == "200 OK" + # "server" => ENV['SERVER_SOFTWARE'], + # "connection" => "close", + # "type" => "text/html", + # "charset" => "iso-2022-jp", + # # Content-Type: text/html; charset=iso-2022-jp + # "language" => "ja", + # "expires" => Time.now + (3600 * 24 * 30), + # "cookie" => [cookie1, cookie2], + # "my_header1" => "my_value", + # "my_header2" => "my_value") { "string" } + # # HTTP/1.1 200 OK + # # Date: Sun, 15 May 2011 17:35:54 GMT + # # Server: Apache 2.2.0 + # # Connection: close + # # Content-Type: text/html; charset=iso-2022-jp + # # Content-Length: 6 + # # Content-Language: ja + # # Expires: Tue, 14 Jun 2011 17:35:54 GMT + # # Set-Cookie: foo + # # Set-Cookie: bar + # # my_header1: my_value + # # my_header2: my_value + # # + # # string + # + # pkg:gem/cgi#lib/cgi/core.rb:367 + def out(options = T.unsafe(nil)); end + + # Print an argument or list of arguments to the default output stream + # + # cgi = CGI.new + # cgi.print # default: cgi.print == $DEFAULT_OUTPUT.print + # + # pkg:gem/cgi#lib/cgi/core.rb:383 + def print(*options); end + + private + + # pkg:gem/cgi#lib/cgi/core.rb:218 + def _header_for_hash(options); end + + # pkg:gem/cgi#lib/cgi/core.rb:278 + def _header_for_modruby(buf); end + + # pkg:gem/cgi#lib/cgi/core.rb:202 + def _header_for_string(content_type); end + + # pkg:gem/cgi#lib/cgi/core.rb:191 + def _no_crlf_check(str); end + + # Synonym for ENV. + # + # pkg:gem/cgi#lib/cgi/core.rb:59 + def env_table; end + + # Synonym for $stdin. + # + # pkg:gem/cgi#lib/cgi/core.rb:64 + def stdinput; end + + # Synonym for $stdout. + # + # pkg:gem/cgi#lib/cgi/core.rb:69 + def stdoutput; end + + class << self + # Return the accept character set for all new CGI instances. + # + # pkg:gem/cgi#lib/cgi/core.rb:762 + def accept_charset; end + + # Set the accept character set for all new CGI instances. + # + # pkg:gem/cgi#lib/cgi/core.rb:767 + def accept_charset=(accept_charset); end + + # :call-seq: + # CGI.parse(query_string) -> hash + # + # Returns a new hash built from name/value pairs in the given +query_string+: + # + # query = 'foo=0&bar=1&foo=2&bar=3' + # CGI.parse(query) + # # => {"foo" => ["0", "2"], "bar" => ["1", "3"]} + # + # pkg:gem/cgi#lib/cgi/core.rb:396 + def parse(query); end + end +end + +# Class representing an HTTP cookie. +# +# In addition to its specific fields and methods, a Cookie instance +# is a delegator to the array of its values. +# +# See RFC 2965. +# +# == Examples of use +# cookie1 = CGI::Cookie.new("name", "value1", "value2", ...) +# cookie1 = CGI::Cookie.new("name" => "name", "value" => "value") +# cookie1 = CGI::Cookie.new('name' => 'name', +# 'value' => ['value1', 'value2', ...], +# 'path' => 'path', # optional +# 'domain' => 'domain', # optional +# 'expires' => Time.now, # optional +# 'secure' => true, # optional +# 'httponly' => true # optional +# ) +# +# cgi.out("cookie" => [cookie1, cookie2]) { "string" } +# +# name = cookie1.name +# values = cookie1.value +# path = cookie1.path +# domain = cookie1.domain +# expires = cookie1.expires +# secure = cookie1.secure +# httponly = cookie1.httponly +# +# cookie1.name = 'name' +# cookie1.value = ['value1', 'value2', ...] +# cookie1.path = 'path' +# cookie1.domain = 'domain' +# cookie1.expires = Time.now + 30 +# cookie1.secure = true +# cookie1.httponly = true +# +# pkg:gem/cgi#lib/cgi/cookie.rb:40 +class CGI::Cookie < ::Array + # Create a new CGI::Cookie object. + # + # :call-seq: + # Cookie.new(name_string,*value) + # Cookie.new(options_hash) + # + # +name_string+:: + # The name of the cookie; in this form, there is no #domain or + # #expiration. The #path is gleaned from the +SCRIPT_NAME+ environment + # variable, and #secure is false. + # *value:: + # value or list of values of the cookie + # +options_hash+:: + # A Hash of options to initialize this Cookie. Possible options are: + # + # name:: the name of the cookie. Required. + # value:: the cookie's value or list of values. + # path:: the path for which this cookie applies. Defaults to + # the value of the +SCRIPT_NAME+ environment variable. + # domain:: the domain for which this cookie applies. + # expires:: the time at which this cookie expires, as a +Time+ object. + # secure:: whether this cookie is a secure cookie or not (default to + # false). Secure cookies are only transmitted to HTTPS + # servers. + # httponly:: whether this cookie is a HttpOnly cookie or not (default to + # false). HttpOnly cookies are not available to javascript. + # + # These keywords correspond to attributes of the cookie object. + # + # pkg:gem/cgi#lib/cgi/cookie.rb:77 + def initialize(name = T.unsafe(nil), *value); end + + # Domain for which this cookie applies, as a +String+ + # + # pkg:gem/cgi#lib/cgi/cookie.rb:126 + def domain; end + + # Set domain for which this cookie applies + # + # pkg:gem/cgi#lib/cgi/cookie.rb:128 + def domain=(str); end + + # Time at which this cookie expires, as a +Time+ + # + # pkg:gem/cgi#lib/cgi/cookie.rb:136 + def expires; end + + # Time at which this cookie expires, as a +Time+ + # + # pkg:gem/cgi#lib/cgi/cookie.rb:136 + def expires=(_arg0); end + + # True if this cookie is httponly; false otherwise + # + # pkg:gem/cgi#lib/cgi/cookie.rb:140 + def httponly; end + + # Set whether the Cookie is a httponly cookie or not. + # + # +val+ must be a boolean. + # + # pkg:gem/cgi#lib/cgi/cookie.rb:163 + def httponly=(val); end + + # A summary of cookie string. + # + # pkg:gem/cgi#lib/cgi/cookie.rb:205 + def inspect; end + + # Name of this cookie, as a +String+ + # + # pkg:gem/cgi#lib/cgi/cookie.rb:106 + def name; end + + # Set name of this cookie + # + # pkg:gem/cgi#lib/cgi/cookie.rb:108 + def name=(str); end + + # Path for which this cookie applies, as a +String+ + # + # pkg:gem/cgi#lib/cgi/cookie.rb:116 + def path; end + + # Set path for which this cookie applies + # + # pkg:gem/cgi#lib/cgi/cookie.rb:118 + def path=(str); end + + # True if this cookie is secure; false otherwise + # + # pkg:gem/cgi#lib/cgi/cookie.rb:138 + def secure; end + + # Set whether the Cookie is a secure cookie or not. + # + # +val+ must be a boolean. + # + # pkg:gem/cgi#lib/cgi/cookie.rb:155 + def secure=(val); end + + # Convert the Cookie to its string representation. + # + # pkg:gem/cgi#lib/cgi/cookie.rb:168 + def to_s; end + + # Returns the value or list of values for this cookie. + # + # pkg:gem/cgi#lib/cgi/cookie.rb:143 + def value; end + + # Replaces the value of this cookie with a new value or list of values. + # + # pkg:gem/cgi#lib/cgi/cookie.rb:148 + def value=(val); end + + class << self + # Parse a raw cookie string into a hash of cookie-name=>Cookie + # pairs. + # + # cookies = CGI::Cookie.parse("raw_cookie_string") + # # { "name1" => cookie1, "name2" => cookie2, ... } + # + # pkg:gem/cgi#lib/cgi/cookie.rb:185 + def parse(raw_cookie); end + end +end + +# pkg:gem/cgi#lib/cgi/cookie.rb:46 +CGI::Cookie::DOMAIN_VALUE_RE = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/cgi#lib/cgi/cookie.rb:45 +CGI::Cookie::PATH_VALUE_RE = T.let(T.unsafe(nil), Regexp) + +# :stopdoc: +# +# pkg:gem/cgi#lib/cgi/cookie.rb:44 +CGI::Cookie::TOKEN_RE = T.let(T.unsafe(nil), Regexp) + +# Escape/unescape for CGI, HTML, URI. +# +# pkg:gem/cgi#lib/cgi/escape.rb:5 +module CGI::Escape + include ::CGI::EscapeExt + + # URL-encode a string into application/x-www-form-urlencoded. + # Space characters (+" "+) are encoded with plus signs (+"+"+) + # url_encoded_string = CGI.escape("'Stop!' said Fred") + # # => "%27Stop%21%27+said+Fred" + # + # pkg:gem/cgi#lib/cgi/escape.rb:20 + def escape(_arg0); end + + # Escape only the tags of certain HTML elements in +string+. + # + # Takes an element or elements or array of elements. Each element + # is specified by the name of the element, without angle brackets. + # This matches both the start and the end tag of that element. + # The attribute list of the open tag will also be escaped (for + # instance, the double-quotes surrounding attribute values). + # + # print CGI.escapeElement('
', "A", "IMG") + # # "
<A HREF="url"></A>" + # + # print CGI.escapeElement('
', ["A", "IMG"]) + # # "
<A HREF="url"></A>" + # + # pkg:gem/cgi#lib/cgi/escape.rb:191 + def escapeElement(string, *elements); end + + # Escape special characters in HTML, namely '&\"<> + # CGI.escapeHTML('Usage: foo "bar" ') + # # => "Usage: foo "bar" <baz>" + # + # pkg:gem/cgi#lib/cgi/escape.rb:83 + def escapeHTML(_arg0); end + + # URL-encode a string following RFC 3986 + # Space characters (+" "+) are encoded with (+"%20"+) + # url_encoded_string = CGI.escapeURIComponent("'Stop!' said Fred") + # # => "%27Stop%21%27%20said%20Fred" + # + # pkg:gem/cgi#lib/cgi/escape.rb:47 + def escapeURIComponent(_arg0); end + + # Synonym for CGI.escapeElement(str) + # + # pkg:gem/cgi#lib/cgi/escape.rb:223 + def escape_element(string, *elements); end + + # Synonym for CGI.escapeHTML(str) + # + # pkg:gem/cgi#lib/cgi/escape.rb:164 + def escape_html(string); end + + # pkg:gem/cgi#lib/cgi/escape.rb:55 + def escape_uri_component(_arg0); end + + # pkg:gem/cgi#lib/cgi/escape.rb:165 + def h(string); end + + # URL-decode an application/x-www-form-urlencoded string with encoding(optional). + # string = CGI.unescape("%27Stop%21%27+said+Fred") + # # => "'Stop!' said Fred" + # + # pkg:gem/cgi#lib/cgi/escape.rb:33 + def unescape(*_arg0); end + + # Undo escaping such as that done by CGI.escapeElement() + # + # print CGI.unescapeElement( + # CGI.escapeHTML('
'), "A", "IMG") + # # "<BR>" + # + # print CGI.unescapeElement( + # CGI.escapeHTML('
'), ["A", "IMG"]) + # # "<BR>" + # + # pkg:gem/cgi#lib/cgi/escape.rb:211 + def unescapeElement(string, *elements); end + + # Unescape a string that has been HTML-escaped + # CGI.unescapeHTML("Usage: foo "bar" <baz>") + # # => "Usage: foo \"bar\" " + # + # pkg:gem/cgi#lib/cgi/escape.rb:105 + def unescapeHTML(_arg0); end + + # URL-decode a string following RFC 3986 with encoding(optional). + # string = CGI.unescapeURIComponent("%27Stop%21%27+said%20Fred") + # # => "'Stop!'+said Fred" + # + # pkg:gem/cgi#lib/cgi/escape.rb:60 + def unescapeURIComponent(*_arg0); end + + # Synonym for CGI.unescapeElement(str) + # + # pkg:gem/cgi#lib/cgi/escape.rb:226 + def unescape_element(string, *elements); end + + # Synonym for CGI.unescapeHTML(str) + # + # pkg:gem/cgi#lib/cgi/escape.rb:168 + def unescape_html(string); end + + # pkg:gem/cgi#lib/cgi/escape.rb:69 + def unescape_uri_component(*_arg0); end +end + +# The set of special characters and their escaped values +# +# pkg:gem/cgi#lib/cgi/escape.rb:72 +CGI::Escape::TABLE_FOR_ESCAPE_HTML__ = T.let(T.unsafe(nil), Hash) + +# pkg:gem/cgi#lib/cgi/escape.rb:8 +module CGI::EscapeExt + # pkg:gem/cgi#lib/cgi/escape.rb:173 + def escape(_arg0); end + + # pkg:gem/cgi#lib/cgi/escape.rb:173 + def escapeHTML(_arg0); end + + # pkg:gem/cgi#lib/cgi/escape.rb:173 + def escapeURIComponent(_arg0); end + + # pkg:gem/cgi#lib/cgi/escape.rb:173 + def escape_uri_component(_arg0); end + + # pkg:gem/cgi#lib/cgi/escape.rb:173 + def unescape(*_arg0); end + + # pkg:gem/cgi#lib/cgi/escape.rb:173 + def unescapeHTML(_arg0); end + + # pkg:gem/cgi#lib/cgi/escape.rb:173 + def unescapeURIComponent(*_arg0); end + + # pkg:gem/cgi#lib/cgi/escape.rb:173 + def unescape_uri_component(*_arg0); end +end + +# HTML version 3 generation class. +# +# pkg:gem/cgi#lib/cgi/html.rb:1010 +class CGI::HTML3 + include ::CGI::TagMaker + include ::CGI::Html3 + include ::CGI::HtmlExtension +end + +# HTML version 4 generation class. +# +# pkg:gem/cgi#lib/cgi/html.rb:1016 +class CGI::HTML4 + include ::CGI::TagMaker + include ::CGI::Html4 + include ::CGI::HtmlExtension +end + +# HTML version 4 with framesets generation class. +# +# pkg:gem/cgi#lib/cgi/html.rb:1028 +class CGI::HTML4Fr + include ::CGI::TagMaker + include ::CGI::Html4Tr + include ::CGI::Html4Fr + include ::CGI::HtmlExtension +end + +# HTML version 4 transitional generation class. +# +# pkg:gem/cgi#lib/cgi/html.rb:1022 +class CGI::HTML4Tr + include ::CGI::TagMaker + include ::CGI::Html4Tr + include ::CGI::HtmlExtension +end + +# HTML version 5 generation class. +# +# pkg:gem/cgi#lib/cgi/html.rb:1035 +class CGI::HTML5 + include ::CGI::TagMaker + include ::CGI::Html5 + include ::CGI::HtmlExtension +end + +# Mixin module for HTML version 3 generation methods. +# +# pkg:gem/cgi#lib/cgi/html.rb:822 +module CGI::Html3 + include ::CGI::TagMaker + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def a(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def address(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def applet(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:845 + def area(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def b(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:845 + def base(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:845 + def basefont(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def big(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def blockquote(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:853 + def body(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:845 + def br(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def caption(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def center(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def cite(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def code(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:853 + def dd(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def dfn(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def dir(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def div(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def dl(attributes = T.unsafe(nil), &block); end + + # The DOCTYPE declaration for this version of HTML + # + # pkg:gem/cgi#lib/cgi/html.rb:826 + def doctype; end + + # pkg:gem/cgi#lib/cgi/html.rb:853 + def dt(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def em(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def font(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def form(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def h1(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def h2(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def h3(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def h4(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def h5(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def h6(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:853 + def head(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:845 + def hr(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:853 + def html(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def i(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:845 + def img(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:845 + def input(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:845 + def isindex(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def kbd(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:853 + def li(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:845 + def link(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def listing(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def map(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def menu(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:845 + def meta(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def ol(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:853 + def option(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:853 + def p(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:845 + def param(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:853 + def plaintext(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def pre(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def samp(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def script(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def select(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def small(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def strike(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def strong(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def style(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def sub(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def sup(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def table(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:853 + def td(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def textarea(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:853 + def th(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def title(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:853 + def tr(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def tt(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def u(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def ul(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def var(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:837 + def xmp(attributes = T.unsafe(nil), &block); end +end + +# Mixin module for HTML version 4 generation methods. +# +# pkg:gem/cgi#lib/cgi/html.rb:861 +module CGI::Html4 + include ::CGI::TagMaker + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def a(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def abbr(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def acronym(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def address(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:884 + def area(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def b(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:884 + def base(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def bdo(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def big(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def blockquote(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def body(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:884 + def br(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def button(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def caption(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def cite(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def code(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:884 + def col(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def colgroup(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def dd(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def del(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def dfn(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def div(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def dl(attributes = T.unsafe(nil), &block); end + + # The DOCTYPE declaration for this version of HTML + # + # pkg:gem/cgi#lib/cgi/html.rb:865 + def doctype; end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def dt(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def em(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def fieldset(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def form(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def h1(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def h2(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def h3(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def h4(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def h5(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def h6(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def head(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:884 + def hr(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def html(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def i(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:884 + def img(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:884 + def input(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def ins(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def kbd(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def label(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def legend(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def li(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:884 + def link(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def map(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:884 + def meta(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def noscript(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def object(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def ol(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def optgroup(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def option(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def p(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:884 + def param(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def pre(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def q(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def samp(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def script(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def select(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def small(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def span(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def strong(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def style(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def sub(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def sup(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def table(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def tbody(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def td(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def textarea(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def tfoot(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def th(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def thead(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def title(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:892 + def tr(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def tt(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def ul(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:877 + def var(attributes = T.unsafe(nil), &block); end +end + +# Mixin module for generating HTML version 4 with framesets. +# +# pkg:gem/cgi#lib/cgi/html.rb:941 +module CGI::Html4Fr + include ::CGI::TagMaker + + # The DOCTYPE declaration for this version of HTML + # + # pkg:gem/cgi#lib/cgi/html.rb:945 + def doctype; end + + # pkg:gem/cgi#lib/cgi/html.rb:960 + def frame(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:953 + def frameset(attributes = T.unsafe(nil), &block); end +end + +# Mixin module for HTML version 4 transitional generation methods. +# +# pkg:gem/cgi#lib/cgi/html.rb:900 +module CGI::Html4Tr + include ::CGI::TagMaker + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def a(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def abbr(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def acronym(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def address(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def applet(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:925 + def area(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def b(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:925 + def base(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:925 + def basefont(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def bdo(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def big(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def blockquote(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def body(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:925 + def br(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def button(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def caption(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def center(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def cite(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def code(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:925 + def col(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def colgroup(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def dd(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def del(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def dfn(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def dir(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def div(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def dl(attributes = T.unsafe(nil), &block); end + + # The DOCTYPE declaration for this version of HTML + # + # pkg:gem/cgi#lib/cgi/html.rb:904 + def doctype; end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def dt(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def em(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def fieldset(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def font(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def form(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def h1(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def h2(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def h3(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def h4(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def h5(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def h6(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def head(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:925 + def hr(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def html(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def i(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def iframe(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:925 + def img(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:925 + def input(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def ins(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:925 + def isindex(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def kbd(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def label(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def legend(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def li(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:925 + def link(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def map(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def menu(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:925 + def meta(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def noframes(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def noscript(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def object(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def ol(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def optgroup(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def option(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def p(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:925 + def param(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def pre(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def q(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def s(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def samp(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def script(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def select(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def small(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def span(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def strike(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def strong(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def style(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def sub(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def sup(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def table(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def tbody(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def td(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def textarea(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def tfoot(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def th(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def thead(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def title(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:933 + def tr(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def tt(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def u(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def ul(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:917 + def var(attributes = T.unsafe(nil), &block); end +end + +# Mixin module for HTML version 5 generation methods. +# +# pkg:gem/cgi#lib/cgi/html.rb:968 +module CGI::Html5 + include ::CGI::TagMaker + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def a(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def abbr(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def address(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def area(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def article(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def aside(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def audio(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def b(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def base(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def bdi(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def bdo(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def blockquote(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def body(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def br(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def button(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def canvas(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def caption(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def cite(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def code(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def col(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def colgroup(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def command(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def datalist(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def dd(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def del(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def details(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def dfn(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def dialog(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def div(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def dl(attributes = T.unsafe(nil), &block); end + + # The DOCTYPE declaration for this version of HTML + # + # pkg:gem/cgi#lib/cgi/html.rb:972 + def doctype; end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def dt(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def em(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def embed(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def fieldset(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def figcaption(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def figure(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def footer(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def form(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def h1(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def h2(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def h3(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def h4(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def h5(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def h6(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def head(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def header(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def hgroup(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def hr(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def html(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def i(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def iframe(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def img(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def input(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def ins(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def kbd(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def keygen(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def label(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def legend(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def li(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def link(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def map(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def mark(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def menu(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def meta(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def meter(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def nav(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def noscript(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def object(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def ol(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def optgroup(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def option(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def output(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def p(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def param(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def pre(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def progress(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def q(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def rp(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def rt(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def ruby(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def s(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def samp(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def script(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def section(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def select(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def small(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def source(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def span(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def strong(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def style(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def sub(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def summary(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def sup(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def table(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def tbody(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def td(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def textarea(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def tfoot(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def th(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def thead(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def time(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def title(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:1003 + def tr(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def track(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def u(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def ul(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def var(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:987 + def video(attributes = T.unsafe(nil), &block); end + + # pkg:gem/cgi#lib/cgi/html.rb:995 + def wbr(attributes = T.unsafe(nil), &block); end +end + +# Mixin module providing HTML generation methods. +# +# For example, +# cgi.a("http://www.example.com") { "Example" } +# # => "Example" +# +# Modules Html3, Html4, etc., contain more basic HTML-generation methods +# (+#title+, +#h1+, etc.). +# +# See class CGI for a detailed example. +# +# pkg:gem/cgi#lib/cgi/html.rb:79 +module CGI::HtmlExtension + # Generate an Anchor element as a string. + # + # +href+ can either be a string, giving the URL + # for the HREF attribute, or it can be a hash of + # the element's attributes. + # + # The body of the element is the string returned by the no-argument + # block passed in. + # + # a("http://www.example.com") { "Example" } + # # => "Example" + # + # a("HREF" => "http://www.example.com", "TARGET" => "_top") { "Example" } + # # => "Example" + # + # pkg:gem/cgi#lib/cgi/html.rb:97 + def a(href = T.unsafe(nil)); end + + # Generate a Document Base URI element as a String. + # + # +href+ can either by a string, giving the base URL for the HREF + # attribute, or it can be a has of the element's attributes. + # + # The passed-in no-argument block is ignored. + # + # base("http://www.example.com/cgi") + # # => "" + # + # pkg:gem/cgi#lib/cgi/html.rb:115 + def base(href = T.unsafe(nil)); end + + # Generate a BlockQuote element as a string. + # + # +cite+ can either be a string, give the URI for the source of + # the quoted text, or a hash, giving all attributes of the element, + # or it can be omitted, in which case the element has no attributes. + # + # The body is provided by the passed-in no-argument block + # + # blockquote("http://www.example.com/quotes/foo.html") { "Foo!" } + # #=> "
Foo!
+ # + # pkg:gem/cgi#lib/cgi/html.rb:134 + def blockquote(cite = T.unsafe(nil)); end + + # Generate a Table Caption element as a string. + # + # +align+ can be a string, giving the alignment of the caption + # (one of top, bottom, left, or right). It can be a hash of + # all the attributes of the element. Or it can be omitted. + # + # The body of the element is provided by the passed-in no-argument block. + # + # caption("left") { "Capital Cities" } + # # => Capital Cities + # + # pkg:gem/cgi#lib/cgi/html.rb:154 + def caption(align = T.unsafe(nil)); end + + # Generate a Checkbox Input element as a string. + # + # The attributes of the element can be specified as three arguments, + # +name+, +value+, and +checked+. +checked+ is a boolean value; + # if true, the CHECKED attribute will be included in the element. + # + # Alternatively, the attributes can be specified as a hash. + # + # checkbox("name") + # # = checkbox("NAME" => "name") + # + # checkbox("name", "value") + # # = checkbox("NAME" => "name", "VALUE" => "value") + # + # checkbox("name", "value", true) + # # = checkbox("NAME" => "name", "VALUE" => "value", "CHECKED" => true) + # + # pkg:gem/cgi#lib/cgi/html.rb:180 + def checkbox(name = T.unsafe(nil), value = T.unsafe(nil), checked = T.unsafe(nil)); end + + # Generate a sequence of checkbox elements, as a String. + # + # The checkboxes will all have the same +name+ attribute. + # Each checkbox is followed by a label. + # There will be one checkbox for each value. Each value + # can be specified as a String, which will be used both + # as the value of the VALUE attribute and as the label + # for that checkbox. A single-element array has the + # same effect. + # + # Each value can also be specified as a three-element array. + # The first element is the VALUE attribute; the second is the + # label; and the third is a boolean specifying whether this + # checkbox is CHECKED. + # + # Each value can also be specified as a two-element + # array, by omitting either the value element (defaults + # to the same as the label), or the boolean checked element + # (defaults to false). + # + # checkbox_group("name", "foo", "bar", "baz") + # # foo + # # bar + # # baz + # + # checkbox_group("name", ["foo"], ["bar", true], "baz") + # # foo + # # bar + # # baz + # + # checkbox_group("name", ["1", "Foo"], ["2", "Bar", true], "Baz") + # # Foo + # # Bar + # # Baz + # + # checkbox_group("NAME" => "name", + # "VALUES" => ["foo", "bar", "baz"]) + # + # checkbox_group("NAME" => "name", + # "VALUES" => [["foo"], ["bar", true], "baz"]) + # + # checkbox_group("NAME" => "name", + # "VALUES" => [["1", "Foo"], ["2", "Bar", true], "Baz"]) + # + # pkg:gem/cgi#lib/cgi/html.rb:234 + def checkbox_group(name = T.unsafe(nil), *values); end + + # Generate an File Upload Input element as a string. + # + # The attributes of the element can be specified as three arguments, + # +name+, +size+, and +maxlength+. +maxlength+ is the maximum length + # of the file's _name_, not of the file's _contents_. + # + # Alternatively, the attributes can be specified as a hash. + # + # See #multipart_form() for forms that include file uploads. + # + # file_field("name") + # # + # + # file_field("name", 40) + # # + # + # file_field("name", 40, 100) + # # + # + # file_field("NAME" => "name", "SIZE" => 40) + # # + # + # pkg:gem/cgi#lib/cgi/html.rb:276 + def file_field(name = T.unsafe(nil), size = T.unsafe(nil), maxlength = T.unsafe(nil)); end + + # Generate a Form element as a string. + # + # +method+ should be either "get" or "post", and defaults to the latter. + # +action+ defaults to the current CGI script name. +enctype+ + # defaults to "application/x-www-form-urlencoded". + # + # Alternatively, the attributes can be specified as a hash. + # + # See also #multipart_form() for forms that include file uploads. + # + # form{ "string" } + # #
string
+ # + # form("get") { "string" } + # #
string
+ # + # form("get", "url") { "string" } + # #
string
+ # + # form("METHOD" => "post", "ENCTYPE" => "enctype") { "string" } + # #
string
+ # + # pkg:gem/cgi#lib/cgi/html.rb:310 + def form(method = T.unsafe(nil), action = T.unsafe(nil), enctype = T.unsafe(nil)); end + + # Generate a Hidden Input element as a string. + # + # The attributes of the element can be specified as two arguments, + # +name+ and +value+. + # + # Alternatively, the attributes can be specified as a hash. + # + # hidden("name") + # # + # + # hidden("name", "value") + # # + # + # hidden("NAME" => "name", "VALUE" => "reset", "ID" => "foo") + # # + # + # pkg:gem/cgi#lib/cgi/html.rb:351 + def hidden(name = T.unsafe(nil), value = T.unsafe(nil)); end + + # Generate a top-level HTML element as a string. + # + # The attributes of the element are specified as a hash. The + # pseudo-attribute "PRETTY" can be used to specify that the generated + # HTML string should be indented. "PRETTY" can also be specified as + # a string as the sole argument to this method. The pseudo-attribute + # "DOCTYPE", if given, is used as the leading DOCTYPE SGML tag; it + # should include the entire text of this tag, including angle brackets. + # + # The body of the html element is supplied as a block. + # + # html{ "string" } + # # string + # + # html("LANG" => "ja") { "string" } + # # string + # + # html("DOCTYPE" => false) { "string" } + # # string + # + # html("DOCTYPE" => '') { "string" } + # # string + # + # html("PRETTY" => " ") { "" } + # # + # # + # # + # # + # # + # + # html("PRETTY" => "\t") { "" } + # # + # # + # # + # # + # # + # + # html("PRETTY") { "" } + # # = html("PRETTY" => " ") { "" } + # + # html(if $VERBOSE then "PRETTY" end) { "HTML string" } + # + # pkg:gem/cgi#lib/cgi/html.rb:403 + def html(attributes = T.unsafe(nil)); end + + # Generate an Image Button Input element as a string. + # + # +src+ is the URL of the image to use for the button. +name+ + # is the input name. +alt+ is the alternative text for the image. + # + # Alternatively, the attributes can be specified as a hash. + # + # image_button("url") + # # + # + # image_button("url", "name", "string") + # # + # + # image_button("SRC" => "url", "ALT" => "string") + # # + # + # pkg:gem/cgi#lib/cgi/html.rb:448 + def image_button(src = T.unsafe(nil), name = T.unsafe(nil), alt = T.unsafe(nil)); end + + # Generate an Image element as a string. + # + # +src+ is the URL of the image. +alt+ is the alternative text for + # the image. +width+ is the width of the image, and +height+ is + # its height. + # + # Alternatively, the attributes can be specified as a hash. + # + # img("src", "alt", 100, 50) + # # alt + # + # img("SRC" => "src", "ALT" => "alt", "WIDTH" => 100, "HEIGHT" => 50) + # # alt + # + # pkg:gem/cgi#lib/cgi/html.rb:474 + def img(src = T.unsafe(nil), alt = T.unsafe(nil), width = T.unsafe(nil), height = T.unsafe(nil)); end + + # Generate a Form element with multipart encoding as a String. + # + # Multipart encoding is used for forms that include file uploads. + # + # +action+ is the action to perform. +enctype+ is the encoding + # type, which defaults to "multipart/form-data". + # + # Alternatively, the attributes can be specified as a hash. + # + # multipart_form{ "string" } + # #
string
+ # + # multipart_form("url") { "string" } + # #
string
+ # + # pkg:gem/cgi#lib/cgi/html.rb:500 + def multipart_form(action = T.unsafe(nil), enctype = T.unsafe(nil)); end + + # Generate a Password Input element as a string. + # + # +name+ is the name of the input field. +value+ is its default + # value. +size+ is the size of the input field display. +maxlength+ + # is the maximum length of the inputted password. + # + # Alternatively, attributes can be specified as a hash. + # + # password_field("name") + # # + # + # password_field("name", "value") + # # + # + # password_field("password", "value", 80, 200) + # # + # + # password_field("NAME" => "name", "VALUE" => "value") + # # + # + # pkg:gem/cgi#lib/cgi/html.rb:542 + def password_field(name = T.unsafe(nil), value = T.unsafe(nil), size = T.unsafe(nil), maxlength = T.unsafe(nil)); end + + # Generate a Select element as a string. + # + # +name+ is the name of the element. The +values+ are the options that + # can be selected from the Select menu. Each value can be a String or + # a one, two, or three-element Array. If a String or a one-element + # Array, this is both the value of that option and the text displayed for + # it. If a three-element Array, the elements are the option value, displayed + # text, and a boolean value specifying whether this option starts as selected. + # The two-element version omits either the option value (defaults to the same + # as the display text) or the boolean selected specifier (defaults to false). + # + # The attributes and options can also be specified as a hash. In this + # case, options are specified as an array of values as described above, + # with the hash key of "VALUES". + # + # popup_menu("name", "foo", "bar", "baz") + # # + # + # popup_menu("name", ["foo"], ["bar", true], "baz") + # # + # + # popup_menu("name", ["1", "Foo"], ["2", "Bar", true], "Baz") + # # + # + # popup_menu("NAME" => "name", "SIZE" => 2, "MULTIPLE" => true, + # "VALUES" => [["1", "Foo"], ["2", "Bar", true], "Baz"]) + # # + # + # pkg:gem/cgi#lib/cgi/html.rb:597 + def popup_menu(name = T.unsafe(nil), *values); end + + # Generates a radio-button Input element. + # + # +name+ is the name of the input field. +value+ is the value of + # the field if checked. +checked+ specifies whether the field + # starts off checked. + # + # Alternatively, the attributes can be specified as a hash. + # + # radio_button("name", "value") + # # + # + # radio_button("name", "value", true) + # # + # + # radio_button("NAME" => "name", "VALUE" => "value", "ID" => "foo") + # # + # + # pkg:gem/cgi#lib/cgi/html.rb:646 + def radio_button(name = T.unsafe(nil), value = T.unsafe(nil), checked = T.unsafe(nil)); end + + # Generate a sequence of radio button Input elements, as a String. + # + # This works the same as #checkbox_group(). However, it is not valid + # to have more than one radiobutton in a group checked. + # + # radio_group("name", "foo", "bar", "baz") + # # foo + # # bar + # # baz + # + # radio_group("name", ["foo"], ["bar", true], "baz") + # # foo + # # bar + # # baz + # + # radio_group("name", ["1", "Foo"], ["2", "Bar", true], "Baz") + # # Foo + # # Bar + # # Baz + # + # radio_group("NAME" => "name", + # "VALUES" => ["foo", "bar", "baz"]) + # + # radio_group("NAME" => "name", + # "VALUES" => [["foo"], ["bar", true], "baz"]) + # + # radio_group("NAME" => "name", + # "VALUES" => [["1", "Foo"], ["2", "Bar", true], "Baz"]) + # + # pkg:gem/cgi#lib/cgi/html.rb:685 + def radio_group(name = T.unsafe(nil), *values); end + + # Generate a reset button Input element, as a String. + # + # This resets the values on a form to their initial values. +value+ + # is the text displayed on the button. +name+ is the name of this button. + # + # Alternatively, the attributes can be specified as a hash. + # + # reset + # # + # + # reset("reset") + # # + # + # reset("VALUE" => "reset", "ID" => "foo") + # # + # + # pkg:gem/cgi#lib/cgi/html.rb:720 + def reset(value = T.unsafe(nil), name = T.unsafe(nil)); end + + # pkg:gem/cgi#lib/cgi/html.rb:730 + def scrolling_list(name = T.unsafe(nil), *values); end + + # Generate a submit button Input element, as a String. + # + # +value+ is the text to display on the button. +name+ is the name + # of the input. + # + # Alternatively, the attributes can be specified as a hash. + # + # submit + # # + # + # submit("ok") + # # + # + # submit("ok", "button1") + # # + # + # submit("VALUE" => "ok", "NAME" => "button1", "ID" => "foo") + # # + # + # pkg:gem/cgi#lib/cgi/html.rb:750 + def submit(value = T.unsafe(nil), name = T.unsafe(nil)); end + + # Generate a text field Input element, as a String. + # + # +name+ is the name of the input field. +value+ is its initial + # value. +size+ is the size of the input area. +maxlength+ + # is the maximum length of input accepted. + # + # Alternatively, the attributes can be specified as a hash. + # + # text_field("name") + # # + # + # text_field("name", "value") + # # + # + # text_field("name", "value", 80) + # # + # + # text_field("name", "value", 80, 200) + # # + # + # text_field("NAME" => "name", "VALUE" => "value") + # # + # + # pkg:gem/cgi#lib/cgi/html.rb:782 + def text_field(name = T.unsafe(nil), value = T.unsafe(nil), size = T.unsafe(nil), maxlength = T.unsafe(nil)); end + + # Generate a TextArea element, as a String. + # + # +name+ is the name of the textarea. +cols+ is the number of + # columns and +rows+ is the number of rows in the display. + # + # Alternatively, the attributes can be specified as a hash. + # + # The body is provided by the passed-in no-argument block + # + # textarea("name") + # # = textarea("NAME" => "name", "COLS" => 70, "ROWS" => 10) + # + # textarea("name", 40, 5) + # # = textarea("NAME" => "name", "COLS" => 40, "ROWS" => 5) + # + # pkg:gem/cgi#lib/cgi/html.rb:808 + def textarea(name = T.unsafe(nil), cols = T.unsafe(nil), rows = T.unsafe(nil)); end +end + +# Mixin module that provides the following: +# +# 1. Access to the CGI environment variables as methods. See +# documentation to the CGI class for a list of these variables. The +# methods are exposed by removing the leading +HTTP_+ (if it exists) and +# downcasing the name. For example, +auth_type+ will return the +# environment variable +AUTH_TYPE+, and +accept+ will return the value +# for +HTTP_ACCEPT+. +# +# 2. Access to cookies, including the cookies attribute. +# +# 3. Access to parameters, including the params attribute, and overloading +# #[] to perform parameter value lookup by key. +# +# 4. The initialize_query method, for initializing the above +# mechanisms, handling multipart forms, and allowing the +# class to be used in "offline" mode. +# +# pkg:gem/cgi#lib/cgi/core.rb:435 +module CGI::QueryExtension + # Get the value for the parameter with a given key. + # + # If the parameter has multiple values, only the first will be + # retrieved; use #params to get the array of values. + # + # pkg:gem/cgi#lib/cgi/core.rb:717 + def [](key); end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def accept; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def accept_charset; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def accept_encoding; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def accept_language; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def auth_type; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def cache_control; end + + # pkg:gem/cgi#lib/cgi/core.rb:438 + def content_length; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def content_type; end + + # Get the cookies as a hash of cookie-name=>Cookie pairs. + # + # pkg:gem/cgi#lib/cgi/core.rb:467 + def cookies; end + + # Get the cookies as a hash of cookie-name=>Cookie pairs. + # + # pkg:gem/cgi#lib/cgi/core.rb:467 + def cookies=(_arg0); end + + # pkg:gem/cgi#lib/cgi/core.rb:606 + def create_body(is_large); end + + # Get the uploaded files as a hash of name=>values pairs + # + # pkg:gem/cgi#lib/cgi/core.rb:474 + def files; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def from; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def gateway_interface; end + + # Returns true if a given query string parameter exists. + # + # pkg:gem/cgi#lib/cgi/core.rb:741 + def has_key?(*args); end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def host; end + + # pkg:gem/cgi#lib/cgi/core.rb:745 + def include?(*args); end + + # pkg:gem/cgi#lib/cgi/core.rb:744 + def key?(*args); end + + # Return all query parameter names as an array of String. + # + # pkg:gem/cgi#lib/cgi/core.rb:736 + def keys(*args); end + + # Returns whether the form contained multipart/form-data + # + # pkg:gem/cgi#lib/cgi/core.rb:709 + def multipart?; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def negotiate; end + + # Get the parameters as a hash of name=>values pairs, where + # values is an Array. + # + # pkg:gem/cgi#lib/cgi/core.rb:471 + def params; end + + # Set all the parameters. + # + # pkg:gem/cgi#lib/cgi/core.rb:477 + def params=(hash); end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def path_info; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def path_translated; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def pragma; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def query_string; end + + # Get the raw cookies as a string. + # + # pkg:gem/cgi#lib/cgi/core.rb:457 + def raw_cookie; end + + # Get the raw RFC2965 cookies as a string. + # + # pkg:gem/cgi#lib/cgi/core.rb:462 + def raw_cookie2; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def referer; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def remote_addr; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def remote_host; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def remote_ident; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def remote_user; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def request_method; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def script_name; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def server_name; end + + # pkg:gem/cgi#lib/cgi/core.rb:438 + def server_port; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def server_protocol; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def server_software; end + + # pkg:gem/cgi#lib/cgi/core.rb:622 + def unescape_filename?; end + + # pkg:gem/cgi#lib/cgi/core.rb:451 + def user_agent; end + + private + + # A wrapper class to use a StringIO object as the body and switch + # to a TempFile when the passed threshold is passed. + # Initialize the data from the query. + # + # Handles multipart forms (in particular, forms that involve file uploads). + # Reads query parameters in the @params field, and cookies into @cookies. + # + # pkg:gem/cgi#lib/cgi/core.rb:664 + def initialize_query; end + + # offline mode. read name=value pairs on standard input. + # + # pkg:gem/cgi#lib/cgi/core.rb:629 + def read_from_cmdline; end + + # Parses multipart form elements according to + # http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2 + # + # Returns a hash of multipart form parameters with bodies of type StringIO or + # Tempfile depending on whether the multipart form element exceeds 10 KB + # + # params[name => body] + # + # pkg:gem/cgi#lib/cgi/core.rb:491 + def read_multipart(boundary, content_length); end +end + +# Base module for HTML-generation mixins. +# +# Provides methods for code generation for tags following +# the various DTD element types. +# +# pkg:gem/cgi#lib/cgi/html.rb:7 +module CGI::TagMaker + # Generate code for an empty element. + # + # - O EMPTY + # + # pkg:gem/cgi#lib/cgi/html.rb:27 + def nOE_element(element, attributes = T.unsafe(nil)); end + + # pkg:gem/cgi#lib/cgi/html.rb:43 + def nOE_element_def(attributes = T.unsafe(nil), &block); end + + # Generate code for an element for which the end (and possibly the + # start) tag is optional. + # + # O O or - O + # + # pkg:gem/cgi#lib/cgi/html.rb:52 + def nO_element(element, attributes = T.unsafe(nil)); end + + # pkg:gem/cgi#lib/cgi/html.rb:61 + def nO_element_def(attributes = T.unsafe(nil), &block); end + + # Generate code for an element with required start and end tags. + # + # - - + # + # pkg:gem/cgi#lib/cgi/html.rb:12 + def nn_element(element, attributes = T.unsafe(nil)); end + + # pkg:gem/cgi#lib/cgi/html.rb:20 + def nn_element_def(attributes = T.unsafe(nil), &block); end +end + +# Utility methods for CGI. +# +# pkg:gem/cgi#lib/cgi/util.rb:3 +module CGI::Util + # Prettify (indent) an HTML string. + # + # +string+ is the HTML string to indent. +shift+ is the indentation + # unit to use; it defaults to two spaces. + # + # print CGI.pretty("") + # # + # # + # # + # # + # + # print CGI.pretty("", "\t") + # # + # # + # # + # # + # + # pkg:gem/cgi#lib/cgi/util.rb:35 + def pretty(string, shift = T.unsafe(nil)); end + + # Format a +Time+ object as a String using the format specified by RFC 1123. + # + # CGI.rfc1123_date(Time.now) + # # Sat, 01 Jan 2000 00:00:00 GMT + # + # pkg:gem/cgi#lib/cgi/util.rb:14 + def rfc1123_date(time); end +end + +# The version string +# +# pkg:gem/cgi#lib/cgi.rb:303 +CGI::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi b/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi deleted file mode 100644 index 6cbd58fb4..000000000 --- a/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +++ /dev/null @@ -1,11656 +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`. - -# {include:file:README.md} -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/constants.rb#1 -module Concurrent - extend ::Concurrent::Utility::EngineDetector - extend ::Concurrent::Utility::NativeExtensionLoader - extend ::Concurrent::Concern::Logging - extend ::Concurrent::Concern::Deprecation - - private - - # Abort a currently running transaction - see `Concurrent::atomically`. - # - # @raise [Transaction::AbortError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#139 - def abort_transaction; end - - # Run a block that reads and writes `TVar`s as a single atomic transaction. - # With respect to the value of `TVar` objects, the transaction is atomic, in - # that it either happens or it does not, consistent, in that the `TVar` - # objects involved will never enter an illegal state, and isolated, in that - # transactions never interfere with each other. You may recognise these - # properties from database transactions. - # - # There are some very important and unusual semantics that you must be aware of: - # - # * Most importantly, the block that you pass to atomically may be executed - # more than once. In most cases your code should be free of - # side-effects, except for via TVar. - # - # * If an exception escapes an atomically block it will abort the transaction. - # - # * It is undefined behaviour to use callcc or Fiber with atomically. - # - # * If you create a new thread within an atomically, it will not be part of - # the transaction. Creating a thread counts as a side-effect. - # - # Transactions within transactions are flattened to a single transaction. - # - # @example - # a = new TVar(100_000) - # b = new TVar(100) - # - # Concurrent::atomically do - # a.value -= 10 - # b.value += 10 - # end - # @raise [ArgumentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#82 - def atomically; end - - # @raise [ArgumentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#56 - def call_dataflow(method, executor, *inputs, &block); end - - # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. - # {include:file:docs-source/dataflow.md} - # - # @param inputs [Future] zero or more `Future` operations that this dataflow depends upon - # @raise [ArgumentError] if no block is given - # @raise [ArgumentError] if any of the inputs are not `IVar`s - # @return [Object] the result of all the operations - # @yield The operation to perform once all the dependencies are met - # @yieldparam inputs [Future] each of the `Future` inputs to the dataflow - # @yieldreturn [Object] the result of the block operation - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#34 - def dataflow(*inputs, &block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#44 - def dataflow!(*inputs, &block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#39 - def dataflow_with(executor, *inputs, &block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#49 - def dataflow_with!(executor, *inputs, &block); end - - # Leave a transaction without committing or aborting - see `Concurrent::atomically`. - # - # @raise [Transaction::LeaveError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#144 - def leave_transaction; end - - # Returns the current time as tracked by the application monotonic clock. - # - # @param unit [Symbol] the time unit to be returned, can be either - # :float_second, :float_millisecond, :float_microsecond, :second, - # :millisecond, :microsecond, or :nanosecond default to :float_second. - # @return [Float] The current monotonic time since some unspecified - # starting point - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/monotonic_time.rb#15 - def monotonic_time(unit = T.unsafe(nil)); end - - class << self - # Abort a currently running transaction - see `Concurrent::atomically`. - # - # @raise [Transaction::AbortError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#139 - def abort_transaction; end - - # Run a block that reads and writes `TVar`s as a single atomic transaction. - # With respect to the value of `TVar` objects, the transaction is atomic, in - # that it either happens or it does not, consistent, in that the `TVar` - # objects involved will never enter an illegal state, and isolated, in that - # transactions never interfere with each other. You may recognise these - # properties from database transactions. - # - # There are some very important and unusual semantics that you must be aware of: - # - # * Most importantly, the block that you pass to atomically may be executed - # more than once. In most cases your code should be free of - # side-effects, except for via TVar. - # - # * If an exception escapes an atomically block it will abort the transaction. - # - # * It is undefined behaviour to use callcc or Fiber with atomically. - # - # * If you create a new thread within an atomically, it will not be part of - # the transaction. Creating a thread counts as a side-effect. - # - # Transactions within transactions are flattened to a single transaction. - # - # @example - # a = new TVar(100_000) - # b = new TVar(100) - # - # Concurrent::atomically do - # a.value -= 10 - # b.value += 10 - # end - # @raise [ArgumentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#82 - def atomically; end - - # Number of processors cores available for process scheduling. - # This method takes in account the CPU quota if the process is inside a cgroup with a - # dedicated CPU quota (typically Docker). - # Otherwise it returns the same value as #processor_count but as a Float. - # - # For performance reasons the calculated value will be memoized on the first - # call. - # - # @return [Float] number of available processors - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#194 - def available_processor_count; end - - # @raise [ArgumentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#56 - def call_dataflow(method, executor, *inputs, &block); end - - # The maximum number of processors cores available for process scheduling. - # Returns `nil` if there is no enforced limit, or a `Float` if the - # process is inside a cgroup with a dedicated CPU quota (typically Docker). - # - # Note that nothing prevents setting a CPU quota higher than the actual number of - # cores on the system. - # - # For performance reasons the calculated value will be memoized on the first - # call. - # - # @return [nil, Float] Maximum number of available processors as set by a cgroup CPU quota, or nil if none set - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#209 - def cpu_quota; end - - # The CPU shares requested by the process. For performance reasons the calculated - # value will be memoized on the first call. - # - # @return [Float, nil] CPU shares requested by the process, or nil if not set - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#217 - def cpu_shares; end - - # Create a simple logger with provided level and output. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#38 - def create_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end - - # Create a stdlib logger with provided level and output. - # If you use this deprecated method you might need to add logger to your Gemfile to avoid warnings from Ruby 3.3.5+. - # - # @deprecated - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#73 - def create_stdlib_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end - - # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. - # {include:file:docs-source/dataflow.md} - # - # @param inputs [Future] zero or more `Future` operations that this dataflow depends upon - # @raise [ArgumentError] if no block is given - # @raise [ArgumentError] if any of the inputs are not `IVar`s - # @return [Object] the result of all the operations - # @yield The operation to perform once all the dependencies are met - # @yieldparam inputs [Future] each of the `Future` inputs to the dataflow - # @yieldreturn [Object] the result of the block operation - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#34 - def dataflow(*inputs, &block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#44 - def dataflow!(*inputs, &block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#39 - def dataflow_with(executor, *inputs, &block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#49 - def dataflow_with!(executor, *inputs, &block); end - - # Disables AtExit handlers including pool auto-termination handlers. - # When disabled it will be the application programmer's responsibility - # to ensure that the handlers are shutdown properly prior to application - # exit by calling `AtExit.run` method. - # - # @deprecated Has no effect since it is no longer needed, see https://github.com/ruby-concurrency/concurrent-ruby/pull/841. - # @note this option should be needed only because of `at_exit` ordering - # issues which may arise when running some of the testing frameworks. - # E.g. Minitest's test-suite runs itself in `at_exit` callback which - # executes after the pools are already terminated. Then auto termination - # needs to be disabled and called manually after test-suite ends. - # @note This method should *never* be called - # from within a gem. It should *only* be used from within the main - # application and even then it should be used only when necessary. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#48 - def disable_at_exit_handlers!; end - - # General access point to global executors. - # - # @param executor_identifier [Symbol, Executor] symbols: - # - :fast - {Concurrent.global_fast_executor} - # - :io - {Concurrent.global_io_executor} - # - :immediate - {Concurrent.global_immediate_executor} - # @return [Executor] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#83 - def executor(executor_identifier); end - - # Global thread pool optimized for short, fast *operations*. - # - # @return [ThreadPoolExecutor] the thread pool - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#55 - def global_fast_executor; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#66 - def global_immediate_executor; end - - # Global thread pool optimized for long, blocking (IO) *tasks*. - # - # @return [ThreadPoolExecutor] the thread pool - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#62 - def global_io_executor; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#114 - def global_logger; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#118 - def global_logger=(value); end - - # Global thread pool user for global *timers*. - # - # @return [Concurrent::TimerSet] the thread pool - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#73 - def global_timer_set; end - - # Leave a transaction without committing or aborting - see `Concurrent::atomically`. - # - # @raise [Transaction::LeaveError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#144 - def leave_transaction; end - - # Returns the current time as tracked by the application monotonic clock. - # - # @param unit [Symbol] the time unit to be returned, can be either - # :float_second, :float_millisecond, :float_microsecond, :second, - # :millisecond, :microsecond, or :nanosecond default to :float_second. - # @return [Float] The current monotonic time since some unspecified - # starting point - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/monotonic_time.rb#15 - def monotonic_time(unit = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb#7 - def mutex_owned_per_thread?; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#87 - def new_fast_executor(opts = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#98 - def new_io_executor(opts = T.unsafe(nil)); end - - # Number of physical processor cores on the current system. For performance - # reasons the calculated value will be memoized on the first call. - # - # On Windows the Win32 API will be queried for the `NumberOfCores from - # Win32_Processor`. This will return the total number "of cores for the - # current instance of the processor." On Unix-like operating systems either - # the `hwprefs` or `sysctl` utility will be called in a subshell and the - # returned value will be used. In the rare case where none of these methods - # work or an exception is raised the function will simply return 1. - # - # @return [Integer] number physical processor cores on the current system - # @see https://github.com/grosser/parallel/blob/4fc8b89d08c7091fe0419ca8fba1ec3ce5a8d185/lib/parallel.rb - # @see http://msdn.microsoft.com/en-us/library/aa394373(v=vs.85).aspx - # @see http://www.unix.com/man-page/osx/1/HWPREFS/ - # @see http://linux.die.net/man/8/sysctl - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#181 - def physical_processor_count; end - - # Number of processors seen by the OS and used for process scheduling. For - # performance reasons the calculated value will be memoized on the first - # call. - # - # When running under JRuby the Java runtime call - # `java.lang.Runtime.getRuntime.availableProcessors` will be used. According - # to the Java documentation this "value may change during a particular - # invocation of the virtual machine... [applications] should therefore - # occasionally poll this property." We still memoize this value once under - # JRuby. - # - # Otherwise Ruby's Etc.nprocessors will be used. - # - # @return [Integer] number of processors seen by the OS or Java runtime - # @see http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html#availableProcessors() - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#160 - def processor_count; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#142 - def processor_counter; end - - # Use logger created by #create_simple_logger to log concurrent-ruby messages. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#66 - def use_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end - - # Use logger created by #create_stdlib_logger to log concurrent-ruby messages. - # - # @deprecated - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#101 - def use_stdlib_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end - end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#38 -class Concurrent::AbstractExchanger < ::Concurrent::Synchronization::Object - # @return [AbstractExchanger] a new instance of AbstractExchanger - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#44 - def initialize; end - - # Waits for another thread to arrive at this exchange point (unless the - # current thread is interrupted), and then transfers the given object to - # it, receiving its object in return. The timeout value indicates the - # approximate number of seconds the method should block while waiting - # for the exchange. When the timeout value is `nil` the method will - # block indefinitely. - # - # - # In some edge cases when a `timeout` is given a return value of `nil` may be - # ambiguous. Specifically, if `nil` is a valid value in the exchange it will - # be impossible to tell whether `nil` is the actual return value or if it - # signifies timeout. When `nil` is a valid value in the exchange consider - # using {#exchange!} or {#try_exchange} instead. - # - # @param value [Object] the value to exchange with another thread - # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely - # @return [Object] the value exchanged by the other thread or `nil` on timeout - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#69 - def exchange(value, timeout = T.unsafe(nil)); end - - # Waits for another thread to arrive at this exchange point (unless the - # current thread is interrupted), and then transfers the given object to - # it, receiving its object in return. The timeout value indicates the - # approximate number of seconds the method should block while waiting - # for the exchange. When the timeout value is `nil` the method will - # block indefinitely. - # - # - # On timeout a {Concurrent::TimeoutError} exception will be raised. - # - # @param value [Object] the value to exchange with another thread - # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely - # @raise [Concurrent::TimeoutError] on timeout - # @return [Object] the value exchanged by the other thread - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#80 - def exchange!(value, timeout = T.unsafe(nil)); end - - # Waits for another thread to arrive at this exchange point (unless the - # current thread is interrupted), and then transfers the given object to - # it, receiving its object in return. The timeout value indicates the - # approximate number of seconds the method should block while waiting - # for the exchange. When the timeout value is `nil` the method will - # block indefinitely. - # - # - # The return value will be a {Concurrent::Maybe} set to `Just` on success or - # `Nothing` on timeout. - # - # @example - # - # exchanger = Concurrent::Exchanger.new - # - # result = exchanger.exchange(:foo, 0.5) - # - # if result.just? - # puts result.value #=> :bar - # else - # puts 'timeout' - # end - # @param value [Object] the value to exchange with another thread - # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely - # @return [Concurrent::Maybe] on success a `Just` maybe will be returned with - # the item exchanged by the other thread as `#value`; on timeout a - # `Nothing` maybe will be returned with {Concurrent::TimeoutError} as `#reason` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#109 - def try_exchange(value, timeout = T.unsafe(nil)); end - - private - - # Waits for another thread to arrive at this exchange point (unless the - # current thread is interrupted), and then transfers the given object to - # it, receiving its object in return. The timeout value indicates the - # approximate number of seconds the method should block while waiting - # for the exchange. When the timeout value is `nil` the method will - # block indefinitely. - # - # @param value [Object] the value to exchange with another thread - # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely - # @raise [NotImplementedError] - # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#122 - def do_exchange(value, timeout); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#41 -Concurrent::AbstractExchanger::CANCEL = T.let(T.unsafe(nil), Object) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#10 -class Concurrent::AbstractExecutorService < ::Concurrent::Synchronization::LockableObject - include ::Concurrent::Concern::Logging - include ::Concurrent::ExecutorService - include ::Concurrent::Concern::Deprecation - - # Create a new thread pool. - # - # @return [AbstractExecutorService] a new instance of AbstractExecutorService - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#23 - def initialize(opts = T.unsafe(nil), &block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#72 - def auto_terminate=(value); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#67 - def auto_terminate?; end - - # Returns the value of attribute fallback_policy. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#18 - def fallback_policy; end - - # @raise [NotImplementedError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#42 - def kill; end - - # Returns the value of attribute name. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#20 - def name; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#52 - def running?; end - - # @raise [NotImplementedError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#37 - def shutdown; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#62 - def shutdown?; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#57 - def shuttingdown?; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#32 - def to_s; end - - # @raise [NotImplementedError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#47 - def wait_for_termination(timeout = T.unsafe(nil)); end - - private - - # Returns an action which executes the `fallback_policy` once the queue - # size reaches `max_queue`. The reason for the indirection of an action - # is so that the work can be deferred outside of synchronization. - # - # @param args [Array] the arguments to the task which is being handled. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#85 - def fallback_action(*args); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#126 - def ns_auto_terminate?; end - - # @raise [NotImplementedError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#106 - def ns_execute(*args, &task); end - - # Callback method called when the executor has been killed. - # The default behavior is to do nothing. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#122 - def ns_kill_execution; end - - # Callback method called when an orderly shutdown has completed. - # The default behavior is to signal all waiting threads. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#114 - def ns_shutdown_execution; end -end - -# The set of possible fallback policies that may be set at thread pool creation. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#15 -Concurrent::AbstractExecutorService::FALLBACK_POLICIES = T.let(T.unsafe(nil), Array) - -# An abstract implementation of local storage, with sub-classes for -# per-thread and per-fiber locals. -# -# Each execution context (EC, thread or fiber) has a lazily initialized array -# of local variable values. Each time a new local variable is created, we -# allocate an "index" for it. -# -# For example, if the allocated index is 1, that means slot #1 in EVERY EC's -# locals array will be used for the value of that variable. -# -# The good thing about using a per-EC structure to hold values, rather than -# a global, is that no synchronization is needed when reading and writing -# those values (since the structure is only ever accessed by a single -# thread). -# -# Of course, when a local variable is GC'd, 1) we need to recover its index -# for use by other new local variables (otherwise the locals arrays could -# get bigger and bigger with time), and 2) we need to null out all the -# references held in the now-unused slots (both to avoid blocking GC of those -# objects, and also to prevent "stale" values from being passed on to a new -# local when the index is reused). -# -# Because we need to null out freed slots, we need to keep references to -# ALL the locals arrays, so we can null out the appropriate slots in all of -# them. This is why we need to use a finalizer to clean up the locals array -# when the EC goes out of scope. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#35 -class Concurrent::AbstractLocals - # @return [AbstractLocals] a new instance of AbstractLocals - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#36 - def initialize; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#89 - def fetch(index); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#71 - def free_index(index); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#55 - def next_index(local); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#102 - def set(index, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#43 - def synchronize; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#48 - def weak_synchronize; end - - private - - # When the local goes out of scope, clean up that slot across all locals currently assigned. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#112 - def local_finalizer(index); end - - # Returns the locals for the current scope, or nil if none exist. - # - # @raise [NotImplementedError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#128 - def locals; end - - # Returns the locals for the current scope, creating them if necessary. - # - # @raise [NotImplementedError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#133 - def locals!; end - - # When a thread/fiber goes out of scope, remove the array from @all_arrays. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#119 - def thread_fiber_finalizer(array_object_id); end -end - -# `Agent` is inspired by Clojure's [agent](http://clojure.org/agents) -# function. An agent is a shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. `Agent` is (mostly) -# functionally equivalent to Clojure's agent, except where the runtime -# prevents parity. -# -# Agents are reactive, not autonomous - there is no imperative message loop -# and no blocking receive. The state of an Agent should be itself immutable -# and the `#value` of an Agent is always immediately available for reading by -# any thread without any messages, i.e. observation does not require -# cooperation or coordination. -# -# Agent action dispatches are made using the various `#send` methods. These -# methods always return immediately. At some point later, in another thread, -# the following will happen: -# -# 1. The given `action` will be applied to the state of the Agent and the -# `args`, if any were supplied. -# 2. The return value of `action` will be passed to the validator lambda, -# if one has been set on the Agent. -# 3. If the validator succeeds or if no validator was given, the return value -# of the given `action` will become the new `#value` of the Agent. See -# `#initialize` for details. -# 4. If any observers were added to the Agent, they will be notified. See -# `#add_observer` for details. -# 5. If during the `action` execution any other dispatches are made (directly -# or indirectly), they will be held until after the `#value` of the Agent -# has been changed. -# -# If any exceptions are thrown by an action function, no nested dispatches -# will occur, and the exception will be cached in the Agent itself. When an -# Agent has errors cached, any subsequent interactions will immediately throw -# an exception, until the agent's errors are cleared. Agent errors can be -# examined with `#error` and the agent restarted with `#restart`. -# -# The actions of all Agents get interleaved amongst threads in a thread pool. -# At any point in time, at most one action for each Agent is being executed. -# Actions dispatched to an agent from another single agent or thread will -# occur in the order they were sent, potentially interleaved with actions -# dispatched to the same agent from other sources. The `#send` method should -# be used for actions that are CPU limited, while the `#send_off` method is -# appropriate for actions that may block on IO. -# -# Unlike in Clojure, `Agent` cannot participate in `Concurrent::TVar` transactions. -# -# ## Example -# -# ``` -# def next_fibonacci(set = nil) -# return [0, 1] if set.nil? -# set + [set[-2..-1].reduce{|sum,x| sum + x }] -# end -# -# # create an agent with an initial value -# agent = Concurrent::Agent.new(next_fibonacci) -# -# # send a few update requests -# 5.times do -# agent.send{|set| next_fibonacci(set) } -# end -# -# # wait for them to complete -# agent.await -# -# # get the current value -# agent.value #=> [0, 1, 1, 2, 3, 5, 8] -# ``` -# -# ## Observation -# -# Agents support observers through the {Concurrent::Observable} mixin module. -# Notification of observers occurs every time an action dispatch returns and -# the new value is successfully validated. Observation will *not* occur if the -# action raises an exception, if validation fails, or when a {#restart} occurs. -# -# When notified the observer will receive three arguments: `time`, `old_value`, -# and `new_value`. The `time` argument is the time at which the value change -# occurred. The `old_value` is the value of the Agent when the action began -# processing. The `new_value` is the value to which the Agent was set when the -# action completed. Note that `old_value` and `new_value` may be the same. -# This is not an error. It simply means that the action returned the same -# value. -# -# ## Nested Actions -# -# It is possible for an Agent action to post further actions back to itself. -# The nested actions will be enqueued normally then processed *after* the -# outer action completes, in the order they were sent, possibly interleaved -# with action dispatches from other threads. Nested actions never deadlock -# with one another and a failure in a nested action will never affect the -# outer action. -# -# Nested actions can be called using the Agent reference from the enclosing -# scope or by passing the reference in as a "send" argument. Nested actions -# cannot be post using `self` from within the action block/proc/lambda; `self` -# in this context will not reference the Agent. The preferred method for -# dispatching nested actions is to pass the Agent as an argument. This allows -# Ruby to more effectively manage the closing scope. -# -# Prefer this: -# -# ``` -# agent = Concurrent::Agent.new(0) -# agent.send(agent) do |value, this| -# this.send {|v| v + 42 } -# 3.14 -# end -# agent.value #=> 45.14 -# ``` -# -# Over this: -# -# ``` -# agent = Concurrent::Agent.new(0) -# agent.send do |value| -# agent.send {|v| v + 42 } -# 3.14 -# end -# ``` -# -# -# **NOTE** Never, *under any circumstances*, call any of the "await" methods -# ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action -# block/proc/lambda. The call will block the Agent and will always fail. -# Calling either {#await} or {#wait} (with a timeout of `nil`) will -# hopelessly deadlock the Agent with no possibility of recovery. -# -# @see http://clojure.org/Agents Clojure Agents -# @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#145 -class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject - include ::Concurrent::Concern::Observable - - # Create a new `Agent` with the given initial value and options. - # - # The `:validator` option must be `nil` or a side-effect free proc/lambda - # which takes one argument. On any intended value change the validator, if - # provided, will be called. If the new value is invalid the validator should - # return `false` or raise an error. - # - # The `:error_handler` option must be `nil` or a proc/lambda which takes two - # arguments. When an action raises an error or validation fails, either by - # returning false or raising an error, the error handler will be called. The - # arguments to the error handler will be a reference to the agent itself and - # the error object which was raised. - # - # The `:error_mode` may be either `:continue` (the default if an error - # handler is given) or `:fail` (the default if error handler nil or not - # given). - # - # If an action being run by the agent throws an error or doesn't pass - # validation the error handler, if present, will be called. After the - # handler executes if the error mode is `:continue` the Agent will continue - # as if neither the action that caused the error nor the error itself ever - # happened. - # - # If the mode is `:fail` the Agent will become {#failed?} and will stop - # accepting new action dispatches. Any previously queued actions will be - # held until {#restart} is called. The {#value} method will still work, - # returning the value of the Agent before the error. - # - # @option opts - # @option opts - # @option opts - # @param initial [Object] the initial value - # @param opts [Hash] the configuration options - # @return [Agent] a new instance of Agent - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#220 - def initialize(initial, opts = T.unsafe(nil)); end - - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Appropriate for actions that may block on IO. - # - # @param action [Proc] the action dispatch to be enqueued - # @return [Concurrent::Agent] self - # @see #send_off - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#331 - def <<(action); end - - # Blocks the current thread (indefinitely!) until all actions dispatched - # thus far, from this thread or nested by the Agent, have occurred. Will - # block when {#failed?}. Will never return if a failed Agent is {#restart} - # with `:clear_actions` true. - # - # Returns a reference to `self` to support method chaining: - # - # ``` - # current_value = agent.await.value - # ``` - # - # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # - # @return [Boolean] self - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#350 - def await; end - - # Blocks the current thread until all actions dispatched thus far, from this - # thread or nested by the Agent, have occurred, or the timeout (in seconds) - # has elapsed. - # - # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # - # @param timeout [Float] the maximum number of seconds to wait - # @return [Boolean] true if all actions complete before timeout else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#363 - def await_for(timeout); end - - # Blocks the current thread until all actions dispatched thus far, from this - # thread or nested by the Agent, have occurred, or the timeout (in seconds) - # has elapsed. - # - # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # - # @param timeout [Float] the maximum number of seconds to wait - # @raise [Concurrent::TimeoutError] when timeout is reached - # @return [Boolean] true if all actions complete before timeout - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#377 - def await_for!(timeout); end - - # The current value (state) of the Agent, irrespective of any pending or - # in-progress actions. The value is always available and is non-blocking. - # - # @return [Object] the current value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#229 - def deref; end - - # When {#failed?} and {#error_mode} is `:fail`, returns the error object - # which caused the failure, else `nil`. When {#error_mode} is `:continue` - # will *always* return `nil`. - # - # @return [nil, Error] the error which caused the failure when {#failed?} - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#240 - def error; end - - # The error mode this Agent is operating in. See {#initialize} for details. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#184 - def error_mode; end - - # Is the Agent in a failed state? - # - # @return [Boolean] - # @see #restart - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#402 - def failed?; end - - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param args [Array] zero or more arguments to be passed to - # the action - # @param action [Proc] the action dispatch to be enqueued - # @return [Boolean] true if the action is successfully enqueued, false if - # the Agent is {#failed?} - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam value [Object] the current {#value} of the Agent - # @yieldparam args [Array] zero or more arguments to pass to the - # action - # @yieldreturn [Object] the new value of the Agent - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#294 - def post(*args, &action); end - - # When {#failed?} and {#error_mode} is `:fail`, returns the error object - # which caused the failure, else `nil`. When {#error_mode} is `:continue` - # will *always* return `nil`. - # - # @return [nil, Error] the error which caused the failure when {#failed?} - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#240 - def reason; end - - # When an Agent is {#failed?}, changes the Agent {#value} to `new_value` - # then un-fails the Agent so that action dispatches are allowed again. If - # the `:clear_actions` option is give and true, any actions queued on the - # Agent that were being held while it was failed will be discarded, - # otherwise those held actions will proceed. The `new_value` must pass the - # validator if any, or `restart` will raise an exception and the Agent will - # remain failed with its old {#value} and {#error}. Observers, if any, will - # not be notified of the new state. - # - # @option opts - # @param new_value [Object] the new value for the Agent once restarted - # @param opts [Hash] the configuration options - # @raise [Concurrent:AgentError] when not failed - # @return [Boolean] true - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#424 - def restart(new_value, opts = T.unsafe(nil)); end - - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param args [Array] zero or more arguments to be passed to - # the action - # @param action [Proc] the action dispatch to be enqueued - # @return [Boolean] true if the action is successfully enqueued, false if - # the Agent is {#failed?} - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam value [Object] the current {#value} of the Agent - # @yieldparam args [Array] zero or more arguments to pass to the - # action - # @yieldreturn [Object] the new value of the Agent - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#278 - def send(*args, &action); end - - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param args [Array] zero or more arguments to be passed to - # the action - # @param action [Proc] the action dispatch to be enqueued - # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} - # @return [Boolean] true if the action is successfully enqueued - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam value [Object] the current {#value} of the Agent - # @yieldparam args [Array] zero or more arguments to pass to the - # action - # @yieldreturn [Object] the new value of the Agent - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#287 - def send!(*args, &action); end - - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param args [Array] zero or more arguments to be passed to - # the action - # @param action [Proc] the action dispatch to be enqueued - # @return [Boolean] true if the action is successfully enqueued, false if - # the Agent is {#failed?} - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam value [Object] the current {#value} of the Agent - # @yieldparam args [Array] zero or more arguments to pass to the - # action - # @yieldreturn [Object] the new value of the Agent - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#294 - def send_off(*args, &action); end - - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param args [Array] zero or more arguments to be passed to - # the action - # @param action [Proc] the action dispatch to be enqueued - # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} - # @return [Boolean] true if the action is successfully enqueued - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam value [Object] the current {#value} of the Agent - # @yieldparam args [Array] zero or more arguments to pass to the - # action - # @yieldreturn [Object] the new value of the Agent - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#302 - def send_off!(*args, &action); end - - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param args [Array] zero or more arguments to be passed to - # the action - # @param action [Proc] the action dispatch to be enqueued - # @param executor [Concurrent::ExecutorService] the executor on which the - # action is to be dispatched - # @return [Boolean] true if the action is successfully enqueued, false if - # the Agent is {#failed?} - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam value [Object] the current {#value} of the Agent - # @yieldparam args [Array] zero or more arguments to pass to the - # action - # @yieldreturn [Object] the new value of the Agent - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#311 - def send_via(executor, *args, &action); end - - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param args [Array] zero or more arguments to be passed to - # the action - # @param action [Proc] the action dispatch to be enqueued - # @param executor [Concurrent::ExecutorService] the executor on which the - # action is to be dispatched - # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} - # @return [Boolean] true if the action is successfully enqueued - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam value [Object] the current {#value} of the Agent - # @yieldparam args [Array] zero or more arguments to pass to the - # action - # @yieldreturn [Object] the new value of the Agent - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#319 - def send_via!(executor, *args, &action); end - - # Is the Agent in a failed state? - # - # @return [Boolean] - # @see #restart - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#402 - def stopped?; end - - # The current value (state) of the Agent, irrespective of any pending or - # in-progress actions. The value is always available and is non-blocking. - # - # @return [Object] the current value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#229 - def value; end - - # Blocks the current thread until all actions dispatched thus far, from this - # thread or nested by the Agent, have occurred, or the timeout (in seconds) - # has elapsed. Will block indefinitely when timeout is nil or not given. - # - # Provided mainly for consistency with other classes in this library. Prefer - # the various `await` methods instead. - # - # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # - # @param timeout [Float] the maximum number of seconds to wait - # @return [Boolean] true if all actions complete before timeout else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#393 - def wait(timeout = T.unsafe(nil)); end - - private - - # @raise [ArgumentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#510 - def enqueue_action_job(action, args, executor); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#516 - def enqueue_await_job(latch); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#543 - def execute_next_job; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#576 - def handle_error(error); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#529 - def ns_enqueue_job(job, index = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#584 - def ns_find_last_job_for_thread; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#490 - def ns_initialize(initial, opts); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#539 - def ns_post_next_job; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#570 - def ns_validate(value); end - - class << self - # Blocks the current thread (indefinitely!) until all actions dispatched - # thus far to all the given Agents, from this thread or nested by the - # given Agents, have occurred. Will block when any of the agents are - # failed. Will never return if a failed Agent is restart with - # `:clear_actions` true. - # - # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # - # @param agents [Array] the Agents on which to wait - # @return [Boolean] true - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#449 - def await(*agents); end - - # Blocks the current thread until all actions dispatched thus far to all - # the given Agents, from this thread or nested by the given Agents, have - # occurred, or the timeout (in seconds) has elapsed. - # - # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # - # @param timeout [Float] the maximum number of seconds to wait - # @param agents [Array] the Agents on which to wait - # @return [Boolean] true if all actions complete before timeout else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#463 - def await_for(timeout, *agents); end - - # Blocks the current thread until all actions dispatched thus far to all - # the given Agents, from this thread or nested by the given Agents, have - # occurred, or the timeout (in seconds) has elapsed. - # - # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # - # @param timeout [Float] the maximum number of seconds to wait - # @param agents [Array] the Agents on which to wait - # @raise [Concurrent::TimeoutError] when timeout is reached - # @return [Boolean] true if all actions complete before timeout - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#482 - def await_for!(timeout, *agents); end - end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#154 -Concurrent::Agent::AWAIT_ACTION = T.let(T.unsafe(nil), Proc) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#151 -Concurrent::Agent::AWAIT_FLAG = T.let(T.unsafe(nil), Object) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#157 -Concurrent::Agent::DEFAULT_ERROR_HANDLER = T.let(T.unsafe(nil), Proc) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#160 -Concurrent::Agent::DEFAULT_VALIDATOR = T.let(T.unsafe(nil), Proc) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#148 -Concurrent::Agent::ERROR_MODES = T.let(T.unsafe(nil), Array) - -# Raised during action processing or any other time in an Agent's lifecycle. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#167 -class Concurrent::Agent::Error < ::StandardError - # @return [Error] a new instance of Error - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#168 - def initialize(message = T.unsafe(nil)); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 -class Concurrent::Agent::Job < ::Struct - # Returns the value of attribute action - # - # @return [Object] the current value of action - def action; end - - # Sets the attribute action - # - # @param value [Object] the value to set the attribute action to. - # @return [Object] the newly set value - def action=(_); end - - # Returns the value of attribute args - # - # @return [Object] the current value of args - def args; end - - # Sets the attribute args - # - # @param value [Object] the value to set the attribute args to. - # @return [Object] the newly set value - def args=(_); end - - # Returns the value of attribute caller - # - # @return [Object] the current value of caller - def caller; end - - # Sets the attribute caller - # - # @param value [Object] the value to set the attribute caller to. - # @return [Object] the newly set value - def caller=(_); end - - # Returns the value of attribute executor - # - # @return [Object] the current value of executor - def executor; end - - # Sets the attribute executor - # - # @param value [Object] the value to set the attribute executor to. - # @return [Object] the newly set value - def executor=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Raised when a new value obtained during action processing or at `#restart` -# fails validation. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#176 -class Concurrent::Agent::ValidationError < ::Concurrent::Agent::Error - # @return [ValidationError] a new instance of ValidationError - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#177 - def initialize(message = T.unsafe(nil)); end -end - -# A thread-safe subclass of Array. This version locks against the object -# itself for every method call, ensuring only one thread can be reading -# or writing at a time. This includes iteration methods like `#each`. -# -# @note `a += b` is **not** a **thread-safe** operation on -# `Concurrent::Array`. It reads array `a`, then it creates new `Concurrent::Array` -# which is concatenation of `a` and `b`, then it writes the concatenation to `a`. -# The read and write are independent operations they do not form a single atomic -# operation therefore when two `+=` operations are executed concurrently updates -# may be lost. Use `#concat` instead. -# @see http://ruby-doc.org/core/Array.html Ruby standard library `Array` -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/array.rb#53 -class Concurrent::Array < ::Array; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/array.rb#22 -Concurrent::ArrayImplementation = Array - -# A mixin module that provides simple asynchronous behavior to a class, -# turning it into a simple actor. Loosely based on Erlang's -# [gen_server](http://www.erlang.org/doc/man/gen_server.html), but without -# supervision or linking. -# -# A more feature-rich {Concurrent::Actor} is also available when the -# capabilities of `Async` are too limited. -# -# ```cucumber -# Feature: -# As a stateful, plain old Ruby class -# I want safe, asynchronous behavior -# So my long-running methods don't block the main thread -# ``` -# -# The `Async` module is a way to mix simple yet powerful asynchronous -# capabilities into any plain old Ruby object or class, turning each object -# into a simple Actor. Method calls are processed on a background thread. The -# caller is free to perform other actions while processing occurs in the -# background. -# -# Method calls to the asynchronous object are made via two proxy methods: -# `async` (alias `cast`) and `await` (alias `call`). These proxy methods post -# the method call to the object's background thread and return a "future" -# which will eventually contain the result of the method call. -# -# This behavior is loosely patterned after Erlang's `gen_server` behavior. -# When an Erlang module implements the `gen_server` behavior it becomes -# inherently asynchronous. The `start` or `start_link` function spawns a -# process (similar to a thread but much more lightweight and efficient) and -# returns the ID of the process. Using the process ID, other processes can -# send messages to the `gen_server` via the `cast` and `call` methods. Unlike -# Erlang's `gen_server`, however, `Async` classes do not support linking or -# supervision trees. -# -# ## Basic Usage -# -# When this module is mixed into a class, objects of the class become inherently -# asynchronous. Each object gets its own background thread on which to post -# asynchronous method calls. Asynchronous method calls are executed in the -# background one at a time in the order they are received. -# -# To create an asynchronous class, simply mix in the `Concurrent::Async` module: -# -# ``` -# class Hello -# include Concurrent::Async -# -# def hello(name) -# "Hello, #{name}!" -# end -# end -# ``` -# -# Mixing this module into a class provides each object two proxy methods: -# `async` and `await`. These methods are thread safe with respect to the -# enclosing object. The former proxy allows methods to be called -# asynchronously by posting to the object's internal thread. The latter proxy -# allows a method to be called synchronously but does so safely with respect -# to any pending asynchronous method calls and ensures proper ordering. Both -# methods return a {Concurrent::IVar} which can be inspected for the result -# of the proxied method call. Calling a method with `async` will return a -# `:pending` `IVar` whereas `await` will return a `:complete` `IVar`. -# -# ``` -# class Echo -# include Concurrent::Async -# -# def echo(msg) -# print "#{msg}\n" -# end -# end -# -# horn = Echo.new -# horn.echo('zero') # synchronous, not thread-safe -# # returns the actual return value of the method -# -# horn.async.echo('one') # asynchronous, non-blocking, thread-safe -# # returns an IVar in the :pending state -# -# horn.await.echo('two') # synchronous, blocking, thread-safe -# # returns an IVar in the :complete state -# ``` -# -# ## Let It Fail -# -# The `async` and `await` proxy methods have built-in error protection based -# on Erlang's famous "let it fail" philosophy. Instance methods should not be -# programmed defensively. When an exception is raised by a delegated method -# the proxy will rescue the exception, expose it to the caller as the `reason` -# attribute of the returned future, then process the next method call. -# -# ## Calling Methods Internally -# -# External method calls should *always* use the `async` and `await` proxy -# methods. When one method calls another method, the `async` proxy should -# rarely be used and the `await` proxy should *never* be used. -# -# When an object calls one of its own methods using the `await` proxy the -# second call will be enqueued *behind* the currently running method call. -# Any attempt to wait on the result will fail as the second call will never -# run until after the current call completes. -# -# Calling a method using the `await` proxy from within a method that was -# itself called using `async` or `await` will irreversibly deadlock the -# object. Do *not* do this, ever. -# -# ## Instance Variables and Attribute Accessors -# -# Instance variables do not need to be thread-safe so long as they are private. -# Asynchronous method calls are processed in the order they are received and -# are processed one at a time. Therefore private instance variables can only -# be accessed by one thread at a time. This is inherently thread-safe. -# -# When using private instance variables within asynchronous methods, the best -# practice is to read the instance variable into a local variable at the start -# of the method then update the instance variable at the *end* of the method. -# This way, should an exception be raised during method execution the internal -# state of the object will not have been changed. -# -# ### Reader Attributes -# -# The use of `attr_reader` is discouraged. Internal state exposed externally, -# when necessary, should be done through accessor methods. The instance -# variables exposed by these methods *must* be thread-safe, or they must be -# called using the `async` and `await` proxy methods. These two approaches are -# subtly different. -# -# When internal state is accessed via the `async` and `await` proxy methods, -# the returned value represents the object's state *at the time the call is -# processed*, which may *not* be the state of the object at the time the call -# is made. -# -# To get the state *at the current* time, irrespective of an enqueued method -# calls, a reader method must be called directly. This is inherently unsafe -# unless the instance variable is itself thread-safe, preferably using one -# of the thread-safe classes within this library. Because the thread-safe -# classes within this library are internally-locking or non-locking, they can -# be safely used from within asynchronous methods without causing deadlocks. -# -# Generally speaking, the best practice is to *not* expose internal state via -# reader methods. The best practice is to simply use the method's return value. -# -# ### Writer Attributes -# -# Writer attributes should never be used with asynchronous classes. Changing -# the state externally, even when done in the thread-safe way, is not logically -# consistent. Changes to state need to be timed with respect to all asynchronous -# method calls which my be in-process or enqueued. The only safe practice is to -# pass all necessary data to each method as arguments and let the method update -# the internal state as necessary. -# -# ## Class Constants, Variables, and Methods -# -# ### Class Constants -# -# Class constants do not need to be thread-safe. Since they are read-only and -# immutable they may be safely read both externally and from within -# asynchronous methods. -# -# ### Class Variables -# -# Class variables should be avoided. Class variables represent shared state. -# Shared state is anathema to concurrency. Should there be a need to share -# state using class variables they *must* be thread-safe, preferably -# using the thread-safe classes within this library. When updating class -# variables, never assign a new value/object to the variable itself. Assignment -# is not thread-safe in Ruby. Instead, use the thread-safe update functions -# of the variable itself to change the value. -# -# The best practice is to *never* use class variables with `Async` classes. -# -# ### Class Methods -# -# Class methods which are pure functions are safe. Class methods which modify -# class variables should be avoided, for all the reasons listed above. -# -# ## An Important Note About Thread Safe Guarantees -# -# > Thread safe guarantees can only be made when asynchronous method calls -# > are not mixed with direct method calls. Use only direct method calls -# > when the object is used exclusively on a single thread. Use only -# > `async` and `await` when the object is shared between threads. Once you -# > call a method using `async` or `await`, you should no longer call methods -# > directly on the object. Use `async` and `await` exclusively from then on. -# -# @example -# -# class Echo -# include Concurrent::Async -# -# def echo(msg) -# print "#{msg}\n" -# end -# end -# -# horn = Echo.new -# horn.echo('zero') # synchronous, not thread-safe -# # returns the actual return value of the method -# -# horn.async.echo('one') # asynchronous, non-blocking, thread-safe -# # returns an IVar in the :pending state -# -# horn.await.echo('two') # synchronous, blocking, thread-safe -# # returns an IVar in the :complete state -# @see Concurrent::Actor -# @see https://en.wikipedia.org/wiki/Actor_model "Actor Model" at Wikipedia -# @see http://www.erlang.org/doc/man/gen_server.html Erlang gen_server -# @see http://c2.com/cgi/wiki?LetItCrash "Let It Crash" at http://c2.com/ -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#217 -module Concurrent::Async - mixes_in_class_methods ::Concurrent::Async::ClassMethods - - # Causes the chained method call to be performed asynchronously on the - # object's thread. The delegated method will return a future in the - # `:pending` state and the method call will have been scheduled on the - # object's thread. The final disposition of the method call can be obtained - # by inspecting the returned future. - # - # @note The method call is guaranteed to be thread safe with respect to - # all other method calls against the same object that are called with - # either `async` or `await`. The mutable nature of Ruby references - # (and object orientation in general) prevent any other thread safety - # guarantees. Do NOT mix direct method calls with delegated method calls. - # Use *only* delegated method calls when sharing the object between threads. - # @raise [NameError] the object does not respond to the requested method - # @raise [ArgumentError] the given `args` do not match the arity of - # the requested method - # @return [Concurrent::IVar] the pending result of the asynchronous operation - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#412 - def async; end - - # Causes the chained method call to be performed synchronously on the - # current thread. The delegated will return a future in either the - # `:fulfilled` or `:rejected` state and the delegated method will have - # completed. The final disposition of the delegated method can be obtained - # by inspecting the returned future. - # - # @note The method call is guaranteed to be thread safe with respect to - # all other method calls against the same object that are called with - # either `async` or `await`. The mutable nature of Ruby references - # (and object orientation in general) prevent any other thread safety - # guarantees. Do NOT mix direct method calls with delegated method calls. - # Use *only* delegated method calls when sharing the object between threads. - # @raise [NameError] the object does not respond to the requested method - # @raise [ArgumentError] the given `args` do not match the arity of the - # requested method - # @return [Concurrent::IVar] the completed result of the synchronous operation - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#430 - def await; end - - # Causes the chained method call to be performed synchronously on the - # current thread. The delegated will return a future in either the - # `:fulfilled` or `:rejected` state and the delegated method will have - # completed. The final disposition of the delegated method can be obtained - # by inspecting the returned future. - # - # @note The method call is guaranteed to be thread safe with respect to - # all other method calls against the same object that are called with - # either `async` or `await`. The mutable nature of Ruby references - # (and object orientation in general) prevent any other thread safety - # guarantees. Do NOT mix direct method calls with delegated method calls. - # Use *only* delegated method calls when sharing the object between threads. - # @raise [NameError] the object does not respond to the requested method - # @raise [ArgumentError] the given `args` do not match the arity of the - # requested method - # @return [Concurrent::IVar] the completed result of the synchronous operation - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#430 - def call; end - - # Causes the chained method call to be performed asynchronously on the - # object's thread. The delegated method will return a future in the - # `:pending` state and the method call will have been scheduled on the - # object's thread. The final disposition of the method call can be obtained - # by inspecting the returned future. - # - # @note The method call is guaranteed to be thread safe with respect to - # all other method calls against the same object that are called with - # either `async` or `await`. The mutable nature of Ruby references - # (and object orientation in general) prevent any other thread safety - # guarantees. Do NOT mix direct method calls with delegated method calls. - # Use *only* delegated method calls when sharing the object between threads. - # @raise [NameError] the object does not respond to the requested method - # @raise [ArgumentError] the given `args` do not match the arity of - # the requested method - # @return [Concurrent::IVar] the pending result of the asynchronous operation - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#412 - def cast; end - - # Initialize the internal serializer and other stnchronization mechanisms. - # - # @note This method *must* be called immediately upon object construction. - # This is the only way thread-safe initialization can be guaranteed. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#441 - def init_synchronization; end - - class << self - # @private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#262 - def included(base); end - - # Check for the presence of a method on an object and determine if a given - # set of arguments matches the required arity. - # - # @note This check is imperfect because of the way Ruby reports the arity of - # methods with a variable number of arguments. It is possible to determine - # if too few arguments are given but impossible to determine if too many - # arguments are given. This check may also fail to recognize dynamic behavior - # of the object, such as methods simulated with `method_missing`. - # @param obj [Object] the object to check against - # @param method [Symbol] the method to check the object for - # @param args [Array] zero or more arguments for the arity check - # @raise [NameError] the object does not respond to `method` method - # @raise [ArgumentError] the given `args` do not match the arity of `method` - # @see http://www.ruby-doc.org/core-2.1.1/Method.html#method-i-arity Method#arity - # @see http://ruby-doc.org/core-2.1.0/Object.html#method-i-respond_to-3F Object#respond_to? - # @see http://www.ruby-doc.org/core-2.1.0/BasicObject.html#method-i-method_missing BasicObject#method_missing - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#250 - def validate_argc(obj, method, *args); end - end -end - -# Delegates asynchronous, thread-safe method calls to the wrapped object. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#282 -class Concurrent::Async::AsyncDelegator < ::Concurrent::Synchronization::LockableObject - # Create a new delegator object wrapping the given delegate. - # - # @param delegate [Object] the object to wrap and delegate method calls to - # @return [AsyncDelegator] a new instance of AsyncDelegator - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#288 - def initialize(delegate); end - - # Delegates method calls to the wrapped object. - # - # @param method [Symbol] the method being called - # @param args [Array] zero or more arguments to the method - # @raise [NameError] the object does not respond to `method` method - # @raise [ArgumentError] the given `args` do not match the arity of `method` - # @return [IVar] the result of the method call - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#305 - def method_missing(method, *args, &block); end - - # Perform all enqueued tasks. - # - # This method must be called from within the executor. It must not be - # called while already running. It will loop until the queue is empty. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#330 - def perform; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#348 - def reset_if_forked; end - - private - - # Check whether the method is responsive - # - # @param method [Symbol] the method being called - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#322 - def respond_to_missing?(method, include_private = T.unsafe(nil)); end -end - -# Delegates synchronous, thread-safe method calls to the wrapped object. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#360 -class Concurrent::Async::AwaitDelegator - # Create a new delegator object wrapping the given delegate. - # - # @param delegate [AsyncDelegator] the object to wrap and delegate method calls to - # @return [AwaitDelegator] a new instance of AwaitDelegator - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#365 - def initialize(delegate); end - - # Delegates method calls to the wrapped object. - # - # @param method [Symbol] the method being called - # @param args [Array] zero or more arguments to the method - # @raise [NameError] the object does not respond to `method` method - # @raise [ArgumentError] the given `args` do not match the arity of `method` - # @return [IVar] the result of the method call - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#378 - def method_missing(method, *args, &block); end - - private - - # Check whether the method is responsive - # - # @param method [Symbol] the method being called - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#387 - def respond_to_missing?(method, include_private = T.unsafe(nil)); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#269 -module Concurrent::Async::ClassMethods - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#270 - def new(*args, **_arg1, &block); end -end - -# Atoms provide a way to manage shared, synchronous, independent state. -# -# An atom is initialized with an initial value and an optional validation -# proc. At any time the value of the atom can be synchronously and safely -# changed. If a validator is given at construction then any new value -# will be checked against the validator and will be rejected if the -# validator returns false or raises an exception. -# -# There are two ways to change the value of an atom: {#compare_and_set} and -# {#swap}. The former will set the new value if and only if it validates and -# the current value matches the new value. The latter will atomically set the -# new value to the result of running the given block if and only if that -# value validates. -# -# ## Example -# -# ``` -# def next_fibonacci(set = nil) -# return [0, 1] if set.nil? -# set + [set[-2..-1].reduce{|sum,x| sum + x }] -# end -# -# # create an atom with an initial value -# atom = Concurrent::Atom.new(next_fibonacci) -# -# # send a few update requests -# 5.times do -# atom.swap{|set| next_fibonacci(set) } -# end -# -# # get the current value -# atom.value #=> [0, 1, 1, 2, 3, 5, 8] -# ``` -# -# ## Observation -# -# Atoms support observers through the {Concurrent::Observable} mixin module. -# Notification of observers occurs every time the value of the Atom changes. -# When notified the observer will receive three arguments: `time`, `old_value`, -# and `new_value`. The `time` argument is the time at which the value change -# occurred. The `old_value` is the value of the Atom when the change began -# The `new_value` is the value to which the Atom was set when the change -# completed. Note that `old_value` and `new_value` may be the same. This is -# not an error. It simply means that the change operation returned the same -# value. -# -# Unlike in Clojure, `Atom` cannot participate in {Concurrent::TVar} transactions. -# -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. -# -# @see http://clojure.org/atoms Clojure Atoms -# @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#95 -class Concurrent::Atom < ::Concurrent::Synchronization::Object - include ::Concurrent::Concern::Observable - extend ::Concurrent::Synchronization::SafeInitialization - - # Create a new atom with the given initial value. - # - # @option opts - # @param value [Object] The initial value - # @param opts [Hash] The options used to configure the atom - # @raise [ArgumentError] if the validator is not a `Proc` (when given) - # @return [Atom] a new instance of Atom - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#121 - def initialize(value, opts = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 - def __initialize_atomic_fields__; end - - # Atomically sets the value of atom to the new value if and only if the - # current value of the atom is identical to the old value and the new - # value successfully validates against the (optional) validator given - # at construction. - # - # @param old_value [Object] The expected current value. - # @param new_value [Object] The intended new value. - # @return [Boolean] True if the value is changed else false. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#181 - def compare_and_set(old_value, new_value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 - def deref; end - - # Atomically sets the value of atom to the new value without regard for the - # current value so long as the new value successfully validates against the - # (optional) validator given at construction. - # - # @param new_value [Object] The intended new value. - # @return [Object] The final value of the atom after all operations and - # validations are complete. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#198 - def reset(new_value); end - - # Atomically swaps the value of atom using the given block. The current - # value will be passed to the block, as will any arguments passed as - # arguments to the function. The new value will be validated against the - # (optional) validator proc given at construction. If validation fails the - # value will not be changed. - # - # Internally, {#swap} reads the current value, applies the block to it, and - # attempts to compare-and-set it in. Since another thread may have changed - # the value in the intervening time, it may have to retry, and does so in a - # spin loop. The net effect is that the value will always be the result of - # the application of the supplied block to a current value, atomically. - # However, because the block might be called multiple times, it must be free - # of side effects. - # - # @note The given block may be called multiple times, and thus should be free - # of side effects. - # @param args [Object] Zero or more arguments passed to the block. - # @raise [ArgumentError] When no block is given. - # @return [Object] The final value of the atom after all operations and - # validations are complete. - # @yield [value, args] Calculates a new value for the atom based on the - # current value and any supplied arguments. - # @yieldparam value [Object] The current value of the atom. - # @yieldparam args [Object] All arguments passed to the function, in order. - # @yieldreturn [Object] The intended new value of the atom. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#157 - def swap(*args); end - - # The current value of the atom. - # - # @return [Object] The current value. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 - def value; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 - def compare_and_set_value(expected, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 - def swap_value(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 - def update_value(&block); end - - # Is the new value valid? - # - # @param new_value [Object] The intended new value. - # @return [Boolean] false if the validator function returns false or raises - # an exception else true - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#216 - def valid?(new_value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 - def value=(value); end -end - -# A boolean value that can be updated atomically. Reads and writes to an atomic -# boolean and thread-safe and guaranteed to succeed. Reads and writes may block -# briefly but no explicit locking is required. -# -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. -# Performance: -# -# ``` -# Testing with ruby 2.1.2 -# Testing with Concurrent::MutexAtomicBoolean... -# 2.790000 0.000000 2.790000 ( 2.791454) -# Testing with Concurrent::CAtomicBoolean... -# 0.740000 0.000000 0.740000 ( 0.740206) -# -# Testing with jruby 1.9.3 -# Testing with Concurrent::MutexAtomicBoolean... -# 5.240000 2.520000 7.760000 ( 3.683000) -# Testing with Concurrent::JavaAtomicBoolean... -# 3.340000 0.010000 3.350000 ( 0.855000) -# ``` -# -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#119 -class Concurrent::AtomicBoolean < ::Concurrent::MutexAtomicBoolean - # @return [String] Short string representation. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#121 - def inspect; end - - # @return [String] Short string representation. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#121 - def to_s; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#82 -Concurrent::AtomicBooleanImplementation = Concurrent::MutexAtomicBoolean - -# Define update methods that use direct paths -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#9 -module Concurrent::AtomicDirectUpdate - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#15 - def try_update; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#24 - def try_update!; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#10 - def update; end -end - -# A numeric value that can be updated atomically. Reads and writes to an atomic -# fixnum and thread-safe and guaranteed to succeed. Reads and writes may block -# briefly but no explicit locking is required. -# -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. -# Performance: -# -# ``` -# Testing with ruby 2.1.2 -# Testing with Concurrent::MutexAtomicFixnum... -# 3.130000 0.000000 3.130000 ( 3.136505) -# Testing with Concurrent::CAtomicFixnum... -# 0.790000 0.000000 0.790000 ( 0.785550) -# -# Testing with jruby 1.9.3 -# Testing with Concurrent::MutexAtomicFixnum... -# 5.460000 2.460000 7.920000 ( 3.715000) -# Testing with Concurrent::JavaAtomicFixnum... -# 4.520000 0.030000 4.550000 ( 1.187000) -# ``` -# -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#136 -class Concurrent::AtomicFixnum < ::Concurrent::MutexAtomicFixnum - # @return [String] Short string representation. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#138 - def inspect; end - - # @return [String] Short string representation. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#138 - def to_s; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#99 -Concurrent::AtomicFixnumImplementation = Concurrent::MutexAtomicFixnum - -# An atomic reference which maintains an object reference along with a mark bit -# that can be updated atomically. -# -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicMarkableReference.html java.util.concurrent.atomic.AtomicMarkableReference -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#10 -class Concurrent::AtomicMarkableReference < ::Concurrent::Synchronization::Object - extend ::Concurrent::Synchronization::SafeInitialization - - # @return [AtomicMarkableReference] a new instance of AtomicMarkableReference - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#15 - def initialize(value = T.unsafe(nil), mark = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 - def __initialize_atomic_fields__; end - - # Atomically sets the value and mark to the given updated value and - # mark given both: - # - the current value == the expected value && - # - the current mark == the expected mark - # - # that the actual value was not equal to the expected value or the - # actual mark was not equal to the expected mark - # - # @param expected_val [Object] the expected value - # @param new_val [Object] the new value - # @param expected_mark [Boolean] the expected mark - # @param new_mark [Boolean] the new mark - # @return [Boolean] `true` if successful. A `false` return indicates - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#33 - def compare_and_set(expected_val, new_val, expected_mark, new_mark); end - - # Atomically sets the value and mark to the given updated value and - # mark given both: - # - the current value == the expected value && - # - the current mark == the expected mark - # - # that the actual value was not equal to the expected value or the - # actual mark was not equal to the expected mark - # - # @param expected_val [Object] the expected value - # @param new_val [Object] the new value - # @param expected_mark [Boolean] the expected mark - # @param new_mark [Boolean] the new mark - # @return [Boolean] `true` if successful. A `false` return indicates - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#33 - def compare_and_swap(expected_val, new_val, expected_mark, new_mark); end - - # Gets the current reference and marked values. - # - # @return [Array] the current reference and marked values - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#64 - def get; end - - # Gets the current marked value - # - # @return [Boolean] the current marked value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#78 - def mark; end - - # Gets the current marked value - # - # @return [Boolean] the current marked value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#78 - def marked?; end - - # _Unconditionally_ sets to the given value of both the reference and - # the mark. - # - # @param new_val [Object] the new value - # @param new_mark [Boolean] the new mark - # @return [Array] both the new value and the new mark - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#91 - def set(new_val, new_mark); end - - # Pass the current value to the given block, replacing it with the - # block's result. Simply return nil if update fails. - # - # the update failed - # - # @return [Array] the new value and marked state, or nil if - # @yield [Object] Calculate a new value and marked state for the atomic - # reference using given (old) value and (old) marked - # @yieldparam old_val [Object] the starting value of the atomic reference - # @yieldparam old_mark [Boolean] the starting state of marked - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#152 - def try_update; end - - # Pass the current value to the given block, replacing it - # with the block's result. Raise an exception if the update - # fails. - # - # @raise [Concurrent::ConcurrentUpdateError] if the update fails - # @return [Array] the new value and marked state - # @yield [Object] Calculate a new value and marked state for the atomic - # reference using given (old) value and (old) marked - # @yieldparam old_val [Object] the starting value of the atomic reference - # @yieldparam old_mark [Boolean] the starting state of marked - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#128 - def try_update!; end - - # Pass the current value and marked state to the given block, replacing it - # with the block's results. May retry if the value changes during the - # block's execution. - # - # @return [Array] the new value and new mark - # @yield [Object] Calculate a new value and marked state for the atomic - # reference using given (old) value and (old) marked - # @yieldparam old_val [Object] the starting value of the atomic reference - # @yieldparam old_mark [Boolean] the starting state of marked - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#105 - def update; end - - # Gets the current value of the reference - # - # @return [Object] the current value of the reference - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#71 - def value; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 - def compare_and_set_reference(expected, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#163 - def immutable_array(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 - def reference; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 - def reference=(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 - def swap_reference(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 - def update_reference(&block); end -end - -# Special "compare and set" handling of numeric values. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb#7 -module Concurrent::AtomicNumericCompareAndSetWrapper - # Atomically sets the value to the given updated value if - # the current value == the expected value. - # - # that the actual value was not equal to the expected value. - # - # @param old_value [Object] the expected value - # @param new_value [Object] the new value - # @return [Boolean] `true` if successful. A `false` return indicates - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb#10 - def compare_and_set(old_value, new_value); end -end - -# An object reference that may be updated atomically. All read and write -# operations have java volatile semantic. -# -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. -# -# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html -# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/package-summary.html -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#126 -class Concurrent::AtomicReference < ::Concurrent::MutexAtomicReference - # @return [String] Short string representation. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#129 - def inspect; end - - # @return [String] Short string representation. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#129 - def to_s; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#18 -Concurrent::AtomicReferenceImplementation = Concurrent::MutexAtomicReference - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#30 -class Concurrent::CRubySet < ::Set - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#18 - def initialize(*args, &block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def &(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def +(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def -(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def <(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def <<(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def <=(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def <=>(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def ==(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def ===(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def >(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def >=(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def ^(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def add(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def add?(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def classify(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def clear(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def collect!(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def compare_by_identity(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def compare_by_identity?(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def delete(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def delete?(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def delete_if(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def difference(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def disjoint?(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def divide(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def each(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def empty?(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def eql?(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def filter!(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def flatten(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def flatten!(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def flatten_merge(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def freeze(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def hash(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def include?(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def inspect(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def intersect?(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def intersection(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def join(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def keep_if(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def length(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def map!(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def member?(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def merge(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def pretty_print(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def pretty_print_cycle(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def proper_subset?(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def proper_superset?(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def reject!(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def replace(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def reset(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def select!(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def size(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def subset?(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def subtract(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def superset?(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def to_a(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def to_s(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def to_set(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def union(*args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 - def |(*args); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#23 - def initialize_copy(other); end -end - -# A thread pool that dynamically grows and shrinks to fit the current workload. -# New threads are created as needed, existing threads are reused, and threads -# that remain idle for too long are killed and removed from the pool. These -# pools are particularly suited to applications that perform a high volume of -# short-lived tasks. -# -# On creation a `CachedThreadPool` has zero running threads. New threads are -# created on the pool as new operations are `#post`. The size of the pool -# will grow until `#max_length` threads are in the pool or until the number -# of threads exceeds the number of running and pending operations. When a new -# operation is post to the pool the first available idle thread will be tasked -# with the new operation. -# -# Should a thread crash for any reason the thread will immediately be removed -# from the pool. Similarly, threads which remain idle for an extended period -# of time will be killed and reclaimed. Thus these thread pools are very -# efficient at reclaiming unused resources. -# -# The API and behavior of this class are based on Java's `CachedThreadPool` -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#27 -class Concurrent::CachedThreadPool < ::Concurrent::ThreadPoolExecutor - # Create a new thread pool. - # - # @option opts - # @param opts [Hash] the options defining pool behavior. - # @raise [ArgumentError] if `fallback_policy` is not a known policy - # @return [CachedThreadPool] a new instance of CachedThreadPool - # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#39 - def initialize(opts = T.unsafe(nil)); end - - private - - # Create a new thread pool. - # - # @option opts - # @param opts [Hash] the options defining pool behavior. - # @raise [ArgumentError] if `fallback_policy` is not a known policy - # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#51 - def ns_initialize(opts); end -end - -# Raised when an asynchronous operation is cancelled before execution. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#9 -class Concurrent::CancelledOperationError < ::Concurrent::Error; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#7 -module Concurrent::Collection; end - -# A thread safe observer set implemented using copy-on-read approach: -# observers are added and removed from a thread safe collection; every time -# a notification is required the internal data structure is copied to -# prevent concurrency issues -# -# @api private -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#12 -class Concurrent::Collection::CopyOnNotifyObserverSet < ::Concurrent::Synchronization::LockableObject - # @api private - # @return [CopyOnNotifyObserverSet] a new instance of CopyOnNotifyObserverSet - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#14 - def initialize; end - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#20 - def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#55 - def count_observers; end - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#39 - def delete_observer(observer); end - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#47 - def delete_observers; end - - # Notifies all registered observers with optional args and deletes them. - # - # @api private - # @param args [Object] arguments to be passed to each observer - # @return [CopyOnWriteObserverSet] self - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#72 - def notify_and_delete_observers(*args, &block); end - - # Notifies all registered observers with optional args - # - # @api private - # @param args [Object] arguments to be passed to each observer - # @return [CopyOnWriteObserverSet] self - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#62 - def notify_observers(*args, &block); end - - protected - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#80 - def ns_initialize; end - - private - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#86 - def duplicate_and_clear_observers; end - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#94 - def duplicate_observers; end - - # @api private - # @raise [ArgumentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#98 - def notify_to(observers, *args); end -end - -# A thread safe observer set implemented using copy-on-write approach: -# every time an observer is added or removed the whole internal data structure is -# duplicated and replaced with a new one. -# -# @api private -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#11 -class Concurrent::Collection::CopyOnWriteObserverSet < ::Concurrent::Synchronization::LockableObject - # @api private - # @return [CopyOnWriteObserverSet] a new instance of CopyOnWriteObserverSet - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#13 - def initialize; end - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#19 - def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#56 - def count_observers; end - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#40 - def delete_observer(observer); end - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#50 - def delete_observers; end - - # Notifies all registered observers with optional args and deletes them. - # - # @api private - # @param args [Object] arguments to be passed to each observer - # @return [CopyOnWriteObserverSet] self - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#72 - def notify_and_delete_observers(*args, &block); end - - # Notifies all registered observers with optional args - # - # @api private - # @param args [Object] arguments to be passed to each observer - # @return [CopyOnWriteObserverSet] self - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#63 - def notify_observers(*args, &block); end - - protected - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#80 - def ns_initialize; end - - private - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#102 - def clear_observers_and_return_old; end - - # @api private - # @raise [ArgumentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#86 - def notify_to(observers, *args); end - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#94 - def observers; end - - # @api private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#98 - def observers=(new_set); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#10 -Concurrent::Collection::MapImplementation = Concurrent::Collection::MriMapBackend - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#10 -class Concurrent::Collection::MriMapBackend < ::Concurrent::Collection::NonConcurrentMapBackend - # @return [MriMapBackend] a new instance of MriMapBackend - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#12 - def initialize(options = T.unsafe(nil), &default_proc); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#17 - def []=(key, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#61 - def clear; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#33 - def compute(key); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#21 - def compute_if_absent(key); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#29 - def compute_if_present(key); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#53 - def delete(key); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#57 - def delete_pair(key, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#49 - def get_and_set(key, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#37 - def merge_pair(key, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#45 - def replace_if_exists(key, new_value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#41 - def replace_pair(key, old_value, new_value); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#9 -class Concurrent::Collection::NonConcurrentMapBackend - # WARNING: all public methods of the class must operate on the @backend - # directly without calling each other. This is important because of the - # SynchronizedMapBackend which uses a non-reentrant mutex for performance - # reasons. - # - # @return [NonConcurrentMapBackend] a new instance of NonConcurrentMapBackend - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#15 - def initialize(options = T.unsafe(nil), &default_proc); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#21 - def [](key); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#25 - def []=(key, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#94 - def clear; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#59 - def compute(key); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#29 - def compute_if_absent(key); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#53 - def compute_if_present(key); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#81 - def delete(key); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#85 - def delete_pair(key, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#99 - def each_pair; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#71 - def get_and_set(key, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#110 - def get_or_default(key, default_value); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#77 - def key?(key); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#63 - def merge_pair(key, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#46 - def replace_if_exists(key, new_value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#37 - def replace_pair(key, old_value, new_value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#106 - def size; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#130 - def dupped_backend; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#124 - def initialize_copy(other); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#134 - def pair?(key, expected_value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#116 - def set_backend(default_proc); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#138 - def store_computed_value(key, new_value); end -end - -# A queue collection in which the elements are sorted based on their -# comparison (spaceship) operator `<=>`. Items are added to the queue -# at a position relative to their priority. On removal the element -# with the "highest" priority is removed. By default the sort order is -# from highest to lowest, but a lowest-to-highest sort order can be -# set on construction. -# -# The API is based on the `Queue` class from the Ruby standard library. -# -# The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm -# stored in an array. The algorithm is based on the work of Robert Sedgewick -# and Kevin Wayne. -# -# The JRuby native implementation is a thin wrapper around the standard -# library `java.util.NonConcurrentPriorityQueue`. -# -# When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. -# When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. -# -# @note This implementation is *not* thread safe. -# @see http://en.wikipedia.org/wiki/Priority_queue -# @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html -# @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 -# @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html -# @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#50 -class Concurrent::Collection::NonConcurrentPriorityQueue < ::Concurrent::Collection::RubyNonConcurrentPriorityQueue - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 - def <<(item); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 - def deq; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 - def enq(item); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#48 - def has_priority?(item); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 - def shift; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#54 - def size; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#10 -Concurrent::Collection::NonConcurrentPriorityQueueImplementation = Concurrent::Collection::RubyNonConcurrentPriorityQueue - -# A queue collection in which the elements are sorted based on their -# comparison (spaceship) operator `<=>`. Items are added to the queue -# at a position relative to their priority. On removal the element -# with the "highest" priority is removed. By default the sort order is -# from highest to lowest, but a lowest-to-highest sort order can be -# set on construction. -# -# The API is based on the `Queue` class from the Ruby standard library. -# -# The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm -# stored in an array. The algorithm is based on the work of Robert Sedgewick -# and Kevin Wayne. -# -# The JRuby native implementation is a thin wrapper around the standard -# library `java.util.NonConcurrentPriorityQueue`. -# -# When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. -# When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. -# -# @note This implementation is *not* thread safe. -# @see http://en.wikipedia.org/wiki/Priority_queue -# @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html -# @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 -# @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html -# @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#8 -class Concurrent::Collection::RubyNonConcurrentPriorityQueue - # Create a new priority queue with no items. - # - # @option opts - # @param opts [Hash] the options for creating the queue - # @return [RubyNonConcurrentPriorityQueue] a new instance of RubyNonConcurrentPriorityQueue - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#11 - def initialize(opts = T.unsafe(nil)); end - - # Inserts the specified element into this priority queue. - # - # @param item [Object] the item to insert onto the queue - # @raise [ArgumentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 - def <<(item); end - - # Removes all of the elements from this priority queue. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#18 - def clear; end - - # Deletes all items from `self` that are equal to `item`. - # - # @param item [Object] the item to be removed from the queue - # @return [Object] true if the item is found else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#25 - def delete(item); end - - # Retrieves and removes the head of this queue, or returns `nil` if this - # queue is empty. - # - # @return [Object] the head of the queue or `nil` when empty - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 - def deq; end - - # Returns `true` if `self` contains no elements. - # - # @return [Boolean] true if there are no items in the queue else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#43 - def empty?; end - - # Inserts the specified element into this priority queue. - # - # @param item [Object] the item to insert onto the queue - # @raise [ArgumentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 - def enq(item); end - - # Returns `true` if the given item is present in `self` (that is, if any - # element == `item`), otherwise returns false. - # - # @param item [Object] the item to search for - # @return [Boolean] true if the item is found else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#48 - def has_priority?(item); end - - # Returns `true` if the given item is present in `self` (that is, if any - # element == `item`), otherwise returns false. - # - # @param item [Object] the item to search for - # @return [Boolean] true if the item is found else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#48 - def include?(item); end - - # The current length of the queue. - # - # @return [Fixnum] the number of items in the queue - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#54 - def length; end - - # Retrieves, but does not remove, the head of this queue, or returns `nil` - # if this queue is empty. - # - # @return [Object] the head of the queue or `nil` when empty - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#60 - def peek; end - - # Retrieves and removes the head of this queue, or returns `nil` if this - # queue is empty. - # - # @return [Object] the head of the queue or `nil` when empty - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 - def pop; end - - # Inserts the specified element into this priority queue. - # - # @param item [Object] the item to insert onto the queue - # @raise [ArgumentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 - def push(item); end - - # Retrieves and removes the head of this queue, or returns `nil` if this - # queue is empty. - # - # @return [Object] the head of the queue or `nil` when empty - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 - def shift; end - - # The current length of the queue. - # - # @return [Fixnum] the number of items in the queue - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#54 - def size; end - - private - - # Are the items at the given indexes ordered based on the priority - # order specified at construction? - # - # @param x [Integer] the first index from which to retrieve a comparable value - # @param y [Integer] the second index from which to retrieve a comparable value - # @return [Boolean] true if the two elements are in the correct priority order - # else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#119 - def ordered?(x, y); end - - # Percolate down to maintain heap invariant. - # - # @param k [Integer] the index at which to start the percolation - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#128 - def sink(k); end - - # Exchange the values at the given indexes within the internal array. - # - # @param x [Integer] the first index to swap - # @param y [Integer] the second index to swap - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#103 - def swap(x, y); end - - # Percolate up to maintain heap invariant. - # - # @param k [Integer] the index at which to start the percolation - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#147 - def swim(k); end - - class << self - # @!macro priority_queue_method_from_list - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#89 - def from_list(list, opts = T.unsafe(nil)); end - end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#2 -module Concurrent::Concern; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#8 -module Concurrent::Concern::Deprecation - include ::Concurrent::Concern::Logging - extend ::Concurrent::Concern::Logging - extend ::Concurrent::Concern::Deprecation - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#12 - def deprecated(message, strip = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#27 - def deprecated_method(old_name, new_name); end -end - -# Object references in Ruby are mutable. This can lead to serious problems when -# the `#value` of a concurrent object is a mutable reference. Which is always the -# case unless the value is a `Fixnum`, `Symbol`, or similar "primitive" data type. -# Most classes in this library that expose a `#value` getter method do so using the -# `Dereferenceable` mixin module. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#11 -module Concurrent::Concern::Dereferenceable - # Return the value this object represents after applying the options specified - # by the `#set_deref_options` method. - # - # @return [Object] the current value of the object - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#21 - def deref; end - - # Return the value this object represents after applying the options specified - # by the `#set_deref_options` method. - # - # @return [Object] the current value of the object - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#21 - def value; end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#63 - def apply_deref_options(value); end - - # Set the options which define the operations #value performs before - # returning data to the caller (dereferencing). - # - # @note Most classes that include this module will call `#set_deref_options` - # from within the constructor, thus allowing these options to be set at - # object creation. - # @option opts - # @option opts - # @option opts - # @param opts [Hash] the options defining dereference behavior. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#54 - def ns_set_deref_options(opts); end - - # Set the options which define the operations #value performs before - # returning data to the caller (dereferencing). - # - # @note Most classes that include this module will call `#set_deref_options` - # from within the constructor, thus allowing these options to be set at - # object creation. - # @option opts - # @option opts - # @option opts - # @param opts [Hash] the options defining dereference behavior. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#48 - def set_deref_options(opts = T.unsafe(nil)); end - - # Set the internal value of this object - # - # @param value [Object] the new value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#31 - def value=(value); end -end - -# Include where logging is needed -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#9 -module Concurrent::Concern::Logging - # Logs through {Concurrent.global_logger}, it can be overridden by setting @logger - # - # @param level [Integer] one of Concurrent::Concern::Logging constants - # @param progname [String] e.g. a path of an Actor - # @param message [String, nil] when nil block is used to generate the message - # @yieldreturn [String] a message - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#19 - def log(level, progname, message = T.unsafe(nil), &block); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#11 -Concurrent::Concern::Logging::DEBUG = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#11 -Concurrent::Concern::Logging::ERROR = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#11 -Concurrent::Concern::Logging::FATAL = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#11 -Concurrent::Concern::Logging::INFO = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#12 -Concurrent::Concern::Logging::SEV_LABEL = T.let(T.unsafe(nil), Array) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#11 -Concurrent::Concern::Logging::UNKNOWN = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#11 -Concurrent::Concern::Logging::WARN = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#10 -module Concurrent::Concern::Obligation - include ::Concurrent::Concern::Dereferenceable - - # Has the obligation completed processing? - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#49 - def complete?; end - - # @example allows Obligation to be risen - # rejected_ivar = Ivar.new.fail - # raise rejected_ivar - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#126 - def exception(*args); end - - # Has the obligation been fulfilled? - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#20 - def fulfilled?; end - - # Is the obligation still awaiting completion of processing? - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#56 - def incomplete?; end - - # Wait until obligation is complete or the timeout is reached. Will re-raise - # any exceptions raised during processing (but will not raise an exception - # on timeout). - # - # @param timeout [Numeric] the maximum time in seconds to wait. - # @raise [Exception] raises the reason when rejected - # @return [Obligation] self - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#86 - def no_error!(timeout = T.unsafe(nil)); end - - # Is obligation completion still pending? - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#35 - def pending?; end - - # Has the obligation been fulfilled? - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#20 - def realized?; end - - # If an exception was raised during processing this will return the - # exception object. Will return `nil` when the state is pending or if - # the obligation has been successfully fulfilled. - # - # @return [Exception] the exception raised during processing or `nil` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#119 - def reason; end - - # Has the obligation been rejected? - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#28 - def rejected?; end - - # The current state of the obligation. - # - # @return [Symbol] the current state - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#110 - def state; end - - # Is the obligation still unscheduled? - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#42 - def unscheduled?; end - - # The current value of the obligation. Will be `nil` while the state is - # pending or the operation has been rejected. - # - # @param timeout [Numeric] the maximum time in seconds to wait. - # @return [Object] see Dereferenceable#deref - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#65 - def value(timeout = T.unsafe(nil)); end - - # The current value of the obligation. Will be `nil` while the state is - # pending or the operation has been rejected. Will re-raise any exceptions - # raised during processing (but will not raise an exception on timeout). - # - # @param timeout [Numeric] the maximum time in seconds to wait. - # @raise [Exception] raises the reason when rejected - # @return [Object] see Dereferenceable#deref - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#98 - def value!(timeout = T.unsafe(nil)); end - - # Wait until obligation is complete or the timeout has been reached. - # - # @param timeout [Numeric] the maximum time in seconds to wait. - # @return [Obligation] self - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#74 - def wait(timeout = T.unsafe(nil)); end - - # Wait until obligation is complete or the timeout is reached. Will re-raise - # any exceptions raised during processing (but will not raise an exception - # on timeout). - # - # @param timeout [Numeric] the maximum time in seconds to wait. - # @raise [Exception] raises the reason when rejected - # @return [Obligation] self - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#86 - def wait!(timeout = T.unsafe(nil)); end - - protected - - # Atomic compare and set operation - # State is set to `next_state` only if `current state == expected_current`. - # - # @param next_state [Symbol] - # @param expected_current [Symbol] - # @return [Boolean] true is state is changed, false otherwise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#174 - def compare_and_set_state(next_state, *expected_current); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#145 - def event; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#134 - def get_arguments_from(opts = T.unsafe(nil)); end - - # Executes the block within mutex if current state is included in expected_states - # - # @return block value if executed, false otherwise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#190 - def if_state(*expected_states); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#139 - def init_obligation; end - - # Am I in the current state? - # - # @param expected [Symbol] The state to check against - # @return [Boolean] true if in the expected state else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#210 - def ns_check_state?(expected); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#215 - def ns_set_state(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#150 - def set_state(success, value, reason); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#161 - def state=(value); end -end - -# The [observer pattern](http://en.wikipedia.org/wiki/Observer_pattern) is one -# of the most useful design patterns. -# -# The workflow is very simple: -# - an `observer` can register itself to a `subject` via a callback -# - many `observers` can be registered to the same `subject` -# - the `subject` notifies all registered observers when its status changes -# - an `observer` can deregister itself when is no more interested to receive -# event notifications -# -# In a single threaded environment the whole pattern is very easy: the -# `subject` can use a simple data structure to manage all its subscribed -# `observer`s and every `observer` can react directly to every event without -# caring about synchronization. -# -# In a multi threaded environment things are more complex. The `subject` must -# synchronize the access to its data structure and to do so currently we're -# using two specialized ObserverSet: {Concurrent::Concern::CopyOnWriteObserverSet} -# and {Concurrent::Concern::CopyOnNotifyObserverSet}. -# -# When implementing and `observer` there's a very important rule to remember: -# **there are no guarantees about the thread that will execute the callback** -# -# Let's take this example -# ``` -# class Observer -# def initialize -# @count = 0 -# end -# -# def update -# @count += 1 -# end -# end -# -# obs = Observer.new -# [obj1, obj2, obj3, obj4].each { |o| o.add_observer(obs) } -# # execute [obj1, obj2, obj3, obj4] -# ``` -# -# `obs` is wrong because the variable `@count` can be accessed by different -# threads at the same time, so it should be synchronized (using either a Mutex -# or an AtomicFixum) -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#50 -module Concurrent::Concern::Observable - # Adds an observer to this set. If a block is passed, the observer will be - # created by this method and no other params should be passed. - # - # @param observer [Object] the observer to add - # @param func [Symbol] the function to call on the observer during notification. - # Default is :update - # @return [Object] the added observer - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#61 - def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end - - # Return the number of observers associated with this object. - # - # @return [Integer] the observers count - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#101 - def count_observers; end - - # Remove `observer` as an observer on this object so that it will no - # longer receive notifications. - # - # @param observer [Object] the observer to remove - # @return [Object] the deleted observer - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#82 - def delete_observer(observer); end - - # Remove all observers associated with this object. - # - # @return [Observable] self - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#91 - def delete_observers; end - - # As `#add_observer` but can be used for chaining. - # - # @param observer [Object] the observer to add - # @param func [Symbol] the function to call on the observer during notification. - # @return [Observable] self - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#70 - def with_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end - - protected - - # Returns the value of attribute observers. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#107 - def observers; end - - # Sets the attribute observers - # - # @param value the value to set the attribute observers to. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#107 - def observers=(_arg0); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#70 -class Concurrent::ConcurrentUpdateError < ::ThreadError; end - -# frozen pre-allocated backtrace to speed ConcurrentUpdateError -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#72 -Concurrent::ConcurrentUpdateError::CONC_UP_ERR_BACKTRACE = T.let(T.unsafe(nil), Array) - -# Raised when errors occur during configuration. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#6 -class Concurrent::ConfigurationError < ::Concurrent::Error; end - -# A synchronization object that allows one thread to wait on multiple other threads. -# The thread that will wait creates a `CountDownLatch` and sets the initial value -# (normally equal to the number of other threads). The initiating thread passes the -# latch to the other threads then waits for the other threads by calling the `#wait` -# method. Each of the other threads calls `#count_down` when done with its work. -# When the latch counter reaches zero the waiting thread is unblocked and continues -# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. -# -# @example Waiter and Decrementer -# latch = Concurrent::CountDownLatch.new(3) -# -# waiter = Thread.new do -# latch.wait() -# puts ("Waiter released") -# end -# -# decrementer = Thread.new do -# sleep(1) -# latch.count_down -# puts latch.count -# -# sleep(1) -# latch.count_down -# puts latch.count -# -# sleep(1) -# latch.count_down -# puts latch.count -# end -# -# [waiter, decrementer].each(&:join) -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb#98 -class Concurrent::CountDownLatch < ::Concurrent::MutexCountDownLatch; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb#56 -Concurrent::CountDownLatchImplementation = Concurrent::MutexCountDownLatch - -# A synchronization aid that allows a set of threads to all wait for each -# other to reach a common barrier point. -# -# @example -# barrier = Concurrent::CyclicBarrier.new(3) -# jobs = Array.new(3) { |i| -> { sleep i; p done: i } } -# process = -> (i) do -# # waiting to start at the same time -# barrier.wait -# # execute job -# jobs[i].call -# # wait for others to finish -# barrier.wait -# end -# threads = 2.times.map do |i| -# Thread.new(i, &process) -# end -# -# # use main as well -# process.call 2 -# -# # here we can be sure that all jobs are processed -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#27 -class Concurrent::CyclicBarrier < ::Concurrent::Synchronization::LockableObject - # Create a new `CyclicBarrier` that waits for `parties` threads - # - # @param parties [Fixnum] the number of parties - # @raise [ArgumentError] if `parties` is not an integer or is less than zero - # @return [CyclicBarrier] a new instance of CyclicBarrier - # @yield an optional block that will be executed that will be executed after - # the last thread arrives and before the others are released - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#40 - def initialize(parties, &block); end - - # A barrier can be broken when: - # - a thread called the `reset` method while at least one other thread was waiting - # - at least one thread timed out on `wait` method - # - # A broken barrier can be restored using `reset` it's safer to create a new one - # - # @return [Boolean] true if the barrier is broken otherwise false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#105 - def broken?; end - - # @return [Fixnum] the number of threads currently waiting on the barrier - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#54 - def number_waiting; end - - # @return [Fixnum] the number of threads needed to pass the barrier - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#49 - def parties; end - - # resets the barrier to its initial state - # If there is at least one waiting thread, it will be woken up, the `wait` - # method will return false and the barrier will be broken - # If the barrier is broken, this method restores it to the original state - # - # @return [nil] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#95 - def reset; end - - # Blocks on the barrier until the number of waiting threads is equal to - # `parties` or until `timeout` is reached or `reset` is called - # If a block has been passed to the constructor, it will be executed once by - # the last arrived thread before releasing the others - # - # @param timeout [Fixnum] the number of seconds to wait for the counter or - # `nil` to block indefinitely - # @return [Boolean] `true` if the `count` reaches zero else false on - # `timeout` or on `reset` or if the barrier is broken - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#66 - def wait(timeout = T.unsafe(nil)); end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#111 - def ns_generation_done(generation, status, continue = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#122 - def ns_initialize(parties, &block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#117 - def ns_next_generation; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#30 -class Concurrent::CyclicBarrier::Generation < ::Struct - # Returns the value of attribute status - # - # @return [Object] the current value of status - def status; end - - # Sets the attribute status - # - # @param value [Object] the value to set the attribute status to. - # @return [Object] the newly set value - def status=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Lazy evaluation of a block yielding an immutable result. Useful for -# expensive operations that may never be needed. It may be non-blocking, -# supports the `Concern::Obligation` interface, and accepts the injection of -# custom executor upon which to execute the block. Processing of -# block will be deferred until the first time `#value` is called. -# At that time the caller can choose to return immediately and let -# the block execute asynchronously, block indefinitely, or block -# with a timeout. -# -# When a `Delay` is created its state is set to `pending`. The value and -# reason are both `nil`. The first time the `#value` method is called the -# enclosed operation will be run and the calling thread will block. Other -# threads attempting to call `#value` will block as well. Once the operation -# is complete the *value* will be set to the result of the operation or the -# *reason* will be set to the raised exception, as appropriate. All threads -# blocked on `#value` will return. Subsequent calls to `#value` will immediately -# return the cached value. The operation will only be run once. This means that -# any side effects created by the operation will only happen once as well. -# -# `Delay` includes the `Concurrent::Concern::Dereferenceable` mixin to support thread -# safety of the reference returned by `#value`. -# -# @note The default behavior of `Delay` is to block indefinitely when -# calling either `value` or `wait`, executing the delayed operation on -# the current thread. This makes the `timeout` value completely -# irrelevant. To enable non-blocking behavior, use the `executor` -# constructor option. This will cause the delayed operation to be -# execute on the given executor, allowing the call to timeout. -# @see Concurrent::Concern::Dereferenceable -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#44 -class Concurrent::Delay < ::Concurrent::Synchronization::LockableObject - include ::Concurrent::Concern::Dereferenceable - include ::Concurrent::Concern::Obligation - - # Create a new `Delay` in the `:pending` state. - # - # @raise [ArgumentError] if no block is given - # @return [Delay] a new instance of Delay - # @yield the delayed operation to perform - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#62 - def initialize(opts = T.unsafe(nil), &block); end - - # Reconfigures the block returning the value if still `#incomplete?` - # - # @return [true, false] if success - # @yield the delayed operation to perform - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#146 - def reconfigure(&block); end - - # Return the value this object represents after applying the options - # specified by the `#set_deref_options` method. If the delayed operation - # raised an exception this method will return nil. The exception object - # can be accessed via the `#reason` method. - # - # @note The default behavior of `Delay` is to block indefinitely when - # calling either `value` or `wait`, executing the delayed operation on - # the current thread. This makes the `timeout` value completely - # irrelevant. To enable non-blocking behavior, use the `executor` - # constructor option. This will cause the delayed operation to be - # execute on the given executor, allowing the call to timeout. - # @param timeout [Numeric] the maximum number of seconds to wait - # @return [Object] the current value of the object - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#77 - def value(timeout = T.unsafe(nil)); end - - # Return the value this object represents after applying the options - # specified by the `#set_deref_options` method. If the delayed operation - # raised an exception, this method will raise that exception (even when) - # the operation has already been executed). - # - # @note The default behavior of `Delay` is to block indefinitely when - # calling either `value` or `wait`, executing the delayed operation on - # the current thread. This makes the `timeout` value completely - # irrelevant. To enable non-blocking behavior, use the `executor` - # constructor option. This will cause the delayed operation to be - # execute on the given executor, allowing the call to timeout. - # @param timeout [Numeric] the maximum number of seconds to wait - # @raise [Exception] when `#rejected?` raises `#reason` - # @return [Object] the current value of the object - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#113 - def value!(timeout = T.unsafe(nil)); end - - # Return the value this object represents after applying the options - # specified by the `#set_deref_options` method. - # - # @note The default behavior of `Delay` is to block indefinitely when - # calling either `value` or `wait`, executing the delayed operation on - # the current thread. This makes the `timeout` value completely - # irrelevant. To enable non-blocking behavior, use the `executor` - # constructor option. This will cause the delayed operation to be - # execute on the given executor, allowing the call to timeout. - # @param timeout [Integer] (nil) the maximum number of seconds to wait for - # the value to be computed. When `nil` the caller will block indefinitely. - # @return [Object] self - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#132 - def wait(timeout = T.unsafe(nil)); end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#160 - def ns_initialize(opts, &block); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#173 - def execute_task_once; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#7 -class Concurrent::DependencyCounter - # @return [DependencyCounter] a new instance of DependencyCounter - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#9 - def initialize(count, &block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#14 - def update(time, value, reason); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#3 -class Concurrent::Error < ::StandardError; end - -# Old school kernel-style event reminiscent of Win32 programming in C++. -# -# When an `Event` is created it is in the `unset` state. Threads can choose to -# `#wait` on the event, blocking until released by another thread. When one -# thread wants to alert all blocking threads it calls the `#set` method which -# will then wake up all listeners. Once an `Event` has been set it remains set. -# New threads calling `#wait` will return immediately. An `Event` may be -# `#reset` at any time once it has been set. -# -# @example -# event = Concurrent::Event.new -# -# t1 = Thread.new do -# puts "t1 is waiting" -# event.wait(1) -# puts "event occurred" -# end -# -# t2 = Thread.new do -# puts "t2 calling set" -# event.set -# end -# -# [t1, t2].each(&:join) -# -# # prints: -# # t1 is waiting -# # t2 calling set -# # event occurred -# @see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682655.aspx -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#36 -class Concurrent::Event < ::Concurrent::Synchronization::LockableObject - # Creates a new `Event` in the unset state. Threads calling `#wait` on the - # `Event` will block. - # - # @return [Event] a new instance of Event - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#40 - def initialize; end - - # Reset a previously set event back to the `unset` state. - # Has no effect if the `Event` has not yet been set. - # - # @return [Boolean] should always return `true` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#68 - def reset; end - - # Trigger the event, setting the state to `set` and releasing all threads - # waiting on the event. Has no effect if the `Event` has already been set. - # - # @return [Boolean] should always return `true` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#56 - def set; end - - # Is the object in the set state? - # - # @return [Boolean] indicating whether or not the `Event` has been set - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#48 - def set?; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#60 - def try?; end - - # Wait a given number of seconds for the `Event` to be set by another - # thread. Will wait forever when no `timeout` value is given. Returns - # immediately if the `Event` has already been set. - # - # @return [Boolean] true if the `Event` was set before timeout else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#83 - def wait(timeout = T.unsafe(nil)); end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#104 - def ns_initialize; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#96 - def ns_set; end -end - -# A synchronization point at which threads can pair and swap elements within -# pairs. Each thread presents some object on entry to the exchange method, -# matches with a partner thread, and receives its partner's object on return. -# -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. -# This implementation is very simple, using only a single slot for each -# exchanger (unlike more advanced implementations which use an "arena"). -# This approach will work perfectly fine when there are only a few threads -# accessing a single `Exchanger`. Beyond a handful of threads the performance -# will degrade rapidly due to contention on the single slot, but the algorithm -# will remain correct. -# -# @example -# -# exchanger = Concurrent::Exchanger.new -# -# threads = [ -# Thread.new { puts "first: " << exchanger.exchange('foo', 1) }, #=> "first: bar" -# Thread.new { puts "second: " << exchanger.exchange('bar', 1) } #=> "second: foo" -# ] -# threads.each {|t| t.join(2) } -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Exchanger.html java.util.concurrent.Exchanger -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#336 -class Concurrent::Exchanger < ::Concurrent::RubyExchanger; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#327 -Concurrent::ExchangerImplementation = Concurrent::RubyExchanger - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#157 -module Concurrent::ExecutorService - include ::Concurrent::Concern::Logging - - # Submit a task to the executor for asynchronous processing. - # - # @param task [Proc] the asynchronous task to perform - # @return [self] returns itself - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#166 - def <<(task); end - - # Does the task queue have a maximum size? - # - # @note Always returns `false` - # @return [Boolean] True if the task queue has a maximum size else false. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#174 - def can_overflow?; end - - # Submit a task to the executor for asynchronous processing. - # - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#161 - def post(*args, &task); end - - # Does this executor guarantee serialization of its operations? - # - # @note Always returns `false` - # @return [Boolean] True if the executor guarantees that all operations - # will be post in the order they are received and no two operations may - # occur simultaneously. Else false. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#181 - def serialized?; end -end - -# A `FiberLocalVar` is a variable where the value is different for each fiber. -# Each variable may have a default value, but when you modify the variable only -# the current fiber will ever see that change. -# -# This is similar to Ruby's built-in fiber-local variables (`Thread.current[:name]`), -# but with these major advantages: -# * `FiberLocalVar` has its own identity, it doesn't need a Symbol. -# * Each Ruby's built-in fiber-local variable leaks some memory forever (it's a Symbol held forever on the fiber), -# so it's only OK to create a small amount of them. -# `FiberLocalVar` has no such issue and it is fine to create many of them. -# * Ruby's built-in fiber-local variables leak forever the value set on each fiber (unless set to nil explicitly). -# `FiberLocalVar` automatically removes the mapping for each fiber once the `FiberLocalVar` instance is GC'd. -# -# @example -# v = FiberLocalVar.new(14) -# v.value #=> 14 -# v.value = 2 -# v.value #=> 2 -# @example -# v = FiberLocalVar.new(14) -# -# Fiber.new do -# v.value #=> 14 -# v.value = 1 -# v.value #=> 1 -# end.resume -# -# Fiber.new do -# v.value #=> 14 -# v.value = 2 -# v.value #=> 2 -# end.resume -# -# v.value #=> 14 -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#41 -class Concurrent::FiberLocalVar - # Creates a fiber local variable. - # - # @param default [Object] the default value when otherwise unset - # @param default_block [Proc] Optional block that gets called to obtain the - # default value for each fiber - # @return [FiberLocalVar] a new instance of FiberLocalVar - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#49 - def initialize(default = T.unsafe(nil), &default_block); end - - # Bind the given value to fiber local storage during - # execution of the given block. - # - # @param value [Object] the value to bind - # @return [Object] the value - # @yield the operation to be performed with the bound variable - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#86 - def bind(value); end - - # Returns the value in the current fiber's copy of this fiber-local variable. - # - # @return [Object] the current value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#68 - def value; end - - # Sets the current fiber's copy of this fiber-local variable to the specified value. - # - # @param value [Object] the value to set - # @return [Object] the new value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#76 - def value=(value); end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#101 - def default; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#42 -Concurrent::FiberLocalVar::LOCALS = T.let(T.unsafe(nil), Concurrent::FiberLocals) - -# An array-backed storage of indexed variables per fiber. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#166 -class Concurrent::FiberLocals < ::Concurrent::AbstractLocals - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#167 - def locals; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#171 - def locals!; end -end - -# A thread pool that reuses a fixed number of threads operating off an unbounded queue. -# At any point, at most `num_threads` will be active processing tasks. When all threads are busy new -# tasks `#post` to the thread pool are enqueued until a thread becomes available. -# Should a thread crash for any reason the thread will immediately be removed -# from the pool and replaced. -# -# The API and behavior of this class are based on Java's `FixedThreadPool` -# -# **Thread Pool Options** -# -# Thread pools support several configuration options: -# -# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. -# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and -# a `-worker-` name is given to its threads if supported by used Ruby -# implementation. `` is uniq for each thread. -# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at -# any one time. When the queue size reaches `max_queue` and no new threads can be created, -# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. -# * `auto_terminate`: When true (default), the threads started will be marked as daemon. -# * `fallback_policy`: The policy defining how rejected tasks are handled. -# -# Three fallback policies are supported: -# -# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. -# * `:discard`: Discard the task and return false. -# * `:caller_runs`: Execute the task on the calling thread. -# -# **Shutting Down Thread Pools** -# -# Killing a thread pool while tasks are still being processed, either by calling -# the `#kill` method or at application exit, will have unpredictable results. There -# is no way for the thread pool to know what resources are being used by the -# in-progress tasks. When those tasks are killed the impact on those resources -# cannot be predicted. The *best* practice is to explicitly shutdown all thread -# pools using the provided methods: -# -# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks -# * Call `#wait_for_termination` with an appropriate timeout interval an allow -# the orderly shutdown to complete -# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time -# -# On some runtime platforms (most notably the JVM) the application will not -# exit until all thread pools have been shutdown. To prevent applications from -# "hanging" on exit, all threads can be marked as daemon according to the -# `:auto_terminate` option. -# -# ```ruby -# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon -# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon -# ``` -# -# @note Failure to properly shutdown a thread pool can lead to unpredictable results. -# Please read *Shutting Down Thread Pools* for more information. -# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class -# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface -# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb#201 -class Concurrent::FixedThreadPool < ::Concurrent::ThreadPoolExecutor - # Create a new thread pool. - # - # @option opts - # @param num_threads [Integer] the number of threads to allocate - # @param opts [Hash] the options defining pool behavior. - # @raise [ArgumentError] if `num_threads` is less than or equal to zero - # @raise [ArgumentError] if `fallback_policy` is not a known policy - # @return [FixedThreadPool] a new instance of FixedThreadPool - # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool-int- - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb#215 - def initialize(num_threads, opts = T.unsafe(nil)); end -end - -# {include:file:docs-source/future.md} -# -# @see http://ruby-doc.org/stdlib-2.1.1/libdoc/observer/rdoc/Observable.html Ruby Observable module -# @see http://clojuredocs.org/clojure_core/clojure.core/future Clojure's future function -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html java.util.concurrent.Future -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#21 -class Concurrent::Future < ::Concurrent::IVar - # Create a new `Future` in the `:unscheduled` state. - # - # @option opts - # @param opts [Hash] a customizable set of options - # @raise [ArgumentError] if no block is given - # @return [Future] a new instance of Future - # @yield the asynchronous operation to perform - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#33 - def initialize(opts = T.unsafe(nil), &block); end - - # Attempt to cancel the operation if it has not already processed. - # The operation can only be cancelled while still `pending`. It cannot - # be cancelled once it has begun processing or has completed. - # - # @return [Boolean] was the operation successfully cancelled. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#99 - def cancel; end - - # Has the operation been successfully cancelled? - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#111 - def cancelled?; end - - # Execute an `:unscheduled` `Future`. Immediately sets the state to `:pending` and - # passes the block to a new thread/thread pool for eventual execution. - # Does nothing if the `Future` is in any state other than `:unscheduled`. - # - # @example Instance and execute in separate steps - # future = Concurrent::Future.new{ sleep(1); 42 } - # future.state #=> :unscheduled - # future.execute - # future.state #=> :pending - # @example Instance and execute in one line - # future = Concurrent::Future.new{ sleep(1); 42 }.execute - # future.state #=> :pending - # @return [Future] a reference to `self` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#53 - def execute; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#82 - def set(value = T.unsafe(nil), &block); end - - # Wait the given number of seconds for the operation to complete. - # On timeout attempt to cancel the operation. - # - # @param timeout [Numeric] the maximum time in seconds to wait. - # @return [Boolean] true if the operation completed before the timeout - # else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#121 - def wait_or_cancel(timeout); end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#133 - def ns_initialize(value, opts); end - - class << self - # Create a new `Future` object with the given block, execute it, and return the - # `:pending` object. - # - # @example - # future = Concurrent::Future.execute{ sleep(1); 42 } - # future.state #=> :pending - # @option opts - # @param opts [Hash] a customizable set of options - # @raise [ArgumentError] if no block is given - # @return [Future] the newly created `Future` in the `:pending` state - # @yield the asynchronous operation to perform - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#77 - def execute(opts = T.unsafe(nil), &block); end - end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#18 -Concurrent::GLOBAL_FAST_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#30 -Concurrent::GLOBAL_IMMEDIATE_EXECUTOR = T.let(T.unsafe(nil), Concurrent::ImmediateExecutor) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#22 -Concurrent::GLOBAL_IO_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#111 -Concurrent::GLOBAL_LOGGER = T.let(T.unsafe(nil), Concurrent::AtomicReference) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#26 -Concurrent::GLOBAL_TIMER_SET = T.let(T.unsafe(nil), Concurrent::Delay) - -# A thread-safe subclass of Hash. This version locks against the object -# itself for every method call, ensuring only one thread can be reading -# or writing at a time. This includes iteration methods like `#each`, -# which takes the lock repeatedly when reading an item. -# -# @see http://ruby-doc.org/core/Hash.html Ruby standard library `Hash` -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#49 -class Concurrent::Hash < ::Hash; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#16 -Concurrent::HashImplementation = Hash - -# An `IVar` is like a future that you can assign. As a future is a value that -# is being computed that you can wait on, an `IVar` is a value that is waiting -# to be assigned, that you can wait on. `IVars` are single assignment and -# deterministic. -# -# Then, express futures as an asynchronous computation that assigns an `IVar`. -# The `IVar` becomes the primitive on which [futures](Future) and -# [dataflow](Dataflow) are built. -# -# An `IVar` is a single-element container that is normally created empty, and -# can only be set once. The I in `IVar` stands for immutable. Reading an -# `IVar` normally blocks until it is set. It is safe to set and read an `IVar` -# from different threads. -# -# If you want to have some parallel task set the value in an `IVar`, you want -# a `Future`. If you want to create a graph of parallel tasks all executed -# when the values they depend on are ready you want `dataflow`. `IVar` is -# generally a low-level primitive. -# -# ## Examples -# -# Create, set and get an `IVar` -# -# ```ruby -# ivar = Concurrent::IVar.new -# ivar.set 14 -# ivar.value #=> 14 -# ivar.set 2 # would now be an error -# ``` -# -# ## See Also -# -# 1. For the theory: Arvind, R. Nikhil, and K. Pingali. -# [I-Structures: Data structures for parallel computing](http://dl.acm.org/citation.cfm?id=69562). -# In Proceedings of Workshop on Graph Reduction, 1986. -# 2. For recent application: -# [DataDrivenFuture in Habanero Java from Rice](http://www.cs.rice.edu/~vs3/hjlib/doc/edu/rice/hj/api/HjDataDrivenFuture.html). -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#48 -class Concurrent::IVar < ::Concurrent::Synchronization::LockableObject - include ::Concurrent::Concern::Dereferenceable - include ::Concurrent::Concern::Obligation - include ::Concurrent::Concern::Observable - - # Create a new `IVar` in the `:pending` state with the (optional) initial value. - # - # @option opts - # @option opts - # @option opts - # @param value [Object] the initial value - # @param opts [Hash] the options to create a message with - # @return [IVar] a new instance of IVar - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#62 - def initialize(value = T.unsafe(nil), opts = T.unsafe(nil), &block); end - - # Add an observer on this object that will receive notification on update. - # - # Upon completion the `IVar` will notify all observers in a thread-safe way. - # The `func` method of the observer will be called with three arguments: the - # `Time` at which the `Future` completed the asynchronous operation, the - # final `value` (or `nil` on rejection), and the final `reason` (or `nil` on - # fulfillment). - # - # @param observer [Object] the object that will be notified of changes - # @param func [Symbol] symbol naming the method to call when this - # `Observable` has changes` - # @raise [ArgumentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#81 - def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end - - # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. - # - # @param reason [Object] for the failure - # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already - # been set or otherwise completed - # @return [IVar] self - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#135 - def fail(reason = T.unsafe(nil)); end - - # Set the `IVar` to a value and wake or notify all threads waiting on it. - # - # @param value [Object] the value to store in the `IVar` - # @raise [ArgumentError] if both a value and a block are given - # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already - # been set or otherwise completed - # @return [IVar] self - # @yield A block operation to use for setting the value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#113 - def set(value = T.unsafe(nil)); end - - # Attempt to set the `IVar` with the given value or block. Return a - # boolean indicating the success or failure of the set operation. - # - # @param value [Object] the value to store in the `IVar` - # @raise [ArgumentError] if both a value and a block are given - # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already - # been set or otherwise completed - # @return [Boolean] true if the value was set else false - # @yield A block operation to use for setting the value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#145 - def try_set(value = T.unsafe(nil), &block); end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#202 - def check_for_block_or_value!(block_given, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#177 - def complete(success, value, reason); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#184 - def complete_without_notification(success, value, reason); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#190 - def notify_observers(value, reason); end - - # @raise [MultipleAssignmentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#195 - def ns_complete_without_notification(success, value, reason); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#155 - def ns_initialize(value, opts); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#168 - def safe_execute(task, args = T.unsafe(nil)); end -end - -# Raised when an operation is attempted which is not legal given the -# receiver's current state -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#20 -class Concurrent::IllegalOperationError < ::Concurrent::Error; end - -# An executor service which runs all operations on the current thread, -# blocking as necessary. Operations are performed in the order they are -# received and no two operations can be performed simultaneously. -# -# This executor service exists mainly for testing an debugging. When used -# it immediately runs every `#post` operation on the current thread, blocking -# that thread until the operation is complete. This can be very beneficial -# during testing because it makes all operations deterministic. -# -# @note Intended for use primarily in testing and debugging. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#17 -class Concurrent::ImmediateExecutor < ::Concurrent::AbstractExecutorService - include ::Concurrent::SerialExecutorService - - # Creates a new executor - # - # @return [ImmediateExecutor] a new instance of ImmediateExecutor - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#21 - def initialize; end - - # Submit a task to the executor for asynchronous processing. - # - # @param task [Proc] the asynchronous task to perform - # @return [self] returns itself - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#34 - def <<(task); end - - # Begin an orderly shutdown. Tasks already in the queue will be executed, - # but no new tasks will be accepted. Has no additional effect if the - # thread pool is not running. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#55 - def kill; end - - # Submit a task to the executor for asynchronous processing. - # - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#26 - def post(*args, &task); end - - # Is the executor running? - # - # @return [Boolean] `true` when running, `false` when shutting down or shutdown - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#40 - def running?; end - - # Begin an orderly shutdown. Tasks already in the queue will be executed, - # but no new tasks will be accepted. Has no additional effect if the - # thread pool is not running. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#55 - def shutdown; end - - # Is the executor shutdown? - # - # @return [Boolean] `true` when shutdown, `false` when shutting down or running - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#50 - def shutdown?; end - - # Is the executor shuttingdown? - # - # @return [Boolean] `true` when not running and not shutdown, else `false` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#45 - def shuttingdown?; end - - # Block until executor shutdown is complete or until `timeout` seconds have - # passed. - # - # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` - # must be called before this method (or on another thread). - # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete - # @return [Boolean] `true` if shutdown complete or false on `timeout` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#62 - def wait_for_termination(timeout = T.unsafe(nil)); end -end - -# Raised when an attempt is made to violate an immutability guarantee. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#16 -class Concurrent::ImmutabilityError < ::Concurrent::Error; end - -# A thread-safe, immutable variation of Ruby's standard `Struct`. -# -# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#9 -module Concurrent::ImmutableStruct - include ::Concurrent::Synchronization::AbstractStruct - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#51 - def ==(other); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#46 - def [](member); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#56 - def each(&block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#62 - def each_pair(&block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#29 - def inspect; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#36 - def merge(other, &block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#68 - def select(&block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#17 - def to_a; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#41 - def to_h; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#29 - def to_s; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#17 - def values; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#24 - def values_at(*indexes); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#76 - def initialize_copy(original); end - - class << self - # @private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#12 - def included(base); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#82 - def new(*args, &block); end - end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#92 -Concurrent::ImmutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) - -# An executor service which runs all operations on a new thread, blocking -# until it completes. Operations are performed in the order they are received -# and no two operations can be performed simultaneously. -# -# This executor service exists mainly for testing an debugging. When used it -# immediately runs every `#post` operation on a new thread, blocking the -# current thread until the operation is complete. This is similar to how the -# ImmediateExecutor works, but the operation has the full stack of the new -# thread at its disposal. This can be helpful when the operations will spawn -# more operations on the same executor and so on - such a situation might -# overflow the single stack in case of an ImmediateExecutor, which is -# inconsistent with how it would behave for a threaded executor. -# -# @note Intended for use primarily in testing and debugging. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#19 -class Concurrent::IndirectImmediateExecutor < ::Concurrent::ImmediateExecutor - # Creates a new executor - # - # @return [IndirectImmediateExecutor] a new instance of IndirectImmediateExecutor - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#21 - def initialize; end - - # Submit a task to the executor for asynchronous processing. - # - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#27 - def post(*args, &task); end -end - -# Raised when an object's methods are called when it has not been -# properly initialized. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#24 -class Concurrent::InitializationError < ::Concurrent::Error; end - -# Raised when a lifecycle method (such as `stop`) is called in an improper -# sequence or when the object is in an inappropriate state. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#13 -class Concurrent::LifecycleError < ::Concurrent::Error; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#6 -class Concurrent::LockFreeStack < ::Concurrent::Synchronization::Object - include ::Enumerable - extend ::Concurrent::Synchronization::SafeInitialization - - # @param head [Node] - # @return [LockFreeStack] a new instance of LockFreeStack - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#51 - def initialize(head = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 - def __initialize_atomic_fields__; end - - # @return [true, false] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#118 - def clear; end - - # @return [self] - # @yield over the cleared stack - # @yieldparam value [Object] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#142 - def clear_each(&block); end - - # @param head [Node] - # @return [true, false] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#128 - def clear_if(head); end - - # @param head [Node] - # @return [true, false] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#99 - def compare_and_clear(head); end - - # @param head [Node] - # @return [true, false] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#85 - def compare_and_pop(head); end - - # @param head [Node] - # @param value [Object] - # @return [true, false] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#65 - def compare_and_push(head, value); end - - # @param head [Node] - # @return [self] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#107 - def each(head = T.unsafe(nil)); end - - # @param head [Node] - # @return [true, false] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#58 - def empty?(head = T.unsafe(nil)); end - - # @return [String] Short string representation. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#154 - def inspect; end - - # @return [Node] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#79 - def peek; end - - # @return [Object] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#90 - def pop; end - - # @param value [Object] - # @return [self] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#71 - def push(value); end - - # @param head [Node] - # @param new_head [Node] - # @return [true, false] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#135 - def replace_if(head, new_head); end - - # @return [String] Short string representation. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#154 - def to_s; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 - def compare_and_set_head(expected, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 - def head; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 - def head=(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 - def swap_head(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 - def update_head(&block); end - - class << self - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#41 - def of1(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#46 - def of2(value1, value2); end - end -end - -# The singleton for empty node -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#32 -Concurrent::LockFreeStack::EMPTY = T.let(T.unsafe(nil), Concurrent::LockFreeStack::Node) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#10 -class Concurrent::LockFreeStack::Node - # @return [Node] a new instance of Node - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#23 - def initialize(value, next_node); end - - # @return [Node] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#14 - def next_node; end - - # @return [Object] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#17 - def value; end - - # allow to nil-ify to free GC when the entry is no longer relevant, not synchronised - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#21 - def value=(_arg0); end - - class << self - def [](*_arg0); end - end -end - -# Either {FiberLocalVar} or {ThreadLocalVar} depending on whether Mutex (and Monitor) -# are held, respectively, per Fiber or per Thread. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb#21 -Concurrent::LockLocalVar = Concurrent::FiberLocalVar - -# An `MVar` is a synchronized single element container. They are empty or -# contain one item. Taking a value from an empty `MVar` blocks, as does -# putting a value into a full one. You can either think of them as blocking -# queue of length one, or a special kind of mutable variable. -# -# On top of the fundamental `#put` and `#take` operations, we also provide a -# `#mutate` that is atomic with respect to operations on the same instance. -# These operations all support timeouts. -# -# We also support non-blocking operations `#try_put!` and `#try_take!`, a -# `#set!` that ignores existing values, a `#value` that returns the value -# without removing it or returns `MVar::EMPTY`, and a `#modify!` that yields -# `MVar::EMPTY` if the `MVar` is empty and can be used to set `MVar::EMPTY`. -# You shouldn't use these operations in the first instance. -# -# `MVar` is a [Dereferenceable](Dereferenceable). -# -# `MVar` is related to M-structures in Id, `MVar` in Haskell and `SyncVar` in Scala. -# -# Note that unlike the original Haskell paper, our `#take` is blocking. This is how -# Haskell and Scala do it today. -# -# ## See Also -# -# 1. P. Barth, R. Nikhil, and Arvind. [M-Structures: Extending a parallel, non- strict, functional language with state](http://dl.acm.org/citation.cfm?id=652538). In Proceedings of the 5th -# ACM Conference on Functional Programming Languages and Computer Architecture (FPCA), 1991. -# -# 2. S. Peyton Jones, A. Gordon, and S. Finne. [Concurrent Haskell](http://dl.acm.org/citation.cfm?id=237794). -# In Proceedings of the 23rd Symposium on Principles of Programming Languages -# (PoPL), 1996. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#38 -class Concurrent::MVar < ::Concurrent::Synchronization::Object - include ::Concurrent::Concern::Dereferenceable - extend ::Concurrent::Synchronization::SafeInitialization - - # Create a new `MVar`, either empty or with an initial value. - # - # @param opts [Hash] the options controlling how the future will be processed - # @return [MVar] a new instance of MVar - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#54 - def initialize(value = T.unsafe(nil), opts = T.unsafe(nil)); end - - # acquires lock on the from an `MVAR`, yields the value to provided block, - # and release lock. A timeout can be set to limit the time spent blocked, - # in which case it returns `TIMEOUT` if the time is exceeded. - # - # @return [Object] the value returned by the block, or `TIMEOUT` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#86 - def borrow(timeout = T.unsafe(nil)); end - - # Returns if the `MVar` is currently empty. - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#195 - def empty?; end - - # Returns if the `MVar` currently contains a value. - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#200 - def full?; end - - # Atomically `take`, yield the value to a block for transformation, and then - # `put` the transformed value. Returns the transformed value. A timeout can - # be set to limit the time spent blocked, in which case it returns `TIMEOUT` - # if the time is exceeded. - # - # @raise [ArgumentError] - # @return [Object] the transformed value, or `TIMEOUT` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#123 - def modify(timeout = T.unsafe(nil)); end - - # Non-blocking version of `modify` that will yield with `EMPTY` if there is no value yet. - # - # @raise [ArgumentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#179 - def modify!; end - - # Put a value into an `MVar`, blocking if there is already a value until - # it is empty. A timeout can be set to limit the time spent blocked, in - # which case it returns `TIMEOUT` if the time is exceeded. - # - # @return [Object] the value that was put, or `TIMEOUT` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#103 - def put(value, timeout = T.unsafe(nil)); end - - # Non-blocking version of `put` that will overwrite an existing value. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#169 - def set!(value); end - - # Remove the value from an `MVar`, leaving it empty, and blocking if there - # isn't a value. A timeout can be set to limit the time spent blocked, in - # which case it returns `TIMEOUT` if the time is exceeded. - # - # @return [Object] the value that was taken, or `TIMEOUT` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#66 - def take(timeout = T.unsafe(nil)); end - - # Non-blocking version of `put`, that returns whether or not it was successful. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#156 - def try_put!(value); end - - # Non-blocking version of `take`, that returns `EMPTY` instead of blocking. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#142 - def try_take!; end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#206 - def synchronize(&block); end - - private - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#212 - def unlocked_empty?; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#216 - def unlocked_full?; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#224 - def wait_for_empty(timeout); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#220 - def wait_for_full(timeout); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#228 - def wait_while(condition, timeout); end -end - -# Unique value that represents that an `MVar` was empty -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#43 -Concurrent::MVar::EMPTY = T.let(T.unsafe(nil), Object) - -# Unique value that represents that an `MVar` timed out before it was able -# to produce a value. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#47 -Concurrent::MVar::TIMEOUT = T.let(T.unsafe(nil), Object) - -# `Concurrent::Map` is a hash-like object and should have much better performance -# characteristics, especially under high concurrency, than `Concurrent::Hash`. -# However, `Concurrent::Map `is not strictly semantically equivalent to a ruby `Hash` -# -- for instance, it does not necessarily retain ordering by insertion time as `Hash` -# does. For most uses it should do fine though, and we recommend you consider -# `Concurrent::Map` instead of `Concurrent::Hash` for your concurrency-safe hash needs. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#39 -class Concurrent::Map < ::Concurrent::Collection::MriMapBackend - # Iterates over each key value pair. - # This method is atomic. - # - # @note Atomic methods taking a block do not allow the `self` instance - # to be used within the block. Doing so will cause a deadlock. - # @return [self] - # @yield for each key value pair in the map - # @yieldparam key [Object] - # @yieldparam value [Object] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#274 - def each; end - - # Iterates over each key. - # This method is atomic. - # - # @note Atomic methods taking a block do not allow the `self` instance - # to be used within the block. Doing so will cause a deadlock. - # @return [self] - # @yield for each key in the map - # @yieldparam key [Object] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#255 - def each_key; end - - # Iterates over each key value pair. - # This method is atomic. - # - # @note Atomic methods taking a block do not allow the `self` instance - # to be used within the block. Doing so will cause a deadlock. - # @return [self] - # @yield for each key value pair in the map - # @yieldparam key [Object] - # @yieldparam value [Object] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#274 - def each_pair; end - - # Iterates over each value. - # This method is atomic. - # - # @note Atomic methods taking a block do not allow the `self` instance - # to be used within the block. Doing so will cause a deadlock. - # @return [self] - # @yield for each value in the map - # @yieldparam value [Object] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#264 - def each_value; end - - # Is map empty? - # - # @return [true, false] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#291 - def empty?; end - - # Get a value with key, or default_value when key is absent, - # or fail when no default_value is given. - # - # @note The "fetch-then-act" methods of `Map` are not atomic. `Map` is intended - # to be use as a concurrency primitive with strong happens-before - # guarantees. It is not intended to be used as a high-level abstraction - # supporting complex operations. All read and write operations are - # thread safe, but no guarantees are made regarding race conditions - # between the fetch operation and yielding to the block. Additionally, - # this method does not support recursion. This is due to internal - # constraints that are very unlikely to change in the near future. - # @param key [Object] - # @param default_value [Object] - # @raise [KeyError] when key is missing and no default_value is provided - # @return [Object] the value or default value - # @yield default value for a key - # @yieldparam key [Object] - # @yieldreturn [Object] default value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#183 - def fetch(key, default_value = T.unsafe(nil)); end - - # Fetch value with key, or store default value when key is absent, - # or fail when no default_value is given. This is a two step operation, - # therefore not atomic. The store can overwrite other concurrently - # stored value. - # - # @param key [Object] - # @param default_value [Object] - # @return [Object] the value or default value - # @yield default value for a key - # @yieldparam key [Object] - # @yieldreturn [Object] default value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#205 - def fetch_or_store(key, default_value = T.unsafe(nil)); end - - # Get a value with key - # - # @param key [Object] - # @return [Object] the value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#21 - def get(key); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#321 - def inspect; end - - # Find key of a value. - # - # @param value [Object] - # @return [Object, nil] key or nil when not found - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#284 - def key(value); end - - # All keys - # - # @return [::Array] keys - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#236 - def keys; end - - # @raise [TypeError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#305 - def marshal_dump; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#313 - def marshal_load(hash); end - - # Set a value with key - # - # @param key [Object] - # @param value [Object] - # @return [Object] the new value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#17 - def put(key, value); end - - # Insert value into map with key if key is absent in one atomic step. - # - # @param key [Object] - # @param value [Object] - # @return [Object, nil] the previous value when key was present or nil when there was no key - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#215 - def put_if_absent(key, value); end - - # Is the value stored in the map. Iterates over all values. - # - # @param value [Object] - # @return [true, false] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#227 - def value?(value); end - - # All values - # - # @return [::Array] values - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#244 - def values; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#331 - def initialize_copy(other); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#336 - def populate_from(hash); end - - # @raise [KeyError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#327 - def raise_fetch_no_key; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#341 - def validate_options_hash!(options); end -end - -# Raised when an object with a start/stop lifecycle has been started an -# excessive number of times. Often used in conjunction with a restart -# policy or strategy. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#29 -class Concurrent::MaxRestartFrequencyError < ::Concurrent::Error; end - -# A `Maybe` encapsulates an optional value. A `Maybe` either contains a value -# of (represented as `Just`), or it is empty (represented as `Nothing`). Using -# `Maybe` is a good way to deal with errors or exceptional cases without -# resorting to drastic measures such as exceptions. -# -# `Maybe` is a replacement for the use of `nil` with better type checking. -# -# For compatibility with {Concurrent::Concern::Obligation} the predicate and -# accessor methods are aliased as `fulfilled?`, `rejected?`, `value`, and -# `reason`. -# -# ## Motivation -# -# A common pattern in languages with pattern matching, such as Erlang and -# Haskell, is to return *either* a value *or* an error from a function -# Consider this Erlang code: -# -# ```erlang -# case file:consult("data.dat") of -# {ok, Terms} -> do_something_useful(Terms); -# {error, Reason} -> lager:error(Reason) -# end. -# ``` -# -# In this example the standard library function `file:consult` returns a -# [tuple](http://erlang.org/doc/reference_manual/data_types.html#id69044) -# with two elements: an [atom](http://erlang.org/doc/reference_manual/data_types.html#id64134) -# (similar to a ruby symbol) and a variable containing ancillary data. On -# success it returns the atom `ok` and the data from the file. On failure it -# returns `error` and a string with an explanation of the problem. With this -# pattern there is no ambiguity regarding success or failure. If the file is -# empty the return value cannot be misinterpreted as an error. And when an -# error occurs the return value provides useful information. -# -# In Ruby we tend to return `nil` when an error occurs or else we raise an -# exception. Both of these idioms are problematic. Returning `nil` is -# ambiguous because `nil` may also be a valid value. It also lacks -# information pertaining to the nature of the error. Raising an exception -# is both expensive and usurps the normal flow of control. All of these -# problems can be solved with the use of a `Maybe`. -# -# A `Maybe` is unambiguous with regard to whether or not it contains a value. -# When `Just` it contains a value, when `Nothing` it does not. When `Just` -# the value it contains may be `nil`, which is perfectly valid. When -# `Nothing` the reason for the lack of a value is contained as well. The -# previous Erlang example can be duplicated in Ruby in a principled way by -# having functions return `Maybe` objects: -# -# ```ruby -# result = MyFileUtils.consult("data.dat") # returns a Maybe -# if result.just? -# do_something_useful(result.value) # or result.just -# else -# logger.error(result.reason) # or result.nothing -# end -# ``` -# -# @example Returning a Maybe from a Function -# module MyFileUtils -# def self.consult(path) -# file = File.open(path, 'r') -# Concurrent::Maybe.just(file.read) -# rescue => ex -# return Concurrent::Maybe.nothing(ex) -# ensure -# file.close if file -# end -# end -# -# maybe = MyFileUtils.consult('bogus.file') -# maybe.just? #=> false -# maybe.nothing? #=> true -# maybe.reason #=> # -# -# maybe = MyFileUtils.consult('README.md') -# maybe.just? #=> true -# maybe.nothing? #=> false -# maybe.value #=> "# Concurrent Ruby\n[![Gem Version..." -# @example Using Maybe with a Block -# result = Concurrent::Maybe.from do -# Client.find(10) # Client is an ActiveRecord model -# end -# -# # -- if the record was found -# result.just? #=> true -# result.value #=> # -# -# # -- if the record was not found -# result.just? #=> false -# result.reason #=> ActiveRecord::RecordNotFound -# @example Using Maybe with the Null Object Pattern -# # In a Rails controller... -# result = ClientService.new(10).find # returns a Maybe -# render json: result.or(NullClient.new) -# @see https://hackage.haskell.org/package/base-4.2.0.1/docs/Data-Maybe.html Haskell Data.Maybe -# @see https://github.com/purescript/purescript-maybe/blob/master/docs/Data.Maybe.md PureScript Data.Maybe -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#104 -class Concurrent::Maybe < ::Concurrent::Synchronization::Object - include ::Comparable - extend ::Concurrent::Synchronization::SafeInitialization - - # Create a new `Maybe` with the given attributes. - # - # @param just [Object] The value when `Just` else `NONE`. - # @param nothing [Exception, Object] The exception when `Nothing` else `NONE`. - # @return [Maybe] The new `Maybe`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#224 - def initialize(just, nothing); end - - # Comparison operator. - # - # @return [Integer] 0 if self and other are both `Nothing`; - # -1 if self is `Nothing` and other is `Just`; - # 1 if self is `Just` and other is nothing; - # `self.just <=> other.just` if both self and other are `Just`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#199 - def <=>(other); end - - # Is this `Maybe` a `Just` (successfully fulfilled with a value)? - # - # @return [Boolean] True if `Just` or false if `Nothing`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#176 - def fulfilled?; end - - # The value of a `Maybe` when `Just`. Will be `NONE` when `Nothing`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#114 - def just; end - - # Is this `Maybe` a `Just` (successfully fulfilled with a value)? - # - # @return [Boolean] True if `Just` or false if `Nothing`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#176 - def just?; end - - # The reason for the `Maybe` when `Nothing`. Will be `NONE` when `Just`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#117 - def nothing; end - - # Is this `Maybe` a `nothing` (rejected with an exception upon fulfillment)? - # - # @return [Boolean] True if `Nothing` or false if `Just`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#184 - def nothing?; end - - # Return either the value of self or the given default value. - # - # @return [Object] The value of self when `Just`; else the given default. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#210 - def or(other); end - - # The reason for the `Maybe` when `Nothing`. Will be `NONE` when `Just`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#117 - def reason; end - - # Is this `Maybe` a `nothing` (rejected with an exception upon fulfillment)? - # - # @return [Boolean] True if `Nothing` or false if `Just`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#184 - def rejected?; end - - # The value of a `Maybe` when `Just`. Will be `NONE` when `Nothing`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#114 - def value; end - - class << self - # Create a new `Maybe` using the given block. - # - # Runs the given block passing all function arguments to the block as block - # arguments. If the block runs to completion without raising an exception - # a new `Just` is created with the value set to the return value of the - # block. If the block raises an exception a new `Nothing` is created with - # the reason being set to the raised exception. - # - # @param args [Array] Zero or more arguments to pass to the block. - # @raise [ArgumentError] when no block given. - # @return [Maybe] The newly created object. - # @yield The block from which to create a new `Maybe`. - # @yieldparam args [Array] Zero or more block arguments passed as - # arguments to the function. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#137 - def from(*args); end - - # Create a new `Just` with the given value. - # - # @param value [Object] The value to set for the new `Maybe` object. - # @return [Maybe] The newly created object. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#152 - def just(value); end - - # Create a new `Nothing` with the given (optional) reason. - # - # @param error [Exception] The reason to set for the new `Maybe` object. - # When given a string a new `StandardError` will be created with the - # argument as the message. When no argument is given a new - # `StandardError` with an empty message will be created. - # @return [Maybe] The newly created object. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#164 - def nothing(error = T.unsafe(nil)); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 - def new(*args, &block); end - end -end - -# Indicates that the given attribute has not been set. -# When `Just` the {#nothing} getter will return `NONE`. -# When `Nothing` the {#just} getter will return `NONE`. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#111 -Concurrent::Maybe::NONE = T.let(T.unsafe(nil), Object) - -# Raised when an attempt is made to modify an immutable object -# (such as an `IVar`) after its final state has been set. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#33 -class Concurrent::MultipleAssignmentError < ::Concurrent::Error - # @return [MultipleAssignmentError] a new instance of MultipleAssignmentError - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#36 - def initialize(message = T.unsafe(nil), inspection_data = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#41 - def inspect; end - - # Returns the value of attribute inspection_data. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#34 - def inspection_data; end -end - -# Aggregates multiple exceptions. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#58 -class Concurrent::MultipleErrors < ::Concurrent::Error - # @return [MultipleErrors] a new instance of MultipleErrors - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#61 - def initialize(errors, message = T.unsafe(nil)); end - - # Returns the value of attribute errors. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#59 - def errors; end -end - -# An thread-safe variation of Ruby's standard `Struct`. Values can be set at -# construction or safely changed at any time during the object's lifecycle. -# -# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#10 -module Concurrent::MutableStruct - include ::Concurrent::Synchronization::AbstractStruct - - # Equality - # - # @return [Boolean] true if other has the same struct subclass and has - # equal member values (according to `Object#==`) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#128 - def ==(other); end - - # Attribute Reference - # - # @param member [Symbol, String, Integer] the string or symbol name of the member - # for which to obtain the value or the member's index - # @raise [NameError] if the member does not exist - # @raise [IndexError] if the index is out of range. - # @return [Object] the value of the given struct member or the member at the given index. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#118 - def [](member); end - - # Attribute Assignment - # - # Sets the value of the given struct member or the member at the given index. - # - # @param member [Symbol, String, Integer] the string or symbol name of the member - # for which to obtain the value or the member's index - # @raise [NameError] if the name does not exist - # @raise [IndexError] if the index is out of range. - # @return [Object] the value of the given struct member or the member at the given index. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#185 - def []=(member, value); end - - # Yields the value of each struct member in order. If no block is given - # an enumerator is returned. - # - # @yield the operation to be performed on each struct member - # @yieldparam value [Object] each struct value (in order) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#139 - def each(&block); end - - # Yields the name and value of each struct member in order. If no block is - # given an enumerator is returned. - # - # @yield the operation to be performed on each struct member/value pair - # @yieldparam member [Object] each struct member (in order) - # @yieldparam value [Object] each struct value (in order) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#152 - def each_pair(&block); end - - # Describe the contents of this struct in a string. - # - # @return [String] the contents of this struct in a string - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#72 - def inspect; end - - # Returns a new struct containing the contents of `other` and the contents - # of `self`. If no block is specified, the value for entries with duplicate - # keys will be that of `other`. Otherwise the value for each duplicate key - # is determined by calling the block with the key, its value in `self` and - # its value in `other`. - # - # @param other [Hash] the hash from which to set the new values - # @raise [ArgumentError] of given a member that is not defined in the struct - # @return [Synchronization::AbstractStruct] a new struct with the new values - # @yield an options block for resolving duplicate keys - # @yieldparam member [String, Symbol] the name of the member which is duplicated - # @yieldparam selfvalue [Object] the value of the member in `self` - # @yieldparam othervalue [Object] the value of the member in `other` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#94 - def merge(other, &block); end - - # Yields each member value from the struct to the block and returns an Array - # containing the member values from the struct for which the given block - # returns a true value (equivalent to `Enumerable#select`). - # - # @return [Array] an array containing each value for which the block returns true - # @yield the operation to be performed on each struct member - # @yieldparam value [Object] each struct value (in order) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#167 - def select(&block); end - - # Returns the values for this struct as an Array. - # - # @return [Array] the values for this struct - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#51 - def to_a; end - - # Returns a hash containing the names and values for the struct’s members. - # - # @return [Hash] the names and values for the struct’s members - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#103 - def to_h; end - - # Describe the contents of this struct in a string. - # - # @return [String] the contents of this struct in a string - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#72 - def to_s; end - - # Returns the values for this struct as an Array. - # - # @return [Array] the values for this struct - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#51 - def values; end - - # Returns the struct member values for each selector as an Array. - # - # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). - # - # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#63 - def values_at(*indexes); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#202 - def initialize_copy(original); end - - class << self - # Factory for creating new struct classes. - # - # ``` - # new([class_name] [, member_name]+>) -> StructClass click to toggle source - # new([class_name] [, member_name]+>) {|StructClass| block } -> StructClass - # new(value, ...) -> obj - # StructClass[value, ...] -> obj - # ``` - # - # The first two forms are used to create a new struct subclass `class_name` - # that can contain a value for each member_name . This subclass can be - # used to create instances of the structure like any other Class . - # - # If the `class_name` is omitted an anonymous struct class will be created. - # Otherwise, the name of this struct will appear as a constant in the struct class, - # so it must be unique for all structs under this base class and must start with a - # capital letter. Assigning a struct class to a constant also gives the class - # the name of the constant. - # - # If a block is given it will be evaluated in the context of `StructClass`, passing - # the created class as a parameter. This is the recommended way to customize a struct. - # Subclassing an anonymous struct creates an extra anonymous class that will never be used. - # - # The last two forms create a new instance of a struct subclass. The number of value - # parameters must be less than or equal to the number of attributes defined for the - # struct. Unset parameters default to nil. Passing more parameters than number of attributes - # will raise an `ArgumentError`. - # - # @see http://ruby-doc.org/core/Struct.html#method-c-new Ruby standard library `Struct#new` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#210 - def new(*args, &block); end - end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#220 -Concurrent::MutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) - -# A boolean value that can be updated atomically. Reads and writes to an atomic -# boolean and thread-safe and guaranteed to succeed. Reads and writes may block -# briefly but no explicit locking is required. -# -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. -# Performance: -# -# ``` -# Testing with ruby 2.1.2 -# Testing with Concurrent::MutexAtomicBoolean... -# 2.790000 0.000000 2.790000 ( 2.791454) -# Testing with Concurrent::CAtomicBoolean... -# 0.740000 0.000000 0.740000 ( 0.740206) -# -# Testing with jruby 1.9.3 -# Testing with Concurrent::MutexAtomicBoolean... -# 5.240000 2.520000 7.760000 ( 3.683000) -# Testing with Concurrent::JavaAtomicBoolean... -# 3.340000 0.010000 3.350000 ( 0.855000) -# ``` -# -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#8 -class Concurrent::MutexAtomicBoolean - extend ::Concurrent::Synchronization::SafeInitialization - - # Creates a new `AtomicBoolean` with the given initial value. - # - # @param initial [Boolean] the initial value - # @return [MutexAtomicBoolean] a new instance of MutexAtomicBoolean - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#12 - def initialize(initial = T.unsafe(nil)); end - - # Is the current value `false` - # - # @return [Boolean] true if the current value is `false`, else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#34 - def false?; end - - # Explicitly sets the value to false. - # - # @return [Boolean] true if value has changed, otherwise false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#44 - def make_false; end - - # Explicitly sets the value to true. - # - # @return [Boolean] true if value has changed, otherwise false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#39 - def make_true; end - - # Is the current value `true` - # - # @return [Boolean] true if the current value is `true`, else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#29 - def true?; end - - # Retrieves the current `Boolean` value. - # - # @return [Boolean] the current value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#19 - def value; end - - # Explicitly sets the value. - # - # @param value [Boolean] the new value to be set - # @return [Boolean] the current value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#24 - def value=(value); end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#51 - def synchronize; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#62 - def ns_make_value(value); end -end - -# A numeric value that can be updated atomically. Reads and writes to an atomic -# fixnum and thread-safe and guaranteed to succeed. Reads and writes may block -# briefly but no explicit locking is required. -# -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. -# Performance: -# -# ``` -# Testing with ruby 2.1.2 -# Testing with Concurrent::MutexAtomicFixnum... -# 3.130000 0.000000 3.130000 ( 3.136505) -# Testing with Concurrent::CAtomicFixnum... -# 0.790000 0.000000 0.790000 ( 0.785550) -# -# Testing with jruby 1.9.3 -# Testing with Concurrent::MutexAtomicFixnum... -# 5.460000 2.460000 7.920000 ( 3.715000) -# Testing with Concurrent::JavaAtomicFixnum... -# 4.520000 0.030000 4.550000 ( 1.187000) -# ``` -# -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#9 -class Concurrent::MutexAtomicFixnum - extend ::Concurrent::Synchronization::SafeInitialization - - # Creates a new `AtomicFixnum` with the given initial value. - # - # @param initial [Fixnum] the initial value - # @raise [ArgumentError] if the initial value is not a `Fixnum` - # @return [MutexAtomicFixnum] a new instance of MutexAtomicFixnum - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#13 - def initialize(initial = T.unsafe(nil)); end - - # Atomically sets the value to the given updated value if the current - # value == the expected value. - # - # @param expect [Fixnum] the expected value - # @param update [Fixnum] the new value - # @return [Boolean] true if the value was updated else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#44 - def compare_and_set(expect, update); end - - # Decreases the current value by the given amount (defaults to 1). - # - # @param delta [Fixnum] the amount by which to decrease the current value - # @return [Fixnum] the current value after decrementation - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#37 - def decrement(delta = T.unsafe(nil)); end - - # Decreases the current value by the given amount (defaults to 1). - # - # @param delta [Fixnum] the amount by which to decrease the current value - # @return [Fixnum] the current value after decrementation - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#37 - def down(delta = T.unsafe(nil)); end - - # Increases the current value by the given amount (defaults to 1). - # - # @param delta [Fixnum] the amount by which to increase the current value - # @return [Fixnum] the current value after incrementation - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#30 - def increment(delta = T.unsafe(nil)); end - - # Increases the current value by the given amount (defaults to 1). - # - # @param delta [Fixnum] the amount by which to increase the current value - # @return [Fixnum] the current value after incrementation - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#30 - def up(delta = T.unsafe(nil)); end - - # Pass the current value to the given block, replacing it - # with the block's result. May retry if the value changes - # during the block's execution. - # - # @return [Object] the new value - # @yield [Object] Calculate a new value for the atomic reference using - # given (old) value - # @yieldparam old_value [Object] the starting value of the atomic reference - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#56 - def update; end - - # Retrieves the current `Fixnum` value. - # - # @return [Fixnum] the current value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#20 - def value; end - - # Explicitly sets the value. - # - # @param value [Fixnum] the new value to be set - # @raise [ArgumentError] if the new value is not a `Fixnum` - # @return [Fixnum] the current value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#25 - def value=(value); end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#65 - def synchronize; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#76 - def ns_set(value); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#9 -class Concurrent::MutexAtomicReference - include ::Concurrent::AtomicDirectUpdate - include ::Concurrent::AtomicNumericCompareAndSetWrapper - extend ::Concurrent::Synchronization::SafeInitialization - - # @param value [Object] The initial value. - # @return [MutexAtomicReference] a new instance of MutexAtomicReference - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#16 - def initialize(value = T.unsafe(nil)); end - - # Atomically sets the value to the given updated value if - # the current value == the expected value. - # - # that the actual value was not equal to the expected value. - # - # @param old_value [Object] the expected value - # @param new_value [Object] the new value - # @return [Boolean] `true` if successful. A `false` return indicates - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#45 - def _compare_and_set(old_value, new_value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb#10 - def compare_and_swap(old_value, new_value); end - - # Gets the current value. - # - # @return [Object] the current value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#23 - def get; end - - # Atomically sets to the given value and returns the old value. - # - # @param new_value [Object] the new value - # @return [Object] the old value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#35 - def get_and_set(new_value); end - - # Sets to the given value. - # - # @param new_value [Object] the new value - # @return [Object] the new value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#29 - def set(new_value); end - - # Atomically sets to the given value and returns the old value. - # - # @param new_value [Object] the new value - # @return [Object] the old value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#35 - def swap(new_value); end - - # Gets the current value. - # - # @return [Object] the current value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#23 - def value; end - - # Sets to the given value. - # - # @param new_value [Object] the new value - # @return [Object] the new value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#29 - def value=(new_value); end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#59 - def synchronize; end -end - -# A synchronization object that allows one thread to wait on multiple other threads. -# The thread that will wait creates a `CountDownLatch` and sets the initial value -# (normally equal to the number of other threads). The initiating thread passes the -# latch to the other threads then waits for the other threads by calling the `#wait` -# method. Each of the other threads calls `#count_down` when done with its work. -# When the latch counter reaches zero the waiting thread is unblocked and continues -# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#9 -class Concurrent::MutexCountDownLatch < ::Concurrent::Synchronization::LockableObject - # Create a new `CountDownLatch` with the initial `count`. - # - # @param count [new] the initial count - # @raise [ArgumentError] if `count` is not an integer or is less than zero - # @return [MutexCountDownLatch] a new instance of MutexCountDownLatch - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#12 - def initialize(count = T.unsafe(nil)); end - - # The current value of the counter. - # - # @return [Fixnum] the current value of the counter - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#34 - def count; end - - # Signal the latch to decrement the counter. Will signal all blocked threads when - # the `count` reaches zero. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#26 - def count_down; end - - # Block on the latch until the counter reaches zero or until `timeout` is reached. - # - # @param timeout [Fixnum] the number of seconds to wait for the counter or `nil` - # to block indefinitely - # @return [Boolean] `true` if the `count` reaches zero else false on `timeout` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#21 - def wait(timeout = T.unsafe(nil)); end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#40 - def ns_initialize(count); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#9 -class Concurrent::MutexSemaphore < ::Concurrent::Synchronization::LockableObject - # @return [MutexSemaphore] a new instance of MutexSemaphore - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#12 - def initialize(count); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#20 - def acquire(permits = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#38 - def available_permits; end - - # Acquires and returns all permits that are immediately available. - # - # @return [Integer] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#47 - def drain_permits; end - - # Shrinks the number of available permits by the indicated reduction. - # - # @param reduction [Fixnum] Number of permits to remove. - # @raise [ArgumentError] if `reduction` is not an integer or is negative - # @raise [ArgumentError] if `@free` - `@reduction` is less than zero - # @return [nil] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#99 - def reduce_permits(reduction); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#77 - def release(permits = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#54 - def try_acquire(permits = T.unsafe(nil), timeout = T.unsafe(nil)); end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#110 - def ns_initialize(count); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#117 - def try_acquire_now(permits); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#127 - def try_acquire_timed(permits, timeout); end -end - -# Various classes within allows for +nil+ values to be stored, -# so a special +NULL+ token is required to indicate the "nil-ness". -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/constants.rb#6 -Concurrent::NULL = T.let(T.unsafe(nil), Object) - -# Suppresses all output when used for logging. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#108 -Concurrent::NULL_LOGGER = T.let(T.unsafe(nil), Proc) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#6 -module Concurrent::Options - class << self - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#27 - def executor(executor_identifier); end - - # Get the requested `Executor` based on the values set in the options hash. - # - # @option opts - # @param opts [Hash] the options defining the requested executor - # @return [Executor, nil] the requested thread pool, or nil when no option specified - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#19 - def executor_from_options(opts = T.unsafe(nil)); end - end -end - -# Promises are inspired by the JavaScript [Promises/A](http://wiki.commonjs.org/wiki/Promises/A) -# and [Promises/A+](http://promises-aplus.github.io/promises-spec/) specifications. -# -# > A promise represents the eventual value returned from the single -# > completion of an operation. -# -# Promises are similar to futures and share many of the same behaviours. -# Promises are far more robust, however. Promises can be chained in a tree -# structure where each promise may have zero or more children. Promises are -# chained using the `then` method. The result of a call to `then` is always -# another promise. Promises are resolved asynchronously (with respect to the -# main thread) but in a strict order: parents are guaranteed to be resolved -# before their children, children before their younger siblings. The `then` -# method takes two parameters: an optional block to be executed upon parent -# resolution and an optional callable to be executed upon parent failure. The -# result of each promise is passed to each of its children upon resolution. -# When a promise is rejected all its children will be summarily rejected and -# will receive the reason. -# -# Promises have several possible states: *:unscheduled*, *:pending*, -# *:processing*, *:rejected*, or *:fulfilled*. These are also aggregated as -# `#incomplete?` and `#complete?`. When a Promise is created it is set to -# *:unscheduled*. Once the `#execute` method is called the state becomes -# *:pending*. Once a job is pulled from the thread pool's queue and is given -# to a thread for processing (often immediately upon `#post`) the state -# becomes *:processing*. The future will remain in this state until processing -# is complete. A future that is in the *:unscheduled*, *:pending*, or -# *:processing* is considered `#incomplete?`. A `#complete?` Promise is either -# *:rejected*, indicating that an exception was thrown during processing, or -# *:fulfilled*, indicating success. If a Promise is *:fulfilled* its `#value` -# will be updated to reflect the result of the operation. If *:rejected* the -# `reason` will be updated with a reference to the thrown exception. The -# predicate methods `#unscheduled?`, `#pending?`, `#rejected?`, and -# `#fulfilled?` can be called at any time to obtain the state of the Promise, -# as can the `#state` method, which returns a symbol. -# -# Retrieving the value of a promise is done through the `value` (alias: -# `deref`) method. Obtaining the value of a promise is a potentially blocking -# operation. When a promise is *rejected* a call to `value` will return `nil` -# immediately. When a promise is *fulfilled* a call to `value` will -# immediately return the current value. When a promise is *pending* a call to -# `value` will block until the promise is either *rejected* or *fulfilled*. A -# *timeout* value can be passed to `value` to limit how long the call will -# block. If `nil` the call will block indefinitely. If `0` the call will not -# block. Any other integer or float value will indicate the maximum number of -# seconds to block. -# -# Promises run on the global thread pool. -# -# ### Examples -# -# Start by requiring promises -# -# ```ruby -# require 'concurrent/promise' -# ``` -# -# Then create one -# -# ```ruby -# p = Concurrent::Promise.execute do -# # do something -# 42 -# end -# ``` -# -# Promises can be chained using the `then` method. The `then` method accepts a -# block and an executor, to be executed on fulfillment, and a callable argument to be executed -# on rejection. The result of the each promise is passed as the block argument -# to chained promises. -# -# ```ruby -# p = Concurrent::Promise.new{10}.then{|x| x * 2}.then{|result| result - 10 }.execute -# ``` -# -# And so on, and so on, and so on... -# -# ```ruby -# p = Concurrent::Promise.fulfill(20). -# then{|result| result - 10 }. -# then{|result| result * 3 }. -# then(executor: different_executor){|result| result % 5 }.execute -# ``` -# -# The initial state of a newly created Promise depends on the state of its parent: -# - if parent is *unscheduled* the child will be *unscheduled* -# - if parent is *pending* the child will be *pending* -# - if parent is *fulfilled* the child will be *pending* -# - if parent is *rejected* the child will be *pending* (but will ultimately be *rejected*) -# -# Promises are executed asynchronously from the main thread. By the time a -# child Promise finishes initialization it may be in a different state than its -# parent (by the time a child is created its parent may have completed -# execution and changed state). Despite being asynchronous, however, the order -# of execution of Promise objects in a chain (or tree) is strictly defined. -# -# There are multiple ways to create and execute a new `Promise`. Both ways -# provide identical behavior: -# -# ```ruby -# # create, operate, then execute -# p1 = Concurrent::Promise.new{ "Hello World!" } -# p1.state #=> :unscheduled -# p1.execute -# -# # create and immediately execute -# p2 = Concurrent::Promise.new{ "Hello World!" }.execute -# -# # execute during creation -# p3 = Concurrent::Promise.execute{ "Hello World!" } -# ``` -# -# Once the `execute` method is called a `Promise` becomes `pending`: -# -# ```ruby -# p = Concurrent::Promise.execute{ "Hello, world!" } -# p.state #=> :pending -# p.pending? #=> true -# ``` -# -# Wait a little bit, and the promise will resolve and provide a value: -# -# ```ruby -# p = Concurrent::Promise.execute{ "Hello, world!" } -# sleep(0.1) -# -# p.state #=> :fulfilled -# p.fulfilled? #=> true -# p.value #=> "Hello, world!" -# ``` -# -# If an exception occurs, the promise will be rejected and will provide -# a reason for the rejection: -# -# ```ruby -# p = Concurrent::Promise.execute{ raise StandardError.new("Here comes the Boom!") } -# sleep(0.1) -# -# p.state #=> :rejected -# p.rejected? #=> true -# p.reason #=> "#" -# ``` -# -# #### Rejection -# -# When a promise is rejected all its children will be rejected and will -# receive the rejection `reason` as the rejection callable parameter: -# -# ```ruby -# p = Concurrent::Promise.execute { Thread.pass; raise StandardError } -# -# c1 = p.then(-> reason { 42 }) -# c2 = p.then(-> reason { raise 'Boom!' }) -# -# c1.wait.state #=> :fulfilled -# c1.value #=> 45 -# c2.wait.state #=> :rejected -# c2.reason #=> # -# ``` -# -# Once a promise is rejected it will continue to accept children that will -# receive immediately rejection (they will be executed asynchronously). -# -# #### Aliases -# -# The `then` method is the most generic alias: it accepts a block to be -# executed upon parent fulfillment and a callable to be executed upon parent -# rejection. At least one of them should be passed. The default block is `{ -# |result| result }` that fulfills the child with the parent value. The -# default callable is `{ |reason| raise reason }` that rejects the child with -# the parent reason. -# -# - `on_success { |result| ... }` is the same as `then {|result| ... }` -# - `rescue { |reason| ... }` is the same as `then(Proc.new { |reason| ... } )` -# - `rescue` is aliased by `catch` and `on_error` -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#190 -class Concurrent::Promise < ::Concurrent::IVar - # Initialize a new Promise with the provided options. - # - # @option opts - # @option opts - # @option opts - # @option opts - # @param opts [Hash] a customizable set of options - # @raise [ArgumentError] if no block is given - # @return [Promise] a new instance of Promise - # @see http://wiki.commonjs.org/wiki/Promises/A - # @see http://promises-aplus.github.io/promises-spec/ - # @yield The block operation to be performed asynchronously. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#210 - def initialize(opts = T.unsafe(nil), &block); end - - # Chain onto this promise an action to be undertaken on failure - # (rejection). - # - # @return [Promise] self - # @yield The block to execute - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#360 - def catch(&block); end - - # Execute an `:unscheduled` `Promise`. Immediately sets the state to `:pending` and - # passes the block to a new thread/thread pool for eventual execution. - # Does nothing if the `Promise` is in any state other than `:unscheduled`. - # - # @return [Promise] a reference to `self` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#246 - def execute; end - - # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. - # - # @param reason [Object] for the failure - # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already - # been set or otherwise completed - # @raise [Concurrent::PromiseExecutionError] if not the root promise - # @return [IVar] self - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#278 - def fail(reason = T.unsafe(nil)); end - - # Yield the successful result to the block that returns a promise. If that - # promise is also successful the result is the result of the yielded promise. - # If either part fails the whole also fails. - # - # @example - # Promise.execute { 1 }.flat_map { |v| Promise.execute { v + 2 } }.value! #=> 3 - # @return [Promise] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#375 - def flat_map(&block); end - - # Chain onto this promise an action to be undertaken on failure - # (rejection). - # - # @return [Promise] self - # @yield The block to execute - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#360 - def on_error(&block); end - - # Chain onto this promise an action to be undertaken on success - # (fulfillment). - # - # @raise [ArgumentError] - # @return [Promise] self - # @yield The block to execute - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#349 - def on_success(&block); end - - # Chain onto this promise an action to be undertaken on failure - # (rejection). - # - # @return [Promise] self - # @yield The block to execute - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#360 - def rescue(&block); end - - # Set the `IVar` to a value and wake or notify all threads waiting on it. - # - # @param value [Object] the value to store in the `IVar` - # @raise [ArgumentError] if both a value and a block are given - # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already - # been set or otherwise completed - # @raise [Concurrent::PromiseExecutionError] if not the root promise - # @return [IVar] self - # @yield A block operation to use for setting the value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#262 - def set(value = T.unsafe(nil), &block); end - - # Chain a new promise off the current promise. - # - # @overload then - # @overload then - # @raise [ArgumentError] - # @return [Promise] the new promise - # @yield The block operation to be performed asynchronously. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#314 - def then(*args, &block); end - - # Builds a promise that produces the result of self and others in an Array - # and fails if any of them fails. - # - # @overload zip - # @overload zip - # @return [Promise] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#440 - def zip(*others); end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#551 - def complete(success, value, reason); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#545 - def notify_child(child); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#481 - def ns_initialize(value, opts); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#533 - def on_fulfill(result); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#539 - def on_reject(reason); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#562 - def realize(task); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#528 - def root?; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#520 - def set_pending; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#570 - def set_state!(success, value, reason); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#576 - def synchronized_set_state!(success, value, reason); end - - class << self - # Aggregate a collection of zero or more promises under a composite promise, - # execute the aggregated promises and collect them into a standard Ruby array, - # call the given Ruby `Ennnumerable` predicate (such as `any?`, `all?`, `none?`, - # or `one?`) on the collection checking for the success or failure of each, - # then executing the composite's `#then` handlers if the predicate returns - # `true` or executing the composite's `#rescue` handlers if the predicate - # returns false. - # - # - # The returned promise will not yet have been executed. Additional `#then` - # and `#rescue` handlers may still be provided. Once the returned promise - # is execute the aggregate promises will be also be executed (if they have - # not been executed already). The results of the aggregate promises will - # be checked upon completion. The necessary `#then` and `#rescue` blocks - # on the aggregating promise will then be executed as appropriate. If the - # `#rescue` handlers are executed the raises exception will be - # `Concurrent::PromiseExecutionError`. - # - # @param promises [Array] Zero or more promises to aggregate - # @return [Promise] an unscheduled (not executed) promise that aggregates - # the promises given as arguments - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#505 - def aggregate(method, *promises); end - - # Aggregates a collection of promises and executes the `then` condition - # if all aggregated promises succeed. Executes the `rescue` handler with - # a `Concurrent::PromiseExecutionError` if any of the aggregated promises - # fail. Upon execution will execute any of the aggregate promises that - # were not already executed. - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#464 - def all?(*promises); end - - # Aggregates a collection of promises and executes the `then` condition - # if any aggregated promises succeed. Executes the `rescue` handler with - # a `Concurrent::PromiseExecutionError` if any of the aggregated promises - # fail. Upon execution will execute any of the aggregate promises that - # were not already executed. - # - # - # The returned promise will not yet have been executed. Additional `#then` - # and `#rescue` handlers may still be provided. Once the returned promise - # is execute the aggregate promises will be also be executed (if they have - # not been executed already). The results of the aggregate promises will - # be checked upon completion. The necessary `#then` and `#rescue` blocks - # on the aggregating promise will then be executed as appropriate. If the - # `#rescue` handlers are executed the raises exception will be - # `Concurrent::PromiseExecutionError`. - # - # @param promises [Array] Zero or more promises to aggregate - # @return [Promise] an unscheduled (not executed) promise that aggregates - # the promises given as arguments - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#475 - def any?(*promises); end - - # Create a new `Promise` object with the given block, execute it, and return the - # `:pending` object. - # - # @example - # promise = Concurrent::Promise.execute{ sleep(1); 42 } - # promise.state #=> :pending - # @option opts - # @option opts - # @option opts - # @option opts - # @param opts [Hash] a customizable set of options - # @raise [ArgumentError] if no block is given - # @return [Promise] the newly created `Promise` in the `:pending` state - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#296 - def execute(opts = T.unsafe(nil), &block); end - - # Create a new `Promise` and fulfill it immediately. - # - # @option opts - # @option opts - # @option opts - # @option opts - # @param opts [Hash] a customizable set of options - # @raise [ArgumentError] if no block is given - # @return [Promise] the newly created `Promise` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#224 - def fulfill(value, opts = T.unsafe(nil)); end - - # Create a new `Promise` and reject it immediately. - # - # @option opts - # @option opts - # @option opts - # @option opts - # @param opts [Hash] a customizable set of options - # @raise [ArgumentError] if no block is given - # @return [Promise] the newly created `Promise` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#237 - def reject(reason, opts = T.unsafe(nil)); end - - # Builds a promise that produces the result of promises in an Array - # and fails if any of them fails. - # - # @overload zip - # @overload zip - # @return [Promise] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#409 - def zip(*promises); end - end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#11 -class Concurrent::PromiseExecutionError < ::StandardError; end - -# {include:file:docs-source/promises-main.md} -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#13 -module Concurrent::Promises - extend ::Concurrent::Promises::FactoryMethods::Configuration - extend ::Concurrent::Promises::FactoryMethods -end - -# @abstract -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2047 -class Concurrent::Promises::AbstractAnyPromise < ::Concurrent::Promises::BlockedPromise; end - -# Common ancestor of {Event} and {Future} classes, many shared methods are defined here. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#513 -class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization::Object - include ::Concurrent::Promises::InternalStates - extend ::Concurrent::Synchronization::SafeInitialization - - # @return [AbstractEventFuture] a new instance of AbstractEventFuture - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#522 - def initialize(promise, default_executor); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 - def __initialize_atomic_fields__; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#738 - def add_callback_clear_delayed_node(node); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#733 - def add_callback_notify_blocked(promise, index); end - - # For inspection. - # - # @return [Array] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#702 - def blocks; end - - # For inspection. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#710 - def callbacks; end - - # Shortcut of {#chain_on} with default `:io` executor supplied. - # - # @return [Future] - # @see #chain_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#596 - def chain(*args, &task); end - - # Chains the task to be executed asynchronously on executor after it is resolved. - # - # @overload an_event.chain_on - # @overload a_future.chain_on - # @param executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. The task is executed on it, default executor remains unchanged. - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @return [Future] - # @yieldreturn will become result of the returned Future. - # Its returned value becomes {Future#value} fulfilling it, - # raised exception becomes {Future#reason} rejecting it. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#614 - def chain_on(executor, *args, &task); end - - # Resolves the resolvable when receiver is resolved. - # - # @param resolvable [Resolvable] - # @return [self] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#629 - def chain_resolvable(resolvable); end - - # Returns default executor. - # - # @return [Executor] default executor - # @see #with_default_executor - # @see FactoryMethods#future_on - # @see FactoryMethods#resolvable_future - # @see FactoryMethods#any_fulfilled_future_on - # @see similar - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#590 - def default_executor; end - - # @return [String] Short string representation. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#619 - def inspect; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 - def internal_state; end - - # Shortcut of {#on_resolution_using} with default `:io` executor supplied. - # - # @return [self] - # @see #on_resolution_using - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#637 - def on_resolution(*args, &callback); end - - # Stores the callback to be executed synchronously on resolving thread after it is - # resolved. - # - # @overload an_event.on_resolution! - # @overload a_future.on_resolution! - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @return [self] - # @yieldreturn is forgotten. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#655 - def on_resolution!(*args, &callback); end - - # Stores the callback to be executed asynchronously on executor after it is resolved. - # - # @overload an_event.on_resolution_using - # @overload a_future.on_resolution_using - # @param executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. The task is executed on it, default executor remains unchanged. - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @return [self] - # @yieldreturn is forgotten. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#673 - def on_resolution_using(executor, *args, &callback); end - - # Is it in pending state? - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#549 - def pending?; end - - # For inspection. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#716 - def promise; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#688 - def resolve_with(state, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end - - # Is it in resolved state? - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#555 - def resolved?; end - - # Returns its state. - # - # @overload an_event.state - # @overload a_future.state - # @return [Symbol] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#543 - def state; end - - # Resolves the resolvable when receiver is resolved. - # - # @param resolvable [Resolvable] - # @return [self] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#629 - def tangle(resolvable); end - - # @return [String] Short string representation. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#619 - def to_s; end - - # Propagates touch. Requests all the delayed futures, which it depends on, to be - # executed. This method is called by any other method requiring resolved state, like {#wait}. - # - # @return [self] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#562 - def touch; end - - # For inspection. - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#722 - def touched?; end - - # Wait (block the Thread) until receiver is {#resolved?}. - # Calls {Concurrent::AbstractEventFuture#touch}. - # - # @note This function potentially blocks current thread until the Future is resolved. - # Be careful it can deadlock. Try to chain instead. - # @param timeout [Numeric] the maximum time in second to wait. - # @return [self, true, false] self implies timeout was not used, true implies timeout was used - # and it was resolved, false implies it was not resolved within timeout. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#578 - def wait(timeout = T.unsafe(nil)); end - - # For inspection. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#728 - def waiting_threads; end - - # Crates new object with same class with the executor set as its new default executor. - # Any futures depending on it will use the new default executor. - # - # @abstract - # @raise [NotImplementedError] - # @return [AbstractEventFuture] - # @see Event#with_default_executor - # @see Future#with_default_executor - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#683 - def with_default_executor(executor); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#743 - def with_hidden_resolvable; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#750 - def add_callback(method, *args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#812 - def async_callback_on_resolution(state, executor, args, callback); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#796 - def call_callback(method, state, args); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#800 - def call_callbacks(state); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#763 - def callback_clear_delayed_node(state, node); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#818 - def callback_notify_blocked(state, promise, index); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 - def compare_and_set_internal_state(expected, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 - def internal_state=(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 - def swap_internal_state(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 - def update_internal_state(&block); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#768 - def wait_until_resolved(timeout); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#808 - def with_async(executor, *args, &block); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1796 -class Concurrent::Promises::AbstractFlatPromise < ::Concurrent::Promises::BlockedPromise - # @return [AbstractFlatPromise] a new instance of AbstractFlatPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1798 - def initialize(delayed_because, blockers_count, event_or_future); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1808 - def touch; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1828 - def add_delayed_of(future); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1820 - def on_resolvable(resolved_future, index); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1824 - def resolvable?(countdown, future, index); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1816 - def touched?; end -end - -# @abstract -# @private -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1549 -class Concurrent::Promises::AbstractPromise < ::Concurrent::Synchronization::Object - include ::Concurrent::Promises::InternalStates - extend ::Concurrent::Synchronization::SafeInitialization - - # @return [AbstractPromise] a new instance of AbstractPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1553 - def initialize(future); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1564 - def default_executor; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1581 - def delayed_because; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1558 - def event; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1558 - def future; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1575 - def inspect; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1568 - def state; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1575 - def to_s; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1572 - def touch; end - - private - - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1592 - def evaluate_to(*args, block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1587 - def resolve_with(new_state, raise_on_reassign = T.unsafe(nil)); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2084 -class Concurrent::Promises::AnyFulfilledFuturePromise < ::Concurrent::Promises::AnyResolvedFuturePromise - private - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2088 - def resolvable?(countdown, event_or_future, index); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2050 -class Concurrent::Promises::AnyResolvedEventPromise < ::Concurrent::Promises::AbstractAnyPromise - # @return [AnyResolvedEventPromise] a new instance of AnyResolvedEventPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2054 - def initialize(delayed, blockers_count, default_executor); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2062 - def on_resolvable(resolved_future, index); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2058 - def resolvable?(countdown, future, index); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2067 -class Concurrent::Promises::AnyResolvedFuturePromise < ::Concurrent::Promises::AbstractAnyPromise - # @return [AnyResolvedFuturePromise] a new instance of AnyResolvedFuturePromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2071 - def initialize(delayed, blockers_count, default_executor); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2079 - def on_resolvable(resolved_future, index); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2075 - def resolvable?(countdown, future, index); end -end - -# @abstract -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1619 -class Concurrent::Promises::BlockedPromise < ::Concurrent::Promises::InnerPromise - # @return [BlockedPromise] a new instance of BlockedPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1661 - def initialize(delayed, blockers_count, future); end - - # for inspection only - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1683 - def blocked_by; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1674 - def delayed_because; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1667 - def on_blocker_resolution(future, index); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1678 - def touch; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1691 - def clear_and_propagate_touch(stack_or_element = T.unsafe(nil)); end - - # @raise [NotImplementedError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1710 - def on_resolvable(resolved_future, index); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1706 - def process_on_blocker_resolution(future, index); end - - # @return [true, false] if resolvable - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1702 - def resolvable?(countdown, future, index); end - - class << self - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1652 - def add_delayed(delayed1, delayed2); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1645 - def new_blocked_by(blockers, *args, &block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1623 - def new_blocked_by1(blocker, *args, &block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1630 - def new_blocked_by2(blocker1, blocker2, *args, &block); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 - def new(*args, &block); end - end -end - -# @abstract -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1716 -class Concurrent::Promises::BlockedTaskPromise < ::Concurrent::Promises::BlockedPromise - # @raise [ArgumentError] - # @return [BlockedTaskPromise] a new instance of BlockedTaskPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1717 - def initialize(delayed, blockers_count, default_executor, executor, args, &task); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1725 - def executor; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1766 -class Concurrent::Promises::ChainPromise < ::Concurrent::Promises::BlockedTaskPromise - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1769 - def on_resolvable(resolved_future, index); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2095 -class Concurrent::Promises::DelayPromise < ::Concurrent::Promises::InnerPromise - # @return [DelayPromise] a new instance of DelayPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2097 - def initialize(default_executor); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2108 - def delayed_because; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2104 - def touch; end -end - -# Represents an event which will happen in future (will be resolved). The event is either -# pending or resolved. It should be always resolved. Use {Future} to communicate rejections and -# cancellation. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#826 -class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture - # Creates a new event or a future which will be resolved when receiver and other are. - # Returns an event if receiver and other are events, otherwise returns a future. - # If just one of the parties is Future then the result - # of the returned future is equal to the result of the supplied future. If both are futures - # then the result is as described in {FactoryMethods#zip_futures_on}. - # - # @return [Future, Event] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#839 - def &(other); end - - # Creates a new event which will be resolved when the first of receiver, `event_or_future` - # resolves. - # - # @return [Event] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#853 - def any(event_or_future); end - - # Creates new event dependent on receiver which will not evaluate until touched, see {#touch}. - # In other words, it inserts delay into the chain of Futures making rest of it lazy evaluated. - # - # @return [Event] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#863 - def delay; end - - # Creates new event dependent on receiver scheduled to execute on/in intended_time. - # In time is interpreted from the moment the receiver is resolved, therefore it inserts - # delay into the chain. - # - # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. - # `Time` means to run on `intended_time`. - # @return [Event] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#875 - def schedule(intended_time); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#596 - def then(*args, &task); end - - # Returns self, since this is event - # - # @return [Event] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#893 - def to_event; end - - # Converts event to a future. The future is fulfilled when the event is resolved, the future may never fail. - # - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#885 - def to_future; end - - # Crates new object with same class with the executor set as its new default executor. - # Any futures depending on it will use the new default executor. - # - # @return [Event] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#899 - def with_default_executor(executor); end - - # Creates a new event or a future which will be resolved when receiver and other are. - # Returns an event if receiver and other are events, otherwise returns a future. - # If just one of the parties is Future then the result - # of the returned future is equal to the result of the supplied future. If both are futures - # then the result is as described in {FactoryMethods#zip_futures_on}. - # - # @return [Future, Event] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#839 - def zip(other); end - - # Creates a new event which will be resolved when the first of receiver, `event_or_future` - # resolves. - # - # @return [Event] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#853 - def |(event_or_future); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#910 - def callback_on_resolution(state, args, callback); end - - # @raise [Concurrent::MultipleAssignmentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#905 - def rejected_resolution(raise_on_reassign, state); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1972 -class Concurrent::Promises::EventWrapperPromise < ::Concurrent::Promises::BlockedPromise - # @return [EventWrapperPromise] a new instance of EventWrapperPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1973 - def initialize(delayed, blockers_count, default_executor); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1979 - def on_resolvable(resolved_future, index); end -end - -# Container of all {Future}, {Event} factory methods. They are never constructed directly with -# new. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#46 -module Concurrent::Promises::FactoryMethods - include ::Concurrent::Promises::FactoryMethods::Configuration - extend ::Concurrent::ReInclude - extend ::Concurrent::Promises::FactoryMethods::Configuration - extend ::Concurrent::Promises::FactoryMethods - - # Shortcut of {#any_resolved_future_on} with default `:io` executor supplied. - # - # @return [Future] - # @see #any_resolved_future_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#278 - def any(*futures_and_or_events); end - - # Shortcut of {#any_event_on} with default `:io` executor supplied. - # - # @return [Event] - # @see #any_event_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#319 - def any_event(*futures_and_or_events); end - - # Creates a new event which becomes resolved after the first futures_and_or_events resolves. - # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed - # futures un-executed if they are not required any more. - # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param futures_and_or_events [AbstractEventFuture] - # @return [Event] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#329 - def any_event_on(default_executor, *futures_and_or_events); end - - # Shortcut of {#any_fulfilled_future_on} with default `:io` executor supplied. - # - # @return [Future] - # @see #any_fulfilled_future_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#300 - def any_fulfilled_future(*futures_and_or_events); end - - # Creates a new future which is resolved after the first futures_and_or_events is fulfilled. - # Its result equals the result of the first resolved future or if all futures_and_or_events reject, - # it has reason of the last rejected future. - # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed - # futures un-executed if they are not required any more. - # If event is supplied, which does not have value and can be only resolved, it's - # represented as `:fulfilled` with value `nil`. - # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param futures_and_or_events [AbstractEventFuture] - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#313 - def any_fulfilled_future_on(default_executor, *futures_and_or_events); end - - # Shortcut of {#any_resolved_future_on} with default `:io` executor supplied. - # - # @return [Future] - # @see #any_resolved_future_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#278 - def any_resolved_future(*futures_and_or_events); end - - # Creates a new future which is resolved after the first futures_and_or_events is resolved. - # Its result equals the result of the first resolved future. - # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed - # futures un-executed if they are not required any more. - # If event is supplied, which does not have value and can be only resolved, it's - # represented as `:fulfilled` with value `nil`. - # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param futures_and_or_events [AbstractEventFuture] - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#294 - def any_resolved_future_on(default_executor, *futures_and_or_events); end - - # Shortcut of {#delay_on} with default `:io` executor supplied. - # - # @return [Future, Event] - # @see #delay_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#190 - def delay(*args, &task); end - - # Creates a new event or future which is resolved only after it is touched, - # see {Concurrent::AbstractEventFuture#touch}. - # - # @overload delay_on - # @overload delay_on - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#207 - def delay_on(default_executor, *args, &task); end - - # Creates a resolved future which will be fulfilled with the given value. - # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param value [Object] - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#127 - def fulfilled_future(value, default_executor = T.unsafe(nil)); end - - # Shortcut of {#future_on} with default `:io` executor supplied. - # - # @return [Future] - # @see #future_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#94 - def future(*args, &task); end - - # Constructs a new Future which will be resolved after block is evaluated on default executor. - # Evaluation begins immediately. - # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @return [Future] - # @yield [*args] to the task. - # @yieldreturn will become result of the returned Future. - # Its returned value becomes {Future#value} fulfilling it, - # raised exception becomes {Future#reason} rejecting it. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#106 - def future_on(default_executor, *args, &task); end - - # General constructor. Behaves differently based on the argument's type. It's provided for convenience - # but it's better to be explicit. - # - # @overload make_future - # @overload make_future - # @overload make_future - # @overload make_future - # @overload make_future - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @return [Event, Future] - # @see rejected_future, resolved_event, fulfilled_future - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#174 - def make_future(argument = T.unsafe(nil), default_executor = T.unsafe(nil)); end - - # Creates a resolved future which will be rejected with the given reason. - # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param reason [Object] - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#136 - def rejected_future(reason, default_executor = T.unsafe(nil)); end - - # Shortcut of {#resolvable_event_on} with default `:io` executor supplied. - # - # @return [ResolvableEvent] - # @see #resolvable_event_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#63 - def resolvable_event; end - - # Creates a resolvable event, user is responsible for resolving the event once - # by calling {Promises::ResolvableEvent#resolve}. - # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @return [ResolvableEvent] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#72 - def resolvable_event_on(default_executor = T.unsafe(nil)); end - - # Shortcut of {#resolvable_future_on} with default `:io` executor supplied. - # - # @return [ResolvableFuture] - # @see #resolvable_future_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#78 - def resolvable_future; end - - # Creates resolvable future, user is responsible for resolving the future once by - # {Promises::ResolvableFuture#resolve}, {Promises::ResolvableFuture#fulfill}, - # or {Promises::ResolvableFuture#reject} - # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @return [ResolvableFuture] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#88 - def resolvable_future_on(default_executor = T.unsafe(nil)); end - - # Creates resolved event. - # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @return [Event] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#144 - def resolved_event(default_executor = T.unsafe(nil)); end - - # Creates a resolved future with will be either fulfilled with the given value or rejected with - # the given reason. - # - # @param fulfilled [true, false] - # @param value [Object] - # @param reason [Object] - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#118 - def resolved_future(fulfilled, value, reason, default_executor = T.unsafe(nil)); end - - # Shortcut of {#schedule_on} with default `:io` executor supplied. - # - # @return [Future, Event] - # @see #schedule_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#214 - def schedule(intended_time, *args, &task); end - - # Creates a new event or future which is resolved in intended_time. - # - # @overload schedule_on - # @overload schedule_on - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. - # `Time` means to run on `intended_time`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#233 - def schedule_on(default_executor, intended_time, *args, &task); end - - # Shortcut of {#zip_futures_on} with default `:io` executor supplied. - # - # @return [Future] - # @see #zip_futures_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#240 - def zip(*futures_and_or_events); end - - # Shortcut of {#zip_events_on} with default `:io` executor supplied. - # - # @return [Event] - # @see #zip_events_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#262 - def zip_events(*futures_and_or_events); end - - # Creates a new event which is resolved after all futures_and_or_events are resolved. - # (Future is resolved when fulfilled or rejected.) - # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param futures_and_or_events [AbstractEventFuture] - # @return [Event] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#272 - def zip_events_on(default_executor, *futures_and_or_events); end - - # Shortcut of {#zip_futures_on} with default `:io` executor supplied. - # - # @return [Future] - # @see #zip_futures_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#240 - def zip_futures(*futures_and_or_events); end - - # Creates a new future which is resolved after all futures_and_or_events are resolved. - # Its value is an array of zipped future values. Its reason is an array of reasons for rejection. - # If there is an error it rejects. - # If event is supplied, which does not have value and can be only resolved, it's - # represented as `:fulfilled` with value `nil`. - # - # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # @param futures_and_or_events [AbstractEventFuture] - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#254 - def zip_futures_on(default_executor, *futures_and_or_events); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#50 -module Concurrent::Promises::FactoryMethods::Configuration - # @return [Executor, :io, :fast] the executor which is used when none is supplied - # to a factory method. The method can be overridden in the receivers of - # `include FactoryMethod` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#54 - def default_executor; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1840 -class Concurrent::Promises::FlatEventPromise < ::Concurrent::Promises::AbstractFlatPromise - # @return [FlatEventPromise] a new instance of FlatEventPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1844 - def initialize(delayed, blockers_count, default_executor); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1848 - def process_on_blocker_resolution(future, index); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1873 -class Concurrent::Promises::FlatFuturePromise < ::Concurrent::Promises::AbstractFlatPromise - # @raise [ArgumentError] - # @return [FlatFuturePromise] a new instance of FlatFuturePromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1877 - def initialize(delayed, blockers_count, levels, default_executor); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1884 - def process_on_blocker_resolution(future, index); end -end - -# Represents a value which will become available in future. May reject with a reason instead, -# e.g. when the tasks raises an exception. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#917 -class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture - # Creates a new event or a future which will be resolved when receiver and other are. - # Returns an event if receiver and other are events, otherwise returns a future. - # If just one of the parties is Future then the result - # of the returned future is equal to the result of the supplied future. If both are futures - # then the result is as described in {FactoryMethods#zip_futures_on}. - # - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1070 - def &(other); end - - # Creates a new event which will be resolved when the first of receiver, `event_or_future` - # resolves. Returning future will have value nil if event_or_future is event and resolves - # first. - # - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1085 - def any(event_or_future); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1215 - def apply(args, block); end - - # Creates new future dependent on receiver which will not evaluate until touched, see {#touch}. - # In other words, it inserts delay into the chain of Futures making rest of it lazy evaluated. - # - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1095 - def delay; end - - # Allows rejected Future to be risen with `raise` method. - # If the reason is not an exception `Runtime.new(reason)` is returned. - # - # @example - # raise Promises.rejected_future(StandardError.new("boom")) - # raise Promises.rejected_future("or just boom") - # @raise [Concurrent::Error] when raising not rejected future - # @return [Exception] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1013 - def exception(*args); end - - # Creates new future which will have result of the future returned by receiver. If receiver - # rejects it will have its rejection. - # - # @param level [Integer] how many levels of futures should flatten - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1120 - def flat(level = T.unsafe(nil)); end - - # Creates new event which will be resolved when the returned event by receiver is. - # Be careful if the receiver rejects it will just resolve since Event does not hold reason. - # - # @return [Event] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1130 - def flat_event; end - - # Creates new future which will have result of the future returned by receiver. If receiver - # rejects it will have its rejection. - # - # @param level [Integer] how many levels of futures should flatten - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1120 - def flat_future(level = T.unsafe(nil)); end - - # Is it in fulfilled state? - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#921 - def fulfilled?; end - - # @return [String] Short string representation. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1235 - def inspect; end - - # Shortcut of {#on_fulfillment_using} with default `:io` executor supplied. - # - # @return [self] - # @see #on_fulfillment_using - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1136 - def on_fulfillment(*args, &callback); end - - # Stores the callback to be executed synchronously on resolving thread after it is - # fulfilled. Does nothing on rejection. - # - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @return [self] - # @yield [value, *args] to the callback. - # @yieldreturn is forgotten. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1147 - def on_fulfillment!(*args, &callback); end - - # Stores the callback to be executed asynchronously on executor after it is - # fulfilled. Does nothing on rejection. - # - # @param executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. The task is executed on it, default executor remains unchanged. - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @return [self] - # @yield [value, *args] to the callback. - # @yieldreturn is forgotten. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1159 - def on_fulfillment_using(executor, *args, &callback); end - - # Shortcut of {#on_rejection_using} with default `:io` executor supplied. - # - # @return [self] - # @see #on_rejection_using - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1165 - def on_rejection(*args, &callback); end - - # Stores the callback to be executed synchronously on resolving thread after it is - # rejected. Does nothing on fulfillment. - # - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @return [self] - # @yield [reason, *args] to the callback. - # @yieldreturn is forgotten. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1176 - def on_rejection!(*args, &callback); end - - # Stores the callback to be executed asynchronously on executor after it is - # rejected. Does nothing on fulfillment. - # - # @param executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. The task is executed on it, default executor remains unchanged. - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @return [self] - # @yield [reason, *args] to the callback. - # @yieldreturn is forgotten. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1188 - def on_rejection_using(executor, *args, &callback); end - - # Returns reason of future's rejection. - # Calls {Concurrent::AbstractEventFuture#touch}. - # - # @note This function potentially blocks current thread until the Future is resolved. - # Be careful it can deadlock. Try to chain instead. - # @note Make sure returned `nil` is not confused with timeout, no value when rejected, - # no reason when fulfilled, etc. - # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. - # @param timeout [Numeric] the maximum time in second to wait. - # @param timeout_value [Object] a value returned by the method when it times out - # @return [Object, timeout_value] the reason, or timeout_value on timeout, or nil on fulfillment. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#966 - def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end - - # Is it in rejected state? - # - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#928 - def rejected?; end - - # Shortcut of {#rescue_on} with default `:io` executor supplied. - # - # @return [Future] - # @see #rescue_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1052 - def rescue(*args, &task); end - - # Chains the task to be executed asynchronously on executor after it rejects. Does not run - # the task if it fulfills. It will resolve though, triggering any dependent futures. - # - # @param executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. The task is executed on it, default executor remains unchanged. - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @return [Future] - # @yield [reason, *args] to the task. - # @yieldreturn will become result of the returned Future. - # Its returned value becomes {Future#value} fulfilling it, - # raised exception becomes {Future#reason} rejecting it. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1064 - def rescue_on(executor, *args, &task); end - - # Returns triplet fulfilled?, value, reason. - # Calls {Concurrent::AbstractEventFuture#touch}. - # - # @note This function potentially blocks current thread until the Future is resolved. - # Be careful it can deadlock. Try to chain instead. - # @param timeout [Numeric] the maximum time in second to wait. - # @return [Array(Boolean, Object, Object), nil] triplet of fulfilled?, value, reason, or nil - # on timeout. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#981 - def result(timeout = T.unsafe(nil)); end - - # Allows to use futures as green threads. The receiver has to evaluate to a future which - # represents what should be done next. It basically flattens indefinitely until non Future - # values is returned which becomes result of the returned future. Any encountered exception - # will become reason of the returned future. - # - # @example - # body = lambda do |v| - # v += 1 - # v < 5 ? Promises.future(v, &body) : v - # end - # Promises.future(0, &body).run.value! # => 5 - # @param run_test [#call(value)] an object which when called returns either Future to keep running with - # or nil, then the run completes with the value. - # The run_test can be used to extract the Future from deeper structure, - # or to distinguish Future which is a resulting value from a future - # which is suppose to continue running. - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1210 - def run(run_test = T.unsafe(nil)); end - - # Creates new event dependent on receiver scheduled to execute on/in intended_time. - # In time is interpreted from the moment the receiver is resolved, therefore it inserts - # delay into the chain. - # - # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. - # `Time` means to run on `intended_time`. - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1102 - def schedule(intended_time); end - - # Shortcut of {#then_on} with default `:io` executor supplied. - # - # @return [Future] - # @see #then_on - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1034 - def then(*args, &task); end - - # Chains the task to be executed asynchronously on executor after it fulfills. Does not run - # the task if it rejects. It will resolve though, triggering any dependent futures. - # - # @param executor [Executor, :io, :fast] Instance of an executor or a name of the - # global executor. The task is executed on it, default executor remains unchanged. - # @param args [Object] arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # @return [Future] - # @yield [value, *args] to the task. - # @yieldreturn will become result of the returned Future. - # Its returned value becomes {Future#value} fulfilling it, - # raised exception becomes {Future#reason} rejecting it. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1046 - def then_on(executor, *args, &task); end - - # Converts future to event which is resolved when future is resolved by fulfillment or rejection. - # - # @return [Event] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1222 - def to_event; end - - # Returns self, since this is a future - # - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1230 - def to_future; end - - # @return [String] Short string representation. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1235 - def to_s; end - - # Return value of the future. - # Calls {Concurrent::AbstractEventFuture#touch}. - # - # @note This function potentially blocks current thread until the Future is resolved. - # Be careful it can deadlock. Try to chain instead. - # @note Make sure returned `nil` is not confused with timeout, no value when rejected, - # no reason when fulfilled, etc. - # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. - # @param timeout [Numeric] the maximum time in second to wait. - # @param timeout_value [Object] a value returned by the method when it times out - # @return [Object, nil, timeout_value] the value of the Future when fulfilled, - # timeout_value on timeout, - # nil on rejection. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#950 - def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end - - # Return value of the future. - # Calls {Concurrent::AbstractEventFuture#touch}. - # - # @note This function potentially blocks current thread until the Future is resolved. - # Be careful it can deadlock. Try to chain instead. - # @note Make sure returned `nil` is not confused with timeout, no value when rejected, - # no reason when fulfilled, etc. - # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. - # @param timeout [Numeric] the maximum time in second to wait. - # @param timeout_value [Object] a value returned by the method when it times out - # @raise [Exception] {#reason} on rejection - # @return [Object, nil, timeout_value] the value of the Future when fulfilled, - # or nil on rejection, - # or timeout_value on timeout. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#997 - def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end - - # Wait (block the Thread) until receiver is {#resolved?}. - # Calls {Concurrent::AbstractEventFuture#touch}. - # - # @note This function potentially blocks current thread until the Future is resolved. - # Be careful it can deadlock. Try to chain instead. - # @param timeout [Numeric] the maximum time in second to wait. - # @raise [Exception] {#reason} on rejection - # @return [self, true, false] self implies timeout was not used, true implies timeout was used - # and it was resolved, false implies it was not resolved within timeout. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#987 - def wait!(timeout = T.unsafe(nil)); end - - # Crates new object with same class with the executor set as its new default executor. - # Any futures depending on it will use the new default executor. - # - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1111 - def with_default_executor(executor); end - - # Creates a new event or a future which will be resolved when receiver and other are. - # Returns an event if receiver and other are events, otherwise returns a future. - # If just one of the parties is Future then the result - # of the returned future is equal to the result of the supplied future. If both are futures - # then the result is as described in {FactoryMethods#zip_futures_on}. - # - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1070 - def zip(other); end - - # Creates a new event which will be resolved when the first of receiver, `event_or_future` - # resolves. Returning future will have value nil if event_or_future is event and resolves - # first. - # - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1085 - def |(event_or_future); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1272 - def async_callback_on_fulfillment(state, executor, args, callback); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1278 - def async_callback_on_rejection(state, executor, args, callback); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1284 - def callback_on_fulfillment(state, args, callback); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1288 - def callback_on_rejection(state, args, callback); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1292 - def callback_on_resolution(state, args, callback); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1251 - def rejected_resolution(raise_on_reassign, state); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1247 - def run_test(v); end - - # @raise [self] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1266 - def wait_until_resolved!(timeout = T.unsafe(nil)); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1984 -class Concurrent::Promises::FutureWrapperPromise < ::Concurrent::Promises::BlockedPromise - # @return [FutureWrapperPromise] a new instance of FutureWrapperPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1985 - def initialize(delayed, blockers_count, default_executor); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1991 - def on_resolvable(resolved_future, index); end -end - -# will be immediately resolved -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1783 -class Concurrent::Promises::ImmediateEventPromise < ::Concurrent::Promises::InnerPromise - # @return [ImmediateEventPromise] a new instance of ImmediateEventPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1784 - def initialize(default_executor); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1789 -class Concurrent::Promises::ImmediateFuturePromise < ::Concurrent::Promises::InnerPromise - # @return [ImmediateFuturePromise] a new instance of ImmediateFuturePromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1790 - def initialize(default_executor, fulfilled, value, reason); end -end - -# @abstract -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1615 -class Concurrent::Promises::InnerPromise < ::Concurrent::Promises::AbstractPromise; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#338 -module Concurrent::Promises::InternalStates; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#397 -class Concurrent::Promises::InternalStates::Fulfilled < ::Concurrent::Promises::InternalStates::ResolvedWithResult - # @return [Fulfilled] a new instance of Fulfilled - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#399 - def initialize(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#407 - def apply(args, block); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#403 - def fulfilled?; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#415 - def reason; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#419 - def to_sym; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#411 - def value; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#425 -class Concurrent::Promises::InternalStates::FulfilledArray < ::Concurrent::Promises::InternalStates::Fulfilled - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#426 - def apply(args, block); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#488 -Concurrent::Promises::InternalStates::PENDING = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Pending) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#459 -class Concurrent::Promises::InternalStates::PartiallyRejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult - # @return [PartiallyRejected] a new instance of PartiallyRejected - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#460 - def initialize(value, reason); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#482 - def apply(args, block); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#466 - def fulfilled?; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#478 - def reason; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#470 - def to_sym; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#474 - def value; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#351 -class Concurrent::Promises::InternalStates::Pending < ::Concurrent::Promises::InternalStates::State - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#352 - def resolved?; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#356 - def to_sym; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#490 -Concurrent::Promises::InternalStates::RESERVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Reserved) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#492 -Concurrent::Promises::InternalStates::RESOLVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Fulfilled) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#432 -class Concurrent::Promises::InternalStates::Rejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult - # @return [Rejected] a new instance of Rejected - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#433 - def initialize(reason); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#453 - def apply(args, block); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#437 - def fulfilled?; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#445 - def reason; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#449 - def to_sym; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#441 - def value; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#362 -class Concurrent::Promises::InternalStates::Reserved < ::Concurrent::Promises::InternalStates::Pending; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#366 -class Concurrent::Promises::InternalStates::ResolvedWithResult < ::Concurrent::Promises::InternalStates::State - # @raise [NotImplementedError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#391 - def apply; end - - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#379 - def fulfilled?; end - - # @raise [NotImplementedError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#387 - def reason; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#367 - def resolved?; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#375 - def result; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#371 - def to_sym; end - - # @raise [NotImplementedError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#383 - def value; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#340 -class Concurrent::Promises::InternalStates::State - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#341 - def resolved?; end - - # @raise [NotImplementedError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#345 - def to_sym; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1748 -class Concurrent::Promises::RescuePromise < ::Concurrent::Promises::BlockedTaskPromise - # @return [RescuePromise] a new instance of RescuePromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1751 - def initialize(delayed, blockers_count, default_executor, executor, args, &task); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1755 - def on_resolvable(resolved_future, index); end -end - -# Marker module of Future, Event resolved manually. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1299 -module Concurrent::Promises::Resolvable - include ::Concurrent::Promises::InternalStates -end - -# A Event which can be resolved by user. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1304 -class Concurrent::Promises::ResolvableEvent < ::Concurrent::Promises::Event - include ::Concurrent::Promises::Resolvable - - # Makes the event resolved, which triggers all dependent futures. - # - # @param raise_on_reassign [Boolean] should method raise exception if already resolved - # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, - # marks resolution of reserved resolvable events and futures explicitly. - # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. - # @return [self, false] false is returned when raise_on_reassign is false and the receiver - # is already resolved. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1324 - def resolve(raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end - - # Behaves as {AbstractEventFuture#wait} but has one additional optional argument - # resolve_on_timeout. - # - # @param resolve_on_timeout [true, false] If it times out and the argument is true it will also resolve the event. - # @return [self, true, false] - # @see AbstractEventFuture#wait - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1342 - def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end - - # Creates new event wrapping receiver, effectively hiding the resolve method. - # - # @return [Event] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1331 - def with_hidden_resolvable; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1600 -class Concurrent::Promises::ResolvableEventPromise < ::Concurrent::Promises::AbstractPromise - # @return [ResolvableEventPromise] a new instance of ResolvableEventPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1601 - def initialize(default_executor); end -end - -# A Future which can be resolved by user. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1354 -class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future - include ::Concurrent::Promises::Resolvable - - # Evaluates the block and sets its result as future's value fulfilling, if the block raises - # an exception the future rejects with it. - # - # @return [self] - # @yield [*args] to the block. - # @yieldreturn [Object] value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1395 - def evaluate_to(*args, &block); end - - # Evaluates the block and sets its result as future's value fulfilling, if the block raises - # an exception the future rejects with it. - # - # @raise [Exception] also raise reason on rejection. - # @return [self] - # @yield [*args] to the block. - # @yieldreturn [Object] value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1406 - def evaluate_to!(*args, &block); end - - # Makes the future fulfilled with `value`, - # which triggers all dependent futures. - # - # @param value [Object] - # @param raise_on_reassign [Boolean] should method raise exception if already resolved - # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, - # marks resolution of reserved resolvable events and futures explicitly. - # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. - # @return [self, false] false is returned when raise_on_reassign is false and the receiver - # is already resolved. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1375 - def fulfill(value, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end - - # Behaves as {Future#reason} but has one additional optional argument - # resolve_on_timeout. - # - # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future - # to the provided resolution. - # @return [Exception, timeout_value, nil] - # @see Future#reason - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1503 - def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end - - # Makes the future rejected with `reason`, - # which triggers all dependent futures. - # - # @param reason [Object] - # @param raise_on_reassign [Boolean] should method raise exception if already resolved - # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, - # marks resolution of reserved resolvable events and futures explicitly. - # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. - # @return [self, false] false is returned when raise_on_reassign is false and the receiver - # is already resolved. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1385 - def reject(reason, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end - - # Makes the future resolved with result of triplet `fulfilled?`, `value`, `reason`, - # which triggers all dependent futures. - # - # @param fulfilled [true, false] - # @param value [Object] - # @param reason [Object] - # @param raise_on_reassign [Boolean] should method raise exception if already resolved - # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, - # marks resolution of reserved resolvable events and futures explicitly. - # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. - # @return [self, false] false is returned when raise_on_reassign is false and the receiver - # is already resolved. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1365 - def resolve(fulfilled = T.unsafe(nil), value = T.unsafe(nil), reason = T.unsafe(nil), raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end - - # Behaves as {Future#result} but has one additional optional argument - # resolve_on_timeout. - # - # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future - # to the provided resolution. - # @return [::Array(Boolean, Object, Exception), nil] - # @see Future#result - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1524 - def result(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end - - # Behaves as {Future#value} but has one additional optional argument - # resolve_on_timeout. - # - # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future - # to the provided resolution. - # @return [Object, timeout_value, nil] - # @see Future#value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1459 - def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end - - # Behaves as {Future#value!} but has one additional optional argument - # resolve_on_timeout. - # - # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future - # to the provided resolution. - # @raise [Exception] {#reason} on rejection - # @return [Object, timeout_value, nil] - # @see Future#value! - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1481 - def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end - - # Behaves as {AbstractEventFuture#wait} but has one additional optional argument - # resolve_on_timeout. - # - # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future - # to the provided resolution. - # @return [self, true, false] - # @see AbstractEventFuture#wait - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1421 - def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end - - # Behaves as {Future#wait!} but has one additional optional argument - # resolve_on_timeout. - # - # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future - # to the provided resolution. - # @raise [Exception] {#reason} on rejection - # @return [self, true, false] - # @see Future#wait! - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1438 - def wait!(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end - - # Creates new future wrapping receiver, effectively hiding the resolve method and similar. - # - # @return [Future] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1542 - def with_hidden_resolvable; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1606 -class Concurrent::Promises::ResolvableFuturePromise < ::Concurrent::Promises::AbstractPromise - # @return [ResolvableFuturePromise] a new instance of ResolvableFuturePromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1607 - def initialize(default_executor); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1592 - def evaluate_to(*args, block); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1909 -class Concurrent::Promises::RunFuturePromise < ::Concurrent::Promises::AbstractFlatPromise - # @return [RunFuturePromise] a new instance of RunFuturePromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1913 - def initialize(delayed, blockers_count, default_executor, run_test); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1918 - def process_on_blocker_resolution(future, index); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2114 -class Concurrent::Promises::ScheduledPromise < ::Concurrent::Promises::InnerPromise - # @return [ScheduledPromise] a new instance of ScheduledPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2125 - def initialize(default_executor, intended_time); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2119 - def inspect; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2115 - def intended_time; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1730 -class Concurrent::Promises::ThenPromise < ::Concurrent::Promises::BlockedTaskPromise - # @return [ThenPromise] a new instance of ThenPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1733 - def initialize(delayed, blockers_count, default_executor, executor, args, &task); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1737 - def on_resolvable(resolved_future, index); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1940 -class Concurrent::Promises::ZipEventEventPromise < ::Concurrent::Promises::BlockedPromise - # @return [ZipEventEventPromise] a new instance of ZipEventEventPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1941 - def initialize(delayed, blockers_count, default_executor); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1947 - def on_resolvable(resolved_future, index); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2031 -class Concurrent::Promises::ZipEventsPromise < ::Concurrent::Promises::BlockedPromise - # @return [ZipEventsPromise] a new instance of ZipEventsPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2035 - def initialize(delayed, blockers_count, default_executor); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2041 - def on_resolvable(resolved_future, index); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1952 -class Concurrent::Promises::ZipFutureEventPromise < ::Concurrent::Promises::BlockedPromise - # @return [ZipFutureEventPromise] a new instance of ZipFutureEventPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1953 - def initialize(delayed, blockers_count, default_executor); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1967 - def on_resolvable(resolved_future, index); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1960 - def process_on_blocker_resolution(future, index); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1996 -class Concurrent::Promises::ZipFuturesPromise < ::Concurrent::Promises::BlockedPromise - # @return [ZipFuturesPromise] a new instance of ZipFuturesPromise - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2000 - def initialize(delayed, blockers_count, default_executor); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2013 - def on_resolvable(resolved_future, index); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2007 - def process_on_blocker_resolution(future, index); end -end - -# Methods form module A included to a module B, which is already included into class C, -# will not be visible in the C class. If this module is extended to B then A's methods -# are correctly made visible to C. -# -# @example -# module A -# def a -# :a -# end -# end -# -# module B1 -# end -# -# class C1 -# include B1 -# end -# -# module B2 -# extend Concurrent::ReInclude -# end -# -# class C2 -# include B2 -# end -# -# B1.send :include, A -# B2.send :include, A -# -# C1.new.respond_to? :a # => false -# C2.new.respond_to? :a # => true -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#36 -module Concurrent::ReInclude - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#44 - def extended(base); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#50 - def include(*modules); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#38 - def included(base); end -end - -# Ruby read-write lock implementation -# -# Allows any number of concurrent readers, but only one concurrent writer -# (And if the "write" lock is taken, any readers who come along will have to wait) -# -# If readers are already active when a writer comes along, the writer will wait for -# all the readers to finish before going ahead. -# Any additional readers that come when the writer is already waiting, will also -# wait (so writers are not starved). -# -# This implementation is based on `java.util.concurrent.ReentrantReadWriteLock`. -# -# @example -# lock = Concurrent::ReadWriteLock.new -# lock.with_read_lock { data.retrieve } -# lock.with_write_lock { data.modify! } -# @note Do **not** try to acquire the write lock while already holding a read lock -# **or** try to acquire the write lock while you already have it. -# This will lead to deadlock -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#31 -class Concurrent::ReadWriteLock < ::Concurrent::Synchronization::Object - extend ::Concurrent::Synchronization::SafeInitialization - - # Create a new `ReadWriteLock` in the unlocked state. - # - # @return [ReadWriteLock] a new instance of ReadWriteLock - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#59 - def initialize; end - - # Acquire a read lock. If a write lock has been acquired will block until - # it is released. Will not block if other read locks have been acquired. - # - # @raise [Concurrent::ResourceLimitError] if the maximum number of readers - # is exceeded. - # @return [Boolean] true if the lock is successfully acquired - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#111 - def acquire_read_lock; end - - # Acquire a write lock. Will block and wait for all active readers and writers. - # - # @raise [Concurrent::ResourceLimitError] if the maximum number of writers - # is exceeded. - # @return [Boolean] true if the lock is successfully acquired - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#160 - def acquire_write_lock; end - - # Queries whether any threads are waiting to acquire the read or write lock. - # - # @return [Boolean] true if any threads are waiting for a lock else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#214 - def has_waiters?; end - - # Release a previously acquired read lock. - # - # @return [Boolean] true if the lock is successfully released - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#140 - def release_read_lock; end - - # Release a previously acquired write lock. - # - # @return [Boolean] true if the lock is successfully released - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#196 - def release_write_lock; end - - # Execute a block operation within a read lock. - # - # @raise [ArgumentError] when no block is given. - # @raise [Concurrent::ResourceLimitError] if the maximum number of readers - # is exceeded. - # @return [Object] the result of the block operation. - # @yield the task to be performed within the lock. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#75 - def with_read_lock; end - - # Execute a block operation within a write lock. - # - # @raise [ArgumentError] when no block is given. - # @raise [Concurrent::ResourceLimitError] if the maximum number of readers - # is exceeded. - # @return [Object] the result of the block operation. - # @yield the task to be performed within the lock. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#94 - def with_write_lock; end - - # Queries if the write lock is held by any thread. - # - # @return [Boolean] true if the write lock is held else false` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#207 - def write_locked?; end - - private - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#246 - def max_readers?(c = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#251 - def max_writers?(c = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#221 - def running_readers(c = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#226 - def running_readers?(c = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#231 - def running_writer?(c = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#241 - def waiting_writer?(c = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#236 - def waiting_writers(c = T.unsafe(nil)); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#40 -Concurrent::ReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#43 -Concurrent::ReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#37 -Concurrent::ReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#34 -Concurrent::ReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) - -# Re-entrant read-write lock implementation -# -# Allows any number of concurrent readers, but only one concurrent writer -# (And while the "write" lock is taken, no read locks can be obtained either. -# Hence, the write lock can also be called an "exclusive" lock.) -# -# If another thread has taken a read lock, any thread which wants a write lock -# will block until all the readers release their locks. However, once a thread -# starts waiting to obtain a write lock, any additional readers that come along -# will also wait (so writers are not starved). -# -# A thread can acquire both a read and write lock at the same time. A thread can -# also acquire a read lock OR a write lock more than once. Only when the read (or -# write) lock is released as many times as it was acquired, will the thread -# actually let it go, allowing other threads which might have been waiting -# to proceed. Therefore the lock can be upgraded by first acquiring -# read lock and then write lock and that the lock can be downgraded by first -# having both read and write lock a releasing just the write lock. -# -# If both read and write locks are acquired by the same thread, it is not strictly -# necessary to release them in the same order they were acquired. In other words, -# the following code is legal: -# -# This implementation was inspired by `java.util.concurrent.ReentrantReadWriteLock`. -# -# @example -# lock = Concurrent::ReentrantReadWriteLock.new -# lock.acquire_write_lock -# lock.acquire_read_lock -# lock.release_write_lock -# # At this point, the current thread is holding only a read lock, not a write -# # lock. So other threads can take read locks, but not a write lock. -# lock.release_read_lock -# # Now the current thread is not holding either a read or write lock, so -# # another thread could potentially acquire a write lock. -# @example -# lock = Concurrent::ReentrantReadWriteLock.new -# lock.with_read_lock { data.retrieve } -# lock.with_write_lock { data.modify! } -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#53 -class Concurrent::ReentrantReadWriteLock < ::Concurrent::Synchronization::Object - extend ::Concurrent::Synchronization::SafeInitialization - - # Create a new `ReentrantReadWriteLock` in the unlocked state. - # - # @return [ReentrantReadWriteLock] a new instance of ReentrantReadWriteLock - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#109 - def initialize; end - - # Acquire a read lock. If a write lock is held by another thread, will block - # until it is released. - # - # @raise [Concurrent::ResourceLimitError] if the maximum number of readers - # is exceeded. - # @return [Boolean] true if the lock is successfully acquired - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#162 - def acquire_read_lock; end - - # Acquire a write lock. Will block and wait for all active readers and writers. - # - # @raise [Concurrent::ResourceLimitError] if the maximum number of writers - # is exceeded. - # @return [Boolean] true if the lock is successfully acquired - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#257 - def acquire_write_lock; end - - # Release a previously acquired read lock. - # - # @return [Boolean] true if the lock is successfully released - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#236 - def release_read_lock; end - - # Release a previously acquired write lock. - # - # @return [Boolean] true if the lock is successfully released - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#329 - def release_write_lock; end - - # Try to acquire a read lock and return true if we succeed. If it cannot be - # acquired immediately, return false. - # - # @return [Boolean] true if the lock is successfully acquired - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#215 - def try_read_lock; end - - # Try to acquire a write lock and return true if we succeed. If it cannot be - # acquired immediately, return false. - # - # @return [Boolean] true if the lock is successfully acquired - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#310 - def try_write_lock; end - - # Execute a block operation within a read lock. - # - # @raise [ArgumentError] when no block is given. - # @raise [Concurrent::ResourceLimitError] if the maximum number of readers - # is exceeded. - # @return [Object] the result of the block operation. - # @yield the task to be performed within the lock. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#126 - def with_read_lock; end - - # Execute a block operation within a write lock. - # - # @raise [ArgumentError] when no block is given. - # @raise [Concurrent::ResourceLimitError] if the maximum number of readers - # is exceeded. - # @return [Object] the result of the block operation. - # @yield the task to be performed within the lock. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#145 - def with_write_lock; end - - private - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#370 - def max_readers?(c = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#375 - def max_writers?(c = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#345 - def running_readers(c = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#350 - def running_readers?(c = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#355 - def running_writer?(c = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#365 - def waiting_or_running_writer?(c = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#360 - def waiting_writers(c = T.unsafe(nil)); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#94 -Concurrent::ReentrantReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#96 -Concurrent::ReentrantReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#84 -Concurrent::ReentrantReadWriteLock::READER_BITS = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#102 -Concurrent::ReentrantReadWriteLock::READ_LOCK_MASK = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#92 -Concurrent::ReentrantReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) - -# Used with @Counter: -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#90 -Concurrent::ReentrantReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#86 -Concurrent::ReentrantReadWriteLock::WRITER_BITS = T.let(T.unsafe(nil), Integer) - -# Used with @HeldCount: -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#100 -Concurrent::ReentrantReadWriteLock::WRITE_LOCK_HELD = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#104 -Concurrent::ReentrantReadWriteLock::WRITE_LOCK_MASK = T.let(T.unsafe(nil), Integer) - -# Raised by an `Executor` when it is unable to process a given task, -# possibly because of a reject policy or other internal error. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#48 -class Concurrent::RejectedExecutionError < ::Concurrent::Error; end - -# Raised when any finite resource, such as a lock counter, exceeds its -# maximum limit/threshold. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#52 -class Concurrent::ResourceLimitError < ::Concurrent::Error; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#129 -class Concurrent::RubyExchanger < ::Concurrent::AbstractExchanger - extend ::Concurrent::Synchronization::SafeInitialization - - # @return [RubyExchanger] a new instance of RubyExchanger - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#159 - def initialize; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 - def __initialize_atomic_fields__; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 - def compare_and_set_slot(expected, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 - def slot; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 - def slot=(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 - def swap_slot(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 - def update_slot(&block); end - - private - - # Waits for another thread to arrive at this exchange point (unless the - # current thread is interrupted), and then transfers the given object to - # it, receiving its object in return. The timeout value indicates the - # approximate number of seconds the method should block while waiting - # for the exchange. When the timeout value is `nil` the method will - # block indefinitely. - # - # @param value [Object] the value to exchange with another thread - # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely - # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#170 - def do_exchange(value, timeout); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#138 -class Concurrent::RubyExchanger::Node < ::Concurrent::Synchronization::Object - extend ::Concurrent::Synchronization::SafeInitialization - - # @return [Node] a new instance of Node - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#142 - def initialize(item); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 - def __initialize_atomic_fields__; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 - def compare_and_set_value(expected, value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#153 - def item; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#149 - def latch; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 - def swap_value(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 - def update_value(&block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 - def value; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 - def value=(value); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#8 -class Concurrent::RubyExecutorService < ::Concurrent::AbstractExecutorService - # @return [RubyExecutorService] a new instance of RubyExecutorService - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#11 - def initialize(*args, &block); end - - # Begin an immediate shutdown. In-progress tasks will be allowed to - # complete but enqueued tasks will be dismissed and no new tasks - # will be accepted. Has no additional effect if the thread pool is - # not running. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#42 - def kill; end - - # Submit a task to the executor for asynchronous processing. - # - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#17 - def post(*args, &task); end - - # Begin an orderly shutdown. Tasks already in the queue will be executed, - # but no new tasks will be accepted. Has no additional effect if the - # thread pool is not running. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#33 - def shutdown; end - - # Block until executor shutdown is complete or until `timeout` seconds have - # passed. - # - # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` - # must be called before this method (or on another thread). - # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete - # @return [Boolean] `true` if shutdown complete or false on `timeout` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#52 - def wait_for_termination(timeout = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#70 - def ns_running?; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#78 - def ns_shutdown?; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#66 - def ns_shutdown_execution; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#74 - def ns_shuttingdown?; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#58 - def stop_event; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#62 - def stopped_event; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb#8 -class Concurrent::RubySingleThreadExecutor < ::Concurrent::RubyThreadPoolExecutor - # @return [RubySingleThreadExecutor] a new instance of RubySingleThreadExecutor - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb#11 - def initialize(opts = T.unsafe(nil)); end -end - -# **Thread Pool Options** -# -# Thread pools support several configuration options: -# -# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. -# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and -# a `-worker-` name is given to its threads if supported by used Ruby -# implementation. `` is uniq for each thread. -# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at -# any one time. When the queue size reaches `max_queue` and no new threads can be created, -# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. -# * `auto_terminate`: When true (default), the threads started will be marked as daemon. -# * `fallback_policy`: The policy defining how rejected tasks are handled. -# -# Three fallback policies are supported: -# -# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. -# * `:discard`: Discard the task and return false. -# * `:caller_runs`: Execute the task on the calling thread. -# -# **Shutting Down Thread Pools** -# -# Killing a thread pool while tasks are still being processed, either by calling -# the `#kill` method or at application exit, will have unpredictable results. There -# is no way for the thread pool to know what resources are being used by the -# in-progress tasks. When those tasks are killed the impact on those resources -# cannot be predicted. The *best* practice is to explicitly shutdown all thread -# pools using the provided methods: -# -# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks -# * Call `#wait_for_termination` with an appropriate timeout interval an allow -# the orderly shutdown to complete -# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time -# -# On some runtime platforms (most notably the JVM) the application will not -# exit until all thread pools have been shutdown. To prevent applications from -# "hanging" on exit, all threads can be marked as daemon according to the -# `:auto_terminate` option. -# -# ```ruby -# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon -# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon -# ``` -# -# @note Failure to properly shutdown a thread pool can lead to unpredictable results. -# Please read *Shutting Down Thread Pools* for more information. -# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class -# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface -# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#12 -class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService - # @return [RubyThreadPoolExecutor] a new instance of RubyThreadPoolExecutor - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#45 - def initialize(opts = T.unsafe(nil)); end - - # The number of threads that are actively executing tasks. - # - # @return [Integer] The number of threads that are actively executing tasks. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#65 - def active_count; end - - # Does the task queue have a maximum size? - # - # @return [Boolean] True if the task queue has a maximum size else false. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#72 - def can_overflow?; end - - # The number of tasks that have been completed by the pool since construction. - # - # @return [Integer] The number of tasks that have been completed by the pool since construction. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#60 - def completed_task_count; end - - # The number of seconds that a thread may be idle before being reclaimed. - # - # @return [Integer] The number of seconds that a thread may be idle before being reclaimed. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#36 - def idletime; end - - # The largest number of threads that have been created in the pool since construction. - # - # @return [Integer] The largest number of threads that have been created in the pool since construction. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#50 - def largest_length; end - - # The number of threads currently in the pool. - # - # @return [Integer] The number of threads currently in the pool. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#77 - def length; end - - # The maximum number of threads that may be created in the pool. - # - # @return [Integer] The maximum number of threads that may be created in the pool. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#30 - def max_length; end - - # The maximum number of tasks that may be waiting in the work queue at any one time. - # When the queue size reaches `max_queue` subsequent tasks will be rejected in - # accordance with the configured `fallback_policy`. - # - # @return [Integer] The maximum number of tasks that may be waiting in the work queue at any one time. - # When the queue size reaches `max_queue` subsequent tasks will be rejected in - # accordance with the configured `fallback_policy`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#39 - def max_queue; end - - # The minimum number of threads that may be retained in the pool. - # - # @return [Integer] The minimum number of threads that may be retained in the pool. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#33 - def min_length; end - - # Prune the thread pool of unneeded threads - # - # What is being pruned is controlled by the min_threads and idletime - # parameters passed at pool creation time - # - # This is a no-op on some pool implementation (e.g. the Java one). The Ruby - # pool will auto-prune each time a new job is posted. You will need to call - # this method explicitly in case your application post jobs in bursts (a - # lot of jobs and then nothing for long periods) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#118 - def prune_pool; end - - # The number of tasks in the queue awaiting execution. - # - # @return [Integer] The number of tasks in the queue awaiting execution. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#82 - def queue_length; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#103 - def ready_worker(worker, last_message); end - - # Number of tasks that may be enqueued before reaching `max_queue` and rejecting - # new tasks. A value of -1 indicates that the queue may grow without bound. - # - # @return [Integer] Number of tasks that may be enqueued before reaching `max_queue` and rejecting - # new tasks. A value of -1 indicates that the queue may grow without bound. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#87 - def remaining_capacity; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#98 - def remove_busy_worker(worker); end - - # The number of tasks that have been scheduled for execution on the pool since construction. - # - # @return [Integer] The number of tasks that have been scheduled for execution on the pool since construction. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#55 - def scheduled_task_count; end - - # Whether or not a value of 0 for :max_queue option means the queue must perform direct hand-off or rather unbounded queue. - # - # @return [true, false] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#42 - def synchronous; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#108 - def worker_died(worker); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#113 - def worker_task_completed; end - - private - - # creates new worker which has to receive work to do after it's added - # - # @return [nil, Worker] nil of max capacity is reached - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#241 - def ns_add_busy_worker; end - - # tries to assign task to a worker, tries to get one from @ready or to create new one - # - # @return [true, false] if task is assigned to a worker - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#201 - def ns_assign_worker(*args, &task); end - - # tries to enqueue task - # - # @return [true, false] if enqueued - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#219 - def ns_enqueue(*args, &task); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#160 - def ns_execute(*args, &task); end - - # @raise [ArgumentError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#125 - def ns_initialize(opts); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#189 - def ns_kill_execution; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#155 - def ns_limited_queue?; end - - # try oldest worker if it is idle for enough time, it's returned back at the start - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#280 - def ns_prune_pool; end - - # handle ready worker, giving it new job or assigning back to @ready - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#253 - def ns_ready_worker(worker, last_message, success = T.unsafe(nil)); end - - # removes a worker which is not in not tracked in @ready - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#271 - def ns_remove_busy_worker(worker); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#296 - def ns_reset_if_forked; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#174 - def ns_shutdown_execution; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#231 - def ns_worker_died(worker); end -end - -# Default maximum number of threads that will be created in the pool. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#15 -Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_POOL_SIZE = T.let(T.unsafe(nil), Integer) - -# Default maximum number of tasks that may be added to the task queue. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#21 -Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_QUEUE_SIZE = T.let(T.unsafe(nil), Integer) - -# Default minimum number of threads that will be retained in the pool. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#18 -Concurrent::RubyThreadPoolExecutor::DEFAULT_MIN_POOL_SIZE = T.let(T.unsafe(nil), Integer) - -# Default value of the :synchronous option. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#27 -Concurrent::RubyThreadPoolExecutor::DEFAULT_SYNCHRONOUS = T.let(T.unsafe(nil), FalseClass) - -# Default maximum number of seconds a thread in the pool may remain idle -# before being reclaimed. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#24 -Concurrent::RubyThreadPoolExecutor::DEFAULT_THREAD_IDLETIMEOUT = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#310 -class Concurrent::RubyThreadPoolExecutor::Worker - include ::Concurrent::Concern::Logging - - # @return [Worker] a new instance of Worker - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#313 - def initialize(pool, id); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#324 - def <<(message); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#332 - def kill; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#328 - def stop; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#338 - def create_worker(queue, pool, idletime); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#358 - def run_task(pool, task, args); end -end - -# A simple utility class that executes a callable and returns and array of three elements: -# success - indicating if the callable has been executed without errors -# value - filled by the callable result if it has been executed without errors, nil otherwise -# reason - the error risen by the callable if it has been executed with errors, nil otherwise -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#9 -class Concurrent::SafeTaskExecutor < ::Concurrent::Synchronization::LockableObject - # @return [SafeTaskExecutor] a new instance of SafeTaskExecutor - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#11 - def initialize(task, opts = T.unsafe(nil)); end - - # @return [Array] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#18 - def execute(*args); end -end - -# `ScheduledTask` is a close relative of `Concurrent::Future` but with one -# important difference: A `Future` is set to execute as soon as possible -# whereas a `ScheduledTask` is set to execute after a specified delay. This -# implementation is loosely based on Java's -# [ScheduledExecutorService](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html). -# It is a more feature-rich variant of {Concurrent.timer}. -# -# The *intended* schedule time of task execution is set on object construction -# with the `delay` argument. The delay is a numeric (floating point or integer) -# representing a number of seconds in the future. Any other value or a numeric -# equal to or less than zero will result in an exception. The *actual* schedule -# time of task execution is set when the `execute` method is called. -# -# The constructor can also be given zero or more processing options. Currently -# the only supported options are those recognized by the -# [Dereferenceable](Dereferenceable) module. -# -# The final constructor argument is a block representing the task to be performed. -# If no block is given an `ArgumentError` will be raised. -# -# **States** -# -# `ScheduledTask` mixes in the [Obligation](Obligation) module thus giving it -# "future" behavior. This includes the expected lifecycle states. `ScheduledTask` -# has one additional state, however. While the task (block) is being executed the -# state of the object will be `:processing`. This additional state is necessary -# because it has implications for task cancellation. -# -# **Cancellation** -# -# A `:pending` task can be cancelled using the `#cancel` method. A task in any -# other state, including `:processing`, cannot be cancelled. The `#cancel` -# method returns a boolean indicating the success of the cancellation attempt. -# A cancelled `ScheduledTask` cannot be restarted. It is immutable. -# -# **Obligation and Observation** -# -# The result of a `ScheduledTask` can be obtained either synchronously or -# asynchronously. `ScheduledTask` mixes in both the [Obligation](Obligation) -# module and the -# [Observable](http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html) -# module from the Ruby standard library. With one exception `ScheduledTask` -# behaves identically to [Future](Observable) with regard to these modules. -# -# @example Basic usage -# -# require 'concurrent/scheduled_task' -# require 'csv' -# require 'open-uri' -# -# class Ticker -# def get_year_end_closing(symbol, year, api_key) -# uri = "https://www.alphavantage.co/query?function=TIME_SERIES_MONTHLY&symbol=#{symbol}&apikey=#{api_key}&datatype=csv" -# data = [] -# csv = URI.parse(uri).read -# if csv.include?('call frequency') -# return :rate_limit_exceeded -# end -# CSV.parse(csv, headers: true) do |row| -# data << row['close'].to_f if row['timestamp'].include?(year.to_s) -# end -# year_end = data.first -# year_end -# rescue => e -# p e -# end -# end -# -# api_key = ENV['ALPHAVANTAGE_KEY'] -# abort(error_message) unless api_key -# -# # Future -# price = Concurrent::Future.execute{ Ticker.new.get_year_end_closing('TWTR', 2013, api_key) } -# price.state #=> :pending -# price.pending? #=> true -# price.value(0) #=> nil (does not block) -# -# sleep(1) # do other stuff -# -# price.value #=> 63.65 (after blocking if necessary) -# price.state #=> :fulfilled -# price.fulfilled? #=> true -# price.value #=> 63.65 -# @example Successful task execution -# -# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } -# task.state #=> :unscheduled -# task.execute -# task.state #=> pending -# -# # wait for it... -# sleep(3) -# -# task.unscheduled? #=> false -# task.pending? #=> false -# task.fulfilled? #=> true -# task.rejected? #=> false -# task.value #=> 'What does the fox say?' -# @example One line creation and execution -# -# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' }.execute -# task.state #=> pending -# -# task = Concurrent::ScheduledTask.execute(2){ 'What do you get when you multiply 6 by 9?' } -# task.state #=> pending -# @example Failed task execution -# -# task = Concurrent::ScheduledTask.execute(2){ raise StandardError.new('Call me maybe?') } -# task.pending? #=> true -# -# # wait for it... -# sleep(3) -# -# task.unscheduled? #=> false -# task.pending? #=> false -# task.fulfilled? #=> false -# task.rejected? #=> true -# task.value #=> nil -# task.reason #=> # -# @example Task execution with observation -# -# observer = Class.new{ -# def update(time, value, reason) -# puts "The task completed at #{time} with value '#{value}'" -# end -# }.new -# -# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } -# task.add_observer(observer) -# task.execute -# task.pending? #=> true -# -# # wait for it... -# sleep(3) -# -# #>> The task completed at 2013-11-07 12:26:09 -0500 with value 'What does the fox say?' -# @see Concurrent.timer -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#158 -class Concurrent::ScheduledTask < ::Concurrent::IVar - include ::Comparable - - # Schedule a task for execution at a specified future time. - # - # @option opts - # @param delay [Float] the number of seconds to wait for before executing the task - # @param opts [Hash] a customizable set of options - # @raise [ArgumentError] When no block is given - # @raise [ArgumentError] When given a time that is in the past - # @return [ScheduledTask] a new instance of ScheduledTask - # @yield the task to be performed - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#178 - def initialize(delay, opts = T.unsafe(nil), &task); end - - # Comparator which orders by schedule time. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#213 - def <=>(other); end - - # Cancel this task and prevent it from executing. A task can only be - # cancelled if it is pending or unscheduled. - # - # @return [Boolean] true if successfully cancelled else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#235 - def cancel; end - - # Has the task been cancelled? - # - # @return [Boolean] true if the task is in the given state else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#220 - def cancelled?; end - - # Execute an `:unscheduled` `ScheduledTask`. Immediately sets the state to `:pending` - # and starts counting down toward execution. Does nothing if the `ScheduledTask` is - # in any state other than `:unscheduled`. - # - # @return [ScheduledTask] a reference to `self` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#273 - def execute; end - - # The executor on which to execute the task. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#163 - def executor; end - - # The `delay` value given at instantiation. - # - # @return [Float] the initial delay. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#199 - def initial_delay; end - - # Execute the task. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#297 - def process_task; end - - # In the task execution in progress? - # - # @return [Boolean] true if the task is in the given state else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#227 - def processing?; end - - # Reschedule the task using the given delay and the current time. - # A task can only be reset while it is `:pending`. - # - # @param delay [Float] the number of seconds to wait for before executing the task - # @raise [ArgumentError] When given a time that is in the past - # @return [Boolean] true if successfully rescheduled else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#262 - def reschedule(delay); end - - # Reschedule the task using the original delay and the current time. - # A task can only be reset while it is `:pending`. - # - # @return [Boolean] true if successfully rescheduled else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#250 - def reset; end - - # The monotonic time at which the the task is scheduled to be executed. - # - # @return [Float] the schedule time or nil if `unscheduled` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#206 - def schedule_time; end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#135 - def fail(reason = T.unsafe(nil)); end - - # Reschedule the task using the given delay and the current time. - # A task can only be reset while it is `:pending`. - # - # @param delay [Float] the number of seconds to wait for before executing the task - # @return [Boolean] true if successfully rescheduled else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#326 - def ns_reschedule(delay); end - - # Schedule the task using the given delay and the current time. - # - # @param delay [Float] the number of seconds to wait for before executing the task - # @return [Boolean] true if successfully rescheduled else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#312 - def ns_schedule(delay); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#113 - def set(value = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#145 - def try_set(value = T.unsafe(nil), &block); end - - class << self - # Create a new `ScheduledTask` object with the given block, execute it, and return the - # `:pending` object. - # - # @param delay [Float] the number of seconds to wait for before executing the task - # @raise [ArgumentError] if no block is given - # @return [ScheduledTask] the newly created `ScheduledTask` in the `:pending` state - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#290 - def execute(delay, opts = T.unsafe(nil), &task); end - end -end - -# A counting semaphore. Conceptually, a semaphore maintains a set of -# permits. Each {#acquire} blocks if necessary until a permit is -# available, and then takes it. Each {#release} adds a permit, potentially -# releasing a blocking acquirer. -# However, no actual permit objects are used; the Semaphore just keeps a -# count of the number available and acts accordingly. -# Alternatively, permits may be acquired within a block, and automatically -# released after the block finishes executing. -# -# @example -# semaphore = Concurrent::Semaphore.new(2) -# -# t1 = Thread.new do -# semaphore.acquire -# puts "Thread 1 acquired semaphore" -# end -# -# t2 = Thread.new do -# semaphore.acquire -# puts "Thread 2 acquired semaphore" -# end -# -# t3 = Thread.new do -# semaphore.acquire -# puts "Thread 3 acquired semaphore" -# end -# -# t4 = Thread.new do -# sleep(2) -# puts "Thread 4 releasing semaphore" -# semaphore.release -# end -# -# [t1, t2, t3, t4].each(&:join) -# -# # prints: -# # Thread 3 acquired semaphore -# # Thread 2 acquired semaphore -# # Thread 4 releasing semaphore -# # Thread 1 acquired semaphore -# @example -# semaphore = Concurrent::Semaphore.new(1) -# -# puts semaphore.available_permits -# semaphore.acquire do -# puts semaphore.available_permits -# end -# puts semaphore.available_permits -# -# # prints: -# # 1 -# # 0 -# # 1 -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/semaphore.rb#161 -class Concurrent::Semaphore < ::Concurrent::MutexSemaphore; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/semaphore.rb#96 -Concurrent::SemaphoreImplementation = Concurrent::MutexSemaphore - -# Indicates that the including `ExecutorService` guarantees -# that all operations will occur in the order they are post and that no -# two operations may occur simultaneously. This module provides no -# functionality and provides no guarantees. That is the responsibility -# of the including class. This module exists solely to allow the including -# object to be interrogated for its serialization status. -# -# @example -# class Foo -# include Concurrent::SerialExecutor -# end -# -# foo = Foo.new -# -# foo.is_a? Concurrent::ExecutorService #=> true -# foo.is_a? Concurrent::SerialExecutor #=> true -# foo.serialized? #=> true -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb#24 -module Concurrent::SerialExecutorService - include ::Concurrent::Concern::Logging - include ::Concurrent::ExecutorService - - # Does this executor guarantee serialization of its operations? - # - # @note Always returns `true` - # @return [Boolean] True if the executor guarantees that all operations - # will be post in the order they are received and no two operations may - # occur simultaneously. Else false. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb#30 - def serialized?; end -end - -# Ensures passed jobs in a serialized order never running at the same time. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#8 -class Concurrent::SerializedExecution < ::Concurrent::Synchronization::LockableObject - include ::Concurrent::Concern::Logging - - # @return [SerializedExecution] a new instance of SerializedExecution - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#11 - def initialize; end - - # Submit a task to the executor for asynchronous processing. - # - # @param executor [Executor] to be used for this job - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#34 - def post(executor, *args, &task); end - - # As {#post} but allows to submit multiple tasks at once, it's guaranteed that they will not - # be interleaved by other tasks. - # - # @param posts [Array, Proc)>] array of triplets where - # first is a {ExecutorService}, second is array of args for task, third is a task (Proc) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#44 - def posts(posts); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#75 - def call_job(job); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#70 - def ns_initialize; end - - # ensures next job is executed if any is stashed - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#95 - def work(job); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 -class Concurrent::SerializedExecution::Job < ::Struct - # Returns the value of attribute args - # - # @return [Object] the current value of args - def args; end - - # Sets the attribute args - # - # @param value [Object] the value to set the attribute args to. - # @return [Object] the newly set value - def args=(_); end - - # Returns the value of attribute block - # - # @return [Object] the current value of block - def block; end - - # Sets the attribute block - # - # @param value [Object] the value to set the attribute block to. - # @return [Object] the newly set value - def block=(_); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#17 - def call; end - - # Returns the value of attribute executor - # - # @return [Object] the current value of executor - def executor; end - - # Sets the attribute executor - # - # @param value [Object] the value to set the attribute executor to. - # @return [Object] the newly set value - def executor=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# A wrapper/delegator for any `ExecutorService` that -# guarantees serialized execution of tasks. -# -# @see [SimpleDelegator](http://www.ruby-doc.org/stdlib-2.1.2/libdoc/delegate/rdoc/SimpleDelegator.html) -# @see Concurrent::SerializedExecution -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#12 -class Concurrent::SerializedExecutionDelegator < ::SimpleDelegator - include ::Concurrent::Concern::Logging - include ::Concurrent::ExecutorService - include ::Concurrent::SerialExecutorService - - # @return [SerializedExecutionDelegator] a new instance of SerializedExecutionDelegator - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#15 - def initialize(executor); end - - # Submit a task to the executor for asynchronous processing. - # - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#22 - def post(*args, &task); end -end - -# A thread-safe subclass of Set. This version locks against the object -# itself for every method call, ensuring only one thread can be reading -# or writing at a time. This includes iteration methods like `#each`. -# -# @note `a += b` is **not** a **thread-safe** operation on -# `Concurrent::Set`. It reads Set `a`, then it creates new `Concurrent::Set` -# which is union of `a` and `b`, then it writes the union to `a`. -# The read and write are independent operations they do not form a single atomic -# operation therefore when two `+=` operations are executed concurrently updates -# may be lost. Use `#merge` instead. -# @see http://ruby-doc.org/stdlib-2.4.0/libdoc/set/rdoc/Set.html Ruby standard library `Set` -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#61 -class Concurrent::Set < ::Concurrent::CRubySet; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#23 -Concurrent::SetImplementation = Concurrent::CRubySet - -# An thread-safe, write-once variation of Ruby's standard `Struct`. -# Each member can have its value set at most once, either at construction -# or any time thereafter. Attempting to assign a value to a member -# that has already been set will result in a `Concurrent::ImmutabilityError`. -# -# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` -# @see http://en.wikipedia.org/wiki/Final_(Java) Java `final` keyword -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#14 -module Concurrent::SettableStruct - include ::Concurrent::Synchronization::AbstractStruct - - # Equality - # - # @return [Boolean] true if other has the same struct subclass and has - # equal member values (according to `Object#==`) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#50 - def ==(other); end - - # Attribute Reference - # - # @param member [Symbol, String, Integer] the string or symbol name of the member - # for which to obtain the value or the member's index - # @raise [NameError] if the member does not exist - # @raise [IndexError] if the index is out of range. - # @return [Object] the value of the given struct member or the member at the given index. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#45 - def [](member); end - - # Attribute Assignment - # - # Sets the value of the given struct member or the member at the given index. - # - # @param member [Symbol, String, Integer] the string or symbol name of the member - # for which to obtain the value or the member's index - # @raise [NameError] if the name does not exist - # @raise [IndexError] if the index is out of range. - # @raise [Concurrent::ImmutabilityError] if the given member has already been set - # @return [Object] the value of the given struct member or the member at the given index. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#75 - def []=(member, value); end - - # Yields the value of each struct member in order. If no block is given - # an enumerator is returned. - # - # @yield the operation to be performed on each struct member - # @yieldparam value [Object] each struct value (in order) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#55 - def each(&block); end - - # Yields the name and value of each struct member in order. If no block is - # given an enumerator is returned. - # - # @yield the operation to be performed on each struct member/value pair - # @yieldparam member [Object] each struct member (in order) - # @yieldparam value [Object] each struct value (in order) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#61 - def each_pair(&block); end - - # Describe the contents of this struct in a string. - # - # @return [String] the contents of this struct in a string - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#29 - def inspect; end - - # Returns a new struct containing the contents of `other` and the contents - # of `self`. If no block is specified, the value for entries with duplicate - # keys will be that of `other`. Otherwise the value for each duplicate key - # is determined by calling the block with the key, its value in `self` and - # its value in `other`. - # - # @param other [Hash] the hash from which to set the new values - # @raise [ArgumentError] of given a member that is not defined in the struct - # @return [Synchronization::AbstractStruct] a new struct with the new values - # @yield an options block for resolving duplicate keys - # @yieldparam member [String, Symbol] the name of the member which is duplicated - # @yieldparam selfvalue [Object] the value of the member in `self` - # @yieldparam othervalue [Object] the value of the member in `other` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#35 - def merge(other, &block); end - - # Yields each member value from the struct to the block and returns an Array - # containing the member values from the struct for which the given block - # returns a true value (equivalent to `Enumerable#select`). - # - # @return [Array] an array containing each value for which the block returns true - # @yield the operation to be performed on each struct member - # @yieldparam value [Object] each struct value (in order) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#67 - def select(&block); end - - # Returns the values for this struct as an Array. - # - # @return [Array] the values for this struct - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#18 - def to_a; end - - # Returns a hash containing the names and values for the struct’s members. - # - # @return [Hash] the names and values for the struct’s members - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#40 - def to_h; end - - # Describe the contents of this struct in a string. - # - # @return [String] the contents of this struct in a string - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#29 - def to_s; end - - # Returns the values for this struct as an Array. - # - # @return [Array] the values for this struct - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#18 - def values; end - - # Returns the struct member values for each selector as an Array. - # - # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). - # - # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#24 - def values_at(*indexes); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#97 - def initialize_copy(original); end - - class << self - # Factory for creating new struct classes. - # - # ``` - # new([class_name] [, member_name]+>) -> StructClass click to toggle source - # new([class_name] [, member_name]+>) {|StructClass| block } -> StructClass - # new(value, ...) -> obj - # StructClass[value, ...] -> obj - # ``` - # - # The first two forms are used to create a new struct subclass `class_name` - # that can contain a value for each member_name . This subclass can be - # used to create instances of the structure like any other Class . - # - # If the `class_name` is omitted an anonymous struct class will be created. - # Otherwise, the name of this struct will appear as a constant in the struct class, - # so it must be unique for all structs under this base class and must start with a - # capital letter. Assigning a struct class to a constant also gives the class - # the name of the constant. - # - # If a block is given it will be evaluated in the context of `StructClass`, passing - # the created class as a parameter. This is the recommended way to customize a struct. - # Subclassing an anonymous struct creates an extra anonymous class that will never be used. - # - # The last two forms create a new instance of a struct subclass. The number of value - # parameters must be less than or equal to the number of attributes defined for the - # struct. Unset parameters default to nil. Passing more parameters than number of attributes - # will raise an `ArgumentError`. - # - # @see http://ruby-doc.org/core/Struct.html#method-c-new Ruby standard library `Struct#new` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#105 - def new(*args, &block); end - end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#115 -Concurrent::SettableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) - -# An executor service in which every operation spawns a new, -# independently operating thread. -# -# This is perhaps the most inefficient executor service in this -# library. It exists mainly for testing an debugging. Thread creation -# and management is expensive in Ruby and this executor performs no -# resource pooling. This can be very beneficial during testing and -# debugging because it decouples the using code from the underlying -# executor implementation. In production this executor will likely -# lead to suboptimal performance. -# -# @note Intended for use primarily in testing and debugging. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#21 -class Concurrent::SimpleExecutorService < ::Concurrent::RubyExecutorService - # Submit a task to the executor for asynchronous processing. - # - # @param task [Proc] the asynchronous task to perform - # @return [self] returns itself - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#56 - def <<(task); end - - # Begin an immediate shutdown. In-progress tasks will be allowed to - # complete but enqueued tasks will be dismissed and no new tasks - # will be accepted. Has no additional effect if the thread pool is - # not running. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#84 - def kill; end - - # Submit a task to the executor for asynchronous processing. - # - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#40 - def post(*args, &task); end - - # Is the executor running? - # - # @return [Boolean] `true` when running, `false` when shutting down or shutdown - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#62 - def running?; end - - # Begin an orderly shutdown. Tasks already in the queue will be executed, - # but no new tasks will be accepted. Has no additional effect if the - # thread pool is not running. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#77 - def shutdown; end - - # Is the executor shutdown? - # - # @return [Boolean] `true` when shutdown, `false` when shutting down or running - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#72 - def shutdown?; end - - # Is the executor shuttingdown? - # - # @return [Boolean] `true` when not running and not shutdown, else `false` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#67 - def shuttingdown?; end - - # Block until executor shutdown is complete or until `timeout` seconds have - # passed. - # - # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` - # must be called before this method (or on another thread). - # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete - # @return [Boolean] `true` if shutdown complete or false on `timeout` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#91 - def wait_for_termination(timeout = T.unsafe(nil)); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#97 - def ns_initialize(*args); end - - class << self - # Submit a task to the executor for asynchronous processing. - # - # @param task [Proc] the asynchronous task to perform - # @return [self] returns itself - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#34 - def <<(task); end - - # Submit a task to the executor for asynchronous processing. - # - # @param args [Array] zero or more arguments to be passed to the task - # @raise [ArgumentError] if no task is given - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # @yield the asynchronous task to perform - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#24 - def post(*args); end - end -end - -# A thread pool with a single thread an unlimited queue. Should the thread -# die for any reason it will be removed and replaced, thus ensuring that -# the executor will always remain viable and available to process jobs. -# -# A common pattern for background processing is to create a single thread -# on which an infinite loop is run. The thread's loop blocks on an input -# source (perhaps blocking I/O or a queue) and processes each input as it -# is received. This pattern has several issues. The thread itself is highly -# susceptible to errors during processing. Also, the thread itself must be -# constantly monitored and restarted should it die. `SingleThreadExecutor` -# encapsulates all these behaviors. The task processor is highly resilient -# to errors from within tasks. Also, should the thread die it will -# automatically be restarted. -# -# The API and behavior of this class are based on Java's `SingleThreadExecutor`. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb#37 -class Concurrent::SingleThreadExecutor < ::Concurrent::RubySingleThreadExecutor; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb#10 -Concurrent::SingleThreadExecutorImplementation = Concurrent::RubySingleThreadExecutor - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#2 -module Concurrent::Synchronization - class << self - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/full_memory_barrier.rb#7 - def full_memory_barrier; end - end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#9 -class Concurrent::Synchronization::AbstractLockableObject < ::Concurrent::Synchronization::Object - protected - - # Broadcast to all waiting threads. - # - # @note only to be used inside synchronized block - # @note to provide direct access to this method in a descendant add method - # ``` - # def broadcast - # synchronize { ns_broadcast } - # end - # ``` - # @raise [NotImplementedError] - # @return [self] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#96 - def ns_broadcast; end - - # Signal one waiting thread. - # - # @note only to be used inside synchronized block - # @note to provide direct access to this method in a descendant add method - # ``` - # def signal - # synchronize { ns_signal } - # end - # ``` - # @raise [NotImplementedError] - # @return [self] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#81 - def ns_signal; end - - # Wait until another thread calls #signal or #broadcast, - # spurious wake-ups can happen. - # - # @note only to be used inside synchronized block - # @note to provide direct access to this method in a descendant add method - # ``` - # def wait(timeout = nil) - # synchronize { ns_wait(timeout) } - # end - # ``` - # @param timeout [Numeric, nil] in seconds, `nil` means no timeout - # @raise [NotImplementedError] - # @return [self] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#66 - def ns_wait(timeout = T.unsafe(nil)); end - - # Wait until condition is met or timeout passes, - # protects against spurious wake-ups. - # - # @note only to be used inside synchronized block - # @note to provide direct access to this method in a descendant add method - # ``` - # def wait_until(timeout = nil, &condition) - # synchronize { ns_wait_until(timeout, &condition) } - # end - # ``` - # @param timeout [Numeric, nil] in seconds, `nil` means no timeout - # @return [true, false] if condition met - # @yield condition to be met - # @yieldreturn [true, false] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#37 - def ns_wait_until(timeout = T.unsafe(nil), &condition); end - - # @note can by made public in descendants if required by `public :synchronize` - # @raise [NotImplementedError] - # @yield runs the block synchronized against this object, - # equivalent of java's `synchronize(this) {}` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#18 - def synchronize; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#6 -class Concurrent::Synchronization::AbstractObject - # @return [AbstractObject] a new instance of AbstractObject - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#7 - def initialize; end - - # @abstract - # @raise [NotImplementedError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#13 - def full_memory_barrier; end - - class << self - # @raise [NotImplementedError] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#17 - def attr_volatile(*names); end - end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#6 -module Concurrent::Synchronization::AbstractStruct - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#9 - def initialize(*values); end - - # Returns the number of struct members. - # - # @return [Fixnum] the number of struct members - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#19 - def length; end - - # Returns the struct members as an array of symbols. - # - # @return [Array] the struct members as an array of symbols - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#29 - def members; end - - # Returns the number of struct members. - # - # @return [Fixnum] the number of struct members - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#19 - def size; end - - protected - - # Yields the value of each struct member in order. If no block is given - # an enumerator is returned. - # - # @yield the operation to be performed on each struct member - # @yieldparam value [Object] each struct value (in order) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#82 - def ns_each; end - - # Yields the name and value of each struct member in order. If no block is - # given an enumerator is returned. - # - # @yield the operation to be performed on each struct member/value pair - # @yieldparam member [Object] each struct member (in order) - # @yieldparam value [Object] each struct value (in order) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#89 - def ns_each_pair; end - - # Equality - # - # @return [Boolean] true if other has the same struct subclass and has - # equal member values (according to `Object#==`) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#75 - def ns_equality(other); end - - # Attribute Reference - # - # @param member [Symbol, String, Integer] the string or symbol name of the member - # for which to obtain the value or the member's index - # @raise [NameError] if the member does not exist - # @raise [IndexError] if the index is out of range. - # @return [Object] the value of the given struct member or the member at the given index. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#59 - def ns_get(member); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#119 - def ns_initialize_copy; end - - # Describe the contents of this struct in a string. - # - # @return [String] the contents of this struct in a string - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#105 - def ns_inspect; end - - # Returns a new struct containing the contents of `other` and the contents - # of `self`. If no block is specified, the value for entries with duplicate - # keys will be that of `other`. Otherwise the value for each duplicate key - # is determined by calling the block with the key, its value in `self` and - # its value in `other`. - # - # @param other [Hash] the hash from which to set the new values - # @raise [ArgumentError] of given a member that is not defined in the struct - # @return [Synchronization::AbstractStruct] a new struct with the new values - # @yield an options block for resolving duplicate keys - # @yieldparam member [String, Symbol] the name of the member which is duplicated - # @yieldparam selfvalue [Object] the value of the member in `self` - # @yieldparam othervalue [Object] the value of the member in `other` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#114 - def ns_merge(other, &block); end - - # Yields each member value from the struct to the block and returns an Array - # containing the member values from the struct for which the given block - # returns a true value (equivalent to `Enumerable#select`). - # - # @return [Array] an array containing each value for which the block returns true - # @yield the operation to be performed on each struct member - # @yieldparam value [Object] each struct value (in order) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#98 - def ns_select; end - - # Returns a hash containing the names and values for the struct’s members. - # - # @return [Hash] the names and values for the struct’s members - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#52 - def ns_to_h; end - - # Returns the values for this struct as an Array. - # - # @return [Array] the values for this struct - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#38 - def ns_values; end - - # Returns the struct member values for each selector as an Array. - # - # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). - # - # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#45 - def ns_values_at(indexes); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#130 - def pr_underscore(clazz); end - - class << self - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#141 - def define_struct_class(parent, base, name, members, &block); end - end -end - -# TODO (pitr-ch 04-Dec-2016): should be in edge -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#8 -class Concurrent::Synchronization::Condition < ::Concurrent::Synchronization::LockableObject - # @return [Condition] a new instance of Condition - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#18 - def initialize(lock); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#47 - def broadcast; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#51 - def ns_broadcast; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#43 - def ns_signal; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#27 - def ns_wait(timeout = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#35 - def ns_wait_until(timeout = T.unsafe(nil), &condition); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#39 - def signal; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#23 - def wait(timeout = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#31 - def wait_until(timeout = T.unsafe(nil), &condition); end - - class << self - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 - def private_new(*args, &block); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 - def new(*args, &block); end - end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#8 -module Concurrent::Synchronization::ConditionSignalling - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#16 - def ns_broadcast; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#11 - def ns_signal; end -end - -# TODO (pitr-ch 04-Dec-2016): should be in edge -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#8 -class Concurrent::Synchronization::Lock < ::Concurrent::Synchronization::LockableObject - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#31 - def broadcast; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#16 - def ns_broadcast; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#11 - def ns_signal; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#52 - def ns_wait(timeout = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#37 - def ns_wait_until(timeout = T.unsafe(nil), &condition); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#25 - def signal; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#44 - def synchronize; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#13 - def wait(timeout = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#19 - def wait_until(timeout = T.unsafe(nil), &condition); end -end - -# Safe synchronization under any Ruby implementation. -# It provides methods like {#synchronize}, {#wait}, {#signal} and {#broadcast}. -# Provides a single layer which can improve its implementation over time without changes needed to -# the classes using it. Use {Synchronization::Object} not this abstract class. -# -# @note this object does not support usage together with -# [`Thread#wakeup`](http://ruby-doc.org/core/Thread.html#method-i-wakeup) -# and [`Thread#raise`](http://ruby-doc.org/core/Thread.html#method-i-raise). -# `Thread#sleep` and `Thread#wakeup` will work as expected but mixing `Synchronization::Object#wait` and -# `Thread#wakeup` will not work on all platforms. -# -# @see Event implementation as an example of this class use -# -# @example simple -# class AnClass < Synchronization::Object -# def initialize -# super -# synchronize { @value = 'asd' } -# end -# -# def value -# synchronize { @value } -# end -# end -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb#50 -class Concurrent::Synchronization::LockableObject < ::Concurrent::Synchronization::MutexLockableObject - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#57 - def new_condition; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb#11 -Concurrent::Synchronization::LockableObjectImplementation = Concurrent::Synchronization::MutexLockableObject - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#60 -class Concurrent::Synchronization::MonitorLockableObject < ::Concurrent::Synchronization::AbstractLockableObject - include ::Concurrent::Synchronization::ConditionSignalling - extend ::Concurrent::Synchronization::SafeInitialization - - # @return [MonitorLockableObject] a new instance of MonitorLockableObject - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#65 - def initialize; end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#83 - def ns_wait(timeout = T.unsafe(nil)); end - - # TODO may be a problem with lock.synchronize { lock.wait } - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#79 - def synchronize; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#71 - def initialize_copy(other); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#25 -class Concurrent::Synchronization::MutexLockableObject < ::Concurrent::Synchronization::AbstractLockableObject - include ::Concurrent::Synchronization::ConditionSignalling - extend ::Concurrent::Synchronization::SafeInitialization - - # @return [MutexLockableObject] a new instance of MutexLockableObject - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#30 - def initialize; end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#52 - def ns_wait(timeout = T.unsafe(nil)); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#44 - def synchronize; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#36 - def initialize_copy(other); end -end - -# Abstract object providing final, volatile, ans CAS extensions to build other concurrent abstractions. -# - final instance variables see {Object.safe_initialization!} -# - volatile instance variables see {Object.attr_volatile} -# - volatile instance variables see {Object.attr_atomic} -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#15 -class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::AbstractObject - include ::Concurrent::Synchronization::Volatile - extend ::Concurrent::Synchronization::Volatile::ClassMethods - - # Has to be called by children. - # - # @return [Object] a new instance of Object - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#28 - def initialize; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#146 - def __initialize_atomic_fields__; end - - class << self - # @return [true, false] is the attribute with name atomic? - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#125 - def atomic_attribute?(name); end - - # @param inherited [true, false] should inherited volatile with CAS fields be returned? - # @return [::Array] Returns defined volatile with CAS fields on this class. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#119 - def atomic_attributes(inherited = T.unsafe(nil)); end - - # Creates methods for reading and writing to a instance variable with - # volatile (Java) semantic as {.attr_volatile} does. - # The instance variable should be accessed only through generated methods. - # This method generates following methods: `value`, `value=(new_value) #=> new_value`, - # `swap_value(new_value) #=> old_value`, - # `compare_and_set_value(expected, value) #=> true || false`, `update_value(&block)`. - # - # @param names [::Array] of the instance variables to be volatile with CAS. - # @return [::Array] names of defined method names. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#84 - def attr_atomic(*names); end - - # For testing purposes, quite slow. Injects assert code to new method which will raise if class instance contains - # any instance variables with CamelCase names and isn't {.safe_initialization?}. - # - # @raise when offend found - # @return [true] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#45 - def ensure_safe_initialization_when_final_fields_are_present; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#33 - def safe_initialization!; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#37 - def safe_initialization?; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#131 - def define_initialize_atomic_fields; end - end -end - -# By extending this module, a class and all its children are marked to be constructed safely. Meaning that -# all writes (ivar initializations) are made visible to all readers of newly constructed object. It ensures -# same behaviour as Java's final fields. -# -# Due to using Kernel#extend, the module is not included again if already present in the ancestors, -# which avoids extra overhead. -# -# @example -# class AClass < Concurrent::Synchronization::Object -# extend Concurrent::Synchronization::SafeInitialization -# -# def initialize -# @AFinalValue = 'value' # published safely, #foo will never return nil -# end -# -# def foo -# @AFinalValue -# end -# end -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#28 -module Concurrent::Synchronization::SafeInitialization - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 - def new(*args, &block); end -end - -# Volatile adds the attr_volatile class method when included. -# -# foo = Foo.new -# foo.bar -# => 1 -# foo.bar = 2 -# => 2 -# -# @example -# class Foo -# include Concurrent::Synchronization::Volatile -# -# attr_volatile :bar -# -# def initialize -# self.bar = 1 -# end -# end -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#28 -module Concurrent::Synchronization::Volatile - mixes_in_class_methods ::Concurrent::Synchronization::Volatile::ClassMethods - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#33 - def full_memory_barrier; end - - class << self - # @private - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#29 - def included(base); end - end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#37 -module Concurrent::Synchronization::Volatile::ClassMethods - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#39 - def attr_volatile(*names); end -end - -# This class provides a trivial way to synchronize all calls to a given object -# by wrapping it with a `Delegator` that performs `Monitor#enter/exit` calls -# around the delegated `#send`. Example: -# -# array = [] # not thread-safe on many impls -# array = SynchronizedDelegator.new([]) # thread-safe -# -# A simple `Monitor` provides a very coarse-grained way to synchronize a given -# object, in that it will cause synchronization for methods that have no need -# for it, but this is a trivial way to get thread-safety where none may exist -# currently on some implementations. -# -# This class is currently being considered for inclusion into stdlib, via -# https://bugs.ruby-lang.org/issues/8556 -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#21 -class Concurrent::SynchronizedDelegator < ::SimpleDelegator - # @return [SynchronizedDelegator] a new instance of SynchronizedDelegator - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#31 - def initialize(obj); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#36 - def method_missing(method, *args, &block); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#22 - def setup; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#27 - def teardown; end -end - -# A `TVar` is a transactional variable - a single-element container that -# is used as part of a transaction - see `Concurrent::atomically`. -# -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. -# {include:file:docs-source/tvar.md} -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#12 -class Concurrent::TVar < ::Concurrent::Synchronization::Object - extend ::Concurrent::Synchronization::SafeInitialization - - # Create a new `TVar` with an initial value. - # - # @return [TVar] a new instance of TVar - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#16 - def initialize(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#46 - def unsafe_lock; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#36 - def unsafe_value; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#41 - def unsafe_value=(value); end - - # Get the value of a `TVar`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#22 - def value; end - - # Set the value of a `TVar`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#29 - def value=(value); end -end - -# A `ThreadLocalVar` is a variable where the value is different for each thread. -# Each variable may have a default value, but when you modify the variable only -# the current thread will ever see that change. -# -# This is similar to Ruby's built-in thread-local variables (`Thread#thread_variable_get`), -# but with these major advantages: -# * `ThreadLocalVar` has its own identity, it doesn't need a Symbol. -# * Each Ruby's built-in thread-local variable leaks some memory forever (it's a Symbol held forever on the thread), -# so it's only OK to create a small amount of them. -# `ThreadLocalVar` has no such issue and it is fine to create many of them. -# * Ruby's built-in thread-local variables leak forever the value set on each thread (unless set to nil explicitly). -# `ThreadLocalVar` automatically removes the mapping for each thread once the `ThreadLocalVar` instance is GC'd. -# -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. -# -# @example -# v = ThreadLocalVar.new(14) -# v.value #=> 14 -# v.value = 2 -# v.value #=> 2 -# @example -# v = ThreadLocalVar.new(14) -# -# t1 = Thread.new do -# v.value #=> 14 -# v.value = 1 -# v.value #=> 1 -# end -# -# t2 = Thread.new do -# v.value #=> 14 -# v.value = 2 -# v.value #=> 2 -# end -# -# v.value #=> 14 -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#43 -class Concurrent::ThreadLocalVar - # Creates a thread local variable. - # - # @param default [Object] the default value when otherwise unset - # @param default_block [Proc] Optional block that gets called to obtain the - # default value for each thread - # @return [ThreadLocalVar] a new instance of ThreadLocalVar - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#51 - def initialize(default = T.unsafe(nil), &default_block); end - - # Bind the given value to thread local storage during - # execution of the given block. - # - # @param value [Object] the value to bind - # @return [Object] the value - # @yield the operation to be performed with the bound variable - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#88 - def bind(value); end - - # Returns the value in the current thread's copy of this thread-local variable. - # - # @return [Object] the current value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#70 - def value; end - - # Sets the current thread's copy of this thread-local variable to the specified value. - # - # @param value [Object] the value to set - # @return [Object] the new value - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#78 - def value=(value); end - - protected - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#103 - def default; end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#44 -Concurrent::ThreadLocalVar::LOCALS = T.let(T.unsafe(nil), Concurrent::ThreadLocals) - -# An array-backed storage of indexed variables per thread. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#141 -class Concurrent::ThreadLocals < ::Concurrent::AbstractLocals - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#142 - def locals; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#146 - def locals!; end -end - -# An abstraction composed of one or more threads and a task queue. Tasks -# (blocks or `proc` objects) are submitted to the pool and added to the queue. -# The threads in the pool remove the tasks and execute them in the order -# they were received. -# -# A `ThreadPoolExecutor` will automatically adjust the pool size according -# to the bounds set by `min-threads` and `max-threads`. When a new task is -# submitted and fewer than `min-threads` threads are running, a new thread -# is created to handle the request, even if other worker threads are idle. -# If there are more than `min-threads` but less than `max-threads` threads -# running, a new thread will be created only if the queue is full. -# -# Threads that are idle for too long will be garbage collected, down to the -# configured minimum options. Should a thread crash it, too, will be garbage collected. -# -# `ThreadPoolExecutor` is based on the Java class of the same name. From -# the official Java documentation; -# -# > Thread pools address two different problems: they usually provide -# > improved performance when executing large numbers of asynchronous tasks, -# > due to reduced per-task invocation overhead, and they provide a means -# > of bounding and managing the resources, including threads, consumed -# > when executing a collection of tasks. Each ThreadPoolExecutor also -# > maintains some basic statistics, such as the number of completed tasks. -# > -# > To be useful across a wide range of contexts, this class provides many -# > adjustable parameters and extensibility hooks. However, programmers are -# > urged to use the more convenient Executors factory methods -# > [CachedThreadPool] (unbounded thread pool, with automatic thread reclamation), -# > [FixedThreadPool] (fixed size thread pool) and [SingleThreadExecutor] (single -# > background thread), that preconfigure settings for the most common usage -# > scenarios. -# -# **Thread Pool Options** -# -# Thread pools support several configuration options: -# -# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. -# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and -# a `-worker-` name is given to its threads if supported by used Ruby -# implementation. `` is uniq for each thread. -# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at -# any one time. When the queue size reaches `max_queue` and no new threads can be created, -# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. -# * `auto_terminate`: When true (default), the threads started will be marked as daemon. -# * `fallback_policy`: The policy defining how rejected tasks are handled. -# -# Three fallback policies are supported: -# -# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. -# * `:discard`: Discard the task and return false. -# * `:caller_runs`: Execute the task on the calling thread. -# -# **Shutting Down Thread Pools** -# -# Killing a thread pool while tasks are still being processed, either by calling -# the `#kill` method or at application exit, will have unpredictable results. There -# is no way for the thread pool to know what resources are being used by the -# in-progress tasks. When those tasks are killed the impact on those resources -# cannot be predicted. The *best* practice is to explicitly shutdown all thread -# pools using the provided methods: -# -# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks -# * Call `#wait_for_termination` with an appropriate timeout interval an allow -# the orderly shutdown to complete -# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time -# -# On some runtime platforms (most notably the JVM) the application will not -# exit until all thread pools have been shutdown. To prevent applications from -# "hanging" on exit, all threads can be marked as daemon according to the -# `:auto_terminate` option. -# -# ```ruby -# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon -# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon -# ``` -# -# @note Failure to properly shutdown a thread pool can lead to unpredictable results. -# Please read *Shutting Down Thread Pools* for more information. -# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools -# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class -# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface -# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb#56 -class Concurrent::ThreadPoolExecutor < ::Concurrent::RubyThreadPoolExecutor; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb#10 -Concurrent::ThreadPoolExecutorImplementation = Concurrent::RubyThreadPoolExecutor - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#4 -module Concurrent::ThreadSafe; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#7 -module Concurrent::ThreadSafe::Util - class << self - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#16 - def make_synchronized_on_cruby(klass); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#41 - def make_synchronized_on_truffleruby(klass); end - end -end - -# TODO (pitr-ch 15-Oct-2016): migrate to Utility::ProcessorCounter -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#13 -Concurrent::ThreadSafe::Util::CPU_COUNT = T.let(T.unsafe(nil), Integer) - -# TODO (pitr-ch 15-Oct-2016): migrate to Utility::NativeInteger -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#10 -Concurrent::ThreadSafe::Util::FIXNUM_BIT_SIZE = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#11 -Concurrent::ThreadSafe::Util::MAX_INT = T.let(T.unsafe(nil), Integer) - -# Raised when an operation times out. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#55 -class Concurrent::TimeoutError < ::Concurrent::Error; end - -# Executes a collection of tasks, each after a given delay. A master task -# monitors the set and schedules each task for execution at the appropriate -# time. Tasks are run on the global thread pool or on the supplied executor. -# Each task is represented as a `ScheduledTask`. -# -# @see Concurrent::ScheduledTask -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#19 -class Concurrent::TimerSet < ::Concurrent::RubyExecutorService - # Create a new set of timed tasks. - # - # @option opts - # @param opts [Hash] the options used to specify the executor on which to perform actions - # @return [TimerSet] a new instance of TimerSet - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#30 - def initialize(opts = T.unsafe(nil)); end - - # Begin an immediate shutdown. In-progress tasks will be allowed to - # complete but enqueued tasks will be dismissed and no new tasks - # will be accepted. Has no additional effect if the thread pool is - # not running. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#62 - def kill; end - - # Post a task to be execute run after a given delay (in seconds). If the - # delay is less than 1/100th of a second the task will be immediately post - # to the executor. - # - # @param delay [Float] the number of seconds to wait for before executing the task. - # @param args [Array] the arguments passed to the task on execution. - # @raise [ArgumentError] if the intended execution time is not in the future. - # @raise [ArgumentError] if no block is given. - # @return [Concurrent::ScheduledTask, false] IVar representing the task if the post - # is successful; false after shutdown. - # @yield the task to be performed. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#48 - def post(delay, *args, &task); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#166 - def <<(task); end - - # Initialize the object. - # - # @param opts [Hash] the options to create the object with. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#74 - def ns_initialize(opts); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#94 - def ns_post_task(task); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#129 - def ns_reset_if_forked; end - - # `ExecutorService` callback called during shutdown. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#122 - def ns_shutdown_execution; end - - # Post the task to the internal queue. - # - # @note This is intended as a callback method from ScheduledTask - # only. It is not intended to be used directly. Post a task - # by using the `SchedulesTask#execute` method. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#89 - def post_task(task); end - - # Run a loop and execute tasks in the scheduled order and at the approximate - # scheduled time. If no tasks remain the thread will exit gracefully so that - # garbage collection can occur. If there are no ready tasks it will sleep - # for up to 60 seconds waiting for the next scheduled task. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#143 - def process_tasks; end - - # Remove the given task from the queue. - # - # @note This is intended as a callback method from `ScheduledTask` - # only. It is not intended to be used directly. Cancel a task - # by using the `ScheduledTask#cancel` method. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#115 - def remove_task(task); end -end - -# A very common concurrency pattern is to run a thread that performs a task at -# regular intervals. The thread that performs the task sleeps for the given -# interval then wakes up and performs the task. Lather, rinse, repeat... This -# pattern causes two problems. First, it is difficult to test the business -# logic of the task because the task itself is tightly coupled with the -# concurrency logic. Second, an exception raised while performing the task can -# cause the entire thread to abend. In a long-running application where the -# task thread is intended to run for days/weeks/years a crashed task thread -# can pose a significant problem. `TimerTask` alleviates both problems. -# -# When a `TimerTask` is launched it starts a thread for monitoring the -# execution interval. The `TimerTask` thread does not perform the task, -# however. Instead, the TimerTask launches the task on a separate thread. -# Should the task experience an unrecoverable crash only the task thread will -# crash. This makes the `TimerTask` very fault tolerant. Additionally, the -# `TimerTask` thread can respond to the success or failure of the task, -# performing logging or ancillary operations. -# -# One other advantage of `TimerTask` is that it forces the business logic to -# be completely decoupled from the concurrency logic. The business logic can -# be tested separately then passed to the `TimerTask` for scheduling and -# running. -# -# A `TimerTask` supports two different types of interval calculations. -# A fixed delay will always wait the same amount of time between the -# completion of one task and the start of the next. A fixed rate will -# attempt to maintain a constant rate of execution regardless of the -# duration of the task. For example, if a fixed rate task is scheduled -# to run every 60 seconds but the task itself takes 10 seconds to -# complete, the next task will be scheduled to run 50 seconds after -# the start of the previous task. If the task takes 70 seconds to -# complete, the next task will be start immediately after the previous -# task completes. Tasks will not be executed concurrently. -# -# In some cases it may be necessary for a `TimerTask` to affect its own -# execution cycle. To facilitate this, a reference to the TimerTask instance -# is passed as an argument to the provided block every time the task is -# executed. -# -# The `TimerTask` class includes the `Dereferenceable` mixin module so the -# result of the last execution is always available via the `#value` method. -# Dereferencing options can be passed to the `TimerTask` during construction or -# at any later time using the `#set_deref_options` method. -# -# `TimerTask` supports notification through the Ruby standard library -# {http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html -# Observable} module. On execution the `TimerTask` will notify the observers -# with three arguments: time of execution, the result of the block (or nil on -# failure), and any raised exceptions (or nil on success). -# -# @example Basic usage -# task = Concurrent::TimerTask.new{ puts 'Boom!' } -# task.execute -# -# task.execution_interval #=> 60 (default) -# -# # wait 60 seconds... -# #=> 'Boom!' -# -# task.shutdown #=> true -# @example Configuring `:execution_interval` -# task = Concurrent::TimerTask.new(execution_interval: 5) do -# puts 'Boom!' -# end -# -# task.execution_interval #=> 5 -# @example Immediate execution with `:run_now` -# task = Concurrent::TimerTask.new(run_now: true){ puts 'Boom!' } -# task.execute -# -# #=> 'Boom!' -# @example Configuring `:interval_type` with either :fixed_delay or :fixed_rate, default is :fixed_delay -# task = Concurrent::TimerTask.new(execution_interval: 5, interval_type: :fixed_rate) do -# puts 'Boom!' -# end -# task.interval_type #=> :fixed_rate -# @example Last `#value` and `Dereferenceable` mixin -# task = Concurrent::TimerTask.new( -# dup_on_deref: true, -# execution_interval: 5 -# ){ Time.now } -# -# task.execute -# Time.now #=> 2013-11-07 18:06:50 -0500 -# sleep(10) -# task.value #=> 2013-11-07 18:06:55 -0500 -# @example Controlling execution from within the block -# timer_task = Concurrent::TimerTask.new(execution_interval: 1) do |task| -# task.execution_interval.to_i.times{ print 'Boom! ' } -# print "\n" -# task.execution_interval += 1 -# if task.execution_interval > 5 -# puts 'Stopping...' -# task.shutdown -# end -# end -# -# timer_task.execute -# #=> Boom! -# #=> Boom! Boom! -# #=> Boom! Boom! Boom! -# #=> Boom! Boom! Boom! Boom! -# #=> Boom! Boom! Boom! Boom! Boom! -# #=> Stopping... -# @example Observation -# class TaskObserver -# def update(time, result, ex) -# if result -# print "(#{time}) Execution successfully returned #{result}\n" -# else -# print "(#{time}) Execution failed with error #{ex}\n" -# end -# end -# end -# -# task = Concurrent::TimerTask.new(execution_interval: 1){ 42 } -# task.add_observer(TaskObserver.new) -# task.execute -# sleep 4 -# -# #=> (2013-10-13 19:08:58 -0400) Execution successfully returned 42 -# #=> (2013-10-13 19:08:59 -0400) Execution successfully returned 42 -# #=> (2013-10-13 19:09:00 -0400) Execution successfully returned 42 -# task.shutdown -# -# task = Concurrent::TimerTask.new(execution_interval: 1){ sleep } -# task.add_observer(TaskObserver.new) -# task.execute -# -# #=> (2013-10-13 19:07:25 -0400) Execution timed out -# #=> (2013-10-13 19:07:27 -0400) Execution timed out -# #=> (2013-10-13 19:07:29 -0400) Execution timed out -# task.shutdown -# -# task = Concurrent::TimerTask.new(execution_interval: 1){ raise StandardError } -# task.add_observer(TaskObserver.new) -# task.execute -# -# #=> (2013-10-13 19:09:37 -0400) Execution failed with error StandardError -# #=> (2013-10-13 19:09:38 -0400) Execution failed with error StandardError -# #=> (2013-10-13 19:09:39 -0400) Execution failed with error StandardError -# task.shutdown -# @see http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html -# @see http://docs.oracle.com/javase/7/docs/api/java/util/TimerTask.html -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#165 -class Concurrent::TimerTask < ::Concurrent::RubyExecutorService - include ::Concurrent::Concern::Dereferenceable - include ::Concurrent::Concern::Observable - - # Create a new TimerTask with the given task and configuration. - # - # @option opts - # @option opts - # @option opts - # @param opts [Hash] the options defining task execution. - # @raise ArgumentError when no block is given. - # @return [TimerTask] the new `TimerTask` - # @yield to the block after :execution_interval seconds have passed since - # the last yield - # @yieldparam task a reference to the `TimerTask` instance so that the - # block can control its own lifecycle. Necessary since `self` will - # refer to the execution context of the block rather than the running - # `TimerTask`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#209 - def initialize(opts = T.unsafe(nil), &task); end - - # Execute a previously created `TimerTask`. - # - # @example Instance and execute in separate steps - # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" } - # task.running? #=> false - # task.execute - # task.running? #=> true - # @example Instance and execute in one line - # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" }.execute - # task.running? #=> true - # @return [TimerTask] a reference to `self` - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#235 - def execute; end - - # @return [Fixnum] Number of seconds after the task completes before the - # task is performed again. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#259 - def execution_interval; end - - # @return [Fixnum] Number of seconds after the task completes before the - # task is performed again. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#266 - def execution_interval=(value); end - - # @return [Symbol] method to calculate the interval between executions - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#276 - def interval_type; end - - # Is the executor running? - # - # @return [Boolean] `true` when running, `false` when shutting down or shutdown - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#218 - def running?; end - - # @return [Fixnum] Number of seconds the task can run before it is - # considered to have failed. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#281 - def timeout_interval; end - - # @return [Fixnum] Number of seconds the task can run before it is - # considered to have failed. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#288 - def timeout_interval=(value); end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#166 - def <<(task); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#352 - def calculate_next_interval(start_time); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#336 - def execute_task(completion); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#296 - def ns_initialize(opts, &task); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#324 - def ns_kill_execution; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#318 - def ns_shutdown_execution; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#17 - def post(*args, &task); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#330 - def schedule_next_task(interval = T.unsafe(nil)); end - - class << self - # Create and execute a new `TimerTask`. - # - # @example - # task = Concurrent::TimerTask.execute(execution_interval: 10){ print "Hello World\n" } - # task.running? #=> true - # @option opts - # @option opts - # @option opts - # @param opts [Hash] the options defining task execution. - # @raise ArgumentError when no block is given. - # @return [TimerTask] the new `TimerTask` - # @yield to the block after :execution_interval seconds have passed since - # the last yield - # @yieldparam task a reference to the `TimerTask` instance so that the - # block can control its own lifecycle. Necessary since `self` will - # refer to the execution context of the block rather than the running - # `TimerTask`. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#252 - def execute(opts = T.unsafe(nil), &task); end - end -end - -# Default `:interval_type` -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#181 -Concurrent::TimerTask::DEFAULT_INTERVAL_TYPE = T.let(T.unsafe(nil), Symbol) - -# Default `:execution_interval` in seconds. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#170 -Concurrent::TimerTask::EXECUTION_INTERVAL = T.let(T.unsafe(nil), Integer) - -# Maintain the interval between the end of one execution and the start of the next execution. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#173 -Concurrent::TimerTask::FIXED_DELAY = T.let(T.unsafe(nil), Symbol) - -# Maintain the interval between the start of one execution and the start of the next. -# If execution time exceeds the interval, the next execution will start immediately -# after the previous execution finishes. Executions will not run concurrently. -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#178 -Concurrent::TimerTask::FIXED_RATE = T.let(T.unsafe(nil), Symbol) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#153 -class Concurrent::Transaction - # @return [Transaction] a new instance of Transaction - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#162 - def initialize; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#192 - def abort; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#196 - def commit; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#177 - def open(tvar); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#166 - def read(tvar); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#206 - def unlock; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#171 - def write(tvar, value); end - - class << self - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#212 - def current; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#216 - def current=(transaction); end - end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#155 -Concurrent::Transaction::ABORTED = T.let(T.unsafe(nil), Object) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#159 -class Concurrent::Transaction::AbortError < ::StandardError; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#160 -class Concurrent::Transaction::LeaveError < ::StandardError; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#157 -class Concurrent::Transaction::OpenEntry < ::Struct - # Returns the value of attribute modified - # - # @return [Object] the current value of modified - def modified; end - - # Sets the attribute modified - # - # @param value [Object] the value to set the attribute modified to. - # @return [Object] the newly set value - def modified=(_); end - - # Returns the value of attribute value - # - # @return [Object] the current value of value - def value; end - - # Sets the attribute value - # - # @param value [Object] the value to set the attribute value to. - # @return [Object] the newly set value - def value=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# A fixed size array with volatile (synchronized, thread safe) getters/setters. -# Mixes in Ruby's `Enumerable` module for enhanced search, sort, and traversal. -# -# @example -# tuple = Concurrent::Tuple.new(16) -# -# tuple.set(0, :foo) #=> :foo | volatile write -# tuple.get(0) #=> :foo | volatile read -# tuple.compare_and_set(0, :foo, :bar) #=> true | strong CAS -# tuple.cas(0, :foo, :baz) #=> false | strong CAS -# tuple.get(0) #=> :bar | volatile read -# @see https://en.wikipedia.org/wiki/Tuple Tuple entry at Wikipedia -# @see http://www.erlang.org/doc/reference_manual/data_types.html#id70396 Erlang Tuple -# @see http://ruby-doc.org/core-2.2.2/Enumerable.html Enumerable -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#20 -class Concurrent::Tuple - include ::Enumerable - - # Create a new tuple of the given size. - # - # @param size [Integer] the number of elements in the tuple - # @return [Tuple] a new instance of Tuple - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#29 - def initialize(size); end - - # Set the value at the given index to the new value if and only if the current - # value matches the given old value. - # - # @param i [Integer] the index for the element to set - # @param old_value [Object] the value to compare against the current value - # @param new_value [Object] the value to set at the given index - # @return [Boolean] true if the value at the given element was set else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#69 - def cas(i, old_value, new_value); end - - # Set the value at the given index to the new value if and only if the current - # value matches the given old value. - # - # @param i [Integer] the index for the element to set - # @param old_value [Object] the value to compare against the current value - # @param new_value [Object] the value to set at the given index - # @return [Boolean] true if the value at the given element was set else false - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#69 - def compare_and_set(i, old_value, new_value); end - - # Calls the given block once for each element in self, passing that element as a parameter. - # - # @yieldparam ref [Object] the `Concurrent::AtomicReference` object at the current index - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#78 - def each; end - - # Get the value of the element at the given index. - # - # @param i [Integer] the index from which to retrieve the value - # @return [Object] the value at the given index or nil if the index is out of bounds - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#43 - def get(i); end - - # Set the element at the given index to the given value - # - # @param i [Integer] the index for the element to set - # @param value [Object] the value to set at the given index - # @return [Object] the new value of the element at the given index or nil if the index is out of bounds - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#55 - def set(i, value); end - - # The (fixed) size of the tuple. - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#24 - def size; end - - # Get the value of the element at the given index. - # - # @param i [Integer] the index from which to retrieve the value - # @return [Object] the value at the given index or nil if the index is out of bounds - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#43 - def volatile_get(i); end - - # Set the element at the given index to the given value - # - # @param i [Integer] the index for the element to set - # @param value [Object] the value to set at the given index - # @return [Object] the new value of the element at the given index or nil if the index is out of bounds - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#55 - def volatile_set(i, value); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#3 -module Concurrent::Utility; end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#6 -module Concurrent::Utility::EngineDetector - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#7 - def on_cruby?; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#11 - def on_jruby?; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#27 - def on_linux?; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#23 - def on_osx?; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#15 - def on_truffleruby?; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#19 - def on_windows?; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#31 - def ruby_version(version = T.unsafe(nil), comparison, major, minor, patch); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#9 -module Concurrent::Utility::NativeExtensionLoader - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#11 - def allow_c_extensions?; end - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#15 - def c_extensions_loaded?; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#19 - def load_native_extensions; end - - private - - # @return [Boolean] - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#50 - def java_extensions_loaded?; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#38 - def load_error_path(error); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#46 - def set_c_extensions_loaded; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#54 - def set_java_extensions_loaded; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#58 - def try_load_c_extension(path); end -end - -# @private -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#5 -module Concurrent::Utility::NativeInteger - extend ::Concurrent::Utility::NativeInteger - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#24 - def ensure_integer(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#31 - def ensure_integer_and_bounds(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#17 - def ensure_lower_bound(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#37 - def ensure_positive(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#44 - def ensure_positive_and_no_zero(value); end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#10 - def ensure_upper_bound(value); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#8 -Concurrent::Utility::NativeInteger::MAX_VALUE = T.let(T.unsafe(nil), Integer) - -# http://stackoverflow.com/questions/535721/ruby-max-integer -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#7 -Concurrent::Utility::NativeInteger::MIN_VALUE = T.let(T.unsafe(nil), Integer) - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#10 -class Concurrent::Utility::ProcessorCounter - # @return [ProcessorCounter] a new instance of ProcessorCounter - # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#11 - def initialize; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#26 - def available_processor_count; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#41 - def cpu_quota; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#45 - def cpu_shares; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#22 - def physical_processor_count; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#18 - def processor_count; end - - private - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#104 - def compute_cpu_quota; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#124 - def compute_cpu_shares; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#59 - def compute_physical_processor_count; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#51 - def compute_processor_count; end - - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#99 - def run(command); end -end - -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/version.rb#2 -Concurrent::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/concurrent-ruby@1.3.6.rbi b/sorbet/rbi/gems/concurrent-ruby@1.3.6.rbi new file mode 100644 index 000000000..83e50bb03 --- /dev/null +++ b/sorbet/rbi/gems/concurrent-ruby@1.3.6.rbi @@ -0,0 +1,10637 @@ +# 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`. + + +# {include:file:README.md} +# load native parts first +# load native parts first +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/constants.rb:1 +module Concurrent + extend ::Concurrent::Utility::EngineDetector + extend ::Concurrent::Utility::NativeExtensionLoader + extend ::Concurrent::Concern::Logging + extend ::Concurrent::Concern::Deprecation + + private + + # Abort a currently running transaction - see `Concurrent::atomically`. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:139 + def abort_transaction; end + + # Run a block that reads and writes `TVar`s as a single atomic transaction. + # With respect to the value of `TVar` objects, the transaction is atomic, in + # that it either happens or it does not, consistent, in that the `TVar` + # objects involved will never enter an illegal state, and isolated, in that + # transactions never interfere with each other. You may recognise these + # properties from database transactions. + # + # There are some very important and unusual semantics that you must be aware of: + # + # * Most importantly, the block that you pass to atomically may be executed + # more than once. In most cases your code should be free of + # side-effects, except for via TVar. + # + # * If an exception escapes an atomically block it will abort the transaction. + # + # * It is undefined behaviour to use callcc or Fiber with atomically. + # + # * If you create a new thread within an atomically, it will not be part of + # the transaction. Creating a thread counts as a side-effect. + # + # Transactions within transactions are flattened to a single transaction. + # + # @example + # a = new TVar(100_000) + # b = new TVar(100) + # + # Concurrent::atomically do + # a.value -= 10 + # b.value += 10 + # end + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:82 + def atomically; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:56 + def call_dataflow(method, executor, *inputs, &block); end + + # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. + # {include:file:docs-source/dataflow.md} + # + # @param [Future] inputs zero or more `Future` operations that this dataflow depends upon + # + # @yield The operation to perform once all the dependencies are met + # @yieldparam [Future] inputs each of the `Future` inputs to the dataflow + # @yieldreturn [Object] the result of the block operation + # + # @return [Object] the result of all the operations + # + # @raise [ArgumentError] if no block is given + # @raise [ArgumentError] if any of the inputs are not `IVar`s + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:34 + def dataflow(*inputs, &block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:44 + def dataflow!(*inputs, &block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:39 + def dataflow_with(executor, *inputs, &block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:49 + def dataflow_with!(executor, *inputs, &block); end + + # Leave a transaction without committing or aborting - see `Concurrent::atomically`. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:144 + def leave_transaction; end + + # @!macro monotonic_get_time + # + # Returns the current time as tracked by the application monotonic clock. + # + # @param [Symbol] unit the time unit to be returned, can be either + # :float_second, :float_millisecond, :float_microsecond, :second, + # :millisecond, :microsecond, or :nanosecond default to :float_second. + # + # @return [Float] The current monotonic time since some unspecified + # starting point + # + # @!macro monotonic_clock_warning + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/monotonic_time.rb:15 + def monotonic_time(unit = T.unsafe(nil)); end + + class << self + # Abort a currently running transaction - see `Concurrent::atomically`. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:148 + def abort_transaction; end + + # Run a block that reads and writes `TVar`s as a single atomic transaction. + # With respect to the value of `TVar` objects, the transaction is atomic, in + # that it either happens or it does not, consistent, in that the `TVar` + # objects involved will never enter an illegal state, and isolated, in that + # transactions never interfere with each other. You may recognise these + # properties from database transactions. + # + # There are some very important and unusual semantics that you must be aware of: + # + # * Most importantly, the block that you pass to atomically may be executed + # more than once. In most cases your code should be free of + # side-effects, except for via TVar. + # + # * If an exception escapes an atomically block it will abort the transaction. + # + # * It is undefined behaviour to use callcc or Fiber with atomically. + # + # * If you create a new thread within an atomically, it will not be part of + # the transaction. Creating a thread counts as a side-effect. + # + # Transactions within transactions are flattened to a single transaction. + # + # @example + # a = new TVar(100_000) + # b = new TVar(100) + # + # Concurrent::atomically do + # a.value -= 10 + # b.value += 10 + # end + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:148 + def atomically; end + + # Number of processors cores available for process scheduling. + # This method takes in account the CPU quota if the process is inside a cgroup with a + # dedicated CPU quota (typically Docker). + # Otherwise it returns the same value as #processor_count but as a Float. + # + # For performance reasons the calculated value will be memoized on the first + # call. + # + # @return [Float] number of available processors + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:194 + def available_processor_count; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:80 + def call_dataflow(method, executor, *inputs, &block); end + + # The maximum number of processors cores available for process scheduling. + # Returns `nil` if there is no enforced limit, or a `Float` if the + # process is inside a cgroup with a dedicated CPU quota (typically Docker). + # + # Note that nothing prevents setting a CPU quota higher than the actual number of + # cores on the system. + # + # For performance reasons the calculated value will be memoized on the first + # call. + # + # @return [nil, Float] Maximum number of available processors as set by a cgroup CPU quota, or nil if none set + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:209 + def cpu_quota; end + + # The CPU shares requested by the process. For performance reasons the calculated + # value will be memoized on the first call. + # + # @return [Float, nil] CPU shares requested by the process, or nil if not set + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:217 + def cpu_shares; end + + # Create a simple logger with provided level and output. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:38 + def create_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # Create a stdlib logger with provided level and output. + # If you use this deprecated method you might need to add logger to your Gemfile to avoid warnings from Ruby 3.3.5+. + # @deprecated + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:73 + def create_stdlib_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. + # {include:file:docs-source/dataflow.md} + # + # @param [Future] inputs zero or more `Future` operations that this dataflow depends upon + # + # @yield The operation to perform once all the dependencies are met + # @yieldparam [Future] inputs each of the `Future` inputs to the dataflow + # @yieldreturn [Object] the result of the block operation + # + # @return [Object] the result of all the operations + # + # @raise [ArgumentError] if no block is given + # @raise [ArgumentError] if any of the inputs are not `IVar`s + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:37 + def dataflow(*inputs, &block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:47 + def dataflow!(*inputs, &block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:42 + def dataflow_with(executor, *inputs, &block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:52 + def dataflow_with!(executor, *inputs, &block); end + + # Disables AtExit handlers including pool auto-termination handlers. + # When disabled it will be the application programmer's responsibility + # to ensure that the handlers are shutdown properly prior to application + # exit by calling `AtExit.run` method. + # + # @note this option should be needed only because of `at_exit` ordering + # issues which may arise when running some of the testing frameworks. + # E.g. Minitest's test-suite runs itself in `at_exit` callback which + # executes after the pools are already terminated. Then auto termination + # needs to be disabled and called manually after test-suite ends. + # @note This method should *never* be called + # from within a gem. It should *only* be used from within the main + # application and even then it should be used only when necessary. + # @deprecated Has no effect since it is no longer needed, see https://github.com/ruby-concurrency/concurrent-ruby/pull/841. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:48 + def disable_at_exit_handlers!; end + + # General access point to global executors. + # @param [Symbol, Executor] executor_identifier symbols: + # - :fast - {Concurrent.global_fast_executor} + # - :io - {Concurrent.global_io_executor} + # - :immediate - {Concurrent.global_immediate_executor} + # @return [Executor] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:83 + def executor(executor_identifier); end + + # Global thread pool optimized for short, fast *operations*. + # + # @return [ThreadPoolExecutor] the thread pool + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:55 + def global_fast_executor; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:66 + def global_immediate_executor; end + + # Global thread pool optimized for long, blocking (IO) *tasks*. + # + # @return [ThreadPoolExecutor] the thread pool + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:62 + def global_io_executor; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:114 + def global_logger; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:118 + def global_logger=(value); end + + # Global thread pool user for global *timers*. + # + # @return [Concurrent::TimerSet] the thread pool + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:73 + def global_timer_set; end + + # Leave a transaction without committing or aborting - see `Concurrent::atomically`. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:148 + def leave_transaction; end + + # @!macro monotonic_get_time + # + # Returns the current time as tracked by the application monotonic clock. + # + # @param [Symbol] unit the time unit to be returned, can be either + # :float_second, :float_millisecond, :float_microsecond, :second, + # :millisecond, :microsecond, or :nanosecond default to :float_second. + # + # @return [Float] The current monotonic time since some unspecified + # starting point + # + # @!macro monotonic_clock_warning + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/monotonic_time.rb:18 + def monotonic_time(unit = T.unsafe(nil)); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb:7 + def mutex_owned_per_thread?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:87 + def new_fast_executor(opts = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:98 + def new_io_executor(opts = T.unsafe(nil)); end + + # Number of physical processor cores on the current system. For performance + # reasons the calculated value will be memoized on the first call. + # + # On Windows the Win32 API will be queried for the `NumberOfCores from + # Win32_Processor`. This will return the total number "of cores for the + # current instance of the processor." On Unix-like operating systems either + # the `hwprefs` or `sysctl` utility will be called in a subshell and the + # returned value will be used. In the rare case where none of these methods + # work or an exception is raised the function will simply return 1. + # + # @return [Integer] number physical processor cores on the current system + # + # @see https://github.com/grosser/parallel/blob/4fc8b89d08c7091fe0419ca8fba1ec3ce5a8d185/lib/parallel.rb + # + # @see http://msdn.microsoft.com/en-us/library/aa394373(v=vs.85).aspx + # @see http://www.unix.com/man-page/osx/1/HWPREFS/ + # @see http://linux.die.net/man/8/sysctl + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:181 + def physical_processor_count; end + + # Number of processors seen by the OS and used for process scheduling. For + # performance reasons the calculated value will be memoized on the first + # call. + # + # When running under JRuby the Java runtime call + # `java.lang.Runtime.getRuntime.availableProcessors` will be used. According + # to the Java documentation this "value may change during a particular + # invocation of the virtual machine... [applications] should therefore + # occasionally poll this property." We still memoize this value once under + # JRuby. + # + # Otherwise Ruby's Etc.nprocessors will be used. + # + # @return [Integer] number of processors seen by the OS or Java runtime + # + # @see http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html#availableProcessors() + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:160 + def processor_count; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:142 + def processor_counter; end + + # Use logger created by #create_simple_logger to log concurrent-ruby messages. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:66 + def use_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # Use logger created by #create_stdlib_logger to log concurrent-ruby messages. + # @deprecated + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:101 + def use_stdlib_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:38 +class Concurrent::AbstractExchanger < ::Concurrent::Synchronization::Object + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:44 + def initialize; end + + # @!macro exchanger_method_do_exchange + # + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # @param [Object] value the value to exchange with another thread + # @param [Numeric, nil] timeout in seconds, `nil` blocks indefinitely + # + # @!macro exchanger_method_exchange + # + # In some edge cases when a `timeout` is given a return value of `nil` may be + # ambiguous. Specifically, if `nil` is a valid value in the exchange it will + # be impossible to tell whether `nil` is the actual return value or if it + # signifies timeout. When `nil` is a valid value in the exchange consider + # using {#exchange!} or {#try_exchange} instead. + # + # @return [Object] the value exchanged by the other thread or `nil` on timeout + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:69 + def exchange(value, timeout = T.unsafe(nil)); end + + # @!macro exchanger_method_do_exchange + # @!macro exchanger_method_exchange_bang + # + # On timeout a {Concurrent::TimeoutError} exception will be raised. + # + # @return [Object] the value exchanged by the other thread + # @raise [Concurrent::TimeoutError] on timeout + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:80 + def exchange!(value, timeout = T.unsafe(nil)); end + + # @!macro exchanger_method_do_exchange + # @!macro exchanger_method_try_exchange + # + # The return value will be a {Concurrent::Maybe} set to `Just` on success or + # `Nothing` on timeout. + # + # @return [Concurrent::Maybe] on success a `Just` maybe will be returned with + # the item exchanged by the other thread as `#value`; on timeout a + # `Nothing` maybe will be returned with {Concurrent::TimeoutError} as `#reason` + # + # @example + # + # exchanger = Concurrent::Exchanger.new + # + # result = exchanger.exchange(:foo, 0.5) + # + # if result.just? + # puts result.value #=> :bar + # else + # puts 'timeout' + # end + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:109 + def try_exchange(value, timeout = T.unsafe(nil)); end + + private + + # @!macro exchanger_method_do_exchange + # + # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:122 + def do_exchange(value, timeout); end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:41 +Concurrent::AbstractExchanger::CANCEL = T.let(T.unsafe(nil), Object) + +# @!macro abstract_executor_service_public_api +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:10 +class Concurrent::AbstractExecutorService < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService + include ::Concurrent::Concern::Deprecation + + # Create a new thread pool. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:23 + def initialize(opts = T.unsafe(nil), &block); end + + # @!macro executor_service_method_auto_terminate_setter + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:72 + def auto_terminate=(value); end + + # @!macro executor_service_method_auto_terminate_question + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:67 + def auto_terminate?; end + + # @!macro executor_service_attr_reader_fallback_policy + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:18 + def fallback_policy; end + + # @!macro executor_service_method_kill + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:42 + def kill; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:20 + def name; end + + # @!macro executor_service_method_running_question + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:52 + def running?; end + + # @!macro executor_service_method_shutdown + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:37 + def shutdown; end + + # @!macro executor_service_method_shutdown_question + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:62 + def shutdown?; end + + # @!macro executor_service_method_shuttingdown_question + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:57 + def shuttingdown?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:32 + def to_s; end + + # @!macro executor_service_method_wait_for_termination + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:47 + def wait_for_termination(timeout = T.unsafe(nil)); end + + private + + # Returns an action which executes the `fallback_policy` once the queue + # size reaches `max_queue`. The reason for the indirection of an action + # is so that the work can be deferred outside of synchronization. + # + # @param [Array] args the arguments to the task which is being handled. + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:85 + def fallback_action(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:126 + def ns_auto_terminate?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:106 + def ns_execute(*args, &task); end + + # @!macro executor_service_method_ns_kill_execution + # + # Callback method called when the executor has been killed. + # The default behavior is to do nothing. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:122 + def ns_kill_execution; end + + # @!macro executor_service_method_ns_shutdown_execution + # + # Callback method called when an orderly shutdown has completed. + # The default behavior is to signal all waiting threads. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:114 + def ns_shutdown_execution; end +end + +# The set of possible fallback policies that may be set at thread pool creation. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb:15 +Concurrent::AbstractExecutorService::FALLBACK_POLICIES = T.let(T.unsafe(nil), Array) + +# @!visibility private +# @!macro internal_implementation_note +# +# An abstract implementation of local storage, with sub-classes for +# per-thread and per-fiber locals. +# +# Each execution context (EC, thread or fiber) has a lazily initialized array +# of local variable values. Each time a new local variable is created, we +# allocate an "index" for it. +# +# For example, if the allocated index is 1, that means slot #1 in EVERY EC's +# locals array will be used for the value of that variable. +# +# The good thing about using a per-EC structure to hold values, rather than +# a global, is that no synchronization is needed when reading and writing +# those values (since the structure is only ever accessed by a single +# thread). +# +# Of course, when a local variable is GC'd, 1) we need to recover its index +# for use by other new local variables (otherwise the locals arrays could +# get bigger and bigger with time), and 2) we need to null out all the +# references held in the now-unused slots (both to avoid blocking GC of those +# objects, and also to prevent "stale" values from being passed on to a new +# local when the index is reused). +# +# Because we need to null out freed slots, we need to keep references to +# ALL the locals arrays, so we can null out the appropriate slots in all of +# them. This is why we need to use a finalizer to clean up the locals array +# when the EC goes out of scope. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:35 +class Concurrent::AbstractLocals + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:36 + def initialize; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:89 + def fetch(index); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:71 + def free_index(index); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:55 + def next_index(local); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:102 + def set(index, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:43 + def synchronize; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:48 + def weak_synchronize; end + + private + + # When the local goes out of scope, clean up that slot across all locals currently assigned. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:112 + def local_finalizer(index); end + + # Returns the locals for the current scope, or nil if none exist. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:128 + def locals; end + + # Returns the locals for the current scope, creating them if necessary. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:133 + def locals!; end + + # When a thread/fiber goes out of scope, remove the array from @all_arrays. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:119 + def thread_fiber_finalizer(array_object_id); end +end + +# `Agent` is inspired by Clojure's [agent](http://clojure.org/agents) +# function. An agent is a shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. `Agent` is (mostly) +# functionally equivalent to Clojure's agent, except where the runtime +# prevents parity. +# +# Agents are reactive, not autonomous - there is no imperative message loop +# and no blocking receive. The state of an Agent should be itself immutable +# and the `#value` of an Agent is always immediately available for reading by +# any thread without any messages, i.e. observation does not require +# cooperation or coordination. +# +# Agent action dispatches are made using the various `#send` methods. These +# methods always return immediately. At some point later, in another thread, +# the following will happen: +# +# 1. The given `action` will be applied to the state of the Agent and the +# `args`, if any were supplied. +# 2. The return value of `action` will be passed to the validator lambda, +# if one has been set on the Agent. +# 3. If the validator succeeds or if no validator was given, the return value +# of the given `action` will become the new `#value` of the Agent. See +# `#initialize` for details. +# 4. If any observers were added to the Agent, they will be notified. See +# `#add_observer` for details. +# 5. If during the `action` execution any other dispatches are made (directly +# or indirectly), they will be held until after the `#value` of the Agent +# has been changed. +# +# If any exceptions are thrown by an action function, no nested dispatches +# will occur, and the exception will be cached in the Agent itself. When an +# Agent has errors cached, any subsequent interactions will immediately throw +# an exception, until the agent's errors are cleared. Agent errors can be +# examined with `#error` and the agent restarted with `#restart`. +# +# The actions of all Agents get interleaved amongst threads in a thread pool. +# At any point in time, at most one action for each Agent is being executed. +# Actions dispatched to an agent from another single agent or thread will +# occur in the order they were sent, potentially interleaved with actions +# dispatched to the same agent from other sources. The `#send` method should +# be used for actions that are CPU limited, while the `#send_off` method is +# appropriate for actions that may block on IO. +# +# Unlike in Clojure, `Agent` cannot participate in `Concurrent::TVar` transactions. +# +# ## Example +# +# ``` +# def next_fibonacci(set = nil) +# return [0, 1] if set.nil? +# set + [set[-2..-1].reduce{|sum,x| sum + x }] +# end +# +# # create an agent with an initial value +# agent = Concurrent::Agent.new(next_fibonacci) +# +# # send a few update requests +# 5.times do +# agent.send{|set| next_fibonacci(set) } +# end +# +# # wait for them to complete +# agent.await +# +# # get the current value +# agent.value #=> [0, 1, 1, 2, 3, 5, 8] +# ``` +# +# ## Observation +# +# Agents support observers through the {Concurrent::Observable} mixin module. +# Notification of observers occurs every time an action dispatch returns and +# the new value is successfully validated. Observation will *not* occur if the +# action raises an exception, if validation fails, or when a {#restart} occurs. +# +# When notified the observer will receive three arguments: `time`, `old_value`, +# and `new_value`. The `time` argument is the time at which the value change +# occurred. The `old_value` is the value of the Agent when the action began +# processing. The `new_value` is the value to which the Agent was set when the +# action completed. Note that `old_value` and `new_value` may be the same. +# This is not an error. It simply means that the action returned the same +# value. +# +# ## Nested Actions +# +# It is possible for an Agent action to post further actions back to itself. +# The nested actions will be enqueued normally then processed *after* the +# outer action completes, in the order they were sent, possibly interleaved +# with action dispatches from other threads. Nested actions never deadlock +# with one another and a failure in a nested action will never affect the +# outer action. +# +# Nested actions can be called using the Agent reference from the enclosing +# scope or by passing the reference in as a "send" argument. Nested actions +# cannot be post using `self` from within the action block/proc/lambda; `self` +# in this context will not reference the Agent. The preferred method for +# dispatching nested actions is to pass the Agent as an argument. This allows +# Ruby to more effectively manage the closing scope. +# +# Prefer this: +# +# ``` +# agent = Concurrent::Agent.new(0) +# agent.send(agent) do |value, this| +# this.send {|v| v + 42 } +# 3.14 +# end +# agent.value #=> 45.14 +# ``` +# +# Over this: +# +# ``` +# agent = Concurrent::Agent.new(0) +# agent.send do |value| +# agent.send {|v| v + 42 } +# 3.14 +# end +# ``` +# +# @!macro agent_await_warning +# +# **NOTE** Never, *under any circumstances*, call any of the "await" methods +# ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action +# block/proc/lambda. The call will block the Agent and will always fail. +# Calling either {#await} or {#wait} (with a timeout of `nil`) will +# hopelessly deadlock the Agent with no possibility of recovery. +# +# @!macro thread_safe_variable_comparison +# +# @see http://clojure.org/Agents Clojure Agents +# @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:145 +class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Observable + + # Create a new `Agent` with the given initial value and options. + # + # The `:validator` option must be `nil` or a side-effect free proc/lambda + # which takes one argument. On any intended value change the validator, if + # provided, will be called. If the new value is invalid the validator should + # return `false` or raise an error. + # + # The `:error_handler` option must be `nil` or a proc/lambda which takes two + # arguments. When an action raises an error or validation fails, either by + # returning false or raising an error, the error handler will be called. The + # arguments to the error handler will be a reference to the agent itself and + # the error object which was raised. + # + # The `:error_mode` may be either `:continue` (the default if an error + # handler is given) or `:fail` (the default if error handler nil or not + # given). + # + # If an action being run by the agent throws an error or doesn't pass + # validation the error handler, if present, will be called. After the + # handler executes if the error mode is `:continue` the Agent will continue + # as if neither the action that caused the error nor the error itself ever + # happened. + # + # If the mode is `:fail` the Agent will become {#failed?} and will stop + # accepting new action dispatches. Any previously queued actions will be + # held until {#restart} is called. The {#value} method will still work, + # returning the value of the Agent before the error. + # + # @param [Object] initial the initial value + # @param [Hash] opts the configuration options + # + # @option opts [Symbol] :error_mode either `:continue` or `:fail` + # @option opts [nil, Proc] :error_handler the (optional) error handler + # @option opts [nil, Proc] :validator the (optional) validation procedure + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:220 + def initialize(initial, opts = T.unsafe(nil)); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Appropriate for actions that may block on IO. + # + # @param [Proc] action the action dispatch to be enqueued + # @return [Concurrent::Agent] self + # @see #send_off + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:331 + def <<(action); end + + # Blocks the current thread (indefinitely!) until all actions dispatched + # thus far, from this thread or nested by the Agent, have occurred. Will + # block when {#failed?}. Will never return if a failed Agent is {#restart} + # with `:clear_actions` true. + # + # Returns a reference to `self` to support method chaining: + # + # ``` + # current_value = agent.await.value + # ``` + # + # @return [Boolean] self + # + # @!macro agent_await_warning + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:350 + def await; end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. + # + # @param [Float] timeout the maximum number of seconds to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # @!macro agent_await_warning + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:363 + def await_for(timeout); end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. + # + # @param [Float] timeout the maximum number of seconds to wait + # @return [Boolean] true if all actions complete before timeout + # + # @raise [Concurrent::TimeoutError] when timeout is reached + # + # @!macro agent_await_warning + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:377 + def await_for!(timeout); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:233 + def deref; end + + # When {#failed?} and {#error_mode} is `:fail`, returns the error object + # which caused the failure, else `nil`. When {#error_mode} is `:continue` + # will *always* return `nil`. + # + # @return [nil, Error] the error which caused the failure when {#failed?} + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:240 + def error; end + + # The error mode this Agent is operating in. See {#initialize} for details. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:184 + def error_mode; end + + # Is the Agent in a failed state? + # + # @see #restart + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:402 + def failed?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:298 + def post(*args, &action); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:244 + def reason; end + + # When an Agent is {#failed?}, changes the Agent {#value} to `new_value` + # then un-fails the Agent so that action dispatches are allowed again. If + # the `:clear_actions` option is give and true, any actions queued on the + # Agent that were being held while it was failed will be discarded, + # otherwise those held actions will proceed. The `new_value` must pass the + # validator if any, or `restart` will raise an exception and the Agent will + # remain failed with its old {#value} and {#error}. Observers, if any, will + # not be notified of the new state. + # + # @param [Object] new_value the new value for the Agent once restarted + # @param [Hash] opts the configuration options + # @option opts [Symbol] :clear_actions true if all enqueued but unprocessed + # actions should be discarded on restart, else false (default: false) + # @return [Boolean] true + # + # @raise [Concurrent:AgentError] when not failed + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:424 + def restart(new_value, opts = T.unsafe(nil)); end + + # @!macro agent_send + # + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param [Array] args zero or more arguments to be passed to + # the action + # @param [Proc] action the action dispatch to be enqueued + # + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam [Object] value the current {#value} of the Agent + # @yieldparam [Array] args zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # @!macro send_return + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:278 + def send(*args, &action); end + + # @!macro agent_send + # + # @!macro send_bang_return_and_raise + # @return [Boolean] true if the action is successfully enqueued + # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:287 + def send!(*args, &action); end + + # @!macro agent_send + # @!macro send_return + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:294 + def send_off(*args, &action); end + + # @!macro agent_send + # @!macro send_bang_return_and_raise + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:302 + def send_off!(*args, &action); end + + # @!macro agent_send + # @!macro send_return + # @param [Concurrent::ExecutorService] executor the executor on which the + # action is to be dispatched + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:311 + def send_via(executor, *args, &action); end + + # @!macro agent_send + # @!macro send_bang_return_and_raise + # @param [Concurrent::ExecutorService] executor the executor on which the + # action is to be dispatched + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:319 + def send_via!(executor, *args, &action); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:406 + def stopped?; end + + # The current value (state) of the Agent, irrespective of any pending or + # in-progress actions. The value is always available and is non-blocking. + # + # @return [Object] the current value + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:229 + def value; end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. Will block indefinitely when timeout is nil or not given. + # + # Provided mainly for consistency with other classes in this library. Prefer + # the various `await` methods instead. + # + # @param [Float] timeout the maximum number of seconds to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # @!macro agent_await_warning + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:393 + def wait(timeout = T.unsafe(nil)); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:510 + def enqueue_action_job(action, args, executor); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:516 + def enqueue_await_job(latch); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:543 + def execute_next_job; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:576 + def handle_error(error); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:529 + def ns_enqueue_job(job, index = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:584 + def ns_find_last_job_for_thread; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:490 + def ns_initialize(initial, opts); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:539 + def ns_post_next_job; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:570 + def ns_validate(value); end + + class << self + # Blocks the current thread (indefinitely!) until all actions dispatched + # thus far to all the given Agents, from this thread or nested by the + # given Agents, have occurred. Will block when any of the agents are + # failed. Will never return if a failed Agent is restart with + # `:clear_actions` true. + # + # @param [Array] agents the Agents on which to wait + # @return [Boolean] true + # + # @!macro agent_await_warning + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:449 + def await(*agents); end + + # Blocks the current thread until all actions dispatched thus far to all + # the given Agents, from this thread or nested by the given Agents, have + # occurred, or the timeout (in seconds) has elapsed. + # + # @param [Float] timeout the maximum number of seconds to wait + # @param [Array] agents the Agents on which to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # @!macro agent_await_warning + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:463 + def await_for(timeout, *agents); end + + # Blocks the current thread until all actions dispatched thus far to all + # the given Agents, from this thread or nested by the given Agents, have + # occurred, or the timeout (in seconds) has elapsed. + # + # @param [Float] timeout the maximum number of seconds to wait + # @param [Array] agents the Agents on which to wait + # @return [Boolean] true if all actions complete before timeout + # + # @raise [Concurrent::TimeoutError] when timeout is reached + # @!macro agent_await_warning + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:482 + def await_for!(timeout, *agents); end + end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:154 +Concurrent::Agent::AWAIT_ACTION = T.let(T.unsafe(nil), Proc) + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:151 +Concurrent::Agent::AWAIT_FLAG = T.let(T.unsafe(nil), Object) + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:157 +Concurrent::Agent::DEFAULT_ERROR_HANDLER = T.let(T.unsafe(nil), Proc) + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:160 +Concurrent::Agent::DEFAULT_VALIDATOR = T.let(T.unsafe(nil), Proc) + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:148 +Concurrent::Agent::ERROR_MODES = T.let(T.unsafe(nil), Array) + +# Raised during action processing or any other time in an Agent's lifecycle. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:167 +class Concurrent::Agent::Error < ::StandardError + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:168 + def initialize(message = T.unsafe(nil)); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 +class Concurrent::Agent::Job < ::Struct + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 + def action; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 + def action=(_); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 + def args; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 + def args=(_); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 + def caller; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 + def caller=(_); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 + def executor; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 + def executor=(_); end + + class << self + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 + def [](*_arg0); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 + def inspect; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 + def keyword_init?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 + def members; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:163 + def new(*_arg0); end + end +end + +# Raised when a new value obtained during action processing or at `#restart` +# fails validation. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:176 +class Concurrent::Agent::ValidationError < ::Concurrent::Agent::Error + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/agent.rb:177 + def initialize(message = T.unsafe(nil)); end +end + +# @!macro concurrent_array +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/array.rb:53 +class Concurrent::Array < ::Array; end + +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/array.rb:22 +Concurrent::ArrayImplementation = Array + +# A mixin module that provides simple asynchronous behavior to a class, +# turning it into a simple actor. Loosely based on Erlang's +# [gen_server](http://www.erlang.org/doc/man/gen_server.html), but without +# supervision or linking. +# +# A more feature-rich {Concurrent::Actor} is also available when the +# capabilities of `Async` are too limited. +# +# ```cucumber +# Feature: +# As a stateful, plain old Ruby class +# I want safe, asynchronous behavior +# So my long-running methods don't block the main thread +# ``` +# +# The `Async` module is a way to mix simple yet powerful asynchronous +# capabilities into any plain old Ruby object or class, turning each object +# into a simple Actor. Method calls are processed on a background thread. The +# caller is free to perform other actions while processing occurs in the +# background. +# +# Method calls to the asynchronous object are made via two proxy methods: +# `async` (alias `cast`) and `await` (alias `call`). These proxy methods post +# the method call to the object's background thread and return a "future" +# which will eventually contain the result of the method call. +# +# This behavior is loosely patterned after Erlang's `gen_server` behavior. +# When an Erlang module implements the `gen_server` behavior it becomes +# inherently asynchronous. The `start` or `start_link` function spawns a +# process (similar to a thread but much more lightweight and efficient) and +# returns the ID of the process. Using the process ID, other processes can +# send messages to the `gen_server` via the `cast` and `call` methods. Unlike +# Erlang's `gen_server`, however, `Async` classes do not support linking or +# supervision trees. +# +# ## Basic Usage +# +# When this module is mixed into a class, objects of the class become inherently +# asynchronous. Each object gets its own background thread on which to post +# asynchronous method calls. Asynchronous method calls are executed in the +# background one at a time in the order they are received. +# +# To create an asynchronous class, simply mix in the `Concurrent::Async` module: +# +# ``` +# class Hello +# include Concurrent::Async +# +# def hello(name) +# "Hello, #{name}!" +# end +# end +# ``` +# +# Mixing this module into a class provides each object two proxy methods: +# `async` and `await`. These methods are thread safe with respect to the +# enclosing object. The former proxy allows methods to be called +# asynchronously by posting to the object's internal thread. The latter proxy +# allows a method to be called synchronously but does so safely with respect +# to any pending asynchronous method calls and ensures proper ordering. Both +# methods return a {Concurrent::IVar} which can be inspected for the result +# of the proxied method call. Calling a method with `async` will return a +# `:pending` `IVar` whereas `await` will return a `:complete` `IVar`. +# +# ``` +# class Echo +# include Concurrent::Async +# +# def echo(msg) +# print "#{msg}\n" +# end +# end +# +# horn = Echo.new +# horn.echo('zero') # synchronous, not thread-safe +# # returns the actual return value of the method +# +# horn.async.echo('one') # asynchronous, non-blocking, thread-safe +# # returns an IVar in the :pending state +# +# horn.await.echo('two') # synchronous, blocking, thread-safe +# # returns an IVar in the :complete state +# ``` +# +# ## Let It Fail +# +# The `async` and `await` proxy methods have built-in error protection based +# on Erlang's famous "let it fail" philosophy. Instance methods should not be +# programmed defensively. When an exception is raised by a delegated method +# the proxy will rescue the exception, expose it to the caller as the `reason` +# attribute of the returned future, then process the next method call. +# +# ## Calling Methods Internally +# +# External method calls should *always* use the `async` and `await` proxy +# methods. When one method calls another method, the `async` proxy should +# rarely be used and the `await` proxy should *never* be used. +# +# When an object calls one of its own methods using the `await` proxy the +# second call will be enqueued *behind* the currently running method call. +# Any attempt to wait on the result will fail as the second call will never +# run until after the current call completes. +# +# Calling a method using the `await` proxy from within a method that was +# itself called using `async` or `await` will irreversibly deadlock the +# object. Do *not* do this, ever. +# +# ## Instance Variables and Attribute Accessors +# +# Instance variables do not need to be thread-safe so long as they are private. +# Asynchronous method calls are processed in the order they are received and +# are processed one at a time. Therefore private instance variables can only +# be accessed by one thread at a time. This is inherently thread-safe. +# +# When using private instance variables within asynchronous methods, the best +# practice is to read the instance variable into a local variable at the start +# of the method then update the instance variable at the *end* of the method. +# This way, should an exception be raised during method execution the internal +# state of the object will not have been changed. +# +# ### Reader Attributes +# +# The use of `attr_reader` is discouraged. Internal state exposed externally, +# when necessary, should be done through accessor methods. The instance +# variables exposed by these methods *must* be thread-safe, or they must be +# called using the `async` and `await` proxy methods. These two approaches are +# subtly different. +# +# When internal state is accessed via the `async` and `await` proxy methods, +# the returned value represents the object's state *at the time the call is +# processed*, which may *not* be the state of the object at the time the call +# is made. +# +# To get the state *at the current* time, irrespective of an enqueued method +# calls, a reader method must be called directly. This is inherently unsafe +# unless the instance variable is itself thread-safe, preferably using one +# of the thread-safe classes within this library. Because the thread-safe +# classes within this library are internally-locking or non-locking, they can +# be safely used from within asynchronous methods without causing deadlocks. +# +# Generally speaking, the best practice is to *not* expose internal state via +# reader methods. The best practice is to simply use the method's return value. +# +# ### Writer Attributes +# +# Writer attributes should never be used with asynchronous classes. Changing +# the state externally, even when done in the thread-safe way, is not logically +# consistent. Changes to state need to be timed with respect to all asynchronous +# method calls which my be in-process or enqueued. The only safe practice is to +# pass all necessary data to each method as arguments and let the method update +# the internal state as necessary. +# +# ## Class Constants, Variables, and Methods +# +# ### Class Constants +# +# Class constants do not need to be thread-safe. Since they are read-only and +# immutable they may be safely read both externally and from within +# asynchronous methods. +# +# ### Class Variables +# +# Class variables should be avoided. Class variables represent shared state. +# Shared state is anathema to concurrency. Should there be a need to share +# state using class variables they *must* be thread-safe, preferably +# using the thread-safe classes within this library. When updating class +# variables, never assign a new value/object to the variable itself. Assignment +# is not thread-safe in Ruby. Instead, use the thread-safe update functions +# of the variable itself to change the value. +# +# The best practice is to *never* use class variables with `Async` classes. +# +# ### Class Methods +# +# Class methods which are pure functions are safe. Class methods which modify +# class variables should be avoided, for all the reasons listed above. +# +# ## An Important Note About Thread Safe Guarantees +# +# > Thread safe guarantees can only be made when asynchronous method calls +# > are not mixed with direct method calls. Use only direct method calls +# > when the object is used exclusively on a single thread. Use only +# > `async` and `await` when the object is shared between threads. Once you +# > call a method using `async` or `await`, you should no longer call methods +# > directly on the object. Use `async` and `await` exclusively from then on. +# +# @example +# +# class Echo +# include Concurrent::Async +# +# def echo(msg) +# print "#{msg}\n" +# end +# end +# +# horn = Echo.new +# horn.echo('zero') # synchronous, not thread-safe +# # returns the actual return value of the method +# +# horn.async.echo('one') # asynchronous, non-blocking, thread-safe +# # returns an IVar in the :pending state +# +# horn.await.echo('two') # synchronous, blocking, thread-safe +# # returns an IVar in the :complete state +# +# @see Concurrent::Actor +# @see https://en.wikipedia.org/wiki/Actor_model "Actor Model" at Wikipedia +# @see http://www.erlang.org/doc/man/gen_server.html Erlang gen_server +# @see http://c2.com/cgi/wiki?LetItCrash "Let It Crash" at http://c2.com/ +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:217 +module Concurrent::Async + mixes_in_class_methods ::Concurrent::Async::ClassMethods + + # Causes the chained method call to be performed asynchronously on the + # object's thread. The delegated method will return a future in the + # `:pending` state and the method call will have been scheduled on the + # object's thread. The final disposition of the method call can be obtained + # by inspecting the returned future. + # + # @!macro async_thread_safety_warning + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # + # @return [Concurrent::IVar] the pending result of the asynchronous operation + # + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of + # the requested method + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:412 + def async; end + + # Causes the chained method call to be performed synchronously on the + # current thread. The delegated will return a future in either the + # `:fulfilled` or `:rejected` state and the delegated method will have + # completed. The final disposition of the delegated method can be obtained + # by inspecting the returned future. + # + # @!macro async_thread_safety_warning + # + # @return [Concurrent::IVar] the completed result of the synchronous operation + # + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of the + # requested method + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:430 + def await; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:433 + def call; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:415 + def cast; end + + # Initialize the internal serializer and other stnchronization mechanisms. + # + # @note This method *must* be called immediately upon object construction. + # This is the only way thread-safe initialization can be guaranteed. + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:441 + def init_synchronization; end + + class << self + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:262 + def included(base); end + + # Check for the presence of a method on an object and determine if a given + # set of arguments matches the required arity. + # + # @param [Object] obj the object to check against + # @param [Symbol] method the method to check the object for + # @param [Array] args zero or more arguments for the arity check + # + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # + # @note This check is imperfect because of the way Ruby reports the arity of + # methods with a variable number of arguments. It is possible to determine + # if too few arguments are given but impossible to determine if too many + # arguments are given. This check may also fail to recognize dynamic behavior + # of the object, such as methods simulated with `method_missing`. + # + # @see http://www.ruby-doc.org/core-2.1.1/Method.html#method-i-arity Method#arity + # @see http://ruby-doc.org/core-2.1.0/Object.html#method-i-respond_to-3F Object#respond_to? + # @see http://www.ruby-doc.org/core-2.1.0/BasicObject.html#method-i-method_missing BasicObject#method_missing + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:250 + def validate_argc(obj, method, *args); end + end +end + +# Delegates asynchronous, thread-safe method calls to the wrapped object. +# +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:282 +class Concurrent::Async::AsyncDelegator < ::Concurrent::Synchronization::LockableObject + # Create a new delegator object wrapping the given delegate. + # + # @param [Object] delegate the object to wrap and delegate method calls to + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:288 + def initialize(delegate); end + + # Delegates method calls to the wrapped object. + # + # @param [Symbol] method the method being called + # @param [Array] args zero or more arguments to the method + # + # @return [IVar] the result of the method call + # + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:305 + def method_missing(method, *args, &block); end + + # Perform all enqueued tasks. + # + # This method must be called from within the executor. It must not be + # called while already running. It will loop until the queue is empty. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:330 + def perform; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:348 + def reset_if_forked; end + + private + + # Check whether the method is responsive + # + # @param [Symbol] method the method being called + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:322 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# Delegates synchronous, thread-safe method calls to the wrapped object. +# +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:360 +class Concurrent::Async::AwaitDelegator + # Create a new delegator object wrapping the given delegate. + # + # @param [AsyncDelegator] delegate the object to wrap and delegate method calls to + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:365 + def initialize(delegate); end + + # Delegates method calls to the wrapped object. + # + # @param [Symbol] method the method being called + # @param [Array] args zero or more arguments to the method + # + # @return [IVar] the result of the method call + # + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:378 + def method_missing(method, *args, &block); end + + private + + # Check whether the method is responsive + # + # @param [Symbol] method the method being called + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:387 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:269 +module Concurrent::Async::ClassMethods + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/async.rb:270 + def new(*args, **_arg1, &block); end +end + +# Atoms provide a way to manage shared, synchronous, independent state. +# +# An atom is initialized with an initial value and an optional validation +# proc. At any time the value of the atom can be synchronously and safely +# changed. If a validator is given at construction then any new value +# will be checked against the validator and will be rejected if the +# validator returns false or raises an exception. +# +# There are two ways to change the value of an atom: {#compare_and_set} and +# {#swap}. The former will set the new value if and only if it validates and +# the current value matches the new value. The latter will atomically set the +# new value to the result of running the given block if and only if that +# value validates. +# +# ## Example +# +# ``` +# def next_fibonacci(set = nil) +# return [0, 1] if set.nil? +# set + [set[-2..-1].reduce{|sum,x| sum + x }] +# end +# +# # create an atom with an initial value +# atom = Concurrent::Atom.new(next_fibonacci) +# +# # send a few update requests +# 5.times do +# atom.swap{|set| next_fibonacci(set) } +# end +# +# # get the current value +# atom.value #=> [0, 1, 1, 2, 3, 5, 8] +# ``` +# +# ## Observation +# +# Atoms support observers through the {Concurrent::Observable} mixin module. +# Notification of observers occurs every time the value of the Atom changes. +# When notified the observer will receive three arguments: `time`, `old_value`, +# and `new_value`. The `time` argument is the time at which the value change +# occurred. The `old_value` is the value of the Atom when the change began +# The `new_value` is the value to which the Atom was set when the change +# completed. Note that `old_value` and `new_value` may be the same. This is +# not an error. It simply means that the change operation returned the same +# value. +# +# Unlike in Clojure, `Atom` cannot participate in {Concurrent::TVar} transactions. +# +# @!macro thread_safe_variable_comparison +# +# @see http://clojure.org/atoms Clojure Atoms +# @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:95 +class Concurrent::Atom < ::Concurrent::Synchronization::Object + include ::Concurrent::Concern::Observable + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new atom with the given initial value. + # + # @param [Object] value The initial value + # @param [Hash] opts The options used to configure the atom + # @option opts [Proc] :validator (nil) Optional proc used to validate new + # values. It must accept one and only one argument which will be the + # intended new value. The validator will return true if the new value + # is acceptable else return false (preferably) or raise an exception. + # + # @!macro deref_options + # + # @raise [ArgumentError] if the validator is not a `Proc` (when given) + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:121 + def initialize(value, opts = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:99 + def __initialize_atomic_fields__; end + + # Atomically sets the value of atom to the new value if and only if the + # current value of the atom is identical to the old value and the new + # value successfully validates against the (optional) validator given + # at construction. + # + # @param [Object] old_value The expected current value. + # @param [Object] new_value The intended new value. + # + # @return [Boolean] True if the value is changed else false. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:181 + def compare_and_set(old_value, new_value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:102 + def deref; end + + # Atomically sets the value of atom to the new value without regard for the + # current value so long as the new value successfully validates against the + # (optional) validator given at construction. + # + # @param [Object] new_value The intended new value. + # + # @return [Object] The final value of the atom after all operations and + # validations are complete. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:198 + def reset(new_value); end + + # Atomically swaps the value of atom using the given block. The current + # value will be passed to the block, as will any arguments passed as + # arguments to the function. The new value will be validated against the + # (optional) validator proc given at construction. If validation fails the + # value will not be changed. + # + # Internally, {#swap} reads the current value, applies the block to it, and + # attempts to compare-and-set it in. Since another thread may have changed + # the value in the intervening time, it may have to retry, and does so in a + # spin loop. The net effect is that the value will always be the result of + # the application of the supplied block to a current value, atomically. + # However, because the block might be called multiple times, it must be free + # of side effects. + # + # @note The given block may be called multiple times, and thus should be free + # of side effects. + # + # @param [Object] args Zero or more arguments passed to the block. + # + # @yield [value, args] Calculates a new value for the atom based on the + # current value and any supplied arguments. + # @yieldparam value [Object] The current value of the atom. + # @yieldparam args [Object] All arguments passed to the function, in order. + # @yieldreturn [Object] The intended new value of the atom. + # + # @return [Object] The final value of the atom after all operations and + # validations are complete. + # + # @raise [ArgumentError] When no block is given. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:157 + def swap(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:99 + def value; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:99 + def compare_and_set_value(expected, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:99 + def swap_value(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:99 + def update_value(&block); end + + # Is the new value valid? + # + # @param [Object] new_value The intended new value. + # @return [Boolean] false if the validator function returns false or raises + # an exception else true + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:216 + def valid?(new_value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atom.rb:99 + def value=(value); end +end + +# @!macro atomic_boolean +# +# A boolean value that can be updated atomically. Reads and writes to an atomic +# boolean and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# @!macro thread_safe_variable_comparison +# +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicBoolean... +# 2.790000 0.000000 2.790000 ( 2.791454) +# Testing with Concurrent::CAtomicBoolean... +# 0.740000 0.000000 0.740000 ( 0.740206) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicBoolean... +# 5.240000 2.520000 7.760000 ( 3.683000) +# Testing with Concurrent::JavaAtomicBoolean... +# 3.340000 0.010000 3.350000 ( 0.855000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean +# +# @!macro atomic_boolean_public_api +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb:119 +class Concurrent::AtomicBoolean < ::Concurrent::MutexAtomicBoolean + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb:125 + def inspect; end + + # @return [String] Short string representation. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb:121 + def to_s; end +end + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb:82 +Concurrent::AtomicBooleanImplementation = Concurrent::MutexAtomicBoolean + +# Define update methods that use direct paths +# +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb:9 +module Concurrent::AtomicDirectUpdate + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb:15 + def try_update; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb:24 + def try_update!; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb:10 + def update; end +end + +# @!macro atomic_fixnum +# +# A numeric value that can be updated atomically. Reads and writes to an atomic +# fixnum and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# @!macro thread_safe_variable_comparison +# +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicFixnum... +# 3.130000 0.000000 3.130000 ( 3.136505) +# Testing with Concurrent::CAtomicFixnum... +# 0.790000 0.000000 0.790000 ( 0.785550) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicFixnum... +# 5.460000 2.460000 7.920000 ( 3.715000) +# Testing with Concurrent::JavaAtomicFixnum... +# 4.520000 0.030000 4.550000 ( 1.187000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong +# +# @!macro atomic_fixnum_public_api +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb:136 +class Concurrent::AtomicFixnum < ::Concurrent::MutexAtomicFixnum + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb:142 + def inspect; end + + # @return [String] Short string representation. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb:138 + def to_s; end +end + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb:99 +Concurrent::AtomicFixnumImplementation = Concurrent::MutexAtomicFixnum + +# An atomic reference which maintains an object reference along with a mark bit +# that can be updated atomically. +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicMarkableReference.html +# java.util.concurrent.atomic.AtomicMarkableReference +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:10 +class Concurrent::AtomicMarkableReference < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:15 + def initialize(value = T.unsafe(nil), mark = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:12 + def __initialize_atomic_fields__; end + + # Atomically sets the value and mark to the given updated value and + # mark given both: + # - the current value == the expected value && + # - the current mark == the expected mark + # + # @param [Object] expected_val the expected value + # @param [Object] new_val the new value + # @param [Boolean] expected_mark the expected mark + # @param [Boolean] new_mark the new mark + # + # @return [Boolean] `true` if successful. A `false` return indicates + # that the actual value was not equal to the expected value or the + # actual mark was not equal to the expected mark + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:33 + def compare_and_set(expected_val, new_val, expected_mark, new_mark); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:59 + def compare_and_swap(expected_val, new_val, expected_mark, new_mark); end + + # Gets the current reference and marked values. + # + # @return [Array] the current reference and marked values + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:64 + def get; end + + # Gets the current marked value + # + # @return [Boolean] the current marked value + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:78 + def mark; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:82 + def marked?; end + + # _Unconditionally_ sets to the given value of both the reference and + # the mark. + # + # @param [Object] new_val the new value + # @param [Boolean] new_mark the new mark + # + # @return [Array] both the new value and the new mark + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:91 + def set(new_val, new_mark); end + + # Pass the current value to the given block, replacing it with the + # block's result. Simply return nil if update fails. + # + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam [Object] old_val the starting value of the atomic reference + # @yieldparam [Boolean] old_mark the starting state of marked + # + # @return [Array] the new value and marked state, or nil if + # the update failed + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:152 + def try_update; end + + # Pass the current value to the given block, replacing it + # with the block's result. Raise an exception if the update + # fails. + # + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam [Object] old_val the starting value of the atomic reference + # @yieldparam [Boolean] old_mark the starting state of marked + # + # @return [Array] the new value and marked state + # + # @raise [Concurrent::ConcurrentUpdateError] if the update fails + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:128 + def try_update!; end + + # Pass the current value and marked state to the given block, replacing it + # with the block's results. May retry if the value changes during the + # block's execution. + # + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam [Object] old_val the starting value of the atomic reference + # @yieldparam [Boolean] old_mark the starting state of marked + # + # @return [Array] the new value and new mark + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:105 + def update; end + + # Gets the current value of the reference + # + # @return [Object] the current value of the reference + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:71 + def value; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:12 + def compare_and_set_reference(expected, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:163 + def immutable_array(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:12 + def reference; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:12 + def reference=(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:12 + def swap_reference(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb:12 + def update_reference(&block); end +end + +# Special "compare and set" handling of numeric values. +# +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb:7 +module Concurrent::AtomicNumericCompareAndSetWrapper + # @!macro atomic_reference_method_compare_and_set + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb:10 + def compare_and_set(old_value, new_value); end +end + +# An object reference that may be updated atomically. All read and write +# operations have java volatile semantic. +# +# @!macro thread_safe_variable_comparison +# +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/package-summary.html +# +# @!method initialize(value = nil) +# @!macro atomic_reference_method_initialize +# @param [Object] value The initial value. +# +# @!method get +# @!macro atomic_reference_method_get +# Gets the current value. +# @return [Object] the current value +# +# @!method set(new_value) +# @!macro atomic_reference_method_set +# Sets to the given value. +# @param [Object] new_value the new value +# @return [Object] the new value +# +# @!method get_and_set(new_value) +# @!macro atomic_reference_method_get_and_set +# Atomically sets to the given value and returns the old value. +# @param [Object] new_value the new value +# @return [Object] the old value +# +# @!method compare_and_set(old_value, new_value) +# @!macro atomic_reference_method_compare_and_set +# +# Atomically sets the value to the given updated value if +# the current value == the expected value. +# +# @param [Object] old_value the expected value +# @param [Object] new_value the new value +# +# @return [Boolean] `true` if successful. A `false` return indicates +# that the actual value was not equal to the expected value. +# +# @!method update +# Pass the current value to the given block, replacing it +# with the block's result. May retry if the value changes +# during the block's execution. +# +# @yield [Object] Calculate a new value for the atomic reference using +# given (old) value +# @yieldparam [Object] old_value the starting value of the atomic reference +# @return [Object] the new value +# +# @!method try_update +# Pass the current value to the given block, replacing it +# with the block's result. Return nil if the update fails. +# +# @yield [Object] Calculate a new value for the atomic reference using +# given (old) value +# @yieldparam [Object] old_value the starting value of the atomic reference +# @note This method was altered to avoid raising an exception by default. +# Instead, this method now returns `nil` in case of failure. For more info, +# please see: https://github.com/ruby-concurrency/concurrent-ruby/pull/336 +# @return [Object] the new value, or nil if update failed +# +# @!method try_update! +# Pass the current value to the given block, replacing it +# with the block's result. Raise an exception if the update +# fails. +# +# @yield [Object] Calculate a new value for the atomic reference using +# given (old) value +# @yieldparam [Object] old_value the starting value of the atomic reference +# @note This behavior mimics the behavior of the original +# `AtomicReference#try_update` API. The reason this was changed was to +# avoid raising exceptions (which are inherently slow) by default. For more +# info: https://github.com/ruby-concurrency/concurrent-ruby/pull/336 +# @return [Object] the new value +# @raise [Concurrent::ConcurrentUpdateError] if the update fails +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb:126 +class Concurrent::AtomicReference < ::Concurrent::MutexAtomicReference + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb:133 + def inspect; end + + # @return [String] Short string representation. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb:129 + def to_s; end +end + +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb:18 +Concurrent::AtomicReferenceImplementation = Concurrent::MutexAtomicReference + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:30 +class Concurrent::CRubySet < ::Set + include ::Set::SubclassCompatible + extend ::Set::SubclassCompatible::ClassMethods + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def initialize(*args, &block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def &(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def +(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def -(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def <(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def <<(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def <=(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def <=>(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def ==(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def ===(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def >(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def >=(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def ^(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def add(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def add?(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def classify(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def clear(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def collect!(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def compare_by_identity(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def compare_by_identity?(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def delete(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def delete?(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def delete_if(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def difference(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def disjoint?(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def divide(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def each(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def empty?(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def encode_with(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def eql?(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def filter!(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def flatten(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def flatten!(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def hash(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def include?(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def init_with(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def inspect(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def intersect?(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def intersection(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def join(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def keep_if(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def length(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def map!(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def member?(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def merge(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def proper_subset?(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def proper_superset?(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def reject!(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def replace(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def reset(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def select!(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def size(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def subset?(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def subtract(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def superset?(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def to_a(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def to_s(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def to_set(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def union(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def |(*args); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:33 + def initialize_copy(other); end +end + +# A thread pool that dynamically grows and shrinks to fit the current workload. +# New threads are created as needed, existing threads are reused, and threads +# that remain idle for too long are killed and removed from the pool. These +# pools are particularly suited to applications that perform a high volume of +# short-lived tasks. +# +# On creation a `CachedThreadPool` has zero running threads. New threads are +# created on the pool as new operations are `#post`. The size of the pool +# will grow until `#max_length` threads are in the pool or until the number +# of threads exceeds the number of running and pending operations. When a new +# operation is post to the pool the first available idle thread will be tasked +# with the new operation. +# +# Should a thread crash for any reason the thread will immediately be removed +# from the pool. Similarly, threads which remain idle for an extended period +# of time will be killed and reclaimed. Thus these thread pools are very +# efficient at reclaiming unused resources. +# +# The API and behavior of this class are based on Java's `CachedThreadPool` +# +# @!macro thread_pool_options +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb:27 +class Concurrent::CachedThreadPool < ::Concurrent::ThreadPoolExecutor + # @!macro cached_thread_pool_method_initialize + # + # Create a new thread pool. + # + # @param [Hash] opts the options defining pool behavior. + # @option opts [Symbol] :fallback_policy (`:abort`) the fallback policy + # + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb:39 + def initialize(opts = T.unsafe(nil)); end + + private + + # @!macro cached_thread_pool_method_initialize + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb:51 + def ns_initialize(opts); end +end + +# Raised when an asynchronous operation is cancelled before execution. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:9 +class Concurrent::CancelledOperationError < ::Concurrent::Error; end + +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:7 +module Concurrent::Collection; end + +# A thread safe observer set implemented using copy-on-read approach: +# observers are added and removed from a thread safe collection; every time +# a notification is required the internal data structure is copied to +# prevent concurrency issues +# +# @api private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:12 +class Concurrent::Collection::CopyOnNotifyObserverSet < ::Concurrent::Synchronization::LockableObject + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:14 + def initialize; end + + # @!macro observable_add_observer + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:20 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # @!macro observable_count_observers + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:55 + def count_observers; end + + # @!macro observable_delete_observer + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:39 + def delete_observer(observer); end + + # @!macro observable_delete_observers + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:47 + def delete_observers; end + + # Notifies all registered observers with optional args and deletes them. + # + # @param [Object] args arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:72 + def notify_and_delete_observers(*args, &block); end + + # Notifies all registered observers with optional args + # @param [Object] args arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:62 + def notify_observers(*args, &block); end + + protected + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:80 + def ns_initialize; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:86 + def duplicate_and_clear_observers; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:94 + def duplicate_observers; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb:98 + def notify_to(observers, *args); end +end + +# A thread safe observer set implemented using copy-on-write approach: +# every time an observer is added or removed the whole internal data structure is +# duplicated and replaced with a new one. +# +# @api private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:11 +class Concurrent::Collection::CopyOnWriteObserverSet < ::Concurrent::Synchronization::LockableObject + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:13 + def initialize; end + + # @!macro observable_add_observer + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:19 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # @!macro observable_count_observers + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:56 + def count_observers; end + + # @!macro observable_delete_observer + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:40 + def delete_observer(observer); end + + # @!macro observable_delete_observers + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:50 + def delete_observers; end + + # Notifies all registered observers with optional args and deletes them. + # + # @param [Object] args arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:72 + def notify_and_delete_observers(*args, &block); end + + # Notifies all registered observers with optional args + # @param [Object] args arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:63 + def notify_observers(*args, &block); end + + protected + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:80 + def ns_initialize; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:102 + def clear_observers_and_return_old; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:86 + def notify_to(observers, *args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:94 + def observers; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb:98 + def observers=(new_set); end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:10 +Concurrent::Collection::MapImplementation = Concurrent::Collection::MriMapBackend + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:10 +class Concurrent::Collection::MriMapBackend < ::Concurrent::Collection::NonConcurrentMapBackend + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:12 + def initialize(options = T.unsafe(nil), &default_proc); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:17 + def []=(key, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:61 + def clear; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:33 + def compute(key); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:21 + def compute_if_absent(key); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:29 + def compute_if_present(key); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:53 + def delete(key); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:57 + def delete_pair(key, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:49 + def get_and_set(key, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:37 + def merge_pair(key, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:45 + def replace_if_exists(key, new_value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:41 + def replace_pair(key, old_value, new_value); end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:9 +class Concurrent::Collection::NonConcurrentMapBackend + # WARNING: all public methods of the class must operate on the @backend + # directly without calling each other. This is important because of the + # SynchronizedMapBackend which uses a non-reentrant mutex for performance + # reasons. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:15 + def initialize(options = T.unsafe(nil), &default_proc); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:21 + def [](key); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:25 + def []=(key, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:94 + def clear; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:59 + def compute(key); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:29 + def compute_if_absent(key); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:53 + def compute_if_present(key); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:81 + def delete(key); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:85 + def delete_pair(key, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:99 + def each_pair; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:71 + def get_and_set(key, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:110 + def get_or_default(key, default_value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:77 + def key?(key); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:63 + def merge_pair(key, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:46 + def replace_if_exists(key, new_value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:37 + def replace_pair(key, old_value, new_value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:106 + def size; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:130 + def dupped_backend; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:124 + def initialize_copy(other); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:134 + def pair?(key, expected_value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:116 + def set_backend(default_proc); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:138 + def store_computed_value(key, new_value); end +end + +# @!macro priority_queue +# +# A queue collection in which the elements are sorted based on their +# comparison (spaceship) operator `<=>`. Items are added to the queue +# at a position relative to their priority. On removal the element +# with the "highest" priority is removed. By default the sort order is +# from highest to lowest, but a lowest-to-highest sort order can be +# set on construction. +# +# The API is based on the `Queue` class from the Ruby standard library. +# +# The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm +# stored in an array. The algorithm is based on the work of Robert Sedgewick +# and Kevin Wayne. +# +# The JRuby native implementation is a thin wrapper around the standard +# library `java.util.NonConcurrentPriorityQueue`. +# +# When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. +# When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. +# +# @note This implementation is *not* thread safe. +# +# @see http://en.wikipedia.org/wiki/Priority_queue +# @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html +# +# @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 +# @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html +# +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb:50 +class Concurrent::Collection::NonConcurrentPriorityQueue < ::Concurrent::Collection::RubyNonConcurrentPriorityQueue + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb:59 + def <<(item); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb:56 + def deq; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb:60 + def enq(item); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb:52 + def has_priority?(item); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb:57 + def shift; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb:54 + def size; end +end + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb:10 +Concurrent::Collection::NonConcurrentPriorityQueueImplementation = Concurrent::Collection::RubyNonConcurrentPriorityQueue + +# @!macro priority_queue +# +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:8 +class Concurrent::Collection::RubyNonConcurrentPriorityQueue + # @!macro priority_queue_method_initialize + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:11 + def initialize(opts = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:85 + def <<(item); end + + # @!macro priority_queue_method_clear + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:18 + def clear; end + + # @!macro priority_queue_method_delete + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:25 + def delete(item); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:74 + def deq; end + + # @!macro priority_queue_method_empty + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:43 + def empty?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:86 + def enq(item); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:51 + def has_priority?(item); end + + # @!macro priority_queue_method_include + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:48 + def include?(item); end + + # @!macro priority_queue_method_length + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:54 + def length; end + + # @!macro priority_queue_method_peek + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:60 + def peek; end + + # @!macro priority_queue_method_pop + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:65 + def pop; end + + # @!macro priority_queue_method_push + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:78 + def push(item); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:75 + def shift; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:57 + def size; end + + private + + # Are the items at the given indexes ordered based on the priority + # order specified at construction? + # + # @param [Integer] x the first index from which to retrieve a comparable value + # @param [Integer] y the second index from which to retrieve a comparable value + # + # @return [Boolean] true if the two elements are in the correct priority order + # else false + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:119 + def ordered?(x, y); end + + # Percolate down to maintain heap invariant. + # + # @param [Integer] k the index at which to start the percolation + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:128 + def sink(k); end + + # Exchange the values at the given indexes within the internal array. + # + # @param [Integer] x the first index to swap + # @param [Integer] y the second index to swap + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:103 + def swap(x, y); end + + # Percolate up to maintain heap invariant. + # + # @param [Integer] k the index at which to start the percolation + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:147 + def swim(k); end + + class << self + # @!macro priority_queue_method_from_list + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb:89 + def from_list(list, opts = T.unsafe(nil)); end + end +end + +# @!visibility private +# @!macro timeout_queue +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/timeout_queue.rb:15 +class Concurrent::Collection::TimeoutQueue < ::Thread::Queue; end + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/timeout_queue.rb:5 +Concurrent::Collection::TimeoutQueueImplementation = Thread::Queue + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:2 +module Concurrent::Concern; end + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/deprecation.rb:8 +module Concurrent::Concern::Deprecation + include ::Concurrent::Concern::Logging + extend ::Concurrent::Concern::Logging + extend ::Concurrent::Concern::Deprecation + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/deprecation.rb:12 + def deprecated(message, strip = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/deprecation.rb:27 + def deprecated_method(old_name, new_name); end +end + +# Object references in Ruby are mutable. This can lead to serious problems when +# the `#value` of a concurrent object is a mutable reference. Which is always the +# case unless the value is a `Fixnum`, `Symbol`, or similar "primitive" data type. +# Most classes in this library that expose a `#value` getter method do so using the +# `Dereferenceable` mixin module. +# +# @!macro copy_options +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:11 +module Concurrent::Concern::Dereferenceable + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:24 + def deref; end + + # Return the value this object represents after applying the options specified + # by the `#set_deref_options` method. + # + # @return [Object] the current value of the object + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:21 + def value; end + + protected + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:63 + def apply_deref_options(value); end + + # @!macro dereferenceable_set_deref_options + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:54 + def ns_set_deref_options(opts); end + + # @!macro dereferenceable_set_deref_options + # Set the options which define the operations #value performs before + # returning data to the caller (dereferencing). + # + # @note Most classes that include this module will call `#set_deref_options` + # from within the constructor, thus allowing these options to be set at + # object creation. + # + # @param [Hash] opts the options defining dereference behavior. + # @option opts [String] :dup_on_deref (false) call `#dup` before returning the data + # @option opts [String] :freeze_on_deref (false) call `#freeze` before returning the data + # @option opts [String] :copy_on_deref (nil) call the given `Proc` passing + # the internal value and returning the value returned from the proc + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:48 + def set_deref_options(opts = T.unsafe(nil)); end + + # Set the internal value of this object + # + # @param [Object] value the new value + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/dereferenceable.rb:31 + def value=(value); end +end + +# Include where logging is needed +# +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:9 +module Concurrent::Concern::Logging + # Logs through {Concurrent.global_logger}, it can be overridden by setting @logger + # @param [Integer] level one of Concurrent::Concern::Logging constants + # @param [String] progname e.g. a path of an Actor + # @param [String, nil] message when nil block is used to generate the message + # @yieldreturn [String] a message + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:19 + def log(level, progname, message = T.unsafe(nil), &block); end +end + +# The same as Logger::Severity but we copy it here to avoid a dependency on the logger gem just for these 7 constants +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:11 +Concurrent::Concern::Logging::DEBUG = T.let(T.unsafe(nil), Integer) + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:11 +Concurrent::Concern::Logging::ERROR = T.let(T.unsafe(nil), Integer) + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:11 +Concurrent::Concern::Logging::FATAL = T.let(T.unsafe(nil), Integer) + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:11 +Concurrent::Concern::Logging::INFO = T.let(T.unsafe(nil), Integer) + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:12 +Concurrent::Concern::Logging::SEV_LABEL = T.let(T.unsafe(nil), Array) + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:11 +Concurrent::Concern::Logging::UNKNOWN = T.let(T.unsafe(nil), Integer) + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:11 +Concurrent::Concern::Logging::WARN = T.let(T.unsafe(nil), Integer) + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:10 +module Concurrent::Concern::Obligation + include ::Concurrent::Concern::Dereferenceable + + # Has the obligation completed processing? + # + # @return [Boolean] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:49 + def complete?; end + + # @example allows Obligation to be risen + # rejected_ivar = Ivar.new.fail + # raise rejected_ivar + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:126 + def exception(*args); end + + # Has the obligation been fulfilled? + # + # @return [Boolean] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:20 + def fulfilled?; end + + # Is the obligation still awaiting completion of processing? + # + # @return [Boolean] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:56 + def incomplete?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:89 + def no_error!(timeout = T.unsafe(nil)); end + + # Is obligation completion still pending? + # + # @return [Boolean] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:35 + def pending?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:23 + def realized?; end + + # If an exception was raised during processing this will return the + # exception object. Will return `nil` when the state is pending or if + # the obligation has been successfully fulfilled. + # + # @return [Exception] the exception raised during processing or `nil` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:119 + def reason; end + + # Has the obligation been rejected? + # + # @return [Boolean] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:28 + def rejected?; end + + # The current state of the obligation. + # + # @return [Symbol] the current state + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:110 + def state; end + + # Is the obligation still unscheduled? + # + # @return [Boolean] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:42 + def unscheduled?; end + + # The current value of the obligation. Will be `nil` while the state is + # pending or the operation has been rejected. + # + # @param [Numeric] timeout the maximum time in seconds to wait. + # @return [Object] see Dereferenceable#deref + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:65 + def value(timeout = T.unsafe(nil)); end + + # The current value of the obligation. Will be `nil` while the state is + # pending or the operation has been rejected. Will re-raise any exceptions + # raised during processing (but will not raise an exception on timeout). + # + # @param [Numeric] timeout the maximum time in seconds to wait. + # @return [Object] see Dereferenceable#deref + # @raise [Exception] raises the reason when rejected + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:98 + def value!(timeout = T.unsafe(nil)); end + + # Wait until obligation is complete or the timeout has been reached. + # + # @param [Numeric] timeout the maximum time in seconds to wait. + # @return [Obligation] self + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:74 + def wait(timeout = T.unsafe(nil)); end + + # Wait until obligation is complete or the timeout is reached. Will re-raise + # any exceptions raised during processing (but will not raise an exception + # on timeout). + # + # @param [Numeric] timeout the maximum time in seconds to wait. + # @return [Obligation] self + # @raise [Exception] raises the reason when rejected + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:86 + def wait!(timeout = T.unsafe(nil)); end + + protected + + # Atomic compare and set operation + # State is set to `next_state` only if `current state == expected_current`. + # + # @param [Symbol] next_state + # @param [Symbol] expected_current + # + # @return [Boolean] true is state is changed, false otherwise + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:174 + def compare_and_set_state(next_state, *expected_current); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:145 + def event; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:134 + def get_arguments_from(opts = T.unsafe(nil)); end + + # Executes the block within mutex if current state is included in expected_states + # + # @return block value if executed, false otherwise + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:190 + def if_state(*expected_states); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:139 + def init_obligation; end + + # Am I in the current state? + # + # @param [Symbol] expected The state to check against + # @return [Boolean] true if in the expected state else false + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:210 + def ns_check_state?(expected); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:215 + def ns_set_state(value); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:150 + def set_state(success, value, reason); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/obligation.rb:161 + def state=(value); end +end + +# The [observer pattern](http://en.wikipedia.org/wiki/Observer_pattern) is one +# of the most useful design patterns. +# +# The workflow is very simple: +# - an `observer` can register itself to a `subject` via a callback +# - many `observers` can be registered to the same `subject` +# - the `subject` notifies all registered observers when its status changes +# - an `observer` can deregister itself when is no more interested to receive +# event notifications +# +# In a single threaded environment the whole pattern is very easy: the +# `subject` can use a simple data structure to manage all its subscribed +# `observer`s and every `observer` can react directly to every event without +# caring about synchronization. +# +# In a multi threaded environment things are more complex. The `subject` must +# synchronize the access to its data structure and to do so currently we're +# using two specialized ObserverSet: {Concurrent::Concern::CopyOnWriteObserverSet} +# and {Concurrent::Concern::CopyOnNotifyObserverSet}. +# +# When implementing and `observer` there's a very important rule to remember: +# **there are no guarantees about the thread that will execute the callback** +# +# Let's take this example +# ``` +# class Observer +# def initialize +# @count = 0 +# end +# +# def update +# @count += 1 +# end +# end +# +# obs = Observer.new +# [obj1, obj2, obj3, obj4].each { |o| o.add_observer(obs) } +# # execute [obj1, obj2, obj3, obj4] +# ``` +# +# `obs` is wrong because the variable `@count` can be accessed by different +# threads at the same time, so it should be synchronized (using either a Mutex +# or an AtomicFixum) +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:50 +module Concurrent::Concern::Observable + # @!macro observable_add_observer + # + # Adds an observer to this set. If a block is passed, the observer will be + # created by this method and no other params should be passed. + # + # @param [Object] observer the observer to add + # @param [Symbol] func the function to call on the observer during notification. + # Default is :update + # @return [Object] the added observer + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:61 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # @!macro observable_count_observers + # + # Return the number of observers associated with this object. + # + # @return [Integer] the observers count + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:101 + def count_observers; end + + # @!macro observable_delete_observer + # + # Remove `observer` as an observer on this object so that it will no + # longer receive notifications. + # + # @param [Object] observer the observer to remove + # @return [Object] the deleted observer + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:82 + def delete_observer(observer); end + + # @!macro observable_delete_observers + # + # Remove all observers associated with this object. + # + # @return [Observable] self + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:91 + def delete_observers; end + + # As `#add_observer` but can be used for chaining. + # + # @param [Object] observer the observer to add + # @param [Symbol] func the function to call on the observer during notification. + # @return [Observable] self + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:70 + def with_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + protected + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:107 + def observers; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/observable.rb:107 + def observers=(_arg0); end +end + +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:70 +class Concurrent::ConcurrentUpdateError < ::ThreadError; end + +# frozen pre-allocated backtrace to speed ConcurrentUpdateError +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:72 +Concurrent::ConcurrentUpdateError::CONC_UP_ERR_BACKTRACE = T.let(T.unsafe(nil), Array) + +# Raised when errors occur during configuration. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:6 +class Concurrent::ConfigurationError < ::Concurrent::Error; end + +# @!macro count_down_latch +# +# A synchronization object that allows one thread to wait on multiple other threads. +# The thread that will wait creates a `CountDownLatch` and sets the initial value +# (normally equal to the number of other threads). The initiating thread passes the +# latch to the other threads then waits for the other threads by calling the `#wait` +# method. Each of the other threads calls `#count_down` when done with its work. +# When the latch counter reaches zero the waiting thread is unblocked and continues +# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. +# +# @!macro count_down_latch_public_api +# @example Waiter and Decrementer +# latch = Concurrent::CountDownLatch.new(3) +# +# waiter = Thread.new do +# latch.wait() +# puts ("Waiter released") +# end +# +# decrementer = Thread.new do +# sleep(1) +# latch.count_down +# puts latch.count +# +# sleep(1) +# latch.count_down +# puts latch.count +# +# sleep(1) +# latch.count_down +# puts latch.count +# end +# +# [waiter, decrementer].each(&:join) +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb:98 +class Concurrent::CountDownLatch < ::Concurrent::MutexCountDownLatch; end + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb:56 +Concurrent::CountDownLatchImplementation = Concurrent::MutexCountDownLatch + +# A synchronization aid that allows a set of threads to all wait for each +# other to reach a common barrier point. +# @example +# barrier = Concurrent::CyclicBarrier.new(3) +# jobs = Array.new(3) { |i| -> { sleep i; p done: i } } +# process = -> (i) do +# # waiting to start at the same time +# barrier.wait +# # execute job +# jobs[i].call +# # wait for others to finish +# barrier.wait +# end +# threads = 2.times.map do |i| +# Thread.new(i, &process) +# end +# +# # use main as well +# process.call 2 +# +# # here we can be sure that all jobs are processed +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:27 +class Concurrent::CyclicBarrier < ::Concurrent::Synchronization::LockableObject + # Create a new `CyclicBarrier` that waits for `parties` threads + # + # @param [Fixnum] parties the number of parties + # @yield an optional block that will be executed that will be executed after + # the last thread arrives and before the others are released + # + # @raise [ArgumentError] if `parties` is not an integer or is less than zero + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:40 + def initialize(parties, &block); end + + # A barrier can be broken when: + # - a thread called the `reset` method while at least one other thread was waiting + # - at least one thread timed out on `wait` method + # + # A broken barrier can be restored using `reset` it's safer to create a new one + # @return [Boolean] true if the barrier is broken otherwise false + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:105 + def broken?; end + + # @return [Fixnum] the number of threads currently waiting on the barrier + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:54 + def number_waiting; end + + # @return [Fixnum] the number of threads needed to pass the barrier + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:49 + def parties; end + + # resets the barrier to its initial state + # If there is at least one waiting thread, it will be woken up, the `wait` + # method will return false and the barrier will be broken + # If the barrier is broken, this method restores it to the original state + # + # @return [nil] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:95 + def reset; end + + # Blocks on the barrier until the number of waiting threads is equal to + # `parties` or until `timeout` is reached or `reset` is called + # If a block has been passed to the constructor, it will be executed once by + # the last arrived thread before releasing the others + # @param [Fixnum] timeout the number of seconds to wait for the counter or + # `nil` to block indefinitely + # @return [Boolean] `true` if the `count` reaches zero else false on + # `timeout` or on `reset` or if the barrier is broken + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:66 + def wait(timeout = T.unsafe(nil)); end + + protected + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:111 + def ns_generation_done(generation, status, continue = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:122 + def ns_initialize(parties, &block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:117 + def ns_next_generation; end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:30 +class Concurrent::CyclicBarrier::Generation < ::Struct + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:30 + def status; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:30 + def status=(_); end + + class << self + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:30 + def [](*_arg0); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:30 + def inspect; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:30 + def keyword_init?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:30 + def members; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb:30 + def new(*_arg0); end + end +end + +# Lazy evaluation of a block yielding an immutable result. Useful for +# expensive operations that may never be needed. It may be non-blocking, +# supports the `Concern::Obligation` interface, and accepts the injection of +# custom executor upon which to execute the block. Processing of +# block will be deferred until the first time `#value` is called. +# At that time the caller can choose to return immediately and let +# the block execute asynchronously, block indefinitely, or block +# with a timeout. +# +# When a `Delay` is created its state is set to `pending`. The value and +# reason are both `nil`. The first time the `#value` method is called the +# enclosed operation will be run and the calling thread will block. Other +# threads attempting to call `#value` will block as well. Once the operation +# is complete the *value* will be set to the result of the operation or the +# *reason* will be set to the raised exception, as appropriate. All threads +# blocked on `#value` will return. Subsequent calls to `#value` will immediately +# return the cached value. The operation will only be run once. This means that +# any side effects created by the operation will only happen once as well. +# +# `Delay` includes the `Concurrent::Concern::Dereferenceable` mixin to support thread +# safety of the reference returned by `#value`. +# +# @!macro copy_options +# +# @!macro delay_note_regarding_blocking +# @note The default behavior of `Delay` is to block indefinitely when +# calling either `value` or `wait`, executing the delayed operation on +# the current thread. This makes the `timeout` value completely +# irrelevant. To enable non-blocking behavior, use the `executor` +# constructor option. This will cause the delayed operation to be +# execute on the given executor, allowing the call to timeout. +# +# @see Concurrent::Concern::Dereferenceable +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:44 +class Concurrent::Delay < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Obligation + + # Create a new `Delay` in the `:pending` state. + # + # @!macro executor_and_deref_options + # + # @yield the delayed operation to perform + # + # @raise [ArgumentError] if no block is given + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:62 + def initialize(opts = T.unsafe(nil), &block); end + + # Reconfigures the block returning the value if still `#incomplete?` + # + # @yield the delayed operation to perform + # @return [true, false] if success + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:146 + def reconfigure(&block); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. If the delayed operation + # raised an exception this method will return nil. The exception object + # can be accessed via the `#reason` method. + # + # @param [Numeric] timeout the maximum number of seconds to wait + # @return [Object] the current value of the object + # + # @!macro delay_note_regarding_blocking + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:77 + def value(timeout = T.unsafe(nil)); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. If the delayed operation + # raised an exception, this method will raise that exception (even when) + # the operation has already been executed). + # + # @param [Numeric] timeout the maximum number of seconds to wait + # @return [Object] the current value of the object + # @raise [Exception] when `#rejected?` raises `#reason` + # + # @!macro delay_note_regarding_blocking + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:113 + def value!(timeout = T.unsafe(nil)); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. + # + # @param [Integer] timeout (nil) the maximum number of seconds to wait for + # the value to be computed. When `nil` the caller will block indefinitely. + # + # @return [Object] self + # + # @!macro delay_note_regarding_blocking + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:132 + def wait(timeout = T.unsafe(nil)); end + + protected + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:160 + def ns_initialize(opts, &block); end + + private + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/delay.rb:173 + def execute_task_once; end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:7 +class Concurrent::DependencyCounter + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:9 + def initialize(count, &block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/dataflow.rb:14 + def update(time, value, reason); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:3 +class Concurrent::Error < ::StandardError; end + +# Old school kernel-style event reminiscent of Win32 programming in C++. +# +# When an `Event` is created it is in the `unset` state. Threads can choose to +# `#wait` on the event, blocking until released by another thread. When one +# thread wants to alert all blocking threads it calls the `#set` method which +# will then wake up all listeners. Once an `Event` has been set it remains set. +# New threads calling `#wait` will return immediately. An `Event` may be +# `#reset` at any time once it has been set. +# +# @see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682655.aspx +# @example +# event = Concurrent::Event.new +# +# t1 = Thread.new do +# puts "t1 is waiting" +# event.wait(1) +# puts "event occurred" +# end +# +# t2 = Thread.new do +# puts "t2 calling set" +# event.set +# end +# +# [t1, t2].each(&:join) +# +# # prints: +# # t1 is waiting +# # t2 calling set +# # event occurred +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/event.rb:36 +class Concurrent::Event < ::Concurrent::Synchronization::LockableObject + # Creates a new `Event` in the unset state. Threads calling `#wait` on the + # `Event` will block. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/event.rb:40 + def initialize; end + + # Reset a previously set event back to the `unset` state. + # Has no effect if the `Event` has not yet been set. + # + # @return [Boolean] should always return `true` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/event.rb:68 + def reset; end + + # Trigger the event, setting the state to `set` and releasing all threads + # waiting on the event. Has no effect if the `Event` has already been set. + # + # @return [Boolean] should always return `true` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/event.rb:56 + def set; end + + # Is the object in the set state? + # + # @return [Boolean] indicating whether or not the `Event` has been set + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/event.rb:48 + def set?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/event.rb:60 + def try?; end + + # Wait a given number of seconds for the `Event` to be set by another + # thread. Will wait forever when no `timeout` value is given. Returns + # immediately if the `Event` has already been set. + # + # @return [Boolean] true if the `Event` was set before timeout else false + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/event.rb:83 + def wait(timeout = T.unsafe(nil)); end + + protected + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/event.rb:104 + def ns_initialize; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/event.rb:96 + def ns_set; end +end + +# @!macro exchanger +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:336 +class Concurrent::Exchanger < ::Concurrent::RubyExchanger; end + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:327 +Concurrent::ExchangerImplementation = Concurrent::RubyExchanger + +# @!macro executor_service_public_api +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/executor_service.rb:157 +module Concurrent::ExecutorService + include ::Concurrent::Concern::Logging + + # @!macro executor_service_method_left_shift + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/executor_service.rb:166 + def <<(task); end + + # @!macro executor_service_method_can_overflow_question + # + # @note Always returns `false` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/executor_service.rb:174 + def can_overflow?; end + + # @!macro executor_service_method_post + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/executor_service.rb:161 + def post(*args, &task); end + + # @!macro executor_service_method_serialized_question + # + # @note Always returns `false` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/executor_service.rb:181 + def serialized?; end +end + +# A `FiberLocalVar` is a variable where the value is different for each fiber. +# Each variable may have a default value, but when you modify the variable only +# the current fiber will ever see that change. +# +# This is similar to Ruby's built-in fiber-local variables (`Thread.current[:name]`), +# but with these major advantages: +# * `FiberLocalVar` has its own identity, it doesn't need a Symbol. +# * Each Ruby's built-in fiber-local variable leaks some memory forever (it's a Symbol held forever on the fiber), +# so it's only OK to create a small amount of them. +# `FiberLocalVar` has no such issue and it is fine to create many of them. +# * Ruby's built-in fiber-local variables leak forever the value set on each fiber (unless set to nil explicitly). +# `FiberLocalVar` automatically removes the mapping for each fiber once the `FiberLocalVar` instance is GC'd. +# +# @example +# v = FiberLocalVar.new(14) +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# +# @example +# v = FiberLocalVar.new(14) +# +# Fiber.new do +# v.value #=> 14 +# v.value = 1 +# v.value #=> 1 +# end.resume +# +# Fiber.new do +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# end.resume +# +# v.value #=> 14 +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb:41 +class Concurrent::FiberLocalVar + # Creates a fiber local variable. + # + # @param [Object] default the default value when otherwise unset + # @param [Proc] default_block Optional block that gets called to obtain the + # default value for each fiber + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb:49 + def initialize(default = T.unsafe(nil), &default_block); end + + # Bind the given value to fiber local storage during + # execution of the given block. + # + # @param [Object] value the value to bind + # @yield the operation to be performed with the bound variable + # @return [Object] the value + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb:86 + def bind(value); end + + # Returns the value in the current fiber's copy of this fiber-local variable. + # + # @return [Object] the current value + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb:68 + def value; end + + # Sets the current fiber's copy of this fiber-local variable to the specified value. + # + # @param [Object] value the value to set + # @return [Object] the new value + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb:76 + def value=(value); end + + protected + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb:101 + def default; end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb:42 +Concurrent::FiberLocalVar::LOCALS = T.let(T.unsafe(nil), Concurrent::FiberLocals) + +# @!visibility private +# @!macro internal_implementation_note +# An array-backed storage of indexed variables per fiber. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:166 +class Concurrent::FiberLocals < ::Concurrent::AbstractLocals + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:167 + def locals; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:171 + def locals!; end +end + +# @!macro fixed_thread_pool +# +# A thread pool that reuses a fixed number of threads operating off an unbounded queue. +# At any point, at most `num_threads` will be active processing tasks. When all threads are busy new +# tasks `#post` to the thread pool are enqueued until a thread becomes available. +# Should a thread crash for any reason the thread will immediately be removed +# from the pool and replaced. +# +# The API and behavior of this class are based on Java's `FixedThreadPool` +# +# @!macro thread_pool_options +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb:199 +class Concurrent::FixedThreadPool < ::Concurrent::ThreadPoolExecutor + # @!macro fixed_thread_pool_method_initialize + # + # Create a new thread pool. + # + # @param [Integer] num_threads the number of threads to allocate + # @param [Hash] opts the options defining pool behavior. + # @option opts [Symbol] :fallback_policy (`:abort`) the fallback policy + # + # @raise [ArgumentError] if `num_threads` is less than or equal to zero + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool-int- + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb:213 + def initialize(num_threads, opts = T.unsafe(nil)); end +end + +# {include:file:docs-source/future.md} +# +# @!macro copy_options +# +# @see http://ruby-doc.org/stdlib-2.1.1/libdoc/observer/rdoc/Observable.html Ruby Observable module +# @see http://clojuredocs.org/clojure_core/clojure.core/future Clojure's future function +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html java.util.concurrent.Future +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/future.rb:21 +class Concurrent::Future < ::Concurrent::IVar + # Create a new `Future` in the `:unscheduled` state. + # + # @yield the asynchronous operation to perform + # + # @!macro executor_and_deref_options + # + # @option opts [object, Array] :args zero or more arguments to be passed the task + # block on execution + # + # @raise [ArgumentError] if no block is given + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/future.rb:33 + def initialize(opts = T.unsafe(nil), &block); end + + # Attempt to cancel the operation if it has not already processed. + # The operation can only be cancelled while still `pending`. It cannot + # be cancelled once it has begun processing or has completed. + # + # @return [Boolean] was the operation successfully cancelled. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/future.rb:99 + def cancel; end + + # Has the operation been successfully cancelled? + # + # @return [Boolean] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/future.rb:111 + def cancelled?; end + + # Execute an `:unscheduled` `Future`. Immediately sets the state to `:pending` and + # passes the block to a new thread/thread pool for eventual execution. + # Does nothing if the `Future` is in any state other than `:unscheduled`. + # + # @return [Future] a reference to `self` + # + # @example Instance and execute in separate steps + # future = Concurrent::Future.new{ sleep(1); 42 } + # future.state #=> :unscheduled + # future.execute + # future.state #=> :pending + # + # @example Instance and execute in one line + # future = Concurrent::Future.new{ sleep(1); 42 }.execute + # future.state #=> :pending + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/future.rb:53 + def execute; end + + # @!macro ivar_set_method + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/future.rb:82 + def set(value = T.unsafe(nil), &block); end + + # Wait the given number of seconds for the operation to complete. + # On timeout attempt to cancel the operation. + # + # @param [Numeric] timeout the maximum time in seconds to wait. + # @return [Boolean] true if the operation completed before the timeout + # else false + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/future.rb:121 + def wait_or_cancel(timeout); end + + protected + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/future.rb:133 + def ns_initialize(value, opts); end + + class << self + # Create a new `Future` object with the given block, execute it, and return the + # `:pending` object. + # + # @yield the asynchronous operation to perform + # + # @!macro executor_and_deref_options + # + # @option opts [object, Array] :args zero or more arguments to be passed the task + # block on execution + # + # @raise [ArgumentError] if no block is given + # + # @return [Future] the newly created `Future` in the `:pending` state + # + # @example + # future = Concurrent::Future.execute{ sleep(1); 42 } + # future.state #=> :pending + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/future.rb:77 + def execute(opts = T.unsafe(nil), &block); end + end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:18 +Concurrent::GLOBAL_FAST_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:30 +Concurrent::GLOBAL_IMMEDIATE_EXECUTOR = T.let(T.unsafe(nil), Concurrent::ImmediateExecutor) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:22 +Concurrent::GLOBAL_IO_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:111 +Concurrent::GLOBAL_LOGGER = T.let(T.unsafe(nil), Concurrent::AtomicReference) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/configuration.rb:26 +Concurrent::GLOBAL_TIMER_SET = T.let(T.unsafe(nil), Concurrent::Delay) + +# @!macro concurrent_hash +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/hash.rb:49 +class Concurrent::Hash < ::Hash; end + +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/hash.rb:16 +Concurrent::HashImplementation = Hash + +# An `IVar` is like a future that you can assign. As a future is a value that +# is being computed that you can wait on, an `IVar` is a value that is waiting +# to be assigned, that you can wait on. `IVars` are single assignment and +# deterministic. +# +# Then, express futures as an asynchronous computation that assigns an `IVar`. +# The `IVar` becomes the primitive on which [futures](Future) and +# [dataflow](Dataflow) are built. +# +# An `IVar` is a single-element container that is normally created empty, and +# can only be set once. The I in `IVar` stands for immutable. Reading an +# `IVar` normally blocks until it is set. It is safe to set and read an `IVar` +# from different threads. +# +# If you want to have some parallel task set the value in an `IVar`, you want +# a `Future`. If you want to create a graph of parallel tasks all executed +# when the values they depend on are ready you want `dataflow`. `IVar` is +# generally a low-level primitive. +# +# ## Examples +# +# Create, set and get an `IVar` +# +# ```ruby +# ivar = Concurrent::IVar.new +# ivar.set 14 +# ivar.value #=> 14 +# ivar.set 2 # would now be an error +# ``` +# +# ## See Also +# +# 1. For the theory: Arvind, R. Nikhil, and K. Pingali. +# [I-Structures: Data structures for parallel computing](http://dl.acm.org/citation.cfm?id=69562). +# In Proceedings of Workshop on Graph Reduction, 1986. +# 2. For recent application: +# [DataDrivenFuture in Habanero Java from Rice](http://www.cs.rice.edu/~vs3/hjlib/doc/edu/rice/hj/api/HjDataDrivenFuture.html). +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:48 +class Concurrent::IVar < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Obligation + include ::Concurrent::Concern::Observable + + # Create a new `IVar` in the `:pending` state with the (optional) initial value. + # + # @param [Object] value the initial value + # @param [Hash] opts the options to create a message with + # @option opts [String] :dup_on_deref (false) call `#dup` before returning + # the data + # @option opts [String] :freeze_on_deref (false) call `#freeze` before + # returning the data + # @option opts [String] :copy_on_deref (nil) call the given `Proc` passing + # the internal value and returning the value returned from the proc + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:62 + def initialize(value = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # Add an observer on this object that will receive notification on update. + # + # Upon completion the `IVar` will notify all observers in a thread-safe way. + # The `func` method of the observer will be called with three arguments: the + # `Time` at which the `Future` completed the asynchronous operation, the + # final `value` (or `nil` on rejection), and the final `reason` (or `nil` on + # fulfillment). + # + # @param [Object] observer the object that will be notified of changes + # @param [Symbol] func symbol naming the method to call when this + # `Observable` has changes` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:81 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # @!macro ivar_fail_method + # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. + # + # @param [Object] reason for the failure + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @return [IVar] self + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:135 + def fail(reason = T.unsafe(nil)); end + + # @!macro ivar_set_method + # Set the `IVar` to a value and wake or notify all threads waiting on it. + # + # @!macro ivar_set_parameters_and_exceptions + # @param [Object] value the value to store in the `IVar` + # @yield A block operation to use for setting the value + # @raise [ArgumentError] if both a value and a block are given + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # + # @return [IVar] self + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:113 + def set(value = T.unsafe(nil)); end + + # Attempt to set the `IVar` with the given value or block. Return a + # boolean indicating the success or failure of the set operation. + # + # @!macro ivar_set_parameters_and_exceptions + # + # @return [Boolean] true if the value was set else false + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:145 + def try_set(value = T.unsafe(nil), &block); end + + protected + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:202 + def check_for_block_or_value!(block_given, value); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:177 + def complete(success, value, reason); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:184 + def complete_without_notification(success, value, reason); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:190 + def notify_observers(value, reason); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:195 + def ns_complete_without_notification(success, value, reason); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:155 + def ns_initialize(value, opts); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/ivar.rb:168 + def safe_execute(task, args = T.unsafe(nil)); end +end + +# Raised when an operation is attempted which is not legal given the +# receiver's current state +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:20 +class Concurrent::IllegalOperationError < ::Concurrent::Error; end + +# An executor service which runs all operations on the current thread, +# blocking as necessary. Operations are performed in the order they are +# received and no two operations can be performed simultaneously. +# +# This executor service exists mainly for testing an debugging. When used +# it immediately runs every `#post` operation on the current thread, blocking +# that thread until the operation is complete. This can be very beneficial +# during testing because it makes all operations deterministic. +# +# @note Intended for use primarily in testing and debugging. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:17 +class Concurrent::ImmediateExecutor < ::Concurrent::AbstractExecutorService + include ::Concurrent::SerialExecutorService + + # Creates a new executor + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:21 + def initialize; end + + # @!macro executor_service_method_left_shift + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:34 + def <<(task); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:59 + def kill; end + + # @!macro executor_service_method_post + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:26 + def post(*args, &task); end + + # @!macro executor_service_method_running_question + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:40 + def running?; end + + # @!macro executor_service_method_shutdown + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:55 + def shutdown; end + + # @!macro executor_service_method_shutdown_question + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:50 + def shutdown?; end + + # @!macro executor_service_method_shuttingdown_question + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:45 + def shuttingdown?; end + + # @!macro executor_service_method_wait_for_termination + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/immediate_executor.rb:62 + def wait_for_termination(timeout = T.unsafe(nil)); end +end + +# Raised when an attempt is made to violate an immutability guarantee. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:16 +class Concurrent::ImmutabilityError < ::Concurrent::Error; end + +# A thread-safe, immutable variation of Ruby's standard `Struct`. +# +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:9 +module Concurrent::ImmutableStruct + include ::Concurrent::Synchronization::AbstractStruct + + # @!macro struct_equality + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:51 + def ==(other); end + + # @!macro struct_get + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:46 + def [](member); end + + # @!macro struct_each + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:56 + def each(&block); end + + # @!macro struct_each_pair + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:62 + def each_pair(&block); end + + # @!macro struct_inspect + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:29 + def inspect; end + + # @!macro struct_merge + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:36 + def merge(other, &block); end + + # @!macro struct_select + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:68 + def select(&block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:21 + def to_a; end + + # @!macro struct_to_h + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:41 + def to_h; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:33 + def to_s; end + + # @!macro struct_values + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:17 + def values; end + + # @!macro struct_values_at + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:24 + def values_at(*indexes); end + + private + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:76 + def initialize_copy(original); end + + class << self + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:12 + def included(base); end + + # @!macro struct_new + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:82 + def new(*args, &block); end + end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/immutable_struct.rb:92 +Concurrent::ImmutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + +# An executor service which runs all operations on a new thread, blocking +# until it completes. Operations are performed in the order they are received +# and no two operations can be performed simultaneously. +# +# This executor service exists mainly for testing an debugging. When used it +# immediately runs every `#post` operation on a new thread, blocking the +# current thread until the operation is complete. This is similar to how the +# ImmediateExecutor works, but the operation has the full stack of the new +# thread at its disposal. This can be helpful when the operations will spawn +# more operations on the same executor and so on - such a situation might +# overflow the single stack in case of an ImmediateExecutor, which is +# inconsistent with how it would behave for a threaded executor. +# +# @note Intended for use primarily in testing and debugging. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb:19 +class Concurrent::IndirectImmediateExecutor < ::Concurrent::ImmediateExecutor + # Creates a new executor + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb:21 + def initialize; end + + # @!macro executor_service_method_post + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb:27 + def post(*args, &task); end +end + +# Raised when an object's methods are called when it has not been +# properly initialized. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:24 +class Concurrent::InitializationError < ::Concurrent::Error; end + +# Raised when a lifecycle method (such as `stop`) is called in an improper +# sequence or when the object is in an inappropriate state. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:13 +class Concurrent::LifecycleError < ::Concurrent::Error; end + +# @!macro warn.edge +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:6 +class Concurrent::LockFreeStack < ::Concurrent::Synchronization::Object + include ::Enumerable + extend ::Concurrent::Synchronization::SafeInitialization + + # @param [Node] head + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:51 + def initialize(head = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:37 + def __initialize_atomic_fields__; end + + # @return [true, false] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:118 + def clear; end + + # @return [self] + # @yield over the cleared stack + # @yieldparam [Object] value + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:142 + def clear_each(&block); end + + # @param [Node] head + # @return [true, false] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:128 + def clear_if(head); end + + # @param [Node] head + # @return [true, false] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:99 + def compare_and_clear(head); end + + # @param [Node] head + # @return [true, false] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:85 + def compare_and_pop(head); end + + # @param [Node] head + # @param [Object] value + # @return [true, false] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:65 + def compare_and_push(head, value); end + + # @param [Node] head + # @return [self] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:107 + def each(head = T.unsafe(nil)); end + + # @param [Node] head + # @return [true, false] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:58 + def empty?(head = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:158 + def inspect; end + + # @return [Node] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:79 + def peek; end + + # @return [Object] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:90 + def pop; end + + # @param [Object] value + # @return [self] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:71 + def push(value); end + + # @param [Node] head + # @param [Node] new_head + # @return [true, false] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:135 + def replace_if(head, new_head); end + + # @return [String] Short string representation. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:154 + def to_s; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:37 + def compare_and_set_head(expected, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:37 + def head; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:37 + def head=(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:37 + def swap_head(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:37 + def update_head(&block); end + + class << self + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:41 + def of1(value); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:46 + def of2(value1, value2); end + end +end + +# The singleton for empty node +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:32 +Concurrent::LockFreeStack::EMPTY = T.let(T.unsafe(nil), Concurrent::LockFreeStack::Node) + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:10 +class Concurrent::LockFreeStack::Node + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:23 + def initialize(value, next_node); end + + # @return [Node] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:14 + def next_node; end + + # @return [Object] + # @!visibility private + # allow to nil-ify to free GC when the entry is no longer relevant, not synchronised + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:17 + def value; end + + # @return [Object] + # @!visibility private + # allow to nil-ify to free GC when the entry is no longer relevant, not synchronised + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:21 + def value=(_arg0); end + + class << self + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb:28 + def [](*_arg0); end + end +end + +# Either {FiberLocalVar} or {ThreadLocalVar} depending on whether Mutex (and Monitor) +# are held, respectively, per Fiber or per Thread. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb:22 +Concurrent::LockLocalVar = Concurrent::FiberLocalVar + +# An `MVar` is a synchronized single element container. They are empty or +# contain one item. Taking a value from an empty `MVar` blocks, as does +# putting a value into a full one. You can either think of them as blocking +# queue of length one, or a special kind of mutable variable. +# +# On top of the fundamental `#put` and `#take` operations, we also provide a +# `#modify` that is atomic with respect to operations on the same instance. +# These operations all support timeouts. +# +# We also support non-blocking operations `#try_put!` and `#try_take!`, a +# `#set!` that ignores existing values, a `#value` that returns the value +# without removing it or returns `MVar::EMPTY`, and a `#modify!` that yields +# `MVar::EMPTY` if the `MVar` is empty and can be used to set `MVar::EMPTY`. +# You shouldn't use these operations in the first instance. +# +# `MVar` is a [Dereferenceable](Dereferenceable). +# +# `MVar` is related to M-structures in Id, `MVar` in Haskell and `SyncVar` in Scala. +# +# Note that unlike the original Haskell paper, our `#take` is blocking. This is how +# Haskell and Scala do it today. +# +# @!macro copy_options +# +# ## See Also +# +# 1. P. Barth, R. Nikhil, and Arvind. [M-Structures: Extending a parallel, non- strict, functional language with state](http://dl.acm.org/citation.cfm?id=652538). In Proceedings of the 5th +# ACM Conference on Functional Programming Languages and Computer Architecture (FPCA), 1991. +# +# 2. S. Peyton Jones, A. Gordon, and S. Finne. [Concurrent Haskell](http://dl.acm.org/citation.cfm?id=237794). +# In Proceedings of the 23rd Symposium on Principles of Programming Languages +# (PoPL), 1996. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:38 +class Concurrent::MVar < ::Concurrent::Synchronization::Object + include ::Concurrent::Concern::Dereferenceable + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `MVar`, either empty or with an initial value. + # + # @param [Hash] opts the options controlling how the future will be processed + # + # @!macro deref_options + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:54 + def initialize(value = T.unsafe(nil), opts = T.unsafe(nil)); end + + # acquires lock on the from an `MVAR`, yields the value to provided block, + # and release lock. A timeout can be set to limit the time spent blocked, + # in which case it returns `TIMEOUT` if the time is exceeded. + # @return [Object] the value returned by the block, or `TIMEOUT` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:86 + def borrow(timeout = T.unsafe(nil)); end + + # Returns if the `MVar` is currently empty. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:195 + def empty?; end + + # Returns if the `MVar` currently contains a value. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:200 + def full?; end + + # Atomically `take`, yield the value to a block for transformation, and then + # `put` the transformed value. Returns the pre-transform value. A timeout can + # be set to limit the time spent blocked, in which case it returns `TIMEOUT` + # if the time is exceeded. + # @return [Object] the pre-transform value, or `TIMEOUT` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:123 + def modify(timeout = T.unsafe(nil)); end + + # Non-blocking version of `modify` that will yield with `EMPTY` if there is no value yet. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:179 + def modify!; end + + # Put a value into an `MVar`, blocking if there is already a value until + # it is empty. A timeout can be set to limit the time spent blocked, in + # which case it returns `TIMEOUT` if the time is exceeded. + # @return [Object] the value that was put, or `TIMEOUT` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:103 + def put(value, timeout = T.unsafe(nil)); end + + # Non-blocking version of `put` that will overwrite an existing value. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:169 + def set!(value); end + + # Remove the value from an `MVar`, leaving it empty, and blocking if there + # isn't a value. A timeout can be set to limit the time spent blocked, in + # which case it returns `TIMEOUT` if the time is exceeded. + # @return [Object] the value that was taken, or `TIMEOUT` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:66 + def take(timeout = T.unsafe(nil)); end + + # Non-blocking version of `put`, that returns whether or not it was successful. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:156 + def try_put!(value); end + + # Non-blocking version of `take`, that returns `EMPTY` instead of blocking. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:142 + def try_take!; end + + protected + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:206 + def synchronize(&block); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:212 + def unlocked_empty?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:216 + def unlocked_full?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:224 + def wait_for_empty(timeout); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:220 + def wait_for_full(timeout); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:228 + def wait_while(condition, timeout); end +end + +# Unique value that represents that an `MVar` was empty +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:43 +Concurrent::MVar::EMPTY = T.let(T.unsafe(nil), Object) + +# Unique value that represents that an `MVar` timed out before it was able +# to produce a value. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mvar.rb:47 +Concurrent::MVar::TIMEOUT = T.let(T.unsafe(nil), Object) + +# `Concurrent::Map` is a hash-like object and should have much better performance +# characteristics, especially under high concurrency, than `Concurrent::Hash`. +# However, `Concurrent::Map `is not strictly semantically equivalent to a ruby `Hash` +# -- for instance, it does not necessarily retain ordering by insertion time as `Hash` +# does. For most uses it should do fine though, and we recommend you consider +# `Concurrent::Map` instead of `Concurrent::Hash` for your concurrency-safe hash needs. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:39 +class Concurrent::Map < ::Concurrent::Collection::MriMapBackend + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:279 + def each; end + + # Iterates over each key. + # @yield for each key in the map + # @yieldparam key [Object] + # @return [self] + # @!macro map.atomic_method_with_block + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:255 + def each_key; end + + # Iterates over each key value pair. + # @yield for each key value pair in the map + # @yieldparam key [Object] + # @yieldparam value [Object] + # @return [self] + # @!macro map.atomic_method_with_block + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:274 + def each_pair; end + + # Iterates over each value. + # @yield for each value in the map + # @yieldparam value [Object] + # @return [self] + # @!macro map.atomic_method_with_block + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:264 + def each_value; end + + # Is map empty? + # @return [true, false] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:291 + def empty?; end + + # Get a value with key, or default_value when key is absent, + # or fail when no default_value is given. + # @param [Object] key + # @param [Object] default_value + # @yield default value for a key + # @yieldparam key [Object] + # @yieldreturn [Object] default value + # @return [Object] the value or default value + # @raise [KeyError] when key is missing and no default_value is provided + # @!macro map_method_not_atomic + # @note The "fetch-then-act" methods of `Map` are not atomic. `Map` is intended + # to be use as a concurrency primitive with strong happens-before + # guarantees. It is not intended to be used as a high-level abstraction + # supporting complex operations. All read and write operations are + # thread safe, but no guarantees are made regarding race conditions + # between the fetch operation and yielding to the block. Additionally, + # this method does not support recursion. This is due to internal + # constraints that are very unlikely to change in the near future. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:183 + def fetch(key, default_value = T.unsafe(nil)); end + + # Fetch value with key, or store default value when key is absent, + # or fail when no default_value is given. This is a two step operation, + # therefore not atomic. The store can overwrite other concurrently + # stored value. + # @param [Object] key + # @param [Object] default_value + # @yield default value for a key + # @yieldparam key [Object] + # @yieldreturn [Object] default value + # @return [Object] the value or default value + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:205 + def fetch_or_store(key, default_value = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:162 + def get(key); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:321 + def inspect; end + + # Find key of a value. + # @param [Object] value + # @return [Object, nil] key or nil when not found + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:284 + def key(value); end + + # All keys + # @return [::Array] keys + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:236 + def keys; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:305 + def marshal_dump; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:313 + def marshal_load(hash); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:163 + def put(key, value); end + + # Insert value into map with key if key is absent in one atomic step. + # @param [Object] key + # @param [Object] value + # @return [Object, nil] the previous value when key was present or nil when there was no key + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:215 + def put_if_absent(key, value); end + + # Is the value stored in the map. Iterates over all values. + # @param [Object] value + # @return [true, false] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:227 + def value?(value); end + + # All values + # @return [::Array] values + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:244 + def values; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:331 + def initialize_copy(other); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:336 + def populate_from(hash); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:327 + def raise_fetch_no_key; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/map.rb:341 + def validate_options_hash!(options); end +end + +# Raised when an object with a start/stop lifecycle has been started an +# excessive number of times. Often used in conjunction with a restart +# policy or strategy. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:29 +class Concurrent::MaxRestartFrequencyError < ::Concurrent::Error; end + +# A `Maybe` encapsulates an optional value. A `Maybe` either contains a value +# of (represented as `Just`), or it is empty (represented as `Nothing`). Using +# `Maybe` is a good way to deal with errors or exceptional cases without +# resorting to drastic measures such as exceptions. +# +# `Maybe` is a replacement for the use of `nil` with better type checking. +# +# For compatibility with {Concurrent::Concern::Obligation} the predicate and +# accessor methods are aliased as `fulfilled?`, `rejected?`, `value`, and +# `reason`. +# +# ## Motivation +# +# A common pattern in languages with pattern matching, such as Erlang and +# Haskell, is to return *either* a value *or* an error from a function +# Consider this Erlang code: +# +# ```erlang +# case file:consult("data.dat") of +# {ok, Terms} -> do_something_useful(Terms); +# {error, Reason} -> lager:error(Reason) +# end. +# ``` +# +# In this example the standard library function `file:consult` returns a +# [tuple](http://erlang.org/doc/reference_manual/data_types.html#id69044) +# with two elements: an [atom](http://erlang.org/doc/reference_manual/data_types.html#id64134) +# (similar to a ruby symbol) and a variable containing ancillary data. On +# success it returns the atom `ok` and the data from the file. On failure it +# returns `error` and a string with an explanation of the problem. With this +# pattern there is no ambiguity regarding success or failure. If the file is +# empty the return value cannot be misinterpreted as an error. And when an +# error occurs the return value provides useful information. +# +# In Ruby we tend to return `nil` when an error occurs or else we raise an +# exception. Both of these idioms are problematic. Returning `nil` is +# ambiguous because `nil` may also be a valid value. It also lacks +# information pertaining to the nature of the error. Raising an exception +# is both expensive and usurps the normal flow of control. All of these +# problems can be solved with the use of a `Maybe`. +# +# A `Maybe` is unambiguous with regard to whether or not it contains a value. +# When `Just` it contains a value, when `Nothing` it does not. When `Just` +# the value it contains may be `nil`, which is perfectly valid. When +# `Nothing` the reason for the lack of a value is contained as well. The +# previous Erlang example can be duplicated in Ruby in a principled way by +# having functions return `Maybe` objects: +# +# ```ruby +# result = MyFileUtils.consult("data.dat") # returns a Maybe +# if result.just? +# do_something_useful(result.value) # or result.just +# else +# logger.error(result.reason) # or result.nothing +# end +# ``` +# +# @example Returning a Maybe from a Function +# module MyFileUtils +# def self.consult(path) +# file = File.open(path, 'r') +# Concurrent::Maybe.just(file.read) +# rescue => ex +# return Concurrent::Maybe.nothing(ex) +# ensure +# file.close if file +# end +# end +# +# maybe = MyFileUtils.consult('bogus.file') +# maybe.just? #=> false +# maybe.nothing? #=> true +# maybe.reason #=> # +# +# maybe = MyFileUtils.consult('README.md') +# maybe.just? #=> true +# maybe.nothing? #=> false +# maybe.value #=> "# Concurrent Ruby\n[![Gem Version..." +# +# @example Using Maybe with a Block +# result = Concurrent::Maybe.from do +# Client.find(10) # Client is an ActiveRecord model +# end +# +# # -- if the record was found +# result.just? #=> true +# result.value #=> # +# +# # -- if the record was not found +# result.just? #=> false +# result.reason #=> ActiveRecord::RecordNotFound +# +# @example Using Maybe with the Null Object Pattern +# # In a Rails controller... +# result = ClientService.new(10).find # returns a Maybe +# render json: result.or(NullClient.new) +# +# @see https://hackage.haskell.org/package/base-4.2.0.1/docs/Data-Maybe.html Haskell Data.Maybe +# @see https://github.com/purescript/purescript-maybe/blob/master/docs/Data.Maybe.md PureScript Data.Maybe +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:104 +class Concurrent::Maybe < ::Concurrent::Synchronization::Object + include ::Comparable + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `Maybe` with the given attributes. + # + # @param [Object] just The value when `Just` else `NONE`. + # @param [Exception, Object] nothing The exception when `Nothing` else `NONE`. + # + # @return [Maybe] The new `Maybe`. + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:224 + def initialize(just, nothing); end + + # Comparison operator. + # + # @return [Integer] 0 if self and other are both `Nothing`; + # -1 if self is `Nothing` and other is `Just`; + # 1 if self is `Just` and other is nothing; + # `self.just <=> other.just` if both self and other are `Just`. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:199 + def <=>(other); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:179 + def fulfilled?; end + + # The value of a `Maybe` when `Just`. Will be `NONE` when `Nothing`. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:114 + def just; end + + # Is this `Maybe` a `Just` (successfully fulfilled with a value)? + # + # @return [Boolean] True if `Just` or false if `Nothing`. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:176 + def just?; end + + # The reason for the `Maybe` when `Nothing`. Will be `NONE` when `Just`. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:117 + def nothing; end + + # Is this `Maybe` a `nothing` (rejected with an exception upon fulfillment)? + # + # @return [Boolean] True if `Nothing` or false if `Just`. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:184 + def nothing?; end + + # Return either the value of self or the given default value. + # + # @return [Object] The value of self when `Just`; else the given default. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:210 + def or(other); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:191 + def reason; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:187 + def rejected?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:189 + def value; end + + class << self + # Create a new `Maybe` using the given block. + # + # Runs the given block passing all function arguments to the block as block + # arguments. If the block runs to completion without raising an exception + # a new `Just` is created with the value set to the return value of the + # block. If the block raises an exception a new `Nothing` is created with + # the reason being set to the raised exception. + # + # @param [Array] args Zero or more arguments to pass to the block. + # @yield The block from which to create a new `Maybe`. + # @yieldparam [Array] args Zero or more block arguments passed as + # arguments to the function. + # + # @return [Maybe] The newly created object. + # + # @raise [ArgumentError] when no block given. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:137 + def from(*args); end + + # Create a new `Just` with the given value. + # + # @param [Object] value The value to set for the new `Maybe` object. + # + # @return [Maybe] The newly created object. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:152 + def just(value); end + + # Create a new `Nothing` with the given (optional) reason. + # + # @param [Exception] error The reason to set for the new `Maybe` object. + # When given a string a new `StandardError` will be created with the + # argument as the message. When no argument is given a new + # `StandardError` with an empty message will be created. + # + # @return [Maybe] The newly created object. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:164 + def nothing(error = T.unsafe(nil)); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:119 + def new(*args, &block); end + end +end + +# Indicates that the given attribute has not been set. +# When `Just` the {#nothing} getter will return `NONE`. +# When `Nothing` the {#just} getter will return `NONE`. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/maybe.rb:111 +Concurrent::Maybe::NONE = T.let(T.unsafe(nil), Object) + +# Raised when an attempt is made to modify an immutable object +# (such as an `IVar`) after its final state has been set. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:33 +class Concurrent::MultipleAssignmentError < ::Concurrent::Error + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:36 + def initialize(message = T.unsafe(nil), inspection_data = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:41 + def inspect; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:34 + def inspection_data; end +end + +# Aggregates multiple exceptions. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:58 +class Concurrent::MultipleErrors < ::Concurrent::Error + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:61 + def initialize(errors, message = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:59 + def errors; end +end + +# An thread-safe variation of Ruby's standard `Struct`. Values can be set at +# construction or safely changed at any time during the object's lifecycle. +# +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:10 +module Concurrent::MutableStruct + include ::Concurrent::Synchronization::AbstractStruct + + # @!macro struct_equality + # + # Equality + # + # @return [Boolean] true if other has the same struct subclass and has + # equal member values (according to `Object#==`) + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:128 + def ==(other); end + + # @!macro struct_get + # + # Attribute Reference + # + # @param [Symbol, String, Integer] member the string or symbol name of the member + # for which to obtain the value or the member's index + # + # @return [Object] the value of the given struct member or the member at the given index. + # + # @raise [NameError] if the member does not exist + # @raise [IndexError] if the index is out of range. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:118 + def [](member); end + + # @!macro struct_set + # + # Attribute Assignment + # + # Sets the value of the given struct member or the member at the given index. + # + # @param [Symbol, String, Integer] member the string or symbol name of the member + # for which to obtain the value or the member's index + # + # @return [Object] the value of the given struct member or the member at the given index. + # + # @raise [NameError] if the name does not exist + # @raise [IndexError] if the index is out of range. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:185 + def []=(member, value); end + + # @!macro struct_each + # + # Yields the value of each struct member in order. If no block is given + # an enumerator is returned. + # + # @yield the operation to be performed on each struct member + # @yieldparam [Object] value each struct value (in order) + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:139 + def each(&block); end + + # @!macro struct_each_pair + # + # Yields the name and value of each struct member in order. If no block is + # given an enumerator is returned. + # + # @yield the operation to be performed on each struct member/value pair + # @yieldparam [Object] member each struct member (in order) + # @yieldparam [Object] value each struct value (in order) + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:152 + def each_pair(&block); end + + # @!macro struct_inspect + # + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:72 + def inspect; end + + # @!macro struct_merge + # + # Returns a new struct containing the contents of `other` and the contents + # of `self`. If no block is specified, the value for entries with duplicate + # keys will be that of `other`. Otherwise the value for each duplicate key + # is determined by calling the block with the key, its value in `self` and + # its value in `other`. + # + # @param [Hash] other the hash from which to set the new values + # @yield an options block for resolving duplicate keys + # @yieldparam [String, Symbol] member the name of the member which is duplicated + # @yieldparam [Object] selfvalue the value of the member in `self` + # @yieldparam [Object] othervalue the value of the member in `other` + # + # @return [Synchronization::AbstractStruct] a new struct with the new values + # + # @raise [ArgumentError] of given a member that is not defined in the struct + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:94 + def merge(other, &block); end + + # @!macro struct_select + # + # Yields each member value from the struct to the block and returns an Array + # containing the member values from the struct for which the given block + # returns a true value (equivalent to `Enumerable#select`). + # + # @yield the operation to be performed on each struct member + # @yieldparam [Object] value each struct value (in order) + # + # @return [Array] an array containing each value for which the block returns true + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:167 + def select(&block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:54 + def to_a; end + + # @!macro struct_to_h + # + # Returns a hash containing the names and values for the struct’s members. + # + # @return [Hash] the names and values for the struct’s members + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:103 + def to_h; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:75 + def to_s; end + + # @!macro struct_values + # + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:51 + def values; end + + # @!macro struct_values_at + # + # Returns the struct member values for each selector as an Array. + # + # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # + # @param [Fixnum, Range] indexes the index(es) from which to obatin the values (in order) + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:63 + def values_at(*indexes); end + + private + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:202 + def initialize_copy(original); end + + class << self + # @!macro struct_new + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:210 + def new(*args, &block); end + end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/mutable_struct.rb:220 +Concurrent::MutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + +# @!macro atomic_boolean +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:8 +class Concurrent::MutexAtomicBoolean + extend ::Concurrent::Synchronization::SafeInitialization + + # @!macro atomic_boolean_method_initialize + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:12 + def initialize(initial = T.unsafe(nil)); end + + # @!macro atomic_boolean_method_false_question + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:34 + def false?; end + + # @!macro atomic_boolean_method_make_false + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:44 + def make_false; end + + # @!macro atomic_boolean_method_make_true + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:39 + def make_true; end + + # @!macro atomic_boolean_method_true_question + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:29 + def true?; end + + # @!macro atomic_boolean_method_value_get + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:19 + def value; end + + # @!macro atomic_boolean_method_value_set + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:24 + def value=(value); end + + protected + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:51 + def synchronize; end + + private + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb:62 + def ns_make_value(value); end +end + +# @!macro atomic_fixnum +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:9 +class Concurrent::MutexAtomicFixnum + extend ::Concurrent::Synchronization::SafeInitialization + + # @!macro atomic_fixnum_method_initialize + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:13 + def initialize(initial = T.unsafe(nil)); end + + # @!macro atomic_fixnum_method_compare_and_set + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:44 + def compare_and_set(expect, update); end + + # @!macro atomic_fixnum_method_decrement + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:37 + def decrement(delta = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:41 + def down(delta = T.unsafe(nil)); end + + # @!macro atomic_fixnum_method_increment + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:30 + def increment(delta = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:34 + def up(delta = T.unsafe(nil)); end + + # @!macro atomic_fixnum_method_update + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:56 + def update; end + + # @!macro atomic_fixnum_method_value_get + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:20 + def value; end + + # @!macro atomic_fixnum_method_value_set + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:25 + def value=(value); end + + protected + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:65 + def synchronize; end + + private + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb:76 + def ns_set(value); end +end + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:9 +class Concurrent::MutexAtomicReference + include ::Concurrent::AtomicDirectUpdate + include ::Concurrent::AtomicNumericCompareAndSetWrapper + extend ::Concurrent::Synchronization::SafeInitialization + + # @!macro atomic_reference_method_initialize + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:16 + def initialize(value = T.unsafe(nil)); end + + # @!macro atomic_reference_method_compare_and_set + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:45 + def _compare_and_set(old_value, new_value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:13 + def compare_and_swap(old_value, new_value); end + + # @!macro atomic_reference_method_get + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:23 + def get; end + + # @!macro atomic_reference_method_get_and_set + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:35 + def get_and_set(new_value); end + + # @!macro atomic_reference_method_set + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:29 + def set(new_value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:42 + def swap(new_value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:26 + def value; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:32 + def value=(new_value); end + + protected + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb:59 + def synchronize; end +end + +# @!macro count_down_latch +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb:9 +class Concurrent::MutexCountDownLatch < ::Concurrent::Synchronization::LockableObject + # @!macro count_down_latch_method_initialize + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb:12 + def initialize(count = T.unsafe(nil)); end + + # @!macro count_down_latch_method_count + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb:34 + def count; end + + # @!macro count_down_latch_method_count_down + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb:26 + def count_down; end + + # @!macro count_down_latch_method_wait + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb:21 + def wait(timeout = T.unsafe(nil)); end + + protected + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb:40 + def ns_initialize(count); end +end + +# @!macro semaphore +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:9 +class Concurrent::MutexSemaphore < ::Concurrent::Synchronization::LockableObject + # @!macro semaphore_method_initialize + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:12 + def initialize(count); end + + # @!macro semaphore_method_acquire + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:20 + def acquire(permits = T.unsafe(nil)); end + + # @!macro semaphore_method_available_permits + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:38 + def available_permits; end + + # @!macro semaphore_method_drain_permits + # + # Acquires and returns all permits that are immediately available. + # + # @return [Integer] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:47 + def drain_permits; end + + # Shrinks the number of available permits by the indicated reduction. + # + # @param [Fixnum] reduction Number of permits to remove. + # + # @raise [ArgumentError] if `reduction` is not an integer or is negative + # + # @raise [ArgumentError] if `@free` - `@reduction` is less than zero + # + # @return [nil] + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:99 + def reduce_permits(reduction); end + + # @!macro semaphore_method_release + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:77 + def release(permits = T.unsafe(nil)); end + + # @!macro semaphore_method_try_acquire + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:54 + def try_acquire(permits = T.unsafe(nil), timeout = T.unsafe(nil)); end + + protected + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:110 + def ns_initialize(count); end + + private + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:117 + def try_acquire_now(permits); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:127 + def try_acquire_timed(permits, timeout); end +end + +# Various classes within allows for +nil+ values to be stored, +# so a special +NULL+ token is required to indicate the "nil-ness". +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/constants.rb:6 +Concurrent::NULL = T.let(T.unsafe(nil), Object) + +# Suppresses all output when used for logging. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/concern/logging.rb:108 +Concurrent::NULL_LOGGER = T.let(T.unsafe(nil), Proc) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/options.rb:6 +module Concurrent::Options + class << self + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/options.rb:27 + def executor(executor_identifier); end + + # Get the requested `Executor` based on the values set in the options hash. + # + # @param [Hash] opts the options defining the requested executor + # @option opts [Executor] :executor when set use the given `Executor` instance. + # Three special values are also supported: `:fast` returns the global fast executor, + # `:io` returns the global io executor, and `:immediate` returns a new + # `ImmediateExecutor` object. + # + # @return [Executor, nil] the requested thread pool, or nil when no option specified + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/options.rb:19 + def executor_from_options(opts = T.unsafe(nil)); end + end +end + +# Promises are inspired by the JavaScript [Promises/A](http://wiki.commonjs.org/wiki/Promises/A) +# and [Promises/A+](http://promises-aplus.github.io/promises-spec/) specifications. +# +# > A promise represents the eventual value returned from the single +# > completion of an operation. +# +# Promises are similar to futures and share many of the same behaviours. +# Promises are far more robust, however. Promises can be chained in a tree +# structure where each promise may have zero or more children. Promises are +# chained using the `then` method. The result of a call to `then` is always +# another promise. Promises are resolved asynchronously (with respect to the +# main thread) but in a strict order: parents are guaranteed to be resolved +# before their children, children before their younger siblings. The `then` +# method takes two parameters: an optional block to be executed upon parent +# resolution and an optional callable to be executed upon parent failure. The +# result of each promise is passed to each of its children upon resolution. +# When a promise is rejected all its children will be summarily rejected and +# will receive the reason. +# +# Promises have several possible states: *:unscheduled*, *:pending*, +# *:processing*, *:rejected*, or *:fulfilled*. These are also aggregated as +# `#incomplete?` and `#complete?`. When a Promise is created it is set to +# *:unscheduled*. Once the `#execute` method is called the state becomes +# *:pending*. Once a job is pulled from the thread pool's queue and is given +# to a thread for processing (often immediately upon `#post`) the state +# becomes *:processing*. The future will remain in this state until processing +# is complete. A future that is in the *:unscheduled*, *:pending*, or +# *:processing* is considered `#incomplete?`. A `#complete?` Promise is either +# *:rejected*, indicating that an exception was thrown during processing, or +# *:fulfilled*, indicating success. If a Promise is *:fulfilled* its `#value` +# will be updated to reflect the result of the operation. If *:rejected* the +# `reason` will be updated with a reference to the thrown exception. The +# predicate methods `#unscheduled?`, `#pending?`, `#rejected?`, and +# `#fulfilled?` can be called at any time to obtain the state of the Promise, +# as can the `#state` method, which returns a symbol. +# +# Retrieving the value of a promise is done through the `value` (alias: +# `deref`) method. Obtaining the value of a promise is a potentially blocking +# operation. When a promise is *rejected* a call to `value` will return `nil` +# immediately. When a promise is *fulfilled* a call to `value` will +# immediately return the current value. When a promise is *pending* a call to +# `value` will block until the promise is either *rejected* or *fulfilled*. A +# *timeout* value can be passed to `value` to limit how long the call will +# block. If `nil` the call will block indefinitely. If `0` the call will not +# block. Any other integer or float value will indicate the maximum number of +# seconds to block. +# +# Promises run on the global thread pool. +# +# @!macro copy_options +# +# ### Examples +# +# Start by requiring promises +# +# ```ruby +# require 'concurrent/promise' +# ``` +# +# Then create one +# +# ```ruby +# p = Concurrent::Promise.execute do +# # do something +# 42 +# end +# ``` +# +# Promises can be chained using the `then` method. The `then` method accepts a +# block and an executor, to be executed on fulfillment, and a callable argument to be executed +# on rejection. The result of the each promise is passed as the block argument +# to chained promises. +# +# ```ruby +# p = Concurrent::Promise.new{10}.then{|x| x * 2}.then{|result| result - 10 }.execute +# ``` +# +# And so on, and so on, and so on... +# +# ```ruby +# p = Concurrent::Promise.fulfill(20). +# then{|result| result - 10 }. +# then{|result| result * 3 }. +# then(executor: different_executor){|result| result % 5 }.execute +# ``` +# +# The initial state of a newly created Promise depends on the state of its parent: +# - if parent is *unscheduled* the child will be *unscheduled* +# - if parent is *pending* the child will be *pending* +# - if parent is *fulfilled* the child will be *pending* +# - if parent is *rejected* the child will be *pending* (but will ultimately be *rejected*) +# +# Promises are executed asynchronously from the main thread. By the time a +# child Promise finishes initialization it may be in a different state than its +# parent (by the time a child is created its parent may have completed +# execution and changed state). Despite being asynchronous, however, the order +# of execution of Promise objects in a chain (or tree) is strictly defined. +# +# There are multiple ways to create and execute a new `Promise`. Both ways +# provide identical behavior: +# +# ```ruby +# # create, operate, then execute +# p1 = Concurrent::Promise.new{ "Hello World!" } +# p1.state #=> :unscheduled +# p1.execute +# +# # create and immediately execute +# p2 = Concurrent::Promise.new{ "Hello World!" }.execute +# +# # execute during creation +# p3 = Concurrent::Promise.execute{ "Hello World!" } +# ``` +# +# Once the `execute` method is called a `Promise` becomes `pending`: +# +# ```ruby +# p = Concurrent::Promise.execute{ "Hello, world!" } +# p.state #=> :pending +# p.pending? #=> true +# ``` +# +# Wait a little bit, and the promise will resolve and provide a value: +# +# ```ruby +# p = Concurrent::Promise.execute{ "Hello, world!" } +# sleep(0.1) +# +# p.state #=> :fulfilled +# p.fulfilled? #=> true +# p.value #=> "Hello, world!" +# ``` +# +# If an exception occurs, the promise will be rejected and will provide +# a reason for the rejection: +# +# ```ruby +# p = Concurrent::Promise.execute{ raise StandardError.new("Here comes the Boom!") } +# sleep(0.1) +# +# p.state #=> :rejected +# p.rejected? #=> true +# p.reason #=> "#" +# ``` +# +# #### Rejection +# +# When a promise is rejected all its children will be rejected and will +# receive the rejection `reason` as the rejection callable parameter: +# +# ```ruby +# p = Concurrent::Promise.execute { Thread.pass; raise StandardError } +# +# c1 = p.then(-> reason { 42 }) +# c2 = p.then(-> reason { raise 'Boom!' }) +# +# c1.wait.state #=> :fulfilled +# c1.value #=> 42 +# c2.wait.state #=> :rejected +# c2.reason #=> # +# ``` +# +# Once a promise is rejected it will continue to accept children that will +# receive immediately rejection (they will be executed asynchronously). +# +# #### Aliases +# +# The `then` method is the most generic alias: it accepts a block to be +# executed upon parent fulfillment and a callable to be executed upon parent +# rejection. At least one of them should be passed. The default block is `{ +# |result| result }` that fulfills the child with the parent value. The +# default callable is `{ |reason| raise reason }` that rejects the child with +# the parent reason. +# +# - `on_success { |result| ... }` is the same as `then {|result| ... }` +# - `rescue { |reason| ... }` is the same as `then(Proc.new { |reason| ... } )` +# - `rescue` is aliased by `catch` and `on_error` +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:190 +class Concurrent::Promise < ::Concurrent::IVar + # Initialize a new Promise with the provided options. + # + # @!macro executor_and_deref_options + # + # @!macro promise_init_options + # + # @option opts [Promise] :parent the parent `Promise` when building a chain/tree + # @option opts [Proc] :on_fulfill fulfillment handler + # @option opts [Proc] :on_reject rejection handler + # @option opts [object, Array] :args zero or more arguments to be passed + # the task block on execution + # + # @yield The block operation to be performed asynchronously. + # + # @raise [ArgumentError] if no block is given + # + # @see http://wiki.commonjs.org/wiki/Promises/A + # @see http://promises-aplus.github.io/promises-spec/ + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:210 + def initialize(opts = T.unsafe(nil), &block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:364 + def catch(&block); end + + # Execute an `:unscheduled` `Promise`. Immediately sets the state to `:pending` and + # passes the block to a new thread/thread pool for eventual execution. + # Does nothing if the `Promise` is in any state other than `:unscheduled`. + # + # @return [Promise] a reference to `self` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:246 + def execute; end + + # @!macro ivar_fail_method + # + # @raise [Concurrent::PromiseExecutionError] if not the root promise + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:278 + def fail(reason = T.unsafe(nil)); end + + # Yield the successful result to the block that returns a promise. If that + # promise is also successful the result is the result of the yielded promise. + # If either part fails the whole also fails. + # + # @example + # Promise.execute { 1 }.flat_map { |v| Promise.execute { v + 2 } }.value! #=> 3 + # + # @return [Promise] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:375 + def flat_map(&block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:365 + def on_error(&block); end + + # Chain onto this promise an action to be undertaken on success + # (fulfillment). + # + # @yield The block to execute + # + # @return [Promise] self + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:349 + def on_success(&block); end + + # Chain onto this promise an action to be undertaken on failure + # (rejection). + # + # @yield The block to execute + # + # @return [Promise] self + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:360 + def rescue(&block); end + + # @!macro ivar_set_method + # + # @raise [Concurrent::PromiseExecutionError] if not the root promise + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:262 + def set(value = T.unsafe(nil), &block); end + + # Chain a new promise off the current promise. + # + # @return [Promise] the new promise + # @yield The block operation to be performed asynchronously. + # @overload then(rescuer, executor, &block) + # @param [Proc] rescuer An optional rescue block to be executed if the + # promise is rejected. + # @param [ThreadPool] executor An optional thread pool executor to be used + # in the new Promise + # @overload then(rescuer, executor: executor, &block) + # @param [Proc] rescuer An optional rescue block to be executed if the + # promise is rejected. + # @param [ThreadPool] executor An optional thread pool executor to be used + # in the new Promise + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:314 + def then(*args, &block); end + + # Builds a promise that produces the result of self and others in an Array + # and fails if any of them fails. + # + # @overload zip(*promises) + # @param [Array] others + # + # @overload zip(*promises, opts) + # @param [Array] others + # @param [Hash] opts the configuration options + # @option opts [Executor] :executor (ImmediateExecutor.new) when set use the given `Executor` instance. + # @option opts [Boolean] :execute (true) execute promise before returning + # + # @return [Promise] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:440 + def zip(*others); end + + protected + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:551 + def complete(success, value, reason); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:545 + def notify_child(child); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:481 + def ns_initialize(value, opts); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:533 + def on_fulfill(result); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:539 + def on_reject(reason); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:562 + def realize(task); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:528 + def root?; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:520 + def set_pending; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:570 + def set_state!(success, value, reason); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:576 + def synchronized_set_state!(success, value, reason); end + + class << self + # Aggregate a collection of zero or more promises under a composite promise, + # execute the aggregated promises and collect them into a standard Ruby array, + # call the given Ruby `Ennnumerable` predicate (such as `any?`, `all?`, `none?`, + # or `one?`) on the collection checking for the success or failure of each, + # then executing the composite's `#then` handlers if the predicate returns + # `true` or executing the composite's `#rescue` handlers if the predicate + # returns false. + # + # @!macro promise_self_aggregate + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:505 + def aggregate(method, *promises); end + + # Aggregates a collection of promises and executes the `then` condition + # if all aggregated promises succeed. Executes the `rescue` handler with + # a `Concurrent::PromiseExecutionError` if any of the aggregated promises + # fail. Upon execution will execute any of the aggregate promises that + # were not already executed. + # + # @!macro promise_self_aggregate + # + # The returned promise will not yet have been executed. Additional `#then` + # and `#rescue` handlers may still be provided. Once the returned promise + # is execute the aggregate promises will be also be executed (if they have + # not been executed already). The results of the aggregate promises will + # be checked upon completion. The necessary `#then` and `#rescue` blocks + # on the aggregating promise will then be executed as appropriate. If the + # `#rescue` handlers are executed the raises exception will be + # `Concurrent::PromiseExecutionError`. + # + # @param [Array] promises Zero or more promises to aggregate + # @return [Promise] an unscheduled (not executed) promise that aggregates + # the promises given as arguments + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:464 + def all?(*promises); end + + # Aggregates a collection of promises and executes the `then` condition + # if any aggregated promises succeed. Executes the `rescue` handler with + # a `Concurrent::PromiseExecutionError` if any of the aggregated promises + # fail. Upon execution will execute any of the aggregate promises that + # were not already executed. + # + # @!macro promise_self_aggregate + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:475 + def any?(*promises); end + + # Create a new `Promise` object with the given block, execute it, and return the + # `:pending` object. + # + # @!macro executor_and_deref_options + # + # @!macro promise_init_options + # + # @return [Promise] the newly created `Promise` in the `:pending` state + # + # @raise [ArgumentError] if no block is given + # + # @example + # promise = Concurrent::Promise.execute{ sleep(1); 42 } + # promise.state #=> :pending + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:296 + def execute(opts = T.unsafe(nil), &block); end + + # Create a new `Promise` and fulfill it immediately. + # + # @!macro executor_and_deref_options + # + # @!macro promise_init_options + # + # @raise [ArgumentError] if no block is given + # + # @return [Promise] the newly created `Promise` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:224 + def fulfill(value, opts = T.unsafe(nil)); end + + # Create a new `Promise` and reject it immediately. + # + # @!macro executor_and_deref_options + # + # @!macro promise_init_options + # + # @raise [ArgumentError] if no block is given + # + # @return [Promise] the newly created `Promise` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:237 + def reject(reason, opts = T.unsafe(nil)); end + + # Builds a promise that produces the result of promises in an Array + # and fails if any of them fails. + # + # @overload zip(*promises) + # @param [Array] promises + # + # @overload zip(*promises, opts) + # @param [Array] promises + # @param [Hash] opts the configuration options + # @option opts [Executor] :executor (ImmediateExecutor.new) when set use the given `Executor` instance. + # @option opts [Boolean] :execute (true) execute promise before returning + # + # @return [Promise] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:409 + def zip(*promises); end + end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promise.rb:11 +class Concurrent::PromiseExecutionError < ::StandardError; end + +# {include:file:docs-source/promises-main.md} +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:13 +module Concurrent::Promises + extend ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::Promises::FactoryMethods +end + +# @abstract +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2047 +class Concurrent::Promises::AbstractAnyPromise < ::Concurrent::Promises::BlockedPromise; end + +# Common ancestor of {Event} and {Future} classes, many shared methods are defined here. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:513 +class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization::Object + include ::Concurrent::Promises::InternalStates + extend ::Concurrent::Synchronization::SafeInitialization + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:522 + def initialize(promise, default_executor); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:515 + def __initialize_atomic_fields__; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:738 + def add_callback_clear_delayed_node(node); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:733 + def add_callback_notify_blocked(promise, index); end + + # For inspection. + # @!visibility private + # @return [Array] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:702 + def blocks; end + + # For inspection. + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:710 + def callbacks; end + + # @!macro promises.shortcut.on + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:596 + def chain(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it is resolved. + # + # @!macro promises.param.executor + # @!macro promises.param.args + # @return [Future] + # @!macro promise.param.task-future + # + # @overload an_event.chain_on(executor, *args, &task) + # @yield [*args] to the task. + # @overload a_future.chain_on(executor, *args, &task) + # @yield [fulfilled, value, reason, *args] to the task. + # @yieldparam [true, false] fulfilled + # @yieldparam [Object] value + # @yieldparam [Object] reason + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:614 + def chain_on(executor, *args, &task); end + + # Resolves the resolvable when receiver is resolved. + # + # @param [Resolvable] resolvable + # @return [self] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:629 + def chain_resolvable(resolvable); end + + # Returns default executor. + # @return [Executor] default executor + # @see #with_default_executor + # @see FactoryMethods#future_on + # @see FactoryMethods#resolvable_future + # @see FactoryMethods#any_fulfilled_future_on + # @see similar + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:590 + def default_executor; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:623 + def inspect; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:515 + def internal_state; end + + # @!macro promises.shortcut.using + # @return [self] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:637 + def on_resolution(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # resolved. + # + # @!macro promises.param.args + # @!macro promise.param.callback + # @return [self] + # + # @overload an_event.on_resolution!(*args, &callback) + # @yield [*args] to the callback. + # @overload a_future.on_resolution!(*args, &callback) + # @yield [fulfilled, value, reason, *args] to the callback. + # @yieldparam [true, false] fulfilled + # @yieldparam [Object] value + # @yieldparam [Object] reason + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:655 + def on_resolution!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is resolved. + # + # @!macro promises.param.executor + # @!macro promises.param.args + # @!macro promise.param.callback + # @return [self] + # + # @overload an_event.on_resolution_using(executor, *args, &callback) + # @yield [*args] to the callback. + # @overload a_future.on_resolution_using(executor, *args, &callback) + # @yield [fulfilled, value, reason, *args] to the callback. + # @yieldparam [true, false] fulfilled + # @yieldparam [Object] value + # @yieldparam [Object] reason + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:673 + def on_resolution_using(executor, *args, &callback); end + + # Is it in pending state? + # @return [Boolean] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:549 + def pending?; end + + # For inspection. + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:716 + def promise; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:688 + def resolve_with(state, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Is it in resolved state? + # @return [Boolean] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:555 + def resolved?; end + + # Returns its state. + # @return [Symbol] + # + # @overload an_event.state + # @return [:pending, :resolved] + # @overload a_future.state + # Both :fulfilled, :rejected implies :resolved. + # @return [:pending, :fulfilled, :rejected] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:543 + def state; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:633 + def tangle(resolvable); end + + # @return [String] Short string representation. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:619 + def to_s; end + + # Propagates touch. Requests all the delayed futures, which it depends on, to be + # executed. This method is called by any other method requiring resolved state, like {#wait}. + # @return [self] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:562 + def touch; end + + # For inspection. + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:722 + def touched?; end + + # @!macro promises.method.wait + # Wait (block the Thread) until receiver is {#resolved?}. + # @!macro promises.touches + # + # @!macro promises.warn.blocks + # @!macro promises.param.timeout + # @return [self, true, false] self implies timeout was not used, true implies timeout was used + # and it was resolved, false implies it was not resolved within timeout. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:578 + def wait(timeout = T.unsafe(nil)); end + + # For inspection. + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:728 + def waiting_threads; end + + # @!macro promises.method.with_default_executor + # Crates new object with same class with the executor set as its new default executor. + # Any futures depending on it will use the new default executor. + # @!macro promises.shortcut.event-future + # @abstract + # @return [AbstractEventFuture] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:683 + def with_default_executor(executor); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:743 + def with_hidden_resolvable; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:750 + def add_callback(method, *args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:812 + def async_callback_on_resolution(state, executor, args, callback); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:796 + def call_callback(method, state, args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:800 + def call_callbacks(state); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:763 + def callback_clear_delayed_node(state, node); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:818 + def callback_notify_blocked(state, promise, index); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:515 + def compare_and_set_internal_state(expected, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:515 + def internal_state=(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:515 + def swap_internal_state(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:515 + def update_internal_state(&block); end + + # @return [Boolean] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:768 + def wait_until_resolved(timeout); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:808 + def with_async(executor, *args, &block); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1796 +class Concurrent::Promises::AbstractFlatPromise < ::Concurrent::Promises::BlockedPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1798 + def initialize(delayed_because, blockers_count, event_or_future); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1808 + def touch; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1828 + def add_delayed_of(future); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1820 + def on_resolvable(resolved_future, index); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1824 + def resolvable?(countdown, future, index); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1816 + def touched?; end +end + +# @abstract +# @private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1549 +class Concurrent::Promises::AbstractPromise < ::Concurrent::Synchronization::Object + include ::Concurrent::Promises::InternalStates + extend ::Concurrent::Synchronization::SafeInitialization + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1553 + def initialize(future); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1564 + def default_executor; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1581 + def delayed_because; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1562 + def event; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1558 + def future; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1579 + def inspect; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1568 + def state; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1575 + def to_s; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1572 + def touch; end + + private + + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1592 + def evaluate_to(*args, block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1587 + def resolve_with(new_state, raise_on_reassign = T.unsafe(nil)); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2084 +class Concurrent::Promises::AnyFulfilledFuturePromise < ::Concurrent::Promises::AnyResolvedFuturePromise + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2088 + def resolvable?(countdown, event_or_future, index); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2050 +class Concurrent::Promises::AnyResolvedEventPromise < ::Concurrent::Promises::AbstractAnyPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2054 + def initialize(delayed, blockers_count, default_executor); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2062 + def on_resolvable(resolved_future, index); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2058 + def resolvable?(countdown, future, index); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2067 +class Concurrent::Promises::AnyResolvedFuturePromise < ::Concurrent::Promises::AbstractAnyPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2071 + def initialize(delayed, blockers_count, default_executor); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2079 + def on_resolvable(resolved_future, index); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2075 + def resolvable?(countdown, future, index); end +end + +# @abstract +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1619 +class Concurrent::Promises::BlockedPromise < ::Concurrent::Promises::InnerPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1661 + def initialize(delayed, blockers_count, future); end + + # for inspection only + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1683 + def blocked_by; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1674 + def delayed_because; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1667 + def on_blocker_resolution(future, index); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1678 + def touch; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1691 + def clear_and_propagate_touch(stack_or_element = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1710 + def on_resolvable(resolved_future, index); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1706 + def process_on_blocker_resolution(future, index); end + + # @return [true,false] if resolvable + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1702 + def resolvable?(countdown, future, index); end + + class << self + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1652 + def add_delayed(delayed1, delayed2); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1645 + def new_blocked_by(blockers, *args, &block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1623 + def new_blocked_by1(blocker, *args, &block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1630 + def new_blocked_by2(blocker1, blocker2, *args, &block); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1621 + def new(*args, &block); end + end +end + +# @abstract +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1716 +class Concurrent::Promises::BlockedTaskPromise < ::Concurrent::Promises::BlockedPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1717 + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1725 + def executor; end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1766 +class Concurrent::Promises::ChainPromise < ::Concurrent::Promises::BlockedTaskPromise + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1769 + def on_resolvable(resolved_future, index); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2095 +class Concurrent::Promises::DelayPromise < ::Concurrent::Promises::InnerPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2097 + def initialize(default_executor); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2108 + def delayed_because; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2104 + def touch; end +end + +# Represents an event which will happen in future (will be resolved). The event is either +# pending or resolved. It should be always resolved. Use {Future} to communicate rejections and +# cancellation. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:826 +class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:847 + def &(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. + # + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:853 + def any(event_or_future); end + + # Creates new event dependent on receiver which will not evaluate until touched, see {#touch}. + # In other words, it inserts delay into the chain of Futures making rest of it lazy evaluated. + # + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:863 + def delay; end + + # @!macro promise.method.schedule + # Creates new event dependent on receiver scheduled to execute on/in intended_time. + # In time is interpreted from the moment the receiver is resolved, therefore it inserts + # delay into the chain. + # + # @!macro promises.param.intended_time + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:875 + def schedule(intended_time); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:828 + def then(*args, &task); end + + # Returns self, since this is event + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:893 + def to_event; end + + # Converts event to a future. The future is fulfilled when the event is resolved, the future may never fail. + # + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:885 + def to_future; end + + # @!macro promises.method.with_default_executor + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:899 + def with_default_executor(executor); end + + # @!macro promises.method.zip + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future, Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:839 + def zip(other); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:857 + def |(event_or_future); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:910 + def callback_on_resolution(state, args, callback); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:905 + def rejected_resolution(raise_on_reassign, state); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1972 +class Concurrent::Promises::EventWrapperPromise < ::Concurrent::Promises::BlockedPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1973 + def initialize(delayed, blockers_count, default_executor); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1979 + def on_resolvable(resolved_future, index); end +end + +# Container of all {Future}, {Event} factory methods. They are never constructed directly with +# new. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:46 +module Concurrent::Promises::FactoryMethods + include ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::ReInclude + extend ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::Promises::FactoryMethods + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:282 + def any(*futures_and_or_events); end + + # @!macro promises.shortcut.on + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:319 + def any_event(*futures_and_or_events); end + + # Creates a new event which becomes resolved after the first futures_and_or_events resolves. + # @!macro promises.any-touch + # + # @!macro promises.param.default_executor + # @param [AbstractEventFuture] futures_and_or_events + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:329 + def any_event_on(default_executor, *futures_and_or_events); end + + # @!macro promises.shortcut.on + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:300 + def any_fulfilled_future(*futures_and_or_events); end + + # Creates a new future which is resolved after the first futures_and_or_events is fulfilled. + # Its result equals the result of the first resolved future or if all futures_and_or_events reject, + # it has reason of the last rejected future. + # @!macro promises.any-touch + # @!macro promises.event-conversion + # + # @!macro promises.param.default_executor + # @param [AbstractEventFuture] futures_and_or_events + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:313 + def any_fulfilled_future_on(default_executor, *futures_and_or_events); end + + # @!macro promises.shortcut.on + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:278 + def any_resolved_future(*futures_and_or_events); end + + # Creates a new future which is resolved after the first futures_and_or_events is resolved. + # Its result equals the result of the first resolved future. + # @!macro promises.any-touch + # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed + # futures un-executed if they are not required any more. + # @!macro promises.event-conversion + # + # @!macro promises.param.default_executor + # @param [AbstractEventFuture] futures_and_or_events + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:294 + def any_resolved_future_on(default_executor, *futures_and_or_events); end + + # @!macro promises.shortcut.on + # @return [Future, Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:190 + def delay(*args, &task); end + + # Creates a new event or future which is resolved only after it is touched, + # see {Concurrent::AbstractEventFuture#touch}. + # + # @!macro promises.param.default_executor + # @overload delay_on(default_executor, *args, &task) + # If task is provided it returns a {Future} representing the result of the task. + # @!macro promises.param.args + # @yield [*args] to the task. + # @!macro promise.param.task-future + # @return [Future] + # @overload delay_on(default_executor) + # If no task is provided, it returns an {Event} + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:207 + def delay_on(default_executor, *args, &task); end + + # Creates a resolved future which will be fulfilled with the given value. + # + # @!macro promises.param.default_executor + # @param [Object] value + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:127 + def fulfilled_future(value, default_executor = T.unsafe(nil)); end + + # @!macro promises.shortcut.on + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:94 + def future(*args, &task); end + + # Constructs a new Future which will be resolved after block is evaluated on default executor. + # Evaluation begins immediately. + # + # @!macro promises.param.default_executor + # @!macro promises.param.args + # @yield [*args] to the task. + # @!macro promise.param.task-future + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:106 + def future_on(default_executor, *args, &task); end + + # General constructor. Behaves differently based on the argument's type. It's provided for convenience + # but it's better to be explicit. + # + # @see rejected_future, resolved_event, fulfilled_future + # @!macro promises.param.default_executor + # @return [Event, Future] + # + # @overload make_future(nil, default_executor = self.default_executor) + # @param [nil] nil + # @return [Event] resolved event. + # + # @overload make_future(a_future, default_executor = self.default_executor) + # @param [Future] a_future + # @return [Future] a future which will be resolved when a_future is. + # + # @overload make_future(an_event, default_executor = self.default_executor) + # @param [Event] an_event + # @return [Event] an event which will be resolved when an_event is. + # + # @overload make_future(exception, default_executor = self.default_executor) + # @param [Exception] exception + # @return [Future] a rejected future with the exception as its reason. + # + # @overload make_future(value, default_executor = self.default_executor) + # @param [Object] value when none of the above overloads fits + # @return [Future] a fulfilled future with the value. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:174 + def make_future(argument = T.unsafe(nil), default_executor = T.unsafe(nil)); end + + # Creates a resolved future which will be rejected with the given reason. + # + # @!macro promises.param.default_executor + # @param [Object] reason + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:136 + def rejected_future(reason, default_executor = T.unsafe(nil)); end + + # @!macro promises.shortcut.on + # @return [ResolvableEvent] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:63 + def resolvable_event; end + + # Creates a resolvable event, user is responsible for resolving the event once + # by calling {Promises::ResolvableEvent#resolve}. + # + # @!macro promises.param.default_executor + # @return [ResolvableEvent] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:72 + def resolvable_event_on(default_executor = T.unsafe(nil)); end + + # @!macro promises.shortcut.on + # @return [ResolvableFuture] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:78 + def resolvable_future; end + + # Creates resolvable future, user is responsible for resolving the future once by + # {Promises::ResolvableFuture#resolve}, {Promises::ResolvableFuture#fulfill}, + # or {Promises::ResolvableFuture#reject} + # + # @!macro promises.param.default_executor + # @return [ResolvableFuture] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:88 + def resolvable_future_on(default_executor = T.unsafe(nil)); end + + # Creates resolved event. + # + # @!macro promises.param.default_executor + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:144 + def resolved_event(default_executor = T.unsafe(nil)); end + + # Creates a resolved future with will be either fulfilled with the given value or rejected with + # the given reason. + # + # @param [true, false] fulfilled + # @param [Object] value + # @param [Object] reason + # @!macro promises.param.default_executor + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:118 + def resolved_future(fulfilled, value, reason, default_executor = T.unsafe(nil)); end + + # @!macro promises.shortcut.on + # @return [Future, Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:214 + def schedule(intended_time, *args, &task); end + + # Creates a new event or future which is resolved in intended_time. + # + # @!macro promises.param.default_executor + # @!macro promises.param.intended_time + # @param [Numeric, Time] intended_time `Numeric` means to run in `intended_time` seconds. + # `Time` means to run on `intended_time`. + # @overload schedule_on(default_executor, intended_time, *args, &task) + # If task is provided it returns a {Future} representing the result of the task. + # @!macro promises.param.args + # @yield [*args] to the task. + # @!macro promise.param.task-future + # @return [Future] + # @overload schedule_on(default_executor, intended_time) + # If no task is provided, it returns an {Event} + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:233 + def schedule_on(default_executor, intended_time, *args, &task); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:258 + def zip(*futures_and_or_events); end + + # @!macro promises.shortcut.on + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:262 + def zip_events(*futures_and_or_events); end + + # Creates a new event which is resolved after all futures_and_or_events are resolved. + # (Future is resolved when fulfilled or rejected.) + # + # @!macro promises.param.default_executor + # @param [AbstractEventFuture] futures_and_or_events + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:272 + def zip_events_on(default_executor, *futures_and_or_events); end + + # @!macro promises.shortcut.on + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:240 + def zip_futures(*futures_and_or_events); end + + # Creates a new future which is resolved after all futures_and_or_events are resolved. + # Its value is an array of zipped future values. Its reason is an array of reasons for rejection. + # If there is an error it rejects. + # @!macro promises.event-conversion + # If event is supplied, which does not have value and can be only resolved, it's + # represented as `:fulfilled` with value `nil`. + # + # @!macro promises.param.default_executor + # @param [AbstractEventFuture] futures_and_or_events + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:254 + def zip_futures_on(default_executor, *futures_and_or_events); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:50 +module Concurrent::Promises::FactoryMethods::Configuration + # @return [Executor, :io, :fast] the executor which is used when none is supplied + # to a factory method. The method can be overridden in the receivers of + # `include FactoryMethod` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:54 + def default_executor; end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1840 +class Concurrent::Promises::FlatEventPromise < ::Concurrent::Promises::AbstractFlatPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1844 + def initialize(delayed, blockers_count, default_executor); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1848 + def process_on_blocker_resolution(future, index); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1873 +class Concurrent::Promises::FlatFuturePromise < ::Concurrent::Promises::AbstractFlatPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1877 + def initialize(delayed, blockers_count, levels, default_executor); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1884 + def process_on_blocker_resolution(future, index); end +end + +# Represents a value which will become available in future. May reject with a reason instead, +# e.g. when the tasks raises an exception. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:917 +class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1078 + def &(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. Returning future will have value nil if event_or_future is event and resolves + # first. + # + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1085 + def any(event_or_future); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1215 + def apply(args, block); end + + # Creates new future dependent on receiver which will not evaluate until touched, see {#touch}. + # In other words, it inserts delay into the chain of Futures making rest of it lazy evaluated. + # + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1095 + def delay; end + + # Allows rejected Future to be risen with `raise` method. + # If the reason is not an exception `Runtime.new(reason)` is returned. + # + # @example + # raise Promises.rejected_future(StandardError.new("boom")) + # raise Promises.rejected_future("or just boom") + # @raise [Concurrent::Error] when raising not rejected future + # @return [Exception] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1013 + def exception(*args); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1124 + def flat(level = T.unsafe(nil)); end + + # Creates new event which will be resolved when the returned event by receiver is. + # Be careful if the receiver rejects it will just resolve since Event does not hold reason. + # + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1130 + def flat_event; end + + # Creates new future which will have result of the future returned by receiver. If receiver + # rejects it will have its rejection. + # + # @param [Integer] level how many levels of futures should flatten + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1120 + def flat_future(level = T.unsafe(nil)); end + + # Is it in fulfilled state? + # @return [Boolean] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:921 + def fulfilled?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1243 + def inspect; end + + # @!macro promises.shortcut.using + # @return [self] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1136 + def on_fulfillment(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # fulfilled. Does nothing on rejection. + # + # @!macro promises.param.args + # @!macro promise.param.callback + # @return [self] + # @yield [value, *args] to the callback. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1147 + def on_fulfillment!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is + # fulfilled. Does nothing on rejection. + # + # @!macro promises.param.executor + # @!macro promises.param.args + # @!macro promise.param.callback + # @return [self] + # @yield [value, *args] to the callback. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1159 + def on_fulfillment_using(executor, *args, &callback); end + + # @!macro promises.shortcut.using + # @return [self] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1165 + def on_rejection(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # rejected. Does nothing on fulfillment. + # + # @!macro promises.param.args + # @!macro promise.param.callback + # @return [self] + # @yield [reason, *args] to the callback. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1176 + def on_rejection!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is + # rejected. Does nothing on fulfillment. + # + # @!macro promises.param.executor + # @!macro promises.param.args + # @!macro promise.param.callback + # @return [self] + # @yield [reason, *args] to the callback. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1188 + def on_rejection_using(executor, *args, &callback); end + + # Returns reason of future's rejection. + # @!macro promises.touches + # + # @!macro promises.warn.blocks + # @!macro promises.warn.nil + # @!macro promises.param.timeout + # @!macro promises.param.timeout_value + # @return [Object, timeout_value] the reason, or timeout_value on timeout, or nil on fulfillment. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:966 + def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # Is it in rejected state? + # @return [Boolean] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:928 + def rejected?; end + + # @!macro promises.shortcut.on + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1052 + def rescue(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it rejects. Does not run + # the task if it fulfills. It will resolve though, triggering any dependent futures. + # + # @!macro promises.param.executor + # @!macro promises.param.args + # @!macro promise.param.task-future + # @return [Future] + # @yield [reason, *args] to the task. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1064 + def rescue_on(executor, *args, &task); end + + # Returns triplet fulfilled?, value, reason. + # @!macro promises.touches + # + # @!macro promises.warn.blocks + # @!macro promises.param.timeout + # @return [Array(Boolean, Object, Object), nil] triplet of fulfilled?, value, reason, or nil + # on timeout. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:981 + def result(timeout = T.unsafe(nil)); end + + # Allows to use futures as green threads. The receiver has to evaluate to a future which + # represents what should be done next. It basically flattens indefinitely until non Future + # values is returned which becomes result of the returned future. Any encountered exception + # will become reason of the returned future. + # + # @return [Future] + # @param [#call(value)] run_test + # an object which when called returns either Future to keep running with + # or nil, then the run completes with the value. + # The run_test can be used to extract the Future from deeper structure, + # or to distinguish Future which is a resulting value from a future + # which is suppose to continue running. + # @example + # body = lambda do |v| + # v += 1 + # v < 5 ? Promises.future(v, &body) : v + # end + # Promises.future(0, &body).run.value! # => 5 + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1210 + def run(run_test = T.unsafe(nil)); end + + # @!macro promise.method.schedule + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1102 + def schedule(intended_time); end + + # @!macro promises.shortcut.on + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1034 + def then(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it fulfills. Does not run + # the task if it rejects. It will resolve though, triggering any dependent futures. + # + # @!macro promises.param.executor + # @!macro promises.param.args + # @!macro promise.param.task-future + # @return [Future] + # @yield [value, *args] to the task. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1046 + def then_on(executor, *args, &task); end + + # Converts future to event which is resolved when future is resolved by fulfillment or rejection. + # + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1222 + def to_event; end + + # Returns self, since this is a future + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1230 + def to_future; end + + # @return [String] Short string representation. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1235 + def to_s; end + + # @!macro promises.method.value + # Return value of the future. + # @!macro promises.touches + # + # @!macro promises.warn.blocks + # @!macro promises.warn.nil + # @!macro promises.param.timeout + # @!macro promises.param.timeout_value + # @param [Object] timeout_value a value returned by the method when it times out + # @return [Object, nil, timeout_value] the value of the Future when fulfilled, + # timeout_value on timeout, + # nil on rejection. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:950 + def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # @!macro promises.method.value + # @return [Object, nil, timeout_value] the value of the Future when fulfilled, + # or nil on rejection, + # or timeout_value on timeout. + # @raise [Exception] {#reason} on rejection + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:997 + def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # @!macro promises.method.wait + # @raise [Exception] {#reason} on rejection + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:987 + def wait!(timeout = T.unsafe(nil)); end + + # @!macro promises.method.with_default_executor + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1111 + def with_default_executor(executor); end + + # @!macro promises.method.zip + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1070 + def zip(other); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1089 + def |(event_or_future); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1272 + def async_callback_on_fulfillment(state, executor, args, callback); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1278 + def async_callback_on_rejection(state, executor, args, callback); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1284 + def callback_on_fulfillment(state, args, callback); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1288 + def callback_on_rejection(state, args, callback); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1292 + def callback_on_resolution(state, args, callback); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1251 + def rejected_resolution(raise_on_reassign, state); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1247 + def run_test(v); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1266 + def wait_until_resolved!(timeout = T.unsafe(nil)); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1984 +class Concurrent::Promises::FutureWrapperPromise < ::Concurrent::Promises::BlockedPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1985 + def initialize(delayed, blockers_count, default_executor); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1991 + def on_resolvable(resolved_future, index); end +end + +# will be immediately resolved +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1783 +class Concurrent::Promises::ImmediateEventPromise < ::Concurrent::Promises::InnerPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1784 + def initialize(default_executor); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1789 +class Concurrent::Promises::ImmediateFuturePromise < ::Concurrent::Promises::InnerPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1790 + def initialize(default_executor, fulfilled, value, reason); end +end + +# @abstract +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1615 +class Concurrent::Promises::InnerPromise < ::Concurrent::Promises::AbstractPromise; end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:338 +module Concurrent::Promises::InternalStates; end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:397 +class Concurrent::Promises::InternalStates::Fulfilled < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:399 + def initialize(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:407 + def apply(args, block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:403 + def fulfilled?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:415 + def reason; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:419 + def to_sym; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:411 + def value; end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:425 +class Concurrent::Promises::InternalStates::FulfilledArray < ::Concurrent::Promises::InternalStates::Fulfilled + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:426 + def apply(args, block); end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:488 +Concurrent::Promises::InternalStates::PENDING = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Pending) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:459 +class Concurrent::Promises::InternalStates::PartiallyRejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:460 + def initialize(value, reason); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:482 + def apply(args, block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:466 + def fulfilled?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:478 + def reason; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:470 + def to_sym; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:474 + def value; end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:351 +class Concurrent::Promises::InternalStates::Pending < ::Concurrent::Promises::InternalStates::State + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:352 + def resolved?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:356 + def to_sym; end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:490 +Concurrent::Promises::InternalStates::RESERVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Reserved) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:492 +Concurrent::Promises::InternalStates::RESOLVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Fulfilled) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:432 +class Concurrent::Promises::InternalStates::Rejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:433 + def initialize(reason); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:453 + def apply(args, block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:437 + def fulfilled?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:445 + def reason; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:449 + def to_sym; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:441 + def value; end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:362 +class Concurrent::Promises::InternalStates::Reserved < ::Concurrent::Promises::InternalStates::Pending; end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:366 +class Concurrent::Promises::InternalStates::ResolvedWithResult < ::Concurrent::Promises::InternalStates::State + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:391 + def apply; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:379 + def fulfilled?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:387 + def reason; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:367 + def resolved?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:375 + def result; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:371 + def to_sym; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:383 + def value; end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:340 +class Concurrent::Promises::InternalStates::State + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:341 + def resolved?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:345 + def to_sym; end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1748 +class Concurrent::Promises::RescuePromise < ::Concurrent::Promises::BlockedTaskPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1751 + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1755 + def on_resolvable(resolved_future, index); end +end + +# Marker module of Future, Event resolved manually. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1299 +module Concurrent::Promises::Resolvable + include ::Concurrent::Promises::InternalStates +end + +# A Event which can be resolved by user. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1304 +class Concurrent::Promises::ResolvableEvent < ::Concurrent::Promises::Event + include ::Concurrent::Promises::Resolvable + + # Makes the event resolved, which triggers all dependent futures. + # + # @!macro promise.param.raise_on_reassign + # @!macro promise.param.reserved + # @param [true, false] reserved + # Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1324 + def resolve(raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {AbstractEventFuture#wait} but has one additional optional argument + # resolve_on_timeout. + # + # @param [true, false] resolve_on_timeout + # If it times out and the argument is true it will also resolve the event. + # @return [self, true, false] + # @see AbstractEventFuture#wait + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1342 + def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Creates new event wrapping receiver, effectively hiding the resolve method. + # + # @return [Event] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1331 + def with_hidden_resolvable; end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1600 +class Concurrent::Promises::ResolvableEventPromise < ::Concurrent::Promises::AbstractPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1601 + def initialize(default_executor); end +end + +# A Future which can be resolved by user. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1354 +class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future + include ::Concurrent::Promises::Resolvable + + # Evaluates the block and sets its result as future's value fulfilling, if the block raises + # an exception the future rejects with it. + # + # @yield [*args] to the block. + # @yieldreturn [Object] value + # @return [self] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1395 + def evaluate_to(*args, &block); end + + # Evaluates the block and sets its result as future's value fulfilling, if the block raises + # an exception the future rejects with it. + # + # @yield [*args] to the block. + # @yieldreturn [Object] value + # @return [self] + # @raise [Exception] also raise reason on rejection. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1406 + def evaluate_to!(*args, &block); end + + # Makes the future fulfilled with `value`, + # which triggers all dependent futures. + # + # @param [Object] value + # @!macro promise.param.raise_on_reassign + # @!macro promise.param.reserved + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1375 + def fulfill(value, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {Future#reason} but has one additional optional argument + # resolve_on_timeout. + # + # @!macro promises.resolvable.resolve_on_timeout + # @return [Exception, timeout_value, nil] + # @see Future#reason + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1503 + def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Makes the future rejected with `reason`, + # which triggers all dependent futures. + # + # @param [Object] reason + # @!macro promise.param.raise_on_reassign + # @!macro promise.param.reserved + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1385 + def reject(reason, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Makes the future resolved with result of triplet `fulfilled?`, `value`, `reason`, + # which triggers all dependent futures. + # + # @param [true, false] fulfilled + # @param [Object] value + # @param [Object] reason + # @!macro promise.param.raise_on_reassign + # @!macro promise.param.reserved + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1365 + def resolve(fulfilled = T.unsafe(nil), value = T.unsafe(nil), reason = T.unsafe(nil), raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {Future#result} but has one additional optional argument + # resolve_on_timeout. + # + # @!macro promises.resolvable.resolve_on_timeout + # @return [::Array(Boolean, Object, Exception), nil] + # @see Future#result + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1524 + def result(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#value} but has one additional optional argument + # resolve_on_timeout. + # + # @!macro promises.resolvable.resolve_on_timeout + # @return [Object, timeout_value, nil] + # @see Future#value + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1459 + def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#value!} but has one additional optional argument + # resolve_on_timeout. + # + # @!macro promises.resolvable.resolve_on_timeout + # @return [Object, timeout_value, nil] + # @raise [Exception] {#reason} on rejection + # @see Future#value! + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1481 + def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {AbstractEventFuture#wait} but has one additional optional argument + # resolve_on_timeout. + # + # @!macro promises.resolvable.resolve_on_timeout + # @return [self, true, false] + # @see AbstractEventFuture#wait + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1421 + def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#wait!} but has one additional optional argument + # resolve_on_timeout. + # + # @!macro promises.resolvable.resolve_on_timeout + # @return [self, true, false] + # @raise [Exception] {#reason} on rejection + # @see Future#wait! + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1438 + def wait!(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Creates new future wrapping receiver, effectively hiding the resolve method and similar. + # + # @return [Future] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1542 + def with_hidden_resolvable; end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1606 +class Concurrent::Promises::ResolvableFuturePromise < ::Concurrent::Promises::AbstractPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1607 + def initialize(default_executor); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1611 + def evaluate_to(*args, block); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1909 +class Concurrent::Promises::RunFuturePromise < ::Concurrent::Promises::AbstractFlatPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1913 + def initialize(delayed, blockers_count, default_executor, run_test); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1918 + def process_on_blocker_resolution(future, index); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2114 +class Concurrent::Promises::ScheduledPromise < ::Concurrent::Promises::InnerPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2125 + def initialize(default_executor, intended_time); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2119 + def inspect; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2115 + def intended_time; end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1730 +class Concurrent::Promises::ThenPromise < ::Concurrent::Promises::BlockedTaskPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1733 + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1737 + def on_resolvable(resolved_future, index); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1940 +class Concurrent::Promises::ZipEventEventPromise < ::Concurrent::Promises::BlockedPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1941 + def initialize(delayed, blockers_count, default_executor); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1947 + def on_resolvable(resolved_future, index); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2031 +class Concurrent::Promises::ZipEventsPromise < ::Concurrent::Promises::BlockedPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2035 + def initialize(delayed, blockers_count, default_executor); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2041 + def on_resolvable(resolved_future, index); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1952 +class Concurrent::Promises::ZipFutureEventPromise < ::Concurrent::Promises::BlockedPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1953 + def initialize(delayed, blockers_count, default_executor); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1967 + def on_resolvable(resolved_future, index); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1960 + def process_on_blocker_resolution(future, index); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:1996 +class Concurrent::Promises::ZipFuturesPromise < ::Concurrent::Promises::BlockedPromise + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2000 + def initialize(delayed, blockers_count, default_executor); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2013 + def on_resolvable(resolved_future, index); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/promises.rb:2007 + def process_on_blocker_resolution(future, index); end +end + +# Methods form module A included to a module B, which is already included into class C, +# will not be visible in the C class. If this module is extended to B then A's methods +# are correctly made visible to C. +# +# @example +# module A +# def a +# :a +# end +# end +# +# module B1 +# end +# +# class C1 +# include B1 +# end +# +# module B2 +# extend Concurrent::ReInclude +# end +# +# class C2 +# include B2 +# end +# +# B1.send :include, A +# B2.send :include, A +# +# C1.new.respond_to? :a # => false +# C2.new.respond_to? :a # => true +# +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/re_include.rb:36 +module Concurrent::ReInclude + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/re_include.rb:44 + def extended(base); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/re_include.rb:50 + def include(*modules); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/re_include.rb:38 + def included(base); end +end + +# Ruby read-write lock implementation +# +# Allows any number of concurrent readers, but only one concurrent writer +# (And if the "write" lock is taken, any readers who come along will have to wait) +# +# If readers are already active when a writer comes along, the writer will wait for +# all the readers to finish before going ahead. +# Any additional readers that come when the writer is already waiting, will also +# wait (so writers are not starved). +# +# This implementation is based on `java.util.concurrent.ReentrantReadWriteLock`. +# +# @example +# lock = Concurrent::ReadWriteLock.new +# lock.with_read_lock { data.retrieve } +# lock.with_write_lock { data.modify! } +# +# @note Do **not** try to acquire the write lock while already holding a read lock +# **or** try to acquire the write lock while you already have it. +# This will lead to deadlock +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:31 +class Concurrent::ReadWriteLock < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `ReadWriteLock` in the unlocked state. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:59 + def initialize; end + + # Acquire a read lock. If a write lock has been acquired will block until + # it is released. Will not block if other read locks have been acquired. + # + # @return [Boolean] true if the lock is successfully acquired + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:111 + def acquire_read_lock; end + + # Acquire a write lock. Will block and wait for all active readers and writers. + # + # @return [Boolean] true if the lock is successfully acquired + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of writers + # is exceeded. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:160 + def acquire_write_lock; end + + # Queries whether any threads are waiting to acquire the read or write lock. + # + # @return [Boolean] true if any threads are waiting for a lock else false + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:214 + def has_waiters?; end + + # Release a previously acquired read lock. + # + # @return [Boolean] true if the lock is successfully released + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:140 + def release_read_lock; end + + # Release a previously acquired write lock. + # + # @return [Boolean] true if the lock is successfully released + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:196 + def release_write_lock; end + + # Execute a block operation within a read lock. + # + # @yield the task to be performed within the lock. + # + # @return [Object] the result of the block operation. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:75 + def with_read_lock; end + + # Execute a block operation within a write lock. + # + # @yield the task to be performed within the lock. + # + # @return [Object] the result of the block operation. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:94 + def with_write_lock; end + + # Queries if the write lock is held by any thread. + # + # @return [Boolean] true if the write lock is held else false` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:207 + def write_locked?; end + + private + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:246 + def max_readers?(c = T.unsafe(nil)); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:251 + def max_writers?(c = T.unsafe(nil)); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:221 + def running_readers(c = T.unsafe(nil)); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:226 + def running_readers?(c = T.unsafe(nil)); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:231 + def running_writer?(c = T.unsafe(nil)); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:241 + def waiting_writer?(c = T.unsafe(nil)); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:236 + def waiting_writers(c = T.unsafe(nil)); end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:40 +Concurrent::ReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:43 +Concurrent::ReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:37 +Concurrent::ReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb:34 +Concurrent::ReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) + +# Re-entrant read-write lock implementation +# +# Allows any number of concurrent readers, but only one concurrent writer +# (And while the "write" lock is taken, no read locks can be obtained either. +# Hence, the write lock can also be called an "exclusive" lock.) +# +# If another thread has taken a read lock, any thread which wants a write lock +# will block until all the readers release their locks. However, once a thread +# starts waiting to obtain a write lock, any additional readers that come along +# will also wait (so writers are not starved). +# +# A thread can acquire both a read and write lock at the same time. A thread can +# also acquire a read lock OR a write lock more than once. Only when the read (or +# write) lock is released as many times as it was acquired, will the thread +# actually let it go, allowing other threads which might have been waiting +# to proceed. Therefore the lock can be upgraded by first acquiring +# read lock and then write lock and that the lock can be downgraded by first +# having both read and write lock a releasing just the write lock. +# +# If both read and write locks are acquired by the same thread, it is not strictly +# necessary to release them in the same order they were acquired. In other words, +# the following code is legal: +# +# @example +# lock = Concurrent::ReentrantReadWriteLock.new +# lock.acquire_write_lock +# lock.acquire_read_lock +# lock.release_write_lock +# # At this point, the current thread is holding only a read lock, not a write +# # lock. So other threads can take read locks, but not a write lock. +# lock.release_read_lock +# # Now the current thread is not holding either a read or write lock, so +# # another thread could potentially acquire a write lock. +# +# This implementation was inspired by `java.util.concurrent.ReentrantReadWriteLock`. +# +# @example +# lock = Concurrent::ReentrantReadWriteLock.new +# lock.with_read_lock { data.retrieve } +# lock.with_write_lock { data.modify! } +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:53 +class Concurrent::ReentrantReadWriteLock < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `ReentrantReadWriteLock` in the unlocked state. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:109 + def initialize; end + + # Acquire a read lock. If a write lock is held by another thread, will block + # until it is released. + # + # @return [Boolean] true if the lock is successfully acquired + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:162 + def acquire_read_lock; end + + # Acquire a write lock. Will block and wait for all active readers and writers. + # + # @return [Boolean] true if the lock is successfully acquired + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of writers + # is exceeded. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:257 + def acquire_write_lock; end + + # Release a previously acquired read lock. + # + # @return [Boolean] true if the lock is successfully released + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:236 + def release_read_lock; end + + # Release a previously acquired write lock. + # + # @return [Boolean] true if the lock is successfully released + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:329 + def release_write_lock; end + + # Try to acquire a read lock and return true if we succeed. If it cannot be + # acquired immediately, return false. + # + # @return [Boolean] true if the lock is successfully acquired + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:215 + def try_read_lock; end + + # Try to acquire a write lock and return true if we succeed. If it cannot be + # acquired immediately, return false. + # + # @return [Boolean] true if the lock is successfully acquired + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:310 + def try_write_lock; end + + # Execute a block operation within a read lock. + # + # @yield the task to be performed within the lock. + # + # @return [Object] the result of the block operation. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:126 + def with_read_lock; end + + # Execute a block operation within a write lock. + # + # @yield the task to be performed within the lock. + # + # @return [Object] the result of the block operation. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:145 + def with_write_lock; end + + private + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:370 + def max_readers?(c = T.unsafe(nil)); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:375 + def max_writers?(c = T.unsafe(nil)); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:345 + def running_readers(c = T.unsafe(nil)); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:350 + def running_readers?(c = T.unsafe(nil)); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:355 + def running_writer?(c = T.unsafe(nil)); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:365 + def waiting_or_running_writer?(c = T.unsafe(nil)); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:360 + def waiting_writers(c = T.unsafe(nil)); end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:94 +Concurrent::ReentrantReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:96 +Concurrent::ReentrantReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:84 +Concurrent::ReentrantReadWriteLock::READER_BITS = T.let(T.unsafe(nil), Integer) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:102 +Concurrent::ReentrantReadWriteLock::READ_LOCK_MASK = T.let(T.unsafe(nil), Integer) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:92 +Concurrent::ReentrantReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) + +# Used with @Counter: +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:90 +Concurrent::ReentrantReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:86 +Concurrent::ReentrantReadWriteLock::WRITER_BITS = T.let(T.unsafe(nil), Integer) + +# Used with @HeldCount: +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:100 +Concurrent::ReentrantReadWriteLock::WRITE_LOCK_HELD = T.let(T.unsafe(nil), Integer) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb:104 +Concurrent::ReentrantReadWriteLock::WRITE_LOCK_MASK = T.let(T.unsafe(nil), Integer) + +# Raised by an `Executor` when it is unable to process a given task, +# possibly because of a reject policy or other internal error. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:48 +class Concurrent::RejectedExecutionError < ::Concurrent::Error; end + +# Raised when any finite resource, such as a lock counter, exceeds its +# maximum limit/threshold. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:52 +class Concurrent::ResourceLimitError < ::Concurrent::Error; end + +# @!macro internal_implementation_note +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:129 +class Concurrent::RubyExchanger < ::Concurrent::AbstractExchanger + extend ::Concurrent::Synchronization::SafeInitialization + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:159 + def initialize; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:165 + def __initialize_atomic_fields__; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:165 + def compare_and_set_slot(expected, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:165 + def slot; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:165 + def slot=(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:165 + def swap_slot(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:165 + def update_slot(&block); end + + private + + # @!macro exchanger_method_do_exchange + # + # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:170 + def do_exchange(value, timeout); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:138 +class Concurrent::RubyExchanger::Node < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:142 + def initialize(item); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:139 + def __initialize_atomic_fields__; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:139 + def compare_and_set_value(expected, value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:153 + def item; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:149 + def latch; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:139 + def swap_value(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:139 + def update_value(&block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:139 + def value; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/exchanger.rb:139 + def value=(value); end +end + +# @!macro abstract_executor_service_public_api +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:8 +class Concurrent::RubyExecutorService < ::Concurrent::AbstractExecutorService + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:11 + def initialize(*args, &block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:42 + def kill; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:17 + def post(*args, &task); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:33 + def shutdown; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:52 + def wait_for_termination(timeout = T.unsafe(nil)); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:70 + def ns_running?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:78 + def ns_shutdown?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:66 + def ns_shutdown_execution; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:74 + def ns_shuttingdown?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:58 + def stop_event; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb:62 + def stopped_event; end +end + +# @!macro single_thread_executor +# @!macro abstract_executor_service_public_api +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb:9 +class Concurrent::RubySingleThreadExecutor < ::Concurrent::RubyThreadPoolExecutor + include ::Concurrent::SerialExecutorService + + # @!macro single_thread_executor_method_initialize + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb:13 + def initialize(opts = T.unsafe(nil)); end +end + +# @!macro thread_pool_executor +# @!macro thread_pool_options +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:13 +class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService + # @!macro thread_pool_executor_method_initialize + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:47 + def initialize(opts = T.unsafe(nil)); end + + # @!macro thread_pool_executor_method_active_count + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:67 + def active_count; end + + # @!macro executor_service_method_can_overflow_question + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:74 + def can_overflow?; end + + # @!macro thread_pool_executor_attr_reader_completed_task_count + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:62 + def completed_task_count; end + + # @!macro thread_pool_executor_attr_reader_idletime + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:38 + def idletime; end + + # @!macro thread_pool_executor_attr_reader_largest_length + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:52 + def largest_length; end + + # @!macro thread_pool_executor_attr_reader_length + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:79 + def length; end + + # @!macro thread_pool_executor_attr_reader_max_length + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:32 + def max_length; end + + # @!macro thread_pool_executor_attr_reader_max_queue + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:41 + def max_queue; end + + # @!macro thread_pool_executor_attr_reader_min_length + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:35 + def min_length; end + + # @!macro thread_pool_executor_method_prune_pool + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:139 + def prune_pool; end + + # removes the worker if it can be pruned + # + # @return [true, false] if the worker was pruned + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:104 + def prune_worker(worker); end + + # @!macro thread_pool_executor_attr_reader_queue_length + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:84 + def queue_length; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:124 + def ready_worker(worker, last_message); end + + # @!macro thread_pool_executor_attr_reader_remaining_capacity + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:89 + def remaining_capacity; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:116 + def remove_worker(worker); end + + # @!macro thread_pool_executor_attr_reader_scheduled_task_count + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:57 + def scheduled_task_count; end + + # @!macro thread_pool_executor_attr_reader_synchronous + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:44 + def synchronous; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:129 + def worker_died(worker); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:134 + def worker_task_completed; end + + private + + # creates new worker which has to receive work to do after it's added + # @return [nil, Worker] nil of max capacity is reached + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:257 + def ns_add_busy_worker; end + + # tries to assign task to a worker, tries to get one from @ready or to create new one + # @return [true, false] if task is assigned to a worker + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:217 + def ns_assign_worker(*args, &task); end + + # tries to enqueue task + # @return [true, false] if enqueued + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:235 + def ns_enqueue(*args, &task); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:178 + def ns_execute(*args, &task); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:146 + def ns_initialize(opts); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:205 + def ns_kill_execution; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:173 + def ns_limited_queue?; end + + # @return [Integer] number of excess idle workers which can be removed without + # going below min_length, or all workers if not running + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:305 + def ns_prunable_capacity; end + + # handle ready worker, giving it new job or assigning back to @ready + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:269 + def ns_ready_worker(worker, last_message, success = T.unsafe(nil)); end + + # removes a worker which is not tracked in @ready + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:287 + def ns_remove_busy_worker(worker); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:294 + def ns_remove_ready_worker(worker); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:314 + def ns_reset_if_forked; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:190 + def ns_shutdown_execution; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:247 + def ns_worker_died(worker); end +end + +# @!macro thread_pool_executor_constant_default_max_pool_size +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:17 +Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_POOL_SIZE = T.let(T.unsafe(nil), Integer) + +# @!macro thread_pool_executor_constant_default_max_queue_size +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:23 +Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_QUEUE_SIZE = T.let(T.unsafe(nil), Integer) + +# @!macro thread_pool_executor_constant_default_min_pool_size +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:20 +Concurrent::RubyThreadPoolExecutor::DEFAULT_MIN_POOL_SIZE = T.let(T.unsafe(nil), Integer) + +# @!macro thread_pool_executor_constant_default_synchronous +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:29 +Concurrent::RubyThreadPoolExecutor::DEFAULT_SYNCHRONOUS = T.let(T.unsafe(nil), FalseClass) + +# @!macro thread_pool_executor_constant_default_thread_timeout +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:26 +Concurrent::RubyThreadPoolExecutor::DEFAULT_THREAD_IDLETIMEOUT = T.let(T.unsafe(nil), Integer) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:328 +class Concurrent::RubyThreadPoolExecutor::Worker + include ::Concurrent::Concern::Logging + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:331 + def initialize(pool, id); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:342 + def <<(message); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:350 + def kill; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:346 + def stop; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:356 + def create_worker(queue, pool, idletime); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:381 + def run_task(pool, task, args); end +end + +# A simple utility class that executes a callable and returns and array of three elements: +# success - indicating if the callable has been executed without errors +# value - filled by the callable result if it has been executed without errors, nil otherwise +# reason - the error risen by the callable if it has been executed with errors, nil otherwise +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:9 +class Concurrent::SafeTaskExecutor < ::Concurrent::Synchronization::LockableObject + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:11 + def initialize(task, opts = T.unsafe(nil)); end + + # @return [Array] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:18 + def execute(*args); end +end + +# `ScheduledTask` is a close relative of `Concurrent::Future` but with one +# important difference: A `Future` is set to execute as soon as possible +# whereas a `ScheduledTask` is set to execute after a specified delay. This +# implementation is loosely based on Java's +# [ScheduledExecutorService](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html). +# It is a more feature-rich variant of {Concurrent.timer}. +# +# The *intended* schedule time of task execution is set on object construction +# with the `delay` argument. The delay is a numeric (floating point or integer) +# representing a number of seconds in the future. Any other value or a numeric +# equal to or less than zero will result in an exception. The *actual* schedule +# time of task execution is set when the `execute` method is called. +# +# The constructor can also be given zero or more processing options. Currently +# the only supported options are those recognized by the +# [Dereferenceable](Dereferenceable) module. +# +# The final constructor argument is a block representing the task to be performed. +# If no block is given an `ArgumentError` will be raised. +# +# **States** +# +# `ScheduledTask` mixes in the [Obligation](Obligation) module thus giving it +# "future" behavior. This includes the expected lifecycle states. `ScheduledTask` +# has one additional state, however. While the task (block) is being executed the +# state of the object will be `:processing`. This additional state is necessary +# because it has implications for task cancellation. +# +# **Cancellation** +# +# A `:pending` task can be cancelled using the `#cancel` method. A task in any +# other state, including `:processing`, cannot be cancelled. The `#cancel` +# method returns a boolean indicating the success of the cancellation attempt. +# A cancelled `ScheduledTask` cannot be restarted. It is immutable. +# +# **Obligation and Observation** +# +# The result of a `ScheduledTask` can be obtained either synchronously or +# asynchronously. `ScheduledTask` mixes in both the [Obligation](Obligation) +# module and the +# [Observable](http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html) +# module from the Ruby standard library. With one exception `ScheduledTask` +# behaves identically to [Future](Observable) with regard to these modules. +# +# @!macro copy_options +# +# @example Basic usage +# +# require 'concurrent/scheduled_task' +# require 'csv' +# require 'open-uri' +# +# class Ticker +# def get_year_end_closing(symbol, year, api_key) +# uri = "https://www.alphavantage.co/query?function=TIME_SERIES_MONTHLY&symbol=#{symbol}&apikey=#{api_key}&datatype=csv" +# data = [] +# csv = URI.parse(uri).read +# if csv.include?('call frequency') +# return :rate_limit_exceeded +# end +# CSV.parse(csv, headers: true) do |row| +# data << row['close'].to_f if row['timestamp'].include?(year.to_s) +# end +# year_end = data.first +# year_end +# rescue => e +# p e +# end +# end +# +# api_key = ENV['ALPHAVANTAGE_KEY'] +# abort(error_message) unless api_key +# +# # Future +# price = Concurrent::Future.execute{ Ticker.new.get_year_end_closing('TWTR', 2013, api_key) } +# price.state #=> :pending +# price.pending? #=> true +# price.value(0) #=> nil (does not block) +# +# sleep(1) # do other stuff +# +# price.value #=> 63.65 (after blocking if necessary) +# price.state #=> :fulfilled +# price.fulfilled? #=> true +# price.value #=> 63.65 +# +# @example Successful task execution +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } +# task.state #=> :unscheduled +# task.execute +# task.state #=> pending +# +# # wait for it... +# sleep(3) +# +# task.unscheduled? #=> false +# task.pending? #=> false +# task.fulfilled? #=> true +# task.rejected? #=> false +# task.value #=> 'What does the fox say?' +# +# @example One line creation and execution +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' }.execute +# task.state #=> pending +# +# task = Concurrent::ScheduledTask.execute(2){ 'What do you get when you multiply 6 by 9?' } +# task.state #=> pending +# +# @example Failed task execution +# +# task = Concurrent::ScheduledTask.execute(2){ raise StandardError.new('Call me maybe?') } +# task.pending? #=> true +# +# # wait for it... +# sleep(3) +# +# task.unscheduled? #=> false +# task.pending? #=> false +# task.fulfilled? #=> false +# task.rejected? #=> true +# task.value #=> nil +# task.reason #=> # +# +# @example Task execution with observation +# +# observer = Class.new{ +# def update(time, value, reason) +# puts "The task completed at #{time} with value '#{value}'" +# end +# }.new +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } +# task.add_observer(observer) +# task.execute +# task.pending? #=> true +# +# # wait for it... +# sleep(3) +# +# #>> The task completed at 2013-11-07 12:26:09 -0500 with value 'What does the fox say?' +# +# @!macro monotonic_clock_warning +# +# @see Concurrent.timer +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:158 +class Concurrent::ScheduledTask < ::Concurrent::IVar + include ::Comparable + + # Schedule a task for execution at a specified future time. + # + # @param [Float] delay the number of seconds to wait for before executing the task + # + # @yield the task to be performed + # + # @!macro executor_and_deref_options + # + # @option opts [object, Array] :args zero or more arguments to be passed the task + # block on execution + # + # @raise [ArgumentError] When no block is given + # @raise [ArgumentError] When given a time that is in the past + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:178 + def initialize(delay, opts = T.unsafe(nil), &task); end + + # Comparator which orders by schedule time. + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:213 + def <=>(other); end + + # Cancel this task and prevent it from executing. A task can only be + # cancelled if it is pending or unscheduled. + # + # @return [Boolean] true if successfully cancelled else false + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:235 + def cancel; end + + # Has the task been cancelled? + # + # @return [Boolean] true if the task is in the given state else false + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:220 + def cancelled?; end + + # Execute an `:unscheduled` `ScheduledTask`. Immediately sets the state to `:pending` + # and starts counting down toward execution. Does nothing if the `ScheduledTask` is + # in any state other than `:unscheduled`. + # + # @return [ScheduledTask] a reference to `self` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:273 + def execute; end + + # The executor on which to execute the task. + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:163 + def executor; end + + # The `delay` value given at instantiation. + # + # @return [Float] the initial delay. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:199 + def initial_delay; end + + # Execute the task. + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:297 + def process_task; end + + # In the task execution in progress? + # + # @return [Boolean] true if the task is in the given state else false + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:227 + def processing?; end + + # Reschedule the task using the given delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @param [Float] delay the number of seconds to wait for before executing the task + # + # @return [Boolean] true if successfully rescheduled else false + # + # @raise [ArgumentError] When given a time that is in the past + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:262 + def reschedule(delay); end + + # Reschedule the task using the original delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @return [Boolean] true if successfully rescheduled else false + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:250 + def reset; end + + # The monotonic time at which the the task is scheduled to be executed. + # + # @return [Float] the schedule time or nil if `unscheduled` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:206 + def schedule_time; end + + protected + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:301 + def fail(reason = T.unsafe(nil)); end + + # Reschedule the task using the given delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @param [Float] delay the number of seconds to wait for before executing the task + # + # @return [Boolean] true if successfully rescheduled else false + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:326 + def ns_reschedule(delay); end + + # Schedule the task using the given delay and the current time. + # + # @param [Float] delay the number of seconds to wait for before executing the task + # + # @return [Boolean] true if successfully rescheduled else false + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:312 + def ns_schedule(delay); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:301 + def set(value = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:301 + def try_set(value = T.unsafe(nil), &block); end + + class << self + # Create a new `ScheduledTask` object with the given block, execute it, and return the + # `:pending` object. + # + # @param [Float] delay the number of seconds to wait for before executing the task + # + # @!macro executor_and_deref_options + # + # @return [ScheduledTask] the newly created `ScheduledTask` in the `:pending` state + # + # @raise [ArgumentError] if no block is given + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/scheduled_task.rb:290 + def execute(delay, opts = T.unsafe(nil), &task); end + end +end + +# @!macro semaphore +# +# A counting semaphore. Conceptually, a semaphore maintains a set of +# permits. Each {#acquire} blocks if necessary until a permit is +# available, and then takes it. Each {#release} adds a permit, potentially +# releasing a blocking acquirer. +# However, no actual permit objects are used; the Semaphore just keeps a +# count of the number available and acts accordingly. +# Alternatively, permits may be acquired within a block, and automatically +# released after the block finishes executing. +# +# @!macro semaphore_public_api +# @example +# semaphore = Concurrent::Semaphore.new(2) +# +# t1 = Thread.new do +# semaphore.acquire +# puts "Thread 1 acquired semaphore" +# end +# +# t2 = Thread.new do +# semaphore.acquire +# puts "Thread 2 acquired semaphore" +# end +# +# t3 = Thread.new do +# semaphore.acquire +# puts "Thread 3 acquired semaphore" +# end +# +# t4 = Thread.new do +# sleep(2) +# puts "Thread 4 releasing semaphore" +# semaphore.release +# end +# +# [t1, t2, t3, t4].each(&:join) +# +# # prints: +# # Thread 3 acquired semaphore +# # Thread 2 acquired semaphore +# # Thread 4 releasing semaphore +# # Thread 1 acquired semaphore +# +# @example +# semaphore = Concurrent::Semaphore.new(1) +# +# puts semaphore.available_permits +# semaphore.acquire do +# puts semaphore.available_permits +# end +# puts semaphore.available_permits +# +# # prints: +# # 1 +# # 0 +# # 1 +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/semaphore.rb:161 +class Concurrent::Semaphore < ::Concurrent::MutexSemaphore; end + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/semaphore.rb:96 +Concurrent::SemaphoreImplementation = Concurrent::MutexSemaphore + +# Indicates that the including `ExecutorService` guarantees +# that all operations will occur in the order they are post and that no +# two operations may occur simultaneously. This module provides no +# functionality and provides no guarantees. That is the responsibility +# of the including class. This module exists solely to allow the including +# object to be interrogated for its serialization status. +# +# @example +# class Foo +# include Concurrent::SerialExecutor +# end +# +# foo = Foo.new +# +# foo.is_a? Concurrent::ExecutorService #=> true +# foo.is_a? Concurrent::SerialExecutor #=> true +# foo.serialized? #=> true +# +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb:24 +module Concurrent::SerialExecutorService + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService + + # @!macro executor_service_method_serialized_question + # + # @note Always returns `true` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb:30 + def serialized?; end +end + +# Ensures passed jobs in a serialized order never running at the same time. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:8 +class Concurrent::SerializedExecution < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Logging + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:11 + def initialize; end + + # Submit a task to the executor for asynchronous processing. + # + # @param [Executor] executor to be used for this job + # + # @param [Array] args zero or more arguments to be passed to the task + # + # @yield the asynchronous task to perform + # + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # + # @raise [ArgumentError] if no task is given + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:34 + def post(executor, *args, &task); end + + # As {#post} but allows to submit multiple tasks at once, it's guaranteed that they will not + # be interleaved by other tasks. + # + # @param [Array, Proc)>] posts array of triplets where + # first is a {ExecutorService}, second is array of args for task, third is a task (Proc) + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:44 + def posts(posts); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:75 + def call_job(job); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:70 + def ns_initialize; end + + # ensures next job is executed if any is stashed + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:95 + def work(job); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 +class Concurrent::SerializedExecution::Job < ::Struct + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 + def args; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 + def args=(_); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 + def block; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 + def block=(_); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:17 + def call; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 + def executor; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 + def executor=(_); end + + class << self + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 + def [](*_arg0); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 + def inspect; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 + def keyword_init?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 + def members; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution.rb:16 + def new(*_arg0); end + end +end + +# A wrapper/delegator for any `ExecutorService` that +# guarantees serialized execution of tasks. +# +# @see [SimpleDelegator](http://www.ruby-doc.org/stdlib-2.1.2/libdoc/delegate/rdoc/SimpleDelegator.html) +# @see Concurrent::SerializedExecution +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb:12 +class Concurrent::SerializedExecutionDelegator < ::SimpleDelegator + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService + include ::Concurrent::SerialExecutorService + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb:15 + def initialize(executor); end + + # @!macro executor_service_method_post + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb:22 + def post(*args, &task); end +end + +# @!macro concurrent_set +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:61 +class Concurrent::Set < ::Concurrent::CRubySet; end + +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/set.rb:23 +Concurrent::SetImplementation = Concurrent::CRubySet + +# An thread-safe, write-once variation of Ruby's standard `Struct`. +# Each member can have its value set at most once, either at construction +# or any time thereafter. Attempting to assign a value to a member +# that has already been set will result in a `Concurrent::ImmutabilityError`. +# +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# @see http://en.wikipedia.org/wiki/Final_(Java) Java `final` keyword +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:14 +module Concurrent::SettableStruct + include ::Concurrent::Synchronization::AbstractStruct + + # @!macro struct_equality + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:50 + def ==(other); end + + # @!macro struct_get + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:45 + def [](member); end + + # @!macro struct_set + # + # @raise [Concurrent::ImmutabilityError] if the given member has already been set + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:75 + def []=(member, value); end + + # @!macro struct_each + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:55 + def each(&block); end + + # @!macro struct_each_pair + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:61 + def each_pair(&block); end + + # @!macro struct_inspect + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:29 + def inspect; end + + # @!macro struct_merge + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:35 + def merge(other, &block); end + + # @!macro struct_select + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:67 + def select(&block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:21 + def to_a; end + + # @!macro struct_to_h + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:40 + def to_h; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:32 + def to_s; end + + # @!macro struct_values + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:18 + def values; end + + # @!macro struct_values_at + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:24 + def values_at(*indexes); end + + private + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:97 + def initialize_copy(original); end + + class << self + # @!macro struct_new + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:105 + def new(*args, &block); end + end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/settable_struct.rb:115 +Concurrent::SettableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + +# An executor service in which every operation spawns a new, +# independently operating thread. +# +# This is perhaps the most inefficient executor service in this +# library. It exists mainly for testing an debugging. Thread creation +# and management is expensive in Ruby and this executor performs no +# resource pooling. This can be very beneficial during testing and +# debugging because it decouples the using code from the underlying +# executor implementation. In production this executor will likely +# lead to suboptimal performance. +# +# @note Intended for use primarily in testing and debugging. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:21 +class Concurrent::SimpleExecutorService < ::Concurrent::RubyExecutorService + # @!macro executor_service_method_left_shift + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:56 + def <<(task); end + + # @!macro executor_service_method_kill + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:84 + def kill; end + + # @!macro executor_service_method_post + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:40 + def post(*args, &task); end + + # @!macro executor_service_method_running_question + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:62 + def running?; end + + # @!macro executor_service_method_shutdown + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:77 + def shutdown; end + + # @!macro executor_service_method_shutdown_question + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:72 + def shutdown?; end + + # @!macro executor_service_method_shuttingdown_question + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:67 + def shuttingdown?; end + + # @!macro executor_service_method_wait_for_termination + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:91 + def wait_for_termination(timeout = T.unsafe(nil)); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:97 + def ns_initialize(*args); end + + class << self + # @!macro executor_service_method_left_shift + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:34 + def <<(task); end + + # @!macro executor_service_method_post + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb:24 + def post(*args); end + end +end + +# @!macro single_thread_executor +# +# A thread pool with a single thread an unlimited queue. Should the thread +# die for any reason it will be removed and replaced, thus ensuring that +# the executor will always remain viable and available to process jobs. +# +# A common pattern for background processing is to create a single thread +# on which an infinite loop is run. The thread's loop blocks on an input +# source (perhaps blocking I/O or a queue) and processes each input as it +# is received. This pattern has several issues. The thread itself is highly +# susceptible to errors during processing. Also, the thread itself must be +# constantly monitored and restarted should it die. `SingleThreadExecutor` +# encapsulates all these behaviors. The task processor is highly resilient +# to errors from within tasks. Also, should the thread die it will +# automatically be restarted. +# +# The API and behavior of this class are based on Java's `SingleThreadExecutor`. +# +# @!macro abstract_executor_service_public_api +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb:37 +class Concurrent::SingleThreadExecutor < ::Concurrent::RubySingleThreadExecutor; end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb:10 +Concurrent::SingleThreadExecutorImplementation = Concurrent::RubySingleThreadExecutor + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb:2 +module Concurrent::Synchronization + class << self + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/full_memory_barrier.rb:7 + def full_memory_barrier; end + end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb:9 +class Concurrent::Synchronization::AbstractLockableObject < ::Concurrent::Synchronization::Object + protected + + # @!macro synchronization_object_method_ns_broadcast + # + # Broadcast to all waiting threads. + # @return [self] + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def broadcast + # synchronize { ns_broadcast } + # end + # ``` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb:96 + def ns_broadcast; end + + # @!macro synchronization_object_method_ns_signal + # + # Signal one waiting thread. + # @return [self] + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def signal + # synchronize { ns_signal } + # end + # ``` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb:81 + def ns_signal; end + + # @!macro synchronization_object_method_ns_wait + # + # Wait until another thread calls #signal or #broadcast, + # spurious wake-ups can happen. + # + # @param [Numeric, nil] timeout in seconds, `nil` means no timeout + # @return [self] + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def wait(timeout = nil) + # synchronize { ns_wait(timeout) } + # end + # ``` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb:66 + def ns_wait(timeout = T.unsafe(nil)); end + + # @!macro synchronization_object_method_ns_wait_until + # + # Wait until condition is met or timeout passes, + # protects against spurious wake-ups. + # @param [Numeric, nil] timeout in seconds, `nil` means no timeout + # @yield condition to be met + # @yieldreturn [true, false] + # @return [true, false] if condition met + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def wait_until(timeout = nil, &condition) + # synchronize { ns_wait_until(timeout, &condition) } + # end + # ``` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb:37 + def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # @!macro synchronization_object_method_synchronize + # + # @yield runs the block synchronized against this object, + # equivalent of java's `synchronize(this) {}` + # @note can by made public in descendants if required by `public :synchronize` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb:18 + def synchronize; end +end + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb:6 +class Concurrent::Synchronization::AbstractObject + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb:7 + def initialize; end + + # @!visibility private + # @abstract + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb:13 + def full_memory_barrier; end + + class << self + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb:17 + def attr_volatile(*names); end + end +end + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:6 +module Concurrent::Synchronization::AbstractStruct + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:9 + def initialize(*values); end + + # @!macro struct_length + # + # Returns the number of struct members. + # + # @return [Fixnum] the number of struct members + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:19 + def length; end + + # @!macro struct_members + # + # Returns the struct members as an array of symbols. + # + # @return [Array] the struct members as an array of symbols + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:29 + def members; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:22 + def size; end + + protected + + # @!macro struct_each + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:82 + def ns_each; end + + # @!macro struct_each_pair + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:89 + def ns_each_pair; end + + # @!macro struct_equality + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:75 + def ns_equality(other); end + + # @!macro struct_get + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:59 + def ns_get(member); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:119 + def ns_initialize_copy; end + + # @!macro struct_inspect + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:105 + def ns_inspect; end + + # @!macro struct_merge + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:114 + def ns_merge(other, &block); end + + # @!macro struct_select + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:98 + def ns_select; end + + # @!macro struct_to_h + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:52 + def ns_to_h; end + + # @!macro struct_values + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:38 + def ns_values; end + + # @!macro struct_values_at + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:45 + def ns_values_at(indexes); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:130 + def pr_underscore(clazz); end + + class << self + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:141 + def define_struct_class(parent, base, name, members, &block); end + end +end + +# @!visibility private +# TODO (pitr-ch 04-Dec-2016): should be in edge +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:8 +class Concurrent::Synchronization::Condition < ::Concurrent::Synchronization::LockableObject + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:18 + def initialize(lock); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:47 + def broadcast; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:51 + def ns_broadcast; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:43 + def ns_signal; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:27 + def ns_wait(timeout = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:35 + def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:39 + def signal; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:23 + def wait(timeout = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:31 + def wait_until(timeout = T.unsafe(nil), &condition); end + + class << self + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:15 + def private_new(*args, &block); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:16 + def new(*args, &block); end + end +end + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:8 +module Concurrent::Synchronization::ConditionSignalling + protected + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:16 + def ns_broadcast; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:11 + def ns_signal; end +end + +# @!visibility private +# TODO (pitr-ch 04-Dec-2016): should be in edge +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lock.rb:8 +class Concurrent::Synchronization::Lock < ::Concurrent::Synchronization::LockableObject + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lock.rb:31 + def broadcast; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lock.rb:35 + def ns_broadcast; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lock.rb:29 + def ns_signal; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lock.rb:17 + def ns_wait(timeout = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lock.rb:23 + def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lock.rb:25 + def signal; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lock.rb:11 + def synchronize; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lock.rb:13 + def wait(timeout = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lock.rb:19 + def wait_until(timeout = T.unsafe(nil), &condition); end +end + +# Safe synchronization under any Ruby implementation. +# It provides methods like {#synchronize}, {#wait}, {#signal} and {#broadcast}. +# Provides a single layer which can improve its implementation over time without changes needed to +# the classes using it. Use {Synchronization::Object} not this abstract class. +# +# @note this object does not support usage together with +# [`Thread#wakeup`](http://ruby-doc.org/core/Thread.html#method-i-wakeup) +# and [`Thread#raise`](http://ruby-doc.org/core/Thread.html#method-i-raise). +# `Thread#sleep` and `Thread#wakeup` will work as expected but mixing `Synchronization::Object#wait` and +# `Thread#wakeup` will not work on all platforms. +# +# @see Event implementation as an example of this class use +# +# @example simple +# class AnClass < Synchronization::Object +# def initialize +# super +# synchronize { @value = 'asd' } +# end +# +# def value +# synchronize { @value } +# end +# end +# +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb:50 +class Concurrent::Synchronization::LockableObject < ::Concurrent::Synchronization::MutexLockableObject + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/condition.rb:57 + def new_condition; end +end + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb:11 +Concurrent::Synchronization::LockableObjectImplementation = Concurrent::Synchronization::MutexLockableObject + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:60 +class Concurrent::Synchronization::MonitorLockableObject < ::Concurrent::Synchronization::AbstractLockableObject + include ::Concurrent::Synchronization::ConditionSignalling + extend ::Concurrent::Synchronization::SafeInitialization + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:65 + def initialize; end + + protected + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:83 + def ns_wait(timeout = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:79 + def synchronize; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:71 + def initialize_copy(other); end +end + +# @!visibility private +# @!macro internal_implementation_note +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:25 +class Concurrent::Synchronization::MutexLockableObject < ::Concurrent::Synchronization::AbstractLockableObject + include ::Concurrent::Synchronization::ConditionSignalling + extend ::Concurrent::Synchronization::SafeInitialization + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:30 + def initialize; end + + protected + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:52 + def ns_wait(timeout = T.unsafe(nil)); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:44 + def synchronize; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:36 + def initialize_copy(other); end +end + +# Abstract object providing final, volatile, ans CAS extensions to build other concurrent abstractions. +# - final instance variables see {Object.safe_initialization!} +# - volatile instance variables see {Object.attr_volatile} +# - volatile instance variables see {Object.attr_atomic} +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:15 +class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::AbstractObject + include ::Concurrent::Synchronization::Volatile + extend ::Concurrent::Synchronization::Volatile::ClassMethods + + # Has to be called by children. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:28 + def initialize; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:146 + def __initialize_atomic_fields__; end + + class << self + # @return [true, false] is the attribute with name atomic? + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:125 + def atomic_attribute?(name); end + + # @param [true, false] inherited should inherited volatile with CAS fields be returned? + # @return [::Array] Returns defined volatile with CAS fields on this class. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:119 + def atomic_attributes(inherited = T.unsafe(nil)); end + + # Creates methods for reading and writing to a instance variable with + # volatile (Java) semantic as {.attr_volatile} does. + # The instance variable should be accessed only through generated methods. + # This method generates following methods: `value`, `value=(new_value) #=> new_value`, + # `swap_value(new_value) #=> old_value`, + # `compare_and_set_value(expected, value) #=> true || false`, `update_value(&block)`. + # @param [::Array] names of the instance variables to be volatile with CAS. + # @return [::Array] names of defined method names. + # @!macro attr_atomic + # @!method $1 + # @return [Object] The $1. + # @!method $1=(new_$1) + # Set the $1. + # @return [Object] new_$1. + # @!method swap_$1(new_$1) + # Set the $1 to new_$1 and return the old $1. + # @return [Object] old $1 + # @!method compare_and_set_$1(expected_$1, new_$1) + # Sets the $1 to new_$1 if the current $1 is expected_$1 + # @return [true, false] + # @!method update_$1(&block) + # Updates the $1 using the block. + # @yield [Object] Calculate a new $1 using given (old) $1 + # @yieldparam [Object] old $1 + # @return [Object] new $1 + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:84 + def attr_atomic(*names); end + + # For testing purposes, quite slow. Injects assert code to new method which will raise if class instance contains + # any instance variables with CamelCase names and isn't {.safe_initialization?}. + # @raise when offend found + # @return [true] + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:45 + def ensure_safe_initialization_when_final_fields_are_present; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:33 + def safe_initialization!; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:37 + def safe_initialization?; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/object.rb:131 + def define_initialize_atomic_fields; end + end +end + +# @!visibility private +# @!macro internal_implementation_note +# +# By extending this module, a class and all its children are marked to be constructed safely. Meaning that +# all writes (ivar initializations) are made visible to all readers of newly constructed object. It ensures +# same behaviour as Java's final fields. +# +# Due to using Kernel#extend, the module is not included again if already present in the ancestors, +# which avoids extra overhead. +# +# @example +# class AClass < Concurrent::Synchronization::Object +# extend Concurrent::Synchronization::SafeInitialization +# +# def initialize +# @AFinalValue = 'value' # published safely, #foo will never return nil +# end +# +# def foo +# @AFinalValue +# end +# end +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb:28 +module Concurrent::Synchronization::SafeInitialization + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb:29 + def new(*args, &block); end +end + +# Volatile adds the attr_volatile class method when included. +# +# @example +# class Foo +# include Concurrent::Synchronization::Volatile +# +# attr_volatile :bar +# +# def initialize +# self.bar = 1 +# end +# end +# +# foo = Foo.new +# foo.bar +# => 1 +# foo.bar = 2 +# => 2 +# +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/volatile.rb:28 +module Concurrent::Synchronization::Volatile + mixes_in_class_methods ::Concurrent::Synchronization::Volatile::ClassMethods + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/volatile.rb:33 + def full_memory_barrier; end + + class << self + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/volatile.rb:29 + def included(base); end + end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/volatile.rb:37 +module Concurrent::Synchronization::Volatile::ClassMethods + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/synchronization/volatile.rb:39 + def attr_volatile(*names); end +end + +# This class provides a trivial way to synchronize all calls to a given object +# by wrapping it with a `Delegator` that performs `Monitor#enter/exit` calls +# around the delegated `#send`. Example: +# +# array = [] # not thread-safe on many impls +# array = SynchronizedDelegator.new([]) # thread-safe +# +# A simple `Monitor` provides a very coarse-grained way to synchronize a given +# object, in that it will cause synchronization for methods that have no need +# for it, but this is a trivial way to get thread-safety where none may exist +# currently on some implementations. +# +# This class is currently being considered for inclusion into stdlib, via +# https://bugs.ruby-lang.org/issues/8556 +# +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb:21 +class Concurrent::SynchronizedDelegator < ::SimpleDelegator + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb:31 + def initialize(obj); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb:36 + def method_missing(method, *args, &block); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb:22 + def setup; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb:27 + def teardown; end +end + +# A `TVar` is a transactional variable - a single-element container that +# is used as part of a transaction - see `Concurrent::atomically`. +# +# @!macro thread_safe_variable_comparison +# +# {include:file:docs-source/tvar.md} +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:12 +class Concurrent::TVar < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `TVar` with an initial value. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:16 + def initialize(value); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:46 + def unsafe_lock; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:36 + def unsafe_value; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:41 + def unsafe_value=(value); end + + # Get the value of a `TVar`. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:22 + def value; end + + # Set the value of a `TVar`. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:29 + def value=(value); end +end + +# A `ThreadLocalVar` is a variable where the value is different for each thread. +# Each variable may have a default value, but when you modify the variable only +# the current thread will ever see that change. +# +# This is similar to Ruby's built-in thread-local variables (`Thread#thread_variable_get`), +# but with these major advantages: +# * `ThreadLocalVar` has its own identity, it doesn't need a Symbol. +# * Each Ruby's built-in thread-local variable leaks some memory forever (it's a Symbol held forever on the thread), +# so it's only OK to create a small amount of them. +# `ThreadLocalVar` has no such issue and it is fine to create many of them. +# * Ruby's built-in thread-local variables leak forever the value set on each thread (unless set to nil explicitly). +# `ThreadLocalVar` automatically removes the mapping for each thread once the `ThreadLocalVar` instance is GC'd. +# +# @!macro thread_safe_variable_comparison +# +# @example +# v = ThreadLocalVar.new(14) +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# +# @example +# v = ThreadLocalVar.new(14) +# +# t1 = Thread.new do +# v.value #=> 14 +# v.value = 1 +# v.value #=> 1 +# end +# +# t2 = Thread.new do +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# end +# +# v.value #=> 14 +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb:43 +class Concurrent::ThreadLocalVar + # Creates a thread local variable. + # + # @param [Object] default the default value when otherwise unset + # @param [Proc] default_block Optional block that gets called to obtain the + # default value for each thread + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb:51 + def initialize(default = T.unsafe(nil), &default_block); end + + # Bind the given value to thread local storage during + # execution of the given block. + # + # @param [Object] value the value to bind + # @yield the operation to be performed with the bound variable + # @return [Object] the value + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb:88 + def bind(value); end + + # Returns the value in the current thread's copy of this thread-local variable. + # + # @return [Object] the current value + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb:70 + def value; end + + # Sets the current thread's copy of this thread-local variable to the specified value. + # + # @param [Object] value the value to set + # @return [Object] the new value + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb:78 + def value=(value); end + + protected + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb:103 + def default; end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb:44 +Concurrent::ThreadLocalVar::LOCALS = T.let(T.unsafe(nil), Concurrent::ThreadLocals) + +# @!visibility private +# @!macro internal_implementation_note +# An array-backed storage of indexed variables per thread. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:141 +class Concurrent::ThreadLocals < ::Concurrent::AbstractLocals + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:142 + def locals; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/atomic/locals.rb:146 + def locals!; end +end + +# @!macro thread_pool_executor +# +# An abstraction composed of one or more threads and a task queue. Tasks +# (blocks or `proc` objects) are submitted to the pool and added to the queue. +# The threads in the pool remove the tasks and execute them in the order +# they were received. +# +# A `ThreadPoolExecutor` will automatically adjust the pool size according +# to the bounds set by `min-threads` and `max-threads`. When a new task is +# submitted and fewer than `min-threads` threads are running, a new thread +# is created to handle the request, even if other worker threads are idle. +# If there are more than `min-threads` but less than `max-threads` threads +# running, a new thread will be created only if the queue is full. +# +# Threads that are idle for too long will be garbage collected, down to the +# configured minimum options. Should a thread crash it, too, will be garbage collected. +# +# `ThreadPoolExecutor` is based on the Java class of the same name. From +# the official Java documentation; +# +# > Thread pools address two different problems: they usually provide +# > improved performance when executing large numbers of asynchronous tasks, +# > due to reduced per-task invocation overhead, and they provide a means +# > of bounding and managing the resources, including threads, consumed +# > when executing a collection of tasks. Each ThreadPoolExecutor also +# > maintains some basic statistics, such as the number of completed tasks. +# > +# > To be useful across a wide range of contexts, this class provides many +# > adjustable parameters and extensibility hooks. However, programmers are +# > urged to use the more convenient Executors factory methods +# > [CachedThreadPool] (unbounded thread pool, with automatic thread reclamation), +# > [FixedThreadPool] (fixed size thread pool) and [SingleThreadExecutor] (single +# > background thread), that preconfigure settings for the most common usage +# > scenarios. +# +# @!macro thread_pool_options +# +# @!macro thread_pool_executor_public_api +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb:56 +class Concurrent::ThreadPoolExecutor < ::Concurrent::RubyThreadPoolExecutor; end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb:10 +Concurrent::ThreadPoolExecutorImplementation = Concurrent::RubyThreadPoolExecutor + +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/util.rb:4 +module Concurrent::ThreadSafe; end + +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/util.rb:7 +module Concurrent::ThreadSafe::Util + class << self + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb:16 + def make_synchronized_on_cruby(klass); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb:41 + def make_synchronized_on_truffleruby(klass); end + end +end + +# TODO (pitr-ch 15-Oct-2016): migrate to Utility::ProcessorCounter +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/util.rb:13 +Concurrent::ThreadSafe::Util::CPU_COUNT = T.let(T.unsafe(nil), Integer) + +# TODO (pitr-ch 15-Oct-2016): migrate to Utility::NativeInteger +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/util.rb:10 +Concurrent::ThreadSafe::Util::FIXNUM_BIT_SIZE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/thread_safe/util.rb:11 +Concurrent::ThreadSafe::Util::MAX_INT = T.let(T.unsafe(nil), Integer) + +# Raised when an operation times out. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/errors.rb:55 +class Concurrent::TimeoutError < ::Concurrent::Error; end + +# Executes a collection of tasks, each after a given delay. A master task +# monitors the set and schedules each task for execution at the appropriate +# time. Tasks are run on the global thread pool or on the supplied executor. +# Each task is represented as a `ScheduledTask`. +# +# @see Concurrent::ScheduledTask +# +# @!macro monotonic_clock_warning +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:19 +class Concurrent::TimerSet < ::Concurrent::RubyExecutorService + # Create a new set of timed tasks. + # + # @!macro executor_options + # + # @param [Hash] opts the options used to specify the executor on which to perform actions + # @option opts [Executor] :executor when set use the given `Executor` instance. + # Three special values are also supported: `:task` returns the global task pool, + # `:operation` returns the global operation pool, and `:immediate` returns a new + # `ImmediateExecutor` object. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:30 + def initialize(opts = T.unsafe(nil)); end + + # Begin an immediate shutdown. In-progress tasks will be allowed to + # complete but enqueued tasks will be dismissed and no new tasks + # will be accepted. Has no additional effect if the thread pool is + # not running. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:62 + def kill; end + + # Post a task to be execute run after a given delay (in seconds). If the + # delay is less than 1/100th of a second the task will be immediately post + # to the executor. + # + # @param [Float] delay the number of seconds to wait for before executing the task. + # @param [Array] args the arguments passed to the task on execution. + # + # @yield the task to be performed. + # + # @return [Concurrent::ScheduledTask, false] IVar representing the task if the post + # is successful; false after shutdown. + # + # @raise [ArgumentError] if the intended execution time is not in the future. + # @raise [ArgumentError] if no block is given. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:48 + def post(delay, *args, &task); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:67 + def <<(task); end + + # Initialize the object. + # + # @param [Hash] opts the options to create the object with. + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:75 + def ns_initialize(opts); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:95 + def ns_post_task(task); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:132 + def ns_reset_if_forked; end + + # `ExecutorService` callback called during shutdown. + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:123 + def ns_shutdown_execution; end + + # Post the task to the internal queue. + # + # @note This is intended as a callback method from ScheduledTask + # only. It is not intended to be used directly. Post a task + # by using the `SchedulesTask#execute` method. + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:90 + def post_task(task); end + + # Run a loop and execute tasks in the scheduled order and at the approximate + # scheduled time. If no tasks remain the thread will exit gracefully so that + # garbage collection can occur. If there are no ready tasks it will sleep + # for up to 60 seconds waiting for the next scheduled task. + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:146 + def process_tasks; end + + # Remove the given task from the queue. + # + # @note This is intended as a callback method from `ScheduledTask` + # only. It is not intended to be used directly. Cancel a task + # by using the `ScheduledTask#cancel` method. + # + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/executor/timer_set.rb:116 + def remove_task(task); end +end + +# A very common concurrency pattern is to run a thread that performs a task at +# regular intervals. The thread that performs the task sleeps for the given +# interval then wakes up and performs the task. Lather, rinse, repeat... This +# pattern causes two problems. First, it is difficult to test the business +# logic of the task because the task itself is tightly coupled with the +# concurrency logic. Second, an exception raised while performing the task can +# cause the entire thread to abend. In a long-running application where the +# task thread is intended to run for days/weeks/years a crashed task thread +# can pose a significant problem. `TimerTask` alleviates both problems. +# +# When a `TimerTask` is launched it starts a thread for monitoring the +# execution interval. The `TimerTask` thread does not perform the task, +# however. Instead, the TimerTask launches the task on a separate thread. +# Should the task experience an unrecoverable crash only the task thread will +# crash. This makes the `TimerTask` very fault tolerant. Additionally, the +# `TimerTask` thread can respond to the success or failure of the task, +# performing logging or ancillary operations. +# +# One other advantage of `TimerTask` is that it forces the business logic to +# be completely decoupled from the concurrency logic. The business logic can +# be tested separately then passed to the `TimerTask` for scheduling and +# running. +# +# A `TimerTask` supports two different types of interval calculations. +# A fixed delay will always wait the same amount of time between the +# completion of one task and the start of the next. A fixed rate will +# attempt to maintain a constant rate of execution regardless of the +# duration of the task. For example, if a fixed rate task is scheduled +# to run every 60 seconds but the task itself takes 10 seconds to +# complete, the next task will be scheduled to run 50 seconds after +# the start of the previous task. If the task takes 70 seconds to +# complete, the next task will be start immediately after the previous +# task completes. Tasks will not be executed concurrently. +# +# In some cases it may be necessary for a `TimerTask` to affect its own +# execution cycle. To facilitate this, a reference to the TimerTask instance +# is passed as an argument to the provided block every time the task is +# executed. +# +# The `TimerTask` class includes the `Dereferenceable` mixin module so the +# result of the last execution is always available via the `#value` method. +# Dereferencing options can be passed to the `TimerTask` during construction or +# at any later time using the `#set_deref_options` method. +# +# `TimerTask` supports notification through the Ruby standard library +# {http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html +# Observable} module. On execution the `TimerTask` will notify the observers +# with three arguments: time of execution, the result of the block (or nil on +# failure), and any raised exceptions (or nil on success). +# +# @!macro copy_options +# +# @example Basic usage +# task = Concurrent::TimerTask.new{ puts 'Boom!' } +# task.execute +# +# task.execution_interval #=> 60 (default) +# +# # wait 60 seconds... +# #=> 'Boom!' +# +# task.shutdown #=> true +# +# @example Configuring `:execution_interval` +# task = Concurrent::TimerTask.new(execution_interval: 5) do +# puts 'Boom!' +# end +# +# task.execution_interval #=> 5 +# +# @example Immediate execution with `:run_now` +# task = Concurrent::TimerTask.new(run_now: true){ puts 'Boom!' } +# task.execute +# +# #=> 'Boom!' +# +# @example Configuring `:interval_type` with either :fixed_delay or :fixed_rate, default is :fixed_delay +# task = Concurrent::TimerTask.new(execution_interval: 5, interval_type: :fixed_rate) do +# puts 'Boom!' +# end +# task.interval_type #=> :fixed_rate +# +# @example Last `#value` and `Dereferenceable` mixin +# task = Concurrent::TimerTask.new( +# dup_on_deref: true, +# execution_interval: 5 +# ){ Time.now } +# +# task.execute +# Time.now #=> 2013-11-07 18:06:50 -0500 +# sleep(10) +# task.value #=> 2013-11-07 18:06:55 -0500 +# +# @example Controlling execution from within the block +# timer_task = Concurrent::TimerTask.new(execution_interval: 1) do |task| +# task.execution_interval.to_i.times{ print 'Boom! ' } +# print "\n" +# task.execution_interval += 1 +# if task.execution_interval > 5 +# puts 'Stopping...' +# task.shutdown +# end +# end +# +# timer_task.execute +# #=> Boom! +# #=> Boom! Boom! +# #=> Boom! Boom! Boom! +# #=> Boom! Boom! Boom! Boom! +# #=> Boom! Boom! Boom! Boom! Boom! +# #=> Stopping... +# +# @example Observation +# class TaskObserver +# def update(time, result, ex) +# if result +# print "(#{time}) Execution successfully returned #{result}\n" +# else +# print "(#{time}) Execution failed with error #{ex}\n" +# end +# end +# end +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ 42 } +# task.add_observer(TaskObserver.new) +# task.execute +# sleep 4 +# +# #=> (2013-10-13 19:08:58 -0400) Execution successfully returned 42 +# #=> (2013-10-13 19:08:59 -0400) Execution successfully returned 42 +# #=> (2013-10-13 19:09:00 -0400) Execution successfully returned 42 +# task.shutdown +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ sleep } +# task.add_observer(TaskObserver.new) +# task.execute +# +# #=> (2013-10-13 19:07:25 -0400) Execution timed out +# #=> (2013-10-13 19:07:27 -0400) Execution timed out +# #=> (2013-10-13 19:07:29 -0400) Execution timed out +# task.shutdown +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ raise StandardError } +# task.add_observer(TaskObserver.new) +# task.execute +# +# #=> (2013-10-13 19:09:37 -0400) Execution failed with error StandardError +# #=> (2013-10-13 19:09:38 -0400) Execution failed with error StandardError +# #=> (2013-10-13 19:09:39 -0400) Execution failed with error StandardError +# task.shutdown +# +# @see http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html +# @see http://docs.oracle.com/javase/7/docs/api/java/util/TimerTask.html +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:166 +class Concurrent::TimerTask < ::Concurrent::RubyExecutorService + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Observable + + # Create a new TimerTask with the given task and configuration. + # + # @!macro timer_task_initialize + # @param [Hash] opts the options defining task execution. + # @option opts [Float] :execution_interval number of seconds between + # task executions (default: EXECUTION_INTERVAL) + # @option opts [Boolean] :run_now Whether to run the task immediately + # upon instantiation or to wait until the first # execution_interval + # has passed (default: false) + # @options opts [Symbol] :interval_type method to calculate the interval + # between executions, can be either :fixed_rate or :fixed_delay. + # (default: :fixed_delay) + # @option opts [Executor] executor, default is `global_io_executor` + # + # @!macro deref_options + # + # @raise ArgumentError when no block is given. + # + # @yield to the block after :execution_interval seconds have passed since + # the last yield + # @yieldparam task a reference to the `TimerTask` instance so that the + # block can control its own lifecycle. Necessary since `self` will + # refer to the execution context of the block rather than the running + # `TimerTask`. + # + # @return [TimerTask] the new `TimerTask` + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:210 + def initialize(opts = T.unsafe(nil), &task); end + + # Execute a previously created `TimerTask`. + # + # @return [TimerTask] a reference to `self` + # + # @example Instance and execute in separate steps + # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" } + # task.running? #=> false + # task.execute + # task.running? #=> true + # + # @example Instance and execute in one line + # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" }.execute + # task.running? #=> true + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:236 + def execute; end + + # @!attribute [rw] execution_interval + # @return [Fixnum] Number of seconds after the task completes before the + # task is performed again. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:261 + def execution_interval; end + + # @!attribute [rw] execution_interval + # @return [Fixnum] Number of seconds after the task completes before the + # task is performed again. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:268 + def execution_interval=(value); end + + # @!attribute [r] interval_type + # @return [Symbol] method to calculate the interval between executions + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:278 + def interval_type; end + + # Is the executor running? + # + # @return [Boolean] `true` when running, `false` when shutting down or shutdown + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:219 + def running?; end + + # @!attribute [rw] timeout_interval + # @return [Fixnum] Number of seconds the task can run before it is + # considered to have failed. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:283 + def timeout_interval; end + + # @!attribute [rw] timeout_interval + # @return [Fixnum] Number of seconds the task can run before it is + # considered to have failed. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:290 + def timeout_interval=(value); end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:294 + def <<(task); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:357 + def calculate_next_interval(start_time); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:339 + def execute_task(completion, age_when_scheduled); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:298 + def ns_initialize(opts, &task); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:327 + def ns_kill_execution; end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:321 + def ns_shutdown_execution; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:294 + def post(*args, &task); end + + # @!visibility private + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:333 + def schedule_next_task(interval = T.unsafe(nil)); end + + class << self + # Create and execute a new `TimerTask`. + # + # @!macro timer_task_initialize + # + # @example + # task = Concurrent::TimerTask.execute(execution_interval: 10){ print "Hello World\n" } + # task.running? #=> true + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:254 + def execute(opts = T.unsafe(nil), &task); end + end +end + +# Default `:interval_type` +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:182 +Concurrent::TimerTask::DEFAULT_INTERVAL_TYPE = T.let(T.unsafe(nil), Symbol) + +# Default `:execution_interval` in seconds. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:171 +Concurrent::TimerTask::EXECUTION_INTERVAL = T.let(T.unsafe(nil), Integer) + +# Maintain the interval between the end of one execution and the start of the next execution. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:174 +Concurrent::TimerTask::FIXED_DELAY = T.let(T.unsafe(nil), Symbol) + +# Maintain the interval between the start of one execution and the start of the next. +# If execution time exceeds the interval, the next execution will start immediately +# after the previous execution finishes. Executions will not run concurrently. +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/timer_task.rb:179 +Concurrent::TimerTask::FIXED_RATE = T.let(T.unsafe(nil), Symbol) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:153 +class Concurrent::Transaction + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:162 + def initialize; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:192 + def abort; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:196 + def commit; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:177 + def open(tvar); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:166 + def read(tvar); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:206 + def unlock; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:171 + def write(tvar, value); end + + class << self + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:212 + def current; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:216 + def current=(transaction); end + end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:155 +Concurrent::Transaction::ABORTED = T.let(T.unsafe(nil), Object) + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:159 +class Concurrent::Transaction::AbortError < ::StandardError; end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:160 +class Concurrent::Transaction::LeaveError < ::StandardError; end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 +class Concurrent::Transaction::OpenEntry < ::Struct + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 + def modified; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 + def modified=(_); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 + def value; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 + def value=(_); end + + class << self + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 + def [](*_arg0); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 + def inspect; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 + def keyword_init?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 + def members; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tvar.rb:157 + def new(*_arg0); end + end +end + +# A fixed size array with volatile (synchronized, thread safe) getters/setters. +# Mixes in Ruby's `Enumerable` module for enhanced search, sort, and traversal. +# +# @example +# tuple = Concurrent::Tuple.new(16) +# +# tuple.set(0, :foo) #=> :foo | volatile write +# tuple.get(0) #=> :foo | volatile read +# tuple.compare_and_set(0, :foo, :bar) #=> true | strong CAS +# tuple.cas(0, :foo, :baz) #=> false | strong CAS +# tuple.get(0) #=> :bar | volatile read +# +# @see https://en.wikipedia.org/wiki/Tuple Tuple entry at Wikipedia +# @see http://www.erlang.org/doc/reference_manual/data_types.html#id70396 Erlang Tuple +# @see http://ruby-doc.org/core-2.2.2/Enumerable.html Enumerable +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:20 +class Concurrent::Tuple + include ::Enumerable + + # Create a new tuple of the given size. + # + # @param [Integer] size the number of elements in the tuple + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:29 + def initialize(size); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:73 + def cas(i, old_value, new_value); end + + # Set the value at the given index to the new value if and only if the current + # value matches the given old value. + # + # @param [Integer] i the index for the element to set + # @param [Object] old_value the value to compare against the current value + # @param [Object] new_value the value to set at the given index + # + # @return [Boolean] true if the value at the given element was set else false + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:69 + def compare_and_set(i, old_value, new_value); end + + # Calls the given block once for each element in self, passing that element as a parameter. + # + # @yieldparam [Object] ref the `Concurrent::AtomicReference` object at the current index + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:78 + def each; end + + # Get the value of the element at the given index. + # + # @param [Integer] i the index from which to retrieve the value + # @return [Object] the value at the given index or nil if the index is out of bounds + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:43 + def get(i); end + + # Set the element at the given index to the given value + # + # @param [Integer] i the index for the element to set + # @param [Object] value the value to set at the given index + # + # @return [Object] the new value of the element at the given index or nil if the index is out of bounds + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:55 + def set(i, value); end + + # The (fixed) size of the tuple. + # + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:24 + def size; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:47 + def volatile_get(i); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/tuple.rb:59 + def volatile_set(i, value); end +end + +# @!visibility private +# @!visibility private +# @!visibility private +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:3 +module Concurrent::Utility; end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:6 +module Concurrent::Utility::EngineDetector + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:7 + def on_cruby?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:11 + def on_jruby?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:27 + def on_linux?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:23 + def on_osx?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:15 + def on_truffleruby?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:19 + def on_windows?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/engine.rb:31 + def ruby_version(version = T.unsafe(nil), comparison, major, minor, patch); end +end + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb:9 +module Concurrent::Utility::NativeExtensionLoader + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb:11 + def allow_c_extensions?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb:15 + def c_extensions_loaded?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb:19 + def load_native_extensions; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb:50 + def java_extensions_loaded?; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb:38 + def load_error_path(error); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb:46 + def set_c_extensions_loaded; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb:54 + def set_java_extensions_loaded; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb:58 + def try_load_c_extension(path); end +end + +# @private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_integer.rb:5 +module Concurrent::Utility::NativeInteger + extend ::Concurrent::Utility::NativeInteger + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_integer.rb:24 + def ensure_integer(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_integer.rb:31 + def ensure_integer_and_bounds(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_integer.rb:17 + def ensure_lower_bound(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_integer.rb:37 + def ensure_positive(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_integer.rb:44 + def ensure_positive_and_no_zero(value); end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_integer.rb:10 + def ensure_upper_bound(value); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_integer.rb:8 +Concurrent::Utility::NativeInteger::MAX_VALUE = T.let(T.unsafe(nil), Integer) + +# http://stackoverflow.com/questions/535721/ruby-max-integer +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/native_integer.rb:7 +Concurrent::Utility::NativeInteger::MIN_VALUE = T.let(T.unsafe(nil), Integer) + +# @!visibility private +# +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:10 +class Concurrent::Utility::ProcessorCounter + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:11 + def initialize; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:26 + def available_processor_count; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:41 + def cpu_quota; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:45 + def cpu_shares; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:22 + def physical_processor_count; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:18 + def processor_count; end + + private + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:104 + def compute_cpu_quota; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:124 + def compute_cpu_shares; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:59 + def compute_physical_processor_count; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:51 + def compute_processor_count; end + + # pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/utility/processor_counter.rb:99 + def run(command); end +end + +# pkg:gem/concurrent-ruby#lib/concurrent-ruby/concurrent/version.rb:2 +Concurrent::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/connection_pool@3.0.2.rbi b/sorbet/rbi/gems/connection_pool@3.0.2.rbi new file mode 100644 index 000000000..3d9f5950e --- /dev/null +++ b/sorbet/rbi/gems/connection_pool@3.0.2.rbi @@ -0,0 +1,9 @@ +# 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/constant_resolver@0.3.0.rbi b/sorbet/rbi/gems/constant_resolver@0.3.0.rbi deleted file mode 100644 index 4772d9678..000000000 --- a/sorbet/rbi/gems/constant_resolver@0.3.0.rbi +++ /dev/null @@ -1,99 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `constant_resolver` gem. -# Please instead update this file by running `bin/tapioca gem constant_resolver`. - -# Get information about (partially qualified) constants without loading the application code. -# We infer the fully qualified name and the filepath. -# -# The implementation makes a few assumptions about the code base: -# - `Something::SomeOtherThing` is defined in a path of either `something/some_other_thing.rb` or `something.rb`, -# relative to the load path. Constants that have their own file do not have all-uppercase names like MAGIC_NUMBER or -# all-uppercase parts like SomeID. Rails' `zeitwerk` autoloader makes the same assumption. -# - It is OK to not always infer the exact file defining the constant. For example, when a constant is inherited, we -# have no way of inferring the file it is defined in. You could argue though that inheritance means that another -# constant with the same name exists in the inheriting class, and this view is sufficient for all our use cases. -# -# source://constant_resolver//lib/constant_resolver/version.rb#3 -class ConstantResolver - # @example usage in a Rails app - # config = Rails.application.config - # load_paths = (config.eager_load_paths + config.autoload_paths + config.autoload_once_paths) - # .map { |p| Pathname.new(p).relative_path_from(Rails.root).to_s } - # ConstantResolver.new( - # root_path: Rails.root.to_s, - # load_paths: load_paths - # ) - # @param root_path [String] The root path of the application to analyze - # @param load_paths [Array] The autoload paths of the application. - # @param exclude [Array] Paths to exclude to scan for constants. - # @param inflector [Object] Any object that implements a `camelize` function. - # @return [ConstantResolver] a new instance of ConstantResolver - # - # source://constant_resolver//lib/constant_resolver.rb#46 - def initialize(root_path:, load_paths:, exclude: T.unsafe(nil), inflector: T.unsafe(nil)); end - - # @api private - # - # source://constant_resolver//lib/constant_resolver.rb#122 - def config; end - - # Maps constant names to file paths. - # - # @return [Hash] - # - # source://constant_resolver//lib/constant_resolver.rb#78 - def file_map; end - - # Resolve a constant via its name. - # If the name is partially qualified, we need the current namespace path to correctly infer its full name - # - # @param const_name [String] The constant's name, fully or partially qualified. - # @param current_namespace_path [Array] (optional) The namespace of the context in which the constant is - # used, e.g. ["Apps", "Models"] for `Apps::Models`. Defaults to [] which means top level. - # @return [ConstantResolver::ConstantContext] - # - # source://constant_resolver//lib/constant_resolver.rb#63 - def resolve(const_name, current_namespace_path: T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://constant_resolver//lib/constant_resolver.rb#131 - def allowed?(path); end - - # source://constant_resolver//lib/constant_resolver.rb#144 - def ambiguous_constant_message(const_name, paths); end - - # source://constant_resolver//lib/constant_resolver.rb#135 - def coerce_load_paths(load_paths); end - - # source://constant_resolver//lib/constant_resolver.rb#151 - def glob_path(path); end - - # source://constant_resolver//lib/constant_resolver.rb#155 - def resolve_constant(const_name, current_namespace_path, original_name: T.unsafe(nil)); end - - # source://constant_resolver//lib/constant_resolver.rb#168 - def resolve_traversing_namespace_path(const_name, current_namespace_path); end -end - -# source://constant_resolver//lib/constant_resolver.rb#19 -class ConstantResolver::ConstantContext < ::Struct; end - -# source://constant_resolver//lib/constant_resolver.rb#21 -class ConstantResolver::DefaultInflector - # source://constant_resolver//lib/constant_resolver.rb#22 - def camelize(string); end -end - -# source://constant_resolver//lib/constant_resolver.rb#18 -class ConstantResolver::Error < ::StandardError; end - -# source://constant_resolver//lib/constant_resolver.rb#16 -ConstantResolver::RUBY_FILES_GLOB = T.let(T.unsafe(nil), String) - -# source://constant_resolver//lib/constant_resolver/version.rb#4 -ConstantResolver::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/crass@1.0.6.rbi b/sorbet/rbi/gems/crass@1.0.6.rbi index 4d267c089..ef7740f90 100644 --- a/sorbet/rbi/gems/crass@1.0.6.rbi +++ b/sorbet/rbi/gems/crass@1.0.6.rbi @@ -4,16 +4,17 @@ # This is an autogenerated file for types exported from the `crass` gem. # Please instead update this file by running `bin/tapioca gem crass`. + # A CSS parser based on the CSS Syntax Module Level 3 spec. # -# source://crass//lib/crass/token-scanner.rb#3 +# pkg:gem/crass#lib/crass/token-scanner.rb:3 module Crass class << self # Parses _input_ as a CSS stylesheet and returns a parse tree. # # See {Tokenizer#initialize} for _options_. # - # source://crass//lib/crass.rb#10 + # pkg:gem/crass#lib/crass.rb:10 def parse(input, options = T.unsafe(nil)); end # Parses _input_ as a string of CSS properties (such as the contents of an @@ -21,7 +22,7 @@ module Crass # # See {Tokenizer#initialize} for _options_. # - # source://crass//lib/crass.rb#18 + # pkg:gem/crass#lib/crass.rb:18 def parse_properties(input, options = T.unsafe(nil)); end end end @@ -30,23 +31,21 @@ end # # 5. http://dev.w3.org/csswg/css-syntax/#parsing # -# source://crass//lib/crass/parser.rb#10 +# pkg:gem/crass#lib/crass/parser.rb:10 class Crass::Parser # Initializes a parser based on the given _input_, which may be a CSS string # or an array of tokens. # # See {Tokenizer#initialize} for _options_. # - # @return [Parser] a new instance of Parser - # - # source://crass//lib/crass/parser.rb#126 + # pkg:gem/crass#lib/crass/parser.rb:126 def initialize(input, options = T.unsafe(nil)); end # Consumes an at-rule and returns it. # # 5.4.2. http://dev.w3.org/csswg/css-syntax-3/#consume-at-rule # - # source://crass//lib/crass/parser.rb#137 + # pkg:gem/crass#lib/crass/parser.rb:137 def consume_at_rule(input = T.unsafe(nil)); end # Consumes a component value and returns it, or `nil` if there are no more @@ -54,14 +53,14 @@ class Crass::Parser # # 5.4.6. http://dev.w3.org/csswg/css-syntax-3/#consume-a-component-value # - # source://crass//lib/crass/parser.rb#184 + # pkg:gem/crass#lib/crass/parser.rb:184 def consume_component_value(input = T.unsafe(nil)); end # Consumes a declaration and returns it, or `nil` on parse error. # # 5.4.5. http://dev.w3.org/csswg/css-syntax-3/#consume-a-declaration # - # source://crass//lib/crass/parser.rb#209 + # pkg:gem/crass#lib/crass/parser.rb:209 def consume_declaration(input = T.unsafe(nil)); end # Consumes a list of declarations and returns them. @@ -76,14 +75,14 @@ class Crass::Parser # # 5.4.4. http://dev.w3.org/csswg/css-syntax/#consume-a-list-of-declarations # - # source://crass//lib/crass/parser.rb#276 + # pkg:gem/crass#lib/crass/parser.rb:276 def consume_declarations(input = T.unsafe(nil), options = T.unsafe(nil)); end # Consumes a function and returns it. # # 5.4.8. http://dev.w3.org/csswg/css-syntax-3/#consume-a-function # - # source://crass//lib/crass/parser.rb#326 + # pkg:gem/crass#lib/crass/parser.rb:326 def consume_function(input = T.unsafe(nil)); end # Consumes a qualified rule and returns it, or `nil` if a parse error @@ -91,14 +90,14 @@ class Crass::Parser # # 5.4.3. http://dev.w3.org/csswg/css-syntax-3/#consume-a-qualified-rule # - # source://crass//lib/crass/parser.rb#357 + # pkg:gem/crass#lib/crass/parser.rb:357 def consume_qualified_rule(input = T.unsafe(nil)); end # Consumes a list of rules and returns them. # # 5.4.1. http://dev.w3.org/csswg/css-syntax/#consume-a-list-of-rules # - # source://crass//lib/crass/parser.rb#398 + # pkg:gem/crass#lib/crass/parser.rb:398 def consume_rules(flags = T.unsafe(nil)); end # Consumes and returns a simple block associated with the current input @@ -106,12 +105,12 @@ class Crass::Parser # # 5.4.7. http://dev.w3.org/csswg/css-syntax/#consume-a-simple-block # - # source://crass//lib/crass/parser.rb#434 + # pkg:gem/crass#lib/crass/parser.rb:434 def consume_simple_block(input = T.unsafe(nil)); end # Creates and returns a new parse node with the given _properties_. # - # source://crass//lib/crass/parser.rb#458 + # pkg:gem/crass#lib/crass/parser.rb:458 def create_node(type, properties = T.unsafe(nil)); end # Parses the given _input_ tokens into a selector node and returns it. @@ -119,34 +118,34 @@ class Crass::Parser # Doesn't bother splitting the selector list into individual selectors or # validating them. Feel free to do that yourself! It'll be fun! # - # source://crass//lib/crass/parser.rb#466 + # pkg:gem/crass#lib/crass/parser.rb:466 def create_selector(input); end # Creates a `:style_rule` node from the given qualified _rule_, and returns # it. # - # source://crass//lib/crass/parser.rb#474 + # pkg:gem/crass#lib/crass/parser.rb:474 def create_style_rule(rule); end # Parses a single component value and returns it. # # 5.3.7. http://dev.w3.org/csswg/css-syntax-3/#parse-a-component-value # - # source://crass//lib/crass/parser.rb#483 + # pkg:gem/crass#lib/crass/parser.rb:483 def parse_component_value(input = T.unsafe(nil)); end # Parses a list of component values and returns an array of parsed tokens. # # 5.3.8. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-component-values # - # source://crass//lib/crass/parser.rb#510 + # pkg:gem/crass#lib/crass/parser.rb:510 def parse_component_values(input = T.unsafe(nil)); end # Parses a single declaration and returns it. # # 5.3.5. http://dev.w3.org/csswg/css-syntax/#parse-a-declaration # - # source://crass//lib/crass/parser.rb#524 + # pkg:gem/crass#lib/crass/parser.rb:524 def parse_declaration(input = T.unsafe(nil)); end # Parses a list of declarations and returns them. @@ -155,31 +154,31 @@ class Crass::Parser # # 5.3.6. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-declarations # - # source://crass//lib/crass/parser.rb#552 + # pkg:gem/crass#lib/crass/parser.rb:552 def parse_declarations(input = T.unsafe(nil), options = T.unsafe(nil)); end # Parses a list of declarations and returns an array of `:property` nodes # (and any non-declaration nodes that were in the input). This is useful for # parsing the contents of an HTML element's `style` attribute. # - # source://crass//lib/crass/parser.rb#560 + # pkg:gem/crass#lib/crass/parser.rb:560 def parse_properties(input = T.unsafe(nil)); end # Parses a single rule and returns it. # # 5.3.4. http://dev.w3.org/csswg/css-syntax-3/#parse-a-rule # - # source://crass//lib/crass/parser.rb#586 + # pkg:gem/crass#lib/crass/parser.rb:586 def parse_rule(input = T.unsafe(nil)); end # Returns the unescaped value of a selector name or property declaration. # - # source://crass//lib/crass/parser.rb#615 + # pkg:gem/crass#lib/crass/parser.rb:615 def parse_value(nodes); end # {TokenScanner} wrapping the tokens generated from this parser's input. # - # source://crass//lib/crass/parser.rb#120 + # pkg:gem/crass#lib/crass/parser.rb:120 def tokens; end class << self @@ -190,7 +189,7 @@ class Crass::Parser # # 5.3.6. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-declarations # - # source://crass//lib/crass/parser.rb#25 + # pkg:gem/crass#lib/crass/parser.rb:25 def parse_properties(input, options = T.unsafe(nil)); end # Parses CSS rules (such as the content of a `@media` block) and returns a @@ -201,7 +200,7 @@ class Crass::Parser # # 5.3.3. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-rules # - # source://crass//lib/crass/parser.rb#36 + # pkg:gem/crass#lib/crass/parser.rb:36 def parse_rules(input, options = T.unsafe(nil)); end # Parses a CSS stylesheet and returns a parse tree. @@ -210,7 +209,7 @@ class Crass::Parser # # 5.3.2. http://dev.w3.org/csswg/css-syntax/#parse-a-stylesheet # - # source://crass//lib/crass/parser.rb#54 + # pkg:gem/crass#lib/crass/parser.rb:54 def parse_stylesheet(input, options = T.unsafe(nil)); end # Converts a node or array of nodes into a CSS string based on their @@ -220,180 +219,168 @@ class Crass::Parser # # * **:exclude_comments** - When `true`, comments will be excluded. # - # source://crass//lib/crass/parser.rb#74 + # pkg:gem/crass#lib/crass/parser.rb:74 def stringify(nodes, options = T.unsafe(nil)); end end end -# source://crass//lib/crass/parser.rb#11 +# pkg:gem/crass#lib/crass/parser.rb:11 Crass::Parser::BLOCK_END_TOKENS = T.let(T.unsafe(nil), Hash) # Similar to a StringScanner, but with extra functionality needed to tokenize # CSS while preserving the original text. # -# source://crass//lib/crass/scanner.rb#8 +# pkg:gem/crass#lib/crass/scanner.rb:8 class Crass::Scanner # Creates a Scanner instance for the given _input_ string or IO instance. # - # @return [Scanner] a new instance of Scanner - # - # source://crass//lib/crass/scanner.rb#25 + # pkg:gem/crass#lib/crass/scanner.rb:25 def initialize(input); end # Consumes the next character and returns it, advancing the pointer, or # an empty string if the end of the string has been reached. # - # source://crass//lib/crass/scanner.rb#34 + # pkg:gem/crass#lib/crass/scanner.rb:34 def consume; end # Consumes the rest of the string and returns it, advancing the pointer to # the end of the string. Returns an empty string is the end of the string # has already been reached. # - # source://crass//lib/crass/scanner.rb#46 + # pkg:gem/crass#lib/crass/scanner.rb:46 def consume_rest; end # Current character, or `nil` if the scanner hasn't yet consumed a # character, or is at the end of the string. # - # source://crass//lib/crass/scanner.rb#11 + # pkg:gem/crass#lib/crass/scanner.rb:11 def current; end # Returns `true` if the end of the string has been reached, `false` # otherwise. # - # @return [Boolean] - # - # source://crass//lib/crass/scanner.rb#57 + # pkg:gem/crass#lib/crass/scanner.rb:57 def eos?; end # Sets the marker to the position of the next character that will be # consumed. # - # source://crass//lib/crass/scanner.rb#63 + # pkg:gem/crass#lib/crass/scanner.rb:63 def mark; end # Returns the substring between {#marker} and {#pos}, without altering the # pointer. # - # source://crass//lib/crass/scanner.rb#69 + # pkg:gem/crass#lib/crass/scanner.rb:69 def marked; end # Current marker position. Use {#marked} to get the substring between # {#marker} and {#pos}. # - # source://crass//lib/crass/scanner.rb#15 + # pkg:gem/crass#lib/crass/scanner.rb:15 def marker; end # Current marker position. Use {#marked} to get the substring between # {#marker} and {#pos}. # - # source://crass//lib/crass/scanner.rb#15 + # pkg:gem/crass#lib/crass/scanner.rb:15 def marker=(_arg0); end # Returns up to _length_ characters starting at the current position, but # doesn't consume them. The number of characters returned may be less than # _length_ if the end of the string is reached. # - # source://crass//lib/crass/scanner.rb#80 + # pkg:gem/crass#lib/crass/scanner.rb:80 def peek(length = T.unsafe(nil)); end # Position of the next character that will be consumed. This is a character # position, not a byte position, so it accounts for multi-byte characters. # - # source://crass//lib/crass/scanner.rb#19 + # pkg:gem/crass#lib/crass/scanner.rb:19 def pos; end # Position of the next character that will be consumed. This is a character # position, not a byte position, so it accounts for multi-byte characters. # - # source://crass//lib/crass/scanner.rb#19 + # pkg:gem/crass#lib/crass/scanner.rb:19 def pos=(_arg0); end # Moves the pointer back one character without changing the value of # {#current}. The next call to {#consume} will re-consume the current # character. # - # source://crass//lib/crass/scanner.rb#87 + # pkg:gem/crass#lib/crass/scanner.rb:87 def reconsume; end # Resets the pointer to the beginning of the string. # - # source://crass//lib/crass/scanner.rb#93 + # pkg:gem/crass#lib/crass/scanner.rb:93 def reset; end # Tries to match _pattern_ at the current position. If it matches, the # matched substring will be returned and the pointer will be advanced. # Otherwise, `nil` will be returned. # - # source://crass//lib/crass/scanner.rb#103 + # pkg:gem/crass#lib/crass/scanner.rb:103 def scan(pattern); end # Scans the string until the _pattern_ is matched. Returns the substring up # to and including the end of the match, and advances the pointer. If there # is no match, `nil` is returned and the pointer is not advanced. # - # source://crass//lib/crass/scanner.rb#115 + # pkg:gem/crass#lib/crass/scanner.rb:115 def scan_until(pattern); end # String being scanned. # - # source://crass//lib/crass/scanner.rb#22 + # pkg:gem/crass#lib/crass/scanner.rb:22 def string; end end # Like {Scanner}, but for tokens! # -# source://crass//lib/crass/token-scanner.rb#6 +# pkg:gem/crass#lib/crass/token-scanner.rb:6 class Crass::TokenScanner - # @return [TokenScanner] a new instance of TokenScanner - # - # source://crass//lib/crass/token-scanner.rb#9 + # pkg:gem/crass#lib/crass/token-scanner.rb:9 def initialize(tokens); end # Executes the given block, collects all tokens that are consumed during its # execution, and returns them. # - # source://crass//lib/crass/token-scanner.rb#16 + # pkg:gem/crass#lib/crass/token-scanner.rb:16 def collect; end # Consumes the next token and returns it, advancing the pointer. Returns # `nil` if there is no next token. # - # source://crass//lib/crass/token-scanner.rb#24 + # pkg:gem/crass#lib/crass/token-scanner.rb:24 def consume; end - # Returns the value of attribute current. - # - # source://crass//lib/crass/token-scanner.rb#7 + # pkg:gem/crass#lib/crass/token-scanner.rb:7 def current; end # Returns the next token without consuming it, or `nil` if there is no next # token. # - # source://crass//lib/crass/token-scanner.rb#32 + # pkg:gem/crass#lib/crass/token-scanner.rb:32 def peek; end - # Returns the value of attribute pos. - # - # source://crass//lib/crass/token-scanner.rb#7 + # pkg:gem/crass#lib/crass/token-scanner.rb:7 def pos; end # Reconsumes the current token, moving the pointer back one position. # # http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/#reconsume-the-current-input-token # - # source://crass//lib/crass/token-scanner.rb#39 + # pkg:gem/crass#lib/crass/token-scanner.rb:39 def reconsume; end # Resets the pointer to the first token in the list. # - # source://crass//lib/crass/token-scanner.rb#44 + # pkg:gem/crass#lib/crass/token-scanner.rb:44 def reset; end - # Returns the value of attribute tokens. - # - # source://crass//lib/crass/token-scanner.rb#7 + # pkg:gem/crass#lib/crass/token-scanner.rb:7 def tokens; end end @@ -401,7 +388,7 @@ end # # 4. http://dev.w3.org/csswg/css-syntax/#tokenization # -# source://crass//lib/crass/tokenizer.rb#9 +# pkg:gem/crass#lib/crass/tokenizer.rb:9 class Crass::Tokenizer # Initializes a new Tokenizer. # @@ -414,30 +401,28 @@ class Crass::Tokenizer # such as the IE "*" hack will be preserved even though they violate # CSS 3 syntax rules. # - # @return [Tokenizer] a new instance of Tokenizer - # - # source://crass//lib/crass/tokenizer.rb#62 + # pkg:gem/crass#lib/crass/tokenizer.rb:62 def initialize(input, options = T.unsafe(nil)); end # Consumes a token and returns the token that was consumed. # # 4.3.1. http://dev.w3.org/csswg/css-syntax/#consume-a-token # - # source://crass//lib/crass/tokenizer.rb#70 + # pkg:gem/crass#lib/crass/tokenizer.rb:70 def consume; end # Consumes the remnants of a bad URL and returns the consumed text. # # 4.3.15. http://dev.w3.org/csswg/css-syntax/#consume-the-remnants-of-a-bad-url # - # source://crass//lib/crass/tokenizer.rb#275 + # pkg:gem/crass#lib/crass/tokenizer.rb:275 def consume_bad_url; end # Consumes comments and returns them, or `nil` if no comments were consumed. # # 4.3.2. http://dev.w3.org/csswg/css-syntax/#consume-comments # - # source://crass//lib/crass/tokenizer.rb#301 + # pkg:gem/crass#lib/crass/tokenizer.rb:301 def consume_comments; end # Consumes an escaped code point and returns its unescaped value. @@ -448,21 +433,21 @@ class Crass::Tokenizer # # 4.3.8. http://dev.w3.org/csswg/css-syntax/#consume-an-escaped-code-point # - # source://crass//lib/crass/tokenizer.rb#326 + # pkg:gem/crass#lib/crass/tokenizer.rb:326 def consume_escaped; end # Consumes an ident-like token and returns it. # # 4.3.4. http://dev.w3.org/csswg/css-syntax/#consume-an-ident-like-token # - # source://crass//lib/crass/tokenizer.rb#350 + # pkg:gem/crass#lib/crass/tokenizer.rb:350 def consume_ident; end # Consumes a name and returns it. # # 4.3.12. http://dev.w3.org/csswg/css-syntax/#consume-a-name # - # source://crass//lib/crass/tokenizer.rb#375 + # pkg:gem/crass#lib/crass/tokenizer.rb:375 def consume_name; end # Consumes a number and returns a 3-element array containing the number's @@ -471,14 +456,14 @@ class Crass::Tokenizer # # 4.3.13. http://dev.w3.org/csswg/css-syntax/#consume-a-number # - # source://crass//lib/crass/tokenizer.rb#407 + # pkg:gem/crass#lib/crass/tokenizer.rb:407 def consume_number; end # Consumes a numeric token and returns it. # # 4.3.3. http://dev.w3.org/csswg/css-syntax/#consume-a-numeric-token # - # source://crass//lib/crass/tokenizer.rb#430 + # pkg:gem/crass#lib/crass/tokenizer.rb:430 def consume_numeric; end # Consumes a string token that ends at the given character, and returns the @@ -486,7 +471,7 @@ class Crass::Tokenizer # # 4.3.5. http://dev.w3.org/csswg/css-syntax/#consume-a-string-token # - # source://crass//lib/crass/tokenizer.rb#469 + # pkg:gem/crass#lib/crass/tokenizer.rb:469 def consume_string(ending = T.unsafe(nil)); end # Consumes a Unicode range token and returns it. Assumes the initial "u+" or @@ -494,7 +479,7 @@ class Crass::Tokenizer # # 4.3.7. http://dev.w3.org/csswg/css-syntax/#consume-a-unicode-range-token # - # source://crass//lib/crass/tokenizer.rb#510 + # pkg:gem/crass#lib/crass/tokenizer.rb:510 def consume_unicode_range; end # Consumes a URL token and returns it. Assumes the original "url(" has @@ -502,26 +487,26 @@ class Crass::Tokenizer # # 4.3.6. http://dev.w3.org/csswg/css-syntax/#consume-a-url-token # - # source://crass//lib/crass/tokenizer.rb#542 + # pkg:gem/crass#lib/crass/tokenizer.rb:542 def consume_url; end # Converts a valid CSS number string into a number and returns the number. # # 4.3.14. http://dev.w3.org/csswg/css-syntax/#convert-a-string-to-a-number # - # source://crass//lib/crass/tokenizer.rb#590 + # pkg:gem/crass#lib/crass/tokenizer.rb:590 def convert_string_to_number(str); end # Creates and returns a new token with the given _properties_. # - # source://crass//lib/crass/tokenizer.rb#616 + # pkg:gem/crass#lib/crass/tokenizer.rb:616 def create_token(type, properties = T.unsafe(nil)); end # Preprocesses _input_ to prepare it for the tokenizer. # # 3.3. http://dev.w3.org/csswg/css-syntax/#input-preprocessing # - # source://crass//lib/crass/tokenizer.rb#627 + # pkg:gem/crass#lib/crass/tokenizer.rb:627 def preprocess(input); end # Returns `true` if the given three-character _text_ would start an @@ -530,9 +515,7 @@ class Crass::Tokenizer # # 4.3.10. http://dev.w3.org/csswg/css-syntax/#would-start-an-identifier # - # @return [Boolean] - # - # source://crass//lib/crass/tokenizer.rb#642 + # pkg:gem/crass#lib/crass/tokenizer.rb:642 def start_identifier?(text = T.unsafe(nil)); end # Returns `true` if the given three-character _text_ would start a number. @@ -541,14 +524,12 @@ class Crass::Tokenizer # # 4.3.11. http://dev.w3.org/csswg/css-syntax/#starts-with-a-number # - # @return [Boolean] - # - # source://crass//lib/crass/tokenizer.rb#666 + # pkg:gem/crass#lib/crass/tokenizer.rb:666 def start_number?(text = T.unsafe(nil)); end # Tokenizes the input stream and returns an array of tokens. # - # source://crass//lib/crass/tokenizer.rb#685 + # pkg:gem/crass#lib/crass/tokenizer.rb:685 def tokenize; end # Returns `true` if the given two-character _text_ is the beginning of a @@ -557,9 +538,7 @@ class Crass::Tokenizer # # 4.3.9. http://dev.w3.org/csswg/css-syntax/#starts-with-a-valid-escape # - # @return [Boolean] - # - # source://crass//lib/crass/tokenizer.rb#702 + # pkg:gem/crass#lib/crass/tokenizer.rb:702 def valid_escape?(text = T.unsafe(nil)); end class << self @@ -568,55 +547,55 @@ class Crass::Tokenizer # # See {#initialize} for _options_. # - # source://crass//lib/crass/tokenizer.rb#45 + # pkg:gem/crass#lib/crass/tokenizer.rb:45 def tokenize(input, options = T.unsafe(nil)); end end end -# source://crass//lib/crass/tokenizer.rb#10 +# pkg:gem/crass#lib/crass/tokenizer.rb:10 Crass::Tokenizer::RE_COMMENT_CLOSE = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#11 +# pkg:gem/crass#lib/crass/tokenizer.rb:11 Crass::Tokenizer::RE_DIGIT = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#12 +# pkg:gem/crass#lib/crass/tokenizer.rb:12 Crass::Tokenizer::RE_ESCAPE = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#13 +# pkg:gem/crass#lib/crass/tokenizer.rb:13 Crass::Tokenizer::RE_HEX = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#14 +# pkg:gem/crass#lib/crass/tokenizer.rb:14 Crass::Tokenizer::RE_NAME = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#15 +# pkg:gem/crass#lib/crass/tokenizer.rb:15 Crass::Tokenizer::RE_NAME_START = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#16 +# pkg:gem/crass#lib/crass/tokenizer.rb:16 Crass::Tokenizer::RE_NON_PRINTABLE = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#17 +# pkg:gem/crass#lib/crass/tokenizer.rb:17 Crass::Tokenizer::RE_NUMBER_DECIMAL = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#18 +# pkg:gem/crass#lib/crass/tokenizer.rb:18 Crass::Tokenizer::RE_NUMBER_EXPONENT = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#19 +# pkg:gem/crass#lib/crass/tokenizer.rb:19 Crass::Tokenizer::RE_NUMBER_SIGN = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#21 +# pkg:gem/crass#lib/crass/tokenizer.rb:21 Crass::Tokenizer::RE_NUMBER_STR = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#33 +# pkg:gem/crass#lib/crass/tokenizer.rb:33 Crass::Tokenizer::RE_QUOTED_URL_START = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#35 +# pkg:gem/crass#lib/crass/tokenizer.rb:35 Crass::Tokenizer::RE_UNICODE_RANGE_END = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#34 +# pkg:gem/crass#lib/crass/tokenizer.rb:34 Crass::Tokenizer::RE_UNICODE_RANGE_START = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#36 +# pkg:gem/crass#lib/crass/tokenizer.rb:36 Crass::Tokenizer::RE_WHITESPACE = T.let(T.unsafe(nil), Regexp) -# source://crass//lib/crass/tokenizer.rb#37 +# pkg:gem/crass#lib/crass/tokenizer.rb:37 Crass::Tokenizer::RE_WHITESPACE_ANCHORED = T.let(T.unsafe(nil), Regexp) diff --git a/sorbet/rbi/gems/date@3.4.1.rbi b/sorbet/rbi/gems/date@3.4.1.rbi new file mode 100644 index 000000000..2135e86cb --- /dev/null +++ b/sorbet/rbi/gems/date@3.4.1.rbi @@ -0,0 +1,391 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `date` gem. +# Please instead update this file by running `bin/tapioca gem date`. + + +# pkg:gem/date#lib/date.rb:4 +class Date + include ::Comparable + + # pkg:gem/date#lib/date.rb:4 + def initialize(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def +(other); end + + # pkg:gem/date#lib/date.rb:4 + def -(other); end + + # pkg:gem/date#lib/date.rb:4 + def <<(_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def <=>(other); end + + # pkg:gem/date#lib/date.rb:4 + def ===(_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def >>(_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def ajd; end + + # pkg:gem/date#lib/date.rb:4 + def amjd; end + + # pkg:gem/date#lib/date.rb:4 + def asctime; end + + # pkg:gem/date#lib/date.rb:4 + def ctime; end + + # pkg:gem/date#lib/date.rb:4 + def cwday; end + + # pkg:gem/date#lib/date.rb:4 + def cweek; end + + # pkg:gem/date#lib/date.rb:4 + def cwyear; end + + # pkg:gem/date#lib/date.rb:4 + def day; end + + # pkg:gem/date#lib/date.rb:4 + def day_fraction; end + + # pkg:gem/date#lib/date.rb:4 + def deconstruct_keys(_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def downto(_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def england; end + + # pkg:gem/date#lib/date.rb:4 + def eql?(_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def friday?; end + + # pkg:gem/date#lib/date.rb:4 + def gregorian; end + + # pkg:gem/date#lib/date.rb:4 + def gregorian?; end + + # pkg:gem/date#lib/date.rb:4 + def hash; end + + # pkg:gem/date#lib/date.rb:4 + def httpdate; end + + # call-seq: + # infinite? -> false + # + # Returns +false+ + # + # pkg:gem/date#lib/date.rb:13 + def infinite?; end + + # pkg:gem/date#lib/date.rb:4 + def inspect; end + + # pkg:gem/date#lib/date.rb:4 + def iso8601; end + + # pkg:gem/date#lib/date.rb:4 + def italy; end + + # pkg:gem/date#lib/date.rb:4 + def jd; end + + # pkg:gem/date#lib/date.rb:4 + def jisx0301; end + + # pkg:gem/date#lib/date.rb:4 + def julian; end + + # pkg:gem/date#lib/date.rb:4 + def julian?; end + + # pkg:gem/date#lib/date.rb:4 + def ld; end + + # pkg:gem/date#lib/date.rb:4 + def leap?; end + + # pkg:gem/date#lib/date.rb:4 + def marshal_dump; end + + # pkg:gem/date#lib/date.rb:4 + def marshal_load(_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def mday; end + + # pkg:gem/date#lib/date.rb:4 + def mjd; end + + # pkg:gem/date#lib/date.rb:4 + def mon; end + + # pkg:gem/date#lib/date.rb:4 + def monday?; end + + # pkg:gem/date#lib/date.rb:4 + def month; end + + # pkg:gem/date#lib/date.rb:4 + def new_start(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def next; end + + # pkg:gem/date#lib/date.rb:4 + def next_day(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def next_month(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def next_year(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def prev_day(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def prev_month(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def prev_year(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def rfc2822; end + + # pkg:gem/date#lib/date.rb:4 + def rfc3339; end + + # pkg:gem/date#lib/date.rb:4 + def rfc822; end + + # pkg:gem/date#lib/date.rb:4 + def saturday?; end + + # pkg:gem/date#lib/date.rb:4 + def start; end + + # pkg:gem/date#lib/date.rb:4 + def step(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def strftime(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def succ; end + + # pkg:gem/date#lib/date.rb:4 + def sunday?; end + + # pkg:gem/date#lib/date.rb:4 + def thursday?; end + + # pkg:gem/date#lib/date.rb:4 + def to_date; end + + # pkg:gem/date#lib/date.rb:4 + def to_datetime; end + + # pkg:gem/date#lib/date.rb:4 + def to_s; end + + # pkg:gem/date#lib/date.rb:4 + def to_time(form = T.unsafe(nil)); end + + # pkg:gem/date#lib/date.rb:4 + def tuesday?; end + + # pkg:gem/date#lib/date.rb:4 + def upto(_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def wday; end + + # pkg:gem/date#lib/date.rb:4 + def wednesday?; end + + # pkg:gem/date#lib/date.rb:4 + def xmlschema; end + + # pkg:gem/date#lib/date.rb:4 + def yday; end + + # pkg:gem/date#lib/date.rb:4 + def year; end + + private + + # pkg:gem/date#lib/date.rb:4 + def hour; end + + # pkg:gem/date#lib/date.rb:4 + def initialize_copy(_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def min; end + + # pkg:gem/date#lib/date.rb:4 + def minute; end + + # pkg:gem/date#lib/date.rb:4 + def sec; end + + # pkg:gem/date#lib/date.rb:4 + def second; end + + class << self + # pkg:gem/date#lib/date.rb:4 + def _httpdate(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def _iso8601(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def _jisx0301(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def _load(_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def _parse(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def _rfc2822(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def _rfc3339(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def _rfc822(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def _strptime(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def _xmlschema(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def civil(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def commercial(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def gregorian_leap?(_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def httpdate(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def iso8601(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def jd(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def jisx0301(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def julian_leap?(_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def leap?(_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def ordinal(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def parse(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def rfc2822(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def rfc3339(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def rfc822(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def strptime(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def today(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def valid_civil?(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def valid_commercial?(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def valid_date?(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def valid_jd?(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def valid_ordinal?(*_arg0); end + + # pkg:gem/date#lib/date.rb:4 + def xmlschema(*_arg0); end + end +end + +# pkg:gem/date#lib/date.rb:17 +class Date::Infinity < ::Numeric + # pkg:gem/date#lib/date.rb:19 + def initialize(d = T.unsafe(nil)); end + + # pkg:gem/date#lib/date.rb:33 + def +@; end + + # pkg:gem/date#lib/date.rb:32 + def -@; end + + # pkg:gem/date#lib/date.rb:35 + def <=>(other); end + + # pkg:gem/date#lib/date.rb:30 + def abs; end + + # pkg:gem/date#lib/date.rb:51 + def coerce(other); end + + # pkg:gem/date#lib/date.rb:26 + def finite?; end + + # pkg:gem/date#lib/date.rb:27 + def infinite?; end + + # pkg:gem/date#lib/date.rb:28 + def nan?; end + + # pkg:gem/date#lib/date.rb:59 + def to_f; end + + # pkg:gem/date#lib/date.rb:25 + def zero?; end + + protected + + # pkg:gem/date#lib/date.rb:21 + def d; end +end + +# pkg:gem/date#lib/date.rb:7 +Date::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/drb@2.2.3.rbi b/sorbet/rbi/gems/drb@2.2.3.rbi new file mode 100644 index 000000000..a8dd54b4d --- /dev/null +++ b/sorbet/rbi/gems/drb@2.2.3.rbi @@ -0,0 +1,1589 @@ +# 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`. + + +# == Overview +# +# dRuby is a distributed object system for Ruby. It is written in +# pure Ruby and uses its own protocol. No add-in services are needed +# beyond those provided by the Ruby runtime, such as TCP sockets. It +# does not rely on or interoperate with other distributed object +# systems such as CORBA, RMI, or .NET. +# +# dRuby allows methods to be called in one Ruby process upon a Ruby +# object located in another Ruby process, even on another machine. +# References to objects can be passed between processes. Method +# arguments and return values are dumped and loaded in marshalled +# format. All of this is done transparently to both the caller of the +# remote method and the object that it is called upon. +# +# An object in a remote process is locally represented by a +# DRb::DRbObject instance. This acts as a sort of proxy for the +# remote object. Methods called upon this DRbObject instance are +# forwarded to its remote object. This is arranged dynamically at run +# time. There are no statically declared interfaces for remote +# objects, such as CORBA's IDL. +# +# dRuby calls made into a process are handled by a DRb::DRbServer +# instance within that process. This reconstitutes the method call, +# invokes it upon the specified local object, and returns the value to +# the remote caller. Any object can receive calls over dRuby. There +# is no need to implement a special interface, or mixin special +# functionality. Nor, in the general case, does an object need to +# explicitly register itself with a DRbServer in order to receive +# dRuby calls. +# +# One process wishing to make dRuby calls upon another process must +# somehow obtain an initial reference to an object in the remote +# process by some means other than as the return value of a remote +# method call, as there is initially no remote object reference it can +# invoke a method upon. This is done by attaching to the server by +# URI. Each DRbServer binds itself to a URI such as +# 'druby://example.com:8787'. A DRbServer can have an object attached +# to it that acts as the server's *front* *object*. A DRbObject can +# be explicitly created from the server's URI. This DRbObject's +# remote object will be the server's front object. This front object +# can then return references to other Ruby objects in the DRbServer's +# process. +# +# Method calls made over dRuby behave largely the same as normal Ruby +# method calls made within a process. Method calls with blocks are +# supported, as are raising exceptions. In addition to a method's +# standard errors, a dRuby call may also raise one of the +# dRuby-specific errors, all of which are subclasses of DRb::DRbError. +# +# Any type of object can be passed as an argument to a dRuby call or +# returned as its return value. By default, such objects are dumped +# or marshalled at the local end, then loaded or unmarshalled at the +# remote end. The remote end therefore receives a copy of the local +# object, not a distributed reference to it; methods invoked upon this +# copy are executed entirely in the remote process, not passed on to +# the local original. This has semantics similar to pass-by-value. +# +# However, if an object cannot be marshalled, a dRuby reference to it +# is passed or returned instead. This will turn up at the remote end +# as a DRbObject instance. All methods invoked upon this remote proxy +# are forwarded to the local object, as described in the discussion of +# DRbObjects. This has semantics similar to the normal Ruby +# pass-by-reference. +# +# The easiest way to signal that we want an otherwise marshallable +# object to be passed or returned as a DRbObject reference, rather +# than marshalled and sent as a copy, is to include the +# DRb::DRbUndumped mixin module. +# +# dRuby supports calling remote methods with blocks. As blocks (or +# rather the Proc objects that represent them) are not marshallable, +# the block executes in the local, not the remote, context. Each +# value yielded to the block is passed from the remote object to the +# local block, then the value returned by each block invocation is +# passed back to the remote execution context to be collected, before +# the collected values are finally returned to the local context as +# the return value of the method invocation. +# +# == Examples of usage +# +# For more dRuby samples, see the +samples+ directory in the full +# dRuby distribution. +# +# === dRuby in client/server mode +# +# This illustrates setting up a simple client-server drb +# system. Run the server and client code in different terminals, +# starting the server code first. +# +# ==== Server code +# +# require 'drb/drb' +# +# # The URI for the server to connect to +# URI="druby://localhost:8787" +# +# class TimeServer +# +# def get_current_time +# return Time.now +# end +# +# end +# +# # The object that handles requests on the server +# FRONT_OBJECT=TimeServer.new +# +# DRb.start_service(URI, FRONT_OBJECT) +# # Wait for the drb server thread to finish before exiting. +# DRb.thread.join +# +# ==== Client code +# +# require 'drb/drb' +# +# # The URI to connect to +# SERVER_URI="druby://localhost:8787" +# +# # Start a local DRbServer to handle callbacks. +# # +# # Not necessary for this small example, but will be required +# # as soon as we pass a non-marshallable object as an argument +# # to a dRuby call. +# # +# # Note: this must be called at least once per process to take any effect. +# # This is particularly important if your application forks. +# DRb.start_service +# +# timeserver = DRbObject.new_with_uri(SERVER_URI) +# puts timeserver.get_current_time +# +# === Remote objects under dRuby +# +# This example illustrates returning a reference to an object +# from a dRuby call. The Logger instances live in the server +# process. References to them are returned to the client process, +# where methods can be invoked upon them. These methods are +# executed in the server process. +# +# ==== Server code +# +# require 'drb/drb' +# +# URI="druby://localhost:8787" +# +# class Logger +# +# # Make dRuby send Logger instances as dRuby references, +# # not copies. +# include DRb::DRbUndumped +# +# def initialize(n, fname) +# @name = n +# @filename = fname +# end +# +# def log(message) +# File.open(@filename, "a") do |f| +# f.puts("#{Time.now}: #{@name}: #{message}") +# end +# end +# +# end +# +# # We have a central object for creating and retrieving loggers. +# # This retains a local reference to all loggers created. This +# # is so an existing logger can be looked up by name, but also +# # to prevent loggers from being garbage collected. A dRuby +# # reference to an object is not sufficient to prevent it being +# # garbage collected! +# class LoggerFactory +# +# def initialize(bdir) +# @basedir = bdir +# @loggers = {} +# end +# +# def get_logger(name) +# if !@loggers.has_key? name +# # make the filename safe, then declare it to be so +# fname = name.gsub(/[.\/\\\:]/, "_") +# @loggers[name] = Logger.new(name, @basedir + "/" + fname) +# end +# return @loggers[name] +# end +# +# end +# +# FRONT_OBJECT=LoggerFactory.new("/tmp/dlog") +# +# DRb.start_service(URI, FRONT_OBJECT) +# DRb.thread.join +# +# ==== Client code +# +# require 'drb/drb' +# +# SERVER_URI="druby://localhost:8787" +# +# DRb.start_service +# +# log_service=DRbObject.new_with_uri(SERVER_URI) +# +# ["loga", "logb", "logc"].each do |logname| +# +# logger=log_service.get_logger(logname) +# +# logger.log("Hello, world!") +# logger.log("Goodbye, world!") +# logger.log("=== EOT ===") +# +# end +# +# == Security +# +# As with all network services, security needs to be considered when +# using dRuby. By allowing external access to a Ruby object, you are +# not only allowing outside clients to call the methods you have +# defined for that object, but by default to execute arbitrary Ruby +# code on your server. Consider the following: +# +# # !!! UNSAFE CODE !!! +# ro = DRbObject::new_with_uri("druby://your.server.com:8989") +# class << ro +# undef :instance_eval # force call to be passed to remote object +# end +# ro.instance_eval("`rm -rf *`") +# +# The dangers posed by instance_eval and friends are such that a +# DRbServer should only be used when clients are trusted. +# +# A DRbServer can be configured with an access control list to +# selectively allow or deny access from specified IP addresses. The +# main druby distribution provides the ACL class for this purpose. In +# general, this mechanism should only be used alongside, rather than +# as a replacement for, a good firewall. +# +# == dRuby internals +# +# dRuby is implemented using three main components: a remote method +# call marshaller/unmarshaller; a transport protocol; and an +# ID-to-object mapper. The latter two can be directly, and the first +# indirectly, replaced, in order to provide different behaviour and +# capabilities. +# +# Marshalling and unmarshalling of remote method calls is performed by +# a DRb::DRbMessage instance. This uses the Marshal module to dump +# the method call before sending it over the transport layer, then +# reconstitute it at the other end. There is normally no need to +# replace this component, and no direct way is provided to do so. +# However, it is possible to implement an alternative marshalling +# scheme as part of an implementation of the transport layer. +# +# The transport layer is responsible for opening client and server +# network connections and forwarding dRuby request across them. +# Normally, it uses DRb::DRbMessage internally to manage marshalling +# and unmarshalling. The transport layer is managed by +# DRb::DRbProtocol. Multiple protocols can be installed in +# DRbProtocol at the one time; selection between them is determined by +# the scheme of a dRuby URI. The default transport protocol is +# selected by the scheme 'druby:', and implemented by +# DRb::DRbTCPSocket. This uses plain TCP/IP sockets for +# communication. An alternative protocol, using UNIX domain sockets, +# is implemented by DRb::DRbUNIXSocket in the file drb/unix.rb, and +# selected by the scheme 'drbunix:'. A sample implementation over +# HTTP can be found in the samples accompanying the main dRuby +# distribution. +# +# The ID-to-object mapping component maps dRuby object ids to the +# objects they refer to, and vice versa. The implementation to use +# can be specified as part of a DRb::DRbServer's configuration. The +# default implementation is provided by DRb::DRbIdConv. It uses an +# object's ObjectSpace id as its dRuby id. This means that the dRuby +# reference to that object only remains meaningful for the lifetime of +# the object's process and the lifetime of the object within that +# process. A modified implementation is provided by DRb::TimerIdConv +# in the file drb/timeridconv.rb. This implementation retains a local +# reference to all objects exported over dRuby for a configurable +# period of time (defaulting to ten minutes), to prevent them being +# garbage-collected within this time. Another sample implementation +# is provided in sample/name.rb in the main dRuby distribution. This +# allows objects to specify their own id or "name". A dRuby reference +# can be made persistent across processes by having each process +# register an object using the same dRuby name. +# +# pkg:gem/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. + # + # pkg:gem/drb#lib/drb/drb.rb:1882 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1839 + def current_server; end + + # Retrieves the server with the given +uri+. + # + # See also regist_server and remove_server. + # + # pkg:gem/drb#lib/drb/drb.rb:1984 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1893 + def front; end + + # Is +uri+ the URI for the current local server? + # + # pkg:gem/drb#lib/drb/drb.rb:1872 + def here?(uri); end + + # Set the default ACL to +acl+. + # + # See DRb::DRbServer.default_acl. + # + # pkg:gem/drb#lib/drb/drb.rb:1938 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1930 + def install_id_conv(idconv); end + + # pkg:gem/drb#lib/drb/drb.rb:1944 + def mutex; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # pkg:gem/drb#lib/drb/drb.rb:1826 + def primary_server; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # pkg:gem/drb#lib/drb/drb.rb:1826 + 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 #=> # + # + # pkg:gem/drb#lib/drb/drb.rb:1962 + def regist_server(server); end + + # Removes +server+ from the list of registered servers. + # + # pkg:gem/drb#lib/drb/drb.rb:1971 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1818 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1851 + def stop_service; end + + # Get the thread of the primary server. + # + # This returns nil if there is no primary server. See #primary_server. + # + # pkg:gem/drb#lib/drb/drb.rb:1919 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1910 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1902 + def to_obj(ref); end + + # Get the URI defining the local dRuby space. + # + # This is the URI of the current server. See #current_server. + # + # pkg:gem/drb#lib/drb/drb.rb:1860 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1887 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1845 + def current_server; end + + # Retrieves the server with the given +uri+. + # + # See also regist_server and remove_server. + # + # pkg:gem/drb#lib/drb/drb.rb:1987 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1896 + def front; end + + # Is +uri+ the URI for the current local server? + # + # pkg:gem/drb#lib/drb/drb.rb:1876 + def here?(uri); end + + # Set the default ACL to +acl+. + # + # See DRb::DRbServer.default_acl. + # + # pkg:gem/drb#lib/drb/drb.rb:1941 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1933 + def install_id_conv(idconv); end + + # pkg:gem/drb#lib/drb/drb.rb:1947 + def mutex; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # pkg:gem/drb#lib/drb/drb.rb:1827 + def primary_server; end + + # pkg:gem/drb#lib/drb/drb.rb:1827 + 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 #=> # + # + # pkg:gem/drb#lib/drb/drb.rb:1968 + def regist_server(server); end + + # Removes +server+ from the list of registered servers. + # + # pkg:gem/drb#lib/drb/drb.rb:1979 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1821 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1855 + def stop_service; end + + # Get the thread of the primary server. + # + # This returns nil if there is no primary server. See #primary_server. + # + # pkg:gem/drb#lib/drb/drb.rb:1922 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1913 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1914 + def to_obj(ref); end + + # Get the URI defining the local dRuby space. + # + # This is the URI of the current server. See #current_server. + # + # pkg:gem/drb#lib/drb/drb.rb:1869 + def uri; end + end +end + +# This is an internal singleton instance. This must not be used +# by users. +# +# pkg:gem/drb#lib/drb/drb.rb:382 +DRb::DRB_OBJECT_SPACE = T.let(T.unsafe(nil), DRb::DRbObjectSpace) + +# 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. +# +# pkg:gem/drb#lib/drb/drb.rb:546 +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. + # + # pkg:gem/drb#lib/drb/drb.rb:551 + def initialize(ary); end + + # pkg:gem/drb#lib/drb/drb.rb:570 + def _dump(lv); end + + class << self + # pkg:gem/drb#lib/drb/drb.rb:566 + 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. +# +# pkg:gem/drb#lib/drb/drb.rb:1284 +class DRb::DRbConn + # pkg:gem/drb#lib/drb/drb.rb:1345 + def initialize(remote_uri); end + + # pkg:gem/drb#lib/drb/drb.rb:1361 + def alive?; end + + # pkg:gem/drb#lib/drb/drb.rb:1356 + def close; end + + # pkg:gem/drb#lib/drb/drb.rb:1351 + def send_message(ref, msg_id, arg, block); end + + # pkg:gem/drb#lib/drb/drb.rb:1349 + def uri; end + + class << self + # pkg:gem/drb#lib/drb/drb.rb:1287 + def make_pool; end + + # pkg:gem/drb#lib/drb/drb.rb:1325 + def open(remote_uri); end + + # pkg:gem/drb#lib/drb/drb.rb:1320 + 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. +# +# pkg:gem/drb#lib/drb/drb.rb:393 +class DRb::DRbIdConv + # Convert an object into a reference id. + # + # This implementation returns the object's __id__ in the local + # object space. + # + # pkg:gem/drb#lib/drb/drb.rb:407 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:399 + 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. +# +# pkg:gem/drb#lib/drb/drb.rb:584 +class DRb::DRbMessage + # pkg:gem/drb#lib/drb/drb.rb:585 + def initialize(config); end + + # pkg:gem/drb#lib/drb/drb.rb:590 + def dump(obj, error = T.unsafe(nil)); end + + # pkg:gem/drb#lib/drb/drb.rb:607 + def load(soc); end + + # pkg:gem/drb#lib/drb/drb.rb:667 + def recv_reply(stream); end + + # pkg:gem/drb#lib/drb/drb.rb:647 + def recv_request(stream); end + + # pkg:gem/drb#lib/drb/drb.rb:661 + def send_reply(stream, succ, result); end + + # pkg:gem/drb#lib/drb/drb.rb:633 + def send_request(stream, ref, msg_id, arg, b); end + + private + + # pkg:gem/drb#lib/drb/drb.rb:674 + def make_proxy(obj, error = T.unsafe(nil)); end +end + +# Object wrapping a reference to a remote drb object. +# +# Method calls on this object are relayed to the remote +# object that this object is a stub for. +# +# pkg:gem/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. + # + # pkg:gem/drb#lib/drb/drb.rb:1117 + def initialize(obj, uri = T.unsafe(nil)); end + + # pkg:gem/drb#lib/drb/eq.rb:4 + def ==(other); end + + # Get the reference of the object, if local. + # + # pkg:gem/drb#lib/drb/drb.rb:1143 + def __drbref; end + + # Get the URI of the remote object. + # + # pkg:gem/drb#lib/drb/drb.rb:1138 + def __drburi; end + + # Marshall this object. + # + # The URI and ref of the object are marshalled. + # + # pkg:gem/drb#lib/drb/drb.rb:1108 + def _dump(lv); end + + # pkg:gem/drb#lib/drb/eq.rb:13 + def eql?(other); end + + # pkg:gem/drb#lib/drb/eq.rb:9 + def hash; end + + # pkg:gem/drb#lib/drb/drb.rb:1163 + def method_missing(msg_id, *a, **_arg2, &b); end + + # pkg:gem/drb#lib/drb/drb.rb:1215 + def pretty_print(q); end + + # pkg:gem/drb#lib/drb/drb.rb:1219 + def pretty_print_cycle(q); end + + # Routes respond_to? to the referenced remote object. + # + # pkg:gem/drb#lib/drb/drb.rb:1151 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1079 + def _load(s); end + + # Creates a DRb::DRbObject given the reference information to the remote + # host +uri+ and object +ref+. + # + # pkg:gem/drb#lib/drb/drb.rb:1093 + def new_with(uri, ref); end + + # Create a new DRbObject from a URI alone. + # + # pkg:gem/drb#lib/drb/drb.rb:1101 + def new_with_uri(uri); end + + # Returns a modified backtrace from +result+ with the +uri+ where each call + # in the backtrace came from. + # + # pkg:gem/drb#lib/drb/drb.rb:1201 + def prepare_backtrace(uri, result); end + + # Given the +uri+ of another host executes the block provided. + # + # pkg:gem/drb#lib/drb/drb.rb:1188 + def with_friend(uri); end + end +end + +# pkg:gem/drb#lib/drb/drb.rb:351 +class DRb::DRbObjectSpace + include ::MonitorMixin + + # pkg:gem/drb#lib/drb/drb.rb:357 + def initialize; end + + # pkg:gem/drb#lib/drb/drb.rb:362 + def to_id(obj); end + + # pkg:gem/drb#lib/drb/drb.rb:369 + def to_obj(ref); 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. +# +# pkg:gem/drb#lib/drb/drb.rb:749 +module DRb::DRbProtocol + private + + # Add a new protocol to the DRbProtocol module. + # + # pkg:gem/drb#lib/drb/drb.rb:752 + def add_protocol(prot); end + + # pkg:gem/drb#lib/drb/drb.rb:830 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:764 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:792 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:813 + def uri_option(uri, config, first = T.unsafe(nil)); end + + class << self + # Add a new protocol to the DRbProtocol module. + # + # pkg:gem/drb#lib/drb/drb.rb:755 + def add_protocol(prot); end + + # pkg:gem/drb#lib/drb/drb.rb:835 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:781 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:805 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:828 + def uri_option(uri, config, first = T.unsafe(nil)); end + end +end + +# An exception wrapping an error object +# +# pkg:gem/drb#lib/drb/drb.rb:459 +class DRb::DRbRemoteError < ::DRb::DRbError + # Creates a new remote error that wraps the Exception +error+ + # + # pkg:gem/drb#lib/drb/drb.rb:462 + def initialize(error); end + + # the class of the error, as a string. + # + # pkg:gem/drb#lib/drb/drb.rb:469 + def reason; end +end + +# Class representing a drb server instance. +# +# A DRbServer must be running in the local process before any incoming +# dRuby calls can be accepted, or any local objects can be passed as +# dRuby references to remote processes, even if those local objects are +# never actually called remotely. You do not need to start a DRbServer +# in the local process if you are only making outgoing dRuby calls +# passing marshalled parameters. +# +# Unless multiple servers are being used, the local DRbServer is normally +# started by calling DRb.start_service. +# +# pkg:gem/drb#lib/drb/drb.rb:1378 +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. + # + # pkg:gem/drb#lib/drb/drb.rb:1479 + def initialize(uri = T.unsafe(nil), front = T.unsafe(nil), config_or_acl = T.unsafe(nil)); end + + # Is this server alive? + # + # pkg:gem/drb#lib/drb/drb.rb:1534 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1622 + def check_insecure_method(obj, msg_id); end + + # The configuration of this DRbServer + # + # pkg:gem/drb#lib/drb/drb.rb:1521 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1518 + def front; end + + # Is +uri+ the URI for this server? + # + # pkg:gem/drb#lib/drb/drb.rb:1539 + def here?(uri); end + + # Stop this server. + # + # pkg:gem/drb#lib/drb/drb.rb:1544 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1512 + def thread; end + + # Convert a local object to a dRuby reference. + # + # pkg:gem/drb#lib/drb/drb.rb:1561 + def to_id(obj); end + + # Convert a dRuby reference to the local object it refers to. + # + # pkg:gem/drb#lib/drb/drb.rb:1554 + def to_obj(ref); end + + # The URI of this DRbServer. + # + # pkg:gem/drb#lib/drb/drb.rb:1505 + def uri; end + + # Get whether the server is in verbose mode. + # + # In verbose mode, failed calls are logged to stdout. + # + # pkg:gem/drb#lib/drb/drb.rb:1531 + def verbose; end + + # Set whether to operate in verbose mode. + # + # In verbose mode, failed calls are logged to stdout. + # + # pkg:gem/drb#lib/drb/drb.rb:1526 + def verbose=(v); end + + private + + # Coerce an object to a string, providing our own representation if + # to_s is not defined for the object. + # + # pkg:gem/drb#lib/drb/drb.rb:1608 + def any_to_s(obj); end + + # pkg:gem/drb#lib/drb/drb.rb:1746 + def error_print(exception); end + + # Has a method been included in the list of insecure methods? + # + # pkg:gem/drb#lib/drb/drb.rb:1602 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1764 + def main_loop; end + + # Starts the DRb main loop in a new thread. + # + # pkg:gem/drb#lib/drb/drb.rb:1583 + def run; end + + # pkg:gem/drb#lib/drb/drb.rb:1568 + def shutdown; end + + class << self + # Set the default access control list to +acl+. The default ACL is +nil+. + # + # See also DRb::ACL and #new() + # + # pkg:gem/drb#lib/drb/drb.rb:1403 + def default_acl(acl); end + + # Set the default value for the :argc_limit option. + # + # See #new(). The initial default value is 256. + # + # pkg:gem/drb#lib/drb/drb.rb:1389 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:1410 + def default_id_conv(idconv); end + + # Set the default value for the :load_limit option. + # + # See #new(). The initial default value is 25 MB. + # + # pkg:gem/drb#lib/drb/drb.rb:1396 + def default_load_limit(sz); end + + # pkg:gem/drb#lib/drb/drb.rb:1426 + def make_config(hash = T.unsafe(nil)); end + + # Get the default value of the :verbose option. + # + # pkg:gem/drb#lib/drb/drb.rb:1422 + def verbose; end + + # Set the default value of the :verbose option. + # + # See #new(). The initial default value is false. + # + # pkg:gem/drb#lib/drb/drb.rb:1417 + def verbose=(on); end + end +end + +# pkg:gem/drb#lib/drb/drb.rb:1652 +class DRb::DRbServer::InvokeMethod + # pkg:gem/drb#lib/drb/drb.rb:1653 + def initialize(drb_server, client); end + + # pkg:gem/drb#lib/drb/drb.rb:1658 + def perform; end + + private + + # pkg:gem/drb#lib/drb/drb.rb:1704 + def block_yield(x); end + + # pkg:gem/drb#lib/drb/drb.rb:1695 + def check_insecure_method; end + + # pkg:gem/drb#lib/drb/drb.rb:1687 + def init_with_client; end + + # pkg:gem/drb#lib/drb/drb.rb:1711 + def perform_with_block; end + + # pkg:gem/drb#lib/drb/drb.rb:1731 + def perform_without_block; end + + # pkg:gem/drb#lib/drb/drb.rb:1699 + def setup_message; end +end + +# The default drb protocol which communicates over a TCP socket. +# +# The DRb TCP protocol URI looks like: +# druby://:?. The option is optional. +# +# pkg:gem/drb#lib/drb/drb.rb:843 +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. + # + # pkg:gem/drb#lib/drb/drb.rb:931 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:999 + def accept; end + + # Check to see if this connection is alive. + # + # pkg:gem/drb#lib/drb/drb.rb:1029 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:981 + def close; end + + # Get the address of our TCP peer (the other end of the socket + # we are bound to. + # + # pkg:gem/drb#lib/drb/drb.rb:946 + def peeraddr; end + + # On the client side, receive a reply from the server. + # + # pkg:gem/drb#lib/drb/drb.rb:969 + def recv_reply; end + + # On the server side, receive a request from the client. + # + # pkg:gem/drb#lib/drb/drb.rb:959 + def recv_request; end + + # On the server side, send a reply to the client. + # + # pkg:gem/drb#lib/drb/drb.rb:964 + def send_reply(succ, result); end + + # On the client side, send a request to the server. + # + # pkg:gem/drb#lib/drb/drb.rb:954 + def send_request(ref, msg_id, arg, b); end + + # pkg:gem/drb#lib/drb/drb.rb:1038 + def set_sockopt(soc); end + + # Graceful shutdown + # + # pkg:gem/drb#lib/drb/drb.rb:1024 + def shutdown; end + + # Get the socket. + # + # pkg:gem/drb#lib/drb/drb.rb:951 + def stream; end + + # Get the URI that we are connected to. + # + # pkg:gem/drb#lib/drb/drb.rb:942 + def uri; end + + private + + # pkg:gem/drb#lib/drb/drb.rb:1014 + def accept_or_shutdown; end + + # pkg:gem/drb#lib/drb/drb.rb:990 + def close_shutdown_pipe; end + + class << self + # Returns the hostname of this server + # + # pkg:gem/drb#lib/drb/drb.rb:873 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:866 + def open(uri, config); end + + # Open a server listening for connections at +uri+ using + # configuration +config+. + # + # pkg:gem/drb#lib/drb/drb.rb:904 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:889 + def open_server_inaddr_any(host, port); end + + # pkg:gem/drb#lib/drb/drb.rb:846 + def parse_uri(uri); end + + # Parse +uri+ into a [uri, option] pair. + # + # pkg:gem/drb#lib/drb/drb.rb:921 + def uri_option(uri, config); end + end +end + +# Implements DRb over a UNIX socket +# +# DRb UNIX socket URIs look like drbunix:?. The +# option is optional. +# +# pkg:gem/drb#lib/drb/unix.rb:15 +class DRb::DRbUNIXSocket < ::DRb::DRbTCPSocket + # pkg:gem/drb#lib/drb/unix.rb:62 + def initialize(uri, soc, config = T.unsafe(nil), server_mode = T.unsafe(nil)); end + + # pkg:gem/drb#lib/drb/unix.rb:105 + def accept; end + + # pkg:gem/drb#lib/drb/unix.rb:95 + def close; end + + # pkg:gem/drb#lib/drb/unix.rb:111 + def set_sockopt(soc); end + + class << self + # pkg:gem/drb#lib/drb/unix.rb:28 + def open(uri, config); end + + # pkg:gem/drb#lib/drb/unix.rb:34 + def open_server(uri, config); end + + # :stopdoc: + # + # pkg:gem/drb#lib/drb/unix.rb:17 + def parse_uri(uri); end + + # pkg:gem/drb#lib/drb/unix.rb:72 + def temp_server; end + + # pkg:gem/drb#lib/drb/unix.rb:57 + def uri_option(uri, config); end + end +end + +# import from tempfile.rb +# +# pkg:gem/drb#lib/drb/unix.rb:70 +DRb::DRbUNIXSocket::Max_try = T.let(T.unsafe(nil), Integer) + +# pkg:gem/drb#lib/drb/drb.rb:1049 +class DRb::DRbURIOption + # pkg:gem/drb#lib/drb/drb.rb:1050 + def initialize(option); end + + # pkg:gem/drb#lib/drb/drb.rb:1056 + def ==(other); end + + # pkg:gem/drb#lib/drb/drb.rb:1065 + def eql?(other); end + + # pkg:gem/drb#lib/drb/drb.rb:1061 + def hash; end + + # pkg:gem/drb#lib/drb/drb.rb:1053 + def option; end + + # pkg:gem/drb#lib/drb/drb.rb:1054 + 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. +# +# pkg:gem/drb#lib/drb/drb.rb:418 +module DRb::DRbUndumped + # pkg:gem/drb#lib/drb/drb.rb:419 + 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. +# +# pkg:gem/drb#lib/drb/drb.rb:485 +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. + # + # pkg:gem/drb#lib/drb/drb.rb:493 + def initialize(err, buf); end + + # pkg:gem/drb#lib/drb/drb.rb:522 + def _dump(lv); end + + # Buffer contained the marshalled, unknown object. + # + # pkg:gem/drb#lib/drb/drb.rb:512 + def buf; end + + # Create a DRbUnknownError exception containing this object. + # + # pkg:gem/drb#lib/drb/drb.rb:536 + def exception; end + + # The name of the unknown thing. + # + # Class name for unknown objects; variable name for unknown + # constants. + # + # pkg:gem/drb#lib/drb/drb.rb:509 + 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. + # + # pkg:gem/drb#lib/drb/drb.rb:531 + def reload; end + + class << self + # pkg:gem/drb#lib/drb/drb.rb:514 + def _load(s); end + end +end + +# An exception wrapping a DRb::DRbUnknown object +# +# pkg:gem/drb#lib/drb/drb.rb:438 +class DRb::DRbUnknownError < ::DRb::DRbError + # Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+ + # + # pkg:gem/drb#lib/drb/drb.rb:441 + def initialize(unknown); end + + # pkg:gem/drb#lib/drb/drb.rb:453 + def _dump(lv); end + + # Get the wrapped DRb::DRbUnknown object. + # + # pkg:gem/drb#lib/drb/drb.rb:447 + def unknown; end + + class << self + # pkg:gem/drb#lib/drb/drb.rb:449 + def _load(s); end + end +end + +# pkg:gem/drb#lib/drb/drb.rb:1227 +class DRb::ThreadObject + include ::MonitorMixin + + # pkg:gem/drb#lib/drb/drb.rb:1230 + def initialize(&blk); end + + # pkg:gem/drb#lib/drb/drb.rb:1265 + def _execute; end + + # pkg:gem/drb#lib/drb/drb.rb:1241 + def alive?; end + + # pkg:gem/drb#lib/drb/drb.rb:1245 + def kill; end + + # pkg:gem/drb#lib/drb/drb.rb:1250 + def method_missing(msg, *arg, &blk); end +end + +# pkg:gem/drb#lib/drb/version.rb:2 +DRb::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/drb#lib/drb/drb.rb:1993 +DRbIdConv = DRb::DRbIdConv + +# :stopdoc: +# +# pkg:gem/drb#lib/drb/drb.rb:1991 +DRbObject = DRb::DRbObject + +# pkg:gem/drb#lib/drb/drb.rb:1992 +DRbUndumped = DRb::DRbUndumped diff --git a/sorbet/rbi/gems/erb@4.0.4.1.rbi b/sorbet/rbi/gems/erb@4.0.4.1.rbi new file mode 100644 index 000000000..7964ce743 --- /dev/null +++ b/sorbet/rbi/gems/erb@4.0.4.1.rbi @@ -0,0 +1,850 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `erb` gem. +# Please instead update this file by running `bin/tapioca gem erb`. + + +# = ERB -- Ruby Templating +# +# == Introduction +# +# ERB provides an easy to use but powerful templating system for Ruby. Using +# ERB, actual Ruby code can be added to any plain text document for the +# purposes of generating document information details and/or flow control. +# +# A very simple example is this: +# +# require 'erb' +# +# x = 42 +# template = ERB.new <<-EOF +# The value of x is: <%= x %> +# EOF +# puts template.result(binding) +# +# Prints: The value of x is: 42 +# +# More complex examples are given below. +# +# +# == Recognized Tags +# +# ERB recognizes certain tags in the provided template and converts them based +# on the rules below: +# +# <% Ruby code -- inline with output %> +# <%= Ruby expression -- replace with result %> +# <%# comment -- ignored -- useful in testing %> (`<% #` doesn't work. Don't use Ruby comments.) +# % a line of Ruby code -- treated as <% line %> (optional -- see ERB.new) +# %% replaced with % if first thing on a line and % processing is used +# <%% or %%> -- replace with <% or %> respectively +# +# All other text is passed through ERB filtering unchanged. +# +# +# == Options +# +# There are several settings you can change when you use ERB: +# * the nature of the tags that are recognized; +# * the binding used to resolve local variables in the template. +# +# See the ERB.new and ERB#result methods for more detail. +# +# == Character encodings +# +# ERB (or Ruby code generated by ERB) returns a string in the same +# character encoding as the input string. When the input string has +# a magic comment, however, it returns a string in the encoding specified +# by the magic comment. +# +# # -*- coding: utf-8 -*- +# require 'erb' +# +# template = ERB.new < +# \_\_ENCODING\_\_ is <%= \_\_ENCODING\_\_ %>. +# EOF +# puts template.result +# +# Prints: \_\_ENCODING\_\_ is Big5. +# +# +# == Examples +# +# === Plain Text +# +# ERB is useful for any generic templating situation. Note that in this example, we use the +# convenient "% at start of line" tag, and we quote the template literally with +# %q{...} to avoid trouble with the backslash. +# +# require "erb" +# +# # Create template. +# template = %q{ +# From: James Edward Gray II +# To: <%= to %> +# Subject: Addressing Needs +# +# <%= to[/\w+/] %>: +# +# Just wanted to send a quick note assuring that your needs are being +# addressed. +# +# I want you to know that my team will keep working on the issues, +# especially: +# +# <%# ignore numerous minor requests -- focus on priorities %> +# % priorities.each do |priority| +# * <%= priority %> +# % end +# +# Thanks for your patience. +# +# James Edward Gray II +# }.gsub(/^ /, '') +# +# message = ERB.new(template, trim_mode: "%<>") +# +# # Set up template data. +# to = "Community Spokesman " +# priorities = [ "Run Ruby Quiz", +# "Document Modules", +# "Answer Questions on Ruby Talk" ] +# +# # Produce result. +# email = message.result +# puts email +# +# Generates: +# +# From: James Edward Gray II +# To: Community Spokesman +# Subject: Addressing Needs +# +# Community: +# +# Just wanted to send a quick note assuring that your needs are being addressed. +# +# I want you to know that my team will keep working on the issues, especially: +# +# * Run Ruby Quiz +# * Document Modules +# * Answer Questions on Ruby Talk +# +# Thanks for your patience. +# +# James Edward Gray II +# +# === Ruby in HTML +# +# ERB is often used in .rhtml files (HTML with embedded Ruby). Notice the need in +# this example to provide a special binding when the template is run, so that the instance +# variables in the Product object can be resolved. +# +# require "erb" +# +# # Build template data class. +# class Product +# def initialize( code, name, desc, cost ) +# @code = code +# @name = name +# @desc = desc +# @cost = cost +# +# @features = [ ] +# end +# +# def add_feature( feature ) +# @features << feature +# end +# +# # Support templating of member data. +# def get_binding +# binding +# end +# +# # ... +# end +# +# # Create template. +# template = %{ +# +# Ruby Toys -- <%= @name %> +# +# +#

<%= @name %> (<%= @code %>)

+#

<%= @desc %>

+# +#
    +# <% @features.each do |f| %> +#
  • <%= f %>
  • +# <% end %> +#
+# +#

+# <% if @cost < 10 %> +# Only <%= @cost %>!!! +# <% else %> +# Call for a price, today! +# <% end %> +#

+# +# +# +# }.gsub(/^ /, '') +# +# rhtml = ERB.new(template) +# +# # Set up template data. +# toy = Product.new( "TZ-1002", +# "Rubysapien", +# "Geek's Best Friend! Responds to Ruby commands...", +# 999.95 ) +# toy.add_feature("Listens for verbal commands in the Ruby language!") +# toy.add_feature("Ignores Perl, Java, and all C variants.") +# toy.add_feature("Karate-Chop Action!!!") +# toy.add_feature("Matz signature on left leg.") +# toy.add_feature("Gem studded eyes... Rubies, of course!") +# +# # Produce result. +# rhtml.run(toy.get_binding) +# +# Generates (some blank lines removed): +# +# +# Ruby Toys -- Rubysapien +# +# +#

Rubysapien (TZ-1002)

+#

Geek's Best Friend! Responds to Ruby commands...

+# +#
    +#
  • Listens for verbal commands in the Ruby language!
  • +#
  • Ignores Perl, Java, and all C variants.
  • +#
  • Karate-Chop Action!!!
  • +#
  • Matz signature on left leg.
  • +#
  • Gem studded eyes... Rubies, of course!
  • +#
+# +#

+# Call for a price, today! +#

+# +# +# +# +# +# == Notes +# +# There are a variety of templating solutions available in various Ruby projects. +# For example, RDoc, distributed with Ruby, uses its own template engine, which +# can be reused elsewhere. +# +# Other popular engines could be found in the corresponding +# {Category}[https://www.ruby-toolbox.com/categories/template_engines] of +# The Ruby Toolbox. +# +# pkg:gem/erb#lib/erb/version.rb:2 +class ERB + # Constructs a new ERB object with the template specified in _str_. + # + # An ERB object works by building a chunk of Ruby code that will output + # the completed template when run. + # + # If _trim_mode_ is passed a String containing one or more of the following + # modifiers, ERB will adjust its code generation as listed: + # + # % enables Ruby code processing for lines beginning with % + # <> omit newline for lines starting with <% and ending in %> + # > omit newline for lines ending in %> + # - omit blank lines ending in -%> + # + # _eoutvar_ can be used to set the name of the variable ERB will build up + # its output in. This is useful when you need to run multiple ERB + # templates through the same binding and/or when you want to control where + # output ends up. Pass the name of the variable to be used inside a String. + # + # === Example + # + # require "erb" + # + # # build data class + # class Listings + # PRODUCT = { :name => "Chicken Fried Steak", + # :desc => "A well messages pattie, breaded and fried.", + # :cost => 9.95 } + # + # attr_reader :product, :price + # + # def initialize( product = "", price = "" ) + # @product = product + # @price = price + # end + # + # def build + # b = binding + # # create and run templates, filling member data variables + # ERB.new(<<~'END_PRODUCT', trim_mode: "", eoutvar: "@product").result b + # <%= PRODUCT[:name] %> + # <%= PRODUCT[:desc] %> + # END_PRODUCT + # ERB.new(<<~'END_PRICE', trim_mode: "", eoutvar: "@price").result b + # <%= PRODUCT[:name] %> -- <%= PRODUCT[:cost] %> + # <%= PRODUCT[:desc] %> + # END_PRICE + # end + # end + # + # # setup template data + # listings = Listings.new + # listings.build + # + # puts listings.product + "\n" + listings.price + # + # _Generates_ + # + # Chicken Fried Steak + # A well messages pattie, breaded and fried. + # + # Chicken Fried Steak -- 9.95 + # A well messages pattie, breaded and fried. + # + # pkg:gem/erb#lib/erb.rb:335 + def initialize(str, safe_level = T.unsafe(nil), legacy_trim_mode = T.unsafe(nil), legacy_eoutvar = T.unsafe(nil), trim_mode: T.unsafe(nil), eoutvar: T.unsafe(nil)); end + + # Define unnamed class which has _methodname_ as instance method, and return it. + # + # example: + # class MyClass_ + # def initialize(arg1, arg2) + # @arg1 = arg1; @arg2 = arg2 + # end + # end + # filename = 'example.rhtml' # @arg1 and @arg2 are used in example.rhtml + # erb = ERB.new(File.read(filename)) + # erb.filename = filename + # MyClass = erb.def_class(MyClass_, 'render()') + # print MyClass.new('foo', 123).render() + # + # pkg:gem/erb#lib/erb.rb:504 + def def_class(superklass = T.unsafe(nil), methodname = T.unsafe(nil)); end + + # Define _methodname_ as instance method of _mod_ from compiled Ruby source. + # + # example: + # filename = 'example.rhtml' # 'arg1' and 'arg2' are used in example.rhtml + # erb = ERB.new(File.read(filename)) + # erb.def_method(MyClass, 'render(arg1, arg2)', filename) + # print MyClass.new.render('foo', 123) + # + # pkg:gem/erb#lib/erb.rb:465 + def def_method(mod, methodname, fname = T.unsafe(nil)); end + + # Create unnamed module, define _methodname_ as instance method of it, and return it. + # + # example: + # filename = 'example.rhtml' # 'arg1' and 'arg2' are used in example.rhtml + # erb = ERB.new(File.read(filename)) + # erb.filename = filename + # MyModule = erb.def_module('render(arg1, arg2)') + # class MyClass + # include MyModule + # end + # + # pkg:gem/erb#lib/erb.rb:485 + def def_module(methodname = T.unsafe(nil)); end + + # The encoding to eval + # + # pkg:gem/erb#lib/erb.rb:370 + def encoding; end + + # The optional _filename_ argument passed to Kernel#eval when the ERB code + # is run + # + # pkg:gem/erb#lib/erb.rb:374 + def filename; end + + # The optional _filename_ argument passed to Kernel#eval when the ERB code + # is run + # + # pkg:gem/erb#lib/erb.rb:374 + def filename=(_arg0); end + + # The optional _lineno_ argument passed to Kernel#eval when the ERB code + # is run + # + # pkg:gem/erb#lib/erb.rb:378 + def lineno; end + + # The optional _lineno_ argument passed to Kernel#eval when the ERB code + # is run + # + # pkg:gem/erb#lib/erb.rb:378 + def lineno=(_arg0); end + + # Sets optional filename and line number that will be used in ERB code + # evaluation and error reporting. See also #filename= and #lineno= + # + # erb = ERB.new('<%= some_x %>') + # erb.render + # # undefined local variable or method `some_x' + # # from (erb):1 + # + # erb.location = ['file.erb', 3] + # # All subsequent error reporting would use new location + # erb.render + # # undefined local variable or method `some_x' + # # from file.erb:4 + # + # pkg:gem/erb#lib/erb.rb:395 + def location=(_arg0); end + + # Creates a new compiler for ERB. See ERB::Compiler.new for details + # + # pkg:gem/erb#lib/erb.rb:362 + def make_compiler(trim_mode); end + + # Executes the generated ERB code to produce a completed template, returning + # the results of that code. (See ERB::new for details on how this process + # can be affected by _safe_level_.) + # + # _b_ accepts a Binding object which is used to set the context of + # code evaluation. + # + # pkg:gem/erb#lib/erb.rb:425 + def result(b = T.unsafe(nil)); end + + # Render a template on a new toplevel binding with local variables specified + # by a Hash object. + # + # pkg:gem/erb#lib/erb.rb:434 + def result_with_hash(hash); end + + # Generate results and print them. (see ERB#result) + # + # pkg:gem/erb#lib/erb.rb:413 + def run(b = T.unsafe(nil)); end + + # Can be used to set _eoutvar_ as described in ERB::new. It's probably + # easier to just use the constructor though, since calling this method + # requires the setup of an ERB _compiler_ object. + # + # pkg:gem/erb#lib/erb.rb:405 + def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end + + # The Ruby code generated by ERB + # + # pkg:gem/erb#lib/erb.rb:367 + def src; end + + private + + # Returns a new binding each time *near* TOPLEVEL_BINDING for runs that do + # not specify a binding. + # + # pkg:gem/erb#lib/erb.rb:446 + def new_toplevel(vars = T.unsafe(nil)); end + + class << self + # Returns revision information for the erb.rb module. + # + # pkg:gem/erb#lib/erb.rb:267 + def version; end + end +end + +# -- +# ERB::Compiler +# +# Compiles ERB templates into Ruby code; the compiled code produces the +# template result when evaluated. ERB::Compiler provides hooks to define how +# generated output is handled. +# +# Internally ERB does something like this to generate the code returned by +# ERB#src: +# +# compiler = ERB::Compiler.new('<>') +# compiler.pre_cmd = ["_erbout=+''"] +# compiler.put_cmd = "_erbout.<<" +# compiler.insert_cmd = "_erbout.<<" +# compiler.post_cmd = ["_erbout"] +# +# code, enc = compiler.compile("Got <%= obj %>!\n") +# puts code +# +# Generates: +# +# #coding:UTF-8 +# _erbout=+''; _erbout.<< "Got ".freeze; _erbout.<<(( obj ).to_s); _erbout.<< "!\n".freeze; _erbout +# +# By default the output is sent to the print method. For example: +# +# compiler = ERB::Compiler.new('<>') +# code, enc = compiler.compile("Got <%= obj %>!\n") +# puts code +# +# Generates: +# +# #coding:UTF-8 +# print "Got ".freeze; print(( obj ).to_s); print "!\n".freeze +# +# == Evaluation +# +# The compiled code can be used in any context where the names in the code +# correctly resolve. Using the last example, each of these print 'Got It!' +# +# Evaluate using a variable: +# +# obj = 'It' +# eval code +# +# Evaluate using an input: +# +# mod = Module.new +# mod.module_eval %{ +# def get(obj) +# #{code} +# end +# } +# extend mod +# get('It') +# +# Evaluate using an accessor: +# +# klass = Class.new Object +# klass.class_eval %{ +# attr_accessor :obj +# def initialize(obj) +# @obj = obj +# end +# def get_it +# #{code} +# end +# } +# klass.new('It').get_it +# +# Good! See also ERB#def_method, ERB#def_module, and ERB#def_class. +# +# pkg:gem/erb#lib/erb/compiler.rb:73 +class ERB::Compiler + # Construct a new compiler using the trim_mode. See ERB::new for available + # trim modes. + # + # pkg:gem/erb#lib/erb/compiler.rb:427 + def initialize(trim_mode); end + + # pkg:gem/erb#lib/erb/compiler.rb:309 + def add_insert_cmd(out, content); end + + # pkg:gem/erb#lib/erb/compiler.rb:305 + def add_put_cmd(out, content); end + + # Compiles an ERB template into Ruby code. Returns an array of the code + # and encoding like ["code", Encoding]. + # + # pkg:gem/erb#lib/erb/compiler.rb:315 + def compile(s); end + + # pkg:gem/erb#lib/erb/compiler.rb:375 + def compile_content(stag, out); end + + # pkg:gem/erb#lib/erb/compiler.rb:362 + def compile_etag(etag, out, scanner); end + + # pkg:gem/erb#lib/erb/compiler.rb:338 + def compile_stag(stag, out, scanner); end + + # The command to handle text that is inserted prior to a newline + # + # pkg:gem/erb#lib/erb/compiler.rb:440 + def insert_cmd; end + + # The command to handle text that is inserted prior to a newline + # + # pkg:gem/erb#lib/erb/compiler.rb:440 + def insert_cmd=(_arg0); end + + # pkg:gem/erb#lib/erb/compiler.rb:421 + def make_scanner(src); end + + # pkg:gem/erb#lib/erb/compiler.rb:434 + def percent; end + + # An array of commands appended to compiled code + # + # pkg:gem/erb#lib/erb/compiler.rb:446 + def post_cmd; end + + # An array of commands appended to compiled code + # + # pkg:gem/erb#lib/erb/compiler.rb:446 + def post_cmd=(_arg0); end + + # An array of commands prepended to compiled code + # + # pkg:gem/erb#lib/erb/compiler.rb:443 + def pre_cmd; end + + # An array of commands prepended to compiled code + # + # pkg:gem/erb#lib/erb/compiler.rb:443 + def pre_cmd=(_arg0); end + + # pkg:gem/erb#lib/erb/compiler.rb:392 + def prepare_trim_mode(mode); end + + # The command to handle text that ends with a newline + # + # pkg:gem/erb#lib/erb/compiler.rb:437 + def put_cmd; end + + # The command to handle text that ends with a newline + # + # pkg:gem/erb#lib/erb/compiler.rb:437 + def put_cmd=(_arg0); end + + # pkg:gem/erb#lib/erb/compiler.rb:434 + def trim_mode; end + + private + + # A buffered text in #compile + # + # pkg:gem/erb#lib/erb/compiler.rb:451 + def content; end + + # A buffered text in #compile + # + # pkg:gem/erb#lib/erb/compiler.rb:451 + def content=(_arg0); end + + # pkg:gem/erb#lib/erb/compiler.rb:453 + def detect_magic_comment(s, enc = T.unsafe(nil)); end + + # pkg:gem/erb#lib/erb/compiler.rb:469 + def warn_invalid_trim_mode(mode, uplevel:); end +end + +# pkg:gem/erb#lib/erb/compiler.rb:272 +class ERB::Compiler::Buffer + # pkg:gem/erb#lib/erb/compiler.rb:273 + def initialize(compiler, enc = T.unsafe(nil), frozen = T.unsafe(nil)); end + + # pkg:gem/erb#lib/erb/compiler.rb:295 + def close; end + + # pkg:gem/erb#lib/erb/compiler.rb:289 + def cr; end + + # pkg:gem/erb#lib/erb/compiler.rb:285 + def push(cmd); end + + # pkg:gem/erb#lib/erb/compiler.rb:283 + def script; end +end + +# pkg:gem/erb#lib/erb/compiler.rb:248 +class ERB::Compiler::ExplicitScanner < ::ERB::Compiler::Scanner + # pkg:gem/erb#lib/erb/compiler.rb:249 + def scan; end +end + +# pkg:gem/erb#lib/erb/compiler.rb:74 +class ERB::Compiler::PercentLine + # pkg:gem/erb#lib/erb/compiler.rb:75 + def initialize(str); end + + # pkg:gem/erb#lib/erb/compiler.rb:79 + def to_s; end + + # pkg:gem/erb#lib/erb/compiler.rb:78 + def value; end +end + +# pkg:gem/erb#lib/erb/compiler.rb:82 +class ERB::Compiler::Scanner + # pkg:gem/erb#lib/erb/compiler.rb:102 + def initialize(src, trim_mode, percent); end + + # pkg:gem/erb#lib/erb/compiler.rb:109 + def etags; end + + # pkg:gem/erb#lib/erb/compiler.rb:111 + def scan; end + + # pkg:gem/erb#lib/erb/compiler.rb:108 + def stag; end + + # pkg:gem/erb#lib/erb/compiler.rb:108 + def stag=(_arg0); end + + # pkg:gem/erb#lib/erb/compiler.rb:109 + def stags; end + + class << self + # pkg:gem/erb#lib/erb/compiler.rb:91 + def default_scanner=(klass); end + + # pkg:gem/erb#lib/erb/compiler.rb:95 + def make_scanner(src, trim_mode, percent); end + + # pkg:gem/erb#lib/erb/compiler.rb:88 + def regist_scanner(klass, trim_mode, percent); end + + # pkg:gem/erb#lib/erb/compiler.rb:85 + def register_scanner(klass, trim_mode, percent); end + end +end + +# pkg:gem/erb#lib/erb/compiler.rb:101 +ERB::Compiler::Scanner::DEFAULT_ETAGS = T.let(T.unsafe(nil), Array) + +# pkg:gem/erb#lib/erb/compiler.rb:100 +ERB::Compiler::Scanner::DEFAULT_STAGS = T.let(T.unsafe(nil), Array) + +# pkg:gem/erb#lib/erb/compiler.rb:234 +class ERB::Compiler::SimpleScanner < ::ERB::Compiler::Scanner + # pkg:gem/erb#lib/erb/compiler.rb:235 + def scan; end +end + +# pkg:gem/erb#lib/erb/compiler.rb:114 +class ERB::Compiler::TrimScanner < ::ERB::Compiler::Scanner + # pkg:gem/erb#lib/erb/compiler.rb:115 + def initialize(src, trim_mode, percent); end + + # pkg:gem/erb#lib/erb/compiler.rb:204 + def explicit_trim_line(line); end + + # pkg:gem/erb#lib/erb/compiler.rb:223 + def is_erb_stag?(s); end + + # pkg:gem/erb#lib/erb/compiler.rb:146 + def percent_line(line, &block); end + + # pkg:gem/erb#lib/erb/compiler.rb:134 + def scan(&block); end + + # pkg:gem/erb#lib/erb/compiler.rb:159 + def scan_line(line); end + + # pkg:gem/erb#lib/erb/compiler.rb:168 + def trim_line1(line); end + + # pkg:gem/erb#lib/erb/compiler.rb:182 + def trim_line2(line); end +end + +# -- +# ERB::DefMethod +# +# Utility module to define eRuby script as instance method. +# +# === Example +# +# example.rhtml: +# <% for item in @items %> +# <%= item %> +# <% end %> +# +# example.rb: +# require 'erb' +# class MyClass +# extend ERB::DefMethod +# def_erb_method('render()', 'example.rhtml') +# def initialize(items) +# @items = items +# end +# end +# print MyClass.new([10,20,30]).render() +# +# result: +# +# 10 +# +# 20 +# +# 30 +# +# pkg:gem/erb#lib/erb/def_method.rb:33 +module ERB::DefMethod + private + + # define _methodname_ as instance method of current module, using ERB + # object or eRuby file + # + # pkg:gem/erb#lib/erb/def_method.rb:36 + def def_erb_method(methodname, erb_or_fname); end + + class << self + # define _methodname_ as instance method of current module, using ERB + # object or eRuby file + # + # pkg:gem/erb#lib/erb/def_method.rb:46 + def def_erb_method(methodname, erb_or_fname); end + end +end + +# pkg:gem/erb#lib/erb.rb:356 +ERB::NOT_GIVEN = T.let(T.unsafe(nil), Object) + +# -- +# ERB::Util +# +# A utility module for conversion routines, often handy in HTML generation. +# +# pkg:gem/erb#lib/erb/util.rb:27 +module ERB::Util + include ::ActiveSupport::CoreExt::ERBUtil + include ::ERB::Escape + extend ::ActiveSupport::CoreExt::ERBUtil + + private + + # pkg:gem/erb#lib/erb/util.rb:60 + def u(s); end + + # A utility method for encoding the String _s_ as a URL. + # + # require "erb" + # include ERB::Util + # + # puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide") + # + # _Generates_ + # + # Programming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide + # + # pkg:gem/erb#lib/erb/util.rb:57 + def url_encode(s); end + + class << self + # pkg:gem/erb#lib/erb/util.rb:43 + def h(s); end + + # pkg:gem/erb#lib/erb/util.rb:41 + def html_escape(s); end + + # pkg:gem/erb#lib/erb/util.rb:61 + def u(s); end + + # A utility method for encoding the String _s_ as a URL. + # + # require "erb" + # include ERB::Util + # + # puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide") + # + # _Generates_ + # + # Programming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide + # + # pkg:gem/erb#lib/erb/util.rb:62 + def url_encode(s); end + end +end + +# pkg:gem/erb#lib/erb/version.rb:3 +ERB::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/erubi@1.13.1.rbi b/sorbet/rbi/gems/erubi@1.13.1.rbi index f1e79b5b4..c8989aeaf 100644 --- a/sorbet/rbi/gems/erubi@1.13.1.rbi +++ b/sorbet/rbi/gems/erubi@1.13.1.rbi @@ -4,18 +4,25 @@ # This is an autogenerated file for types exported from the `erubi` gem. # Please instead update this file by running `bin/tapioca gem erubi`. -# source://erubi//lib/erubi.rb#3 + +# pkg:gem/erubi#lib/erubi.rb:3 module Erubi private + # Escape characters with their HTML/XML equivalents. + # + # pkg:gem/erubi#lib/erubi.rb:22 def h(_arg0); end class << self + # Escape characters with their HTML/XML equivalents. + # + # pkg:gem/erubi#lib/erubi.rb:49 def h(_arg0); end end end -# source://erubi//lib/erubi.rb#51 +# pkg:gem/erubi#lib/erubi.rb:51 class Erubi::Engine # Initialize a new Erubi::Engine. Options: # +:bufval+ :: The value to use for the buffer variable, as a string (default '::String.new'). @@ -44,71 +51,65 @@ class Erubi::Engine # +:src+ :: The initial value to use for the source code, an empty string by default. # +:trim+ :: Whether to trim leading and trailing whitespace, true by default. # - # @return [Engine] a new instance of Engine - # - # source://erubi//lib/erubi.rb#91 + # pkg:gem/erubi#lib/erubi.rb:91 def initialize(input, properties = T.unsafe(nil)); end # The variable name used for the buffer variable. # - # source://erubi//lib/erubi.rb#62 + # pkg:gem/erubi#lib/erubi.rb:62 def bufvar; end # The filename of the template, if one was given. # - # source://erubi//lib/erubi.rb#59 + # pkg:gem/erubi#lib/erubi.rb:59 def filename; end # The frozen ruby source code generated from the template, which can be evaled. # - # source://erubi//lib/erubi.rb#56 + # pkg:gem/erubi#lib/erubi.rb:56 def src; end private - # :nocov: - # - # source://erubi//lib/erubi.rb#209 + # pkg:gem/erubi#lib/erubi.rb:209 def _dup_string_if_frozen(string); end # Add ruby code to the template # - # source://erubi//lib/erubi.rb#232 + # pkg:gem/erubi#lib/erubi.rb:232 def add_code(code); end # Add the given ruby expression result to the template, # escaping it based on the indicator given and escape flag. # - # source://erubi//lib/erubi.rb#241 + # pkg:gem/erubi#lib/erubi.rb:241 def add_expression(indicator, code); end # Add the result of Ruby expression to the template # - # source://erubi//lib/erubi.rb#250 + # pkg:gem/erubi#lib/erubi.rb:250 def add_expression_result(code); end # Add the escaped result of Ruby expression to the template # - # source://erubi//lib/erubi.rb#255 + # pkg:gem/erubi#lib/erubi.rb:255 def add_expression_result_escaped(code); end # Add the given postamble to the src. Can be overridden in subclasses # to make additional changes to src that depend on the current state. # - # source://erubi//lib/erubi.rb#261 + # pkg:gem/erubi#lib/erubi.rb:261 def add_postamble(postamble); end # Add raw text to the template. Modifies argument if argument is mutable as a memory optimization. # Must be called with a string, cannot be called with nil (Rails's subclass depends on it). # - # source://erubi//lib/erubi.rb#222 + # pkg:gem/erubi#lib/erubi.rb:222 def add_text(text); end # Raise an exception, as the base engine class does not support handling other indicators. # - # @raise [ArgumentError] - # - # source://erubi//lib/erubi.rb#267 + # pkg:gem/erubi#lib/erubi.rb:267 def handle(indicator, code, tailch, rspace, lspace); end # Make sure that any current expression has been terminated. @@ -116,7 +117,7 @@ class Erubi::Engine # the chain_appends option is used, expressions may not be # terminated. # - # source://erubi//lib/erubi.rb#295 + # pkg:gem/erubi#lib/erubi.rb:295 def terminate_expression; end # Make sure the buffer variable is the target of the next append @@ -126,29 +127,29 @@ class Erubi::Engine # This method should only be called if the block will result in # code where << will append to the bufvar. # - # source://erubi//lib/erubi.rb#277 + # pkg:gem/erubi#lib/erubi.rb:277 def with_buffer; end end # The default regular expression used for scanning. # -# source://erubi//lib/erubi.rb#53 +# pkg:gem/erubi#lib/erubi.rb:53 Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://erubi//lib/erubi.rb#17 +# pkg:gem/erubi#lib/erubi.rb:17 Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass) -# source://erubi//lib/erubi.rb#15 +# pkg:gem/erubi#lib/erubi.rb:15 Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol) -# source://erubi//lib/erubi.rb#8 +# pkg:gem/erubi#lib/erubi.rb:8 Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer) -# source://erubi//lib/erubi.rb#9 +# pkg:gem/erubi#lib/erubi.rb:9 Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer) -# source://erubi//lib/erubi.rb#16 +# pkg:gem/erubi#lib/erubi.rb:16 Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass) -# source://erubi//lib/erubi.rb#4 +# pkg:gem/erubi#lib/erubi.rb:4 Erubi::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/herb@0.10.1.rbi b/sorbet/rbi/gems/herb@0.10.1.rbi new file mode 100644 index 000000000..28af763c5 --- /dev/null +++ b/sorbet/rbi/gems/herb@0.10.1.rbi @@ -0,0 +1,538 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `herb` gem. +# Please instead update this file by running `bin/tapioca gem herb`. + + +# NOTE: This file is generated by the templates/template.rb script and should not be +# modified manually. See /home/runner/work/herb/herb/templates/lib/herb/action_view/helper_registry.rb.erb +# rbs_inline: enabled +# rbs_inline: disabled +# NOTE: This file is generated by the templates/template.rb script and should not be +# modified manually. See /home/runner/work/herb/herb/templates/lib/herb/errors.rb.erb +# rbs_inline: enabled +# NOTE: This file is generated by the templates/template.rb script and should not be +# modified manually. See /home/runner/work/herb/herb/templates/lib/herb/visitor.rb.erb +# +# pkg:gem/herb#lib/herb.rb:4 +module Herb; end + +# pkg:gem/herb#lib/herb/colors.rb:7 +module Herb::Colors + private + + # pkg:gem/herb#lib/herb/colors.rb:80 + sig { params(string: ::String).returns(::String) } + def bold(string); end + + # pkg:gem/herb#lib/herb/colors.rb:66 + sig { params(string: ::String).returns(::String) } + def bright_magenta(string); end + + # pkg:gem/herb#lib/herb/colors.rb:59 + sig { params(string: ::String).returns(::String) } + def cyan(string); end + + # pkg:gem/herb#lib/herb/colors.rb:73 + sig { params(string: ::String).returns(::String) } + def dimmed(string); end + + # pkg:gem/herb#lib/herb/colors.rb:15 + sig { returns(T::Boolean) } + def enabled?; end + + # pkg:gem/herb#lib/herb/colors.rb:87 + sig { params(string: ::String, color: ::Integer).returns(::String) } + def fg(string, color); end + + # pkg:gem/herb#lib/herb/colors.rb:94 + sig { params(string: ::String, foreground: ::Integer, background: ::Integer).returns(::String) } + def fg_bg(string, foreground, background); end + + # pkg:gem/herb#lib/herb/colors.rb:38 + sig { params(string: ::String).returns(::String) } + def green(string); end + + # pkg:gem/herb#lib/herb/colors.rb:52 + sig { params(string: ::String).returns(::String) } + def magenta(string); end + + # pkg:gem/herb#lib/herb/colors.rb:45 + sig { params(string: ::String).returns(::String) } + def red(string); end + + # pkg:gem/herb#lib/herb/colors.rb:24 + sig { params(string: ::String).returns(::String) } + def white(string); end + + # pkg:gem/herb#lib/herb/colors.rb:31 + sig { params(string: ::String).returns(::String) } + def yellow(string); end + + class << self + # pkg:gem/herb#lib/herb/colors.rb:80 + def bold(string); end + + # pkg:gem/herb#lib/herb/colors.rb:66 + def bright_magenta(string); end + + # pkg:gem/herb#lib/herb/colors.rb:59 + def cyan(string); end + + # pkg:gem/herb#lib/herb/colors.rb:73 + def dimmed(string); end + + # pkg:gem/herb#lib/herb/colors.rb:15 + def enabled?; end + + # pkg:gem/herb#lib/herb/colors.rb:87 + def fg(string, color); end + + # pkg:gem/herb#lib/herb/colors.rb:94 + def fg_bg(string, foreground, background); end + + # pkg:gem/herb#lib/herb/colors.rb:38 + def green(string); end + + # pkg:gem/herb#lib/herb/colors.rb:52 + def magenta(string); end + + # pkg:gem/herb#lib/herb/colors.rb:45 + def red(string); end + + # pkg:gem/herb#lib/herb/colors.rb:24 + def white(string); end + + # pkg:gem/herb#lib/herb/colors.rb:31 + def yellow(string); end + end +end + +# pkg:gem/herb#lib/herb/colors.rb:10 +Herb::Colors::CLEAR_SCREEN = T.let(T.unsafe(nil), String) + +# pkg:gem/herb#lib/herb/colors.rb:8 +Herb::Colors::HIDE_CURSOR = T.let(T.unsafe(nil), String) + +# pkg:gem/herb#lib/herb/colors.rb:9 +Herb::Colors::SHOW_CURSOR = T.let(T.unsafe(nil), String) + +# pkg:gem/herb#lib/herb/diff_operation.rb:5 +class Herb::DiffOperation < ::Data + # pkg:gem/herb#lib/herb/diff_operation.rb:30 + sig { returns(::String) } + def inspect; end + + # pkg:gem/herb#lib/herb/diff_operation.rb:5 + def new_index; end + + # pkg:gem/herb#lib/herb/diff_operation.rb:5 + def new_node; end + + # pkg:gem/herb#lib/herb/diff_operation.rb:5 + def old_index; end + + # pkg:gem/herb#lib/herb/diff_operation.rb:5 + def old_node; end + + # pkg:gem/herb#lib/herb/diff_operation.rb:5 + def path; end + + # pkg:gem/herb#lib/herb/diff_operation.rb:27 + def to_h(*args, **_arg1, &blk); end + + # pkg:gem/herb#lib/herb/diff_operation.rb:16 + sig { returns(T::Hash[::Symbol, T.untyped]) } + def to_hash; end + + # pkg:gem/herb#lib/herb/diff_operation.rb:5 + def type; end + + class << self + # pkg:gem/herb#lib/herb/diff_operation.rb:5 + def [](*_arg0); end + + # pkg:gem/herb#lib/herb/diff_operation.rb:5 + def inspect; end + + # pkg:gem/herb#lib/herb/diff_operation.rb:5 + def members; end + + # pkg:gem/herb#lib/herb/diff_operation.rb:5 + def new(*_arg0); end + end +end + +# pkg:gem/herb#lib/herb/diff_result.rb:5 +class Herb::DiffResult + include ::Enumerable + + # pkg:gem/herb#lib/herb/diff_result.rb:11 + sig { params(identical: T::Boolean, operations: T::Array[::Herb::DiffOperation]).void } + def initialize(identical, operations); end + + # [Herb::DiffOperation] + # + # pkg:gem/herb#lib/herb/diff_result.rb:8 + def operations; end +end + +# pkg:gem/herb#lib/herb/lex_result.rb:5 +class Herb::LexResult < ::Herb::Result + # pkg:gem/herb#lib/herb/lex_result.rb:9 + def initialize(*args, **_arg1, &blk); end + + # pkg:gem/herb#lib/herb/lex_result.rb:20 + sig { returns(T::Boolean) } + def failed?; end + + # pkg:gem/herb#lib/herb/lex_result.rb:15 + sig { returns(T::Boolean) } + def success?; end + + # pkg:gem/herb#lib/herb/lex_result.rb:6 + def value; end +end + +# pkg:gem/herb#lib/herb/location.rb:6 +class Herb::Location + # pkg:gem/herb#lib/herb/location.rb:11 + sig { params(start_position: ::Herb::Position, end_position: ::Herb::Position).void } + def initialize(start_position, end_position); end + + # pkg:gem/herb#lib/herb/location.rb:8 + def end; end + + # pkg:gem/herb#lib/herb/location.rb:48 + sig { returns(::String) } + def inspect; end + + # pkg:gem/herb#lib/herb/location.rb:7 + def start; end + + # pkg:gem/herb#lib/herb/location.rb:30 + sig { returns({start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}}) } + def to_hash; end + + # pkg:gem/herb#lib/herb/location.rb:38 + sig { params(state: T.untyped).returns(::String) } + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/herb#lib/herb/location.rb:43 + sig { returns(::String) } + def tree_inspect; end + + class << self + # pkg:gem/herb#lib/herb/location.rb:25 + sig do + params( + start_line: ::Integer, + start_column: ::Integer, + end_line: ::Integer, + end_column: ::Integer + ).returns(::Herb::Location) + end + def [](start_line, start_column, end_line, end_column); end + + # pkg:gem/herb#lib/herb/location.rb:17 + sig do + params( + start_line: ::Integer, + start_column: ::Integer, + end_line: ::Integer, + end_column: ::Integer + ).returns(::Herb::Location) + end + def from(start_line, start_column, end_line, end_column); end + end +end + +# pkg:gem/herb#lib/herb.rb:5 +Herb::PARTIAL_EXTENSIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/herb#lib/herb.rb:9 +Herb::PARTIAL_GLOB_PATTERN = T.let(T.unsafe(nil), String) + +# pkg:gem/herb#lib/herb/parse_result.rb:7 +class Herb::ParseResult < ::Herb::Result + # pkg:gem/herb#lib/herb/parse_result.rb:12 + def initialize(*args, **_arg1, &blk); end + + # pkg:gem/herb#lib/herb/parse_result.rb:26 + def errors(*args, **_arg1, &blk); end + + # pkg:gem/herb#lib/herb/parse_result.rb:31 + sig { returns(T::Boolean) } + def failed?; end + + # pkg:gem/herb#lib/herb/parse_result.rb:9 + def options; end + + # pkg:gem/herb#lib/herb/parse_result.rb:41 + sig { returns(::String) } + def pretty_errors; end + + # pkg:gem/herb#lib/herb/parse_result.rb:36 + sig { returns(T::Boolean) } + def success?; end + + # pkg:gem/herb#lib/herb/parse_result.rb:8 + def value; end + + # pkg:gem/herb#lib/herb/parse_result.rb:46 + def visit(*args, **_arg1, &blk); end +end + +# pkg:gem/herb#lib/herb/parser_options.rb:4 +class Herb::ParserOptions + # pkg:gem/herb#lib/herb/parser_options.rb:28 + def initialize(strict: T.unsafe(nil), track_whitespace: T.unsafe(nil), analyze: T.unsafe(nil), action_view_helpers: T.unsafe(nil), transform_conditionals: T.unsafe(nil), render_nodes: T.unsafe(nil), strict_locals: T.unsafe(nil), prism_nodes: T.unsafe(nil), prism_nodes_deep: T.unsafe(nil), prism_program: T.unsafe(nil)); end + + # pkg:gem/herb#lib/herb/parser_options.rb:8 + def action_view_helpers; end + + # pkg:gem/herb#lib/herb/parser_options.rb:7 + def analyze; end + + # pkg:gem/herb#lib/herb/parser_options.rb:58 + def inspect; end + + # pkg:gem/herb#lib/herb/parser_options.rb:13 + def prism_nodes; end + + # pkg:gem/herb#lib/herb/parser_options.rb:14 + def prism_nodes_deep; end + + # pkg:gem/herb#lib/herb/parser_options.rb:12 + def prism_program; end + + # pkg:gem/herb#lib/herb/parser_options.rb:10 + def render_nodes; end + + # pkg:gem/herb#lib/herb/parser_options.rb:5 + def strict; end + + # pkg:gem/herb#lib/herb/parser_options.rb:11 + def strict_locals; end + + # pkg:gem/herb#lib/herb/parser_options.rb:42 + def to_h; end + + # pkg:gem/herb#lib/herb/parser_options.rb:6 + def track_whitespace; end + + # pkg:gem/herb#lib/herb/parser_options.rb:9 + def transform_conditionals; end +end + +# pkg:gem/herb#lib/herb/parser_options.rb:19 +Herb::ParserOptions::DEFAULT_ACTION_VIEW_HELPERS = T.let(T.unsafe(nil), FalseClass) + +# pkg:gem/herb#lib/herb/parser_options.rb:18 +Herb::ParserOptions::DEFAULT_ANALYZE = T.let(T.unsafe(nil), TrueClass) + +# pkg:gem/herb#lib/herb/parser_options.rb:24 +Herb::ParserOptions::DEFAULT_PRISM_NODES = T.let(T.unsafe(nil), FalseClass) + +# pkg:gem/herb#lib/herb/parser_options.rb:25 +Herb::ParserOptions::DEFAULT_PRISM_NODES_DEEP = T.let(T.unsafe(nil), FalseClass) + +# pkg:gem/herb#lib/herb/parser_options.rb:23 +Herb::ParserOptions::DEFAULT_PRISM_PROGRAM = T.let(T.unsafe(nil), FalseClass) + +# pkg:gem/herb#lib/herb/parser_options.rb:21 +Herb::ParserOptions::DEFAULT_RENDER_NODES = T.let(T.unsafe(nil), FalseClass) + +# pkg:gem/herb#lib/herb/parser_options.rb:16 +Herb::ParserOptions::DEFAULT_STRICT = T.let(T.unsafe(nil), TrueClass) + +# pkg:gem/herb#lib/herb/parser_options.rb:22 +Herb::ParserOptions::DEFAULT_STRICT_LOCALS = T.let(T.unsafe(nil), FalseClass) + +# pkg:gem/herb#lib/herb/parser_options.rb:17 +Herb::ParserOptions::DEFAULT_TRACK_WHITESPACE = T.let(T.unsafe(nil), FalseClass) + +# pkg:gem/herb#lib/herb/parser_options.rb:20 +Herb::ParserOptions::DEFAULT_TRANSFORM_CONDITIONALS = T.let(T.unsafe(nil), FalseClass) + +# pkg:gem/herb#lib/herb/position.rb:6 +class Herb::Position + # pkg:gem/herb#lib/herb/position.rb:11 + sig { params(line: ::Integer, column: ::Integer).void } + def initialize(line, column); end + + # pkg:gem/herb#lib/herb/position.rb:8 + def column; end + + # pkg:gem/herb#lib/herb/position.rb:42 + sig { returns(::String) } + def inspect; end + + # pkg:gem/herb#lib/herb/position.rb:7 + def line; end + + # pkg:gem/herb#lib/herb/position.rb:27 + sig { returns({line: ::Integer, column: ::Integer}) } + def to_hash; end + + # pkg:gem/herb#lib/herb/position.rb:32 + sig { params(state: T.untyped).returns(::String) } + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/herb#lib/herb/position.rb:37 + sig { returns(::String) } + def tree_inspect; end + + class << self + # pkg:gem/herb#lib/herb/position.rb:17 + sig { params(line: ::Integer, column: ::Integer).returns(::Herb::Position) } + def [](line, column); end + + # pkg:gem/herb#lib/herb/position.rb:22 + sig { params(line: ::Integer, column: ::Integer).returns(::Herb::Position) } + def from(line, column); end + end +end + +# pkg:gem/herb#lib/herb/range.rb:6 +class Herb::Range + # pkg:gem/herb#lib/herb/range.rb:11 + sig { params(from: ::Integer, to: ::Integer).void } + def initialize(from, to); end + + # pkg:gem/herb#lib/herb/range.rb:7 + def from; end + + # pkg:gem/herb#lib/herb/range.rb:42 + sig { returns(::String) } + def inspect; end + + # pkg:gem/herb#lib/herb/range.rb:8 + def to; end + + # pkg:gem/herb#lib/herb/range.rb:27 + sig { returns([::Integer, ::Integer]) } + def to_a; end + + # pkg:gem/herb#lib/herb/range.rb:32 + sig { params(state: T.untyped).returns(::String) } + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/herb#lib/herb/range.rb:47 + sig { returns(::String) } + def to_s; end + + # pkg:gem/herb#lib/herb/range.rb:37 + sig { returns(::String) } + def tree_inspect; end + + class << self + # pkg:gem/herb#lib/herb/range.rb:17 + sig { params(from: ::Integer, to: ::Integer).returns(::Herb::Range) } + def [](from, to); end + + # pkg:gem/herb#lib/herb/range.rb:22 + sig { params(from: ::Integer, to: ::Integer).returns(::Herb::Range) } + def from(from, to); end + end +end + +# pkg:gem/herb#lib/herb/result.rb:5 +class Herb::Result + # pkg:gem/herb#lib/herb/result.rb:11 + def initialize(*args, **_arg1, &blk); end + + # pkg:gem/herb#lib/herb/result.rb:8 + def errors; end + + # pkg:gem/herb#lib/herb/result.rb:23 + sig { returns(T::Boolean) } + def failed?; end + + # pkg:gem/herb#lib/herb/result.rb:6 + def source; end + + # pkg:gem/herb#lib/herb/result.rb:18 + sig { returns(T::Boolean) } + def success?; end + + # pkg:gem/herb#lib/herb/result.rb:7 + def warnings; end +end + +# pkg:gem/herb#lib/herb/location.rb:5 +Herb::SerializedLocation = T.type_alias { {start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}} } + +# pkg:gem/herb#lib/herb/position.rb:5 +Herb::SerializedPosition = T.type_alias { {line: ::Integer, column: ::Integer} } + +# pkg:gem/herb#lib/herb/range.rb:5 +Herb::SerializedRange = T.type_alias { [::Integer, ::Integer] } + +# pkg:gem/herb#lib/herb/token.rb:5 +Herb::SerializedToken = T.type_alias { {value: ::String, range: T.nilable([::Integer, ::Integer]), location: T.nilable({start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}}), type: ::String} } + +# pkg:gem/herb#lib/herb/token.rb:6 +class Herb::Token + include ::Herb::Colors + + # pkg:gem/herb#lib/herb/token.rb:15 + sig { params(value: ::String, range: ::Herb::Range, location: ::Herb::Location, type: ::String).void } + def initialize(value, range, location, type); end + + # pkg:gem/herb#lib/herb/token.rb:57 + sig { params(position: ::Herb::Position).returns(::String) } + def colorize_position(position); end + + # pkg:gem/herb#lib/herb/token.rb:52 + sig { returns(::String) } + def colorize_range; end + + # pkg:gem/herb#lib/herb/token.rb:62 + sig { returns(::String) } + def inspect; end + + # pkg:gem/herb#lib/herb/token.rb:11 + def location; end + + # pkg:gem/herb#lib/herb/token.rb:10 + def range; end + + # pkg:gem/herb#lib/herb/token.rb:23 + sig do + returns({value: ::String, range: T.nilable([::Integer, ::Integer]), location: T.nilable({start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}}), type: ::String}) + end + def to_hash; end + + # pkg:gem/herb#lib/herb/token.rb:33 + sig { params(state: T.untyped).returns(::String) } + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/herb#lib/herb/token.rb:38 + sig { returns(::String) } + def tree_inspect; end + + # pkg:gem/herb#lib/herb/token.rb:12 + def type; end + + # pkg:gem/herb#lib/herb/token.rb:9 + def value; end + + # pkg:gem/herb#lib/herb/token.rb:43 + sig { returns(::String) } + def value_inspect; end +end + +# pkg:gem/herb#lib/herb/token_list.rb:7 +class Herb::TokenList < ::SimpleDelegator + # pkg:gem/herb#lib/herb/token_list.rb:9 + sig { returns(::String) } + def inspect; end + + private + + # pkg:gem/herb#lib/herb/token_list.rb:16 + sig { returns(T::Array[::Herb::Token]) } + def items; end +end diff --git a/sorbet/rbi/gems/i18n@1.14.7.rbi b/sorbet/rbi/gems/i18n@1.14.8.rbi similarity index 63% rename from sorbet/rbi/gems/i18n@1.14.7.rbi rename to sorbet/rbi/gems/i18n@1.14.8.rbi index 3dabe6c85..2fd9c0841 100644 --- a/sorbet/rbi/gems/i18n@1.14.7.rbi +++ b/sorbet/rbi/gems/i18n@1.14.8.rbi @@ -4,95 +4,296 @@ # This is an autogenerated file for types exported from the `i18n` gem. # Please instead update this file by running `bin/tapioca gem i18n`. -# source://i18n//lib/i18n/gettext/po_parser.rb#15 + +# pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:15 module GetText; end -# source://i18n//lib/i18n/gettext/po_parser.rb#17 +# pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:17 class GetText::PoParser < ::Racc::Parser - # source://i18n//lib/i18n/gettext/po_parser.rb#19 + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:19 def _(x); end + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:282 def _reduce_10(val, _values, result); end + + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:295 def _reduce_12(val, _values, result); end + + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:302 def _reduce_13(val, _values, result); end + + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:309 def _reduce_14(val, _values, result); end + + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:316 def _reduce_15(val, _values, result); end + + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:235 def _reduce_5(val, _values, result); end + + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:246 def _reduce_8(val, _values, result); end + + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:264 def _reduce_9(val, _values, result); end - # source://i18n//lib/i18n/gettext/po_parser.rb#323 + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:323 def _reduce_none(val, _values, result); end + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23 def next_token; end + + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23 def on_comment(comment); end + + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23 def on_message(msgid, msgstr); end + + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23 def parse(str, data, ignore_fuzzy = T.unsafe(nil)); end + + # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23 def unescape(orig); end end -# source://i18n//lib/i18n/gettext/po_parser.rb#184 +# pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:184 GetText::PoParser::Racc_arg = T.let(T.unsafe(nil), Array) -# source://i18n//lib/i18n/gettext/po_parser.rb#221 +# pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:221 GetText::PoParser::Racc_debug_parser = T.let(T.unsafe(nil), TrueClass) -# source://i18n//lib/i18n/gettext/po_parser.rb#200 +# pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:200 GetText::PoParser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) +# This module allows you to easily cache all responses from the backend - thus +# speeding up the I18n aspects of your application quite a bit. +# +# To enable caching you can simply include the Cache module to the Simple +# backend - or whatever other backend you are using: +# +# I18n::Backend::Simple.send(:include, I18n::Backend::Cache) +# +# You will also need to set a cache store implementation that you want to use: +# +# I18n.cache_store = ActiveSupport::Cache.lookup_store(:memory_store) +# +# You can use any cache implementation you want that provides the same API as +# ActiveSupport::Cache (only the methods #fetch and #write are being used). +# +# The cache_key implementation by default assumes you pass values that return +# a valid key from #hash (see +# https://www.ruby-doc.org/core/classes/Object.html#M000337). However, you can +# configure your own digest method via which responds to #hexdigest (see +# https://ruby-doc.org/stdlib/libdoc/openssl/rdoc/OpenSSL/Digest.html): +# +# I18n.cache_key_digest = OpenSSL::Digest::SHA256.new +# +# If you use a lambda as a default value in your translation like this: +# +# I18n.t(:"date.order", :default => lambda {[:month, :day, :year]}) +# +# Then you will always have a cache miss, because each time this method +# is called the lambda will have a different hash value. If you know +# the result of the lambda is a constant as in the example above, then +# to cache this you can make the lambda a constant, like this: +# +# DEFAULT_DATE_ORDER = lambda {[:month, :day, :year]} +# ... +# I18n.t(:"date.order", :default => DEFAULT_DATE_ORDER) +# +# If the lambda may result in different values for each call then consider +# also using the Memoize backend. +# +# The Cascade module adds the ability to do cascading lookups to backends that +# are compatible to the Simple backend. +# +# By cascading lookups we mean that for any key that can not be found the +# Cascade module strips one segment off the scope part of the key and then +# tries to look up the key in that scope. +# +# E.g. when a lookup for the key :"foo.bar.baz" does not yield a result then +# the segment :bar will be stripped off the scope part :"foo.bar" and the new +# scope :foo will be used to look up the key :baz. If that does not succeed +# then the remaining scope segment :foo will be omitted, too, and again the +# key :baz will be looked up (now with no scope). +# +# To enable a cascading lookup one passes the :cascade option: +# +# I18n.t(:'foo.bar.baz', :cascade => true) +# +# This will return the first translation found for :"foo.bar.baz", :"foo.baz" +# or :baz in this order. +# +# The cascading lookup takes precedence over resolving any given defaults. +# I.e. defaults will kick in after the cascading lookups haven't succeeded. +# +# This behavior is useful for libraries like ActiveRecord validations where +# the library wants to give users a bunch of more or less fine-grained options +# of scopes for a particular key. +# +# Thanks to Clemens Kofler for the initial idea and implementation! See +# http://github.com/clemens/i18n-cascading-backend +# I18n locale fallbacks are useful when you want your application to use +# translations from other locales when translations for the current locale are +# missing. E.g. you might want to use :en translations when translations in +# your applications main locale :de are missing. +# +# To enable locale fallbacks you can simply include the Fallbacks module to +# the Simple backend - or whatever other backend you are using: +# +# I18n::Backend::Simple.include(I18n::Backend::Fallbacks) +# The InterpolationCompiler module contains optimizations that can tremendously +# speed up the interpolation process on the Simple backend. +# +# It works by defining a pre-compiled method on stored translation Strings that +# already bring all the knowledge about contained interpolation variables etc. +# so that the actual recurring interpolation will be very fast. +# +# To enable pre-compiled interpolations you can simply include the +# InterpolationCompiler module to the Simple backend: +# +# I18n::Backend::Simple.include(I18n::Backend::InterpolationCompiler) +# +# Note that InterpolationCompiler does not yield meaningful results and consequently +# should not be used with Ruby 1.9 (YARV) but improves performance everywhere else +# (jRuby, Rubinius). +# Memoize module simply memoizes the values returned by lookup using +# a flat hash and can tremendously speed up the lookup process in a backend. +# +# To enable it you can simply include the Memoize module to your backend: +# +# I18n::Backend::Simple.include(I18n::Backend::Memoize) +# +# Notice that it's the responsibility of the backend to define whenever the +# cache should be cleaned. +# I18n translation metadata is useful when you want to access information +# about how a translation was looked up, pluralized or interpolated in +# your application. +# +# msg = I18n.t(:message, :default => 'Hi!', :scope => :foo) +# msg.translation_metadata +# # => { :key => :message, :scope => :foo, :default => 'Hi!' } +# +# If a :count option was passed to #translate it will be set to the metadata. +# Likewise, if any interpolation variables were passed they will also be set. +# +# To enable translation metadata you can simply include the Metadata module +# into the Simple backend class - or whatever other backend you are using: +# +# I18n::Backend::Simple.include(I18n::Backend::Metadata) +# +# I18n Pluralization are useful when you want your application to +# customize pluralization rules. +# +# To enable locale specific pluralizations you can simply include the +# Pluralization module to the Simple backend - or whatever other backend you +# are using. +# +# I18n::Backend::Simple.include(I18n::Backend::Pluralization) +# +# You also need to make sure to provide pluralization algorithms to the +# backend, i.e. include them to your I18n.load_path accordingly. +# heavily based on Masao Mutoh's gettext String interpolation extension +# http://github.com/mutoh/gettext/blob/f6566738b981fe0952548c421042ad1e0cdfb31e/lib/gettext/core_ext/string.rb +# Locale Fallbacks +# +# Extends the I18n module to hold a fallbacks instance which is set to an +# instance of I18n::Locale::Fallbacks by default but can be swapped with a +# different implementation. +# +# Locale fallbacks will compute a number of fallback locales for a given locale. +# For example: +# +#

+# I18n.fallbacks[:"es-MX"] # => [:"es-MX", :es, :en] 
+# +# Locale fallbacks always fall back to +# +# * all parent locales of a given locale (e.g. :es for :"es-MX") first, +# * the current default locales and all of their parents second +# +# The default locales are set to [] by default but can be set to something else. +# +# One can additionally add any number of additional fallback locales manually. +# These will be added before the default locales to the fallback chain. For +# example: +# +# # using a custom locale as default fallback locale +# +# I18n.fallbacks = I18n::Locale::Fallbacks.new(:"en-GB", :"de-AT" => :de, :"de-CH" => :de) +# I18n.fallbacks[:"de-AT"] # => [:"de-AT", :de, :"en-GB", :en] +# I18n.fallbacks[:"de-CH"] # => [:"de-CH", :de, :"en-GB", :en] +# +# # mapping fallbacks to an existing instance +# +# # people speaking Catalan also speak Spanish as spoken in Spain +# fallbacks = I18n.fallbacks +# fallbacks.map(:ca => :"es-ES") +# fallbacks[:ca] # => [:ca, :"es-ES", :es, :"en-US", :en] +# +# # people speaking Arabian as spoken in Palestine also speak Hebrew as spoken in Israel +# fallbacks.map(:"ar-PS" => :"he-IL") +# fallbacks[:"ar-PS"] # => [:"ar-PS", :ar, :"he-IL", :he, :"en-US", :en] +# fallbacks[:"ar-EG"] # => [:"ar-EG", :ar, :"en-US", :en] +# +# # people speaking Sami as spoken in Finland also speak Swedish and Finnish as spoken in Finland +# fallbacks.map(:sms => [:"se-FI", :"fi-FI"]) +# fallbacks[:sms] # => [:sms, :"se-FI", :se, :"fi-FI", :fi, :"en-US", :en] +# RFC 4646/47 compliant Locale tag implementation that parses locale tags to +# subtags such as language, script, region, variant etc. +# +# For more information see by http://en.wikipedia.org/wiki/IETF_language_tag +# +# Rfc4646::Parser does not implement grandfathered tags. # Simple Locale tag implementation that computes subtags by simply splitting # the locale tag at '-' occurrences. # -# source://i18n//lib/i18n/version.rb#3 +# pkg:gem/i18n#lib/i18n/version.rb:3 module I18n extend ::I18n::Base class << self - # source://i18n//lib/i18n/backend/cache.rb#64 + # pkg:gem/i18n#lib/i18n/backend/cache.rb:64 def cache_key_digest; end - # source://i18n//lib/i18n/backend/cache.rb#68 + # pkg:gem/i18n#lib/i18n/backend/cache.rb:68 def cache_key_digest=(key_digest); end - # source://i18n//lib/i18n/backend/cache.rb#56 + # pkg:gem/i18n#lib/i18n/backend/cache.rb:56 def cache_namespace; end - # source://i18n//lib/i18n/backend/cache.rb#60 + # pkg:gem/i18n#lib/i18n/backend/cache.rb:60 def cache_namespace=(namespace); end - # source://i18n//lib/i18n/backend/cache.rb#48 + # pkg:gem/i18n#lib/i18n/backend/cache.rb:48 def cache_store; end - # source://i18n//lib/i18n/backend/cache.rb#52 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:23 def interpolate(string, values); end - # source://i18n//lib/i18n/interpolate/ruby.rb#29 + # pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:29 def interpolate_hash(string, values); end - # source://i18n//lib/i18n.rb#38 + # pkg:gem/i18n#lib/i18n.rb:38 def new_double_nested_cache; end - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/cache.rb#72 + # pkg:gem/i18n#lib/i18n/backend/cache.rb:72 def perform_caching?; end # Marks a key as reserved. Reserved keys are used internally, @@ -100,70 +301,60 @@ module I18n # 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 + # pkg:gem/i18n#lib/i18n.rb:46 def reserve_key(key); end - # source://i18n//lib/i18n.rb#51 + # pkg:gem/i18n#lib/i18n.rb:51 def reserved_keys_pattern; end end end -# source://i18n//lib/i18n/exceptions.rb#16 +# pkg:gem/i18n#lib/i18n/exceptions.rb:14 class I18n::ArgumentError < ::ArgumentError; end -# source://i18n//lib/i18n/backend.rb#4 +# pkg:gem/i18n#lib/i18n/backend.rb:4 module I18n::Backend; end -# source://i18n//lib/i18n/backend/base.rb#8 +# pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/base.rb:97 def available_locales; end - # source://i18n//lib/i18n/backend/base.rb#105 + # pkg:gem/i18n#lib/i18n/backend/base.rb:105 def eager_load!; end - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/base.rb#71 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/base.rb:28 def translate(locale, key, options = T.unsafe(nil)); end protected @@ -174,7 +365,7 @@ module I18n::Backend::Base # ann: 'good', john: 'big' # #=> { people: { ann: "Ann is good", john: "John is big" } } # - # source://i18n//lib/i18n/backend/base.rb#217 + # pkg:gem/i18n#lib/i18n/backend/base.rb:217 def deep_interpolate(locale, data, values = T.unsafe(nil)); end # Evaluates defaults. @@ -182,12 +373,10 @@ module I18n::Backend::Base # first translation that can be resolved. Otherwise it tries to resolve # the translation directly. # - # source://i18n//lib/i18n/backend/base.rb#128 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/base.rb:111 def eager_loaded?; end # Interpolates values into a given subject. @@ -201,7 +390,7 @@ module I18n::Backend::Base # 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 + # pkg:gem/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 @@ -209,43 +398,36 @@ module I18n::Backend::Base # data to the existing translations. Raises I18n::UnknownFileType # for all other file extensions. # - # @raise [UnknownFileType] - # - # source://i18n//lib/i18n/backend/base.rb#240 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/base.rb:272 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/base.rb:308 def pluralization_key(entry, count); end # Picks a translation from a pluralized mnemonic subkey according to English @@ -257,9 +439,7 @@ module I18n::Backend::Base # 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 + # pkg:gem/i18n#lib/i18n/backend/base.rb:182 def pluralize(locale, entry, count); end # Resolves a translation. @@ -267,64 +447,57 @@ module I18n::Backend::Base # 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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/base.rb:172 def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/base.rb#120 + # pkg:gem/i18n#lib/i18n/backend/base.rb:120 def subtrees?; end - # source://i18n//lib/i18n/backend/base.rb#289 + # pkg:gem/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 +# pkg:gem/i18n#lib/i18n/backend/cache.rb:79 module I18n::Backend::Cache - # source://i18n//lib/i18n/backend/cache.rb#80 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/cache.rb:93 def _fetch(cache_key, &block); end - # source://i18n//lib/i18n/backend/cache.rb#101 + # pkg:gem/i18n#lib/i18n/backend/cache.rb:101 def cache_key(locale, key, options); end - # source://i18n//lib/i18n/backend/cache.rb#86 + # pkg:gem/i18n#lib/i18n/backend/cache.rb:86 def fetch(cache_key, &block); end private - # source://i18n//lib/i18n/backend/cache.rb#108 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/cache_file.rb:11 def path_roots=(_arg0); end protected @@ -332,18 +505,18 @@ module I18n::Backend::CacheFile # 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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/cache_file.rb:28 def normalized_path(file); end end -# source://i18n//lib/i18n/backend/cascade.rb#35 +# pkg:gem/i18n#lib/i18n/backend/cascade.rb:35 module I18n::Backend::Cascade - # source://i18n//lib/i18n/backend/cascade.rb#36 + # pkg:gem/i18n#lib/i18n/backend/cascade.rb:36 def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end end @@ -364,72 +537,60 @@ end # # Fallback translations using the :default option are only used by the last backend of a chain. # -# source://i18n//lib/i18n/backend/chain.rb#21 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/chain.rb:27 def initialize(*backends); end - # source://i18n//lib/i18n/backend/chain.rb#52 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/chain.rb:25 def backends=(_arg0); end - # source://i18n//lib/i18n/backend/chain.rb#44 + # pkg:gem/i18n#lib/i18n/backend/chain.rb:44 def eager_load!; end - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/chain.rb#76 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/chain.rb:31 def initialized?; end - # source://i18n//lib/i18n/backend/chain.rb#82 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/chain.rb:40 def reload!; end - # source://i18n//lib/i18n/backend/chain.rb#48 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/chain.rb:92 def init_translations; end - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/chain.rb#108 + # pkg:gem/i18n#lib/i18n/backend/chain.rb:108 def namespace_lookup?(result, options); end - # source://i18n//lib/i18n/backend/chain.rb#98 + # pkg:gem/i18n#lib/i18n/backend/chain.rb:98 def translations; end private @@ -439,21 +600,19 @@ module I18n::Backend::Chain::Implementation # 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 + # pkg:gem/i18n#lib/i18n/backend/chain.rb:117 def _deep_merge(hash, other_hash); end end -# source://i18n//lib/i18n/backend/fallbacks.rb#30 +# pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:30 module I18n::Backend::Fallbacks - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/fallbacks.rb#98 + # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:98 def exists?(locale, key, options = T.unsafe(nil)); end - # source://i18n//lib/i18n/backend/fallbacks.rb#89 + # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:89 def extract_non_symbol_default!(options); end - # source://i18n//lib/i18n/backend/fallbacks.rb#67 + # pkg:gem/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 @@ -467,14 +626,14 @@ module I18n::Backend::Fallbacks # 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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:114 def on_fallback(_original_locale, _fallback_locale, _key, _options); end end @@ -487,14 +646,14 @@ end # 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 +# pkg:gem/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 + # pkg:gem/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 @@ -504,53 +663,53 @@ module I18n::Backend::Flatten # 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/flatten.rb:112 def escape_default_separator(key); end - # source://i18n//lib/i18n/backend/flatten.rb#106 + # pkg:gem/i18n#lib/i18n/backend/flatten.rb:106 def find_link(locale, key); end - # source://i18n//lib/i18n/backend/flatten.rb#93 + # pkg:gem/i18n#lib/i18n/backend/flatten.rb:93 def resolve_link(locale, key); end - # source://i18n//lib/i18n/backend/flatten.rb#89 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/i18n#lib/i18n/backend/flatten.rb:14 I18n::Backend::Flatten::SEPARATOR_ESCAPE_CHAR = T.let(T.unsafe(nil), String) # Experimental support for using Gettext po files to store translations. @@ -578,97 +737,95 @@ I18n::Backend::Flatten::SEPARATOR_ESCAPE_CHAR = T.let(T.unsafe(nil), String) # # Without it strings containing periods (".") will not be translated. # -# source://i18n//lib/i18n/backend/gettext.rb#33 +# pkg:gem/i18n#lib/i18n/backend/gettext.rb:33 module I18n::Backend::Gettext protected - # source://i18n//lib/i18n/backend/gettext.rb#41 + # pkg:gem/i18n#lib/i18n/backend/gettext.rb:41 def load_po(filename); end - # source://i18n//lib/i18n/backend/gettext.rb#51 + # pkg:gem/i18n#lib/i18n/backend/gettext.rb:51 def normalize(locale, data); end - # source://i18n//lib/i18n/backend/gettext.rb#68 + # pkg:gem/i18n#lib/i18n/backend/gettext.rb:68 def normalize_pluralization(locale, key, value); end - # source://i18n//lib/i18n/backend/gettext.rb#47 + # pkg:gem/i18n#lib/i18n/backend/gettext.rb:47 def parse(filename); end end -# source://i18n//lib/i18n/backend/gettext.rb#34 +# pkg:gem/i18n#lib/i18n/backend/gettext.rb:34 class I18n::Backend::Gettext::PoData < ::Hash - # source://i18n//lib/i18n/backend/gettext.rb#35 + # pkg:gem/i18n#lib/i18n/backend/gettext.rb:35 def set_comment(msgid_or_sym, comment); end end -# source://i18n//lib/i18n/backend/interpolation_compiler.rb#20 +# pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:20 module I18n::Backend::InterpolationCompiler - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#97 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:98 def interpolate(locale, string, values); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#107 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:108 def store_translations(locale, data, options = T.unsafe(nil)); end protected - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#113 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:114 def compile_all_strings_in(data); end end -# source://i18n//lib/i18n/backend/interpolation_compiler.rb#21 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:39 def interpolated_str?(str); end protected - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#58 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:59 def compile_interpolation_token(key); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#48 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:49 def compiled_interpolation_body(str); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#71 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:72 def direct_key(key); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#91 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:92 def escape_key_sym(key); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#87 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:88 def escape_plain_str(str); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#54 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:55 def handle_interpolation_token(token); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#67 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:68 def interpolate_key(key); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#62 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:63 def interpolate_or_raise_missing(key); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#79 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:80 def missing_key(key); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#75 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:76 def nil_key(key); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#83 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:84 def reserved_key(key); end # tokenize("foo %{bar} baz %%{buz}") # => ["foo ", "%{bar}", " baz ", "%%{buz}"] # - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#44 + # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:45 def tokenize(str); end end -# source://i18n//lib/i18n/backend/interpolation_compiler.rb#24 +# pkg:gem/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 @@ -716,7 +873,7 @@ I18n::Backend::InterpolationCompiler::Compiler::TOKENIZER = T.let(T.unsafe(nil), # # This is useful if you are using a KeyValue backend chained to a Simple backend. # -# source://i18n//lib/i18n/backend/key_value.rb#69 +# pkg:gem/i18n#lib/i18n/backend/key_value.rb:69 class I18n::Backend::KeyValue include ::I18n::Backend::Flatten include ::I18n::Backend::Transliterator @@ -724,143 +881,115 @@ class I18n::Backend::KeyValue include ::I18n::Backend::KeyValue::Implementation end -# source://i18n//lib/i18n/backend/key_value.rb#70 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/key_value.rb:102 def available_locales; end - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/key_value.rb#79 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/key_value.rb:71 def store=(_arg0); end - # source://i18n//lib/i18n/backend/key_value.rb#83 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/key_value.rb:124 def init_translations; end - # source://i18n//lib/i18n/backend/key_value.rb#136 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/key_value.rb:115 def translations; end end -# source://i18n//lib/i18n/backend/key_value.rb#161 +# pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/key_value.rb:162 def initialize(master_key, store); end - # source://i18n//lib/i18n/backend/key_value.rb#172 + # pkg:gem/i18n#lib/i18n/backend/key_value.rb:172 def [](key); end - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/key_value.rb#168 + # pkg:gem/i18n#lib/i18n/backend/key_value.rb:168 def has_key?(key); end - # source://i18n//lib/i18n/backend/key_value.rb#196 + # pkg:gem/i18n#lib/i18n/backend/key_value.rb:196 def inspect; end - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/key_value.rb#188 + # pkg:gem/i18n#lib/i18n/backend/key_value.rb:188 def instance_of?(klass); end - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/key_value.rb#183 + # pkg:gem/i18n#lib/i18n/backend/key_value.rb:183 def is_a?(klass); end - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/key_value.rb#183 + # pkg:gem/i18n#lib/i18n/backend/key_value.rb:186 def kind_of?(klass); end - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/key_value.rb#192 + # pkg:gem/i18n#lib/i18n/backend/key_value.rb:192 def nil?; end end -# source://i18n//lib/i18n/backend/lazy_loadable.rb#65 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:71 def initialized?; end - # source://i18n//lib/i18n/backend/lazy_loadable.rb#107 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:121 def init_translations; end - # source://i18n//lib/i18n/backend/lazy_loadable.rb#133 + # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:133 def initialized_locales; end private @@ -868,36 +997,30 @@ class I18n::Backend::LazyLoadable < ::I18n::Backend::Simple # 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:144 def initialize(file, expected_locale, unexpected_locales); end end @@ -951,65 +1074,63 @@ end # # I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: false) # default # -# source://i18n//lib/i18n/backend/lazy_loadable.rb#55 +# pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:55 class I18n::Backend::LocaleExtractor class << self - # source://i18n//lib/i18n/backend/lazy_loadable.rb#57 + # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:57 def locale_from_path(path); end end end -# source://i18n//lib/i18n/backend/memoize.rb#14 +# pkg:gem/i18n#lib/i18n/backend/memoize.rb:14 module I18n::Backend::Memoize - # source://i18n//lib/i18n/backend/memoize.rb#15 + # pkg:gem/i18n#lib/i18n/backend/memoize.rb:15 def available_locales; end - # source://i18n//lib/i18n/backend/memoize.rb#29 + # pkg:gem/i18n#lib/i18n/backend/memoize.rb:29 def eager_load!; end - # source://i18n//lib/i18n/backend/memoize.rb#24 + # pkg:gem/i18n#lib/i18n/backend/memoize.rb:24 def reload!; end - # source://i18n//lib/i18n/backend/memoize.rb#19 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/memoize.rb:44 def memoized_lookup; end - # source://i18n//lib/i18n/backend/memoize.rb#48 + # pkg:gem/i18n#lib/i18n/backend/memoize.rb:48 def reset_memoizations!(locale = T.unsafe(nil)); end end -# source://i18n//lib/i18n/backend/metadata.rb#21 +# pkg:gem/i18n#lib/i18n/backend/metadata.rb:21 module I18n::Backend::Metadata - # source://i18n//lib/i18n/backend/metadata.rb#52 + # pkg:gem/i18n#lib/i18n/backend/metadata.rb:52 def interpolate(locale, entry, values = T.unsafe(nil)); end - # source://i18n//lib/i18n/backend/metadata.rb#57 + # pkg:gem/i18n#lib/i18n/backend/metadata.rb:57 def pluralize(locale, entry, count); end - # source://i18n//lib/i18n/backend/metadata.rb#40 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/metadata.rb:63 def with_metadata(metadata, &block); end class << self - # @private - # - # source://i18n//lib/i18n/backend/metadata.rb#23 + # pkg:gem/i18n#lib/i18n/backend/metadata.rb:23 def included(base); end end end -# source://i18n//lib/i18n/backend/pluralization.rb#16 +# pkg:gem/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 @@ -1034,15 +1155,15 @@ module I18n::Backend::Pluralization # 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 + # pkg:gem/i18n#lib/i18n/backend/pluralization.rb:39 def pluralize(locale, entry, count); end protected - # source://i18n//lib/i18n/backend/pluralization.rb#81 + # pkg:gem/i18n#lib/i18n/backend/pluralization.rb:81 def pluralizer(locale); end - # source://i18n//lib/i18n/backend/pluralization.rb#77 + # pkg:gem/i18n#lib/i18n/backend/pluralization.rb:77 def pluralizers; end private @@ -1050,7 +1171,7 @@ module I18n::Backend::Pluralization # Normalizes categories of 0.0 and 1.0 # and returns the symbolic version # - # source://i18n//lib/i18n/backend/pluralization.rb#89 + # pkg:gem/i18n#lib/i18n/backend/pluralization.rb:89 def symbolic_count(count); end end @@ -1069,34 +1190,32 @@ end # # I18n::Backend::Simple.include(I18n::Backend::Pluralization) # -# source://i18n//lib/i18n/backend/simple.rb#21 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/simple.rb:49 def available_locales; end - # source://i18n//lib/i18n/backend/simple.rb#64 + # pkg:gem/i18n#lib/i18n/backend/simple.rb:64 def eager_load!; end - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/simple.rb#28 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/simple.rb:58 def reload!; end # Stores translations for the given locale in memory. @@ -1104,15 +1223,15 @@ module I18n::Backend::Simple::Implementation # translations will be overwritten by new ones only at the deepest # level of the hash. # - # source://i18n//lib/i18n/backend/simple.rb#36 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/simple.rb:69 def translations(do_init: T.unsafe(nil)); end protected - # source://i18n//lib/i18n/backend/simple.rb#83 + # pkg:gem/i18n#lib/i18n/backend/simple.rb:83 def init_translations; end # Looks up a translation from the translations hash. Returns nil if @@ -1121,148 +1240,139 @@ module I18n::Backend::Simple::Implementation # into multiple keys, i.e. currency.format is regarded the same as # %w(currency format). # - # source://i18n//lib/i18n/backend/simple.rb#93 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:19 def get(rule = T.unsafe(nil)); end end end -# source://i18n//lib/i18n/backend/transliterator.rb#7 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:74 def initialize(rule = T.unsafe(nil)); end - # source://i18n//lib/i18n/backend/transliterator.rb#80 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:100 def add(hash); end - # source://i18n//lib/i18n/backend/transliterator.rb#93 + # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:93 def add_default_approximations; end - # source://i18n//lib/i18n/backend/transliterator.rb#89 + # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:89 def approximations; end end -# source://i18n//lib/i18n/backend/transliterator.rb#43 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:31 def initialize(rule); end - # source://i18n//lib/i18n/backend/transliterator.rb#35 + # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:35 def transliterate(string, replacement = T.unsafe(nil)); end end -# source://i18n//lib/i18n.rb#55 +# pkg:gem/i18n#lib/i18n.rb:55 module I18n::Base - # source://i18n//lib/i18n.rb#70 + # pkg:gem/i18n#lib/i18n.rb:70 def available_locales; end - # source://i18n//lib/i18n.rb#74 + # pkg:gem/i18n#lib/i18n.rb:70 def available_locales=(value); end - # @return [Boolean] - # - # source://i18n//lib/i18n.rb#386 + # pkg:gem/i18n#lib/i18n.rb:387 def available_locales_initialized?; end - # source://i18n//lib/i18n.rb#70 + # pkg:gem/i18n#lib/i18n.rb:70 def backend; end - # source://i18n//lib/i18n.rb#74 + # pkg:gem/i18n#lib/i18n.rb:70 def backend=(value); end # Gets I18n configuration object. # - # source://i18n//lib/i18n.rb#57 + # pkg:gem/i18n#lib/i18n.rb:57 def config; end # Sets I18n configuration object. # - # source://i18n//lib/i18n.rb#62 + # pkg:gem/i18n#lib/i18n.rb:63 def config=(value); end - # source://i18n//lib/i18n.rb#70 + # pkg:gem/i18n#lib/i18n.rb:70 def default_locale; end - # source://i18n//lib/i18n.rb#74 + # pkg:gem/i18n#lib/i18n.rb:70 def default_locale=(value); end - # source://i18n//lib/i18n.rb#70 + # pkg:gem/i18n#lib/i18n.rb:70 def default_separator; end - # source://i18n//lib/i18n.rb#74 + # pkg:gem/i18n#lib/i18n.rb:70 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 + # pkg:gem/i18n#lib/i18n.rb:92 def eager_load!; end - # source://i18n//lib/i18n.rb#70 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n.rb:381 def enforce_available_locales!(locale); end - # source://i18n//lib/i18n.rb#74 + # pkg:gem/i18n#lib/i18n.rb:70 def enforce_available_locales=(value); end - # source://i18n//lib/i18n.rb#70 + # pkg:gem/i18n#lib/i18n.rb:70 def exception_handler; end - # source://i18n//lib/i18n.rb#74 + # pkg:gem/i18n#lib/i18n.rb:70 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 + # pkg:gem/i18n#lib/i18n.rb:266 def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end # Returns an array of interpolation keys for the given translation key @@ -1285,184 +1395,53 @@ module I18n::Base # I18n.interpolation_keys('does-not-exist') #=> [] # I18n.interpolation_keys('example') #=> [] # - # @raise [I18n::ArgumentError] - # - # source://i18n//lib/i18n.rb#254 + # pkg:gem/i18n#lib/i18n.rb:255 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 + # pkg:gem/i18n#lib/i18n.rb:344 def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end - # source://i18n//lib/i18n.rb#70 + # pkg:gem/i18n#lib/i18n.rb:70 def load_path; end - # source://i18n//lib/i18n.rb#74 + # pkg:gem/i18n#lib/i18n.rb:70 def load_path=(value); end - # source://i18n//lib/i18n.rb#70 + # pkg:gem/i18n#lib/i18n.rb:70 def locale; end - # source://i18n//lib/i18n.rb#74 + # pkg:gem/i18n#lib/i18n.rb:70 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 + # pkg:gem/i18n#lib/i18n.rb:376 def locale_available?(locale); end # Localizes certain objects, such as dates and numbers to local formatting. # - # @raise [Disabled] - # - # source://i18n//lib/i18n.rb#335 + # pkg:gem/i18n#lib/i18n.rb:336 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 + # pkg:gem/i18n#lib/i18n.rb:364 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 + # pkg:gem/i18n#lib/i18n.rb:84 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 + # pkg:gem/i18n#lib/i18n.rb:227 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 + # pkg:gem/i18n#lib/i18n.rb:234 def t!(key, **options); end # Translates, pluralizes and interpolates a given key using a given locale, @@ -1581,15 +1560,13 @@ module I18n::Base # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' }) # I18n.t(:salutation, any_hash) # - # @raise [Disabled] - # - # source://i18n//lib/i18n.rb#211 + # pkg:gem/i18n#lib/i18n.rb:212 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 + # pkg:gem/i18n#lib/i18n.rb:231 def translate!(key, **options); end # Transliterates UTF-8 characters to ASCII. By default this method will @@ -1644,12 +1621,12 @@ module I18n::Base # I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen" # I18n.transliterate("Jürgen", :locale => :de) # => "Juergen" # - # source://i18n//lib/i18n.rb#324 + # pkg:gem/i18n#lib/i18n.rb:325 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 + # pkg:gem/i18n#lib/i18n.rb:347 def with_locale(tmp_locale = T.unsafe(nil)); end private @@ -1673,103 +1650,101 @@ module I18n::Base # 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 + # pkg:gem/i18n#lib/i18n.rb:423 def handle_exception(handling, exception, locale, key, options); end - # source://i18n//lib/i18n.rb#464 + # pkg:gem/i18n#lib/i18n.rb:465 def interpolation_keys_from_translation(translation); end - # source://i18n//lib/i18n.rb#440 + # pkg:gem/i18n#lib/i18n.rb:441 def normalize_key(key, separator); end - # source://i18n//lib/i18n.rb#392 + # pkg:gem/i18n#lib/i18n.rb:393 def translate_key(key, throw, raise, locale, backend, options); end end -# source://i18n//lib/i18n/config.rb#6 +# pkg:gem/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 + # pkg:gem/i18n#lib/i18n/config.rb:43 def available_locales; end # Sets the available locales. # - # source://i18n//lib/i18n/config.rb#57 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/config.rb:75 def default_separator; end # Sets the current default scope separator. # - # source://i18n//lib/i18n/config.rb#80 + # pkg:gem/i18n#lib/i18n/config.rb:80 def default_separator=(separator); end - # source://i18n//lib/i18n/config.rb#141 + # pkg:gem/i18n#lib/i18n/config.rb:141 def enforce_available_locales; end - # source://i18n//lib/i18n/config.rb#145 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/config.rb:86 def exception_handler; end # Sets the exception handler. # - # source://i18n//lib/i18n/config.rb#91 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/config.rb:151 def interpolation_patterns; end # Sets the current interpolation patterns. Used to set a interpolation @@ -1779,7 +1754,7 @@ class I18n::Config # # I18n.config.interpolation_patterns << /\{\{(\w+)\}\}/ # - # source://i18n//lib/i18n/config.rb#161 + # pkg:gem/i18n#lib/i18n/config.rb:161 def interpolation_patterns=(interpolation_patterns); end # Allow clients to register paths providing translation data sources. The @@ -1791,30 +1766,30 @@ class I18n::Config # register translation files like this: # I18n.load_path << 'path/to/locale/en.yml' # - # source://i18n//lib/i18n/config.rb#126 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/config.rb:97 def missing_interpolation_argument_handler; end # Sets the missing interpolation argument handler. It can be any @@ -1829,34 +1804,32 @@ class I18n::Config # "#{key} is missing" # end # - # source://i18n//lib/i18n/config.rb#114 + # pkg:gem/i18n#lib/i18n/config.rb:114 def missing_interpolation_argument_handler=(exception_handler); end end -# source://i18n//lib/i18n/interpolate/ruby.rb#7 +# pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:7 I18n::DEFAULT_INTERPOLATION_PATTERNS = T.let(T.unsafe(nil), Array) -# source://i18n//lib/i18n/exceptions.rb#18 +# pkg:gem/i18n#lib/i18n/exceptions.rb:16 class I18n::Disabled < ::I18n::ArgumentError - # @return [Disabled] a new instance of Disabled - # - # source://i18n//lib/i18n/exceptions.rb#19 + # pkg:gem/i18n#lib/i18n/exceptions.rb:17 def initialize(method); end end -# source://i18n//lib/i18n.rb#36 +# pkg:gem/i18n#lib/i18n.rb:36 I18n::EMPTY_HASH = T.let(T.unsafe(nil), Hash) -# source://i18n//lib/i18n/exceptions.rb#6 +# pkg:gem/i18n#lib/i18n/exceptions.rb:4 class I18n::ExceptionHandler - # source://i18n//lib/i18n/exceptions.rb#7 + # pkg:gem/i18n#lib/i18n/exceptions.rb:5 def call(exception, _locale, _key, _options); end end -# source://i18n//lib/i18n/gettext.rb#4 +# pkg:gem/i18n#lib/i18n/gettext.rb:4 module I18n::Gettext class << self - # source://i18n//lib/i18n/gettext.rb#21 + # pkg:gem/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 @@ -1864,12 +1837,12 @@ module I18n::Gettext # integer-index based style # TODO move this information to the pluralization module # - # source://i18n//lib/i18n/gettext.rb#17 + # pkg:gem/i18n#lib/i18n/gettext.rb:17 def plural_keys(*args); end end end -# source://i18n//lib/i18n/gettext.rb#6 +# pkg:gem/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 @@ -1877,7 +1850,7 @@ I18n::Gettext::CONTEXT_SEPARATOR = T.let(T.unsafe(nil), String) # # include I18n::Gettext::Helpers # -# source://i18n//lib/i18n/gettext/helpers.rb#11 +# pkg:gem/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, @@ -1885,474 +1858,398 @@ module I18n::Gettext::Helpers # * msgid: the message id. # * Returns: msgid. # - # source://i18n//lib/i18n/gettext/helpers.rb#17 + # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:17 def N_(msgsid); end - # source://i18n//lib/i18n/gettext/helpers.rb#21 + # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:24 def _(msgid, options = T.unsafe(nil)); end - # source://i18n//lib/i18n/gettext/helpers.rb#21 + # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:21 def gettext(msgid, options = T.unsafe(nil)); end - # source://i18n//lib/i18n/gettext/helpers.rb#38 + # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:41 def n_(msgid, msgid_plural, n = T.unsafe(nil)); end - # source://i18n//lib/i18n/gettext/helpers.rb#38 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:72 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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:56 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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:36 def p_(msgctxt, msgid); end - # source://i18n//lib/i18n/gettext/helpers.rb#32 + # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:32 def pgettext(msgctxt, msgid); end - # source://i18n//lib/i18n/gettext/helpers.rb#26 + # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:30 def s_(msgid, separator = T.unsafe(nil)); end - # source://i18n//lib/i18n/gettext/helpers.rb#26 + # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:26 def sgettext(msgid, separator = T.unsafe(nil)); end end -# source://i18n//lib/i18n/gettext.rb#5 +# pkg:gem/i18n#lib/i18n/gettext.rb:5 I18n::Gettext::PLURAL_SEPARATOR = T.let(T.unsafe(nil), String) -# source://i18n//lib/i18n/interpolate/ruby.rb#12 +# pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:12 I18n::INTERPOLATION_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://i18n//lib/i18n/interpolate/ruby.rb#15 +# pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:15 I18n::INTERPOLATION_PATTERNS_CACHE = T.let(T.unsafe(nil), Hash) -# source://i18n//lib/i18n/exceptions.rb#134 +# pkg:gem/i18n#lib/i18n/exceptions.rb:132 class I18n::InvalidFilenames < ::I18n::ArgumentError - # @return [InvalidFilenames] a new instance of InvalidFilenames - # - # source://i18n//lib/i18n/exceptions.rb#136 + # pkg:gem/i18n#lib/i18n/exceptions.rb:134 def initialize(file_errors); end end -# source://i18n//lib/i18n/exceptions.rb#135 +# pkg:gem/i18n#lib/i18n/exceptions.rb:133 I18n::InvalidFilenames::NUMBER_OF_ERRORS_SHOWN = T.let(T.unsafe(nil), Integer) -# source://i18n//lib/i18n/exceptions.rb#32 +# pkg:gem/i18n#lib/i18n/exceptions.rb:30 class I18n::InvalidLocale < ::I18n::ArgumentError - # @return [InvalidLocale] a new instance of InvalidLocale - # - # source://i18n//lib/i18n/exceptions.rb#34 + # pkg:gem/i18n#lib/i18n/exceptions.rb:32 def initialize(locale); end - # Returns the value of attribute locale. - # - # source://i18n//lib/i18n/exceptions.rb#33 + # pkg:gem/i18n#lib/i18n/exceptions.rb:31 def locale; end end -# source://i18n//lib/i18n/exceptions.rb#40 +# pkg:gem/i18n#lib/i18n/exceptions.rb:38 class I18n::InvalidLocaleData < ::I18n::ArgumentError - # @return [InvalidLocaleData] a new instance of InvalidLocaleData - # - # source://i18n//lib/i18n/exceptions.rb#42 + # pkg:gem/i18n#lib/i18n/exceptions.rb:40 def initialize(filename, exception_message); end - # Returns the value of attribute filename. - # - # source://i18n//lib/i18n/exceptions.rb#41 + # pkg:gem/i18n#lib/i18n/exceptions.rb:39 def filename; end end -# source://i18n//lib/i18n/exceptions.rb#92 +# pkg:gem/i18n#lib/i18n/exceptions.rb:90 class I18n::InvalidPluralizationData < ::I18n::ArgumentError - # @return [InvalidPluralizationData] a new instance of InvalidPluralizationData - # - # source://i18n//lib/i18n/exceptions.rb#94 + # pkg:gem/i18n#lib/i18n/exceptions.rb:92 def initialize(entry, count, key); end - # Returns the value of attribute count. - # - # source://i18n//lib/i18n/exceptions.rb#93 + # pkg:gem/i18n#lib/i18n/exceptions.rb:91 def count; end - # Returns the value of attribute entry. - # - # source://i18n//lib/i18n/exceptions.rb#93 + # pkg:gem/i18n#lib/i18n/exceptions.rb:91 def entry; end - # Returns the value of attribute key. - # - # source://i18n//lib/i18n/exceptions.rb#93 + # pkg:gem/i18n#lib/i18n/exceptions.rb:91 def key; end end -# source://i18n//lib/i18n/backend/key_value.rb#21 +# pkg:gem/i18n#lib/i18n/backend/key_value.rb:21 I18n::JSON = ActiveSupport::JSON -# source://i18n//lib/i18n/locale.rb#4 +# pkg:gem/i18n#lib/i18n/locale.rb:4 module I18n::Locale; end -# source://i18n//lib/i18n/locale/fallbacks.rb#48 +# pkg:gem/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 + # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:49 def initialize(*mappings); end - # @raise [InvalidLocale] - # - # source://i18n//lib/i18n/locale/fallbacks.rb#60 + # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:60 def [](locale); end - # Returns the value of attribute defaults. - # - # source://i18n//lib/i18n/locale/fallbacks.rb#58 + # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:58 def defaults; end - # source://i18n//lib/i18n/locale/fallbacks.rb#55 + # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:55 def defaults=(defaults); end - # @return [Boolean] - # - # source://i18n//lib/i18n/locale/fallbacks.rb#82 + # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:82 def empty?; end - # source://i18n//lib/i18n/locale/fallbacks.rb#86 + # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:86 def inspect; end - # source://i18n//lib/i18n/locale/fallbacks.rb#67 + # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:67 def map(*args, &block); end protected - # source://i18n//lib/i18n/locale/fallbacks.rb#92 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/locale/tag.rb:22 def tag(tag); end end end -# source://i18n//lib/i18n/locale/tag/parents.rb#4 +# pkg:gem/i18n#lib/i18n/locale/tag/parents.rb:4 module I18n::Locale::Tag::Parents - # source://i18n//lib/i18n/locale/tag/parents.rb#5 + # pkg:gem/i18n#lib/i18n/locale/tag/parents.rb:5 def parent; end - # source://i18n//lib/i18n/locale/tag/parents.rb#18 + # pkg:gem/i18n#lib/i18n/locale/tag/parents.rb:18 def parents; end - # source://i18n//lib/i18n/locale/tag/parents.rb#14 + # pkg:gem/i18n#lib/i18n/locale/tag/parents.rb:14 def self_and_parents; end end -# source://i18n//lib/i18n/locale/tag/rfc4646.rb#12 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:35 def language; end - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:35 def region; end - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:35 def script; end - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#46 + # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:46 def to_a; end - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#42 + # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:42 def to_s; end - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#38 + # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:38 def to_sym; end - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:35 def variant; end class << self - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#23 + # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:23 def parser; end - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#27 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:18 def tag(tag); end end end -# source://i18n//lib/i18n/locale/tag/rfc4646.rb#50 +# pkg:gem/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 + # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:63 def match(tag); end end end -# source://i18n//lib/i18n/locale/tag/rfc4646.rb#51 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:17 def initialize(*tag); end - # source://i18n//lib/i18n/locale/tag/simple.rb#21 + # pkg:gem/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 + # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:15 def tag; end - # source://i18n//lib/i18n/locale/tag/simple.rb#33 + # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:33 def to_a; end - # source://i18n//lib/i18n/locale/tag/simple.rb#29 + # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:29 def to_s; end - # source://i18n//lib/i18n/locale/tag/simple.rb#25 + # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:25 def to_sym; end class << self - # source://i18n//lib/i18n/locale/tag/simple.rb#8 + # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:8 def tag(tag); end end end -# source://i18n//lib/i18n/middleware.rb#4 +# pkg:gem/i18n#lib/i18n/middleware.rb:4 class I18n::Middleware - # @return [Middleware] a new instance of Middleware - # - # source://i18n//lib/i18n/middleware.rb#6 + # pkg:gem/i18n#lib/i18n/middleware.rb:6 def initialize(app); end - # source://i18n//lib/i18n/middleware.rb#10 + # pkg:gem/i18n#lib/i18n/middleware.rb:10 def call(env); end end -# source://i18n//lib/i18n/exceptions.rb#100 +# pkg:gem/i18n#lib/i18n/exceptions.rb:98 class I18n::MissingInterpolationArgument < ::I18n::ArgumentError - # @return [MissingInterpolationArgument] a new instance of MissingInterpolationArgument - # - # source://i18n//lib/i18n/exceptions.rb#102 + # pkg:gem/i18n#lib/i18n/exceptions.rb:100 def initialize(key, values, string); end - # Returns the value of attribute key. - # - # source://i18n//lib/i18n/exceptions.rb#101 + # pkg:gem/i18n#lib/i18n/exceptions.rb:99 def key; end - # Returns the value of attribute string. - # - # source://i18n//lib/i18n/exceptions.rb#101 + # pkg:gem/i18n#lib/i18n/exceptions.rb:99 def string; end - # Returns the value of attribute values. - # - # source://i18n//lib/i18n/exceptions.rb#101 + # pkg:gem/i18n#lib/i18n/exceptions.rb:99 def values; end end -# source://i18n//lib/i18n/exceptions.rb#48 +# pkg:gem/i18n#lib/i18n/exceptions.rb:46 class I18n::MissingTranslation < ::I18n::ArgumentError include ::I18n::MissingTranslation::Base end -# source://i18n//lib/i18n/exceptions.rb#49 +# pkg:gem/i18n#lib/i18n/exceptions.rb:47 module I18n::MissingTranslation::Base - # source://i18n//lib/i18n/exceptions.rb#54 + # pkg:gem/i18n#lib/i18n/exceptions.rb:52 def initialize(locale, key, options = T.unsafe(nil)); end - # Returns the value of attribute key. - # - # source://i18n//lib/i18n/exceptions.rb#52 + # pkg:gem/i18n#lib/i18n/exceptions.rb:50 def key; end - # source://i18n//lib/i18n/exceptions.rb#59 + # pkg:gem/i18n#lib/i18n/exceptions.rb:57 def keys; end - # Returns the value of attribute locale. - # - # source://i18n//lib/i18n/exceptions.rb#52 + # pkg:gem/i18n#lib/i18n/exceptions.rb:50 def locale; end - # source://i18n//lib/i18n/exceptions.rb#65 + # pkg:gem/i18n#lib/i18n/exceptions.rb:63 def message; end - # source://i18n//lib/i18n/exceptions.rb#74 + # pkg:gem/i18n#lib/i18n/exceptions.rb:72 def normalized_option(key); end - # Returns the value of attribute options. - # - # source://i18n//lib/i18n/exceptions.rb#52 + # pkg:gem/i18n#lib/i18n/exceptions.rb:50 def options; end - # source://i18n//lib/i18n/exceptions.rb#80 + # pkg:gem/i18n#lib/i18n/exceptions.rb:78 def to_exception; end - # source://i18n//lib/i18n/exceptions.rb#65 + # pkg:gem/i18n#lib/i18n/exceptions.rb:76 def to_s; end end -# source://i18n//lib/i18n/exceptions.rb#50 +# pkg:gem/i18n#lib/i18n/exceptions.rb:48 I18n::MissingTranslation::Base::PERMITTED_KEYS = T.let(T.unsafe(nil), Array) -# source://i18n//lib/i18n/exceptions.rb#88 +# pkg:gem/i18n#lib/i18n/exceptions.rb:86 class I18n::MissingTranslationData < ::I18n::ArgumentError include ::I18n::MissingTranslation::Base end -# source://i18n//lib/i18n.rb#19 +# pkg:gem/i18n#lib/i18n.rb:19 I18n::RESERVED_KEYS = T.let(T.unsafe(nil), Array) -# source://i18n//lib/i18n/exceptions.rb#108 +# pkg:gem/i18n#lib/i18n/exceptions.rb:106 class I18n::ReservedInterpolationKey < ::I18n::ArgumentError - # @return [ReservedInterpolationKey] a new instance of ReservedInterpolationKey - # - # source://i18n//lib/i18n/exceptions.rb#110 + # pkg:gem/i18n#lib/i18n/exceptions.rb:108 def initialize(key, string); end - # Returns the value of attribute key. - # - # source://i18n//lib/i18n/exceptions.rb#109 + # pkg:gem/i18n#lib/i18n/exceptions.rb:107 def key; end - # Returns the value of attribute string. - # - # source://i18n//lib/i18n/exceptions.rb#109 + # pkg:gem/i18n#lib/i18n/exceptions.rb:107 def string; end end -# source://i18n//lib/i18n/tests.rb#4 +# pkg:gem/i18n#lib/i18n/tests.rb:4 module I18n::Tests; end -# source://i18n//lib/i18n/tests/localization.rb#3 +# pkg:gem/i18n#lib/i18n/tests/localization.rb:3 module I18n::Tests::Localization class << self - # @private - # - # source://i18n//lib/i18n/tests/localization.rb#9 + # pkg:gem/i18n#lib/i18n/tests/localization.rb:9 def included(base); end end end -# source://i18n//lib/i18n/exceptions.rb#116 +# pkg:gem/i18n#lib/i18n/exceptions.rb:114 class I18n::UnknownFileType < ::I18n::ArgumentError - # @return [UnknownFileType] a new instance of UnknownFileType - # - # source://i18n//lib/i18n/exceptions.rb#118 + # pkg:gem/i18n#lib/i18n/exceptions.rb:116 def initialize(type, filename); end - # Returns the value of attribute filename. - # - # source://i18n//lib/i18n/exceptions.rb#117 + # pkg:gem/i18n#lib/i18n/exceptions.rb:115 def filename; end - # Returns the value of attribute type. - # - # source://i18n//lib/i18n/exceptions.rb#117 + # pkg:gem/i18n#lib/i18n/exceptions.rb:115 def type; end end -# source://i18n//lib/i18n/exceptions.rb#124 +# pkg:gem/i18n#lib/i18n/exceptions.rb:122 class I18n::UnsupportedMethod < ::I18n::ArgumentError - # @return [UnsupportedMethod] a new instance of UnsupportedMethod - # - # source://i18n//lib/i18n/exceptions.rb#126 + # pkg:gem/i18n#lib/i18n/exceptions.rb:124 def initialize(method, backend_klass, msg); end - # Returns the value of attribute backend_klass. - # - # source://i18n//lib/i18n/exceptions.rb#125 + # pkg:gem/i18n#lib/i18n/exceptions.rb:123 def backend_klass; end - # Returns the value of attribute method. - # - # source://i18n//lib/i18n/exceptions.rb#125 + # pkg:gem/i18n#lib/i18n/exceptions.rb:123 def method; end - # Returns the value of attribute msg. - # - # source://i18n//lib/i18n/exceptions.rb#125 + # pkg:gem/i18n#lib/i18n/exceptions.rb:123 def msg; end end -# source://i18n//lib/i18n/utils.rb#4 +# pkg:gem/i18n#lib/i18n/utils.rb:4 module I18n::Utils class << self - # source://i18n//lib/i18n/utils.rb#18 + # pkg:gem/i18n#lib/i18n/utils.rb:18 def deep_merge(hash, other_hash, &block); end - # source://i18n//lib/i18n/utils.rb#22 + # pkg:gem/i18n#lib/i18n/utils.rb:22 def deep_merge!(hash, other_hash, &block); end - # source://i18n//lib/i18n/utils.rb#34 + # pkg:gem/i18n#lib/i18n/utils.rb:34 def deep_symbolize_keys(hash); end - # source://i18n//lib/i18n/utils.rb#7 + # pkg:gem/i18n#lib/i18n/utils.rb:7 def except(hash, *keys); end private - # source://i18n//lib/i18n/utils.rb#43 + # pkg:gem/i18n#lib/i18n/utils.rb:43 def deep_symbolize_keys_in_object(value); end end end -# source://i18n//lib/i18n/version.rb#4 +# pkg:gem/i18n#lib/i18n/version.rb:4 I18n::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/io-console@0.8.0.rbi b/sorbet/rbi/gems/io-console@0.8.0.rbi new file mode 100644 index 000000000..73616ab0e --- /dev/null +++ b/sorbet/rbi/gems/io-console@0.8.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `io-console` gem. +# Please instead update this file by running `bin/tapioca gem io-console`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/json@2.7.2.rbi b/sorbet/rbi/gems/json@2.19.4.rbi similarity index 58% rename from sorbet/rbi/gems/json@2.7.2.rbi rename to sorbet/rbi/gems/json@2.19.4.rbi index 3ef0f88c7..3c905f6db 100644 --- a/sorbet/rbi/gems/json@2.7.2.rbi +++ b/sorbet/rbi/gems/json@2.19.4.rbi @@ -4,25 +4,20 @@ # This is an autogenerated file for types exported from the `json` gem. # Please instead update this file by running `bin/tapioca gem json`. -# Extends any Class to include _json_creatable?_ method. -# -# source://json//lib/json/common.rb#690 -class Class < ::Module - # Returns true if this class can be used to create an instance - # from a serialised JSON string. The class has to implement a class - # method _json_create_ that expects a hash as first parameter. The hash - # should include the required data. - # - # @return [Boolean] - # - # source://json//lib/json/common.rb#695 - def json_creatable?; end -end # = JavaScript \Object Notation (\JSON) # # \JSON is a lightweight data-interchange format. # +# \JSON is easy for us humans to read and write, +# and equally simple for machines to read (parse) and write (generate). +# +# \JSON is language-independent, making it an ideal interchange format +# for applications in differing programming languages +# and on differing operating systems. +# +# == \JSON Values +# # A \JSON value is one of the following: # - Double-quoted text: "foo". # - Number: +1+, +1.0+, +2.0e2+. @@ -144,6 +139,24 @@ end # # --- # +# Option +allow_duplicate_key+ specifies whether duplicate keys in objects +# should be ignored or cause an error to be raised: +# +# When not specified: +# # The last value is used and a deprecation warning emitted. +# JSON.parse('{"a": 1, "a":2}') => {"a" => 2} +# # warning: detected duplicate keys in JSON object. +# # This will raise an error in json 3.0 unless enabled via `allow_duplicate_key: true` +# +# When set to `+true+` +# # The last value is used. +# JSON.parse('{"a": 1, "a":2}') => {"a" => 2} +# +# When set to `+false+`, the future default: +# JSON.parse('{"a": 1, "a":2}') => duplicate key at line 1 column 1 (JSON::ParserError) +# +# --- +# # Option +allow_nan+ (boolean) specifies whether to allow # NaN, Infinity, and MinusInfinity in +source+; # defaults to +false+. @@ -160,8 +173,47 @@ end # ruby = JSON.parse(source, {allow_nan: true}) # ruby # => [NaN, Infinity, -Infinity] # +# --- +# +# Option +allow_trailing_comma+ (boolean) specifies whether to allow +# trailing commas in objects and arrays; +# defaults to +false+. +# +# With the default, +false+: +# JSON.parse('[1,]') # unexpected character: ']' at line 1 column 4 (JSON::ParserError) +# +# When enabled: +# JSON.parse('[1,]', allow_trailing_comma: true) # => [1] +# +# --- +# +# Option +allow_control_characters+ (boolean) specifies whether to allow +# unescaped ASCII control characters, such as newlines, in strings; +# defaults to +false+. +# +# With the default, +false+: +# JSON.parse(%{"Hello\nWorld"}) # invalid ASCII control character in string (JSON::ParserError) +# +# When enabled: +# JSON.parse(%{"Hello\nWorld"}, allow_control_characters: true) # => "Hello\nWorld" +# +# --- +# +# Option +allow_invalid_escape+ (boolean) specifies whether to ignore backslahes that are followed +# by an invalid escape character in strings; +# defaults to +false+. +# +# With the default, +false+: +# JSON.parse('"Hell\o"') # invalid escape character in string (JSON::ParserError) +# +# When enabled: +# JSON.parse('"Hell\o"', allow_invalid_escape: true) # => "Hello" +# # ====== Output Options # +# Option +freeze+ (boolean) specifies whether the returned objects will be frozen; +# defaults to +false+. +# # Option +symbolize_names+ (boolean) specifies whether returned \Hash keys # should be Symbols; # defaults to +false+ (use Strings). @@ -286,8 +338,27 @@ end # JSON.generate(JSON::MinusInfinity) # # Allow: -# ruby = [Float::NaN, Float::Infinity, Float::MinusInfinity] -# JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,-Infinity]' +# ruby = [Float::NAN, Float::INFINITY, JSON::NaN, JSON::Infinity, JSON::MinusInfinity] +# JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,NaN,Infinity,-Infinity]' +# +# --- +# +# Option +allow_duplicate_key+ (boolean) specifies whether +# hashes with duplicate keys should be allowed or produce an error. +# defaults to emit a deprecation warning. +# +# With the default, (not set): +# Warning[:deprecated] = true +# JSON.generate({ foo: 1, "foo" => 2 }) +# # warning: detected duplicate key "foo" in {foo: 1, "foo" => 2}. +# # This will raise an error in json 3.0 unless enabled via `allow_duplicate_key: true` +# # => '{"foo":1,"foo":2}' +# +# With false +# JSON.generate({ foo: 1, "foo" => 2 }, allow_duplicate_key: false) +# # detected duplicate key "foo" in {foo: 1, "foo" => 2} (JSON::GeneratorError) +# +# In version 3.0, false will become the default. # # --- # @@ -368,6 +439,9 @@ end # # == \JSON Additions # +# Note that JSON Additions must only be used with trusted data, and is +# deprecated. +# # When you "round trip" a non-\String object from Ruby to \JSON and back, # you have a new \String, instead of the object you began with: # ruby0 = Range.new(0, 2) @@ -395,13 +469,13 @@ end # json1 = JSON.generate(ruby) # ruby1 = JSON.parse(json1, create_additions: true) # # Make a nice display. -# display = <" (String) # With custom addition: # (Foo) # -# source://json//lib/json/version.rb#2 +# pkg:gem/json#lib/json/version.rb:3 module JSON private @@ -630,7 +704,7 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//lib/json/common.rb#615 + # pkg:gem/json#lib/json/common.rb:932 def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end # :call-seq: @@ -647,21 +721,18 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//lib/json/common.rb#329 + # pkg:gem/json#lib/json/common.rb:462 def fast_generate(obj, opts = T.unsafe(nil)); end - # :stopdoc: - # I want to deprecate these later, so I'll first be silent about them, and later delete them. - # - # source://json//lib/json/common.rb#329 - def fast_unparse(obj, opts = T.unsafe(nil)); end + # pkg:gem/json#lib/json/common.rb:977 + def fast_unparse(*_arg0, **_arg1, &_arg2); end # :call-seq: # JSON.generate(obj, opts = nil) -> new_string # # Returns a \String containing the generated \JSON data. # - # See also JSON.fast_generate, JSON.pretty_generate. + # See also JSON.pretty_generate. # # Argument +obj+ is the Ruby object to be converted to \JSON. # @@ -692,14 +763,25 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//lib/json/common.rb#300 + # pkg:gem/json#lib/json/common.rb:441 def generate(obj, opts = T.unsafe(nil)); end # :call-seq: + # JSON.load(source, options = {}) -> object # JSON.load(source, proc = nil, options = {}) -> object # # Returns the Ruby objects created by parsing the given +source+. # + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # If you must use it, use JSON.unsafe_load instead to make it clear. + # + # Since JSON version 2.8.0, `load` emits a deprecation warning when a + # non native type is deserialized, without `create_additions` being explicitly + # enabled, and in JSON version 3.0, `load` will have `create_additions` disabled + # by default. + # # - Argument +source+ must be, or be convertible to, a \String: # - If +source+ responds to instance method +to_str+, # source.to_str becomes the source. @@ -714,9 +796,6 @@ module JSON # - Argument +proc+, if given, must be a \Proc that accepts one argument. # It will be called recursively with each result (depth-first order). # See details below. - # BEWARE: This method is meant to serialise data from trusted user input, - # like from your own database server or clients under your control, it could - # be dangerous to allow untrusted users to pass JSON sources into it. # - Argument +opts+, if given, contains a \Hash of options for the parsing. # See {Parsing Options}[#module-JSON-label-Parsing+Options]. # The default options can be changed via method JSON.load_default_options=. @@ -727,17 +806,17 @@ module JSON # parse(source, opts); see #parse. # # Source for following examples: - # source = <<-EOT - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # EOT + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON # # Load a \String: # ruby = JSON.load(source) @@ -802,6 +881,7 @@ module JSON # when Array # obj.map! {|v| deserialize_obj v } # end + # obj # }) # pp ruby # Output: @@ -823,7 +903,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//lib/json/common.rb#541 + # pkg:gem/json#lib/json/common.rb:856 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :call-seq: @@ -834,7 +914,7 @@ module JSON # # See method #parse. # - # source://json//lib/json/common.rb#249 + # pkg:gem/json#lib/json/common.rb:390 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -845,12 +925,9 @@ module JSON # # See method #parse! # - # source://json//lib/json/common.rb#260 + # pkg:gem/json#lib/json/common.rb:401 def load_file!(filespec, opts = T.unsafe(nil)); end - # source://json//lib/json/common.rb#643 - def merge_dump_options(opts, strict: T.unsafe(nil)); end - # :call-seq: # JSON.parse(source, opts) -> object # @@ -879,17 +956,17 @@ module JSON # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. # # Parses nested JSON objects: - # source = <<-EOT - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # EOT + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON # ruby = JSON.parse(source) # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} # @@ -899,7 +976,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//lib/json/common.rb#219 + # pkg:gem/json#lib/json/common.rb:353 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -914,7 +991,7 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//lib/json/common.rb#234 + # pkg:gem/json#lib/json/common.rb:375 def parse!(source, opts = T.unsafe(nil)); end # :call-seq: @@ -947,29 +1024,155 @@ module JSON # } # } # - # source://json//lib/json/common.rb#374 + # pkg:gem/json#lib/json/common.rb:509 def pretty_generate(obj, opts = T.unsafe(nil)); end + # pkg:gem/json#lib/json/common.rb:987 + def pretty_unparse(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/json#lib/json/common.rb:997 + def restore(*_arg0, **_arg1, &_arg2); end + # :stopdoc: - # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # All these were meant to be deprecated circa 2009, but were just set as undocumented + # so usage still exist in the wild. # - # source://json//lib/json/common.rb#374 - def pretty_unparse(obj, opts = T.unsafe(nil)); end + # pkg:gem/json#lib/json/common.rb:967 + def unparse(*_arg0, **_arg1, &_arg2); end - # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ + # :call-seq: + # JSON.unsafe_load(source, options = {}) -> object + # JSON.unsafe_load(source, proc = nil, options = {}) -> object # - # source://json//lib/json/common.rb#559 - def recurse_proc(result, &proc); end - - # source://json//lib/json/common.rb#541 - def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end - - # :stopdoc: - # I want to deprecate these later, so I'll first be silent about them, and - # later delete them. + # Returns the Ruby objects created by parsing the given +source+. + # + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # + # - Argument +source+ must be, or be convertible to, a \String: + # - If +source+ responds to instance method +to_str+, + # source.to_str becomes the source. + # - If +source+ responds to instance method +to_io+, + # source.to_io.read becomes the source. + # - If +source+ responds to instance method +read+, + # source.read becomes the source. + # - If both of the following are true, source becomes the \String 'null': + # - Option +allow_blank+ specifies a truthy value. + # - The source, as defined above, is +nil+ or the empty \String ''. + # - Otherwise, +source+ remains the source. + # - Argument +proc+, if given, must be a \Proc that accepts one argument. + # It will be called recursively with each result (depth-first order). + # See details below. + # - Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # The default options can be changed via method JSON.unsafe_load_default_options=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # + # Load a \String: + # ruby = JSON.unsafe_load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.unsafe_load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.unsafe_load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' # - # source://json//lib/json/common.rb#300 - def unparse(obj, opts = T.unsafe(nil)); end + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.unsafe_load + # ruby = JSON.unsafe_load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # obj + # }) + # pp ruby + # Output: + # {"users"=> + # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, + # #"User", "username"=>"john", "email"=>"john@example.com"}>], + # "accounts"=> + # [{"account"=> + # #"Account", "paid"=>true, "account_id"=>"1234"}>}, + # {"account"=> + # #"Account", "paid"=>false, "account_id"=>"1235"}>}], + # "admins"=> + # #"Admin", "password"=>"0wn3d"}>} + # + # pkg:gem/json#lib/json/common.rb:685 + def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end class << self # :call-seq: @@ -984,35 +1187,33 @@ module JSON # ruby = [0, 1, nil] # JSON[ruby] # => '[0,1,null]' # - # source://json//lib/json/common.rb#22 + # pkg:gem/json#lib/json/common.rb:132 def [](object, opts = T.unsafe(nil)); end - # source://json//lib/json/common.rb#85 - def create_fast_state; end + # pkg:gem/json#lib/json/common.rb:208 + def _dump_default_options; end + + # pkg:gem/json#lib/json/common.rb:208 + def _load_default_options; end + + # pkg:gem/json#lib/json/common.rb:208 + def _unsafe_load_default_options; end # Returns the current create identifier. # See also JSON.create_id=. # - # source://json//lib/json/common.rb#130 + # pkg:gem/json#lib/json/common.rb:236 def create_id; end # Sets create identifier, which is used to decide if the _json_create_ # hook of a class should be called; initial value is +json_class+: # JSON.create_id # => 'json_class' # - # source://json//lib/json/common.rb#124 + # pkg:gem/json#lib/json/common.rb:230 def create_id=(new_value); end - # source://json//lib/json/common.rb#95 - def create_pretty_state; end - - # Return the constant located at _path_. The format of _path_ has to be - # either ::A::B::C or A::B::C. In any case, A has to be located at the top - # level (absolute namespace path?). If there doesn't exist a constant at - # the given path, an ArgumentError is raised. - # - # source://json//lib/json/common.rb#46 - def deep_const_get(path); end + # pkg:gem/json#lib/json/common.rb:104 + def deprecation_warning(message, uplevel = T.unsafe(nil)); end # :call-seq: # JSON.dump(obj, io = nil, limit = nil) @@ -1042,24 +1243,14 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//lib/json/common.rb#615 + # pkg:gem/json#lib/json/common.rb:932 def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end - # Sets or returns the default options for the JSON.dump method. - # Initially: - # opts = JSON.dump_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} - # - # source://json//lib/json/common.rb#580 + # pkg:gem/json#lib/json/common.rb:208 def dump_default_options; end - # Sets or returns the default options for the JSON.dump method. - # Initially: - # opts = JSON.dump_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} - # - # source://json//lib/json/common.rb#580 - def dump_default_options=(_arg0); end + # pkg:gem/json#lib/json/common.rb:208 + def dump_default_options=(val); end # :call-seq: # JSON.fast_generate(obj, opts) -> new_string @@ -1075,21 +1266,18 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//lib/json/common.rb#329 + # pkg:gem/json#lib/json/common.rb:462 def fast_generate(obj, opts = T.unsafe(nil)); end - # :stopdoc: - # I want to deprecate these later, so I'll first be silent about them, and later delete them. - # - # source://json//lib/json/common.rb#329 - def fast_unparse(obj, opts = T.unsafe(nil)); end + # pkg:gem/json#lib/json/common.rb:977 + def fast_unparse(*_arg0, **_arg1, &_arg2); end # :call-seq: # JSON.generate(obj, opts = nil) -> new_string # # Returns a \String containing the generated \JSON data. # - # See also JSON.fast_generate, JSON.pretty_generate. + # See also JSON.pretty_generate. # # Argument +obj+ is the Ruby object to be converted to \JSON. # @@ -1120,31 +1308,35 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//lib/json/common.rb#300 + # pkg:gem/json#lib/json/common.rb:441 def generate(obj, opts = T.unsafe(nil)); end - # Returns the JSON generator module that is used by JSON. This is - # either JSON::Ext::Generator or JSON::Pure::Generator: - # JSON.generator # => JSON::Ext::Generator + # Returns the JSON generator module that is used by JSON. # - # source://json//lib/json/common.rb#107 + # pkg:gem/json#lib/json/common.rb:179 def generator; end # Set the module _generator_ to be used by JSON. # - # source://json//lib/json/common.rb#62 + # pkg:gem/json#lib/json/common.rb:156 def generator=(generator); end - # Encodes string using String.encode. - # - # source://json//lib/json/common.rb#639 - def iconv(to, from, string); end - # :call-seq: + # JSON.load(source, options = {}) -> object # JSON.load(source, proc = nil, options = {}) -> object # # Returns the Ruby objects created by parsing the given +source+. # + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # If you must use it, use JSON.unsafe_load instead to make it clear. + # + # Since JSON version 2.8.0, `load` emits a deprecation warning when a + # non native type is deserialized, without `create_additions` being explicitly + # enabled, and in JSON version 3.0, `load` will have `create_additions` disabled + # by default. + # # - Argument +source+ must be, or be convertible to, a \String: # - If +source+ responds to instance method +to_str+, # source.to_str becomes the source. @@ -1159,9 +1351,6 @@ module JSON # - Argument +proc+, if given, must be a \Proc that accepts one argument. # It will be called recursively with each result (depth-first order). # See details below. - # BEWARE: This method is meant to serialise data from trusted user input, - # like from your own database server or clients under your control, it could - # be dangerous to allow untrusted users to pass JSON sources into it. # - Argument +opts+, if given, contains a \Hash of options for the parsing. # See {Parsing Options}[#module-JSON-label-Parsing+Options]. # The default options can be changed via method JSON.load_default_options=. @@ -1172,17 +1361,17 @@ module JSON # parse(source, opts); see #parse. # # Source for following examples: - # source = <<-EOT - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # EOT + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON # # Load a \String: # ruby = JSON.load(source) @@ -1247,6 +1436,7 @@ module JSON # when Array # obj.map! {|v| deserialize_obj v } # end + # obj # }) # pp ruby # Output: @@ -1268,24 +1458,14 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//lib/json/common.rb#541 + # pkg:gem/json#lib/json/common.rb:856 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end - # Sets or returns default options for the JSON.load method. - # Initially: - # opts = JSON.load_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} - # - # source://json//lib/json/common.rb#404 + # pkg:gem/json#lib/json/common.rb:208 def load_default_options; end - # Sets or returns default options for the JSON.load method. - # Initially: - # opts = JSON.load_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} - # - # source://json//lib/json/common.rb#404 - def load_default_options=(_arg0); end + # pkg:gem/json#lib/json/common.rb:208 + def load_default_options=(val); end # :call-seq: # JSON.load_file(path, opts={}) -> object @@ -1295,7 +1475,7 @@ module JSON # # See method #parse. # - # source://json//lib/json/common.rb#249 + # pkg:gem/json#lib/json/common.rb:390 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1306,7 +1486,7 @@ module JSON # # See method #parse! # - # source://json//lib/json/common.rb#260 + # pkg:gem/json#lib/json/common.rb:401 def load_file!(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1337,17 +1517,17 @@ module JSON # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. # # Parses nested JSON objects: - # source = <<-EOT - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # EOT + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON # ruby = JSON.parse(source) # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} # @@ -1357,7 +1537,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//lib/json/common.rb#219 + # pkg:gem/json#lib/json/common.rb:353 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -1372,19 +1552,17 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//lib/json/common.rb#234 + # pkg:gem/json#lib/json/common.rb:375 def parse!(source, opts = T.unsafe(nil)); end - # Returns the JSON parser class that is used by JSON. This is either - # JSON::Ext::Parser or JSON::Pure::Parser: - # JSON.parser # => JSON::Ext::Parser + # Returns the JSON parser class that is used by JSON. # - # source://json//lib/json/common.rb#33 + # pkg:gem/json#lib/json/common.rb:146 def parser; end # Set the JSON parser class _parser_ to be used by JSON. # - # source://json//lib/json/common.rb#36 + # pkg:gem/json#lib/json/common.rb:149 def parser=(parser); end # :call-seq: @@ -1417,123 +1595,617 @@ module JSON # } # } # - # source://json//lib/json/common.rb#374 + # pkg:gem/json#lib/json/common.rb:509 def pretty_generate(obj, opts = T.unsafe(nil)); end - # :stopdoc: - # I want to deprecate these later, so I'll first be silent about them, and later delete them. - # - # source://json//lib/json/common.rb#374 - def pretty_unparse(obj, opts = T.unsafe(nil)); end - - # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ - # - # source://json//lib/json/common.rb#559 - def recurse_proc(result, &proc); end + # pkg:gem/json#lib/json/common.rb:987 + def pretty_unparse(*_arg0, **_arg1, &_arg2); end - # source://json//lib/json/common.rb#541 - def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + # pkg:gem/json#lib/json/common.rb:997 + def restore(*_arg0, **_arg1, &_arg2); end - # Sets or Returns the JSON generator state class that is used by JSON. This is - # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: - # JSON.state # => JSON::Ext::Generator::State + # Sets or Returns the JSON generator state class that is used by JSON. # - # source://json//lib/json/common.rb#112 + # pkg:gem/json#lib/json/common.rb:182 def state; end - # Sets or Returns the JSON generator state class that is used by JSON. This is - # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: - # JSON.state # => JSON::Ext::Generator::State + # Sets or Returns the JSON generator state class that is used by JSON. # - # source://json//lib/json/common.rb#112 + # pkg:gem/json#lib/json/common.rb:182 def state=(_arg0); end # :stopdoc: - # I want to deprecate these later, so I'll first be silent about them, and - # later delete them. + # All these were meant to be deprecated circa 2009, but were just set as undocumented + # so usage still exist in the wild. # - # source://json//lib/json/common.rb#300 - def unparse(obj, opts = T.unsafe(nil)); end + # pkg:gem/json#lib/json/common.rb:967 + def unparse(*_arg0, **_arg1, &_arg2); end + + # :call-seq: + # JSON.unsafe_load(source, options = {}) -> object + # JSON.unsafe_load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # + # - Argument +source+ must be, or be convertible to, a \String: + # - If +source+ responds to instance method +to_str+, + # source.to_str becomes the source. + # - If +source+ responds to instance method +to_io+, + # source.to_io.read becomes the source. + # - If +source+ responds to instance method +read+, + # source.read becomes the source. + # - If both of the following are true, source becomes the \String 'null': + # - Option +allow_blank+ specifies a truthy value. + # - The source, as defined above, is +nil+ or the empty \String ''. + # - Otherwise, +source+ remains the source. + # - Argument +proc+, if given, must be a \Proc that accepts one argument. + # It will be called recursively with each result (depth-first order). + # See details below. + # - Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # The default options can be changed via method JSON.unsafe_load_default_options=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # + # Load a \String: + # ruby = JSON.unsafe_load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.unsafe_load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.unsafe_load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.unsafe_load + # ruby = JSON.unsafe_load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # obj + # }) + # pp ruby + # Output: + # {"users"=> + # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, + # #"User", "username"=>"john", "email"=>"john@example.com"}>], + # "accounts"=> + # [{"account"=> + # #"Account", "paid"=>true, "account_id"=>"1234"}>}, + # {"account"=> + # #"Account", "paid"=>false, "account_id"=>"1235"}>}], + # "admins"=> + # #"Admin", "password"=>"0wn3d"}>} + # + # pkg:gem/json#lib/json/common.rb:685 + def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/common.rb:208 + def unsafe_load_default_options; end + + # pkg:gem/json#lib/json/common.rb:208 + def unsafe_load_default_options=(val); end private - # source://json//lib/json/common.rb#643 - def merge_dump_options(opts, strict: T.unsafe(nil)); end + # pkg:gem/json#lib/json/common.rb:1010 + def const_missing(const_name); end + + # pkg:gem/json#lib/json/common.rb:205 + def deprecated_singleton_attr_accessor(*attrs); end + + # Called from the extension when a hash has both string and symbol keys + # + # pkg:gem/json#lib/json/common.rb:187 + def on_mixed_keys_hash(hash, do_raise); end end end -# source://json//lib/json/common.rb#118 -JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String) +# JSON::Coder holds a parser and generator configuration. +# +# module MyApp +# JSONC_CODER = JSON::Coder.new( +# allow_trailing_comma: true +# ) +# end +# +# MyApp::JSONC_CODER.load(document) +# +# pkg:gem/json#lib/json/common.rb:1036 +class JSON::Coder + # :call-seq: + # JSON.new(options = nil, &block) + # + # Argument +options+, if given, contains a \Hash of options for both parsing and generating. + # See {Parsing Options}[rdoc-ref:JSON@Parsing+Options], + # and {Generating Options}[rdoc-ref:JSON@Generating+Options]. + # + # For generation, the strict: true option is always set. When a Ruby object with no native \JSON counterpart is + # encountered, the block provided to the initialize method is invoked, and must return a Ruby object that has a native + # \JSON counterpart: + # + # module MyApp + # API_JSON_CODER = JSON::Coder.new do |object| + # case object + # when Time + # object.iso8601(3) + # else + # object # Unknown type, will raise + # end + # end + # end + # + # puts MyApp::API_JSON_CODER.dump(Time.now.utc) # => "2025-01-21T08:41:44.286Z" + # + # pkg:gem/json#lib/json/common.rb:1061 + def initialize(options = T.unsafe(nil), &as_json); end + + # call-seq: + # dump(object) -> String + # dump(object, io) -> io + # + # Serialize the given object into a \JSON document. + # + # pkg:gem/json#lib/json/common.rb:1079 + def dump(object, io = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/common.rb:1082 + def generate(object, io = T.unsafe(nil)); end + + # call-seq: + # load(string) -> Object + # + # Parse the given \JSON document and return an equivalent Ruby object. + # + # pkg:gem/json#lib/json/common.rb:1088 + def load(source); end + + # call-seq: + # load(path) -> Object + # + # Parse the given \JSON document and return an equivalent Ruby object. + # + # pkg:gem/json#lib/json/common.rb:1097 + def load_file(path); end + + # pkg:gem/json#lib/json/common.rb:1091 + def parse(source); end +end + +# pkg:gem/json#lib/json/ext.rb:39 +class JSON::Ext::Generator::State + # call-seq: new(opts = {}) + # + # Instantiates a new State object, configured by _opts_. + # + # Argument +opts+, if given, contains a \Hash of options for the generation. + # See {Generating Options}[rdoc-ref:JSON@Generating+Options]. + # + # pkg:gem/json#lib/json/ext.rb:39 + def initialize(opts = T.unsafe(nil)); end + + # call-seq: [](name) + # + # Returns the value returned by method +name+. + # + # pkg:gem/json#lib/json/ext/generator/state.rb:77 + def [](name); end + + # call-seq: []=(name, value) + # + # Sets the attribute name to value. + # + # pkg:gem/json#lib/json/ext/generator/state.rb:91 + def []=(name, value); end -# source://json//lib/json/common.rb#115 -JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String) + # pkg:gem/json#lib/json/ext.rb:39 + def _generate_no_fallback(*_arg0); end -# source://json//lib/json/generic_object.rb#9 + # pkg:gem/json#lib/json/ext.rb:39 + def allow_nan=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def allow_nan?; end + + # pkg:gem/json#lib/json/ext.rb:39 + def array_nl; end + + # pkg:gem/json#lib/json/ext.rb:39 + def array_nl=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def as_json; end + + # pkg:gem/json#lib/json/ext.rb:39 + def as_json=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def ascii_only=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def ascii_only?; end + + # pkg:gem/json#lib/json/ext.rb:39 + def buffer_initial_length; end + + # pkg:gem/json#lib/json/ext.rb:39 + def buffer_initial_length=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def check_circular?; end + + # call-seq: configure(opts) + # + # Configure this State instance with the Hash _opts_, and return + # itself. + # + # pkg:gem/json#lib/json/ext/generator/state.rb:23 + def configure(opts); end + + # pkg:gem/json#lib/json/ext.rb:39 + def depth; end + + # pkg:gem/json#lib/json/ext.rb:39 + def depth=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def escape_slash; end + + # pkg:gem/json#lib/json/ext.rb:39 + def escape_slash=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def escape_slash?; end + + # pkg:gem/json#lib/json/ext.rb:39 + def generate(*_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def indent; end + + # pkg:gem/json#lib/json/ext.rb:39 + def indent=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def max_nesting; end + + # pkg:gem/json#lib/json/ext.rb:39 + def max_nesting=(_arg0); end + + # pkg:gem/json#lib/json/ext/generator/state.rb:36 + def merge(opts); end + + # pkg:gem/json#lib/json/ext.rb:39 + def object_nl; end + + # pkg:gem/json#lib/json/ext.rb:39 + def object_nl=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def script_safe; end + + # pkg:gem/json#lib/json/ext.rb:39 + def script_safe=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def script_safe?; end + + # pkg:gem/json#lib/json/ext.rb:39 + def space; end + + # pkg:gem/json#lib/json/ext.rb:39 + def space=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def space_before; end + + # pkg:gem/json#lib/json/ext.rb:39 + def space_before=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def strict; end + + # pkg:gem/json#lib/json/ext.rb:39 + def strict=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def strict?; end + + # call-seq: to_h + # + # Returns the configuration instance variables as a hash, that can be + # passed to the configure method. + # + # pkg:gem/json#lib/json/ext/generator/state.rb:42 + def to_h; end + + # pkg:gem/json#lib/json/ext/generator/state.rb:72 + def to_hash; end + + private + + # pkg:gem/json#lib/json/ext.rb:39 + def _configure(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def allow_duplicate_key?; end + + # pkg:gem/json#lib/json/ext.rb:39 + def initialize_copy(_arg0); end + + class << self + # pkg:gem/json#lib/json/ext.rb:39 + def _generate_no_fallback(_arg0, _arg1, _arg2); end + + # pkg:gem/json#lib/json/ext.rb:39 + def from_state(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def generate(_arg0, _arg1, _arg2); end + end +end + +# pkg:gem/json#lib/json/ext.rb:9 +class JSON::Ext::Parser + # pkg:gem/json#lib/json/ext.rb:17 + def initialize(source, opts = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/ext.rb:26 + def parse; end + + # pkg:gem/json#lib/json/ext.rb:22 + def source; end + + class << self + # pkg:gem/json#lib/json/ext.rb:11 + def parse(_arg0, _arg1); end + end +end + +# pkg:gem/json#lib/json/ext.rb:32 +JSON::Ext::Parser::Config = JSON::Ext::ParserConfig + +# pkg:gem/json#lib/json/ext.rb:31 +class JSON::Ext::ParserConfig + # pkg:gem/json#lib/json/ext.rb:31 + def initialize(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:31 + def parse(_arg0); end +end + +# Fragment of JSON document that is to be included as is: +# fragment = JSON::Fragment.new("[1, 2, 3]") +# JSON.generate({ count: 3, items: fragments }) +# +# This allows to easily assemble multiple JSON fragments that have +# been persisted somewhere without having to parse them nor resorting +# to string interpolation. +# +# Note: no validation is performed on the provided string. It is the +# responsibility of the caller to ensure the string contains valid JSON. +# +# pkg:gem/json#lib/json/common.rb:289 +class JSON::Fragment < ::Struct + # pkg:gem/json#lib/json/common.rb:290 + def initialize(json); end + + # pkg:gem/json#lib/json/common.rb:289 + def json; end + + # pkg:gem/json#lib/json/common.rb:289 + def json=(_); end + + # pkg:gem/json#lib/json/common.rb:298 + def to_json(state = T.unsafe(nil), *_arg1); end + + class << self + # pkg:gem/json#lib/json/common.rb:289 + def [](*_arg0); end + + # pkg:gem/json#lib/json/common.rb:289 + def inspect; end + + # pkg:gem/json#lib/json/common.rb:289 + def keyword_init?; end + + # pkg:gem/json#lib/json/common.rb:289 + def members; end + + # pkg:gem/json#lib/json/common.rb:289 + def new(*_arg0); end + end +end + +# This exception is raised if a generator or unparser error occurs. +# +# pkg:gem/json#lib/json/common.rb:259 +class JSON::GeneratorError < ::JSON::JSONError + # pkg:gem/json#lib/json/common.rb:262 + def initialize(message, invalid_object = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/common.rb:267 + def detailed_message(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/json#lib/json/common.rb:260 + def invalid_object; end +end + +# pkg:gem/json#lib/json/common.rb:1102 +module JSON::GeneratorMethods + # call-seq: to_json(*) + # + # Converts this object into a JSON string. + # If this object doesn't directly maps to a JSON native type, + # first convert it to a string (calling #to_s), then converts + # it to a JSON string, and returns the result. + # This is a fallback, if no special method #to_json was defined for some object. + # + # pkg:gem/json#lib/json/common.rb:1110 + def to_json(state = T.unsafe(nil), *_arg1); end +end + +# pkg:gem/json#lib/json/generic_object.rb:9 class JSON::GenericObject < ::OpenStruct - # source://json//lib/json/generic_object.rb#67 + # pkg:gem/json#lib/json/generic_object.rb:59 def as_json(*_arg0); end - # source://json//lib/json/generic_object.rb#51 + # pkg:gem/json#lib/json/generic_object.rb:51 def to_hash; end - # source://json//lib/json/generic_object.rb#71 + # pkg:gem/json#lib/json/generic_object.rb:63 def to_json(*a); end - # source://json//lib/json/generic_object.rb#63 + # pkg:gem/json#lib/json/generic_object.rb:55 def |(other); end class << self - # source://json//lib/json/generic_object.rb#45 + # pkg:gem/json#lib/json/generic_object.rb:11 + def [](*_arg0); end + + # pkg:gem/json#lib/json/generic_object.rb:45 def dump(obj, *args); end - # source://json//lib/json/generic_object.rb#25 + # pkg:gem/json#lib/json/generic_object.rb:25 def from_hash(object); end - # Sets the attribute json_creatable - # - # @param value the value to set the attribute json_creatable to. - # - # source://json//lib/json/generic_object.rb#17 + # pkg:gem/json#lib/json/generic_object.rb:17 def json_creatable=(_arg0); end - # @return [Boolean] - # - # source://json//lib/json/generic_object.rb#13 + # pkg:gem/json#lib/json/generic_object.rb:13 def json_creatable?; end - # source://json//lib/json/generic_object.rb#19 + # pkg:gem/json#lib/json/generic_object.rb:19 def json_create(data); end - # source://json//lib/json/generic_object.rb#40 + # pkg:gem/json#lib/json/generic_object.rb:40 def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end end end -# The base exception for JSON errors. +# pkg:gem/json#lib/json/common.rb:358 +JSON::PARSE_L_OPTIONS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/json#lib/json/common.rb:471 +JSON::PRETTY_GENERATE_OPTIONS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/json#lib/json/common.rb:152 +JSON::Parser = JSON::Ext::Parser + +# This exception is raised if a parser error occurs. # -# source://json//lib/json/common.rb#141 -class JSON::JSONError < ::StandardError - class << self - # source://json//lib/json/common.rb#142 - def wrap(exception); end - end +# pkg:gem/json#lib/json/common.rb:250 +class JSON::ParserError < ::JSON::JSONError + # pkg:gem/json#lib/json/common.rb:251 + def column; end + + # pkg:gem/json#lib/json/common.rb:251 + def line; end end -# source://json//lib/json/common.rb#7 -JSON::NOT_SET = T.let(T.unsafe(nil), Object) +# pkg:gem/json#lib/json/common.rb:8 +module JSON::ParserOptions + class << self + # pkg:gem/json#lib/json/common.rb:10 + def prepare(opts); end -# source://json//lib/json/common.rb#39 -JSON::Parser = JSON::Ext::Parser + private -# source://json//lib/json/common.rb#77 -JSON::State = JSON::Ext::Generator::State + # pkg:gem/json#lib/json/common.rb:40 + def array_class_proc(array_class, on_load); end -# For backwards compatibility -# -# source://json//lib/json/common.rb#163 -JSON::UnparserError = JSON::GeneratorError + # TODO: extract :create_additions support to another gem for version 3.0 + # + # pkg:gem/json#lib/json/common.rb:52 + def create_additions_proc(opts); end + + # pkg:gem/json#lib/json/common.rb:95 + def create_additions_warning; end -# source://json//lib/json/common.rb#653 + # pkg:gem/json#lib/json/common.rb:29 + def object_class_proc(object_class, on_load); end + end +end + +# pkg:gem/json#lib/json/common.rb:173 +JSON::State = JSON::Ext::Generator::State + +# pkg:gem/json#lib/json/common.rb:1127 module Kernel private @@ -1544,18 +2216,25 @@ module Kernel # The _opts_ argument is passed through to generate/parse respectively. See # generate and parse for their documentation. # - # source://json//lib/json/common.rb#680 - def JSON(object, *args); end + # pkg:gem/json#lib/json/common.rb:1166 + def JSON(object, opts = T.unsafe(nil)); end # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in # one line. # - # source://json//lib/json/common.rb#658 + # pkg:gem/json#lib/json/common.rb:1132 def j(*objs); end # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with # indentation and over many lines. # - # source://json//lib/json/common.rb#667 + # pkg:gem/json#lib/json/common.rb:1147 def jj(*objs); end end + +# pkg:gem/json#lib/json/common.rb:1171 +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + include ::JSON::GeneratorMethods +end diff --git a/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi b/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi deleted file mode 100644 index f6b1d8ed6..000000000 --- a/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +++ /dev/null @@ -1,14237 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `language_server-protocol` gem. -# Please instead update this file by running `bin/tapioca gem language_server-protocol`. - -# source://language_server-protocol//lib/language_server/protocol/version.rb#1 -module LanguageServer; end - -# source://language_server-protocol//lib/language_server/protocol/version.rb#2 -module LanguageServer::Protocol; end - -# source://language_server-protocol//lib/language_server/protocol/constant.rb#3 -module LanguageServer::Protocol::Constant; end - -# The kind of a code action. -# -# Kinds are a hierarchical list of identifiers separated by `.`, -# e.g. `"refactor.extract.function"`. -# -# The set of kinds is open and client needs to announce the kinds it supports -# to the server during initialization. -# A set of predefined code action kinds. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#14 -module LanguageServer::Protocol::Constant::CodeActionKind; end - -# Empty kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#18 -LanguageServer::Protocol::Constant::CodeActionKind::EMPTY = T.let(T.unsafe(nil), String) - -# Base kind for quickfix actions: 'quickfix'. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#22 -LanguageServer::Protocol::Constant::CodeActionKind::QUICK_FIX = T.let(T.unsafe(nil), String) - -# Base kind for refactoring actions: 'refactor'. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#26 -LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR = T.let(T.unsafe(nil), String) - -# Base kind for refactoring extraction actions: 'refactor.extract'. -# -# Example extract actions: -# -# - Extract method -# - Extract function -# - Extract variable -# - Extract interface from class -# - ... -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#38 -LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_EXTRACT = T.let(T.unsafe(nil), String) - -# Base kind for refactoring inline actions: 'refactor.inline'. -# -# Example inline actions: -# -# - Inline function -# - Inline variable -# - Inline constant -# - ... -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#49 -LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_INLINE = T.let(T.unsafe(nil), String) - -# Base kind for refactoring rewrite actions: 'refactor.rewrite'. -# -# Example rewrite actions: -# -# - Convert JavaScript function to class -# - Add or remove parameter -# - Encapsulate field -# - Make method static -# - Move method to base class -# - ... -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#62 -LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_REWRITE = T.let(T.unsafe(nil), String) - -# Base kind for source actions: `source`. -# -# Source code actions apply to the entire file. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#68 -LanguageServer::Protocol::Constant::CodeActionKind::SOURCE = T.let(T.unsafe(nil), String) - -# Base kind for a 'fix all' source action: `source.fixAll`. -# -# 'Fix all' actions automatically fix errors that have a clear fix that -# do not require user input. They should not suppress errors or perform -# unsafe fixes such as generating new types or classes. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#81 -LanguageServer::Protocol::Constant::CodeActionKind::SOURCE_FIX_ALL = T.let(T.unsafe(nil), String) - -# Base kind for an organize imports source action: -# `source.organizeImports`. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#73 -LanguageServer::Protocol::Constant::CodeActionKind::SOURCE_ORGANIZE_IMPORTS = T.let(T.unsafe(nil), String) - -# The reason why code actions were requested. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#7 -module LanguageServer::Protocol::Constant::CodeActionTriggerKind; end - -# Code actions were requested automatically. -# -# This typically happens when current selection in a file changes, but can -# also be triggered when file content changes. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#18 -LanguageServer::Protocol::Constant::CodeActionTriggerKind::AUTOMATIC = T.let(T.unsafe(nil), Integer) - -# Code actions were explicitly requested by the user or by an extension. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#11 -LanguageServer::Protocol::Constant::CodeActionTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) - -# The kind of a completion entry. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#7 -module LanguageServer::Protocol::Constant::CompletionItemKind; end - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#14 -LanguageServer::Protocol::Constant::CompletionItemKind::CLASS = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#23 -LanguageServer::Protocol::Constant::CompletionItemKind::COLOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#28 -LanguageServer::Protocol::Constant::CompletionItemKind::CONSTANT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#11 -LanguageServer::Protocol::Constant::CompletionItemKind::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#20 -LanguageServer::Protocol::Constant::CompletionItemKind::ENUM = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#27 -LanguageServer::Protocol::Constant::CompletionItemKind::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#30 -LanguageServer::Protocol::Constant::CompletionItemKind::EVENT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#12 -LanguageServer::Protocol::Constant::CompletionItemKind::FIELD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#24 -LanguageServer::Protocol::Constant::CompletionItemKind::FILE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#26 -LanguageServer::Protocol::Constant::CompletionItemKind::FOLDER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#10 -LanguageServer::Protocol::Constant::CompletionItemKind::FUNCTION = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#15 -LanguageServer::Protocol::Constant::CompletionItemKind::INTERFACE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#21 -LanguageServer::Protocol::Constant::CompletionItemKind::KEYWORD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#9 -LanguageServer::Protocol::Constant::CompletionItemKind::METHOD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#16 -LanguageServer::Protocol::Constant::CompletionItemKind::MODULE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#31 -LanguageServer::Protocol::Constant::CompletionItemKind::OPERATOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#17 -LanguageServer::Protocol::Constant::CompletionItemKind::PROPERTY = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#25 -LanguageServer::Protocol::Constant::CompletionItemKind::REFERENCE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#22 -LanguageServer::Protocol::Constant::CompletionItemKind::SNIPPET = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#29 -LanguageServer::Protocol::Constant::CompletionItemKind::STRUCT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#8 -LanguageServer::Protocol::Constant::CompletionItemKind::TEXT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#32 -LanguageServer::Protocol::Constant::CompletionItemKind::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#18 -LanguageServer::Protocol::Constant::CompletionItemKind::UNIT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#19 -LanguageServer::Protocol::Constant::CompletionItemKind::VALUE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#13 -LanguageServer::Protocol::Constant::CompletionItemKind::VARIABLE = T.let(T.unsafe(nil), Integer) - -# Completion item tags are extra annotations that tweak the rendering of a -# completion item. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_tag.rb#8 -module LanguageServer::Protocol::Constant::CompletionItemTag; end - -# Render a completion as obsolete, usually using a strike-out. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_tag.rb#12 -LanguageServer::Protocol::Constant::CompletionItemTag::DEPRECATED = T.let(T.unsafe(nil), Integer) - -# How a completion was triggered -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#7 -module LanguageServer::Protocol::Constant::CompletionTriggerKind; end - -# Completion was triggered by typing an identifier (24x7 code -# complete), manual invocation (e.g Ctrl+Space) or via API. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#12 -LanguageServer::Protocol::Constant::CompletionTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) - -# Completion was triggered by a trigger character specified by -# the `triggerCharacters` properties of the -# `CompletionRegistrationOptions`. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#18 -LanguageServer::Protocol::Constant::CompletionTriggerKind::TRIGGER_CHARACTER = T.let(T.unsafe(nil), Integer) - -# Completion was re-triggered as the current completion list is incomplete. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#22 -LanguageServer::Protocol::Constant::CompletionTriggerKind::TRIGGER_FOR_INCOMPLETE_COMPLETIONS = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#4 -module LanguageServer::Protocol::Constant::DiagnosticSeverity; end - -# Reports an error. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#8 -LanguageServer::Protocol::Constant::DiagnosticSeverity::ERROR = T.let(T.unsafe(nil), Integer) - -# Reports a hint. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#20 -LanguageServer::Protocol::Constant::DiagnosticSeverity::HINT = T.let(T.unsafe(nil), Integer) - -# Reports an information. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#16 -LanguageServer::Protocol::Constant::DiagnosticSeverity::INFORMATION = T.let(T.unsafe(nil), Integer) - -# Reports a warning. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#12 -LanguageServer::Protocol::Constant::DiagnosticSeverity::WARNING = T.let(T.unsafe(nil), Integer) - -# The diagnostic tags. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#7 -module LanguageServer::Protocol::Constant::DiagnosticTag; end - -# Deprecated or obsolete code. -# -# Clients are allowed to rendered diagnostics with this tag strike through. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#20 -LanguageServer::Protocol::Constant::DiagnosticTag::DEPRECATED = T.let(T.unsafe(nil), Integer) - -# Unused or unnecessary code. -# -# Clients are allowed to render diagnostics with this tag faded out -# instead of having an error squiggle. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#14 -LanguageServer::Protocol::Constant::DiagnosticTag::UNNECESSARY = T.let(T.unsafe(nil), Integer) - -# The document diagnostic report kinds. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#7 -module LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind; end - -# A diagnostic report with a full -# set of problems. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#12 -LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind::FULL = T.let(T.unsafe(nil), String) - -# A report indicating that the last -# returned report is still accurate. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#17 -LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind::UNCHANGED = T.let(T.unsafe(nil), String) - -# A document highlight kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#7 -module LanguageServer::Protocol::Constant::DocumentHighlightKind; end - -# Read-access of a symbol, like reading a variable. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#15 -LanguageServer::Protocol::Constant::DocumentHighlightKind::READ = T.let(T.unsafe(nil), Integer) - -# A textual occurrence. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#11 -LanguageServer::Protocol::Constant::DocumentHighlightKind::TEXT = T.let(T.unsafe(nil), Integer) - -# Write-access of a symbol, like writing to a variable. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#19 -LanguageServer::Protocol::Constant::DocumentHighlightKind::WRITE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#4 -module LanguageServer::Protocol::Constant::ErrorCodes; end - -# The server detected that the content of a document got -# modified outside normal conditions. A server should -# NOT send this error code if it detects a content change -# in it unprocessed messages. The result even computed -# on an older state might still be useful for the client. -# -# If a client decides that a result is not of any use anymore -# the client should cancel the request. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#59 -LanguageServer::Protocol::Constant::ErrorCodes::CONTENT_MODIFIED = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#9 -LanguageServer::Protocol::Constant::ErrorCodes::INTERNAL_ERROR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#8 -LanguageServer::Protocol::Constant::ErrorCodes::INVALID_PARAMS = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#6 -LanguageServer::Protocol::Constant::ErrorCodes::INVALID_REQUEST = T.let(T.unsafe(nil), Integer) - -# This is the end range of JSON-RPC reserved error codes. -# It doesn't denote a real error code. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#29 -LanguageServer::Protocol::Constant::ErrorCodes::JSONRPC_RESERVED_ERROR_RANGE_END = T.let(T.unsafe(nil), Integer) - -# This is the start range of JSON-RPC reserved error codes. -# It doesn't denote a real error code. No LSP error codes should -# be defined between the start and end range. For backwards -# compatibility the `ServerNotInitialized` and the `UnknownErrorCode` -# are left in the range. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#17 -LanguageServer::Protocol::Constant::ErrorCodes::JSONRPC_RESERVED_ERROR_RANGE_START = T.let(T.unsafe(nil), Integer) - -# This is the end range of LSP reserved error codes. -# It doesn't denote a real error code. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#69 -LanguageServer::Protocol::Constant::ErrorCodes::LSP_RESERVED_ERROR_RANGE_END = T.let(T.unsafe(nil), Integer) - -# This is the start range of LSP reserved error codes. -# It doesn't denote a real error code. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#35 -LanguageServer::Protocol::Constant::ErrorCodes::LSP_RESERVED_ERROR_RANGE_START = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#7 -LanguageServer::Protocol::Constant::ErrorCodes::METHOD_NOT_FOUND = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#5 -LanguageServer::Protocol::Constant::ErrorCodes::PARSE_ERROR = T.let(T.unsafe(nil), Integer) - -# The client has canceled a request and a server as detected -# the cancel. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#64 -LanguageServer::Protocol::Constant::ErrorCodes::REQUEST_CANCELLED = T.let(T.unsafe(nil), Integer) - -# A request failed but it was syntactically correct, e.g the -# method name was known and the parameters were valid. The error -# message should contain human readable information about why -# the request failed. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#42 -LanguageServer::Protocol::Constant::ErrorCodes::REQUEST_FAILED = T.let(T.unsafe(nil), Integer) - -# The server cancelled the request. This error code should -# only be used for requests that explicitly support being -# server cancellable. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#48 -LanguageServer::Protocol::Constant::ErrorCodes::SERVER_CANCELLED = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#30 -LanguageServer::Protocol::Constant::ErrorCodes::SERVER_ERROR_END = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#18 -LanguageServer::Protocol::Constant::ErrorCodes::SERVER_ERROR_START = T.let(T.unsafe(nil), Integer) - -# Error code indicating that a server received a notification or -# request before the server has received the `initialize` request. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#23 -LanguageServer::Protocol::Constant::ErrorCodes::SERVER_NOT_INITIALIZED = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#24 -LanguageServer::Protocol::Constant::ErrorCodes::UNKNOWN_ERROR_CODE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#4 -module LanguageServer::Protocol::Constant::FailureHandlingKind; end - -# Applying the workspace change is simply aborted if one of the changes -# provided fails. All operations executed before the failing operation -# stay executed. -# -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#10 -LanguageServer::Protocol::Constant::FailureHandlingKind::ABORT = T.let(T.unsafe(nil), String) - -# If the workspace edit contains only textual file changes they are -# executed transactional. If resource changes (create, rename or delete -# file) are part of the change the failure handling strategy is abort. -# -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#21 -LanguageServer::Protocol::Constant::FailureHandlingKind::TEXT_ONLY_TRANSACTIONAL = T.let(T.unsafe(nil), String) - -# All operations are executed transactional. That means they either all -# succeed or no changes at all are applied to the workspace. -# -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#15 -LanguageServer::Protocol::Constant::FailureHandlingKind::TRANSACTIONAL = T.let(T.unsafe(nil), String) - -# The client tries to undo the operations already executed. But there is no -# guarantee that this is succeeding. -# -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#26 -LanguageServer::Protocol::Constant::FailureHandlingKind::UNDO = T.let(T.unsafe(nil), String) - -# The file event type. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#7 -module LanguageServer::Protocol::Constant::FileChangeType; end - -# The file got changed. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#15 -LanguageServer::Protocol::Constant::FileChangeType::CHANGED = T.let(T.unsafe(nil), Integer) - -# The file got created. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#11 -LanguageServer::Protocol::Constant::FileChangeType::CREATED = T.let(T.unsafe(nil), Integer) - -# The file got deleted. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#19 -LanguageServer::Protocol::Constant::FileChangeType::DELETED = T.let(T.unsafe(nil), Integer) - -# A pattern kind describing if a glob pattern matches a file a folder or -# both. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#8 -module LanguageServer::Protocol::Constant::FileOperationPatternKind; end - -# The pattern matches a file only. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#12 -LanguageServer::Protocol::Constant::FileOperationPatternKind::FILE = T.let(T.unsafe(nil), String) - -# The pattern matches a folder only. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#16 -LanguageServer::Protocol::Constant::FileOperationPatternKind::FOLDER = T.let(T.unsafe(nil), String) - -# A set of predefined range kinds. -# The type is a string since the value set is extensible -# -# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#8 -module LanguageServer::Protocol::Constant::FoldingRangeKind; end - -# Folding range for a comment -# -# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#12 -LanguageServer::Protocol::Constant::FoldingRangeKind::COMMENT = T.let(T.unsafe(nil), String) - -# Folding range for imports or includes -# -# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#16 -LanguageServer::Protocol::Constant::FoldingRangeKind::IMPORTS = T.let(T.unsafe(nil), String) - -# Folding range for a region (e.g. `#region`) -# -# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#20 -LanguageServer::Protocol::Constant::FoldingRangeKind::REGION = T.let(T.unsafe(nil), String) - -# Known error codes for an `InitializeErrorCodes`; -# -# source://language_server-protocol//lib/language_server/protocol/constant/initialize_error_codes.rb#7 -module LanguageServer::Protocol::Constant::InitializeErrorCodes; end - -# If the protocol version provided by the client can't be handled by -# the server. -# -# source://language_server-protocol//lib/language_server/protocol/constant/initialize_error_codes.rb#12 -LanguageServer::Protocol::Constant::InitializeErrorCodes::UNKNOWN_PROTOCOL_VERSION = T.let(T.unsafe(nil), Integer) - -# Inlay hint kinds. -# -# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#7 -module LanguageServer::Protocol::Constant::InlayHintKind; end - -# An inlay hint that is for a parameter. -# -# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#15 -LanguageServer::Protocol::Constant::InlayHintKind::PARAMETER = T.let(T.unsafe(nil), Integer) - -# An inlay hint that for a type annotation. -# -# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#11 -LanguageServer::Protocol::Constant::InlayHintKind::TYPE = T.let(T.unsafe(nil), Integer) - -# Defines whether the insert text in a completion item should be interpreted as -# plain text or a snippet. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#8 -module LanguageServer::Protocol::Constant::InsertTextFormat; end - -# The primary text to be inserted is treated as a plain string. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#12 -LanguageServer::Protocol::Constant::InsertTextFormat::PLAIN_TEXT = T.let(T.unsafe(nil), Integer) - -# The primary text to be inserted is treated as a snippet. -# -# A snippet can define tab stops and placeholders with `$1`, `$2` -# and `${3:foo}`. `$0` defines the final tab stop, it defaults to -# the end of the snippet. Placeholders with equal identifiers are linked, -# that is typing in one will update others too. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#21 -LanguageServer::Protocol::Constant::InsertTextFormat::SNIPPET = T.let(T.unsafe(nil), Integer) - -# How whitespace and indentation is handled during completion -# item insertion. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#8 -module LanguageServer::Protocol::Constant::InsertTextMode; end - -# The editor adjusts leading whitespace of new lines so that -# they match the indentation up to the cursor of the line for -# which the item is accepted. -# -# Consider a line like this: <2tabs><3tabs>foo. Accepting a -# multi line completion item is indented using 2 tabs and all -# following lines inserted will be indented using 2 tabs as well. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#26 -LanguageServer::Protocol::Constant::InsertTextMode::ADJUST_INDENTATION = T.let(T.unsafe(nil), Integer) - -# The insertion or replace strings is taken as it is. If the -# value is multi line the lines below the cursor will be -# inserted using the indentation defined in the string value. -# The client will not apply any kind of adjustments to the -# string. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#16 -LanguageServer::Protocol::Constant::InsertTextMode::AS_IS = T.let(T.unsafe(nil), Integer) - -# Describes the content type that a client supports in various -# result literals like `Hover`, `ParameterInfo` or `CompletionItem`. -# -# Please note that `MarkupKinds` must not start with a `$`. This kinds -# are reserved for internal usage. -# -# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#11 -module LanguageServer::Protocol::Constant::MarkupKind; end - -# Markdown is supported as a content format -# -# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#19 -LanguageServer::Protocol::Constant::MarkupKind::MARKDOWN = T.let(T.unsafe(nil), String) - -# Plain text is supported as a content format -# -# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#15 -LanguageServer::Protocol::Constant::MarkupKind::PLAIN_TEXT = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#4 -module LanguageServer::Protocol::Constant::MessageType; end - -# An error message. -# -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#8 -LanguageServer::Protocol::Constant::MessageType::ERROR = T.let(T.unsafe(nil), Integer) - -# An information message. -# -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#16 -LanguageServer::Protocol::Constant::MessageType::INFO = T.let(T.unsafe(nil), Integer) - -# A log message. -# -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#20 -LanguageServer::Protocol::Constant::MessageType::LOG = T.let(T.unsafe(nil), Integer) - -# A warning message. -# -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#12 -LanguageServer::Protocol::Constant::MessageType::WARNING = T.let(T.unsafe(nil), Integer) - -# The moniker kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#7 -module LanguageServer::Protocol::Constant::MonikerKind; end - -# The moniker represents a symbol that is exported from a project -# -# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#15 -LanguageServer::Protocol::Constant::MonikerKind::EXPORT = T.let(T.unsafe(nil), String) - -# The moniker represent a symbol that is imported into a project -# -# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#11 -LanguageServer::Protocol::Constant::MonikerKind::IMPORT = T.let(T.unsafe(nil), String) - -# The moniker represents a symbol that is local to a project (e.g. a local -# variable of a function, a class not visible outside the project, ...) -# -# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#20 -LanguageServer::Protocol::Constant::MonikerKind::LOCAL = T.let(T.unsafe(nil), String) - -# A notebook cell kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#7 -module LanguageServer::Protocol::Constant::NotebookCellKind; end - -# A code-cell is source code. -# -# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#15 -LanguageServer::Protocol::Constant::NotebookCellKind::CODE = T.let(T.unsafe(nil), Integer) - -# A markup-cell is formatted source that is used for display. -# -# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#11 -LanguageServer::Protocol::Constant::NotebookCellKind::MARKUP = T.let(T.unsafe(nil), Integer) - -# A type indicating how positions are encoded, -# specifically what column offsets mean. -# A set of predefined position encoding kinds. -# -# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#9 -module LanguageServer::Protocol::Constant::PositionEncodingKind; end - -# Character offsets count UTF-16 code units. -# -# This is the default and must always be supported -# by servers -# -# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#20 -LanguageServer::Protocol::Constant::PositionEncodingKind::UTF16 = T.let(T.unsafe(nil), String) - -# Character offsets count UTF-32 code units. -# -# Implementation note: these are the same as Unicode code points, -# so this `PositionEncodingKind` may also be used for an -# encoding-agnostic representation of character offsets. -# -# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#28 -LanguageServer::Protocol::Constant::PositionEncodingKind::UTF32 = T.let(T.unsafe(nil), String) - -# Character offsets count UTF-8 code units (e.g bytes). -# -# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#13 -LanguageServer::Protocol::Constant::PositionEncodingKind::UTF8 = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/prepare_support_default_behavior.rb#4 -module LanguageServer::Protocol::Constant::PrepareSupportDefaultBehavior; end - -# The client's default behavior is to select the identifier -# according to the language's syntax rule. -# -# source://language_server-protocol//lib/language_server/protocol/constant/prepare_support_default_behavior.rb#9 -LanguageServer::Protocol::Constant::PrepareSupportDefaultBehavior::IDENTIFIER = T.let(T.unsafe(nil), Integer) - -# The kind of resource operations supported by the client. -# -# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#7 -module LanguageServer::Protocol::Constant::ResourceOperationKind; end - -# Supports creating new files and folders. -# -# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#11 -LanguageServer::Protocol::Constant::ResourceOperationKind::CREATE = T.let(T.unsafe(nil), String) - -# Supports deleting existing files and folders. -# -# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#19 -LanguageServer::Protocol::Constant::ResourceOperationKind::DELETE = T.let(T.unsafe(nil), String) - -# Supports renaming existing files and folders. -# -# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#15 -LanguageServer::Protocol::Constant::ResourceOperationKind::RENAME = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#4 -module LanguageServer::Protocol::Constant::SemanticTokenModifiers; end - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#10 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::ABSTRACT = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#11 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::ASYNC = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#5 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DECLARATION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#14 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEFAULT_LIBRARY = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#6 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEFINITION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#9 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEPRECATED = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#13 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DOCUMENTATION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#12 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::MODIFICATION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#7 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::READONLY = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#8 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::STATIC = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#4 -module LanguageServer::Protocol::Constant::SemanticTokenTypes; end - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#11 -LanguageServer::Protocol::Constant::SemanticTokenTypes::CLASS = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#26 -LanguageServer::Protocol::Constant::SemanticTokenTypes::COMMENT = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#31 -LanguageServer::Protocol::Constant::SemanticTokenTypes::DECORATOR = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#12 -LanguageServer::Protocol::Constant::SemanticTokenTypes::ENUM = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#19 -LanguageServer::Protocol::Constant::SemanticTokenTypes::ENUM_MEMBER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#20 -LanguageServer::Protocol::Constant::SemanticTokenTypes::EVENT = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#21 -LanguageServer::Protocol::Constant::SemanticTokenTypes::FUNCTION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#13 -LanguageServer::Protocol::Constant::SemanticTokenTypes::INTERFACE = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#24 -LanguageServer::Protocol::Constant::SemanticTokenTypes::KEYWORD = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#23 -LanguageServer::Protocol::Constant::SemanticTokenTypes::MACRO = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#22 -LanguageServer::Protocol::Constant::SemanticTokenTypes::METHOD = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#25 -LanguageServer::Protocol::Constant::SemanticTokenTypes::MODIFIER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#5 -LanguageServer::Protocol::Constant::SemanticTokenTypes::NAMESPACE = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#28 -LanguageServer::Protocol::Constant::SemanticTokenTypes::NUMBER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#30 -LanguageServer::Protocol::Constant::SemanticTokenTypes::OPERATOR = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#16 -LanguageServer::Protocol::Constant::SemanticTokenTypes::PARAMETER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#18 -LanguageServer::Protocol::Constant::SemanticTokenTypes::PROPERTY = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#29 -LanguageServer::Protocol::Constant::SemanticTokenTypes::REGEXP = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#27 -LanguageServer::Protocol::Constant::SemanticTokenTypes::STRING = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#14 -LanguageServer::Protocol::Constant::SemanticTokenTypes::STRUCT = T.let(T.unsafe(nil), String) - -# Represents a generic type. Acts as a fallback for types which -# can't be mapped to a specific type like class or enum. -# -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#10 -LanguageServer::Protocol::Constant::SemanticTokenTypes::TYPE = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#15 -LanguageServer::Protocol::Constant::SemanticTokenTypes::TYPE_PARAMETER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#17 -LanguageServer::Protocol::Constant::SemanticTokenTypes::VARIABLE = T.let(T.unsafe(nil), String) - -# How a signature help was triggered. -# -# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#7 -module LanguageServer::Protocol::Constant::SignatureHelpTriggerKind; end - -# Signature help was triggered by the cursor moving or by the document -# content changing. -# -# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#20 -LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::CONTENT_CHANGE = T.let(T.unsafe(nil), Integer) - -# Signature help was invoked manually by the user or by a command. -# -# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#11 -LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) - -# Signature help was triggered by a trigger character. -# -# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#15 -LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::TRIGGER_CHARACTER = T.let(T.unsafe(nil), Integer) - -# A symbol kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#7 -module LanguageServer::Protocol::Constant::SymbolKind; end - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#25 -LanguageServer::Protocol::Constant::SymbolKind::ARRAY = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#24 -LanguageServer::Protocol::Constant::SymbolKind::BOOLEAN = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#12 -LanguageServer::Protocol::Constant::SymbolKind::CLASS = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#21 -LanguageServer::Protocol::Constant::SymbolKind::CONSTANT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#16 -LanguageServer::Protocol::Constant::SymbolKind::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#17 -LanguageServer::Protocol::Constant::SymbolKind::ENUM = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#29 -LanguageServer::Protocol::Constant::SymbolKind::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#31 -LanguageServer::Protocol::Constant::SymbolKind::EVENT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#15 -LanguageServer::Protocol::Constant::SymbolKind::FIELD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#8 -LanguageServer::Protocol::Constant::SymbolKind::FILE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#19 -LanguageServer::Protocol::Constant::SymbolKind::FUNCTION = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#18 -LanguageServer::Protocol::Constant::SymbolKind::INTERFACE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#27 -LanguageServer::Protocol::Constant::SymbolKind::KEY = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#13 -LanguageServer::Protocol::Constant::SymbolKind::METHOD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#9 -LanguageServer::Protocol::Constant::SymbolKind::MODULE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#10 -LanguageServer::Protocol::Constant::SymbolKind::NAMESPACE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#28 -LanguageServer::Protocol::Constant::SymbolKind::NULL = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#23 -LanguageServer::Protocol::Constant::SymbolKind::NUMBER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#26 -LanguageServer::Protocol::Constant::SymbolKind::OBJECT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#32 -LanguageServer::Protocol::Constant::SymbolKind::OPERATOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#11 -LanguageServer::Protocol::Constant::SymbolKind::PACKAGE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#14 -LanguageServer::Protocol::Constant::SymbolKind::PROPERTY = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#22 -LanguageServer::Protocol::Constant::SymbolKind::STRING = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#30 -LanguageServer::Protocol::Constant::SymbolKind::STRUCT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#33 -LanguageServer::Protocol::Constant::SymbolKind::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#20 -LanguageServer::Protocol::Constant::SymbolKind::VARIABLE = T.let(T.unsafe(nil), Integer) - -# Symbol tags are extra annotations that tweak the rendering of a symbol. -# -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_tag.rb#7 -module LanguageServer::Protocol::Constant::SymbolTag; end - -# Render a symbol as obsolete, usually using a strike-out. -# -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_tag.rb#11 -LanguageServer::Protocol::Constant::SymbolTag::DEPRECATED = T.let(T.unsafe(nil), Integer) - -# Represents reasons why a text document is saved. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#7 -module LanguageServer::Protocol::Constant::TextDocumentSaveReason; end - -# Automatic after a delay. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#16 -LanguageServer::Protocol::Constant::TextDocumentSaveReason::AFTER_DELAY = T.let(T.unsafe(nil), Integer) - -# When the editor lost focus. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#20 -LanguageServer::Protocol::Constant::TextDocumentSaveReason::FOCUS_OUT = T.let(T.unsafe(nil), Integer) - -# Manually triggered, e.g. by the user pressing save, by starting -# debugging, or by an API call. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#12 -LanguageServer::Protocol::Constant::TextDocumentSaveReason::MANUAL = T.let(T.unsafe(nil), Integer) - -# Defines how the host (editor) should sync document changes to the language -# server. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#8 -module LanguageServer::Protocol::Constant::TextDocumentSyncKind; end - -# Documents are synced by always sending the full content -# of the document. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#17 -LanguageServer::Protocol::Constant::TextDocumentSyncKind::FULL = T.let(T.unsafe(nil), Integer) - -# Documents are synced by sending the full content on open. -# After that only incremental updates to the document are -# sent. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#23 -LanguageServer::Protocol::Constant::TextDocumentSyncKind::INCREMENTAL = T.let(T.unsafe(nil), Integer) - -# Documents should not be synced at all. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#12 -LanguageServer::Protocol::Constant::TextDocumentSyncKind::NONE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/token_format.rb#4 -module LanguageServer::Protocol::Constant::TokenFormat; end - -# source://language_server-protocol//lib/language_server/protocol/constant/token_format.rb#5 -LanguageServer::Protocol::Constant::TokenFormat::RELATIVE = T.let(T.unsafe(nil), String) - -# Moniker uniqueness level to define scope of the moniker. -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#7 -module LanguageServer::Protocol::Constant::UniquenessLevel; end - -# The moniker is only unique inside a document -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#11 -LanguageServer::Protocol::Constant::UniquenessLevel::DOCUMENT = T.let(T.unsafe(nil), String) - -# The moniker is globally unique -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#27 -LanguageServer::Protocol::Constant::UniquenessLevel::GLOBAL = T.let(T.unsafe(nil), String) - -# The moniker is unique inside the group to which a project belongs -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#19 -LanguageServer::Protocol::Constant::UniquenessLevel::GROUP = T.let(T.unsafe(nil), String) - -# The moniker is unique inside a project for which a dump got created -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#15 -LanguageServer::Protocol::Constant::UniquenessLevel::PROJECT = T.let(T.unsafe(nil), String) - -# The moniker is unique inside the moniker scheme. -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#23 -LanguageServer::Protocol::Constant::UniquenessLevel::SCHEME = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#4 -module LanguageServer::Protocol::Constant::WatchKind; end - -# Interested in change events -# -# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#12 -LanguageServer::Protocol::Constant::WatchKind::CHANGE = T.let(T.unsafe(nil), Integer) - -# Interested in create events. -# -# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#8 -LanguageServer::Protocol::Constant::WatchKind::CREATE = T.let(T.unsafe(nil), Integer) - -# Interested in delete events -# -# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#16 -LanguageServer::Protocol::Constant::WatchKind::DELETE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/interface.rb#3 -module LanguageServer::Protocol::Interface; end - -# A special text edit with an additional change annotation. -# -# source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#7 -class LanguageServer::Protocol::Interface::AnnotatedTextEdit - # @return [AnnotatedTextEdit] a new instance of AnnotatedTextEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#8 - def initialize(range:, new_text:, annotation_id:); end - - # The actual annotation identifier. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#40 - def annotation_id; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#44 - def attributes; end - - # The string to be inserted. For delete operations use an - # empty string. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#32 - def new_text; end - - # The range of the text document to be manipulated. To insert - # text into a document create a range where start === end. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#23 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#4 -class LanguageServer::Protocol::Interface::ApplyWorkspaceEditParams - # @return [ApplyWorkspaceEditParams] a new instance of ApplyWorkspaceEditParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#5 - def initialize(edit:, label: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#32 - def attributes; end - - # The edits to apply. - # - # @return [WorkspaceEdit] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#28 - def edit; end - - # An optional label of the workspace edit. This label is - # presented in the user interface for example on an undo - # stack to undo the workspace edit. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#20 - def label; end - - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#4 -class LanguageServer::Protocol::Interface::ApplyWorkspaceEditResult - # @return [ApplyWorkspaceEditResult] a new instance of ApplyWorkspaceEditResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#5 - def initialize(applied:, failure_reason: T.unsafe(nil), failed_change: T.unsafe(nil)); end - - # Indicates whether the edit was applied or not. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#19 - def applied; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#44 - def attributes; end - - # Depending on the client's failure handling strategy `failedChange` - # might contain the index of the change that failed. This property is - # only available if the client signals a `failureHandling` strategy - # in its client capabilities. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#40 - def failed_change; end - - # An optional textual description for why the edit was not applied. - # This may be used by the server for diagnostic logging or to provide - # a suitable error for a request that triggered the edit. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#29 - def failure_reason; end - - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyClientCapabilities - # @return [CallHierarchyClientCapabilities] a new instance of CallHierarchyClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#24 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `(TextDocumentRegistrationOptions & - # StaticRegistrationOptions)` return value for the corresponding server - # capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyIncomingCall - # @return [CallHierarchyIncomingCall] a new instance of CallHierarchyIncomingCall - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#5 - def initialize(from:, from_ranges:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#31 - def attributes; end - - # The item that makes the call. - # - # @return [CallHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#18 - def from; end - - # The ranges at which the calls appear. This is relative to the caller - # denoted by [`this.from`](#CallHierarchyIncomingCall.from). - # - # @return [Range[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#27 - def from_ranges; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyIncomingCallsParams - # @return [CallHierarchyIncomingCallsParams] a new instance of CallHierarchyIncomingCallsParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#5 - def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#37 - def attributes; end - - # @return [CallHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#33 - def item; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#28 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#43 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyItem - # @return [CallHierarchyItem] a new instance of CallHierarchyItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#5 - def initialize(name:, kind:, uri:, range:, selection_range:, tags: T.unsafe(nil), detail: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#88 - def attributes; end - - # A data entry field that is preserved between a call hierarchy prepare and - # incoming calls or outgoing calls requests. - # - # @return [unknown] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#84 - def data; end - - # More detail for this item, e.g. the signature of a function. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#48 - def detail; end - - # The kind of this item. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#32 - def kind; end - - # The name of this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#24 - def name; end - - # The range enclosing this symbol not including leading/trailing whitespace - # but everything else, e.g. comments and code. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#65 - def range; end - - # The range that should be selected and revealed when this symbol is being - # picked, e.g. the name of a function. Must be contained by the - # [`range`](#CallHierarchyItem.range). - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#75 - def selection_range; end - - # Tags for this item. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#40 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#90 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#94 - def to_json(*args); end - - # The resource identifier of this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#56 - def uri; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyOptions - # @return [CallHierarchyOptions] a new instance of CallHierarchyOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyOutgoingCall - # @return [CallHierarchyOutgoingCall] a new instance of CallHierarchyOutgoingCall - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#5 - def initialize(to:, from_ranges:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#31 - def attributes; end - - # The range at which this item is called. This is the range relative to - # the caller, e.g the item passed to `callHierarchy/outgoingCalls` request. - # - # @return [Range[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#27 - def from_ranges; end - - # The item that is called. - # - # @return [CallHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#18 - def to; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyOutgoingCallsParams - # @return [CallHierarchyOutgoingCallsParams] a new instance of CallHierarchyOutgoingCallsParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#5 - def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#37 - def attributes; end - - # @return [CallHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#33 - def item; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#28 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#43 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyPrepareParams - # @return [CallHierarchyPrepareParams] a new instance of CallHierarchyPrepareParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#35 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyRegistrationOptions - # @return [CallHierarchyRegistrationOptions] a new instance of CallHierarchyRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#4 -class LanguageServer::Protocol::Interface::CancelParams - # @return [CancelParams] a new instance of CancelParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#5 - def initialize(id:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#21 - def attributes; end - - # The request id to cancel. - # - # @return [string | number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#17 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#27 - def to_json(*args); end -end - -# Additional information that describes document changes. -# -# source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#7 -class LanguageServer::Protocol::Interface::ChangeAnnotation - # @return [ChangeAnnotation] a new instance of ChangeAnnotation - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#8 - def initialize(label:, needs_confirmation: T.unsafe(nil), description: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#45 - def attributes; end - - # A human-readable string which is rendered less prominent in - # the user interface. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#41 - def description; end - - # A human-readable string describing the actual change. The string - # is rendered prominent in the user interface. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#23 - def label; end - - # A flag which indicates that user confirmation is needed - # before applying the change. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#32 - def needs_confirmation; end - - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#47 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#51 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ClientCapabilities - # @return [ClientCapabilities] a new instance of ClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#5 - def initialize(workspace: T.unsafe(nil), text_document: T.unsafe(nil), notebook_document: T.unsafe(nil), window: T.unsafe(nil), general: T.unsafe(nil), experimental: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#66 - def attributes; end - - # Experimental client capabilities. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#62 - def experimental; end - - # General client capabilities. - # - # @return [{ staleRequestSupport?: { cancel: boolean; retryOnContentModified: string[]; }; regularExpressions?: RegularExpressionsClientCapabilities; markdown?: any; positionEncodings?: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#54 - def general; end - - # Capabilities specific to the notebook document support. - # - # @return [NotebookDocumentClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#38 - def notebook_document; end - - # Text document specific client capabilities. - # - # @return [TextDocumentClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#30 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#68 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#72 - def to_json(*args); end - - # Window specific client capabilities. - # - # @return [{ workDoneProgress?: boolean; showMessage?: ShowMessageRequestClientCapabilities; showDocument?: ShowDocumentClientCapabilities; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#46 - def window; end - - # Workspace specific client capabilities. - # - # @return [{ applyEdit?: boolean; workspaceEdit?: WorkspaceEditClientCapabilities; didChangeConfiguration?: DidChangeConfigurationClientCapabilities; ... 10 more ...; diagnostics?: DiagnosticWorkspaceClientCapabilities; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#22 - def workspace; end -end - -# A code action represents a change that can be performed in code, e.g. to fix -# a problem or to refactor code. -# -# A CodeAction must set either `edit` and/or a `command`. If both are supplied, -# the `edit` is applied first, then the `command` is executed. -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#11 -class LanguageServer::Protocol::Interface::CodeAction - # @return [CodeAction] a new instance of CodeAction - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#12 - def initialize(title:, kind: T.unsafe(nil), diagnostics: T.unsafe(nil), is_preferred: T.unsafe(nil), disabled: T.unsafe(nil), edit: T.unsafe(nil), command: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#115 - def attributes; end - - # A command this code action executes. If a code action - # provides an edit and a command, first the edit is - # executed and then the command. - # - # @return [Command] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#102 - def command; end - - # A data entry field that is preserved on a code action between - # a `textDocument/codeAction` and a `codeAction/resolve` request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#111 - def data; end - - # The diagnostics that this code action resolves. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#49 - def diagnostics; end - - # Marks that the code action cannot currently be applied. - # - # Clients should follow the following guidelines regarding disabled code - # actions: - # - # - Disabled code actions are not shown in automatic lightbulbs code - # action menus. - # - # - Disabled actions are shown as faded out in the code action menu when - # the user request a more specific type of code action, such as - # refactorings. - # - # - If the user has a keybinding that auto applies a code action and only - # a disabled code actions are returned, the client should show the user - # an error message with `reason` in the editor. - # - # @return [{ reason: string; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#84 - def disabled; end - - # The workspace edit this code action performs. - # - # @return [WorkspaceEdit] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#92 - def edit; end - - # Marks this as a preferred action. Preferred actions are used by the - # `auto fix` command and can be targeted by keybindings. - # - # A quick fix should be marked preferred if it properly addresses the - # underlying error. A refactoring should be marked preferred if it is the - # most reasonable choice of actions to take. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#62 - def is_preferred; end - - # The kind of the code action. - # - # Used to filter code actions. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#41 - def kind; end - - # A short, human-readable, title for this code action. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#31 - def title; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#117 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#121 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CodeActionClientCapabilities - # @return [CodeActionClientCapabilities] a new instance of CodeActionClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), code_action_literal_support: T.unsafe(nil), is_preferred_support: T.unsafe(nil), disabled_support: T.unsafe(nil), data_support: T.unsafe(nil), resolve_support: T.unsafe(nil), honors_change_annotations: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#83 - def attributes; end - - # The client supports code action literals as a valid - # response of the `textDocument/codeAction` request. - # - # @return [{ codeActionKind: { valueSet: string[]; }; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#32 - def code_action_literal_support; end - - # Whether code action supports the `data` property which is - # preserved between a `textDocument/codeAction` and a - # `codeAction/resolve` request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#58 - def data_support; end - - # Whether code action supports the `disabled` property. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#48 - def disabled_support; end - - # Whether code action supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#23 - def dynamic_registration; end - - # Whether the client honors the change annotations in - # text edits and resource operations returned via the - # `CodeAction#edit` property by for example presenting - # the workspace edit in the user interface and asking - # for confirmation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#79 - def honors_change_annotations; end - - # Whether code action supports the `isPreferred` property. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#40 - def is_preferred_support; end - - # Whether the client supports resolving additional code action - # properties via a separate `codeAction/resolve` request. - # - # @return [{ properties: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#67 - def resolve_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#85 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#89 - def to_json(*args); end -end - -# Contains additional diagnostic information about the context in which -# a code action is run. -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#8 -class LanguageServer::Protocol::Interface::CodeActionContext - # @return [CodeActionContext] a new instance of CodeActionContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#9 - def initialize(diagnostics:, only: T.unsafe(nil), trigger_kind: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#51 - def attributes; end - - # An array of diagnostics known on the client side overlapping the range - # provided to the `textDocument/codeAction` request. They are provided so - # that the server knows which errors are currently presented to the user - # for the given range. There is no guarantee that these accurately reflect - # the error state of the resource. The primary parameter - # to compute code actions is the provided range. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#28 - def diagnostics; end - - # Requested kind of actions to return. - # - # Actions not of this kind are filtered out by the client before being - # shown. So servers can omit computing them. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#39 - def only; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#57 - def to_json(*args); end - - # The reason why code actions were requested. - # - # @return [CodeActionTriggerKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#47 - def trigger_kind; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#4 -class LanguageServer::Protocol::Interface::CodeActionOptions - # @return [CodeActionOptions] a new instance of CodeActionOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), code_action_kinds: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#40 - def attributes; end - - # CodeActionKinds that this server may return. - # - # The list of kinds may be generic, such as `CodeActionKind.Refactor`, - # or the server may list out every specific kind they provide. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#27 - def code_action_kinds; end - - # The server provides support to resolve additional - # information for a code action. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#36 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#46 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#16 - def work_done_progress; end -end - -# Params for the CodeActionRequest -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#7 -class LanguageServer::Protocol::Interface::CodeActionParams - # @return [CodeActionParams] a new instance of CodeActionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#8 - def initialize(text_document:, range:, context:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#61 - def attributes; end - - # Context carrying additional information. - # - # @return [CodeActionContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#57 - def context; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#33 - def partial_result_token; end - - # The range for which the command was invoked. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#49 - def range; end - - # The document in which the command was invoked. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#41 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#63 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#67 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#24 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#4 -class LanguageServer::Protocol::Interface::CodeActionRegistrationOptions - # @return [CodeActionRegistrationOptions] a new instance of CodeActionRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), code_action_kinds: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#50 - def attributes; end - - # CodeActionKinds that this server may return. - # - # The list of kinds may be generic, such as `CodeActionKind.Refactor`, - # or the server may list out every specific kind they provide. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#37 - def code_action_kinds; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#21 - def document_selector; end - - # The server provides support to resolve additional - # information for a code action. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#46 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#56 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#26 - def work_done_progress; end -end - -# Structure to capture a description for an error code. -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#7 -class LanguageServer::Protocol::Interface::CodeDescription - # @return [CodeDescription] a new instance of CodeDescription - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#8 - def initialize(href:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#24 - def attributes; end - - # An URI to open with more information about the diagnostic error. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#20 - def href; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#30 - def to_json(*args); end -end - -# A code lens represents a command that should be shown along with -# source text, like the number of references, a way to run tests, etc. -# -# A code lens is _unresolved_ when no command is associated to it. For -# performance reasons the creation of a code lens and resolving should be done -# in two stages. -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#12 -class LanguageServer::Protocol::Interface::CodeLens - # @return [CodeLens] a new instance of CodeLens - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#13 - def initialize(range:, command: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#49 - def attributes; end - - # The command this code lens represents. - # - # @return [Command] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#36 - def command; end - - # A data entry field that is preserved on a code lens item between - # a code lens and a code lens resolve request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#45 - def data; end - - # The range in which this code lens is valid. Should only span a single - # line. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#28 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#55 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CodeLensClientCapabilities - # @return [CodeLensClientCapabilities] a new instance of CodeLensClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#21 - def attributes; end - - # Whether code lens supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#4 -class LanguageServer::Protocol::Interface::CodeLensOptions - # @return [CodeLensOptions] a new instance of CodeLensOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#27 - def attributes; end - - # Code lens has a resolve provider as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#23 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#33 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#4 -class LanguageServer::Protocol::Interface::CodeLensParams - # @return [CodeLensParams] a new instance of CodeLensParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#28 - def partial_result_token; end - - # The document to request code lens for. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#4 -class LanguageServer::Protocol::Interface::CodeLensRegistrationOptions - # @return [CodeLensRegistrationOptions] a new instance of CodeLensRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#37 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#20 - def document_selector; end - - # Code lens has a resolve provider as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#33 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#43 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CodeLensWorkspaceClientCapabilities - # @return [CodeLensWorkspaceClientCapabilities] a new instance of CodeLensWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#5 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#27 - def attributes; end - - # Whether the client implementation supports a refresh request sent from the - # server to the client. - # - # Note that this event is global and will force the client to refresh all - # code lenses currently shown. It should be used with absolute care and is - # useful for situation where a server for example detect a project wide - # change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#23 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#33 - def to_json(*args); end -end - -# Represents a color in RGBA space. -# -# source://language_server-protocol//lib/language_server/protocol/interface/color.rb#7 -class LanguageServer::Protocol::Interface::Color - # @return [Color] a new instance of Color - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#8 - def initialize(red:, green:, blue:, alpha:); end - - # The alpha component of this color in the range [0-1]. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#47 - def alpha; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#51 - def attributes; end - - # The blue component of this color in the range [0-1]. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#39 - def blue; end - - # The green component of this color in the range [0-1]. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#31 - def green; end - - # The red component of this color in the range [0-1]. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#23 - def red; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#57 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#4 -class LanguageServer::Protocol::Interface::ColorInformation - # @return [ColorInformation] a new instance of ColorInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#5 - def initialize(range:, color:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#30 - def attributes; end - - # The actual color value for this color range. - # - # @return [Color] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#26 - def color; end - - # The range in the document where this color appears. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#18 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#4 -class LanguageServer::Protocol::Interface::ColorPresentation - # @return [ColorPresentation] a new instance of ColorPresentation - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#5 - def initialize(label:, text_edit: T.unsafe(nil), additional_text_edits: T.unsafe(nil)); end - - # An optional array of additional [text edits](#TextEdit) that are applied - # when selecting this color presentation. Edits must not overlap with the - # main [edit](#ColorPresentation.textEdit) nor with themselves. - # - # @return [TextEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#41 - def additional_text_edits; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#45 - def attributes; end - - # The label of this color presentation. It will be shown on the color - # picker header. By default this is also the text that is inserted when - # selecting this color presentation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#21 - def label; end - - # An [edit](#TextEdit) which is applied to a document when selecting - # this presentation for the color. When `falsy` the - # [label](#ColorPresentation.label) is used. - # - # @return [TextEdit] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#31 - def text_edit; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#47 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#51 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#4 -class LanguageServer::Protocol::Interface::ColorPresentationParams - # @return [ColorPresentationParams] a new instance of ColorPresentationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#5 - def initialize(text_document:, color:, range:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#58 - def attributes; end - - # The color information to request presentations for. - # - # @return [Color] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#46 - def color; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#30 - def partial_result_token; end - - # The range where the color would be inserted. Serves as a context. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#54 - def range; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#38 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#60 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#64 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#21 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/command.rb#4 -class LanguageServer::Protocol::Interface::Command - # @return [Command] a new instance of Command - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#5 - def initialize(title:, command:, arguments: T.unsafe(nil)); end - - # Arguments that the command handler should be - # invoked with. - # - # @return [LSPAny[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#36 - def arguments; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#40 - def attributes; end - - # The identifier of the actual command handler. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#27 - def command; end - - # Title of the command, like `save`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#19 - def title; end - - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#46 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CompletionClientCapabilities - # @return [CompletionClientCapabilities] a new instance of CompletionClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), completion_item: T.unsafe(nil), completion_item_kind: T.unsafe(nil), context_support: T.unsafe(nil), insert_text_mode: T.unsafe(nil), completion_list: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#67 - def attributes; end - - # The client supports the following `CompletionItem` specific - # capabilities. - # - # @return [{ snippetSupport?: boolean; commitCharactersSupport?: boolean; documentationFormat?: MarkupKind[]; deprecatedSupport?: boolean; preselectSupport?: boolean; tagSupport?: { valueSet: 1[]; }; insertReplaceSupport?: boolean; resolveSupport?: { ...; }; insertTextModeSupport?: { ...; }; labelDetailsSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#31 - def completion_item; end - - # @return [{ valueSet?: CompletionItemKind[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#36 - def completion_item_kind; end - - # The client supports the following `CompletionList` specific - # capabilities. - # - # @return [{ itemDefaults?: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#63 - def completion_list; end - - # The client supports to send additional context information for a - # `textDocument/completion` request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#45 - def context_support; end - - # Whether completion supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#22 - def dynamic_registration; end - - # The client's default when the completion item doesn't provide a - # `insertTextMode` property. - # - # @return [InsertTextMode] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#54 - def insert_text_mode; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#69 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#73 - def to_json(*args); end -end - -# Contains additional information about the context in which a completion -# request is triggered. -# -# source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#8 -class LanguageServer::Protocol::Interface::CompletionContext - # @return [CompletionContext] a new instance of CompletionContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#9 - def initialize(trigger_kind:, trigger_character: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#36 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#42 - def to_json(*args); end - - # The trigger character (a single character) that has trigger code - # complete. Is undefined if - # `triggerKind !== CompletionTriggerKind.TriggerCharacter` - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#32 - def trigger_character; end - - # How the completion was triggered. - # - # @return [CompletionTriggerKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#22 - def trigger_kind; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#4 -class LanguageServer::Protocol::Interface::CompletionItem - # @return [CompletionItem] a new instance of CompletionItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#5 - def initialize(label:, label_details: T.unsafe(nil), kind: T.unsafe(nil), tags: T.unsafe(nil), detail: T.unsafe(nil), documentation: T.unsafe(nil), deprecated: T.unsafe(nil), preselect: T.unsafe(nil), sort_text: T.unsafe(nil), filter_text: T.unsafe(nil), insert_text: T.unsafe(nil), insert_text_format: T.unsafe(nil), insert_text_mode: T.unsafe(nil), text_edit: T.unsafe(nil), text_edit_text: T.unsafe(nil), additional_text_edits: T.unsafe(nil), commit_characters: T.unsafe(nil), command: T.unsafe(nil), data: T.unsafe(nil)); end - - # An optional array of additional text edits that are applied when - # selecting this completion. Edits must not overlap (including the same - # insert position) with the main edit nor with themselves. - # - # Additional text edits should be used to change text unrelated to the - # current cursor position (for example adding an import statement at the - # top of the file if the completion item will insert an unqualified type). - # - # @return [TextEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#221 - def additional_text_edits; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#255 - def attributes; end - - # An optional command that is executed *after* inserting this completion. - # *Note* that additional modifications to the current document should be - # described with the additionalTextEdits-property. - # - # @return [Command] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#242 - def command; end - - # An optional set of characters that when pressed while this completion is - # active will accept it first and then type that character. *Note* that all - # commit characters should have `length=1` and that superfluous characters - # will be ignored. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#232 - def commit_characters; end - - # A data entry field that is preserved on a completion item between - # a completion and a completion resolve request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#251 - def data; end - - # Indicates if this item is deprecated. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#92 - def deprecated; end - - # A human-readable string with additional information - # about this item, like type or symbol information. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#76 - def detail; end - - # A human-readable string that represents a doc-comment. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#84 - def documentation; end - - # A string that should be used when filtering a set of - # completion items. When `falsy` the label is used as the - # filter text for this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#124 - def filter_text; end - - # A string that should be inserted into a document when selecting - # this completion. When `falsy` the label is used as the insert text - # for this item. - # - # The `insertText` is subject to interpretation by the client side. - # Some tools might not take the string literally. For example - # VS Code when code complete is requested in this example - # `con` and a completion item with an `insertText` of - # `console` is provided it will only insert `sole`. Therefore it is - # recommended to use `textEdit` instead since it avoids additional client - # side interpretation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#142 - def insert_text; end - - # The format of the insert text. The format applies to both the - # `insertText` property and the `newText` property of a provided - # `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`. - # - # Please note that the insertTextFormat doesn't apply to - # `additionalTextEdits`. - # - # @return [InsertTextFormat] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#155 - def insert_text_format; end - - # How whitespace and indentation is handled during completion - # item insertion. If not provided the client's default value depends on - # the `textDocument.completion.insertTextMode` client capability. - # - # @return [InsertTextMode] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#165 - def insert_text_mode; end - - # The kind of this completion item. Based of the kind - # an icon is chosen by the editor. The standardized set - # of available values is defined in `CompletionItemKind`. - # - # @return [CompletionItemKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#59 - def kind; end - - # The label of this completion item. - # - # The label property is also by default the text that - # is inserted when selecting this completion. - # - # If label details are provided the label itself should - # be an unqualified name of the completion item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#41 - def label; end - - # Additional details for the label - # - # @return [CompletionItemLabelDetails] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#49 - def label_details; end - - # Select this item when showing. - # - # *Note* that only one completion item can be selected and that the - # tool / client decides which item that is. The rule is that the *first* - # item of those that match best is selected. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#104 - def preselect; end - - # A string that should be used when comparing this item - # with other items. When `falsy` the label is used - # as the sort text for this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#114 - def sort_text; end - - # Tags for this completion item. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#67 - def tags; end - - # An edit which is applied to a document when selecting this completion. - # When an edit is provided the value of `insertText` is ignored. - # - # *Note:* The range of the edit must be a single line range and it must - # contain the position at which completion has been requested. - # - # Most editors support two different operations when accepting a completion - # item. One is to insert a completion text and the other is to replace an - # existing text with a completion text. Since this can usually not be - # predetermined by a server it can report both ranges. Clients need to - # signal support for `InsertReplaceEdit`s via the - # `textDocument.completion.completionItem.insertReplaceSupport` client - # capability property. - # - # *Note 1:* The text edit's range as well as both ranges from an insert - # replace edit must be a [single line] and they must contain the position - # at which completion has been requested. - # *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range - # must be a prefix of the edit's replace range, that means it must be - # contained and starting at the same position. - # - # @return [TextEdit | InsertReplaceEdit] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#192 - def text_edit; end - - # The edit text used if the completion item is part of a CompletionList and - # CompletionList defines an item default for the text edit range. - # - # Clients will only honor this property if they opt into completion list - # item defaults using the capability `completionList.itemDefaults`. - # - # If not provided and a list's default range is provided the label - # property is used as a text. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#207 - def text_edit_text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#257 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#261 - def to_json(*args); end -end - -# Additional details for a completion item label. -# -# source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#7 -class LanguageServer::Protocol::Interface::CompletionItemLabelDetails - # @return [CompletionItemLabelDetails] a new instance of CompletionItemLabelDetails - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#8 - def initialize(detail: T.unsafe(nil), description: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#37 - def attributes; end - - # An optional string which is rendered less prominently after - # {@link CompletionItemLabelDetails.detail}. Should be used for fully qualified - # names or file path. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#33 - def description; end - - # An optional string which is rendered less prominently directly after - # {@link CompletionItem.label label}, without any spacing. Should be - # used for function signatures or type annotations. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#23 - def detail; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#43 - def to_json(*args); end -end - -# Represents a collection of [completion items](#CompletionItem) to be -# presented in the editor. -# -# source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#8 -class LanguageServer::Protocol::Interface::CompletionList - # @return [CompletionList] a new instance of CompletionList - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#9 - def initialize(is_incomplete:, items:, item_defaults: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#57 - def attributes; end - - # This list is not complete. Further typing should result in recomputing - # this list. - # - # Recomputed lists have all their items replaced (not appended) in the - # incomplete completion sessions. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#27 - def is_incomplete; end - - # In many cases the items of an actual completion result share the same - # value for properties like `commitCharacters` or the range of a text - # edit. A completion list can therefore define item defaults which will - # be used if a completion item itself doesn't specify the value. - # - # If a completion list specifies a default value and a completion item - # also specifies a corresponding value the one from the item is used. - # - # Servers are only allowed to return default values if the client - # signals support for this via the `completionList.itemDefaults` - # capability. - # - # @return [{ commitCharacters?: string[]; editRange?: Range | { insert: Range; replace: Range; }; insertTextFormat?: InsertTextFormat; insertTextMode?: InsertTextMode; data?: LSPAny; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#45 - def item_defaults; end - - # The completion items. - # - # @return [CompletionItem[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#53 - def items; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#63 - def to_json(*args); end -end - -# Completion options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#7 -class LanguageServer::Protocol::Interface::CompletionOptions - # @return [CompletionOptions] a new instance of CompletionOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#8 - def initialize(work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), all_commit_characters: T.unsafe(nil), resolve_provider: T.unsafe(nil), completion_item: T.unsafe(nil)); end - - # The list of all possible characters that commit a completion. This field - # can be used if clients don't support individual commit characters per - # completion item. See client capability - # `completion.completionItem.commitCharactersSupport`. - # - # If a server provides both `allCommitCharacters` and commit characters on - # an individual completion item the ones on the completion item win. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#53 - def all_commit_characters; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#75 - def attributes; end - - # The server supports the following `CompletionItem` specific - # capabilities. - # - # @return [{ labelDetailsSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#71 - def completion_item; end - - # The server provides support to resolve additional - # information for a completion item. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#62 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#77 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#81 - def to_json(*args); end - - # The additional characters, beyond the defaults provided by the client (typically - # [a-zA-Z]), that should automatically trigger a completion request. For example - # `.` in JavaScript represents the beginning of an object property or method and is - # thus a good candidate for triggering a completion request. - # - # Most tools trigger a completion request automatically without explicitly - # requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they - # do so when the user starts to type an identifier. For example if the user - # types `c` in a JavaScript file code complete will automatically pop up - # present `console` besides others as a completion item. Characters that - # make up identifiers don't need to be listed here. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#39 - def trigger_characters; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#21 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#4 -class LanguageServer::Protocol::Interface::CompletionParams - # @return [CompletionParams] a new instance of CompletionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), context: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#60 - def attributes; end - - # The completion context. This is only available if the client specifies - # to send this using the client capability - # `completion.contextSupport === true` - # - # @return [CompletionContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#56 - def context; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#46 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#29 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#21 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#62 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#66 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#37 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#4 -class LanguageServer::Protocol::Interface::CompletionRegistrationOptions - # @return [CompletionRegistrationOptions] a new instance of CompletionRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), all_commit_characters: T.unsafe(nil), resolve_provider: T.unsafe(nil), completion_item: T.unsafe(nil)); end - - # The list of all possible characters that commit a completion. This field - # can be used if clients don't support individual commit characters per - # completion item. See client capability - # `completion.completionItem.commitCharactersSupport`. - # - # If a server provides both `allCommitCharacters` and commit characters on - # an individual completion item the ones on the completion item win. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#60 - def all_commit_characters; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#82 - def attributes; end - - # The server supports the following `CompletionItem` specific - # capabilities. - # - # @return [{ labelDetailsSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#78 - def completion_item; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#23 - def document_selector; end - - # The server provides support to resolve additional - # information for a completion item. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#69 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#84 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#88 - def to_json(*args); end - - # The additional characters, beyond the defaults provided by the client (typically - # [a-zA-Z]), that should automatically trigger a completion request. For example - # `.` in JavaScript represents the beginning of an object property or method and is - # thus a good candidate for triggering a completion request. - # - # Most tools trigger a completion request automatically without explicitly - # requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they - # do so when the user starts to type an identifier. For example if the user - # types `c` in a JavaScript file code complete will automatically pop up - # present `console` besides others as a completion item. Characters that - # make up identifiers don't need to be listed here. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#46 - def trigger_characters; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#28 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#4 -class LanguageServer::Protocol::Interface::ConfigurationItem - # @return [ConfigurationItem] a new instance of ConfigurationItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#5 - def initialize(scope_uri: T.unsafe(nil), section: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#30 - def attributes; end - - # The scope to get the configuration section for. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#18 - def scope_uri; end - - # The configuration section asked for. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#26 - def section; end - - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#4 -class LanguageServer::Protocol::Interface::ConfigurationParams - # @return [ConfigurationParams] a new instance of ConfigurationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#5 - def initialize(items:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#18 - def attributes; end - - # @return [ConfigurationItem[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#14 - def items; end - - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#24 - def to_json(*args); end -end - -# Create file operation -# -# source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#7 -class LanguageServer::Protocol::Interface::CreateFile - # @return [CreateFile] a new instance of CreateFile - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#8 - def initialize(kind:, uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end - - # An optional annotation identifier describing the operation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#47 - def annotation_id; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#51 - def attributes; end - - # A create - # - # @return ["create"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#23 - def kind; end - - # Additional options - # - # @return [CreateFileOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#39 - def options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#57 - def to_json(*args); end - - # The resource to create. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#31 - def uri; end -end - -# Options to create a file. -# -# source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#7 -class LanguageServer::Protocol::Interface::CreateFileOptions - # @return [CreateFileOptions] a new instance of CreateFileOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#8 - def initialize(overwrite: T.unsafe(nil), ignore_if_exists: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#33 - def attributes; end - - # Ignore if exists. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#29 - def ignore_if_exists; end - - # Overwrite existing file. Overwrite wins over `ignoreIfExists` - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#21 - def overwrite; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#39 - def to_json(*args); end -end - -# The parameters sent in notifications/requests for user-initiated creation -# of files. -# -# source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#8 -class LanguageServer::Protocol::Interface::CreateFilesParams - # @return [CreateFilesParams] a new instance of CreateFilesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#9 - def initialize(files:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#25 - def attributes; end - - # An array of all files/folders created in this operation. - # - # @return [FileCreate[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#21 - def files; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#31 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DeclarationClientCapabilities - # @return [DeclarationClientCapabilities] a new instance of DeclarationClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#32 - def attributes; end - - # Whether declaration supports dynamic registration. If this is set to - # `true` the client supports the new `DeclarationRegistrationOptions` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#20 - def dynamic_registration; end - - # The client supports additional metadata in the form of declaration links. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#28 - def link_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#4 -class LanguageServer::Protocol::Interface::DeclarationOptions - # @return [DeclarationOptions] a new instance of DeclarationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#4 -class LanguageServer::Protocol::Interface::DeclarationParams - # @return [DeclarationParams] a new instance of DeclarationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DeclarationRegistrationOptions - # @return [DeclarationRegistrationOptions] a new instance of DeclarationRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#25 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#16 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DefinitionClientCapabilities - # @return [DefinitionClientCapabilities] a new instance of DefinitionClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#30 - def attributes; end - - # Whether definition supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#18 - def dynamic_registration; end - - # The client supports additional metadata in the form of definition links. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#26 - def link_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#4 -class LanguageServer::Protocol::Interface::DefinitionOptions - # @return [DefinitionOptions] a new instance of DefinitionOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#4 -class LanguageServer::Protocol::Interface::DefinitionParams - # @return [DefinitionParams] a new instance of DefinitionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DefinitionRegistrationOptions - # @return [DefinitionRegistrationOptions] a new instance of DefinitionRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#24 - def work_done_progress; end -end - -# Delete file operation -# -# source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#7 -class LanguageServer::Protocol::Interface::DeleteFile - # @return [DeleteFile] a new instance of DeleteFile - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#8 - def initialize(kind:, uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end - - # An optional annotation identifier describing the operation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#47 - def annotation_id; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#51 - def attributes; end - - # A delete - # - # @return ["delete"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#23 - def kind; end - - # Delete options. - # - # @return [DeleteFileOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#39 - def options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#57 - def to_json(*args); end - - # The file to delete. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#31 - def uri; end -end - -# Delete file options -# -# source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#7 -class LanguageServer::Protocol::Interface::DeleteFileOptions - # @return [DeleteFileOptions] a new instance of DeleteFileOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#8 - def initialize(recursive: T.unsafe(nil), ignore_if_not_exists: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#33 - def attributes; end - - # Ignore the operation if the file doesn't exist. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#29 - def ignore_if_not_exists; end - - # Delete the content recursively if a folder is denoted. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#21 - def recursive; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#39 - def to_json(*args); end -end - -# The parameters sent in notifications/requests for user-initiated deletes -# of files. -# -# source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#8 -class LanguageServer::Protocol::Interface::DeleteFilesParams - # @return [DeleteFilesParams] a new instance of DeleteFilesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#9 - def initialize(files:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#25 - def attributes; end - - # An array of all files/folders deleted in this operation. - # - # @return [FileDelete[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#21 - def files; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#31 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#4 -class LanguageServer::Protocol::Interface::Diagnostic - # @return [Diagnostic] a new instance of Diagnostic - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#5 - def initialize(range:, message:, severity: T.unsafe(nil), code: T.unsafe(nil), code_description: T.unsafe(nil), source: T.unsafe(nil), tags: T.unsafe(nil), related_information: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#98 - def attributes; end - - # The diagnostic's code, which might appear in the user interface. - # - # @return [string | number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#42 - def code; end - - # An optional property to describe the error code. - # - # @return [CodeDescription] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#50 - def code_description; end - - # A data entry field that is preserved between a - # `textDocument/publishDiagnostics` notification and - # `textDocument/codeAction` request. - # - # @return [unknown] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#94 - def data; end - - # The diagnostic's message. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#67 - def message; end - - # The range at which the message applies. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#25 - def range; end - - # An array of related diagnostic information, e.g. when symbol-names within - # a scope collide all definitions can be marked via this property. - # - # @return [DiagnosticRelatedInformation[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#84 - def related_information; end - - # The diagnostic's severity. Can be omitted. If omitted it is up to the - # client to interpret diagnostics as error, warning, info or hint. - # - # @return [DiagnosticSeverity] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#34 - def severity; end - - # A human-readable string describing the source of this - # diagnostic, e.g. 'typescript' or 'super lint'. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#59 - def source; end - - # Additional metadata about the diagnostic. - # - # @return [DiagnosticTag[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#75 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#100 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#104 - def to_json(*args); end -end - -# Client capabilities specific to diagnostic pull requests. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticClientCapabilities - # @return [DiagnosticClientCapabilities] a new instance of DiagnosticClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#8 - def initialize(dynamic_registration: T.unsafe(nil), related_document_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#37 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new - # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#24 - def dynamic_registration; end - - # Whether the clients supports related documents for document diagnostic - # pulls. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#33 - def related_document_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#43 - def to_json(*args); end -end - -# Diagnostic options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticOptions - # @return [DiagnosticOptions] a new instance of DiagnosticOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#8 - def initialize(inter_file_dependencies:, workspace_diagnostics:, work_done_progress: T.unsafe(nil), identifier: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#52 - def attributes; end - - # An optional identifier under which the diagnostics are - # managed by the client. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#29 - def identifier; end - - # Whether the language has inter file dependencies meaning that - # editing code in one file can result in a different diagnostic - # set in another file. Inter file dependencies are common for - # most programming languages and typically uncommon for linters. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#40 - def inter_file_dependencies; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#54 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#58 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#20 - def work_done_progress; end - - # The server provides support for workspace diagnostics as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#48 - def workspace_diagnostics; end -end - -# Diagnostic registration options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticRegistrationOptions - # @return [DiagnosticRegistrationOptions] a new instance of DiagnosticRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#8 - def initialize(document_selector:, inter_file_dependencies:, workspace_diagnostics:, work_done_progress: T.unsafe(nil), identifier: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#72 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#26 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#68 - def id; end - - # An optional identifier under which the diagnostics are - # managed by the client. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#40 - def identifier; end - - # Whether the language has inter file dependencies meaning that - # editing code in one file can result in a different diagnostic - # set in another file. Inter file dependencies are common for - # most programming languages and typically uncommon for linters. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#51 - def inter_file_dependencies; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#74 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#78 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#31 - def work_done_progress; end - - # The server provides support for workspace diagnostics as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#59 - def workspace_diagnostics; end -end - -# Represents a related message and source code location for a diagnostic. -# This should be used to point to code locations that cause or are related to -# a diagnostics, e.g when duplicating a symbol in a scope. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#9 -class LanguageServer::Protocol::Interface::DiagnosticRelatedInformation - # @return [DiagnosticRelatedInformation] a new instance of DiagnosticRelatedInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#10 - def initialize(location:, message:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#35 - def attributes; end - - # The location of this related diagnostic information. - # - # @return [Location] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#23 - def location; end - - # The message of this related diagnostic information. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#31 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#37 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#41 - def to_json(*args); end -end - -# Cancellation data returned from a diagnostic request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticServerCancellationData - # @return [DiagnosticServerCancellationData] a new instance of DiagnosticServerCancellationData - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#8 - def initialize(retrigger_request:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#21 - def attributes; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#17 - def retrigger_request; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#27 - def to_json(*args); end -end - -# Workspace client capabilities specific to diagnostic pull requests. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticWorkspaceClientCapabilities - # @return [DiagnosticWorkspaceClientCapabilities] a new instance of DiagnosticWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#8 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#30 - def attributes; end - - # Whether the client implementation supports a refresh request sent from - # the server to the client. - # - # Note that this event is global and will force the client to refresh all - # pulled diagnostics currently shown. It should be used with absolute care - # and is useful for situation where a server for example detects a project - # wide change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#26 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DidChangeConfigurationClientCapabilities - # @return [DidChangeConfigurationClientCapabilities] a new instance of DidChangeConfigurationClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#21 - def attributes; end - - # Did change configuration notification supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#4 -class LanguageServer::Protocol::Interface::DidChangeConfigurationParams - # @return [DidChangeConfigurationParams] a new instance of DidChangeConfigurationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#5 - def initialize(settings:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#21 - def attributes; end - - # The actual changed settings - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#17 - def settings; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#27 - def to_json(*args); end -end - -# The params sent in a change notebook document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#7 -class LanguageServer::Protocol::Interface::DidChangeNotebookDocumentParams - # @return [DidChangeNotebookDocumentParams] a new instance of DidChangeNotebookDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#8 - def initialize(notebook_document:, change:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#44 - def attributes; end - - # The actual changes to the notebook document. - # - # The change describes single state change to the notebook document. - # So it moves a notebook document, its cells and its cell text document - # contents from state S to S'. - # - # To mirror the content of a notebook using change events use the - # following approach: - # - start with the same initial content - # - apply the 'notebookDocument/didChange' notifications in the order - # you receive them. - # - # @return [NotebookDocumentChangeEvent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#40 - def change; end - - # The notebook document that did change. The version number points - # to the version after all provided changes have been applied. - # - # @return [VersionedNotebookDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#22 - def notebook_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#4 -class LanguageServer::Protocol::Interface::DidChangeTextDocumentParams - # @return [DidChangeTextDocumentParams] a new instance of DidChangeTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#5 - def initialize(text_document:, content_changes:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#44 - def attributes; end - - # The actual content changes. The content changes describe single state - # changes to the document. So if there are two content changes c1 (at - # array index 0) and c2 (at array index 1) for a document in state S then - # c1 moves the document from S to S' and c2 from S' to S''. So c1 is - # computed on the state S and c2 is computed on the state S'. - # - # To mirror the content of a document using change events use the following - # approach: - # - start with the same initial content - # - apply the 'textDocument/didChange' notifications in the order you - # receive them. - # - apply the `TextDocumentContentChangeEvent`s in a single notification - # in the order you receive them. - # - # @return [TextDocumentContentChangeEvent[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#40 - def content_changes; end - - # The document that did change. The version number points - # to the version after all provided content changes have - # been applied. - # - # @return [VersionedTextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DidChangeWatchedFilesClientCapabilities - # @return [DidChangeWatchedFilesClientCapabilities] a new instance of DidChangeWatchedFilesClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), relative_pattern_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#33 - def attributes; end - - # Did change watched files notification supports dynamic registration. - # Please note that the current protocol doesn't support static - # configuration for file changes from the server side. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#20 - def dynamic_registration; end - - # Whether the client has support for relative patterns - # or not. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#29 - def relative_pattern_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#4 -class LanguageServer::Protocol::Interface::DidChangeWatchedFilesParams - # @return [DidChangeWatchedFilesParams] a new instance of DidChangeWatchedFilesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#5 - def initialize(changes:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#21 - def attributes; end - - # The actual file events. - # - # @return [FileEvent[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#17 - def changes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#27 - def to_json(*args); end -end - -# Describe options to be used when registering for file system change events. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#7 -class LanguageServer::Protocol::Interface::DidChangeWatchedFilesRegistrationOptions - # @return [DidChangeWatchedFilesRegistrationOptions] a new instance of DidChangeWatchedFilesRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#8 - def initialize(watchers:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#24 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#30 - def to_json(*args); end - - # The watchers to register. - # - # @return [FileSystemWatcher[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#20 - def watchers; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#4 -class LanguageServer::Protocol::Interface::DidChangeWorkspaceFoldersParams - # @return [DidChangeWorkspaceFoldersParams] a new instance of DidChangeWorkspaceFoldersParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#5 - def initialize(event:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#21 - def attributes; end - - # The actual workspace folder change event. - # - # @return [WorkspaceFoldersChangeEvent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#17 - def event; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#27 - def to_json(*args); end -end - -# The params sent in a close notebook document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#7 -class LanguageServer::Protocol::Interface::DidCloseNotebookDocumentParams - # @return [DidCloseNotebookDocumentParams] a new instance of DidCloseNotebookDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#8 - def initialize(notebook_document:, cell_text_documents:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#34 - def attributes; end - - # The text documents that represent the content - # of a notebook cell that got closed. - # - # @return [TextDocumentIdentifier[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#30 - def cell_text_documents; end - - # The notebook document that got closed. - # - # @return [NotebookDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#21 - def notebook_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#4 -class LanguageServer::Protocol::Interface::DidCloseTextDocumentParams - # @return [DidCloseTextDocumentParams] a new instance of DidCloseTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#5 - def initialize(text_document:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#21 - def attributes; end - - # The document that was closed. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#17 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#27 - def to_json(*args); end -end - -# The params sent in an open notebook document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#7 -class LanguageServer::Protocol::Interface::DidOpenNotebookDocumentParams - # @return [DidOpenNotebookDocumentParams] a new instance of DidOpenNotebookDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#8 - def initialize(notebook_document:, cell_text_documents:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#34 - def attributes; end - - # The text documents that represent the content - # of a notebook cell. - # - # @return [TextDocumentItem[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#30 - def cell_text_documents; end - - # The notebook document that got opened. - # - # @return [NotebookDocument] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#21 - def notebook_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#4 -class LanguageServer::Protocol::Interface::DidOpenTextDocumentParams - # @return [DidOpenTextDocumentParams] a new instance of DidOpenTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#5 - def initialize(text_document:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#21 - def attributes; end - - # The document that was opened. - # - # @return [TextDocumentItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#17 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#27 - def to_json(*args); end -end - -# The params sent in a save notebook document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#7 -class LanguageServer::Protocol::Interface::DidSaveNotebookDocumentParams - # @return [DidSaveNotebookDocumentParams] a new instance of DidSaveNotebookDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#8 - def initialize(notebook_document:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#24 - def attributes; end - - # The notebook document that got saved. - # - # @return [NotebookDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#20 - def notebook_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#4 -class LanguageServer::Protocol::Interface::DidSaveTextDocumentParams - # @return [DidSaveTextDocumentParams] a new instance of DidSaveTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#5 - def initialize(text_document:, text: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#31 - def attributes; end - - # Optional the content when saved. Depends on the includeText value - # when the save notification was requested. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#27 - def text; end - - # The document that was saved. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#18 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentColorClientCapabilities - # @return [DocumentColorClientCapabilities] a new instance of DocumentColorClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#21 - def attributes; end - - # Whether document color supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentColorOptions - # @return [DocumentColorOptions] a new instance of DocumentColorOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentColorParams - # @return [DocumentColorParams] a new instance of DocumentColorParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#28 - def partial_result_token; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentColorRegistrationOptions - # @return [DocumentColorRegistrationOptions] a new instance of DocumentColorRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#5 - def initialize(document_selector:, id: T.unsafe(nil), work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#29 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#34 - def work_done_progress; end -end - -# Parameters of the document diagnostic request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#7 -class LanguageServer::Protocol::Interface::DocumentDiagnosticParams - # @return [DocumentDiagnosticParams] a new instance of DocumentDiagnosticParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#8 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), identifier: T.unsafe(nil), previous_result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#61 - def attributes; end - - # The additional identifier provided during registration. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#49 - def identifier; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#33 - def partial_result_token; end - - # The result id of a previous response if provided. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#57 - def previous_result_id; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#41 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#63 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#67 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#24 - def work_done_token; end -end - -# A partial result for a document diagnostic report. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#7 -class LanguageServer::Protocol::Interface::DocumentDiagnosticReportPartialResult - # @return [DocumentDiagnosticReportPartialResult] a new instance of DocumentDiagnosticReportPartialResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#8 - def initialize(related_documents:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#21 - def attributes; end - - # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#17 - def related_documents; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#4 -class LanguageServer::Protocol::Interface::DocumentFilter - # @return [DocumentFilter] a new instance of DocumentFilter - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#5 - def initialize(language: T.unsafe(nil), scheme: T.unsafe(nil), pattern: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#51 - def attributes; end - - # A language id, like `typescript`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#19 - def language; end - - # A glob pattern, like `*.{ts,js}`. - # - # Glob patterns can have the following syntax: - # - `*` to match one or more characters in a path segment - # - `?` to match on one character in a path segment - # - `**` to match any number of path segments, including none - # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` - # matches all TypeScript and JavaScript files) - # - `[]` to declare a range of characters to match in a path segment - # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) - # - `[!...]` to negate a range of characters to match in a path segment - # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but - # not `example.0`) - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#47 - def pattern; end - - # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#27 - def scheme; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#57 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentFormattingClientCapabilities - # @return [DocumentFormattingClientCapabilities] a new instance of DocumentFormattingClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#21 - def attributes; end - - # Whether formatting supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentFormattingOptions - # @return [DocumentFormattingOptions] a new instance of DocumentFormattingOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentFormattingParams - # @return [DocumentFormattingParams] a new instance of DocumentFormattingParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#5 - def initialize(text_document:, options:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#39 - def attributes; end - - # The format options. - # - # @return [FormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#35 - def options; end - - # The document to format. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#27 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentFormattingRegistrationOptions - # @return [DocumentFormattingRegistrationOptions] a new instance of DocumentFormattingRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#24 - def work_done_progress; end -end - -# A document highlight is a range inside a text document which deserves -# special attention. Usually a document highlight is visualized by changing -# the background color of its range. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#9 -class LanguageServer::Protocol::Interface::DocumentHighlight - # @return [DocumentHighlight] a new instance of DocumentHighlight - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#10 - def initialize(range:, kind: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#35 - def attributes; end - - # The highlight kind, default is DocumentHighlightKind.Text. - # - # @return [DocumentHighlightKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#31 - def kind; end - - # The range this highlight applies to. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#23 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#37 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#41 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentHighlightClientCapabilities - # @return [DocumentHighlightClientCapabilities] a new instance of DocumentHighlightClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#21 - def attributes; end - - # Whether document highlight supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentHighlightOptions - # @return [DocumentHighlightOptions] a new instance of DocumentHighlightOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentHighlightParams - # @return [DocumentHighlightParams] a new instance of DocumentHighlightParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentHighlightRegistrationOptions - # @return [DocumentHighlightRegistrationOptions] a new instance of DocumentHighlightRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#24 - def work_done_progress; end -end - -# A document link is a range in a text document that links to an internal or -# external resource, like another text document or a web site. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#8 -class LanguageServer::Protocol::Interface::DocumentLink - # @return [DocumentLink] a new instance of DocumentLink - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#9 - def initialize(range:, target: T.unsafe(nil), tooltip: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#58 - def attributes; end - - # A data entry field that is preserved on a document link between a - # DocumentLinkRequest and a DocumentLinkResolveRequest. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#54 - def data; end - - # The range this link applies to. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#24 - def range; end - - # The uri this link points to. If missing a resolve request is sent later. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#32 - def target; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#60 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#64 - def to_json(*args); end - - # The tooltip text when you hover over this link. - # - # If a tooltip is provided, is will be displayed in a string that includes - # instructions on how to trigger the link, such as `{0} (ctrl + click)`. - # The specific instructions vary depending on OS, user settings, and - # localization. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#45 - def tooltip; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentLinkClientCapabilities - # @return [DocumentLinkClientCapabilities] a new instance of DocumentLinkClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), tooltip_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#30 - def attributes; end - - # Whether document link supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#18 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#36 - def to_json(*args); end - - # Whether the client supports the `tooltip` property on `DocumentLink`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#26 - def tooltip_support; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentLinkOptions - # @return [DocumentLinkOptions] a new instance of DocumentLinkOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#27 - def attributes; end - - # Document links have a resolve provider as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#23 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#33 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentLinkParams - # @return [DocumentLinkParams] a new instance of DocumentLinkParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#28 - def partial_result_token; end - - # The document to provide document links for. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentLinkRegistrationOptions - # @return [DocumentLinkRegistrationOptions] a new instance of DocumentLinkRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#37 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#20 - def document_selector; end - - # Document links have a resolve provider as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#33 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#43 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingClientCapabilities - # @return [DocumentOnTypeFormattingClientCapabilities] a new instance of DocumentOnTypeFormattingClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#21 - def attributes; end - - # Whether on type formatting supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingOptions - # @return [DocumentOnTypeFormattingOptions] a new instance of DocumentOnTypeFormattingOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#5 - def initialize(first_trigger_character:, more_trigger_character: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#30 - def attributes; end - - # A character on which formatting should be triggered, like `{`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#18 - def first_trigger_character; end - - # More trigger characters. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#26 - def more_trigger_character; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingParams - # @return [DocumentOnTypeFormattingParams] a new instance of DocumentOnTypeFormattingParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#5 - def initialize(text_document:, position:, ch:, options:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#53 - def attributes; end - - # The character that has been typed that triggered the formatting - # on type request. That is not necessarily the last character that - # got inserted into the document since the client could auto insert - # characters as well (e.g. like automatic brace completion). - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#41 - def ch; end - - # The formatting options. - # - # @return [FormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#49 - def options; end - - # The position around which the on type formatting should happen. - # This is not necessarily the exact position where the character denoted - # by the property `ch` got typed. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#30 - def position; end - - # The document to format. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#55 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#59 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingRegistrationOptions - # @return [DocumentOnTypeFormattingRegistrationOptions] a new instance of DocumentOnTypeFormattingRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#5 - def initialize(document_selector:, first_trigger_character:, more_trigger_character: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#40 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#20 - def document_selector; end - - # A character on which formatting should be triggered, like `{`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#28 - def first_trigger_character; end - - # More trigger characters. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#36 - def more_trigger_character; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#46 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentRangeFormattingClientCapabilities - # @return [DocumentRangeFormattingClientCapabilities] a new instance of DocumentRangeFormattingClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#21 - def attributes; end - - # Whether formatting supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentRangeFormattingOptions - # @return [DocumentRangeFormattingOptions] a new instance of DocumentRangeFormattingOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentRangeFormattingParams - # @return [DocumentRangeFormattingParams] a new instance of DocumentRangeFormattingParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#5 - def initialize(text_document:, range:, options:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#48 - def attributes; end - - # The format options - # - # @return [FormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#44 - def options; end - - # The range to format - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#36 - def range; end - - # The document to format. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#28 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#50 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#54 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#20 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentRangeFormattingRegistrationOptions - # @return [DocumentRangeFormattingRegistrationOptions] a new instance of DocumentRangeFormattingRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#24 - def work_done_progress; end -end - -# Represents programming constructs like variables, classes, interfaces etc. -# that appear in a document. Document symbols can be hierarchical and they -# have two ranges: one that encloses its definition and one that points to its -# most interesting range, e.g. the range of an identifier. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#10 -class LanguageServer::Protocol::Interface::DocumentSymbol - # @return [DocumentSymbol] a new instance of DocumentSymbol - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#11 - def initialize(name:, kind:, range:, selection_range:, detail: T.unsafe(nil), tags: T.unsafe(nil), deprecated: T.unsafe(nil), children: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#96 - def attributes; end - - # Children of this symbol, e.g. properties of a class. - # - # @return [DocumentSymbol[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#92 - def children; end - - # Indicates if this symbol is deprecated. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#64 - def deprecated; end - - # More detail for this symbol, e.g the signature of a function. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#40 - def detail; end - - # The kind of this symbol. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#48 - def kind; end - - # The name of this symbol. Will be displayed in the user interface and - # therefore must not be an empty string or a string only consisting of - # white spaces. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#32 - def name; end - - # The range enclosing this symbol not including leading/trailing whitespace - # but everything else like comments. This information is typically used to - # determine if the clients cursor is inside the symbol to reveal in the - # symbol in the UI. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#75 - def range; end - - # The range that should be selected and revealed when this symbol is being - # picked, e.g. the name of a function. Must be contained by the `range`. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#84 - def selection_range; end - - # Tags for this document symbol. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#56 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#98 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#102 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentSymbolClientCapabilities - # @return [DocumentSymbolClientCapabilities] a new instance of DocumentSymbolClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), symbol_kind: T.unsafe(nil), hierarchical_document_symbol_support: T.unsafe(nil), tag_support: T.unsafe(nil), label_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#61 - def attributes; end - - # Whether document symbol supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#21 - def dynamic_registration; end - - # The client supports hierarchical document symbols. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#38 - def hierarchical_document_symbol_support; end - - # The client supports an additional label presented in the UI when - # registering a document symbol provider. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#57 - def label_support; end - - # Specific capabilities for the `SymbolKind` in the - # `textDocument/documentSymbol` request. - # - # @return [{ valueSet?: SymbolKind[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#30 - def symbol_kind; end - - # The client supports tags on `SymbolInformation`. Tags are supported on - # `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. - # Clients supporting tags have to handle unknown tags gracefully. - # - # @return [{ valueSet: 1[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#48 - def tag_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#63 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#67 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentSymbolOptions - # @return [DocumentSymbolOptions] a new instance of DocumentSymbolOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), label: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#28 - def attributes; end - - # A human-readable string that is shown when multiple outlines trees - # are shown for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#24 - def label; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentSymbolParams - # @return [DocumentSymbolParams] a new instance of DocumentSymbolParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#28 - def partial_result_token; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentSymbolRegistrationOptions - # @return [DocumentSymbolRegistrationOptions] a new instance of DocumentSymbolRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), label: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#20 - def document_selector; end - - # A human-readable string that is shown when multiple outlines trees - # are shown for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#34 - def label; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ExecuteCommandClientCapabilities - # @return [ExecuteCommandClientCapabilities] a new instance of ExecuteCommandClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#21 - def attributes; end - - # Execute command supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#4 -class LanguageServer::Protocol::Interface::ExecuteCommandOptions - # @return [ExecuteCommandOptions] a new instance of ExecuteCommandOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#5 - def initialize(commands:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#27 - def attributes; end - - # The commands to be executed on the server - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#23 - def commands; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#33 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#4 -class LanguageServer::Protocol::Interface::ExecuteCommandParams - # @return [ExecuteCommandParams] a new instance of ExecuteCommandParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#5 - def initialize(command:, work_done_token: T.unsafe(nil), arguments: T.unsafe(nil)); end - - # Arguments that the command should be invoked with. - # - # @return [LSPAny[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#35 - def arguments; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#39 - def attributes; end - - # The identifier of the actual command handler. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#27 - def command; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#19 - def work_done_token; end -end - -# Execute command registration options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#7 -class LanguageServer::Protocol::Interface::ExecuteCommandRegistrationOptions - # @return [ExecuteCommandRegistrationOptions] a new instance of ExecuteCommandRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#8 - def initialize(commands:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#30 - def attributes; end - - # The commands to be executed on the server - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#26 - def commands; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#36 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#18 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#4 -class LanguageServer::Protocol::Interface::ExecutionSummary - # @return [ExecutionSummary] a new instance of ExecutionSummary - # - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#5 - def initialize(execution_order:, success: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#33 - def attributes; end - - # A strict monotonically increasing value - # indicating the execution order of a cell - # inside a notebook. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#20 - def execution_order; end - - # Whether the execution was successful or - # not if known by the client. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#29 - def success; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#39 - def to_json(*args); end -end - -# Represents information on a file/folder create. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#7 -class LanguageServer::Protocol::Interface::FileCreate - # @return [FileCreate] a new instance of FileCreate - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#8 - def initialize(uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#24 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#30 - def to_json(*args); end - - # A file:// URI for the location of the file/folder being created. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#20 - def uri; end -end - -# Represents information on a file/folder delete. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#7 -class LanguageServer::Protocol::Interface::FileDelete - # @return [FileDelete] a new instance of FileDelete - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#8 - def initialize(uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#24 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#30 - def to_json(*args); end - - # A file:// URI for the location of the file/folder being deleted. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#20 - def uri; end -end - -# An event describing a file change. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#7 -class LanguageServer::Protocol::Interface::FileEvent - # @return [FileEvent] a new instance of FileEvent - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#8 - def initialize(uri:, type:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#33 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#39 - def to_json(*args); end - - # The change type. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#29 - def type; end - - # The file's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#21 - def uri; end -end - -# A filter to describe in which file operation requests or notifications -# the server is interested in. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#8 -class LanguageServer::Protocol::Interface::FileOperationFilter - # @return [FileOperationFilter] a new instance of FileOperationFilter - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#9 - def initialize(pattern:, scheme: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#34 - def attributes; end - - # The actual file operation pattern. - # - # @return [FileOperationPattern] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#30 - def pattern; end - - # A Uri like `file` or `untitled`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#22 - def scheme; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#40 - def to_json(*args); end -end - -# A pattern to describe in which file operation requests or notifications -# the server is interested in. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#8 -class LanguageServer::Protocol::Interface::FileOperationPattern - # @return [FileOperationPattern] a new instance of FileOperationPattern - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#9 - def initialize(glob:, matches: T.unsafe(nil), options: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#55 - def attributes; end - - # The glob pattern to match. Glob patterns can have the following syntax: - # - `*` to match one or more characters in a path segment - # - `?` to match on one character in a path segment - # - `**` to match any number of path segments, including none - # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` - # matches all TypeScript and JavaScript files) - # - `[]` to declare a range of characters to match in a path segment - # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) - # - `[!...]` to negate a range of characters to match in a path segment - # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but - # not `example.0`) - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#33 - def glob; end - - # Whether to match files or folders with this pattern. - # - # Matches both if undefined. - # - # @return [FileOperationPatternKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#43 - def matches; end - - # Additional options used during matching. - # - # @return [FileOperationPatternOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#51 - def options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#57 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#61 - def to_json(*args); end -end - -# Matching options for the file operation pattern. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#7 -class LanguageServer::Protocol::Interface::FileOperationPatternOptions - # @return [FileOperationPatternOptions] a new instance of FileOperationPatternOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#8 - def initialize(ignore_case: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#24 - def attributes; end - - # The pattern should be matched ignoring casing. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#20 - def ignore_case; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#30 - def to_json(*args); end -end - -# The options to register for file operations. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#7 -class LanguageServer::Protocol::Interface::FileOperationRegistrationOptions - # @return [FileOperationRegistrationOptions] a new instance of FileOperationRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#8 - def initialize(filters:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#24 - def attributes; end - - # The actual filters. - # - # @return [FileOperationFilter[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#20 - def filters; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#30 - def to_json(*args); end -end - -# Represents information on a file/folder rename. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#7 -class LanguageServer::Protocol::Interface::FileRename - # @return [FileRename] a new instance of FileRename - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#8 - def initialize(old_uri:, new_uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#33 - def attributes; end - - # A file:// URI for the new location of the file/folder being renamed. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#29 - def new_uri; end - - # A file:// URI for the original location of the file/folder being renamed. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#21 - def old_uri; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#4 -class LanguageServer::Protocol::Interface::FileSystemWatcher - # @return [FileSystemWatcher] a new instance of FileSystemWatcher - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#5 - def initialize(glob_pattern:, kind: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#33 - def attributes; end - - # The glob pattern to watch. See {@link GlobPattern glob pattern} - # for more detail. - # - # @return [GlobPattern] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#19 - def glob_pattern; end - - # The kind of events of interest. If omitted it defaults - # to WatchKind.Create | WatchKind.Change | WatchKind.Delete - # which is 7. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#29 - def kind; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#39 - def to_json(*args); end -end - -# Represents a folding range. To be valid, start and end line must be bigger -# than zero and smaller than the number of lines in the document. Clients -# are free to ignore invalid ranges. -# -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#9 -class LanguageServer::Protocol::Interface::FoldingRange - # @return [FoldingRange] a new instance of FoldingRange - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#10 - def initialize(start_line:, end_line:, start_character: T.unsafe(nil), end_character: T.unsafe(nil), kind: T.unsafe(nil), collapsed_text: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#82 - def attributes; end - - # The text that the client should show when the specified range is - # collapsed. If not defined or not supported by the client, a default - # will be chosen by the client. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#78 - def collapsed_text; end - - # The zero-based character offset before the folded range ends. If not - # defined, defaults to the length of the end line. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#57 - def end_character; end - - # The zero-based end line of the range to fold. The folded area ends with - # the line's last character. To be valid, the end must be zero or larger - # and smaller than the number of lines in the document. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#48 - def end_line; end - - # Describes the kind of the folding range such as `comment` or `region`. - # The kind is used to categorize folding ranges and used by commands like - # 'Fold all comments'. See [FoldingRangeKind](#FoldingRangeKind) for an - # enumeration of standardized kinds. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#68 - def kind; end - - # The zero-based character offset from where the folded range starts. If - # not defined, defaults to the length of the start line. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#38 - def start_character; end - - # The zero-based start line of the range to fold. The folded area starts - # after the line's last character. To be valid, the end must be zero or - # larger and smaller than the number of lines in the document. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#29 - def start_line; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#84 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#88 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::FoldingRangeClientCapabilities - # @return [FoldingRangeClientCapabilities] a new instance of FoldingRangeClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), range_limit: T.unsafe(nil), line_folding_only: T.unsafe(nil), folding_range_kind: T.unsafe(nil), folding_range: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#64 - def attributes; end - - # Whether implementation supports dynamic registration for folding range - # providers. If this is set to `true` the client supports the new - # `FoldingRangeRegistrationOptions` return value for the corresponding - # server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#24 - def dynamic_registration; end - - # Specific options for the folding range. - # - # @return [{ collapsedText?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#60 - def folding_range; end - - # Specific options for the folding range kind. - # - # @return [{ valueSet?: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#52 - def folding_range_kind; end - - # If set, the client signals that it only supports folding complete lines. - # If set, client will ignore specified `startCharacter` and `endCharacter` - # properties in a FoldingRange. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#44 - def line_folding_only; end - - # The maximum number of folding ranges that the client prefers to receive - # per document. The value serves as a hint, servers are free to follow the - # limit. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#34 - def range_limit; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#66 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#70 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#4 -class LanguageServer::Protocol::Interface::FoldingRangeOptions - # @return [FoldingRangeOptions] a new instance of FoldingRangeOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#4 -class LanguageServer::Protocol::Interface::FoldingRangeParams - # @return [FoldingRangeParams] a new instance of FoldingRangeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#28 - def partial_result_token; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#4 -class LanguageServer::Protocol::Interface::FoldingRangeRegistrationOptions - # @return [FoldingRangeRegistrationOptions] a new instance of FoldingRangeRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#25 - def work_done_progress; end -end - -# Value-object describing what options formatting should use. -# -# source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#7 -class LanguageServer::Protocol::Interface::FormattingOptions - # @return [FormattingOptions] a new instance of FormattingOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#8 - def initialize(tab_size:, insert_spaces:, trim_trailing_whitespace: T.unsafe(nil), insert_final_newline: T.unsafe(nil), trim_final_newlines: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#60 - def attributes; end - - # Insert a newline character at the end of the file if one does not exist. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#48 - def insert_final_newline; end - - # Prefer spaces over tabs. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#32 - def insert_spaces; end - - # Size of a tab in spaces. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#24 - def tab_size; end - - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#62 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#66 - def to_json(*args); end - - # Trim all newlines after the final newline at the end of the file. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#56 - def trim_final_newlines; end - - # Trim trailing whitespace on a line. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#40 - def trim_trailing_whitespace; end -end - -# A diagnostic report with a full set of problems. -# -# source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::FullDocumentDiagnosticReport - # @return [FullDocumentDiagnosticReport] a new instance of FullDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#8 - def initialize(kind:, items:, result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#44 - def attributes; end - - # The actual items. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#40 - def items; end - - # A full document diagnostic report. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#22 - def kind; end - - # An optional result id. If provided it will - # be sent on the next diagnostic request for the - # same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#32 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#50 - def to_json(*args); end -end - -# The result of a hover request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#7 -class LanguageServer::Protocol::Interface::Hover - # @return [Hover] a new instance of Hover - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#8 - def initialize(contents:, range: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#34 - def attributes; end - - # The hover's content - # - # @return [MarkupContent | MarkedString | MarkedString[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#21 - def contents; end - - # An optional range is a range inside a text document - # that is used to visualize a hover, e.g. by changing the background color. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#30 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::HoverClientCapabilities - # @return [HoverClientCapabilities] a new instance of HoverClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), content_format: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#32 - def attributes; end - - # Client supports the follow content formats if the content - # property refers to a `literal of type MarkupContent`. - # The order describes the preferred format of the client. - # - # @return [MarkupKind[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#28 - def content_format; end - - # Whether hover supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#18 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#4 -class LanguageServer::Protocol::Interface::HoverOptions - # @return [HoverOptions] a new instance of HoverOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#4 -class LanguageServer::Protocol::Interface::HoverParams - # @return [HoverParams] a new instance of HoverParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#35 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#4 -class LanguageServer::Protocol::Interface::HoverRegistrationOptions - # @return [HoverRegistrationOptions] a new instance of HoverRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#24 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#4 -class LanguageServer::Protocol::Interface::HoverResult - # @return [HoverResult] a new instance of HoverResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#5 - def initialize(value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#24 - def to_json(*args); end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#14 - def value; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ImplementationClientCapabilities - # @return [ImplementationClientCapabilities] a new instance of ImplementationClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#32 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `ImplementationRegistrationOptions` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#20 - def dynamic_registration; end - - # The client supports additional metadata in the form of definition links. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#28 - def link_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#4 -class LanguageServer::Protocol::Interface::ImplementationOptions - # @return [ImplementationOptions] a new instance of ImplementationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#4 -class LanguageServer::Protocol::Interface::ImplementationParams - # @return [ImplementationParams] a new instance of ImplementationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#4 -class LanguageServer::Protocol::Interface::ImplementationRegistrationOptions - # @return [ImplementationRegistrationOptions] a new instance of ImplementationRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#4 -class LanguageServer::Protocol::Interface::InitializeError - # @return [InitializeError] a new instance of InitializeError - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#5 - def initialize(retry:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#24 - def attributes; end - - # Indicates whether the client execute the following retry logic: - # (1) show the message provided by the ResponseError to the user - # (2) user selects retry or cancel - # (3) if user selected retry the initialize method is sent again. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#20 - def retry; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#4 -class LanguageServer::Protocol::Interface::InitializeParams - # @return [InitializeParams] a new instance of InitializeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#5 - def initialize(process_id:, root_uri:, capabilities:, work_done_token: T.unsafe(nil), client_info: T.unsafe(nil), locale: T.unsafe(nil), root_path: T.unsafe(nil), initialization_options: T.unsafe(nil), trace: T.unsafe(nil), workspace_folders: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#116 - def attributes; end - - # The capabilities provided by the client (editor or tool) - # - # @return [ClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#93 - def capabilities; end - - # Information about the client - # - # @return [{ name: string; version?: string; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#45 - def client_info; end - - # User provided initialization options. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#85 - def initialization_options; end - - # The locale the client is currently showing the user interface - # in. This must not necessarily be the locale of the operating - # system. - # - # Uses IETF language tags as the value's syntax - # (See https://en.wikipedia.org/wiki/IETF_language_tag) - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#58 - def locale; end - - # The process Id of the parent process that started the server. Is null if - # the process has not been started by another process. If the parent - # process is not alive then the server should exit (see exit notification) - # its process. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#37 - def process_id; end - - # The rootPath of the workspace. Is null - # if no folder is open. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#67 - def root_path; end - - # The rootUri of the workspace. Is null if no - # folder is open. If both `rootPath` and `rootUri` are set - # `rootUri` wins. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#77 - def root_uri; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#118 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#122 - def to_json(*args); end - - # The initial trace setting. If omitted trace is disabled ('off'). - # - # @return [TraceValue] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#101 - def trace; end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#26 - def work_done_token; end - - # The workspace folders configured in the client when the server starts. - # This property is only available if the client supports workspace folders. - # It can be `null` if the client supports workspace folders but none are - # configured. - # - # @return [WorkspaceFolder[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#112 - def workspace_folders; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#4 -class LanguageServer::Protocol::Interface::InitializeResult - # @return [InitializeResult] a new instance of InitializeResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#5 - def initialize(capabilities:, server_info: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#30 - def attributes; end - - # The capabilities the language server provides. - # - # @return [ServerCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#18 - def capabilities; end - - # Information about the server. - # - # @return [{ name: string; version?: string; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#26 - def server_info; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#4 -class LanguageServer::Protocol::Interface::InitializedParams - # @return [InitializedParams] a new instance of InitializedParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#5 - def initialize; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#12 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#14 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#18 - def to_json(*args); end -end - -# Inlay hint information. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#7 -class LanguageServer::Protocol::Interface::InlayHint - # @return [InlayHint] a new instance of InlayHint - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#8 - def initialize(position:, label:, kind: T.unsafe(nil), text_edits: T.unsafe(nil), tooltip: T.unsafe(nil), padding_left: T.unsafe(nil), padding_right: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#110 - def attributes; end - - # A data entry field that is preserved on an inlay hint between - # a `textDocument/inlayHint` and a `inlayHint/resolve` request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#106 - def data; end - - # The kind of this hint. Can be omitted in which case the client - # should fall back to a reasonable default. - # - # @return [InlayHintKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#47 - def kind; end - - # The label of this hint. A human readable string or an array of - # InlayHintLabelPart label parts. - # - # *Note* that neither the string nor the label part can be empty. - # - # @return [string | InlayHintLabelPart[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#38 - def label; end - - # Render padding before the hint. - # - # Note: Padding should use the editor's background color, not the - # background color of the hint itself. That means padding can be used - # to visually align/separate an inlay hint. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#85 - def padding_left; end - - # Render padding after the hint. - # - # Note: Padding should use the editor's background color, not the - # background color of the hint itself. That means padding can be used - # to visually align/separate an inlay hint. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#97 - def padding_right; end - - # The position of this hint. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#27 - def position; end - - # Optional text edits that are performed when accepting this inlay hint. - # - # *Note* that edits are expected to change the document so that the inlay - # hint (or its nearest variant) is now part of the document and the inlay - # hint itself is now obsolete. - # - # Depending on the client capability `inlayHint.resolveSupport` clients - # might resolve this property late using the resolve request. - # - # @return [TextEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#62 - def text_edits; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#112 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#116 - def to_json(*args); end - - # The tooltip text when you hover over this item. - # - # Depending on the client capability `inlayHint.resolveSupport` clients - # might resolve this property late using the resolve request. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#73 - def tooltip; end -end - -# Inlay hint client capabilities. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::InlayHintClientCapabilities - # @return [InlayHintClientCapabilities] a new instance of InlayHintClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#8 - def initialize(dynamic_registration: T.unsafe(nil), resolve_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#34 - def attributes; end - - # Whether inlay hints support dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#21 - def dynamic_registration; end - - # Indicates which properties a client can resolve lazily on an inlay - # hint. - # - # @return [{ properties: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#30 - def resolve_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#40 - def to_json(*args); end -end - -# An inlay hint label part allows for interactive and composite labels -# of inlay hints. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#8 -class LanguageServer::Protocol::Interface::InlayHintLabelPart - # @return [InlayHintLabelPart] a new instance of InlayHintLabelPart - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#9 - def initialize(value:, tooltip: T.unsafe(nil), location: T.unsafe(nil), command: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#67 - def attributes; end - - # An optional command for this label part. - # - # Depending on the client capability `inlayHint.resolveSupport` clients - # might resolve this property late using the resolve request. - # - # @return [Command] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#63 - def command; end - - # An optional source code location that represents this - # label part. - # - # The editor will use this location for the hover and for code navigation - # features: This part will become a clickable link that resolves to the - # definition of the symbol at the given location (not necessarily the - # location itself), it shows the hover that shows at the given location, - # and it shows a context menu with further code navigation commands. - # - # Depending on the client capability `inlayHint.resolveSupport` clients - # might resolve this property late using the resolve request. - # - # @return [Location] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#52 - def location; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#69 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#73 - def to_json(*args); end - - # The tooltip text when you hover over this label part. Depending on - # the client capability `inlayHint.resolveSupport` clients might resolve - # this property late using the resolve request. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#34 - def tooltip; end - - # The value of this label part. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#24 - def value; end -end - -# Inlay hint options used during static registration. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#7 -class LanguageServer::Protocol::Interface::InlayHintOptions - # @return [InlayHintOptions] a new instance of InlayHintOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#8 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#31 - def attributes; end - - # The server provides support to resolve additional - # information for an inlay hint item. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#27 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#37 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#18 - def work_done_progress; end -end - -# A parameter literal used in inlay hint requests. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#7 -class LanguageServer::Protocol::Interface::InlayHintParams - # @return [InlayHintParams] a new instance of InlayHintParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#8 - def initialize(text_document:, range:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#42 - def attributes; end - - # The visible document range for which inlay hints should be computed. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#38 - def range; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#30 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#44 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#48 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#22 - def work_done_token; end -end - -# Inlay hint options used during static or dynamic registration. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#7 -class LanguageServer::Protocol::Interface::InlayHintRegistrationOptions - # @return [InlayHintRegistrationOptions] a new instance of InlayHintRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#8 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#51 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#38 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#47 - def id; end - - # The server provides support to resolve additional - # information for an inlay hint item. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#29 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#57 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#20 - def work_done_progress; end -end - -# Client workspace capabilities specific to inlay hints. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::InlayHintWorkspaceClientCapabilities - # @return [InlayHintWorkspaceClientCapabilities] a new instance of InlayHintWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#8 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#30 - def attributes; end - - # Whether the client implementation supports a refresh request sent from - # the server to the client. - # - # Note that this event is global and will force the client to refresh all - # inlay hints currently shown. It should be used with absolute care and - # is useful for situation where a server for example detects a project wide - # change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#26 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#36 - def to_json(*args); end -end - -# Client capabilities specific to inline values. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::InlineValueClientCapabilities - # @return [InlineValueClientCapabilities] a new instance of InlineValueClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#8 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#25 - def attributes; end - - # Whether implementation supports dynamic registration for inline - # value providers. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#21 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#31 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#4 -class LanguageServer::Protocol::Interface::InlineValueContext - # @return [InlineValueContext] a new instance of InlineValueContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#5 - def initialize(frame_id:, stopped_location:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#32 - def attributes; end - - # The stack frame (as a DAP Id) where the execution has stopped. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#18 - def frame_id; end - - # The document range where execution has stopped. - # Typically the end position of the range denotes the line where the - # inline values are shown. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#28 - def stopped_location; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#38 - def to_json(*args); end -end - -# Provide an inline value through an expression evaluation. -# -# If only a range is specified, the expression will be extracted from the -# underlying document. -# -# An optional expression can be used to override the extracted expression. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#12 -class LanguageServer::Protocol::Interface::InlineValueEvaluatableExpression - # @return [InlineValueEvaluatableExpression] a new instance of InlineValueEvaluatableExpression - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#13 - def initialize(range:, expression: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#40 - def attributes; end - - # If specified the expression overrides the extracted expression. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#36 - def expression; end - - # The document range for which the inline value applies. - # The range is used to extract the evaluatable expression from the - # underlying document. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#28 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#46 - def to_json(*args); end -end - -# Inline value options used during static registration. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#7 -class LanguageServer::Protocol::Interface::InlineValueOptions - # @return [InlineValueOptions] a new instance of InlineValueOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#8 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#27 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#17 - def work_done_progress; end -end - -# A parameter literal used in inline value requests. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#7 -class LanguageServer::Protocol::Interface::InlineValueParams - # @return [InlineValueParams] a new instance of InlineValueParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#8 - def initialize(text_document:, range:, context:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#52 - def attributes; end - - # Additional information about the context in which inline values were - # requested. - # - # @return [InlineValueContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#48 - def context; end - - # The document range for which inline values should be computed. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#39 - def range; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#31 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#54 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#58 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#23 - def work_done_token; end -end - -# Inline value options used during static or dynamic registration. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#7 -class LanguageServer::Protocol::Interface::InlineValueRegistrationOptions - # @return [InlineValueRegistrationOptions] a new instance of InlineValueRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#8 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#41 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#28 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#37 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#43 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#47 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#19 - def work_done_progress; end -end - -# Provide inline value as text. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#7 -class LanguageServer::Protocol::Interface::InlineValueText - # @return [InlineValueText] a new instance of InlineValueText - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#8 - def initialize(range:, text:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#33 - def attributes; end - - # The document range for which the inline value applies. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#21 - def range; end - - # The text of the inline value. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#29 - def text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#39 - def to_json(*args); end -end - -# Provide inline value through a variable lookup. -# -# If only a range is specified, the variable name will be extracted from -# the underlying document. -# -# An optional variable name can be used to override the extracted name. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#12 -class LanguageServer::Protocol::Interface::InlineValueVariableLookup - # @return [InlineValueVariableLookup] a new instance of InlineValueVariableLookup - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#13 - def initialize(range:, case_sensitive_lookup:, variable_name: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#49 - def attributes; end - - # How to perform the lookup. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#45 - def case_sensitive_lookup; end - - # The document range for which the inline value applies. - # The range is used to extract the variable name from the underlying - # document. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#29 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#55 - def to_json(*args); end - - # If specified the name of the variable to look up. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#37 - def variable_name; end -end - -# Client workspace capabilities specific to inline values. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::InlineValueWorkspaceClientCapabilities - # @return [InlineValueWorkspaceClientCapabilities] a new instance of InlineValueWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#8 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#30 - def attributes; end - - # Whether the client implementation supports a refresh request sent from - # the server to the client. - # - # Note that this event is global and will force the client to refresh all - # inline values currently shown. It should be used with absolute care and - # is useful for situation where a server for example detect a project wide - # change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#26 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#36 - def to_json(*args); end -end - -# A special text edit to provide an insert and a replace operation. -# -# source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#7 -class LanguageServer::Protocol::Interface::InsertReplaceEdit - # @return [InsertReplaceEdit] a new instance of InsertReplaceEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#8 - def initialize(new_text:, insert:, replace:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#42 - def attributes; end - - # The range if the insert is requested - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#30 - def insert; end - - # The string to be inserted. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#22 - def new_text; end - - # The range if the replace is requested. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#38 - def replace; end - - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#44 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#48 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRangeClientCapabilities - # @return [LinkedEditingRangeClientCapabilities] a new instance of LinkedEditingRangeClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#24 - def attributes; end - - # Whether the implementation supports dynamic registration. - # If this is set to `true` the client supports the new - # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRangeOptions - # @return [LinkedEditingRangeOptions] a new instance of LinkedEditingRangeOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRangeParams - # @return [LinkedEditingRangeParams] a new instance of LinkedEditingRangeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#35 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRangeRegistrationOptions - # @return [LinkedEditingRangeRegistrationOptions] a new instance of LinkedEditingRangeRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRanges - # @return [LinkedEditingRanges] a new instance of LinkedEditingRanges - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#5 - def initialize(ranges:, word_pattern: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#34 - def attributes; end - - # A list of ranges that can be renamed together. The ranges must have - # identical length and contain identical text content. The ranges cannot - # overlap. - # - # @return [Range[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#20 - def ranges; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#40 - def to_json(*args); end - - # An optional word pattern (regular expression) that describes valid - # contents for the given ranges. If no pattern is provided, the client - # configuration's word pattern will be used. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#30 - def word_pattern; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/location.rb#4 -class LanguageServer::Protocol::Interface::Location - # @return [Location] a new instance of Location - # - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#5 - def initialize(uri:, range:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#24 - def attributes; end - - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#20 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#30 - def to_json(*args); end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#15 - def uri; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#4 -class LanguageServer::Protocol::Interface::LocationLink - # @return [LocationLink] a new instance of LocationLink - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#5 - def initialize(target_uri:, target_range:, target_selection_range:, origin_selection_range: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#56 - def attributes; end - - # Span of the origin of this link. - # - # Used as the underlined span for mouse interaction. Defaults to the word - # range at the mouse position. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#23 - def origin_selection_range; end - - # The full target range of this link. If the target for example is a symbol - # then target range is the range enclosing this symbol not including - # leading/trailing whitespace but everything else like comments. This - # information is typically used to highlight the range in the editor. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#42 - def target_range; end - - # The range that should be selected and revealed when this link is being - # followed, e.g the name of a function. Must be contained by the - # `targetRange`. See also `DocumentSymbol#range` - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#52 - def target_selection_range; end - - # The target resource identifier of this link. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#31 - def target_uri; end - - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#58 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#62 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#4 -class LanguageServer::Protocol::Interface::LogMessageParams - # @return [LogMessageParams] a new instance of LogMessageParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#5 - def initialize(type:, message:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#30 - def attributes; end - - # The actual message - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#26 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#36 - def to_json(*args); end - - # The message type. See {@link MessageType} - # - # @return [MessageType] - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#18 - def type; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#4 -class LanguageServer::Protocol::Interface::LogTraceParams - # @return [LogTraceParams] a new instance of LogTraceParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#5 - def initialize(message:, verbose: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#31 - def attributes; end - - # The message to be logged. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#18 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#37 - def to_json(*args); end - - # Additional information that can be computed if the `trace` configuration - # is set to `'verbose'` - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#27 - def verbose; end -end - -# A `MarkupContent` literal represents a string value which content is -# interpreted base on its kind flag. Currently the protocol supports -# `plaintext` and `markdown` as markup kinds. -# -# If the kind is `markdown` then the value can contain fenced code blocks like -# in GitHub issues. -# -# Here is an example how such a string can be constructed using -# JavaScript / TypeScript: -# ```typescript -# let markdown: MarkdownContent = { -# kind: MarkupKind.Markdown, -# value: [ -# '# Header', -# 'Some text', -# '```typescript', -# 'someCode();', -# '```' -# ].join('\n') -# }; -# ``` -# -# *Please Note* that clients might sanitize the return markdown. A client could -# decide to remove HTML from the markdown to avoid script execution. -# -# source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#30 -class LanguageServer::Protocol::Interface::MarkupContent - # @return [MarkupContent] a new instance of MarkupContent - # - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#31 - def initialize(kind:, value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#56 - def attributes; end - - # The type of the Markup - # - # @return [MarkupKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#44 - def kind; end - - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#58 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#62 - def to_json(*args); end - - # The content itself - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#52 - def value; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/message.rb#4 -class LanguageServer::Protocol::Interface::Message - # @return [Message] a new instance of Message - # - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#5 - def initialize(jsonrpc:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#18 - def attributes; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#14 - def jsonrpc; end - - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#24 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#4 -class LanguageServer::Protocol::Interface::MessageActionItem - # @return [MessageActionItem] a new instance of MessageActionItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#5 - def initialize(title:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#21 - def attributes; end - - # A short title like 'Retry', 'Open Log' etc. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#17 - def title; end - - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#27 - def to_json(*args); end -end - -# Moniker definition to match LSIF 0.5 moniker definition. -# -# source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#7 -class LanguageServer::Protocol::Interface::Moniker - # @return [Moniker] a new instance of Moniker - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#8 - def initialize(scheme:, identifier:, unique:, kind: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#52 - def attributes; end - - # The identifier of the moniker. The value is opaque in LSIF however - # schema owners are allowed to define the structure if they want. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#32 - def identifier; end - - # The moniker kind if known. - # - # @return [MonikerKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#48 - def kind; end - - # The scheme of the moniker. For example tsc or .Net - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#23 - def scheme; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#54 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#58 - def to_json(*args); end - - # The scope in which the moniker is unique - # - # @return [UniquenessLevel] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#40 - def unique; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::MonikerClientCapabilities - # @return [MonikerClientCapabilities] a new instance of MonikerClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#24 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `(TextDocumentRegistrationOptions & - # StaticRegistrationOptions)` return value for the corresponding server - # capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#4 -class LanguageServer::Protocol::Interface::MonikerOptions - # @return [MonikerOptions] a new instance of MonikerOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#4 -class LanguageServer::Protocol::Interface::MonikerParams - # @return [MonikerParams] a new instance of MonikerParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#4 -class LanguageServer::Protocol::Interface::MonikerRegistrationOptions - # @return [MonikerRegistrationOptions] a new instance of MonikerRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#24 - def work_done_progress; end -end - -# A notebook cell. -# -# A cell's document URI must be unique across ALL notebook -# cells and can therefore be used to uniquely identify a -# notebook cell or the cell's text document. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#11 -class LanguageServer::Protocol::Interface::NotebookCell - # @return [NotebookCell] a new instance of NotebookCell - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#12 - def initialize(kind:, document:, metadata: T.unsafe(nil), execution_summary: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#57 - def attributes; end - - # The URI of the cell's text document - # content. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#36 - def document; end - - # Additional execution summary information - # if supported by the client. - # - # @return [ExecutionSummary] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#53 - def execution_summary; end - - # The cell's kind - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#27 - def kind; end - - # Additional metadata stored with the cell. - # - # @return [LSPObject] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#44 - def metadata; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#63 - def to_json(*args); end -end - -# A change describing how to move a `NotebookCell` -# array from state S to S'. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#8 -class LanguageServer::Protocol::Interface::NotebookCellArrayChange - # @return [NotebookCellArrayChange] a new instance of NotebookCellArrayChange - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#9 - def initialize(start:, delete_count:, cells: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#43 - def attributes; end - - # The new cells, if any - # - # @return [NotebookCell[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#39 - def cells; end - - # The deleted cells - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#31 - def delete_count; end - - # The start offset of the cell that changed. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#23 - def start; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#45 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#49 - def to_json(*args); end -end - -# A notebook cell text document filter denotes a cell text -# document by different properties. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#8 -class LanguageServer::Protocol::Interface::NotebookCellTextDocumentFilter - # @return [NotebookCellTextDocumentFilter] a new instance of NotebookCellTextDocumentFilter - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#9 - def initialize(notebook:, language: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#40 - def attributes; end - - # A language id like `python`. - # - # Will be matched against the language id of the - # notebook cell document. '*' matches every language. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#36 - def language; end - - # A filter that matches against the notebook - # containing the notebook cell. If a string - # value is provided it matches against the - # notebook type. '*' matches every notebook. - # - # @return [string | NotebookDocumentFilter] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#25 - def notebook; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#46 - def to_json(*args); end -end - -# A notebook document. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocument - # @return [NotebookDocument] a new instance of NotebookDocument - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#8 - def initialize(uri:, notebook_type:, version:, cells:, metadata: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#62 - def attributes; end - - # The cells of a notebook. - # - # @return [NotebookCell[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#58 - def cells; end - - # Additional metadata stored with the notebook - # document. - # - # @return [LSPObject] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#50 - def metadata; end - - # The type of the notebook. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#32 - def notebook_type; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#64 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#68 - def to_json(*args); end - - # The notebook document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#24 - def uri; end - - # The version number of this document (it will increase after each - # change, including undo/redo). - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#41 - def version; end -end - -# A change event for a notebook document. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentChangeEvent - # @return [NotebookDocumentChangeEvent] a new instance of NotebookDocumentChangeEvent - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#8 - def initialize(metadata: T.unsafe(nil), cells: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#33 - def attributes; end - - # Changes to cells - # - # @return [{ structure?: { array: NotebookCellArrayChange; didOpen?: TextDocumentItem[]; didClose?: TextDocumentIdentifier[]; }; data?: NotebookCell[]; textContent?: { ...; }[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#29 - def cells; end - - # The changed meta data if any. - # - # @return [LSPObject] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#21 - def metadata; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#39 - def to_json(*args); end -end - -# Capabilities specific to the notebook document support. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentClientCapabilities - # @return [NotebookDocumentClientCapabilities] a new instance of NotebookDocumentClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#8 - def initialize(synchronization:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#24 - def attributes; end - - # Capabilities specific to notebook document synchronization - # - # @return [NotebookDocumentSyncClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#20 - def synchronization; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#30 - def to_json(*args); end -end - -# A notebook document filter denotes a notebook document by -# different properties. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#8 -class LanguageServer::Protocol::Interface::NotebookDocumentFilter - # @return [NotebookDocumentFilter] a new instance of NotebookDocumentFilter - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#9 - def initialize(notebook_type: T.unsafe(nil), scheme: T.unsafe(nil), pattern: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#67 - def attributes; end - - # The type of the enclosing notebook. - # - # --- OR --- - # - # The type of the enclosing notebook. - # - # --- OR --- - # - # The type of the enclosing notebook. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#31 - def notebook_type; end - - # A glob pattern. - # - # --- OR --- - # - # A glob pattern. - # - # --- OR --- - # - # A glob pattern. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#63 - def pattern; end - - # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. - # - # --- OR --- - # - # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. - # - # --- OR --- - # - # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#47 - def scheme; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#69 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#73 - def to_json(*args); end -end - -# A literal to identify a notebook document in the client. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentIdentifier - # @return [NotebookDocumentIdentifier] a new instance of NotebookDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#8 - def initialize(uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#24 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#30 - def to_json(*args); end - - # The notebook document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#20 - def uri; end -end - -# Notebook specific client capabilities. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentSyncClientCapabilities - # @return [NotebookDocumentSyncClientCapabilities] a new instance of NotebookDocumentSyncClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#8 - def initialize(dynamic_registration: T.unsafe(nil), execution_summary_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#36 - def attributes; end - - # Whether implementation supports dynamic registration. If this is - # set to `true` the client supports the new - # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#24 - def dynamic_registration; end - - # The client supports sending execution summary data per cell. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#32 - def execution_summary_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#42 - def to_json(*args); end -end - -# Options specific to a notebook plus its cells -# to be synced to the server. -# -# If a selector provides a notebook document -# filter but no cell selector all cells of a -# matching notebook document will be synced. -# -# If a selector provides no notebook document -# filter but only a cell selector all notebook -# documents that contain at least one matching -# cell will be synced. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#17 -class LanguageServer::Protocol::Interface::NotebookDocumentSyncOptions - # @return [NotebookDocumentSyncOptions] a new instance of NotebookDocumentSyncOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#18 - def initialize(notebook_selector:, save: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#44 - def attributes; end - - # The notebooks to be synced - # - # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#31 - def notebook_selector; end - - # Whether save notification should be forwarded to - # the server. Will only be honored if mode === `notebook`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#40 - def save; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#50 - def to_json(*args); end -end - -# Registration options specific to a notebook. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentSyncRegistrationOptions - # @return [NotebookDocumentSyncRegistrationOptions] a new instance of NotebookDocumentSyncRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#8 - def initialize(notebook_selector:, save: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#44 - def attributes; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#40 - def id; end - - # The notebooks to be synced - # - # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#22 - def notebook_selector; end - - # Whether save notification should be forwarded to - # the server. Will only be honored if mode === `notebook`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#31 - def save; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#4 -class LanguageServer::Protocol::Interface::NotificationMessage - # @return [NotificationMessage] a new instance of NotificationMessage - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#5 - def initialize(jsonrpc:, method:, params: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#36 - def attributes; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#16 - def jsonrpc; end - - # The method to be invoked. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#24 - def method; end - - # The notification's params. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#32 - def params; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#42 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#4 -class LanguageServer::Protocol::Interface::OptionalVersionedTextDocumentIdentifier - # @return [OptionalVersionedTextDocumentIdentifier] a new instance of OptionalVersionedTextDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#5 - def initialize(uri:, version:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#38 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#44 - def to_json(*args); end - - # The text document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#18 - def uri; end - - # The version number of this document. If an optional versioned text document - # identifier is sent from the server to the client and the file is not - # open in the editor (the server has not received an open notification - # before) the server can send `null` to indicate that the version is - # known and the content on disk is the master (as specified with document - # content ownership). - # - # The version number of a document will increase after each change, - # including undo/redo. The number doesn't need to be consecutive. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#34 - def version; end -end - -# Represents a parameter of a callable-signature. A parameter can -# have a label and a doc-comment. -# -# source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#8 -class LanguageServer::Protocol::Interface::ParameterInformation - # @return [ParameterInformation] a new instance of ParameterInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#9 - def initialize(label:, documentation: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#44 - def attributes; end - - # The human-readable doc-comment of this parameter. Will be shown - # in the UI but can be omitted. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#40 - def documentation; end - - # The label of this parameter information. - # - # Either a string or an inclusive start and exclusive end offsets within - # its containing signature label. (see SignatureInformation.label). The - # offsets are based on a UTF-16 string representation as `Position` and - # `Range` does. - # - # *Note*: a label of type string should be a substring of its containing - # signature label. Its intended use case is to highlight the parameter - # label part in the `SignatureInformation.label`. - # - # @return [string | [number, number]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#31 - def label; end - - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#4 -class LanguageServer::Protocol::Interface::PartialResultParams - # @return [PartialResultParams] a new instance of PartialResultParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#5 - def initialize(partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#22 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#18 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#24 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#28 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/position.rb#4 -class LanguageServer::Protocol::Interface::Position - # @return [Position] a new instance of Position - # - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#5 - def initialize(line:, character:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#34 - def attributes; end - - # Character offset on a line in a document (zero-based). The meaning of this - # offset is determined by the negotiated `PositionEncodingKind`. - # - # If the character value is greater than the line length it defaults back - # to the line length. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#30 - def character; end - - # Line position in a document (zero-based). - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#18 - def line; end - - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#4 -class LanguageServer::Protocol::Interface::PrepareRenameParams - # @return [PrepareRenameParams] a new instance of PrepareRenameParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#35 - def work_done_token; end -end - -# A previous result id in a workspace pull request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#7 -class LanguageServer::Protocol::Interface::PreviousResultId - # @return [PreviousResultId] a new instance of PreviousResultId - # - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#8 - def initialize(uri:, value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#34 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#40 - def to_json(*args); end - - # The URI for which the client knows a - # result id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#22 - def uri; end - - # The value of the previous result id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#30 - def value; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#4 -class LanguageServer::Protocol::Interface::ProgressParams - # @return [ProgressParams] a new instance of ProgressParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#5 - def initialize(token:, value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#30 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#36 - def to_json(*args); end - - # The progress token provided by the client or server. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#18 - def token; end - - # The progress data. - # - # @return [T] - # - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#26 - def value; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::PublishDiagnosticsClientCapabilities - # @return [PublishDiagnosticsClientCapabilities] a new instance of PublishDiagnosticsClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#5 - def initialize(related_information: T.unsafe(nil), tag_support: T.unsafe(nil), version_support: T.unsafe(nil), code_description_support: T.unsafe(nil), data_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#61 - def attributes; end - - # Client supports a codeDescription property - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#47 - def code_description_support; end - - # Whether code action supports the `data` property which is - # preserved between a `textDocument/publishDiagnostics` and - # `textDocument/codeAction` request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#57 - def data_support; end - - # Whether the clients accepts diagnostics with related information. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#21 - def related_information; end - - # Client supports the tag property to provide meta data about a diagnostic. - # Clients supporting tags have to handle unknown tags gracefully. - # - # @return [{ valueSet: DiagnosticTag[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#30 - def tag_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#63 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#67 - def to_json(*args); end - - # Whether the client interprets the version property of the - # `textDocument/publishDiagnostics` notification's parameter. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#39 - def version_support; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#4 -class LanguageServer::Protocol::Interface::PublishDiagnosticsParams - # @return [PublishDiagnosticsParams] a new instance of PublishDiagnosticsParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#5 - def initialize(uri:, diagnostics:, version: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#40 - def attributes; end - - # An array of diagnostic information items. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#36 - def diagnostics; end - - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#46 - def to_json(*args); end - - # The URI for which diagnostic information is reported. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#19 - def uri; end - - # Optional the version number of the document the diagnostics are published - # for. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#28 - def version; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/range.rb#4 -class LanguageServer::Protocol::Interface::Range - # @return [Range] a new instance of Range - # - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#5 - def initialize(start:, end:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#30 - def attributes; end - - # The range's end position. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#26 - def end; end - - # The range's start position. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#18 - def start; end - - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ReferenceClientCapabilities - # @return [ReferenceClientCapabilities] a new instance of ReferenceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#21 - def attributes; end - - # Whether references supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#4 -class LanguageServer::Protocol::Interface::ReferenceContext - # @return [ReferenceContext] a new instance of ReferenceContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#5 - def initialize(include_declaration:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#21 - def attributes; end - - # Include the declaration of the current symbol. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#17 - def include_declaration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#4 -class LanguageServer::Protocol::Interface::ReferenceOptions - # @return [ReferenceOptions] a new instance of ReferenceOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#4 -class LanguageServer::Protocol::Interface::ReferenceParams - # @return [ReferenceParams] a new instance of ReferenceParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#5 - def initialize(text_document:, position:, context:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#55 - def attributes; end - - # @return [ReferenceContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#51 - def context; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#46 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#29 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#21 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#57 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#61 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#37 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#4 -class LanguageServer::Protocol::Interface::ReferenceRegistrationOptions - # @return [ReferenceRegistrationOptions] a new instance of ReferenceRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#24 - def work_done_progress; end -end - -# General parameters to register for a capability. -# -# source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#7 -class LanguageServer::Protocol::Interface::Registration - # @return [Registration] a new instance of Registration - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#8 - def initialize(id:, method:, register_options: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#43 - def attributes; end - - # The id used to register the request. The id can be used to deregister - # the request again. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#23 - def id; end - - # The method / capability to register for. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#31 - def method; end - - # Options necessary for the registration. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#39 - def register_options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#45 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#49 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#4 -class LanguageServer::Protocol::Interface::RegistrationParams - # @return [RegistrationParams] a new instance of RegistrationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#5 - def initialize(registrations:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#18 - def attributes; end - - # @return [Registration[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#14 - def registrations; end - - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#24 - def to_json(*args); end -end - -# Client capabilities specific to regular expressions. -# -# source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::RegularExpressionsClientCapabilities - # @return [RegularExpressionsClientCapabilities] a new instance of RegularExpressionsClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#8 - def initialize(engine:, version: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#33 - def attributes; end - - # The engine's name. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#21 - def engine; end - - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#39 - def to_json(*args); end - - # The engine's version. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#29 - def version; end -end - -# A full diagnostic report with a set of related documents. -# -# source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::RelatedFullDocumentDiagnosticReport - # @return [RelatedFullDocumentDiagnosticReport] a new instance of RelatedFullDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#8 - def initialize(kind:, items:, result_id: T.unsafe(nil), related_documents: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#57 - def attributes; end - - # The actual items. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#41 - def items; end - - # A full document diagnostic report. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#23 - def kind; end - - # Diagnostics of related documents. This information is useful - # in programming languages where code in a file A can generate - # diagnostics in a file B which A depends on. An example of - # such a language is C/C++ where marco definitions in a file - # a.cpp and result in errors in a header file b.hpp. - # - # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#53 - def related_documents; end - - # An optional result id. If provided it will - # be sent on the next diagnostic request for the - # same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#33 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#63 - def to_json(*args); end -end - -# An unchanged diagnostic report with a set of related documents. -# -# source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::RelatedUnchangedDocumentDiagnosticReport - # @return [RelatedUnchangedDocumentDiagnosticReport] a new instance of RelatedUnchangedDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#8 - def initialize(kind:, result_id:, related_documents: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#50 - def attributes; end - - # A document diagnostic report indicating - # no changes to the last result. A server can - # only return `unchanged` if result ids are - # provided. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#25 - def kind; end - - # Diagnostics of related documents. This information is useful - # in programming languages where code in a file A can generate - # diagnostics in a file B which A depends on. An example of - # such a language is C/C++ where marco definitions in a file - # a.cpp and result in errors in a header file b.hpp. - # - # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#46 - def related_documents; end - - # A result id which will be sent on the next - # diagnostic request for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#34 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#56 - def to_json(*args); end -end - -# A relative pattern is a helper to construct glob patterns that are matched -# relatively to a base URI. The common value for a `baseUri` is a workspace -# folder root, but it can be another absolute URI as well. -# -# source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#9 -class LanguageServer::Protocol::Interface::RelativePattern - # @return [RelativePattern] a new instance of RelativePattern - # - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#10 - def initialize(base_uri:, pattern:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#36 - def attributes; end - - # A workspace folder or a base URI to which this pattern will be matched - # against relatively. - # - # @return [string | WorkspaceFolder] - # - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#24 - def base_uri; end - - # The actual glob pattern; - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#32 - def pattern; end - - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#42 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::RenameClientCapabilities - # @return [RenameClientCapabilities] a new instance of RenameClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), prepare_support: T.unsafe(nil), prepare_support_default_behavior: T.unsafe(nil), honors_change_annotations: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#57 - def attributes; end - - # Whether rename supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#20 - def dynamic_registration; end - - # Whether the client honors the change annotations in - # text edits and resource operations returned via the - # rename request's workspace edit by for example presenting - # the workspace edit in the user interface and asking - # for confirmation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#53 - def honors_change_annotations; end - - # Client supports testing for validity of rename operations - # before execution. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#29 - def prepare_support; end - - # Client supports the default behavior result - # (`{ defaultBehavior: boolean }`). - # - # The value indicates the default behavior used by the - # client. - # - # @return [1] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#41 - def prepare_support_default_behavior; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#63 - def to_json(*args); end -end - -# Rename file operation -# -# source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#7 -class LanguageServer::Protocol::Interface::RenameFile - # @return [RenameFile] a new instance of RenameFile - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#8 - def initialize(kind:, old_uri:, new_uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end - - # An optional annotation identifier describing the operation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#56 - def annotation_id; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#60 - def attributes; end - - # A rename - # - # @return ["rename"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#24 - def kind; end - - # The new location. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#40 - def new_uri; end - - # The old (existing) location. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#32 - def old_uri; end - - # Rename options. - # - # @return [RenameFileOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#48 - def options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#62 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#66 - def to_json(*args); end -end - -# Rename file options -# -# source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#7 -class LanguageServer::Protocol::Interface::RenameFileOptions - # @return [RenameFileOptions] a new instance of RenameFileOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#8 - def initialize(overwrite: T.unsafe(nil), ignore_if_exists: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#33 - def attributes; end - - # Ignores if target exists. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#29 - def ignore_if_exists; end - - # Overwrite target if existing. Overwrite wins over `ignoreIfExists` - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#21 - def overwrite; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#39 - def to_json(*args); end -end - -# The parameters sent in notifications/requests for user-initiated renames -# of files. -# -# source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#8 -class LanguageServer::Protocol::Interface::RenameFilesParams - # @return [RenameFilesParams] a new instance of RenameFilesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#9 - def initialize(files:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#26 - def attributes; end - - # An array of all files/folders renamed in this operation. When a folder - # is renamed, only the folder will be included, and not its children. - # - # @return [FileRename[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#22 - def files; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#28 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#32 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#4 -class LanguageServer::Protocol::Interface::RenameOptions - # @return [RenameOptions] a new instance of RenameOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), prepare_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#27 - def attributes; end - - # Renames should be checked and tested before being executed. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#23 - def prepare_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#33 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#4 -class LanguageServer::Protocol::Interface::RenameParams - # @return [RenameParams] a new instance of RenameParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#5 - def initialize(text_document:, position:, new_name:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#50 - def attributes; end - - # The new name of the symbol. If the given name is not valid the - # request must return a [ResponseError](#ResponseError) with an - # appropriate message set. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#46 - def new_name; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#56 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#4 -class LanguageServer::Protocol::Interface::RenameRegistrationOptions - # @return [RenameRegistrationOptions] a new instance of RenameRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), prepare_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#37 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#20 - def document_selector; end - - # Renames should be checked and tested before being executed. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#33 - def prepare_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#43 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#4 -class LanguageServer::Protocol::Interface::RequestMessage - # @return [RequestMessage] a new instance of RequestMessage - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#5 - def initialize(jsonrpc:, id:, method:, params: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#45 - def attributes; end - - # The request id. - # - # @return [string | number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#25 - def id; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#17 - def jsonrpc; end - - # The method to be invoked. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#33 - def method; end - - # The method's params. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#41 - def params; end - - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#47 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#51 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#4 -class LanguageServer::Protocol::Interface::ResponseError - # @return [ResponseError] a new instance of ResponseError - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#5 - def initialize(code:, message:, data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#40 - def attributes; end - - # A number indicating the error type that occurred. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#19 - def code; end - - # A primitive or structured value that contains additional - # information about the error. Can be omitted. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#36 - def data; end - - # A string providing a short description of the error. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#27 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#46 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#4 -class LanguageServer::Protocol::Interface::ResponseMessage - # @return [ResponseMessage] a new instance of ResponseMessage - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#5 - def initialize(jsonrpc:, id:, result: T.unsafe(nil), error: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#46 - def attributes; end - - # The error object in case a request fails. - # - # @return [ResponseError] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#42 - def error; end - - # The request id. - # - # @return [string | number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#25 - def id; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#17 - def jsonrpc; end - - # The result of a request. This member is REQUIRED on success. - # This member MUST NOT exist if there was an error invoking the method. - # - # @return [string | number | boolean | object] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#34 - def result; end - - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#48 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#52 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#4 -class LanguageServer::Protocol::Interface::SaveOptions - # @return [SaveOptions] a new instance of SaveOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#5 - def initialize(include_text: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#21 - def attributes; end - - # The client is supposed to include the content on save. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#17 - def include_text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#4 -class LanguageServer::Protocol::Interface::SelectionRange - # @return [SelectionRange] a new instance of SelectionRange - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#5 - def initialize(range:, parent: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#31 - def attributes; end - - # The parent selection range containing this range. Therefore - # `parent.range` must contain `this.range`. - # - # @return [SelectionRange] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#27 - def parent; end - - # The [range](#Range) of this selection range. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#18 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::SelectionRangeClientCapabilities - # @return [SelectionRangeClientCapabilities] a new instance of SelectionRangeClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#24 - def attributes; end - - # Whether implementation supports dynamic registration for selection range - # providers. If this is set to `true` the client supports the new - # `SelectionRangeRegistrationOptions` return value for the corresponding - # server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#4 -class LanguageServer::Protocol::Interface::SelectionRangeOptions - # @return [SelectionRangeOptions] a new instance of SelectionRangeOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#4 -class LanguageServer::Protocol::Interface::SelectionRangeParams - # @return [SelectionRangeParams] a new instance of SelectionRangeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#5 - def initialize(text_document:, positions:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#29 - def partial_result_token; end - - # The positions inside the text document. - # - # @return [Position[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#45 - def positions; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#37 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#20 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#4 -class LanguageServer::Protocol::Interface::SelectionRangeRegistrationOptions - # @return [SelectionRangeRegistrationOptions] a new instance of SelectionRangeRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#25 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#16 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokens - # @return [SemanticTokens] a new instance of SemanticTokens - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#5 - def initialize(data:, result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#33 - def attributes; end - - # The actual tokens. - # - # @return [number[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#29 - def data; end - - # An optional result id. If provided and clients support delta updating - # the client will include the result id in the next semantic token request. - # A server can then instead of computing all semantic tokens again simply - # send a delta. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#21 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensClientCapabilities - # @return [SemanticTokensClientCapabilities] a new instance of SemanticTokensClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#5 - def initialize(requests:, token_types:, token_modifiers:, formats:, dynamic_registration: T.unsafe(nil), overlapping_token_support: T.unsafe(nil), multiline_token_support: T.unsafe(nil), server_cancel_support: T.unsafe(nil), augments_syntax_tokens: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#113 - def attributes; end - - # Whether the client uses semantic tokens to augment existing - # syntax tokens. If set to `true` client side created syntax - # tokens and semantic tokens are both used for colorization. If - # set to `false` the client only uses the returned semantic tokens - # for colorization. - # - # If the value is `undefined` then the client behavior is not - # specified. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#109 - def augments_syntax_tokens; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `(TextDocumentRegistrationOptions & - # StaticRegistrationOptions)` return value for the corresponding server - # capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#28 - def dynamic_registration; end - - # The formats the clients supports. - # - # @return ["relative"[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#67 - def formats; end - - # Whether the client supports tokens that can span multiple lines. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#83 - def multiline_token_support; end - - # Whether the client supports tokens that can overlap each other. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#75 - def overlapping_token_support; end - - # Which requests the client supports and might send to the server - # depending on the server's capability. Please note that clients might not - # show semantic tokens or degrade some of the user experience if a range - # or full request is advertised by the client but not provided by the - # server. If for example the client capability `requests.full` and - # `request.range` are both set to true but the server only provides a - # range provider the client might not render a minimap correctly or might - # even decide to not show any semantic tokens at all. - # - # @return [{ range?: boolean | {}; full?: boolean | { delta?: boolean; }; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#43 - def requests; end - - # Whether the client allows the server to actively cancel a - # semantic token request, e.g. supports returning - # ErrorCodes.ServerCancelled. If a server does the client - # needs to retrigger the request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#94 - def server_cancel_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#115 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#119 - def to_json(*args); end - - # The token modifiers that the client supports. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#59 - def token_modifiers; end - - # The token types that the client supports. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#51 - def token_types; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensDelta - # @return [SemanticTokensDelta] a new instance of SemanticTokensDelta - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#5 - def initialize(edits:, result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#28 - def attributes; end - - # The semantic token edits to transform a previous result into a new - # result. - # - # @return [SemanticTokensEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#24 - def edits; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#15 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#34 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensDeltaParams - # @return [SemanticTokensDeltaParams] a new instance of SemanticTokensDeltaParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#5 - def initialize(text_document:, previous_result_id:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#50 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#29 - def partial_result_token; end - - # The result id of a previous response. The result Id can either point to - # a full response or a delta response depending on what was received last. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#46 - def previous_result_id; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#37 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#56 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#20 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensDeltaPartialResult - # @return [SemanticTokensDeltaPartialResult] a new instance of SemanticTokensDeltaPartialResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#5 - def initialize(edits:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#18 - def attributes; end - - # @return [SemanticTokensEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#14 - def edits; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#24 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensEdit - # @return [SemanticTokensEdit] a new instance of SemanticTokensEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#5 - def initialize(start:, delete_count:, data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#39 - def attributes; end - - # The elements to insert. - # - # @return [number[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#35 - def data; end - - # The count of elements to remove. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#27 - def delete_count; end - - # The start offset of the edit. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#19 - def start; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#45 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensLegend - # @return [SemanticTokensLegend] a new instance of SemanticTokensLegend - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#5 - def initialize(token_types:, token_modifiers:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#30 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#36 - def to_json(*args); end - - # The token modifiers a server uses. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#26 - def token_modifiers; end - - # The token types a server uses. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#18 - def token_types; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensOptions - # @return [SemanticTokensOptions] a new instance of SemanticTokensOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#5 - def initialize(legend:, work_done_progress: T.unsafe(nil), range: T.unsafe(nil), full: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#46 - def attributes; end - - # Server supports providing semantic tokens for a full document. - # - # @return [boolean | { delta?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#42 - def full; end - - # The legend used by the server - # - # @return [SemanticTokensLegend] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#25 - def legend; end - - # Server supports providing semantic tokens for a specific range - # of a document. - # - # @return [boolean | {}] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#34 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#48 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#52 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#17 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensParams - # @return [SemanticTokensParams] a new instance of SemanticTokensParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#28 - def partial_result_token; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensPartialResult - # @return [SemanticTokensPartialResult] a new instance of SemanticTokensPartialResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#5 - def initialize(data:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#18 - def attributes; end - - # @return [number[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#14 - def data; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#24 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensRangeParams - # @return [SemanticTokensRangeParams] a new instance of SemanticTokensRangeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#5 - def initialize(text_document:, range:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#29 - def partial_result_token; end - - # The range the semantic tokens are requested for. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#45 - def range; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#37 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#20 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensRegistrationOptions - # @return [SemanticTokensRegistrationOptions] a new instance of SemanticTokensRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#5 - def initialize(document_selector:, legend:, work_done_progress: T.unsafe(nil), range: T.unsafe(nil), full: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#66 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#23 - def document_selector; end - - # Server supports providing semantic tokens for a full document. - # - # @return [boolean | { delta?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#53 - def full; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#62 - def id; end - - # The legend used by the server - # - # @return [SemanticTokensLegend] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#36 - def legend; end - - # Server supports providing semantic tokens for a specific range - # of a document. - # - # @return [boolean | {}] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#45 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#68 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#72 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#28 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensWorkspaceClientCapabilities - # @return [SemanticTokensWorkspaceClientCapabilities] a new instance of SemanticTokensWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#5 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#27 - def attributes; end - - # Whether the client implementation supports a refresh request sent from - # the server to the client. - # - # Note that this event is global and will force the client to refresh all - # semantic tokens currently shown. It should be used with absolute care - # and is useful for situation where a server for example detect a project - # wide change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#23 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#33 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ServerCapabilities - # @return [ServerCapabilities] a new instance of ServerCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#5 - def initialize(position_encoding: T.unsafe(nil), text_document_sync: T.unsafe(nil), notebook_document_sync: T.unsafe(nil), completion_provider: T.unsafe(nil), hover_provider: T.unsafe(nil), signature_help_provider: T.unsafe(nil), declaration_provider: T.unsafe(nil), definition_provider: T.unsafe(nil), type_definition_provider: T.unsafe(nil), implementation_provider: T.unsafe(nil), references_provider: T.unsafe(nil), document_highlight_provider: T.unsafe(nil), document_symbol_provider: T.unsafe(nil), code_action_provider: T.unsafe(nil), code_lens_provider: T.unsafe(nil), document_link_provider: T.unsafe(nil), color_provider: T.unsafe(nil), document_formatting_provider: T.unsafe(nil), document_range_formatting_provider: T.unsafe(nil), document_on_type_formatting_provider: T.unsafe(nil), rename_provider: T.unsafe(nil), folding_range_provider: T.unsafe(nil), execute_command_provider: T.unsafe(nil), selection_range_provider: T.unsafe(nil), linked_editing_range_provider: T.unsafe(nil), call_hierarchy_provider: T.unsafe(nil), semantic_tokens_provider: T.unsafe(nil), moniker_provider: T.unsafe(nil), type_hierarchy_provider: T.unsafe(nil), inline_value_provider: T.unsafe(nil), inlay_hint_provider: T.unsafe(nil), diagnostic_provider: T.unsafe(nil), workspace_symbol_provider: T.unsafe(nil), workspace: T.unsafe(nil), experimental: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#340 - def attributes; end - - # The server provides call hierarchy support. - # - # @return [boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#264 - def call_hierarchy_provider; end - - # The server provides code actions. The `CodeActionOptions` return type is - # only valid if the client signals code action literal support via the - # property `textDocument.codeAction.codeActionLiteralSupport`. - # - # @return [boolean | CodeActionOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#166 - def code_action_provider; end - - # The server provides code lens. - # - # @return [CodeLensOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#174 - def code_lens_provider; end - - # The server provides color provider support. - # - # @return [boolean | DocumentColorOptions | DocumentColorRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#190 - def color_provider; end - - # The server provides completion support. - # - # @return [CompletionOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#84 - def completion_provider; end - - # The server provides go to declaration support. - # - # @return [boolean | DeclarationOptions | DeclarationRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#108 - def declaration_provider; end - - # The server provides goto definition support. - # - # @return [boolean | DefinitionOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#116 - def definition_provider; end - - # The server has support for pull model diagnostics. - # - # @return [DiagnosticOptions | DiagnosticRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#312 - def diagnostic_provider; end - - # The server provides document formatting. - # - # @return [boolean | DocumentFormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#198 - def document_formatting_provider; end - - # The server provides document highlight support. - # - # @return [boolean | DocumentHighlightOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#148 - def document_highlight_provider; end - - # The server provides document link support. - # - # @return [DocumentLinkOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#182 - def document_link_provider; end - - # The server provides document formatting on typing. - # - # @return [DocumentOnTypeFormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#214 - def document_on_type_formatting_provider; end - - # The server provides document range formatting. - # - # @return [boolean | DocumentRangeFormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#206 - def document_range_formatting_provider; end - - # The server provides document symbol support. - # - # @return [boolean | DocumentSymbolOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#156 - def document_symbol_provider; end - - # The server provides execute command support. - # - # @return [ExecuteCommandOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#240 - def execute_command_provider; end - - # Experimental server capabilities. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#336 - def experimental; end - - # The server provides folding provider support. - # - # @return [boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#232 - def folding_range_provider; end - - # The server provides hover support. - # - # @return [boolean | HoverOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#92 - def hover_provider; end - - # The server provides goto implementation support. - # - # @return [boolean | ImplementationOptions | ImplementationRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#132 - def implementation_provider; end - - # The server provides inlay hints. - # - # @return [boolean | InlayHintOptions | InlayHintRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#304 - def inlay_hint_provider; end - - # The server provides inline values. - # - # @return [boolean | InlineValueOptions | InlineValueRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#296 - def inline_value_provider; end - - # The server provides linked editing range support. - # - # @return [boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#256 - def linked_editing_range_provider; end - - # Whether server provides moniker support. - # - # @return [boolean | MonikerOptions | MonikerRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#280 - def moniker_provider; end - - # Defines how notebook documents are synced. - # - # @return [NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#76 - def notebook_document_sync; end - - # The position encoding the server picked from the encodings offered - # by the client via the client capability `general.positionEncodings`. - # - # If the client didn't provide any position encodings the only valid - # value that a server can return is 'utf-16'. - # - # If omitted it defaults to 'utf-16'. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#57 - def position_encoding; end - - # The server provides find references support. - # - # @return [boolean | ReferenceOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#140 - def references_provider; end - - # The server provides rename support. RenameOptions may only be - # specified if the client states that it supports - # `prepareSupport` in its initial `initialize` request. - # - # @return [boolean | RenameOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#224 - def rename_provider; end - - # The server provides selection range support. - # - # @return [boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#248 - def selection_range_provider; end - - # The server provides semantic tokens support. - # - # @return [SemanticTokensOptions | SemanticTokensRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#272 - def semantic_tokens_provider; end - - # The server provides signature help support. - # - # @return [SignatureHelpOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#100 - def signature_help_provider; end - - # Defines how text documents are synced. Is either a detailed structure - # defining each notification or for backwards compatibility the - # TextDocumentSyncKind number. If omitted it defaults to - # `TextDocumentSyncKind.None`. - # - # @return [TextDocumentSyncOptions | TextDocumentSyncKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#68 - def text_document_sync; end - - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#342 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#346 - def to_json(*args); end - - # The server provides goto type definition support. - # - # @return [boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#124 - def type_definition_provider; end - - # The server provides type hierarchy support. - # - # @return [boolean | TypeHierarchyOptions | TypeHierarchyRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#288 - def type_hierarchy_provider; end - - # Workspace specific server capabilities - # - # @return [{ workspaceFolders?: WorkspaceFoldersServerCapabilities; fileOperations?: { didCreate?: FileOperationRegistrationOptions; ... 4 more ...; willDelete?: FileOperationRegistrationOptions; }; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#328 - def workspace; end - - # The server provides workspace symbol support. - # - # @return [boolean | WorkspaceSymbolOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#320 - def workspace_symbol_provider; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#4 -class LanguageServer::Protocol::Interface::SetTraceParams - # @return [SetTraceParams] a new instance of SetTraceParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#5 - def initialize(value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#27 - def to_json(*args); end - - # The new value that should be assigned to the trace setting. - # - # @return [TraceValue] - # - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#17 - def value; end -end - -# Client capabilities for the show document request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::ShowDocumentClientCapabilities - # @return [ShowDocumentClientCapabilities] a new instance of ShowDocumentClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#8 - def initialize(support:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#25 - def attributes; end - - # The client has support for the show document - # request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#21 - def support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#31 - def to_json(*args); end -end - -# Params to show a resource. -# -# source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#7 -class LanguageServer::Protocol::Interface::ShowDocumentParams - # @return [ShowDocumentParams] a new instance of ShowDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#8 - def initialize(uri:, external: T.unsafe(nil), take_focus: T.unsafe(nil), selection: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#59 - def attributes; end - - # Indicates to show the resource in an external program. - # To show, for example, `https://code.visualstudio.com/` - # in the default WEB browser set `external` to `true`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#33 - def external; end - - # An optional selection range if the document is a text - # document. Clients might ignore the property if an - # external program is started or the file is not a text - # file. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#55 - def selection; end - - # An optional property to indicate whether the editor - # showing the document should take focus or not. - # Clients might ignore this property if an external - # program is started. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#44 - def take_focus; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#61 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#65 - def to_json(*args); end - - # The uri to show. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#23 - def uri; end -end - -# The result of an show document request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#7 -class LanguageServer::Protocol::Interface::ShowDocumentResult - # @return [ShowDocumentResult] a new instance of ShowDocumentResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#8 - def initialize(success:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#24 - def attributes; end - - # A boolean indicating if the show was successful. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#20 - def success; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#4 -class LanguageServer::Protocol::Interface::ShowMessageParams - # @return [ShowMessageParams] a new instance of ShowMessageParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#5 - def initialize(type:, message:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#30 - def attributes; end - - # The actual message. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#26 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#36 - def to_json(*args); end - - # The message type. See {@link MessageType}. - # - # @return [MessageType] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#18 - def type; end -end - -# Show message request client capabilities -# -# source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::ShowMessageRequestClientCapabilities - # @return [ShowMessageRequestClientCapabilities] a new instance of ShowMessageRequestClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#8 - def initialize(message_action_item: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#24 - def attributes; end - - # Capabilities specific to the `MessageActionItem` type. - # - # @return [{ additionalPropertiesSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#20 - def message_action_item; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#4 -class LanguageServer::Protocol::Interface::ShowMessageRequestParams - # @return [ShowMessageRequestParams] a new instance of ShowMessageRequestParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#5 - def initialize(type:, message:, actions: T.unsafe(nil)); end - - # The message action items to present. - # - # @return [MessageActionItem[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#35 - def actions; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#39 - def attributes; end - - # The actual message - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#27 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#45 - def to_json(*args); end - - # The message type. See {@link MessageType} - # - # @return [MessageType] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#19 - def type; end -end - -# Signature help represents the signature of something -# callable. There can be multiple signature but only one -# active and only one active parameter. -# -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#9 -class LanguageServer::Protocol::Interface::SignatureHelp - # @return [SignatureHelp] a new instance of SignatureHelp - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#10 - def initialize(signatures:, active_signature: T.unsafe(nil), active_parameter: T.unsafe(nil)); end - - # The active parameter of the active signature. If omitted or the value - # lies outside the range of `signatures[activeSignature].parameters` - # defaults to 0 if the active signature has parameters. If - # the active signature has no parameters it is ignored. - # In future version of the protocol this property might become - # mandatory to better express the active parameter if the - # active signature does have any. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#55 - def active_parameter; end - - # The active signature. If omitted or the value lies outside the - # range of `signatures` the value defaults to zero or is ignore if - # the `SignatureHelp` as no signatures. - # - # Whenever possible implementors should make an active decision about - # the active signature and shouldn't rely on a default value. - # - # In future version of the protocol this property might become - # mandatory to better express this. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#41 - def active_signature; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#59 - def attributes; end - - # One or more signatures. If no signatures are available the signature help - # request should return `null`. - # - # @return [SignatureInformation[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#25 - def signatures; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#61 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#65 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::SignatureHelpClientCapabilities - # @return [SignatureHelpClientCapabilities] a new instance of SignatureHelpClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), signature_information: T.unsafe(nil), context_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#43 - def attributes; end - - # The client supports to send additional context information for a - # `textDocument/signatureHelp` request. A client that opts into - # contextSupport will also support the `retriggerCharacters` on - # `SignatureHelpOptions`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#39 - def context_support; end - - # Whether signature help supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#19 - def dynamic_registration; end - - # The client supports the following `SignatureInformation` - # specific properties. - # - # @return [{ documentationFormat?: MarkupKind[]; parameterInformation?: { labelOffsetSupport?: boolean; }; activeParameterSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#28 - def signature_information; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#45 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#49 - def to_json(*args); end -end - -# Additional information about the context in which a signature help request -# was triggered. -# -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#8 -class LanguageServer::Protocol::Interface::SignatureHelpContext - # @return [SignatureHelpContext] a new instance of SignatureHelpContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#9 - def initialize(trigger_kind:, is_retrigger:, trigger_character: T.unsafe(nil), active_signature_help: T.unsafe(nil)); end - - # The currently active `SignatureHelp`. - # - # The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field - # updated based on the user navigating through available signatures. - # - # @return [SignatureHelp] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#58 - def active_signature_help; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#62 - def attributes; end - - # `true` if signature help was already showing when it was triggered. - # - # Retriggers occur when the signature help is already active and can be - # caused by actions such as typing a trigger character, a cursor move, or - # document content changes. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#47 - def is_retrigger; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#64 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#68 - def to_json(*args); end - - # Character that caused signature help to be triggered. - # - # This is undefined when triggerKind !== - # SignatureHelpTriggerKind.TriggerCharacter - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#35 - def trigger_character; end - - # Action that caused signature help to be triggered. - # - # @return [SignatureHelpTriggerKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#24 - def trigger_kind; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#4 -class LanguageServer::Protocol::Interface::SignatureHelpOptions - # @return [SignatureHelpOptions] a new instance of SignatureHelpOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), retrigger_characters: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#41 - def attributes; end - - # List of characters that re-trigger signature help. - # - # These trigger characters are only active when signature help is already - # showing. All trigger characters are also counted as re-trigger - # characters. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#37 - def retrigger_characters; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#43 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#47 - def to_json(*args); end - - # The characters that trigger signature help - # automatically. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#25 - def trigger_characters; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#16 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#4 -class LanguageServer::Protocol::Interface::SignatureHelpParams - # @return [SignatureHelpParams] a new instance of SignatureHelpParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), context: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#50 - def attributes; end - - # The signature help context. This is only available if the client - # specifies to send this using the client capability - # `textDocument.signatureHelp.contextSupport === true` - # - # @return [SignatureHelpContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#46 - def context; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#56 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#4 -class LanguageServer::Protocol::Interface::SignatureHelpRegistrationOptions - # @return [SignatureHelpRegistrationOptions] a new instance of SignatureHelpRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), retrigger_characters: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#51 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#21 - def document_selector; end - - # List of characters that re-trigger signature help. - # - # These trigger characters are only active when signature help is already - # showing. All trigger characters are also counted as re-trigger - # characters. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#47 - def retrigger_characters; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#57 - def to_json(*args); end - - # The characters that trigger signature help - # automatically. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#35 - def trigger_characters; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#26 - def work_done_progress; end -end - -# Represents the signature of something callable. A signature -# can have a label, like a function-name, a doc-comment, and -# a set of parameters. -# -# source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#9 -class LanguageServer::Protocol::Interface::SignatureInformation - # @return [SignatureInformation] a new instance of SignatureInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#10 - def initialize(label:, documentation: T.unsafe(nil), parameters: T.unsafe(nil), active_parameter: T.unsafe(nil)); end - - # The index of the active parameter. - # - # If provided, this is used in place of `SignatureHelp.activeParameter`. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#53 - def active_parameter; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#57 - def attributes; end - - # The human-readable doc-comment of this signature. Will be shown - # in the UI but can be omitted. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#35 - def documentation; end - - # The label of this signature. Will be shown in - # the UI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#26 - def label; end - - # The parameters of this signature. - # - # @return [ParameterInformation[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#43 - def parameters; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#63 - def to_json(*args); end -end - -# Static registration options to be returned in the initialize request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#7 -class LanguageServer::Protocol::Interface::StaticRegistrationOptions - # @return [StaticRegistrationOptions] a new instance of StaticRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#8 - def initialize(id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#25 - def attributes; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#21 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#31 - def to_json(*args); end -end - -# Represents information about programming constructs like variables, classes, -# interfaces etc. -# -# source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#8 -class LanguageServer::Protocol::Interface::SymbolInformation - # @return [SymbolInformation] a new instance of SymbolInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#9 - def initialize(name:, kind:, location:, tags: T.unsafe(nil), deprecated: T.unsafe(nil), container_name: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#81 - def attributes; end - - # The name of the symbol containing this symbol. This information is for - # user interface purposes (e.g. to render a qualifier in the user interface - # if necessary). It can't be used to re-infer a hierarchy for the document - # symbols. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#77 - def container_name; end - - # Indicates if this symbol is deprecated. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#50 - def deprecated; end - - # The kind of this symbol. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#34 - def kind; end - - # The location of this symbol. The location's range is used by a tool - # to reveal the location in the editor. If the symbol is selected in the - # tool the range's start information is used to position the cursor. So - # the range usually spans more then the actual symbol's name and does - # normally include things like visibility modifiers. - # - # The range doesn't have to denote a node range in the sense of an abstract - # syntax tree. It can therefore not be used to re-construct a hierarchy of - # the symbols. - # - # @return [Location] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#66 - def location; end - - # The name of this symbol. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#26 - def name; end - - # Tags for this symbol. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#42 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#83 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#87 - def to_json(*args); end -end - -# Describe options to be used when registering for text document change events. -# -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#7 -class LanguageServer::Protocol::Interface::TextDocumentChangeRegistrationOptions - # @return [TextDocumentChangeRegistrationOptions] a new instance of TextDocumentChangeRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#8 - def initialize(document_selector:, sync_kind:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#35 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#22 - def document_selector; end - - # How documents are synced to the server. See TextDocumentSyncKind.Full - # and TextDocumentSyncKind.Incremental. - # - # @return [TextDocumentSyncKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#31 - def sync_kind; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#37 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#41 - def to_json(*args); end -end - -# Text document specific client capabilities. -# -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::TextDocumentClientCapabilities - # @return [TextDocumentClientCapabilities] a new instance of TextDocumentClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#8 - def initialize(synchronization: T.unsafe(nil), completion: T.unsafe(nil), hover: T.unsafe(nil), signature_help: T.unsafe(nil), declaration: T.unsafe(nil), definition: T.unsafe(nil), type_definition: T.unsafe(nil), implementation: T.unsafe(nil), references: T.unsafe(nil), document_highlight: T.unsafe(nil), document_symbol: T.unsafe(nil), code_action: T.unsafe(nil), code_lens: T.unsafe(nil), document_link: T.unsafe(nil), color_provider: T.unsafe(nil), formatting: T.unsafe(nil), range_formatting: T.unsafe(nil), on_type_formatting: T.unsafe(nil), rename: T.unsafe(nil), publish_diagnostics: T.unsafe(nil), folding_range: T.unsafe(nil), selection_range: T.unsafe(nil), linked_editing_range: T.unsafe(nil), call_hierarchy: T.unsafe(nil), semantic_tokens: T.unsafe(nil), moniker: T.unsafe(nil), type_hierarchy: T.unsafe(nil), inline_value: T.unsafe(nil), inlay_hint: T.unsafe(nil), diagnostic: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#285 - def attributes; end - - # Capabilities specific to the various call hierarchy requests. - # - # @return [CallHierarchyClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#233 - def call_hierarchy; end - - # Capabilities specific to the `textDocument/codeAction` request. - # - # @return [CodeActionClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#134 - def code_action; end - - # Capabilities specific to the `textDocument/codeLens` request. - # - # @return [CodeLensClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#142 - def code_lens; end - - # Capabilities specific to the `textDocument/documentColor` and the - # `textDocument/colorPresentation` request. - # - # @return [DocumentColorClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#159 - def color_provider; end - - # Capabilities specific to the `textDocument/completion` request. - # - # @return [CompletionClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#54 - def completion; end - - # Capabilities specific to the `textDocument/declaration` request. - # - # @return [DeclarationClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#78 - def declaration; end - - # Capabilities specific to the `textDocument/definition` request. - # - # @return [DefinitionClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#86 - def definition; end - - # Capabilities specific to the diagnostic pull model. - # - # @return [DiagnosticClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#281 - def diagnostic; end - - # Capabilities specific to the `textDocument/documentHighlight` request. - # - # @return [DocumentHighlightClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#118 - def document_highlight; end - - # Capabilities specific to the `textDocument/documentLink` request. - # - # @return [DocumentLinkClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#150 - def document_link; end - - # Capabilities specific to the `textDocument/documentSymbol` request. - # - # @return [DocumentSymbolClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#126 - def document_symbol; end - - # Capabilities specific to the `textDocument/foldingRange` request. - # - # @return [FoldingRangeClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#209 - def folding_range; end - - # Capabilities specific to the `textDocument/formatting` request. - # - # @return [DocumentFormattingClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#167 - def formatting; end - - # Capabilities specific to the `textDocument/hover` request. - # - # @return [HoverClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#62 - def hover; end - - # Capabilities specific to the `textDocument/implementation` request. - # - # @return [ImplementationClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#102 - def implementation; end - - # Capabilities specific to the `textDocument/inlayHint` request. - # - # @return [InlayHintClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#273 - def inlay_hint; end - - # Capabilities specific to the `textDocument/inlineValue` request. - # - # @return [InlineValueClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#265 - def inline_value; end - - # Capabilities specific to the `textDocument/linkedEditingRange` request. - # - # @return [LinkedEditingRangeClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#225 - def linked_editing_range; end - - # Capabilities specific to the `textDocument/moniker` request. - # - # @return [MonikerClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#249 - def moniker; end - - # request. - # Capabilities specific to the `textDocument/onTypeFormatting` request. - # - # @return [DocumentOnTypeFormattingClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#184 - def on_type_formatting; end - - # Capabilities specific to the `textDocument/publishDiagnostics` - # notification. - # - # @return [PublishDiagnosticsClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#201 - def publish_diagnostics; end - - # Capabilities specific to the `textDocument/rangeFormatting` request. - # - # @return [DocumentRangeFormattingClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#175 - def range_formatting; end - - # Capabilities specific to the `textDocument/references` request. - # - # @return [ReferenceClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#110 - def references; end - - # Capabilities specific to the `textDocument/rename` request. - # - # @return [RenameClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#192 - def rename; end - - # Capabilities specific to the `textDocument/selectionRange` request. - # - # @return [SelectionRangeClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#217 - def selection_range; end - - # Capabilities specific to the various semantic token requests. - # - # @return [SemanticTokensClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#241 - def semantic_tokens; end - - # Capabilities specific to the `textDocument/signatureHelp` request. - # - # @return [SignatureHelpClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#70 - def signature_help; end - - # @return [TextDocumentSyncClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#46 - def synchronization; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#287 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#291 - def to_json(*args); end - - # Capabilities specific to the `textDocument/typeDefinition` request. - # - # @return [TypeDefinitionClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#94 - def type_definition; end - - # Capabilities specific to the various type hierarchy requests. - # - # @return [TypeHierarchyClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#257 - def type_hierarchy; end -end - -# An event describing a change to a text document. If only a text is provided -# it is considered to be the full content of the document. -# -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#8 -class LanguageServer::Protocol::Interface::TextDocumentContentChangeEvent - # @return [TextDocumentContentChangeEvent] a new instance of TextDocumentContentChangeEvent - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#9 - def initialize(text:, range: T.unsafe(nil), range_length: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#47 - def attributes; end - - # The range of the document that changed. - # - # @return [Range, nil] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#23 - def range; end - - # The optional length of the range that got replaced. - # - # @return [number, nil] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#31 - def range_length; end - - # The new text for the provided range. - # - # --- OR --- - # - # The new text of the whole document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#43 - def text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#49 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#53 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentEdit - # @return [TextDocumentEdit] a new instance of TextDocumentEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#5 - def initialize(text_document:, edits:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#30 - def attributes; end - - # The edits to be applied. - # - # @return [(TextEdit | AnnotatedTextEdit)[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#26 - def edits; end - - # The text document to change. - # - # @return [OptionalVersionedTextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#18 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentIdentifier - # @return [TextDocumentIdentifier] a new instance of TextDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#5 - def initialize(uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#27 - def to_json(*args); end - - # The text document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#17 - def uri; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentItem - # @return [TextDocumentItem] a new instance of TextDocumentItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#5 - def initialize(uri:, language_id:, version:, text:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#49 - def attributes; end - - # The text document's language identifier. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#28 - def language_id; end - - # The content of the opened text document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#45 - def text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#55 - def to_json(*args); end - - # The text document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#20 - def uri; end - - # The version number of this document (it will increase after each - # change, including undo/redo). - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#37 - def version; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentPositionParams - # @return [TextDocumentPositionParams] a new instance of TextDocumentPositionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#5 - def initialize(text_document:, position:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#30 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#26 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#18 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#36 - def to_json(*args); end -end - -# General text document registration options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#7 -class LanguageServer::Protocol::Interface::TextDocumentRegistrationOptions - # @return [TextDocumentRegistrationOptions] a new instance of TextDocumentRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#8 - def initialize(document_selector:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#25 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#21 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#31 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentSaveRegistrationOptions - # @return [TextDocumentSaveRegistrationOptions] a new instance of TextDocumentSaveRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#5 - def initialize(document_selector:, include_text: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#31 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#19 - def document_selector; end - - # The client is supposed to include the content on save. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#27 - def include_text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentSyncClientCapabilities - # @return [TextDocumentSyncClientCapabilities] a new instance of TextDocumentSyncClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), will_save: T.unsafe(nil), will_save_wait_until: T.unsafe(nil), did_save: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#50 - def attributes; end - - # The client supports did save notifications. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#46 - def did_save; end - - # Whether text document synchronization supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#56 - def to_json(*args); end - - # The client supports sending will save notifications. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#28 - def will_save; end - - # The client supports sending a will save request and - # waits for a response providing text edits which will - # be applied to the document before it is saved. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#38 - def will_save_wait_until; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentSyncOptions - # @return [TextDocumentSyncOptions] a new instance of TextDocumentSyncOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#5 - def initialize(open_close: T.unsafe(nil), change: T.unsafe(nil), will_save: T.unsafe(nil), will_save_wait_until: T.unsafe(nil), save: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#66 - def attributes; end - - # Change notifications are sent to the server. See - # TextDocumentSyncKind.None, TextDocumentSyncKind.Full and - # TextDocumentSyncKind.Incremental. If omitted it defaults to - # TextDocumentSyncKind.None. - # - # @return [TextDocumentSyncKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#35 - def change; end - - # Open and close notifications are sent to the server. If omitted open - # close notifications should not be sent. - # Open and close notifications are sent to the server. If omitted open - # close notification should not be sent. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#24 - def open_close; end - - # If present save notifications are sent to the server. If omitted the - # notification should not be sent. - # - # @return [boolean | SaveOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#62 - def save; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#68 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#72 - def to_json(*args); end - - # If present will save notifications are sent to the server. If omitted - # the notification should not be sent. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#44 - def will_save; end - - # If present will save wait until requests are sent to the server. If - # omitted the request should not be sent. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#53 - def will_save_wait_until; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#4 -class LanguageServer::Protocol::Interface::TextEdit - # @return [TextEdit] a new instance of TextEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#5 - def initialize(range:, new_text:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#32 - def attributes; end - - # The string to be inserted. For delete operations use an - # empty string. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#28 - def new_text; end - - # The range of the text document to be manipulated. To insert - # text into a document create a range where start === end. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#19 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::TypeDefinitionClientCapabilities - # @return [TypeDefinitionClientCapabilities] a new instance of TypeDefinitionClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#32 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `TypeDefinitionRegistrationOptions` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#20 - def dynamic_registration; end - - # The client supports additional metadata in the form of definition links. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#28 - def link_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#4 -class LanguageServer::Protocol::Interface::TypeDefinitionOptions - # @return [TypeDefinitionOptions] a new instance of TypeDefinitionOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#4 -class LanguageServer::Protocol::Interface::TypeDefinitionParams - # @return [TypeDefinitionParams] a new instance of TypeDefinitionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#4 -class LanguageServer::Protocol::Interface::TypeDefinitionRegistrationOptions - # @return [TypeDefinitionRegistrationOptions] a new instance of TypeDefinitionRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchyItem - # @return [TypeHierarchyItem] a new instance of TypeHierarchyItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#5 - def initialize(name:, kind:, uri:, range:, selection_range:, tags: T.unsafe(nil), detail: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#90 - def attributes; end - - # A data entry field that is preserved between a type hierarchy prepare and - # supertypes or subtypes requests. It could also be used to identify the - # type hierarchy in the server, helping improve the performance on - # resolving supertypes and subtypes. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#86 - def data; end - - # More detail for this item, e.g. the signature of a function. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#48 - def detail; end - - # The kind of this item. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#32 - def kind; end - - # The name of this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#24 - def name; end - - # The range enclosing this symbol not including leading/trailing whitespace - # but everything else, e.g. comments and code. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#65 - def range; end - - # The range that should be selected and revealed when this symbol is being - # picked, e.g. the name of a function. Must be contained by the - # [`range`](#TypeHierarchyItem.range). - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#75 - def selection_range; end - - # Tags for this item. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#40 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#92 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#96 - def to_json(*args); end - - # The resource identifier of this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#56 - def uri; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchyOptions - # @return [TypeHierarchyOptions] a new instance of TypeHierarchyOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchyPrepareParams - # @return [TypeHierarchyPrepareParams] a new instance of TypeHierarchyPrepareParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#35 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchyRegistrationOptions - # @return [TypeHierarchyRegistrationOptions] a new instance of TypeHierarchyRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchySubtypesParams - # @return [TypeHierarchySubtypesParams] a new instance of TypeHierarchySubtypesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#5 - def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#37 - def attributes; end - - # @return [TypeHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#33 - def item; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#28 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#43 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchySupertypesParams - # @return [TypeHierarchySupertypesParams] a new instance of TypeHierarchySupertypesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#5 - def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#37 - def attributes; end - - # @return [TypeHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#33 - def item; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#28 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#43 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#19 - def work_done_token; end -end - -# A diagnostic report indicating that the last returned -# report is still accurate. -# -# source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#8 -class LanguageServer::Protocol::Interface::UnchangedDocumentDiagnosticReport - # @return [UnchangedDocumentDiagnosticReport] a new instance of UnchangedDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#9 - def initialize(kind:, result_id:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#38 - def attributes; end - - # A document diagnostic report indicating - # no changes to the last result. A server can - # only return `unchanged` if result ids are - # provided. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#25 - def kind; end - - # A result id which will be sent on the next - # diagnostic request for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#34 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#44 - def to_json(*args); end -end - -# General parameters to unregister a capability. -# -# source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#7 -class LanguageServer::Protocol::Interface::Unregistration - # @return [Unregistration] a new instance of Unregistration - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#8 - def initialize(id:, method:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#34 - def attributes; end - - # The id used to unregister the request or notification. Usually an id - # provided during the register request. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#22 - def id; end - - # The method / capability to unregister for. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#30 - def method; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#4 -class LanguageServer::Protocol::Interface::UnregistrationParams - # @return [UnregistrationParams] a new instance of UnregistrationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#5 - def initialize(unregisterations:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#24 - def to_json(*args); end - - # @return [Unregistration[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#14 - def unregisterations; end -end - -# A versioned notebook document identifier. -# -# source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#7 -class LanguageServer::Protocol::Interface::VersionedNotebookDocumentIdentifier - # @return [VersionedNotebookDocumentIdentifier] a new instance of VersionedNotebookDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#8 - def initialize(version:, uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#33 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#39 - def to_json(*args); end - - # The notebook document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#29 - def uri; end - - # The version number of this notebook document. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#21 - def version; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#4 -class LanguageServer::Protocol::Interface::VersionedTextDocumentIdentifier - # @return [VersionedTextDocumentIdentifier] a new instance of VersionedTextDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#5 - def initialize(uri:, version:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#33 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#39 - def to_json(*args); end - - # The text document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#18 - def uri; end - - # The version number of this document. - # - # The version number of a document will increase after each change, - # including undo/redo. The number doesn't need to be consecutive. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#29 - def version; end -end - -# The parameters send in a will save text document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#7 -class LanguageServer::Protocol::Interface::WillSaveTextDocumentParams - # @return [WillSaveTextDocumentParams] a new instance of WillSaveTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#8 - def initialize(text_document:, reason:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#33 - def attributes; end - - # The 'TextDocumentSaveReason'. - # - # @return [TextDocumentSaveReason] - # - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#29 - def reason; end - - # The document that will be saved. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#21 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressBegin - # @return [WorkDoneProgressBegin] a new instance of WorkDoneProgressBegin - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#5 - def initialize(kind:, title:, cancellable: T.unsafe(nil), message: T.unsafe(nil), percentage: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#68 - def attributes; end - - # Controls if a cancel button should show to allow the user to cancel the - # long running operation. Clients that don't support cancellation are - # allowed to ignore the setting. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#39 - def cancellable; end - - # @return ["begin"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#18 - def kind; end - - # Optional, more detailed associated progress message. Contains - # complementary information to the `title`. - # - # Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". - # If unset, the previous progress message (if any) is still valid. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#51 - def message; end - - # Optional progress percentage to display (value 100 is considered 100%). - # If not provided infinite progress is assumed and clients are allowed - # to ignore the `percentage` value in subsequent in report notifications. - # - # The value should be steadily rising. Clients are free to ignore values - # that are not following this rule. The value range is [0, 100] - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#64 - def percentage; end - - # Mandatory title of the progress operation. Used to briefly inform about - # the kind of operation being performed. - # - # Examples: "Indexing" or "Linking dependencies". - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#29 - def title; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#70 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#74 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressCancelParams - # @return [WorkDoneProgressCancelParams] a new instance of WorkDoneProgressCancelParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#5 - def initialize(token:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#27 - def to_json(*args); end - - # The token to be used to report progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#17 - def token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressCreateParams - # @return [WorkDoneProgressCreateParams] a new instance of WorkDoneProgressCreateParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#5 - def initialize(token:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#27 - def to_json(*args); end - - # The token to be used to report progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#17 - def token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressEnd - # @return [WorkDoneProgressEnd] a new instance of WorkDoneProgressEnd - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#5 - def initialize(kind:, message: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#28 - def attributes; end - - # @return ["end"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#15 - def kind; end - - # Optional, a final message indicating to for example indicate the outcome - # of the operation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#24 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#34 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressOptions - # @return [WorkDoneProgressOptions] a new instance of WorkDoneProgressOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressParams - # @return [WorkDoneProgressParams] a new instance of WorkDoneProgressParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#5 - def initialize(work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#27 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#17 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressReport - # @return [WorkDoneProgressReport] a new instance of WorkDoneProgressReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#5 - def initialize(kind:, cancellable: T.unsafe(nil), message: T.unsafe(nil), percentage: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#58 - def attributes; end - - # Controls enablement state of a cancel button. This property is only valid - # if a cancel button got requested in the `WorkDoneProgressBegin` payload. - # - # Clients that don't support cancellation or don't support control the - # button's enablement state are allowed to ignore the setting. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#29 - def cancellable; end - - # @return ["report"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#17 - def kind; end - - # Optional, more detailed associated progress message. Contains - # complementary information to the `title`. - # - # Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". - # If unset, the previous progress message (if any) is still valid. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#41 - def message; end - - # Optional progress percentage to display (value 100 is considered 100%). - # If not provided infinite progress is assumed and clients are allowed - # to ignore the `percentage` value in subsequent in report notifications. - # - # The value should be steadily rising. Clients are free to ignore values - # that are not following this rule. The value range is [0, 100] - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#54 - def percentage; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#60 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#64 - def to_json(*args); end -end - -# Parameters of the workspace diagnostic request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceDiagnosticParams - # @return [WorkspaceDiagnosticParams] a new instance of WorkspaceDiagnosticParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#8 - def initialize(previous_result_ids:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), identifier: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#53 - def attributes; end - - # The additional identifier provided during registration. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#40 - def identifier; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#32 - def partial_result_token; end - - # The currently known diagnostic reports with their - # previous result ids. - # - # @return [PreviousResultId[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#49 - def previous_result_ids; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#55 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#59 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#23 - def work_done_token; end -end - -# A workspace diagnostic report. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceDiagnosticReport - # @return [WorkspaceDiagnosticReport] a new instance of WorkspaceDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#8 - def initialize(items:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#21 - def attributes; end - - # @return [WorkspaceDocumentDiagnosticReport[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#17 - def items; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#27 - def to_json(*args); end -end - -# A partial result for a workspace diagnostic report. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceDiagnosticReportPartialResult - # @return [WorkspaceDiagnosticReportPartialResult] a new instance of WorkspaceDiagnosticReportPartialResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#8 - def initialize(items:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#21 - def attributes; end - - # @return [WorkspaceDocumentDiagnosticReport[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#17 - def items; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceEdit - # @return [WorkspaceEdit] a new instance of WorkspaceEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#5 - def initialize(changes: T.unsafe(nil), document_changes: T.unsafe(nil), change_annotations: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#56 - def attributes; end - - # A map of change annotations that can be referenced in - # `AnnotatedTextEdit`s or create, rename and delete file / folder - # operations. - # - # Whether clients honor this property depends on the client capability - # `workspace.changeAnnotationSupport`. - # - # @return [{ [id: string]: ChangeAnnotation; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#52 - def change_annotations; end - - # Holds changes to existing resources. - # - # @return [{}] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#19 - def changes; end - - # Depending on the client capability - # `workspace.workspaceEdit.resourceOperations` document changes are either - # an array of `TextDocumentEdit`s to express changes to n different text - # documents where each text document edit addresses a specific version of - # a text document. Or it can contain above `TextDocumentEdit`s mixed with - # create, rename and delete file / folder operations. - # - # Whether a client supports versioned document edits is expressed via - # `workspace.workspaceEdit.documentChanges` client capability. - # - # If a client neither supports `documentChanges` nor - # `workspace.workspaceEdit.resourceOperations` then only plain `TextEdit`s - # using the `changes` property are supported. - # - # @return [TextDocumentEdit[] | (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#39 - def document_changes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#58 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#62 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceEditClientCapabilities - # @return [WorkspaceEditClientCapabilities] a new instance of WorkspaceEditClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#5 - def initialize(document_changes: T.unsafe(nil), resource_operations: T.unsafe(nil), failure_handling: T.unsafe(nil), normalizes_line_endings: T.unsafe(nil), change_annotation_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#63 - def attributes; end - - # Whether the client in general supports change annotations on text edits, - # create file, rename file and delete file changes. - # - # @return [{ groupsOnLabel?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#59 - def change_annotation_support; end - - # The client supports versioned document changes in `WorkspaceEdit`s - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#21 - def document_changes; end - - # The failure handling strategy of a client if applying the workspace edit - # fails. - # - # @return [FailureHandlingKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#39 - def failure_handling; end - - # Whether the client normalizes line endings to the client specific - # setting. - # If set to `true` the client will normalize line ending characters - # in a workspace edit to the client specific new line character(s). - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#50 - def normalizes_line_endings; end - - # The resource operations the client supports. Clients should at least - # support 'create', 'rename' and 'delete' files and folders. - # - # @return [ResourceOperationKind[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#30 - def resource_operations; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#65 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#69 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceFolder - # @return [WorkspaceFolder] a new instance of WorkspaceFolder - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#5 - def initialize(uri:, name:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#31 - def attributes; end - - # The name of the workspace folder. Used to refer to this - # workspace folder in the user interface. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#27 - def name; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#37 - def to_json(*args); end - - # The associated URI for this workspace folder. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#18 - def uri; end -end - -# The workspace folder change event. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceFoldersChangeEvent - # @return [WorkspaceFoldersChangeEvent] a new instance of WorkspaceFoldersChangeEvent - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#8 - def initialize(added:, removed:); end - - # The array of added workspace folders - # - # @return [WorkspaceFolder[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#21 - def added; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#33 - def attributes; end - - # The array of the removed workspace folders - # - # @return [WorkspaceFolder[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#29 - def removed; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceFoldersServerCapabilities - # @return [WorkspaceFoldersServerCapabilities] a new instance of WorkspaceFoldersServerCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#5 - def initialize(supported: T.unsafe(nil), change_notifications: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#36 - def attributes; end - - # Whether the server wants to receive workspace folder - # change notifications. - # - # If a string is provided, the string is treated as an ID - # under which the notification is registered on the client - # side. The ID can be used to unregister for these events - # using the `client/unregisterCapability` request. - # - # @return [string | boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#32 - def change_notifications; end - - # The server has support for workspace folders - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#18 - def supported; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#42 - def to_json(*args); end -end - -# A full document diagnostic report for a workspace diagnostic result. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceFullDocumentDiagnosticReport - # @return [WorkspaceFullDocumentDiagnosticReport] a new instance of WorkspaceFullDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#8 - def initialize(kind:, items:, uri:, version:, result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#63 - def attributes; end - - # The actual items. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#42 - def items; end - - # A full document diagnostic report. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#24 - def kind; end - - # An optional result id. If provided it will - # be sent on the next diagnostic request for the - # same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#34 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#65 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#69 - def to_json(*args); end - - # The URI for which diagnostic information is reported. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#50 - def uri; end - - # The version number for which the diagnostics are reported. - # If the document is not marked as open `null` can be provided. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#59 - def version; end -end - -# A special workspace symbol that supports locations without a range -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceSymbol - # @return [WorkspaceSymbol] a new instance of WorkspaceSymbol - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#8 - def initialize(name:, kind:, location:, tags: T.unsafe(nil), container_name: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#77 - def attributes; end - - # The name of the symbol containing this symbol. This information is for - # user interface purposes (e.g. to render a qualifier in the user interface - # if necessary). It can't be used to re-infer a hierarchy for the document - # symbols. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#52 - def container_name; end - - # A data entry field that is preserved on a workspace symbol between a - # workspace symbol request and a workspace symbol resolve request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#73 - def data; end - - # The kind of this symbol. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#33 - def kind; end - - # The location of this symbol. Whether a server is allowed to - # return a location without a range depends on the client - # capability `workspace.symbol.resolveSupport`. - # - # See also `SymbolInformation.location`. - # - # @return [Location | { uri: string; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#64 - def location; end - - # The name of this symbol. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#25 - def name; end - - # Tags for this completion item. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#41 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#79 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#83 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceSymbolClientCapabilities - # @return [WorkspaceSymbolClientCapabilities] a new instance of WorkspaceSymbolClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), symbol_kind: T.unsafe(nil), tag_support: T.unsafe(nil), resolve_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#52 - def attributes; end - - # Symbol request supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#20 - def dynamic_registration; end - - # The client support partial workspace symbols. The client will send the - # request `workspaceSymbol/resolve` to the server to resolve additional - # properties. - # - # @return [{ properties: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#48 - def resolve_support; end - - # Specific capabilities for the `SymbolKind` in the `workspace/symbol` - # request. - # - # @return [{ valueSet?: SymbolKind[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#29 - def symbol_kind; end - - # The client supports tags on `SymbolInformation` and `WorkspaceSymbol`. - # Clients supporting tags have to handle unknown tags gracefully. - # - # @return [{ valueSet: 1[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#38 - def tag_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#54 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#58 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceSymbolOptions - # @return [WorkspaceSymbolOptions] a new instance of WorkspaceSymbolOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#28 - def attributes; end - - # The server provides support to resolve additional - # information for a workspace symbol. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#24 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#15 - def work_done_progress; end -end - -# The parameters of a Workspace Symbol Request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceSymbolParams - # @return [WorkspaceSymbolParams] a new instance of WorkspaceSymbolParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#8 - def initialize(query:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#44 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#31 - def partial_result_token; end - - # A query string to filter symbols by. Clients may send an empty - # string here to request all symbols. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#40 - def query; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#50 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#22 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceSymbolRegistrationOptions - # @return [WorkspaceSymbolRegistrationOptions] a new instance of WorkspaceSymbolRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#28 - def attributes; end - - # The server provides support to resolve additional - # information for a workspace symbol. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#24 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#15 - def work_done_progress; end -end - -# An unchanged document diagnostic report for a workspace diagnostic result. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceUnchangedDocumentDiagnosticReport - # @return [WorkspaceUnchangedDocumentDiagnosticReport] a new instance of WorkspaceUnchangedDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#8 - def initialize(kind:, result_id:, uri:, version:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#56 - def attributes; end - - # A document diagnostic report indicating - # no changes to the last result. A server can - # only return `unchanged` if result ids are - # provided. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#26 - def kind; end - - # A result id which will be sent on the next - # diagnostic request for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#35 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#58 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#62 - def to_json(*args); end - - # The URI for which diagnostic information is reported. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#43 - def uri; end - - # The version number for which the diagnostics are reported. - # If the document is not marked as open `null` can be provided. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#52 - def version; end -end - -# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#7 -module LanguageServer::Protocol::Transport; end - -# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#8 -module LanguageServer::Protocol::Transport::Io; end - -# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#9 -class LanguageServer::Protocol::Transport::Io::Reader - # @return [Reader] a new instance of Reader - # - # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#10 - def initialize(io); end - - # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#15 - def read(&block); end - - private - - # Returns the value of attribute io. - # - # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#26 - def io; end -end - -# source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#5 -class LanguageServer::Protocol::Transport::Io::Writer - # @return [Writer] a new instance of Writer - # - # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#8 - def initialize(io); end - - # Returns the value of attribute io. - # - # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#6 - def io; end - - # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#13 - def write(response); end -end - -# source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#4 -module LanguageServer::Protocol::Transport::Stdio; end - -# source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#5 -class LanguageServer::Protocol::Transport::Stdio::Reader < ::LanguageServer::Protocol::Transport::Io::Reader - # @return [Reader] a new instance of Reader - # - # source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#6 - def initialize; end -end - -# source://language_server-protocol//lib/language_server/protocol/transport/stdio/writer.rb#5 -class LanguageServer::Protocol::Transport::Stdio::Writer < ::LanguageServer::Protocol::Transport::Io::Writer - # @return [Writer] a new instance of Writer - # - # source://language_server-protocol//lib/language_server/protocol/transport/stdio/writer.rb#6 - def initialize; end -end - -# source://language_server-protocol//lib/language_server/protocol/version.rb#3 -LanguageServer::Protocol::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi b/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi new file mode 100644 index 000000000..5f91e74f5 --- /dev/null +++ b/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `language_server-protocol` gem. +# Please instead update this file by running `bin/tapioca gem language_server-protocol`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/lint_roller@1.1.0.rbi b/sorbet/rbi/gems/lint_roller@1.1.0.rbi new file mode 100644 index 000000000..e4dbd0b8d --- /dev/null +++ b/sorbet/rbi/gems/lint_roller@1.1.0.rbi @@ -0,0 +1,65 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `lint_roller` gem. +# Please instead update this file by running `bin/tapioca gem lint_roller`. + + +# pkg:gem/lint_roller#lib/lint_roller/context.rb:1 +module LintRoller; end + +# pkg:gem/lint_roller#lib/lint_roller/context.rb:2 +class LintRoller::Context < ::Struct + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def engine; end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def engine=(_); end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def engine_version; end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def engine_version=(_); end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def rule_format; end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def rule_format=(_); end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def runner; end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def runner=(_); end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def runner_version; end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def runner_version=(_); end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def target_ruby_version; end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def target_ruby_version=(_); end + + class << self + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def [](*_arg0); end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def inspect; end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def keyword_init?; end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def members; end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 + def new(*_arg0); end + end +end diff --git a/sorbet/rbi/gems/logger@1.7.0.rbi b/sorbet/rbi/gems/logger@1.7.0.rbi new file mode 100644 index 000000000..b6268d3b0 --- /dev/null +++ b/sorbet/rbi/gems/logger@1.7.0.rbi @@ -0,0 +1,896 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `logger` gem. +# Please instead update this file by running `bin/tapioca gem logger`. + + +# \Class \Logger provides a simple but sophisticated logging utility that +# you can use to create one or more +# {event logs}[https://en.wikipedia.org/wiki/Logging_(software)#Event_logs] +# for your program. +# Each such log contains a chronological sequence of entries +# that provides a record of the program's activities. +# +# == About the Examples +# +# All examples on this page assume that \Logger has been required: +# +# require 'logger' +# +# == Synopsis +# +# Create a log with Logger.new: +# +# # Single log file. +# logger = Logger.new('t.log') +# # Size-based rotated logging: 3 10-megabyte files. +# logger = Logger.new('t.log', 3, 10485760) +# # Period-based rotated logging: daily (also allowed: 'weekly', 'monthly'). +# logger = Logger.new('t.log', 'daily') +# # Log to an IO stream. +# logger = Logger.new($stdout) +# +# Add entries (level, message) with Logger#add: +# +# logger.add(Logger::DEBUG, 'Maximal debugging info') +# logger.add(Logger::INFO, 'Non-error information') +# logger.add(Logger::WARN, 'Non-error warning') +# logger.add(Logger::ERROR, 'Non-fatal error') +# logger.add(Logger::FATAL, 'Fatal error') +# logger.add(Logger::UNKNOWN, 'Most severe') +# +# Close the log with Logger#close: +# +# logger.close +# +# == Entries +# +# You can add entries with method Logger#add: +# +# logger.add(Logger::DEBUG, 'Maximal debugging info') +# logger.add(Logger::INFO, 'Non-error information') +# logger.add(Logger::WARN, 'Non-error warning') +# logger.add(Logger::ERROR, 'Non-fatal error') +# logger.add(Logger::FATAL, 'Fatal error') +# logger.add(Logger::UNKNOWN, 'Most severe') +# +# These shorthand methods also add entries: +# +# logger.debug('Maximal debugging info') +# logger.info('Non-error information') +# logger.warn('Non-error warning') +# logger.error('Non-fatal error') +# logger.fatal('Fatal error') +# logger.unknown('Most severe') +# +# When you call any of these methods, +# the entry may or may not be written to the log, +# depending on the entry's severity and on the log level; +# see {Log Level}[rdoc-ref:Logger@Log+Level] +# +# An entry always has: +# +# - A severity (the required argument to #add). +# - An automatically created timestamp. +# +# And may also have: +# +# - A message. +# - A program name. +# +# Example: +# +# logger = Logger.new($stdout) +# logger.add(Logger::INFO, 'My message.', 'mung') +# # => I, [2022-05-07T17:21:46.536234 #20536] INFO -- mung: My message. +# +# The default format for an entry is: +# +# "%s, [%s #%d] %5s -- %s: %s\n" +# +# where the values to be formatted are: +# +# - \Severity (one letter). +# - Timestamp. +# - Process id. +# - \Severity (word). +# - Program name. +# - Message. +# +# You can use a different entry format by: +# +# - Setting a custom format proc (affects following entries); +# see {formatter=}[Logger.html#attribute-i-formatter]. +# - Calling any of the methods above with a block +# (affects only the one entry). +# Doing so can have two benefits: +# +# - Context: the block can evaluate the entire program context +# and create a context-dependent message. +# - Performance: the block is not evaluated unless the log level +# permits the entry actually to be written: +# +# logger.error { my_slow_message_generator } +# +# Contrast this with the string form, where the string is +# always evaluated, regardless of the log level: +# +# logger.error("#{my_slow_message_generator}") +# +# === \Severity +# +# The severity of a log entry has two effects: +# +# - Determines whether the entry is selected for inclusion in the log; +# see {Log Level}[rdoc-ref:Logger@Log+Level]. +# - Indicates to any log reader (whether a person or a program) +# the relative importance of the entry. +# +# === Timestamp +# +# The timestamp for a log entry is generated automatically +# when the entry is created. +# +# The logged timestamp is formatted by method +# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime] +# using this format string: +# +# '%Y-%m-%dT%H:%M:%S.%6N' +# +# Example: +# +# logger = Logger.new($stdout) +# logger.add(Logger::INFO) +# # => I, [2022-05-07T17:04:32.318331 #20536] INFO -- : nil +# +# You can set a different format using method #datetime_format=. +# +# === Message +# +# The message is an optional argument to an entry method: +# +# logger = Logger.new($stdout) +# logger.add(Logger::INFO, 'My message') +# # => I, [2022-05-07T18:15:37.647581 #20536] INFO -- : My message +# +# For the default entry formatter, Logger::Formatter, +# the message object may be: +# +# - A string: used as-is. +# - An Exception: message.message is used. +# - Anything else: message.inspect is used. +# +# *Note*: Logger::Formatter does not escape or sanitize +# the message passed to it. +# Developers should be aware that malicious data (user input) +# may be in the message, and should explicitly escape untrusted data. +# +# You can use a custom formatter to escape message data; +# see the example at {formatter=}[Logger.html#attribute-i-formatter]. +# +# === Program Name +# +# The program name is an optional argument to an entry method: +# +# logger = Logger.new($stdout) +# logger.add(Logger::INFO, 'My message', 'mung') +# # => I, [2022-05-07T18:17:38.084716 #20536] INFO -- mung: My message +# +# The default program name for a new logger may be set in the call to +# Logger.new via optional keyword argument +progname+: +# +# logger = Logger.new('t.log', progname: 'mung') +# +# The default program name for an existing logger may be set +# by a call to method #progname=: +# +# logger.progname = 'mung' +# +# The current program name may be retrieved with method +# {progname}[Logger.html#attribute-i-progname]: +# +# logger.progname # => "mung" +# +# == Log Level +# +# The log level setting determines whether an entry is actually +# written to the log, based on the entry's severity. +# +# These are the defined severities (least severe to most severe): +# +# logger = Logger.new($stdout) +# logger.add(Logger::DEBUG, 'Maximal debugging info') +# # => D, [2022-05-07T17:57:41.776220 #20536] DEBUG -- : Maximal debugging info +# logger.add(Logger::INFO, 'Non-error information') +# # => I, [2022-05-07T17:59:14.349167 #20536] INFO -- : Non-error information +# logger.add(Logger::WARN, 'Non-error warning') +# # => W, [2022-05-07T18:00:45.337538 #20536] WARN -- : Non-error warning +# logger.add(Logger::ERROR, 'Non-fatal error') +# # => E, [2022-05-07T18:02:41.592912 #20536] ERROR -- : Non-fatal error +# logger.add(Logger::FATAL, 'Fatal error') +# # => F, [2022-05-07T18:05:24.703931 #20536] FATAL -- : Fatal error +# logger.add(Logger::UNKNOWN, 'Most severe') +# # => A, [2022-05-07T18:07:54.657491 #20536] ANY -- : Most severe +# +# The default initial level setting is Logger::DEBUG, the lowest level, +# which means that all entries are to be written, regardless of severity: +# +# logger = Logger.new($stdout) +# logger.level # => 0 +# logger.add(0, "My message") +# # => D, [2022-05-11T15:10:59.773668 #20536] DEBUG -- : My message +# +# You can specify a different setting in a new logger +# using keyword argument +level+ with an appropriate value: +# +# logger = Logger.new($stdout, level: Logger::ERROR) +# logger = Logger.new($stdout, level: 'error') +# logger = Logger.new($stdout, level: :error) +# logger.level # => 3 +# +# With this level, entries with severity Logger::ERROR and higher +# are written, while those with lower severities are not written: +# +# logger = Logger.new($stdout, level: Logger::ERROR) +# logger.add(3) +# # => E, [2022-05-11T15:17:20.933362 #20536] ERROR -- : nil +# logger.add(2) # Silent. +# +# You can set the log level for an existing logger +# with method #level=: +# +# logger.level = Logger::ERROR +# +# These shorthand methods also set the level: +# +# logger.debug! # => 0 +# logger.info! # => 1 +# logger.warn! # => 2 +# logger.error! # => 3 +# logger.fatal! # => 4 +# +# You can retrieve the log level with method #level. +# +# logger.level = Logger::ERROR +# logger.level # => 3 +# +# These methods return whether a given +# level is to be written: +# +# logger.level = Logger::ERROR +# logger.debug? # => false +# logger.info? # => false +# logger.warn? # => false +# logger.error? # => true +# logger.fatal? # => true +# +# == Log File Rotation +# +# By default, a log file is a single file that grows indefinitely +# (until explicitly closed); there is no file rotation. +# +# To keep log files to a manageable size, +# you can use _log_ _file_ _rotation_, which uses multiple log files: +# +# - Each log file has entries for a non-overlapping +# time interval. +# - Only the most recent log file is open and active; +# the others are closed and inactive. +# +# === Size-Based Rotation +# +# For size-based log file rotation, call Logger.new with: +# +# - Argument +logdev+ as a file path. +# - Argument +shift_age+ with a positive integer: +# the number of log files to be in the rotation. +# - Argument +shift_size+ as a positive integer: +# the maximum size (in bytes) of each log file; +# defaults to 1048576 (1 megabyte). +# +# Examples: +# +# logger = Logger.new('t.log', 3) # Three 1-megabyte files. +# logger = Logger.new('t.log', 5, 10485760) # Five 10-megabyte files. +# +# For these examples, suppose: +# +# logger = Logger.new('t.log', 3) +# +# Logging begins in the new log file, +t.log+; +# the log file is "full" and ready for rotation +# when a new entry would cause its size to exceed +shift_size+. +# +# The first time +t.log+ is full: +# +# - +t.log+ is closed and renamed to +t.log.0+. +# - A new file +t.log+ is opened. +# +# The second time +t.log+ is full: +# +# - +t.log.0 is renamed as +t.log.1+. +# - +t.log+ is closed and renamed to +t.log.0+. +# - A new file +t.log+ is opened. +# +# Each subsequent time that +t.log+ is full, +# the log files are rotated: +# +# - +t.log.1+ is removed. +# - +t.log.0 is renamed as +t.log.1+. +# - +t.log+ is closed and renamed to +t.log.0+. +# - A new file +t.log+ is opened. +# +# === Periodic Rotation +# +# For periodic rotation, call Logger.new with: +# +# - Argument +logdev+ as a file path. +# - Argument +shift_age+ as a string period indicator. +# +# Examples: +# +# logger = Logger.new('t.log', 'daily') # Rotate log files daily. +# logger = Logger.new('t.log', 'weekly') # Rotate log files weekly. +# logger = Logger.new('t.log', 'monthly') # Rotate log files monthly. +# +# Example: +# +# logger = Logger.new('t.log', 'daily') +# +# When the given period expires: +# +# - The base log file, +t.log+ is closed and renamed +# with a date-based suffix such as +t.log.20220509+. +# - A new log file +t.log+ is opened. +# - Nothing is removed. +# +# The default format for the suffix is '%Y%m%d', +# which produces a suffix similar to the one above. +# You can set a different format using create-time option +# +shift_period_suffix+; +# see details and suggestions at +# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime]. +# +# pkg:gem/logger#lib/logger/version.rb:3 +class Logger + include ::Logger::Severity + + # :call-seq: + # Logger.new(logdev, shift_age = 0, shift_size = 1048576, **options) + # + # With the single argument +logdev+, + # returns a new logger with all default options: + # + # Logger.new('t.log') # => # + # + # Argument +logdev+ must be one of: + # + # - A string filepath: entries are to be written + # to the file at that path; if the file at that path exists, + # new entries are appended. + # - An IO stream (typically $stdout, $stderr. or + # an open file): entries are to be written to the given stream. + # - +nil+ or +File::NULL+: no entries are to be written. + # + # Argument +shift_age+ must be one of: + # + # - The number of log files to be in the rotation. + # See {Size-Based Rotation}[rdoc-ref:Logger@Size-Based+Rotation]. + # - A string period indicator. + # See {Periodic Rotation}[rdoc-ref:Logger@Periodic+Rotation]. + # + # Argument +shift_size+ is the maximum size (in bytes) of each log file. + # See {Size-Based Rotation}[rdoc-ref:Logger@Size-Based+Rotation]. + # + # Examples: + # + # Logger.new('t.log') + # Logger.new($stdout) + # + # The keyword options are: + # + # - +level+: sets the log level; default value is Logger::DEBUG. + # See {Log Level}[rdoc-ref:Logger@Log+Level]: + # + # Logger.new('t.log', level: Logger::ERROR) + # + # - +progname+: sets the default program name; default is +nil+. + # See {Program Name}[rdoc-ref:Logger@Program+Name]: + # + # Logger.new('t.log', progname: 'mung') + # + # - +formatter+: sets the entry formatter; default is +nil+. + # See {formatter=}[Logger.html#attribute-i-formatter]. + # + # - +datetime_format+: sets the format for entry timestamp; + # default is +nil+. + # See #datetime_format=. + # + # - +binmode+: sets whether the logger writes in binary mode; + # default is +false+. + # + # - +shift_period_suffix+: sets the format for the filename suffix + # for periodic log file rotation; default is '%Y%m%d'. + # See {Periodic Rotation}[rdoc-ref:Logger@Periodic+Rotation]. + # + # - +reraise_write_errors+: An array of exception classes, which will + # be reraised if there is an error when writing to the log device. + # The default is to swallow all exceptions raised. + # - +skip_header+: If +true+, prevents the logger from writing a header + # when creating a new log file. The default is +false+, meaning + # the header will be written as usual. + # + # pkg:gem/logger#lib/logger.rb:598 + def initialize(logdev, shift_age = T.unsafe(nil), shift_size = T.unsafe(nil), level: T.unsafe(nil), progname: T.unsafe(nil), formatter: T.unsafe(nil), datetime_format: T.unsafe(nil), binmode: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), reraise_write_errors: T.unsafe(nil), skip_header: T.unsafe(nil)); end + + # Writes the given +msg+ to the log with no formatting; + # returns the number of characters written, + # or +nil+ if no log device exists: + # + # logger = Logger.new($stdout) + # logger << 'My message.' # => 10 + # + # Output: + # + # My message. + # + # pkg:gem/logger#lib/logger.rb:708 + def <<(msg); end + + # Creates a log entry, which may or may not be written to the log, + # depending on the entry's severity and on the log level. + # See {Log Level}[rdoc-ref:Logger@Log+Level] + # and {Entries}[rdoc-ref:Logger@Entries] for details. + # + # Examples: + # + # logger = Logger.new($stdout, progname: 'mung') + # logger.add(Logger::INFO) + # logger.add(Logger::ERROR, 'No good') + # logger.add(Logger::ERROR, 'No good', 'gnum') + # + # Output: + # + # I, [2022-05-12T16:25:31.469726 #36328] INFO -- mung: mung + # E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good + # E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good + # + # These convenience methods have implicit severity: + # + # - #debug. + # - #info. + # - #warn. + # - #error. + # - #fatal. + # - #unknown. + # + # pkg:gem/logger#lib/logger.rb:675 + def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end + + # Closes the logger; returns +nil+: + # + # logger = Logger.new('t.log') + # logger.close # => nil + # logger.info('foo') # Prints "log writing failed. closed stream" + # + # Related: Logger#reopen. + # + # pkg:gem/logger#lib/logger.rb:755 + def close; end + + # Returns the date-time format; see #datetime_format=. + # + # pkg:gem/logger#lib/logger.rb:438 + def datetime_format; end + + # Sets the date-time format. + # + # Argument +datetime_format+ should be either of these: + # + # - A string suitable for use as a format for method + # {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime]. + # - +nil+: the logger uses '%Y-%m-%dT%H:%M:%S.%6N'. + # + # pkg:gem/logger#lib/logger.rb:432 + def datetime_format=(datetime_format); end + + # Equivalent to calling #add with severity Logger::DEBUG. + # + # pkg:gem/logger#lib/logger.rb:714 + def debug(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::DEBUG. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:487 + def debug!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::DEBUG to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:482 + def debug?; end + + # Equivalent to calling #add with severity Logger::ERROR. + # + # pkg:gem/logger#lib/logger.rb:732 + def error(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::ERROR. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:520 + def error!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::ERROR to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:515 + def error?; end + + # Equivalent to calling #add with severity Logger::FATAL. + # + # pkg:gem/logger#lib/logger.rb:738 + def fatal(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::FATAL. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:531 + def fatal!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::FATAL to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:526 + def fatal?; end + + # Sets or retrieves the logger entry formatter proc. + # + # When +formatter+ is +nil+, the logger uses Logger::Formatter. + # + # When +formatter+ is a proc, a new entry is formatted by the proc, + # which is called with four arguments: + # + # - +severity+: The severity of the entry. + # - +time+: A Time object representing the entry's timestamp. + # - +progname+: The program name for the entry. + # - +msg+: The message for the entry (string or string-convertible object). + # + # The proc should return a string containing the formatted entry. + # + # This custom formatter uses + # {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump] + # to escape the message string: + # + # logger = Logger.new($stdout, progname: 'mung') + # original_formatter = logger.formatter || Logger::Formatter.new + # logger.formatter = proc { |severity, time, progname, msg| + # original_formatter.call(severity, time, progname, msg.dump) + # } + # logger.add(Logger::INFO, "hello \n ''") + # logger.add(Logger::INFO, "\f\x00\xff\\\"") + # + # Output: + # + # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''" + # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\"" + # + # pkg:gem/logger#lib/logger.rb:473 + def formatter; end + + # Sets or retrieves the logger entry formatter proc. + # + # When +formatter+ is +nil+, the logger uses Logger::Formatter. + # + # When +formatter+ is a proc, a new entry is formatted by the proc, + # which is called with four arguments: + # + # - +severity+: The severity of the entry. + # - +time+: A Time object representing the entry's timestamp. + # - +progname+: The program name for the entry. + # - +msg+: The message for the entry (string or string-convertible object). + # + # The proc should return a string containing the formatted entry. + # + # This custom formatter uses + # {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump] + # to escape the message string: + # + # logger = Logger.new($stdout, progname: 'mung') + # original_formatter = logger.formatter || Logger::Formatter.new + # logger.formatter = proc { |severity, time, progname, msg| + # original_formatter.call(severity, time, progname, msg.dump) + # } + # logger.add(Logger::INFO, "hello \n ''") + # logger.add(Logger::INFO, "\f\x00\xff\\\"") + # + # Output: + # + # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''" + # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\"" + # + # pkg:gem/logger#lib/logger.rb:473 + def formatter=(_arg0); end + + # Equivalent to calling #add with severity Logger::INFO. + # + # pkg:gem/logger#lib/logger.rb:720 + def info(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::INFO. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:498 + def info!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::INFO to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:493 + def info?; end + + # Logging severity threshold (e.g. Logger::INFO). + # + # pkg:gem/logger#lib/logger.rb:383 + def level; end + + # Sets the log level; returns +severity+. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # Argument +severity+ may be an integer, a string, or a symbol: + # + # logger.level = Logger::ERROR # => 3 + # logger.level = 3 # => 3 + # logger.level = 'error' # => "error" + # logger.level = :error # => :error + # + # Logger#sev_threshold= is an alias for Logger#level=. + # + # pkg:gem/logger#lib/logger.rb:399 + def level=(severity); end + + # pkg:gem/logger#lib/logger.rb:695 + def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end + + # Program name to include in log messages. + # + # pkg:gem/logger#lib/logger.rb:422 + def progname; end + + # Program name to include in log messages. + # + # pkg:gem/logger#lib/logger.rb:422 + def progname=(_arg0); end + + # Sets the logger's output stream: + # + # - If +logdev+ is +nil+, reopens the current output stream. + # - If +logdev+ is a filepath, opens the indicated file for append. + # - If +logdev+ is an IO stream + # (usually $stdout, $stderr, or an open File object), + # opens the stream for append. + # + # Example: + # + # logger = Logger.new('t.log') + # logger.add(Logger::ERROR, 'one') + # logger.close + # logger.add(Logger::ERROR, 'two') # Prints 'log writing failed. closed stream' + # logger.reopen + # logger.add(Logger::ERROR, 'three') + # logger.close + # File.readlines('t.log') + # # => + # # ["# Logfile created on 2022-05-12 14:21:19 -0500 by logger.rb/v1.5.0\n", + # # "E, [2022-05-12T14:21:27.596726 #22428] ERROR -- : one\n", + # # "E, [2022-05-12T14:23:05.847241 #22428] ERROR -- : three\n"] + # + # pkg:gem/logger#lib/logger.rb:642 + def reopen(logdev = T.unsafe(nil), shift_age = T.unsafe(nil), shift_size = T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil)); end + + # pkg:gem/logger#lib/logger.rb:475 + def sev_threshold; end + + # pkg:gem/logger#lib/logger.rb:476 + def sev_threshold=(severity); end + + # Equivalent to calling #add with severity Logger::UNKNOWN. + # + # pkg:gem/logger#lib/logger.rb:744 + def unknown(progname = T.unsafe(nil), &block); end + + # Equivalent to calling #add with severity Logger::WARN. + # + # pkg:gem/logger#lib/logger.rb:726 + def warn(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::WARN. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:509 + def warn!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::WARN to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:504 + def warn?; end + + # Adjust the log level during the block execution for the current Fiber only + # + # logger.with_level(:debug) do + # logger.debug { "Hello" } + # end + # + # pkg:gem/logger#lib/logger.rb:408 + def with_level(severity); end + + private + + # pkg:gem/logger#lib/logger.rb:786 + def format_message(severity, datetime, progname, msg); end + + # pkg:gem/logger#lib/logger.rb:764 + def format_severity(severity); end + + # pkg:gem/logger#lib/logger.rb:782 + def level_key; end + + # Guarantee the existence of this ivar even when subclasses don't call the superclass constructor. + # + # pkg:gem/logger#lib/logger.rb:769 + def level_override; end +end + +# Default formatter for log messages. +# +# pkg:gem/logger#lib/logger/formatter.rb:5 +class Logger::Formatter + # pkg:gem/logger#lib/logger/formatter.rb:11 + def initialize; end + + # pkg:gem/logger#lib/logger/formatter.rb:15 + def call(severity, time, progname, msg); end + + # pkg:gem/logger#lib/logger/formatter.rb:9 + def datetime_format; end + + # pkg:gem/logger#lib/logger/formatter.rb:9 + def datetime_format=(_arg0); end + + private + + # pkg:gem/logger#lib/logger/formatter.rb:21 + def format_datetime(time); end + + # pkg:gem/logger#lib/logger/formatter.rb:25 + def msg2str(msg); end +end + +# pkg:gem/logger#lib/logger/formatter.rb:7 +Logger::Formatter::DatetimeFormat = T.let(T.unsafe(nil), String) + +# pkg:gem/logger#lib/logger/formatter.rb:6 +Logger::Formatter::Format = T.let(T.unsafe(nil), String) + +# Device used for logging messages. +# +# pkg:gem/logger#lib/logger/log_device.rb:7 +class Logger::LogDevice + include ::Logger::Period + include ::MonitorMixin + + # pkg:gem/logger#lib/logger/log_device.rb:14 + def initialize(log = T.unsafe(nil), shift_age: T.unsafe(nil), shift_size: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil), reraise_write_errors: T.unsafe(nil), skip_header: T.unsafe(nil)); end + + # pkg:gem/logger#lib/logger/log_device.rb:38 + def close; end + + # pkg:gem/logger#lib/logger/log_device.rb:10 + def dev; end + + # pkg:gem/logger#lib/logger/log_device.rb:11 + def filename; end + + # pkg:gem/logger#lib/logger/log_device.rb:48 + def reopen(log = T.unsafe(nil), shift_age: T.unsafe(nil), shift_size: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil)); end + + # pkg:gem/logger#lib/logger/log_device.rb:27 + def write(message); end + + private + + # pkg:gem/logger#lib/logger/log_device.rb:156 + def add_log_header(file); end + + # pkg:gem/logger#lib/logger/log_device.rb:162 + def check_shift_log; end + + # pkg:gem/logger#lib/logger/log_device.rb:132 + def create_logfile(filename); end + + # pkg:gem/logger#lib/logger/log_device.rb:104 + def fixup_mode(dev); end + + # pkg:gem/logger#lib/logger/log_device.rb:148 + def handle_write_errors(mesg); end + + # pkg:gem/logger#lib/logger/log_device.rb:177 + def lock_shift_log; end + + # pkg:gem/logger#lib/logger/log_device.rb:119 + def open_logfile(filename); end + + # pkg:gem/logger#lib/logger/log_device.rb:78 + def set_dev(log); end + + # pkg:gem/logger#lib/logger/log_device.rb:92 + def set_file(shift_age, shift_size, shift_period_suffix); end + + # pkg:gem/logger#lib/logger/log_device.rb:207 + def shift_log_age; end + + # pkg:gem/logger#lib/logger/log_device.rb:232 + def shift_log_file(shifted); end + + # pkg:gem/logger#lib/logger/log_device.rb:216 + def shift_log_period(period_end); end +end + +# :stopdoc: +# +# pkg:gem/logger#lib/logger/log_device.rb:69 +Logger::LogDevice::MODE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/logger#lib/logger/log_device.rb:76 +Logger::LogDevice::MODE_TO_CREATE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/logger#lib/logger/log_device.rb:72 +Logger::LogDevice::MODE_TO_OPEN = T.let(T.unsafe(nil), Integer) + +# pkg:gem/logger#lib/logger/period.rb:4 +module Logger::Period + private + + # pkg:gem/logger#lib/logger/period.rb:9 + def next_rotate_time(now, shift_age); end + + # pkg:gem/logger#lib/logger/period.rb:31 + def previous_period_end(now, shift_age); end + + class << self + # pkg:gem/logger#lib/logger/period.rb:9 + def next_rotate_time(now, shift_age); end + + # pkg:gem/logger#lib/logger/period.rb:31 + def previous_period_end(now, shift_age); end + end +end + +# pkg:gem/logger#lib/logger/period.rb:7 +Logger::Period::SiD = T.let(T.unsafe(nil), Integer) + +# \Severity label for logging (max 5 chars). +# +# pkg:gem/logger#lib/logger.rb:762 +Logger::SEV_LABEL = T.let(T.unsafe(nil), Array) + +# Logging severity. +# +# pkg:gem/logger#lib/logger/severity.rb:5 +module Logger::Severity + class << self + # pkg:gem/logger#lib/logger/severity.rb:29 + def coerce(severity); end + end +end + +# pkg:gem/logger#lib/logger/severity.rb:19 +Logger::Severity::LEVELS = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/loofah@2.24.0.rbi b/sorbet/rbi/gems/loofah@2.25.1.rbi similarity index 66% rename from sorbet/rbi/gems/loofah@2.24.0.rbi rename to sorbet/rbi/gems/loofah@2.25.1.rbi index 0721efd32..3fe61e215 100644 --- a/sorbet/rbi/gems/loofah@2.24.0.rbi +++ b/sorbet/rbi/gems/loofah@2.25.1.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `loofah` gem. # Please instead update this file by running `bin/tapioca gem loofah`. + # == Strings and IO Objects as Input # # The following methods accept any IO object in addition to accepting a string: @@ -31,155 +32,153 @@ # That IO object could be a file, or a socket, or a StringIO, or anything that responds to +read+ # and +close+. # -# source://loofah//lib/loofah.rb#5 +# pkg:gem/loofah#lib/loofah.rb:5 module Loofah class << self - # Shortcut for Loofah::HTML4::Document.parse(*args, &block) - # - # This method accepts the same parameters as Nokogiri::HTML4::Document.parse - # - # source://loofah//lib/loofah.rb#76 + # pkg:gem/loofah#lib/loofah.rb:139 def document(*args, &block); end - # Shortcut for Loofah::HTML4::DocumentFragment.parse(*args, &block) - # - # This method accepts the same parameters as Nokogiri::HTML4::DocumentFragment.parse - # - # source://loofah//lib/loofah.rb#83 + # pkg:gem/loofah#lib/loofah.rb:140 def fragment(*args, &block); end # Shortcut for Loofah::HTML4::Document.parse(*args, &block) # # This method accepts the same parameters as Nokogiri::HTML4::Document.parse # - # source://loofah//lib/loofah.rb#76 + # pkg:gem/loofah#lib/loofah.rb:76 def html4_document(*args, &block); end # Shortcut for Loofah::HTML4::DocumentFragment.parse(*args, &block) # # This method accepts the same parameters as Nokogiri::HTML4::DocumentFragment.parse # - # source://loofah//lib/loofah.rb#83 + # pkg:gem/loofah#lib/loofah.rb:83 def html4_fragment(*args, &block); end - # source://loofah//lib/loofah.rb#101 + # Shortcut for Loofah::HTML5::Document.parse(*args, &block) + # + # This method accepts the same parameters as Nokogiri::HTML5::Document.parse + # + # pkg:gem/loofah#lib/loofah.rb:101 def html5_document(*args, &block); end - # source://loofah//lib/loofah.rb#108 + # Shortcut for Loofah::HTML5::DocumentFragment.parse(*args, &block) + # + # This method accepts the same parameters as Nokogiri::HTML5::DocumentFragment.parse + # + # pkg:gem/loofah#lib/loofah.rb:108 def html5_fragment(*args, &block); end - # @return [Boolean] - # - # source://loofah//lib/loofah.rb#7 + # pkg:gem/loofah#lib/loofah.rb:7 def html5_support?; end # A helper to remove extraneous whitespace from text-ified HTML # - # source://loofah//lib/loofah.rb#169 + # pkg:gem/loofah#lib/loofah.rb:169 def remove_extraneous_whitespace(string); end - # Shortcut for Loofah::HTML4::Document.parse(string_or_io).scrub!(method) - # - # source://loofah//lib/loofah.rb#88 + # pkg:gem/loofah#lib/loofah.rb:141 def scrub_document(string_or_io, method); end - # Shortcut for Loofah::HTML4::DocumentFragment.parse(string_or_io).scrub!(method) - # - # source://loofah//lib/loofah.rb#93 + # pkg:gem/loofah#lib/loofah.rb:142 def scrub_fragment(string_or_io, method); end # Shortcut for Loofah::HTML4::Document.parse(string_or_io).scrub!(method) # - # source://loofah//lib/loofah.rb#88 + # pkg:gem/loofah#lib/loofah.rb:88 def scrub_html4_document(string_or_io, method); end # Shortcut for Loofah::HTML4::DocumentFragment.parse(string_or_io).scrub!(method) # - # source://loofah//lib/loofah.rb#93 + # pkg:gem/loofah#lib/loofah.rb:93 def scrub_html4_fragment(string_or_io, method); end - # source://loofah//lib/loofah.rb#113 + # Shortcut for Loofah::HTML5::Document.parse(string_or_io).scrub!(method) + # + # pkg:gem/loofah#lib/loofah.rb:113 def scrub_html5_document(string_or_io, method); end - # source://loofah//lib/loofah.rb#118 + # Shortcut for Loofah::HTML5::DocumentFragment.parse(string_or_io).scrub!(method) + # + # pkg:gem/loofah#lib/loofah.rb:118 def scrub_html5_fragment(string_or_io, method); end # Shortcut for Loofah.xml_document(string_or_io).scrub!(method) # - # source://loofah//lib/loofah.rb#164 + # pkg:gem/loofah#lib/loofah.rb:164 def scrub_xml_document(string_or_io, method); end # Shortcut for Loofah.xml_fragment(string_or_io).scrub!(method) # - # source://loofah//lib/loofah.rb#159 + # pkg:gem/loofah#lib/loofah.rb:159 def scrub_xml_fragment(string_or_io, method); end # Shortcut for Loofah::XML::Document.parse(*args, &block) # # This method accepts the same parameters as Nokogiri::XML::Document.parse # - # source://loofah//lib/loofah.rb#147 + # pkg:gem/loofah#lib/loofah.rb:147 def xml_document(*args, &block); end # Shortcut for Loofah::XML::DocumentFragment.parse(*args, &block) # # This method accepts the same parameters as Nokogiri::XML::DocumentFragment.parse # - # source://loofah//lib/loofah.rb#154 + # pkg:gem/loofah#lib/loofah.rb:154 def xml_fragment(*args, &block); end end end -# source://loofah//lib/loofah/concerns.rb#125 +# pkg:gem/loofah#lib/loofah/concerns.rb:125 module Loofah::DocumentDecorator - # source://loofah//lib/loofah/concerns.rb#126 + # pkg:gem/loofah#lib/loofah/concerns.rb:126 def initialize(*args, &block); end end -# source://loofah//lib/loofah/elements.rb#6 +# pkg:gem/loofah#lib/loofah/elements.rb:6 module Loofah::Elements; end -# source://loofah//lib/loofah/elements.rb#93 +# pkg:gem/loofah#lib/loofah/elements.rb:93 Loofah::Elements::BLOCK_LEVEL = T.let(T.unsafe(nil), Set) # Elements that aren't block but should generate a newline in #to_text # -# source://loofah//lib/loofah/elements.rb#90 +# pkg:gem/loofah#lib/loofah/elements.rb:90 Loofah::Elements::INLINE_LINE_BREAK = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/elements.rb#94 +# pkg:gem/loofah#lib/loofah/elements.rb:94 Loofah::Elements::LINEBREAKERS = T.let(T.unsafe(nil), Set) # The following elements may also be considered block-level # elements since they may contain block-level elements # -# source://loofah//lib/loofah/elements.rb#76 +# pkg:gem/loofah#lib/loofah/elements.rb:76 Loofah::Elements::LOOSE_BLOCK_LEVEL = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/elements.rb#92 +# pkg:gem/loofah#lib/loofah/elements.rb:92 Loofah::Elements::STRICT_BLOCK_LEVEL = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/elements.rb#7 +# pkg:gem/loofah#lib/loofah/elements.rb:7 Loofah::Elements::STRICT_BLOCK_LEVEL_HTML4 = T.let(T.unsafe(nil), Set) # https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements # -# source://loofah//lib/loofah/elements.rb#35 +# pkg:gem/loofah#lib/loofah/elements.rb:35 Loofah::Elements::STRICT_BLOCK_LEVEL_HTML5 = T.let(T.unsafe(nil), Set) # Alias for Loofah::HTML4 # -# source://loofah//lib/loofah.rb#70 +# pkg:gem/loofah#lib/loofah.rb:70 Loofah::HTML = Loofah::HTML4 -# source://loofah//lib/loofah/html4/document.rb#4 +# pkg:gem/loofah#lib/loofah/html4/document.rb:4 module Loofah::HTML4; end -# Subclass of Nokogiri::HTML4::Document. +# Subclass of Nokogiri::HTML4::Document. # # See Loofah::ScrubBehavior and Loofah::TextBehavior for additional methods. # -# source://loofah//lib/loofah/html4/document.rb#10 +# pkg:gem/loofah#lib/loofah/html4/document.rb:10 class Loofah::HTML4::Document < ::Nokogiri::HTML4::Document include ::Loofah::ScrubBehavior::Node include ::Loofah::DocumentDecorator @@ -188,25 +187,25 @@ class Loofah::HTML4::Document < ::Nokogiri::HTML4::Document extend ::Loofah::HtmlDocumentBehavior::ClassMethods end -# Subclass of Nokogiri::HTML4::DocumentFragment. +# Subclass of Nokogiri::HTML4::DocumentFragment. # # See Loofah::ScrubBehavior and Loofah::TextBehavior for additional methods. # -# source://loofah//lib/loofah/html4/document_fragment.rb#10 +# pkg:gem/loofah#lib/loofah/html4/document_fragment.rb:10 class Loofah::HTML4::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment include ::Loofah::TextBehavior include ::Loofah::HtmlFragmentBehavior extend ::Loofah::HtmlFragmentBehavior::ClassMethods end -# source://loofah//lib/loofah/html5/safelist.rb#6 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:6 module Loofah::HTML5; end -# Subclass of Nokogiri::HTML5::Document. +# Subclass of Nokogiri::HTML5::Document. # # See Loofah::ScrubBehavior and Loofah::TextBehavior for additional methods. # -# source://loofah//lib/loofah/html5/document.rb#10 +# pkg:gem/loofah#lib/loofah/html5/document.rb:10 class Loofah::HTML5::Document < ::Nokogiri::HTML5::Document include ::Loofah::ScrubBehavior::Node include ::Loofah::DocumentDecorator @@ -215,214 +214,260 @@ class Loofah::HTML5::Document < ::Nokogiri::HTML5::Document extend ::Loofah::HtmlDocumentBehavior::ClassMethods end -# Subclass of Nokogiri::HTML5::DocumentFragment. +# Subclass of Nokogiri::HTML5::DocumentFragment. # # See Loofah::ScrubBehavior and Loofah::TextBehavior for additional methods. # -# source://loofah//lib/loofah/html5/document_fragment.rb#10 +# pkg:gem/loofah#lib/loofah/html5/document_fragment.rb:10 class Loofah::HTML5::DocumentFragment < ::Nokogiri::HTML5::DocumentFragment include ::Loofah::TextBehavior include ::Loofah::HtmlFragmentBehavior extend ::Loofah::HtmlFragmentBehavior::ClassMethods end -# source://loofah//lib/loofah/html5/safelist.rb#49 +# HTML safelist lifted from HTML5lib sanitizer code: +# +# http://code.google.com/p/html5lib/ +# +# +# +# Copyright (c) 2006-2008 The Authors +# +# Contributors: +# James Graham - jg307@cam.ac.uk +# Anne van Kesteren - annevankesteren@gmail.com +# Lachlan Hunt - lachlan.hunt@lachy.id.au +# Matt McDonald - kanashii@kanashii.ca +# Sam Ruby - rubys@intertwingly.net +# Ian Hickson (Google) - ian@hixie.ch +# Thomas Broyer - t.broyer@ltgt.net +# Jacques Distler - distler@golem.ph.utexas.edu +# Henri Sivonen - hsivonen@iki.fi +# The Mozilla Foundation (contributions from Henri Sivonen since 2008) +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, copy, +# modify, merge, publish, distribute, sublicense, and/or sell copies +# of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +# +# +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:49 module Loofah::HTML5::SafeList; end -# source://loofah//lib/loofah/html5/safelist.rb#232 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:232 Loofah::HTML5::SafeList::ACCEPTABLE_ATTRIBUTES = T.let(T.unsafe(nil), Set) # https://www.w3.org/TR/css-color-3/#html4 # -# source://loofah//lib/loofah/html5/safelist.rb#738 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:738 Loofah::HTML5::SafeList::ACCEPTABLE_CSS_COLORS = T.let(T.unsafe(nil), Set) # https://www.w3.org/TR/css-color-3/#svg-color # -# source://loofah//lib/loofah/html5/safelist.rb#758 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:758 Loofah::HTML5::SafeList::ACCEPTABLE_CSS_EXTENDED_COLORS = T.let(T.unsafe(nil), Set) # see https://www.quackit.com/css/functions/ # omit `url` and `image` from that list # -# source://loofah//lib/loofah/html5/safelist.rb#910 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:910 Loofah::HTML5::SafeList::ACCEPTABLE_CSS_FUNCTIONS = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#699 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:699 Loofah::HTML5::SafeList::ACCEPTABLE_CSS_KEYWORDS = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#626 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:626 Loofah::HTML5::SafeList::ACCEPTABLE_CSS_PROPERTIES = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#50 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:50 Loofah::HTML5::SafeList::ACCEPTABLE_ELEMENTS = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#983 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:983 Loofah::HTML5::SafeList::ACCEPTABLE_PROTOCOLS = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#970 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:970 Loofah::HTML5::SafeList::ACCEPTABLE_SVG_PROPERTIES = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#1014 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:1014 Loofah::HTML5::SafeList::ACCEPTABLE_URI_DATA_MEDIATYPES = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#1024 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:1024 Loofah::HTML5::SafeList::ALLOWED_ATTRIBUTES = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#1027 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:1027 Loofah::HTML5::SafeList::ALLOWED_CSS_FUNCTIONS = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#1026 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:1026 Loofah::HTML5::SafeList::ALLOWED_CSS_KEYWORDS = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#1025 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:1025 Loofah::HTML5::SafeList::ALLOWED_CSS_PROPERTIES = T.let(T.unsafe(nil), Set) # subclasses may define their own versions of these constants # -# source://loofah//lib/loofah/html5/safelist.rb#1023 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:1023 Loofah::HTML5::SafeList::ALLOWED_ELEMENTS = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#1048 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:1048 Loofah::HTML5::SafeList::ALLOWED_ELEMENTS_WITH_LIBXML2 = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#1029 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:1029 Loofah::HTML5::SafeList::ALLOWED_PROTOCOLS = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#1028 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:1028 Loofah::HTML5::SafeList::ALLOWED_SVG_PROPERTIES = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#1030 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:1030 Loofah::HTML5::SafeList::ALLOWED_URI_DATA_MEDIATYPES = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#526 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:526 Loofah::HTML5::SafeList::ARIA_ATTRIBUTES = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#582 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:582 Loofah::HTML5::SafeList::ATTR_VAL_IS_URI = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#315 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:315 Loofah::HTML5::SafeList::MATHML_ATTRIBUTES = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#147 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:147 Loofah::HTML5::SafeList::MATHML_ELEMENTS = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#981 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:981 Loofah::HTML5::SafeList::PROTOCOL_SEPARATOR = T.let(T.unsafe(nil), Regexp) -# source://loofah//lib/loofah/html5/safelist.rb#963 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:963 Loofah::HTML5::SafeList::SHORTHAND_CSS_PROPERTIES = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#608 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:608 Loofah::HTML5::SafeList::SVG_ALLOW_LOCAL_HREF = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#367 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:367 Loofah::HTML5::SafeList::SVG_ATTRIBUTES = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#594 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:594 Loofah::HTML5::SafeList::SVG_ATTR_VAL_ALLOWS_REF = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/safelist.rb#183 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:183 Loofah::HTML5::SafeList::SVG_ELEMENTS = T.let(T.unsafe(nil), Set) # additional tags we should consider safe since we have libxml2 fixing up our documents. # -# source://loofah//lib/loofah/html5/safelist.rb#1043 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:1043 Loofah::HTML5::SafeList::TAGS_SAFE_WITH_LIBXML2 = T.let(T.unsafe(nil), Set) # TODO: remove VOID_ELEMENTS in a future major release # and put it in the tests (it is used only for testing, not for functional behavior) # -# source://loofah//lib/loofah/html5/safelist.rb#1034 +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:1034 Loofah::HTML5::SafeList::VOID_ELEMENTS = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/scrub.rb#8 +# pkg:gem/loofah#lib/loofah/html5/scrub.rb:9 module Loofah::HTML5::Scrub class << self - # @return [Boolean] - # - # source://loofah//lib/loofah/html5/scrub.rb#18 + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:20 def allowed_element?(element_name); end - # source://loofah//lib/loofah/html5/scrub.rb#192 + # Returns true if the given URI string is safe, false otherwise. + # This method can be used to validate URI attribute values without + # requiring a Nokogiri DOM node. + # + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:147 + def allowed_uri?(uri_string); end + + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:207 def cdata_escape(node); end - # @return [Boolean] - # - # source://loofah//lib/loofah/html5/scrub.rb#187 + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:202 def cdata_needs_escaping?(node); end - # source://loofah//lib/loofah/html5/scrub.rb#207 + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:222 def escape_tags(string); end - # libxml2 >= 2.9.2 fails to escape comments within some attributes. + # libxml2 >= 2.9.2 fails to escape comments within some attributes. # # see comments about CVE-2018-8048 within the tests for more information # - # source://loofah//lib/loofah/html5/scrub.rb#166 + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:181 def force_correct_attribute_escaping!(node); end - # source://loofah//lib/loofah/html5/scrub.rb#123 + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:125 def scrub_attribute_that_allows_local_ref(attr_node); end - # alternative implementation of the html5lib attribute scrubbing algorithm + # alternative implementation of the html5lib attribute scrubbing algorithm # - # source://loofah//lib/loofah/html5/scrub.rb#23 + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:25 def scrub_attributes(node); end - # source://loofah//lib/loofah/html5/scrub.rb#72 + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:74 def scrub_css(style); end - # source://loofah//lib/loofah/html5/scrub.rb#67 + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:69 def scrub_css_attribute(node); end - # source://loofah//lib/loofah/html5/scrub.rb#142 + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:167 def scrub_uri_attribute(attr_node); end end end -# source://loofah//lib/loofah/html5/scrub.rb#9 +# pkg:gem/loofah#lib/loofah/html5/scrub.rb:10 Loofah::HTML5::Scrub::CONTROL_CHARACTERS = T.let(T.unsafe(nil), Regexp) -# source://loofah//lib/loofah/html5/scrub.rb#11 +# pkg:gem/loofah#lib/loofah/html5/scrub.rb:12 Loofah::HTML5::Scrub::CRASS_SEMICOLON = T.let(T.unsafe(nil), Hash) -# source://loofah//lib/loofah/html5/scrub.rb#12 +# pkg:gem/loofah#lib/loofah/html5/scrub.rb:13 Loofah::HTML5::Scrub::CSS_IMPORTANT = T.let(T.unsafe(nil), String) -# source://loofah//lib/loofah/html5/scrub.rb#10 +# pkg:gem/loofah#lib/loofah/html5/scrub.rb:11 Loofah::HTML5::Scrub::CSS_KEYWORDISH = T.let(T.unsafe(nil), Regexp) -# source://loofah//lib/loofah/html5/scrub.rb#14 +# pkg:gem/loofah#lib/loofah/html5/scrub.rb:15 Loofah::HTML5::Scrub::CSS_PROPERTY_STRING_WITHOUT_EMBEDDED_QUOTES = T.let(T.unsafe(nil), Regexp) -# source://loofah//lib/loofah/html5/scrub.rb#13 +# pkg:gem/loofah#lib/loofah/html5/scrub.rb:14 Loofah::HTML5::Scrub::CSS_WHITESPACE = T.let(T.unsafe(nil), String) -# source://loofah//lib/loofah/html5/scrub.rb#15 +# pkg:gem/loofah#lib/loofah/html5/scrub.rb:16 Loofah::HTML5::Scrub::DATA_ATTRIBUTE_NAME = T.let(T.unsafe(nil), Regexp) -# source://loofah//lib/loofah/html5/safelist.rb#1051 +# pkg:gem/loofah#lib/loofah/html5/scrub.rb:17 +Loofah::HTML5::Scrub::URI_PROTOCOL_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/loofah#lib/loofah/html5/safelist.rb:1051 Loofah::HTML5::WhiteList = Loofah::HTML5::SafeList -# source://loofah//lib/loofah/concerns.rb#133 +# pkg:gem/loofah#lib/loofah/concerns.rb:133 module Loofah::HtmlDocumentBehavior mixes_in_class_methods ::Loofah::HtmlDocumentBehavior::ClassMethods - # source://loofah//lib/loofah/concerns.rb#164 + # pkg:gem/loofah#lib/loofah/concerns.rb:164 def serialize_root; end class << self - # @private - # - # source://loofah//lib/loofah/concerns.rb#159 + # pkg:gem/loofah#lib/loofah/concerns.rb:159 def included(base); end end end -# source://loofah//lib/loofah/concerns.rb#134 +# pkg:gem/loofah#lib/loofah/concerns.rb:134 module Loofah::HtmlDocumentBehavior::ClassMethods - # source://loofah//lib/loofah/concerns.rb#135 + # pkg:gem/loofah#lib/loofah/concerns.rb:135 def parse(*args, &block); end private @@ -437,68 +482,66 @@ module Loofah::HtmlDocumentBehavior::ClassMethods # the contract that scrubbers expect of a node (e.g., it can be # replaced, sibling and children nodes can be created). # - # source://loofah//lib/loofah/concerns.rb#150 + # pkg:gem/loofah#lib/loofah/concerns.rb:150 def remove_comments_before_html_element(doc); end end -# source://loofah//lib/loofah/concerns.rb#169 +# pkg:gem/loofah#lib/loofah/concerns.rb:169 module Loofah::HtmlFragmentBehavior mixes_in_class_methods ::Loofah::HtmlFragmentBehavior::ClassMethods - # source://loofah//lib/loofah/concerns.rb#197 + # pkg:gem/loofah#lib/loofah/concerns.rb:201 def serialize; end - # source://loofah//lib/loofah/concerns.rb#203 + # pkg:gem/loofah#lib/loofah/concerns.rb:203 def serialize_root; end - # source://loofah//lib/loofah/concerns.rb#197 + # pkg:gem/loofah#lib/loofah/concerns.rb:197 def to_s; end class << self - # @private - # - # source://loofah//lib/loofah/concerns.rb#192 + # pkg:gem/loofah#lib/loofah/concerns.rb:192 def included(base); end end end -# source://loofah//lib/loofah/concerns.rb#170 +# pkg:gem/loofah#lib/loofah/concerns.rb:170 module Loofah::HtmlFragmentBehavior::ClassMethods - # source://loofah//lib/loofah/concerns.rb#180 + # pkg:gem/loofah#lib/loofah/concerns.rb:180 def document_klass; end - # source://loofah//lib/loofah/concerns.rb#171 + # pkg:gem/loofah#lib/loofah/concerns.rb:171 def parse(tags, encoding = T.unsafe(nil)); end end -# constants related to working around unhelpful libxml2 behavior +# constants related to working around unhelpful libxml2 behavior # # ಠ_ಠ # -# source://loofah//lib/loofah/html5/libxml2_workarounds.rb#12 +# pkg:gem/loofah#lib/loofah/html5/libxml2_workarounds.rb:12 module Loofah::LibxmlWorkarounds; end -# these attributes and qualifying parent tags are determined by the code at: +# these attributes and qualifying parent tags are determined by the code at: # # https://git.gnome.org/browse/libxml2/tree/HTMLtree.c?h=v2.9.2#n714 # # see comments about CVE-2018-8048 within the tests for more information # -# source://loofah//lib/loofah/html5/libxml2_workarounds.rb#20 +# pkg:gem/loofah#lib/loofah/html5/libxml2_workarounds.rb:20 Loofah::LibxmlWorkarounds::BROKEN_ESCAPING_ATTRIBUTES = T.let(T.unsafe(nil), Set) -# source://loofah//lib/loofah/html5/libxml2_workarounds.rb#26 +# pkg:gem/loofah#lib/loofah/html5/libxml2_workarounds.rb:26 Loofah::LibxmlWorkarounds::BROKEN_ESCAPING_ATTRIBUTES_QUALIFYING_TAG = T.let(T.unsafe(nil), Hash) -# source://loofah//lib/loofah/metahelpers.rb#4 +# pkg:gem/loofah#lib/loofah/metahelpers.rb:4 module Loofah::MetaHelpers class << self - # source://loofah//lib/loofah/metahelpers.rb#6 + # pkg:gem/loofah#lib/loofah/metahelpers.rb:6 def add_downcased_set_members_to_all_set_constants(mojule); end end end -# Mixes +scrub!+ into Document, DocumentFragment, Node and NodeSet. +# Mixes +scrub!+ into Document, DocumentFragment, Node and NodeSet. # # Traverse the document or fragment, invoking the +scrubber+ on each node. # @@ -523,27 +566,27 @@ end # Please see Scrubber for more information on implementation and traversal, and README.rdoc for # more example usage. # -# source://loofah//lib/loofah/concerns.rb#30 +# pkg:gem/loofah#lib/loofah/concerns.rb:30 module Loofah::ScrubBehavior class << self - # source://loofah//lib/loofah/concerns.rb#59 + # pkg:gem/loofah#lib/loofah/concerns.rb:59 def resolve_scrubber(scrubber); end end end -# source://loofah//lib/loofah/concerns.rb#31 +# pkg:gem/loofah#lib/loofah/concerns.rb:31 module Loofah::ScrubBehavior::Node - # source://loofah//lib/loofah/concerns.rb#32 + # pkg:gem/loofah#lib/loofah/concerns.rb:32 def scrub!(scrubber); end end -# source://loofah//lib/loofah/concerns.rb#51 +# pkg:gem/loofah#lib/loofah/concerns.rb:51 module Loofah::ScrubBehavior::NodeSet - # source://loofah//lib/loofah/concerns.rb#52 + # pkg:gem/loofah#lib/loofah/concerns.rb:52 def scrub!(scrubber); end end -# A Scrubber wraps up a block (or method) that is run on an HTML node (element): +# A Scrubber wraps up a block (or method) that is run on an HTML node (element): # # # change all tags to
tags # span2div = Loofah::Scrubber.new do |node| @@ -568,9 +611,9 @@ end # default) or bottom-up. Top-down scrubbers can optionally return # Scrubber::STOP to terminate the traversal of a subtree. # -# source://loofah//lib/loofah/scrubber.rb#35 +# pkg:gem/loofah#lib/loofah/scrubber.rb:35 class Loofah::Scrubber - # Options may include + # Options may include # :direction => :top_down (the default) # or # :direction => :bottom_up @@ -583,73 +626,69 @@ class Loofah::Scrubber # and implement +scrub+, which is slightly faster than using a # block. # - # @return [Scrubber] a new instance of Scrubber - # - # source://loofah//lib/loofah/scrubber.rb#65 + # pkg:gem/loofah#lib/loofah/scrubber.rb:65 def initialize(options = T.unsafe(nil), &block); end # If the attribute is not set, add it # If the attribute is set, don't overwrite the existing value # - # source://loofah//lib/loofah/scrubber.rb#96 + # pkg:gem/loofah#lib/loofah/scrubber.rb:96 def append_attribute(node, attribute, value); end # When a scrubber is initialized, the optional block is saved as # :block. Note that, if no block is passed, then the +scrub+ # method is assumed to have been implemented. # - # source://loofah//lib/loofah/scrubber.rb#49 + # pkg:gem/loofah#lib/loofah/scrubber.rb:49 def block; end # When a scrubber is initialized, the :direction may be specified # as :top_down (the default) or :bottom_up. # - # source://loofah//lib/loofah/scrubber.rb#44 + # pkg:gem/loofah#lib/loofah/scrubber.rb:44 def direction; end - # When +new+ is not passed a block, the class may implement + # When +new+ is not passed a block, the class may implement # +scrub+, which will be called for each document node. # - # @raise [ScrubberNotFound] - # - # source://loofah//lib/loofah/scrubber.rb#88 + # pkg:gem/loofah#lib/loofah/scrubber.rb:88 def scrub(node); end - # Calling +traverse+ will cause the document to be traversed by + # Calling +traverse+ will cause the document to be traversed by # either the lambda passed to the initializer or the +scrub+ # method, in the direction specified at +new+ time. # - # source://loofah//lib/loofah/scrubber.rb#80 + # pkg:gem/loofah#lib/loofah/scrubber.rb:80 def traverse(node); end private - # source://loofah//lib/loofah/scrubber.rb#105 + # pkg:gem/loofah#lib/loofah/scrubber.rb:105 def html5lib_sanitize(node); end - # source://loofah//lib/loofah/scrubber.rb#131 + # pkg:gem/loofah#lib/loofah/scrubber.rb:131 def traverse_conditionally_bottom_up(node); end - # source://loofah//lib/loofah/scrubber.rb#122 + # pkg:gem/loofah#lib/loofah/scrubber.rb:122 def traverse_conditionally_top_down(node); end end # Top-down Scrubbers may return CONTINUE to indicate that the subtree should be traversed. # -# source://loofah//lib/loofah/scrubber.rb#37 +# pkg:gem/loofah#lib/loofah/scrubber.rb:37 Loofah::Scrubber::CONTINUE = T.let(T.unsafe(nil), Object) # Top-down Scrubbers may return STOP to indicate that the subtree should not be traversed. # -# source://loofah//lib/loofah/scrubber.rb#40 +# pkg:gem/loofah#lib/loofah/scrubber.rb:40 Loofah::Scrubber::STOP = T.let(T.unsafe(nil), Object) -# A RuntimeError raised when Loofah could not find an appropriate scrubber. +# A RuntimeError raised when Loofah could not find an appropriate scrubber. # -# source://loofah//lib/loofah/scrubber.rb#7 +# pkg:gem/loofah#lib/loofah/scrubber.rb:7 class Loofah::ScrubberNotFound < ::RuntimeError; end -# Loofah provides some built-in scrubbers for sanitizing with +# Loofah provides some built-in scrubbers for sanitizing with # HTML5lib's safelist and for accomplishing some common # transformation tasks. # @@ -748,17 +787,17 @@ class Loofah::ScrubberNotFound < ::RuntimeError; end # # http://timelessrepo.com/json-isnt-a-javascript-subset # -# source://loofah//lib/loofah/scrubbers.rb#104 +# pkg:gem/loofah#lib/loofah/scrubbers.rb:104 module Loofah::Scrubbers class << self - # Returns an array of symbols representing the built-in scrubbers + # Returns an array of symbols representing the built-in scrubbers # - # source://loofah//lib/loofah/scrubbers.rb#425 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:425 def scrubber_symbols; end end end -# === scrub!(:double_breakpoint) +# === scrub!(:double_breakpoint) # # +:double_breakpoint+ replaces double-break tags with closing/opening paragraph tags. # @@ -766,23 +805,21 @@ end # Loofah.html5_fragment(markup).scrub!(:double_breakpoint) # => "

Some text here in a logical paragraph.

Some more text, apparently a second paragraph.

" # -# source://loofah//lib/loofah/scrubbers.rb#362 +# pkg:gem/loofah#lib/loofah/scrubbers.rb:362 class Loofah::Scrubbers::DoubleBreakpoint < ::Loofah::Scrubber - # @return [DoubleBreakpoint] a new instance of DoubleBreakpoint - # - # source://loofah//lib/loofah/scrubbers.rb#363 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:363 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#367 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:367 def scrub(node); end private - # source://loofah//lib/loofah/scrubbers.rb#400 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:400 def remove_blank_text_nodes(node); end end -# === scrub!(:escape) +# === scrub!(:escape) # # +:escape+ performs HTML entity escaping on the unknown/unsafe tags: # @@ -790,36 +827,32 @@ end # Loofah.html5_fragment(unsafe_html).scrub!(:escape) # => "ohai!
div is safe
<foo>but foo is <b>not</b></foo>" # -# source://loofah//lib/loofah/scrubbers.rb#159 +# pkg:gem/loofah#lib/loofah/scrubbers.rb:159 class Loofah::Scrubbers::Escape < ::Loofah::Scrubber - # @return [Escape] a new instance of Escape - # - # source://loofah//lib/loofah/scrubbers.rb#160 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:160 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#164 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:164 def scrub(node); end end -# A hash that maps a symbol (like +:prune+) to the appropriate Scrubber (Loofah::Scrubbers::Prune). +# A hash that maps a symbol (like +:prune+) to the appropriate Scrubber (Loofah::Scrubbers::Prune). # -# source://loofah//lib/loofah/scrubbers.rb#407 +# pkg:gem/loofah#lib/loofah/scrubbers.rb:407 Loofah::Scrubbers::MAP = T.let(T.unsafe(nil), Hash) # This class probably isn't useful publicly, but is used for #to_text's current implemention # -# source://loofah//lib/loofah/scrubbers.rb#307 +# pkg:gem/loofah#lib/loofah/scrubbers.rb:307 class Loofah::Scrubbers::NewlineBlockElements < ::Loofah::Scrubber - # @return [NewlineBlockElements] a new instance of NewlineBlockElements - # - # source://loofah//lib/loofah/scrubbers.rb#308 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:308 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#312 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:312 def scrub(node); end end -# === scrub!(:nofollow) +# === scrub!(:nofollow) # # +:nofollow+ adds a rel="nofollow" attribute to all links # @@ -827,18 +860,16 @@ end # Loofah.html5_fragment(link_farmers_markup).scrub!(:nofollow) # => "ohai! I like your blog post" # -# source://loofah//lib/loofah/scrubbers.rb#220 +# pkg:gem/loofah#lib/loofah/scrubbers.rb:220 class Loofah::Scrubbers::NoFollow < ::Loofah::Scrubber - # @return [NoFollow] a new instance of NoFollow - # - # source://loofah//lib/loofah/scrubbers.rb#221 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:221 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#225 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:225 def scrub(node); end end -# === scrub!(:noopener) +# === scrub!(:noopener) # # +:noopener+ adds a rel="noopener" attribute to all links # @@ -846,18 +877,16 @@ end # Loofah.html5_fragment(link_farmers_markup).scrub!(:noopener) # => "ohai! I like your blog post" # -# source://loofah//lib/loofah/scrubbers.rb#271 +# pkg:gem/loofah#lib/loofah/scrubbers.rb:271 class Loofah::Scrubbers::NoOpener < ::Loofah::Scrubber - # @return [NoOpener] a new instance of NoOpener - # - # source://loofah//lib/loofah/scrubbers.rb#272 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:272 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#276 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:276 def scrub(node); end end -# === scrub!(:noreferrer) +# === scrub!(:noreferrer) # # +:noreferrer+ adds a rel="noreferrer" attribute to all links # @@ -865,18 +894,16 @@ end # Loofah.html5_fragment(link_farmers_markup).scrub!(:noreferrer) # => "ohai! I like your blog post" # -# source://loofah//lib/loofah/scrubbers.rb#293 +# pkg:gem/loofah#lib/loofah/scrubbers.rb:293 class Loofah::Scrubbers::NoReferrer < ::Loofah::Scrubber - # @return [NoReferrer] a new instance of NoReferrer - # - # source://loofah//lib/loofah/scrubbers.rb#294 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:294 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#298 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:298 def scrub(node); end end -# === scrub!(:prune) +# === scrub!(:prune) # # +:prune+ removes unknown/unsafe tags and their contents (including their subtrees): # @@ -884,18 +911,16 @@ end # Loofah.html5_fragment(unsafe_html).scrub!(:prune) # => "ohai!
div is safe
" # -# source://loofah//lib/loofah/scrubbers.rb#137 +# pkg:gem/loofah#lib/loofah/scrubbers.rb:137 class Loofah::Scrubbers::Prune < ::Loofah::Scrubber - # @return [Prune] a new instance of Prune - # - # source://loofah//lib/loofah/scrubbers.rb#138 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:138 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#142 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:142 def scrub(node); end end -# === scrub!(:strip) +# === scrub!(:strip) # # +:strip+ removes unknown/unsafe tags, but leaves behind the pristine contents: # @@ -903,18 +928,16 @@ end # Loofah.html5_fragment(unsafe_html).scrub!(:strip) # => "ohai!
div is safe
but foo is not" # -# source://loofah//lib/loofah/scrubbers.rb#114 +# pkg:gem/loofah#lib/loofah/scrubbers.rb:114 class Loofah::Scrubbers::Strip < ::Loofah::Scrubber - # @return [Strip] a new instance of Strip - # - # source://loofah//lib/loofah/scrubbers.rb#115 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:115 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#119 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:119 def scrub(node); end end -# === scrub!(:targetblank) +# === scrub!(:targetblank) # # +:targetblank+ adds a target="_blank" attribute to all links. # If there is a target already set, replaces it with target="_blank". @@ -926,18 +949,16 @@ end # On modern browsers, setting target="_blank" on anchor elements implicitly provides the same # behavior as setting rel="noopener". # -# source://loofah//lib/loofah/scrubbers.rb#246 +# pkg:gem/loofah#lib/loofah/scrubbers.rb:246 class Loofah::Scrubbers::TargetBlank < ::Loofah::Scrubber - # @return [TargetBlank] a new instance of TargetBlank - # - # source://loofah//lib/loofah/scrubbers.rb#247 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:247 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#251 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:251 def scrub(node); end end -# === scrub!(:unprintable) +# === scrub!(:unprintable) # # +:unprintable+ removes unprintable Unicode characters. # @@ -951,18 +972,16 @@ end # # http://timelessrepo.com/json-isnt-a-javascript-subset # -# source://loofah//lib/loofah/scrubbers.rb#340 +# pkg:gem/loofah#lib/loofah/scrubbers.rb:340 class Loofah::Scrubbers::Unprintable < ::Loofah::Scrubber - # @return [Unprintable] a new instance of Unprintable - # - # source://loofah//lib/loofah/scrubbers.rb#341 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:341 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#345 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:345 def scrub(node); end end -# === scrub!(:whitewash) +# === scrub!(:whitewash) # # +:whitewash+ removes all comments, styling and attributes in # addition to doing markup-fixer-uppery and pruning unsafe tags. I @@ -979,44 +998,23 @@ end # all kinds of cruft into its HTML output. Who needs that crap? # Certainly not me. # -# source://loofah//lib/loofah/scrubbers.rb#191 +# pkg:gem/loofah#lib/loofah/scrubbers.rb:191 class Loofah::Scrubbers::Whitewash < ::Loofah::Scrubber - # @return [Whitewash] a new instance of Whitewash - # - # source://loofah//lib/loofah/scrubbers.rb#192 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:192 def initialize; end - # source://loofah//lib/loofah/scrubbers.rb#196 + # pkg:gem/loofah#lib/loofah/scrubbers.rb:196 def scrub(node); end end -# Overrides +text+ in Document and DocumentFragment classes, and mixes in +to_text+. +# Overrides +text+ in Document and DocumentFragment classes, and mixes in +to_text+. # -# source://loofah//lib/loofah/concerns.rb#73 +# pkg:gem/loofah#lib/loofah/concerns.rb:73 module Loofah::TextBehavior - # Returns a plain-text version of the markup contained by the document, with HTML entities - # encoded. - # - # This method is significantly faster than #to_text, but isn't clever about whitespace around - # block elements. - # - # Loofah.html5_document("

Title

Content
").text - # # => "TitleContent" - # - # By default, the returned text will have HTML entities escaped. If you want unescaped - # entities, and you understand that the result is unsafe to render in a browser, then you can - # pass an argument as shown: - # - # frag = Loofah.html5_fragment("<script>alert('EVIL');</script>") - # # ok for browser: - # frag.text # => "<script>alert('EVIL');</script>" - # # decidedly not ok for browser: - # frag.text(:encode_special_chars => false) # => "" - # - # source://loofah//lib/loofah/concerns.rb#94 + # pkg:gem/loofah#lib/loofah/concerns.rb:107 def inner_text(options = T.unsafe(nil)); end - # Returns a plain-text version of the markup contained by the document, with HTML entities + # Returns a plain-text version of the markup contained by the document, with HTML entities # encoded. # # This method is significantly faster than #to_text, but isn't clever about whitespace around @@ -1035,32 +1033,13 @@ module Loofah::TextBehavior # # decidedly not ok for browser: # frag.text(:encode_special_chars => false) # => "" # - # source://loofah//lib/loofah/concerns.rb#94 + # pkg:gem/loofah#lib/loofah/concerns.rb:94 def text(options = T.unsafe(nil)); end - # Returns a plain-text version of the markup contained by the document, with HTML entities - # encoded. - # - # This method is significantly faster than #to_text, but isn't clever about whitespace around - # block elements. - # - # Loofah.html5_document("

Title

Content
").text - # # => "TitleContent" - # - # By default, the returned text will have HTML entities escaped. If you want unescaped - # entities, and you understand that the result is unsafe to render in a browser, then you can - # pass an argument as shown: - # - # frag = Loofah.html5_fragment("<script>alert('EVIL');</script>") - # # ok for browser: - # frag.text # => "<script>alert('EVIL');</script>" - # # decidedly not ok for browser: - # frag.text(:encode_special_chars => false) # => "" - # - # source://loofah//lib/loofah/concerns.rb#94 + # pkg:gem/loofah#lib/loofah/concerns.rb:108 def to_str(options = T.unsafe(nil)); end - # Returns a plain-text version of the markup contained by the fragment, with HTML entities + # Returns a plain-text version of the markup contained by the fragment, with HTML entities # encoded. # # This method is slower than #text, but is clever about whitespace around block elements and @@ -1069,36 +1048,36 @@ module Loofah::TextBehavior # Loofah.html5_document("

Title

Content
Next line
").to_text # # => "\nTitle\n\nContent\nNext line\n" # - # source://loofah//lib/loofah/concerns.rb#120 + # pkg:gem/loofah#lib/loofah/concerns.rb:120 def to_text(options = T.unsafe(nil)); end end # The version of Loofah you are using # -# source://loofah//lib/loofah/version.rb#5 +# pkg:gem/loofah#lib/loofah/version.rb:5 Loofah::VERSION = T.let(T.unsafe(nil), String) -# source://loofah//lib/loofah/xml/document.rb#4 +# pkg:gem/loofah#lib/loofah/xml/document.rb:4 module Loofah::XML; end -# Subclass of Nokogiri::XML::Document. +# Subclass of Nokogiri::XML::Document. # # See Loofah::ScrubBehavior and Loofah::DocumentDecorator for additional methods. # -# source://loofah//lib/loofah/xml/document.rb#10 +# pkg:gem/loofah#lib/loofah/xml/document.rb:10 class Loofah::XML::Document < ::Nokogiri::XML::Document include ::Loofah::ScrubBehavior::Node include ::Loofah::DocumentDecorator end -# Subclass of Nokogiri::XML::DocumentFragment. +# Subclass of Nokogiri::XML::DocumentFragment. # # See Loofah::ScrubBehavior for additional methods. # -# source://loofah//lib/loofah/xml/document_fragment.rb#10 +# pkg:gem/loofah#lib/loofah/xml/document_fragment.rb:10 class Loofah::XML::DocumentFragment < ::Nokogiri::XML::DocumentFragment class << self - # source://loofah//lib/loofah/xml/document_fragment.rb#12 + # pkg:gem/loofah#lib/loofah/xml/document_fragment.rb:12 def parse(tags); end end end diff --git a/sorbet/rbi/gems/m@1.6.0.rbi b/sorbet/rbi/gems/m@1.6.0.rbi index 6a0990b6f..58add3011 100644 --- a/sorbet/rbi/gems/m@1.6.0.rbi +++ b/sorbet/rbi/gems/m@1.6.0.rbi @@ -4,254 +4,209 @@ # This is an autogenerated file for types exported from the `m` gem. # Please instead update this file by running `bin/tapioca gem m`. + # Runners are in charge of running your tests, depending on the framework # Instead of slamming all of this junk in an `M` class, it's here instead. # -# source://m//lib/m/version.rb#1 +# pkg:gem/m#lib/m/version.rb:1 module M class << self # Accept arguments coming from bin/m and run tests, then bail out immediately. # - # source://m//lib/m.rb#9 + # pkg:gem/m#lib/m.rb:9 def run(argv); end end end -# source://m//lib/m/executor.rb#8 +# pkg:gem/m#lib/m/executor.rb:8 class M::Executor - # @return [Executor] a new instance of Executor - # - # source://m//lib/m/executor.rb#9 + # pkg:gem/m#lib/m/executor.rb:9 def initialize(testable); end - # source://m//lib/m/executor.rb#13 + # pkg:gem/m#lib/m/executor.rb:13 def execute; end private - # source://m//lib/m/executor.rb#96 + # pkg:gem/m#lib/m/executor.rb:96 def runner; end # Finds all test suites in this test file, with test methods included. # - # source://m//lib/m/executor.rb#72 + # pkg:gem/m#lib/m/executor.rb:72 def suites; end - # Returns the value of attribute testable. - # - # source://m//lib/m/executor.rb#50 + # pkg:gem/m#lib/m/executor.rb:50 def testable; end # Shoves tests together in our custom container and collection classes. # Memoize it since it's unnecessary to do this more than one for a given file. # - # source://m//lib/m/executor.rb#54 + # pkg:gem/m#lib/m/executor.rb:54 def tests; end end -# source://m//lib/m/frameworks.rb#2 +# pkg:gem/m#lib/m/frameworks.rb:2 class M::Frameworks - # source://m//lib/m/frameworks.rb#7 + # pkg:gem/m#lib/m/frameworks.rb:7 def framework_runner; end private - # @return [Boolean] - # - # source://m//lib/m/frameworks.rb#25 + # pkg:gem/m#lib/m/frameworks.rb:25 def minitest4?; end - # @return [Boolean] - # - # source://m//lib/m/frameworks.rb#21 + # pkg:gem/m#lib/m/frameworks.rb:21 def minitest5?; end - # @return [Boolean] - # - # source://m//lib/m/frameworks.rb#29 + # pkg:gem/m#lib/m/frameworks.rb:29 def test_unit?; end class << self - # source://m//lib/m/frameworks.rb#3 + # pkg:gem/m#lib/m/frameworks.rb:3 def framework_runner; end - # @return [Boolean] - # - # source://m//lib/m/frameworks.rb#41 + # pkg:gem/m#lib/m/frameworks.rb:41 def minitest4?; end - # @return [Boolean] - # - # source://m//lib/m/frameworks.rb#37 + # pkg:gem/m#lib/m/frameworks.rb:37 def minitest5?; end - # source://m//lib/m/frameworks.rb#33 + # pkg:gem/m#lib/m/frameworks.rb:33 def minitest_version_major; end - # @return [Boolean] - # - # source://m//lib/m/frameworks.rb#45 + # pkg:gem/m#lib/m/frameworks.rb:45 def test_unit?; end end end -# source://m//lib/m/parser.rb#4 +# pkg:gem/m#lib/m/parser.rb:4 class M::Parser - # @return [Parser] a new instance of Parser - # - # source://m//lib/m/parser.rb#5 + # pkg:gem/m#lib/m/parser.rb:5 def initialize(argv); end - # source://m//lib/m/parser.rb#10 + # pkg:gem/m#lib/m/parser.rb:10 def parse; end private - # Returns the value of attribute argv. - # - # source://m//lib/m/parser.rb#56 + # pkg:gem/m#lib/m/parser.rb:56 def argv; end - # source://m//lib/m/parser.rb#58 + # pkg:gem/m#lib/m/parser.rb:58 def parse_options!(argv); end - # Returns the value of attribute testable. - # - # source://m//lib/m/parser.rb#56 + # pkg:gem/m#lib/m/parser.rb:56 def testable; end - # source://m//lib/m/parser.rb#89 + # pkg:gem/m#lib/m/parser.rb:89 def wildcard(type); end end -# source://m//lib/m/runner.rb#7 +# pkg:gem/m#lib/m/runner.rb:7 class M::Runner - # @return [Runner] a new instance of Runner - # - # source://m//lib/m/runner.rb#8 + # pkg:gem/m#lib/m/runner.rb:8 def initialize(argv); end # There's two steps to running our tests: # 1. Parsing the given input for the tests we need to find (or groups of tests) # 2. Run those tests we found that match what you wanted # - # source://m//lib/m/runner.rb#15 + # pkg:gem/m#lib/m/runner.rb:15 def run; end end -# source://m//lib/m/runners/base.rb#2 +# pkg:gem/m#lib/m/runners/base.rb:2 module M::Runners; end -# source://m//lib/m/runners/base.rb#3 +# pkg:gem/m#lib/m/runners/base.rb:3 class M::Runners::Base - # source://m//lib/m/runners/base.rb#8 + # pkg:gem/m#lib/m/runners/base.rb:8 def run(_test_arguments); end - # source://m//lib/m/runners/base.rb#4 + # pkg:gem/m#lib/m/runners/base.rb:4 def suites; end - # source://m//lib/m/runners/base.rb#12 + # pkg:gem/m#lib/m/runners/base.rb:12 def test_methods(suite_class); end end -# source://m//lib/m/runners/minitest_4.rb#3 +# pkg:gem/m#lib/m/runners/minitest_4.rb:3 class M::Runners::Minitest4 < ::M::Runners::Base - # source://m//lib/m/runners/minitest_4.rb#8 + # pkg:gem/m#lib/m/runners/minitest_4.rb:8 def run(test_arguments); end - # source://m//lib/m/runners/minitest_4.rb#4 + # pkg:gem/m#lib/m/runners/minitest_4.rb:4 def suites; end end -# source://m//lib/m/runners/minitest_5.rb#3 +# pkg:gem/m#lib/m/runners/minitest_5.rb:3 class M::Runners::Minitest5 < ::M::Runners::Base - # source://m//lib/m/runners/minitest_5.rb#8 + # pkg:gem/m#lib/m/runners/minitest_5.rb:8 def run(test_arguments); end - # source://m//lib/m/runners/minitest_5.rb#4 + # pkg:gem/m#lib/m/runners/minitest_5.rb:4 def suites; end - # source://m//lib/m/runners/minitest_5.rb#14 + # pkg:gem/m#lib/m/runners/minitest_5.rb:14 def test_methods(suite_class); end end -# source://m//lib/m/runners/test_unit.rb#3 +# pkg:gem/m#lib/m/runners/test_unit.rb:3 class M::Runners::TestUnit < ::M::Runners::Base - # source://m//lib/m/runners/test_unit.rb#12 + # pkg:gem/m#lib/m/runners/test_unit.rb:12 def run(test_arguments); end - # source://m//lib/m/runners/test_unit.rb#4 + # pkg:gem/m#lib/m/runners/test_unit.rb:4 def suites; end - # source://m//lib/m/runners/test_unit.rb#16 + # pkg:gem/m#lib/m/runners/test_unit.rb:16 def test_methods(suite_class); end end -# source://m//lib/m/runners/unsupported_framework.rb#3 +# pkg:gem/m#lib/m/runners/unsupported_framework.rb:3 class M::Runners::UnsupportedFramework < ::M::Runners::Base - # source://m//lib/m/runners/unsupported_framework.rb#9 + # pkg:gem/m#lib/m/runners/unsupported_framework.rb:9 def run(_test_arguments); end - # source://m//lib/m/runners/unsupported_framework.rb#4 + # pkg:gem/m#lib/m/runners/unsupported_framework.rb:4 def suites; end private - # source://m//lib/m/runners/unsupported_framework.rb#15 + # pkg:gem/m#lib/m/runners/unsupported_framework.rb:15 def not_supported; end end -# source://m//lib/m/testable.rb#2 +# pkg:gem/m#lib/m/testable.rb:2 class M::Testable - # @return [Testable] a new instance of Testable - # - # source://m//lib/m/testable.rb#6 + # pkg:gem/m#lib/m/testable.rb:6 def initialize(file = T.unsafe(nil), lines = T.unsafe(nil), recursive = T.unsafe(nil)); end - # Returns the value of attribute file. - # - # source://m//lib/m/testable.rb#3 + # pkg:gem/m#lib/m/testable.rb:3 def file; end - # Sets the attribute file - # - # @param value the value to set the attribute file to. - # - # source://m//lib/m/testable.rb#3 + # pkg:gem/m#lib/m/testable.rb:3 def file=(_arg0); end - # Returns the value of attribute lines. - # - # source://m//lib/m/testable.rb#4 + # pkg:gem/m#lib/m/testable.rb:4 def lines; end - # source://m//lib/m/testable.rb#13 + # pkg:gem/m#lib/m/testable.rb:13 def lines=(lines); end - # Returns the value of attribute passthrough_options. - # - # source://m//lib/m/testable.rb#3 + # pkg:gem/m#lib/m/testable.rb:3 def passthrough_options; end - # Sets the attribute passthrough_options - # - # @param value the value to set the attribute passthrough_options to. - # - # source://m//lib/m/testable.rb#3 + # pkg:gem/m#lib/m/testable.rb:3 def passthrough_options=(_arg0); end - # Returns the value of attribute recursive. - # - # source://m//lib/m/testable.rb#3 + # pkg:gem/m#lib/m/testable.rb:3 def recursive; end - # Sets the attribute recursive - # - # @param value the value to set the attribute recursive to. - # - # source://m//lib/m/testable.rb#3 + # pkg:gem/m#lib/m/testable.rb:3 def recursive=(_arg0); end end -# source://m//lib/m/version.rb#2 +# pkg:gem/m#lib/m/version.rb:2 M::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/method_source@1.1.0.rbi b/sorbet/rbi/gems/method_source@1.1.0.rbi index 4e40c9a7e..49356fcef 100644 --- a/sorbet/rbi/gems/method_source@1.1.0.rbi +++ b/sorbet/rbi/gems/method_source@1.1.0.rbi @@ -4,300 +4,6 @@ # This is an autogenerated file for types exported from the `method_source` gem. # Please instead update this file by running `bin/tapioca gem method_source`. -# source://method_source//lib/method_source.rb#163 -class Method - include ::MethodSource::SourceLocation::MethodExtensions - include ::MethodSource::MethodExtensions -end -# source://method_source//lib/method_source/version.rb#1 -module MethodSource - extend ::MethodSource::CodeHelpers - - class << self - # Clear cache. - # - # source://method_source//lib/method_source.rb#59 - def clear_cache; end - - # Helper method responsible for opening source file and buffering up - # the comments for a specified method. Defined here to avoid polluting - # `Method` class. - # - # @param source_location [Array] The array returned by Method#source_location - # @param method_name [String] - # @raise [SourceNotFoundError] - # @return [String] The comments up to the point of the method. - # - # source://method_source//lib/method_source.rb#38 - def comment_helper(source_location, name = T.unsafe(nil)); end - - # @deprecated — use MethodSource::CodeHelpers#expression_at - # - # source://method_source//lib/method_source.rb#71 - def extract_code(source_location); end - - # Load a memoized copy of the lines in a file. - # - # @param file_name [String] - # @param method_name [String] - # @raise [SourceNotFoundError] - # @return [Array] the contents of the file - # - # source://method_source//lib/method_source.rb#51 - def lines_for(file_name, name = T.unsafe(nil)); end - - # Helper method responsible for extracting method body. - # Defined here to avoid polluting `Method` class. - # - # @param source_location [Array] The array returned by Method#source_location - # @param method_name [String] - # @return [String] The method body - # - # source://method_source//lib/method_source.rb#23 - def source_helper(source_location, name = T.unsafe(nil)); end - - # @deprecated — use MethodSource::CodeHelpers#complete_expression? - # @return [Boolean] - # - # source://method_source//lib/method_source.rb#64 - def valid_expression?(str); end - end -end - -# source://method_source//lib/method_source/code_helpers.rb#3 -module MethodSource::CodeHelpers - # Retrieve the comment describing the expression on the given line of the given file. - # - # This is useful to get module or method documentation. - # - # @param file [Array, File, String] The file to parse, either as a File or as - # a String or an Array of lines. - # @param line_number [Integer] The line number at which to look. - # NOTE: The first line in a file is line 1! - # @return [String] The comment - # - # source://method_source//lib/method_source/code_helpers.rb#52 - def comment_describing(file, line_number); end - - # Determine if a string of code is a complete Ruby expression. - # - # @example - # complete_expression?("class Hello") #=> false - # complete_expression?("class Hello; end") #=> true - # complete_expression?("class 123") #=> SyntaxError: unexpected tINTEGER - # @param code [String] The code to validate. - # @raise [SyntaxError] Any SyntaxError that does not represent incompleteness. - # @return [Boolean] Whether or not the code is a complete Ruby expression. - # - # source://method_source//lib/method_source/code_helpers.rb#66 - def complete_expression?(str); end - - # Retrieve the first expression starting on the given line of the given file. - # - # This is useful to get module or method source code. - # - # line 1! - # - # @option options - # @option options - # @param file [Array, File, String] The file to parse, either as a File or as - # @param line_number [Integer] The line number at which to look. - # NOTE: The first line in a file is - # @param options [Hash] The optional configuration parameters. - # @raise [SyntaxError] If the first complete expression can't be identified - # @return [String] The first complete expression - # - # source://method_source//lib/method_source/code_helpers.rb#20 - def expression_at(file, line_number, options = T.unsafe(nil)); end - - private - - # Get the first expression from the input. - # - # @param lines [Array] - # @param consume [Integer] A number of lines to automatically - # consume (add to the expression buffer) without checking for validity. - # @raise [SyntaxError] - # @return [String] a valid ruby expression - # @yield a clean-up function to run before checking for complete_expression - # - # source://method_source//lib/method_source/code_helpers.rb#92 - def extract_first_expression(lines, consume = T.unsafe(nil), &block); end - - # Get the last comment from the input. - # - # @param lines [Array] - # @return [String] - # - # source://method_source//lib/method_source/code_helpers.rb#106 - def extract_last_comment(lines); end -end - -# An exception matcher that matches only subsets of SyntaxErrors that can be -# fixed by adding more input to the buffer. -# -# source://method_source//lib/method_source/code_helpers.rb#124 -module MethodSource::CodeHelpers::IncompleteExpression - class << self - # source://method_source//lib/method_source/code_helpers.rb#137 - def ===(ex); end - - # @return [Boolean] - # - # source://method_source//lib/method_source/code_helpers.rb#149 - def rbx?; end - end -end - -# source://method_source//lib/method_source/code_helpers.rb#125 -MethodSource::CodeHelpers::IncompleteExpression::GENERIC_REGEXPS = T.let(T.unsafe(nil), Array) - -# source://method_source//lib/method_source/code_helpers.rb#133 -MethodSource::CodeHelpers::IncompleteExpression::RBX_ONLY_REGEXPS = T.let(T.unsafe(nil), Array) - -# This module is to be included by `Method` and `UnboundMethod` and -# provides the `#source` functionality -# -# source://method_source//lib/method_source.rb#77 -module MethodSource::MethodExtensions - # Return the comments associated with the method class/module. - # - # @example - # MethodSource::MethodExtensions.method(:included).module_comment - # => - # # This module is to be included by `Method` and `UnboundMethod` and - # # provides the `#source` functionality - # @raise SourceNotFoundException - # @return [String] The method's comments as a string - # - # source://method_source//lib/method_source.rb#139 - def class_comment; end - - # Return the comments associated with the method as a string. - # - # @example - # Set.instance_method(:clear).comment.display - # => - # # Removes all elements and returns self. - # @raise SourceNotFoundException - # @return [String] The method's comments as a string - # - # source://method_source//lib/method_source.rb#126 - def comment; end - - # Return the comments associated with the method class/module. - # - # @example - # MethodSource::MethodExtensions.method(:included).module_comment - # => - # # This module is to be included by `Method` and `UnboundMethod` and - # # provides the `#source` functionality - # @raise SourceNotFoundException - # @return [String] The method's comments as a string - # - # source://method_source//lib/method_source.rb#139 - def module_comment; end - - # Return the sourcecode for the method as a string - # - # @example - # Set.instance_method(:clear).source.display - # => - # def clear - # @hash.clear - # self - # end - # @raise SourceNotFoundException - # @return [String] The method sourcecode as a string - # - # source://method_source//lib/method_source.rb#114 - def source; end - - class << self - # We use the included hook to patch Method#source on rubinius. - # We need to use the included hook as Rubinius defines a `source` - # on Method so including a module will have no effect (as it's - # higher up the MRO). - # - # @param klass [Class] The class that includes the module. - # - # source://method_source//lib/method_source.rb#84 - def included(klass); end - end -end - -# source://method_source//lib/method_source/source_location.rb#2 -module MethodSource::ReeSourceLocation - # Ruby enterprise edition provides all the information that's - # needed, in a slightly different way. - # - # source://method_source//lib/method_source/source_location.rb#5 - def source_location; end -end - -# source://method_source//lib/method_source/source_location.rb#10 -module MethodSource::SourceLocation; end - -# source://method_source//lib/method_source/source_location.rb#11 -module MethodSource::SourceLocation::MethodExtensions - # Return the source location of a method for Ruby 1.8. - # - # @return [Array] A two element array. First element is the - # file, second element is the line in the file where the - # method definition is found. - # - # source://method_source//lib/method_source/source_location.rb#40 - def source_location; end - - private - - # source://method_source//lib/method_source/source_location.rb#26 - def trace_func(event, file, line, id, binding, classname); end -end - -# source://method_source//lib/method_source/source_location.rb#54 -module MethodSource::SourceLocation::ProcExtensions - # Return the source location for a Proc (in implementations - # without Proc#source_location) - # - # @return [Array] A two element array. First element is the - # file, second element is the line in the file where the - # proc definition is found. - # - # source://method_source//lib/method_source/source_location.rb#74 - def source_location; end -end - -# source://method_source//lib/method_source/source_location.rb#81 -module MethodSource::SourceLocation::UnboundMethodExtensions - # Return the source location of an instance method for Ruby 1.8. - # - # @return [Array] A two element array. First element is the - # file, second element is the line in the file where the - # method definition is found. - # - # source://method_source//lib/method_source/source_location.rb#101 - def source_location; end -end - -# An Exception to mark errors that were raised trying to find the source from -# a given source_location. -# -# source://method_source//lib/method_source.rb#16 -class MethodSource::SourceNotFoundError < ::StandardError; end - -# source://method_source//lib/method_source/version.rb#2 -MethodSource::VERSION = T.let(T.unsafe(nil), String) - -# source://method_source//lib/method_source.rb#173 -class Proc - include ::MethodSource::SourceLocation::ProcExtensions - include ::MethodSource::MethodExtensions -end - -# source://method_source//lib/method_source.rb#168 -class UnboundMethod - include ::MethodSource::SourceLocation::UnboundMethodExtensions - include ::MethodSource::MethodExtensions -end +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/minitest-focus@1.3.1.rbi b/sorbet/rbi/gems/minitest-focus@1.3.1.rbi index 843b89bce..b105051d0 100644 --- a/sorbet/rbi/gems/minitest-focus@1.3.1.rbi +++ b/sorbet/rbi/gems/minitest-focus@1.3.1.rbi @@ -4,38 +4,18 @@ # This is an autogenerated file for types exported from the `minitest-focus` gem. # Please instead update this file by running `bin/tapioca gem minitest-focus`. -# source://minitest-focus//lib/minitest/focus.rb#3 + +# pkg:gem/minitest-focus#lib/minitest/focus.rb:3 class Minitest::Test < ::Minitest::Runnable include ::Mocha::ParameterMatchers include ::Mocha::Hooks include ::Mocha::API - # source://minitest/5.16.2/lib/minitest/test.rb#194 - def capture_exceptions; end - - # source://minitest/5.16.2/lib/minitest/test.rb#15 - def class_name; end - - # source://minitest/5.16.2/lib/minitest/test.rb#211 - def neuter_exception(e); end - - # source://minitest/5.16.2/lib/minitest/test.rb#222 - def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end - - # source://minitest/5.16.2/lib/minitest/test.rb#92 - def run; end - - # source://minitest/5.16.2/lib/minitest/test.rb#204 - def sanitize_exception(e); end - - # source://minitest/5.16.2/lib/minitest/test.rb#236 - def with_info_handler(&block); end - class << self - # source://minitest-focus//lib/minitest/focus.rb#10 + # pkg:gem/minitest-focus#lib/minitest/focus.rb:10 def add_to_filter(name); end - # source://minitest-focus//lib/minitest/focus.rb#14 + # pkg:gem/minitest-focus#lib/minitest/focus.rb:14 def filtered_names; end # Focus on the next test defined. Cumulative. Equivalent to @@ -59,40 +39,19 @@ class Minitest::Test < ::Minitest::Runnable # end # end # - # source://minitest-focus//lib/minitest/focus.rb#40 + # pkg:gem/minitest-focus#lib/minitest/focus.rb:40 def focus(name = T.unsafe(nil)); end - # source://minitest/5.16.2/lib/minitest/test.rb#31 - def i_suck_and_my_tests_are_order_dependent!; end - - # source://minitest/5.16.2/lib/minitest/test.rb#22 - def io_lock; end - - # source://minitest/5.16.2/lib/minitest/test.rb#22 - def io_lock=(_arg0); end - - # source://minitest/5.16.2/lib/minitest/test.rb#44 - def make_my_diffs_pretty!; end - - # source://minitest/5.16.2/lib/minitest/test.rb#55 - def parallelize_me!; end - - # source://minitest/5.16.2/lib/minitest/test.rb#65 - def runnable_methods; end - # Sets a one-off method_added callback to set focus on the method # defined next. # - # source://minitest-focus//lib/minitest/focus.rb#52 + # pkg:gem/minitest-focus#lib/minitest/focus.rb:52 def set_focus_trap; end - - # source://minitest/5.16.2/lib/minitest/test.rb#83 - def test_order; end end end -# source://minitest-focus//lib/minitest/focus.rb#4 +# pkg:gem/minitest-focus#lib/minitest/focus.rb:4 class Minitest::Test::Focus; end -# source://minitest-focus//lib/minitest/focus.rb#5 +# pkg:gem/minitest-focus#lib/minitest/focus.rb:5 Minitest::Test::Focus::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/minitest-mock@5.27.0.rbi b/sorbet/rbi/gems/minitest-mock@5.27.0.rbi new file mode 100644 index 000000000..3c5bd7dd2 --- /dev/null +++ b/sorbet/rbi/gems/minitest-mock@5.27.0.rbi @@ -0,0 +1,153 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `minitest-mock` gem. +# Please instead update this file by running `bin/tapioca gem minitest-mock`. + + +# pkg:gem/minitest-mock#lib/minitest/mock.rb:3 +module Minitest; end + +# pkg:gem/minitest-mock#lib/minitest/mock.rb:239 +module Minitest::Assertions + # Assert that the mock verifies correctly and fail if not. + # + # pkg:gem/minitest-mock#lib/minitest/mock.rb:243 + def assert_mock(mock, msg = T.unsafe(nil)); end +end + +# pkg:gem/minitest-mock#lib/minitest/mock.rb:251 +module Minitest::Expectations; end + +# A simple and clean mock object framework. +# +# All mock objects are an instance of Mock +# +# pkg:gem/minitest-mock#lib/minitest/mock.rb:10 +class Minitest::Mock + # pkg:gem/minitest-mock#lib/minitest/mock.rb:47 + def initialize(delegator = T.unsafe(nil)); end + + # pkg:gem/minitest-mock#lib/minitest/mock.rb:36 + def ===(*args, **kwargs, &b); end + + # pkg:gem/minitest-mock#lib/minitest/mock.rb:119 + def __call(name, data); end + + # pkg:gem/minitest-mock#lib/minitest/mock.rb:13 + def __respond_to?(*_arg0); end + + # pkg:gem/minitest-mock#lib/minitest/mock.rb:36 + def class(*args, **kwargs, &b); end + + # Expect that method +name+ is called, optionally with +args+ (and + # +kwargs+ or a +blk+), and returns +retval+. + # + # @mock.expect(:meaning_of_life, 42) + # @mock.meaning_of_life # => 42 + # + # @mock.expect(:do_something_with, true, [some_obj, true]) + # @mock.do_something_with(some_obj, true) # => true + # + # @mock.expect(:do_something_else, true) do |a1, a2| + # a1 == "buggs" && a2 == :bunny + # end + # + # +args+ is compared to the expected args using case equality (ie, the + # '===' operator), allowing for less specific expectations. + # + # @mock.expect(:uses_any_string, true, [String]) + # @mock.uses_any_string("foo") # => true + # @mock.verify # => true + # + # @mock.expect(:uses_one_string, true, ["foo"]) + # @mock.uses_one_string("bar") # => raises MockExpectationError + # + # If a method will be called multiple times, specify a new expect for each one. + # They will be used in the order you define them. + # + # @mock.expect(:ordinal_increment, 'first') + # @mock.expect(:ordinal_increment, 'second') + # + # @mock.ordinal_increment # => 'first' + # @mock.ordinal_increment # => 'second' + # @mock.ordinal_increment # => raises MockExpectationError "No more expects available for :ordinal_increment" + # + # pkg:gem/minitest-mock#lib/minitest/mock.rb:90 + def expect(name, retval, args = T.unsafe(nil), **kwargs, &blk); end + + # pkg:gem/minitest-mock#lib/minitest/mock.rb:36 + def inspect(*args, **kwargs, &b); end + + # pkg:gem/minitest-mock#lib/minitest/mock.rb:36 + def instance_eval(*args, **kwargs, &b); end + + # pkg:gem/minitest-mock#lib/minitest/mock.rb:36 + def instance_variables(*args, **kwargs, &b); end + + # pkg:gem/minitest-mock#lib/minitest/mock.rb:149 + def method_missing(sym, *args, **kwargs, &block); end + + # pkg:gem/minitest-mock#lib/minitest/mock.rb:36 + def object_id(*args, **kwargs, &b); end + + # pkg:gem/minitest-mock#lib/minitest/mock.rb:36 + def public_send(*args, **kwargs, &b); end + + # pkg:gem/minitest-mock#lib/minitest/mock.rb:231 + def respond_to?(sym, include_private = T.unsafe(nil)); end + + # pkg:gem/minitest-mock#lib/minitest/mock.rb:36 + def send(*args, **kwargs, &b); end + + # pkg:gem/minitest-mock#lib/minitest/mock.rb:36 + def to_s(*args, **kwargs, &b); end + + # Verify that all methods were called as expected. Raises + # +MockExpectationError+ if the mock object was not called as + # expected. + # + # pkg:gem/minitest-mock#lib/minitest/mock.rb:139 + def verify; end + + private + + # pkg:gem/minitest-mock#lib/minitest/mock.rb:36 + def respond_to_missing?(*args, **kwargs, &b); end +end + +# pkg:gem/minitest-mock#lib/minitest/mock.rb:11 +Minitest::Mock::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/minitest-mock#lib/minitest/mock.rb:1 +class MockExpectationError < ::StandardError; end + +# Object extensions for Minitest::Mock. +# +# pkg:gem/minitest-mock#lib/minitest/mock.rb:266 +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + # Add a temporary stubbed method replacing +name+ for the duration + # of the +block+. If +val_or_callable+ responds to #call, then it + # returns the result of calling it, otherwise returns the value + # as-is. If stubbed method yields a block, +block_args+ will be + # passed along. Cleans up the stub at the end of the +block+. The + # method +name+ must exist before stubbing. + # + # def test_stale_eh + # obj_under_test = Something.new + # refute obj_under_test.stale? + # + # Time.stub :now, Time.at(0) do + # assert obj_under_test.stale? + # end + # end + # -- + # NOTE: keyword args in callables are NOT checked for correctness + # against the existing method. Too many edge cases to be worth it. + # + # pkg:gem/minitest-mock#lib/minitest/mock.rb:288 + def stub(name, val_or_callable, *block_args, **block_kwargs, &block); end +end diff --git a/sorbet/rbi/gems/minitest@5.25.4.rbi b/sorbet/rbi/gems/minitest@5.25.4.rbi deleted file mode 100644 index f95c0ad40..000000000 --- a/sorbet/rbi/gems/minitest@5.25.4.rbi +++ /dev/null @@ -1,2229 +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`. - -# Kernel extensions for minitest -# -# source://minitest//lib/minitest/spec.rb#46 -module Kernel - private - - # Describe a series of expectations for a given target +desc+. - # - # Defines a test class subclassing from either Minitest::Spec or - # from the surrounding describe's class. The surrounding class may - # subclass Minitest::Spec manually in order to easily share code: - # - # class MySpec < Minitest::Spec - # # ... shared code ... - # end - # - # class TestStuff < MySpec - # it "does stuff" do - # # shared code available here - # end - # describe "inner stuff" do - # it "still does stuff" do - # # ...and here - # end - # end - # end - # - # For more information on getting started with writing specs, see: - # - # http://www.rubyinside.com/a-minitestspec-tutorial-elegant-spec-style-testing-that-comes-with-ruby-5354.html - # - # For some suggestions on how to improve your specs, try: - # - # https://betterspecs.org - # - # but do note that several items there are debatable or specific to - # rspec. - # - # For more information about expectations, see Minitest::Expectations. - # - # source://minitest//lib/minitest/spec.rb#82 - def describe(desc, *additional_desc, &block); end -end - -# The top-level namespace for Minitest. Also the location of the main -# runtime. See +Minitest.run+ for more information. -# -# source://minitest//lib/minitest/parallel.rb#1 -module Minitest - class << self - # Internal run method. Responsible for telling all Runnable - # sub-classes to run. - # - # source://minitest//lib/minitest.rb#323 - def __run(reporter, options); end - - # A simple hook allowing you to run a block of code after everything - # is done running. Eg: - # - # Minitest.after_run { p $debugging_info } - # - # source://minitest//lib/minitest.rb#97 - def after_run(&block); end - - # source://minitest//lib/minitest.rb#20 - def allow_fork; end - - # source://minitest//lib/minitest.rb#20 - def allow_fork=(_arg0); end - - # Registers Minitest to run at process exit - # - # source://minitest//lib/minitest.rb#70 - def autorun; end - - # source://minitest//lib/minitest.rb#20 - def backtrace_filter; end - - # source://minitest//lib/minitest.rb#20 - def backtrace_filter=(_arg0); end - - # source://minitest//lib/minitest.rb#19 - def cattr_accessor(name); end - - # source://minitest//lib/minitest.rb#1216 - def clock_time; end - - # source://minitest//lib/minitest.rb#303 - def empty_run!(options); end - - # source://minitest//lib/minitest.rb#20 - def extensions; end - - # source://minitest//lib/minitest.rb#20 - def extensions=(_arg0); end - - # source://minitest//lib/minitest.rb#336 - def filter_backtrace(bt); end - - # source://minitest//lib/minitest.rb#20 - def info_signal; end - - # source://minitest//lib/minitest.rb#20 - def info_signal=(_arg0); end - - # source://minitest//lib/minitest.rb#125 - def init_plugins(options); end - - # source://minitest//lib/minitest.rb#109 - def load_plugins; end - - # source://minitest//lib/minitest.rb#20 - def parallel_executor; end - - # source://minitest//lib/minitest.rb#20 - def parallel_executor=(_arg0); end - - # source://minitest//lib/minitest.rb#143 - def process_args(args = T.unsafe(nil)); end - - # Register a plugin to be used. Does NOT require / load it. - # - # source://minitest//lib/minitest.rb#104 - def register_plugin(name_or_mod); end - - # source://minitest//lib/minitest.rb#20 - def reporter; end - - # source://minitest//lib/minitest.rb#20 - def reporter=(_arg0); end - - # This is the top-level run method. Everything starts from here. It - # tells each Runnable sub-class to run, and each of those are - # responsible for doing whatever they do. - # - # The overall structure of a run looks like this: - # - # Minitest.autorun - # Minitest.run(args) - # Minitest.load_plugins - # Minitest.process_args - # Minitest.init_plugins - # Minitest.__run(reporter, options) - # Runnable.runnables.each - # runnable_klass.run(reporter, options) - # self.runnable_methods.each - # self.run_one_method(self, runnable_method, reporter) - # Minitest.run_one_method(klass, runnable_method) - # klass.new(runnable_method).run - # - # source://minitest//lib/minitest.rb#269 - def run(args = T.unsafe(nil)); end - - # source://minitest//lib/minitest.rb#1207 - def run_one_method(klass, method_name); end - - # source://minitest//lib/minitest.rb#20 - def seed; end - - # source://minitest//lib/minitest.rb#20 - def seed=(_arg0); end - end -end - -# Defines the API for Reporters. Subclass this and override whatever -# you want. Go nuts. -# -# source://minitest//lib/minitest.rb#687 -class Minitest::AbstractReporter - # @return [AbstractReporter] a new instance of AbstractReporter - # - # source://minitest//lib/minitest.rb#689 - def initialize; end - - # Did this run pass? - # - # @return [Boolean] - # - # source://minitest//lib/minitest.rb#724 - def passed?; end - - # About to start running a test. This allows a reporter to show - # that it is starting or that we are in the middle of a test run. - # - # source://minitest//lib/minitest.rb#703 - def prerecord(klass, name); end - - # Output and record the result of the test. Call - # {result#result_code}[rdoc-ref:Runnable#result_code] to get the - # result character string. Stores the result of the run if the run - # did not pass. - # - # source://minitest//lib/minitest.rb#712 - def record(result); end - - # Outputs the summary of the run. - # - # source://minitest//lib/minitest.rb#718 - def report; end - - # Starts reporting on the run. - # - # source://minitest//lib/minitest.rb#696 - def start; end - - # source://minitest//lib/minitest.rb#728 - def synchronize(&block); end -end - -# Represents run failures. -# -# source://minitest//lib/minitest.rb#1020 -class Minitest::Assertion < ::Exception - # source://minitest//lib/minitest.rb#1023 - def error; end - - # Where was this run before an assertion was raised? - # - # source://minitest//lib/minitest.rb#1030 - def location; end - - # source://minitest//lib/minitest.rb#1038 - def result_code; end - - # source://minitest//lib/minitest.rb#1042 - def result_label; end -end - -# source://minitest//lib/minitest.rb#1021 -Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp) - -# Minitest Assertions. All assertion methods accept a +msg+ which is -# printed if the assertion fails. -# -# Protocol: Nearly everything here boils up to +assert+, which -# expects to be able to increment an instance accessor named -# +assertions+. This is not provided by Assertions and must be -# provided by the thing including Assertions. See Minitest::Runnable -# for an example. -# -# source://minitest//lib/minitest/assertions.rb#16 -module Minitest::Assertions - # source://minitest//lib/minitest/assertions.rb#181 - def _synchronize; end - - # source://minitest//lib/minitest/assertions.rb#194 - def _where; end - - # Fails unless +test+ is truthy. - # - # source://minitest//lib/minitest/assertions.rb#171 - def assert(test, msg = T.unsafe(nil)); end - - # Fails unless +obj+ is empty. - # - # source://minitest//lib/minitest/assertions.rb#188 - def assert_empty(obj, msg = T.unsafe(nil)); end - - # Fails unless exp == act printing the difference between - # the two, if possible. - # - # If there is no visible difference but the assertion fails, you - # should suspect that your #== is buggy, or your inspect output is - # missing crucial details. For nicer structural diffing, set - # Minitest::Test.make_my_diffs_pretty! - # - # For floats use assert_in_delta. - # - # See also: Minitest::Assertions.diff - # - # source://minitest//lib/minitest/assertions.rb#214 - def assert_equal(exp, act, msg = T.unsafe(nil)); end - - # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+ - # of each other. - # - # assert_in_delta Math::PI, (22.0 / 7.0), 0.01 - # - # source://minitest//lib/minitest/assertions.rb#235 - def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end - - # For comparing Floats. Fails unless +exp+ and +act+ have a relative - # error less than +epsilon+. - # - # source://minitest//lib/minitest/assertions.rb#247 - def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end - - # Fails unless +collection+ includes +obj+. - # - # source://minitest//lib/minitest/assertions.rb#254 - def assert_includes(collection, obj, msg = T.unsafe(nil)); end - - # Fails unless +obj+ is an instance of +cls+. - # - # source://minitest//lib/minitest/assertions.rb#265 - def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end - - # Fails unless +obj+ is a kind of +cls+. - # - # source://minitest//lib/minitest/assertions.rb#276 - def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end - - # Fails unless +matcher+ =~ +obj+. - # - # source://minitest//lib/minitest/assertions.rb#287 - def assert_match(matcher, obj, msg = T.unsafe(nil)); end - - # Assert that the mock verifies correctly and fail if not. - # - # source://minitest//lib/minitest/mock.rb#253 - def assert_mock(mock, msg = T.unsafe(nil)); end - - # Fails unless +obj+ is nil - # - # source://minitest//lib/minitest/assertions.rb#299 - def assert_nil(obj, msg = T.unsafe(nil)); end - - # For testing with binary operators. Eg: - # - # assert_operator 5, :<=, 4 - # - # source://minitest//lib/minitest/assertions.rb#309 - def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end - - # Fails if stdout or stderr do not output the expected results. - # Pass in nil if you don't care about that streams output. Pass in - # "" if you require it to be silent. Pass in a regexp if you want - # to pattern match. - # - # assert_output(/hey/) { method_with_output } - # - # NOTE: this uses #capture_io, not #capture_subprocess_io. - # - # See also: #assert_silent - # - # source://minitest//lib/minitest/assertions.rb#327 - def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end - - # Fails unless +path+ exists. - # - # source://minitest//lib/minitest/assertions.rb#351 - def assert_path_exists(path, msg = T.unsafe(nil)); end - - # For testing with pattern matching (only supported with Ruby 3.0 and later) - # - # # pass - # assert_pattern { [1,2,3] => [Integer, Integer, Integer] } - # - # # fail "length mismatch (given 3, expected 1)" - # assert_pattern { [1,2,3] => [Integer] } - # - # The bare => pattern will raise a NoMatchingPatternError on failure, which would - # normally be counted as a test error. This assertion rescues NoMatchingPatternError and - # generates a test failure. Any other exception will be raised as normal and generate a test - # error. - # - # @raise [NotImplementedError] - # - # source://minitest//lib/minitest/assertions.rb#370 - def assert_pattern; end - - # For testing with predicates. Eg: - # - # assert_predicate str, :empty? - # - # This is really meant for specs and is front-ended by assert_operator: - # - # str.must_be :empty? - # - # source://minitest//lib/minitest/assertions.rb#391 - def assert_predicate(o1, op, msg = T.unsafe(nil)); end - - # Fails unless the block raises one of +exp+. Returns the - # exception matched so you can check the message, attributes, etc. - # - # +exp+ takes an optional message on the end to help explain - # failures and defaults to StandardError if no exception class is - # passed. Eg: - # - # assert_raises(CustomError) { method_with_custom_error } - # - # With custom error message: - # - # assert_raises(CustomError, 'This should have raised CustomError') { method_with_custom_error } - # - # Using the returned object: - # - # error = assert_raises(CustomError) do - # raise CustomError, 'This is really bad' - # end - # - # assert_equal 'This is really bad', error.message - # - # source://minitest//lib/minitest/assertions.rb#418 - def assert_raises(*exp); end - - # Fails unless +obj+ responds to +meth+. - # include_all defaults to false to match Object#respond_to? - # - # source://minitest//lib/minitest/assertions.rb#450 - def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end - - # Fails unless +exp+ and +act+ are #equal? - # - # source://minitest//lib/minitest/assertions.rb#460 - def assert_same(exp, act, msg = T.unsafe(nil)); end - - # +send_ary+ is a receiver, message and arguments. - # - # Fails unless the call returns a true value - # - # source://minitest//lib/minitest/assertions.rb#473 - def assert_send(send_ary, m = T.unsafe(nil)); end - - # Fails if the block outputs anything to stderr or stdout. - # - # See also: #assert_output - # - # source://minitest//lib/minitest/assertions.rb#488 - def assert_silent; end - - # Fails unless the block throws +sym+ - # - # source://minitest//lib/minitest/assertions.rb#497 - def assert_throws(sym, msg = T.unsafe(nil)); end - - # Captures $stdout and $stderr into strings: - # - # out, err = capture_io do - # puts "Some info" - # warn "You did a bad thing" - # end - # - # assert_match %r%info%, out - # assert_match %r%bad%, err - # - # NOTE: For efficiency, this method uses StringIO and does not - # capture IO for subprocesses. Use #capture_subprocess_io for - # that. - # - # source://minitest//lib/minitest/assertions.rb#538 - def capture_io; end - - # Captures $stdout and $stderr into strings, using Tempfile to - # ensure that subprocess IO is captured as well. - # - # out, err = capture_subprocess_io do - # system "echo Some info" - # system "echo You did a bad thing 1>&2" - # end - # - # assert_match %r%info%, out - # assert_match %r%bad%, err - # - # NOTE: This method is approximately 10x slower than #capture_io so - # only use it when you need to test the output of a subprocess. - # - # source://minitest//lib/minitest/assertions.rb#571 - def capture_subprocess_io; end - - # Returns a diff between +exp+ and +act+. If there is no known - # diff command or if it doesn't make sense to diff the output - # (single line, short output), then it simply returns a basic - # comparison between the two. - # - # See +things_to_diff+ for more info. - # - # source://minitest//lib/minitest/assertions.rb#57 - def diff(exp, act); end - - # Returns details for exception +e+ - # - # source://minitest//lib/minitest/assertions.rb#603 - def exception_details(e, msg); end - - # Fails after a given date (in the local time zone). This allows - # you to put time-bombs in your tests if you need to keep - # something around until a later date lest you forget about it. - # - # source://minitest//lib/minitest/assertions.rb#619 - def fail_after(y, m, d, msg); end - - # Fails with +msg+. - # - # source://minitest//lib/minitest/assertions.rb#626 - def flunk(msg = T.unsafe(nil)); end - - # Returns a proc that will output +msg+ along with the default message. - # - # source://minitest//lib/minitest/assertions.rb#634 - def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end - - # This returns a human-readable version of +obj+. By default - # #inspect is called. You can override this to use #pretty_inspect - # if you want. - # - # See Minitest::Test.make_my_diffs_pretty! - # - # source://minitest//lib/minitest/assertions.rb#127 - def mu_pp(obj); end - - # This returns a diff-able more human-readable version of +obj+. - # This differs from the regular mu_pp because it expands escaped - # newlines and makes hex-values (like object_ids) generic. This - # uses mu_pp to do the first pass and then cleans it up. - # - # source://minitest//lib/minitest/assertions.rb#145 - def mu_pp_for_diff(obj); end - - # used for counting assertions - # - # source://minitest//lib/minitest/assertions.rb#645 - def pass(_msg = T.unsafe(nil)); end - - # Fails if +test+ is truthy. - # - # source://minitest//lib/minitest/assertions.rb#652 - def refute(test, msg = T.unsafe(nil)); end - - # Fails if +obj+ is empty. - # - # source://minitest//lib/minitest/assertions.rb#660 - def refute_empty(obj, msg = T.unsafe(nil)); end - - # Fails if exp == act. - # - # For floats use refute_in_delta. - # - # source://minitest//lib/minitest/assertions.rb#671 - def refute_equal(exp, act, msg = T.unsafe(nil)); end - - # For comparing Floats. Fails if +exp+ is within +delta+ of +act+. - # - # refute_in_delta Math::PI, (22.0 / 7.0) - # - # source://minitest//lib/minitest/assertions.rb#683 - def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end - - # For comparing Floats. Fails if +exp+ and +act+ have a relative error - # less than +epsilon+. - # - # source://minitest//lib/minitest/assertions.rb#695 - def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end - - # Fails if +collection+ includes +obj+. - # - # source://minitest//lib/minitest/assertions.rb#702 - def refute_includes(collection, obj, msg = T.unsafe(nil)); end - - # Fails if +obj+ is an instance of +cls+. - # - # source://minitest//lib/minitest/assertions.rb#713 - def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end - - # Fails if +obj+ is a kind of +cls+. - # - # source://minitest//lib/minitest/assertions.rb#723 - def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end - - # Fails if +matcher+ =~ +obj+. - # - # source://minitest//lib/minitest/assertions.rb#731 - def refute_match(matcher, obj, msg = T.unsafe(nil)); end - - # Fails if +obj+ is nil. - # - # source://minitest//lib/minitest/assertions.rb#741 - def refute_nil(obj, msg = T.unsafe(nil)); end - - # Fails if +o1+ is not +op+ +o2+. Eg: - # - # refute_operator 1, :>, 2 #=> pass - # refute_operator 1, :<, 2 #=> fail - # - # source://minitest//lib/minitest/assertions.rb#776 - def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end - - # Fails if +path+ exists. - # - # source://minitest//lib/minitest/assertions.rb#785 - def refute_path_exists(path, msg = T.unsafe(nil)); end - - # For testing with pattern matching (only supported with Ruby 3.0 and later) - # - # # pass - # refute_pattern { [1,2,3] => [String] } - # - # # fail "NoMatchingPatternError expected, but nothing was raised." - # refute_pattern { [1,2,3] => [Integer, Integer, Integer] } - # - # This assertion expects a NoMatchingPatternError exception, and will fail if none is raised. Any - # other exceptions will be raised as normal and generate a test error. - # - # @raise [NotImplementedError] - # - # source://minitest//lib/minitest/assertions.rb#758 - def refute_pattern; end - - # For testing with predicates. - # - # refute_predicate str, :empty? - # - # This is really meant for specs and is front-ended by refute_operator: - # - # str.wont_be :empty? - # - # source://minitest//lib/minitest/assertions.rb#799 - def refute_predicate(o1, op, msg = T.unsafe(nil)); end - - # Fails if +obj+ responds to the message +meth+. - # include_all defaults to false to match Object#respond_to? - # - # source://minitest//lib/minitest/assertions.rb#808 - def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end - - # Fails if +exp+ is the same (by object identity) as +act+. - # - # source://minitest//lib/minitest/assertions.rb#817 - def refute_same(exp, act, msg = T.unsafe(nil)); end - - # Skips the current run. If run in verbose-mode, the skipped run - # gets listed at the end of the run but doesn't cause a failure - # exit code. - # - # @raise [Minitest::Skip] - # - # source://minitest//lib/minitest/assertions.rb#830 - def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end - - # Skips the current run until a given date (in the local time - # zone). This allows you to put some fixes on hold until a later - # date, but still holds you accountable and prevents you from - # forgetting it. - # - # source://minitest//lib/minitest/assertions.rb#842 - def skip_until(y, m, d, msg); end - - # Was this testcase skipped? Meant for #teardown. - # - # @return [Boolean] - # - # source://minitest//lib/minitest/assertions.rb#851 - def skipped?; end - - # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. - # - # Criterion: - # - # 1. Strings include newlines or escaped newlines, but not both. - # 2. or: String lengths are > 30 characters. - # 3. or: Strings are equal to each other (but maybe different encodings?). - # 4. and: we found a diff executable. - # - # source://minitest//lib/minitest/assertions.rb#102 - def things_to_diff(exp, act); end - - class << self - # Returns the diff command to use in #diff. Tries to intelligently - # figure out what diff to use. - # - # source://minitest//lib/minitest/assertions.rb#27 - def diff; end - - # Set the diff command to use in #diff. - # - # source://minitest//lib/minitest/assertions.rb#45 - def diff=(o); end - end -end - -# source://minitest//lib/minitest/assertions.rb#199 -Minitest::Assertions::E = T.let(T.unsafe(nil), String) - -# source://minitest//lib/minitest/assertions.rb#17 -Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) - -# The standard backtrace filter for minitest. -# -# See Minitest.backtrace_filter=. -# -# source://minitest//lib/minitest.rb#1175 -class Minitest::BacktraceFilter - # @return [BacktraceFilter] a new instance of BacktraceFilter - # - # source://minitest//lib/minitest.rb#1184 - def initialize(regexp = T.unsafe(nil)); end - - # Filter +bt+ to something useful. Returns the whole thing if - # $DEBUG (ruby) or $MT_DEBUG (env). - # - # source://minitest//lib/minitest.rb#1192 - def filter(bt); end - - # The regular expression to use to filter backtraces. Defaults to +MT_RE+. - # - # source://minitest//lib/minitest.rb#1182 - def regexp; end - - # The regular expression to use to filter backtraces. Defaults to +MT_RE+. - # - # source://minitest//lib/minitest.rb#1182 - def regexp=(_arg0); end -end - -# source://minitest//lib/minitest.rb#1177 -Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) - -# Dispatch to multiple reporters as one. -# -# source://minitest//lib/minitest.rb#969 -class Minitest::CompositeReporter < ::Minitest::AbstractReporter - # @return [CompositeReporter] a new instance of CompositeReporter - # - # source://minitest//lib/minitest.rb#975 - def initialize(*reporters); end - - # Add another reporter to the mix. - # - # source://minitest//lib/minitest.rb#987 - def <<(reporter); end - - # source://minitest//lib/minitest.rb#980 - def io; end - - # @return [Boolean] - # - # source://minitest//lib/minitest.rb#991 - def passed?; end - - # source://minitest//lib/minitest.rb#999 - def prerecord(klass, name); end - - # source://minitest//lib/minitest.rb#1006 - def record(result); end - - # source://minitest//lib/minitest.rb#1012 - def report; end - - # The list of reporters to dispatch to. - # - # source://minitest//lib/minitest.rb#973 - def reporters; end - - # The list of reporters to dispatch to. - # - # source://minitest//lib/minitest.rb#973 - def reporters=(_arg0); end - - # source://minitest//lib/minitest.rb#995 - def start; end -end - -# Compresses backtraces. -# -# source://minitest//lib/minitest/compress.rb#5 -module Minitest::Compress - # Takes a backtrace (array of strings) and compresses repeating - # cycles in it to make it more readable. - # - # source://minitest//lib/minitest/compress.rb#11 - def compress(orig); end -end - -# source://minitest//lib/minitest/spec.rb#41 -class Minitest::Expectation < ::Struct - def ctx; end - def ctx=(_); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_be(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_be_close_to(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_be_empty(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_be_instance_of(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_be_kind_of(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_be_nil(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_be_same_as(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_be_silent(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_be_within_delta(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_be_within_epsilon(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_equal(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_include(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_match(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_output(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_pattern_match(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_raise(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_respond_to(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_throw(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def must_verify(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def path_must_exist(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def path_wont_exist(*args, **_arg1); end - - def target; end - def target=(_); end - - # source://minitest//lib/minitest/spec.rb#25 - def wont_be(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def wont_be_close_to(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def wont_be_empty(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def wont_be_instance_of(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def wont_be_kind_of(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def wont_be_nil(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def wont_be_same_as(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def wont_be_within_delta(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def wont_be_within_epsilon(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def wont_equal(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def wont_include(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def wont_match(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def wont_pattern_match(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#25 - def wont_respond_to(*args, **_arg1); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# It's where you hide your "assertions". -# -# Please note, because of the way that expectations are implemented, -# all expectations (eg must_equal) are dependent upon a thread local -# variable +:current_spec+. If your specs rely on mixing threads into -# the specs themselves, you're better off using assertions or the new -# _(value) wrapper. For example: -# -# it "should still work in threads" do -# my_threaded_thingy do -# (1+1).must_equal 2 # bad -# assert_equal 2, 1+1 # good -# _(1 + 1).must_equal 2 # good -# value(1 + 1).must_equal 2 # good, also #expect -# _ { 1 + "1" }.must_raise TypeError # good -# end -# end -# -# source://minitest//lib/minitest/expectations.rb#20 -module Minitest::Expectations - # source://minitest//lib/minitest/spec.rb#15 - def must_be(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_be_close_to(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_be_empty(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_be_instance_of(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_be_kind_of(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_be_nil(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_be_same_as(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_be_silent(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_be_within_delta(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_be_within_epsilon(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_equal(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_include(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_match(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_output(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_pattern_match(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_raise(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_respond_to(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_throw(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def must_verify(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def path_must_exist(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def path_wont_exist(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def wont_be(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def wont_be_close_to(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def wont_be_empty(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def wont_be_instance_of(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def wont_be_kind_of(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def wont_be_nil(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def wont_be_same_as(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def wont_be_within_delta(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def wont_be_within_epsilon(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def wont_equal(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def wont_include(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def wont_match(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def wont_pattern_match(*args, **_arg1); end - - # source://minitest//lib/minitest/spec.rb#15 - def wont_respond_to(*args, **_arg1); end -end - -# Provides a simple set of guards that you can use in your tests -# to skip execution if it is not applicable. These methods are -# mixed into Test as both instance and class methods so you -# can use them inside or outside of the test methods. -# -# def test_something_for_mri -# skip "bug 1234" if jruby? -# # ... -# end -# -# if windows? then -# # ... lots of test methods ... -# end -# -# source://minitest//lib/minitest.rb#1119 -module Minitest::Guard - # Is this running on jruby? - # - # @return [Boolean] - # - # source://minitest//lib/minitest.rb#1124 - def jruby?(platform = T.unsafe(nil)); end - - # Is this running on maglev? - # - # @return [Boolean] - # - # source://minitest//lib/minitest.rb#1131 - def maglev?(platform = T.unsafe(nil)); end - - # Is this running on mri? - # - # @return [Boolean] - # - # source://minitest//lib/minitest.rb#1141 - def mri?(platform = T.unsafe(nil)); end - - # Is this running on macOS? - # - # @return [Boolean] - # - # source://minitest//lib/minitest.rb#1148 - def osx?(platform = T.unsafe(nil)); end - - # Is this running on rubinius? - # - # @return [Boolean] - # - # source://minitest//lib/minitest.rb#1155 - def rubinius?(platform = T.unsafe(nil)); end - - # Is this running on windows? - # - # @return [Boolean] - # - # source://minitest//lib/minitest.rb#1165 - def windows?(platform = T.unsafe(nil)); end -end - -# A simple and clean mock object framework. -# -# All mock objects are an instance of Mock -# -# source://minitest//lib/minitest/mock.rb#10 -class Minitest::Mock - # @return [Mock] a new instance of Mock - # - # source://minitest//lib/minitest/mock.rb#53 - def initialize(delegator = T.unsafe(nil)); end - - # source://minitest//lib/minitest/mock.rb#34 - def ===(*args, **kwargs, &b); end - - # source://minitest//lib/minitest/mock.rb#125 - def __call(name, data); end - - def __respond_to?(*_arg0); end - - # source://minitest//lib/minitest/mock.rb#34 - def class(*args, **kwargs, &b); end - - # Expect that method +name+ is called, optionally with +args+ (and - # +kwargs+ or a +blk+), and returns +retval+. - # - # @mock.expect(:meaning_of_life, 42) - # @mock.meaning_of_life # => 42 - # - # @mock.expect(:do_something_with, true, [some_obj, true]) - # @mock.do_something_with(some_obj, true) # => true - # - # @mock.expect(:do_something_else, true) do |a1, a2| - # a1 == "buggs" && a2 == :bunny - # end - # - # +args+ is compared to the expected args using case equality (ie, the - # '===' operator), allowing for less specific expectations. - # - # @mock.expect(:uses_any_string, true, [String]) - # @mock.uses_any_string("foo") # => true - # @mock.verify # => true - # - # @mock.expect(:uses_one_string, true, ["foo"]) - # @mock.uses_one_string("bar") # => raises MockExpectationError - # - # If a method will be called multiple times, specify a new expect for each one. - # They will be used in the order you define them. - # - # @mock.expect(:ordinal_increment, 'first') - # @mock.expect(:ordinal_increment, 'second') - # - # @mock.ordinal_increment # => 'first' - # @mock.ordinal_increment # => 'second' - # @mock.ordinal_increment # => raises MockExpectationError "No more expects available for :ordinal_increment" - # - # source://minitest//lib/minitest/mock.rb#96 - def expect(name, retval, args = T.unsafe(nil), **kwargs, &blk); end - - # source://minitest//lib/minitest/mock.rb#34 - def inspect(*args, **kwargs, &b); end - - # source://minitest//lib/minitest/mock.rb#34 - def instance_eval(*args, **kwargs, &b); end - - # source://minitest//lib/minitest/mock.rb#34 - def instance_variables(*args, **kwargs, &b); end - - # source://minitest//lib/minitest/mock.rb#155 - def method_missing(sym, *args, **kwargs, &block); end - - # source://minitest//lib/minitest/mock.rb#34 - def object_id(*args, **kwargs, &b); end - - # source://minitest//lib/minitest/mock.rb#34 - def public_send(*args, **kwargs, &b); end - - # @return [Boolean] - # - # source://minitest//lib/minitest/mock.rb#241 - def respond_to?(sym, include_private = T.unsafe(nil)); end - - # source://minitest//lib/minitest/mock.rb#34 - def send(*args, **kwargs, &b); end - - # source://minitest//lib/minitest/mock.rb#34 - def to_s(*args, **kwargs, &b); end - - # Verify that all methods were called as expected. Raises - # +MockExpectationError+ if the mock object was not called as - # expected. - # - # source://minitest//lib/minitest/mock.rb#145 - def verify; end - - private - - # source://minitest//lib/minitest/mock.rb#34 - def respond_to_missing?(*args, **kwargs, &b); end -end - -# source://minitest//lib/minitest/parallel.rb#2 -module Minitest::Parallel; end - -# The engine used to run multiple tests in parallel. -# -# source://minitest//lib/minitest/parallel.rb#7 -class Minitest::Parallel::Executor - # Create a parallel test executor of with +size+ workers. - # - # @return [Executor] a new instance of Executor - # - # source://minitest//lib/minitest/parallel.rb#17 - def initialize(size); end - - # Add a job to the queue - # - # source://minitest//lib/minitest/parallel.rb#43 - def <<(work); end - - # Shuts down the pool of workers by signalling them to quit and - # waiting for them all to finish what they're currently working - # on. - # - # source://minitest//lib/minitest/parallel.rb#50 - def shutdown; end - - # The size of the pool of workers. - # - # source://minitest//lib/minitest/parallel.rb#12 - def size; end - - # Start the executor - # - # source://minitest//lib/minitest/parallel.rb#26 - def start; end -end - -# source://minitest//lib/minitest/parallel.rb#56 -module Minitest::Parallel::Test - # source://minitest//lib/minitest/parallel.rb#57 - def _synchronize; end -end - -# source://minitest//lib/minitest/parallel.rb#59 -module Minitest::Parallel::Test::ClassMethods - # source://minitest//lib/minitest/parallel.rb#60 - def run_one_method(klass, method_name, reporter); end - - # source://minitest//lib/minitest/parallel.rb#64 - def test_order; end -end - -# A very simple reporter that prints the "dots" during the run. -# -# This is added to the top-level CompositeReporter at the start of -# the run. If you want to change the output of minitest via a -# plugin, pull this out of the composite and replace it with your -# own. -# -# source://minitest//lib/minitest.rb#759 -class Minitest::ProgressReporter < ::Minitest::Reporter - # source://minitest//lib/minitest.rb#760 - def prerecord(klass, name); end - - # source://minitest//lib/minitest.rb#767 - def record(result); end -end - -# Shared code for anything that can get passed to a Reporter. See -# Minitest::Test & Minitest::Result. -# -# source://minitest//lib/minitest.rb#581 -module Minitest::Reportable - # @raise [NotImplementedError] - # - # source://minitest//lib/minitest.rb#603 - def class_name; end - - # Did this run error? - # - # @return [Boolean] - # - # source://minitest//lib/minitest.rb#624 - def error?; end - - # The location identifier of this test. Depends on a method - # existing called class_name. - # - # source://minitest//lib/minitest.rb#598 - def location; end - - # Did this run pass? - # - # Note: skipped runs are not considered passing, but they don't - # cause the process to exit non-zero. - # - # @return [Boolean] - # - # source://minitest//lib/minitest.rb#588 - def passed?; end - - # Returns ".", "F", or "E" based on the result of the run. - # - # source://minitest//lib/minitest.rb#610 - def result_code; end - - # Was this run skipped? - # - # @return [Boolean] - # - # source://minitest//lib/minitest.rb#617 - def skipped?; end -end - -# source://minitest//lib/minitest.rb#592 -Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String) - -# source://minitest//lib/minitest.rb#735 -class Minitest::Reporter < ::Minitest::AbstractReporter - # @return [Reporter] a new instance of Reporter - # - # source://minitest//lib/minitest.rb#744 - def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end - - # The IO used to report. - # - # source://minitest//lib/minitest.rb#737 - def io; end - - # The IO used to report. - # - # source://minitest//lib/minitest.rb#737 - def io=(_arg0); end - - # Command-line options for this run. - # - # source://minitest//lib/minitest.rb#742 - def options; end - - # Command-line options for this run. - # - # source://minitest//lib/minitest.rb#742 - def options=(_arg0); end -end - -# This represents a test result in a clean way that can be -# marshalled over a wire. Tests can do anything they want to the -# test instance and can create conditions that cause Marshal.dump to -# blow up. By using Result.from(a_test) you can be reasonably sure -# that the test result can be marshalled. -# -# source://minitest//lib/minitest.rb#636 -class Minitest::Result < ::Minitest::Runnable - include ::Minitest::Reportable - - # source://minitest//lib/minitest.rb#670 - def class_name; end - - # The class name of the test result. - # - # source://minitest//lib/minitest.rb#645 - def klass; end - - # The class name of the test result. - # - # source://minitest//lib/minitest.rb#645 - def klass=(_arg0); end - - # The location of the test method. - # - # source://minitest//lib/minitest.rb#650 - def source_location; end - - # The location of the test method. - # - # source://minitest//lib/minitest.rb#650 - def source_location=(_arg0); end - - # source://minitest//lib/minitest.rb#674 - def to_s; end - - class << self - # Create a new test result from a Runnable instance. - # - # source://minitest//lib/minitest.rb#655 - def from(runnable); end - end -end - -# re-open -# -# source://minitest//lib/minitest.rb#349 -class Minitest::Runnable - # @return [Runnable] a new instance of Runnable - # - # source://minitest//lib/minitest.rb#512 - def initialize(name); end - - # Number of assertions executed in this run. - # - # source://minitest//lib/minitest.rb#353 - def assertions; end - - # Number of assertions executed in this run. - # - # source://minitest//lib/minitest.rb#353 - def assertions=(_arg0); end - - # source://minitest//lib/minitest.rb#508 - def failure; end - - # An assertion raised during the run, if any. - # - # source://minitest//lib/minitest.rb#358 - def failures; end - - # An assertion raised during the run, if any. - # - # source://minitest//lib/minitest.rb#358 - def failures=(_arg0); end - - # source://minitest//lib/minitest.rb#494 - def marshal_dump; end - - # source://minitest//lib/minitest.rb#504 - def marshal_load(ary); end - - # Metadata you attach to the test results that get sent to the reporter. - # - # Lazily initializes to a hash, to keep memory down. - # - # NOTE: this data *must* be plain (read: marshal-able) data! - # Hashes! Arrays! Strings! - # - # source://minitest//lib/minitest.rb#527 - def metadata; end - - # Sets metadata, mainly used for +Result.from+. - # - # source://minitest//lib/minitest.rb#534 - def metadata=(_arg0); end - - # Returns true if metadata exists. - # - # @return [Boolean] - # - # source://minitest//lib/minitest.rb#539 - def metadata?; end - - # Name of the run. - # - # source://minitest//lib/minitest.rb#376 - def name; end - - # Set the name of the run. - # - # source://minitest//lib/minitest.rb#383 - def name=(o); end - - # Did this run pass? - # - # Note: skipped runs are not considered passing, but they don't - # cause the process to exit non-zero. - # - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://minitest//lib/minitest.rb#556 - def passed?; end - - # Returns a single character string to print based on the result - # of the run. One of ".", "F", - # "E" or "S". - # - # @raise [NotImplementedError] - # - # source://minitest//lib/minitest.rb#565 - def result_code; end - - # Runs a single method. Needs to return self. - # - # @raise [NotImplementedError] - # - # source://minitest//lib/minitest.rb#546 - def run; end - - # Was this run skipped? See #passed? for more information. - # - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://minitest//lib/minitest.rb#572 - def skipped?; end - - # The time it took to run. - # - # source://minitest//lib/minitest.rb#363 - def time; end - - # The time it took to run. - # - # source://minitest//lib/minitest.rb#363 - def time=(_arg0); end - - # source://minitest//lib/minitest.rb#365 - def time_it; end - - class << self - # source://minitest//lib/minitest.rb#1226 - def inherited(klass); end - - # Returns all instance methods matching the pattern +re+. - # - # source://minitest//lib/minitest.rb#390 - def methods_matching(re); end - - # source://minitest//lib/minitest.rb#464 - def on_signal(name, action); end - - # source://minitest//lib/minitest.rb#394 - def reset; end - - # Responsible for running all runnable methods in a given class, - # each in its own instance. Each instance is passed to the - # reporter to record. - # - # source://minitest//lib/minitest.rb#405 - def run(reporter, options = T.unsafe(nil)); end - - # Runs a single method and has the reporter record the result. - # This was considered internal API but is factored out of run so - # that subclasses can specialize the running of an individual - # test. See Minitest::ParallelTest::ClassMethods for an example. - # - # source://minitest//lib/minitest.rb#445 - def run_one_method(klass, method_name, reporter); end - - # Each subclass of Runnable is responsible for overriding this - # method to return all runnable methods. See #methods_matching. - # - # @raise [NotImplementedError] - # - # source://minitest//lib/minitest.rb#481 - def runnable_methods; end - - # Returns all subclasses of Runnable. - # - # source://minitest//lib/minitest.rb#488 - def runnables; end - - # Defines the order to run tests (:random by default). Override - # this or use a convenience method to change it for your tests. - # - # source://minitest//lib/minitest.rb#454 - def test_order; end - - # source://minitest//lib/minitest.rb#458 - def with_info_handler(reporter, &block); end - end -end - -# source://minitest//lib/minitest.rb#462 -Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) - -# Assertion raised when skipping a run. -# -# source://minitest//lib/minitest.rb#1050 -class Minitest::Skip < ::Minitest::Assertion - # source://minitest//lib/minitest.rb#1051 - def result_label; end -end - -# Minitest::Spec -- The faster, better, less-magical spec framework! -# -# For a list of expectations, see Minitest::Expectations. -# -# source://minitest//lib/minitest/spec.rb#107 -class Minitest::Spec < ::Minitest::Test - include ::Minitest::Spec::DSL::InstanceMethods - extend ::Minitest::Spec::DSL - - # @return [Spec] a new instance of Spec - # - # source://minitest//lib/minitest/spec.rb#113 - def initialize(name); end - - class << self - # source://minitest//lib/minitest/spec.rb#109 - def current; end - end -end - -# Oh look! A Minitest::Spec::DSL module! Eat your heart out DHH. -# -# source://minitest//lib/minitest/spec.rb#121 -module Minitest::Spec::DSL - # Define an 'after' action. Inherits the way normal methods should. - # - # NOTE: +type+ is ignored and is only there to make porting easier. - # - # Equivalent to Minitest::Test#teardown. - # - # source://minitest//lib/minitest/spec.rb#206 - def after(_type = T.unsafe(nil), &block); end - - # Define a 'before' action. Inherits the way normal methods should. - # - # NOTE: +type+ is ignored and is only there to make porting easier. - # - # Equivalent to Minitest::Test#setup. - # - # source://minitest//lib/minitest/spec.rb#192 - def before(_type = T.unsafe(nil), &block); end - - # source://minitest//lib/minitest/spec.rb#175 - def children; end - - # source://minitest//lib/minitest/spec.rb#271 - def create(name, desc); end - - # source://minitest//lib/minitest/spec.rb#292 - def desc; end - - # source://minitest//lib/minitest/spec.rb#171 - def describe_stack; end - - # Define an expectation with name +desc+. Name gets morphed to a - # proper test method name. For some freakish reason, people who - # write specs don't like class inheritance, so this goes way out of - # its way to make sure that expectations aren't inherited. - # - # This is also aliased to #specify and doesn't require a +desc+ arg. - # - # Hint: If you _do_ want inheritance, use minitest/test. You can mix - # and match between assertions and expectations as much as you want. - # - # source://minitest//lib/minitest/spec.rb#224 - def it(desc = T.unsafe(nil), &block); end - - # Essentially, define an accessor for +name+ with +block+. - # - # Why use let instead of def? I honestly don't know. - # - # @raise [ArgumentError] - # - # source://minitest//lib/minitest/spec.rb#248 - def let(name, &block); end - - # source://minitest//lib/minitest/spec.rb#284 - def name; end - - # source://minitest//lib/minitest/spec.rb#179 - def nuke_test_methods!; end - - # Register a new type of spec that matches the spec's description. - # This method can take either a Regexp and a spec class or a spec - # class and a block that takes the description and returns true if - # it matches. - # - # Eg: - # - # register_spec_type(/Controller$/, Minitest::Spec::Rails) - # - # or: - # - # register_spec_type(Minitest::Spec::RailsModel) do |desc| - # desc.superclass == ActiveRecord::Base - # end - # - # source://minitest//lib/minitest/spec.rb#147 - def register_spec_type(*args, &block); end - - # Figure out the spec class to use based on a spec's description. Eg: - # - # spec_type("BlahController") # => Minitest::Spec::Rails - # - # source://minitest//lib/minitest/spec.rb#161 - def spec_type(desc, *additional); end - - # Define an expectation with name +desc+. Name gets morphed to a - # proper test method name. For some freakish reason, people who - # write specs don't like class inheritance, so this goes way out of - # its way to make sure that expectations aren't inherited. - # - # This is also aliased to #specify and doesn't require a +desc+ arg. - # - # Hint: If you _do_ want inheritance, use minitest/test. You can mix - # and match between assertions and expectations as much as you want. - # - # source://minitest//lib/minitest/spec.rb#224 - def specify(desc = T.unsafe(nil), &block); end - - # Another lazy man's accessor generator. Made even more lazy by - # setting the name for you to +subject+. - # - # source://minitest//lib/minitest/spec.rb#267 - def subject(&block); end - - # source://minitest//lib/minitest/spec.rb#288 - def to_s; end - - class << self - # source://minitest//lib/minitest/spec.rb#336 - def extended(obj); end - end -end - -# Rdoc... why are you so dumb? -# -# source://minitest//lib/minitest/spec.rb#298 -module Minitest::Spec::DSL::InstanceMethods - # Takes a value or a block and returns a value monad that has - # all of Expectations methods available to it. - # - # _(1 + 1).must_equal 2 - # - # And for blocks: - # - # _ { 1 + "1" }.must_raise TypeError - # - # This method of expectation-based testing is preferable to - # straight-expectation methods (on Object) because it stores its - # test context, bypassing our hacky use of thread-local variables. - # - # NOTE: At some point, the methods on Object will be deprecated - # and then removed. - # - # It is also aliased to #value and #expect for your aesthetic - # pleasure: - # - # _(1 + 1).must_equal 2 - # value(1 + 1).must_equal 2 - # expect(1 + 1).must_equal 2 - # - # source://minitest//lib/minitest/spec.rb#323 - def _(value = T.unsafe(nil), &block); end - - # source://minitest//lib/minitest/spec.rb#330 - def before_setup; end - - # Takes a value or a block and returns a value monad that has - # all of Expectations methods available to it. - # - # _(1 + 1).must_equal 2 - # - # And for blocks: - # - # _ { 1 + "1" }.must_raise TypeError - # - # This method of expectation-based testing is preferable to - # straight-expectation methods (on Object) because it stores its - # test context, bypassing our hacky use of thread-local variables. - # - # NOTE: At some point, the methods on Object will be deprecated - # and then removed. - # - # It is also aliased to #value and #expect for your aesthetic - # pleasure: - # - # _(1 + 1).must_equal 2 - # value(1 + 1).must_equal 2 - # expect(1 + 1).must_equal 2 - # - # source://minitest//lib/minitest/spec.rb#323 - def expect(value = T.unsafe(nil), &block); end - - # Takes a value or a block and returns a value monad that has - # all of Expectations methods available to it. - # - # _(1 + 1).must_equal 2 - # - # And for blocks: - # - # _ { 1 + "1" }.must_raise TypeError - # - # This method of expectation-based testing is preferable to - # straight-expectation methods (on Object) because it stores its - # test context, bypassing our hacky use of thread-local variables. - # - # NOTE: At some point, the methods on Object will be deprecated - # and then removed. - # - # It is also aliased to #value and #expect for your aesthetic - # pleasure: - # - # _(1 + 1).must_equal 2 - # value(1 + 1).must_equal 2 - # expect(1 + 1).must_equal 2 - # - # source://minitest//lib/minitest/spec.rb#323 - def value(value = T.unsafe(nil), &block); end -end - -# Contains pairs of matchers and Spec classes to be used to -# calculate the superclass of a top-level describe. This allows for -# automatically customizable spec types. -# -# See: register_spec_type and spec_type -# -# source://minitest//lib/minitest/spec.rb#129 -Minitest::Spec::DSL::TYPES = T.let(T.unsafe(nil), Array) - -# source://minitest//lib/minitest/spec.rb#343 -Minitest::Spec::TYPES = T.let(T.unsafe(nil), Array) - -# A reporter that gathers statistics about a test run. Does not do -# any IO because meant to be used as a parent class for a reporter -# that does. -# -# If you want to create an entirely different type of output (eg, -# CI, HTML, etc), this is the place to start. -# -# Example: -# -# class JenkinsCIReporter < StatisticsReporter -# def report -# super # Needed to calculate some statistics -# -# print "exp == act printing the difference between + # the two, if possible. + # + # If there is no visible difference but the assertion fails, you + # should suspect that your #== is buggy, or your inspect output is + # missing crucial details. For nicer structural diffing, set + # Minitest::Test.make_my_diffs_pretty! + # + # For floats use assert_in_delta. + # + # See also: Minitest::Assertions.diff + # + # pkg:gem/minitest#lib/minitest/assertions.rb:220 + def assert_equal(exp, act, msg = T.unsafe(nil)); end + + # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+ + # of each other. + # + # assert_in_delta Math::PI, (22.0 / 7.0), 0.01 + # + # pkg:gem/minitest#lib/minitest/assertions.rb:241 + def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # For comparing Floats. Fails unless +exp+ and +act+ have a relative + # error less than +epsilon+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:253 + def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails unless +collection+ includes +obj+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:260 + def assert_includes(collection, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is an instance of +cls+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:271 + def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is a kind of +cls+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:282 + def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails unless +matcher+ =~ +obj+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:293 + def assert_match(matcher, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is nil + # + # pkg:gem/minitest#lib/minitest/assertions.rb:305 + def assert_nil(obj, msg = T.unsafe(nil)); end + + # For testing with binary operators. Eg: + # + # assert_operator 5, :<=, 4 + # + # pkg:gem/minitest#lib/minitest/assertions.rb:315 + def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if stdout or stderr do not output the expected results. + # Pass in nil if you don't care about that streams output. Pass in + # "" if you require it to be silent. Pass in a regexp if you want + # to pattern match. + # + # assert_output(/hey/) { method_with_output } + # + # NOTE: this uses #capture_io, not #capture_subprocess_io. + # + # See also: #assert_silent + # + # pkg:gem/minitest#lib/minitest/assertions.rb:333 + def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end + + # Fails unless +path+ exists. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:357 + def assert_path_exists(path, msg = T.unsafe(nil)); end + + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # assert_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # # fail "length mismatch (given 3, expected 1)" + # assert_pattern { [1,2,3] => [Integer] } + # + # The bare => pattern will raise a NoMatchingPatternError on failure, which would + # normally be counted as a test error. This assertion rescues NoMatchingPatternError and + # generates a test failure. Any other exception will be raised as normal and generate a test + # error. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:376 + def assert_pattern; end + + # For testing with predicates. Eg: + # + # assert_predicate str, :empty? + # + # This is really meant for specs and is front-ended by assert_operator: + # + # str.must_be :empty? + # + # pkg:gem/minitest#lib/minitest/assertions.rb:394 + def assert_predicate(o1, op, msg = T.unsafe(nil)); end + + # Fails unless the block raises one of +exp+. Returns the + # exception matched so you can check the message, attributes, etc. + # + # +exp+ takes an optional message on the end to help explain + # failures and defaults to StandardError if no exception class is + # passed. Eg: + # + # assert_raises(CustomError) { method_with_custom_error } + # + # With custom error message: + # + # assert_raises(CustomError, 'This should have raised CustomError') { method_with_custom_error } + # + # Using the returned object: + # + # error = assert_raises(CustomError) do + # raise CustomError, 'This is really bad' + # end + # + # assert_equal 'This is really bad', error.message + # + # pkg:gem/minitest#lib/minitest/assertions.rb:421 + def assert_raises(*exp); end + + # Fails unless +obj+ responds to +meth+. + # include_all defaults to false to match Object#respond_to? + # + # pkg:gem/minitest#lib/minitest/assertions.rb:453 + def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end + + # Fails unless +exp+ and +act+ are #equal? + # + # pkg:gem/minitest#lib/minitest/assertions.rb:463 + def assert_same(exp, act, msg = T.unsafe(nil)); end + + # +send_ary+ is a receiver, message and arguments. + # + # Fails unless the call returns a true value + # + # pkg:gem/minitest#lib/minitest/assertions.rb:476 + def assert_send(send_ary, m = T.unsafe(nil)); end + + # Fails if the block outputs anything to stderr or stdout. + # + # See also: #assert_output + # + # pkg:gem/minitest#lib/minitest/assertions.rb:491 + def assert_silent; end + + # Fails unless the block throws +sym+ + # + # pkg:gem/minitest#lib/minitest/assertions.rb:500 + def assert_throws(sym, msg = T.unsafe(nil)); end + + # Captures $stdout and $stderr into strings: + # + # out, err = capture_io do + # puts "Some info" + # warn "You did a bad thing" + # end + # + # assert_match %r%info%, out + # assert_match %r%bad%, err + # + # NOTE: For efficiency, this method uses StringIO and does not + # capture IO for subprocesses. Use #capture_subprocess_io for + # that. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:536 + def capture_io; end + + # Captures $stdout and $stderr into strings, using Tempfile to + # ensure that subprocess IO is captured as well. + # + # out, err = capture_subprocess_io do + # system "echo Some info" + # system "echo You did a bad thing 1>&2" + # end + # + # assert_match %r%info%, out + # assert_match %r%bad%, err + # + # NOTE: This method is approximately 10x slower than #capture_io so + # only use it when you need to test the output of a subprocess. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:569 + def capture_subprocess_io; end + + # Returns a diff between +exp+ and +act+. If there is no known + # diff command or if it doesn't make sense to diff the output + # (single line, short output), then it simply returns a basic + # comparison between the two. + # + # See +things_to_diff+ for more info. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:57 + def diff(exp, act); end + + # Returns details for exception +e+ + # + # pkg:gem/minitest#lib/minitest/assertions.rb:601 + def exception_details(e, msg); end + + # Fails after a given date (in the local time zone). This allows + # you to put time-bombs in your tests if you need to keep + # something around until a later date lest you forget about it. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:617 + def fail_after(y, m, d, msg); end + + # Fails with +msg+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:624 + def flunk(msg = T.unsafe(nil)); end + + # Returns a proc that will output +msg+ along with the default message. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:632 + def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end + + # This returns a human-readable version of +obj+. By default + # #inspect is called. You can override this to use #pretty_inspect + # if you want. + # + # See Minitest::Test.make_my_diffs_pretty! + # + # pkg:gem/minitest#lib/minitest/assertions.rb:127 + def mu_pp(obj); end + + # This returns a diff-able more human-readable version of +obj+. + # This differs from the regular mu_pp because it expands escaped + # newlines and makes hex-values (like object_ids) generic. This + # uses mu_pp to do the first pass and then cleans it up. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:145 + def mu_pp_for_diff(obj); end + + # used for counting assertions + # + # pkg:gem/minitest#lib/minitest/assertions.rb:643 + def pass(_msg = T.unsafe(nil)); end + + # Fails if +test+ is truthy. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:650 + def refute(test, msg = T.unsafe(nil)); end + + # Fails if +obj+ is empty. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:658 + def refute_empty(obj, msg = T.unsafe(nil)); end + + # Fails if exp == act. + # + # For floats use refute_in_delta. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:669 + def refute_equal(exp, act, msg = T.unsafe(nil)); end + + # For comparing Floats. Fails if +exp+ is within +delta+ of +act+. + # + # refute_in_delta Math::PI, (22.0 / 7.0) + # + # pkg:gem/minitest#lib/minitest/assertions.rb:681 + def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # For comparing Floats. Fails if +exp+ and +act+ have a relative error + # less than +epsilon+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:693 + def refute_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if +collection+ includes +obj+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:700 + def refute_includes(collection, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is an instance of +cls+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:711 + def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is a kind of +cls+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:721 + def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails if +matcher+ =~ +obj+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:729 + def refute_match(matcher, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is nil. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:739 + def refute_nil(obj, msg = T.unsafe(nil)); end + + # Fails if +o1+ is not +op+ +o2+. Eg: + # + # refute_operator 1, :>, 2 #=> pass + # refute_operator 1, :<, 2 #=> fail + # + # pkg:gem/minitest#lib/minitest/assertions.rb:771 + def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if +path+ exists. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:780 + def refute_path_exists(path, msg = T.unsafe(nil)); end + + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # refute_pattern { [1,2,3] => [String] } + # + # # fail "NoMatchingPatternError expected, but nothing was raised." + # refute_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # This assertion expects a NoMatchingPatternError exception, and will fail if none is raised. Any + # other exceptions will be raised as normal and generate a test error. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:756 + def refute_pattern; end + + # For testing with predicates. + # + # refute_predicate str, :empty? + # + # This is really meant for specs and is front-ended by refute_operator: + # + # str.wont_be :empty? + # + # pkg:gem/minitest#lib/minitest/assertions.rb:794 + def refute_predicate(o1, op, msg = T.unsafe(nil)); end + + # Fails if +obj+ responds to the message +meth+. + # include_all defaults to false to match Object#respond_to? + # + # pkg:gem/minitest#lib/minitest/assertions.rb:803 + def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end + + # Fails if +exp+ is the same (by object identity) as +act+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:812 + def refute_same(exp, act, msg = T.unsafe(nil)); end + + # Skips the current run. If run in verbose-mode, the skipped run + # gets listed at the end of the run but doesn't cause a failure + # exit code. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:825 + def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end + + # Skips the current run until a given date (in the local time + # zone). This allows you to put some fixes on hold until a later + # date, but still holds you accountable and prevents you from + # forgetting it. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:837 + def skip_until(y, m, d, msg); end + + # Was this testcase skipped? Meant for #teardown. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:846 + def skipped?; end + + # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. + # + # Criterion: + # + # 1. Strings include newlines or escaped newlines, but not both. + # 2. or: String lengths are > 30 characters. + # 3. or: Strings are equal to each other (but maybe different encodings?). + # 4. and: we found a diff executable. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:102 + def things_to_diff(exp, act); end + + class << self + # Returns the diff command to use in #diff. Tries to intelligently + # figure out what diff to use. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:27 + def diff; end + + # Set the diff command to use in #diff. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:45 + def diff=(o); end + end +end + +# pkg:gem/minitest#lib/minitest/assertions.rb:205 +Minitest::Assertions::E = T.let(T.unsafe(nil), String) + +# pkg:gem/minitest#lib/minitest/assertions.rb:17 +Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) + +# The standard backtrace filter for minitest. +# +# See Minitest.backtrace_filter=. +# +# pkg:gem/minitest#lib/minitest.rb:1190 +class Minitest::BacktraceFilter + # pkg:gem/minitest#lib/minitest.rb:1199 + def initialize(regexp = T.unsafe(nil)); end + + # Filter +bt+ to something useful. Returns the whole thing if + # $DEBUG (ruby) or $MT_DEBUG (env). + # + # pkg:gem/minitest#lib/minitest.rb:1207 + def filter(bt); end + + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. + # + # pkg:gem/minitest#lib/minitest.rb:1197 + def regexp; end + + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. + # + # pkg:gem/minitest#lib/minitest.rb:1197 + def regexp=(_arg0); end +end + +# pkg:gem/minitest#lib/minitest.rb:1192 +Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) + +# Dispatch to multiple reporters as one. +# +# pkg:gem/minitest#lib/minitest.rb:984 +class Minitest::CompositeReporter < ::Minitest::AbstractReporter + # pkg:gem/minitest#lib/minitest.rb:990 + def initialize(*reporters); end + + # Add another reporter to the mix. + # + # pkg:gem/minitest#lib/minitest.rb:1002 + def <<(reporter); end + + # pkg:gem/minitest#lib/minitest.rb:995 + def io; end + + # pkg:gem/minitest#lib/minitest.rb:1006 + def passed?; end + + # pkg:gem/minitest#lib/minitest.rb:1014 + def prerecord(klass, name); end + + # pkg:gem/minitest#lib/minitest.rb:1021 + def record(result); end + + # pkg:gem/minitest#lib/minitest.rb:1027 + def report; end + + # The list of reporters to dispatch to. + # + # pkg:gem/minitest#lib/minitest.rb:988 + def reporters; end + + # The list of reporters to dispatch to. + # + # pkg:gem/minitest#lib/minitest.rb:988 + def reporters=(_arg0); end + + # pkg:gem/minitest#lib/minitest.rb:1010 + def start; end +end + +# Compresses backtraces. +# +# pkg:gem/minitest#lib/minitest/compress.rb:5 +module Minitest::Compress + # Takes a backtrace (array of strings) and compresses repeating + # cycles in it to make it more readable. + # + # pkg:gem/minitest#lib/minitest/compress.rb:11 + def compress(orig); end +end + +# Provides a simple set of guards that you can use in your tests +# to skip execution if it is not applicable. These methods are +# mixed into Test as both instance and class methods so you +# can use them inside or outside of the test methods. +# +# def test_something_for_mri +# skip "bug 1234" if jruby? +# # ... +# end +# +# if windows? then +# # ... lots of test methods ... +# end +# +# pkg:gem/minitest#lib/minitest.rb:1134 +module Minitest::Guard + # Is this running on jruby? + # + # pkg:gem/minitest#lib/minitest.rb:1139 + def jruby?(platform = T.unsafe(nil)); end + + # Is this running on maglev? + # + # pkg:gem/minitest#lib/minitest.rb:1146 + def maglev?(platform = T.unsafe(nil)); end + + # Is this running on mri? + # + # pkg:gem/minitest#lib/minitest.rb:1156 + def mri?(platform = T.unsafe(nil)); end + + # Is this running on macOS? + # + # pkg:gem/minitest#lib/minitest.rb:1163 + def osx?(platform = T.unsafe(nil)); end + + # Is this running on rubinius? + # + # pkg:gem/minitest#lib/minitest.rb:1170 + def rubinius?(platform = T.unsafe(nil)); end + + # Is this running on windows? + # + # pkg:gem/minitest#lib/minitest.rb:1180 + def windows?(platform = T.unsafe(nil)); end +end + +# pkg:gem/minitest#lib/minitest/parallel.rb:4 +module Minitest::Parallel; end + +# The engine used to run multiple tests in parallel. +# +# pkg:gem/minitest#lib/minitest/parallel.rb:9 +class Minitest::Parallel::Executor + # Create a parallel test executor of with +size+ workers. + # + # pkg:gem/minitest#lib/minitest/parallel.rb:19 + def initialize(size); end + + # Add a job to the queue + # + # pkg:gem/minitest#lib/minitest/parallel.rb:45 + def <<(work); end + + # Shuts down the pool of workers by signalling them to quit and + # waiting for them all to finish what they're currently working + # on. + # + # pkg:gem/minitest#lib/minitest/parallel.rb:52 + def shutdown; end + + # The size of the pool of workers. + # + # pkg:gem/minitest#lib/minitest/parallel.rb:14 + def size; end + + # Start the executor + # + # pkg:gem/minitest#lib/minitest/parallel.rb:28 + def start; end +end + +# pkg:gem/minitest#lib/minitest/parallel.rb:58 +module Minitest::Parallel::Test + # pkg:gem/minitest#lib/minitest/parallel.rb:59 + def _synchronize; end +end + +# pkg:gem/minitest#lib/minitest/parallel.rb:61 +module Minitest::Parallel::Test::ClassMethods + # pkg:gem/minitest#lib/minitest/parallel.rb:62 + def run_one_method(klass, method_name, reporter); end + + # pkg:gem/minitest#lib/minitest/parallel.rb:66 + def test_order; end +end + +# A very simple reporter that prints the "dots" during the run. +# +# This is added to the top-level CompositeReporter at the start of +# the run. If you want to change the output of minitest via a +# plugin, pull this out of the composite and replace it with your +# own. +# +# pkg:gem/minitest#lib/minitest.rb:774 +class Minitest::ProgressReporter < ::Minitest::Reporter + # pkg:gem/minitest#lib/minitest.rb:775 + def prerecord(klass, name); end + + # pkg:gem/minitest#lib/minitest.rb:782 + def record(result); end +end + +# Shared code for anything that can get passed to a Reporter. See +# Minitest::Test & Minitest::Result. +# +# pkg:gem/minitest#lib/minitest.rb:596 +module Minitest::Reportable + # pkg:gem/minitest#lib/minitest.rb:618 + def class_name; end + + # Did this run error? + # + # pkg:gem/minitest#lib/minitest.rb:639 + def error?; end + + # The location identifier of this test. Depends on a method + # existing called class_name. + # + # pkg:gem/minitest#lib/minitest.rb:613 + def location; end + + # Did this run pass? + # + # Note: skipped runs are not considered passing, but they don't + # cause the process to exit non-zero. + # + # pkg:gem/minitest#lib/minitest.rb:603 + def passed?; end + + # Returns ".", "F", or "E" based on the result of the run. + # + # pkg:gem/minitest#lib/minitest.rb:625 + def result_code; end + + # Was this run skipped? + # + # pkg:gem/minitest#lib/minitest.rb:632 + def skipped?; end +end + +# pkg:gem/minitest#lib/minitest.rb:607 +Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String) + +# AbstractReportera +# +# pkg:gem/minitest#lib/minitest.rb:750 +class Minitest::Reporter < ::Minitest::AbstractReporter + # pkg:gem/minitest#lib/minitest.rb:759 + def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end + + # The IO used to report. + # + # pkg:gem/minitest#lib/minitest.rb:752 + def io; end + + # The IO used to report. + # + # pkg:gem/minitest#lib/minitest.rb:752 + def io=(_arg0); end + + # Command-line options for this run. + # + # pkg:gem/minitest#lib/minitest.rb:757 + def options; end + + # Command-line options for this run. + # + # pkg:gem/minitest#lib/minitest.rb:757 + def options=(_arg0); end +end + +# This represents a test result in a clean way that can be +# marshalled over a wire. Tests can do anything they want to the +# test instance and can create conditions that cause Marshal.dump to +# blow up. By using Result.from(a_test) you can be reasonably sure +# that the test result can be marshalled. +# +# pkg:gem/minitest#lib/minitest.rb:651 +class Minitest::Result < ::Minitest::Runnable + include ::Minitest::Reportable + + # pkg:gem/minitest#lib/minitest.rb:685 + def class_name; end + + # The class name of the test result. + # + # pkg:gem/minitest#lib/minitest.rb:660 + def klass; end + + # The class name of the test result. + # + # pkg:gem/minitest#lib/minitest.rb:660 + def klass=(_arg0); end + + # The location of the test method. + # + # pkg:gem/minitest#lib/minitest.rb:665 + def source_location; end + + # The location of the test method. + # + # pkg:gem/minitest#lib/minitest.rb:665 + def source_location=(_arg0); end + + # pkg:gem/minitest#lib/minitest.rb:689 + def to_s; end + + class << self + # Create a new test result from a Runnable instance. + # + # pkg:gem/minitest#lib/minitest.rb:670 + def from(runnable); end + end +end + +# Represents anything "runnable", like Test, Spec, Benchmark, or +# whatever you can dream up. +# +# Subclasses of this are automatically registered and available in +# Runnable.runnables. +# +# pkg:gem/minitest#lib/minitest.rb:363 +class Minitest::Runnable + # pkg:gem/minitest#lib/minitest.rb:527 + def initialize(name); end + + # Number of assertions executed in this run. + # + # pkg:gem/minitest#lib/minitest.rb:367 + def assertions; end + + # Number of assertions executed in this run. + # + # pkg:gem/minitest#lib/minitest.rb:367 + def assertions=(_arg0); end + + # pkg:gem/minitest#lib/minitest.rb:523 + def failure; end + + # An assertion raised during the run, if any. + # + # pkg:gem/minitest#lib/minitest.rb:372 + def failures; end + + # An assertion raised during the run, if any. + # + # pkg:gem/minitest#lib/minitest.rb:372 + def failures=(_arg0); end + + # pkg:gem/minitest#lib/minitest.rb:509 + def marshal_dump; end + + # pkg:gem/minitest#lib/minitest.rb:519 + def marshal_load(ary); end + + # Metadata you attach to the test results that get sent to the reporter. + # + # Lazily initializes to a hash, to keep memory down. + # + # NOTE: this data *must* be plain (read: marshal-able) data! + # Hashes! Arrays! Strings! + # + # Sets metadata, mainly used for +Result.from+. + # + # pkg:gem/minitest#lib/minitest.rb:542 + def metadata; end + + # Metadata you attach to the test results that get sent to the reporter. + # + # Lazily initializes to a hash, to keep memory down. + # + # NOTE: this data *must* be plain (read: marshal-able) data! + # Hashes! Arrays! Strings! + # + # Sets metadata, mainly used for +Result.from+. + # + # pkg:gem/minitest#lib/minitest.rb:549 + def metadata=(_arg0); end + + # Returns true if metadata exists. + # + # pkg:gem/minitest#lib/minitest.rb:554 + def metadata?; end + + # Name of the run. + # + # pkg:gem/minitest#lib/minitest.rb:390 + def name; end + + # Set the name of the run. + # + # pkg:gem/minitest#lib/minitest.rb:397 + def name=(o); end + + # Did this run pass? + # + # Note: skipped runs are not considered passing, but they don't + # cause the process to exit non-zero. + # + # pkg:gem/minitest#lib/minitest.rb:571 + def passed?; end + + # Returns a single character string to print based on the result + # of the run. One of ".", "F", + # "E" or "S". + # + # pkg:gem/minitest#lib/minitest.rb:580 + def result_code; end + + # Runs a single method. Needs to return self. + # + # pkg:gem/minitest#lib/minitest.rb:561 + def run; end + + # Was this run skipped? See #passed? for more information. + # + # pkg:gem/minitest#lib/minitest.rb:587 + def skipped?; end + + # The time it took to run. + # + # pkg:gem/minitest#lib/minitest.rb:377 + def time; end + + # The time it took to run. + # + # pkg:gem/minitest#lib/minitest.rb:377 + def time=(_arg0); end + + # pkg:gem/minitest#lib/minitest.rb:379 + def time_it; end + + class << self + # re-open + # + # pkg:gem/minitest#lib/minitest.rb:1241 + def inherited(klass); end + + # Returns all instance methods matching the pattern +re+. + # + # pkg:gem/minitest#lib/minitest.rb:404 + def methods_matching(re); end + + # pkg:gem/minitest#lib/minitest.rb:479 + def on_signal(name, action); end + + # pkg:gem/minitest#lib/minitest.rb:408 + def reset; end + + # Responsible for running all runnable methods in a given class, + # each in its own instance. Each instance is passed to the + # reporter to record. + # + # pkg:gem/minitest#lib/minitest.rb:419 + def run(reporter, options = T.unsafe(nil)); end + + # Runs a single method and has the reporter record the result. + # This was considered internal API but is factored out of run so + # that subclasses can specialize the running of an individual + # test. See Minitest::ParallelTest::ClassMethods for an example. + # + # pkg:gem/minitest#lib/minitest.rb:460 + def run_one_method(klass, method_name, reporter); end + + # Each subclass of Runnable is responsible for overriding this + # method to return all runnable methods. See #methods_matching. + # + # pkg:gem/minitest#lib/minitest.rb:496 + def runnable_methods; end + + # Returns all subclasses of Runnable. + # + # pkg:gem/minitest#lib/minitest.rb:503 + def runnables; end + + # Defines the order to run tests (:random by default). Override + # this or use a convenience method to change it for your tests. + # + # pkg:gem/minitest#lib/minitest.rb:469 + def test_order; end + + # pkg:gem/minitest#lib/minitest.rb:473 + def with_info_handler(reporter, &block); end + end +end + +# pkg:gem/minitest#lib/minitest.rb:477 +Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) + +# Assertion raised when skipping a run. +# +# pkg:gem/minitest#lib/minitest.rb:1065 +class Minitest::Skip < ::Minitest::Assertion + # pkg:gem/minitest#lib/minitest.rb:1066 + def result_label; end +end + +# A reporter that gathers statistics about a test run. Does not do +# any IO because meant to be used as a parent class for a reporter +# that does. +# +# If you want to create an entirely different type of output (eg, +# CI, HTML, etc), this is the place to start. +# +# Example: +# +# class JenkinsCIReporter < StatisticsReporter +# def report +# super # Needed to calculate some statistics +# +# print " raises NoMethodError exception # -# source://mocha//lib/mocha/api.rb#34 +# pkg:gem/mocha#lib/mocha/api.rb:34 module Mocha::API include ::Mocha::ParameterMatchers include ::Mocha::Hooks # Builds a new mock object # + # @return [Mock] a new mock object + # + # @overload def mock(name) + # @param [String, Symbol] name identifies mock object in error messages. + # @overload def mock(expected_methods_vs_return_values = {}) + # @param [Hash] expected_methods_vs_return_values expected method name symbols as keys and corresponding return values as values - these expectations are setup as if {Mock#expects} were called multiple times. + # @overload def mock(name, expected_methods_vs_return_values = {}) + # @param [String, Symbol] name identifies mock object in error messages. + # @param [Hash] expected_methods_vs_return_values expected method name symbols as keys and corresponding return values as values - these expectations are setup as if {Mock#expects} were called multiple times. + # # @example Using expected_methods_vs_return_values Hash to setup expectations. # def test_motor_starts_and_stops - # motor = mock('motor', start: true, stop: true) - # assert motor.start - # assert motor.stop - # # an error will be raised unless both Motor#start and Motor#stop have been called + # motor = mock('motor', start: true, stop: true) + # assert motor.start + # assert motor.stop + # # an error will be raised unless both Motor#start and Motor#stop have been called # end - # @overload mock - # @overload mock - # @overload mock - # @return [Mock] a new mock object # - # source://mocha//lib/mocha/api.rb#69 + # pkg:gem/mocha#lib/mocha/api.rb:69 def mock(*arguments); end # Builds a new sequence which can be used to constrain the order in which expectations can occur. @@ -111,6 +120,12 @@ module Mocha::API # Specify that an expected invocation must occur within a named {Sequence} by calling {Expectation#in_sequence} # on each expectation or by passing a block within which all expectations should be constrained by the {Sequence}. # + # @param [String] name name of sequence + # @yield optional block within which expectations should be constrained by the sequence + # @return [Sequence] a new sequence + # + # @see Expectation#in_sequence + # # @example Ensure methods on egg are invoked in correct order. # breakfast = sequence('breakfast') # @@ -118,6 +133,7 @@ module Mocha::API # egg.expects(:crack).in_sequence(breakfast) # egg.expects(:fry).in_sequence(breakfast) # egg.expects(:eat).in_sequence(breakfast) + # # @example Ensure methods across multiple objects are invoked in correct order. # sequence = sequence(:task_order) # @@ -129,19 +145,16 @@ module Mocha::API # # task_one.execute # task_two.execute + # # @example Ensure methods on egg are invoked in the correct order using a block. # egg = mock('egg') # sequence('breakfast') do - # egg.expects(:crack) - # egg.expects(:fry) - # egg.expects(:eat) + # egg.expects(:crack) + # egg.expects(:fry) + # egg.expects(:eat) # end - # @param name [String] name of sequence - # @return [Sequence] a new sequence - # @see Expectation#in_sequence - # @yield optional block within which expectations should be constrained by the sequence # - # source://mocha//lib/mocha/api.rb#170 + # pkg:gem/mocha#lib/mocha/api.rb:170 def sequence(name); end # Builds a new state machine which can be used to constrain the order in which expectations can occur. @@ -154,6 +167,12 @@ module Mocha::API # # A test can contain multiple state machines. # + # @param [String] name name of state machine + # @return [StateMachine] a new state machine + # + # @see Expectation#then + # @see Expectation#when + # @see StateMachine # @example Constrain expected invocations to occur in particular states. # power = states('power').starts_as('off') # @@ -164,348 +183,302 @@ module Mocha::API # radio.expects(:select_channel).with('BBC World Service').when(power.is('on')) # radio.expects(:adjust_volume).with(-5).when(power.is('on')) # radio.expects(:switch_off).then(power.is('off')) - # @param name [String] name of state machine - # @return [StateMachine] a new state machine - # @see Expectation#then - # @see Expectation#when - # @see StateMachine # - # source://mocha//lib/mocha/api.rb#207 + # pkg:gem/mocha#lib/mocha/api.rb:207 def states(name); end # Builds a new mock object # + # @return [Mock] a new mock object + # + # @overload def stub(name) + # @param [String, Symbol] name identifies mock object in error messages. + # @overload def stub(stubbed_methods_vs_return_values = {}) + # @param [Hash] stubbed_methods_vs_return_values stubbed method name symbols as keys and corresponding return values as values - these stubbed methods are setup as if {Mock#stubs} were called multiple times. + # @overload def stub(name, stubbed_methods_vs_return_values = {}) + # @param [String, Symbol] name identifies mock object in error messages. + # @param [Hash] stubbed_methods_vs_return_values stubbed method name symbols as keys and corresponding return values as values - these stubbed methods are setup as if {Mock#stubs} were called multiple times. + # # @example Using stubbed_methods_vs_return_values Hash to setup stubbed methods. # def test_motor_starts_and_stops - # motor = stub('motor', start: true, stop: true) - # assert motor.start - # assert motor.stop - # # an error will not be raised even if either Motor#start or Motor#stop has not been called + # motor = stub('motor', start: true, stop: true) + # assert motor.start + # assert motor.stop + # # an error will not be raised even if either Motor#start or Motor#stop has not been called # end - # @overload stub - # @overload stub - # @overload stub - # @return [Mock] a new mock object # - # source://mocha//lib/mocha/api.rb#96 + # pkg:gem/mocha#lib/mocha/api.rb:96 def stub(*arguments); end # Builds a mock object that accepts calls to any method. By default it will return +nil+ for any method call. # + # @return [Mock] a new mock object + # + # @overload def stub_everything(name) + # @param [String, Symbol] name identifies mock object in error messages. + # @overload def stub_everything(stubbed_methods_vs_return_values = {}) + # @param [Hash] stubbed_methods_vs_return_values stubbed method name symbols as keys and corresponding return values as values - these stubbed methods are setup as if {Mock#stubs} were called multiple times. + # @overload def stub_everything(name, stubbed_methods_vs_return_values = {}) + # @param [String, Symbol] name identifies mock object in error messages. + # @param [Hash] stubbed_methods_vs_return_values stubbed method name symbols as keys and corresponding return values as values - these stubbed methods are setup as if {Mock#stubs} were called multiple times. + # # @example Ignore invocations of irrelevant methods. # def test_motor_stops - # motor = stub_everything('motor', stop: true) - # assert_nil motor.irrelevant_method_1 # => no error raised - # assert_nil motor.irrelevant_method_2 # => no error raised - # assert motor.stop + # motor = stub_everything('motor', stop: true) + # assert_nil motor.irrelevant_method_1 # => no error raised + # assert_nil motor.irrelevant_method_2 # => no error raised + # assert motor.stop # end - # @overload stub_everything - # @overload stub_everything - # @overload stub_everything - # @return [Mock] a new mock object # - # source://mocha//lib/mocha/api.rb#123 + # pkg:gem/mocha#lib/mocha/api.rb:123 def stub_everything(*arguments); end class << self - # @private # @private # - # source://mocha//lib/mocha/api.rb#45 + # pkg:gem/mocha#lib/mocha/api.rb:45 def extended(mod); end - # @private # @private # - # source://mocha//lib/mocha/api.rb#39 + # pkg:gem/mocha#lib/mocha/api.rb:39 def included(_mod); end end end -# source://mocha//lib/mocha/any_instance_method.rb#4 +# pkg:gem/mocha#lib/mocha/any_instance_method.rb:4 class Mocha::AnyInstanceMethod < ::Mocha::StubbedMethod private - # source://mocha//lib/mocha/any_instance_method.rb#7 + # pkg:gem/mocha#lib/mocha/any_instance_method.rb:7 def mock_owner; end - # source://mocha//lib/mocha/any_instance_method.rb#15 + # pkg:gem/mocha#lib/mocha/any_instance_method.rb:15 def original_method_owner; end - # source://mocha//lib/mocha/any_instance_method.rb#11 + # pkg:gem/mocha#lib/mocha/any_instance_method.rb:11 def stubbee_method(method_name); end end -# source://mocha//lib/mocha/receivers.rb#19 +# pkg:gem/mocha#lib/mocha/receivers.rb:19 class Mocha::AnyInstanceReceiver - # @return [AnyInstanceReceiver] a new instance of AnyInstanceReceiver - # - # source://mocha//lib/mocha/receivers.rb#20 + # pkg:gem/mocha#lib/mocha/receivers.rb:20 def initialize(klass); end - # source://mocha//lib/mocha/receivers.rb#24 + # pkg:gem/mocha#lib/mocha/receivers.rb:24 def mocks; end end -# source://mocha//lib/mocha/argument_iterator.rb#2 +# pkg:gem/mocha#lib/mocha/argument_iterator.rb:2 class Mocha::ArgumentIterator - # @return [ArgumentIterator] a new instance of ArgumentIterator - # - # source://mocha//lib/mocha/argument_iterator.rb#3 + # pkg:gem/mocha#lib/mocha/argument_iterator.rb:3 def initialize(argument); end - # source://mocha//lib/mocha/argument_iterator.rb#7 + # pkg:gem/mocha#lib/mocha/argument_iterator.rb:7 def each; end end -# source://mocha//lib/mocha/backtrace_filter.rb#2 +# pkg:gem/mocha#lib/mocha/backtrace_filter.rb:2 class Mocha::BacktraceFilter - # @return [BacktraceFilter] a new instance of BacktraceFilter - # - # source://mocha//lib/mocha/backtrace_filter.rb#5 + # pkg:gem/mocha#lib/mocha/backtrace_filter.rb:5 def initialize(lib_directory = T.unsafe(nil)); end - # source://mocha//lib/mocha/backtrace_filter.rb#9 + # pkg:gem/mocha#lib/mocha/backtrace_filter.rb:9 def filtered(backtrace); end end -# source://mocha//lib/mocha/backtrace_filter.rb#3 +# pkg:gem/mocha#lib/mocha/backtrace_filter.rb:3 Mocha::BacktraceFilter::LIB_DIRECTORY = T.let(T.unsafe(nil), String) -# source://mocha//lib/mocha/block_matcher.rb#2 +# pkg:gem/mocha#lib/mocha/block_matcher.rb:2 module Mocha::BlockMatchers; end -# source://mocha//lib/mocha/block_matcher.rb#11 +# pkg:gem/mocha#lib/mocha/block_matcher.rb:11 class Mocha::BlockMatchers::BlockGiven - # @return [Boolean] - # - # source://mocha//lib/mocha/block_matcher.rb#12 + # pkg:gem/mocha#lib/mocha/block_matcher.rb:12 def match?(actual_block); end - # source://mocha//lib/mocha/block_matcher.rb#16 + # pkg:gem/mocha#lib/mocha/block_matcher.rb:16 def mocha_inspect; end end -# source://mocha//lib/mocha/block_matcher.rb#21 +# pkg:gem/mocha#lib/mocha/block_matcher.rb:21 class Mocha::BlockMatchers::NoBlockGiven - # @return [Boolean] - # - # source://mocha//lib/mocha/block_matcher.rb#22 + # pkg:gem/mocha#lib/mocha/block_matcher.rb:22 def match?(actual_block); end - # source://mocha//lib/mocha/block_matcher.rb#26 + # pkg:gem/mocha#lib/mocha/block_matcher.rb:26 def mocha_inspect; end end -# source://mocha//lib/mocha/block_matcher.rb#3 +# pkg:gem/mocha#lib/mocha/block_matcher.rb:3 class Mocha::BlockMatchers::OptionalBlock - # @return [Boolean] - # - # source://mocha//lib/mocha/block_matcher.rb#4 + # pkg:gem/mocha#lib/mocha/block_matcher.rb:4 def match?(_actual_block); end - # source://mocha//lib/mocha/block_matcher.rb#8 + # pkg:gem/mocha#lib/mocha/block_matcher.rb:8 def mocha_inspect; end end -# source://mocha//lib/mocha/cardinality.rb#2 +# pkg:gem/mocha#lib/mocha/cardinality.rb:2 class Mocha::Cardinality - # @return [Cardinality] a new instance of Cardinality - # - # source://mocha//lib/mocha/cardinality.rb#5 + # pkg:gem/mocha#lib/mocha/cardinality.rb:5 def initialize(required = T.unsafe(nil), maximum = T.unsafe(nil)); end - # source://mocha//lib/mocha/cardinality.rb#29 + # pkg:gem/mocha#lib/mocha/cardinality.rb:29 def <<(invocation); end - # source://mocha//lib/mocha/cardinality.rb#79 + # pkg:gem/mocha#lib/mocha/cardinality.rb:79 def actual_invocations; end - # @return [Boolean] - # - # source://mocha//lib/mocha/cardinality.rb#49 + # pkg:gem/mocha#lib/mocha/cardinality.rb:49 def allowed_any_number_of_times?; end - # source://mocha//lib/mocha/cardinality.rb#58 + # pkg:gem/mocha#lib/mocha/cardinality.rb:58 def anticipated_times; end - # source://mocha//lib/mocha/cardinality.rb#14 + # pkg:gem/mocha#lib/mocha/cardinality.rb:14 def at_least(count); end - # source://mocha//lib/mocha/cardinality.rb#18 + # pkg:gem/mocha#lib/mocha/cardinality.rb:18 def at_most(count); end - # source://mocha//lib/mocha/cardinality.rb#10 + # pkg:gem/mocha#lib/mocha/cardinality.rb:10 def exactly(count); end - # @return [Boolean] - # - # source://mocha//lib/mocha/cardinality.rb#33 + # pkg:gem/mocha#lib/mocha/cardinality.rb:33 def invocations_allowed?; end - # source://mocha//lib/mocha/cardinality.rb#75 + # pkg:gem/mocha#lib/mocha/cardinality.rb:75 def invoked_times; end - # @return [Boolean] - # - # source://mocha//lib/mocha/cardinality.rb#41 + # pkg:gem/mocha#lib/mocha/cardinality.rb:41 def needs_verifying?; end - # @return [Boolean] - # - # source://mocha//lib/mocha/cardinality.rb#37 + # pkg:gem/mocha#lib/mocha/cardinality.rb:37 def satisfied?; end - # source://mocha//lib/mocha/cardinality.rb#22 + # pkg:gem/mocha#lib/mocha/cardinality.rb:22 def times(range_or_count); end - # @return [Boolean] - # - # source://mocha//lib/mocha/cardinality.rb#53 + # pkg:gem/mocha#lib/mocha/cardinality.rb:53 def used?; end - # @return [Boolean] - # - # source://mocha//lib/mocha/cardinality.rb#45 + # pkg:gem/mocha#lib/mocha/cardinality.rb:45 def verified?; end protected - # source://mocha//lib/mocha/cardinality.rb#87 + # pkg:gem/mocha#lib/mocha/cardinality.rb:87 def count(number); end - # @return [Boolean] - # - # source://mocha//lib/mocha/cardinality.rb#102 + # pkg:gem/mocha#lib/mocha/cardinality.rb:102 def infinite?(number); end - # Returns the value of attribute maximum. - # - # source://mocha//lib/mocha/cardinality.rb#85 + # pkg:gem/mocha#lib/mocha/cardinality.rb:85 def maximum; end - # Returns the value of attribute required. - # - # source://mocha//lib/mocha/cardinality.rb#85 + # pkg:gem/mocha#lib/mocha/cardinality.rb:85 def required; end - # source://mocha//lib/mocha/cardinality.rb#96 + # pkg:gem/mocha#lib/mocha/cardinality.rb:96 def update(required, maximum); end end -# source://mocha//lib/mocha/cardinality.rb#3 +# pkg:gem/mocha#lib/mocha/cardinality.rb:3 Mocha::Cardinality::INFINITY = T.let(T.unsafe(nil), Float) -# source://mocha//lib/mocha/central.rb#2 +# pkg:gem/mocha#lib/mocha/central.rb:2 class Mocha::Central - # @return [Central] a new instance of Central - # - # source://mocha//lib/mocha/central.rb#20 + # pkg:gem/mocha#lib/mocha/central.rb:20 def initialize; end - # source://mocha//lib/mocha/central.rb#24 + # pkg:gem/mocha#lib/mocha/central.rb:24 def stub(method); end - # Returns the value of attribute stubba_methods. - # - # source://mocha//lib/mocha/central.rb#18 + # pkg:gem/mocha#lib/mocha/central.rb:18 def stubba_methods; end - # Sets the attribute stubba_methods - # - # @param value the value to set the attribute stubba_methods to. - # - # source://mocha//lib/mocha/central.rb#18 + # pkg:gem/mocha#lib/mocha/central.rb:18 def stubba_methods=(_arg0); end - # source://mocha//lib/mocha/central.rb#30 + # pkg:gem/mocha#lib/mocha/central.rb:30 def unstub(method); end - # source://mocha//lib/mocha/central.rb#36 + # pkg:gem/mocha#lib/mocha/central.rb:36 def unstub_all; end end -# source://mocha//lib/mocha/central.rb#3 +# pkg:gem/mocha#lib/mocha/central.rb:3 class Mocha::Central::Null < ::Mocha::Central - # @return [Null] a new instance of Null - # - # source://mocha//lib/mocha/central.rb#4 + # pkg:gem/mocha#lib/mocha/central.rb:4 def initialize(&block); end - # source://mocha//lib/mocha/central.rb#9 + # pkg:gem/mocha#lib/mocha/central.rb:9 def stub(*_arg0); end - # source://mocha//lib/mocha/central.rb#13 + # pkg:gem/mocha#lib/mocha/central.rb:13 def unstub(*_arg0); end end -# source://mocha//lib/mocha/change_state_side_effect.rb#2 +# pkg:gem/mocha#lib/mocha/change_state_side_effect.rb:2 class Mocha::ChangeStateSideEffect - # @return [ChangeStateSideEffect] a new instance of ChangeStateSideEffect - # - # source://mocha//lib/mocha/change_state_side_effect.rb#3 + # pkg:gem/mocha#lib/mocha/change_state_side_effect.rb:3 def initialize(state); end - # source://mocha//lib/mocha/change_state_side_effect.rb#11 + # pkg:gem/mocha#lib/mocha/change_state_side_effect.rb:11 def mocha_inspect; end - # source://mocha//lib/mocha/change_state_side_effect.rb#7 + # pkg:gem/mocha#lib/mocha/change_state_side_effect.rb:7 def perform; end end # Methods added to all classes to allow mocking and stubbing on real (i.e. non-mock) objects. # -# source://mocha//lib/mocha/class_methods.rb#6 +# pkg:gem/mocha#lib/mocha/class_methods.rb:6 module Mocha::ClassMethods - # @private - # - # source://mocha//lib/mocha/class_methods.rb#54 + # pkg:gem/mocha#lib/mocha/class_methods.rb:60 def __method_exists__?(method, include_public_methods = T.unsafe(nil)); end # @private # - # source://mocha//lib/mocha/class_methods.rb#54 + # pkg:gem/mocha#lib/mocha/class_methods.rb:54 def __method_visibility__(method, include_public_methods = T.unsafe(nil)); end + # @return [Mock] a mock object which will detect calls to any instance of this class. + # @raise [StubbingError] if attempting to stub method which is not allowed. + # # @example Return false to invocation of +Product#save+ for any instance of +Product+. # Product.any_instance.stubs(:save).returns(false) # product_1 = Product.new # assert_equal false, product_1.save # product_2 = Product.new # assert_equal false, product_2.save - # @raise [StubbingError] if attempting to stub method which is not allowed. - # @return [Mock] a mock object which will detect calls to any instance of this class. # - # source://mocha//lib/mocha/class_methods.rb#45 + # pkg:gem/mocha#lib/mocha/class_methods.rb:45 def any_instance; end end # @private # -# source://mocha//lib/mocha/class_methods.rb#8 +# pkg:gem/mocha#lib/mocha/class_methods.rb:8 class Mocha::ClassMethods::AnyInstance - # @return [AnyInstance] a new instance of AnyInstance - # - # source://mocha//lib/mocha/class_methods.rb#9 + # pkg:gem/mocha#lib/mocha/class_methods.rb:9 def initialize(klass); end - # source://mocha//lib/mocha/class_methods.rb#13 + # pkg:gem/mocha#lib/mocha/class_methods.rb:13 def mocha(instantiate = T.unsafe(nil)); end - # @return [Boolean] - # - # source://mocha//lib/mocha/class_methods.rb#29 + # pkg:gem/mocha#lib/mocha/class_methods.rb:29 def respond_to?(symbol, include_all = T.unsafe(nil)); end - # source://mocha//lib/mocha/class_methods.rb#25 + # pkg:gem/mocha#lib/mocha/class_methods.rb:25 def stubba_class; end - # source://mocha//lib/mocha/class_methods.rb#21 + # pkg:gem/mocha#lib/mocha/class_methods.rb:21 def stubba_method; end - # Returns the value of attribute stubba_object. - # - # source://mocha//lib/mocha/class_methods.rb#33 + # pkg:gem/mocha#lib/mocha/class_methods.rb:33 def stubba_object; end end @@ -515,24 +488,25 @@ end # # @example Setting multiple configuration options # Mocha.configure do |c| -# c.stubbing_method_unnecessarily = :prevent -# c.stubbing_method_on_non_mock_object = :warn -# c.stubbing_method_on_nil = :allow +# c.stubbing_method_unnecessarily = :prevent +# c.stubbing_method_on_non_mock_object = :warn +# c.stubbing_method_on_nil = :allow # end # -# source://mocha//lib/mocha/configuration.rb#39 +# pkg:gem/mocha#lib/mocha/configuration.rb:39 class Mocha::Configuration # @private - # @return [Configuration] a new instance of Configuration # - # source://mocha//lib/mocha/configuration.rb#55 + # pkg:gem/mocha#lib/mocha/configuration.rb:55 def initialize(options = T.unsafe(nil)); end # Display matching invocations alongside expectations on Mocha-related test failure. # + # @param [Boolean] value +true+ to enable display of matching invocations; disabled by default. + # # @example Enable display of matching invocations # Mocha.configure do |c| - # c.display_matching_invocations_on_failure = true + # c.display_matching_invocations_on_failure = true # end # # foo = mock('foo') @@ -548,23 +522,21 @@ class Mocha::Configuration # - expected exactly once, invoked never: #.bar # satisfied expectations: # - allowed any number of times, invoked 3 times: #.baz(any_parameters) - # - #.baz(1, 2) # => "baz" - # - #.baz(3, 4) # => raised RuntimeError - # - #.baz(5, 6) # => threw (:tag, "value") - # @param value [Boolean] +true+ to enable display of matching invocations; disabled by default. + # - #.baz(1, 2) # => "baz" + # - #.baz(3, 4) # => raised RuntimeError + # - #.baz(5, 6) # => threw (:tag, "value") # - # source://mocha//lib/mocha/configuration.rb#244 + # pkg:gem/mocha#lib/mocha/configuration.rb:244 def display_matching_invocations_on_failure=(value); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/configuration.rb#249 + # pkg:gem/mocha#lib/mocha/configuration.rb:249 def display_matching_invocations_on_failure?; end # @private # - # source://mocha//lib/mocha/configuration.rb#65 + # pkg:gem/mocha#lib/mocha/configuration.rb:65 def merge(other); end # Perform strict keyword argument comparison. Only supported in Ruby >= v2.7. @@ -577,44 +549,45 @@ class Mocha::Configuration # # This configuration option is +false+ by default to enable gradual adoption, but will be +true+ by default in the future. # + # @param [Boolean] value +true+ to enable strict keyword argument matching; +false+ by default. + # # @example Loose keyword argument matching (default) # # class Example - # def foo(a, bar:); end + # def foo(a, bar:); end # end # # example = Example.new # example.expects(:foo).with('a', bar: 'b') # example.foo('a', { bar: 'b' }) # # This passes the test, but would result in an ArgumentError in practice + # # @example Strict keyword argument matching # # Mocha.configure do |c| - # c.strict_keyword_argument_matching = true + # c.strict_keyword_argument_matching = true # end # # class Example - # def foo(a, bar:); end + # def foo(a, bar:); end # end # # example = Example.new # example.expects(:foo).with('a', bar: 'b') # example.foo('a', { bar: 'b' }) # # This now fails as expected - # @param value [Boolean] +true+ to enable strict keyword argument matching; +false+ by default. # - # source://mocha//lib/mocha/configuration.rb#290 + # pkg:gem/mocha#lib/mocha/configuration.rb:290 def strict_keyword_argument_matching=(value); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/configuration.rb#296 + # pkg:gem/mocha#lib/mocha/configuration.rb:296 def strict_keyword_argument_matching?; end # @private # - # source://mocha//lib/mocha/configuration.rb#215 + # pkg:gem/mocha#lib/mocha/configuration.rb:215 def stubbing_method_on_nil; end # Configure whether stubbing methods on the +nil+ object is allowed. @@ -627,14 +600,14 @@ class Mocha::Configuration # When +value+ is +:warn+, display a warning. # When +value+ is +:prevent+, raise a {StubbingError}. This is the default. # - # @param value [Symbol] one of +:allow+, +:warn+, +:prevent+. + # @param [Symbol] value one of +:allow+, +:warn+, +:prevent+. # - # source://mocha//lib/mocha/configuration.rb#210 + # pkg:gem/mocha#lib/mocha/configuration.rb:210 def stubbing_method_on_nil=(value); end # @private # - # source://mocha//lib/mocha/configuration.rb#127 + # pkg:gem/mocha#lib/mocha/configuration.rb:127 def stubbing_method_on_non_mock_object; end # Configure whether stubbing methods on non-mock objects is allowed. @@ -645,27 +618,28 @@ class Mocha::Configuration # When +value+ is +:warn+, display a warning. # When +value+ is +:prevent+, raise a {StubbingError}. # + # @param [Symbol] value one of +:allow+, +:warn+, +:prevent+. + # # @example Preventing stubbing of a method on a non-mock object # Mocha.configure do |c| - # c.stubbing_method_on_non_mock_object = :prevent + # c.stubbing_method_on_non_mock_object = :prevent # end # # class Example - # def example_method; end + # def example_method; end # end # # example = Example.new # example.stubs(:example_method) # # => Mocha::StubbingError: stubbing method on non-mock object: # # => #.example_method - # @param value [Symbol] one of +:allow+, +:warn+, +:prevent+. # - # source://mocha//lib/mocha/configuration.rb#122 + # pkg:gem/mocha#lib/mocha/configuration.rb:122 def stubbing_method_on_non_mock_object=(value); end # @private # - # source://mocha//lib/mocha/configuration.rb#94 + # pkg:gem/mocha#lib/mocha/configuration.rb:94 def stubbing_method_unnecessarily; end # Configure whether stubbing methods unnecessarily is allowed. @@ -676,23 +650,24 @@ class Mocha::Configuration # When +value+ is +:warn+, display a warning. # When +value+ is +:prevent+, raise a {StubbingError}. # + # @param [Symbol] value one of +:allow+, +:warn+, +:prevent+. + # # @example Preventing unnecessary stubbing of a method # Mocha.configure do |c| - # c.stubbing_method_unnecessarily = :prevent + # c.stubbing_method_unnecessarily = :prevent # end # # example = mock('example') # example.stubs(:unused_stub) # # => Mocha::StubbingError: stubbing method unnecessarily: # # => #.unused_stub(any_parameters) - # @param value [Symbol] one of +:allow+, +:warn+, +:prevent+. # - # source://mocha//lib/mocha/configuration.rb#89 + # pkg:gem/mocha#lib/mocha/configuration.rb:89 def stubbing_method_unnecessarily=(value); end # @private # - # source://mocha//lib/mocha/configuration.rb#160 + # pkg:gem/mocha#lib/mocha/configuration.rb:160 def stubbing_non_existent_method; end # Configure whether stubbing of non-existent methods is allowed. @@ -703,10 +678,12 @@ class Mocha::Configuration # When +value+ is +:warn+, display a warning. # When +value+ is +:prevent+, raise a {StubbingError}. # + # @param [Symbol] value one of +:allow+, +:warn+, +:prevent+. + # # @example Preventing stubbing of a non-existent method # # Mocha.configure do |c| - # c.stubbing_non_existent_method = :prevent + # c.stubbing_non_existent_method = :prevent # end # # class Example @@ -716,14 +693,13 @@ class Mocha::Configuration # example.stubs(:method_that_doesnt_exist) # # => Mocha::StubbingError: stubbing non-existent method: # # => #.method_that_doesnt_exist - # @param value [Symbol] one of +:allow+, +:warn+, +:prevent+. # - # source://mocha//lib/mocha/configuration.rb#155 + # pkg:gem/mocha#lib/mocha/configuration.rb:155 def stubbing_non_existent_method=(value); end # @private # - # source://mocha//lib/mocha/configuration.rb#194 + # pkg:gem/mocha#lib/mocha/configuration.rb:194 def stubbing_non_public_method; end # Configure whether stubbing of non-public methods is allowed. @@ -734,43 +710,42 @@ class Mocha::Configuration # When +value+ is +:warn+, display a warning. # When +value+ is +:prevent+, raise a {StubbingError}. # + # @param [Symbol] value one of +:allow+, +:warn+, +:prevent+. + # # @example Preventing stubbing of a non-public method # Mocha.configure do |c| - # c.stubbing_non_public_method = :prevent + # c.stubbing_non_public_method = :prevent # end # # class Example - # def internal_method; end - # private :internal_method + # def internal_method; end + # private :internal_method # end # # example = Example.new # example.stubs(:internal_method) # # => Mocha::StubbingError: stubbing non-public method: # # => #.internal_method - # @param value [Symbol] one of +:allow+, +:warn+, +:prevent+. # - # source://mocha//lib/mocha/configuration.rb#189 + # pkg:gem/mocha#lib/mocha/configuration.rb:189 def stubbing_non_public_method=(value); end protected - # Returns the value of attribute options. - # - # source://mocha//lib/mocha/configuration.rb#51 + # pkg:gem/mocha#lib/mocha/configuration.rb:51 def options; end private # @private # - # source://mocha//lib/mocha/configuration.rb#60 + # pkg:gem/mocha#lib/mocha/configuration.rb:60 def initialize_copy(other); end class << self # @private # - # source://mocha//lib/mocha/configuration.rb#327 + # pkg:gem/mocha#lib/mocha/configuration.rb:327 def configuration; end # Temporarily modify {Configuration} options. @@ -778,170 +753,152 @@ class Mocha::Configuration # The supplied +temporary_options+ will override the current configuration for the duration of the supplied block. # The configuration will be returned to its original state when the block returns. # + # @param [Hash] temporary_options the configuration options to apply for the duration of the block. + # @yield block during which the configuration change will be in force. + # # @example Temporarily allow stubbing of +nil+ # Mocha::Configuration.override(stubbing_method_on_nil: :allow) do - # nil.stubs(:foo) + # nil.stubs(:foo) # end - # @param temporary_options [Hash] the configuration options to apply for the duration of the block. - # @yield block during which the configuration change will be in force. # - # source://mocha//lib/mocha/configuration.rb#318 + # pkg:gem/mocha#lib/mocha/configuration.rb:318 def override(temporary_options); end # @private # - # source://mocha//lib/mocha/configuration.rb#302 + # pkg:gem/mocha#lib/mocha/configuration.rb:302 def reset_configuration; end private # @private # - # source://mocha//lib/mocha/configuration.rb#334 + # pkg:gem/mocha#lib/mocha/configuration.rb:334 def change_config(action, new_value, &block); end # @private # - # source://mocha//lib/mocha/configuration.rb#343 + # pkg:gem/mocha#lib/mocha/configuration.rb:343 def temporarily_change_config(action, new_value); end end end # @private # -# source://mocha//lib/mocha/configuration.rb#41 +# pkg:gem/mocha#lib/mocha/configuration.rb:41 Mocha::Configuration::DEFAULTS = T.let(T.unsafe(nil), Hash) -# source://mocha//lib/mocha/debug.rb#2 +# pkg:gem/mocha#lib/mocha/debug.rb:2 module Mocha::Debug class << self - # source://mocha//lib/mocha/debug.rb#5 + # pkg:gem/mocha#lib/mocha/debug.rb:5 def puts(message); end end end -# source://mocha//lib/mocha/debug.rb#3 +# pkg:gem/mocha#lib/mocha/debug.rb:3 Mocha::Debug::OPTIONS = T.let(T.unsafe(nil), Array) -# source://mocha//lib/mocha/names.rb#32 +# pkg:gem/mocha#lib/mocha/names.rb:32 class Mocha::DefaultName - # @return [DefaultName] a new instance of DefaultName - # - # source://mocha//lib/mocha/names.rb#33 + # pkg:gem/mocha#lib/mocha/names.rb:33 def initialize(mock); end - # source://mocha//lib/mocha/names.rb#37 + # pkg:gem/mocha#lib/mocha/names.rb:37 def mocha_inspect; end end -# source://mocha//lib/mocha/receivers.rb#36 +# pkg:gem/mocha#lib/mocha/receivers.rb:36 class Mocha::DefaultReceiver - # @return [DefaultReceiver] a new instance of DefaultReceiver - # - # source://mocha//lib/mocha/receivers.rb#37 + # pkg:gem/mocha#lib/mocha/receivers.rb:37 def initialize(mock); end - # source://mocha//lib/mocha/receivers.rb#41 + # pkg:gem/mocha#lib/mocha/receivers.rb:41 def mocks; end end -# source://mocha//lib/mocha/deprecation.rb#4 +# pkg:gem/mocha#lib/mocha/deprecation.rb:4 class Mocha::Deprecation class << self - # Returns the value of attribute messages. - # - # source://mocha//lib/mocha/deprecation.rb#6 + # pkg:gem/mocha#lib/mocha/deprecation.rb:6 def messages; end - # Sets the attribute messages - # - # @param value the value to set the attribute messages to. - # - # source://mocha//lib/mocha/deprecation.rb#6 + # pkg:gem/mocha#lib/mocha/deprecation.rb:6 def messages=(_arg0); end - # Returns the value of attribute mode. - # - # source://mocha//lib/mocha/deprecation.rb#6 + # pkg:gem/mocha#lib/mocha/deprecation.rb:6 def mode; end - # Sets the attribute mode - # - # @param value the value to set the attribute mode to. - # - # source://mocha//lib/mocha/deprecation.rb#6 + # pkg:gem/mocha#lib/mocha/deprecation.rb:6 def mode=(_arg0); end - # source://mocha//lib/mocha/deprecation.rb#8 + # pkg:gem/mocha#lib/mocha/deprecation.rb:8 def warning(*messages); end end end -# source://mocha//lib/mocha/detection/minitest.rb#2 +# pkg:gem/mocha#lib/mocha/detection/minitest.rb:2 module Mocha::Detection; end -# source://mocha//lib/mocha/detection/minitest.rb#3 +# pkg:gem/mocha#lib/mocha/detection/minitest.rb:3 module Mocha::Detection::Minitest class << self - # source://mocha//lib/mocha/detection/minitest.rb#4 + # pkg:gem/mocha#lib/mocha/detection/minitest.rb:4 def testcase; end - # source://mocha//lib/mocha/detection/minitest.rb#12 + # pkg:gem/mocha#lib/mocha/detection/minitest.rb:12 def version; end end end # @private # -# source://mocha//lib/mocha/error_with_filtered_backtrace.rb#5 +# pkg:gem/mocha#lib/mocha/error_with_filtered_backtrace.rb:5 class Mocha::ErrorWithFilteredBacktrace < ::StandardError # @private - # @return [ErrorWithFilteredBacktrace] a new instance of ErrorWithFilteredBacktrace # - # source://mocha//lib/mocha/error_with_filtered_backtrace.rb#7 + # pkg:gem/mocha#lib/mocha/error_with_filtered_backtrace.rb:7 def initialize(message = T.unsafe(nil), backtrace = T.unsafe(nil)); end end -# source://mocha//lib/mocha/exception_raiser.rb#2 +# pkg:gem/mocha#lib/mocha/exception_raiser.rb:2 class Mocha::ExceptionRaiser - # @return [ExceptionRaiser] a new instance of ExceptionRaiser - # - # source://mocha//lib/mocha/exception_raiser.rb#3 + # pkg:gem/mocha#lib/mocha/exception_raiser.rb:3 def initialize(exception, message); end - # @raise [@exception] - # - # source://mocha//lib/mocha/exception_raiser.rb#8 + # pkg:gem/mocha#lib/mocha/exception_raiser.rb:8 def evaluate(invocation); end end # Methods on expectations returned from {Mock#expects}, {Mock#stubs}, {ObjectMethods#expects} and {ObjectMethods#stubs}. # -# source://mocha//lib/mocha/expectation.rb#19 +# pkg:gem/mocha#lib/mocha/expectation.rb:19 class Mocha::Expectation # @private - # @return [Expectation] a new instance of Expectation # - # source://mocha//lib/mocha/expectation.rb#597 + # pkg:gem/mocha#lib/mocha/expectation.rb:597 def initialize(mock, expected_method_name, backtrace = T.unsafe(nil)); end # @private # - # source://mocha//lib/mocha/expectation.rb#616 + # pkg:gem/mocha#lib/mocha/expectation.rb:616 def add_in_sequence_ordering_constraint(sequence); end # @private # - # source://mocha//lib/mocha/expectation.rb#611 + # pkg:gem/mocha#lib/mocha/expectation.rb:611 def add_ordering_constraint(ordering_constraint); end # @private # - # source://mocha//lib/mocha/expectation.rb#621 + # pkg:gem/mocha#lib/mocha/expectation.rb:621 def add_side_effect(side_effect); end # Modifies expectation so that the expected method must be called at least a +minimum_number_of_times+. # + # @param [Integer] minimum_number_of_times minimum number of expected invocations. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # # @example Expected method must be called at least twice. # object = mock() # object.expects(:expected_method).at_least(2) @@ -952,14 +909,14 @@ class Mocha::Expectation # object.expects(:expected_method).at_least(2) # object.expected_method # # => verify fails - # @param minimum_number_of_times [Integer] minimum number of expected invocations. - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. # - # source://mocha//lib/mocha/expectation.rb#134 + # pkg:gem/mocha#lib/mocha/expectation.rb:134 def at_least(minimum_number_of_times); end # Modifies expectation so that the expected method must be called at least once. # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # # @example Expected method must be called at least once. # object = mock() # object.expects(:expected_method).at_least_once @@ -969,13 +926,15 @@ class Mocha::Expectation # object = mock() # object.expects(:expected_method).at_least_once # # => verify fails - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. # - # source://mocha//lib/mocha/expectation.rb#152 + # pkg:gem/mocha#lib/mocha/expectation.rb:152 def at_least_once; end # Modifies expectation so that the expected method must be called at most a +maximum_number_of_times+. # + # @param [Integer] maximum_number_of_times maximum number of expected invocations. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # # @example Expected method must be called at most twice. # object = mock() # object.expects(:expected_method).at_most(2) @@ -985,14 +944,14 @@ class Mocha::Expectation # object = mock() # object.expects(:expected_method).at_most(2) # 3.times { object.expected_method } # => unexpected invocation - # @param maximum_number_of_times [Integer] maximum number of expected invocations. - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. # - # source://mocha//lib/mocha/expectation.rb#170 + # pkg:gem/mocha#lib/mocha/expectation.rb:170 def at_most(maximum_number_of_times); end # Modifies expectation so that the expected method must be called at most once. # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # # @example Expected method must be called at most once. # object = mock() # object.expects(:expected_method).at_most_once @@ -1002,25 +961,23 @@ class Mocha::Expectation # object = mock() # object.expects(:expected_method).at_most_once # 2.times { object.expected_method } # => unexpected invocation - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. # - # source://mocha//lib/mocha/expectation.rb#188 + # pkg:gem/mocha#lib/mocha/expectation.rb:188 def at_most_once; end # @private # - # source://mocha//lib/mocha/expectation.rb#594 + # pkg:gem/mocha#lib/mocha/expectation.rb:594 def backtrace; end # @private # - # source://mocha//lib/mocha/expectation.rb#704 + # pkg:gem/mocha#lib/mocha/expectation.rb:704 def definition_location; end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/expectation.rb#631 + # pkg:gem/mocha#lib/mocha/expectation.rb:631 def in_correct_order?; end # Constrains the expectation so that it must be invoked at the current point in the +sequence+. @@ -1033,6 +990,12 @@ class Mocha::Expectation # # An expected method can appear in multiple sequences. # + # @param [Sequence] sequence sequence in which expected method should appear. + # @param [*Array] sequences more sequences in which expected method should appear. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @see API#sequence + # # @example Ensure methods are invoked in a specified order. # breakfast = sequence('breakfast') # @@ -1040,62 +1003,60 @@ class Mocha::Expectation # egg.expects(:crack).in_sequence(breakfast) # egg.expects(:fry).in_sequence(breakfast) # egg.expects(:eat).in_sequence(breakfast) - # @param sequence [Sequence] sequence in which expected method should appear. - # @param sequences [*Array] more sequences in which expected method should appear. - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. - # @see API#sequence # - # source://mocha//lib/mocha/expectation.rb#588 + # pkg:gem/mocha#lib/mocha/expectation.rb:588 def in_sequence(sequence, *sequences); end # @private # - # source://mocha//lib/mocha/expectation.rb#680 + # pkg:gem/mocha#lib/mocha/expectation.rb:680 def inspect; end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/expectation.rb#652 + # pkg:gem/mocha#lib/mocha/expectation.rb:652 def invocations_allowed?; end # @private # - # source://mocha//lib/mocha/expectation.rb#662 + # pkg:gem/mocha#lib/mocha/expectation.rb:662 def invoke(invocation); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/expectation.rb#646 + # pkg:gem/mocha#lib/mocha/expectation.rb:646 def match?(invocation, ignoring_order: T.unsafe(nil)); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/expectation.rb#641 + # pkg:gem/mocha#lib/mocha/expectation.rb:641 def matches_method?(method_name); end # @private # - # source://mocha//lib/mocha/expectation.rb#697 + # pkg:gem/mocha#lib/mocha/expectation.rb:697 def method_signature; end # @private # - # source://mocha//lib/mocha/expectation.rb#687 + # pkg:gem/mocha#lib/mocha/expectation.rb:687 def mocha_inspect; end # Modifies expectation so that when the expected method is called, it yields multiple times per invocation with the specified +parameter_groups+. # # If no block is provided, the method will still attempt to yield resulting in a +LocalJumpError+. Note that this is what would happen if a "real" (non-mock) method implementation tried to yield to a non-existent block. # + # @param [*Array] parameter_groups each element of +parameter_groups+ should iself be an +Array+ representing the parameters to be passed to the block for a single yield. Any element of +parameter_groups+ that is not an +Array+ is wrapped in an +Array+. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # @see #then + # # @example When +foreach+ is called, the stub will invoke the block twice, the first time it passes ['row1_col1', 'row1_col2'] as the parameters, and the second time it passes ['row2_col1', ''] as the parameters. # csv = mock() # csv.expects(:foreach).with("path/to/file.csv").multiple_yields(['row1_col1', 'row1_col2'], ['row2_col1', '']) # rows = [] # csv.foreach { |row| rows << row } # rows # => [['row1_col1', 'row1_col2'], ['row2_col1', '']] + # # @example Yield different groups of parameters on different invocations of the expected method. Simulating a situation where the CSV file at 'path/to/file.csv' has been modified between the two calls to +foreach+. # csv = mock() # csv.stubs(:foreach).with("path/to/file.csv").multiple_yields(['old_row1_col1', 'old_row1_col2'], ['old_row2_col1', '']).then.multiple_yields(['new_row1_col1', ''], ['new_row2_col1', 'new_row2_col2']) @@ -1105,15 +1066,14 @@ class Mocha::Expectation # csv.foreach { |row| rows_from_second_invocation << row } # second invocation # rows_from_first_invocation # => [['old_row1_col1', 'old_row1_col2'], ['old_row2_col1', '']] # rows_from_second_invocation # => [['new_row1_col1', ''], ['new_row2_col1', 'new_row2_col2']] - # @param parameter_groups [*Array] each element of +parameter_groups+ should iself be an +Array+ representing the parameters to be passed to the block for a single yield. Any element of +parameter_groups+ that is not an +Array+ is wrapped in an +Array+. - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. - # @see #then # - # source://mocha//lib/mocha/expectation.rb#375 + # pkg:gem/mocha#lib/mocha/expectation.rb:375 def multiple_yields(*parameter_groups); end # Modifies expectation so that the expected method must never be called. # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # # @example Expected method must never be called. # object = mock() # object.expects(:expected_method).never @@ -1122,15 +1082,16 @@ class Mocha::Expectation # object = mock() # object.expects(:expected_method).never # # => verify succeeds - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. # - # source://mocha//lib/mocha/expectation.rb#114 + # pkg:gem/mocha#lib/mocha/expectation.rb:114 def never; end # Modifies expectation so that the expected method must be called exactly once. # # Note that this is the default behaviour for an expectation, but you may wish to use it for clarity/emphasis. # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # # @example Expected method must be invoked exactly once. # object = mock() # object.expects(:expected_method).once @@ -1145,98 +1106,122 @@ class Mocha::Expectation # object = mock() # object.expects(:expected_method).once # # => verify fails - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. # - # source://mocha//lib/mocha/expectation.rb#97 + # pkg:gem/mocha#lib/mocha/expectation.rb:97 def once; end # @private # - # source://mocha//lib/mocha/expectation.rb#636 + # pkg:gem/mocha#lib/mocha/expectation.rb:636 def ordering_constraints_not_allowing_invocation_now; end # @private # - # source://mocha//lib/mocha/expectation.rb#626 + # pkg:gem/mocha#lib/mocha/expectation.rb:626 def perform_side_effects; end # Modifies expectation so that when the expected method is called, it raises the specified +exception+ with the specified +message+ i.e. calls +Kernel#raise(exception, message)+. # + # @param [Class,Exception,String,#exception] exception exception to be raised or message to be passed to RuntimeError. + # @param [String] message exception message. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @see Kernel#raise + # @see #then + # + # @overload def raises + # @overload def raises(exception) + # @overload def raises(exception, message) + # + # @example Raise specified exception if expected method is invoked. + # object = stub() + # object.stubs(:expected_method).raises(Exception, 'message') + # object.expected_method # => raises exception of class Exception and with message 'message' + # # @example Raise custom exception with extra constructor parameters by passing in an instance of the exception. # object = stub() # object.stubs(:expected_method).raises(MyException.new('message', 1, 2, 3)) # object.expected_method # => raises the specified instance of MyException + # # @example Raise different exceptions on consecutive invocations of the expected method. # object = stub() # object.stubs(:expected_method).raises(Exception1).then.raises(Exception2) # object.expected_method # => raises exception of class Exception1 # object.expected_method # => raises exception of class Exception2 - # @example Raise specified exception if expected method is invoked. - # object = stub() - # object.stubs(:expected_method).raises(Exception, 'message') - # object.expected_method # => raises exception of class Exception and with message 'message' + # # @example Raise an exception on first invocation of expected method and then return values on subsequent invocations. # object = stub() # object.stubs(:expected_method).raises(Exception).then.returns(2, 3) # object.expected_method # => raises exception of class Exception1 # object.expected_method # => 2 # object.expected_method # => 3 - # @overload raises - # @overload raises - # @overload raises - # @param exception [Class, Exception, String, #exception] exception to be raised or message to be passed to RuntimeError. - # @param message [String] exception message. - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. - # @see Kernel#raise - # @see #then # - # source://mocha//lib/mocha/expectation.rb#462 + # pkg:gem/mocha#lib/mocha/expectation.rb:462 def raises(exception = T.unsafe(nil), message = T.unsafe(nil)); end # Modifies expectation so that when the expected method is called, it returns the specified +value+. # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # @see #then + # + # @overload def returns(value) + # @param [Object] value value to return on invocation of expected method. + # @overload def returns(*values) + # @param [*Array] values values to return on consecutive invocations of expected method. + # # @example Return the same value on every invocation. # object = mock() # object.stubs(:stubbed_method).returns('result') # object.stubbed_method # => 'result' # object.stubbed_method # => 'result' + # # @example Return a different value on consecutive invocations. # object = mock() # object.stubs(:stubbed_method).returns(1, 2) # object.stubbed_method # => 1 # object.stubbed_method # => 2 + # # @example Alternative way to return a different value on consecutive invocations. # object = mock() # object.stubs(:expected_method).returns(1, 2).then.returns(3) # object.expected_method # => 1 # object.expected_method # => 2 # object.expected_method # => 3 + # # @example May be called in conjunction with {#raises} on the same expectation. # object = mock() # object.stubs(:expected_method).returns(1, 2).then.raises(Exception) # object.expected_method # => 1 # object.expected_method # => 2 # object.expected_method # => raises exception of class Exception1 + # # @example Note that in Ruby a method returning multiple values is exactly equivalent to a method returning an +Array+ of those values. # object = mock() # object.stubs(:expected_method).returns([1, 2]) # x, y = object.expected_method # x # => 1 # y # => 2 - # @overload returns - # @overload returns - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. - # @see #then # - # source://mocha//lib/mocha/expectation.rb#422 + # pkg:gem/mocha#lib/mocha/expectation.rb:422 def returns(*values); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/expectation.rb#657 + # pkg:gem/mocha#lib/mocha/expectation.rb:657 def satisfied?; end + # @overload def then + # Used as syntactic sugar to improve readability. It has no effect on state of the expectation. + # @overload def then(state) + # Used to change the +state_machine+ to the specified state when the expected invocation occurs. + # @param [StateMachine::State] state state_machine.is(state_name) provides a mechanism to change the +state_machine+ into the state specified by +state_name+ when the expected method is invoked. + # + # @see API#states + # @see StateMachine + # @see #when + # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # # @example Using {#then} as syntactic sugar when specifying values to be returned and exceptions to be raised on consecutive invocations of the expected method. # object = mock() # object.stubs(:expected_method).returns(1, 2).then.raises(Exception).then.returns(4) @@ -1244,6 +1229,7 @@ class Mocha::Expectation # object.expected_method # => 2 # object.expected_method # => raises exception of class Exception # object.expected_method # => 4 + # # @example Using {#then} to change the +state+ of a +state_machine+ on the invocation of an expected method. # power = states('power').starts_as('off') # @@ -1254,47 +1240,53 @@ class Mocha::Expectation # radio.expects(:select_channel).with('BBC World Service').when(power.is('on')) # radio.expects(:adjust_volume).with(-5).when(power.is('on')) # radio.expects(:switch_off).then(power.is('off')) - # @overload then - # @overload then - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. # - # source://mocha//lib/mocha/expectation.rb#536 + # pkg:gem/mocha#lib/mocha/expectation.rb:536 def then(state = T.unsafe(nil)); end # Modifies expectation so that when the expected method is called, it throws the specified +tag+ with the specific return value +object+ i.e. calls +Kernel#throw(tag, object)+. # - # @example Throw tag with return value +object+ c.f. +Kernel#throw+. - # object = stub() - # object.stubs(:expected_method).throws(:done, 'result') - # object.expected_method # => throws tag :done and causes catch block to return 'result' + # @param [Symbol,String] tag tag to throw to transfer control to the active catch block. + # @param [Object] object return value for the catch block. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @see Kernel#throw + # @see #then + # + # @overload def throw(tag) + # @overload def throw(tag, object) + # # @example Throw tag when expected method is invoked. # object = stub() # object.stubs(:expected_method).throws(:done) # object.expected_method # => throws tag :done + # + # @example Throw tag with return value +object+ c.f. +Kernel#throw+. + # object = stub() + # object.stubs(:expected_method).throws(:done, 'result') + # object.expected_method # => throws tag :done and causes catch block to return 'result' + # # @example Throw different tags on consecutive invocations of the expected method. # object = stub() # object.stubs(:expected_method).throws(:done).then.throws(:continue) # object.expected_method # => throws :done # object.expected_method # => throws :continue + # # @example Throw tag on first invocation of expected method and then return values for subsequent invocations. # object = stub() # object.stubs(:expected_method).throws(:done).then.returns(2, 3) # object.expected_method # => throws :done # object.expected_method # => 2 # object.expected_method # => 3 - # @overload throw - # @overload throw - # @param tag [Symbol, String] tag to throw to transfer control to the active catch block. - # @param object [Object] return value for the catch block. - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. - # @see Kernel#throw - # @see #then # - # source://mocha//lib/mocha/expectation.rb#501 + # pkg:gem/mocha#lib/mocha/expectation.rb:501 def throws(tag, object = T.unsafe(nil)); end # Modifies expectation so that the number of calls to the expected method must be within a specific +range+. # + # @param [Range,Integer] range specifies the allowable range in the number of expected invocations. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # # @example Specifying a specific number of expected invocations. # object = mock() # object.expects(:expected_method).times(3) @@ -1305,6 +1297,7 @@ class Mocha::Expectation # object.expects(:expected_method).times(3) # 2.times { object.expected_method } # # => verify fails + # # @example Specifying a range in the number of expected invocations. # object = mock() # object.expects(:expected_method).times(2..4) @@ -1315,14 +1308,14 @@ class Mocha::Expectation # object.expects(:expected_method).times(2..4) # object.expected_method # # => verify fails - # @param range [Range, Integer] specifies the allowable range in the number of expected invocations. - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. # - # source://mocha//lib/mocha/expectation.rb#46 + # pkg:gem/mocha#lib/mocha/expectation.rb:46 def times(range); end # Modifies expectation so that the expected method must be called exactly twice. # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # # @example Expected method must be invoked exactly twice. # object = mock() # object.expects(:expected_method).twice @@ -1340,25 +1333,29 @@ class Mocha::Expectation # object.expects(:expected_method).twice # object.expected_method # # => verify fails - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. # - # source://mocha//lib/mocha/expectation.rb#72 + # pkg:gem/mocha#lib/mocha/expectation.rb:72 def twice; end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/expectation.rb#675 + # pkg:gem/mocha#lib/mocha/expectation.rb:675 def used?; end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/expectation.rb#669 + # pkg:gem/mocha#lib/mocha/expectation.rb:669 def verified?(assertion_counter = T.unsafe(nil)); end # Constrains the expectation to occur only when the +state_machine+ is in the state specified by +state_predicate+. # + # @param [StateMachine::StatePredicate] state_predicate +state_machine.is(state_name)+ provides a mechanism to determine whether the +state_machine+ is in the state specified by +state_predicate+ when the expected method is invoked. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @see API#states + # @see StateMachine + # @see #then + # # @example Using {#when} to only allow invocation of methods when "power" state machine is in the "on" state. # power = states('power').starts_as('off') # @@ -1369,13 +1366,8 @@ class Mocha::Expectation # radio.expects(:select_channel).with('BBC World Service').when(power.is('on')) # radio.expects(:adjust_volume).with(-5).when(power.is('on')) # radio.expects(:switch_off).then(power.is('off')) - # @param state_predicate [StateMachine::StatePredicate] +state_machine.is(state_name)+ provides a mechanism to determine whether the +state_machine+ is in the state specified by +state_predicate+ when the expected method is invoked. - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. - # @see API#states - # @see StateMachine - # @see #then # - # source://mocha//lib/mocha/expectation.rb#560 + # pkg:gem/mocha#lib/mocha/expectation.rb:560 def when(state_predicate); end # Modifies expectation so that the expected method must be called with +expected_parameters_or_matchers+. @@ -1388,6 +1380,15 @@ class Mocha::Expectation # # When {Configuration#strict_keyword_argument_matching=} is set to +true+, an actual positional +Hash+ will not match an expected set of keyword arguments; and vice versa, an actual set of keyword arguments will not match an expected positional +Hash+, i.e. the parameter matching is stricter. # + # @see ParameterMatchers + # @see Configuration#strict_keyword_argument_matching= + # + # @param [*Array] expected_parameters_or_matchers expected parameter values or parameter matchers. + # @yield optional block specifying custom matching. + # @yieldparam [*Array] actual_parameters parameters with which expected method was invoked. + # @yieldreturn [Boolean] +true+ if +actual_parameters+ are acceptable. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # # @example Expected method must be called with exact parameter values. # object = mock() # object.expects(:expected_method).with(:param1, :param2) @@ -1398,6 +1399,7 @@ class Mocha::Expectation # object.expects(:expected_method).with(:param1, :param2) # object.expected_method(:param3) # # => verify fails + # # @example Expected method must be called with parameters matching parameter matchers. # object = mock() # object.expects(:expected_method).with(includes('string2'), anything) @@ -1408,30 +1410,33 @@ class Mocha::Expectation # object.expects(:expected_method).with(includes('string2'), anything) # object.expected_method(['string1'], 'any-old-value') # # => verify fails + # # @example Loose keyword argument matching (default) # # class Example - # def foo(a, bar:); end + # def foo(a, bar:); end # end # # example = Example.new # example.expects(:foo).with('a', bar: 'b') # example.foo('a', { bar: 'b' }) # # This passes the test, but would result in an ArgumentError in practice + # # @example Strict keyword argument matching # # Mocha.configure do |c| - # c.strict_keyword_argument_matching = true + # c.strict_keyword_argument_matching = true # end # # class Example - # def foo(a, bar:); end + # def foo(a, bar:); end # end # # example = Example.new # example.expects(:foo).with('a', bar: 'b') # example.foo('a', { bar: 'b' }) # # This now fails as expected + # # @example Expected method must be called with a value divisible by 4. # object = mock() # object.expects(:expected_method).with() { |value| value % 4 == 0 } @@ -1442,19 +1447,14 @@ class Mocha::Expectation # object.expects(:expected_method).with() { |value| value % 4 == 0 } # object.expected_method(17) # # => verify fails - # @param expected_parameters_or_matchers [*Array] expected parameter values or parameter matchers. - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. - # @see ParameterMatchers - # @see Configuration#strict_keyword_argument_matching= - # @yield optional block specifying custom matching. - # @yieldparam actual_parameters [*Array] parameters with which expected method was invoked. - # @yieldreturn [Boolean] +true+ if +actual_parameters+ are acceptable. # - # source://mocha//lib/mocha/expectation.rb#269 + # pkg:gem/mocha#lib/mocha/expectation.rb:269 def with(*expected_parameters_or_matchers, **_arg1, &matching_block); end # Modifies expectation so that the expected method must be called with a block. # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # # @example Expected method must be called with a block. # object = mock() # object.expects(:expected_method).with_block_given @@ -1465,13 +1465,14 @@ class Mocha::Expectation # object.expects(:expected_method).with_block_given # object.expected_method # # => verify fails - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. # - # source://mocha//lib/mocha/expectation.rb#289 + # pkg:gem/mocha#lib/mocha/expectation.rb:289 def with_block_given; end # Modifies expectation so that the expected method must be called without a block. # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # # @example Expected method must be called without a block. # object = mock() # object.expects(:expected_method).with_no_block_given @@ -1482,9 +1483,8 @@ class Mocha::Expectation # object.expects(:expected_method).with_block_given # object.expected_method { 1 + 1 } # # => verify fails - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. # - # source://mocha//lib/mocha/expectation.rb#308 + # pkg:gem/mocha#lib/mocha/expectation.rb:308 def with_no_block_given; end # Modifies expectation so that when the expected method is called, it yields to the block with the specified +parameters+. @@ -1495,18 +1495,24 @@ class Mocha::Expectation # # May be called multiple times on the same expectation for consecutive invocations. # + # @param [*Array] parameters parameters to be yielded. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # @see #then + # # @example Yield when expected method is invoked. # benchmark = mock() # benchmark.expects(:measure).yields # yielded = false # benchmark.measure { yielded = true } # yielded # => true + # # @example Yield parameters when expected method is invoked. # fibonacci = mock() # fibonacci.expects(:next_pair).yields(0, 1) # sum = 0 # fibonacci.next_pair { |first, second| sum = first + second } # sum # => 1 + # # @example Yield different parameters on different invocations of the expected method. # fibonacci = mock() # fibonacci.expects(:next_pair).yields(0, 1).then.yields(1, 1) @@ -1515,11 +1521,8 @@ class Mocha::Expectation # sum # => 1 # fibonacci.next_pair { |first, second| sum = first + second } # sum # => 2 - # @param parameters [*Array] parameters to be yielded. - # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. - # @see #then # - # source://mocha//lib/mocha/expectation.rb#347 + # pkg:gem/mocha#lib/mocha/expectation.rb:347 def yields(*parameters); end end @@ -1529,7 +1532,7 @@ end # # @see Mocha::ExpectationErrorFactory # -# source://mocha//lib/mocha/expectation_error.rb#7 +# pkg:gem/mocha#lib/mocha/expectation_error.rb:7 class Mocha::ExpectationError < ::Exception; end # This factory determines what class of exception should be raised when Mocha detects a test failure. @@ -1540,87 +1543,86 @@ class Mocha::ExpectationError < ::Exception; end # # @see Mocha::Integration::Minitest::Adapter # -# source://mocha//lib/mocha/expectation_error_factory.rb#12 +# pkg:gem/mocha#lib/mocha/expectation_error_factory.rb:12 class Mocha::ExpectationErrorFactory class << self # @private # - # source://mocha//lib/mocha/expectation_error_factory.rb#26 + # pkg:gem/mocha#lib/mocha/expectation_error_factory.rb:26 def build(message = T.unsafe(nil), backtrace = T.unsafe(nil)); end - # Determines what class of exception should be raised when Mocha detects a test failure. + # @!attribute exception_class + # Determines what class of exception should be raised when Mocha detects a test failure. # - # This attribute may be set by authors of test libraries in order to have Mocha raise exceptions of a specific class when there is an unexpected invocation or an unsatisfied expectation. + # This attribute may be set by authors of test libraries in order to have Mocha raise exceptions of a specific class when there is an unexpected invocation or an unsatisfied expectation. # - # By default a +Mocha::ExpectationError+ will be raised. + # By default a +Mocha::ExpectationError+ will be raised. # - # @return [Exception] class of exception to be raised when an expectation error occurs - # @see Mocha::ExpectationError + # @return [Exception] class of exception to be raised when an expectation error occurs + # @see Mocha::ExpectationError # - # source://mocha//lib/mocha/expectation_error_factory.rb#23 + # pkg:gem/mocha#lib/mocha/expectation_error_factory.rb:23 def exception_class; end - # Sets the attribute exception_class + # @!attribute exception_class + # Determines what class of exception should be raised when Mocha detects a test failure. + # + # This attribute may be set by authors of test libraries in order to have Mocha raise exceptions of a specific class when there is an unexpected invocation or an unsatisfied expectation. + # + # By default a +Mocha::ExpectationError+ will be raised. # - # @param value the value to set the attribute exception_class to. + # @return [Exception] class of exception to be raised when an expectation error occurs + # @see Mocha::ExpectationError # - # source://mocha//lib/mocha/expectation_error_factory.rb#23 + # pkg:gem/mocha#lib/mocha/expectation_error_factory.rb:23 def exception_class=(_arg0); end end end -# source://mocha//lib/mocha/expectation_list.rb#2 +# pkg:gem/mocha#lib/mocha/expectation_list.rb:2 class Mocha::ExpectationList - # @return [ExpectationList] a new instance of ExpectationList - # - # source://mocha//lib/mocha/expectation_list.rb#3 + # pkg:gem/mocha#lib/mocha/expectation_list.rb:3 def initialize(expectations = T.unsafe(nil)); end - # source://mocha//lib/mocha/expectation_list.rb#52 + # pkg:gem/mocha#lib/mocha/expectation_list.rb:52 def +(other); end - # source://mocha//lib/mocha/expectation_list.rb#7 + # pkg:gem/mocha#lib/mocha/expectation_list.rb:7 def add(expectation); end - # @return [Boolean] - # - # source://mocha//lib/mocha/expectation_list.rb#48 + # pkg:gem/mocha#lib/mocha/expectation_list.rb:48 def any?; end - # source://mocha//lib/mocha/expectation_list.rb#44 + # pkg:gem/mocha#lib/mocha/expectation_list.rb:44 def length; end - # source://mocha//lib/mocha/expectation_list.rb#20 + # pkg:gem/mocha#lib/mocha/expectation_list.rb:20 def match(invocation, ignoring_order: T.unsafe(nil)); end - # source://mocha//lib/mocha/expectation_list.rb#28 + # pkg:gem/mocha#lib/mocha/expectation_list.rb:28 def match_allowing_invocation(invocation); end - # source://mocha//lib/mocha/expectation_list.rb#24 + # pkg:gem/mocha#lib/mocha/expectation_list.rb:24 def match_but_out_of_order(invocation); end - # @return [Boolean] - # - # source://mocha//lib/mocha/expectation_list.rb#16 + # pkg:gem/mocha#lib/mocha/expectation_list.rb:16 def matches_method?(method_name); end - # source://mocha//lib/mocha/expectation_list.rb#12 + # pkg:gem/mocha#lib/mocha/expectation_list.rb:12 def remove_all_matching_method(method_name); end - # source://mocha//lib/mocha/expectation_list.rb#36 + # pkg:gem/mocha#lib/mocha/expectation_list.rb:36 def to_a; end - # source://mocha//lib/mocha/expectation_list.rb#40 + # pkg:gem/mocha#lib/mocha/expectation_list.rb:40 def to_set; end - # @return [Boolean] - # - # source://mocha//lib/mocha/expectation_list.rb#32 + # pkg:gem/mocha#lib/mocha/expectation_list.rb:32 def verified?(assertion_counter = T.unsafe(nil)); end private - # source://mocha//lib/mocha/expectation_list.rb#58 + # pkg:gem/mocha#lib/mocha/expectation_list.rb:58 def matching_expectations(invocation, ignoring_order: T.unsafe(nil)); end end @@ -1639,26 +1641,26 @@ end # @see Mocha::ExpectationErrorFactory # @see Mocha::API # -# source://mocha//lib/mocha/hooks.rb#18 +# pkg:gem/mocha#lib/mocha/hooks.rb:18 module Mocha::Hooks # Prepares Mocha before a test (only for use by authors of test libraries). # # This method should be called before each individual test starts (including before any "setup" code). # - # source://mocha//lib/mocha/hooks.rb#22 + # pkg:gem/mocha#lib/mocha/hooks.rb:22 def mocha_setup; end # Resets Mocha after a test (only for use by authors of test libraries). # # This method should be called after each individual test has finished (including after any "teardown" code). # - # source://mocha//lib/mocha/hooks.rb#38 + # pkg:gem/mocha#lib/mocha/hooks.rb:38 def mocha_teardown(origin = T.unsafe(nil)); end # Returns a string representing the unit test name, to be included in some Mocha # to help track down potential bugs. # - # source://mocha//lib/mocha/hooks.rb#44 + # pkg:gem/mocha#lib/mocha/hooks.rb:44 def mocha_test_name; end # Verifies that all mock expectations have been met (only for use by authors of test libraries). @@ -1667,113 +1669,103 @@ module Mocha::Hooks # # This method should be called at the end of each individual test, before it has been determined whether or not the test has passed. # - # source://mocha//lib/mocha/hooks.rb#31 + # pkg:gem/mocha#lib/mocha/hooks.rb:31 def mocha_verify(assertion_counter = T.unsafe(nil)); end end -# source://mocha//lib/mocha/names.rb#12 +# pkg:gem/mocha#lib/mocha/names.rb:12 class Mocha::ImpersonatingAnyInstanceName - # @return [ImpersonatingAnyInstanceName] a new instance of ImpersonatingAnyInstanceName - # - # source://mocha//lib/mocha/names.rb#13 + # pkg:gem/mocha#lib/mocha/names.rb:13 def initialize(klass); end - # source://mocha//lib/mocha/names.rb#17 + # pkg:gem/mocha#lib/mocha/names.rb:17 def mocha_inspect; end end -# source://mocha//lib/mocha/names.rb#2 +# pkg:gem/mocha#lib/mocha/names.rb:2 class Mocha::ImpersonatingName - # @return [ImpersonatingName] a new instance of ImpersonatingName - # - # source://mocha//lib/mocha/names.rb#3 + # pkg:gem/mocha#lib/mocha/names.rb:3 def initialize(object); end - # source://mocha//lib/mocha/names.rb#7 + # pkg:gem/mocha#lib/mocha/names.rb:7 def mocha_inspect; end end -# source://mocha//lib/mocha/in_state_ordering_constraint.rb#2 +# pkg:gem/mocha#lib/mocha/in_state_ordering_constraint.rb:2 class Mocha::InStateOrderingConstraint - # @return [InStateOrderingConstraint] a new instance of InStateOrderingConstraint - # - # source://mocha//lib/mocha/in_state_ordering_constraint.rb#3 + # pkg:gem/mocha#lib/mocha/in_state_ordering_constraint.rb:3 def initialize(state_predicate); end - # @return [Boolean] - # - # source://mocha//lib/mocha/in_state_ordering_constraint.rb#7 + # pkg:gem/mocha#lib/mocha/in_state_ordering_constraint.rb:7 def allows_invocation_now?; end - # source://mocha//lib/mocha/in_state_ordering_constraint.rb#11 + # pkg:gem/mocha#lib/mocha/in_state_ordering_constraint.rb:11 def mocha_inspect; end end -# source://mocha//lib/mocha/inspect.rb#4 +# pkg:gem/mocha#lib/mocha/inspect.rb:4 module Mocha::Inspect; end -# source://mocha//lib/mocha/inspect.rb#13 +# pkg:gem/mocha#lib/mocha/inspect.rb:13 module Mocha::Inspect::ArrayMethods - # source://mocha//lib/mocha/inspect.rb#14 + # pkg:gem/mocha#lib/mocha/inspect.rb:14 def mocha_inspect(wrapped = T.unsafe(nil)); end end -# source://mocha//lib/mocha/inspect.rb#44 +# pkg:gem/mocha#lib/mocha/inspect.rb:44 module Mocha::Inspect::DateMethods - # source://mocha//lib/mocha/inspect.rb#45 + # pkg:gem/mocha#lib/mocha/inspect.rb:45 def mocha_inspect; end end -# source://mocha//lib/mocha/inspect.rb#20 +# pkg:gem/mocha#lib/mocha/inspect.rb:20 module Mocha::Inspect::HashMethods - # source://mocha//lib/mocha/inspect.rb#21 + # pkg:gem/mocha#lib/mocha/inspect.rb:21 def mocha_inspect; end end -# source://mocha//lib/mocha/inspect.rb#5 +# pkg:gem/mocha#lib/mocha/inspect.rb:5 module Mocha::Inspect::ObjectMethods - # source://mocha//lib/mocha/inspect.rb#6 + # pkg:gem/mocha#lib/mocha/inspect.rb:6 def mocha_inspect; end end -# source://mocha//lib/mocha/inspect.rb#38 +# pkg:gem/mocha#lib/mocha/inspect.rb:38 module Mocha::Inspect::TimeMethods - # source://mocha//lib/mocha/inspect.rb#39 + # pkg:gem/mocha#lib/mocha/inspect.rb:39 def mocha_inspect; end end -# source://mocha//lib/mocha/instance_method.rb#4 +# pkg:gem/mocha#lib/mocha/instance_method.rb:4 class Mocha::InstanceMethod < ::Mocha::StubbedMethod private - # source://mocha//lib/mocha/instance_method.rb#7 + # pkg:gem/mocha#lib/mocha/instance_method.rb:7 def mock_owner; end - # source://mocha//lib/mocha/instance_method.rb#15 + # pkg:gem/mocha#lib/mocha/instance_method.rb:15 def original_method_owner; end - # source://mocha//lib/mocha/instance_method.rb#11 + # pkg:gem/mocha#lib/mocha/instance_method.rb:11 def stubbee_method(method_name); end end -# source://mocha//lib/mocha/integration/assertion_counter.rb#2 +# pkg:gem/mocha#lib/mocha/integration/assertion_counter.rb:2 module Mocha::Integration; end -# source://mocha//lib/mocha/integration/assertion_counter.rb#3 +# pkg:gem/mocha#lib/mocha/integration/assertion_counter.rb:3 class Mocha::Integration::AssertionCounter - # @return [AssertionCounter] a new instance of AssertionCounter - # - # source://mocha//lib/mocha/integration/assertion_counter.rb#4 + # pkg:gem/mocha#lib/mocha/integration/assertion_counter.rb:4 def initialize(test_case); end - # source://mocha//lib/mocha/integration/assertion_counter.rb#8 + # pkg:gem/mocha#lib/mocha/integration/assertion_counter.rb:8 def increment; end end -# source://mocha//lib/mocha/integration/minitest/adapter.rb#7 +# pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:7 module Mocha::Integration::Minitest class << self - # source://mocha//lib/mocha/integration/minitest.rb#8 + # pkg:gem/mocha#lib/mocha/integration/minitest.rb:8 def activate; end end end @@ -1782,7 +1774,7 @@ end # # See the source code for an example of how to integrate Mocha into a test library. # -# source://mocha//lib/mocha/integration/minitest/adapter.rb#11 +# pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:11 module Mocha::Integration::Minitest::Adapter include ::Mocha::ParameterMatchers include ::Mocha::Hooks @@ -1790,123 +1782,107 @@ module Mocha::Integration::Minitest::Adapter # @private # - # source://mocha//lib/mocha/integration/minitest/adapter.rb#45 + # pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:45 def after_teardown; end # @private # - # source://mocha//lib/mocha/integration/minitest/adapter.rb#30 + # pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:30 def before_setup; end # @private # - # source://mocha//lib/mocha/integration/minitest/adapter.rb#36 + # pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:36 def before_teardown; end # @private # - # source://mocha//lib/mocha/integration/minitest/adapter.rb#51 + # pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:51 def mocha_test_name; end class << self # @private - # @return [Boolean] # - # source://mocha//lib/mocha/integration/minitest/adapter.rb#15 + # pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:15 def applicable_to?(minitest_version); end # @private # - # source://mocha//lib/mocha/integration/minitest/adapter.rb#20 + # pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:20 def description; end - # @private # @private # - # source://mocha//lib/mocha/integration/minitest/adapter.rb#25 + # pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:25 def included(_mod); end end end -# source://mocha//lib/mocha/invocation.rb#8 +# pkg:gem/mocha#lib/mocha/invocation.rb:8 class Mocha::Invocation - # @return [Invocation] a new instance of Invocation - # - # source://mocha//lib/mocha/invocation.rb#11 + # pkg:gem/mocha#lib/mocha/invocation.rb:11 def initialize(mock, method_name, arguments = T.unsafe(nil), block = T.unsafe(nil)); end - # source://mocha//lib/mocha/invocation.rb#41 + # pkg:gem/mocha#lib/mocha/invocation.rb:41 def arguments; end - # Returns the value of attribute block. - # - # source://mocha//lib/mocha/invocation.rb#9 + # pkg:gem/mocha#lib/mocha/invocation.rb:9 def block; end - # source://mocha//lib/mocha/invocation.rb#20 + # pkg:gem/mocha#lib/mocha/invocation.rb:20 def call(yield_parameters = T.unsafe(nil), return_values = T.unsafe(nil)); end - # source://mocha//lib/mocha/invocation.rb#45 + # pkg:gem/mocha#lib/mocha/invocation.rb:45 def call_description; end - # source://mocha//lib/mocha/invocation.rb#61 + # pkg:gem/mocha#lib/mocha/invocation.rb:61 def full_description; end - # Returns the value of attribute method_name. - # - # source://mocha//lib/mocha/invocation.rb#9 + # pkg:gem/mocha#lib/mocha/invocation.rb:9 def method_name; end - # source://mocha//lib/mocha/invocation.rb#33 + # pkg:gem/mocha#lib/mocha/invocation.rb:33 def raised(exception); end - # source://mocha//lib/mocha/invocation.rb#55 + # pkg:gem/mocha#lib/mocha/invocation.rb:55 def result_description; end - # source://mocha//lib/mocha/invocation.rb#29 + # pkg:gem/mocha#lib/mocha/invocation.rb:29 def returned(value); end - # source://mocha//lib/mocha/invocation.rb#51 + # pkg:gem/mocha#lib/mocha/invocation.rb:51 def short_call_description; end - # source://mocha//lib/mocha/invocation.rb#37 + # pkg:gem/mocha#lib/mocha/invocation.rb:37 def threw(tag, value); end private - # source://mocha//lib/mocha/invocation.rb#67 + # pkg:gem/mocha#lib/mocha/invocation.rb:67 def argument_description; end end -# source://mocha//lib/mocha/logger.rb#2 +# pkg:gem/mocha#lib/mocha/logger.rb:2 class Mocha::Logger - # @return [Logger] a new instance of Logger - # - # source://mocha//lib/mocha/logger.rb#3 + # pkg:gem/mocha#lib/mocha/logger.rb:3 def initialize(io); end - # source://mocha//lib/mocha/logger.rb#7 + # pkg:gem/mocha#lib/mocha/logger.rb:7 def warn(message); end end -# source://mocha//lib/mocha/method_matcher.rb#2 +# pkg:gem/mocha#lib/mocha/method_matcher.rb:2 class Mocha::MethodMatcher - # @return [MethodMatcher] a new instance of MethodMatcher - # - # source://mocha//lib/mocha/method_matcher.rb#5 + # pkg:gem/mocha#lib/mocha/method_matcher.rb:5 def initialize(expected_method_name); end - # Returns the value of attribute expected_method_name. - # - # source://mocha//lib/mocha/method_matcher.rb#3 + # pkg:gem/mocha#lib/mocha/method_matcher.rb:3 def expected_method_name; end - # @return [Boolean] - # - # source://mocha//lib/mocha/method_matcher.rb#9 + # pkg:gem/mocha#lib/mocha/method_matcher.rb:9 def match?(actual_method_name); end - # source://mocha//lib/mocha/method_matcher.rb#13 + # pkg:gem/mocha#lib/mocha/method_matcher.rb:13 def mocha_inspect; end end @@ -1962,10 +1938,6 @@ end # {Expectation#returns} and {Expectation#raises} (along with syntactic sugar # {Expectation#then} if desired). # -# If you want to specify more complex ordering or order invocations across -# different mock objects, use the {Expectation#in_sequence} method to -# explicitly define a total or partial ordering of invocations. -# # @example # object = mock() # object.stubs(:expected_method).returns(1, 2).then.raises(Exception) @@ -1973,123 +1945,86 @@ end # object.expected_method # => 2 # object.expected_method # => raises exception of class Exception1 # -# source://mocha//lib/mocha/mock.rb#75 +# If you want to specify more complex ordering or order invocations across +# different mock objects, use the {Expectation#in_sequence} method to +# explicitly define a total or partial ordering of invocations. +# +# pkg:gem/mocha#lib/mocha/mock.rb:75 class Mocha::Mock # @private - # @return [Mock] a new instance of Mock # - # source://mocha//lib/mocha/mock.rb#275 + # pkg:gem/mocha#lib/mocha/mock.rb:275 def initialize(mockery, name = T.unsafe(nil), receiver = T.unsafe(nil)); end # @private # - # source://mocha//lib/mocha/mock.rb#299 + # pkg:gem/mocha#lib/mocha/mock.rb:299 def __expectations__; end - # Adds an expectation that the specified method must be called exactly once with any parameters. - # - # @example Expected method invoked once so no error raised - # object = mock() - # object.expects(:expected_method) - # object.expected_method - # @example Expected method not invoked so error raised - # object = mock() - # object.expects(:expected_method) - # # error raised when test completes, because expected_method not called exactly once - # @example Expected method invoked twice so error raised - # object = mock() - # object.expects(:expected_method) - # object.expected_method - # object.expected_method # => error raised when expected method invoked second time - # @example Setup multiple expectations using +expected_methods_vs_return_values+. - # object = mock() - # object.expects(expected_method_one: :result_one, expected_method_two: :result_two) - # - # # is exactly equivalent to - # - # object = mock() - # object.expects(:expected_method_one).returns(:result_one) - # object.expects(:expected_method_two).returns(:result_two) - # @overload expects - # @overload expects - # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. - # - # source://mocha//lib/mocha/mock.rb#110 + # pkg:gem/mocha#lib/mocha/mock.rb:289 def __expects__(method_name_or_hash, backtrace = T.unsafe(nil)); end # @private # - # source://mocha//lib/mocha/mock.rb#346 + # pkg:gem/mocha#lib/mocha/mock.rb:346 def __expire__(origin); end + # pkg:gem/mocha#lib/mocha/mock.rb:293 def __singleton_class__; end - # Adds an expectation that the specified method may be called any number of times with any parameters. - # - # @example No error raised however many times stubbed method is invoked - # object = mock() - # object.stubs(:stubbed_method) - # object.stubbed_method - # object.stubbed_method - # # no error raised - # @example Setup multiple expectations using +stubbed_methods_vs_return_values+. - # object = mock() - # object.stubs(stubbed_method_one: :result_one, stubbed_method_two: :result_two) - # - # # is exactly equivalent to - # - # object = mock() - # object.stubs(:stubbed_method_one).returns(:result_one) - # object.stubs(:stubbed_method_two).returns(:result_two) - # @overload stubs - # @overload stubs - # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. - # - # source://mocha//lib/mocha/mock.rb#149 + # pkg:gem/mocha#lib/mocha/mock.rb:291 def __stubs__(method_name_or_hash, backtrace = T.unsafe(nil)); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/mock.rb#341 + # pkg:gem/mocha#lib/mocha/mock.rb:341 def __verified__?(assertion_counter = T.unsafe(nil)); end # @private # - # source://mocha//lib/mocha/mock.rb#309 + # pkg:gem/mocha#lib/mocha/mock.rb:309 def all_expectations; end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/mock.rb#366 + # pkg:gem/mocha#lib/mocha/mock.rb:366 def any_expectations?; end # @private # - # source://mocha//lib/mocha/mock.rb#361 + # pkg:gem/mocha#lib/mocha/mock.rb:361 def ensure_method_not_already_defined(method_name); end # @private # - # source://mocha//lib/mocha/mock.rb#287 + # pkg:gem/mocha#lib/mocha/mock.rb:287 def everything_stubbed; end # Adds an expectation that the specified method must be called exactly once with any parameters. # + # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. + # + # @overload def expects(method_name) + # @param [Symbol,String] method_name name of expected method + # @overload def expects(expected_methods_vs_return_values) + # @param [Hash] expected_methods_vs_return_values expected method name symbols as keys and corresponding return values as values - these expectations are setup as if {#expects} were called multiple times. + # # @example Expected method invoked once so no error raised # object = mock() # object.expects(:expected_method) # object.expected_method + # # @example Expected method not invoked so error raised # object = mock() # object.expects(:expected_method) # # error raised when test completes, because expected_method not called exactly once + # # @example Expected method invoked twice so error raised # object = mock() # object.expects(:expected_method) # object.expected_method # object.expected_method # => error raised when expected method invoked second time + # # @example Setup multiple expectations using +expected_methods_vs_return_values+. # object = mock() # object.expects(expected_method_one: :result_one, expected_method_two: :result_two) @@ -2099,112 +2034,34 @@ class Mocha::Mock # object = mock() # object.expects(:expected_method_one).returns(:result_one) # object.expects(:expected_method_two).returns(:result_two) - # @overload expects - # @overload expects - # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. # - # source://mocha//lib/mocha/mock.rb#110 + # pkg:gem/mocha#lib/mocha/mock.rb:110 def expects(method_name_or_hash, backtrace = T.unsafe(nil)); end # @private # - # source://mocha//lib/mocha/mock.rb#320 + # pkg:gem/mocha#lib/mocha/mock.rb:320 def handle_method_call(symbol, arguments, block); end # @private # - # source://mocha//lib/mocha/mock.rb#356 + # pkg:gem/mocha#lib/mocha/mock.rb:356 def inspect; end # @private # - # source://mocha//lib/mocha/mock.rb#314 + # pkg:gem/mocha#lib/mocha/mock.rb:314 def method_missing(symbol, *arguments, **_arg2, &block); end # @private # - # source://mocha//lib/mocha/mock.rb#351 + # pkg:gem/mocha#lib/mocha/mock.rb:351 def mocha_inspect; end - # Constrains the {Mock} instance so that it can only expect or stub methods to which +responder+ responds publicly. The constraint is only applied at method invocation time. - # - # A +NoMethodError+ will be raised if the +responder+ does not publicly +#respond_to?+ the invoked method (even if the method has been expected or stubbed). - # - # The {Mock} instance will delegate its +#respond_to?+ method to the +responder+. However, the +include_all+ parameter is not passed through, so only public methods on the +responder+ will be considered. - # - # Note that the methods on +responder+ are never actually invoked. - # - # @example Normal mocking - # sheep = mock('sheep') - # sheep.expects(:chew) - # sheep.expects(:foo) - # sheep.respond_to?(:chew) # => true - # sheep.respond_to?(:foo) # => true - # sheep.chew - # sheep.foo - # # no error raised - # @example Using {#responds_like} with an instance method - # class Sheep - # def chew(grass); end - # end - # - # sheep = mock('sheep') - # sheep.responds_like(Sheep.new) - # sheep.expects(:chew) - # sheep.expects(:foo) - # sheep.respond_to?(:chew) # => true - # sheep.respond_to?(:foo) # => false - # sheep.chew - # sheep.foo # => raises NoMethodError exception - # @example Using {#responds_like} with a class method - # class Sheep - # def self.number_of_legs; end - # end - # - # sheep_class = mock('sheep_class') - # sheep_class.responds_like(Sheep) - # sheep_class.stubs(:number_of_legs).returns(4) - # sheep_class.expects(:foo) - # sheep_class.respond_to?(:number_of_legs) # => true - # sheep_class.respond_to?(:foo) # => false - # sheep_class.number_of_legs # => 4 - # sheep_class.foo # => raises NoMethodError exception - # @param responder [Object, #respond_to?] an object used to determine whether {Mock} instance should +#respond_to?+ to an invocation. - # @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained. - # @see #responds_like_instance_of - # - # source://mocha//lib/mocha/mock.rb#237 + # pkg:gem/mocha#lib/mocha/mock.rb:295 def quacks_like(responder); end - # Constrains the {Mock} instance so that it can only expect or stub methods to which an instance of the +responder_class+ responds publicly. The constraint is only applied at method invocation time. Note that the responder instance is instantiated using +Class#allocate+. - # - # A +NoMethodError+ will be raised if the responder instance does not publicly +#respond_to?+ the invoked method (even if the method has been expected or stubbed). - # - # The {Mock} instance will delegate its +#respond_to?+ method to the responder instance. However, the +include_all+ parameter is not passed through, so only public methods on the +responder+ will be considered. - # - # Note that the methods on the responder instance are never actually invoked. - # - # @example Using {#responds_like_instance_of} - # class Sheep - # def initialize - # raise "some awkward code we don't want to call" - # end - # def chew(grass); end - # end - # - # sheep = mock('sheep') - # sheep.responds_like_instance_of(Sheep) - # sheep.expects(:chew) - # sheep.expects(:foo) - # sheep.respond_to?(:chew) # => true - # sheep.respond_to?(:foo) # => false - # sheep.chew - # sheep.foo # => raises NoMethodError exception - # @param responder_class [Class] a class used to determine whether {Mock} instance should +#respond_to?+ to an invocation. - # @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained. - # @see #responds_like - # - # source://mocha//lib/mocha/mock.rb#270 + # pkg:gem/mocha#lib/mocha/mock.rb:296 def quacks_like_instance_of(responder_class); end # Constrains the {Mock} instance so that it can only expect or stub methods to which +responder+ responds publicly. The constraint is only applied at method invocation time. @@ -2215,6 +2072,10 @@ class Mocha::Mock # # Note that the methods on +responder+ are never actually invoked. # + # @param [Object, #respond_to?] responder an object used to determine whether {Mock} instance should +#respond_to?+ to an invocation. + # @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained. + # @see #responds_like_instance_of + # # @example Normal mocking # sheep = mock('sheep') # sheep.expects(:chew) @@ -2224,9 +2085,10 @@ class Mocha::Mock # sheep.chew # sheep.foo # # no error raised + # # @example Using {#responds_like} with an instance method # class Sheep - # def chew(grass); end + # def chew(grass); end # end # # sheep = mock('sheep') @@ -2237,9 +2099,10 @@ class Mocha::Mock # sheep.respond_to?(:foo) # => false # sheep.chew # sheep.foo # => raises NoMethodError exception + # # @example Using {#responds_like} with a class method # class Sheep - # def self.number_of_legs; end + # def self.number_of_legs; end # end # # sheep_class = mock('sheep_class') @@ -2250,11 +2113,8 @@ class Mocha::Mock # sheep_class.respond_to?(:foo) # => false # sheep_class.number_of_legs # => 4 # sheep_class.foo # => raises NoMethodError exception - # @param responder [Object, #respond_to?] an object used to determine whether {Mock} instance should +#respond_to?+ to an invocation. - # @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained. - # @see #responds_like_instance_of # - # source://mocha//lib/mocha/mock.rb#237 + # pkg:gem/mocha#lib/mocha/mock.rb:237 def responds_like(responder); end # Constrains the {Mock} instance so that it can only expect or stub methods to which an instance of the +responder_class+ responds publicly. The constraint is only applied at method invocation time. Note that the responder instance is instantiated using +Class#allocate+. @@ -2265,12 +2125,16 @@ class Mocha::Mock # # Note that the methods on the responder instance are never actually invoked. # + # @param [Class] responder_class a class used to determine whether {Mock} instance should +#respond_to?+ to an invocation. + # @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained. + # @see #responds_like + # # @example Using {#responds_like_instance_of} # class Sheep - # def initialize - # raise "some awkward code we don't want to call" - # end - # def chew(grass); end + # def initialize + # raise "some awkward code we don't want to call" + # end + # def chew(grass); end # end # # sheep = mock('sheep') @@ -2281,26 +2145,31 @@ class Mocha::Mock # sheep.respond_to?(:foo) # => false # sheep.chew # sheep.foo # => raises NoMethodError exception - # @param responder_class [Class] a class used to determine whether {Mock} instance should +#respond_to?+ to an invocation. - # @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained. - # @see #responds_like # - # source://mocha//lib/mocha/mock.rb#270 + # pkg:gem/mocha#lib/mocha/mock.rb:270 def responds_like_instance_of(responder_class); end # @private # - # source://mocha//lib/mocha/mock.rb#304 + # pkg:gem/mocha#lib/mocha/mock.rb:304 def stub_everything; end # Adds an expectation that the specified method may be called any number of times with any parameters. # + # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. + # + # @overload def stubs(method_name) + # @param [Symbol,String] method_name name of stubbed method + # @overload def stubs(stubbed_methods_vs_return_values) + # @param [Hash] stubbed_methods_vs_return_values stubbed method name symbols as keys and corresponding return values as values - these stubbed methods are setup as if {#stubs} were called multiple times. + # # @example No error raised however many times stubbed method is invoked # object = mock() # object.stubs(:stubbed_method) # object.stubbed_method # object.stubbed_method # # no error raised + # # @example Setup multiple expectations using +stubbed_methods_vs_return_values+. # object = mock() # object.stubs(stubbed_method_one: :result_one, stubbed_method_two: :result_two) @@ -2310,21 +2179,21 @@ class Mocha::Mock # object = mock() # object.stubs(:stubbed_method_one).returns(:result_one) # object.stubs(:stubbed_method_two).returns(:result_two) - # @overload stubs - # @overload stubs - # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. # - # source://mocha//lib/mocha/mock.rb#149 + # pkg:gem/mocha#lib/mocha/mock.rb:149 def stubs(method_name_or_hash, backtrace = T.unsafe(nil)); end # Removes the specified stubbed methods (added by calls to {#expects} or {#stubs}) and all expectations associated with them. # + # @param [Array] method_names names of methods to unstub. + # # @example Invoking an unstubbed method causes error to be raised # object = mock('mock') # object.stubs(:stubbed_method).returns(:result_one) # object.stubbed_method # => :result_one # object.unstub(:stubbed_method) # object.stubbed_method # => unexpected invocation: #.stubbed_method() + # # @example Unstubbing multiple methods. # multiplier.unstub(:double, :triple) # @@ -2332,175 +2201,172 @@ class Mocha::Mock # # multiplier.unstub(:double) # multiplier.unstub(:triple) - # @param method_names [Array] names of methods to unstub. # - # source://mocha//lib/mocha/mock.rb#182 + # pkg:gem/mocha#lib/mocha/mock.rb:182 def unstub(*method_names); end private - # @raise [StubbingError] - # - # source://mocha//lib/mocha/mock.rb#393 + # pkg:gem/mocha#lib/mocha/mock.rb:393 def check_expiry; end - # source://mocha//lib/mocha/mock.rb#387 + # pkg:gem/mocha#lib/mocha/mock.rb:387 def check_responder_responds_to(symbol); end - # source://mocha//lib/mocha/mock.rb#372 + # pkg:gem/mocha#lib/mocha/mock.rb:372 def raise_unexpected_invocation_error(invocation, matching_expectation); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/mock.rb#332 + # pkg:gem/mocha#lib/mocha/mock.rb:332 def respond_to_missing?(symbol, _include_all); end end -# source://mocha//lib/mocha/mockery.rb#13 +# pkg:gem/mocha#lib/mocha/mockery.rb:13 class Mocha::Mockery - # source://mocha//lib/mocha/mockery.rb#138 + # pkg:gem/mocha#lib/mocha/mockery.rb:138 def logger; end - # Sets the attribute logger - # - # @param value the value to set the attribute logger to. - # - # source://mocha//lib/mocha/mockery.rb#136 + # pkg:gem/mocha#lib/mocha/mockery.rb:136 def logger=(_arg0); end - # source://mocha//lib/mocha/mockery.rb#116 + # pkg:gem/mocha#lib/mocha/mockery.rb:116 def mocha_inspect; end - # source://mocha//lib/mocha/mockery.rb#66 + # pkg:gem/mocha#lib/mocha/mockery.rb:66 def mock_impersonating(object); end - # source://mocha//lib/mocha/mockery.rb#70 + # pkg:gem/mocha#lib/mocha/mockery.rb:70 def mock_impersonating_any_instance_of(klass); end - # source://mocha//lib/mocha/mockery.rb#104 + # pkg:gem/mocha#lib/mocha/mockery.rb:104 def mocks; end - # source://mocha//lib/mocha/mockery.rb#58 + # pkg:gem/mocha#lib/mocha/mockery.rb:58 def named_mock(name); end - # source://mocha//lib/mocha/mockery.rb#74 + # pkg:gem/mocha#lib/mocha/mockery.rb:74 def new_state_machine(name); end - # source://mocha//lib/mocha/mockery.rb#124 + # pkg:gem/mocha#lib/mocha/mockery.rb:124 def on_stubbing(object, method); end - # source://mocha//lib/mocha/mockery.rb#112 + # pkg:gem/mocha#lib/mocha/mockery.rb:112 def sequences; end - # source://mocha//lib/mocha/mockery.rb#108 + # pkg:gem/mocha#lib/mocha/mockery.rb:108 def state_machines; end - # source://mocha//lib/mocha/mockery.rb#100 + # pkg:gem/mocha#lib/mocha/mockery.rb:100 def stubba; end - # source://mocha//lib/mocha/mockery.rb#94 + # pkg:gem/mocha#lib/mocha/mockery.rb:94 def teardown(origin = T.unsafe(nil)); end - # source://mocha//lib/mocha/mockery.rb#62 + # pkg:gem/mocha#lib/mocha/mockery.rb:62 def unnamed_mock; end - # source://mocha//lib/mocha/mockery.rb#78 + # pkg:gem/mocha#lib/mocha/mockery.rb:78 def verify(assertion_counter = T.unsafe(nil)); end private - # source://mocha//lib/mocha/mockery.rb#165 + # pkg:gem/mocha#lib/mocha/mockery.rb:165 def add_mock(mock); end - # source://mocha//lib/mocha/mockery.rb#170 + # pkg:gem/mocha#lib/mocha/mockery.rb:170 def add_state_machine(state_machine); end - # @raise [StubbingError] - # - # source://mocha//lib/mocha/mockery.rb#144 + # pkg:gem/mocha#lib/mocha/mockery.rb:144 def check(action, description, signature_proc, backtrace = T.unsafe(nil)); end - # source://mocha//lib/mocha/mockery.rb#153 + # pkg:gem/mocha#lib/mocha/mockery.rb:153 def expectations; end - # source://mocha//lib/mocha/mockery.rb#175 + # pkg:gem/mocha#lib/mocha/mockery.rb:175 def reset; end - # source://mocha//lib/mocha/mockery.rb#161 + # pkg:gem/mocha#lib/mocha/mockery.rb:161 def satisfied_expectations; end - # source://mocha//lib/mocha/mockery.rb#157 + # pkg:gem/mocha#lib/mocha/mockery.rb:157 def unsatisfied_expectations; end class << self - # source://mocha//lib/mocha/mockery.rb#36 + # pkg:gem/mocha#lib/mocha/mockery.rb:36 def instance; end - # source://mocha//lib/mocha/mockery.rb#40 + # pkg:gem/mocha#lib/mocha/mockery.rb:40 def setup; end - # source://mocha//lib/mocha/mockery.rb#51 + # pkg:gem/mocha#lib/mocha/mockery.rb:51 def teardown(origin = T.unsafe(nil)); end - # source://mocha//lib/mocha/mockery.rb#47 + # pkg:gem/mocha#lib/mocha/mockery.rb:47 def verify(*args); end end end -# source://mocha//lib/mocha/mockery.rb#14 +# pkg:gem/mocha#lib/mocha/mockery.rb:14 class Mocha::Mockery::Null < ::Mocha::Mockery - # source://mocha//lib/mocha/mockery.rb#15 + # pkg:gem/mocha#lib/mocha/mockery.rb:15 def add_mock(*_arg0); end - # source://mocha//lib/mocha/mockery.rb#19 + # pkg:gem/mocha#lib/mocha/mockery.rb:19 def add_state_machine(*_arg0); end - # source://mocha//lib/mocha/mockery.rb#23 + # pkg:gem/mocha#lib/mocha/mockery.rb:23 def stubba; end private - # @raise [NotInitializedError] - # - # source://mocha//lib/mocha/mockery.rb#29 + # pkg:gem/mocha#lib/mocha/mockery.rb:29 def raise_not_initialized_error; end end -# source://mocha//lib/mocha/names.rb#22 +# pkg:gem/mocha#lib/mocha/names.rb:22 class Mocha::Name - # @return [Name] a new instance of Name - # - # source://mocha//lib/mocha/names.rb#23 + # pkg:gem/mocha#lib/mocha/names.rb:23 def initialize(name); end - # source://mocha//lib/mocha/names.rb#27 + # pkg:gem/mocha#lib/mocha/names.rb:27 def mocha_inspect; end end # Exception raised when Mocha has not been initialized, e.g. outside the # context of a test. # -# source://mocha//lib/mocha/not_initialized_error.rb#6 +# pkg:gem/mocha#lib/mocha/not_initialized_error.rb:6 class Mocha::NotInitializedError < ::Mocha::ErrorWithFilteredBacktrace; end # Methods added to all objects to allow mocking and stubbing on real (i.e. non-mock) objects. # # Both {#expects} and {#stubs} return an {Expectation} which can be further modified by methods on {Expectation}. # -# source://mocha//lib/mocha/object_methods.rb#10 +# pkg:gem/mocha#lib/mocha/object_methods.rb:10 module Mocha::ObjectMethods # @private + # + # pkg:gem/mocha#lib/mocha/object_methods.rb:12 def _method(_arg0); end # Adds an expectation that the specified method must be called exactly once with any parameters. # # The original implementation of the method is replaced during the test and then restored at the end of the test. The temporary replacement method has the same visibility as the original method. # + # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. + # @raise [StubbingError] if attempting to stub method which is not allowed. + # + # @overload def expects(method_name) + # @param [Symbol,String] method_name name of expected method + # @overload def expects(expected_methods_vs_return_values) + # @param [Hash] expected_methods_vs_return_values expected method name symbols as keys and corresponding return values as values - these expectations are setup as if {#expects} were called multiple times. + # # @example Setting up an expectation on a non-mock object. # product = Product.new # product.expects(:save).returns(true) # assert_equal true, product.save + # # @example Setting up multiple expectations on a non-mock object. # product = Product.new # product.expects(valid?: true, save: true) @@ -2510,48 +2376,54 @@ module Mocha::ObjectMethods # product = Product.new # product.expects(:valid?).returns(true) # product.expects(:save).returns(true) - # @overload expects - # @overload expects - # @raise [StubbingError] if attempting to stub method which is not allowed. - # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. + # # @see Mock#expects # - # source://mocha//lib/mocha/object_methods.rb#71 + # pkg:gem/mocha#lib/mocha/object_methods.rb:71 def expects(expected_methods_vs_return_values); end # @private # - # source://mocha//lib/mocha/object_methods.rb#15 + # pkg:gem/mocha#lib/mocha/object_methods.rb:15 def mocha(instantiate = T.unsafe(nil)); end # @private # - # source://mocha//lib/mocha/object_methods.rb#24 + # pkg:gem/mocha#lib/mocha/object_methods.rb:24 def reset_mocha; end # @private # - # source://mocha//lib/mocha/object_methods.rb#39 + # pkg:gem/mocha#lib/mocha/object_methods.rb:39 def stubba_class; end # @private # - # source://mocha//lib/mocha/object_methods.rb#29 + # pkg:gem/mocha#lib/mocha/object_methods.rb:29 def stubba_method; end # @private # - # source://mocha//lib/mocha/object_methods.rb#34 + # pkg:gem/mocha#lib/mocha/object_methods.rb:34 def stubba_object; end # Adds an expectation that the specified method may be called any number of times with any parameters. # # The original implementation of the method is replaced during the test and then restored at the end of the test. The temporary replacement method has the same visibility as the original method. # + # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. + # @raise [StubbingError] if attempting to stub method which is not allowed. + # + # @overload def stubs(method_name) + # @param [Symbol,String] method_name name of stubbed method + # @overload def stubs(stubbed_methods_vs_return_values) + # @param [Hash] stubbed_methods_vs_return_values stubbed method name symbols as keys and corresponding return values as values - these stubbed methods are setup as if {#stubs} were called multiple times. + # # @example Setting up a stubbed methods on a non-mock object. # product = Product.new # product.stubs(:save).returns(true) # assert_equal true, product.save + # # @example Setting up multiple stubbed methods on a non-mock object. # product = Product.new # product.stubs(valid?: true, save: true) @@ -2561,13 +2433,10 @@ module Mocha::ObjectMethods # product = Product.new # product.stubs(:valid?).returns(true) # product.stubs(:save).returns(true) - # @overload stubs - # @overload stubs - # @raise [StubbingError] if attempting to stub method which is not allowed. - # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. + # # @see Mock#stubs # - # source://mocha//lib/mocha/object_methods.rb#120 + # pkg:gem/mocha#lib/mocha/object_methods.rb:120 def stubs(stubbed_methods_vs_return_values); end # Removes the specified stubbed methods (added by calls to {#expects} or {#stubs}) and all expectations associated with them. @@ -2576,6 +2445,8 @@ module Mocha::ObjectMethods # # WARNING: If you {#unstub} a method which still has unsatisfied expectations, you may be removing the only way those expectations can be satisfied. Use {#unstub} with care. # + # @param [Array] method_names names of methods to unstub. + # # @example Stubbing and unstubbing a method on a real (non-mock) object. # multiplier = Multiplier.new # multiplier.double(2) # => 4 @@ -2583,6 +2454,7 @@ module Mocha::ObjectMethods # multiplier.double(2) # => raises exception # multiplier.unstub(:double) # original behaviour restored # multiplier.double(2) # => 4 + # # @example Unstubbing multiple methods on a real (non-mock) object. # multiplier.unstub(:double, :triple) # @@ -2590,91 +2462,102 @@ module Mocha::ObjectMethods # # multiplier.unstub(:double) # multiplier.unstub(:triple) - # @param method_names [Array] names of methods to unstub. # - # source://mocha//lib/mocha/object_methods.rb#161 + # pkg:gem/mocha#lib/mocha/object_methods.rb:161 def unstub(*method_names); end end -# source://mocha//lib/mocha/receivers.rb#2 +# pkg:gem/mocha#lib/mocha/receivers.rb:2 class Mocha::ObjectReceiver - # @return [ObjectReceiver] a new instance of ObjectReceiver - # - # source://mocha//lib/mocha/receivers.rb#3 + # pkg:gem/mocha#lib/mocha/receivers.rb:3 def initialize(object); end - # source://mocha//lib/mocha/receivers.rb#7 + # pkg:gem/mocha#lib/mocha/receivers.rb:7 def mocks; end end # Used as parameters for {Expectation#with} to restrict the parameter values which will match the expectation. Can be nested. # -# source://mocha//lib/mocha/parameter_matchers.rb#3 +# pkg:gem/mocha#lib/mocha/parameter_matchers.rb:3 module Mocha::ParameterMatchers # Matches if +matcher+ does *not* match. # + # @param [Base] matcher matcher whose logic to invert. + # @return [Not] parameter matcher. + # + # @see Expectation#with + # # @example Actual parameter does not include the value +1+. # object = mock() # object.expects(:method_1).with(Not(includes(1))) # object.method_1([0, 2, 3]) # # no error raised + # # @example Actual parameter does include the value +1+. # object = mock() # object.expects(:method_1).with(Not(includes(1))) # object.method_1([0, 1, 2, 3]) # # error raised, because method_1 was not called with object not including 1 - # @param matcher [Base] matcher whose logic to invert. - # @return [Not] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/not.rb#24 + # pkg:gem/mocha#lib/mocha/parameter_matchers/not.rb:24 def Not(matcher); end # Matches if all +matchers+ match. # + # @param [*Array] matchers parameter matchers. + # @return [AllOf] parameter matcher. + # + # @see Expectation#with + # # @example All parameter matchers match. # object = mock() # object.expects(:method_1).with(all_of(includes(1), includes(3))) # object.method_1([1, 3]) # # no error raised + # # @example One of the parameter matchers does not match. # object = mock() # object.expects(:method_1).with(all_of(includes(1), includes(3))) # object.method_1([1, 2]) # # error raised, because method_1 was not called with object including 1 and 3 - # @param matchers [*Array] parameter matchers. - # @return [AllOf] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/all_of.rb#23 + # pkg:gem/mocha#lib/mocha/parameter_matchers/all_of.rb:23 def all_of(*matchers); end # Matches if any +matchers+ match. # + # @param [*Array] matchers parameter matchers. + # @return [AnyOf] parameter matcher. + # + # @see Expectation#with + # # @example One parameter matcher matches. # object = mock() # object.expects(:method_1).with(any_of(1, 3)) # object.method_1(1) # # no error raised + # # @example The other parameter matcher matches. # object = mock() # object.expects(:method_1).with(any_of(1, 3)) # object.method_1(3) # # no error raised + # # @example Neither parameter matcher matches. # object = mock() # object.expects(:method_1).with(any_of(1, 3)) # object.method_1(2) # # error raised, because method_1 was not called with 1 or 3 - # @param matchers [*Array] parameter matchers. - # @return [AnyOf] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/any_of.rb#29 + # pkg:gem/mocha#lib/mocha/parameter_matchers/any_of.rb:29 def any_of(*matchers); end # Matches any parameters. This is used as the default for a newly built expectation. # + # @return [AnyParameters] parameter matcher. + # + # @see Expectation#with + # # @example Any parameters will match. # object = mock() # object.expects(:method_1).with(any_parameters) @@ -2685,14 +2568,16 @@ module Mocha::ParameterMatchers # object.expects(:method_1).with(any_parameters) # object.method_1(5, 6, 7, 8, 9, 0) # # no error raised - # @return [AnyParameters] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/any_parameters.rb#21 + # pkg:gem/mocha#lib/mocha/parameter_matchers/any_parameters.rb:21 def any_parameters; end # Matches any object. # + # @return [Anything] parameter matcher. + # + # @see Expectation#with + # # @example Any object will match. # object = mock() # object.expects(:method_1).with(anything) @@ -2700,446 +2585,508 @@ module Mocha::ParameterMatchers # object.method_1(789) # object.method_1(:bar) # # no error raised - # @return [Anything] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/anything.rb#18 + # pkg:gem/mocha#lib/mocha/parameter_matchers/anything.rb:18 def anything; end # Matches any +Object+ equalling +value+. # + # @param [Object] value expected value. + # @return [Equals] parameter matcher. + # + # @see Expectation#with + # @see Object#== + # # @example Actual parameter equals expected parameter. # object = mock() # object.expects(:method_1).with(equals(2)) # object.method_1(2) # # no error raised + # # @example Actual parameter does not equal expected parameter. # object = mock() # object.expects(:method_1).with(equals(2)) # object.method_1(3) # # error raised, because method_1 was not called with an +Object+ that equals 2 - # @param value [Object] expected value. - # @return [Equals] parameter matcher. - # @see Expectation#with - # @see Object#== # - # source://mocha//lib/mocha/parameter_matchers/equals.rb#24 + # pkg:gem/mocha#lib/mocha/parameter_matchers/equals.rb:24 def equals(value); end # Matches a URI without regard to the ordering of parameters in the query string. # + # @param [String] uri URI to match. + # @return [EquivalentUri] parameter matcher. + # + # @see Expectation#with + # # @example Actual URI is equivalent. # object = mock() # object.expects(:method_1).with(equivalent_uri('http://example.com/foo?a=1&b=2)) # object.method_1('http://example.com/foo?b=2&a=1') # # no error raised + # # @example Actual URI is not equivalent. # object = mock() # object.expects(:method_1).with(equivalent_uri('http://example.com/foo?a=1&b=2)) # object.method_1('http://example.com/foo?a=1&b=3') # # error raised, because the query parameters were different - # @param uri [String] URI to match. - # @return [EquivalentUri] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/equivalent_uri.rb#25 + # pkg:gem/mocha#lib/mocha/parameter_matchers/equivalent_uri.rb:25 def equivalent_uri(uri); end # Matches +Hash+ containing all +entries+. # + # @param [Hash] entries expected +Hash+ entries. + # @return [HasEntries] parameter matcher. + # + # @see Expectation#with + # # @example Actual parameter contains all expected entries. # object = mock() # object.expects(:method_1).with(has_entries('key_1' => 1, 'key_2' => 2)) # object.method_1('key_1' => 1, 'key_2' => 2, 'key_3' => 3) # # no error raised + # # @example Actual parameter does not contain all expected entries. # object = mock() # object.expects(:method_1).with(has_entries('key_1' => 1, 'key_2' => 2)) # object.method_1('key_1' => 1, 'key_2' => 99) # # error raised, because method_1 was not called with Hash containing entries: 'key_1' => 1, 'key_2' => 2 - # @param entries [Hash] expected +Hash+ entries. - # @return [HasEntries] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/has_entries.rb#26 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entries.rb:26 def has_entries(entries); end # Matches +Hash+ containing entry with +key+ and +value+. # + # @overload def has_entry(key, value) + # @param [Object] key key for entry. + # @param [Object] value value for entry. + # @overload def has_entry(single_entry_hash) + # @param [Hash] single_entry_hash +Hash+ with single entry. + # @raise [ArgumentError] if +single_entry_hash+ does not contain exactly one entry. + # + # @return [HasEntry] parameter matcher. + # + # @see Expectation#with + # # @example Actual parameter contains expected entry supplied as key and value. # object = mock() # object.expects(:method_1).with(has_entry('key_1', 1)) # object.method_1('key_1' => 1, 'key_2' => 2) # # no error raised + # # @example Actual parameter contains expected entry supplied as +Hash+ entry. # object = mock() # object.expects(:method_1).with(has_entry('key_1' => 1)) # object.method_1('key_1' => 1, 'key_2' => 2) # # no error raised + # # @example Actual parameter does not contain expected entry supplied as key and value. # object = mock() # object.expects(:method_1).with(has_entry('key_1', 1)) # object.method_1('key_1' => 2, 'key_2' => 1) # # error raised, because method_1 was not called with Hash containing entry: 'key_1' => 1 + # # @example Actual parameter does not contain expected entry supplied as +Hash+ entry. # # object = mock() # object.expects(:method_1).with(has_entry('key_1' => 1)) # object.method_1('key_1' => 2, 'key_2' => 1) # # error raised, because method_1 was not called with Hash containing entry: 'key_1' => 1 - # @overload has_entry - # @overload has_entry - # @return [HasEntry] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/has_entry.rb#43 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entry.rb:43 def has_entry(*options); end # Matches +Hash+ containing +key+. # + # @param [Object] key expected key. + # @return [HasKey] parameter matcher. + # + # @see Expectation#with + # # @example Actual parameter contains entry with expected key. # object = mock() # object.expects(:method_1).with(has_key('key_1')) # object.method_1('key_1' => 1, 'key_2' => 2) # # no error raised + # # @example Actual parameter does not contain entry with expected key. # object = mock() # object.expects(:method_1).with(has_key('key_1')) # object.method_1('key_2' => 2) # # error raised, because method_1 was not called with Hash containing key: 'key_1' - # @param key [Object] expected key. - # @return [HasKey] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/has_key.rb#24 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_key.rb:24 def has_key(key); end # Matches +Hash+ containing +keys+. # + # @param [*Array] keys expected keys. + # @return [HasKeys] parameter matcher. + # + # @see Expectation#with + # # @example Actual parameter contains entry with expected keys. # object = mock() # object.expects(:method_1).with(has_keys(:key_1, :key_2)) # object.method_1(:key_1 => 1, :key_2 => 2, :key_3 => 3) # # no error raised + # # @example Actual parameter does not contain all expected keys. # object = mock() # object.expects(:method_1).with(has_keys(:key_1, :key_2)) # object.method_1(:key_2 => 2) # # error raised, because method_1 was not called with Hash containing key: :key_1 - # @param keys [*Array] expected keys. - # @return [HasKeys] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/has_keys.rb#24 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_keys.rb:24 def has_keys(*keys); end # Matches +Hash+ containing +value+. # + # @param [Object] value expected value. + # @return [HasValue] parameter matcher. + # + # @see Expectation#with + # # @example Actual parameter contains entry with expected value. # object = mock() # object.expects(:method_1).with(has_value(1)) # object.method_1('key_1' => 1, 'key_2' => 2) # # no error raised + # # @example Actual parameter does not contain entry with expected value. # object = mock() # object.expects(:method_1).with(has_value(1)) # object.method_1('key_2' => 2) # # error raised, because method_1 was not called with Hash containing value: 1 - # @param value [Object] expected value. - # @return [HasValue] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/has_value.rb#24 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_value.rb:24 def has_value(value); end # Matches any object that responds with +true+ to +include?(item)+ # for all items. # + # @param [*Array] items expected items. + # @return [Includes] parameter matcher. + # + # @see Expectation#with + # # @example Actual parameter includes all items. # object = mock() # object.expects(:method_1).with(includes('foo', 'bar')) # object.method_1(['foo', 'bar', 'baz']) # # no error raised + # # @example Actual parameter does not include all items. # object.method_1(['foo', 'baz']) # # error raised, because ['foo', 'baz'] does not include 'bar'. + # # @example Actual parameter includes item which matches nested matcher. # object = mock() # object.expects(:method_1).with(includes(has_key(:key))) # object.method_1(['foo', 'bar', {key: 'baz'}]) # # no error raised + # # @example Actual parameter does not include item matching nested matcher. # object.method_1(['foo', 'bar', {:other_key => 'baz'}]) # # error raised, because no element matches `has_key(:key)` matcher + # # @example Actual parameter is a String including substring. # object = mock() # object.expects(:method_1).with(includes('bar')) # object.method_1('foobarbaz') # # no error raised + # # @example Actual parameter is a String not including substring. # object.method_1('foobaz') # # error raised, because 'foobaz' does not include 'bar' + # # @example Actual parameter is a Hash including the given key. # object = mock() # object.expects(:method_1).with(includes(:bar)) # object.method_1({foo: 1, bar: 2}) # # no error raised + # # @example Actual parameter is a Hash without the given key. # object.method_1({foo: 1, baz: 2}) # # error raised, because hash does not include key 'bar' + # # @example Actual parameter is a Hash with a key matching the given matcher. # object = mock() # object.expects(:method_1).with(includes(regexp_matches(/ar/))) # object.method_1({'foo' => 1, 'bar' => 2}) # # no error raised + # # @example Actual parameter is a Hash no key matching the given matcher. # object.method_1({'foo' => 1, 'baz' => 3}) # # error raised, because hash does not include a key matching /ar/ - # @param items [*Array] expected items. - # @return [Includes] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/includes.rb#63 + # pkg:gem/mocha#lib/mocha/parameter_matchers/includes.rb:63 def includes(*items); end # Matches any object that is an instance of +klass+ # + # @param [Class] klass expected class. + # @return [InstanceOf] parameter matcher. + # + # @see Expectation#with + # @see Kernel#instance_of? + # # @example Actual parameter is an instance of +String+. # object = mock() # object.expects(:method_1).with(instance_of(String)) # object.method_1('string') # # no error raised + # # @example Actual parameter is not an instance of +String+. # object = mock() # object.expects(:method_1).with(instance_of(String)) # object.method_1(99) # # error raised, because method_1 was not called with an instance of String - # @param klass [Class] expected class. - # @return [InstanceOf] parameter matcher. - # @see Expectation#with - # @see Kernel#instance_of? # - # source://mocha//lib/mocha/parameter_matchers/instance_of.rb#24 + # pkg:gem/mocha#lib/mocha/parameter_matchers/instance_of.rb:24 def instance_of(klass); end # Matches any object that is a +klass+. # + # @param [Class] klass expected class. + # @return [IsA] parameter matcher. + # + # @see Expectation#with + # @see Kernel#is_a? + # # @example Actual parameter is a +Integer+. # object = mock() # object.expects(:method_1).with(is_a(Integer)) # object.method_1(99) # # no error raised + # # @example Actual parameter is not a +Integer+. # object = mock() # object.expects(:method_1).with(is_a(Integer)) # object.method_1('string') # # error raised, because method_1 was not called with an Integer - # @param klass [Class] expected class. - # @return [IsA] parameter matcher. - # @see Expectation#with - # @see Kernel#is_a? # - # source://mocha//lib/mocha/parameter_matchers/is_a.rb#25 + # pkg:gem/mocha#lib/mocha/parameter_matchers/is_a.rb:25 def is_a(klass); end # Matches any +Object+ that is a kind of +klass+. # + # @param [Class] klass expected class. + # @return [KindOf] parameter matcher. + # + # @see Expectation#with + # @see Kernel#kind_of? + # # @example Actual parameter is a kind of +Integer+. # object = mock() # object.expects(:method_1).with(kind_of(Integer)) # object.method_1(99) # # no error raised + # # @example Actual parameter is not a kind of +Integer+. # object = mock() # object.expects(:method_1).with(kind_of(Integer)) # object.method_1('string') # # error raised, because method_1 was not called with a kind of Integer - # @param klass [Class] expected class. - # @return [KindOf] parameter matcher. - # @see Expectation#with - # @see Kernel#kind_of? # - # source://mocha//lib/mocha/parameter_matchers/kind_of.rb#24 + # pkg:gem/mocha#lib/mocha/parameter_matchers/kind_of.rb:24 def kind_of(klass); end # Matches optional parameters if available. # + # @param [*Array] matchers matchers for optional parameters. + # @return [Optionally] parameter matcher. + # + # @see Expectation#with + # # @example Only the two required parameters are supplied and they both match their expected value. # object = mock() # object.expects(:method_1).with(1, 2, optionally(3, 4)) # object.method_1(1, 2) # # no error raised + # # @example Both required parameters and one of the optional parameters are supplied and they all match their expected value. # object = mock() # object.expects(:method_1).with(1, 2, optionally(3, 4)) # object.method_1(1, 2, 3) # # no error raised + # # @example Both required parameters and both of the optional parameters are supplied and they all match their expected value. # object = mock() # object.expects(:method_1).with(1, 2, optionally(3, 4)) # object.method_1(1, 2, 3, 4) # # no error raised + # # @example One of the actual optional parameters does not match the expected value. # object = mock() # object.expects(:method_1).with(1, 2, optionally(3, 4)) # object.method_1(1, 2, 3, 5) # # error raised, because optional parameters did not match - # @param matchers [*Array] matchers for optional parameters. - # @return [Optionally] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/optionally.rb#33 + # pkg:gem/mocha#lib/mocha/parameter_matchers/optionally.rb:33 def optionally(*matchers); end # Matches any object that matches +regexp+. # + # @param [Regexp] regexp regular expression to match. + # @return [RegexpMatches] parameter matcher. + # + # @see Expectation#with + # # @example Actual parameter is matched by specified regular expression. # object = mock() # object.expects(:method_1).with(regexp_matches(/e/)) # object.method_1('hello') # # no error raised + # # @example Actual parameter is not matched by specified regular expression. # object = mock() # object.expects(:method_1).with(regexp_matches(/a/)) # object.method_1('hello') # # error raised, because method_1 was not called with a parameter that matched the # # regular expression - # @param regexp [Regexp] regular expression to match. - # @return [RegexpMatches] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/regexp_matches.rb#24 + # pkg:gem/mocha#lib/mocha/parameter_matchers/regexp_matches.rb:24 def regexp_matches(regexp); end + # @overload def responds_with(message, result) + # Matches any object that responds to +message+ with +result+. To put it another way, it tests the quack, not the duck. + # @param [Symbol] message method to invoke. + # @param [Object] result expected result of sending +message+. + # @overload def responds_with(messages_vs_results) + # Matches any object that responds to all the messages with the corresponding results as specified by +messages_vs_results+. + # @param [Hash] messages_vs_results +Hash+ of messages vs results. + # @raise [ArgumentError] if +messages_vs_results+ does not contain at least one entry. + # + # @return [RespondsWith] parameter matcher. + # + # @see Expectation#with + # # @example Actual parameter responds with "FOO" when :upcase is invoked. # object = mock() # object.expects(:method_1).with(responds_with(:upcase, "FOO")) # object.method_1("foo") # # no error raised, because "foo".upcase == "FOO" + # # @example Actual parameter does not respond with "FOO" when :upcase is invoked. # object = mock() # object.expects(:method_1).with(responds_with(:upcase, "BAR")) # object.method_1("foo") # # error raised, because "foo".upcase != "BAR" + # # @example Actual parameter responds with "FOO" when :upcase is invoked and "oof" when :reverse is invoked. # object = mock() # object.expects(:method_1).with(responds_with(upcase: "FOO", reverse: "oof")) # object.method_1("foo") # # no error raised, because "foo".upcase == "FOO" and "foo".reverse == "oof" - # @overload responds_with - # @overload responds_with - # @return [RespondsWith] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/responds_with.rb#37 + # pkg:gem/mocha#lib/mocha/parameter_matchers/responds_with.rb:37 def responds_with(*options); end # Matches any YAML that represents the specified +object+ # + # @param [Object] object object whose YAML to compare. + # @return [YamlEquivalent] parameter matcher. + # + # @see Expectation#with + # # @example Actual parameter is YAML equivalent of specified +object+. # object = mock() # object.expects(:method_1).with(yaml_equivalent(1, 2, 3)) # object.method_1("--- \n- 1\n- 2\n- 3\n") # # no error raised + # # @example Actual parameter is not YAML equivalent of specified +object+. # object = mock() # object.expects(:method_1).with(yaml_equivalent(1, 2, 3)) # object.method_1("--- \n- 1\n- 2\n") # # error raised, because method_1 was not called with YAML representing the specified Array - # @param object [Object] object whose YAML to compare. - # @return [YamlEquivalent] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/yaml_equivalent.rb#24 + # pkg:gem/mocha#lib/mocha/parameter_matchers/yaml_equivalent.rb:24 def yaml_equivalent(object); end private # @private # - # source://mocha//lib/mocha/parameter_matchers/has_entry.rb#82 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entry.rb:82 def parse_option(option); end end # Parameter matcher which combines a number of other matchers using a logical AND. # -# source://mocha//lib/mocha/parameter_matchers/all_of.rb#28 +# pkg:gem/mocha#lib/mocha/parameter_matchers/all_of.rb:28 class Mocha::ParameterMatchers::AllOf < ::Mocha::ParameterMatchers::Base # @private - # @return [AllOf] a new instance of AllOf # - # source://mocha//lib/mocha/parameter_matchers/all_of.rb#30 + # pkg:gem/mocha#lib/mocha/parameter_matchers/all_of.rb:30 def initialize(*matchers); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/all_of.rb#35 + # pkg:gem/mocha#lib/mocha/parameter_matchers/all_of.rb:35 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/all_of.rb#41 + # pkg:gem/mocha#lib/mocha/parameter_matchers/all_of.rb:41 def mocha_inspect; end end # Parameter matcher which combines a number of other matchers using a logical OR. # -# source://mocha//lib/mocha/parameter_matchers/any_of.rb#34 +# pkg:gem/mocha#lib/mocha/parameter_matchers/any_of.rb:34 class Mocha::ParameterMatchers::AnyOf < ::Mocha::ParameterMatchers::Base # @private - # @return [AnyOf] a new instance of AnyOf # - # source://mocha//lib/mocha/parameter_matchers/any_of.rb#36 + # pkg:gem/mocha#lib/mocha/parameter_matchers/any_of.rb:36 def initialize(*matchers); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/any_of.rb#41 + # pkg:gem/mocha#lib/mocha/parameter_matchers/any_of.rb:41 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/any_of.rb#47 + # pkg:gem/mocha#lib/mocha/parameter_matchers/any_of.rb:47 def mocha_inspect; end end # Parameter matcher which always matches whatever the parameters. # -# source://mocha//lib/mocha/parameter_matchers/any_parameters.rb#26 +# pkg:gem/mocha#lib/mocha/parameter_matchers/any_parameters.rb:26 class Mocha::ParameterMatchers::AnyParameters < ::Mocha::ParameterMatchers::Base # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/any_parameters.rb#28 + # pkg:gem/mocha#lib/mocha/parameter_matchers/any_parameters.rb:28 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/any_parameters.rb#36 + # pkg:gem/mocha#lib/mocha/parameter_matchers/any_parameters.rb:36 def mocha_inspect; end end # Parameter matcher which always matches a single parameter. # -# source://mocha//lib/mocha/parameter_matchers/anything.rb#23 +# pkg:gem/mocha#lib/mocha/parameter_matchers/anything.rb:23 class Mocha::ParameterMatchers::Anything < ::Mocha::ParameterMatchers::Base # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/anything.rb#25 + # pkg:gem/mocha#lib/mocha/parameter_matchers/anything.rb:25 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/anything.rb#31 + # pkg:gem/mocha#lib/mocha/parameter_matchers/anything.rb:31 def mocha_inspect; end end # @abstract Subclass and implement +#matches?+ and +#mocha_inspect+ to define a custom matcher. Also add a suitably named instance method to {ParameterMatchers} to build an instance of the new matcher c.f. {#equals}. # -# source://mocha//lib/mocha/parameter_matchers/base.rb#4 +# pkg:gem/mocha#lib/mocha/parameter_matchers/base.rb:4 class Mocha::ParameterMatchers::Base # A shorthand way of combining two matchers when both must match. # @@ -3147,6 +3094,11 @@ class Mocha::ParameterMatchers::Base # # This shorthand will not work with an implicit equals match. Instead, an explicit {Equals} matcher should be used. # + # @param [Base] other parameter matcher. + # @return [AllOf] parameter matcher. + # + # @see Expectation#with + # # @example Alternative ways to combine matchers with a logical AND. # object = mock() # object.expects(:run).with(all_of(has_key(:foo), has_key(:bar))) @@ -3156,11 +3108,8 @@ class Mocha::ParameterMatchers::Base # # object.expects(:run).with(has_key(:foo) & has_key(:bar)) # object.run(foo: 'foovalue', bar: 'barvalue) - # @param other [Base] parameter matcher. - # @return [AllOf] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/base.rb#25 + # pkg:gem/mocha#lib/mocha/parameter_matchers/base.rb:25 def &(other); end # A shorthand way of combining two matchers when at least one must match. @@ -3169,6 +3118,11 @@ class Mocha::ParameterMatchers::Base # # This shorthand will not work with an implicit equals match. Instead, an explicit {Equals} matcher should be used. # + # @param [Base] other parameter matcher. + # @return [AnyOf] parameter matcher. + # + # @see Expectation#with + # # @example Alternative ways to combine matchers with a logical OR. # object = mock() # object.expects(:run).with(any_of(has_key(:foo), has_key(:bar))) @@ -3178,499 +3132,440 @@ class Mocha::ParameterMatchers::Base # # object.expects(:run).with(has_key(:foo) | has_key(:bar)) # object.run(foo: 'foovalue') + # # @example Using an explicit {Equals} matcher in combination with {#|}. # object.expects(:run).with(equals(1) | equals(2)) # object.run(1) # passes # object.run(2) # passes # object.run(3) # fails - # @param other [Base] parameter matcher. - # @return [AnyOf] parameter matcher. - # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/base.rb#55 + # pkg:gem/mocha#lib/mocha/parameter_matchers/base.rb:55 def |(other); end end # Parameter matcher which matches when actual parameter equals expected value. # -# source://mocha//lib/mocha/parameter_matchers/equals.rb#29 +# pkg:gem/mocha#lib/mocha/parameter_matchers/equals.rb:29 class Mocha::ParameterMatchers::Equals < ::Mocha::ParameterMatchers::Base # @private - # @return [Equals] a new instance of Equals # - # source://mocha//lib/mocha/parameter_matchers/equals.rb#31 + # pkg:gem/mocha#lib/mocha/parameter_matchers/equals.rb:31 def initialize(value); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/equals.rb#36 + # pkg:gem/mocha#lib/mocha/parameter_matchers/equals.rb:36 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/equals.rb#42 + # pkg:gem/mocha#lib/mocha/parameter_matchers/equals.rb:42 def mocha_inspect; end end # Parameter matcher which matches URIs with equivalent query strings. # -# source://mocha//lib/mocha/parameter_matchers/equivalent_uri.rb#30 +# pkg:gem/mocha#lib/mocha/parameter_matchers/equivalent_uri.rb:30 class Mocha::ParameterMatchers::EquivalentUri < ::Mocha::ParameterMatchers::Base # @private - # @return [EquivalentUri] a new instance of EquivalentUri # - # source://mocha//lib/mocha/parameter_matchers/equivalent_uri.rb#32 + # pkg:gem/mocha#lib/mocha/parameter_matchers/equivalent_uri.rb:32 def initialize(uri); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/equivalent_uri.rb#37 + # pkg:gem/mocha#lib/mocha/parameter_matchers/equivalent_uri.rb:37 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/equivalent_uri.rb#44 + # pkg:gem/mocha#lib/mocha/parameter_matchers/equivalent_uri.rb:44 def mocha_inspect; end private # @private # - # source://mocha//lib/mocha/parameter_matchers/equivalent_uri.rb#51 + # pkg:gem/mocha#lib/mocha/parameter_matchers/equivalent_uri.rb:51 def explode(uri); end end # Parameter matcher which matches when actual parameter contains all expected +Hash+ entries. # -# source://mocha//lib/mocha/parameter_matchers/has_entries.rb#31 +# pkg:gem/mocha#lib/mocha/parameter_matchers/has_entries.rb:31 class Mocha::ParameterMatchers::HasEntries < ::Mocha::ParameterMatchers::Base # @private - # @return [HasEntries] a new instance of HasEntries # - # source://mocha//lib/mocha/parameter_matchers/has_entries.rb#33 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entries.rb:33 def initialize(entries, exact: T.unsafe(nil)); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/has_entries.rb#39 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entries.rb:39 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/has_entries.rb#50 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entries.rb:50 def mocha_inspect; end end # Parameter matcher which matches when actual parameter contains expected +Hash+ entry. # -# source://mocha//lib/mocha/parameter_matchers/has_entry.rb#58 +# pkg:gem/mocha#lib/mocha/parameter_matchers/has_entry.rb:58 class Mocha::ParameterMatchers::HasEntry < ::Mocha::ParameterMatchers::Base # @private - # @return [HasEntry] a new instance of HasEntry # - # source://mocha//lib/mocha/parameter_matchers/has_entry.rb#60 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entry.rb:60 def initialize(key, value); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/has_entry.rb#66 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entry.rb:66 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/has_entry.rb#74 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entry.rb:74 def mocha_inspect; end end # Parameter matcher which matches when actual parameter contains +Hash+ entry with expected key. # -# source://mocha//lib/mocha/parameter_matchers/has_key.rb#29 +# pkg:gem/mocha#lib/mocha/parameter_matchers/has_key.rb:29 class Mocha::ParameterMatchers::HasKey < ::Mocha::ParameterMatchers::Base # @private - # @return [HasKey] a new instance of HasKey # - # source://mocha//lib/mocha/parameter_matchers/has_key.rb#31 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_key.rb:31 def initialize(key); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/has_key.rb#36 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_key.rb:36 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/has_key.rb#43 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_key.rb:43 def mocha_inspect; end end # Parameter matcher which matches when actual parameter contains +Hash+ with all expected keys. # -# source://mocha//lib/mocha/parameter_matchers/has_keys.rb#29 +# pkg:gem/mocha#lib/mocha/parameter_matchers/has_keys.rb:29 class Mocha::ParameterMatchers::HasKeys < ::Mocha::ParameterMatchers::Base # @private - # @raise [ArgumentError] - # @return [HasKeys] a new instance of HasKeys # - # source://mocha//lib/mocha/parameter_matchers/has_keys.rb#31 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_keys.rb:31 def initialize(*keys); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/has_keys.rb#38 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_keys.rb:38 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/has_keys.rb#48 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_keys.rb:48 def mocha_inspect; end end # Parameter matcher which matches when actual parameter contains +Hash+ entry with expected value. # -# source://mocha//lib/mocha/parameter_matchers/has_value.rb#29 +# pkg:gem/mocha#lib/mocha/parameter_matchers/has_value.rb:29 class Mocha::ParameterMatchers::HasValue < ::Mocha::ParameterMatchers::Base # @private - # @return [HasValue] a new instance of HasValue # - # source://mocha//lib/mocha/parameter_matchers/has_value.rb#31 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_value.rb:31 def initialize(value); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/has_value.rb#36 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_value.rb:36 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/has_value.rb#43 + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_value.rb:43 def mocha_inspect; end end # Parameter matcher which matches when actual parameter includes expected values. # -# source://mocha//lib/mocha/parameter_matchers/includes.rb#68 +# pkg:gem/mocha#lib/mocha/parameter_matchers/includes.rb:68 class Mocha::ParameterMatchers::Includes < ::Mocha::ParameterMatchers::Base # @private - # @return [Includes] a new instance of Includes # - # source://mocha//lib/mocha/parameter_matchers/includes.rb#70 + # pkg:gem/mocha#lib/mocha/parameter_matchers/includes.rb:70 def initialize(*items); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/includes.rb#76 + # pkg:gem/mocha#lib/mocha/parameter_matchers/includes.rb:76 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/includes.rb#96 + # pkg:gem/mocha#lib/mocha/parameter_matchers/includes.rb:96 def mocha_inspect; end end # @private # -# source://mocha//lib/mocha/parameter_matchers/instance_methods.rb#8 +# pkg:gem/mocha#lib/mocha/parameter_matchers/instance_methods.rb:8 module Mocha::ParameterMatchers::InstanceMethods # @private # - # source://mocha//lib/mocha/parameter_matchers/instance_methods.rb#10 + # pkg:gem/mocha#lib/mocha/parameter_matchers/instance_methods.rb:10 def to_matcher(expectation: T.unsafe(nil), top_level: T.unsafe(nil)); end end # Parameter matcher which matches when actual parameter is an instance of the specified class. # -# source://mocha//lib/mocha/parameter_matchers/instance_of.rb#29 +# pkg:gem/mocha#lib/mocha/parameter_matchers/instance_of.rb:29 class Mocha::ParameterMatchers::InstanceOf < ::Mocha::ParameterMatchers::Base # @private - # @return [InstanceOf] a new instance of InstanceOf # - # source://mocha//lib/mocha/parameter_matchers/instance_of.rb#31 + # pkg:gem/mocha#lib/mocha/parameter_matchers/instance_of.rb:31 def initialize(klass); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/instance_of.rb#36 + # pkg:gem/mocha#lib/mocha/parameter_matchers/instance_of.rb:36 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/instance_of.rb#42 + # pkg:gem/mocha#lib/mocha/parameter_matchers/instance_of.rb:42 def mocha_inspect; end end # Parameter matcher which matches when actual parameter is a specific class. # -# source://mocha//lib/mocha/parameter_matchers/is_a.rb#30 +# pkg:gem/mocha#lib/mocha/parameter_matchers/is_a.rb:30 class Mocha::ParameterMatchers::IsA < ::Mocha::ParameterMatchers::Base # @private - # @return [IsA] a new instance of IsA # - # source://mocha//lib/mocha/parameter_matchers/is_a.rb#32 + # pkg:gem/mocha#lib/mocha/parameter_matchers/is_a.rb:32 def initialize(klass); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/is_a.rb#37 + # pkg:gem/mocha#lib/mocha/parameter_matchers/is_a.rb:37 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/is_a.rb#43 + # pkg:gem/mocha#lib/mocha/parameter_matchers/is_a.rb:43 def mocha_inspect; end end # Parameter matcher which matches when actual parameter is a kind of specified class. # -# source://mocha//lib/mocha/parameter_matchers/kind_of.rb#29 +# pkg:gem/mocha#lib/mocha/parameter_matchers/kind_of.rb:29 class Mocha::ParameterMatchers::KindOf < ::Mocha::ParameterMatchers::Base # @private - # @return [KindOf] a new instance of KindOf # - # source://mocha//lib/mocha/parameter_matchers/kind_of.rb#31 + # pkg:gem/mocha#lib/mocha/parameter_matchers/kind_of.rb:31 def initialize(klass); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/kind_of.rb#36 + # pkg:gem/mocha#lib/mocha/parameter_matchers/kind_of.rb:36 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/kind_of.rb#44 + # pkg:gem/mocha#lib/mocha/parameter_matchers/kind_of.rb:44 def mocha_inspect; end end # Parameter matcher which inverts the logic of the specified matcher using a logical NOT operation. # -# source://mocha//lib/mocha/parameter_matchers/not.rb#29 +# pkg:gem/mocha#lib/mocha/parameter_matchers/not.rb:29 class Mocha::ParameterMatchers::Not < ::Mocha::ParameterMatchers::Base # @private - # @return [Not] a new instance of Not # - # source://mocha//lib/mocha/parameter_matchers/not.rb#31 + # pkg:gem/mocha#lib/mocha/parameter_matchers/not.rb:31 def initialize(matcher); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/not.rb#36 + # pkg:gem/mocha#lib/mocha/parameter_matchers/not.rb:36 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/not.rb#42 + # pkg:gem/mocha#lib/mocha/parameter_matchers/not.rb:42 def mocha_inspect; end end # Parameter matcher which allows optional parameters to be specified. # -# source://mocha//lib/mocha/parameter_matchers/optionally.rb#38 +# pkg:gem/mocha#lib/mocha/parameter_matchers/optionally.rb:38 class Mocha::ParameterMatchers::Optionally < ::Mocha::ParameterMatchers::Base # @private - # @return [Optionally] a new instance of Optionally # - # source://mocha//lib/mocha/parameter_matchers/optionally.rb#40 + # pkg:gem/mocha#lib/mocha/parameter_matchers/optionally.rb:40 def initialize(*parameters); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/optionally.rb#45 + # pkg:gem/mocha#lib/mocha/parameter_matchers/optionally.rb:45 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/optionally.rb#56 + # pkg:gem/mocha#lib/mocha/parameter_matchers/optionally.rb:56 def mocha_inspect; end end # @private # -# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#9 +# pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:9 class Mocha::ParameterMatchers::PositionalOrKeywordHash < ::Mocha::ParameterMatchers::Base - # @return [PositionalOrKeywordHash] a new instance of PositionalOrKeywordHash - # - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#10 + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:10 def initialize(value, expectation); end - # @return [Boolean] - # - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#15 + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:15 def matches?(available_parameters); end - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#29 + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:29 def mocha_inspect; end private - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#43 + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:43 def deprecation_warning(actual, expected); end - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#59 + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:59 def expectation_definition; end - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#35 + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:35 def extract_parameter(available_parameters); end - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#51 + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:51 def hash_type(hash); end - # @return [Boolean] - # - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#55 + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:55 def ruby2_keywords_hash?(hash); end - # @return [Boolean] - # - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#39 + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:39 def same_type_of_hash?(actual, expected); end end # Parameter matcher which matches if specified regular expression matches actual paramter. # -# source://mocha//lib/mocha/parameter_matchers/regexp_matches.rb#29 +# pkg:gem/mocha#lib/mocha/parameter_matchers/regexp_matches.rb:29 class Mocha::ParameterMatchers::RegexpMatches < ::Mocha::ParameterMatchers::Base # @private - # @return [RegexpMatches] a new instance of RegexpMatches # - # source://mocha//lib/mocha/parameter_matchers/regexp_matches.rb#31 + # pkg:gem/mocha#lib/mocha/parameter_matchers/regexp_matches.rb:31 def initialize(regexp); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/regexp_matches.rb#36 + # pkg:gem/mocha#lib/mocha/parameter_matchers/regexp_matches.rb:36 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/regexp_matches.rb#43 + # pkg:gem/mocha#lib/mocha/parameter_matchers/regexp_matches.rb:43 def mocha_inspect; end end # Parameter matcher which matches if actual parameter returns expected result when specified method is invoked. # -# source://mocha//lib/mocha/parameter_matchers/responds_with.rb#57 +# pkg:gem/mocha#lib/mocha/parameter_matchers/responds_with.rb:57 class Mocha::ParameterMatchers::RespondsWith < ::Mocha::ParameterMatchers::Base # @private - # @return [RespondsWith] a new instance of RespondsWith # - # source://mocha//lib/mocha/parameter_matchers/responds_with.rb#59 + # pkg:gem/mocha#lib/mocha/parameter_matchers/responds_with.rb:59 def initialize(message, result); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/responds_with.rb#65 + # pkg:gem/mocha#lib/mocha/parameter_matchers/responds_with.rb:65 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/responds_with.rb#71 + # pkg:gem/mocha#lib/mocha/parameter_matchers/responds_with.rb:71 def mocha_inspect; end end # Parameter matcher which matches if actual parameter is YAML equivalent of specified object. # -# source://mocha//lib/mocha/parameter_matchers/yaml_equivalent.rb#29 +# pkg:gem/mocha#lib/mocha/parameter_matchers/yaml_equivalent.rb:29 class Mocha::ParameterMatchers::YamlEquivalent < ::Mocha::ParameterMatchers::Base # @private - # @return [YamlEquivalent] a new instance of YamlEquivalent # - # source://mocha//lib/mocha/parameter_matchers/yaml_equivalent.rb#31 + # pkg:gem/mocha#lib/mocha/parameter_matchers/yaml_equivalent.rb:31 def initialize(object); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/yaml_equivalent.rb#36 + # pkg:gem/mocha#lib/mocha/parameter_matchers/yaml_equivalent.rb:36 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/yaml_equivalent.rb#44 + # pkg:gem/mocha#lib/mocha/parameter_matchers/yaml_equivalent.rb:44 def mocha_inspect; end end -# source://mocha//lib/mocha/parameters_matcher.rb#5 +# pkg:gem/mocha#lib/mocha/parameters_matcher.rb:5 class Mocha::ParametersMatcher - # @return [ParametersMatcher] a new instance of ParametersMatcher - # - # source://mocha//lib/mocha/parameters_matcher.rb#6 + # pkg:gem/mocha#lib/mocha/parameters_matcher.rb:6 def initialize(expected_parameters = T.unsafe(nil), expectation = T.unsafe(nil), &matching_block); end - # @return [Boolean] - # - # source://mocha//lib/mocha/parameters_matcher.rb#12 + # pkg:gem/mocha#lib/mocha/parameters_matcher.rb:12 def match?(actual_parameters = T.unsafe(nil)); end - # source://mocha//lib/mocha/parameters_matcher.rb#30 + # pkg:gem/mocha#lib/mocha/parameters_matcher.rb:30 def matchers; end - # source://mocha//lib/mocha/parameters_matcher.rb#24 + # pkg:gem/mocha#lib/mocha/parameters_matcher.rb:24 def mocha_inspect; end - # @return [Boolean] - # - # source://mocha//lib/mocha/parameters_matcher.rb#20 + # pkg:gem/mocha#lib/mocha/parameters_matcher.rb:20 def parameters_match?(actual_parameters); end end -# source://mocha//lib/mocha/ruby_version.rb#2 +# pkg:gem/mocha#lib/mocha/ruby_version.rb:2 Mocha::RUBY_V27_PLUS = T.let(T.unsafe(nil), TrueClass) -# source://mocha//lib/mocha/ruby_version.rb#3 -Mocha::RUBY_V34_PLUS = T.let(T.unsafe(nil), FalseClass) +# pkg:gem/mocha#lib/mocha/ruby_version.rb:3 +Mocha::RUBY_V34_PLUS = T.let(T.unsafe(nil), TrueClass) -# source://mocha//lib/mocha/raised_exception.rb#2 +# pkg:gem/mocha#lib/mocha/raised_exception.rb:2 class Mocha::RaisedException - # @return [RaisedException] a new instance of RaisedException - # - # source://mocha//lib/mocha/raised_exception.rb#3 + # pkg:gem/mocha#lib/mocha/raised_exception.rb:3 def initialize(exception); end - # source://mocha//lib/mocha/raised_exception.rb#7 + # pkg:gem/mocha#lib/mocha/raised_exception.rb:7 def mocha_inspect; end end -# source://mocha//lib/mocha/return_values.rb#4 +# pkg:gem/mocha#lib/mocha/return_values.rb:4 class Mocha::ReturnValues - # @return [ReturnValues] a new instance of ReturnValues - # - # source://mocha//lib/mocha/return_values.rb#11 + # pkg:gem/mocha#lib/mocha/return_values.rb:11 def initialize(*values); end - # source://mocha//lib/mocha/return_values.rb#23 + # pkg:gem/mocha#lib/mocha/return_values.rb:23 def +(other); end - # source://mocha//lib/mocha/return_values.rb#15 + # pkg:gem/mocha#lib/mocha/return_values.rb:15 def next(invocation); end - # Returns the value of attribute values. - # - # source://mocha//lib/mocha/return_values.rb#9 + # pkg:gem/mocha#lib/mocha/return_values.rb:9 def values; end - # Sets the attribute values - # - # @param value the value to set the attribute values to. - # - # source://mocha//lib/mocha/return_values.rb#9 + # pkg:gem/mocha#lib/mocha/return_values.rb:9 def values=(_arg0); end class << self - # source://mocha//lib/mocha/return_values.rb#5 + # pkg:gem/mocha#lib/mocha/return_values.rb:5 def build(*values); end end end @@ -3680,272 +3575,254 @@ end # @see API#sequence # @see Expectation#in_sequence # -# source://mocha//lib/mocha/sequence.rb#6 +# pkg:gem/mocha#lib/mocha/sequence.rb:6 class Mocha::Sequence # @private - # @return [Sequence] a new instance of Sequence # - # source://mocha//lib/mocha/sequence.rb#24 + # pkg:gem/mocha#lib/mocha/sequence.rb:24 def initialize(name); end # @private # - # source://mocha//lib/mocha/sequence.rb#30 + # pkg:gem/mocha#lib/mocha/sequence.rb:30 def constrain_as_next_in_sequence(expectation); end # @private # - # source://mocha//lib/mocha/sequence.rb#42 + # pkg:gem/mocha#lib/mocha/sequence.rb:42 def mocha_inspect; end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/sequence.rb#37 + # pkg:gem/mocha#lib/mocha/sequence.rb:37 def satisfied_to_index?(index); end end # @private # -# source://mocha//lib/mocha/sequence.rb#8 +# pkg:gem/mocha#lib/mocha/sequence.rb:8 class Mocha::Sequence::InSequenceOrderingConstraint - # @return [InSequenceOrderingConstraint] a new instance of InSequenceOrderingConstraint - # - # source://mocha//lib/mocha/sequence.rb#9 + # pkg:gem/mocha#lib/mocha/sequence.rb:9 def initialize(sequence, index); end - # @return [Boolean] - # - # source://mocha//lib/mocha/sequence.rb#14 + # pkg:gem/mocha#lib/mocha/sequence.rb:14 def allows_invocation_now?; end - # source://mocha//lib/mocha/sequence.rb#18 + # pkg:gem/mocha#lib/mocha/sequence.rb:18 def mocha_inspect; end end -# source://mocha//lib/mocha/single_return_value.rb#4 +# pkg:gem/mocha#lib/mocha/single_return_value.rb:4 class Mocha::SingleReturnValue - # @return [SingleReturnValue] a new instance of SingleReturnValue - # - # source://mocha//lib/mocha/single_return_value.rb#5 + # pkg:gem/mocha#lib/mocha/single_return_value.rb:5 def initialize(value); end - # source://mocha//lib/mocha/single_return_value.rb#9 + # pkg:gem/mocha#lib/mocha/single_return_value.rb:9 def evaluate(invocation); end end # A state machine that is used to constrain the order of invocations. # An invocation can be constrained to occur when a state {#is}, or {#is_not}, active. # -# source://mocha//lib/mocha/state_machine.rb#4 +# pkg:gem/mocha#lib/mocha/state_machine.rb:4 class Mocha::StateMachine # @private - # @return [StateMachine] a new instance of StateMachine # - # source://mocha//lib/mocha/state_machine.rb#41 + # pkg:gem/mocha#lib/mocha/state_machine.rb:41 def initialize(name); end # Put the {StateMachine} into the +next_state_name+. # - # @param next_state_name [String] name of new state + # @param [String] next_state_name name of new state # - # source://mocha//lib/mocha/state_machine.rb#58 + # pkg:gem/mocha#lib/mocha/state_machine.rb:58 def become(next_state_name); end # @private # - # source://mocha//lib/mocha/state_machine.rb#38 + # pkg:gem/mocha#lib/mocha/state_machine.rb:38 def current_state; end # @private # - # source://mocha//lib/mocha/state_machine.rb#38 + # pkg:gem/mocha#lib/mocha/state_machine.rb:38 def current_state=(_arg0); end # Provides mechanisms to (a) determine whether the {StateMachine} is in a given state; or (b) to change the {StateMachine} into the given state. # - # @overload is - # @overload is - # @param state_name [String] name of expected/desired state. - # @return [StatePredicate, State] (a) state predicate which, when queried, will indicate whether the {StateMachine} is in the given state; or (b) state which, when activated, will change the {StateMachine} into the given state. + # @param [String] state_name name of expected/desired state. + # @return [StatePredicate,State] (a) state predicate which, when queried, will indicate whether the {StateMachine} is in the given state; or (b) state which, when activated, will change the {StateMachine} into the given state. # - # source://mocha//lib/mocha/state_machine.rb#76 + # @overload def is(expected_state_name) + # Provides a mechanism to determine whether the {StateMachine} is in the state specified by +expected_state_name+ at some point in the future + # @param [String] expected_state_name name of expected state. + # @return [StatePredicate] state predicate which, when queried, will indicate whether the {StateMachine} is in the state specified by +expected_state_name+ + # + # @overload def is(desired_state_name) + # Provides a mechanism to change the {StateMachine} into the state specified by +desired_state_name+ at some point in the future. + # @param [String] desired_state_name name of desired new state. + # @return [State] state which, when activated, will change the {StateMachine} into the state with the specified +desired_state_name+. + # + # pkg:gem/mocha#lib/mocha/state_machine.rb:76 def is(state_name); end # Provides a mechanism to determine whether the {StateMachine} is *not* in the state specified by +unexpected_state_name+ at some point in the future. # - # @param unexpected_state_name [String] name of unexpected state. + # @param [String] unexpected_state_name name of unexpected state. # @return [StatePredicate] state predicate which, when queried, will indicate whether the {StateMachine} is *not* in the state specified by +unexpected_state_name+. # - # source://mocha//lib/mocha/state_machine.rb#84 + # pkg:gem/mocha#lib/mocha/state_machine.rb:84 def is_not(unexpected_state_name); end # @private # - # source://mocha//lib/mocha/state_machine.rb#89 + # pkg:gem/mocha#lib/mocha/state_machine.rb:89 def mocha_inspect; end # @private # - # source://mocha//lib/mocha/state_machine.rb#35 + # pkg:gem/mocha#lib/mocha/state_machine.rb:35 def name; end # Put the {StateMachine} into the state specified by +initial_state_name+. # - # @param initial_state_name [String] name of initial state + # @param [String] initial_state_name name of initial state # @return [StateMachine] state machine, thereby allowing invocations of other {StateMachine} methods to be chained. # - # source://mocha//lib/mocha/state_machine.rb#50 + # pkg:gem/mocha#lib/mocha/state_machine.rb:50 def starts_as(initial_state_name); end end # Provides a mechanism to change the state of a {StateMachine} at some point in the future. # -# source://mocha//lib/mocha/state_machine.rb#27 +# pkg:gem/mocha#lib/mocha/state_machine.rb:27 class Mocha::StateMachine::State < ::Mocha::StateMachine::StatePredicate # @private # - # source://mocha//lib/mocha/state_machine.rb#29 + # pkg:gem/mocha#lib/mocha/state_machine.rb:29 def activate; end end # Provides the ability to determine whether a {StateMachine} is in a specified state at some point in the future. # -# source://mocha//lib/mocha/state_machine.rb#6 +# pkg:gem/mocha#lib/mocha/state_machine.rb:6 class Mocha::StateMachine::StatePredicate # @private - # @return [StatePredicate] a new instance of StatePredicate # - # source://mocha//lib/mocha/state_machine.rb#8 + # pkg:gem/mocha#lib/mocha/state_machine.rb:8 def initialize(state_machine, state, description, &active_check); end # @private - # @return [Boolean] # - # source://mocha//lib/mocha/state_machine.rb#16 + # pkg:gem/mocha#lib/mocha/state_machine.rb:16 def active?; end # @private # - # source://mocha//lib/mocha/state_machine.rb#21 + # pkg:gem/mocha#lib/mocha/state_machine.rb:21 def mocha_inspect; end end -# source://mocha//lib/mocha/stubbed_method.rb#5 +# pkg:gem/mocha#lib/mocha/stubbed_method.rb:5 class Mocha::StubbedMethod - # @return [StubbedMethod] a new instance of StubbedMethod - # - # source://mocha//lib/mocha/stubbed_method.rb#10 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:10 def initialize(stubbee, method_name); end + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:62 def ==(_arg0); end - # source://mocha//lib/mocha/stubbed_method.rb#43 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:43 def define_new_method; end - # source://mocha//lib/mocha/stubbed_method.rb#37 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:37 def hide_original_method; end - # @return [Boolean] - # - # source://mocha//lib/mocha/stubbed_method.rb#57 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:57 def matches?(other); end - # Returns the value of attribute method_name. - # - # source://mocha//lib/mocha/stubbed_method.rb#8 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:8 def method_name; end - # source://mocha//lib/mocha/stubbed_method.rb#29 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:29 def mock; end - # source://mocha//lib/mocha/stubbed_method.rb#53 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:53 def remove_new_method; end - # source://mocha//lib/mocha/stubbed_method.rb#33 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:33 def reset_mocha; end - # source://mocha//lib/mocha/stubbed_method.rb#17 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:17 def stub; end - # Returns the value of attribute stubbee. - # - # source://mocha//lib/mocha/stubbed_method.rb#8 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:8 def stubbee; end - # source://mocha//lib/mocha/stubbed_method.rb#64 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:64 def to_s; end - # source://mocha//lib/mocha/stubbed_method.rb#22 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:22 def unstub; end private - # source://mocha//lib/mocha/stubbed_method.rb#70 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:70 def retain_original_visibility(method_owner); end - # source://mocha//lib/mocha/stubbed_method.rb#75 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:75 def store_original_method_visibility; end - # source://mocha//lib/mocha/stubbed_method.rb#84 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:84 def stub_method_owner; end - # source://mocha//lib/mocha/stubbed_method.rb#79 + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:79 def use_prepended_module_for_stub_method; end end -# source://mocha//lib/mocha/stubbed_method.rb#6 +# pkg:gem/mocha#lib/mocha/stubbed_method.rb:6 class Mocha::StubbedMethod::PrependedModule < ::Module; end # Exception raised when stubbing a particular method is not allowed. # # @see Configuration.prevent # -# source://mocha//lib/mocha/stubbing_error.rb#7 +# pkg:gem/mocha#lib/mocha/stubbing_error.rb:7 class Mocha::StubbingError < ::Mocha::ErrorWithFilteredBacktrace; end -# source://mocha//lib/mocha/thrower.rb#2 +# pkg:gem/mocha#lib/mocha/thrower.rb:2 class Mocha::Thrower - # @return [Thrower] a new instance of Thrower - # - # source://mocha//lib/mocha/thrower.rb#3 + # pkg:gem/mocha#lib/mocha/thrower.rb:3 def initialize(tag, object = T.unsafe(nil)); end - # source://mocha//lib/mocha/thrower.rb#8 + # pkg:gem/mocha#lib/mocha/thrower.rb:8 def evaluate(invocation); end end -# source://mocha//lib/mocha/thrown_object.rb#2 +# pkg:gem/mocha#lib/mocha/thrown_object.rb:2 class Mocha::ThrownObject - # @return [ThrownObject] a new instance of ThrownObject - # - # source://mocha//lib/mocha/thrown_object.rb#3 + # pkg:gem/mocha#lib/mocha/thrown_object.rb:3 def initialize(tag, value = T.unsafe(nil)); end - # source://mocha//lib/mocha/thrown_object.rb#8 + # pkg:gem/mocha#lib/mocha/thrown_object.rb:8 def mocha_inspect; end end -# source://mocha//lib/mocha/version.rb#2 +# pkg:gem/mocha#lib/mocha/version.rb:2 Mocha::VERSION = T.let(T.unsafe(nil), String) -# source://mocha//lib/mocha/yield_parameters.rb#2 +# pkg:gem/mocha#lib/mocha/yield_parameters.rb:2 class Mocha::YieldParameters - # @return [YieldParameters] a new instance of YieldParameters - # - # source://mocha//lib/mocha/yield_parameters.rb#3 + # pkg:gem/mocha#lib/mocha/yield_parameters.rb:3 def initialize; end - # source://mocha//lib/mocha/yield_parameters.rb#15 + # pkg:gem/mocha#lib/mocha/yield_parameters.rb:15 def add(*parameter_groups); end - # source://mocha//lib/mocha/yield_parameters.rb#7 + # pkg:gem/mocha#lib/mocha/yield_parameters.rb:7 def next_invocation; end end -# @private -# -# source://mocha//lib/mocha/parameter_matchers/instance_methods.rb#24 +# pkg:gem/mocha#lib/mocha/parameter_matchers/instance_methods.rb:24 class Object < ::BasicObject include ::Kernel include ::PP::ObjectMixin @@ -3954,7 +3831,7 @@ class Object < ::BasicObject include ::Mocha::ObjectMethods end -# source://mocha//lib/mocha/inspect.rb#64 +# pkg:gem/mocha#lib/mocha/inspect.rb:64 class Time include ::Comparable include ::Mocha::Inspect::TimeMethods diff --git a/sorbet/rbi/gems/mutex_m@0.3.0.rbi b/sorbet/rbi/gems/mutex_m@0.3.0.rbi new file mode 100644 index 000000000..f0d01fb1f --- /dev/null +++ b/sorbet/rbi/gems/mutex_m@0.3.0.rbi @@ -0,0 +1,95 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `mutex_m` gem. +# Please instead update this file by running `bin/tapioca gem mutex_m`. + + +# = mutex_m.rb +# +# When 'mutex_m' is required, any object that extends or includes Mutex_m will +# be treated like a Mutex. +# +# Start by requiring the standard library Mutex_m: +# +# require "mutex_m" +# +# From here you can extend an object with Mutex instance methods: +# +# obj = Object.new +# obj.extend Mutex_m +# +# Or mixin Mutex_m into your module to your class inherit Mutex instance +# methods --- remember to call super() in your class initialize method. +# +# class Foo +# include Mutex_m +# def initialize +# # ... +# super() +# end +# # ... +# end +# obj = Foo.new +# # this obj can be handled like Mutex +# +# pkg:gem/mutex_m#lib/mutex_m.rb:41 +module Mutex_m + # pkg:gem/mutex_m#lib/mutex_m.rb:116 + def initialize(*args, **_arg1); end + + # pkg:gem/mutex_m#lib/mutex_m.rb:69 + def mu_extended; end + + # See Thread::Mutex#lock + # + # pkg:gem/mutex_m#lib/mutex_m.rb:96 + def mu_lock; end + + # See Thread::Mutex#locked? + # + # pkg:gem/mutex_m#lib/mutex_m.rb:86 + def mu_locked?; end + + # See Thread::Mutex#synchronize + # + # pkg:gem/mutex_m#lib/mutex_m.rb:81 + def mu_synchronize(&block); end + + # See Thread::Mutex#try_lock + # + # pkg:gem/mutex_m#lib/mutex_m.rb:91 + def mu_try_lock; end + + # See Thread::Mutex#unlock + # + # pkg:gem/mutex_m#lib/mutex_m.rb:101 + def mu_unlock; end + + # See Thread::Mutex#sleep + # + # pkg:gem/mutex_m#lib/mutex_m.rb:106 + def sleep(timeout = T.unsafe(nil)); end + + private + + # pkg:gem/mutex_m#lib/mutex_m.rb:112 + def mu_initialize; end + + class << self + # pkg:gem/mutex_m#lib/mutex_m.rb:59 + def append_features(cl); end + + # pkg:gem/mutex_m#lib/mutex_m.rb:46 + def define_aliases(cl); end + + # pkg:gem/mutex_m#lib/mutex_m.rb:64 + def extend_object(obj); end + + # pkg:gem/mutex_m#lib/mutex_m.rb:54 + def prepend_features(cl); end + end +end + +# pkg:gem/mutex_m#lib/mutex_m.rb:43 +Mutex_m::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/netrc@0.11.0.rbi b/sorbet/rbi/gems/netrc@0.11.0.rbi index 062a5577c..b1ad683f6 100644 --- a/sorbet/rbi/gems/netrc@0.11.0.rbi +++ b/sorbet/rbi/gems/netrc@0.11.0.rbi @@ -4,71 +4,62 @@ # This is an autogenerated file for types exported from the `netrc` gem. # Please instead update this file by running `bin/tapioca gem netrc`. -# source://netrc//lib/netrc.rb#3 + +# pkg:gem/netrc#lib/netrc.rb:3 class Netrc - # @return [Netrc] a new instance of Netrc - # - # source://netrc//lib/netrc.rb#166 + # pkg:gem/netrc#lib/netrc.rb:166 def initialize(path, data); end - # source://netrc//lib/netrc.rb#180 + # pkg:gem/netrc#lib/netrc.rb:180 def [](k); end - # source://netrc//lib/netrc.rb#188 + # pkg:gem/netrc#lib/netrc.rb:188 def []=(k, info); end - # source://netrc//lib/netrc.rb#200 + # pkg:gem/netrc#lib/netrc.rb:200 def delete(key); end - # source://netrc//lib/netrc.rb#211 + # pkg:gem/netrc#lib/netrc.rb:211 def each(&block); end - # source://netrc//lib/netrc.rb#196 + # pkg:gem/netrc#lib/netrc.rb:196 def length; end - # source://netrc//lib/netrc.rb#215 + # pkg:gem/netrc#lib/netrc.rb:215 def new_item(m, l, p); end - # Returns the value of attribute new_item_prefix. - # - # source://netrc//lib/netrc.rb#178 + # pkg:gem/netrc#lib/netrc.rb:178 def new_item_prefix; end - # Sets the attribute new_item_prefix - # - # @param value the value to set the attribute new_item_prefix to. - # - # source://netrc//lib/netrc.rb#178 + # pkg:gem/netrc#lib/netrc.rb:178 def new_item_prefix=(_arg0); end - # source://netrc//lib/netrc.rb#219 + # pkg:gem/netrc#lib/netrc.rb:219 def save; end - # source://netrc//lib/netrc.rb#233 + # pkg:gem/netrc#lib/netrc.rb:233 def unparse; end class << self - # source://netrc//lib/netrc.rb#42 + # pkg:gem/netrc#lib/netrc.rb:42 def check_permissions(path); end - # source://netrc//lib/netrc.rb#33 + # pkg:gem/netrc#lib/netrc.rb:33 def config; end - # @yield [self.config] - # - # source://netrc//lib/netrc.rb#37 + # pkg:gem/netrc#lib/netrc.rb:37 def configure; end - # source://netrc//lib/netrc.rb#10 + # pkg:gem/netrc#lib/netrc.rb:10 def default_path; end - # source://netrc//lib/netrc.rb#14 + # pkg:gem/netrc#lib/netrc.rb:14 def home_path; end - # source://netrc//lib/netrc.rb#85 + # pkg:gem/netrc#lib/netrc.rb:85 def lex(lines); end - # source://netrc//lib/netrc.rb#29 + # pkg:gem/netrc#lib/netrc.rb:29 def netrc_filename; end # Returns two values, a header and a list of items. @@ -83,76 +74,74 @@ class Netrc # This lets us change individual fields, then write out the file # with all its original formatting. # - # source://netrc//lib/netrc.rb#129 + # pkg:gem/netrc#lib/netrc.rb:129 def parse(ts); end # Reads path and parses it as a .netrc file. If path doesn't # exist, returns an empty object. Decrypt paths ending in .gpg. # - # source://netrc//lib/netrc.rb#51 + # pkg:gem/netrc#lib/netrc.rb:51 def read(path = T.unsafe(nil)); end - # @return [Boolean] - # - # source://netrc//lib/netrc.rb#112 + # pkg:gem/netrc#lib/netrc.rb:112 def skip?(s); end end end -# source://netrc//lib/netrc.rb#8 +# pkg:gem/netrc#lib/netrc.rb:8 Netrc::CYGWIN = T.let(T.unsafe(nil), T.untyped) -# source://netrc//lib/netrc.rb#244 +# pkg:gem/netrc#lib/netrc.rb:244 class Netrc::Entry < ::Struct - # Returns the value of attribute login - # - # @return [Object] the current value of login + # pkg:gem/netrc#lib/netrc.rb:244 def login; end - # Sets the attribute login - # - # @param value [Object] the value to set the attribute login to. - # @return [Object] the newly set value + # pkg:gem/netrc#lib/netrc.rb:244 def login=(_); end - # Returns the value of attribute password - # - # @return [Object] the current value of password + # pkg:gem/netrc#lib/netrc.rb:244 def password; end - # Sets the attribute password - # - # @param value [Object] the value to set the attribute password to. - # @return [Object] the newly set value + # pkg:gem/netrc#lib/netrc.rb:244 def password=(_); end + # pkg:gem/netrc#lib/netrc.rb:245 def to_ary; end class << self + # pkg:gem/netrc#lib/netrc.rb:244 def [](*_arg0); end + + # pkg:gem/netrc#lib/netrc.rb:244 def inspect; end + + # pkg:gem/netrc#lib/netrc.rb:244 def keyword_init?; end + + # pkg:gem/netrc#lib/netrc.rb:244 def members; end + + # pkg:gem/netrc#lib/netrc.rb:244 def new(*_arg0); end end end -# source://netrc//lib/netrc.rb#250 +# pkg:gem/netrc#lib/netrc.rb:250 class Netrc::Error < ::StandardError; end -# source://netrc//lib/netrc.rb#68 +# pkg:gem/netrc#lib/netrc.rb:68 class Netrc::TokenArray < ::Array - # source://netrc//lib/netrc.rb#76 + # pkg:gem/netrc#lib/netrc.rb:76 def readto; end - # source://netrc//lib/netrc.rb#69 + # pkg:gem/netrc#lib/netrc.rb:69 def take; end end -# source://netrc//lib/netrc.rb#4 +# pkg:gem/netrc#lib/netrc.rb:4 Netrc::VERSION = T.let(T.unsafe(nil), String) # see http://stackoverflow.com/questions/4871309/what-is-the-correct-way-to-detect-if-ruby-is-running-on-windows # -# source://netrc//lib/netrc.rb#7 +# pkg:gem/netrc#lib/netrc.rb:7 Netrc::WINDOWS = T.let(T.unsafe(nil), T.untyped) diff --git a/sorbet/rbi/gems/nokogiri@1.18.4.rbi b/sorbet/rbi/gems/nokogiri@1.19.3.rbi similarity index 74% rename from sorbet/rbi/gems/nokogiri@1.18.4.rbi rename to sorbet/rbi/gems/nokogiri@1.19.3.rbi index c453478ec..df55c2ad2 100644 --- a/sorbet/rbi/gems/nokogiri@1.18.4.rbi +++ b/sorbet/rbi/gems/nokogiri@1.19.3.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `nokogiri` gem. # Please instead update this file by running `bin/tapioca gem nokogiri`. + # Nokogiri parses and searches XML/HTML very quickly, and also has # correctly implemented CSS3 selector support as well as XPath 1.0 # support. @@ -32,21 +33,37 @@ # # - Nokogiri::XML::Searchable#css for more information about CSS searching # - Nokogiri::XML::Searchable#xpath for more information about XPath searching -# -# source://nokogiri//lib/nokogiri.rb#38 +# coding: utf-8 +# coding: utf-8 +# -- +# DO NOT MODIFY!!!! +# This file is automatically generated by rex 1.0.8 +# from lexical definition file "lib/nokogiri/css/tokenizer.rex". +# ++ +# coding: utf-8 +# coding: utf-8 +# coding: utf-8 +# coding: utf-8 +# coding: utf-8 +# coding: utf-8 +# coding: utf-8 +# coding: utf-8 +# coding: utf-8 +# +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 module Nokogiri class << self - # source://nokogiri//lib/nokogiri/html4.rb#7 + # pkg:gem/nokogiri#lib/nokogiri/html.rb:16 def HTML(*_arg0, **_arg1, &_arg2); end # Convenience method for Nokogiri::HTML4::Document.parse # - # source://nokogiri//lib/nokogiri/html4.rb#7 + # pkg:gem/nokogiri#lib/nokogiri/html4.rb:7 def HTML4(*_arg0, **_arg1, &_arg2); end # Convenience method for Nokogiri::HTML5::Document.parse # - # source://nokogiri//lib/nokogiri/html5.rb#28 + # pkg:gem/nokogiri#lib/nokogiri/html5.rb:28 def HTML5(*_arg0, **_arg1, &_arg2); end # Parse a document and add the Slop decorator. The Slop decorator @@ -63,61 +80,55 @@ module Nokogiri # eohtml # assert_equal('second', doc.html.body.p[1].text) # - # source://nokogiri//lib/nokogiri.rb#91 + # pkg:gem/nokogiri#lib/nokogiri.rb:91 def Slop(*args, &block); end # Convenience method for Nokogiri::XML::Document.parse # - # source://nokogiri//lib/nokogiri/xml.rb#6 + # pkg:gem/nokogiri#lib/nokogiri/xml.rb:6 def XML(*_arg0, **_arg1, &_arg2); end # Convenience method for Nokogiri::XSLT.parse # - # source://nokogiri//lib/nokogiri/xslt.rb#7 + # pkg:gem/nokogiri#lib/nokogiri/xslt.rb:7 def XSLT(*_arg0, **_arg1, &_arg2); end - # source://nokogiri//lib/nokogiri.rb#96 + # pkg:gem/nokogiri#lib/nokogiri.rb:96 def install_default_aliases; end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/version/info.rb#206 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:206 def jruby?; end - # source://nokogiri//lib/nokogiri/version/info.rb#211 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:211 def libxml2_patches; end # Create a new Nokogiri::XML::DocumentFragment # - # source://nokogiri//lib/nokogiri.rb#68 + # pkg:gem/nokogiri#lib/nokogiri.rb:68 def make(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end # Parse an HTML or XML document. +string+ contains the document. # - # source://nokogiri//lib/nokogiri.rb#42 + # pkg:gem/nokogiri#lib/nokogiri.rb:42 def parse(string, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/version/info.rb#201 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:201 def uses_gumbo?; end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/version/info.rb#193 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:193 def uses_libxml?(requirement = T.unsafe(nil)); end end end # Translate a CSS selector into an XPath 1.0 query # -# source://nokogiri//lib/nokogiri/css.rb#6 +# pkg:gem/nokogiri#lib/nokogiri/css.rb:6 module Nokogiri::CSS class << self # TODO: Deprecate this method ahead of 2.0 and delete it in 2.0. # It is not used by Nokogiri and shouldn't be part of the public API. # - # source://nokogiri//lib/nokogiri/css.rb#10 + # pkg:gem/nokogiri#lib/nokogiri/css.rb:10 def parse(selector); end # :call-seq: @@ -188,403 +199,385 @@ module Nokogiri::CSS # # Nokogiri::CSS.xpath_for("h1, h2, h3") # => ["//h1", "//h2", "//h3"] # - # @raise [TypeError] - # - # source://nokogiri//lib/nokogiri/css.rb#83 + # pkg:gem/nokogiri#lib/nokogiri/css.rb:83 def xpath_for(selector, options = T.unsafe(nil), prefix: T.unsafe(nil), visitor: T.unsafe(nil), ns: T.unsafe(nil), cache: T.unsafe(nil)); end end end -# source://nokogiri//lib/nokogiri/css/node.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/css/node.rb:5 class Nokogiri::CSS::Node # Create a new Node with +type+ and +value+ # - # @return [Node] a new instance of Node - # - # source://nokogiri//lib/nokogiri/css/node.rb#14 + # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:14 def initialize(type, value); end # Accept +visitor+ # - # source://nokogiri//lib/nokogiri/css/node.rb#20 + # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:20 def accept(visitor); end # Find a node by type using +types+ # - # source://nokogiri//lib/nokogiri/css/node.rb#36 + # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:36 def find_by_type(types); end # Convert to array # - # source://nokogiri//lib/nokogiri/css/node.rb#53 + # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:53 def to_a; end # Convert to_type # - # source://nokogiri//lib/nokogiri/css/node.rb#46 + # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:46 def to_type; end # Convert this CSS node to xpath with +prefix+ using +visitor+ # - # source://nokogiri//lib/nokogiri/css/node.rb#26 + # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:26 def to_xpath(visitor); end # Get the type of this node # - # source://nokogiri//lib/nokogiri/css/node.rb#9 + # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:9 def type; end # Get the type of this node # - # source://nokogiri//lib/nokogiri/css/node.rb#9 + # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:9 def type=(_arg0); end # Get the value of this node # - # source://nokogiri//lib/nokogiri/css/node.rb#11 + # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:11 def value; end # Get the value of this node # - # source://nokogiri//lib/nokogiri/css/node.rb#11 + # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:11 def value=(_arg0); end end -# source://nokogiri//lib/nokogiri/css/node.rb#6 +# pkg:gem/nokogiri#lib/nokogiri/css/node.rb:6 Nokogiri::CSS::Node::ALLOW_COMBINATOR_ON_SELF = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/css/parser_extras.rb#7 +# pkg:gem/nokogiri#lib/nokogiri/css/parser_extras.rb:7 class Nokogiri::CSS::Parser < ::Racc::Parser - # @return [Parser] a new instance of Parser - # - # source://nokogiri//lib/nokogiri/css/parser_extras.rb#8 + # pkg:gem/nokogiri#lib/nokogiri/css/parser_extras.rb:8 def initialize; end # reduce 0 omitted # - # source://nokogiri//lib/nokogiri/css/parser.rb#363 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:363 def _reduce_1(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#409 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:409 def _reduce_10(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#414 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:414 def _reduce_11(val, _values, result); end # reduce 12 omitted # - # source://nokogiri//lib/nokogiri/css/parser.rb#426 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:426 def _reduce_13(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#431 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:431 def _reduce_14(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#436 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:436 def _reduce_15(val, _values, result); end # reduce 16 omitted # - # source://nokogiri//lib/nokogiri/css/parser.rb#443 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:443 def _reduce_17(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#448 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:448 def _reduce_18(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#453 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:453 def _reduce_19(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#369 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:369 def _reduce_2(val, _values, result); end # reduce 20 omitted # - # source://nokogiri//lib/nokogiri/css/parser.rb#460 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:460 def _reduce_21(val, _values, result); end # reduce 22 omitted # - # source://nokogiri//lib/nokogiri/css/parser.rb#467 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:467 def _reduce_23(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#472 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:472 def _reduce_24(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#477 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:477 def _reduce_25(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#484 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:484 def _reduce_26(val, _values, result); end # reduce 27 omitted # - # source://nokogiri//lib/nokogiri/css/parser.rb#491 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:491 def _reduce_28(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#497 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:497 def _reduce_29(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#374 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:374 def _reduce_3(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#503 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:503 def _reduce_30(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#509 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:509 def _reduce_31(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#514 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:514 def _reduce_32(val, _values, result); end # reduce 33 omitted # - # source://nokogiri//lib/nokogiri/css/parser.rb#521 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:521 def _reduce_34(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#527 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:527 def _reduce_35(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#533 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:533 def _reduce_36(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#539 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:539 def _reduce_37(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#545 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:545 def _reduce_38(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#551 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:551 def _reduce_39(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#379 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:379 def _reduce_4(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#556 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:556 def _reduce_40(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#561 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:561 def _reduce_41(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#566 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:566 def _reduce_42(val, _values, result); end # reduce 44 omitted # - # source://nokogiri//lib/nokogiri/css/parser.rb#575 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:575 def _reduce_45(val, _values, result); end # reduce 46 omitted # - # source://nokogiri//lib/nokogiri/css/parser.rb#592 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:592 def _reduce_47(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#602 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:602 def _reduce_48(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#618 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:618 def _reduce_49(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#384 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:384 def _reduce_5(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#638 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:638 def _reduce_50(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#644 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:644 def _reduce_51(val, _values, result); end # reduce 53 omitted # - # source://nokogiri//lib/nokogiri/css/parser.rb#653 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:653 def _reduce_54(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#659 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:659 def _reduce_55(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#665 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:665 def _reduce_56(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#671 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:671 def _reduce_57(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#677 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:677 def _reduce_58(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#389 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:389 def _reduce_6(val, _values, result); end # reduce 63 omitted # - # source://nokogiri//lib/nokogiri/css/parser.rb#693 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:693 def _reduce_64(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#698 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:698 def _reduce_65(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#703 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:703 def _reduce_66(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#708 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:708 def _reduce_67(val, _values, result); end # reduce 68 omitted # - # source://nokogiri//lib/nokogiri/css/parser.rb#715 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:715 def _reduce_69(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#394 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:394 def _reduce_7(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#720 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:720 def _reduce_70(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#725 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:725 def _reduce_71(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#730 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:730 def _reduce_72(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#735 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:735 def _reduce_73(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#740 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:740 def _reduce_74(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#745 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:745 def _reduce_75(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#750 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:750 def _reduce_76(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#399 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:399 def _reduce_8(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser.rb#404 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:404 def _reduce_9(val, _values, result); end # reduce 81 omitted # - # source://nokogiri//lib/nokogiri/css/parser.rb#766 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:766 def _reduce_none(val, _values, result); end - # source://nokogiri//lib/nokogiri/css/parser_extras.rb#18 + # pkg:gem/nokogiri#lib/nokogiri/css/parser_extras.rb:18 def next_token; end # On CSS parser error, raise an exception # - # @raise [SyntaxError] - # - # source://nokogiri//lib/nokogiri/css/parser_extras.rb#30 + # pkg:gem/nokogiri#lib/nokogiri/css/parser_extras.rb:30 def on_error(error_token_id, error_value, value_stack); end - # source://nokogiri//lib/nokogiri/css/parser_extras.rb#13 + # pkg:gem/nokogiri#lib/nokogiri/css/parser_extras.rb:13 def parse(string); end - # source://nokogiri//lib/nokogiri/css/parser.rb#26 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:26 def unescape_css_identifier(identifier); end - # source://nokogiri//lib/nokogiri/css/parser.rb#30 + # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:30 def unescape_css_string(str); end # Get the xpath for +selector+ using +visitor+ # - # source://nokogiri//lib/nokogiri/css/parser_extras.rb#23 + # pkg:gem/nokogiri#lib/nokogiri/css/parser_extras.rb:23 def xpath_for(selector, visitor); end end -# source://nokogiri//lib/nokogiri/css/parser.rb#279 +# pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:279 Nokogiri::CSS::Parser::Racc_arg = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/css/parser.rb#357 +# pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:357 Nokogiri::CSS::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) -# source://nokogiri//lib/nokogiri/css/parser.rb#296 +# pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:296 Nokogiri::CSS::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/css/selector_cache.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/css/selector_cache.rb:5 module Nokogiri::CSS::SelectorCache class << self # Retrieve the cached XPath expressions for the key # - # source://nokogiri//lib/nokogiri/css/selector_cache.rb#11 + # pkg:gem/nokogiri#lib/nokogiri/css/selector_cache.rb:11 def [](key); end # Insert the XPath expressions `value` at the cache key # - # source://nokogiri//lib/nokogiri/css/selector_cache.rb#16 + # pkg:gem/nokogiri#lib/nokogiri/css/selector_cache.rb:16 def []=(key, value); end # Clear the cache # - # source://nokogiri//lib/nokogiri/css/selector_cache.rb#21 + # pkg:gem/nokogiri#lib/nokogiri/css/selector_cache.rb:21 def clear_cache(create_new_object = T.unsafe(nil)); end # Construct a unique key cache key # - # source://nokogiri//lib/nokogiri/css/selector_cache.rb#32 + # pkg:gem/nokogiri#lib/nokogiri/css/selector_cache.rb:32 def key(selector:, visitor:); end end end -# source://nokogiri//lib/nokogiri/css/syntax_error.rb#6 +# pkg:gem/nokogiri#lib/nokogiri/css/syntax_error.rb:6 class Nokogiri::CSS::SyntaxError < ::Nokogiri::SyntaxError; end -# source://nokogiri//lib/nokogiri/css/tokenizer.rb#11 +# pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:11 class Nokogiri::CSS::Tokenizer - # source://nokogiri//lib/nokogiri/css/tokenizer.rb#57 + # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:57 def _next_token; end - # source://nokogiri//lib/nokogiri/css/tokenizer.rb#26 + # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:26 def action; end - # Returns the value of attribute filename. - # - # source://nokogiri//lib/nokogiri/css/tokenizer.rb#17 + # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:17 def filename; end - # Returns the value of attribute lineno. - # - # source://nokogiri//lib/nokogiri/css/tokenizer.rb#16 + # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:16 def lineno; end - # source://nokogiri//lib/nokogiri/css/tokenizer.rb#36 + # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:36 def load_file(filename); end - # source://nokogiri//lib/nokogiri/css/tokenizer.rb#49 + # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:49 def next_token; end - # source://nokogiri//lib/nokogiri/css/tokenizer.rb#30 + # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:34 def scan(str); end - # source://nokogiri//lib/nokogiri/css/tokenizer.rb#43 + # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:43 def scan_file(filename); end - # source://nokogiri//lib/nokogiri/css/tokenizer.rb#20 + # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:20 def scan_setup(str); end - # source://nokogiri//lib/nokogiri/css/tokenizer.rb#30 + # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:30 def scan_str(str); end - # Returns the value of attribute state. - # - # source://nokogiri//lib/nokogiri/css/tokenizer.rb#18 + # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:18 def state; end - # Sets the attribute state - # - # @param value the value to set the attribute state to. - # - # source://nokogiri//lib/nokogiri/css/tokenizer.rb#18 + # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:18 def state=(_arg0); end end -# source://nokogiri//lib/nokogiri/css/tokenizer.rb#14 +# pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:14 class Nokogiri::CSS::Tokenizer::ScanError < ::StandardError; end # When translating CSS selectors to XPath queries with Nokogiri::CSS.xpath_for, the XPathVisitor # class allows for changing some of the behaviors related to builtin xpath functions and quirks # of HTML5. # -# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#9 +# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:9 class Nokogiri::CSS::XPathVisitor # :call-seq: # new() → XPathVisitor @@ -596,17 +589,15 @@ class Nokogiri::CSS::XPathVisitor # # [Returns] XPathVisitor # - # @return [XPathVisitor] a new instance of XPathVisitor - # - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#69 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:69 def initialize(builtins: T.unsafe(nil), doctype: T.unsafe(nil), prefix: T.unsafe(nil), namespaces: T.unsafe(nil)); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#298 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:298 def accept(node); end # The visitor configuration set via the +builtins:+ keyword argument to XPathVisitor.new. # - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#48 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:48 def builtins; end # :call-seq: config() → Hash @@ -615,143 +606,141 @@ class Nokogiri::CSS::XPathVisitor # a Hash representing the configuration of the XPathVisitor, suitable for use as # part of the CSS cache key. # - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#93 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:93 def config; end # The visitor configuration set via the +doctype:+ keyword argument to XPathVisitor.new. # - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#51 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:51 def doctype; end # The visitor configuration set via the +namespaces:+ keyword argument to XPathVisitor.new. # - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#57 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:57 def namespaces; end # The visitor configuration set via the +prefix:+ keyword argument to XPathVisitor.new. # - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#54 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:54 def prefix; end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#294 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:294 def visit_attrib_name(node); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#175 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:175 def visit_attribute_condition(node); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#256 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:255 def visit_child_selector(node); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#237 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:237 def visit_class_condition(node); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#241 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:241 def visit_combinator(node); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#262 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:262 def visit_conditional_selector(node); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#256 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:255 def visit_descendant_selector(node); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#256 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:255 def visit_direct_adjacent_selector(node); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#267 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:267 def visit_element_name(node); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#256 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:255 def visit_following_selector(node); end # :stopdoc: # - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#98 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:98 def visit_function(node); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#170 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:170 def visit_id(node); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#161 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:161 def visit_not(node); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#211 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:211 def visit_pseudo_class(node); end private - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#365 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:365 def css_class(hay, needle); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#310 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:310 def html5_element_name_needs_namespace_handling(node); end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#355 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:355 def is_of_type_pseudo_class?(node); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#317 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:317 def nth(node, options = T.unsafe(nil)); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#341 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:341 def read_a_and_positive_b(values); end - # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#304 + # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:304 def validate_xpath_function_name(name); end end # Enum to direct XPathVisitor when to use Nokogiri builtin XPath functions. # -# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#13 +# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:13 module Nokogiri::CSS::XPathVisitor::BuiltinsConfig; end # Always use Nokogiri builtin functions whenever possible. This is probably only useful for testing. # -# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#19 +# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:19 Nokogiri::CSS::XPathVisitor::BuiltinsConfig::ALWAYS = T.let(T.unsafe(nil), Symbol) # Never use Nokogiri builtin functions, always generate vanilla XPath 1.0 queries. This is # the default when calling Nokogiri::CSS.xpath_for directly. # -# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#16 +# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:16 Nokogiri::CSS::XPathVisitor::BuiltinsConfig::NEVER = T.let(T.unsafe(nil), Symbol) # Only use Nokogiri builtin functions when they will be faster than vanilla XPath. This is # the behavior chosen when searching for CSS selectors on a Nokogiri document, fragment, or # node. # -# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#24 +# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:24 Nokogiri::CSS::XPathVisitor::BuiltinsConfig::OPTIMAL = T.let(T.unsafe(nil), Symbol) -# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#27 +# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:27 Nokogiri::CSS::XPathVisitor::BuiltinsConfig::VALUES = T.let(T.unsafe(nil), Array) # Enum to direct XPathVisitor when to tweak the XPath query to suit the nature of the document # being searched. Note that searches for CSS selectors from a Nokogiri document, fragment, or # node will choose the correct option automatically. # -# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#33 +# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:33 module Nokogiri::CSS::XPathVisitor::DoctypeConfig; end # The document being searched is an HTML4 document. # -# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#38 +# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:38 Nokogiri::CSS::XPathVisitor::DoctypeConfig::HTML4 = T.let(T.unsafe(nil), Symbol) # The document being searched is an HTML5 document. # -# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#41 +# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:41 Nokogiri::CSS::XPathVisitor::DoctypeConfig::HTML5 = T.let(T.unsafe(nil), Symbol) -# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#44 +# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:44 Nokogiri::CSS::XPathVisitor::DoctypeConfig::VALUES = T.let(T.unsafe(nil), Array) # The document being searched is an XML document. This is the default. # -# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#35 +# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:35 Nokogiri::CSS::XPathVisitor::DoctypeConfig::XML = T.let(T.unsafe(nil), Symbol) -# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#10 +# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:10 Nokogiri::CSS::XPathVisitor::WILDCARD_NAMESPACES = T.let(T.unsafe(nil), TrueClass) # Some classes in Nokogiri are namespaced as a group, for example @@ -765,7 +754,7 @@ Nokogiri::CSS::XPathVisitor::WILDCARD_NAMESPACES = T.let(T.unsafe(nil), TrueClas # # This module is included into those key classes who need to do this. # -# source://nokogiri//lib/nokogiri/class_resolver.rb#19 +# pkg:gem/nokogiri#lib/nokogiri/class_resolver.rb:17 module Nokogiri::ClassResolver # :call-seq: # related_class(class_name) → Class @@ -790,91 +779,100 @@ module Nokogiri::ClassResolver # ThisIsATopLevelClass.new.related_class("Document") # # => Nokogiri::HTML4::Document # - # source://nokogiri//lib/nokogiri/class_resolver.rb#46 + # pkg:gem/nokogiri#lib/nokogiri/class_resolver.rb:44 def related_class(class_name); end end # #related_class restricts matching namespaces to those matching this set. # -# source://nokogiri//lib/nokogiri/class_resolver.rb#21 +# pkg:gem/nokogiri#lib/nokogiri/class_resolver.rb:19 Nokogiri::ClassResolver::VALID_NAMESPACES = T.let(T.unsafe(nil), Set) -# source://nokogiri//lib/nokogiri/decorators/slop.rb#4 +# pkg:gem/nokogiri#lib/nokogiri/decorators/slop.rb:4 module Nokogiri::Decorators; end # The Slop decorator implements method missing such that a methods may be # used instead of XPath or CSS. See Nokogiri.Slop # -# source://nokogiri//lib/nokogiri/decorators/slop.rb#8 +# pkg:gem/nokogiri#lib/nokogiri/decorators/slop.rb:8 module Nokogiri::Decorators::Slop # look for node with +name+. See Nokogiri.Slop # - # source://nokogiri//lib/nokogiri/decorators/slop.rb#14 + # pkg:gem/nokogiri#lib/nokogiri/decorators/slop.rb:14 def method_missing(name, *args, &block); end private - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/decorators/slop.rb#35 + # pkg:gem/nokogiri#lib/nokogiri/decorators/slop.rb:35 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end # The default XPath search context for Slop # -# source://nokogiri//lib/nokogiri/decorators/slop.rb#10 +# pkg:gem/nokogiri#lib/nokogiri/decorators/slop.rb:10 Nokogiri::Decorators::Slop::XPATH_PREFIX = T.let(T.unsafe(nil), String) -# source://nokogiri//lib/nokogiri/encoding_handler.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::EncodingHandler - # Returns the value of attribute name. + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def name; end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def [](_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def alias(_arg0, _arg1); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def clear_aliases!; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def delete(_arg0); end - # source://nokogiri//lib/nokogiri/encoding_handler.rb#15 + # pkg:gem/nokogiri#lib/nokogiri/encoding_handler.rb:15 def install_default_aliases; end end end # Popular encoding aliases not known by all iconv implementations that Nokogiri should support. # -# source://nokogiri//lib/nokogiri/encoding_handler.rb#7 +# pkg:gem/nokogiri#lib/nokogiri/encoding_handler.rb:7 Nokogiri::EncodingHandler::USEFUL_ALIASES = T.let(T.unsafe(nil), Hash) -# source://nokogiri//lib/nokogiri/gumbo.rb#4 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 module Nokogiri::Gumbo class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def fragment(*_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def parse(*_arg0); end end end # The default maximum number of attributes per element. # -# source://nokogiri//lib/nokogiri/gumbo.rb#6 +# pkg:gem/nokogiri#lib/nokogiri/gumbo.rb:6 Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES = T.let(T.unsafe(nil), Integer) # The default maximum number of errors for parsing a document or a fragment. # -# source://nokogiri//lib/nokogiri/gumbo.rb#9 +# pkg:gem/nokogiri#lib/nokogiri/gumbo.rb:9 Nokogiri::Gumbo::DEFAULT_MAX_ERRORS = T.let(T.unsafe(nil), Integer) # The default maximum depth of the DOM tree produced by parsing a document # or fragment. # -# source://nokogiri//lib/nokogiri/gumbo.rb#13 +# pkg:gem/nokogiri#lib/nokogiri/gumbo.rb:13 Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH = T.let(T.unsafe(nil), Integer) +# Alias for Nokogiri::HTML4 # 💡 This module/namespace is an alias for Nokogiri::HTML4 as of v1.12.0. Before v1.12.0, # Nokogiri::HTML4 did not exist, and this was the module/namespace for all HTML-related # classes. # -# source://nokogiri//lib/nokogiri/html.rb#8 +# pkg:gem/nokogiri#lib/nokogiri/html.rb:8 Nokogiri::HTML = Nokogiri::HTML4 # Since v1.12.0 @@ -882,17 +880,17 @@ Nokogiri::HTML = Nokogiri::HTML4 # 💡 Before v1.12.0, Nokogiri::HTML4 did not exist, and Nokogiri::HTML was the module/namespace # for parsing HTML. # -# source://nokogiri//lib/nokogiri/html4.rb#16 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 module Nokogiri::HTML4 class << self # Convenience method for Nokogiri::HTML4::DocumentFragment.parse # - # source://nokogiri//lib/nokogiri/html4.rb#24 + # pkg:gem/nokogiri#lib/nokogiri/html4.rb:24 def fragment(*_arg0, **_arg1, &_arg2); end # Convenience method for Nokogiri::HTML4::Document.parse # - # source://nokogiri//lib/nokogiri/html4.rb#19 + # pkg:gem/nokogiri#lib/nokogiri/html4.rb:19 def parse(*_arg0, **_arg1, &_arg2); end end end @@ -920,26 +918,29 @@ end # # The HTML builder inherits from the XML builder, so make sure to read the # Nokogiri::XML::Builder documentation. +# 💡 This class is an alias for Nokogiri::HTML4::Builder as of v1.12.0. # -# source://nokogiri//lib/nokogiri/html.rb#31 +# pkg:gem/nokogiri#lib/nokogiri/html.rb:31 class Nokogiri::HTML4::Builder < ::Nokogiri::XML::Builder # Convert the builder to HTML # - # source://nokogiri//lib/nokogiri/html4/builder.rb#32 + # pkg:gem/nokogiri#lib/nokogiri/html4/builder.rb:32 def to_html; end end -# source://nokogiri//lib/nokogiri/html4/document.rb#8 +# 💡 This class is an alias for Nokogiri::HTML4::Document as of v1.12.0. +# +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document # Create a Nokogiri::XML::DocumentFragment from +tags+ # - # source://nokogiri//lib/nokogiri/html4/document.rb#149 + # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:149 def fragment(tags = T.unsafe(nil)); end # Get the meta tag encoding for this document. If there is no meta tag, # then nil is returned. # - # source://nokogiri//lib/nokogiri/html4/document.rb#12 + # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:12 def meta_encoding; end # Set the meta tag encoding for this document. @@ -958,7 +959,7 @@ class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document # Beware in CRuby, that libxml2 automatically inserts a meta tag # into a head element. # - # source://nokogiri//lib/nokogiri/html4/document.rb#36 + # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:36 def meta_encoding=(encoding); end # Serialize Node using +options+. Save options can also be set using a block. @@ -975,13 +976,13 @@ class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document # config.format.as_xml # end # - # source://nokogiri//lib/nokogiri/html4/document.rb#142 + # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:142 def serialize(options = T.unsafe(nil)); end # Get the title string of this document. Return nil if there is # no title tag. # - # source://nokogiri//lib/nokogiri/html4/document.rb#70 + # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:70 def title; end # Set the title string of this document. @@ -995,9 +996,10 @@ class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document # encoding/charset tag if any, and before any text node or # content element (typically ) if any. # - # source://nokogiri//lib/nokogiri/html4/document.rb#85 + # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:85 def title=(text); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def type; end # :call-seq: @@ -1007,18 +1009,19 @@ class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document # # See XPathVisitor for more information. # - # source://nokogiri//lib/nokogiri/html4/document.rb#159 + # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:159 def xpath_doctype; end private - # source://nokogiri//lib/nokogiri/html4/document.rb#60 + # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:60 def meta_content_type; end - # source://nokogiri//lib/nokogiri/html4/document.rb#103 + # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:103 def set_metadata_element(element); end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def new(*_arg0); end # :call-seq: @@ -1045,17 +1048,20 @@ class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document # # [Returns] Nokogiri::HTML4::Document # - # @yield [options] - # - # source://nokogiri//lib/nokogiri/html4/document.rb#189 + # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:189 def parse(input, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), options_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), options: T.unsafe(nil)); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def read_io(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def read_memory(_arg0, _arg1, _arg2, _arg3); end end end -# source://nokogiri//lib/nokogiri/html4/document_fragment.rb#5 +# 💡 This class is an alias for Nokogiri::HTML4::DocumentFragment as of v1.12.0. +# +# pkg:gem/nokogiri#lib/nokogiri/html4/document_fragment.rb:5 class Nokogiri::HTML4::DocumentFragment < ::Nokogiri::XML::DocumentFragment # :call-seq: # new(document) { |options| ... } → HTML4::DocumentFragment @@ -1093,10 +1099,7 @@ class Nokogiri::HTML4::DocumentFragment < ::Nokogiri::XML::DocumentFragment # calling XML::Node#parse on that node, so the parser will behave as if that Node is the # parent of the fragment subtree. # - # @return [DocumentFragment] a new instance of DocumentFragment - # @yield [options] - # - # source://nokogiri//lib/nokogiri/html4/document_fragment.rb#134 + # pkg:gem/nokogiri#lib/nokogiri/html4/document_fragment.rb:134 def initialize(document, input = T.unsafe(nil), context_ = T.unsafe(nil), options_ = T.unsafe(nil), context: T.unsafe(nil), options: T.unsafe(nil)); end class << self @@ -1142,153 +1145,165 @@ class Nokogiri::HTML4::DocumentFragment < ::Nokogiri::XML::DocumentFragment # options.huge.pedantic # end # - # source://nokogiri//lib/nokogiri/html4/document_fragment.rb#52 + # pkg:gem/nokogiri#lib/nokogiri/html4/document_fragment.rb:52 def parse(input, encoding_ = T.unsafe(nil), options_ = T.unsafe(nil), encoding: T.unsafe(nil), options: T.unsafe(nil), &block); end end end -# source://nokogiri//lib/nokogiri/html4/element_description.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::HTML4::ElementDescription # Is this element a block element? # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/html4/element_description.rb#8 + # pkg:gem/nokogiri#lib/nokogiri/html4/element_description.rb:8 def block?; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def default_sub_element; end - # @return [Boolean] + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def deprecated?; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def deprecated_attributes; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def description; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def empty?; end - # @return [Boolean] + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def implied_end_tag?; end - # @return [Boolean] + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def implied_start_tag?; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def inline?; end # Inspection information # - # source://nokogiri//lib/nokogiri/html4/element_description.rb#20 + # pkg:gem/nokogiri#lib/nokogiri/html4/element_description.rb:20 def inspect; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def name; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def optional_attributes; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def required_attributes; end - # @return [Boolean] + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def save_end_tag?; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def sub_elements; end # Convert this description to a string # - # source://nokogiri//lib/nokogiri/html4/element_description.rb#14 + # pkg:gem/nokogiri#lib/nokogiri/html4/element_description.rb:14 def to_s; end private - # source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#32 + # pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:32 def default_desc; end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def [](_arg0); end end end -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#436 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:436 Nokogiri::HTML4::ElementDescription::ACTION_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#423 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:423 Nokogiri::HTML4::ElementDescription::ALIGN_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#239 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:239 Nokogiri::HTML4::ElementDescription::ALT_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#246 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:246 Nokogiri::HTML4::ElementDescription::APPLET_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#258 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:258 Nokogiri::HTML4::ElementDescription::AREA_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#212 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:212 Nokogiri::HTML4::ElementDescription::ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#221 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:221 Nokogiri::HTML4::ElementDescription::A_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#268 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:268 Nokogiri::HTML4::ElementDescription::BASEFONT_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#546 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:546 Nokogiri::HTML4::ElementDescription::BGCOLOR_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#171 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:171 Nokogiri::HTML4::ElementDescription::BLOCK = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#437 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:437 Nokogiri::HTML4::ElementDescription::BLOCKLI_ELT = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#271 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:271 Nokogiri::HTML4::ElementDescription::BODY_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#270 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:270 Nokogiri::HTML4::ElementDescription::BODY_CONTENTS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#272 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:272 Nokogiri::HTML4::ElementDescription::BODY_DEPR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#280 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:280 Nokogiri::HTML4::ElementDescription::BUTTON_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#213 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:213 Nokogiri::HTML4::ElementDescription::CELLHALIGN = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#214 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:214 Nokogiri::HTML4::ElementDescription::CELLVALIGN = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#242 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:242 Nokogiri::HTML4::ElementDescription::CLEAR_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#292 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:292 Nokogiri::HTML4::ElementDescription::COL_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#293 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:293 Nokogiri::HTML4::ElementDescription::COL_ELT = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#297 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:297 Nokogiri::HTML4::ElementDescription::COMPACT_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#295 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:295 Nokogiri::HTML4::ElementDescription::COMPACT_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#439 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:439 Nokogiri::HTML4::ElementDescription::CONTENT_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#199 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:199 Nokogiri::HTML4::ElementDescription::COREATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#218 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:218 Nokogiri::HTML4::ElementDescription::CORE_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#217 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:217 Nokogiri::HTML4::ElementDescription::CORE_I18N_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#549 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:549 Nokogiri::HTML4::ElementDescription::DIR_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#296 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:296 Nokogiri::HTML4::ElementDescription::DL_CONTENTS = T.let(T.unsafe(nil), Array) # This is filled in down below. # -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#30 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:30 Nokogiri::HTML4::ElementDescription::DefaultDescriptions = T.let(T.unsafe(nil), Hash) # Methods are defined protected by method_defined? because at @@ -1296,327 +1311,316 @@ Nokogiri::HTML4::ElementDescription::DefaultDescriptions = T.let(T.unsafe(nil), # and we don't want to clobber any methods that have been # defined there. # -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#11 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:11 Nokogiri::HTML4::ElementDescription::Desc = Struct -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#294 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:294 Nokogiri::HTML4::ElementDescription::EDIT_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#377 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:377 Nokogiri::HTML4::ElementDescription::EMBED_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#192 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:192 Nokogiri::HTML4::ElementDescription::EMPTY = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#201 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:201 Nokogiri::HTML4::ElementDescription::EVENTS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#299 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:299 Nokogiri::HTML4::ElementDescription::FIELDSET_CONTENTS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#190 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:190 Nokogiri::HTML4::ElementDescription::FLOW = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#245 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:245 Nokogiri::HTML4::ElementDescription::FLOW_PARAM = T.let(T.unsafe(nil), Array) # Attributes defined and categorized # -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#136 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:136 Nokogiri::HTML4::ElementDescription::FONTSTYLE = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#300 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:300 Nokogiri::HTML4::ElementDescription::FONT_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#170 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:170 Nokogiri::HTML4::ElementDescription::FORMCTRL = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#318 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:318 Nokogiri::HTML4::ElementDescription::FORM_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#301 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:301 Nokogiri::HTML4::ElementDescription::FORM_CONTENTS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#339 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:339 Nokogiri::HTML4::ElementDescription::FRAMESET_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#340 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:340 Nokogiri::HTML4::ElementDescription::FRAMESET_CONTENTS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#328 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:328 Nokogiri::HTML4::ElementDescription::FRAME_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#168 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:168 Nokogiri::HTML4::ElementDescription::HEADING = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#341 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:341 Nokogiri::HTML4::ElementDescription::HEAD_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#342 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:342 Nokogiri::HTML4::ElementDescription::HEAD_CONTENTS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#241 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:241 Nokogiri::HTML4::ElementDescription::HREF_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#352 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:352 Nokogiri::HTML4::ElementDescription::HR_DEPR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#216 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:216 Nokogiri::HTML4::ElementDescription::HTML_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#197 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:197 Nokogiri::HTML4::ElementDescription::HTML_CDATA = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#354 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:354 Nokogiri::HTML4::ElementDescription::HTML_CONTENT = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#194 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:194 Nokogiri::HTML4::ElementDescription::HTML_FLOW = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#195 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:195 Nokogiri::HTML4::ElementDescription::HTML_INLINE = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#196 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:196 Nokogiri::HTML4::ElementDescription::HTML_PCDATA = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#200 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:200 Nokogiri::HTML4::ElementDescription::I18N = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#219 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:219 Nokogiri::HTML4::ElementDescription::I18N_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#355 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:355 Nokogiri::HTML4::ElementDescription::IFRAME_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#368 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:368 Nokogiri::HTML4::ElementDescription::IMG_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#189 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:189 Nokogiri::HTML4::ElementDescription::INLINE = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#243 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:243 Nokogiri::HTML4::ElementDescription::INLINE_P = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#398 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:398 Nokogiri::HTML4::ElementDescription::INPUT_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#298 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:298 Nokogiri::HTML4::ElementDescription::LABEL_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#421 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:421 Nokogiri::HTML4::ElementDescription::LABEL_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#484 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:484 Nokogiri::HTML4::ElementDescription::LANGUAGE_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#422 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:422 Nokogiri::HTML4::ElementDescription::LEGEND_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#424 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:424 Nokogiri::HTML4::ElementDescription::LINK_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#169 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:169 Nokogiri::HTML4::ElementDescription::LIST = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#547 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:547 Nokogiri::HTML4::ElementDescription::LI_ELT = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#434 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:434 Nokogiri::HTML4::ElementDescription::MAP_CONTENTS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#438 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:438 Nokogiri::HTML4::ElementDescription::META_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#191 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:191 Nokogiri::HTML4::ElementDescription::MODIFIER = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#435 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:435 Nokogiri::HTML4::ElementDescription::NAME_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#441 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:441 Nokogiri::HTML4::ElementDescription::NOFRAMES_CONTENT = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#443 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:443 Nokogiri::HTML4::ElementDescription::OBJECT_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#442 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:442 Nokogiri::HTML4::ElementDescription::OBJECT_CONTENTS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#459 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:459 Nokogiri::HTML4::ElementDescription::OBJECT_DEPR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#460 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:460 Nokogiri::HTML4::ElementDescription::OL_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#462 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:462 Nokogiri::HTML4::ElementDescription::OPTGROUP_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#463 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:463 Nokogiri::HTML4::ElementDescription::OPTION_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#461 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:461 Nokogiri::HTML4::ElementDescription::OPTION_ELT = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#464 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:464 Nokogiri::HTML4::ElementDescription::PARAM_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#167 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:167 Nokogiri::HTML4::ElementDescription::PCDATA = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#137 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:137 Nokogiri::HTML4::ElementDescription::PHRASE = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#466 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:466 Nokogiri::HTML4::ElementDescription::PRE_CONTENT = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#420 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:420 Nokogiri::HTML4::ElementDescription::PROMPT_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#269 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:269 Nokogiri::HTML4::ElementDescription::QUOTE_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#238 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:238 Nokogiri::HTML4::ElementDescription::ROWS_COLS_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#483 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:483 Nokogiri::HTML4::ElementDescription::SCRIPT_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#486 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:486 Nokogiri::HTML4::ElementDescription::SELECT_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#485 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:485 Nokogiri::HTML4::ElementDescription::SELECT_CONTENT = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#149 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:149 Nokogiri::HTML4::ElementDescription::SPECIAL = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#240 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:240 Nokogiri::HTML4::ElementDescription::SRC_ALT_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#497 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:497 Nokogiri::HTML4::ElementDescription::STYLE_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#498 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:498 Nokogiri::HTML4::ElementDescription::TABLE_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#510 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:510 Nokogiri::HTML4::ElementDescription::TABLE_CONTENTS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#509 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:509 Nokogiri::HTML4::ElementDescription::TABLE_DEPR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#520 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:520 Nokogiri::HTML4::ElementDescription::TALIGN_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#237 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:237 Nokogiri::HTML4::ElementDescription::TARGET_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#533 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:533 Nokogiri::HTML4::ElementDescription::TEXTAREA_ATTRS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#522 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:522 Nokogiri::HTML4::ElementDescription::TH_TD_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#521 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:521 Nokogiri::HTML4::ElementDescription::TH_TD_DEPR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#545 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:545 Nokogiri::HTML4::ElementDescription::TR_CONTENTS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#519 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:519 Nokogiri::HTML4::ElementDescription::TR_ELT = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#440 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:440 Nokogiri::HTML4::ElementDescription::TYPE_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#548 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:548 Nokogiri::HTML4::ElementDescription::UL_DEPR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#353 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:353 Nokogiri::HTML4::ElementDescription::VERSION_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#465 +# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:465 Nokogiri::HTML4::ElementDescription::WIDTH_ATTR = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#14 +# pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:14 class Nokogiri::HTML4::EncodingReader - # @return [EncodingReader] a new instance of EncodingReader - # - # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#82 + # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:82 def initialize(io); end # This method is used by the C extension so that # Nokogiri::HTML4::Document#read_io() does not leak memory when # EncodingFound is raised. # - # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#91 + # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:91 def encoding_found; end - # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#93 + # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:93 def read(len); end class << self - # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#59 + # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:59 def detect_encoding(chunk); end end end -# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#15 +# pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:15 class Nokogiri::HTML4::EncodingReader::EncodingFound < ::StandardError - # @return [EncodingFound] a new instance of EncodingFound - # - # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#18 + # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:18 def initialize(encoding); end - # Returns the value of attribute found_encoding. - # - # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#16 + # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:16 def found_encoding; end end -# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#46 +# pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:46 class Nokogiri::HTML4::EncodingReader::JumpSAXHandler < ::Nokogiri::HTML4::EncodingReader::SAXHandler - # @return [JumpSAXHandler] a new instance of JumpSAXHandler - # - # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#47 + # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:47 def initialize(jumptag); end - # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#52 + # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:52 def start_element(name, attrs = T.unsafe(nil)); end end -# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#24 +# pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:24 class Nokogiri::HTML4::EncodingReader::SAXHandler < ::Nokogiri::XML::SAX::Document - # @return [SAXHandler] a new instance of SAXHandler - # - # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#27 + # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:27 def initialize; end - # Returns the value of attribute encoding. - # - # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#25 + # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:25 def encoding; end - # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#32 + # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:32 def start_element(name, attrs = T.unsafe(nil)); end end -# source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/html4/entity_lookup.rb:5 class Nokogiri::HTML4::EntityDescription < ::Struct; end -# source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#7 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::HTML4::EntityLookup # Look up entity with +name+ # - # source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#10 + # pkg:gem/nokogiri#lib/nokogiri/html4/entity_lookup.rb:10 def [](name); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def get(_arg0); end end # Instance of Nokogiri::HTML4::EntityLookup # -# source://nokogiri//lib/nokogiri/html4.rb#30 +# pkg:gem/nokogiri#lib/nokogiri/html4.rb:30 Nokogiri::HTML4::NamedCharacters = T.let(T.unsafe(nil), Nokogiri::HTML4::EntityLookup) # Nokogiri provides a SAX parser to process HTML4 which will provide HTML recovery @@ -1626,7 +1630,7 @@ Nokogiri::HTML4::NamedCharacters = T.let(T.unsafe(nil), Nokogiri::HTML4::EntityL # # For more information on SAX parsers, see Nokogiri::XML::SAX # -# source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 module Nokogiri::HTML4::SAX; end # This parser is a SAX style parser that reads its input as it deems necessary. The parser @@ -1655,10 +1659,13 @@ module Nokogiri::HTML4::SAX; end # # Also see Nokogiri::XML::SAX::Document for the available events. # -# source://nokogiri//lib/nokogiri/html4/sax/parser.rb#41 +# 💡 This class is an alias for Nokogiri::HTML4::SAX::Parser as of v1.12.0. +# +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::HTML4::SAX::Parser < ::Nokogiri::XML::SAX::Parser private + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def initialize_native; end end @@ -1666,57 +1673,62 @@ end # # 💡 This class is usually not instantiated by the user. Use Nokogiri::HTML4::SAX::Parser # instead. +# 💡 This class is an alias for Nokogiri::HTML4::SAX::ParserContext as of v1.12.0. # -# source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#11 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::HTML4::SAX::ParserContext < ::Nokogiri::XML::SAX::ParserContext + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def parse_with(_arg0); end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def native_file(_arg0, _arg1); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def native_memory(_arg0, _arg1); end end end -# source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#6 +# 💡 This class is an alias for Nokogiri::HTML4::SAX::PushParser as of v1.12.0. +# +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::HTML4::SAX::PushParser < ::Nokogiri::XML::SAX::PushParser - # @return [PushParser] a new instance of PushParser - # - # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#11 + # pkg:gem/nokogiri#lib/nokogiri/html4/sax/push_parser.rb:11 def initialize(doc = T.unsafe(nil), file_name = T.unsafe(nil), encoding = T.unsafe(nil)); end - # Write a +chunk+ of HTML to the PushParser. Any callback methods - # that can be called will be called immediately. - # - # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#23 + # pkg:gem/nokogiri#lib/nokogiri/html4/sax/push_parser.rb:26 def <<(chunk, last_chunk = T.unsafe(nil)); end # The Nokogiri::HTML4::SAX::Document on which the PushParser will be # operating # - # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#9 + # pkg:gem/nokogiri#lib/nokogiri/html4/sax/push_parser.rb:9 def document; end # The Nokogiri::HTML4::SAX::Document on which the PushParser will be # operating # - # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#9 + # pkg:gem/nokogiri#lib/nokogiri/html4/sax/push_parser.rb:9 def document=(_arg0); end # Finish the parsing. This method is only necessary for # Nokogiri::HTML4::SAX::Document#end_document to be called. # - # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#31 + # pkg:gem/nokogiri#lib/nokogiri/html4/sax/push_parser.rb:31 def finish; end # Write a +chunk+ of HTML to the PushParser. Any callback methods # that can be called will be called immediately. # - # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#23 + # pkg:gem/nokogiri#lib/nokogiri/html4/sax/push_parser.rb:23 def write(chunk, last_chunk = T.unsafe(nil)); end private + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def initialize_native(_arg0, _arg1, _arg2); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def native_write(_arg0, _arg1); end end @@ -1955,20 +1967,20 @@ end # # Since v1.12.0 # -# source://nokogiri//lib/nokogiri/html5/document.rb#23 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 module Nokogiri::HTML5 class << self # Convenience method for Nokogiri::HTML5::DocumentFragment.parse # - # source://nokogiri//lib/nokogiri/html5.rb#280 + # pkg:gem/nokogiri#lib/nokogiri/html5.rb:280 def fragment(*_arg0, **_arg1, &_arg2); end # Convenience method for Nokogiri::HTML5::Document.parse # - # source://nokogiri//lib/nokogiri/html5.rb#275 + # pkg:gem/nokogiri#lib/nokogiri/html5.rb:275 def parse(*_arg0, **_arg1, &_arg2); end - # source://nokogiri//lib/nokogiri/html5.rb#285 + # pkg:gem/nokogiri#lib/nokogiri/html5.rb:285 def read_and_encode(string, encoding); end private @@ -1985,7 +1997,7 @@ module Nokogiri::HTML5 # http://bugs.ruby-lang.org/issues/2567 # http://www.w3.org/TR/html5/syntax.html#determining-the-character-encoding # - # source://nokogiri//lib/nokogiri/html5.rb#323 + # pkg:gem/nokogiri#lib/nokogiri/html5.rb:323 def reencode(body, content_type = T.unsafe(nil)); end end end @@ -2017,11 +2029,11 @@ end # The HTML5 builder inherits from the XML builder, so make sure to read the # Nokogiri::XML::Builder documentation. # -# source://nokogiri//lib/nokogiri/html5/builder.rb#32 +# pkg:gem/nokogiri#lib/nokogiri/html5/builder.rb:32 class Nokogiri::HTML5::Builder < ::Nokogiri::XML::Builder # Convert the builder to HTML # - # source://nokogiri//lib/nokogiri/html5/builder.rb#35 + # pkg:gem/nokogiri#lib/nokogiri/html5/builder.rb:35 def to_html; end end @@ -2029,11 +2041,9 @@ end # # 💡 HTML5 functionality is not available when running JRuby. # -# source://nokogiri//lib/nokogiri/html5/document.rb#39 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::HTML5::Document < ::Nokogiri::HTML4::Document - # @return [Document] a new instance of Document - # - # source://nokogiri//lib/nokogiri/html5/document.rb#159 + # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:159 def initialize(*args); end # :call-seq: @@ -2049,7 +2059,7 @@ class Nokogiri::HTML5::Document < ::Nokogiri::HTML4::Document # Nokogiri::HTML5::DocumentFragment. This object's children will be empty if +markup+ is not # passed, is empty, or is +nil+. # - # source://nokogiri//lib/nokogiri/html5/document.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:178 def fragment(markup = T.unsafe(nil)); end # Get the parser's quirks mode value. See HTML5::QuirksMode. @@ -2058,16 +2068,16 @@ class Nokogiri::HTML5::Document < ::Nokogiri::HTML4::Document # # Since v1.14.0 # - # source://nokogiri//lib/nokogiri/html5/document.rb#49 + # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:49 def quirks_mode; end - # source://nokogiri//lib/nokogiri/html5/document.rb#182 + # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:182 def to_xml(options = T.unsafe(nil), &block); end # Get the url name for this document, as passed into Document.parse, Document.read_io, or # Document.read_memory # - # source://nokogiri//lib/nokogiri/html5/document.rb#42 + # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:42 def url; end # :call-seq: @@ -2077,7 +2087,7 @@ class Nokogiri::HTML5::Document < ::Nokogiri::HTML4::Document # # See CSS::XPathVisitor for more information. # - # source://nokogiri//lib/nokogiri/html5/document.rb#194 + # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:194 def xpath_doctype; end class << self @@ -2127,32 +2137,26 @@ class Nokogiri::HTML5::Document < ::Nokogiri::HTML4::Document # # Nokogiri::HTML5::Document.parse(input) { |c| c[:parse_noscript_content_as_text] = true } # - # @yield [options] - # - # source://nokogiri//lib/nokogiri/html5/document.rb#103 + # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:103 def parse(string_or_io, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), **options, &block); end # Create a new document from an IO object. # # 💡 Most users should prefer Document.parse to this method. # - # @raise [ArgumentError] - # - # source://nokogiri//lib/nokogiri/html5/document.rb#129 + # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:129 def read_io(io, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), **options); end # Create a new document from a String. # # 💡 Most users should prefer Document.parse to this method. # - # @raise [ArgumentError] - # - # source://nokogiri//lib/nokogiri/html5/document.rb#138 + # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:138 def read_memory(string, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), **options); end private - # source://nokogiri//lib/nokogiri/html5/document.rb#146 + # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:146 def do_parse(string_or_io, url, encoding, **options); end end end @@ -2161,7 +2165,7 @@ end # # 💡 HTML5 functionality is not available when running JRuby. # -# source://nokogiri//lib/nokogiri/html5/document_fragment.rb#27 +# pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:27 class Nokogiri::HTML5::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment # :call-seq: # new(document, input, **options) → HTML5::DocumentFragment @@ -2206,36 +2210,22 @@ class Nokogiri::HTML5::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment # If a context node is specified using +context:+, then the parser will behave as if that # Node, or a hypothetical tag named as specified, is the parent of the fragment subtree. # - # @return [DocumentFragment] a new instance of DocumentFragment - # - # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#144 + # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:144 def initialize(doc, input = T.unsafe(nil), context_ = T.unsafe(nil), positional_options_hash = T.unsafe(nil), context: T.unsafe(nil), **options); end - # Returns the value of attribute document. - # - # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#88 + # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:88 def document; end - # Sets the attribute document - # - # @param value the value to set the attribute document to. - # - # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#88 + # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:88 def document=(_arg0); end - # Returns the value of attribute errors. - # - # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#89 + # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:89 def errors; end - # Sets the attribute errors - # - # @param value the value to set the attribute errors to. - # - # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#89 + # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:89 def errors=(_arg0); end - # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#175 + # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:175 def extract_params(params); end # Get the parser's quirks mode value. See HTML5::QuirksMode. @@ -2245,10 +2235,10 @@ class Nokogiri::HTML5::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment # # Since v1.14.0 # - # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#97 + # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:97 def quirks_mode; end - # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#169 + # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:169 def serialize(options = T.unsafe(nil), &block); end class << self @@ -2291,7 +2281,7 @@ class Nokogiri::HTML5::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment # If a context node is specified using +context:+, then the parser will behave as if that # Node, or a hypothetical tag named as specified, is the parent of the fragment subtree. # - # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#69 + # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:69 def parse(input, encoding_ = T.unsafe(nil), positional_options_hash = T.unsafe(nil), encoding: T.unsafe(nil), **options); end end end @@ -2300,17 +2290,15 @@ end # # 💡 HTML5 functionality is not available when running JRuby. # -# source://nokogiri//lib/nokogiri/html5/node.rb#30 +# pkg:gem/nokogiri#lib/nokogiri/html5/node.rb:30 module Nokogiri::HTML5::Node - # source://nokogiri//lib/nokogiri/html5/node.rb#70 + # pkg:gem/nokogiri#lib/nokogiri/html5/node.rb:70 def fragment(tags); end - # source://nokogiri//lib/nokogiri/html5/node.rb#31 + # pkg:gem/nokogiri#lib/nokogiri/html5/node.rb:31 def inner_html(options = T.unsafe(nil)); end - # @yield [config] - # - # source://nokogiri//lib/nokogiri/html5/node.rb#39 + # pkg:gem/nokogiri#lib/nokogiri/html5/node.rb:39 def write_to(io, *options); end private @@ -2321,7 +2309,7 @@ module Nokogiri::HTML5::Node # annoying with attribute names like xml:lang since libxml2 will # actually create the xml namespace if it doesn't exist already. # - # source://nokogiri//lib/nokogiri/html5/node.rb#83 + # pkg:gem/nokogiri#lib/nokogiri/html5/node.rb:83 def add_child_node_and_reparent_attrs(node); end end @@ -2332,22 +2320,20 @@ end # # Since v1.14.0 # -# source://nokogiri//lib/nokogiri/html5/document.rb#30 +# pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:30 module Nokogiri::HTML5::QuirksMode; end -# The document was parsed in "limited-quirks" mode +# The document was parsed in "quirks" mode # -# source://nokogiri//lib/nokogiri/html5/document.rb#33 +# pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:33 Nokogiri::HTML5::QuirksMode::LIMITED_QUIRKS = T.let(T.unsafe(nil), Integer) -# The document was parsed in "no-quirks" mode -# -# source://nokogiri//lib/nokogiri/html5/document.rb#31 +# pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:31 Nokogiri::HTML5::QuirksMode::NO_QUIRKS = T.let(T.unsafe(nil), Integer) -# The document was parsed in "quirks" mode +# The document was parsed in "no-quirks" mode # -# source://nokogiri//lib/nokogiri/html5/document.rb#32 +# pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:32 Nokogiri::HTML5::QuirksMode::QUIRKS = T.let(T.unsafe(nil), Integer) Nokogiri::LIBXML2_PATCHES = T.let(T.unsafe(nil), Array) @@ -2364,111 +2350,101 @@ Nokogiri::OTHER_LIBRARY_VERSIONS = T.let(T.unsafe(nil), String) Nokogiri::PACKAGED_LIBRARIES = T.let(T.unsafe(nil), TrueClass) Nokogiri::PRECOMPILED_LIBRARIES = T.let(T.unsafe(nil), TrueClass) -# source://nokogiri//lib/nokogiri/syntax_error.rb#4 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::SyntaxError < ::StandardError; end +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 module Nokogiri::Test class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def __foreign_error_handler; end end end # The version of Nokogiri you are using # -# source://nokogiri//lib/nokogiri/version/constant.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/version/constant.rb:5 Nokogiri::VERSION = T.let(T.unsafe(nil), String) # Detailed version info about Nokogiri and the installed extension dependencies. # -# source://nokogiri//lib/nokogiri/version/info.rb#223 +# pkg:gem/nokogiri#lib/nokogiri/version/info.rb:223 Nokogiri::VERSION_INFO = T.let(T.unsafe(nil), Hash) -# source://nokogiri//lib/nokogiri/version/info.rb#7 +# pkg:gem/nokogiri#lib/nokogiri/version/info.rb:7 class Nokogiri::VersionInfo + include ::Singleton::SingletonInstanceMethods include ::Singleton extend ::Singleton::SingletonClassMethods - # source://nokogiri//lib/nokogiri/version/info.rb#33 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:33 def compiled_libxml_version; end - # source://nokogiri//lib/nokogiri/version/info.rb#44 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:44 def compiled_libxslt_version; end - # source://nokogiri//lib/nokogiri/version/info.rb#22 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:22 def engine; end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/version/info.rb#10 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:10 def jruby?; end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/version/info.rb#48 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:48 def libxml2?; end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/version/info.rb#52 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:52 def libxml2_has_iconv?; end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/version/info.rb#68 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:68 def libxml2_precompiled?; end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/version/info.rb#60 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:60 def libxml2_using_packaged?; end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/version/info.rb#64 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:64 def libxml2_using_system?; end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/version/info.rb#56 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:56 def libxslt_has_datetime?; end - # source://nokogiri//lib/nokogiri/version/info.rb#26 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:26 def loaded_libxml_version; end - # source://nokogiri//lib/nokogiri/version/info.rb#37 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:37 def loaded_libxslt_version; end - # source://nokogiri//lib/nokogiri/version/info.rb#18 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:18 def ruby_minor; end - # source://nokogiri//lib/nokogiri/version/info.rb#88 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:88 def to_hash; end - # source://nokogiri//lib/nokogiri/version/info.rb#181 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:181 def to_markdown; end - # source://nokogiri//lib/nokogiri/version/info.rb#72 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:72 def warnings; end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/version/info.rb#14 + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:14 def windows?; end class << self private + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:8 def allocate; end + + # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:8 def new(*_arg0); end end end -# source://nokogiri//lib/nokogiri/xml.rb#11 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 module Nokogiri::XML class << self # Convenience method for Nokogiri::XML::Reader.new # - # source://nokogiri//lib/nokogiri/xml.rb#21 + # pkg:gem/nokogiri#lib/nokogiri/xml.rb:21 def Reader(*_arg0, **_arg1, &_arg2); end # :call-seq: @@ -2477,7 +2453,7 @@ module Nokogiri::XML # # Convenience method for Nokogiri::XML::RelaxNG.new # - # source://nokogiri//lib/nokogiri/xml/relax_ng.rb#11 + # pkg:gem/nokogiri#lib/nokogiri/xml/relax_ng.rb:11 def RelaxNG(*_arg0, **_arg1, &_arg2); end # :call-seq: @@ -2486,26 +2462,27 @@ module Nokogiri::XML # # Convenience method for Nokogiri::XML::Schema.new # - # source://nokogiri//lib/nokogiri/xml/schema.rb#11 + # pkg:gem/nokogiri#lib/nokogiri/xml/schema.rb:11 def Schema(*_arg0, **_arg1, &_arg2); end # Convenience method for Nokogiri::XML::DocumentFragment.parse # - # source://nokogiri//lib/nokogiri/xml.rb#31 + # pkg:gem/nokogiri#lib/nokogiri/xml.rb:31 def fragment(*_arg0, **_arg1, &_arg2); end # Convenience method for Nokogiri::XML::Document.parse # - # source://nokogiri//lib/nokogiri/xml.rb#26 + # pkg:gem/nokogiri#lib/nokogiri/xml.rb:26 def parse(*_arg0, **_arg1, &_arg2); end end end -# source://nokogiri//lib/nokogiri/xml/attr.rb#6 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::Attr < ::Nokogiri::XML::Node + # pkg:gem/nokogiri#lib/nokogiri/xml/attr.rb:9 def content=(_arg0); end - # :call-seq: deconstruct_keys(array_of_names) → Hash + # :call-seq: deconstruct_keys(array_of_names) → Hash # # Returns a hash describing the Attr, to use in pattern matching. # @@ -2548,34 +2525,45 @@ class Nokogiri::XML::Attr < ::Nokogiri::XML::Node # # Since v1.14.0 # - # source://nokogiri//lib/nokogiri/xml/attr.rb#55 + # pkg:gem/nokogiri#lib/nokogiri/xml/attr.rb:55 def deconstruct_keys(keys); end + # pkg:gem/nokogiri#lib/nokogiri/xml/attr.rb:8 def to_s; end + + # pkg:gem/nokogiri#lib/nokogiri/xml/attr.rb:7 def value; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def value=(_arg0); end private - # source://nokogiri//lib/nokogiri/xml/attr.rb#61 + # pkg:gem/nokogiri#lib/nokogiri/xml/attr.rb:61 def inspect_attributes; end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def new(*_arg0); end end end # Represents an attribute declaration in a DTD # -# source://nokogiri//lib/nokogiri/xml/attribute_decl.rb#7 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::AttributeDecl < ::Nokogiri::XML::Node + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def attribute_type; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def default; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def enumeration; end private - # source://nokogiri//lib/nokogiri/xml/attribute_decl.rb#17 + # pkg:gem/nokogiri#lib/nokogiri/xml/attribute_decl.rb:17 def inspect_attributes; end end @@ -2837,7 +2825,7 @@ end # # # -# source://nokogiri//lib/nokogiri/xml/builder.rb#264 +# pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:264 class Nokogiri::XML::Builder include ::Nokogiri::ClassResolver @@ -2850,86 +2838,84 @@ class Nokogiri::XML::Builder # ... # end # - # @return [Builder] a new instance of Builder - # - # source://nokogiri//lib/nokogiri/xml/builder.rb#307 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:307 def initialize(options = T.unsafe(nil), root = T.unsafe(nil), &block); end # Append the given raw XML +string+ to the document # - # source://nokogiri//lib/nokogiri/xml/builder.rb#390 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:390 def <<(string); end # Build a tag that is associated with namespace +ns+. Raises an # ArgumentError if +ns+ has not been defined higher in the tree. # - # source://nokogiri//lib/nokogiri/xml/builder.rb#358 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:358 def [](ns); end - # source://nokogiri//lib/nokogiri/xml/builder.rb#278 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:278 def arity; end - # source://nokogiri//lib/nokogiri/xml/builder.rb#278 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:278 def arity=(_arg0); end # Create a CDATA Node with content of +string+ # - # source://nokogiri//lib/nokogiri/xml/builder.rb#345 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:345 def cdata(string); end # Create a Comment Node with content of +string+ # - # source://nokogiri//lib/nokogiri/xml/builder.rb#351 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:351 def comment(string); end # A context object for use when the block has no arguments # - # source://nokogiri//lib/nokogiri/xml/builder.rb#276 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:276 def context; end # A context object for use when the block has no arguments # - # source://nokogiri//lib/nokogiri/xml/builder.rb#276 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:276 def context=(_arg0); end # The current Document object being built # - # source://nokogiri//lib/nokogiri/xml/builder.rb#270 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:270 def doc; end # The current Document object being built # - # source://nokogiri//lib/nokogiri/xml/builder.rb#270 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:270 def doc=(_arg0); end - # source://nokogiri//lib/nokogiri/xml/builder.rb#394 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:394 def method_missing(method, *args, &block); end # The parent of the current node being built # - # source://nokogiri//lib/nokogiri/xml/builder.rb#273 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:273 def parent; end # The parent of the current node being built # - # source://nokogiri//lib/nokogiri/xml/builder.rb#273 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:273 def parent=(_arg0); end # Create a Text Node with content of +string+ # - # source://nokogiri//lib/nokogiri/xml/builder.rb#339 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:339 def text(string); end # Convert this Builder object to XML # - # source://nokogiri//lib/nokogiri/xml/builder.rb#377 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:377 def to_xml(*args); end private # Insert +node+ as a child of the current Node # - # source://nokogiri//lib/nokogiri/xml/builder.rb#423 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:423 def insert(node, &block); end class << self @@ -2946,80 +2932,88 @@ class Nokogiri::XML::Builder # xml.awesome # add the "awesome" tag below "some_tag" # end # - # source://nokogiri//lib/nokogiri/xml/builder.rb#294 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:294 def with(root, &block); end end end -# source://nokogiri//lib/nokogiri/xml/builder.rb#267 +# pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:267 Nokogiri::XML::Builder::DEFAULT_DOCUMENT_OPTIONS = T.let(T.unsafe(nil), Hash) -# source://nokogiri//lib/nokogiri/xml/builder.rb#442 +# pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:442 class Nokogiri::XML::Builder::NodeBuilder - # @return [NodeBuilder] a new instance of NodeBuilder - # - # source://nokogiri//lib/nokogiri/xml/builder.rb#443 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:443 def initialize(node, doc_builder); end - # source://nokogiri//lib/nokogiri/xml/builder.rb#452 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:452 def [](k); end - # source://nokogiri//lib/nokogiri/xml/builder.rb#448 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:448 def []=(k, v); end - # source://nokogiri//lib/nokogiri/xml/builder.rb#456 + # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:456 def method_missing(method, *args, &block); end end -# source://nokogiri//lib/nokogiri/xml/cdata.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::CDATA < ::Nokogiri::XML::Text # Get the name of this CDATA node # - # source://nokogiri//lib/nokogiri/xml/cdata.rb#8 + # pkg:gem/nokogiri#lib/nokogiri/xml/cdata.rb:8 def name; end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def new(*_arg0); end end end -# source://nokogiri//lib/nokogiri/xml/character_data.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::CharacterData < ::Nokogiri::XML::Node include ::Nokogiri::XML::PP::CharacterData end +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::Comment < ::Nokogiri::XML::CharacterData class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def new(*_arg0); end end end -# source://nokogiri//lib/nokogiri/xml/dtd.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::DTD < ::Nokogiri::XML::Node + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def attributes; end - # source://nokogiri//lib/nokogiri/xml/dtd.rb#17 + # pkg:gem/nokogiri#lib/nokogiri/xml/dtd.rb:17 def each; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def elements; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def entities; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def external_id; end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/dtd.rb#27 + # pkg:gem/nokogiri#lib/nokogiri/xml/dtd.rb:27 def html5_dtd?; end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/dtd.rb#23 + # pkg:gem/nokogiri#lib/nokogiri/xml/dtd.rb:23 def html_dtd?; end - # source://nokogiri//lib/nokogiri/xml/dtd.rb#13 + # pkg:gem/nokogiri#lib/nokogiri/xml/dtd.rb:13 def keys; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def notations; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def system_id; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def validate(_arg0); end end @@ -3030,19 +3024,18 @@ end # Document inherits a great deal of functionality from its superclass Nokogiri::XML::Node, so # please read that class's documentation as well. # -# source://nokogiri//lib/nokogiri/xml/document.rb#14 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::Document < ::Nokogiri::XML::Node - # @return [Document] a new instance of Document - # - # source://nokogiri//lib/nokogiri/xml/document.rb#190 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:190 def initialize(*args); end - # source://nokogiri//lib/nokogiri/xml/document.rb#437 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:449 def <<(node_or_tags); end - # source://nokogiri//lib/nokogiri/xml/document.rb#437 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:437 def add_child(node_or_tags); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def canonicalize(*_arg0); end # :call-seq: @@ -3055,7 +3048,7 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # - +level+ (optional Integer). 0 is a shallow copy, 1 (the default) is a deep copy. # [Returns] The new Nokogiri::XML::Document # - # source://nokogiri//lib/nokogiri/xml/document.rb#223 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:223 def clone(level = T.unsafe(nil)); end # :call-seq: @@ -3094,17 +3087,17 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # # {"xmlns:foo" => "baz"} # - # source://nokogiri//lib/nokogiri/xml/document.rb#361 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:361 def collect_namespaces; end # Create a CDATA Node containing +string+ # - # source://nokogiri//lib/nokogiri/xml/document.rb#306 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:306 def create_cdata(string, &block); end # Create a Comment Node containing +string+ # - # source://nokogiri//lib/nokogiri/xml/document.rb#311 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:311 def create_comment(string, &block); end # :call-seq: @@ -3155,17 +3148,18 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # # doc.create_element("div") { |node| node["class"] = "blue" if before_noon? } # - # source://nokogiri//lib/nokogiri/xml/document.rb#276 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:276 def create_element(name, *contents_or_attrs, &block); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def create_entity(*_arg0); end # Create a Text Node with +string+ # - # source://nokogiri//lib/nokogiri/xml/document.rb#301 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:301 def create_text_node(string, &block); end - # :call-seq: deconstruct_keys(array_of_names) → Hash + # :call-seq: deconstruct_keys(array_of_names) → Hash # # Returns a hash describing the Document, to use in pattern matching. # @@ -3204,22 +3198,22 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # # Since v1.14.0 # - # source://nokogiri//lib/nokogiri/xml/document.rb#501 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:501 def deconstruct_keys(keys); end # Apply any decorators to +node+ # - # source://nokogiri//lib/nokogiri/xml/document.rb#409 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:409 def decorate(node); end # Get the list of decorators given +key+ # - # source://nokogiri//lib/nokogiri/xml/document.rb#368 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:368 def decorators(key); end # A reference to +self+ # - # source://nokogiri//lib/nokogiri/xml/document.rb#321 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:321 def document; end # :call-seq: @@ -3232,35 +3226,38 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # - +level+ (optional Integer). 0 is a shallow copy, 1 (the default) is a deep copy. # [Returns] The new Nokogiri::XML::Document # - # source://nokogiri//lib/nokogiri/xml/document.rb#207 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:207 def dup(level = T.unsafe(nil)); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def encoding; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def encoding=(_arg0); end # The errors found while parsing a document. # # [Returns] Array # - # source://nokogiri//lib/nokogiri/xml/document.rb#141 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:141 def errors; end # The errors found while parsing a document. # # [Returns] Array # - # source://nokogiri//lib/nokogiri/xml/document.rb#141 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:141 def errors=(_arg0); end # Create a Nokogiri::XML::DocumentFragment from +tags+ # Returns an empty fragment if +tags+ is nil. # - # source://nokogiri//lib/nokogiri/xml/document.rb#429 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:429 def fragment(tags = T.unsafe(nil)); end # The name of this document. Always returns "document" # - # source://nokogiri//lib/nokogiri/xml/document.rb#316 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:316 def name; end # When `true`, reparented elements without a namespace will inherit their new parent's @@ -3309,7 +3306,7 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # # Since v1.12.4 # - # source://nokogiri//lib/nokogiri/xml/document.rb#188 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:188 def namespace_inheritance; end # When `true`, reparented elements without a namespace will inherit their new parent's @@ -3358,16 +3355,21 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # # Since v1.12.4 # - # source://nokogiri//lib/nokogiri/xml/document.rb#188 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:188 def namespace_inheritance=(_arg0); end # Get the hash of namespaces on the root Nokogiri::XML::Node # - # source://nokogiri//lib/nokogiri/xml/document.rb#422 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:422 def namespaces; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def remove_namespaces!; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def root; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def root=(_arg0); end # Explore a document with shortcut methods. See Nokogiri::Slop for details. @@ -3385,20 +3387,22 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # irb> doc.slop! # ... which does absolutely nothing. # - # source://nokogiri//lib/nokogiri/xml/document.rb#398 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:398 def slop!; end - # source://nokogiri//lib/nokogiri/xml/node.rb#1364 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:419 def to_xml(*args, &block); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def url; end # Validate this Document against its DTD. Returns a list of errors on # the document or +nil+ when there is no DTD. # - # source://nokogiri//lib/nokogiri/xml/document.rb#376 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:376 def validate; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def version; end # :call-seq: @@ -3408,19 +3412,21 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # # See XPathVisitor for more information. # - # source://nokogiri//lib/nokogiri/xml/document.rb#457 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:457 def xpath_doctype; end protected + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def initialize_copy_with_args(_arg0, _arg1); end private - # source://nokogiri//lib/nokogiri/xml/document.rb#509 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:509 def inspect_attributes; end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def new(*_arg0); end # call-seq: @@ -3451,49 +3457,48 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node # # [Returns] Nokogiri::XML::Document # - # @yield [options] - # - # source://nokogiri//lib/nokogiri/xml/document.rb#56 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:56 def parse(string_or_io, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), options_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), options: T.unsafe(nil)); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def read_io(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def read_memory(_arg0, _arg1, _arg2, _arg3); end private - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/document.rb#96 + # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:96 def empty_doc?(string_or_io); end end end -# source://nokogiri//lib/nokogiri/xml/document.rb#507 +# pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:507 Nokogiri::XML::Document::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/xml/document.rb#19 +# pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:19 Nokogiri::XML::Document::NCNAME_CHAR = T.let(T.unsafe(nil), String) -# source://nokogiri//lib/nokogiri/xml/document.rb#20 +# pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:20 Nokogiri::XML::Document::NCNAME_RE = T.let(T.unsafe(nil), Regexp) # See http://www.w3.org/TR/REC-xml-names/#ns-decl for more details. Note that we're not # attempting to handle unicode characters partly because libxml2 doesn't handle unicode # characters in NCNAMEs. # -# source://nokogiri//lib/nokogiri/xml/document.rb#18 +# pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:18 Nokogiri::XML::Document::NCNAME_START_CHAR = T.let(T.unsafe(nil), String) -# source://nokogiri//lib/nokogiri/xml/document.rb#23 +# pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:23 Nokogiri::XML::Document::OBJECT_CLONE_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://nokogiri//lib/nokogiri/xml/document.rb#22 +# pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:22 Nokogiri::XML::Document::OBJECT_DUP_METHOD = T.let(T.unsafe(nil), UnboundMethod) # DocumentFragment represents a fragment of an \XML document. It provides the same functionality # exposed by XML::Node and can be used to contain one or more \XML subtrees. # -# source://nokogiri//lib/nokogiri/xml/document_fragment.rb#8 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node # :call-seq: # new(document, input=nil) { |options| ... } → DocumentFragment @@ -3531,10 +3536,7 @@ class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node # calling Node#parse on that node, so the parser will behave as if that Node is the parent of # the fragment subtree, and will resolve namespaces relative to that node. # - # @return [DocumentFragment] a new instance of DocumentFragment - # @yield [options] - # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#85 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:85 def initialize(document, tags = T.unsafe(nil), context_ = T.unsafe(nil), options_ = T.unsafe(nil), context: T.unsafe(nil), options: T.unsafe(nil)); end # call-seq: css *rules, [namespace-bindings, custom-pseudo-class] @@ -3544,10 +3546,10 @@ class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node # # For more information see Nokogiri::XML::Searchable#css # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:173 def css(*args); end - # :call-seq: deconstruct() → Array + # :call-seq: deconstruct() → Array # # Returns the root nodes of this document fragment as an array, to use in pattern matching. # @@ -3588,33 +3590,33 @@ class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node # # Since v1.14.0 # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#261 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:261 def deconstruct; end - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#113 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:113 def dup; end # A list of Nokogiri::XML::SyntaxError found when parsing a document # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#207 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:207 def errors; end - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#211 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:211 def errors=(things); end - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#215 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:215 def fragment(data); end # return the name for DocumentFragment # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#125 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:125 def name; end # The options used to parse the document fragment. Returns the value of any options that were # passed into the constructor as a parameter or set in a config block, else the default # options for the specific subclass. # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#12 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:12 def parse_options; end # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] @@ -3623,52 +3625,51 @@ class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node # # For more information see Nokogiri::XML::Searchable#search # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#192 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:192 def search(*rules); end - # Convert this DocumentFragment to a string - # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#131 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:204 def serialize; end # Convert this DocumentFragment to html # See Nokogiri::XML::NodeSet#to_html # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#138 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:138 def to_html(*args); end # Convert this DocumentFragment to a string # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#131 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:131 def to_s; end # Convert this DocumentFragment to xhtml # See Nokogiri::XML::NodeSet#to_xhtml # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#150 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:150 def to_xhtml(*args); end # Convert this DocumentFragment to xml # See Nokogiri::XML::NodeSet#to_xml # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#162 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:162 def to_xml(*args); end private # fix for issue 770 # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#268 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:268 def namespace_declarations(ctx); end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def native_new(_arg0); end # Wrapper method to separate the concerns of: # - the native object allocator's parameter (it only requires `document`) # - the initializer's parameters # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#42 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:42 def new(document, *_arg1, **_arg2, &_arg3); end # :call-seq: @@ -3692,11 +3693,12 @@ class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node # # [Returns] Nokogiri::XML::DocumentFragment # - # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#35 + # pkg:gem/nokogiri#lib/nokogiri/xml/document_fragment.rb:35 def parse(tags, options_ = T.unsafe(nil), options: T.unsafe(nil), &block); end end end +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::Element < ::Nokogiri::XML::Node; end # Represents the allowed content in an Element Declaration inside a DTD: @@ -3710,89 +3712,111 @@ class Nokogiri::XML::Element < ::Nokogiri::XML::Node; end # ElementContent represents the binary tree inside the tag shown above that lists the # possible content for the div1 tag. # -# source://nokogiri//lib/nokogiri/xml/element_content.rb#16 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::ElementContent include ::Nokogiri::XML::PP::Node # Get the children of this ElementContent node # - # source://nokogiri//lib/nokogiri/xml/element_content.rb#35 + # pkg:gem/nokogiri#lib/nokogiri/xml/element_content.rb:35 def children; end - # Returns the value of attribute document. - # - # source://nokogiri//lib/nokogiri/xml/element_content.rb#31 + # pkg:gem/nokogiri#lib/nokogiri/xml/element_content.rb:31 def document; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def name; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def occur; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def prefix; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def type; end private + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def c1; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def c2; end - # source://nokogiri//lib/nokogiri/xml/element_content.rb#41 + # pkg:gem/nokogiri#lib/nokogiri/xml/element_content.rb:41 def inspect_attributes; end end -# source://nokogiri//lib/nokogiri/xml/element_content.rb#21 +# pkg:gem/nokogiri#lib/nokogiri/xml/element_content.rb:21 Nokogiri::XML::ElementContent::ELEMENT = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/element_content.rb#28 +# pkg:gem/nokogiri#lib/nokogiri/xml/element_content.rb:28 Nokogiri::XML::ElementContent::MULT = T.let(T.unsafe(nil), Integer) # Possible content occurrences # -# source://nokogiri//lib/nokogiri/xml/element_content.rb#26 +# pkg:gem/nokogiri#lib/nokogiri/xml/element_content.rb:26 Nokogiri::XML::ElementContent::ONCE = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/element_content.rb#27 +# pkg:gem/nokogiri#lib/nokogiri/xml/element_content.rb:27 Nokogiri::XML::ElementContent::OPT = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/element_content.rb#23 +# pkg:gem/nokogiri#lib/nokogiri/xml/element_content.rb:23 Nokogiri::XML::ElementContent::OR = T.let(T.unsafe(nil), Integer) # Possible definitions of type # -# source://nokogiri//lib/nokogiri/xml/element_content.rb#20 +# pkg:gem/nokogiri#lib/nokogiri/xml/element_content.rb:20 Nokogiri::XML::ElementContent::PCDATA = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/element_content.rb#29 +# pkg:gem/nokogiri#lib/nokogiri/xml/element_content.rb:29 Nokogiri::XML::ElementContent::PLUS = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/element_content.rb#22 +# pkg:gem/nokogiri#lib/nokogiri/xml/element_content.rb:22 Nokogiri::XML::ElementContent::SEQ = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/element_decl.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::ElementDecl < ::Nokogiri::XML::Node + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def content; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def element_type; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def prefix; end private - # source://nokogiri//lib/nokogiri/xml/element_decl.rb#12 + # pkg:gem/nokogiri#lib/nokogiri/xml/element_decl.rb:12 def inspect_attributes; end end -# source://nokogiri//lib/nokogiri/xml/entity_decl.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::EntityDecl < ::Nokogiri::XML::Node + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def content; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def entity_type; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def external_id; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def original_content; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def system_id; end private - # source://nokogiri//lib/nokogiri/xml/entity_decl.rb#18 + # pkg:gem/nokogiri#lib/nokogiri/xml/entity_decl.rb:18 def inspect_attributes; end class << self - # source://nokogiri//lib/nokogiri/xml/entity_decl.rb#12 + # pkg:gem/nokogiri#lib/nokogiri/xml/entity_decl.rb:12 def new(name, doc, *args); end end end @@ -3804,24 +3828,25 @@ Nokogiri::XML::EntityDecl::INTERNAL_GENERAL = T.let(T.unsafe(nil), Integer) Nokogiri::XML::EntityDecl::INTERNAL_PARAMETER = T.let(T.unsafe(nil), Integer) Nokogiri::XML::EntityDecl::INTERNAL_PREDEFINED = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/entity_reference.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::EntityReference < ::Nokogiri::XML::Node - # source://nokogiri//lib/nokogiri/xml/entity_reference.rb#6 + # pkg:gem/nokogiri#lib/nokogiri/xml/entity_reference.rb:6 def children; end - # source://nokogiri//lib/nokogiri/xml/entity_reference.rb#15 + # pkg:gem/nokogiri#lib/nokogiri/xml/entity_reference.rb:15 def inspect_attributes; end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def new(*_arg0); end end end -# source://nokogiri//lib/nokogiri/xml/namespace.rb#6 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::Namespace include ::Nokogiri::XML::PP::Node - # :call-seq: deconstruct_keys(array_of_names) → Hash + # :call-seq: deconstruct_keys(array_of_names) → Hash # # Returns a hash describing the Namespace, to use in pattern matching. # @@ -3856,20 +3881,21 @@ class Nokogiri::XML::Namespace # # Since v1.14.0 # - # source://nokogiri//lib/nokogiri/xml/namespace.rb#46 + # pkg:gem/nokogiri#lib/nokogiri/xml/namespace.rb:46 def deconstruct_keys(keys); end - # Returns the value of attribute document. - # - # source://nokogiri//lib/nokogiri/xml/namespace.rb#8 + # pkg:gem/nokogiri#lib/nokogiri/xml/namespace.rb:8 def document; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def href; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def prefix; end private - # source://nokogiri//lib/nokogiri/xml/namespace.rb#52 + # pkg:gem/nokogiri#lib/nokogiri/xml/namespace.rb:52 def inspect_attributes; end end @@ -3921,7 +3947,7 @@ end # # See the method group entitled Node@Searching+via+XPath+or+CSS+Queries for the full set of methods. # -# source://nokogiri//lib/nokogiri/xml/node.rb#56 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::Node include ::Nokogiri::HTML5::Node include ::Nokogiri::XML::PP::Node @@ -3949,9 +3975,7 @@ class Nokogiri::XML::Node # [Yields] Nokogiri::XML::Node # [Returns] Nokogiri::XML::Node # - # @return [Node] a new instance of Node - # - # source://nokogiri//lib/nokogiri/xml/node.rb#126 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:126 def initialize(name, document); end # Add +node_or_tags+ as a child of this Node. @@ -3963,18 +3987,18 @@ class Nokogiri::XML::Node # # Also see related method +add_child+. # - # source://nokogiri//lib/nokogiri/xml/node.rb#292 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:292 def <<(node_or_tags); end # Compare two Node objects with respect to their Document. Nodes from # different documents cannot be compared. # - # source://nokogiri//lib/nokogiri/xml/node.rb#1340 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1340 def <=>(other); end # Test to see if this Node is equal to +other+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#1330 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1330 def ==(other); end # :call-seq: [](name) → (String, nil) @@ -4007,7 +4031,7 @@ class Nokogiri::XML::Node # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value # # => "broad" # - # source://nokogiri//lib/nokogiri/xml/node.rb#587 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:587 def [](name); end # :call-seq: []=(name, value) → value @@ -4044,12 +4068,12 @@ class Nokogiri::XML::Node # # " \n" + # # "\n" # - # source://nokogiri//lib/nokogiri/xml/node.rb#625 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:625 def []=(name, value); end # Accept a visitor. This method calls "visit" on +visitor+ with self. # - # source://nokogiri//lib/nokogiri/xml/node.rb#1324 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1324 def accept(visitor); end # Add +node_or_tags+ as a child of this Node. @@ -4062,7 +4086,7 @@ class Nokogiri::XML::Node # # Also see related method +<<+. # - # source://nokogiri//lib/nokogiri/xml/node.rb#184 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:184 def add_child(node_or_tags); end # :call-seq: add_class(names) → self @@ -4106,10 +4130,13 @@ class Nokogiri::XML::Node # node # =>
# node.add_class(["section", "header"]) # =>
# - # source://nokogiri//lib/nokogiri/xml/node.rb#790 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:790 def add_class(names); end + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:544 def add_namespace(_arg0, _arg1); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def add_namespace_definition(_arg0, _arg1); end # Insert +node_or_tags+ after this Node (as a sibling). @@ -4122,9 +4149,7 @@ class Nokogiri::XML::Node # # Also see related method +after+. # - # @raise [ArgumentError] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#324 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:324 def add_next_sibling(node_or_tags); end # Insert +node_or_tags+ before this Node (as a sibling). @@ -4137,9 +4162,7 @@ class Nokogiri::XML::Node # # Also see related method +before+. # - # @raise [ArgumentError] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#307 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:307 def add_previous_sibling(node_or_tags); end # Insert +node_or_tags+ after this node (as a sibling). @@ -4151,13 +4174,13 @@ class Nokogiri::XML::Node # # Also see related method +add_next_sibling+. # - # source://nokogiri//lib/nokogiri/xml/node.rb#354 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:354 def after(node_or_tags); end # Get a list of ancestor Node for this Node. If +selector+ is given, # the ancestors must match +selector+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#1293 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1293 def ancestors(selector = T.unsafe(nil)); end # :call-seq: append_class(names) → self @@ -4199,44 +4222,19 @@ class Nokogiri::XML::Node # node.append_class(["section", "header"]) # =>
# node.append_class(["section", "header"]) # =>
# - # source://nokogiri//lib/nokogiri/xml/node.rb#834 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:834 def append_class(names); end - # :call-seq: [](name) → (String, nil) - # - # Fetch an attribute from this node. - # - # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access - # namespaced attributes, use #attribute_with_ns. - # - # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists - # - # *Example* - # - # doc = Nokogiri::XML("") - # child = doc.at_css("child") - # child["size"] # => "large" - # child["class"] # => "big wide tall" - # - # *Example:* Namespaced attributes will not be returned. - # - # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns - # - # doc = Nokogiri::XML(<<~EOF) - # - # - # - # EOF - # doc.at_css("child")["size"] # => nil - # doc.at_css("child").attribute("size").value # => "broad" - # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value - # # => "broad" - # - # source://nokogiri//lib/nokogiri/xml/node.rb#587 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1082 def attr(name); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def attribute(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def attribute_nodes; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def attribute_with_ns(_arg0, _arg1); end # :call-seq: attributes() → Hash @@ -4293,7 +4291,7 @@ class Nokogiri::XML::Node # # value = "tall" # # })} # - # source://nokogiri//lib/nokogiri/xml/node.rb#684 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:684 def attributes; end # Insert +node_or_tags+ before this node (as a sibling). @@ -4305,22 +4303,24 @@ class Nokogiri::XML::Node # # Also see related method +add_previous_sibling+. # - # source://nokogiri//lib/nokogiri/xml/node.rb#340 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:340 def before(node_or_tags); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def blank?; end - # source://nokogiri//lib/nokogiri/xml/node.rb#1492 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1492 def canonicalize(mode = T.unsafe(nil), inclusive_namespaces = T.unsafe(nil), with_comments = T.unsafe(nil)); end # Returns true if this is a CDATA # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1214 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1214 def cdata?; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def child; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def children; end # Set the content for this Node +node_or_tags+ @@ -4330,7 +4330,7 @@ class Nokogiri::XML::Node # # Also see related method +inner_html=+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#385 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:385 def children=(node_or_tags); end # :call-seq: classes() → Array @@ -4352,7 +4352,7 @@ class Nokogiri::XML::Node # node # =>
# node.classes # => ["section", "title", "header"] # - # source://nokogiri//lib/nokogiri/xml/node.rb#744 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:744 def classes; end # :call-seq: @@ -4368,16 +4368,15 @@ class Nokogiri::XML::Node # The new node's parent Document. Defaults to the the Document of the current node. # [Returns] The new Nokogiri::XML::Node # - # source://nokogiri//lib/nokogiri/xml/node.rb#162 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:162 def clone(level = T.unsafe(nil), new_parent_doc = T.unsafe(nil)); end # Returns true if this is a Comment # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1209 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1209 def comment?; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def content; end # call-seq: @@ -4422,20 +4421,24 @@ class Nokogiri::XML::Node # # See also: #native_content= # - # source://nokogiri//lib/nokogiri/xml/node.rb#487 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:487 def content=(string); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def create_external_subset(_arg0, _arg1, _arg2); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def create_internal_subset(_arg0, _arg1, _arg2); end # Get the path to this node as a CSS expression # - # source://nokogiri//lib/nokogiri/xml/node.rb#1284 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1284 def css_path; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def data_ptr?; end - # :call-seq: deconstruct_keys(array_of_names) → Hash + # :call-seq: deconstruct_keys(array_of_names) → Hash # # Returns a hash describing the Node, to use in pattern matching. # @@ -4484,12 +4487,12 @@ class Nokogiri::XML::Node # # Since v1.14.0 # - # source://nokogiri//lib/nokogiri/xml/node.rb#1553 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1553 def deconstruct_keys(keys); end # Decorate this node with the decorators set up in this node's Document # - # source://nokogiri//lib/nokogiri/xml/node.rb#168 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:168 def decorate!; end # Adds a default namespace supplied as a string +url+ href, to self. @@ -4498,36 +4501,31 @@ class Nokogiri::XML::Node # now show up in #attributes, but when this node is serialized to XML an # "xmlns" attribute will appear. See also #namespace and #namespace= # - # source://nokogiri//lib/nokogiri/xml/node.rb#503 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:503 def default_namespace=(url); end - # Remove the attribute named +name+ - # - # source://nokogiri//lib/nokogiri/xml/node.rb#718 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1080 def delete(name); end # Fetch the Nokogiri::HTML4::ElementDescription for this node. Returns # nil on XML documents and on unknown tags. # - # source://nokogiri//lib/nokogiri/xml/node.rb#1251 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1251 def description; end # Do xinclude substitution on the subtree below node. If given a block, a # Nokogiri::XML::ParseOptions object initialized from +options+, will be # passed to it, allowing more convenient modification of the parser options. # - # @yield [options] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#530 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:530 def do_xinclude(options = T.unsafe(nil)); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def document; end # Returns true if this is a Document # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1229 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1229 def document?; end # :call-seq: @@ -4543,92 +4541,62 @@ class Nokogiri::XML::Node # The new node's parent Document. Defaults to the the Document of the current node. # [Returns] The new Nokogiri::XML::Node # - # source://nokogiri//lib/nokogiri/xml/node.rb#144 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:144 def dup(level = T.unsafe(nil), new_parent_doc = T.unsafe(nil)); end # Iterate over each attribute name and value pair for this Node. # - # source://nokogiri//lib/nokogiri/xml/node.rb#710 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:710 def each; end - # Returns true if this is an Element node - # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1265 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1269 def elem?; end # Returns true if this is an Element node # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1265 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1265 def element?; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def element_children; end + + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:553 def elements; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def encode_special_chars(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def external_subset; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def first_element_child; end # Create a DocumentFragment containing +tags+ that is relative to _this_ # context node. # - # source://nokogiri//lib/nokogiri/html5/node.rb#70 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1097 def fragment(tags); end # Returns true if this is a DocumentFragment # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1244 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1244 def fragment?; end - # :call-seq: [](name) → (String, nil) - # - # Fetch an attribute from this node. - # - # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access - # namespaced attributes, use #attribute_with_ns. - # - # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists - # - # *Example* - # - # doc = Nokogiri::XML("") - # child = doc.at_css("child") - # child["size"] # => "large" - # child["class"] # => "big wide tall" - # - # *Example:* Namespaced attributes will not be returned. - # - # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns - # - # doc = Nokogiri::XML(<<~EOF) - # - # - # - # EOF - # doc.at_css("child")["size"] # => nil - # doc.at_css("child").attribute("size").value # => "broad" - # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value - # # => "broad" - # - # source://nokogiri//lib/nokogiri/xml/node.rb#587 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1081 def get_attribute(name); end + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1084 def has_attribute?(_arg0); end # Returns true if this is an HTML4::Document or HTML5::Document node # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1224 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1224 def html?; end # Get the inner_html for this node's Node#children # - # source://nokogiri//lib/nokogiri/html5/node.rb#31 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1279 def inner_html(options = T.unsafe(nil)); end # Set the content for this Node to +node_or_tags+. @@ -4646,18 +4614,23 @@ class Nokogiri::XML::Node # # Also see related method +children=+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#374 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:374 def inner_html=(node_or_tags); end # :section: + # + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:548 def inner_text; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def internal_subset; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def key?(_arg0); end # Get the attribute names for this Node. # - # source://nokogiri//lib/nokogiri/xml/node.rb#704 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:704 def keys; end # :call-seq: @@ -4711,7 +4684,7 @@ class Nokogiri::XML::Node # # Since v1.11.0 # - # source://nokogiri//lib/nokogiri/xml/node.rb#967 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:967 def kwattr_add(attribute_name, keywords); end # :call-seq: @@ -4760,7 +4733,7 @@ class Nokogiri::XML::Node # # Since v1.11.0 # - # source://nokogiri//lib/nokogiri/xml/node.rb#1020 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1020 def kwattr_append(attribute_name, keywords); end # :call-seq: @@ -4799,7 +4772,7 @@ class Nokogiri::XML::Node # # Since v1.11.0 # - # source://nokogiri//lib/nokogiri/xml/node.rb#1063 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1063 def kwattr_remove(attribute_name, keywords); end # :call-seq: @@ -4828,24 +4801,36 @@ class Nokogiri::XML::Node # # Since v1.11.0 # - # source://nokogiri//lib/nokogiri/xml/node.rb#913 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:913 def kwattr_values(attribute_name); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def lang; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def lang=(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def last_element_child; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def line; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def line=(_arg0); end # Returns true if this Node matches +selector+ # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1090 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1090 def matches?(selector); end + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:551 def name; end + + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:543 def name=(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def namespace; end # Set the default namespace on this node (as would be defined with an @@ -4854,11 +4839,16 @@ class Nokogiri::XML::Node # for this node. You probably want #default_namespace= instead, or perhaps # #add_namespace_definition with a nil prefix argument. # - # source://nokogiri//lib/nokogiri/xml/node.rb#513 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:513 def namespace=(ns); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def namespace_definitions; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def namespace_scopes; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def namespaced_key?(_arg0, _arg1); end # :call-seq: @@ -4897,49 +4887,52 @@ class Nokogiri::XML::Node # # "xmlns"=>"http://example.com/root", # # "xmlns:in_scope"=>"http://example.com/in_scope"} # - # source://nokogiri//lib/nokogiri/xml/node.rb#1200 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1200 def namespaces; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def native_content=(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:538 def next; end - # Insert +node_or_tags+ after this Node (as a sibling). - # - # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String - # containing markup. - # - # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is - # a DocumentFragment, NodeSet, or String). - # - # Also see related method +after+. - # - # @raise [ArgumentError] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#324 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:540 def next=(node_or_tags); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def next_element; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def next_sibling; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def node_name; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def node_name=(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def node_type; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def parent; end # Set the parent Node for this Node # - # source://nokogiri//lib/nokogiri/xml/node.rb#493 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:493 def parent=(parent_node); end # Parse +string_or_io+ as a document fragment within the context of # *this* node. Returns a XML::NodeSet containing the nodes parsed from # +string_or_io+. # - # @yield [options] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1105 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1105 def parse(string_or_io, options = T.unsafe(nil)); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def path; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def pointer_id; end # Add +node_or_tags+ as the first child of this Node. @@ -4952,48 +4945,37 @@ class Nokogiri::XML::Node # # Also see related method +add_child+. # - # source://nokogiri//lib/nokogiri/xml/node.rb#204 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:204 def prepend_child(node_or_tags); end + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:539 def previous; end - # Insert +node_or_tags+ before this Node (as a sibling). - # - # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String - # containing markup. - # - # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is - # a DocumentFragment, NodeSet, or String). - # - # Also see related method +before+. - # - # @raise [ArgumentError] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#307 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:541 def previous=(node_or_tags); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def previous_element; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def previous_sibling; end # Returns true if this is a ProcessingInstruction node # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1234 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1234 def processing_instruction?; end # Is this a read only node? # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1259 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1259 def read_only?; end + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:542 def remove; end # Remove the attribute named +name+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#718 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:718 def remove_attribute(name); end # :call-seq: @@ -5042,7 +5024,7 @@ class Nokogiri::XML::Node # node # =>
# node.remove_class(["section", "float"]) # =>
# - # source://nokogiri//lib/nokogiri/xml/node.rb#884 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:884 def remove_class(names = T.unsafe(nil)); end # Replace this Node with +node_or_tags+. @@ -5055,7 +5037,7 @@ class Nokogiri::XML::Node # # Also see related method +swap+. # - # source://nokogiri//lib/nokogiri/xml/node.rb#405 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:405 def replace(node_or_tags); end # Serialize Node using +options+. Save options can also be set using a block. @@ -5070,65 +5052,30 @@ class Nokogiri::XML::Node # config.format.as_xml # end # - # source://nokogiri//lib/nokogiri/xml/node.rb#1364 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1364 def serialize(*args, &block); end - # :call-seq: []=(name, value) → value + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1083 + def set_attribute(name, value); end + + # Swap this Node for +node_or_tags+ # - # Update the attribute +name+ to +value+, or create the attribute if it does not exist. + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # Containing markup. # - # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access - # namespaced attributes for update, use #attribute_with_ns. To add a namespaced attribute, - # see the example below. + # Returns self, to support chaining of calls. # - # [Returns] +value+ + # Also see related method +replace+. # - # *Example* + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:439 + def swap(node_or_tags); end + + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:549 + def text; end + + # Returns true if this is a Text node # - # doc = Nokogiri::XML("") - # child = doc.at_css("child") - # child["size"] = "broad" - # child.to_html - # # => "" - # - # *Example:* Add a namespaced attribute. - # - # doc = Nokogiri::XML(<<~EOF) - # - # - # - # EOF - # child = doc.at_css("child") - # child["size"] = "broad" - # ns = doc.root.namespace_definitions.find { |ns| ns.prefix == "width" } - # child.attribute("size").namespace = ns - # doc.to_html - # # => "\n" + - # # " \n" + - # # "\n" - # - # source://nokogiri//lib/nokogiri/xml/node.rb#625 - def set_attribute(name, value); end - - # Swap this Node for +node_or_tags+ - # - # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String - # Containing markup. - # - # Returns self, to support chaining of calls. - # - # Also see related method +replace+. - # - # source://nokogiri//lib/nokogiri/xml/node.rb#439 - def swap(node_or_tags); end - - def text; end - - # Returns true if this is a Text node - # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1239 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1239 def text?; end # Serialize this Node to HTML @@ -5138,15 +5085,16 @@ class Nokogiri::XML::Node # See Node#write_to for a list of +options+. For formatted output, # use Node#to_xhtml instead. # - # source://nokogiri//lib/nokogiri/xml/node.rb#1391 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1391 def to_html(options = T.unsafe(nil)); end # Turn this node in to a string. If the document is HTML, this method # returns html. If the document is XML, this method returns XML. # - # source://nokogiri//lib/nokogiri/xml/node.rb#1274 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1274 def to_s; end + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:550 def to_str; end # Serialize this Node to XHTML using +options+ @@ -5154,7 +5102,7 @@ class Nokogiri::XML::Node # # See Node#write_to for a list of +options+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#1412 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1412 def to_xhtml(options = T.unsafe(nil)); end # Serialize this Node to XML using +options+ @@ -5162,30 +5110,28 @@ class Nokogiri::XML::Node # # See Node#write_to for a list of +options+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#1401 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1401 def to_xml(options = T.unsafe(nil)); end # Yields self and all children to +block+ recursively. # - # @yield [_self] - # @yieldparam _self [Nokogiri::XML::Node] the object that the method was called on - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1317 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1317 def traverse(&block); end + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:552 def type; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def unlink; end # Does this Node's attributes include # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#698 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:698 def value?(value); end # Get the attribute values for this Node. # - # source://nokogiri//lib/nokogiri/xml/node.rb#692 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:692 def values; end # :call-seq: @@ -5232,14 +5178,14 @@ class Nokogiri::XML::Node # # # # # - # source://nokogiri//lib/nokogiri/xml/node.rb#259 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:259 def wrap(node_or_tags); end # Write Node as HTML to +io+ with +options+ # # See Node#write_to for a list of +options+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#1469 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1469 def write_html_to(io, options = T.unsafe(nil)); end # :call-seq: @@ -5264,16 +5210,14 @@ class Nokogiri::XML::Node # # node.write_to(io, indent_text: '-', indent: 2) # - # @yield [config] - # - # source://nokogiri//lib/nokogiri/html5/node.rb#39 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1440 def write_to(io, *options); end # Write Node as XHTML to +io+ with +options+ # # See Node#write_to for a list of +options+ # - # source://nokogiri//lib/nokogiri/xml/node.rb#1477 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1477 def write_xhtml_to(io, options = T.unsafe(nil)); end # Write Node as XML to +io+ with +options+ @@ -5282,316 +5226,338 @@ class Nokogiri::XML::Node # # See Node#write_to for a list of options # - # source://nokogiri//lib/nokogiri/xml/node.rb#1487 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1487 def write_xml_to(io, options = T.unsafe(nil)); end # Returns true if this is an XML::Document node # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1219 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1219 def xml?; end protected - # @raise [ArgumentError] - # - # source://nokogiri//lib/nokogiri/xml/node.rb#1567 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1567 def coerce(data); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def initialize_copy_with_args(_arg0, _arg1, _arg2); end private + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def add_child_node(_arg0); end - # source://nokogiri//lib/nokogiri/html5/node.rb#83 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1639 def add_child_node_and_reparent_attrs(node); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def add_next_sibling_node(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def add_previous_sibling_node(_arg0); end - # source://nokogiri//lib/nokogiri/xml/node.rb#1601 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1601 def add_sibling(next_or_previous, node_or_tags); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def compare(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def dump_html; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def get(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def html_standard_serialize(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def in_context(_arg0, _arg1); end - # source://nokogiri//lib/nokogiri/xml/node.rb#1633 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1633 def inspect_attributes; end - # source://nokogiri//lib/nokogiri/xml/node.rb#1589 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1589 def keywordify(keywords); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def native_write_to(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def prepend_newline?; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def process_xincludes(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def replace_node(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def set(_arg0, _arg1); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def set_namespace(_arg0); end - # source://nokogiri//lib/nokogiri/xml/node.rb#1623 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1623 def to_format(save_option, options); end - # source://nokogiri//lib/nokogiri/xml/node.rb#1628 + # pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1628 def write_format_to(save_option, io, options); end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def new(*_arg0); end end end # Attribute declaration type # -# source://nokogiri//lib/nokogiri/xml/node.rb#93 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:93 Nokogiri::XML::Node::ATTRIBUTE_DECL = T.let(T.unsafe(nil), Integer) # Attribute node type # -# source://nokogiri//lib/nokogiri/xml/node.rb#65 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:65 Nokogiri::XML::Node::ATTRIBUTE_NODE = T.let(T.unsafe(nil), Integer) # CDATA node type, see Nokogiri::XML::Node#cdata? # -# source://nokogiri//lib/nokogiri/xml/node.rb#69 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:69 Nokogiri::XML::Node::CDATA_SECTION_NODE = T.let(T.unsafe(nil), Integer) # Comment node type, see Nokogiri::XML::Node#comment? # -# source://nokogiri//lib/nokogiri/xml/node.rb#77 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:77 Nokogiri::XML::Node::COMMENT_NODE = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/node.rb#1500 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1500 Nokogiri::XML::Node::DECONSTRUCT_KEYS = T.let(T.unsafe(nil), Array) -# source://nokogiri//lib/nokogiri/xml/node.rb#1501 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1501 Nokogiri::XML::Node::DECONSTRUCT_METHODS = T.let(T.unsafe(nil), Hash) # DOCB document node type # -# source://nokogiri//lib/nokogiri/xml/node.rb#103 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:103 Nokogiri::XML::Node::DOCB_DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) # Document fragment node type # -# source://nokogiri//lib/nokogiri/xml/node.rb#83 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:83 Nokogiri::XML::Node::DOCUMENT_FRAG_NODE = T.let(T.unsafe(nil), Integer) # Document node type, see Nokogiri::XML::Node#xml? # -# source://nokogiri//lib/nokogiri/xml/node.rb#79 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:79 Nokogiri::XML::Node::DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) # Document type node type # -# source://nokogiri//lib/nokogiri/xml/node.rb#81 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:81 Nokogiri::XML::Node::DOCUMENT_TYPE_NODE = T.let(T.unsafe(nil), Integer) # DTD node type # -# source://nokogiri//lib/nokogiri/xml/node.rb#89 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:89 Nokogiri::XML::Node::DTD_NODE = T.let(T.unsafe(nil), Integer) # Element declaration type # -# source://nokogiri//lib/nokogiri/xml/node.rb#91 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:91 Nokogiri::XML::Node::ELEMENT_DECL = T.let(T.unsafe(nil), Integer) # Element node type, see Nokogiri::XML::Node#element? # -# source://nokogiri//lib/nokogiri/xml/node.rb#63 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:63 Nokogiri::XML::Node::ELEMENT_NODE = T.let(T.unsafe(nil), Integer) # Entity declaration type # -# source://nokogiri//lib/nokogiri/xml/node.rb#95 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:95 Nokogiri::XML::Node::ENTITY_DECL = T.let(T.unsafe(nil), Integer) # Entity node type # -# source://nokogiri//lib/nokogiri/xml/node.rb#73 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:73 Nokogiri::XML::Node::ENTITY_NODE = T.let(T.unsafe(nil), Integer) # Entity reference node type # -# source://nokogiri//lib/nokogiri/xml/node.rb#71 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:71 Nokogiri::XML::Node::ENTITY_REF_NODE = T.let(T.unsafe(nil), Integer) # HTML document node type, see Nokogiri::XML::Node#html? # -# source://nokogiri//lib/nokogiri/xml/node.rb#87 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:87 Nokogiri::XML::Node::HTML_DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/node.rb#1637 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:1637 Nokogiri::XML::Node::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) # Namespace declaration type # -# source://nokogiri//lib/nokogiri/xml/node.rb#97 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:97 Nokogiri::XML::Node::NAMESPACE_DECL = T.let(T.unsafe(nil), Integer) # Notation node type # -# source://nokogiri//lib/nokogiri/xml/node.rb#85 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:85 Nokogiri::XML::Node::NOTATION_NODE = T.let(T.unsafe(nil), Integer) # PI node type # -# source://nokogiri//lib/nokogiri/xml/node.rb#75 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:75 Nokogiri::XML::Node::PI_NODE = T.let(T.unsafe(nil), Integer) # Save options for serializing nodes. # See the method group entitled Node@Serialization+and+Generating+Output for usage. # -# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#9 +# pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:9 class Nokogiri::XML::Node::SaveOptions # Create a new SaveOptions object with +options+ # - # @return [SaveOptions] a new instance of SaveOptions - # - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#47 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:47 def initialize(options = T.unsafe(nil)); end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def as_html; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def as_html?; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def as_xhtml; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def as_xhtml?; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def as_xml; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def as_xml?; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def default_html; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def default_html?; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def default_xhtml; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def default_xhtml?; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def default_xml; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def default_xml?; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def format; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def format?; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#66 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:66 def inspect; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def no_declaration; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def no_declaration?; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def no_empty_tags; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def no_empty_tags?; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def no_xhtml; end - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:52 def no_xhtml?; end # Integer representation of the SaveOptions # - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#44 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:44 def options; end - # Integer representation of the SaveOptions - # - # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#44 + # pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:64 def to_i; end end # Save as HTML # -# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#23 +# pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:23 Nokogiri::XML::Node::SaveOptions::AS_HTML = T.let(T.unsafe(nil), Integer) # Save as XHTML # -# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#19 +# pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:19 Nokogiri::XML::Node::SaveOptions::AS_XHTML = T.let(T.unsafe(nil), Integer) # Save as XML # -# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#21 +# pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:21 Nokogiri::XML::Node::SaveOptions::AS_XML = T.let(T.unsafe(nil), Integer) +# https://github.com/sparklemotion/nokogiri/issues/#issue/415 +# the default for HTML document # the default for HTML document # -# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#38 +# pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:38 Nokogiri::XML::Node::SaveOptions::DEFAULT_HTML = T.let(T.unsafe(nil), Integer) +# the default for XHTML document # the default for XHTML document # -# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#40 +# pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:40 Nokogiri::XML::Node::SaveOptions::DEFAULT_XHTML = T.let(T.unsafe(nil), Integer) +# the default for XML documents # the default for XML documents # -# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#36 +# pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:36 Nokogiri::XML::Node::SaveOptions::DEFAULT_XML = T.let(T.unsafe(nil), Integer) # Format serialized xml # -# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#11 +# pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:11 Nokogiri::XML::Node::SaveOptions::FORMAT = T.let(T.unsafe(nil), Integer) # Do not include declarations # -# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#13 +# pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:13 Nokogiri::XML::Node::SaveOptions::NO_DECLARATION = T.let(T.unsafe(nil), Integer) # Do not include empty tags # -# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#15 +# pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:15 Nokogiri::XML::Node::SaveOptions::NO_EMPTY_TAGS = T.let(T.unsafe(nil), Integer) # Do not save XHTML # -# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#17 +# pkg:gem/nokogiri#lib/nokogiri/xml/node/save_options.rb:17 Nokogiri::XML::Node::SaveOptions::NO_XHTML = T.let(T.unsafe(nil), Integer) # Text node type, see Nokogiri::XML::Node#text? # -# source://nokogiri//lib/nokogiri/xml/node.rb#67 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:67 Nokogiri::XML::Node::TEXT_NODE = T.let(T.unsafe(nil), Integer) # XInclude end type # -# source://nokogiri//lib/nokogiri/xml/node.rb#101 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:101 Nokogiri::XML::Node::XINCLUDE_END = T.let(T.unsafe(nil), Integer) # XInclude start type # -# source://nokogiri//lib/nokogiri/xml/node.rb#99 +# pkg:gem/nokogiri#lib/nokogiri/xml/node.rb:99 Nokogiri::XML::Node::XINCLUDE_START = T.let(T.unsafe(nil), Integer) # A NodeSet is an Enumerable that contains a list of Nokogiri::XML::Node objects. @@ -5602,46 +5568,39 @@ Nokogiri::XML::Node::XINCLUDE_START = T.let(T.unsafe(nil), Integer) # Note that the `#dup` and `#clone` methods perform shallow copies; these methods do not copy # the Nodes contained in the NodeSet (similar to how Array and other Enumerable classes work). # -# source://nokogiri//lib/nokogiri/xml/node_set.rb#14 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::NodeSet include ::Nokogiri::XML::Searchable include ::Enumerable # Create a NodeSet with +document+ defaulting to +list+ # - # @return [NodeSet] a new instance of NodeSet - # @yield [_self] - # @yieldparam _self [Nokogiri::XML::NodeSet] the object that the method was called on - # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#22 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:22 def initialize(document, list = T.unsafe(nil)); end - # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] - # - # Search this object for +paths+, and return only the first - # result. +paths+ must be one or more XPath or CSS queries. - # - # See Searchable#search for more information. - # - # Or, if passed an integer, index into the NodeSet: - # - # node_set.at(3) # same as node_set[3] - # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#121 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:128 def %(*args); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def &(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:433 def +(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def -(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:75 def <<(_arg0); end # Equality -- Two NodeSets are equal if the contain the same number # of elements and if each element is equal to the corresponding # element in the other NodeSet # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#395 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:395 def ==(other); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def [](*_arg0); end # Add the class attribute +name+ to all Node objects in the @@ -5649,12 +5608,12 @@ class Nokogiri::XML::NodeSet # # See Nokogiri::XML::Node#add_class for more information. # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#141 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:141 def add_class(name); end # Insert +datum+ after the last Node in this NodeSet # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#71 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:71 def after(datum); end # Append the class attribute +name+ to all Node objects in the @@ -5662,7 +5621,7 @@ class Nokogiri::XML::NodeSet # # See Nokogiri::XML::Node#append_class for more information. # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#153 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:153 def append_class(name); end # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] @@ -5676,7 +5635,7 @@ class Nokogiri::XML::NodeSet # # node_set.at(3) # same as node_set[3] # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#121 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:121 def at(*args); end # Set attributes on each Node in the NodeSet, or get an @@ -5711,53 +5670,21 @@ class Nokogiri::XML::NodeSet # # node_set.attr("class") { |node| node.name } # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#205 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:205 def attr(key, value = T.unsafe(nil), &block); end - # Set attributes on each Node in the NodeSet, or get an - # attribute from the first Node in the NodeSet. - # - # To get an attribute from the first Node in a NodeSet: - # - # node_set.attr("href") # => "https://www.nokogiri.org" - # - # Note that an empty NodeSet will return nil when +#attr+ is called as a getter. - # - # To set an attribute on each node, +key+ can either be an - # attribute name, or a Hash of attribute names and values. When - # called as a setter, +#attr+ returns the NodeSet. - # - # If +key+ is an attribute name, then either +value+ or +block+ - # must be passed. - # - # If +key+ is a Hash then attributes will be set for each - # key/value pair: - # - # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member") - # - # If +value+ is passed, it will be used as the attribute value - # for all nodes: - # - # node_set.attr("href", "https://www.nokogiri.org") - # - # If +block+ is passed, it will be called on each Node object in - # the NodeSet and the return value used as the attribute value - # for that node: - # - # node_set.attr("class") { |node| node.name } - # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#205 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:221 def attribute(key, value = T.unsafe(nil), &block); end # Insert +datum+ before the first Node in this NodeSet # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#65 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:65 def before(datum); end # Returns a new NodeSet containing all the children of all the nodes in # the NodeSet # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#408 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:408 def children; end # call-seq: css *rules, [namespace-bindings, custom-pseudo-class] @@ -5767,62 +5694,62 @@ class Nokogiri::XML::NodeSet # # For more information see Nokogiri::XML::Searchable#css # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#85 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:85 def css(*args); end - # :call-seq: deconstruct() → Array + # :call-seq: deconstruct() → Array # # Returns the members of this NodeSet as an array, to use in pattern matching. # # Since v1.14.0 # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#442 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:442 def deconstruct; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def delete(_arg0); end # The Document this NodeSet is associated with # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#19 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:19 def document; end # The Document this NodeSet is associated with # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#19 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:19 def document=(_arg0); end # Iterate over each node, yielding to +block+ # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#233 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:233 def each; end # Is this NodeSet empty? # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#47 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:47 def empty?; end # Filter this list for nodes that match +expr+ # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#132 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:132 def filter(expr); end # Get the first element of the NodeSet. # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#31 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:31 def first(n = T.unsafe(nil)); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def include?(_arg0); end # Returns the index of the first node in self that is == to +node+ or meets the given block. Returns nil if no match is found. # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#53 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:53 def index(node = T.unsafe(nil)); end # Get the inner html of all contained Node objects # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#262 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:262 def inner_html(*args); end # Get the inner text of all contained Node objects @@ -5838,38 +5765,40 @@ class Nokogiri::XML::NodeSet # # See Nokogiri::XML::Node#content for more information. # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#255 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:255 def inner_text; end # Return a nicely formatted string representation # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#429 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:429 def inspect; end # Get the last element of the NodeSet. # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#41 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:41 def last; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def length; end # Removes the last element from set and returns it, or +nil+ if # the set is empty # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#376 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:376 def pop; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def push(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:76 def remove; end # Remove the attributed named +name+ from all Node objects in the NodeSet # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#225 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:225 def remove_attr(name); end - # Remove the attributed named +name+ from all Node objects in the NodeSet - # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#225 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:229 def remove_attribute(name); end # Remove the class attribute +name+ from all Node objects in the @@ -5877,98 +5806,60 @@ class Nokogiri::XML::NodeSet # # See Nokogiri::XML::Node#remove_class for more information. # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#165 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:165 def remove_class(name = T.unsafe(nil)); end # Returns a new NodeSet containing all the nodes in the NodeSet # in reverse order # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#419 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:419 def reverse; end - # Set attributes on each Node in the NodeSet, or get an - # attribute from the first Node in the NodeSet. - # - # To get an attribute from the first Node in a NodeSet: - # - # node_set.attr("href") # => "https://www.nokogiri.org" - # - # Note that an empty NodeSet will return nil when +#attr+ is called as a getter. - # - # To set an attribute on each node, +key+ can either be an - # attribute name, or a Hash of attribute names and values. When - # called as a setter, +#attr+ returns the NodeSet. - # - # If +key+ is an attribute name, then either +value+ or +block+ - # must be passed. - # - # If +key+ is a Hash then attributes will be set for each - # key/value pair: - # - # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member") - # - # If +value+ is passed, it will be used as the attribute value - # for all nodes: - # - # node_set.attr("href", "https://www.nokogiri.org") - # - # If +block+ is passed, it will be called on each Node object in - # the NodeSet and the return value used as the attribute value - # for that node: - # - # node_set.attr("class") { |node| node.name } - # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#205 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:220 def set(key, value = T.unsafe(nil), &block); end # Returns the first element of the NodeSet and removes it. Returns # +nil+ if the set is empty. # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#385 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:385 def shift; end + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:370 def size; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def slice(*_arg0); end - # Get the inner text of all contained Node objects - # - # Note: This joins the text of all Node objects in the NodeSet: - # - # doc = Nokogiri::XML('foobar') - # doc.css('d').text # => "foobar" - # - # Instead, if you want to return the text of all nodes in the NodeSet: - # - # doc.css('d').map(&:text) # => ["foo", "bar"] - # - # See Nokogiri::XML::Node#content for more information. - # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#255 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:258 def text; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def to_a; end + + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:371 def to_ary; end # Convert this NodeSet to HTML # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#343 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:343 def to_html(*args); end # Convert this NodeSet to a string. # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#337 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:337 def to_s; end # Convert this NodeSet to XHTML # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#360 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:360 def to_xhtml(*args); end # Convert this NodeSet to XML # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#366 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:366 def to_xml(*args); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def unlink; end # :call-seq: @@ -6035,7 +5926,7 @@ class Nokogiri::XML::NodeSet # # # # # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#330 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:330 def wrap(node_or_tags); end # call-seq: xpath *paths, [namespace-bindings, variable-bindings, custom-handler-class] @@ -6045,46 +5936,48 @@ class Nokogiri::XML::NodeSet # # For more information see Nokogiri::XML::Searchable#xpath # - # source://nokogiri//lib/nokogiri/xml/node_set.rb#101 + # pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:101 def xpath(*args); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def |(_arg0); end private + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def initialize_copy(_arg0); end end -# source://nokogiri//lib/nokogiri/xml/node_set.rb#446 +# pkg:gem/nokogiri#lib/nokogiri/xml/node_set.rb:446 Nokogiri::XML::NodeSet::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) # Struct representing an {XML Schema Notation}[https://www.w3.org/TR/xml/#Notations] # -# source://nokogiri//lib/nokogiri/xml/notation.rb#6 +# pkg:gem/nokogiri#lib/nokogiri/xml/notation.rb:6 class Nokogiri::XML::Notation < ::Struct; end -# source://nokogiri//lib/nokogiri/xml/pp/node.rb#6 +# pkg:gem/nokogiri#lib/nokogiri/xml/pp/node.rb:6 module Nokogiri::XML::PP; end -# source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#7 +# pkg:gem/nokogiri#lib/nokogiri/xml/pp/character_data.rb:7 module Nokogiri::XML::PP::CharacterData - # source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#15 + # pkg:gem/nokogiri#lib/nokogiri/xml/pp/character_data.rb:15 def inspect; end - # source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#8 + # pkg:gem/nokogiri#lib/nokogiri/xml/pp/character_data.rb:8 def pretty_print(pp); end end -# source://nokogiri//lib/nokogiri/xml/pp/node.rb#7 +# pkg:gem/nokogiri#lib/nokogiri/xml/pp/node.rb:7 module Nokogiri::XML::PP::Node - # source://nokogiri//lib/nokogiri/xml/pp/node.rb#10 + # pkg:gem/nokogiri#lib/nokogiri/xml/pp/node.rb:10 def inspect; end - # source://nokogiri//lib/nokogiri/xml/pp/node.rb#32 + # pkg:gem/nokogiri#lib/nokogiri/xml/pp/node.rb:32 def pretty_print(pp); end end -# source://nokogiri//lib/nokogiri/xml/pp/node.rb#8 +# pkg:gem/nokogiri#lib/nokogiri/xml/pp/node.rb:8 Nokogiri::XML::PP::Node::COLLECTIONS = T.let(T.unsafe(nil), Array) # Options that control the parsing behavior for XML::Document, XML::DocumentFragment, @@ -6148,267 +6041,255 @@ Nokogiri::XML::PP::Node::COLLECTIONS = T.let(T.unsafe(nil), Array) # po = Nokogiri::XML::ParseOptions.new(Nokogiri::XML::ParseOptions::HUGE | Nokogiri::XML::ParseOptions::PEDANTIC) # doc = Nokogiri::XML::Document.parse(xml, nil, nil, po) # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#67 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:67 class Nokogiri::XML::ParseOptions - # @return [ParseOptions] a new instance of ParseOptions - # - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#165 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:169 def initialize(options = T.unsafe(nil)); end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#198 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:202 def ==(other); end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def big_lines; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def big_lines?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def compact; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def compact?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_html; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_html?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_schema; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_schema?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_xml; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_xml?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_xslt; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_xslt?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def dtdattr; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def dtdattr?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def dtdload; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def dtdload?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def dtdvalid; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def dtdvalid?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def huge; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def huge?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#204 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:208 def inspect; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nobasefix; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nobasefix?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nobig_lines; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noblanks; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noblanks?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nocdata; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nocdata?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nocompact; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodefault_html; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodefault_schema; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodefault_xml; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodefault_xslt; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodict; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodict?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodtdattr; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodtdload; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodtdvalid; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noent; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noent?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noerror; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noerror?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nohuge; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonet; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonet?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonobasefix; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonoblanks; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonocdata; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonodict; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonoent; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonoerror; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nononet; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonowarning; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonoxincnode; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonsclean; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noold10; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nopedantic; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def norecover; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nosax1; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nowarning; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nowarning?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noxinclude; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noxincnode; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noxincnode?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nsclean; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nsclean?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def old10; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def old10?; end - # Returns the value of attribute options. - # - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#163 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:167 def options; end - # Sets the attribute options - # - # @param value the value to set the attribute options to. - # - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#163 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:167 def options=(_arg0); end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def pedantic; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def pedantic?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def recover; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def recover?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def sax1; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def sax1?; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#189 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:193 def strict; end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#194 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:198 def strict?; end - # Returns the value of attribute options. - # - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#163 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:206 def to_i; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def xinclude; end - # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def xinclude?; end end @@ -6416,157 +6297,160 @@ end # by default for for XML::Document, XML::DocumentFragment, HTML4::Document, # HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#149 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:148 Nokogiri::XML::ParseOptions::BIG_LINES = T.let(T.unsafe(nil), Integer) # Compact small text nodes. Off by default. # -# ⚠ No modification of the DOM tree is allowed after parsing. libxml2 may crash if you try to -# modify the tree. +# ⚠ No modification of the DOM tree is allowed after parsing. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#133 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:132 Nokogiri::XML::ParseOptions::COMPACT = T.let(T.unsafe(nil), Integer) # The options mask used by default used for parsing HTML4::Document and HTML4::DocumentFragment # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#158 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:162 Nokogiri::XML::ParseOptions::DEFAULT_HTML = T.let(T.unsafe(nil), Integer) # The options mask used by default used for parsing XML::Schema # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#161 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:165 Nokogiri::XML::ParseOptions::DEFAULT_SCHEMA = T.let(T.unsafe(nil), Integer) # The options mask used by default for parsing XML::Document and XML::DocumentFragment # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#152 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:151 Nokogiri::XML::ParseOptions::DEFAULT_XML = T.let(T.unsafe(nil), Integer) -# The options mask used by default used for parsing XSLT::Stylesheet +# Shorthand options mask useful for parsing XSLT stylesheets: +# sets RECOVER, NONET, NOENT, DTDLOAD, DTDATTR, NOCDATA, BIG_LINES. +# +# 🛡 This option set includes `NOENT` and `DTDLOAD` which are unsafe for untrusted +# documents. Do not parse untrusted XSLT stylesheets. See Nokogiri::XSLT for more +# information. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#155 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:159 Nokogiri::XML::ParseOptions::DEFAULT_XSLT = T.let(T.unsafe(nil), Integer) # Default DTD attributes. On by default for XSLT::Stylesheet. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#88 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:88 Nokogiri::XML::ParseOptions::DTDATTR = T.let(T.unsafe(nil), Integer) # Load external subsets. On by default for XSLT::Stylesheet. # -# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# 🛡 It is UNSAFE to set this option when parsing untrusted documents. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#85 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:85 Nokogiri::XML::ParseOptions::DTDLOAD = T.let(T.unsafe(nil), Integer) # Validate with the DTD. Off by default. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#91 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:91 Nokogiri::XML::ParseOptions::DTDVALID = T.let(T.unsafe(nil), Integer) # Relax any hardcoded limit from the parser. Off by default. # -# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# 🛡 It is UNSAFE to set this option when parsing untrusted documents. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#144 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:143 Nokogiri::XML::ParseOptions::HUGE = T.let(T.unsafe(nil), Integer) # Do not fixup XInclude xml:base uris. Off by default # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#139 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:138 Nokogiri::XML::ParseOptions::NOBASEFIX = T.let(T.unsafe(nil), Integer) # Remove blank nodes. Off by default. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#103 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:103 Nokogiri::XML::ParseOptions::NOBLANKS = T.let(T.unsafe(nil), Integer) # Merge CDATA as text nodes. On by default for XSLT::Stylesheet. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#124 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:124 Nokogiri::XML::ParseOptions::NOCDATA = T.let(T.unsafe(nil), Integer) # Do not reuse the context dictionary. Off by default. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#118 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:118 Nokogiri::XML::ParseOptions::NODICT = T.let(T.unsafe(nil), Integer) # Substitute entities. Off by default. # # ⚠ This option enables entity substitution, contrary to what the name implies. # -# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# 🛡 It is UNSAFE to set this option when parsing untrusted documents. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#80 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:80 Nokogiri::XML::ParseOptions::NOENT = T.let(T.unsafe(nil), Integer) # Suppress error reports. On by default for HTML4::Document and HTML4::DocumentFragment # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#94 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:94 Nokogiri::XML::ParseOptions::NOERROR = T.let(T.unsafe(nil), Integer) # Forbid network access. On by default for XML::Document, XML::DocumentFragment, # HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. # -# ⚠ It is UNSAFE to unset this option when parsing untrusted documents. +# 🛡 It is UNSAFE to unset this option when parsing untrusted documents. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#115 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:115 Nokogiri::XML::ParseOptions::NONET = T.let(T.unsafe(nil), Integer) # Suppress warning reports. On by default for HTML4::Document and HTML4::DocumentFragment # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#97 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:97 Nokogiri::XML::ParseOptions::NOWARNING = T.let(T.unsafe(nil), Integer) # Do not generate XInclude START/END nodes. Off by default. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#127 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:127 Nokogiri::XML::ParseOptions::NOXINCNODE = T.let(T.unsafe(nil), Integer) # Remove redundant namespaces declarations. Off by default. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#121 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:121 Nokogiri::XML::ParseOptions::NSCLEAN = T.let(T.unsafe(nil), Integer) # Parse using XML-1.0 before update 5. Off by default # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#136 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:135 Nokogiri::XML::ParseOptions::OLD10 = T.let(T.unsafe(nil), Integer) # Enable pedantic error reporting. Off by default. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#100 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:100 Nokogiri::XML::ParseOptions::PEDANTIC = T.let(T.unsafe(nil), Integer) # Recover from errors. On by default for XML::Document, XML::DocumentFragment, # HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#73 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:73 Nokogiri::XML::ParseOptions::RECOVER = T.let(T.unsafe(nil), Integer) # Use the SAX1 interface internally. Off by default. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#106 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:106 Nokogiri::XML::ParseOptions::SAX1 = T.let(T.unsafe(nil), Integer) # Strict parsing # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#69 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:69 Nokogiri::XML::ParseOptions::STRICT = T.let(T.unsafe(nil), Integer) # Implement XInclude substitution. Off by default. # -# source://nokogiri//lib/nokogiri/xml/parse_options.rb#109 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:109 Nokogiri::XML::ParseOptions::XINCLUDE = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/processing_instruction.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::ProcessingInstruction < ::Nokogiri::XML::Node - # @return [ProcessingInstruction] a new instance of ProcessingInstruction - # - # source://nokogiri//lib/nokogiri/xml/processing_instruction.rb#6 + # pkg:gem/nokogiri#lib/nokogiri/xml/processing_instruction.rb:6 def initialize(document, name, content); end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def new(*_arg0); end end end @@ -6600,18 +6484,23 @@ end # ⚠ libxml2 does not support error recovery in the Reader parser. The +RECOVER+ ParseOption is # ignored. If a syntax error is encountered during parsing, an exception will be raised. # -# source://nokogiri//lib/nokogiri/xml/reader.rb#34 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::Reader include ::Enumerable - # @return [Reader] a new instance of Reader - # - # source://nokogiri//lib/nokogiri/xml/reader.rb#114 + # pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:114 def initialize(source, url = T.unsafe(nil), encoding = T.unsafe(nil)); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def attribute(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def attribute_at(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def attribute_count; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def attribute_hash; end # Get the attributes and namespaces of the current node as a Hash. @@ -6621,56 +6510,97 @@ class Nokogiri::XML::Reader # [Returns] # (Hash) Attribute names and values, and namespace prefixes and hrefs. # - # source://nokogiri//lib/nokogiri/xml/reader.rb#126 + # pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:126 def attributes; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def attributes?; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def base_uri; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def default?; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def depth; end # Move the cursor through the document yielding the cursor to the block # - # source://nokogiri//lib/nokogiri/xml/reader.rb#132 + # pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:132 def each; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def empty_element?; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def encoding; end # A list of errors encountered while parsing # - # source://nokogiri//lib/nokogiri/xml/reader.rb#74 + # pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:74 def errors; end # A list of errors encountered while parsing # - # source://nokogiri//lib/nokogiri/xml/reader.rb#74 + # pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:74 def errors=(_arg0); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def inner_xml; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def lang; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def local_name; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def name; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def namespace_uri; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def namespaces; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def node_type; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def outer_xml; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def prefix; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def read; end + + # pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:79 def self_closing?; end # The \XML source # - # source://nokogiri//lib/nokogiri/xml/reader.rb#77 + # pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:77 def source; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def state; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def value; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def value?; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def xml_version; end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def from_io(*_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def from_memory(*_arg0); end # :call-seq: @@ -6690,99 +6620,97 @@ class Nokogiri::XML::Reader # If present, the block will be passed a Nokogiri::XML::ParseOptions object to modify before # the fragment is parsed. See Nokogiri::XML::ParseOptions for more information. # - # @yield [options] - # - # source://nokogiri//lib/nokogiri/xml/reader.rb#99 + # pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:99 def new(string_or_io, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), options_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), options: T.unsafe(nil)); end end end # Attribute node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#41 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:41 Nokogiri::XML::Reader::TYPE_ATTRIBUTE = T.let(T.unsafe(nil), Integer) # CDATA node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#45 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:45 Nokogiri::XML::Reader::TYPE_CDATA = T.let(T.unsafe(nil), Integer) # Comment node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#53 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:53 Nokogiri::XML::Reader::TYPE_COMMENT = T.let(T.unsafe(nil), Integer) # Document node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#55 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:55 Nokogiri::XML::Reader::TYPE_DOCUMENT = T.let(T.unsafe(nil), Integer) # Document Fragment node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#59 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:59 Nokogiri::XML::Reader::TYPE_DOCUMENT_FRAGMENT = T.let(T.unsafe(nil), Integer) # Document Type node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#57 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:57 Nokogiri::XML::Reader::TYPE_DOCUMENT_TYPE = T.let(T.unsafe(nil), Integer) # Element node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#39 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:39 Nokogiri::XML::Reader::TYPE_ELEMENT = T.let(T.unsafe(nil), Integer) # Element end node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#67 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:67 Nokogiri::XML::Reader::TYPE_END_ELEMENT = T.let(T.unsafe(nil), Integer) # Entity end node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#69 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:69 Nokogiri::XML::Reader::TYPE_END_ENTITY = T.let(T.unsafe(nil), Integer) # Entity node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#49 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:49 Nokogiri::XML::Reader::TYPE_ENTITY = T.let(T.unsafe(nil), Integer) # Entity Reference node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#47 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:47 Nokogiri::XML::Reader::TYPE_ENTITY_REFERENCE = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/reader.rb#37 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:37 Nokogiri::XML::Reader::TYPE_NONE = T.let(T.unsafe(nil), Integer) # Notation node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#61 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:61 Nokogiri::XML::Reader::TYPE_NOTATION = T.let(T.unsafe(nil), Integer) # PI node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#51 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:51 Nokogiri::XML::Reader::TYPE_PROCESSING_INSTRUCTION = T.let(T.unsafe(nil), Integer) # Significant Whitespace node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#65 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:65 Nokogiri::XML::Reader::TYPE_SIGNIFICANT_WHITESPACE = T.let(T.unsafe(nil), Integer) # Text node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#43 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:43 Nokogiri::XML::Reader::TYPE_TEXT = T.let(T.unsafe(nil), Integer) # Whitespace node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#63 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:63 Nokogiri::XML::Reader::TYPE_WHITESPACE = T.let(T.unsafe(nil), Integer) # \XML Declaration node type # -# source://nokogiri//lib/nokogiri/xml/reader.rb#71 +# pkg:gem/nokogiri#lib/nokogiri/xml/reader.rb:71 Nokogiri::XML::Reader::TYPE_XML_DECLARATION = T.let(T.unsafe(nil), Integer) # Nokogiri::XML::RelaxNG is used for validating \XML against a RELAX NG schema definition. @@ -6811,13 +6739,15 @@ Nokogiri::XML::Reader::TYPE_XML_DECLARATION = T.let(T.unsafe(nil), Integer) # doc = Nokogiri::XML::Document.parse(File.open(XML_FILE)) # schema.valid?(doc) # Boolean # -# source://nokogiri//lib/nokogiri/xml/relax_ng.rb#42 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::RelaxNG < ::Nokogiri::XML::Schema private + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def validate_document(_arg0); end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def from_document(*_arg0); end # :call-seq: @@ -6838,7 +6768,7 @@ class Nokogiri::XML::RelaxNG < ::Nokogiri::XML::Schema # # Also see convenience method Nokogiri::XML::RelaxNG() # - # source://nokogiri//lib/nokogiri/xml/relax_ng.rb#60 + # pkg:gem/nokogiri#lib/nokogiri/xml/relax_ng.rb:60 def new(input, parse_options_ = T.unsafe(nil), options: T.unsafe(nil)); end # :call-seq: @@ -6847,7 +6777,7 @@ class Nokogiri::XML::RelaxNG < ::Nokogiri::XML::Schema # # Convenience method for Nokogiri::XML::RelaxNG.new. # - # source://nokogiri//lib/nokogiri/xml/relax_ng.rb#69 + # pkg:gem/nokogiri#lib/nokogiri/xml/relax_ng.rb:69 def read_memory(*_arg0, **_arg1, &_arg2); end end end @@ -6892,7 +6822,7 @@ end # Now my document handler will be called when each node starts, and when then document ends. To # see what kinds of events are available, take a look at Nokogiri::XML::SAX::Document. # -# source://nokogiri//lib/nokogiri/xml/sax.rb#46 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 module Nokogiri::XML::SAX; end # :markup: markdown @@ -6931,19 +6861,13 @@ module Nokogiri::XML::SAX; end # of ParserContext#replace_entities. (Recall that the default value of # ParserContext#replace_entities is `false`.) # -# ⚠ It is UNSAFE to set ParserContext#replace_entities to `true` when parsing untrusted +# 🛡 It is UNSAFE to set ParserContext#replace_entities to `true` when parsing untrusted # documents. # # 💡 For more information on entity types, see [Wikipedia's page on # DTDs](https://en.wikipedia.org/wiki/Document_type_definition#Entity_declarations). # -# | Entity type | #characters | #reference | # |--------------------------------------|------------------------------------|-------------------------------------| -# | Char ref (e.g., ) | always | never | -# | Predefined (e.g., &) | always | never | -# | Undeclared † | never | #replace_entities == false | -# | Internal | always | #replace_entities == false | -# | External † | #replace_entities == true | #replace_entities == false | # #   # @@ -6954,13 +6878,13 @@ module Nokogiri::XML::SAX; end # `false`, then the #reference callback will be invoked, but with `nil` for the `content` # argument. # -# source://nokogiri//lib/nokogiri/xml/sax/document.rb#65 +# pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:65 class Nokogiri::XML::SAX::Document # Called when cdata blocks are found # [Parameters] # - +string+ contains the cdata content # - # source://nokogiri//lib/nokogiri/xml/sax/document.rb#245 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:245 def cdata_block(string); end # Called when character data is parsed, and for parsed entities when @@ -6973,19 +6897,19 @@ class Nokogiri::XML::SAX::Document # # ⚠ This method might be called multiple times for a contiguous string of characters. # - # source://nokogiri//lib/nokogiri/xml/sax/document.rb#201 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:201 def characters(string); end # Called when comments are encountered # [Parameters] # - +string+ contains the comment data # - # source://nokogiri//lib/nokogiri/xml/sax/document.rb#224 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:224 def comment(string); end # Called when document ends parsing. # - # source://nokogiri//lib/nokogiri/xml/sax/document.rb#83 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:83 def end_document; end # Called at the end of an element. @@ -6993,7 +6917,7 @@ class Nokogiri::XML::SAX::Document # [Parameters] # - +name+ (String) the name of the element being closed # - # source://nokogiri//lib/nokogiri/xml/sax/document.rb#122 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:122 def end_element(name); end # Called at the end of an element. @@ -7003,14 +6927,14 @@ class Nokogiri::XML::SAX::Document # - +prefix+ (String, nil) is the namespace prefix for the element # - +uri+ (String, nil) is the associated URI for the element's namespace # - # source://nokogiri//lib/nokogiri/xml/sax/document.rb#185 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:185 def end_element_namespace(name, prefix = T.unsafe(nil), uri = T.unsafe(nil)); end # Called on document errors # [Parameters] # - +string+ contains the error # - # source://nokogiri//lib/nokogiri/xml/sax/document.rb#238 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:238 def error(string); end # Called when processing instructions are found @@ -7018,7 +6942,7 @@ class Nokogiri::XML::SAX::Document # - +name+ is the target of the instruction # - +content+ is the value of the instruction # - # source://nokogiri//lib/nokogiri/xml/sax/document.rb#253 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:253 def processing_instruction(name, content); end # Called when a parsed entity is referenced and not replaced. @@ -7033,12 +6957,12 @@ class Nokogiri::XML::SAX::Document # # Since v1.17.0 # - # source://nokogiri//lib/nokogiri/xml/sax/document.rb#217 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:217 def reference(name, content); end # Called when document starts parsing. # - # source://nokogiri//lib/nokogiri/xml/sax/document.rb#78 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:78 def start_document; end # Called at the beginning of an element. @@ -7067,7 +6991,7 @@ class Nokogiri::XML::SAX::Document # ] # end # - # source://nokogiri//lib/nokogiri/xml/sax/document.rb#113 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:113 def start_element(name, attrs = T.unsafe(nil)); end # Called at the beginning of an element. @@ -7110,14 +7034,14 @@ class Nokogiri::XML::SAX::Document # end # end # - # source://nokogiri//lib/nokogiri/xml/sax/document.rb#166 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:166 def start_element_namespace(name, attrs = T.unsafe(nil), prefix = T.unsafe(nil), uri = T.unsafe(nil), ns = T.unsafe(nil)); end # Called on document warnings # [Parameters] # - +string+ contains the warning # - # source://nokogiri//lib/nokogiri/xml/sax/document.rb#231 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:231 def warning(string); end # Called when an \XML declaration is parsed. @@ -7127,7 +7051,7 @@ class Nokogiri::XML::SAX::Document # - +encoding+ (String, nil) the encoding of the document if present, else +nil+ # - +standalone+ ("yes", "no", nil) the standalone attribute if present, else +nil+ # - # source://nokogiri//lib/nokogiri/xml/sax/document.rb#73 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/document.rb:73 def xmldecl(version, encoding, standalone); end end @@ -7162,7 +7086,7 @@ end # # For \HTML documents, use the subclass Nokogiri::HTML4::SAX::Parser. # -# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#38 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::SAX::Parser include ::Nokogiri::ClassResolver @@ -7180,29 +7104,27 @@ class Nokogiri::XML::SAX::Parser # - +encoding+ (optional Encoding, String, nil) An Encoding or encoding name to use when # parsing the input. (default +nil+ for auto-detection) # - # @return [Parser] a new instance of Parser - # - # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#95 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser.rb:95 def initialize(doc = T.unsafe(nil), encoding = T.unsafe(nil)); end # The Nokogiri::XML::SAX::Document where events will be sent. # - # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#75 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser.rb:75 def document; end # The Nokogiri::XML::SAX::Document where events will be sent. # - # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#75 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser.rb:75 def document=(_arg0); end # The encoding beings used for this document. # - # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#78 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser.rb:78 def encoding; end # The encoding beings used for this document. # - # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#78 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser.rb:78 def encoding=(_arg0); end # :call-seq: @@ -7220,7 +7142,7 @@ class Nokogiri::XML::SAX::Parser # If a block is given, the underlying ParserContext object will be yielded. This can be used # to set options on the parser context before parsing begins. # - # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#119 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser.rb:119 def parse(input, &block); end # :call-seq: @@ -7238,10 +7160,7 @@ class Nokogiri::XML::SAX::Parser # If a block is given, the underlying ParserContext object will be yielded. This can be used # to set options on the parser context before parsing begins. # - # @raise [ArgumentError] - # @yield [ctx] - # - # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#187 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser.rb:187 def parse_file(filename, encoding = T.unsafe(nil)); end # :call-seq: @@ -7259,9 +7178,7 @@ class Nokogiri::XML::SAX::Parser # If a block is given, the underlying ParserContext object will be yielded. This can be used # to set options on the parser context before parsing begins. # - # @yield [ctx] - # - # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#143 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser.rb:143 def parse_io(io, encoding = T.unsafe(nil)); end # :call-seq: @@ -7279,27 +7196,24 @@ class Nokogiri::XML::SAX::Parser # If a block is given, the underlying ParserContext object will be yielded. This can be used # to set options on the parser context before parsing begins. # - # @yield [ctx] - # - # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#165 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser.rb:165 def parse_memory(input, encoding = T.unsafe(nil)); end private + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def initialize_native; end end # Structure used for marshalling attributes for some callbacks in XML::SAX::Document. # -# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#43 +# pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser.rb:43 class Nokogiri::XML::SAX::Parser::Attribute < ::Struct; end -# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#46 +# pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser.rb:46 Nokogiri::XML::SAX::Parser::ENCODINGS = T.let(T.unsafe(nil), Hash) -# pure ASCII -# -# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#71 +# pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser.rb:71 Nokogiri::XML::SAX::Parser::REVERSE_ENCODINGS = T.let(T.unsafe(nil), Hash) # Context object to invoke the XML SAX parser on the SAX::Document handler. @@ -7307,14 +7221,27 @@ Nokogiri::XML::SAX::Parser::REVERSE_ENCODINGS = T.let(T.unsafe(nil), Hash) # 💡 This class is usually not instantiated by the user. Use Nokogiri::XML::SAX::Parser # instead. # -# source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#11 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::SAX::ParserContext + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def column; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def line; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def parse_with(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def recovery; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def recovery=(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def replace_entities; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def replace_entities=(_arg0); end class << self @@ -7334,7 +7261,7 @@ class Nokogiri::XML::SAX::ParserContext # 💡 Calling this method directly is discouraged. Use Nokogiri::XML::SAX::Parser.parse_file which # is more convenient for most use cases. # - # source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#97 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser_context.rb:97 def file(input, encoding = T.unsafe(nil)); end # :call-seq: @@ -7353,7 +7280,7 @@ class Nokogiri::XML::SAX::ParserContext # 💡 Calling this method directly is discouraged. Use Nokogiri::XML::SAX::Parser parse # methods which are more convenient for most use cases. # - # source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#56 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser_context.rb:56 def io(input, encoding = T.unsafe(nil)); end # :call-seq: @@ -7372,11 +7299,16 @@ class Nokogiri::XML::SAX::ParserContext # 💡 Calling this method directly is discouraged. Use Nokogiri::XML::SAX::Parser parse methods # which are more convenient for most use cases. # - # source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#77 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser_context.rb:77 def memory(input, encoding = T.unsafe(nil)); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def native_file(_arg0, _arg1); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def native_io(_arg0, _arg1); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def native_memory(_arg0, _arg1); end # :call-seq: @@ -7396,12 +7328,12 @@ class Nokogiri::XML::SAX::ParserContext # # [Returns] Nokogiri::XML::SAX::ParserContext # - # source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#31 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser_context.rb:31 def new(input, encoding = T.unsafe(nil)); end private - # source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#101 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/parser_context.rb:101 def resolve_encoding(encoding); end end end @@ -7427,32 +7359,27 @@ end # parser << "/div>" # parser.finish # -# source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#27 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::SAX::PushParser # Create a new PushParser with +doc+ as the SAX Document, providing # an optional +file_name+ and +encoding+ # - # @return [PushParser] a new instance of PushParser - # - # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#35 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/push_parser.rb:35 def initialize(doc = T.unsafe(nil), file_name = T.unsafe(nil), encoding = T.unsafe(nil)); end - # Write a +chunk+ of XML to the PushParser. Any callback methods - # that can be called will be called immediately. - # - # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#47 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/push_parser.rb:50 def <<(chunk, last_chunk = T.unsafe(nil)); end # The Nokogiri::XML::SAX::Document on which the PushParser will be # operating # - # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#30 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/push_parser.rb:30 def document; end # The Nokogiri::XML::SAX::Document on which the PushParser will be # operating # - # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#30 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/push_parser.rb:30 def document=(_arg0); end # Finish the parsing. This method is only necessary for @@ -7461,23 +7388,33 @@ class Nokogiri::XML::SAX::PushParser # ⚠ Note that empty documents are treated as an error when using the libxml2-based # implementation (CRuby), but are fine when using the Xerces-based implementation (JRuby). # - # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#58 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/push_parser.rb:58 def finish; end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def options; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def options=(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def replace_entities; end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def replace_entities=(_arg0); end # Write a +chunk+ of XML to the PushParser. Any callback methods # that can be called will be called immediately. # - # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#47 + # pkg:gem/nokogiri#lib/nokogiri/xml/sax/push_parser.rb:47 def write(chunk, last_chunk = T.unsafe(nil)); end private + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def initialize_native(_arg0, _arg1); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def native_write(_arg0, _arg1); end end @@ -7510,34 +7447,34 @@ end # doc = Nokogiri::XML::Document.parse(File.read(XML_FILE)) # schema.valid?(doc) # Boolean # -# source://nokogiri//lib/nokogiri/xml/schema.rb#45 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::Schema # The errors found while parsing the \XSD # # [Returns] Array # - # source://nokogiri//lib/nokogiri/xml/schema.rb#49 + # pkg:gem/nokogiri#lib/nokogiri/xml/schema.rb:49 def errors; end # The errors found while parsing the \XSD # # [Returns] Array # - # source://nokogiri//lib/nokogiri/xml/schema.rb#49 + # pkg:gem/nokogiri#lib/nokogiri/xml/schema.rb:49 def errors=(_arg0); end # The options used to parse the schema # # [Returns] Nokogiri::XML::ParseOptions # - # source://nokogiri//lib/nokogiri/xml/schema.rb#54 + # pkg:gem/nokogiri#lib/nokogiri/xml/schema.rb:54 def parse_options; end # The options used to parse the schema # # [Returns] Nokogiri::XML::ParseOptions # - # source://nokogiri//lib/nokogiri/xml/schema.rb#54 + # pkg:gem/nokogiri#lib/nokogiri/xml/schema.rb:54 def parse_options=(_arg0); end # :call-seq: valid?(input) → Boolean @@ -7560,9 +7497,7 @@ class Nokogiri::XML::Schema # schema = Nokogiri::XML::Schema.new(File.read(XSD_FILE)) # return unless schema.valid?("/path/to/file.xml") # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/schema.rb#135 + # pkg:gem/nokogiri#lib/nokogiri/xml/schema.rb:135 def valid?(input); end # :call-seq: validate(input) → Array @@ -7585,15 +7520,19 @@ class Nokogiri::XML::Schema # schema = Nokogiri::XML::Schema.new(File.read(XSD_FILE)) # errors = schema.validate("/path/to/file.xml") # - # source://nokogiri//lib/nokogiri/xml/schema.rb#104 + # pkg:gem/nokogiri#lib/nokogiri/xml/schema.rb:104 def validate(input); end private + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def validate_document(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def validate_file(_arg0); end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def from_document(*_arg0); end # :call-seq: @@ -7609,7 +7548,7 @@ class Nokogiri::XML::Schema # # [Returns] Nokogiri::XML::Schema # - # source://nokogiri//lib/nokogiri/xml/schema.rb#69 + # pkg:gem/nokogiri#lib/nokogiri/xml/schema.rb:69 def new(input, parse_options_ = T.unsafe(nil), parse_options: T.unsafe(nil)); end # :call-seq: @@ -7618,65 +7557,23 @@ class Nokogiri::XML::Schema # # Convenience method for Nokogiri::XML::Schema.new # - # source://nokogiri//lib/nokogiri/xml/schema.rb#78 + # pkg:gem/nokogiri#lib/nokogiri/xml/schema.rb:78 def read_memory(*_arg0, **_arg1, &_arg2); end end end -# The Searchable module declares the interface used for searching your DOM. +# The Searchable module declares the interface used for searching your DOM. # # It implements the public methods #search, #css, and #xpath, # as well as allowing specific implementations to specialize some # of the important behaviors. # -# source://nokogiri//lib/nokogiri/xml/searchable.rb#13 +# pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:13 module Nokogiri::XML::Searchable - # call-seq: - # at(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) - # - # Search this object for +paths+, and return only the first - # result. +paths+ must be one or more XPath or CSS queries. - # - # See Searchable#search for more information. - # - # source://nokogiri//lib/nokogiri/xml/searchable.rb#74 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:78 def %(*args); end - # call-seq: - # search(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) - # - # Search this object for +paths+. +paths+ must be one or more XPath or CSS queries: - # - # node.search("div.employee", ".//title") - # - # A hash of namespace bindings may be appended: - # - # node.search('.//bike:tire', {'bike' => 'http://schwinn.com/'}) - # node.search('bike|tire', {'bike' => 'http://schwinn.com/'}) - # - # For XPath queries, a hash of variable bindings may also be appended to the namespace - # bindings. For example: - # - # node.search('.//address[@domestic=$value]', nil, {:value => 'Yes'}) - # - # 💡 Custom XPath functions and CSS pseudo-selectors may also be defined. To define custom - # functions create a class and implement the function you want to define, which will be in the - # `nokogiri` namespace in XPath queries. - # - # The first argument to the method will be the current matching NodeSet. Any other arguments - # are ones that you pass in. Note that this class may appear anywhere in the argument - # list. For example: - # - # handler = Class.new { - # def regex node_set, regex - # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } - # end - # }.new - # node.search('.//title[nokogiri:regex(., "\w+")]', 'div.employee:regex("[0-9]+")', handler) - # - # See Searchable#xpath and Searchable#css for further usage help. - # - # source://nokogiri//lib/nokogiri/xml/searchable.rb#54 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:64 def /(*args); end # :call-seq: @@ -7684,7 +7581,7 @@ module Nokogiri::XML::Searchable # # Search this node's immediate children using CSS selector +selector+ # - # source://nokogiri//lib/nokogiri/xml/searchable.rb#201 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:201 def >(selector); end # call-seq: @@ -7695,7 +7592,7 @@ module Nokogiri::XML::Searchable # # See Searchable#search for more information. # - # source://nokogiri//lib/nokogiri/xml/searchable.rb#74 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:74 def at(*args); end # call-seq: @@ -7706,7 +7603,7 @@ module Nokogiri::XML::Searchable # # See Searchable#css for more information. # - # source://nokogiri//lib/nokogiri/xml/searchable.rb#143 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:143 def at_css(*args); end # call-seq: @@ -7717,7 +7614,7 @@ module Nokogiri::XML::Searchable # # See Searchable#xpath for more information. # - # source://nokogiri//lib/nokogiri/xml/searchable.rb#193 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:193 def at_xpath(*args); end # call-seq: @@ -7769,7 +7666,7 @@ module Nokogiri::XML::Searchable # you'll never find anything. However, "H1" might be found in an XML document, where tags # names are case-sensitive (e.g., "H1" is distinct from "h1"). # - # source://nokogiri//lib/nokogiri/xml/searchable.rb#129 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:129 def css(*args); end # call-seq: @@ -7806,7 +7703,7 @@ module Nokogiri::XML::Searchable # # See Searchable#xpath and Searchable#css for further usage help. # - # source://nokogiri//lib/nokogiri/xml/searchable.rb#54 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:54 def search(*args); end # call-seq: @@ -7840,95 +7737,75 @@ module Nokogiri::XML::Searchable # }.new # node.xpath('.//title[nokogiri:regex(., "\w+")]', handler) # - # source://nokogiri//lib/nokogiri/xml/searchable.rb#179 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:179 def xpath(*args); end private - # source://nokogiri//lib/nokogiri/xml/searchable.rb#228 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:228 def css_internal(node, rules, handler, ns); end - # source://nokogiri//lib/nokogiri/xml/searchable.rb#232 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:232 def css_rules_to_xpath(rules, ns); end - # source://nokogiri//lib/nokogiri/xml/searchable.rb#210 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:210 def extract_params(params); end - # source://nokogiri//lib/nokogiri/xml/searchable.rb#263 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:263 def xpath_impl(node, path, handler, ns, binds); end - # source://nokogiri//lib/nokogiri/xml/searchable.rb#248 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:248 def xpath_internal(node, paths, handler, ns, binds); end - # source://nokogiri//lib/nokogiri/xml/searchable.rb#236 + # pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:236 def xpath_query_from_css_rule(rule, ns); end end # Regular expression used by Searchable#search to determine if a query # string is CSS or XPath # -# source://nokogiri//lib/nokogiri/xml/searchable.rb#16 +# pkg:gem/nokogiri#lib/nokogiri/xml/searchable.rb:16 Nokogiri::XML::Searchable::LOOKS_LIKE_XPATH = T.let(T.unsafe(nil), Regexp) # This class provides information about XML SyntaxErrors. These # exceptions are typically stored on Nokogiri::XML::Document#errors. # -# source://nokogiri//lib/nokogiri/xml/syntax_error.rb#8 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::SyntaxError < ::Nokogiri::SyntaxError - # Returns the value of attribute code. - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#23 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:23 def code; end - # Returns the value of attribute column. - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#40 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:40 def column; end - # Returns the value of attribute domain. - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#22 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:22 def domain; end # return true if this is an error # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#56 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:56 def error?; end # return true if this error is fatal # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#62 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:62 def fatal?; end - # Returns the value of attribute file. - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#25 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:25 def file; end - # Returns the value of attribute int1. - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#39 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:39 def int1; end - # Returns the value of attribute level. - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#24 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:24 def level; end - # Returns the value of attribute line. - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#26 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:26 def line; end # return true if this is a non error # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#44 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:44 def none?; end # The XPath path of the node that caused the error when validating a `Nokogiri::XML::Document`. @@ -7939,132 +7816,136 @@ class Nokogiri::XML::SyntaxError < ::Nokogiri::SyntaxError # # ⚠ `#path` is not supported on JRuby, where it will always return `nil`. # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#35 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:35 def path; end - # Returns the value of attribute str1. - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#36 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:36 def str1; end - # Returns the value of attribute str2. - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#37 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:37 def str2; end - # Returns the value of attribute str3. - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#38 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:38 def str3; end - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#66 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:66 def to_s; end # return true if this is a warning # - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#50 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:50 def warning?; end private - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#75 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:75 def level_to_s; end - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#87 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:87 def location_to_s; end - # @return [Boolean] - # - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#83 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:83 def nil_or_zero?(attribute); end class << self - # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#10 + # pkg:gem/nokogiri#lib/nokogiri/xml/syntax_error.rb:10 def aggregate(errors); end end end -# source://nokogiri//lib/nokogiri/xml/text.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::Text < ::Nokogiri::XML::CharacterData - # source://nokogiri//lib/nokogiri/xml/text.rb#6 + # pkg:gem/nokogiri#lib/nokogiri/xml/text.rb:6 def content=(string); end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def new(*_arg0); end end end # Original C14N 1.0 spec canonicalization # -# source://nokogiri//lib/nokogiri/xml.rb#13 +# pkg:gem/nokogiri#lib/nokogiri/xml.rb:13 Nokogiri::XML::XML_C14N_1_0 = T.let(T.unsafe(nil), Integer) # C14N 1.1 spec canonicalization # -# source://nokogiri//lib/nokogiri/xml.rb#17 +# pkg:gem/nokogiri#lib/nokogiri/xml.rb:17 Nokogiri::XML::XML_C14N_1_1 = T.let(T.unsafe(nil), Integer) # Exclusive C14N 1.0 spec canonicalization # -# source://nokogiri//lib/nokogiri/xml.rb#15 +# pkg:gem/nokogiri#lib/nokogiri/xml.rb:15 Nokogiri::XML::XML_C14N_EXCLUSIVE_1_0 = T.let(T.unsafe(nil), Integer) -# source://nokogiri//lib/nokogiri/xml/xpath.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 module Nokogiri::XML::XPath; end # The XPath search prefix to search direct descendants of the current element, +./+ # -# source://nokogiri//lib/nokogiri/xml/xpath.rb#13 +# pkg:gem/nokogiri#lib/nokogiri/xml/xpath.rb:13 Nokogiri::XML::XPath::CURRENT_SEARCH_PREFIX = T.let(T.unsafe(nil), String) # The XPath search prefix to search globally, +//+ # -# source://nokogiri//lib/nokogiri/xml/xpath.rb#7 +# pkg:gem/nokogiri#lib/nokogiri/xml/xpath.rb:7 Nokogiri::XML::XPath::GLOBAL_SEARCH_PREFIX = T.let(T.unsafe(nil), String) # The XPath search prefix to search direct descendants of the root element, +/+ # -# source://nokogiri//lib/nokogiri/xml/xpath.rb#10 +# pkg:gem/nokogiri#lib/nokogiri/xml/xpath.rb:10 Nokogiri::XML::XPath::ROOT_SEARCH_PREFIX = T.let(T.unsafe(nil), String) # The XPath search prefix to search anywhere in the current element's subtree, +.//+ # -# source://nokogiri//lib/nokogiri/xml/xpath.rb#16 +# pkg:gem/nokogiri#lib/nokogiri/xml/xpath.rb:16 Nokogiri::XML::XPath::SUBTREE_SEARCH_PREFIX = T.let(T.unsafe(nil), String) -# source://nokogiri//lib/nokogiri/xml/xpath/syntax_error.rb#6 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::XPath::SyntaxError < ::Nokogiri::XML::SyntaxError - # source://nokogiri//lib/nokogiri/xml/xpath/syntax_error.rb#7 + # pkg:gem/nokogiri#lib/nokogiri/xml/xpath/syntax_error.rb:7 def to_s; end end -# source://nokogiri//lib/nokogiri/xml/xpath_context.rb#5 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XML::XPathContext + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def evaluate(*_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def node=(_arg0); end # Register namespaces in +namespaces+ # - # source://nokogiri//lib/nokogiri/xml/xpath_context.rb#8 + # pkg:gem/nokogiri#lib/nokogiri/xml/xpath_context.rb:8 def register_namespaces(namespaces); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def register_ns(_arg0, _arg1); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def register_variable(_arg0, _arg1); end - # source://nokogiri//lib/nokogiri/xml/xpath_context.rb#16 + # pkg:gem/nokogiri#lib/nokogiri/xml/xpath_context.rb:16 def register_variables(binds); end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def new(_arg0); end end end -# See Nokogiri::XSLT::Stylesheet for creating and manipulating -# Stylesheet object. +# See Nokogiri::XSLT::Stylesheet for creating and manipulating Stylesheet objects. +# +# 🛡 Do not use this module for untrusted stylesheet documents. libxslt does not support +# safely processing untrusted stylesheets. Untrusted stylesheets may access the file system and +# network, consume large amounts of CPU, memory, or other system resources, and IO and file +# access are not restricted. Additionally, the stylesheet is parsed by libxml2 with +NOENT+ and +# +DTDLOAD+ enabled (see ParseOptions::DEFAULT_XSLT), meaning that external entities will be +# resolved and external subsets will be loaded during parsing. # -# source://nokogiri//lib/nokogiri/xslt.rb#15 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 module Nokogiri::XSLT class << self # :call-seq: @@ -8073,6 +7954,9 @@ module Nokogiri::XSLT # # Parse the stylesheet in +xsl+, registering optional +modules+ as custom class handlers. # + # 🛡 Do not pass untrusted stylesheet content to this method. See Nokogiri::XSLT for more + # information. + # # [Parameters] # - +xsl+ (String) XSL content to be parsed into a stylesheet # - +modules+ (Hash) A hash of URI-to-handler relations for linking a @@ -8120,7 +8004,7 @@ module Nokogiri::XSLT # # " raB\n" + # # "\n" # - # source://nokogiri//lib/nokogiri/xslt.rb#70 + # pkg:gem/nokogiri#lib/nokogiri/xslt.rb:79 def parse(string, modules = T.unsafe(nil)); end # :call-seq: @@ -8134,22 +8018,42 @@ module Nokogiri::XSLT # # [Returns] Array of string parameters, with quotes correctly escaped for use with XSLT::Stylesheet.transform # - # source://nokogiri//lib/nokogiri/xslt.rb#94 + # pkg:gem/nokogiri#lib/nokogiri/xslt.rb:103 def quote_params(params); end + # call-seq: + # register(uri, custom_handler_class) + # + # Register a class that implements custom XSLT transformation functions. + # + # ⚠ The XSLT handler classes are registered *globally*. + # + # [Parameters} + # - +uri+ (String) The namespace for the custom handlers + # - +custom_handler_class+ (Class) A class with ruby methods that can be called during + # transformation + # + # See Nokogiri::XSLT.parse for usage. + # + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def register(_arg0, _arg1); end end end -# A Stylesheet represents an XSLT Stylesheet object. Stylesheet creation -# is done through Nokogiri.XSLT. Here is an example of transforming -# an XML::Document with a Stylesheet: +# A Stylesheet represents an XSLT Stylesheet object. Stylesheet creation is done through +# Nokogiri::XSLT.parse (or the convenience method Nokogiri.XSLT). Here is an example of +# transforming an XML::Document with a Stylesheet: # # doc = Nokogiri::XML(File.read('some_file.xml')) # xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) # # xslt.transform(doc) # => Nokogiri::XML::Document # +# 🛡 This class does not support execution of untrusted stylesheets. An untrusted +# stylesheet may consume a large amount of CPU, memory, or other system resources during +# transformation, and IO and file access are not restricted. See Nokogiri::XSLT for more +# information about the security implications of untrusted stylesheets. +# # Many XSLT transformations include serialization behavior to emit a non-XML document. For these # cases, please take care to invoke the #serialize method on the result of the transformation: # @@ -8165,7 +8069,7 @@ end # # See Nokogiri::XSLT::Stylesheet#transform for more information and examples. # -# source://nokogiri//lib/nokogiri/xslt/stylesheet.rb#29 +# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 class Nokogiri::XSLT::Stylesheet # :call-seq: # apply_to(document, params = []) -> String @@ -8182,13 +8086,17 @@ class Nokogiri::XSLT::Stylesheet # # See Nokogiri::XSLT::Stylesheet#transform for more information and examples. # - # source://nokogiri//lib/nokogiri/xslt/stylesheet.rb#44 + # pkg:gem/nokogiri#lib/nokogiri/xslt/stylesheet.rb:49 def apply_to(document, params = T.unsafe(nil)); end + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def serialize(_arg0); end + + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def transform(*_arg0); end class << self + # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 def parse_stylesheet_doc(_arg0); end end end @@ -8199,6 +8107,11 @@ class Object < ::BasicObject private - # source://nokogiri//lib/nokogiri.rb#108 + # Parse a document contained in +args+. Nokogiri will try to guess what type of document you are + # attempting to parse. For more information, see Nokogiri.parse + # + # To specify the type of document, use {Nokogiri.XML}, {Nokogiri.HTML4}, or {Nokogiri.HTML5}. + # + # pkg:gem/nokogiri#lib/nokogiri.rb:108 def Nokogiri(*args, &block); end end diff --git a/sorbet/rbi/gems/ostruct@0.6.3.rbi b/sorbet/rbi/gems/ostruct@0.6.3.rbi new file mode 100644 index 000000000..bd8c349b3 --- /dev/null +++ b/sorbet/rbi/gems/ostruct@0.6.3.rbi @@ -0,0 +1,475 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ostruct` gem. +# Please instead update this file by running `bin/tapioca gem ostruct`. + + +# An OpenStruct is a data structure, similar to a Hash, that allows the +# definition of arbitrary attributes with their accompanying values. This is +# accomplished by using Ruby's metaprogramming to define methods on the class +# itself. +# +# == Examples +# +# require "ostruct" +# +# person = OpenStruct.new +# person.name = "John Smith" +# person.age = 70 +# +# person.name # => "John Smith" +# person.age # => 70 +# person.address # => nil +# +# An OpenStruct employs a Hash internally to store the attributes and values +# and can even be initialized with one: +# +# australia = OpenStruct.new(:country => "Australia", :capital => "Canberra") +# # => # +# +# Hash keys with spaces or characters that could normally not be used for +# method calls (e.g. ()[]*) will not be immediately available +# on the OpenStruct object as a method for retrieval or assignment, but can +# still be reached through the Object#send method or using []. +# +# measurements = OpenStruct.new("length (in inches)" => 24) +# measurements[:"length (in inches)"] # => 24 +# measurements.send("length (in inches)") # => 24 +# +# message = OpenStruct.new(:queued? => true) +# message.queued? # => true +# message.send("queued?=", false) +# message.queued? # => false +# +# Removing the presence of an attribute requires the execution of the +# delete_field method as setting the property value to +nil+ will not +# remove the attribute. +# +# first_pet = OpenStruct.new(:name => "Rowdy", :owner => "John Smith") +# second_pet = OpenStruct.new(:name => "Rowdy") +# +# first_pet.owner = nil +# first_pet # => # +# first_pet == second_pet # => false +# +# first_pet.delete_field(:owner) +# first_pet # => # +# first_pet == second_pet # => true +# +# Ractor compatibility: A frozen OpenStruct with shareable values is itself shareable. +# +# == Caveats +# +# An OpenStruct utilizes Ruby's method lookup structure to find and define the +# necessary methods for properties. This is accomplished through the methods +# method_missing and define_singleton_method. +# +# This should be a consideration if there is a concern about the performance of +# the objects that are created, as there is much more overhead in the setting +# of these properties compared to using a Hash or a Struct. +# Creating an open struct from a small Hash and accessing a few of the +# entries can be 200 times slower than accessing the hash directly. +# +# This is a potential security issue; building OpenStruct from untrusted user data +# (e.g. JSON web request) may be susceptible to a "symbol denial of service" attack +# since the keys create methods and names of methods are never garbage collected. +# +# This may also be the source of incompatibilities between Ruby versions: +# +# o = OpenStruct.new +# o.then # => nil in Ruby < 2.6, enumerator for Ruby >= 2.6 +# +# Builtin methods may be overwritten this way, which may be a source of bugs +# or security issues: +# +# o = OpenStruct.new +# o.methods # => [:to_h, :marshal_load, :marshal_dump, :each_pair, ... +# o.methods = [:foo, :bar] +# o.methods # => [:foo, :bar] +# +# To help remedy clashes, OpenStruct uses only protected/private methods ending with ! +# and defines aliases for builtin public methods by adding a !: +# +# o = OpenStruct.new(make: 'Bentley', class: :luxury) +# o.class # => :luxury +# o.class! # => OpenStruct +# +# It is recommended (but not enforced) to not use fields ending in !; +# Note that a subclass' methods may not be overwritten, nor can OpenStruct's own methods +# ending with !. +# +# For all these reasons, consider not using OpenStruct at all. +# +# pkg:gem/ostruct#lib/ostruct.rb:109 +class OpenStruct + # Creates a new OpenStruct object. By default, the resulting OpenStruct + # object will have no attributes. + # + # The optional +hash+, if given, will generate attributes and values + # (can be a Hash, an OpenStruct or a Struct). + # For example: + # + # require "ostruct" + # hash = { "country" => "Australia", :capital => "Canberra" } + # data = OpenStruct.new(hash) + # + # data # => # + # + # pkg:gem/ostruct#lib/ostruct.rb:134 + def initialize(hash = T.unsafe(nil)); end + + # Compares this object and +other+ for equality. An OpenStruct is equal to + # +other+ when +other+ is an OpenStruct and the two objects' Hash tables are + # equal. + # + # require "ostruct" + # first_pet = OpenStruct.new("name" => "Rowdy") + # second_pet = OpenStruct.new(:name => "Rowdy") + # third_pet = OpenStruct.new("name" => "Rowdy", :age => nil) + # + # first_pet == second_pet # => true + # first_pet == third_pet # => false + # + # pkg:gem/ostruct#lib/ostruct.rb:426 + def ==(other); end + + # :call-seq: + # ostruct[name] -> object + # + # Returns the value of an attribute, or +nil+ if there is no such attribute. + # + # require "ostruct" + # person = OpenStruct.new("name" => "John Smith", "age" => 70) + # person[:age] # => 70, same as person.age + # + # pkg:gem/ostruct#lib/ostruct.rb:306 + def [](name); end + + # :call-seq: + # ostruct[name] = obj -> obj + # + # Sets the value of an attribute. + # + # require "ostruct" + # person = OpenStruct.new("name" => "John Smith", "age" => 70) + # person[:age] = 42 # equivalent to person.age = 42 + # person.age # => 42 + # + # pkg:gem/ostruct#lib/ostruct.rb:321 + def []=(name, value); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def __id__!; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def __send__!(*_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def abort!(*_args, **_kwargs, &_block); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def class!; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def clone!(freeze: T.unsafe(nil)); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def define_singleton_method!(*_arg0); end + + # Removes the named field from the object and returns the value the field + # contained if it was defined. You may optionally provide a block. + # If the field is not defined, the result of the block is returned, + # or a NameError is raised if no block was given. + # + # require "ostruct" + # + # person = OpenStruct.new(name: "John", age: 70, pension: 300) + # + # person.delete_field!("age") # => 70 + # person # => # + # + # Setting the value to +nil+ will not remove the attribute: + # + # person.pension = nil + # person # => # + # + # person.delete_field('number') # => NameError + # + # person.delete_field('number') { 8675_309 } # => 8675309 + # + # pkg:gem/ostruct#lib/ostruct.rb:374 + def delete_field(name, &block); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def delete_field!(name, &block); end + + # :call-seq: + # ostruct.dig(name, *identifiers) -> object + # + # Finds and returns the object in nested objects + # that is specified by +name+ and +identifiers+. + # The nested objects may be instances of various classes. + # See {Dig Methods}[rdoc-ref:dig_methods.rdoc]. + # + # Examples: + # require "ostruct" + # address = OpenStruct.new("city" => "Anytown NC", "zip" => 12345) + # person = OpenStruct.new("name" => "John Smith", "address" => address) + # person.dig(:address, "zip") # => 12345 + # person.dig(:business_address, "zip") # => nil + # + # pkg:gem/ostruct#lib/ostruct.rb:343 + def dig(name, *names); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def dig!(name, *names); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def display!(*_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def dup!; end + + # :call-seq: + # ostruct.each_pair {|name, value| block } -> ostruct + # ostruct.each_pair -> Enumerator + # + # Yields all attributes (as symbols) along with the corresponding values + # or returns an enumerator if no block is given. + # + # require "ostruct" + # data = OpenStruct.new("country" => "Australia", :capital => "Canberra") + # data.each_pair.to_a # => [[:country, "Australia"], [:capital, "Canberra"]] + # + # pkg:gem/ostruct#lib/ostruct.rb:211 + def each_pair; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def each_pair!; end + + # Provides marshalling support for use by the YAML library. + # + # pkg:gem/ostruct#lib/ostruct.rb:449 + def encode_with(coder); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def encode_with!(coder); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def enum_for!(*_arg0); end + + # Compares this object and +other+ for equality. An OpenStruct is eql? to + # +other+ when +other+ is an OpenStruct and the two objects' Hash tables are + # eql?. + # + # pkg:gem/ostruct#lib/ostruct.rb:436 + def eql?(other); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def exit!(*_args, **_kwargs, &_block); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def extend!(*_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:272 + def freeze; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def freeze!; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def gem!(dep, *reqs); end + + # Computes a hash code for this OpenStruct. + # + # pkg:gem/ostruct#lib/ostruct.rb:442 + def hash; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def hash!; end + + # Provides marshalling support for use by the YAML library. + # + # pkg:gem/ostruct#lib/ostruct.rb:462 + def init_with(coder); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def init_with!(coder); end + + # Returns a string containing a detailed summary of the keys and values. + # + # pkg:gem/ostruct#lib/ostruct.rb:391 + def inspect; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def inspect!; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def instance_eval!(*_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def instance_exec!(*_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def instance_variable_get!(_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def instance_variable_set!(_arg0, _arg1); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def instance_variables!; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def itself!; end + + # Provides marshalling support for use by the Marshal library. + # + # pkg:gem/ostruct#lib/ostruct.rb:220 + def marshal_dump; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def marshal_dump!; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def method!(_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def methods!(*_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def object_id!; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def pretty_inspect!; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def pretty_print!(q); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def pretty_print_cycle!(q); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def pretty_print_inspect!; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def pretty_print_instance_variables!; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def private_methods!(*_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def protected_methods!(*_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def public_method!(_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def public_methods!(*_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def public_send!(*_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def remove_instance_variable!(_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def send!(*_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def singleton_class!; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def singleton_method!(_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def singleton_methods!(*_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:409 + def table; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def tap!; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def then!; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def to_enum!(*_arg0); end + + # RUBY_VERSION < 2.6 compatibility + # + # pkg:gem/ostruct#lib/ostruct.rb:182 + def to_h(&block); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def to_h!(&block); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def to_json!(state = T.unsafe(nil), *_arg1); end + + # pkg:gem/ostruct#lib/ostruct.rb:407 + def to_s; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def to_s!; end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def to_yaml!(options = T.unsafe(nil)); end + + # pkg:gem/ostruct#lib/ostruct.rb:481 + def yield_self!; end + + protected + + # pkg:gem/ostruct#lib/ostruct.rb:410 + def table!; end + + private + + # pkg:gem/ostruct#lib/ostruct.rb:489 + def block_given!; end + + # Duplicates an OpenStruct object's Hash table. + # + # pkg:gem/ostruct#lib/ostruct.rb:147 + def initialize_clone(orig); end + + # pkg:gem/ostruct#lib/ostruct.rb:152 + def initialize_dup(orig); end + + # pkg:gem/ostruct#lib/ostruct.rb:254 + def is_method_protected!(name); end + + # Provides marshalling support for use by the Marshal library. + # + # pkg:gem/ostruct#lib/ostruct.rb:227 + def marshal_load(hash); end + + # pkg:gem/ostruct#lib/ostruct.rb:277 + def method_missing(mid, *args); end + + # Used internally to defined properties on the + # OpenStruct. It does this by using the metaprogramming function + # define_singleton_method for both the getter method and the setter method. + # + # pkg:gem/ostruct#lib/ostruct.rb:234 + def new_ostruct_member!(name); end + + # Other builtin private methods we use: + # + # pkg:gem/ostruct#lib/ostruct.rb:484 + def raise!(*_arg0); end + + # pkg:gem/ostruct#lib/ostruct.rb:326 + def set_ostruct_member_value!(name, value); end + + # pkg:gem/ostruct#lib/ostruct.rb:157 + def update_to_values!(hash); end +end + +# pkg:gem/ostruct#lib/ostruct.rb:112 +OpenStruct::HAS_PERFORMANCE_WARNINGS = T.let(T.unsafe(nil), TrueClass) + +# pkg:gem/ostruct#lib/ostruct.rb:110 +OpenStruct::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/parallel@1.25.1.rbi b/sorbet/rbi/gems/parallel@1.28.0.rbi similarity index 50% rename from sorbet/rbi/gems/parallel@1.25.1.rbi rename to sorbet/rbi/gems/parallel@1.28.0.rbi index 0662fad50..a8a657183 100644 --- a/sorbet/rbi/gems/parallel@1.25.1.rbi +++ b/sorbet/rbi/gems/parallel@1.28.0.rbi @@ -4,283 +4,267 @@ # This is an autogenerated file for types exported from the `parallel` gem. # Please instead update this file by running `bin/tapioca gem parallel`. -# source://parallel//lib/parallel/version.rb#2 + +# pkg:gem/parallel#lib/parallel/version.rb:2 module Parallel class << self - # @return [Boolean] - # - # source://parallel//lib/parallel.rb#243 + # pkg:gem/parallel#lib/parallel.rb:254 def all?(*args, &block); end - # @return [Boolean] - # - # source://parallel//lib/parallel.rb#238 + # pkg:gem/parallel#lib/parallel.rb:249 def any?(*args, &block); end - # source://parallel//lib/parallel.rb#234 + # pkg:gem/parallel#lib/parallel.rb:245 def each(array, options = T.unsafe(nil), &block); end - # source://parallel//lib/parallel.rb#248 + # pkg:gem/parallel#lib/parallel.rb:259 def each_with_index(array, options = T.unsafe(nil), &block); end - # source://parallel//lib/parallel.rb#307 + # pkg:gem/parallel#lib/parallel.rb:318 def filter_map(*_arg0, **_arg1, &_arg2); end - # source://parallel//lib/parallel.rb#303 + # pkg:gem/parallel#lib/parallel.rb:314 def flat_map(*_arg0, **_arg1, &_arg2); end - # source://parallel//lib/parallel.rb#228 + # pkg:gem/parallel#lib/parallel.rb:239 def in_processes(options = T.unsafe(nil), &block); end - # source://parallel//lib/parallel.rb#212 + # pkg:gem/parallel#lib/parallel.rb:223 def in_threads(options = T.unsafe(nil)); end - # source://parallel//lib/parallel.rb#252 + # pkg:gem/parallel#lib/parallel.rb:263 def map(source, options = T.unsafe(nil), &block); end - # source://parallel//lib/parallel.rb#299 + # pkg:gem/parallel#lib/parallel.rb:310 def map_with_index(array, options = T.unsafe(nil), &block); end # Number of physical processor cores on the current system. # - # source://parallel//lib/parallel.rb#312 + # pkg:gem/parallel#lib/parallel.rb:323 def physical_processor_count; end - # Number of processors seen by the OS, used for process scheduling + # Number of processors seen by the OS or value considering CPU quota if the process is inside a cgroup, + # used for process scheduling # - # source://parallel//lib/parallel.rb#341 + # pkg:gem/parallel#lib/parallel.rb:353 def processor_count; end - # source://parallel//lib/parallel.rb#346 + # pkg:gem/parallel#lib/parallel.rb:357 def worker_number; end # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed # - # source://parallel//lib/parallel.rb#351 + # pkg:gem/parallel#lib/parallel.rb:362 def worker_number=(worker_num); end private - # source://parallel//lib/parallel.rb#384 + # pkg:gem/parallel#lib/parallel.rb:395 def add_progress_bar!(job_factory, options); end - # source://parallel//lib/parallel.rb#647 + # pkg:gem/parallel#lib/parallel.rb:710 + def available_processor_count; end + + # pkg:gem/parallel#lib/parallel.rb:658 def call_with_index(item, index, options, &block); end - # source://parallel//lib/parallel.rb#579 + # pkg:gem/parallel#lib/parallel.rb:590 def create_workers(job_factory, options, &block); end # options is either a Integer or a Hash with :count # - # source://parallel//lib/parallel.rb#637 + # pkg:gem/parallel#lib/parallel.rb:648 def extract_count_from_options(options); end - # source://parallel//lib/parallel.rb#665 + # pkg:gem/parallel#lib/parallel.rb:676 def instrument_finish(item, index, result, options); end # yield results in the order of the input items # needs to use `options` to store state between executions # needs to use `done` index since a nil result would also be valid # - # source://parallel//lib/parallel.rb#674 + # pkg:gem/parallel#lib/parallel.rb:685 def instrument_finish_in_order(item, index, result, options); end - # source://parallel//lib/parallel.rb#694 + # pkg:gem/parallel#lib/parallel.rb:705 def instrument_start(item, index, options); end - # source://parallel//lib/parallel.rb#357 + # pkg:gem/parallel#lib/parallel.rb:368 def physical_processor_count_windows; end - # source://parallel//lib/parallel.rb#613 + # pkg:gem/parallel#lib/parallel.rb:624 def process_incoming_jobs(read, write, job_factory, options, &block); end - # source://parallel//lib/parallel.rb#567 + # pkg:gem/parallel#lib/parallel.rb:578 def replace_worker(job_factory, workers, index, options, blk); end - # source://parallel//lib/parallel.rb#378 + # pkg:gem/parallel#lib/parallel.rb:389 def run(command); end - # source://parallel//lib/parallel.rb#658 + # pkg:gem/parallel#lib/parallel.rb:669 def with_instrumentation(item, index, options); end - # source://parallel//lib/parallel.rb#409 + # pkg:gem/parallel#lib/parallel.rb:420 def work_direct(job_factory, options, &block); end - # source://parallel//lib/parallel.rb#519 + # pkg:gem/parallel#lib/parallel.rb:530 def work_in_processes(job_factory, options, &blk); end - # source://parallel//lib/parallel.rb#453 + # pkg:gem/parallel#lib/parallel.rb:464 def work_in_ractors(job_factory, options); end - # source://parallel//lib/parallel.rb#428 + # pkg:gem/parallel#lib/parallel.rb:439 def work_in_threads(job_factory, options, &block); end - # source://parallel//lib/parallel.rb#587 + # pkg:gem/parallel#lib/parallel.rb:598 def worker(job_factory, options, &block); end end end -# source://parallel//lib/parallel.rb#11 +# pkg:gem/parallel#lib/parallel.rb:11 class Parallel::Break < ::StandardError - # @return [Break] a new instance of Break - # - # source://parallel//lib/parallel.rb#14 + # pkg:gem/parallel#lib/parallel.rb:14 def initialize(value = T.unsafe(nil)); end - # Returns the value of attribute value. + # marshal_dump that is used for ruby exceptions + # avoid dumping the cause since nobody needs that and it can include undumpable exceptions # - # source://parallel//lib/parallel.rb#12 + # pkg:gem/parallel#lib/parallel.rb:21 + def _dump(_depth); end + + # pkg:gem/parallel#lib/parallel.rb:12 def value; end + + class << self + # marshal_load that is used for ruby exceptions + # + # pkg:gem/parallel#lib/parallel.rb:26 + def _load(data); end + end end -# source://parallel//lib/parallel.rb#8 +# pkg:gem/parallel#lib/parallel.rb:8 class Parallel::DeadWorker < ::StandardError; end -# source://parallel//lib/parallel.rb#32 +# pkg:gem/parallel#lib/parallel.rb:43 class Parallel::ExceptionWrapper - # @return [ExceptionWrapper] a new instance of ExceptionWrapper - # - # source://parallel//lib/parallel.rb#35 + # pkg:gem/parallel#lib/parallel.rb:46 def initialize(exception); end - # Returns the value of attribute exception. - # - # source://parallel//lib/parallel.rb#33 + # pkg:gem/parallel#lib/parallel.rb:44 def exception; end end -# source://parallel//lib/parallel.rb#98 +# pkg:gem/parallel#lib/parallel.rb:109 class Parallel::JobFactory - # @return [JobFactory] a new instance of JobFactory - # - # source://parallel//lib/parallel.rb#99 + # pkg:gem/parallel#lib/parallel.rb:110 def initialize(source, mutex); end - # source://parallel//lib/parallel.rb#107 + # pkg:gem/parallel#lib/parallel.rb:118 def next; end # generate item that is sent to workers # just index is faster + less likely to blow up with unserializable errors # - # source://parallel//lib/parallel.rb#136 + # pkg:gem/parallel#lib/parallel.rb:147 def pack(item, index); end - # source://parallel//lib/parallel.rb#126 + # pkg:gem/parallel#lib/parallel.rb:137 def size; end # unpack item that is sent to workers # - # source://parallel//lib/parallel.rb#141 + # pkg:gem/parallel#lib/parallel.rb:152 def unpack(data); end private - # @return [Boolean] - # - # source://parallel//lib/parallel.rb#147 + # pkg:gem/parallel#lib/parallel.rb:158 def producer?; end - # source://parallel//lib/parallel.rb#151 + # pkg:gem/parallel#lib/parallel.rb:162 def queue_wrapper(array); end end -# source://parallel//lib/parallel.rb#20 +# pkg:gem/parallel#lib/parallel.rb:31 class Parallel::Kill < ::Parallel::Break; end -# source://parallel//lib/parallel.rb#6 +# pkg:gem/parallel#lib/parallel.rb:6 Parallel::Stop = T.let(T.unsafe(nil), Object) -# source://parallel//lib/parallel.rb#23 +# pkg:gem/parallel#lib/parallel.rb:34 class Parallel::UndumpableException < ::StandardError - # @return [UndumpableException] a new instance of UndumpableException - # - # source://parallel//lib/parallel.rb#26 + # pkg:gem/parallel#lib/parallel.rb:37 def initialize(original); end - # Returns the value of attribute backtrace. - # - # source://parallel//lib/parallel.rb#24 + # pkg:gem/parallel#lib/parallel.rb:35 def backtrace; end end -# source://parallel//lib/parallel.rb#156 +# pkg:gem/parallel#lib/parallel.rb:167 class Parallel::UserInterruptHandler class << self - # source://parallel//lib/parallel.rb#181 + # pkg:gem/parallel#lib/parallel.rb:192 def kill(thing); end # kill all these pids or threads if user presses Ctrl+c # - # source://parallel//lib/parallel.rb#161 + # pkg:gem/parallel#lib/parallel.rb:172 def kill_on_ctrl_c(pids, options); end private - # source://parallel//lib/parallel.rb#205 + # pkg:gem/parallel#lib/parallel.rb:216 def restore_interrupt(old, signal); end - # source://parallel//lib/parallel.rb#190 + # pkg:gem/parallel#lib/parallel.rb:201 def trap_interrupt(signal); end end end -# source://parallel//lib/parallel.rb#157 +# pkg:gem/parallel#lib/parallel.rb:168 Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol) -# source://parallel//lib/parallel/version.rb#3 +# pkg:gem/parallel#lib/parallel/version.rb:3 Parallel::VERSION = T.let(T.unsafe(nil), String) -# source://parallel//lib/parallel/version.rb#3 +# pkg:gem/parallel#lib/parallel/version.rb:3 Parallel::Version = T.let(T.unsafe(nil), String) -# source://parallel//lib/parallel.rb#51 +# pkg:gem/parallel#lib/parallel.rb:62 class Parallel::Worker - # @return [Worker] a new instance of Worker - # - # source://parallel//lib/parallel.rb#55 + # pkg:gem/parallel#lib/parallel.rb:66 def initialize(read, write, pid); end # might be passed to started_processes and simultaneously closed by another thread # when running in isolation mode, so we have to check if it is closed before closing # - # source://parallel//lib/parallel.rb#68 + # pkg:gem/parallel#lib/parallel.rb:79 def close_pipes; end - # Returns the value of attribute pid. - # - # source://parallel//lib/parallel.rb#52 + # pkg:gem/parallel#lib/parallel.rb:63 def pid; end - # Returns the value of attribute read. - # - # source://parallel//lib/parallel.rb#52 + # pkg:gem/parallel#lib/parallel.rb:63 def read; end - # source://parallel//lib/parallel.rb#61 + # pkg:gem/parallel#lib/parallel.rb:72 def stop; end - # Returns the value of attribute thread. - # - # source://parallel//lib/parallel.rb#53 + # pkg:gem/parallel#lib/parallel.rb:64 def thread; end - # Sets the attribute thread - # - # @param value the value to set the attribute thread to. - # - # source://parallel//lib/parallel.rb#53 + # pkg:gem/parallel#lib/parallel.rb:64 def thread=(_arg0); end - # source://parallel//lib/parallel.rb#73 + # pkg:gem/parallel#lib/parallel.rb:84 def work(data); end - # Returns the value of attribute write. - # - # source://parallel//lib/parallel.rb#52 + # pkg:gem/parallel#lib/parallel.rb:63 def write; end private - # source://parallel//lib/parallel.rb#91 + # pkg:gem/parallel#lib/parallel.rb:102 def wait; end end diff --git a/sorbet/rbi/gems/parser@3.3.11.1.rbi b/sorbet/rbi/gems/parser@3.3.11.1.rbi new file mode 100644 index 000000000..1d300645a --- /dev/null +++ b/sorbet/rbi/gems/parser@3.3.11.1.rbi @@ -0,0 +1,5229 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `parser` gem. +# Please instead update this file by running `bin/tapioca gem parser`. + + +# @api public +# +# pkg:gem/parser#lib/parser.rb:19 +module Parser; end + +# pkg:gem/parser#lib/parser.rb:24 +module Parser::AST; end + +# {Parser::AST::Node} contains information about a single AST node and its +# child nodes. It extends the basic [AST::Node](https://www.rubydoc.info/gems/ast/AST/Node) +# class provided by gem [ast](https://www.rubydoc.info/gems/ast). +# +# @api public +# +# @!attribute [r] location +# Source map for this Node. +# @return [Parser::Source::Map] +# +# pkg:gem/parser#lib/parser/ast/node.rb:17 +class Parser::AST::Node < ::AST::Node + # Assigns various properties to this AST node. Currently only the + # location can be set. + # + # @param [Hash] properties + # @option properties [Parser::Source::Map] :location Location information + # of the node. + # + # pkg:gem/parser#lib/parser/ast/node.rb:30 + def assign_properties(properties); end + + # pkg:gem/parser#lib/parser/ast/node.rb:20 + def loc; end + + # pkg:gem/parser#lib/parser/ast/node.rb:18 + def location; end +end + +# @api public +# +# pkg:gem/parser#lib/parser/ast/processor.rb:9 +class Parser::AST::Processor + include ::AST::Processor::Mixin + + # pkg:gem/parser#lib/parser/ast/processor.rb:179 + def on_alias(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:222 + def on_and(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:67 + def on_and_asgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:122 + def on_arg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:148 + def on_arg_expr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:103 + def on_args(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:105 + def on_argument(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:22 + def on_array(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:258 + def on_array_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:259 + def on_array_pattern_with_tail(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:42 + def on_back_ref(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:240 + def on_begin(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:195 + def on_block(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:151 + def on_block_pass(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:125 + def on_blockarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:150 + def on_blockarg_expr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:213 + def on_break(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:228 + def on_case(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:246 + def on_case_match(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:89 + def on_casgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:157 + def on_class(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:81 + def on_const(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:261 + def on_const_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:190 + def on_csend(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:41 + def on_cvar(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:65 + def on_cvasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:160 + def on_def(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:219 + def on_defined?(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:169 + def on_defs(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:16 + def on_dstr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:17 + def on_dsym(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:231 + def on_eflipflop(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:288 + def on_empty_else(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:238 + def on_ensure(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:27 + def on_erange(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:262 + def on_find_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:210 + def on_for(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:130 + def on_forward_arg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:154 + def on_forwarded_kwrestarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:153 + def on_forwarded_restarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:40 + def on_gvar(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:64 + def on_gvasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:24 + def on_hash(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:260 + def on_hash_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:225 + def on_if(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:251 + def on_if_guard(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:230 + def on_iflipflop(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:247 + def on_in_match(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:250 + def on_in_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:192 + def on_index(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:193 + def on_indexasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:26 + def on_irange(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:39 + def on_ivar(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:63 + def on_ivasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:127 + def on_kwarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:25 + def on_kwargs(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:241 + def on_kwbegin(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:128 + def on_kwoptarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:129 + def on_kwrestarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:21 + def on_kwsplat(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:196 + def on_lambda(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:38 + def on_lvar(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:62 + def on_lvasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:79 + def on_masgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:256 + def on_match_alt(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:257 + def on_match_as(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:233 + def on_match_current_line(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:248 + def on_match_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:249 + def on_match_pattern_p(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:254 + def on_match_rest(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:253 + def on_match_var(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:234 + def on_match_with_lvasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:78 + def on_mlhs(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:156 + def on_module(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:214 + def on_next(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:221 + def on_not(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:43 + def on_nth_ref(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:198 + def on_numblock(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:70 + def on_op_asgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:123 + def on_optarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:223 + def on_or(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:68 + def on_or_asgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:23 + def on_pair(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:255 + def on_pin(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:244 + def on_postexe(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:243 + def on_preexe(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:132 + def on_procarg0(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:215 + def on_redo(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:18 + def on_regexp(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:236 + def on_resbody(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:237 + def on_rescue(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:124 + def on_restarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:149 + def on_restarg_expr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:216 + def on_retry(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:212 + def on_return(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:158 + def on_sclass(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:181 + def on_send(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:126 + def on_shadowarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:20 + def on_splat(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:217 + def on_super(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:178 + def on_undef(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:252 + def on_unless_guard(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:208 + def on_until(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:209 + def on_until_post(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:29 + def on_var(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:45 + def on_vasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:227 + def on_when(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:206 + def on_while(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:207 + def on_while_post(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:19 + def on_xstr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:218 + def on_yield(node); end + + # @private + # @private + # + # pkg:gem/parser#lib/parser/ast/processor.rb:118 + def process_argument_node(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:12 + def process_regular_node(node); end + + # @private + # @private + # + # pkg:gem/parser#lib/parser/ast/processor.rb:58 + def process_var_asgn_node(node); end + + # @private + # @private + # + # pkg:gem/parser#lib/parser/ast/processor.rb:34 + def process_variable_node(node); end +end + +# Base class for version-specific parsers. +# +# @api public +# +# @!attribute [r] diagnostics +# @return [Parser::Diagnostic::Engine] +# +# @!attribute [r] static_env +# @return [Parser::StaticEnvironment] +# +# @!attribute [r] version +# @return [Integer] +# +# pkg:gem/parser#lib/parser/base.rb:19 +class Parser::Base < ::Racc::Parser + # @param [Parser::Builders::Default] builder The AST builder to use. + # + # pkg:gem/parser#lib/parser/base.rb:129 + def initialize(builder = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/base.rb:117 + def builder; end + + # pkg:gem/parser#lib/parser/base.rb:120 + def context; end + + # pkg:gem/parser#lib/parser/base.rb:122 + def current_arg_stack; end + + # pkg:gem/parser#lib/parser/base.rb:116 + def diagnostics; end + + # pkg:gem/parser#lib/parser/base.rb:115 + def lexer; end + + # pkg:gem/parser#lib/parser/base.rb:121 + def max_numparam_stack; end + + # Parses a source buffer and returns the AST, or `nil` in case of a non fatal error. + # + # @param [Parser::Source::Buffer] source_buffer The source buffer to parse. + # @return [Parser::AST::Node, nil] + # + # pkg:gem/parser#lib/parser/base.rb:189 + def parse(source_buffer); end + + # Parses a source buffer and returns the AST and the source code comments. + # + # @see #parse + # @see Parser::Source::Comment#associate + # @return [Array] + # + # pkg:gem/parser#lib/parser/base.rb:207 + def parse_with_comments(source_buffer); end + + # pkg:gem/parser#lib/parser/base.rb:124 + def pattern_hash_keys; end + + # pkg:gem/parser#lib/parser/base.rb:123 + def pattern_variables; end + + # Resets the state of the parser. + # + # pkg:gem/parser#lib/parser/base.rb:170 + def reset; end + + # pkg:gem/parser#lib/parser/base.rb:119 + def source_buffer; end + + # pkg:gem/parser#lib/parser/base.rb:118 + def static_env; end + + # Parses a source buffer and returns the AST, the source code comments, + # and the tokens emitted by the lexer. In case of a fatal error, a {SyntaxError} + # is raised, unless `recover` is true. In case of an error + # (non-fatal or recovered), `nil` is returned instead of the AST, and + # comments as well as tokens are only returned up to the location of + # the error. + # + # Currently, token stream format returned by #tokenize is not documented, + # but is considered part of a public API and only changed according + # to Semantic Versioning. + # + # However, note that the exact token composition of various constructs + # might vary. For example, a string `"foo"` is represented equally well + # by `:tSTRING_BEG " :tSTRING_CONTENT foo :tSTRING_END "` and + # `:tSTRING "foo"`; such details must not be relied upon. + # + # @param [Parser::Source::Buffer] source_buffer + # @param [Boolean] recover If true, recover from syntax errors. False by default. + # @return [Array] + # + # pkg:gem/parser#lib/parser/base.rb:236 + def tokenize(source_buffer, recover = T.unsafe(nil)); end + + private + + # pkg:gem/parser#lib/parser/base.rb:260 + def check_kwarg_name(name_t); end + + # pkg:gem/parser#lib/parser/base.rb:269 + def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/base.rb:254 + def next_token; end + + # pkg:gem/parser#lib/parser/base.rb:285 + def on_error(error_token_id, error_value, value_stack); end + + class << self + # @return [Parser::Base] parser with the default options set. + # + # pkg:gem/parser#lib/parser/base.rb:87 + def default_parser; end + + # Parses a string of Ruby code and returns the AST. If the source + # cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @example + # Parser::Base.parse('puts "hello"') + # + # @param [String] string The block of code to parse. + # @param [String] file The name of the file the code originated from. + # @param [Numeric] line The initial line number. + # @return [Parser::AST::Node] + # + # pkg:gem/parser#lib/parser/base.rb:33 + def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)); end + + # Parses Ruby source code by reading it from a file. If the source + # cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @param [String] filename Path to the file to parse. + # @return [Parser::AST::Node] + # @see #parse + # + # pkg:gem/parser#lib/parser/base.rb:67 + def parse_file(filename); end + + # Parses Ruby source code by reading it from a file and returns the AST and + # comments. If the source cannot be parsed, {SyntaxError} is raised and a + # diagnostic is printed to `stderr`. + # + # @param [String] filename Path to the file to parse. + # @return [Array] + # @see #parse + # + # pkg:gem/parser#lib/parser/base.rb:80 + def parse_file_with_comments(filename); end + + # Parses a string of Ruby code and returns the AST and comments. If the + # source cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @example + # Parser::Base.parse_with_comments('puts "hello"') + # + # @param [String] string The block of code to parse. + # @param [String] file The name of the file the code originated from. + # @param [Numeric] line The initial line number. + # @return [Array] + # + # pkg:gem/parser#lib/parser/base.rb:52 + def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)); end + + private + + # pkg:gem/parser#lib/parser/base.rb:100 + def setup_source_buffer(file, line, string, encoding); end + end +end + +# pkg:gem/parser#lib/parser.rb:78 +module Parser::Builders; end + +# Default AST builder. Uses {AST::Node}s. +# +# pkg:gem/parser#lib/parser/builders/default.rb:8 +class Parser::Builders::Default + # Initializes attributes: + # + # * `emit_file_line_as_literals`: `true` + # + # pkg:gem/parser#lib/parser/builders/default.rb:243 + def initialize; end + + # pkg:gem/parser#lib/parser/builders/default.rb:703 + def __ENCODING__(__ENCODING__t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:348 + def __FILE__(__FILE__t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:312 + def __LINE__(__LINE__t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:622 + def accessible(node); end + + # pkg:gem/parser#lib/parser/builders/default.rb:878 + def alias(alias_t, to, from); end + + # pkg:gem/parser#lib/parser/builders/default.rb:917 + def arg(name_t); end + + # Ruby 1.8 block arguments + # + # pkg:gem/parser#lib/parser/builders/default.rb:1007 + def arg_expr(expr); end + + # Formal arguments + # + # pkg:gem/parser#lib/parser/builders/default.rb:887 + def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end + + # Arrays + # + # pkg:gem/parser#lib/parser/builders/default.rb:440 + def array(begin_t, elements, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1598 + def array_pattern(lbrack_t, elements, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:767 + def assign(lhs, eql_t, rhs); end + + # Assignment + # + # pkg:gem/parser#lib/parser/builders/default.rb:712 + def assignable(node); end + + # pkg:gem/parser#lib/parser/builders/default.rb:540 + def associate(begin_t, pairs, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1175 + def attr_asgn(receiver, dot_t, selector_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:612 + def back_ref(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1443 + def begin(begin_t, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1385 + def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1461 + def begin_keyword(begin_t, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1213 + def binary_op(receiver, operator_t, arg); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1122 + def block(method_call, begin_t, args, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1161 + def block_pass(amper_t, arg); end + + # pkg:gem/parser#lib/parser/builders/default.rb:982 + def blockarg(amper_t, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1027 + def blockarg_expr(amper_t, expr); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1113 + def call_lambda(lambda_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1096 + def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + + # Method calls + # + # pkg:gem/parser#lib/parser/builders/default.rb:1068 + def call_type_for_dot(dot_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1318 + def case(case_t, expr, when_bodies, else_t, else_body, end_t); end + + # PATTERN MATCHING + # + # pkg:gem/parser#lib/parser/builders/default.rb:1481 + def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:343 + def character(char_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:284 + def complex(complex_t); end + + # Expression grouping + # + # pkg:gem/parser#lib/parser/builders/default.rb:1431 + def compstmt(statements); end + + # Conditionals + # + # pkg:gem/parser#lib/parser/builders/default.rb:1294 + def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1300 + def condition_mod(if_true, if_false, cond_t, cond); end + + # pkg:gem/parser#lib/parser/builders/default.rb:686 + def const(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:698 + def const_fetch(scope, t_colon2, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:691 + def const_global(t_colon3, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:763 + def const_op_assignable(node); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1628 + def const_pattern(const, ldelim_t, pattern, rdelim_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:607 + def cvar(token); end + + # Indented (interpolated, noninterpolated, executable) strings + # + # pkg:gem/parser#lib/parser/builders/default.rb:388 + def dedent_string(node, dedent_level); end + + # Class and module definition + # + # pkg:gem/parser#lib/parser/builders/default.rb:814 + def def_class(class_t, name, lt_t, superclass, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:845 + def def_endless_method(def_t, name_t, args, assignment_t, body); end + + # pkg:gem/parser#lib/parser/builders/default.rb:863 + def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end + + # Method (un)definition + # + # pkg:gem/parser#lib/parser/builders/default.rb:837 + def def_method(def_t, name_t, args, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:827 + def def_module(module_t, name, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:821 + def def_sclass(class_t, lshft_t, expr, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:853 + def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end + + # If set to true (the default), `__FILE__` and `__LINE__` are transformed to + # literal nodes. For example, `s(:str, "lib/foo.rb")` and `s(:int, 10)`. + # + # If set to false, `__FILE__` and `__LINE__` are emitted as-is, + # i.e. as `s(:__FILE__)` and `s(:__LINE__)` nodes. + # + # Source maps are identical in both cases. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:237 + def emit_file_line_as_literals; end + + # If set to true (the default), `__FILE__` and `__LINE__` are transformed to + # literal nodes. For example, `s(:str, "lib/foo.rb")` and `s(:int, 10)`. + # + # If set to false, `__FILE__` and `__LINE__` are emitted as-is, + # i.e. as `s(:__FILE__)` and `s(:__LINE__)` nodes. + # + # Source maps are identical in both cases. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:237 + def emit_file_line_as_literals=(_arg0); end + + # pkg:gem/parser#lib/parser/builders/default.rb:265 + def false(false_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1619 + def find_pattern(lbrack_t, elements, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:276 + def float(float_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1339 + def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:913 + def forward_arg(dots_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:903 + def forward_only_args(begin_t, dots_t, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1084 + def forwarded_args(dots_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1092 + def forwarded_kwrestarg(dstar_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1088 + def forwarded_restarg(star_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:596 + def gvar(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1592 + def hash_pattern(lbrace_t, kwargs, rbrace_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:586 + def ident(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1508 + def if_guard(if_t, if_body); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1487 + def in_match(lhs, in_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1502 + def in_pattern(in_t, pattern, guard, then_t, body); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1184 + def index(receiver, lbrack_t, indexes, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1198 + def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end + + # Numerics + # + # pkg:gem/parser#lib/parser/builders/default.rb:272 + def integer(integer_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:591 + def ivar(token); end + + # Keywords + # + # pkg:gem/parser#lib/parser/builders/default.rb:1347 + def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:944 + def kwarg(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:970 + def kwnilarg(dstar_t, nil_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:951 + def kwoptarg(name_t, value); end + + # pkg:gem/parser#lib/parser/builders/default.rb:958 + def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:535 + def kwsplat(dstar_t, arg); end + + # Logical operations: and, or + # + # pkg:gem/parser#lib/parser/builders/default.rb:1287 + def logical_op(type, lhs, op_t, rhs); end + + # Loops + # + # pkg:gem/parser#lib/parser/builders/default.rb:1325 + def loop(type, keyword_t, cond, do_t, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1330 + def loop_mod(type, body, keyword_t, cond); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1642 + def match_alt(left, pipe_t, right); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1649 + def match_as(value, assoc_t, as); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1528 + def match_hash_var(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1542 + def match_hash_var_from_str(begin_t, strings, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1680 + def match_label(label_type, label); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1656 + def match_nil_pattern(dstar_t, nil_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1235 + def match_op(receiver, match_t, arg); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1661 + def match_pair(label_type, label, value); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1492 + def match_pattern(lhs, match_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1497 + def match_pattern_p(lhs, match_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1581 + def match_rest(star_t, name_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1516 + def match_var(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1624 + def match_with_trailing_comma(match, comma_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:805 + def multi_assign(lhs, eql_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:800 + def multi_lhs(begin_t, items, end_t); end + + # Singletons + # + # pkg:gem/parser#lib/parser/builders/default.rb:255 + def nil(nil_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1263 + def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:617 + def nth_ref(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:899 + def numargs(max_numparam); end + + # MacRuby Objective-C arguments + # + # pkg:gem/parser#lib/parser/builders/default.rb:1038 + def objc_kwarg(kwname_t, assoc_t, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1052 + def objc_restarg(star_t, name = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1166 + def objc_varargs(pair, rest_of_varargs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:774 + def op_assign(lhs, op_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:924 + def optarg(name_t, eql_t, value); end + + # Hashes + # + # pkg:gem/parser#lib/parser/builders/default.rb:488 + def pair(key, assoc_t, value); end + + # pkg:gem/parser#lib/parser/builders/default.rb:505 + def pair_keyword(key_t, value); end + + # pkg:gem/parser#lib/parser/builders/default.rb:521 + def pair_label(key_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:493 + def pair_list_18(list); end + + # pkg:gem/parser#lib/parser/builders/default.rb:513 + def pair_quoted(begin_t, parts, end_t, value); end + + # @api private + # + # pkg:gem/parser#lib/parser/builders/default.rb:225 + def parser; end + + # @api private + # + # pkg:gem/parser#lib/parser/builders/default.rb:225 + def parser=(_arg0); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1637 + def pin(pin_t, var); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1370 + def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end + + # BEGIN, END + # + # pkg:gem/parser#lib/parser/builders/default.rb:1365 + def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:992 + def procarg0(arg); end + + # pkg:gem/parser#lib/parser/builders/default.rb:572 + def range_exclusive(lhs, dot3_t, rhs); end + + # Ranges + # + # pkg:gem/parser#lib/parser/builders/default.rb:567 + def range_inclusive(lhs, dot2_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:280 + def rational(rational_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:426 + def regexp_compose(begin_t, parts, end_t, options); end + + # Regular expressions + # + # pkg:gem/parser#lib/parser/builders/default.rb:417 + def regexp_options(regopt_t); end + + # Exception handling + # + # pkg:gem/parser#lib/parser/builders/default.rb:1377 + def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end + + # pkg:gem/parser#lib/parser/builders/default.rb:933 + def restarg(star_t, name_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1016 + def restarg_expr(star_t, expr = T.unsafe(nil)); end + + # Access + # + # pkg:gem/parser#lib/parser/builders/default.rb:581 + def self(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:975 + def shadowarg(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:445 + def splat(star_t, arg = T.unsafe(nil)); end + + # Strings + # + # pkg:gem/parser#lib/parser/builders/default.rb:319 + def string(string_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:329 + def string_compose(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:324 + def string_internal(string_t); end + + # Symbols + # + # pkg:gem/parser#lib/parser/builders/default.rb:355 + def symbol(symbol_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:365 + def symbol_compose(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:360 + def symbol_internal(symbol_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:469 + def symbols_compose(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1305 + def ternary(cond, question_t, if_true, colon_t, if_false); end + + # pkg:gem/parser#lib/parser/builders/default.rb:260 + def true(true_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:294 + def unary_num(unary_t, numeric); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1251 + def unary_op(op_t, receiver); end + + # pkg:gem/parser#lib/parser/builders/default.rb:873 + def undef_method(undef_t, names); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1512 + def unless_guard(unless_t, unless_body); end + + # Case matching + # + # pkg:gem/parser#lib/parser/builders/default.rb:1312 + def when(when_t, patterns, then_t, body); end + + # pkg:gem/parser#lib/parser/builders/default.rb:455 + def word(parts); end + + # pkg:gem/parser#lib/parser/builders/default.rb:464 + def words_compose(begin_t, parts, end_t); end + + # Executable strings + # + # pkg:gem/parser#lib/parser/builders/default.rb:381 + def xstring_compose(begin_t, parts, end_t); end + + private + + # pkg:gem/parser#lib/parser/builders/default.rb:1829 + def arg_name_collides?(this_name, that_name); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2025 + def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1999 + def binary_op_map(left_e, op_t, right_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2127 + def block_map(receiver_l, begin_t, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1804 + def check_assignment_to_numparam(name, loc); end + + # VERIFICATION + # + # pkg:gem/parser#lib/parser/builders/default.rb:1696 + def check_condition(cond); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1775 + def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1750 + def check_duplicate_args(args, map = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1862 + def check_duplicate_pattern_key(name, loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1852 + def check_duplicate_pattern_variable(name, loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1844 + def check_lvar_name(name, loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1819 + def check_reserved_for_numparam(name, loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2293 + def collapse_string_parts?(parts); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1950 + def collection_map(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2154 + def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1985 + def constant_map(scope, colon2_t, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2058 + def definition_map(keyword_t, operator_t, name_t, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1891 + def delimited_string_map(string_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2315 + def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2198 + def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2064 + def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1946 + def expr_map(loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2179 + def for_map(keyword_t, in_t, begin_t, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2226 + def guard_map(keyword_t, guard_body_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2116 + def index_map(receiver_e, lbrack_t, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1882 + def join_exprs(left_expr, right_expr); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2132 + def keyword_map(keyword_t, begin_t, args, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2149 + def keyword_mod_map(pre_e, keyword_t, post_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2035 + def kwarg_map(name_t, value_e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2346 + def kwargs?(node); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2310 + def loc(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2048 + def module_definition_map(keyword_t, name_e, operator_t, end_t); end + + # SOURCE MAPS + # + # pkg:gem/parser#lib/parser/builders/default.rb:1874 + def n(type, children, source_map); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1878 + def n0(type, source_map); end + + # pkg:gem/parser#lib/parser/builders/default.rb:288 + def numeric(kind, token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1916 + def pair_keyword_map(key_t, value_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1931 + def pair_quoted_map(begin_t, end_t, value_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1902 + def prefix_string_map(symbol); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2013 + def range_map(start_e, op_t, end_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1980 + def regexp_map(begin_t, end_t, options_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2185 + def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2336 + def rewrite_hash_args_to_kwargs(args); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2098 + def send_binary_op_map(lhs_e, selector_t, rhs_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2121 + def send_index_map(receiver_e, lbrack_t, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2072 + def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2104 + def send_unary_op_map(selector_t, arg_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2257 + def static_regexp(parts, options); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2282 + def static_regexp_node(node); end + + # Extract a static string from e.g. a regular expression, + # honoring the fact that MRI expands interpolations like #{""} + # at parse time. + # + # pkg:gem/parser#lib/parser/builders/default.rb:2240 + def static_string(nodes); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1966 + def string_map(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2302 + def string_value(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2174 + def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1887 + def token_map(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2003 + def unary_op_map(op_t, arg_e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1911 + def unquoted_map(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2324 + def validate_definee(definee); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1789 + def validate_no_forward_arg_after_restarg(args); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2298 + def value(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2092 + def var_send_map(variable_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1995 + def variable_map(name_t); end + + class << self + # AST compatibility attribute; causes a single non-mlhs + # block argument to be wrapped in s(:procarg0). + # + # If set to false (the default), block arguments `|a|` are emitted as + # `s(:args, s(:procarg0, :a))` + # + # If set to true, block arguments `|a|` are emitted as + # `s(:args, s(:procarg0, s(:arg, :a))` + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:97 + def emit_arg_inside_procarg0; end + + # AST compatibility attribute; causes a single non-mlhs + # block argument to be wrapped in s(:procarg0). + # + # If set to false (the default), block arguments `|a|` are emitted as + # `s(:args, s(:procarg0, :a))` + # + # If set to true, block arguments `|a|` are emitted as + # `s(:args, s(:procarg0, s(:arg, :a))` + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:97 + def emit_arg_inside_procarg0=(_arg0); end + + # AST compatibility attribute; locations of `__ENCODING__` are not the same + # as locations of `Encoding::UTF_8` causing problems during rewriting, + # all new code should set this attribute to true. + # + # If set to false (the default), `__ENCODING__` is emitted as + # ` s(:const, s(:const, nil, :Encoding), :UTF_8)`. + # + # If set to true, `__ENCODING__` is emitted as + # `s(:__ENCODING__)`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:58 + def emit_encoding; end + + # AST compatibility attribute; locations of `__ENCODING__` are not the same + # as locations of `Encoding::UTF_8` causing problems during rewriting, + # all new code should set this attribute to true. + # + # If set to false (the default), `__ENCODING__` is emitted as + # ` s(:const, s(:const, nil, :Encoding), :UTF_8)`. + # + # If set to true, `__ENCODING__` is emitted as + # `s(:__ENCODING__)`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:58 + def emit_encoding=(_arg0); end + + # AST compatibility attribute; arguments forwarding initially + # didn't have support for leading arguments + # (i.e. `def m(a, ...); end` was a syntax error). However, Ruby 3.0 + # added support for any number of arguments in front of the `...`. + # + # If set to false (the default): + # 1. `def m(...) end` is emitted as + # s(:def, :m, s(:forward_args), nil) + # 2. `def m(a, b, ...) end` is emitted as + # s(:def, :m, + # s(:args, s(:arg, :a), s(:arg, :b), s(:forward_arg))) + # + # If set to true it uses a single format: + # 1. `def m(...) end` is emitted as + # s(:def, :m, s(:args, s(:forward_arg))) + # 2. `def m(a, b, ...) end` is emitted as + # s(:def, :m, s(:args, s(:arg, :a), s(:arg, :b), s(:forward_arg))) + # + # It does't matter that much on 2.7 (because there can't be any leading arguments), + # but on 3.0 it should be better enabled to use a single AST format. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:126 + def emit_forward_arg; end + + # AST compatibility attribute; arguments forwarding initially + # didn't have support for leading arguments + # (i.e. `def m(a, ...); end` was a syntax error). However, Ruby 3.0 + # added support for any number of arguments in front of the `...`. + # + # If set to false (the default): + # 1. `def m(...) end` is emitted as + # s(:def, :m, s(:forward_args), nil) + # 2. `def m(a, b, ...) end` is emitted as + # s(:def, :m, + # s(:args, s(:arg, :a), s(:arg, :b), s(:forward_arg))) + # + # If set to true it uses a single format: + # 1. `def m(...) end` is emitted as + # s(:def, :m, s(:args, s(:forward_arg))) + # 2. `def m(a, b, ...) end` is emitted as + # s(:def, :m, s(:args, s(:arg, :a), s(:arg, :b), s(:forward_arg))) + # + # It does't matter that much on 2.7 (because there can't be any leading arguments), + # but on 3.0 it should be better enabled to use a single AST format. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:126 + def emit_forward_arg=(_arg0); end + + # AST compatibility attribute; indexed assignment, `x[] = 1`, is not + # semantically equivalent to calling the method directly, `x.[]=(1)`. + # Specifically, in the former case, the expression's value is always 1, + # and in the latter case, the expression's value is the return value + # of the `[]=` method. + # + # If set to false (the default), `self[1]` is emitted as + # `s(:send, s(:self), :[], s(:int, 1))`, and `self[1] = 2` is + # emitted as `s(:send, s(:self), :[]=, s(:int, 1), s(:int, 2))`. + # + # If set to true, `self[1]` is emitted as + # `s(:index, s(:self), s(:int, 1))`, and `self[1] = 2` is + # emitted as `s(:indexasgn, s(:self), s(:int, 1), s(:int, 2))`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:80 + def emit_index; end + + # AST compatibility attribute; indexed assignment, `x[] = 1`, is not + # semantically equivalent to calling the method directly, `x.[]=(1)`. + # Specifically, in the former case, the expression's value is always 1, + # and in the latter case, the expression's value is the return value + # of the `[]=` method. + # + # If set to false (the default), `self[1]` is emitted as + # `s(:send, s(:self), :[], s(:int, 1))`, and `self[1] = 2` is + # emitted as `s(:send, s(:self), :[]=, s(:int, 1), s(:int, 2))`. + # + # If set to true, `self[1]` is emitted as + # `s(:index, s(:self), s(:int, 1))`, and `self[1] = 2` is + # emitted as `s(:indexasgn, s(:self), s(:int, 1), s(:int, 2))`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:80 + def emit_index=(_arg0); end + + # AST compatibility attribute; Starting from Ruby 2.7 keyword arguments + # of method calls that are passed explicitly as a hash (i.e. with curly braces) + # are treated as positional arguments and Ruby 2.7 emits a warning on such method + # call. Ruby 3.0 given an ArgumentError. + # + # If set to false (the default) the last hash argument is emitted as `hash`: + # + # ``` + # (send nil :foo + # (hash + # (pair + # (sym :bar) + # (int 42)))) + # ``` + # + # If set to true it is emitted as `kwargs`: + # + # ``` + # (send nil :foo + # (kwargs + # (pair + # (sym :bar) + # (int 42)))) + # ``` + # + # Note that `kwargs` node is just a replacement for `hash` argument, + # so if there's are multiple arguments (or a `kwsplat`) all of them + # are wrapped into `kwargs` instead of `hash`: + # + # ``` + # (send nil :foo + # (kwargs + # (pair + # (sym :a) + # (int 42)) + # (kwsplat + # (send nil :b)) + # (pair + # (sym :c) + # (int 10)))) + # ``` + # + # pkg:gem/parser#lib/parser/builders/default.rb:174 + def emit_kwargs; end + + # AST compatibility attribute; Starting from Ruby 2.7 keyword arguments + # of method calls that are passed explicitly as a hash (i.e. with curly braces) + # are treated as positional arguments and Ruby 2.7 emits a warning on such method + # call. Ruby 3.0 given an ArgumentError. + # + # If set to false (the default) the last hash argument is emitted as `hash`: + # + # ``` + # (send nil :foo + # (hash + # (pair + # (sym :bar) + # (int 42)))) + # ``` + # + # If set to true it is emitted as `kwargs`: + # + # ``` + # (send nil :foo + # (kwargs + # (pair + # (sym :bar) + # (int 42)))) + # ``` + # + # Note that `kwargs` node is just a replacement for `hash` argument, + # so if there's are multiple arguments (or a `kwsplat`) all of them + # are wrapped into `kwargs` instead of `hash`: + # + # ``` + # (send nil :foo + # (kwargs + # (pair + # (sym :a) + # (int 42)) + # (kwsplat + # (send nil :b)) + # (pair + # (sym :c) + # (int 10)))) + # ``` + # + # pkg:gem/parser#lib/parser/builders/default.rb:174 + def emit_kwargs=(_arg0); end + + # AST compatibility attribute; since `-> {}` is not semantically + # equivalent to `lambda {}`, all new code should set this attribute + # to true. + # + # If set to false (the default), `-> {}` is emitted as + # `s(:block, s(:send, nil, :lambda), s(:args), nil)`. + # + # If set to true, `-> {}` is emitted as + # `s(:block, s(:lambda), s(:args), nil)`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:22 + def emit_lambda; end + + # AST compatibility attribute; since `-> {}` is not semantically + # equivalent to `lambda {}`, all new code should set this attribute + # to true. + # + # If set to false (the default), `-> {}` is emitted as + # `s(:block, s(:send, nil, :lambda), s(:args), nil)`. + # + # If set to true, `-> {}` is emitted as + # `s(:block, s(:lambda), s(:args), nil)`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:22 + def emit_lambda=(_arg0); end + + # AST compatibility attribute; Starting from 3.0 Ruby returns + # true/false from single-line pattern matching with `in` keyword. + # + # Before 3.0 there was an exception if given value doesn't match pattern. + # + # NOTE: This attribute affects only Ruby 2.7 grammar. + # 3.0 grammar always emits `match_pattern`/`match_pattern_p` + # + # If compatibility attribute set to false `foo in bar` is emitted as `in_match`: + # + # ``` + # (in-match + # (send nil :foo) + # (match-var :bar)) + # ``` + # + # If set to true it's emitted as `match_pattern_p`: + # ``` + # (match-pattern-p + # (send nil :foo) + # (match-var :bar)) + # ``` + # + # pkg:gem/parser#lib/parser/builders/default.rb:203 + def emit_match_pattern; end + + # AST compatibility attribute; Starting from 3.0 Ruby returns + # true/false from single-line pattern matching with `in` keyword. + # + # Before 3.0 there was an exception if given value doesn't match pattern. + # + # NOTE: This attribute affects only Ruby 2.7 grammar. + # 3.0 grammar always emits `match_pattern`/`match_pattern_p` + # + # If compatibility attribute set to false `foo in bar` is emitted as `in_match`: + # + # ``` + # (in-match + # (send nil :foo) + # (match-var :bar)) + # ``` + # + # If set to true it's emitted as `match_pattern_p`: + # ``` + # (match-pattern-p + # (send nil :foo) + # (match-var :bar)) + # ``` + # + # pkg:gem/parser#lib/parser/builders/default.rb:203 + def emit_match_pattern=(_arg0); end + + # AST compatibility attribute; block arguments of `m { |a| }` are + # not semantically equivalent to block arguments of `m { |a,| }` or `m { |a, b| }`, + # all new code should set this attribute to true. + # + # If set to false (the default), arguments of `m { |a| }` are emitted as + # `s(:args, s(:arg, :a))`. + # + # If set to true, arguments of `m { |a| }` are emitted as + # `s(:args, s(:procarg0, :a)). + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:40 + def emit_procarg0; end + + # AST compatibility attribute; block arguments of `m { |a| }` are + # not semantically equivalent to block arguments of `m { |a,| }` or `m { |a, b| }`, + # all new code should set this attribute to true. + # + # If set to false (the default), arguments of `m { |a| }` are emitted as + # `s(:args, s(:arg, :a))`. + # + # If set to true, arguments of `m { |a| }` are emitted as + # `s(:args, s(:procarg0, :a)). + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:40 + def emit_procarg0=(_arg0); end + + # @api private + # + # pkg:gem/parser#lib/parser/builders/default.rb:211 + def modernize; end + end +end + +# {Parser::ClobberingError} is raised when {Parser::Source::Rewriter} +# detects a clobbering rewrite action. This class inherits {RuntimeError} +# rather than {StandardError} for backward compatibility. +# +# @api public +# +# pkg:gem/parser#lib/parser/clobbering_error.rb:11 +class Parser::ClobberingError < ::RuntimeError; end + +# Context of parsing that is represented by a stack of scopes. +# +# Supported states: +# + :class - in the class body (class A; end) +# + :module - in the module body (module M; end) +# + :sclass - in the singleton class body (class << obj; end) +# + :def - in the method body (def m; end) +# + :defs - in the singleton method body (def self.m; end) +# + :def_open_args - in the arglist of the method definition +# keep in mind that it's set **only** after reducing the first argument, +# if you need to handle the first argument check `lex_state == expr_fname` +# + :block - in the block body (tap {}) +# + :lambda - in the lambda body (-> {}) +# +# pkg:gem/parser#lib/parser/context.rb:18 +class Parser::Context + # pkg:gem/parser#lib/parser/context.rb:30 + def initialize; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def cant_return; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def cant_return=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_argdef; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_argdef=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_block; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_block=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_class; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_class=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_def; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_def=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_defined; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_defined=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:47 + def in_dynamic_block?; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_kwarg; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_kwarg=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_lambda; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_lambda=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:34 + def reset; end +end + +# pkg:gem/parser#lib/parser/context.rb:19 +Parser::Context::FLAGS = T.let(T.unsafe(nil), Array) + +# Stack that holds names of current arguments, +# i.e. while parsing +# def m1(a = (def m2(b = def m3(c = 1); end); end)); end +# ^ +# stack is [:a, :b, :c] +# +# Emulates `p->cur_arg` in MRI's parse.y +# +# @api private +# +# pkg:gem/parser#lib/parser/current_arg_stack.rb:14 +class Parser::CurrentArgStack + # pkg:gem/parser#lib/parser/current_arg_stack.rb:17 + def initialize; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:22 + def empty?; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:34 + def pop; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:26 + def push(value); end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:38 + def reset; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:30 + def set(value); end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:15 + def stack; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:42 + def top; end +end + +# @api private +# +# pkg:gem/parser#lib/parser/deprecation.rb:7 +module Parser::Deprecation + # pkg:gem/parser#lib/parser/deprecation.rb:9 + def warn_of_deprecation; end + + # pkg:gem/parser#lib/parser/deprecation.rb:8 + def warned_of_deprecation=(_arg0); end +end + +# @api public +# +# @!attribute [r] level +# @see LEVELS +# @return [Symbol] diagnostic level +# +# @!attribute [r] reason +# @see Parser::MESSAGES +# @return [Symbol] reason for error +# +# @!attribute [r] arguments +# @see Parser::MESSAGES +# @return [Symbol] extended arguments that describe the error +# +# @!attribute [r] message +# @return [String] error message +# +# @!attribute [r] location +# Main error-related source range. +# @return [Parser::Source::Range] +# +# @!attribute [r] highlights +# Supplementary error-related source ranges. +# @return [Array] +# +# pkg:gem/parser#lib/parser/diagnostic.rb:31 +class Parser::Diagnostic + # @param [Symbol] level + # @param [Symbol] reason + # @param [Hash] arguments + # @param [Parser::Source::Range] location + # @param [Array] highlights + # + # pkg:gem/parser#lib/parser/diagnostic.rb:49 + def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/diagnostic.rb:39 + def arguments; end + + # pkg:gem/parser#lib/parser/diagnostic.rb:40 + def highlights; end + + # pkg:gem/parser#lib/parser/diagnostic.rb:39 + def level; end + + # pkg:gem/parser#lib/parser/diagnostic.rb:40 + def location; end + + # @return [String] the rendered message. + # + # pkg:gem/parser#lib/parser/diagnostic.rb:69 + def message; end + + # pkg:gem/parser#lib/parser/diagnostic.rb:39 + def reason; end + + # Renders the diagnostic message as a clang-like diagnostic. + # + # @example + # diagnostic.render # => + # # [ + # # "(fragment:0):1:5: error: unexpected token $end", + # # "foo +", + # # " ^" + # # ] + # + # @return [Array] + # + # pkg:gem/parser#lib/parser/diagnostic.rb:86 + def render; end + + private + + # If necessary, shrink a `Range` so as to include only the first line. + # + # @return [Parser::Source::Range] + # + # pkg:gem/parser#lib/parser/diagnostic.rb:142 + def first_line_only(range); end + + # If necessary, shrink a `Range` so as to include only the last line. + # + # @return [Parser::Source::Range] + # + # pkg:gem/parser#lib/parser/diagnostic.rb:155 + def last_line_only(range); end + + # Renders one source line in clang diagnostic style, with highlights. + # + # @return [Array] + # + # pkg:gem/parser#lib/parser/diagnostic.rb:110 + def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end +end + +# {Parser::Diagnostic::Engine} provides a basic API for dealing with +# diagnostics by delegating them to registered consumers. +# +# @example +# buffer = Parser::Source::Buffer.new(__FILE__, source: 'foobar') +# +# consumer = lambda do |diagnostic| +# puts diagnostic.message +# end +# +# engine = Parser::Diagnostic::Engine.new(consumer) +# diagnostic = Parser::Diagnostic.new( +# :warning, :unexpected_token, { :token => 'abc' }, buffer, 1..2) +# +# engine.process(diagnostic) # => "unexpected token abc" +# +# @api public +# +# @!attribute [rw] consumer +# @return [#call(Diagnostic)] +# +# @!attribute [rw] all_errors_are_fatal +# When set to `true` any error that is encountered will result in +# {Parser::SyntaxError} being raised. +# @return [Boolean] +# +# @!attribute [rw] ignore_warnings +# When set to `true` warnings will be ignored. +# @return [Boolean] +# +# pkg:gem/parser#lib/parser/diagnostic/engine.rb:36 +class Parser::Diagnostic::Engine + # @param [#call(Diagnostic)] consumer + # + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:45 + def initialize(consumer = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:39 + def all_errors_are_fatal; end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:39 + def all_errors_are_fatal=(_arg0); end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:37 + def consumer; end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:37 + def consumer=(_arg0); end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:40 + def ignore_warnings; end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:40 + def ignore_warnings=(_arg0); end + + # Processes a `diagnostic`: + # * Passes the diagnostic to the consumer, if it's not a warning when + # `ignore_warnings` is set. + # * After that, raises {Parser::SyntaxError} when `all_errors_are_fatal` + # is set to true. + # + # @param [Parser::Diagnostic] diagnostic + # @return [Parser::Diagnostic::Engine] + # @see ignore? + # @see raise? + # + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:64 + def process(diagnostic); end + + protected + + # Checks whether `diagnostic` should be ignored. + # + # @param [Parser::Diagnostic] diagnostic + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:86 + def ignore?(diagnostic); end + + # Checks whether `diagnostic` should be raised as an exception. + # + # @param [Parser::Diagnostic] diagnostic + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:97 + def raise?(diagnostic); end +end + +# Collection of the available diagnostic levels. +# +# @return [Array] +# +# pkg:gem/parser#lib/parser/diagnostic.rb:37 +Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array) + +# line 3 "lib/parser/lexer.rl" +# +# === BEFORE YOU START === +# +# Read the Ruby Hacking Guide chapter 11, available in English at +# http://whitequark.org/blog/2013/04/01/ruby-hacking-guide-ch-11-finite-state-lexer/ +# +# Remember two things about Ragel scanners: +# +# 1) Longest match wins. +# +# 2) If two matches have the same length, the first +# in source code wins. +# +# General rules of making Ragel and Bison happy: +# +# * `p` (position) and `@te` contain the index of the character +# they're pointing to ("current"), plus one. `@ts` contains the index +# of the corresponding character. The code for extracting matched token is: +# +# @source_buffer.slice(@ts...@te) +# +# * If your input is `foooooooobar` and the rule is: +# +# 'f' 'o'+ +# +# the result will be: +# +# foooooooobar +# ^ ts=0 ^ p=te=9 +# +# * A Ragel lexer action should not emit more than one token, unless +# you know what you are doing. +# +# * All Ragel commands (fnext, fgoto, ...) end with a semicolon. +# +# * If an action emits the token and transitions to another state, use +# these Ragel commands: +# +# emit($whatever) +# fnext $next_state; fbreak; +# +# If you perform `fgoto` in an action which does not emit a token nor +# rewinds the stream pointer, the parser's side-effectful, +# context-sensitive lookahead actions will break in a hard to detect +# and debug way. +# +# * If an action does not emit a token: +# +# fgoto $next_state; +# +# * If an action features lookbehind, i.e. matches characters with the +# intent of passing them to another action: +# +# p = @ts - 1 +# fgoto $next_state; +# +# or, if the lookbehind consists of a single character: +# +# fhold; fgoto $next_state; +# +# * Ragel merges actions. So, if you have `e_lparen = '(' %act` and +# `c_lparen = '('` and a lexer action `e_lparen | c_lparen`, the result +# _will_ invoke the action `act`. +# +# e_something stands for "something with **e**mbedded action". +# +# * EOF is explicit and is matched by `c_eof`. If you want to introspect +# the state of the lexer, add this rule to the state: +# +# c_eof => do_eof; +# +# * If you proceed past EOF, the lexer will complain: +# +# NoMethodError: undefined method `ord' for nil:NilClass +# +# line 3 "lib/parser/lexer.rl" +# +# === BEFORE YOU START === +# +# Read the Ruby Hacking Guide chapter 11, available in English at +# http://whitequark.org/blog/2013/04/01/ruby-hacking-guide-ch-11-finite-state-lexer/ +# +# Remember two things about Ragel scanners: +# +# 1) Longest match wins. +# +# 2) If two matches have the same length, the first +# in source code wins. +# +# General rules of making Ragel and Bison happy: +# +# * `p` (position) and `@te` contain the index of the character +# they're pointing to ("current"), plus one. `@ts` contains the index +# of the corresponding character. The code for extracting matched token is: +# +# @source_buffer.slice(@ts...@te) +# +# * If your input is `foooooooobar` and the rule is: +# +# 'f' 'o'+ +# +# the result will be: +# +# foooooooobar +# ^ ts=0 ^ p=te=9 +# +# * A Ragel lexer action should not emit more than one token, unless +# you know what you are doing. +# +# * All Ragel commands (fnext, fgoto, ...) end with a semicolon. +# +# * If an action emits the token and transitions to another state, use +# these Ragel commands: +# +# emit($whatever) +# fnext $next_state; fbreak; +# +# If you perform `fgoto` in an action which does not emit a token nor +# rewinds the stream pointer, the parser's side-effectful, +# context-sensitive lookahead actions will break in a hard to detect +# and debug way. +# +# * If an action does not emit a token: +# +# fgoto $next_state; +# +# * If an action features lookbehind, i.e. matches characters with the +# intent of passing them to another action: +# +# p = @ts - 1 +# fgoto $next_state; +# +# or, if the lookbehind consists of a single character: +# +# fhold; fgoto $next_state; +# +# * Ragel merges actions. So, if you have `e_lparen = '(' %act` and +# `c_lparen = '('` and a lexer action `e_lparen | c_lparen`, the result +# _will_ invoke the action `act`. +# +# e_something stands for "something with **e**mbedded action". +# +# * EOF is explicit and is matched by `c_eof`. If you want to introspect +# the state of the lexer, add this rule to the state: +# +# c_eof => do_eof; +# +# * If you proceed past EOF, the lexer will complain: +# +# NoMethodError: undefined method `ord' for nil:NilClass +# +# pkg:gem/parser#lib/parser/lexer-F1.rb:82 +class Parser::Lexer + # pkg:gem/parser#lib/parser/lexer-F1.rb:8250 + def initialize(version); end + + # Return next token: [type, value]. + # Return next token: [type, value]. + # + # pkg:gem/parser#lib/parser/lexer-F1.rb:8419 + def advance; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def cmdarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def cmdarg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def cmdarg_stack; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def command_start; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def command_start=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8246 + def comments; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8246 + def comments=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def cond; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def cond=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def cond_stack; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8281 + def construct_float(chars); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def context; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def context=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8414 + def dedent_level; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8240 + def diagnostics; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8240 + def diagnostics=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8367 + def encoding; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8242 + def force_utf32; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8242 + def force_utf32=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def lambda_stack; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def paren_nest; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8401 + def pop_cmdarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8410 + def pop_cond; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8396 + def push_cmdarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8405 + def push_cond; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8290 + def reset(reset_state = T.unsafe(nil)); end + + # line 82 "lib/parser/lexer.rl" + # % + # line 82 "lib/parser/lexer.rl" + # % + # + # pkg:gem/parser#lib/parser/lexer-F1.rb:8238 + def source_buffer; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8343 + def source_buffer=(source_buffer); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8388 + def state; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8392 + def state=(state); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8241 + def static_env; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8241 + def static_env=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8246 + def tokens; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8246 + def tokens=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def version; end + + protected + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14701 + def arg_or_cmdarg(cmd_state); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14763 + def check_ambiguous_slash(tm); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14725 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14731 + def e_lbrace; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14675 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14784 + def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14812 + def emit_colon_with_digits(p, tm, diag_msg); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14709 + def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14721 + def emit_comment_from_range(p, pe); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14691 + def emit_do(do_block = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14774 + def emit_global_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14792 + def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14800 + def emit_rbrace_rparen_rbrack; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14822 + def emit_singleton_class; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14685 + def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14740 + def numeric_literal_int; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14759 + def on_newline(p); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14671 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14662 + def stack_pop; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14667 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14658 + def version?(*versions); end + + class << self + # pkg:gem/parser#lib/parser/lexer-F1.rb:8186 + def lex_en_expr_arg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8186 + def lex_en_expr_arg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8202 + def lex_en_expr_beg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8202 + def lex_en_expr_beg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8190 + def lex_en_expr_cmdarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8190 + def lex_en_expr_cmdarg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8182 + def lex_en_expr_dot; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8182 + def lex_en_expr_dot=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8214 + def lex_en_expr_end; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8214 + def lex_en_expr_end=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8194 + def lex_en_expr_endarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8194 + def lex_en_expr_endarg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8178 + def lex_en_expr_endfn; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8178 + def lex_en_expr_endfn=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8174 + def lex_en_expr_fname; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8174 + def lex_en_expr_fname=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8206 + def lex_en_expr_labelarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8206 + def lex_en_expr_labelarg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8198 + def lex_en_expr_mid; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8198 + def lex_en_expr_mid=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8210 + def lex_en_expr_value; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8210 + def lex_en_expr_value=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8170 + def lex_en_expr_variable; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8170 + def lex_en_expr_variable=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8230 + def lex_en_inside_string; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8230 + def lex_en_inside_string=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8218 + def lex_en_leading_dot; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8218 + def lex_en_leading_dot=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8226 + def lex_en_line_begin; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8226 + def lex_en_line_begin=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8222 + def lex_en_line_comment; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8222 + def lex_en_line_comment=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8165 + def lex_error; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8165 + def lex_error=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8161 + def lex_start; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8161 + def lex_start=(_arg0); end + + private + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8064 + def _lex_eof_trans; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8064 + def _lex_eof_trans=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7967 + def _lex_from_state_actions; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7967 + def _lex_from_state_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:461 + def _lex_index_offsets; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:461 + def _lex_index_offsets=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:558 + def _lex_indicies; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:558 + def _lex_indicies=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:364 + def _lex_key_spans; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:364 + def _lex_key_spans=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7870 + def _lex_to_state_actions; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7870 + def _lex_to_state_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7722 + def _lex_trans_actions; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7722 + def _lex_trans_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:87 + def _lex_trans_keys; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:87 + def _lex_trans_keys=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7574 + def _lex_trans_targs; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7574 + def _lex_trans_targs=(_arg0); end + end +end + +# pkg:gem/parser#lib/parser/lexer/dedenter.rb:5 +class Parser::Lexer::Dedenter + # pkg:gem/parser#lib/parser/lexer/dedenter.rb:9 + def initialize(dedent_level); end + + # For a heredoc like + # <<-HERE + # a + # b + # HERE + # this method gets called with " a\n" and " b\n" + # + # However, the following heredoc: + # + # <<-HERE + # a\ + # b + # HERE + # calls this method only once with a string " a\\\n b\n" + # + # This is important because technically it's a single line, + # but it has to be concatenated __after__ dedenting. + # + # It has no effect for non-squiggly heredocs, i.e. it simply removes "\\\n" + # Of course, lexer could do it but once again: it's all because of dedenting. + # + # pkg:gem/parser#lib/parser/lexer/dedenter.rb:36 + def dedent(string); end + + # pkg:gem/parser#lib/parser/lexer/dedenter.rb:83 + def interrupt; end +end + +# Tab (\t) counts as 8 spaces +# +# pkg:gem/parser#lib/parser/lexer/dedenter.rb:7 +Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:14869 +Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:14855 +Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:14862 +Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:8371 +Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer/literal.rb:6 +class Parser::Lexer::Literal + # pkg:gem/parser#lib/parser/lexer/literal.rb:42 + def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:116 + def backslash_delimited?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:39 + def dedent_level; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:191 + def end_interp_brace_and_try_closing; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:218 + def extend_content; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:222 + def extend_space(ts, te); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:197 + def extend_string(string, ts, te); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:204 + def flush_string; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:104 + def heredoc?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:39 + def heredoc_e; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:168 + def infer_indent_level(line); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:91 + def interpolate?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:124 + def munge_escape?(character); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:134 + def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:108 + def plain_heredoc?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:100 + def regexp?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:40 + def saved_herebody_s; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:40 + def saved_herebody_s=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:112 + def squiggly_heredoc?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:187 + def start_interp_brace; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:39 + def str_s; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:232 + def supports_line_continuation_via_slash?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:120 + def type; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:95 + def words?; end + + protected + + # pkg:gem/parser#lib/parser/lexer/literal.rb:263 + def clear_buffer; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:259 + def coerce_encoding(string); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:238 + def delimiter?(delimiter); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:279 + def emit(token, type, s, e); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:274 + def emit_start_tok; end +end + +# pkg:gem/parser#lib/parser/lexer/literal.rb:7 +Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer/literal.rb:8 +Parser::Lexer::Literal::SPACE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/parser#lib/parser/lexer/literal.rb:9 +Parser::Lexer::Literal::TAB = T.let(T.unsafe(nil), Integer) + +# pkg:gem/parser#lib/parser/lexer/literal.rb:11 +Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) + +# Mapping of strings to parser tokens. +# Mapping of strings to parser tokens. +# +# pkg:gem/parser#lib/parser/lexer-F1.rb:14829 +Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:14849 +Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer/stack_state.rb:5 +class Parser::Lexer::StackState + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:6 + def initialize(name); end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:34 + def active?; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:11 + def clear; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:38 + def empty?; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:46 + def inspect; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:29 + def lexpop; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:22 + def pop; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:15 + def push(bit); end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:42 + def to_s; end +end + +# line 3 "lib/parser/lexer-strings.rl" +# +# pkg:gem/parser#lib/parser/lexer-strings.rb:6 +class Parser::LexerStrings + # pkg:gem/parser#lib/parser/lexer-strings.rb:3300 + def initialize(lexer, version); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3339 + def advance(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5069 + def close_interp_on_current_literal(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5043 + def continue_lexing(current_literal); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5092 + def dedent_level; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3295 + def herebody_s; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3295 + def herebody_s=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5047 + def literal; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5015 + def next_state_for_literal(literal); end + + # This hook is triggered by "main" lexer on every newline character + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:5100 + def on_newline(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5051 + def pop_literal; end + + # === LITERAL STACK === + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:5009 + def push_literal(*args); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:4999 + def read_character_constant(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3314 + def reset; end + + # Set by "main" lexer + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:3298 + def source_buffer; end + + # Set by "main" lexer + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:3298 + def source_buffer=(_arg0); end + + # Set by "main" lexer + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:3298 + def source_pts; end + + # Set by "main" lexer + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:3298 + def source_pts=(_arg0); end + + protected + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5406 + def check_ambiguous_slash(tm); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5417 + def check_invalid_escapes(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5136 + def cond; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5132 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5128 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5396 + def emit_character_constant; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5373 + def emit_interp_var(interp_var_kind); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5140 + def emit_invalid_escapes?; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5291 + def encode_escape(ord); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5384 + def encode_escaped_char(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5112 + def eof_codepoint?(point); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5210 + def extend_interp_code(current_literal); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5225 + def extend_interp_digit_var; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5364 + def extend_interp_var(current_literal); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5234 + def extend_string_eol_check_eof(current_literal, pe); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5251 + def extend_string_eol_heredoc_intertwined(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5241 + def extend_string_eol_heredoc_line; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5267 + def extend_string_eol_words(current_literal, p); end + + # String escaping + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:5154 + def extend_string_escaped; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5287 + def extend_string_for_token_range(current_literal, string); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5279 + def extend_string_slice_end(lookahead); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5124 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5356 + def read_post_meta_or_ctrl_char(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5388 + def slash_c_char; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5392 + def slash_m_char; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5120 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5295 + def unescape_char(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5307 + def unicode_points(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5116 + def version?(*versions); end + + class << self + # pkg:gem/parser#lib/parser/lexer-strings.rb:3275 + def lex_en_character; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3275 + def lex_en_character=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3255 + def lex_en_interp_backslash_delimited; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3255 + def lex_en_interp_backslash_delimited=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3263 + def lex_en_interp_backslash_delimited_words; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3263 + def lex_en_interp_backslash_delimited_words=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3243 + def lex_en_interp_string; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3243 + def lex_en_interp_string=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3239 + def lex_en_interp_words; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3239 + def lex_en_interp_words=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3259 + def lex_en_plain_backslash_delimited; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3259 + def lex_en_plain_backslash_delimited=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3267 + def lex_en_plain_backslash_delimited_words; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3267 + def lex_en_plain_backslash_delimited_words=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3251 + def lex_en_plain_string; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3251 + def lex_en_plain_string=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3247 + def lex_en_plain_words; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3247 + def lex_en_plain_words=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3271 + def lex_en_regexp_modifiers; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3271 + def lex_en_regexp_modifiers=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3279 + def lex_en_unknown; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3279 + def lex_en_unknown=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3234 + def lex_error; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3234 + def lex_error=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3230 + def lex_start; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3230 + def lex_start=(_arg0); end + + private + + # pkg:gem/parser#lib/parser/lexer-strings.rb:11 + def _lex_actions; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:11 + def _lex_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3184 + def _lex_eof_trans; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3184 + def _lex_eof_trans=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3138 + def _lex_from_state_actions; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3138 + def _lex_from_state_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:244 + def _lex_index_offsets; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:244 + def _lex_index_offsets=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:290 + def _lex_indicies; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:290 + def _lex_indicies=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:198 + def _lex_key_spans; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:198 + def _lex_key_spans=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3092 + def _lex_to_state_actions; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3092 + def _lex_to_state_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3029 + def _lex_trans_actions; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3029 + def _lex_trans_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:76 + def _lex_trans_keys; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:76 + def _lex_trans_keys=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:2966 + def _lex_trans_targs; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:2966 + def _lex_trans_targs=(_arg0); end + end +end + +# line 6 "lib/parser/lexer-strings.rl" +# % +# +# pkg:gem/parser#lib/parser/lexer-strings.rb:3287 +Parser::LexerStrings::ESCAPES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-strings.rb:5423 +Parser::LexerStrings::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-strings.rb:3332 +Parser::LexerStrings::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-strings.rb:3293 +Parser::LexerStrings::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) + +# Diagnostic messages (errors, warnings and notices) that can be generated. +# +# @see Diagnostic +# +# @api public +# +# pkg:gem/parser#lib/parser/messages.rb:11 +Parser::MESSAGES = T.let(T.unsafe(nil), Hash) + +# Holds p->max_numparam from parse.y +# +# @api private +# +# pkg:gem/parser#lib/parser/max_numparam_stack.rb:8 +class Parser::MaxNumparamStack + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:13 + def initialize; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:17 + def empty?; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:29 + def has_numparams?; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:21 + def has_ordinary_params!; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:25 + def has_ordinary_params?; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:45 + def pop; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:41 + def push(static:); end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:33 + def register(numparam); end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:9 + def stack; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:37 + def top; end + + private + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:51 + def set(value); end +end + +# pkg:gem/parser#lib/parser/max_numparam_stack.rb:11 +Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) + +# @api private +# +# pkg:gem/parser#lib/parser/messages.rb:112 +module Parser::Messages + class << self + # Formats the message, returns a raw template if there's nothing to interpolate + # + # Code like `format("", {})` gives a warning, and so this method tries interpolating + # only if `arguments` hash is not empty. + # + # @api private + # + # pkg:gem/parser#lib/parser/messages.rb:119 + def compile(reason, arguments); end + end +end + +# Parser metadata +# +# pkg:gem/parser#lib/parser/meta.rb:5 +module Parser::Meta; end + +# All node types that parser can produce. Not all parser versions +# will be able to produce every possible node. +# Includes node types that are only emitted by the prism parser translator. +# +# pkg:gem/parser#lib/parser/meta.rb:17 +Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) + +# These are node types required by `Prism::Translation::Parser`, +# which has advanced syntax support ahead of the Parser gem. +# +# pkg:gem/parser#lib/parser/meta.rb:9 +Parser::Meta::PRISM_TRANSLATION_PARSER_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# {Parser::Rewriter} is deprecated. Use {Parser::TreeRewriter} instead. +# It has a backwards compatible API and uses {Parser::Source::TreeRewriter} +# instead of {Parser::Source::Rewriter}. +# Please check the documentation for {Parser::Source::Rewriter} for details. +# +# @api public +# @deprecated Use {Parser::TreeRewriter} +# +# pkg:gem/parser#lib/parser/rewriter.rb:14 +class Parser::Rewriter < ::Parser::AST::Processor + extend ::Parser::Deprecation + + # pkg:gem/parser#lib/parser/rewriter.rb:98 + def initialize(*_arg0); end + + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @param [Parser::AST::Node] node + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/rewriter.rb:38 + def assignment?(node); end + + # Inserts new code after the given source range. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/rewriter.rb:77 + def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/rewriter.rb:67 + def insert_before(range, content); end + + # Removes the source range. + # + # @param [Parser::Source::Range] range + # + # pkg:gem/parser#lib/parser/rewriter.rb:47 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/rewriter.rb:87 + def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @param [Parser::Source::Buffer] source_buffer + # @param [Parser::AST::Node] ast + # @return [String] + # + # pkg:gem/parser#lib/parser/rewriter.rb:23 + def rewrite(source_buffer, ast); end + + # Wraps the given source range with the given values. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/rewriter.rb:57 + def wrap(range, before, after); end +end + +# pkg:gem/parser#lib/parser/rewriter.rb:91 +Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# pkg:gem/parser#lib/parser.rb:30 +module Parser::Source; end + +# A buffer with source code. {Buffer} contains the source code itself, +# associated location information (name and first line), and takes care +# of encoding. +# +# A source buffer is immutable once populated. +# +# @!attribute [r] name +# Buffer name. If the buffer was created from a file, the name corresponds +# to relative path to the file. +# @return [String] buffer name +# +# @!attribute [r] first_line +# First line of the buffer, 1 by default. +# @return [Integer] first line +# +# @api public +# +# pkg:gem/parser#lib/parser/source/buffer.rb:25 +class Parser::Source::Buffer + # pkg:gem/parser#lib/parser/source/buffer.rb:110 + def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end + + # Convert a character index into the source to a column number. + # + # @param [Integer] position + # @return [Integer] column + # @api private + # + # pkg:gem/parser#lib/parser/source/buffer.rb:247 + def column_for_position(position); end + + # Convert a character index into the source to a `[line, column]` tuple. + # + # @param [Integer] position + # @return [[Integer, Integer]] `[line, column]` + # + # pkg:gem/parser#lib/parser/source/buffer.rb:222 + def decompose_position(position); end + + # pkg:gem/parser#lib/parser/source/buffer.rb:26 + def first_line; end + + # pkg:gem/parser#lib/parser/source/buffer.rb:317 + def freeze; end + + # pkg:gem/parser#lib/parser/source/buffer.rb:323 + def inspect; end + + # Number of last line in the buffer + # + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:312 + def last_line; end + + # Convert a character index into the source to a line number. + # + # @param [Integer] position + # @return [Integer] line + # @api private + # + # pkg:gem/parser#lib/parser/source/buffer.rb:236 + def line_for_position(position); end + + # Extract line `lineno` as a new `Range`, taking `first_line` into account. + # + # @param [Integer] lineno + # @return [Range] + # @raise [IndexError] if `lineno` is out of bounds + # + # pkg:gem/parser#lib/parser/source/buffer.rb:289 + def line_range(lineno); end + + # pkg:gem/parser#lib/parser/source/buffer.rb:26 + def name; end + + # Populate this buffer from a string without encoding autodetection. + # + # @param [String] input + # @raise [ArgumentError] if already populated + # @return [String] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:185 + def raw_source=(input); end + + # Populate this buffer from correspondingly named file. + # + # @example + # Parser::Source::Buffer.new('foo/bar.rb').read + # + # @return [Buffer] self + # @raise [ArgumentError] if already populated + # + # pkg:gem/parser#lib/parser/source/buffer.rb:136 + def read; end + + # pkg:gem/parser#lib/parser/source/buffer.rb:199 + def slice(start, length = T.unsafe(nil)); end + + # Source code contained in this buffer. + # + # @return [String] source code + # @raise [RuntimeError] if buffer is not populated yet + # + # pkg:gem/parser#lib/parser/source/buffer.rb:150 + def source; end + + # Populate this buffer from a string with encoding autodetection. + # `input` is mutated if not frozen. + # + # @param [String] input + # @raise [ArgumentError] if already populated + # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding + # @return [String] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:167 + def source=(input); end + + # Extract line `lineno` from source, taking `first_line` into account. + # + # @param [Integer] lineno + # @return [String] + # @raise [IndexError] if `lineno` is out of bounds + # + # pkg:gem/parser#lib/parser/source/buffer.rb:278 + def source_line(lineno); end + + # Return an `Array` of source code lines. + # + # @return [Array] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:257 + def source_lines; end + + # @return [Range] A range covering the whole source + # + # pkg:gem/parser#lib/parser/source/buffer.rb:303 + def source_range; end + + private + + # RUBY_VERSION >= 2.3 + # + # pkg:gem/parser#lib/parser/source/buffer.rb:353 + def bsearch(line_begins, position); end + + # @returns [0, line_begin_of_line_1, ..., source.size + 1] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:330 + def line_begins; end + + # @returns 0-based line index of position + # + # pkg:gem/parser#lib/parser/source/buffer.rb:344 + def line_index_for_position(position); end + + class << self + # Try to recognize encoding of `string` as Ruby would, i.e. by looking for + # magic encoding comment or UTF-8 BOM. `string` can be in any encoding. + # + # @param [String] string + # @raise [Parser::UnknownEncodingInMagicComment] if the encoding is not recognized + # @return [String, nil] encoding name, if recognized + # + # pkg:gem/parser#lib/parser/source/buffer.rb:52 + def recognize_encoding(string); end + + # Recognize encoding of `input` and process it so it could be lexed. + # + # * If `input` does not contain BOM or magic encoding comment, it is + # kept in the original encoding. + # * If the detected encoding is binary, `input` is kept in binary. + # * Otherwise, `input` is re-encoded into UTF-8 and returned as a + # new string. + # + # This method mutates the encoding of `input`, but not its content. + # + # @param [String] input + # @return [String] + # @raise [EncodingError] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:95 + def reencode_string(input); end + end +end + +# @api private +# +# pkg:gem/parser#lib/parser/source/buffer.rb:31 +Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) + +# A comment in the source code. +# +# @!attribute [r] text +# @return [String] +# +# @!attribute [r] location +# @return [Parser::Source::Range] +# +# @api public +# +# pkg:gem/parser#lib/parser/source/comment.rb:17 +class Parser::Source::Comment + # @param [Parser::Source::Range] range + # + # pkg:gem/parser#lib/parser/source/comment.rb:67 + def initialize(range); end + + # Compares comments. Two comments are equal if they + # correspond to the same source range. + # + # @param [Object] other + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/comment.rb:120 + def ==(other); end + + # @see #type + # @return [Boolean] true if this is a block comment. + # + # pkg:gem/parser#lib/parser/source/comment.rb:109 + def document?; end + + # @see #type + # @return [Boolean] true if this is an inline comment. + # + # pkg:gem/parser#lib/parser/source/comment.rb:101 + def inline?; end + + # @return [String] a human-readable representation of this comment + # + # pkg:gem/parser#lib/parser/source/comment.rb:128 + def inspect; end + + # pkg:gem/parser#lib/parser/source/comment.rb:21 + def loc; end + + # pkg:gem/parser#lib/parser/source/comment.rb:20 + def location; end + + # pkg:gem/parser#lib/parser/source/comment.rb:18 + def text; end + + # Type of this comment. + # + # * Inline comments correspond to `:inline`: + # + # # whatever + # + # * Block comments correspond to `:document`: + # + # =begin + # hi i am a document + # =end + # + # @return [Symbol] + # + # pkg:gem/parser#lib/parser/source/comment.rb:89 + def type; end + + class << self + # Associate `comments` with `ast` nodes by their corresponding node. + # + # @param [Parser::AST::Node] ast + # @param [Array] comments + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate + # @deprecated Use {associate_locations}. + # + # pkg:gem/parser#lib/parser/source/comment.rb:32 + def associate(ast, comments); end + + # Associate `comments` with `ast` nodes using identity. + # + # @param [Parser::AST::Node] ast + # @param [Array] comments + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_by_identity + # + # pkg:gem/parser#lib/parser/source/comment.rb:59 + def associate_by_identity(ast, comments); end + + # Associate `comments` with `ast` nodes by their location in the + # source. + # + # @param [Parser::AST::Node] ast + # @param [Array] comments + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_locations + # + # pkg:gem/parser#lib/parser/source/comment.rb:46 + def associate_locations(ast, comments); end + end +end + +# A processor which associates AST nodes with comments based on their +# location in source code. It may be used, for example, to implement +# rdoc-style processing. +# +# @example +# require 'parser/current' +# +# ast, comments = Parser::CurrentRuby.parse_with_comments(<<-CODE) +# # Class stuff +# class Foo +# # Attr stuff +# # @see bar +# attr_accessor :foo +# end +# CODE +# +# p Parser::Source::Comment.associate(ast, comments) +# # => { +# # (class (const nil :Foo) ...) => +# # [#], +# # (send nil :attr_accessor (sym :foo)) => +# # [#, +# # #] +# # } +# +# @see {associate} +# +# @!attribute skip_directives +# Skip file processing directives disguised as comments. +# Namely: +# +# * Shebang line, +# * Magic encoding comment. +# +# @return [Boolean] +# +# @api public +# +# pkg:gem/parser#lib/parser/source/comment/associator.rb:45 +class Parser::Source::Comment::Associator + # @param [Parser::AST::Node] ast + # @param [Array] comments + # + # pkg:gem/parser#lib/parser/source/comment/associator.rb:51 + def initialize(ast, comments); end + + # Compute a mapping between AST nodes and comments. Comment is + # associated with the node, if it is one of the following types: + # + # - preceding comment, it ends before the node start + # - sparse comment, it is located inside the node, after all child nodes + # - decorating comment, it starts at the same line, where the node ends + # + # This rule is unambiguous and produces the result + # one could reasonably expect; for example, this code + # + # # foo + # hoge # bar + # + fuga + # + # will result in the following association: + # + # { + # (send (lvar :hoge) :+ (lvar :fuga)) => + # [#], + # (lvar :fuga) => + # [#] + # } + # + # Note that comments after the end of the end of a passed tree range are + # ignored (except root decorating comment). + # + # Note that {associate} produces unexpected result for nodes which are + # equal but have distinct locations; comments for these nodes are merged. + # You may prefer using {associate_by_identity} or {associate_locations}. + # + # @return [Hash>] + # @deprecated Use {associate_locations}. + # + # pkg:gem/parser#lib/parser/source/comment/associator.rb:92 + def associate; end + + # Same as {associate}, but compares by identity, thus producing an unambiguous + # result even in presence of equal nodes. + # + # @return [Hash>] + # + # pkg:gem/parser#lib/parser/source/comment/associator.rb:115 + def associate_by_identity; end + + # Same as {associate}, but uses `node.loc` instead of `node` as + # the hash key, thus producing an unambiguous result even in presence + # of equal nodes. + # + # @return [Hash>] + # + # pkg:gem/parser#lib/parser/source/comment/associator.rb:104 + def associate_locations; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:46 + def skip_directives; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:46 + def skip_directives=(_arg0); end + + private + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:182 + def advance_comment; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:214 + def advance_through_directives; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:206 + def associate_and_advance_comment(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:123 + def children_in_source_order(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:187 + def current_comment_before?(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:194 + def current_comment_before_end?(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:201 + def current_comment_decorates?(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:135 + def do_associate; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:166 + def process_leading_comments(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:173 + def process_trailing_comments(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:148 + def visit(node); end +end + +# pkg:gem/parser#lib/parser/source/comment/associator.rb:212 +Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/parser#lib/parser/source/comment/associator.rb:122 +Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set) + +# {Map} relates AST nodes to the source code they were parsed from. +# More specifically, a {Map} or its subclass contains a set of ranges: +# +# * `expression`: smallest range which includes all source corresponding +# to the node and all `expression` ranges of its children. +# * other ranges (`begin`, `end`, `operator`, ...): node-specific ranges +# pointing to various interesting tokens corresponding to the node. +# +# Note that the {Map::Heredoc} map is the only one whose `expression` does +# not include other ranges. It only covers the heredoc marker (`< 2]').children[0].loc +# # => > +# +# The {file:doc/AST_FORMAT.md} document describes how ranges associated to source +# code tokens. For example, the entry +# +# (array (int 1) (int 2)) +# +# "[1, 2]" +# ^ begin +# ^ end +# ~~~~~~ expression +# +# means that if `node` is an {Parser::AST::Node} `(array (int 1) (int 2))`, +# then `node.loc` responds to `begin`, `end` and `expression`, and +# `node.loc.begin` returns a range pointing at the opening bracket, and so on. +# +# If you want to write code polymorphic by the source map (i.e. accepting +# several subclasses of {Map}), use `respond_to?` instead of `is_a?` to +# check whether the map features the range you need. Concrete {Map} +# subclasses may not be preserved between versions, but their interfaces +# will be kept compatible. +# +# You can visualize the source maps with `ruby-parse -E` command-line tool. +# +# @example +# require 'parser/current' +# +# p Parser::CurrentRuby.parse('[1, 2]').loc +# # => #, +# # @begin=#, +# # @expression=#> +# +# @!attribute [r] node +# The node that is described by this map. Nodes and maps have 1:1 correspondence. +# @return [Parser::AST::Node] +# +# @!attribute [r] expression +# @return [Range] +# +# @api public +# +# pkg:gem/parser#lib/parser/source/map.rb:70 +class Parser::Source::Map + # @param [Range] expression + # + # pkg:gem/parser#lib/parser/source/map.rb:76 + def initialize(expression); end + + # Compares source maps. + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/map.rb:140 + def ==(other); end + + # A shortcut for `self.expression.column`. + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/map.rb:109 + def column; end + + # pkg:gem/parser#lib/parser/source/map.rb:72 + def expression; end + + # pkg:gem/parser#lib/parser/source/map.rb:103 + def first_line; end + + # A shortcut for `self.expression.last_column`. + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/map.rb:125 + def last_column; end + + # A shortcut for `self.expression.last_line`. + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/map.rb:117 + def last_line; end + + # A shortcut for `self.expression.line`. + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/map.rb:99 + def line; end + + # pkg:gem/parser#lib/parser/source/map.rb:71 + def node; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map.rb:89 + def node=(node); end + + # Converts this source map to a hash with keys corresponding to + # ranges. For example, if called on an instance of {Collection}, + # which adds the `begin` and `end` ranges, the resulting hash + # will contain keys `:expression`, `:begin` and `:end`. + # + # @example + # require 'parser/current' + # + # p Parser::CurrentRuby.parse('[1, 2]').loc.to_hash + # # => { + # # :begin => #, + # # :end => #, + # # :expression => # + # # } + # + # @return [Hash] + # + # pkg:gem/parser#lib/parser/source/map.rb:166 + def to_hash; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map.rb:132 + def with_expression(expression_l); end + + protected + + # pkg:gem/parser#lib/parser/source/map.rb:180 + def update_expression(expression_l); end + + # pkg:gem/parser#lib/parser/source/map.rb:176 + def with(&block); end + + private + + # @api private + # + # pkg:gem/parser#lib/parser/source/map.rb:82 + def initialize_copy(other); end +end + +# pkg:gem/parser#lib/parser/source/map/collection.rb:6 +class Parser::Source::Map::Collection < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/collection.rb:10 + def initialize(begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/collection.rb:7 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/collection.rb:8 + def end; end +end + +# pkg:gem/parser#lib/parser/source/map/condition.rb:6 +class Parser::Source::Map::Condition < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/condition.rb:12 + def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/condition.rb:8 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/condition.rb:9 + def else; end + + # pkg:gem/parser#lib/parser/source/map/condition.rb:10 + def end; end + + # pkg:gem/parser#lib/parser/source/map/condition.rb:7 + def keyword; end +end + +# pkg:gem/parser#lib/parser/source/map/constant.rb:6 +class Parser::Source::Map::Constant < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/constant.rb:11 + def initialize(double_colon, name, expression); end + + # pkg:gem/parser#lib/parser/source/map/constant.rb:7 + def double_colon; end + + # pkg:gem/parser#lib/parser/source/map/constant.rb:8 + def name; end + + # pkg:gem/parser#lib/parser/source/map/constant.rb:9 + def operator; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map/constant.rb:20 + def with_operator(operator_l); end + + protected + + # pkg:gem/parser#lib/parser/source/map/constant.rb:26 + def update_operator(operator_l); end +end + +# pkg:gem/parser#lib/parser/source/map/definition.rb:6 +class Parser::Source::Map::Definition < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/definition.rb:12 + def initialize(keyword_l, operator_l, name_l, end_l); end + + # pkg:gem/parser#lib/parser/source/map/definition.rb:10 + def end; end + + # pkg:gem/parser#lib/parser/source/map/definition.rb:7 + def keyword; end + + # pkg:gem/parser#lib/parser/source/map/definition.rb:9 + def name; end + + # pkg:gem/parser#lib/parser/source/map/definition.rb:8 + def operator; end +end + +# pkg:gem/parser#lib/parser/source/map/for.rb:6 +class Parser::Source::Map::For < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/for.rb:10 + def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/for.rb:8 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/for.rb:8 + def end; end + + # pkg:gem/parser#lib/parser/source/map/for.rb:7 + def in; end + + # pkg:gem/parser#lib/parser/source/map/for.rb:7 + def keyword; end +end + +# pkg:gem/parser#lib/parser/source/map/heredoc.rb:6 +class Parser::Source::Map::Heredoc < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/heredoc.rb:10 + def initialize(begin_l, body_l, end_l); end + + # pkg:gem/parser#lib/parser/source/map/heredoc.rb:7 + def heredoc_body; end + + # pkg:gem/parser#lib/parser/source/map/heredoc.rb:8 + def heredoc_end; end +end + +# pkg:gem/parser#lib/parser/source/map/index.rb:6 +class Parser::Source::Map::Index < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/index.rb:11 + def initialize(begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/index.rb:7 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/index.rb:8 + def end; end + + # pkg:gem/parser#lib/parser/source/map/index.rb:9 + def operator; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map/index.rb:21 + def with_operator(operator_l); end + + protected + + # pkg:gem/parser#lib/parser/source/map/index.rb:27 + def update_operator(operator_l); end +end + +# pkg:gem/parser#lib/parser/source/map/keyword.rb:6 +class Parser::Source::Map::Keyword < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/keyword.rb:11 + def initialize(keyword_l, begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/keyword.rb:8 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/keyword.rb:9 + def end; end + + # pkg:gem/parser#lib/parser/source/map/keyword.rb:7 + def keyword; end +end + +# pkg:gem/parser#lib/parser/source/map/method_definition.rb:6 +class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:13 + def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:11 + def assignment; end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:10 + def end; end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:7 + def keyword; end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:9 + def name; end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:8 + def operator; end +end + +# pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:6 +class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:11 + def initialize(keyword_l, operator_l, argument_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:9 + def argument; end + + # pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:7 + def keyword; end + + # pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:8 + def operator; end +end + +# pkg:gem/parser#lib/parser/source/map/operator.rb:6 +class Parser::Source::Map::Operator < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/operator.rb:9 + def initialize(operator, expression); end + + # pkg:gem/parser#lib/parser/source/map/operator.rb:7 + def operator; end +end + +# pkg:gem/parser#lib/parser/source/map/rescue_body.rb:6 +class Parser::Source::Map::RescueBody < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/rescue_body.rb:11 + def initialize(keyword_l, assoc_l, begin_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/rescue_body.rb:8 + def assoc; end + + # pkg:gem/parser#lib/parser/source/map/rescue_body.rb:9 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/rescue_body.rb:7 + def keyword; end +end + +# pkg:gem/parser#lib/parser/source/map/send.rb:6 +class Parser::Source::Map::Send < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/send.rb:13 + def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/send.rb:10 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/send.rb:7 + def dot; end + + # pkg:gem/parser#lib/parser/source/map/send.rb:11 + def end; end + + # pkg:gem/parser#lib/parser/source/map/send.rb:9 + def operator; end + + # pkg:gem/parser#lib/parser/source/map/send.rb:8 + def selector; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map/send.rb:24 + def with_operator(operator_l); end + + protected + + # pkg:gem/parser#lib/parser/source/map/send.rb:30 + def update_operator(operator_l); end +end + +# pkg:gem/parser#lib/parser/source/map/ternary.rb:6 +class Parser::Source::Map::Ternary < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/ternary.rb:10 + def initialize(question_l, colon_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/ternary.rb:8 + def colon; end + + # pkg:gem/parser#lib/parser/source/map/ternary.rb:7 + def question; end +end + +# pkg:gem/parser#lib/parser/source/map/variable.rb:6 +class Parser::Source::Map::Variable < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/variable.rb:10 + def initialize(name_l, expression_l = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/source/map/variable.rb:7 + def name; end + + # pkg:gem/parser#lib/parser/source/map/variable.rb:8 + def operator; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map/variable.rb:19 + def with_operator(operator_l); end + + protected + + # pkg:gem/parser#lib/parser/source/map/variable.rb:25 + def update_operator(operator_l); end +end + +# A range of characters in a particular source buffer. +# +# The range is always exclusive, i.e. a range with `begin_pos` of 3 and +# `end_pos` of 5 will contain the following characters: +# +# example +# ^^ +# +# @!attribute [r] source_buffer +# @return [Parser::Source::Buffer] +# +# @!attribute [r] begin_pos +# @return [Integer] index of the first character in the range +# +# @!attribute [r] end_pos +# @return [Integer] index of the character after the last character in the range +# +# @api public +# +# pkg:gem/parser#lib/parser/source/range.rb:26 +class Parser::Source::Range + include ::Comparable + + # @param [Buffer] source_buffer + # @param [Integer] begin_pos + # @param [Integer] end_pos + # + # pkg:gem/parser#lib/parser/source/range.rb:37 + def initialize(source_buffer, begin_pos, end_pos); end + + # Compare ranges, first by begin_pos, then by end_pos. + # + # pkg:gem/parser#lib/parser/source/range.rb:301 + def <=>(other); end + + # @param [Hash] Endpoint(s) to change, any combination of :begin_pos or :end_pos + # @return [Range] the same range as this range but with the given end point(s) adjusted + # by the given amount(s) + # + # pkg:gem/parser#lib/parser/source/range.rb:193 + def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # @return [Range] a zero-length range located just before the beginning + # of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:55 + def begin; end + + # pkg:gem/parser#lib/parser/source/range.rb:30 + def begin_pos; end + + # @return [Integer] zero-based column number of the beginning of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:92 + def column; end + + # @return [::Range] a range of columns spanned by this range. + # @raise RangeError + # + # pkg:gem/parser#lib/parser/source/range.rb:114 + def column_range; end + + # Return `other.contains?(self)` + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @param [Range] other + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/range.rb:274 + def contained?(other); end + + # Returns true iff this range contains (strictly) `other`. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @param [Range] other + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/range.rb:262 + def contains?(other); end + + # Returns true iff both ranges intersect and also have different elements from one another. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @param [Range] other + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/range.rb:286 + def crossing?(other); end + + # Return `true` iff this range and `other` are disjoint. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @param [Range] other + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/range.rb:236 + def disjoint?(other); end + + # Checks if a range is empty; if it contains no characters + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/range.rb:294 + def empty?; end + + # @return [Range] a zero-length range located just after the end + # of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:63 + def end; end + + # pkg:gem/parser#lib/parser/source/range.rb:30 + def end_pos; end + + # pkg:gem/parser#lib/parser/source/range.rb:308 + def eql?(_arg0); end + + # pkg:gem/parser#lib/parser/source/range.rb:87 + def first_line; end + + # Support for Ranges be used in as Hash indices and in Sets. + # + # pkg:gem/parser#lib/parser/source/range.rb:313 + def hash; end + + # @return [String] a human-readable representation of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:320 + def inspect; end + + # @param [Range] other + # @return [Range] overlapping region of this range and `other`, or `nil` + # if they do not overlap + # + # pkg:gem/parser#lib/parser/source/range.rb:220 + def intersect(other); end + + # `is?` provides a concise way to compare the source corresponding to this range. + # For example, `r.source == '(' || r.source == 'begin'` is equivalent to + # `r.is?('(', 'begin')`. + # + # pkg:gem/parser#lib/parser/source/range.rb:141 + def is?(*what); end + + # @param [Range] other + # @return [Range] smallest possible range spanning both this range and `other`. + # + # pkg:gem/parser#lib/parser/source/range.rb:209 + def join(other); end + + # @return [Integer] zero-based column number of the end of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:106 + def last_column; end + + # @return [Integer] line number of the end of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:99 + def last_line; end + + # pkg:gem/parser#lib/parser/source/range.rb:74 + def length; end + + # Line number of the beginning of this range. By default, the first line + # of a buffer is 1; as such, line numbers are most commonly one-based. + # + # @see Buffer + # @return [Integer] line number of the beginning of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:83 + def line; end + + # Return `true` iff this range is not disjoint from `other`. + # + # @param [Range] other + # @return [Boolean] `true` if this range and `other` overlap + # + # pkg:gem/parser#lib/parser/source/range.rb:250 + def overlaps?(other); end + + # @param [Integer] new_size + # @return [Range] a range beginning at the same point as this range and length `new_size`. + # + # pkg:gem/parser#lib/parser/source/range.rb:201 + def resize(new_size); end + + # @return [Integer] amount of characters included in this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:70 + def size; end + + # @return [String] all source code covered by this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:132 + def source; end + + # pkg:gem/parser#lib/parser/source/range.rb:29 + def source_buffer; end + + # @return [String] a line of source code containing the beginning of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:125 + def source_line; end + + # @return [Array] a set of character indexes contained in this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:148 + def to_a; end + + # @return [Range] a Ruby range with the same `begin_pos` and `end_pos` + # + # pkg:gem/parser#lib/parser/source/range.rb:155 + def to_range; end + + # Composes a GNU/Clang-style string representation of the beginning of this + # range. + # + # For example, for the following range in file `foo.rb`, + # + # def foo + # ^^^ + # + # `to_s` will return `foo.rb:1:5`. + # Note that the column index is one-based. + # + # @return [String] + # + # pkg:gem/parser#lib/parser/source/range.rb:173 + def to_s; end + + # @param [Hash] Endpoint(s) to change, any combination of :begin_pos or :end_pos + # @return [Range] the same range as this range but with the given end point(s) changed + # to the given value(s). + # + # pkg:gem/parser#lib/parser/source/range.rb:184 + def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end +end + +# {Rewriter} is deprecated. Use {TreeRewriter} instead. +# +# TreeRewriter has simplified semantics, and customizable policies +# with regards to clobbering. Please read the documentation. +# +# Keep in mind: +# - Rewriter was discarding the `end_pos` of the given range for `insert_before`, +# and the `begin_pos` for `insert_after`. These are meaningful in TreeRewriter. +# - TreeRewriter's wrap/insert_before/insert_after are multiple by default, while +# Rewriter would raise clobbering errors if the non '_multi' version was called. +# - The TreeRewriter policy closest to Rewriter's behavior is: +# different_replacements: :raise, +# swallowed_insertions: :raise, +# crossing_deletions: :accept +# +# @!attribute [r] source_buffer +# @return [Source::Buffer] +# +# @!attribute [r] diagnostics +# @return [Diagnostic::Engine] +# +# @api public +# @deprecated Use {TreeRewriter} +# +# pkg:gem/parser#lib/parser/source/rewriter.rb:31 +class Parser::Source::Rewriter + extend ::Parser::Deprecation + + # @param [Source::Buffer] source_buffer + # @deprecated Use {TreeRewriter} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:39 + def initialize(source_buffer); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:33 + def diagnostics; end + + # Inserts new code after the given source range. + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#insert_after} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:131 + def insert_after(range, content); end + + # Inserts new code after the given source range by allowing other + # insertions at the same position. + # Note that an insertion with latter invocation comes _after_ earlier + # insertion at the same position in the rewritten source. + # + # @example Inserting ')]' + # rewriter. + # insert_after_multi(range, ')'). + # insert_after_multi(range, ']'). + # process + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#insert_after} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:153 + def insert_after_multi(range, content); end + + # Inserts new code before the given source range. + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#insert_before} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:80 + def insert_before(range, content); end + + # Inserts new code before the given source range by allowing other + # insertions at the same position. + # Note that an insertion with latter invocation comes _before_ earlier + # insertion at the same position in the rewritten source. + # + # @example Inserting '[(' + # rewriter. + # insert_before_multi(range, '('). + # insert_before_multi(range, '['). + # process + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#insert_before} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:117 + def insert_before_multi(range, content); end + + # Applies all scheduled changes to the `source_buffer` and returns + # modified source as a new string. + # + # @return [String] + # @deprecated Use {TreeRewriter#process} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:178 + def process; end + + # Removes the source range. + # + # @param [Range] range + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#remove} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:67 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#replace} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:167 + def replace(range, content); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:32 + def source_buffer; end + + # Provides a protected block where a sequence of multiple rewrite actions + # are handled atomically. If any of the actions failed by clobbering, + # all the actions are rolled back. + # + # @example + # begin + # rewriter.transaction do + # rewriter.insert_before(range_of_something, '(') + # rewriter.insert_after(range_of_something, ')') + # end + # rescue Parser::ClobberingError + # end + # + # @raise [RuntimeError] when no block is passed + # @raise [RuntimeError] when already in a transaction + # @deprecated Use {TreeRewriter#transaction} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:216 + def transaction; end + + # Inserts new code before and after the given source range. + # + # @param [Range] range + # @param [String] before + # @param [String] after + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#wrap} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:94 + def wrap(range, before, after); end + + private + + # pkg:gem/parser#lib/parser/source/rewriter.rb:476 + def active_clobber; end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:484 + def active_clobber=(value); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:480 + def active_insertions; end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:492 + def active_insertions=(value); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:472 + def active_queue; end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:500 + def adjacent?(range1, range2); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:351 + def adjacent_insertion_mask(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:366 + def adjacent_insertions?(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:347 + def adjacent_position_mask(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:377 + def adjacent_updates?(range); end + + # Schedule a code update. If it overlaps with another update, check + # whether they conflict, and raise a clobbering error if they do. + # (As a special case, zero-length ranges at the same position are + # considered to "overlap".) Otherwise, merge them. + # + # Updates which are adjacent to each other, but do not overlap, are also + # merged. + # + # RULES: + # + # - Insertion ("replacing" a zero-length range): + # - Two insertions at the same point conflict. This is true even + # if the earlier insertion has already been merged with an adjacent + # update, and even if they are both inserting the same text. + # - An insertion never conflicts with a replace or remove operation + # on its right or left side, which does not overlap it (in other + # words, which does not update BOTH its right and left sides). + # - An insertion always conflicts with a remove operation which spans + # both its sides. + # - An insertion conflicts with a replace operation which spans both its + # sides, unless the replacement text is longer than the replaced text + # by the size of the insertion (or more), and the portion of + # replacement text immediately after the insertion position is + # identical to the inserted text. + # + # - Removal operations never conflict with each other. + # + # - Replacement operations: + # - Take the portion of each replacement text which falls within: + # - The other operation's replaced region + # - The other operation's replacement text, if it extends past the + # end of its own replaced region (in other words, if the replacement + # text is longer than the text it replaces) + # - If and only if the taken texts are identical for both operations, + # they do not conflict. + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:280 + def append(action); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:389 + def can_merge?(action, existing); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:355 + def clobbered_insertion?(insertion); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:343 + def clobbered_position_mask(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:468 + def in_transaction?; end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:410 + def merge_actions(action, existing); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:419 + def merge_actions!(action, existing); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:425 + def merge_replacements(actions); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:450 + def raise_clobber_error(action, existing); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:335 + def record_insertion(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:339 + def record_replace(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:445 + def replace_actions(old, updated); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:383 + def replace_compatible_with_insertion?(replace, insertion); end +end + +# @api private +# +# pkg:gem/parser#lib/parser/source/rewriter/action.rb:9 +class Parser::Source::Rewriter::Action + include ::Comparable + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:15 + def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:24 + def <=>(other); end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:12 + def allow_multiple_insertions; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:13 + def allow_multiple_insertions?; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:12 + def order; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:12 + def range; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:12 + def replacement; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:30 + def to_s; end +end + +# pkg:gem/parser#lib/parser/source/rewriter.rb:504 +Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# {TreeRewriter} performs the heavy lifting in the source rewriting process. +# It schedules code updates to be performed in the correct order. +# +# For simple cases, the resulting source will be obvious. +# +# Examples for more complex cases follow. Assume these examples are acting on +# the source `'puts(:hello, :world)`. The methods #wrap, #remove, etc. +# receive a Range as first argument; for clarity, examples below use english +# sentences and a string of raw code instead. +# +# ## Overlapping ranges: +# +# Any two rewriting actions on overlapping ranges will fail and raise +# a `ClobberingError`, unless they are both deletions (covered next). +# +# * wrap ':hello, ' with '(' and ')' +# * wrap ', :world' with '(' and ')' +# => CloberringError +# +# ## Overlapping deletions: +# +# * remove ':hello, ' +# * remove ', :world' +# +# The overlapping ranges are merged and `':hello, :world'` will be removed. +# This policy can be changed. `:crossing_deletions` defaults to `:accept` +# but can be set to `:warn` or `:raise`. +# +# ## Multiple actions at the same end points: +# +# Results will always be independent on the order they were given. +# Exception: rewriting actions done on exactly the same range (covered next). +# +# Example: +# * replace ', ' by ' => ' +# * wrap ':hello, :world' with '{' and '}' +# * replace ':world' with ':everybody' +# * wrap ':world' with '[', ']' +# +# The resulting string will be `'puts({:hello => [:everybody]})'` +# and this result is independent on the order the instructions were given in. +# +# Note that if the two "replace" were given as a single replacement of ', :world' +# for ' => :everybody', the result would be a `ClobberingError` because of the wrap +# in square brackets. +# +# ## Multiple wraps on same range: +# * wrap ':hello' with '(' and ')' +# * wrap ':hello' with '[' and ']' +# +# The wraps are combined in order given and results would be `'puts([(:hello)], :world)'`. +# +# ## Multiple replacements on same range: +# * replace ':hello' by ':hi', then +# * replace ':hello' by ':hey' +# +# The replacements are made in the order given, so the latter replacement +# supersedes the former and ':hello' will be replaced by ':hey'. +# +# This policy can be changed. `:different_replacements` defaults to `:accept` +# but can be set to `:warn` or `:raise`. +# +# ## Swallowed insertions: +# wrap 'world' by '__', '__' +# replace ':hello, :world' with ':hi' +# +# A containing replacement will swallow the contained rewriting actions +# and `':hello, :world'` will be replaced by `':hi'`. +# +# This policy can be changed for swallowed insertions. `:swallowed_insertions` +# defaults to `:accept` but can be set to `:warn` or `:raise` +# +# ## Implementation +# The updates are organized in a tree, according to the ranges they act on +# (where children are strictly contained by their parent), hence the name. +# +# @!attribute [r] source_buffer +# @return [Source::Buffer] +# +# @!attribute [r] diagnostics +# @return [Diagnostic::Engine] +# +# @api public +# +# pkg:gem/parser#lib/parser/source/tree_rewriter.rb:91 +class Parser::Source::TreeRewriter + extend ::Parser::Deprecation + + # @param [Source::Buffer] source_buffer + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:98 + def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end + + # Returns a representation of the rewriter as nested insertions (:wrap) and replacements. + # + # rewriter.as_actions # =>[ [:wrap, 1...10, '(', ')'], + # [:wrap, 2...6, '', '!'], # aka "insert_after" + # [:replace, 2...4, 'foo'], + # [:replace, 5...6, ''], # aka "removal" + # ], + # + # Contrary to `as_replacements`, this representation is sufficient to recreate exactly + # the rewriter. + # + # @return [Array<(Symbol, Range, String{, String})>] + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:299 + def as_nested_actions; end + + # Returns a representation of the rewriter as an ordered list of replacements. + # + # rewriter.as_replacements # => [ [1...1, '('], + # [2...4, 'foo'], + # [5...6, ''], + # [6...6, '!'], + # [10...10, ')'], + # ] + # + # This representation is sufficient to recreate the result of `process` but it is + # not sufficient to recreate completely the rewriter for further merging/actions. + # See `as_nested_actions` + # + # @return [Array] an ordered list of pairs of range & replacement + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:281 + def as_replacements; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:93 + def diagnostics; end + + # Returns true iff no (non trivial) update has been recorded + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:125 + def empty?; end + + # For special cases where one needs to merge a rewriter attached to a different source_buffer + # or that needs to be offset. Policies of the receiver are used. + # + # @param [TreeRewriter] rewriter from different source_buffer + # @param [Integer] offset + # @return [Rewriter] self + # @raise [IndexError] if action ranges (once offset) don't fit the current buffer + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:168 + def import!(foreign_rewriter, offset: T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:329 + def in_transaction?; end + + # Shortcut for `wrap(range, nil, content)` + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:242 + def insert_after(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:351 + def insert_after_multi(range, text); end + + # Shortcut for `wrap(range, content, nil)` + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:230 + def insert_before(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:342 + def insert_before_multi(range, text); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:334 + def inspect; end + + # Returns a new rewriter that consists of the updates of the received + # and the given argument. Policies of the receiver are used. + # + # @param [Rewriter] with + # @return [Rewriter] merge of receiver and argument + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:155 + def merge(with); end + + # Merges the updates of argument with the receiver. + # Policies of the receiver are used. + # This action is atomic in that it won't change the receiver + # unless it succeeds. + # + # @param [Rewriter] with + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:139 + def merge!(with); end + + # Applies all scheduled changes to the `source_buffer` and returns + # modified source as a new string. + # + # @return [String] + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:252 + def process; end + + # Shortcut for `replace(range, '')` + # + # @param [Range] range + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:217 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:193 + def replace(range, content); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:92 + def source_buffer; end + + # Provides a protected block where a sequence of multiple rewrite actions + # are handled atomically. If any of the actions failed by clobbering, + # all the actions are rolled back. Transactions can be nested. + # + # @raise [RuntimeError] when no block is passed + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:310 + def transaction; end + + # Inserts the given strings before and after the given range. + # + # @param [Range] range + # @param [String, nil] insert_before + # @param [String, nil] insert_after + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:206 + def wrap(range, insert_before, insert_after); end + + protected + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:365 + def action_root; end + + private + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:369 + def action_summary; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:392 + def check_policy_validity; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:404 + def check_range_validity(range); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:397 + def combine(range, attributes); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:411 + def enforce_policy(event); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:418 + def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end +end + +# pkg:gem/parser#lib/parser/source/tree_rewriter.rb:391 +Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) + +# @api private +# +# Actions are arranged in a tree and get combined so that: +# +# * Children are strictly contained by their parent +# * Siblings are all disjointed from one another and ordered +# * Only actions with `replacement == nil` may have children +# +# pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:14 +class Parser::Source::TreeRewriter::Action + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:17 + def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:29 + def combine(action); end + + # A root action has its range set to the whole source range, even + # though it typically does not act on that range. + # This method returns the action as if it was a child action with + # its range contracted. + # @return [Action] + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:68 + def contract; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:34 + def empty?; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:15 + def insert_after; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:15 + def insert_before; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:58 + def insertion?; end + + # @return [Action] that has been moved to the given source_buffer and with the given offset + # No check is done on validity of resulting range. + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:81 + def moved(source_buffer, offset); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:50 + def nested_actions; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:41 + def ordered_replacements; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:15 + def range; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:15 + def replacement; end + + protected + + # Returns the children in a hierarchy with respect to `action`: + # :sibbling_left, sibbling_right (for those that are disjoint from `action`) + # :parent (in case one of our children contains `action`) + # :child (in case `action` strictly contains some of our children) + # :fusible (in case `action` overlaps some children but they can be fused in one deletion) + # or raises a `CloberingError` + # In case a child has equal range to `action`, it is returned as `:parent` + # Reminder: an empty range 1...1 is considered disjoint from 1...10 + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:159 + def analyse_hierarchy(action); end + + # Similar to @children.bsearch_index || size + # except allows for a starting point + # and `bsearch_index` is only Ruby 2.3+ + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:146 + def bsearch_child_index(from = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:225 + def call_enforcer_for_merge(action); end + + # @param [Array(Action | nil)] fusible + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:205 + def check_fusible(action, *fusible); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:95 + def children; end + + # Assumes `more_children` all contained within `@range` + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:130 + def combine_children(more_children); end + + # Assumes range.contains?(action.range) && action.children.empty? + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:103 + def do_combine(action); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:136 + def fuse_deletions(action, fusible, other_sibblings); end + + # Assumes action.range == range && action.children.empty? + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:216 + def merge(action); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:111 + def place_in_hierarchy(action); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:233 + def swallow(children); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:97 + def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end +end + +# pkg:gem/parser#lib/parser/source/tree_rewriter.rb:356 +Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# pkg:gem/parser#lib/parser/source/tree_rewriter.rb:417 +Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/static_environment.rb:5 +class Parser::StaticEnvironment + # pkg:gem/parser#lib/parser/static_environment.rb:17 + def initialize; end + + # pkg:gem/parser#lib/parser/static_environment.rb:55 + def declare(name); end + + # Anonymous blockarg + # + # pkg:gem/parser#lib/parser/static_environment.rb:77 + def declare_anonymous_blockarg; end + + # Anonymous kwresarg + # + # pkg:gem/parser#lib/parser/static_environment.rb:113 + def declare_anonymous_kwrestarg; end + + # Anonymous restarg + # + # pkg:gem/parser#lib/parser/static_environment.rb:95 + def declare_anonymous_restarg; end + + # Forward args + # + # pkg:gem/parser#lib/parser/static_environment.rb:67 + def declare_forward_args; end + + # pkg:gem/parser#lib/parser/static_environment.rb:61 + def declared?(name); end + + # pkg:gem/parser#lib/parser/static_environment.rb:81 + def declared_anonymous_blockarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:85 + def declared_anonymous_blockarg_in_current_scpe?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:117 + def declared_anonymous_kwrestarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:121 + def declared_anonymous_kwrestarg_in_current_scope?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:99 + def declared_anonymous_restarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:103 + def declared_anonymous_restarg_in_current_scope?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:71 + def declared_forward_args?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:129 + def empty?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:33 + def extend_dynamic; end + + # pkg:gem/parser#lib/parser/static_environment.rb:26 + def extend_static; end + + # pkg:gem/parser#lib/parser/static_environment.rb:89 + def parent_has_anonymous_blockarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:125 + def parent_has_anonymous_kwrestarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:107 + def parent_has_anonymous_restarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:21 + def reset; end + + # pkg:gem/parser#lib/parser/static_environment.rb:49 + def unextend; end +end + +# pkg:gem/parser#lib/parser/static_environment.rb:15 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:14 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:12 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:11 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:9 +Parser::StaticEnvironment::ANONYMOUS_RESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:8 +Parser::StaticEnvironment::ANONYMOUS_RESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:6 +Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) + +# {Parser::SyntaxError} is raised whenever parser detects a syntax error, +# similar to the standard SyntaxError class. +# +# @api public +# +# @!attribute [r] diagnostic +# @return [Parser::Diagnostic] +# +# pkg:gem/parser#lib/parser/syntax_error.rb:13 +class Parser::SyntaxError < ::StandardError + # pkg:gem/parser#lib/parser/syntax_error.rb:16 + def initialize(diagnostic); end + + # pkg:gem/parser#lib/parser/syntax_error.rb:14 + def diagnostic; end +end + +# {Parser::TreeRewriter} offers a basic API that makes it easy to rewrite +# existing ASTs. It's built on top of {Parser::AST::Processor} and +# {Parser::Source::TreeRewriter} +# +# For example, assume you want to remove `do` tokens from a while statement. +# You can do this as following: +# +# require 'parser/current' +# +# class RemoveDo < Parser::TreeRewriter +# def on_while(node) +# # Check if the statement starts with "do" +# if node.location.begin.is?('do') +# remove(node.location.begin) +# end +# end +# end +# +# code = <<-EOF +# while true do +# puts 'hello' +# end +# EOF +# +# ast = Parser::CurrentRuby.parse code +# buffer = Parser::Source::Buffer.new('(example)', source: code) +# rewriter = RemoveDo.new +# +# # Rewrite the AST, returns a String with the new form. +# puts rewriter.rewrite(buffer, ast) +# +# This would result in the following Ruby code: +# +# while true +# puts 'hello' +# end +# +# Keep in mind that {Parser::TreeRewriter} does not take care of indentation when +# inserting/replacing code so you'll have to do this yourself. +# +# See also [a blog entry](http://whitequark.org/blog/2013/04/26/lets-play-with-ruby-code/) +# describing rewriters in greater detail. +# +# @api public +# +# pkg:gem/parser#lib/parser/tree_rewriter.rb:51 +class Parser::TreeRewriter < ::Parser::AST::Processor + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @param [Parser::AST::Node] node + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:79 + def assignment?(node); end + + # Inserts new code after the given source range. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:118 + def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:108 + def insert_before(range, content); end + + # Removes the source range. + # + # @param [Parser::Source::Range] range + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:88 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:128 + def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @param [Parser::Source::Buffer] source_buffer + # @param [Parser::AST::Node] ast + # @param [Symbol] crossing_deletions:, different_replacements:, swallowed_insertions: + # policy arguments for TreeRewriter (optional) + # @return [String] + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:62 + def rewrite(source_buffer, ast, **policy); end + + # Wraps the given source range with the given values. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:98 + def wrap(range, before, after); end +end + +# {Parser::UnknownEncodingInMagicComment} is raised when a magic encoding +# comment is encountered that the currently running Ruby version doesn't +# recognize. It inherits from {ArgumentError} since that is the exception +# Ruby itself raises when trying to execute a file with an unknown encoding. +# As such, it is also not a {Parser::SyntaxError}. +# +# @api public +# +# pkg:gem/parser#lib/parser/unknown_encoding_in_magic_comment_error.rb:13 +class Parser::UnknownEncodingInMagicComment < ::ArgumentError; end + +# pkg:gem/parser#lib/parser/version.rb:4 +Parser::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/parser#lib/parser/variables_stack.rb:5 +class Parser::VariablesStack + # pkg:gem/parser#lib/parser/variables_stack.rb:6 + def initialize; end + + # pkg:gem/parser#lib/parser/variables_stack.rb:27 + def declare(name); end + + # pkg:gem/parser#lib/parser/variables_stack.rb:31 + def declared?(name); end + + # pkg:gem/parser#lib/parser/variables_stack.rb:11 + def empty?; end + + # pkg:gem/parser#lib/parser/variables_stack.rb:19 + def pop; end + + # pkg:gem/parser#lib/parser/variables_stack.rb:15 + def push; end + + # pkg:gem/parser#lib/parser/variables_stack.rb:23 + def reset; end +end diff --git a/sorbet/rbi/gems/parser@3.3.3.0.rbi b/sorbet/rbi/gems/parser@3.3.3.0.rbi deleted file mode 100644 index be29cc7fa..000000000 --- a/sorbet/rbi/gems/parser@3.3.3.0.rbi +++ /dev/null @@ -1,7320 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `parser` gem. -# Please instead update this file by running `bin/tapioca gem parser`. - -# @api public -# -# source://parser//lib/parser.rb#19 -module Parser - class << self - private - - # source://parser//lib/parser/current.rb#5 - def warn_syntax_deviation(feature, version); end - end -end - -# @api public -# -# source://parser//lib/parser.rb#24 -module Parser::AST; end - -# {Parser::AST::Node} contains information about a single AST node and its -# child nodes. It extends the basic [AST::Node](https://www.rubydoc.info/gems/ast/AST/Node) -# class provided by gem [ast](https://www.rubydoc.info/gems/ast). -# -# @api public -# -# source://parser//lib/parser/ast/node.rb#17 -class Parser::AST::Node < ::AST::Node - # Assigns various properties to this AST node. Currently only the - # location can be set. - # - # @api public - # @option properties - # @param properties [Hash] - # - # source://parser//lib/parser/ast/node.rb#30 - def assign_properties(properties); end - - # Source map for this Node. - # - # @api public - # @return [Parser::Source::Map] - # - # source://parser//lib/parser/ast/node.rb#18 - def loc; end - - # Source map for this Node. - # - # @api public - # @return [Parser::Source::Map] - # - # source://parser//lib/parser/ast/node.rb#18 - def location; end -end - -# @api public -# -# source://parser//lib/parser/ast/processor.rb#9 -class Parser::AST::Processor - include ::AST::Processor::Mixin - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_alias(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_and(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_and_asgn(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_arg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_arg_expr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_args(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#105 - def on_argument(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_array(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_array_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_array_pattern_with_tail(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#34 - def on_back_ref(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_begin(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_block(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_block_pass(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_blockarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_blockarg_expr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_break(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_case(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_case_match(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#89 - def on_casgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_class(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#81 - def on_const(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_const_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#181 - def on_csend(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#34 - def on_cvar(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#58 - def on_cvasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#160 - def on_def(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_defined?(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#169 - def on_defs(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_dstr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_dsym(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_eflipflop(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#288 - def on_empty_else(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_ensure(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_erange(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_find_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_for(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_forward_arg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_forwarded_kwrestarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_forwarded_restarg(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#34 - def on_gvar(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#58 - def on_gvasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_hash(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_hash_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_if(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_if_guard(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_iflipflop(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_in_match(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_in_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_index(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_indexasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_irange(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#34 - def on_ivar(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#58 - def on_ivasgn(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_kwarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_kwargs(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_kwbegin(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_kwoptarg(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_kwrestarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_kwsplat(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_lambda(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#34 - def on_lvar(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#58 - def on_lvasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_masgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_match_alt(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_match_as(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_match_current_line(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_match_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_match_pattern_p(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_match_rest(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#34 - def on_match_var(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_match_with_lvasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_mlhs(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_module(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_next(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_not(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#34 - def on_nth_ref(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#198 - def on_numblock(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#70 - def on_op_asgn(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_optarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_or(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_or_asgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_pair(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_pin(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_postexe(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_preexe(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#132 - def on_procarg0(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_redo(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_regexp(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_resbody(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_rescue(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_restarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_restarg_expr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_retry(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_return(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_sclass(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#181 - def on_send(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_shadowarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_splat(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_super(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_undef(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_unless_guard(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_until(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_until_post(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#29 - def on_var(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#45 - def on_vasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_when(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_while(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_while_post(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_xstr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_yield(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#281 - def process_argument_node(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def process_regular_node(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#273 - def process_var_asgn_node(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#265 - def process_variable_node(node); end -end - -# Base class for version-specific parsers. -# -# @api public -# -# source://parser//lib/parser/base.rb#16 -class Parser::Base < ::Racc::Parser - # @api public - # @param builder [Parser::Builders::Default] The AST builder to use. - # @return [Base] a new instance of Base - # - # source://parser//lib/parser/base.rb#126 - def initialize(builder = T.unsafe(nil)); end - - # @api public - # - # source://parser//lib/parser/base.rb#114 - def builder; end - - # @api public - # - # source://parser//lib/parser/base.rb#117 - def context; end - - # @api public - # - # source://parser//lib/parser/base.rb#119 - def current_arg_stack; end - - # @api public - # @return [Parser::Diagnostic::Engine] - # - # source://parser//lib/parser/base.rb#113 - def diagnostics; end - - # @api public - # - # source://parser//lib/parser/base.rb#112 - def lexer; end - - # @api public - # - # source://parser//lib/parser/base.rb#118 - def max_numparam_stack; end - - # Parses a source buffer and returns the AST, or `nil` in case of a non fatal error. - # - # @api public - # @param source_buffer [Parser::Source::Buffer] The source buffer to parse. - # @return [Parser::AST::Node, nil] - # - # source://parser//lib/parser/base.rb#186 - def parse(source_buffer); end - - # Parses a source buffer and returns the AST and the source code comments. - # - # @api public - # @return [Array] - # @see #parse - # @see Parser::Source::Comment#associate - # - # source://parser//lib/parser/base.rb#204 - def parse_with_comments(source_buffer); end - - # @api public - # - # source://parser//lib/parser/base.rb#121 - def pattern_hash_keys; end - - # @api public - # - # source://parser//lib/parser/base.rb#120 - def pattern_variables; end - - # Resets the state of the parser. - # - # @api public - # - # source://parser//lib/parser/base.rb#167 - def reset; end - - # @api public - # - # source://parser//lib/parser/base.rb#116 - def source_buffer; end - - # @api public - # @return [Parser::StaticEnvironment] - # - # source://parser//lib/parser/base.rb#115 - def static_env; end - - # Parses a source buffer and returns the AST, the source code comments, - # and the tokens emitted by the lexer. In case of a fatal error, a {SyntaxError} - # is raised, unless `recover` is true. In case of an error - # (non-fatal or recovered), `nil` is returned instead of the AST, and - # comments as well as tokens are only returned up to the location of - # the error. - # - # Currently, token stream format returned by #tokenize is not documented, - # but is considered part of a public API and only changed according - # to Semantic Versioning. - # - # However, note that the exact token composition of various constructs - # might vary. For example, a string `"foo"` is represented equally well - # by `:tSTRING_BEG " :tSTRING_CONTENT foo :tSTRING_END "` and - # `:tSTRING "foo"`; such details must not be relied upon. - # - # @api public - # @param source_buffer [Parser::Source::Buffer] - # @param recover [Boolean] If true, recover from syntax errors. False by default. - # @return [Array] - # - # source://parser//lib/parser/base.rb#233 - def tokenize(source_buffer, recover = T.unsafe(nil)); end - - private - - # @api public - # - # source://parser//lib/parser/base.rb#257 - def check_kwarg_name(name_t); end - - # @api public - # - # source://parser//lib/parser/base.rb#266 - def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)); end - - # @api public - # - # source://parser//lib/parser/base.rb#251 - def next_token; end - - # @api public - # - # source://parser//lib/parser/base.rb#282 - def on_error(error_token_id, error_value, value_stack); end - - class << self - # @api public - # @return [Parser::Base] parser with the default options set. - # - # source://parser//lib/parser/base.rb#84 - def default_parser; end - - # Parses a string of Ruby code and returns the AST. If the source - # cannot be parsed, {SyntaxError} is raised and a diagnostic is - # printed to `stderr`. - # - # @api public - # @example - # Parser::Base.parse('puts "hello"') - # @param string [String] The block of code to parse. - # @param file [String] The name of the file the code originated from. - # @param line [Numeric] The initial line number. - # @return [Parser::AST::Node] - # - # source://parser//lib/parser/base.rb#30 - def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)); end - - # Parses Ruby source code by reading it from a file. If the source - # cannot be parsed, {SyntaxError} is raised and a diagnostic is - # printed to `stderr`. - # - # @api public - # @param filename [String] Path to the file to parse. - # @return [Parser::AST::Node] - # @see #parse - # - # source://parser//lib/parser/base.rb#64 - def parse_file(filename); end - - # Parses Ruby source code by reading it from a file and returns the AST and - # comments. If the source cannot be parsed, {SyntaxError} is raised and a - # diagnostic is printed to `stderr`. - # - # @api public - # @param filename [String] Path to the file to parse. - # @return [Array] - # @see #parse - # - # source://parser//lib/parser/base.rb#77 - def parse_file_with_comments(filename); end - - # Parses a string of Ruby code and returns the AST and comments. If the - # source cannot be parsed, {SyntaxError} is raised and a diagnostic is - # printed to `stderr`. - # - # @api public - # @example - # Parser::Base.parse_with_comments('puts "hello"') - # @param string [String] The block of code to parse. - # @param file [String] The name of the file the code originated from. - # @param line [Numeric] The initial line number. - # @return [Array] - # - # source://parser//lib/parser/base.rb#49 - def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)); end - - private - - # @api public - # - # source://parser//lib/parser/base.rb#97 - def setup_source_buffer(file, line, string, encoding); end - end -end - -# @api public -# -# source://parser//lib/parser.rb#78 -module Parser::Builders; end - -# source://parser//lib/parser/builders/default.rb#8 -class Parser::Builders::Default - # source://parser//lib/parser/builders/default.rb#243 - def initialize; end - - # source://parser//lib/parser/builders/default.rb#703 - def __ENCODING__(__ENCODING__t); end - - # source://parser//lib/parser/builders/default.rb#348 - def __FILE__(__FILE__t); end - - # source://parser//lib/parser/builders/default.rb#312 - def __LINE__(__LINE__t); end - - # source://parser//lib/parser/builders/default.rb#622 - def accessible(node); end - - # source://parser//lib/parser/builders/default.rb#878 - def alias(alias_t, to, from); end - - # source://parser//lib/parser/builders/default.rb#917 - def arg(name_t); end - - # source://parser//lib/parser/builders/default.rb#1007 - def arg_expr(expr); end - - # source://parser//lib/parser/builders/default.rb#887 - def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#440 - def array(begin_t, elements, end_t); end - - # source://parser//lib/parser/builders/default.rb#1590 - def array_pattern(lbrack_t, elements, rbrack_t); end - - # source://parser//lib/parser/builders/default.rb#767 - def assign(lhs, eql_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#712 - def assignable(node); end - - # source://parser//lib/parser/builders/default.rb#540 - def associate(begin_t, pairs, end_t); end - - # source://parser//lib/parser/builders/default.rb#1171 - def attr_asgn(receiver, dot_t, selector_t); end - - # source://parser//lib/parser/builders/default.rb#612 - def back_ref(token); end - - # source://parser//lib/parser/builders/default.rb#1435 - def begin(begin_t, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#1377 - def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1453 - def begin_keyword(begin_t, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#1205 - def binary_op(receiver, operator_t, arg); end - - # source://parser//lib/parser/builders/default.rb#1122 - def block(method_call, begin_t, args, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#1157 - def block_pass(amper_t, arg); end - - # source://parser//lib/parser/builders/default.rb#982 - def blockarg(amper_t, name_t); end - - # source://parser//lib/parser/builders/default.rb#1027 - def blockarg_expr(amper_t, expr); end - - # source://parser//lib/parser/builders/default.rb#1113 - def call_lambda(lambda_t); end - - # source://parser//lib/parser/builders/default.rb#1096 - def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1068 - def call_type_for_dot(dot_t); end - - # source://parser//lib/parser/builders/default.rb#1310 - def case(case_t, expr, when_bodies, else_t, else_body, end_t); end - - # source://parser//lib/parser/builders/default.rb#1473 - def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end - - # source://parser//lib/parser/builders/default.rb#343 - def character(char_t); end - - # source://parser//lib/parser/builders/default.rb#284 - def complex(complex_t); end - - # source://parser//lib/parser/builders/default.rb#1423 - def compstmt(statements); end - - # source://parser//lib/parser/builders/default.rb#1286 - def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end - - # source://parser//lib/parser/builders/default.rb#1292 - def condition_mod(if_true, if_false, cond_t, cond); end - - # source://parser//lib/parser/builders/default.rb#686 - def const(name_t); end - - # source://parser//lib/parser/builders/default.rb#698 - def const_fetch(scope, t_colon2, name_t); end - - # source://parser//lib/parser/builders/default.rb#691 - def const_global(t_colon3, name_t); end - - # source://parser//lib/parser/builders/default.rb#763 - def const_op_assignable(node); end - - # source://parser//lib/parser/builders/default.rb#1620 - def const_pattern(const, ldelim_t, pattern, rdelim_t); end - - # source://parser//lib/parser/builders/default.rb#607 - def cvar(token); end - - # source://parser//lib/parser/builders/default.rb#388 - def dedent_string(node, dedent_level); end - - # source://parser//lib/parser/builders/default.rb#814 - def def_class(class_t, name, lt_t, superclass, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#845 - def def_endless_method(def_t, name_t, args, assignment_t, body); end - - # source://parser//lib/parser/builders/default.rb#863 - def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end - - # source://parser//lib/parser/builders/default.rb#837 - def def_method(def_t, name_t, args, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#827 - def def_module(module_t, name, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#821 - def def_sclass(class_t, lshft_t, expr, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#853 - def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#237 - def emit_file_line_as_literals; end - - # source://parser//lib/parser/builders/default.rb#237 - def emit_file_line_as_literals=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#265 - def false(false_t); end - - # source://parser//lib/parser/builders/default.rb#1611 - def find_pattern(lbrack_t, elements, rbrack_t); end - - # source://parser//lib/parser/builders/default.rb#276 - def float(float_t); end - - # source://parser//lib/parser/builders/default.rb#1331 - def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#913 - def forward_arg(dots_t); end - - # source://parser//lib/parser/builders/default.rb#903 - def forward_only_args(begin_t, dots_t, end_t); end - - # source://parser//lib/parser/builders/default.rb#1084 - def forwarded_args(dots_t); end - - # source://parser//lib/parser/builders/default.rb#1092 - def forwarded_kwrestarg(dstar_t); end - - # source://parser//lib/parser/builders/default.rb#1088 - def forwarded_restarg(star_t); end - - # source://parser//lib/parser/builders/default.rb#596 - def gvar(token); end - - # source://parser//lib/parser/builders/default.rb#1584 - def hash_pattern(lbrace_t, kwargs, rbrace_t); end - - # source://parser//lib/parser/builders/default.rb#586 - def ident(token); end - - # source://parser//lib/parser/builders/default.rb#1500 - def if_guard(if_t, if_body); end - - # source://parser//lib/parser/builders/default.rb#1479 - def in_match(lhs, in_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#1494 - def in_pattern(in_t, pattern, guard, then_t, body); end - - # source://parser//lib/parser/builders/default.rb#1180 - def index(receiver, lbrack_t, indexes, rbrack_t); end - - # source://parser//lib/parser/builders/default.rb#1194 - def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end - - # source://parser//lib/parser/builders/default.rb#272 - def integer(integer_t); end - - # source://parser//lib/parser/builders/default.rb#591 - def ivar(token); end - - # source://parser//lib/parser/builders/default.rb#1339 - def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#944 - def kwarg(name_t); end - - # source://parser//lib/parser/builders/default.rb#970 - def kwnilarg(dstar_t, nil_t); end - - # source://parser//lib/parser/builders/default.rb#951 - def kwoptarg(name_t, value); end - - # source://parser//lib/parser/builders/default.rb#958 - def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#535 - def kwsplat(dstar_t, arg); end - - # source://parser//lib/parser/builders/default.rb#1279 - def logical_op(type, lhs, op_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#1317 - def loop(type, keyword_t, cond, do_t, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#1322 - def loop_mod(type, body, keyword_t, cond); end - - # source://parser//lib/parser/builders/default.rb#1634 - def match_alt(left, pipe_t, right); end - - # source://parser//lib/parser/builders/default.rb#1641 - def match_as(value, assoc_t, as); end - - # source://parser//lib/parser/builders/default.rb#1520 - def match_hash_var(name_t); end - - # source://parser//lib/parser/builders/default.rb#1534 - def match_hash_var_from_str(begin_t, strings, end_t); end - - # source://parser//lib/parser/builders/default.rb#1672 - def match_label(label_type, label); end - - # source://parser//lib/parser/builders/default.rb#1648 - def match_nil_pattern(dstar_t, nil_t); end - - # source://parser//lib/parser/builders/default.rb#1227 - def match_op(receiver, match_t, arg); end - - # source://parser//lib/parser/builders/default.rb#1653 - def match_pair(label_type, label, value); end - - # source://parser//lib/parser/builders/default.rb#1484 - def match_pattern(lhs, match_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#1489 - def match_pattern_p(lhs, match_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#1573 - def match_rest(star_t, name_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1508 - def match_var(name_t); end - - # source://parser//lib/parser/builders/default.rb#1616 - def match_with_trailing_comma(match, comma_t); end - - # source://parser//lib/parser/builders/default.rb#805 - def multi_assign(lhs, eql_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#800 - def multi_lhs(begin_t, items, end_t); end - - # source://parser//lib/parser/builders/default.rb#255 - def nil(nil_t); end - - # source://parser//lib/parser/builders/default.rb#1255 - def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#617 - def nth_ref(token); end - - # source://parser//lib/parser/builders/default.rb#899 - def numargs(max_numparam); end - - # source://parser//lib/parser/builders/default.rb#1038 - def objc_kwarg(kwname_t, assoc_t, name_t); end - - # source://parser//lib/parser/builders/default.rb#1052 - def objc_restarg(star_t, name = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1162 - def objc_varargs(pair, rest_of_varargs); end - - # source://parser//lib/parser/builders/default.rb#774 - def op_assign(lhs, op_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#924 - def optarg(name_t, eql_t, value); end - - # source://parser//lib/parser/builders/default.rb#488 - def pair(key, assoc_t, value); end - - # source://parser//lib/parser/builders/default.rb#505 - def pair_keyword(key_t, value); end - - # source://parser//lib/parser/builders/default.rb#521 - def pair_label(key_t); end - - # source://parser//lib/parser/builders/default.rb#493 - def pair_list_18(list); end - - # source://parser//lib/parser/builders/default.rb#513 - def pair_quoted(begin_t, parts, end_t, value); end - - # source://parser//lib/parser/builders/default.rb#225 - def parser; end - - # source://parser//lib/parser/builders/default.rb#225 - def parser=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#1629 - def pin(pin_t, var); end - - # source://parser//lib/parser/builders/default.rb#1362 - def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end - - # source://parser//lib/parser/builders/default.rb#1357 - def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end - - # source://parser//lib/parser/builders/default.rb#992 - def procarg0(arg); end - - # source://parser//lib/parser/builders/default.rb#572 - def range_exclusive(lhs, dot3_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#567 - def range_inclusive(lhs, dot2_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#280 - def rational(rational_t); end - - # source://parser//lib/parser/builders/default.rb#426 - def regexp_compose(begin_t, parts, end_t, options); end - - # source://parser//lib/parser/builders/default.rb#417 - def regexp_options(regopt_t); end - - # source://parser//lib/parser/builders/default.rb#1369 - def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end - - # source://parser//lib/parser/builders/default.rb#933 - def restarg(star_t, name_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1016 - def restarg_expr(star_t, expr = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#581 - def self(token); end - - # source://parser//lib/parser/builders/default.rb#975 - def shadowarg(name_t); end - - # source://parser//lib/parser/builders/default.rb#445 - def splat(star_t, arg = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#319 - def string(string_t); end - - # source://parser//lib/parser/builders/default.rb#329 - def string_compose(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#324 - def string_internal(string_t); end - - # source://parser//lib/parser/builders/default.rb#355 - def symbol(symbol_t); end - - # source://parser//lib/parser/builders/default.rb#365 - def symbol_compose(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#360 - def symbol_internal(symbol_t); end - - # source://parser//lib/parser/builders/default.rb#469 - def symbols_compose(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#1297 - def ternary(cond, question_t, if_true, colon_t, if_false); end - - # source://parser//lib/parser/builders/default.rb#260 - def true(true_t); end - - # source://parser//lib/parser/builders/default.rb#294 - def unary_num(unary_t, numeric); end - - # source://parser//lib/parser/builders/default.rb#1243 - def unary_op(op_t, receiver); end - - # source://parser//lib/parser/builders/default.rb#873 - def undef_method(undef_t, names); end - - # source://parser//lib/parser/builders/default.rb#1504 - def unless_guard(unless_t, unless_body); end - - # source://parser//lib/parser/builders/default.rb#1304 - def when(when_t, patterns, then_t, body); end - - # source://parser//lib/parser/builders/default.rb#455 - def word(parts); end - - # source://parser//lib/parser/builders/default.rb#464 - def words_compose(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#381 - def xstring_compose(begin_t, parts, end_t); end - - private - - # source://parser//lib/parser/builders/default.rb#1821 - def arg_name_collides?(this_name, that_name); end - - # source://parser//lib/parser/builders/default.rb#2017 - def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1991 - def binary_op_map(left_e, op_t, right_e); end - - # source://parser//lib/parser/builders/default.rb#2119 - def block_map(receiver_l, begin_t, end_t); end - - # source://parser//lib/parser/builders/default.rb#1796 - def check_assignment_to_numparam(name, loc); end - - # source://parser//lib/parser/builders/default.rb#1688 - def check_condition(cond); end - - # source://parser//lib/parser/builders/default.rb#1767 - def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1742 - def check_duplicate_args(args, map = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1854 - def check_duplicate_pattern_key(name, loc); end - - # source://parser//lib/parser/builders/default.rb#1844 - def check_duplicate_pattern_variable(name, loc); end - - # source://parser//lib/parser/builders/default.rb#1836 - def check_lvar_name(name, loc); end - - # source://parser//lib/parser/builders/default.rb#1811 - def check_reserved_for_numparam(name, loc); end - - # source://parser//lib/parser/builders/default.rb#2280 - def collapse_string_parts?(parts); end - - # source://parser//lib/parser/builders/default.rb#1942 - def collection_map(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#2146 - def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end - - # source://parser//lib/parser/builders/default.rb#1977 - def constant_map(scope, colon2_t, name_t); end - - # source://parser//lib/parser/builders/default.rb#2050 - def definition_map(keyword_t, operator_t, name_t, end_t); end - - # source://parser//lib/parser/builders/default.rb#1883 - def delimited_string_map(string_t); end - - # source://parser//lib/parser/builders/default.rb#2302 - def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#2190 - def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end - - # source://parser//lib/parser/builders/default.rb#2056 - def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end - - # source://parser//lib/parser/builders/default.rb#1938 - def expr_map(loc); end - - # source://parser//lib/parser/builders/default.rb#2171 - def for_map(keyword_t, in_t, begin_t, end_t); end - - # source://parser//lib/parser/builders/default.rb#2218 - def guard_map(keyword_t, guard_body_e); end - - # source://parser//lib/parser/builders/default.rb#2108 - def index_map(receiver_e, lbrack_t, rbrack_t); end - - # source://parser//lib/parser/builders/default.rb#1874 - def join_exprs(left_expr, right_expr); end - - # source://parser//lib/parser/builders/default.rb#2124 - def keyword_map(keyword_t, begin_t, args, end_t); end - - # source://parser//lib/parser/builders/default.rb#2141 - def keyword_mod_map(pre_e, keyword_t, post_e); end - - # source://parser//lib/parser/builders/default.rb#2027 - def kwarg_map(name_t, value_e = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#2333 - def kwargs?(node); end - - # source://parser//lib/parser/builders/default.rb#2297 - def loc(token); end - - # source://parser//lib/parser/builders/default.rb#2040 - def module_definition_map(keyword_t, name_e, operator_t, end_t); end - - # source://parser//lib/parser/builders/default.rb#1866 - def n(type, children, source_map); end - - # source://parser//lib/parser/builders/default.rb#1870 - def n0(type, source_map); end - - # source://parser//lib/parser/builders/default.rb#288 - def numeric(kind, token); end - - # source://parser//lib/parser/builders/default.rb#1908 - def pair_keyword_map(key_t, value_e); end - - # source://parser//lib/parser/builders/default.rb#1923 - def pair_quoted_map(begin_t, end_t, value_e); end - - # source://parser//lib/parser/builders/default.rb#1894 - def prefix_string_map(symbol); end - - # source://parser//lib/parser/builders/default.rb#2005 - def range_map(start_e, op_t, end_e); end - - # source://parser//lib/parser/builders/default.rb#1972 - def regexp_map(begin_t, end_t, options_e); end - - # source://parser//lib/parser/builders/default.rb#2177 - def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end - - # source://parser//lib/parser/builders/default.rb#2323 - def rewrite_hash_args_to_kwargs(args); end - - # source://parser//lib/parser/builders/default.rb#2090 - def send_binary_op_map(lhs_e, selector_t, rhs_e); end - - # source://parser//lib/parser/builders/default.rb#2113 - def send_index_map(receiver_e, lbrack_t, rbrack_t); end - - # source://parser//lib/parser/builders/default.rb#2064 - def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#2096 - def send_unary_op_map(selector_t, arg_e); end - - # source://parser//lib/parser/builders/default.rb#2249 - def static_regexp(parts, options); end - - # source://parser//lib/parser/builders/default.rb#2269 - def static_regexp_node(node); end - - # source://parser//lib/parser/builders/default.rb#2232 - def static_string(nodes); end - - # source://parser//lib/parser/builders/default.rb#1958 - def string_map(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#2289 - def string_value(token); end - - # source://parser//lib/parser/builders/default.rb#2166 - def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end - - # source://parser//lib/parser/builders/default.rb#1879 - def token_map(token); end - - # source://parser//lib/parser/builders/default.rb#1995 - def unary_op_map(op_t, arg_e = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1903 - def unquoted_map(token); end - - # source://parser//lib/parser/builders/default.rb#2311 - def validate_definee(definee); end - - # source://parser//lib/parser/builders/default.rb#1781 - def validate_no_forward_arg_after_restarg(args); end - - # source://parser//lib/parser/builders/default.rb#2285 - def value(token); end - - # source://parser//lib/parser/builders/default.rb#2084 - def var_send_map(variable_e); end - - # source://parser//lib/parser/builders/default.rb#1987 - def variable_map(name_t); end - - class << self - # source://parser//lib/parser/builders/default.rb#97 - def emit_arg_inside_procarg0; end - - # source://parser//lib/parser/builders/default.rb#97 - def emit_arg_inside_procarg0=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#58 - def emit_encoding; end - - # source://parser//lib/parser/builders/default.rb#58 - def emit_encoding=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#126 - def emit_forward_arg; end - - # source://parser//lib/parser/builders/default.rb#126 - def emit_forward_arg=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#80 - def emit_index; end - - # source://parser//lib/parser/builders/default.rb#80 - def emit_index=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#174 - def emit_kwargs; end - - # source://parser//lib/parser/builders/default.rb#174 - def emit_kwargs=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#22 - def emit_lambda; end - - # source://parser//lib/parser/builders/default.rb#22 - def emit_lambda=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#203 - def emit_match_pattern; end - - # source://parser//lib/parser/builders/default.rb#203 - def emit_match_pattern=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#40 - def emit_procarg0; end - - # source://parser//lib/parser/builders/default.rb#40 - def emit_procarg0=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#211 - def modernize; end - end -end - -# {Parser::ClobberingError} is raised when {Parser::Source::Rewriter} -# detects a clobbering rewrite action. This class inherits {RuntimeError} -# rather than {StandardError} for backward compatibility. -# -# @api public -# -# source://parser//lib/parser/clobbering_error.rb#11 -class Parser::ClobberingError < ::RuntimeError; end - -# Context of parsing that is represented by a stack of scopes. -# -# Supported states: -# + :class - in the class body (class A; end) -# + :module - in the module body (module M; end) -# + :sclass - in the singleton class body (class << obj; end) -# + :def - in the method body (def m; end) -# + :defs - in the singleton method body (def self.m; end) -# + :def_open_args - in the arglist of the method definition -# keep in mind that it's set **only** after reducing the first argument, -# if you need to handle the first argument check `lex_state == expr_fname` -# + :block - in the block body (tap {}) -# + :lambda - in the lambda body (-> {}) -# -# source://parser//lib/parser/context.rb#18 -class Parser::Context - # @return [Context] a new instance of Context - # - # source://parser//lib/parser/context.rb#29 - def initialize; end - - # source://parser//lib/parser/context.rb#43 - def in_argdef; end - - # source://parser//lib/parser/context.rb#43 - def in_argdef=(_arg0); end - - # source://parser//lib/parser/context.rb#43 - def in_block; end - - # source://parser//lib/parser/context.rb#43 - def in_block=(_arg0); end - - # source://parser//lib/parser/context.rb#43 - def in_class; end - - # source://parser//lib/parser/context.rb#43 - def in_class=(_arg0); end - - # source://parser//lib/parser/context.rb#43 - def in_def; end - - # source://parser//lib/parser/context.rb#43 - def in_def=(_arg0); end - - # source://parser//lib/parser/context.rb#43 - def in_defined; end - - # source://parser//lib/parser/context.rb#43 - def in_defined=(_arg0); end - - # @return [Boolean] - # - # source://parser//lib/parser/context.rb#45 - def in_dynamic_block?; end - - # source://parser//lib/parser/context.rb#43 - def in_kwarg; end - - # source://parser//lib/parser/context.rb#43 - def in_kwarg=(_arg0); end - - # source://parser//lib/parser/context.rb#43 - def in_lambda; end - - # source://parser//lib/parser/context.rb#43 - def in_lambda=(_arg0); end - - # source://parser//lib/parser/context.rb#33 - def reset; end -end - -# source://parser//lib/parser/context.rb#19 -Parser::Context::FLAGS = T.let(T.unsafe(nil), Array) - -# Stack that holds names of current arguments, -# i.e. while parsing -# def m1(a = (def m2(b = def m3(c = 1); end); end)); end -# ^ -# stack is [:a, :b, :c] -# -# Emulates `p->cur_arg` in MRI's parse.y -# -# @api private -# -# source://parser//lib/parser/current_arg_stack.rb#14 -class Parser::CurrentArgStack - # @api private - # @return [CurrentArgStack] a new instance of CurrentArgStack - # - # source://parser//lib/parser/current_arg_stack.rb#17 - def initialize; end - - # @api private - # @return [Boolean] - # - # source://parser//lib/parser/current_arg_stack.rb#22 - def empty?; end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#34 - def pop; end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#26 - def push(value); end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#38 - def reset; end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#30 - def set(value); end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#15 - def stack; end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#42 - def top; end -end - -# source://parser//lib/parser/current.rb#111 -Parser::CurrentRuby = Parser::Ruby32 - -# @api private -# -# source://parser//lib/parser/deprecation.rb#7 -module Parser::Deprecation - # @api private - # - # source://parser//lib/parser/deprecation.rb#9 - def warn_of_deprecation; end - - # @api private - # - # source://parser//lib/parser/deprecation.rb#8 - def warned_of_deprecation=(_arg0); end -end - -# @api public -# -# source://parser//lib/parser/diagnostic.rb#31 -class Parser::Diagnostic - # @api public - # @param level [Symbol] - # @param reason [Symbol] - # @param arguments [Hash] - # @param location [Parser::Source::Range] - # @param highlights [Array] - # @return [Diagnostic] a new instance of Diagnostic - # - # source://parser//lib/parser/diagnostic.rb#49 - def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end - - # @api public - # @return [Symbol] extended arguments that describe the error - # @see Parser::MESSAGES - # - # source://parser//lib/parser/diagnostic.rb#39 - def arguments; end - - # Supplementary error-related source ranges. - # - # @api public - # @return [Array] - # - # source://parser//lib/parser/diagnostic.rb#40 - def highlights; end - - # @api public - # @return [Symbol] diagnostic level - # @see LEVELS - # - # source://parser//lib/parser/diagnostic.rb#39 - def level; end - - # Main error-related source range. - # - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/diagnostic.rb#40 - def location; end - - # @api public - # @return [String] the rendered message. - # - # source://parser//lib/parser/diagnostic.rb#69 - def message; end - - # @api public - # @return [Symbol] reason for error - # @see Parser::MESSAGES - # - # source://parser//lib/parser/diagnostic.rb#39 - def reason; end - - # Renders the diagnostic message as a clang-like diagnostic. - # - # @api public - # @example - # diagnostic.render # => - # # [ - # # "(fragment:0):1:5: error: unexpected token $end", - # # "foo +", - # # " ^" - # # ] - # @return [Array] - # - # source://parser//lib/parser/diagnostic.rb#86 - def render; end - - private - - # If necessary, shrink a `Range` so as to include only the first line. - # - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/diagnostic.rb#142 - def first_line_only(range); end - - # If necessary, shrink a `Range` so as to include only the last line. - # - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/diagnostic.rb#155 - def last_line_only(range); end - - # Renders one source line in clang diagnostic style, with highlights. - # - # @api public - # @return [Array] - # - # source://parser//lib/parser/diagnostic.rb#110 - def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end -end - -# source://parser//lib/parser/diagnostic/engine.rb#36 -class Parser::Diagnostic::Engine - # source://parser//lib/parser/diagnostic/engine.rb#45 - def initialize(consumer = T.unsafe(nil)); end - - # source://parser//lib/parser/diagnostic/engine.rb#39 - def all_errors_are_fatal; end - - # source://parser//lib/parser/diagnostic/engine.rb#39 - def all_errors_are_fatal=(_arg0); end - - # source://parser//lib/parser/diagnostic/engine.rb#37 - def consumer; end - - # source://parser//lib/parser/diagnostic/engine.rb#37 - def consumer=(_arg0); end - - # source://parser//lib/parser/diagnostic/engine.rb#40 - def ignore_warnings; end - - # source://parser//lib/parser/diagnostic/engine.rb#40 - def ignore_warnings=(_arg0); end - - # source://parser//lib/parser/diagnostic/engine.rb#64 - def process(diagnostic); end - - protected - - # source://parser//lib/parser/diagnostic/engine.rb#86 - def ignore?(diagnostic); end - - # source://parser//lib/parser/diagnostic/engine.rb#97 - def raise?(diagnostic); end -end - -# Collection of the available diagnostic levels. -# -# @api public -# @return [Array] -# -# source://parser//lib/parser/diagnostic.rb#37 -Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array) - -# line 3 "lib/parser/lexer.rl" -# -# === BEFORE YOU START === -# -# Read the Ruby Hacking Guide chapter 11, available in English at -# http://whitequark.org/blog/2013/04/01/ruby-hacking-guide-ch-11-finite-state-lexer/ -# -# Remember two things about Ragel scanners: -# -# 1) Longest match wins. -# -# 2) If two matches have the same length, the first -# in source code wins. -# -# General rules of making Ragel and Bison happy: -# -# * `p` (position) and `@te` contain the index of the character -# they're pointing to ("current"), plus one. `@ts` contains the index -# of the corresponding character. The code for extracting matched token is: -# -# @source_buffer.slice(@ts...@te) -# -# * If your input is `foooooooobar` and the rule is: -# -# 'f' 'o'+ -# -# the result will be: -# -# foooooooobar -# ^ ts=0 ^ p=te=9 -# -# * A Ragel lexer action should not emit more than one token, unless -# you know what you are doing. -# -# * All Ragel commands (fnext, fgoto, ...) end with a semicolon. -# -# * If an action emits the token and transitions to another state, use -# these Ragel commands: -# -# emit($whatever) -# fnext $next_state; fbreak; -# -# If you perform `fgoto` in an action which does not emit a token nor -# rewinds the stream pointer, the parser's side-effectful, -# context-sensitive lookahead actions will break in a hard to detect -# and debug way. -# -# * If an action does not emit a token: -# -# fgoto $next_state; -# -# * If an action features lookbehind, i.e. matches characters with the -# intent of passing them to another action: -# -# p = @ts - 1 -# fgoto $next_state; -# -# or, if the lookbehind consists of a single character: -# -# fhold; fgoto $next_state; -# -# * Ragel merges actions. So, if you have `e_lparen = '(' %act` and -# `c_lparen = '('` and a lexer action `e_lparen | c_lparen`, the result -# _will_ invoke the action `act`. -# -# e_something stands for "something with **e**mbedded action". -# -# * EOF is explicit and is matched by `c_eof`. If you want to introspect -# the state of the lexer, add this rule to the state: -# -# c_eof => do_eof; -# -# * If you proceed past EOF, the lexer will complain: -# -# NoMethodError: undefined method `ord' for nil:NilClass -# -# source://parser//lib/parser/lexer-F1.rb#82 -class Parser::Lexer - # @return [Lexer] a new instance of Lexer - # - # source://parser//lib/parser/lexer-F1.rb#8250 - def initialize(version); end - - # Return next token: [type, value]. - # - # source://parser//lib/parser/lexer-F1.rb#8410 - def advance; end - - # Returns the value of attribute cmdarg. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def cmdarg; end - - # Sets the attribute cmdarg - # - # @param value the value to set the attribute cmdarg to. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def cmdarg=(_arg0); end - - # Returns the value of attribute cmdarg_stack. - # - # source://parser//lib/parser/lexer-F1.rb#8248 - def cmdarg_stack; end - - # Returns the value of attribute command_start. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def command_start; end - - # Sets the attribute command_start - # - # @param value the value to set the attribute command_start to. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def command_start=(_arg0); end - - # Returns the value of attribute comments. - # - # source://parser//lib/parser/lexer-F1.rb#8246 - def comments; end - - # Sets the attribute comments - # - # @param value the value to set the attribute comments to. - # - # source://parser//lib/parser/lexer-F1.rb#8246 - def comments=(_arg0); end - - # Returns the value of attribute cond. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def cond; end - - # Sets the attribute cond - # - # @param value the value to set the attribute cond to. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def cond=(_arg0); end - - # Returns the value of attribute cond_stack. - # - # source://parser//lib/parser/lexer-F1.rb#8248 - def cond_stack; end - - # Returns the value of attribute context. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def context; end - - # Sets the attribute context - # - # @param value the value to set the attribute context to. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def context=(_arg0); end - - # source://parser//lib/parser/lexer-F1.rb#8405 - def dedent_level; end - - # Returns the value of attribute diagnostics. - # - # source://parser//lib/parser/lexer-F1.rb#8240 - def diagnostics; end - - # Sets the attribute diagnostics - # - # @param value the value to set the attribute diagnostics to. - # - # source://parser//lib/parser/lexer-F1.rb#8240 - def diagnostics=(_arg0); end - - # source://parser//lib/parser/lexer-F1.rb#8358 - def encoding; end - - # Returns the value of attribute force_utf32. - # - # source://parser//lib/parser/lexer-F1.rb#8242 - def force_utf32; end - - # Sets the attribute force_utf32 - # - # @param value the value to set the attribute force_utf32 to. - # - # source://parser//lib/parser/lexer-F1.rb#8242 - def force_utf32=(_arg0); end - - # Returns the value of attribute lambda_stack. - # - # source://parser//lib/parser/lexer-F1.rb#8248 - def lambda_stack; end - - # Returns the value of attribute paren_nest. - # - # source://parser//lib/parser/lexer-F1.rb#8248 - def paren_nest; end - - # source://parser//lib/parser/lexer-F1.rb#8392 - def pop_cmdarg; end - - # source://parser//lib/parser/lexer-F1.rb#8401 - def pop_cond; end - - # source://parser//lib/parser/lexer-F1.rb#8387 - def push_cmdarg; end - - # source://parser//lib/parser/lexer-F1.rb#8396 - def push_cond; end - - # source://parser//lib/parser/lexer-F1.rb#8281 - def reset(reset_state = T.unsafe(nil)); end - - # % - # - # source://parser//lib/parser/lexer-F1.rb#8238 - def source_buffer; end - - # source://parser//lib/parser/lexer-F1.rb#8334 - def source_buffer=(source_buffer); end - - # source://parser//lib/parser/lexer-F1.rb#8379 - def state; end - - # source://parser//lib/parser/lexer-F1.rb#8383 - def state=(state); end - - # Returns the value of attribute static_env. - # - # source://parser//lib/parser/lexer-F1.rb#8241 - def static_env; end - - # Sets the attribute static_env - # - # @param value the value to set the attribute static_env to. - # - # source://parser//lib/parser/lexer-F1.rb#8241 - def static_env=(_arg0); end - - # Returns the value of attribute tokens. - # - # source://parser//lib/parser/lexer-F1.rb#8246 - def tokens; end - - # Sets the attribute tokens - # - # @param value the value to set the attribute tokens to. - # - # source://parser//lib/parser/lexer-F1.rb#8246 - def tokens=(_arg0); end - - # Returns the value of attribute version. - # - # source://parser//lib/parser/lexer-F1.rb#8248 - def version; end - - protected - - # source://parser//lib/parser/lexer-F1.rb#14692 - def arg_or_cmdarg(cmd_state); end - - # source://parser//lib/parser/lexer-F1.rb#14754 - def check_ambiguous_slash(tm); end - - # source://parser//lib/parser/lexer-F1.rb#14716 - def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-F1.rb#14722 - def e_lbrace; end - - # source://parser//lib/parser/lexer-F1.rb#14666 - def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-F1.rb#14775 - def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-F1.rb#14803 - def emit_colon_with_digits(p, tm, diag_msg); end - - # source://parser//lib/parser/lexer-F1.rb#14700 - def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-F1.rb#14712 - def emit_comment_from_range(p, pe); end - - # source://parser//lib/parser/lexer-F1.rb#14682 - def emit_do(do_block = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-F1.rb#14765 - def emit_global_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-F1.rb#14783 - def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-F1.rb#14791 - def emit_rbrace_rparen_rbrack; end - - # source://parser//lib/parser/lexer-F1.rb#14813 - def emit_singleton_class; end - - # source://parser//lib/parser/lexer-F1.rb#14676 - def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-F1.rb#14731 - def numeric_literal_int; end - - # source://parser//lib/parser/lexer-F1.rb#14750 - def on_newline(p); end - - # source://parser//lib/parser/lexer-F1.rb#14662 - def range(s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-F1.rb#14653 - def stack_pop; end - - # source://parser//lib/parser/lexer-F1.rb#14658 - def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://parser//lib/parser/lexer-F1.rb#14649 - def version?(*versions); end - - class << self - # Returns the value of attribute lex_en_expr_arg. - # - # source://parser//lib/parser/lexer-F1.rb#8186 - def lex_en_expr_arg; end - - # Sets the attribute lex_en_expr_arg - # - # @param value the value to set the attribute lex_en_expr_arg to. - # - # source://parser//lib/parser/lexer-F1.rb#8186 - def lex_en_expr_arg=(_arg0); end - - # Returns the value of attribute lex_en_expr_beg. - # - # source://parser//lib/parser/lexer-F1.rb#8202 - def lex_en_expr_beg; end - - # Sets the attribute lex_en_expr_beg - # - # @param value the value to set the attribute lex_en_expr_beg to. - # - # source://parser//lib/parser/lexer-F1.rb#8202 - def lex_en_expr_beg=(_arg0); end - - # Returns the value of attribute lex_en_expr_cmdarg. - # - # source://parser//lib/parser/lexer-F1.rb#8190 - def lex_en_expr_cmdarg; end - - # Sets the attribute lex_en_expr_cmdarg - # - # @param value the value to set the attribute lex_en_expr_cmdarg to. - # - # source://parser//lib/parser/lexer-F1.rb#8190 - def lex_en_expr_cmdarg=(_arg0); end - - # Returns the value of attribute lex_en_expr_dot. - # - # source://parser//lib/parser/lexer-F1.rb#8182 - def lex_en_expr_dot; end - - # Sets the attribute lex_en_expr_dot - # - # @param value the value to set the attribute lex_en_expr_dot to. - # - # source://parser//lib/parser/lexer-F1.rb#8182 - def lex_en_expr_dot=(_arg0); end - - # Returns the value of attribute lex_en_expr_end. - # - # source://parser//lib/parser/lexer-F1.rb#8214 - def lex_en_expr_end; end - - # Sets the attribute lex_en_expr_end - # - # @param value the value to set the attribute lex_en_expr_end to. - # - # source://parser//lib/parser/lexer-F1.rb#8214 - def lex_en_expr_end=(_arg0); end - - # Returns the value of attribute lex_en_expr_endarg. - # - # source://parser//lib/parser/lexer-F1.rb#8194 - def lex_en_expr_endarg; end - - # Sets the attribute lex_en_expr_endarg - # - # @param value the value to set the attribute lex_en_expr_endarg to. - # - # source://parser//lib/parser/lexer-F1.rb#8194 - def lex_en_expr_endarg=(_arg0); end - - # Returns the value of attribute lex_en_expr_endfn. - # - # source://parser//lib/parser/lexer-F1.rb#8178 - def lex_en_expr_endfn; end - - # Sets the attribute lex_en_expr_endfn - # - # @param value the value to set the attribute lex_en_expr_endfn to. - # - # source://parser//lib/parser/lexer-F1.rb#8178 - def lex_en_expr_endfn=(_arg0); end - - # Returns the value of attribute lex_en_expr_fname. - # - # source://parser//lib/parser/lexer-F1.rb#8174 - def lex_en_expr_fname; end - - # Sets the attribute lex_en_expr_fname - # - # @param value the value to set the attribute lex_en_expr_fname to. - # - # source://parser//lib/parser/lexer-F1.rb#8174 - def lex_en_expr_fname=(_arg0); end - - # Returns the value of attribute lex_en_expr_labelarg. - # - # source://parser//lib/parser/lexer-F1.rb#8206 - def lex_en_expr_labelarg; end - - # Sets the attribute lex_en_expr_labelarg - # - # @param value the value to set the attribute lex_en_expr_labelarg to. - # - # source://parser//lib/parser/lexer-F1.rb#8206 - def lex_en_expr_labelarg=(_arg0); end - - # Returns the value of attribute lex_en_expr_mid. - # - # source://parser//lib/parser/lexer-F1.rb#8198 - def lex_en_expr_mid; end - - # Sets the attribute lex_en_expr_mid - # - # @param value the value to set the attribute lex_en_expr_mid to. - # - # source://parser//lib/parser/lexer-F1.rb#8198 - def lex_en_expr_mid=(_arg0); end - - # Returns the value of attribute lex_en_expr_value. - # - # source://parser//lib/parser/lexer-F1.rb#8210 - def lex_en_expr_value; end - - # Sets the attribute lex_en_expr_value - # - # @param value the value to set the attribute lex_en_expr_value to. - # - # source://parser//lib/parser/lexer-F1.rb#8210 - def lex_en_expr_value=(_arg0); end - - # Returns the value of attribute lex_en_expr_variable. - # - # source://parser//lib/parser/lexer-F1.rb#8170 - def lex_en_expr_variable; end - - # Sets the attribute lex_en_expr_variable - # - # @param value the value to set the attribute lex_en_expr_variable to. - # - # source://parser//lib/parser/lexer-F1.rb#8170 - def lex_en_expr_variable=(_arg0); end - - # Returns the value of attribute lex_en_inside_string. - # - # source://parser//lib/parser/lexer-F1.rb#8230 - def lex_en_inside_string; end - - # Sets the attribute lex_en_inside_string - # - # @param value the value to set the attribute lex_en_inside_string to. - # - # source://parser//lib/parser/lexer-F1.rb#8230 - def lex_en_inside_string=(_arg0); end - - # Returns the value of attribute lex_en_leading_dot. - # - # source://parser//lib/parser/lexer-F1.rb#8218 - def lex_en_leading_dot; end - - # Sets the attribute lex_en_leading_dot - # - # @param value the value to set the attribute lex_en_leading_dot to. - # - # source://parser//lib/parser/lexer-F1.rb#8218 - def lex_en_leading_dot=(_arg0); end - - # Returns the value of attribute lex_en_line_begin. - # - # source://parser//lib/parser/lexer-F1.rb#8226 - def lex_en_line_begin; end - - # Sets the attribute lex_en_line_begin - # - # @param value the value to set the attribute lex_en_line_begin to. - # - # source://parser//lib/parser/lexer-F1.rb#8226 - def lex_en_line_begin=(_arg0); end - - # Returns the value of attribute lex_en_line_comment. - # - # source://parser//lib/parser/lexer-F1.rb#8222 - def lex_en_line_comment; end - - # Sets the attribute lex_en_line_comment - # - # @param value the value to set the attribute lex_en_line_comment to. - # - # source://parser//lib/parser/lexer-F1.rb#8222 - def lex_en_line_comment=(_arg0); end - - # Returns the value of attribute lex_error. - # - # source://parser//lib/parser/lexer-F1.rb#8165 - def lex_error; end - - # Sets the attribute lex_error - # - # @param value the value to set the attribute lex_error to. - # - # source://parser//lib/parser/lexer-F1.rb#8165 - def lex_error=(_arg0); end - - # Returns the value of attribute lex_start. - # - # source://parser//lib/parser/lexer-F1.rb#8161 - def lex_start; end - - # Sets the attribute lex_start - # - # @param value the value to set the attribute lex_start to. - # - # source://parser//lib/parser/lexer-F1.rb#8161 - def lex_start=(_arg0); end - - private - - # Returns the value of attribute _lex_eof_trans. - # - # source://parser//lib/parser/lexer-F1.rb#8064 - def _lex_eof_trans; end - - # Sets the attribute _lex_eof_trans - # - # @param value the value to set the attribute _lex_eof_trans to. - # - # source://parser//lib/parser/lexer-F1.rb#8064 - def _lex_eof_trans=(_arg0); end - - # Returns the value of attribute _lex_from_state_actions. - # - # source://parser//lib/parser/lexer-F1.rb#7967 - def _lex_from_state_actions; end - - # Sets the attribute _lex_from_state_actions - # - # @param value the value to set the attribute _lex_from_state_actions to. - # - # source://parser//lib/parser/lexer-F1.rb#7967 - def _lex_from_state_actions=(_arg0); end - - # Returns the value of attribute _lex_index_offsets. - # - # source://parser//lib/parser/lexer-F1.rb#461 - def _lex_index_offsets; end - - # Sets the attribute _lex_index_offsets - # - # @param value the value to set the attribute _lex_index_offsets to. - # - # source://parser//lib/parser/lexer-F1.rb#461 - def _lex_index_offsets=(_arg0); end - - # Returns the value of attribute _lex_indicies. - # - # source://parser//lib/parser/lexer-F1.rb#558 - def _lex_indicies; end - - # Sets the attribute _lex_indicies - # - # @param value the value to set the attribute _lex_indicies to. - # - # source://parser//lib/parser/lexer-F1.rb#558 - def _lex_indicies=(_arg0); end - - # Returns the value of attribute _lex_key_spans. - # - # source://parser//lib/parser/lexer-F1.rb#364 - def _lex_key_spans; end - - # Sets the attribute _lex_key_spans - # - # @param value the value to set the attribute _lex_key_spans to. - # - # source://parser//lib/parser/lexer-F1.rb#364 - def _lex_key_spans=(_arg0); end - - # Returns the value of attribute _lex_to_state_actions. - # - # source://parser//lib/parser/lexer-F1.rb#7870 - def _lex_to_state_actions; end - - # Sets the attribute _lex_to_state_actions - # - # @param value the value to set the attribute _lex_to_state_actions to. - # - # source://parser//lib/parser/lexer-F1.rb#7870 - def _lex_to_state_actions=(_arg0); end - - # Returns the value of attribute _lex_trans_actions. - # - # source://parser//lib/parser/lexer-F1.rb#7722 - def _lex_trans_actions; end - - # Sets the attribute _lex_trans_actions - # - # @param value the value to set the attribute _lex_trans_actions to. - # - # source://parser//lib/parser/lexer-F1.rb#7722 - def _lex_trans_actions=(_arg0); end - - # Returns the value of attribute _lex_trans_keys. - # - # source://parser//lib/parser/lexer-F1.rb#87 - def _lex_trans_keys; end - - # Sets the attribute _lex_trans_keys - # - # @param value the value to set the attribute _lex_trans_keys to. - # - # source://parser//lib/parser/lexer-F1.rb#87 - def _lex_trans_keys=(_arg0); end - - # Returns the value of attribute _lex_trans_targs. - # - # source://parser//lib/parser/lexer-F1.rb#7574 - def _lex_trans_targs; end - - # Sets the attribute _lex_trans_targs - # - # @param value the value to set the attribute _lex_trans_targs to. - # - # source://parser//lib/parser/lexer-F1.rb#7574 - def _lex_trans_targs=(_arg0); end - end -end - -# source://parser//lib/parser/lexer/dedenter.rb#5 -class Parser::Lexer::Dedenter - # source://parser//lib/parser/lexer/dedenter.rb#9 - def initialize(dedent_level); end - - # source://parser//lib/parser/lexer/dedenter.rb#36 - def dedent(string); end - - # source://parser//lib/parser/lexer/dedenter.rb#83 - def interrupt; end -end - -# source://parser//lib/parser/lexer/dedenter.rb#7 -Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) - -# source://parser//lib/parser/lexer-F1.rb#14860 -Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer-F1.rb#14846 -Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer-F1.rb#14853 -Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer-F1.rb#8362 -Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer/literal.rb#6 -class Parser::Lexer::Literal - # source://parser//lib/parser/lexer/literal.rb#42 - def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer/literal.rb#116 - def backslash_delimited?; end - - # source://parser//lib/parser/lexer/literal.rb#39 - def dedent_level; end - - # source://parser//lib/parser/lexer/literal.rb#191 - def end_interp_brace_and_try_closing; end - - # source://parser//lib/parser/lexer/literal.rb#218 - def extend_content; end - - # source://parser//lib/parser/lexer/literal.rb#222 - def extend_space(ts, te); end - - # source://parser//lib/parser/lexer/literal.rb#197 - def extend_string(string, ts, te); end - - # source://parser//lib/parser/lexer/literal.rb#204 - def flush_string; end - - # source://parser//lib/parser/lexer/literal.rb#104 - def heredoc?; end - - # source://parser//lib/parser/lexer/literal.rb#39 - def heredoc_e; end - - # source://parser//lib/parser/lexer/literal.rb#168 - def infer_indent_level(line); end - - # source://parser//lib/parser/lexer/literal.rb#91 - def interpolate?; end - - # source://parser//lib/parser/lexer/literal.rb#124 - def munge_escape?(character); end - - # source://parser//lib/parser/lexer/literal.rb#134 - def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer/literal.rb#108 - def plain_heredoc?; end - - # source://parser//lib/parser/lexer/literal.rb#100 - def regexp?; end - - # source://parser//lib/parser/lexer/literal.rb#40 - def saved_herebody_s; end - - # source://parser//lib/parser/lexer/literal.rb#40 - def saved_herebody_s=(_arg0); end - - # source://parser//lib/parser/lexer/literal.rb#112 - def squiggly_heredoc?; end - - # source://parser//lib/parser/lexer/literal.rb#187 - def start_interp_brace; end - - # source://parser//lib/parser/lexer/literal.rb#39 - def str_s; end - - # source://parser//lib/parser/lexer/literal.rb#232 - def supports_line_continuation_via_slash?; end - - # source://parser//lib/parser/lexer/literal.rb#120 - def type; end - - # source://parser//lib/parser/lexer/literal.rb#95 - def words?; end - - protected - - # source://parser//lib/parser/lexer/literal.rb#263 - def clear_buffer; end - - # source://parser//lib/parser/lexer/literal.rb#259 - def coerce_encoding(string); end - - # source://parser//lib/parser/lexer/literal.rb#238 - def delimiter?(delimiter); end - - # source://parser//lib/parser/lexer/literal.rb#279 - def emit(token, type, s, e); end - - # source://parser//lib/parser/lexer/literal.rb#274 - def emit_start_tok; end -end - -# source://parser//lib/parser/lexer/literal.rb#7 -Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer/literal.rb#8 -Parser::Lexer::Literal::SPACE = T.let(T.unsafe(nil), Integer) - -# source://parser//lib/parser/lexer/literal.rb#9 -Parser::Lexer::Literal::TAB = T.let(T.unsafe(nil), Integer) - -# source://parser//lib/parser/lexer/literal.rb#11 -Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) - -# Mapping of strings to parser tokens. -# -# source://parser//lib/parser/lexer-F1.rb#14820 -Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer-F1.rb#14840 -Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer/stack_state.rb#5 -class Parser::Lexer::StackState - # source://parser//lib/parser/lexer/stack_state.rb#6 - def initialize(name); end - - # source://parser//lib/parser/lexer/stack_state.rb#34 - def active?; end - - # source://parser//lib/parser/lexer/stack_state.rb#11 - def clear; end - - # source://parser//lib/parser/lexer/stack_state.rb#38 - def empty?; end - - # source://parser//lib/parser/lexer/stack_state.rb#42 - def inspect; end - - # source://parser//lib/parser/lexer/stack_state.rb#29 - def lexpop; end - - # source://parser//lib/parser/lexer/stack_state.rb#22 - def pop; end - - # source://parser//lib/parser/lexer/stack_state.rb#15 - def push(bit); end - - # source://parser//lib/parser/lexer/stack_state.rb#42 - def to_s; end -end - -# line 3 "lib/parser/lexer-strings.rl" -# -# source://parser//lib/parser/lexer-strings.rb#6 -class Parser::LexerStrings - # @return [LexerStrings] a new instance of LexerStrings - # - # source://parser//lib/parser/lexer-strings.rb#3300 - def initialize(lexer, version); end - - # source://parser//lib/parser/lexer-strings.rb#3339 - def advance(p); end - - # source://parser//lib/parser/lexer-strings.rb#5069 - def close_interp_on_current_literal(p); end - - # source://parser//lib/parser/lexer-strings.rb#5043 - def continue_lexing(current_literal); end - - # source://parser//lib/parser/lexer-strings.rb#5092 - def dedent_level; end - - # Returns the value of attribute herebody_s. - # - # source://parser//lib/parser/lexer-strings.rb#3295 - def herebody_s; end - - # Sets the attribute herebody_s - # - # @param value the value to set the attribute herebody_s to. - # - # source://parser//lib/parser/lexer-strings.rb#3295 - def herebody_s=(_arg0); end - - # source://parser//lib/parser/lexer-strings.rb#5047 - def literal; end - - # source://parser//lib/parser/lexer-strings.rb#5015 - def next_state_for_literal(literal); end - - # This hook is triggered by "main" lexer on every newline character - # - # source://parser//lib/parser/lexer-strings.rb#5100 - def on_newline(p); end - - # source://parser//lib/parser/lexer-strings.rb#5051 - def pop_literal; end - - # === LITERAL STACK === - # - # source://parser//lib/parser/lexer-strings.rb#5009 - def push_literal(*args); end - - # source://parser//lib/parser/lexer-strings.rb#4999 - def read_character_constant(p); end - - # source://parser//lib/parser/lexer-strings.rb#3314 - def reset; end - - # Set by "main" lexer - # - # source://parser//lib/parser/lexer-strings.rb#3298 - def source_buffer; end - - # Set by "main" lexer - # - # source://parser//lib/parser/lexer-strings.rb#3298 - def source_buffer=(_arg0); end - - # Set by "main" lexer - # - # source://parser//lib/parser/lexer-strings.rb#3298 - def source_pts; end - - # Set by "main" lexer - # - # source://parser//lib/parser/lexer-strings.rb#3298 - def source_pts=(_arg0); end - - protected - - # source://parser//lib/parser/lexer-strings.rb#5397 - def check_ambiguous_slash(tm); end - - # source://parser//lib/parser/lexer-strings.rb#5408 - def check_invalid_escapes(p); end - - # source://parser//lib/parser/lexer-strings.rb#5136 - def cond; end - - # source://parser//lib/parser/lexer-strings.rb#5132 - def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-strings.rb#5128 - def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-strings.rb#5387 - def emit_character_constant; end - - # source://parser//lib/parser/lexer-strings.rb#5364 - def emit_interp_var(interp_var_kind); end - - # @return [Boolean] - # - # source://parser//lib/parser/lexer-strings.rb#5140 - def emit_invalid_escapes?; end - - # source://parser//lib/parser/lexer-strings.rb#5291 - def encode_escape(ord); end - - # source://parser//lib/parser/lexer-strings.rb#5375 - def encode_escaped_char(p); end - - # @return [Boolean] - # - # source://parser//lib/parser/lexer-strings.rb#5112 - def eof_codepoint?(point); end - - # source://parser//lib/parser/lexer-strings.rb#5210 - def extend_interp_code(current_literal); end - - # source://parser//lib/parser/lexer-strings.rb#5225 - def extend_interp_digit_var; end - - # source://parser//lib/parser/lexer-strings.rb#5355 - def extend_interp_var(current_literal); end - - # source://parser//lib/parser/lexer-strings.rb#5234 - def extend_string_eol_check_eof(current_literal, pe); end - - # source://parser//lib/parser/lexer-strings.rb#5251 - def extend_string_eol_heredoc_intertwined(p); end - - # source://parser//lib/parser/lexer-strings.rb#5241 - def extend_string_eol_heredoc_line; end - - # source://parser//lib/parser/lexer-strings.rb#5267 - def extend_string_eol_words(current_literal, p); end - - # String escaping - # - # source://parser//lib/parser/lexer-strings.rb#5154 - def extend_string_escaped; end - - # source://parser//lib/parser/lexer-strings.rb#5287 - def extend_string_for_token_range(current_literal, string); end - - # source://parser//lib/parser/lexer-strings.rb#5279 - def extend_string_slice_end(lookahead); end - - # source://parser//lib/parser/lexer-strings.rb#5124 - def range(s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-strings.rb#5347 - def read_post_meta_or_ctrl_char(p); end - - # source://parser//lib/parser/lexer-strings.rb#5379 - def slash_c_char; end - - # source://parser//lib/parser/lexer-strings.rb#5383 - def slash_m_char; end - - # source://parser//lib/parser/lexer-strings.rb#5120 - def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-strings.rb#5295 - def unescape_char(p); end - - # source://parser//lib/parser/lexer-strings.rb#5307 - def unicode_points(p); end - - # @return [Boolean] - # - # source://parser//lib/parser/lexer-strings.rb#5116 - def version?(*versions); end - - class << self - # Returns the value of attribute lex_en_character. - # - # source://parser//lib/parser/lexer-strings.rb#3275 - def lex_en_character; end - - # Sets the attribute lex_en_character - # - # @param value the value to set the attribute lex_en_character to. - # - # source://parser//lib/parser/lexer-strings.rb#3275 - def lex_en_character=(_arg0); end - - # Returns the value of attribute lex_en_interp_backslash_delimited. - # - # source://parser//lib/parser/lexer-strings.rb#3255 - def lex_en_interp_backslash_delimited; end - - # Sets the attribute lex_en_interp_backslash_delimited - # - # @param value the value to set the attribute lex_en_interp_backslash_delimited to. - # - # source://parser//lib/parser/lexer-strings.rb#3255 - def lex_en_interp_backslash_delimited=(_arg0); end - - # Returns the value of attribute lex_en_interp_backslash_delimited_words. - # - # source://parser//lib/parser/lexer-strings.rb#3263 - def lex_en_interp_backslash_delimited_words; end - - # Sets the attribute lex_en_interp_backslash_delimited_words - # - # @param value the value to set the attribute lex_en_interp_backslash_delimited_words to. - # - # source://parser//lib/parser/lexer-strings.rb#3263 - def lex_en_interp_backslash_delimited_words=(_arg0); end - - # Returns the value of attribute lex_en_interp_string. - # - # source://parser//lib/parser/lexer-strings.rb#3243 - def lex_en_interp_string; end - - # Sets the attribute lex_en_interp_string - # - # @param value the value to set the attribute lex_en_interp_string to. - # - # source://parser//lib/parser/lexer-strings.rb#3243 - def lex_en_interp_string=(_arg0); end - - # Returns the value of attribute lex_en_interp_words. - # - # source://parser//lib/parser/lexer-strings.rb#3239 - def lex_en_interp_words; end - - # Sets the attribute lex_en_interp_words - # - # @param value the value to set the attribute lex_en_interp_words to. - # - # source://parser//lib/parser/lexer-strings.rb#3239 - def lex_en_interp_words=(_arg0); end - - # Returns the value of attribute lex_en_plain_backslash_delimited. - # - # source://parser//lib/parser/lexer-strings.rb#3259 - def lex_en_plain_backslash_delimited; end - - # Sets the attribute lex_en_plain_backslash_delimited - # - # @param value the value to set the attribute lex_en_plain_backslash_delimited to. - # - # source://parser//lib/parser/lexer-strings.rb#3259 - def lex_en_plain_backslash_delimited=(_arg0); end - - # Returns the value of attribute lex_en_plain_backslash_delimited_words. - # - # source://parser//lib/parser/lexer-strings.rb#3267 - def lex_en_plain_backslash_delimited_words; end - - # Sets the attribute lex_en_plain_backslash_delimited_words - # - # @param value the value to set the attribute lex_en_plain_backslash_delimited_words to. - # - # source://parser//lib/parser/lexer-strings.rb#3267 - def lex_en_plain_backslash_delimited_words=(_arg0); end - - # Returns the value of attribute lex_en_plain_string. - # - # source://parser//lib/parser/lexer-strings.rb#3251 - def lex_en_plain_string; end - - # Sets the attribute lex_en_plain_string - # - # @param value the value to set the attribute lex_en_plain_string to. - # - # source://parser//lib/parser/lexer-strings.rb#3251 - def lex_en_plain_string=(_arg0); end - - # Returns the value of attribute lex_en_plain_words. - # - # source://parser//lib/parser/lexer-strings.rb#3247 - def lex_en_plain_words; end - - # Sets the attribute lex_en_plain_words - # - # @param value the value to set the attribute lex_en_plain_words to. - # - # source://parser//lib/parser/lexer-strings.rb#3247 - def lex_en_plain_words=(_arg0); end - - # Returns the value of attribute lex_en_regexp_modifiers. - # - # source://parser//lib/parser/lexer-strings.rb#3271 - def lex_en_regexp_modifiers; end - - # Sets the attribute lex_en_regexp_modifiers - # - # @param value the value to set the attribute lex_en_regexp_modifiers to. - # - # source://parser//lib/parser/lexer-strings.rb#3271 - def lex_en_regexp_modifiers=(_arg0); end - - # Returns the value of attribute lex_en_unknown. - # - # source://parser//lib/parser/lexer-strings.rb#3279 - def lex_en_unknown; end - - # Sets the attribute lex_en_unknown - # - # @param value the value to set the attribute lex_en_unknown to. - # - # source://parser//lib/parser/lexer-strings.rb#3279 - def lex_en_unknown=(_arg0); end - - # Returns the value of attribute lex_error. - # - # source://parser//lib/parser/lexer-strings.rb#3234 - def lex_error; end - - # Sets the attribute lex_error - # - # @param value the value to set the attribute lex_error to. - # - # source://parser//lib/parser/lexer-strings.rb#3234 - def lex_error=(_arg0); end - - # Returns the value of attribute lex_start. - # - # source://parser//lib/parser/lexer-strings.rb#3230 - def lex_start; end - - # Sets the attribute lex_start - # - # @param value the value to set the attribute lex_start to. - # - # source://parser//lib/parser/lexer-strings.rb#3230 - def lex_start=(_arg0); end - - private - - # Returns the value of attribute _lex_actions. - # - # source://parser//lib/parser/lexer-strings.rb#11 - def _lex_actions; end - - # Sets the attribute _lex_actions - # - # @param value the value to set the attribute _lex_actions to. - # - # source://parser//lib/parser/lexer-strings.rb#11 - def _lex_actions=(_arg0); end - - # Returns the value of attribute _lex_eof_trans. - # - # source://parser//lib/parser/lexer-strings.rb#3184 - def _lex_eof_trans; end - - # Sets the attribute _lex_eof_trans - # - # @param value the value to set the attribute _lex_eof_trans to. - # - # source://parser//lib/parser/lexer-strings.rb#3184 - def _lex_eof_trans=(_arg0); end - - # Returns the value of attribute _lex_from_state_actions. - # - # source://parser//lib/parser/lexer-strings.rb#3138 - def _lex_from_state_actions; end - - # Sets the attribute _lex_from_state_actions - # - # @param value the value to set the attribute _lex_from_state_actions to. - # - # source://parser//lib/parser/lexer-strings.rb#3138 - def _lex_from_state_actions=(_arg0); end - - # Returns the value of attribute _lex_index_offsets. - # - # source://parser//lib/parser/lexer-strings.rb#244 - def _lex_index_offsets; end - - # Sets the attribute _lex_index_offsets - # - # @param value the value to set the attribute _lex_index_offsets to. - # - # source://parser//lib/parser/lexer-strings.rb#244 - def _lex_index_offsets=(_arg0); end - - # Returns the value of attribute _lex_indicies. - # - # source://parser//lib/parser/lexer-strings.rb#290 - def _lex_indicies; end - - # Sets the attribute _lex_indicies - # - # @param value the value to set the attribute _lex_indicies to. - # - # source://parser//lib/parser/lexer-strings.rb#290 - def _lex_indicies=(_arg0); end - - # Returns the value of attribute _lex_key_spans. - # - # source://parser//lib/parser/lexer-strings.rb#198 - def _lex_key_spans; end - - # Sets the attribute _lex_key_spans - # - # @param value the value to set the attribute _lex_key_spans to. - # - # source://parser//lib/parser/lexer-strings.rb#198 - def _lex_key_spans=(_arg0); end - - # Returns the value of attribute _lex_to_state_actions. - # - # source://parser//lib/parser/lexer-strings.rb#3092 - def _lex_to_state_actions; end - - # Sets the attribute _lex_to_state_actions - # - # @param value the value to set the attribute _lex_to_state_actions to. - # - # source://parser//lib/parser/lexer-strings.rb#3092 - def _lex_to_state_actions=(_arg0); end - - # Returns the value of attribute _lex_trans_actions. - # - # source://parser//lib/parser/lexer-strings.rb#3029 - def _lex_trans_actions; end - - # Sets the attribute _lex_trans_actions - # - # @param value the value to set the attribute _lex_trans_actions to. - # - # source://parser//lib/parser/lexer-strings.rb#3029 - def _lex_trans_actions=(_arg0); end - - # Returns the value of attribute _lex_trans_keys. - # - # source://parser//lib/parser/lexer-strings.rb#76 - def _lex_trans_keys; end - - # Sets the attribute _lex_trans_keys - # - # @param value the value to set the attribute _lex_trans_keys to. - # - # source://parser//lib/parser/lexer-strings.rb#76 - def _lex_trans_keys=(_arg0); end - - # Returns the value of attribute _lex_trans_targs. - # - # source://parser//lib/parser/lexer-strings.rb#2966 - def _lex_trans_targs; end - - # Sets the attribute _lex_trans_targs - # - # @param value the value to set the attribute _lex_trans_targs to. - # - # source://parser//lib/parser/lexer-strings.rb#2966 - def _lex_trans_targs=(_arg0); end - end -end - -# % -# -# source://parser//lib/parser/lexer-strings.rb#3287 -Parser::LexerStrings::ESCAPES = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer-strings.rb#5414 -Parser::LexerStrings::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer-strings.rb#3332 -Parser::LexerStrings::LEX_STATES = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer-strings.rb#3293 -Parser::LexerStrings::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) - -# Diagnostic messages (errors, warnings and notices) that can be generated. -# -# @api public -# @see Diagnostic -# -# source://parser//lib/parser/messages.rb#11 -Parser::MESSAGES = T.let(T.unsafe(nil), Hash) - -# Holds p->max_numparam from parse.y -# -# @api private -# -# source://parser//lib/parser/max_numparam_stack.rb#8 -class Parser::MaxNumparamStack - # @api private - # @return [MaxNumparamStack] a new instance of MaxNumparamStack - # - # source://parser//lib/parser/max_numparam_stack.rb#13 - def initialize; end - - # @api private - # @return [Boolean] - # - # source://parser//lib/parser/max_numparam_stack.rb#17 - def empty?; end - - # @api private - # @return [Boolean] - # - # source://parser//lib/parser/max_numparam_stack.rb#29 - def has_numparams?; end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#21 - def has_ordinary_params!; end - - # @api private - # @return [Boolean] - # - # source://parser//lib/parser/max_numparam_stack.rb#25 - def has_ordinary_params?; end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#45 - def pop; end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#41 - def push(static:); end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#33 - def register(numparam); end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#9 - def stack; end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#37 - def top; end - - private - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#51 - def set(value); end -end - -# @api private -# -# source://parser//lib/parser/max_numparam_stack.rb#11 -Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) - -# @api private -# -# source://parser//lib/parser/messages.rb#112 -module Parser::Messages - class << self - # Formats the message, returns a raw template if there's nothing to interpolate - # - # Code like `format("", {})` gives a warning, and so this method tries interpolating - # only if `arguments` hash is not empty. - # - # @api private - # - # source://parser//lib/parser/messages.rb#119 - def compile(reason, arguments); end - end -end - -# Parser metadata -# -# source://parser//lib/parser/meta.rb#5 -module Parser::Meta; end - -# All node types that parser can produce. Not all parser versions -# will be able to produce every possible node. -# -# source://parser//lib/parser/meta.rb#9 -Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) - -# {Parser::Rewriter} is deprecated. Use {Parser::TreeRewriter} instead. -# It has a backwards compatible API and uses {Parser::Source::TreeRewriter} -# instead of {Parser::Source::Rewriter}. -# Please check the documentation for {Parser::Source::Rewriter} for details. -# -# @api public -# @deprecated Use {Parser::TreeRewriter} -# -# source://parser//lib/parser/rewriter.rb#14 -class Parser::Rewriter < ::Parser::AST::Processor - extend ::Parser::Deprecation - - # @api public - # @return [Rewriter] a new instance of Rewriter - # - # source://parser//lib/parser/rewriter.rb#98 - def initialize(*_arg0); end - - # Returns `true` if the specified node is an assignment node, returns false - # otherwise. - # - # @api public - # @param node [Parser::AST::Node] - # @return [Boolean] - # - # source://parser//lib/parser/rewriter.rb#38 - def assignment?(node); end - - # Inserts new code after the given source range. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/rewriter.rb#77 - def insert_after(range, content); end - - # Inserts new code before the given source range. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/rewriter.rb#67 - def insert_before(range, content); end - - # Removes the source range. - # - # @api public - # @param range [Parser::Source::Range] - # - # source://parser//lib/parser/rewriter.rb#47 - def remove(range); end - - # Replaces the code of the source range `range` with `content`. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/rewriter.rb#87 - def replace(range, content); end - - # Rewrites the AST/source buffer and returns a String containing the new - # version. - # - # @api public - # @param source_buffer [Parser::Source::Buffer] - # @param ast [Parser::AST::Node] - # @return [String] - # - # source://parser//lib/parser/rewriter.rb#23 - def rewrite(source_buffer, ast); end - - # Wraps the given source range with the given values. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/rewriter.rb#57 - def wrap(range, before, after); end -end - -# @api public -# -# source://parser//lib/parser/rewriter.rb#91 -Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -# source://parser//lib/parser/ruby32.rb#14 -class Parser::Ruby32 < ::Parser::Base - # reduce 0 omitted - # - # source://parser//lib/parser/ruby32.rb#8421 - def _reduce_1(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8475 - def _reduce_10(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9110 - def _reduce_100(val, _values, result); end - - # reduce 101 omitted - # - # source://parser//lib/parser/ruby32.rb#9119 - def _reduce_102(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9125 - def _reduce_103(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9131 - def _reduce_104(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9137 - def _reduce_105(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9143 - def _reduce_106(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9149 - def _reduce_107(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9155 - def _reduce_108(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9161 - def _reduce_109(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8481 - def _reduce_11(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9167 - def _reduce_110(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9177 - def _reduce_111(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9183 - def _reduce_112(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9193 - def _reduce_113(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9200 - def _reduce_114(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9207 - def _reduce_115(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9213 - def _reduce_116(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9219 - def _reduce_117(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9225 - def _reduce_118(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9231 - def _reduce_119(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8498 - def _reduce_12(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9237 - def _reduce_120(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9243 - def _reduce_121(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9249 - def _reduce_122(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9256 - def _reduce_123(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9263 - def _reduce_124(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9269 - def _reduce_125(val, _values, result); end - - # reduce 126 omitted - # - # source://parser//lib/parser/ruby32.rb#9277 - def _reduce_127(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9283 - def _reduce_128(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9289 - def _reduce_129(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8504 - def _reduce_13(val, _values, result); end - - # reduce 134 omitted - # - # source://parser//lib/parser/ruby32.rb#9305 - def _reduce_135(val, _values, result); end - - # reduce 136 omitted - # - # source://parser//lib/parser/ruby32.rb#9313 - def _reduce_137(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9319 - def _reduce_138(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9325 - def _reduce_139(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8510 - def _reduce_14(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8516 - def _reduce_15(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8522 - def _reduce_16(val, _values, result); end - - # reduce 17 omitted - # - # source://parser//lib/parser/ruby32.rb#8530 - def _reduce_18(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8536 - def _reduce_19(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8428 - def _reduce_2(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8542 - def _reduce_20(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8548 - def _reduce_21(val, _values, result); end - - # reduce 210 omitted - # - # source://parser//lib/parser/ruby32.rb#9473 - def _reduce_211(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9479 - def _reduce_212(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9485 - def _reduce_213(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9494 - def _reduce_214(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9503 - def _reduce_215(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9512 - def _reduce_216(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9521 - def _reduce_217(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9529 - def _reduce_218(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9537 - def _reduce_219(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8556 - def _reduce_22(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9543 - def _reduce_220(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9549 - def _reduce_221(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9555 - def _reduce_222(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9561 - def _reduce_223(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9567 - def _reduce_224(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9573 - def _reduce_225(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9579 - def _reduce_226(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9585 - def _reduce_227(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9591 - def _reduce_228(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9597 - def _reduce_229(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8564 - def _reduce_23(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9603 - def _reduce_230(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9609 - def _reduce_231(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9615 - def _reduce_232(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9623 - def _reduce_233(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9629 - def _reduce_234(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9635 - def _reduce_235(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9641 - def _reduce_236(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9647 - def _reduce_237(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9653 - def _reduce_238(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8570 - def _reduce_24(val, _values, result); end - - # reduce 239 omitted - # - # source://parser//lib/parser/ruby32.rb#9661 - def _reduce_240(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9667 - def _reduce_241(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9673 - def _reduce_242(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9679 - def _reduce_243(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9685 - def _reduce_244(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9691 - def _reduce_245(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9697 - def _reduce_246(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9703 - def _reduce_247(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9709 - def _reduce_248(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9715 - def _reduce_249(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8576 - def _reduce_25(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9721 - def _reduce_250(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9727 - def _reduce_251(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9733 - def _reduce_252(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9740 - def _reduce_253(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9747 - def _reduce_254(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9761 - def _reduce_255(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9781 - def _reduce_256(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9795 - def _reduce_257(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8583 - def _reduce_26(val, _values, result); end - - # reduce 262 omitted - # - # source://parser//lib/parser/ruby32.rb#9825 - def _reduce_263(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9831 - def _reduce_264(val, _values, result); end - - # reduce 267 omitted - # - # source://parser//lib/parser/ruby32.rb#9843 - def _reduce_268(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9849 - def _reduce_269(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8590 - def _reduce_27(val, _values, result); end - - # reduce 270 omitted - # - # source://parser//lib/parser/ruby32.rb#9857 - def _reduce_271(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9867 - def _reduce_272(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9873 - def _reduce_273(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9883 - def _reduce_274(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9893 - def _reduce_275(val, _values, result); end - - # reduce 276 omitted - # - # source://parser//lib/parser/ruby32.rb#9901 - def _reduce_277(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8596 - def _reduce_28(val, _values, result); end - - # reduce 279 omitted - # - # source://parser//lib/parser/ruby32.rb#9911 - def _reduce_280(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9917 - def _reduce_281(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9923 - def _reduce_282(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9929 - def _reduce_283(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9935 - def _reduce_284(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9942 - def _reduce_285(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9950 - def _reduce_286(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9956 - def _reduce_287(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9983 - def _reduce_288(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10004 - def _reduce_289(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8602 - def _reduce_29(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10010 - def _reduce_290(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10020 - def _reduce_291(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10026 - def _reduce_292(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10032 - def _reduce_293(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10038 - def _reduce_294(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10044 - def _reduce_295(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10054 - def _reduce_296(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10060 - def _reduce_297(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10066 - def _reduce_298(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10076 - def _reduce_299(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8437 - def _reduce_3(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8612 - def _reduce_30(val, _values, result); end - - # reduce 300 omitted - # - # source://parser//lib/parser/ruby32.rb#10084 - def _reduce_301(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10090 - def _reduce_302(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10096 - def _reduce_303(val, _values, result); end - - # reduce 313 omitted - # - # source://parser//lib/parser/ruby32.rb#10122 - def _reduce_314(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10128 - def _reduce_315(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10134 - def _reduce_316(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10142 - def _reduce_317(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10148 - def _reduce_318(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10154 - def _reduce_319(val, _values, result); end - - # reduce 31 omitted - # - # source://parser//lib/parser/ruby32.rb#8620 - def _reduce_32(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10160 - def _reduce_320(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10166 - def _reduce_321(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10172 - def _reduce_322(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10178 - def _reduce_323(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10184 - def _reduce_324(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10190 - def _reduce_325(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10196 - def _reduce_326(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10202 - def _reduce_327(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10208 - def _reduce_328(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10214 - def _reduce_329(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8626 - def _reduce_33(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10220 - def _reduce_330(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10226 - def _reduce_331(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10234 - def _reduce_332(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10240 - def _reduce_333(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10246 - def _reduce_334(val, _values, result); end - - # reduce 335 omitted - # - # source://parser//lib/parser/ruby32.rb#10258 - def _reduce_336(val, _values, result); end - - # reduce 337 omitted - # - # source://parser//lib/parser/ruby32.rb#10268 - def _reduce_338(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10277 - def _reduce_339(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8633 - def _reduce_34(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10286 - def _reduce_340(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10292 - def _reduce_341(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10298 - def _reduce_342(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10308 - def _reduce_343(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10318 - def _reduce_344(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10328 - def _reduce_345(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10334 - def _reduce_346(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10341 - def _reduce_347(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10357 - def _reduce_348(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10365 - def _reduce_349(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8644 - def _reduce_35(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10377 - def _reduce_350(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10384 - def _reduce_351(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10398 - def _reduce_352(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10410 - def _reduce_353(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10422 - def _reduce_354(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10428 - def _reduce_355(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10434 - def _reduce_356(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10440 - def _reduce_357(val, _values, result); end - - # reduce 358 omitted - # - # source://parser//lib/parser/ruby32.rb#10448 - def _reduce_359(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10454 - def _reduce_360(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10460 - def _reduce_361(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10467 - def _reduce_362(val, _values, result); end - - # reduce 364 omitted - # - # source://parser//lib/parser/ruby32.rb#10479 - def _reduce_365(val, _values, result); end - - # reduce 368 omitted - # - # source://parser//lib/parser/ruby32.rb#10491 - def _reduce_369(val, _values, result); end - - # reduce 36 omitted - # - # source://parser//lib/parser/ruby32.rb#8652 - def _reduce_37(val, _values, result); end - - # reduce 370 omitted - # - # source://parser//lib/parser/ruby32.rb#10504 - def _reduce_371(val, _values, result); end - - # reduce 373 omitted - # - # source://parser//lib/parser/ruby32.rb#10514 - def _reduce_374(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10520 - def _reduce_375(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10526 - def _reduce_376(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10532 - def _reduce_377(val, _values, result); end - - # reduce 378 omitted - # - # source://parser//lib/parser/ruby32.rb#10540 - def _reduce_379(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8658 - def _reduce_38(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10547 - def _reduce_380(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10555 - def _reduce_381(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10561 - def _reduce_382(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10567 - def _reduce_383(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10573 - def _reduce_384(val, _values, result); end - - # reduce 386 omitted - # - # source://parser//lib/parser/ruby32.rb#10583 - def _reduce_387(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10589 - def _reduce_388(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10595 - def _reduce_389(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8664 - def _reduce_39(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10601 - def _reduce_390(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10607 - def _reduce_391(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10613 - def _reduce_392(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10619 - def _reduce_393(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10625 - def _reduce_394(val, _values, result); end - - # reduce 395 omitted - # - # source://parser//lib/parser/ruby32.rb#10633 - def _reduce_396(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10642 - def _reduce_397(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10652 - def _reduce_398(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10660 - def _reduce_399(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8443 - def _reduce_4(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8673 - def _reduce_40(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10669 - def _reduce_400(val, _values, result); end - - # reduce 401 omitted - # - # source://parser//lib/parser/ruby32.rb#10679 - def _reduce_402(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10688 - def _reduce_403(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10698 - def _reduce_404(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10706 - def _reduce_405(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10715 - def _reduce_406(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10722 - def _reduce_407(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10730 - def _reduce_408(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10737 - def _reduce_409(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8682 - def _reduce_41(val, _values, result); end - - # reduce 410 omitted - # - # source://parser//lib/parser/ruby32.rb#10747 - def _reduce_411(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10753 - def _reduce_412(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10759 - def _reduce_413(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10768 - def _reduce_414(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10777 - def _reduce_415(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10783 - def _reduce_416(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10789 - def _reduce_417(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10795 - def _reduce_418(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10801 - def _reduce_419(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8691 - def _reduce_42(val, _values, result); end - - # reduce 420 omitted - # - # source://parser//lib/parser/ruby32.rb#10810 - def _reduce_421(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10819 - def _reduce_422(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10825 - def _reduce_423(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10841 - def _reduce_424(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10849 - def _reduce_425(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10859 - def _reduce_426(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10866 - def _reduce_427(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10873 - def _reduce_428(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10880 - def _reduce_429(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8699 - def _reduce_43(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10887 - def _reduce_430(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10894 - def _reduce_431(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10901 - def _reduce_432(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10909 - def _reduce_433(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10917 - def _reduce_434(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10929 - def _reduce_435(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10940 - def _reduce_436(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10948 - def _reduce_437(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10956 - def _reduce_438(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10964 - def _reduce_439(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8708 - def _reduce_44(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10970 - def _reduce_440(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10978 - def _reduce_441(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10986 - def _reduce_442(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10994 - def _reduce_443(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11000 - def _reduce_444(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11006 - def _reduce_445(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11013 - def _reduce_446(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11020 - def _reduce_447(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11027 - def _reduce_448(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11034 - def _reduce_449(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8722 - def _reduce_45(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11041 - def _reduce_450(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11051 - def _reduce_451(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11058 - def _reduce_452(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11064 - def _reduce_453(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11075 - def _reduce_454(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11082 - def _reduce_455(val, _values, result); end - - # reduce 456 omitted - # - # source://parser//lib/parser/ruby32.rb#11090 - def _reduce_457(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11102 - def _reduce_458(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11110 - def _reduce_459(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8742 - def _reduce_46(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11117 - def _reduce_460(val, _values, result); end - - # reduce 461 omitted - # - # source://parser//lib/parser/ruby32.rb#11125 - def _reduce_462(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11131 - def _reduce_463(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11137 - def _reduce_464(val, _values, result); end - - # reduce 465 omitted - # - # source://parser//lib/parser/ruby32.rb#11145 - def _reduce_466(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11155 - def _reduce_467(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11161 - def _reduce_468(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11167 - def _reduce_469(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8756 - def _reduce_47(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11173 - def _reduce_470(val, _values, result); end - - # reduce 471 omitted - # - # source://parser//lib/parser/ruby32.rb#11181 - def _reduce_472(val, _values, result); end - - # reduce 473 omitted - # - # source://parser//lib/parser/ruby32.rb#11189 - def _reduce_474(val, _values, result); end - - # reduce 475 omitted - # - # source://parser//lib/parser/ruby32.rb#11197 - def _reduce_476(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11204 - def _reduce_477(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8776 - def _reduce_48(val, _values, result); end - - # reduce 479 omitted - # - # source://parser//lib/parser/ruby32.rb#11215 - def _reduce_480(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11223 - def _reduce_481(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11231 - def _reduce_482(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11239 - def _reduce_483(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11246 - def _reduce_484(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11254 - def _reduce_485(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11262 - def _reduce_486(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11270 - def _reduce_487(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11277 - def _reduce_488(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11283 - def _reduce_489(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11289 - def _reduce_490(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11295 - def _reduce_491(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11303 - def _reduce_492(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11311 - def _reduce_493(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11317 - def _reduce_494(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11323 - def _reduce_495(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11330 - def _reduce_496(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11336 - def _reduce_497(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11342 - def _reduce_498(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11348 - def _reduce_499(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8449 - def _reduce_5(val, _values, result); end - - # reduce 49 omitted - # - # source://parser//lib/parser/ruby32.rb#8784 - def _reduce_50(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11354 - def _reduce_500(val, _values, result); end - - # reduce 501 omitted - # - # source://parser//lib/parser/ruby32.rb#11362 - def _reduce_502(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11372 - def _reduce_503(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11382 - def _reduce_504(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11388 - def _reduce_505(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11394 - def _reduce_506(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11400 - def _reduce_507(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11406 - def _reduce_508(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11412 - def _reduce_509(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11418 - def _reduce_510(val, _values, result); end - - # reduce 511 omitted - # - # source://parser//lib/parser/ruby32.rb#11426 - def _reduce_512(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11432 - def _reduce_513(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11438 - def _reduce_514(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11444 - def _reduce_515(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11450 - def _reduce_516(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11456 - def _reduce_517(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11462 - def _reduce_518(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11468 - def _reduce_519(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11474 - def _reduce_520(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11480 - def _reduce_521(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11486 - def _reduce_522(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11492 - def _reduce_523(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11498 - def _reduce_524(val, _values, result); end - - # reduce 525 omitted - # - # source://parser//lib/parser/ruby32.rb#11506 - def _reduce_526(val, _values, result); end - - # reduce 527 omitted - # - # source://parser//lib/parser/ruby32.rb#11514 - def _reduce_528(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11520 - def _reduce_529(val, _values, result); end - - # reduce 52 omitted - # - # source://parser//lib/parser/ruby32.rb#8798 - def _reduce_53(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11526 - def _reduce_530(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11532 - def _reduce_531(val, _values, result); end - - # reduce 534 omitted - # - # source://parser//lib/parser/ruby32.rb#11544 - def _reduce_535(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11550 - def _reduce_536(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8804 - def _reduce_54(val, _values, result); end - - # reduce 544 omitted - # - # source://parser//lib/parser/ruby32.rb#11572 - def _reduce_545(val, _values, result); end - - # reduce 546 omitted - # - # source://parser//lib/parser/ruby32.rb#11580 - def _reduce_547(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11586 - def _reduce_548(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11598 - def _reduce_549(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8810 - def _reduce_55(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11605 - def _reduce_550(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11612 - def _reduce_551(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11618 - def _reduce_552(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11624 - def _reduce_553(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11630 - def _reduce_554(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11645 - def _reduce_555(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11651 - def _reduce_556(val, _values, result); end - - # reduce 558 omitted - # - # source://parser//lib/parser/ruby32.rb#11661 - def _reduce_559(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8816 - def _reduce_56(val, _values, result); end - - # reduce 560 omitted - # - # source://parser//lib/parser/ruby32.rb#11669 - def _reduce_561(val, _values, result); end - - # reduce 564 omitted - # - # source://parser//lib/parser/ruby32.rb#11681 - def _reduce_565(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11687 - def _reduce_566(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11693 - def _reduce_567(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11699 - def _reduce_568(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11706 - def _reduce_569(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8822 - def _reduce_57(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11713 - def _reduce_570(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11719 - def _reduce_571(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11726 - def _reduce_572(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11733 - def _reduce_573(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11739 - def _reduce_574(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11745 - def _reduce_575(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11751 - def _reduce_576(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11757 - def _reduce_577(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11763 - def _reduce_578(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11769 - def _reduce_579(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8834 - def _reduce_58(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11775 - def _reduce_580(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11781 - def _reduce_581(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11787 - def _reduce_582(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11793 - def _reduce_583(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11799 - def _reduce_584(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11805 - def _reduce_585(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11811 - def _reduce_586(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11817 - def _reduce_587(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11823 - def _reduce_588(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11829 - def _reduce_589(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8843 - def _reduce_59(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11835 - def _reduce_590(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11841 - def _reduce_591(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11847 - def _reduce_592(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11853 - def _reduce_593(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11859 - def _reduce_594(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11865 - def _reduce_595(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11872 - def _reduce_596(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11881 - def _reduce_597(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11887 - def _reduce_598(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11893 - def _reduce_599(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8455 - def _reduce_6(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8855 - def _reduce_60(val, _values, result); end - - # reduce 602 omitted - # - # source://parser//lib/parser/ruby32.rb#11905 - def _reduce_603(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11912 - def _reduce_604(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11919 - def _reduce_605(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11925 - def _reduce_606(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11936 - def _reduce_607(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11943 - def _reduce_608(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11950 - def _reduce_609(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11957 - def _reduce_610(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11964 - def _reduce_611(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11970 - def _reduce_612(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11976 - def _reduce_613(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11982 - def _reduce_614(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11988 - def _reduce_615(val, _values, result); end - - # reduce 616 omitted - # - # source://parser//lib/parser/ruby32.rb#11996 - def _reduce_617(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12002 - def _reduce_618(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12008 - def _reduce_619(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12014 - def _reduce_620(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12020 - def _reduce_621(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12026 - def _reduce_622(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12032 - def _reduce_623(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12038 - def _reduce_624(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12044 - def _reduce_625(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12050 - def _reduce_626(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12056 - def _reduce_627(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12062 - def _reduce_628(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12068 - def _reduce_629(val, _values, result); end - - # reduce 62 omitted - # - # source://parser//lib/parser/ruby32.rb#8868 - def _reduce_63(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12074 - def _reduce_630(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12080 - def _reduce_631(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12086 - def _reduce_632(val, _values, result); end - - # reduce 633 omitted - # - # source://parser//lib/parser/ruby32.rb#12094 - def _reduce_634(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12101 - def _reduce_635(val, _values, result); end - - # reduce 636 omitted - # - # source://parser//lib/parser/ruby32.rb#12112 - def _reduce_637(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12120 - def _reduce_638(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12128 - def _reduce_639(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8874 - def _reduce_64(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12134 - def _reduce_640(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12140 - def _reduce_641(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12146 - def _reduce_642(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12152 - def _reduce_643(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12159 - def _reduce_644(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12165 - def _reduce_645(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12171 - def _reduce_646(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12180 - def _reduce_647(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12190 - def _reduce_648(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12198 - def _reduce_649(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8881 - def _reduce_65(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12207 - def _reduce_650(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12215 - def _reduce_651(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12224 - def _reduce_652(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12231 - def _reduce_653(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12239 - def _reduce_654(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12248 - def _reduce_655(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12255 - def _reduce_656(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12263 - def _reduce_657(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12270 - def _reduce_658(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12278 - def _reduce_659(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8891 - def _reduce_66(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12284 - def _reduce_660(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12290 - def _reduce_661(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12296 - def _reduce_662(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12302 - def _reduce_663(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12308 - def _reduce_664(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12314 - def _reduce_665(val, _values, result); end - - # reduce 666 omitted - # - # source://parser//lib/parser/ruby32.rb#12322 - def _reduce_667(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12332 - def _reduce_668(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12339 - def _reduce_669(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8897 - def _reduce_67(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12346 - def _reduce_670(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12352 - def _reduce_671(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12358 - def _reduce_672(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12364 - def _reduce_673(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12379 - def _reduce_674(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12387 - def _reduce_675(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12395 - def _reduce_676(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12402 - def _reduce_677(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12409 - def _reduce_678(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12415 - def _reduce_679(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8904 - def _reduce_68(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12421 - def _reduce_680(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12427 - def _reduce_681(val, _values, result); end - - # reduce 683 omitted - # - # source://parser//lib/parser/ruby32.rb#12437 - def _reduce_684(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12443 - def _reduce_685(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12451 - def _reduce_686(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12459 - def _reduce_687(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12467 - def _reduce_688(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12475 - def _reduce_689(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12481 - def _reduce_690(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12487 - def _reduce_691(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12493 - def _reduce_692(val, _values, result); end - - # reduce 694 omitted - # - # source://parser//lib/parser/ruby32.rb#12503 - def _reduce_695(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12511 - def _reduce_696(val, _values, result); end - - # reduce 698 omitted - # - # source://parser//lib/parser/ruby32.rb#12523 - def _reduce_699(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8461 - def _reduce_7(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12531 - def _reduce_700(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12539 - def _reduce_701(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12545 - def _reduce_702(val, _values, result); end - - # reduce 703 omitted - # - # source://parser//lib/parser/ruby32.rb#12553 - def _reduce_704(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12559 - def _reduce_705(val, _values, result); end - - # reduce 706 omitted - # - # source://parser//lib/parser/ruby32.rb#12567 - def _reduce_707(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12573 - def _reduce_708(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12579 - def _reduce_709(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12585 - def _reduce_710(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12591 - def _reduce_711(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12597 - def _reduce_712(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12603 - def _reduce_713(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12609 - def _reduce_714(val, _values, result); end - - # reduce 71 omitted - # - # source://parser//lib/parser/ruby32.rb#8916 - def _reduce_72(val, _values, result); end - - # reduce 724 omitted - # - # source://parser//lib/parser/ruby32.rb#12639 - def _reduce_725(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12645 - def _reduce_726(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8923 - def _reduce_73(val, _values, result); end - - # reduce 730 omitted - # - # source://parser//lib/parser/ruby32.rb#12659 - def _reduce_731(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12665 - def _reduce_732(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12671 - def _reduce_733(val, _values, result); end - - # reduce 735 omitted - # - # source://parser//lib/parser/ruby32.rb#12681 - def _reduce_736(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8930 - def _reduce_74(val, _values, result); end - - # reduce 739 omitted - # - # source://parser//lib/parser/ruby32.rb#12693 - def _reduce_740(val, _values, result); end - - # reduce 75 omitted - # - # source://parser//lib/parser/ruby32.rb#8939 - def _reduce_76(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8946 - def _reduce_77(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8957 - def _reduce_78(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8964 - def _reduce_79(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8975 - def _reduce_80(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8982 - def _reduce_81(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8993 - def _reduce_82(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9000 - def _reduce_83(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9007 - def _reduce_84(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9014 - def _reduce_85(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9021 - def _reduce_86(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9028 - def _reduce_87(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9034 - def _reduce_88(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9040 - def _reduce_89(val, _values, result); end - - # reduce 8 omitted - # - # source://parser//lib/parser/ruby32.rb#8469 - def _reduce_9(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9046 - def _reduce_90(val, _values, result); end - - # reduce 91 omitted - # - # source://parser//lib/parser/ruby32.rb#9054 - def _reduce_92(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9061 - def _reduce_93(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9068 - def _reduce_94(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9076 - def _reduce_95(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9083 - def _reduce_96(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9091 - def _reduce_97(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9097 - def _reduce_98(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9104 - def _reduce_99(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12699 - def _reduce_none(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#21 - def default_encoding; end - - # source://parser//lib/parser/ruby32.rb#25 - def endless_method_name(name_t); end - - # source://parser//lib/parser/ruby32.rb#38 - def local_pop; end - - # source://parser//lib/parser/ruby32.rb#31 - def local_push; end - - # source://parser//lib/parser/ruby32.rb#45 - def try_declare_numparam(node); end - - # source://parser//lib/parser/ruby32.rb#17 - def version; end -end - -# source://parser//lib/parser/ruby32.rb#8008 -Parser::Ruby32::Racc_arg = T.let(T.unsafe(nil), Array) - -# source://parser//lib/parser/ruby32.rb#8415 -Parser::Ruby32::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) - -# source://parser//lib/parser/ruby32.rb#8025 -Parser::Ruby32::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) - -# @api public -# -# source://parser//lib/parser.rb#30 -module Parser::Source; end - -# A buffer with source code. {Buffer} contains the source code itself, -# associated location information (name and first line), and takes care -# of encoding. -# -# A source buffer is immutable once populated. -# -# @api public -# -# source://parser//lib/parser/source/buffer.rb#25 -class Parser::Source::Buffer - # @api public - # @return [Buffer] a new instance of Buffer - # - # source://parser//lib/parser/source/buffer.rb#110 - def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end - - # Convert a character index into the source to a column number. - # - # @api private - # @param position [Integer] - # @return [Integer] column - # - # source://parser//lib/parser/source/buffer.rb#247 - def column_for_position(position); end - - # Convert a character index into the source to a `[line, column]` tuple. - # - # @api public - # @param position [Integer] - # @return [[Integer, Integer]] `[line, column]` - # - # source://parser//lib/parser/source/buffer.rb#222 - def decompose_position(position); end - - # First line of the buffer, 1 by default. - # - # @api public - # @return [Integer] first line - # - # source://parser//lib/parser/source/buffer.rb#26 - def first_line; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#317 - def freeze; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#323 - def inspect; end - - # Number of last line in the buffer - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/buffer.rb#312 - def last_line; end - - # Convert a character index into the source to a line number. - # - # @api private - # @param position [Integer] - # @return [Integer] line - # - # source://parser//lib/parser/source/buffer.rb#236 - def line_for_position(position); end - - # Extract line `lineno` as a new `Range`, taking `first_line` into account. - # - # @api public - # @param lineno [Integer] - # @raise [IndexError] if `lineno` is out of bounds - # @return [Range] - # - # source://parser//lib/parser/source/buffer.rb#289 - def line_range(lineno); end - - # Buffer name. If the buffer was created from a file, the name corresponds - # to relative path to the file. - # - # @api public - # @return [String] buffer name - # - # source://parser//lib/parser/source/buffer.rb#26 - def name; end - - # Populate this buffer from a string without encoding autodetection. - # - # @api public - # @param input [String] - # @raise [ArgumentError] if already populated - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#185 - def raw_source=(input); end - - # Populate this buffer from correspondingly named file. - # - # @api public - # @example - # Parser::Source::Buffer.new('foo/bar.rb').read - # @raise [ArgumentError] if already populated - # @return [Buffer] self - # - # source://parser//lib/parser/source/buffer.rb#136 - def read; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#199 - def slice(start, length = T.unsafe(nil)); end - - # Source code contained in this buffer. - # - # @api public - # @raise [RuntimeError] if buffer is not populated yet - # @return [String] source code - # - # source://parser//lib/parser/source/buffer.rb#150 - def source; end - - # Populate this buffer from a string with encoding autodetection. - # `input` is mutated if not frozen. - # - # @api public - # @param input [String] - # @raise [ArgumentError] if already populated - # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#167 - def source=(input); end - - # Extract line `lineno` from source, taking `first_line` into account. - # - # @api public - # @param lineno [Integer] - # @raise [IndexError] if `lineno` is out of bounds - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#278 - def source_line(lineno); end - - # Return an `Array` of source code lines. - # - # @api public - # @return [Array] - # - # source://parser//lib/parser/source/buffer.rb#257 - def source_lines; end - - # @api public - # @return [Range] A range covering the whole source - # - # source://parser//lib/parser/source/buffer.rb#303 - def source_range; end - - private - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#353 - def bsearch(line_begins, position); end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#330 - def line_begins; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#344 - def line_index_for_position(position); end - - class << self - # Try to recognize encoding of `string` as Ruby would, i.e. by looking for - # magic encoding comment or UTF-8 BOM. `string` can be in any encoding. - # - # @api public - # @param string [String] - # @raise [Parser::UnknownEncodingInMagicComment] if the encoding is not recognized - # @return [String, nil] encoding name, if recognized - # - # source://parser//lib/parser/source/buffer.rb#52 - def recognize_encoding(string); end - - # Recognize encoding of `input` and process it so it could be lexed. - # - # * If `input` does not contain BOM or magic encoding comment, it is - # kept in the original encoding. - # * If the detected encoding is binary, `input` is kept in binary. - # * Otherwise, `input` is re-encoded into UTF-8 and returned as a - # new string. - # - # This method mutates the encoding of `input`, but not its content. - # - # @api public - # @param input [String] - # @raise [EncodingError] - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#95 - def reencode_string(input); end - end -end - -# @api private -# -# source://parser//lib/parser/source/buffer.rb#31 -Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) - -# A comment in the source code. -# -# @api public -# -# source://parser//lib/parser/source/comment.rb#17 -class Parser::Source::Comment - # @api public - # @param range [Parser::Source::Range] - # @return [Comment] a new instance of Comment - # - # source://parser//lib/parser/source/comment.rb#67 - def initialize(range); end - - # Compares comments. Two comments are equal if they - # correspond to the same source range. - # - # @api public - # @param other [Object] - # @return [Boolean] - # - # source://parser//lib/parser/source/comment.rb#120 - def ==(other); end - - # @api public - # @return [Boolean] true if this is a block comment. - # @see #type - # - # source://parser//lib/parser/source/comment.rb#109 - def document?; end - - # @api public - # @return [Boolean] true if this is an inline comment. - # @see #type - # - # source://parser//lib/parser/source/comment.rb#101 - def inline?; end - - # @api public - # @return [String] a human-readable representation of this comment - # - # source://parser//lib/parser/source/comment.rb#128 - def inspect; end - - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/source/comment.rb#20 - def loc; end - - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/source/comment.rb#20 - def location; end - - # @api public - # @return [String] - # - # source://parser//lib/parser/source/comment.rb#18 - def text; end - - # Type of this comment. - # - # * Inline comments correspond to `:inline`: - # - # # whatever - # - # * Block comments correspond to `:document`: - # - # =begin - # hi i am a document - # =end - # - # @api public - # @return [Symbol] - # - # source://parser//lib/parser/source/comment.rb#89 - def type; end - - class << self - # Associate `comments` with `ast` nodes by their corresponding node. - # - # @api public - # @deprecated Use {associate_locations}. - # @param ast [Parser::AST::Node] - # @param comments [Array] - # @return [Hash>] - # @see Parser::Source::Comment::Associator#associate - # - # source://parser//lib/parser/source/comment.rb#32 - def associate(ast, comments); end - - # Associate `comments` with `ast` nodes using identity. - # - # @api public - # @param ast [Parser::AST::Node] - # @param comments [Array] - # @return [Hash>] - # @see Parser::Source::Comment::Associator#associate_by_identity - # - # source://parser//lib/parser/source/comment.rb#59 - def associate_by_identity(ast, comments); end - - # Associate `comments` with `ast` nodes by their location in the - # source. - # - # @api public - # @param ast [Parser::AST::Node] - # @param comments [Array] - # @return [Hash>] - # @see Parser::Source::Comment::Associator#associate_locations - # - # source://parser//lib/parser/source/comment.rb#46 - def associate_locations(ast, comments); end - end -end - -# source://parser//lib/parser/source/comment/associator.rb#45 -class Parser::Source::Comment::Associator - # source://parser//lib/parser/source/comment/associator.rb#51 - def initialize(ast, comments); end - - # source://parser//lib/parser/source/comment/associator.rb#92 - def associate; end - - # source://parser//lib/parser/source/comment/associator.rb#115 - def associate_by_identity; end - - # source://parser//lib/parser/source/comment/associator.rb#104 - def associate_locations; end - - # source://parser//lib/parser/source/comment/associator.rb#46 - def skip_directives; end - - # source://parser//lib/parser/source/comment/associator.rb#46 - def skip_directives=(_arg0); end - - private - - # source://parser//lib/parser/source/comment/associator.rb#182 - def advance_comment; end - - # source://parser//lib/parser/source/comment/associator.rb#214 - def advance_through_directives; end - - # source://parser//lib/parser/source/comment/associator.rb#206 - def associate_and_advance_comment(node); end - - # source://parser//lib/parser/source/comment/associator.rb#123 - def children_in_source_order(node); end - - # source://parser//lib/parser/source/comment/associator.rb#187 - def current_comment_before?(node); end - - # source://parser//lib/parser/source/comment/associator.rb#194 - def current_comment_before_end?(node); end - - # source://parser//lib/parser/source/comment/associator.rb#201 - def current_comment_decorates?(node); end - - # source://parser//lib/parser/source/comment/associator.rb#135 - def do_associate; end - - # source://parser//lib/parser/source/comment/associator.rb#166 - def process_leading_comments(node); end - - # source://parser//lib/parser/source/comment/associator.rb#173 - def process_trailing_comments(node); end - - # source://parser//lib/parser/source/comment/associator.rb#148 - def visit(node); end -end - -# source://parser//lib/parser/source/comment/associator.rb#212 -Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp) - -# source://parser//lib/parser/source/comment/associator.rb#122 -Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set) - -# {Map} relates AST nodes to the source code they were parsed from. -# More specifically, a {Map} or its subclass contains a set of ranges: -# -# * `expression`: smallest range which includes all source corresponding -# to the node and all `expression` ranges of its children. -# * other ranges (`begin`, `end`, `operator`, ...): node-specific ranges -# pointing to various interesting tokens corresponding to the node. -# -# Note that the {Map::Heredoc} map is the only one whose `expression` does -# not include other ranges. It only covers the heredoc marker (`< 2]').children[0].loc -# # => > -# -# The {file:doc/AST_FORMAT.md} document describes how ranges associated to source -# code tokens. For example, the entry -# -# (array (int 1) (int 2)) -# -# "[1, 2]" -# ^ begin -# ^ end -# ~~~~~~ expression -# -# means that if `node` is an {Parser::AST::Node} `(array (int 1) (int 2))`, -# then `node.loc` responds to `begin`, `end` and `expression`, and -# `node.loc.begin` returns a range pointing at the opening bracket, and so on. -# -# If you want to write code polymorphic by the source map (i.e. accepting -# several subclasses of {Map}), use `respond_to?` instead of `is_a?` to -# check whether the map features the range you need. Concrete {Map} -# subclasses may not be preserved between versions, but their interfaces -# will be kept compatible. -# -# You can visualize the source maps with `ruby-parse -E` command-line tool. -# -# @api public -# @example -# require 'parser/current' -# -# p Parser::CurrentRuby.parse('[1, 2]').loc -# # => #, -# # @begin=#, -# # @expression=#> -# -# source://parser//lib/parser/source/map.rb#70 -class Parser::Source::Map - # @api public - # @param expression [Range] - # @return [Map] a new instance of Map - # - # source://parser//lib/parser/source/map.rb#76 - def initialize(expression); end - - # Compares source maps. - # - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/map.rb#140 - def ==(other); end - - # A shortcut for `self.expression.column`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#109 - def column; end - - # @api public - # @return [Range] - # - # source://parser//lib/parser/source/map.rb#72 - def expression; end - - # A shortcut for `self.expression.line`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#99 - def first_line; end - - # A shortcut for `self.expression.last_column`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#125 - def last_column; end - - # A shortcut for `self.expression.last_line`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#117 - def last_line; end - - # A shortcut for `self.expression.line`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#99 - def line; end - - # The node that is described by this map. Nodes and maps have 1:1 correspondence. - # - # @api public - # @return [Parser::AST::Node] - # - # source://parser//lib/parser/source/map.rb#71 - def node; end - - # @api private - # - # source://parser//lib/parser/source/map.rb#89 - def node=(node); end - - # Converts this source map to a hash with keys corresponding to - # ranges. For example, if called on an instance of {Collection}, - # which adds the `begin` and `end` ranges, the resulting hash - # will contain keys `:expression`, `:begin` and `:end`. - # - # @api public - # @example - # require 'parser/current' - # - # p Parser::CurrentRuby.parse('[1, 2]').loc.to_hash - # # => { - # # :begin => #, - # # :end => #, - # # :expression => # - # # } - # @return [Hash] - # - # source://parser//lib/parser/source/map.rb#166 - def to_hash; end - - # @api private - # - # source://parser//lib/parser/source/map.rb#132 - def with_expression(expression_l); end - - protected - - # @api public - # - # source://parser//lib/parser/source/map.rb#180 - def update_expression(expression_l); end - - # @api public - # - # source://parser//lib/parser/source/map.rb#176 - def with(&block); end - - private - - # @api private - # - # source://parser//lib/parser/source/map.rb#82 - def initialize_copy(other); end -end - -# source://parser//lib/parser/source/map/collection.rb#6 -class Parser::Source::Map::Collection < ::Parser::Source::Map - # source://parser//lib/parser/source/map/collection.rb#10 - def initialize(begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/collection.rb#7 - def begin; end - - # source://parser//lib/parser/source/map/collection.rb#8 - def end; end -end - -# source://parser//lib/parser/source/map/condition.rb#6 -class Parser::Source::Map::Condition < ::Parser::Source::Map - # source://parser//lib/parser/source/map/condition.rb#12 - def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/condition.rb#8 - def begin; end - - # source://parser//lib/parser/source/map/condition.rb#9 - def else; end - - # source://parser//lib/parser/source/map/condition.rb#10 - def end; end - - # source://parser//lib/parser/source/map/condition.rb#7 - def keyword; end -end - -# source://parser//lib/parser/source/map/constant.rb#6 -class Parser::Source::Map::Constant < ::Parser::Source::Map - # source://parser//lib/parser/source/map/constant.rb#11 - def initialize(double_colon, name, expression); end - - # source://parser//lib/parser/source/map/constant.rb#7 - def double_colon; end - - # source://parser//lib/parser/source/map/constant.rb#8 - def name; end - - # source://parser//lib/parser/source/map/constant.rb#9 - def operator; end - - # source://parser//lib/parser/source/map/constant.rb#20 - def with_operator(operator_l); end - - protected - - # source://parser//lib/parser/source/map/constant.rb#26 - def update_operator(operator_l); end -end - -# source://parser//lib/parser/source/map/definition.rb#6 -class Parser::Source::Map::Definition < ::Parser::Source::Map - # source://parser//lib/parser/source/map/definition.rb#12 - def initialize(keyword_l, operator_l, name_l, end_l); end - - # source://parser//lib/parser/source/map/definition.rb#10 - def end; end - - # source://parser//lib/parser/source/map/definition.rb#7 - def keyword; end - - # source://parser//lib/parser/source/map/definition.rb#9 - def name; end - - # source://parser//lib/parser/source/map/definition.rb#8 - def operator; end -end - -# source://parser//lib/parser/source/map/for.rb#6 -class Parser::Source::Map::For < ::Parser::Source::Map - # source://parser//lib/parser/source/map/for.rb#10 - def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/for.rb#8 - def begin; end - - # source://parser//lib/parser/source/map/for.rb#8 - def end; end - - # source://parser//lib/parser/source/map/for.rb#7 - def in; end - - # source://parser//lib/parser/source/map/for.rb#7 - def keyword; end -end - -# source://parser//lib/parser/source/map/heredoc.rb#6 -class Parser::Source::Map::Heredoc < ::Parser::Source::Map - # source://parser//lib/parser/source/map/heredoc.rb#10 - def initialize(begin_l, body_l, end_l); end - - # source://parser//lib/parser/source/map/heredoc.rb#7 - def heredoc_body; end - - # source://parser//lib/parser/source/map/heredoc.rb#8 - def heredoc_end; end -end - -# source://parser//lib/parser/source/map/index.rb#6 -class Parser::Source::Map::Index < ::Parser::Source::Map - # source://parser//lib/parser/source/map/index.rb#11 - def initialize(begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/index.rb#7 - def begin; end - - # source://parser//lib/parser/source/map/index.rb#8 - def end; end - - # source://parser//lib/parser/source/map/index.rb#9 - def operator; end - - # source://parser//lib/parser/source/map/index.rb#21 - def with_operator(operator_l); end - - protected - - # source://parser//lib/parser/source/map/index.rb#27 - def update_operator(operator_l); end -end - -# source://parser//lib/parser/source/map/keyword.rb#6 -class Parser::Source::Map::Keyword < ::Parser::Source::Map - # source://parser//lib/parser/source/map/keyword.rb#11 - def initialize(keyword_l, begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/keyword.rb#8 - def begin; end - - # source://parser//lib/parser/source/map/keyword.rb#9 - def end; end - - # source://parser//lib/parser/source/map/keyword.rb#7 - def keyword; end -end - -# source://parser//lib/parser/source/map/method_definition.rb#6 -class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map - # source://parser//lib/parser/source/map/method_definition.rb#13 - def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end - - # source://parser//lib/parser/source/map/method_definition.rb#11 - def assignment; end - - # source://parser//lib/parser/source/map/method_definition.rb#10 - def end; end - - # source://parser//lib/parser/source/map/method_definition.rb#7 - def keyword; end - - # source://parser//lib/parser/source/map/method_definition.rb#9 - def name; end - - # source://parser//lib/parser/source/map/method_definition.rb#8 - def operator; end -end - -# source://parser//lib/parser/source/map/objc_kwarg.rb#6 -class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map - # source://parser//lib/parser/source/map/objc_kwarg.rb#11 - def initialize(keyword_l, operator_l, argument_l, expression_l); end - - # source://parser//lib/parser/source/map/objc_kwarg.rb#9 - def argument; end - - # source://parser//lib/parser/source/map/objc_kwarg.rb#7 - def keyword; end - - # source://parser//lib/parser/source/map/objc_kwarg.rb#8 - def operator; end -end - -# source://parser//lib/parser/source/map/operator.rb#6 -class Parser::Source::Map::Operator < ::Parser::Source::Map - # source://parser//lib/parser/source/map/operator.rb#9 - def initialize(operator, expression); end - - # source://parser//lib/parser/source/map/operator.rb#7 - def operator; end -end - -# source://parser//lib/parser/source/map/rescue_body.rb#6 -class Parser::Source::Map::RescueBody < ::Parser::Source::Map - # source://parser//lib/parser/source/map/rescue_body.rb#11 - def initialize(keyword_l, assoc_l, begin_l, expression_l); end - - # source://parser//lib/parser/source/map/rescue_body.rb#8 - def assoc; end - - # source://parser//lib/parser/source/map/rescue_body.rb#9 - def begin; end - - # source://parser//lib/parser/source/map/rescue_body.rb#7 - def keyword; end -end - -# source://parser//lib/parser/source/map/send.rb#6 -class Parser::Source::Map::Send < ::Parser::Source::Map - # source://parser//lib/parser/source/map/send.rb#13 - def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/send.rb#10 - def begin; end - - # source://parser//lib/parser/source/map/send.rb#7 - def dot; end - - # source://parser//lib/parser/source/map/send.rb#11 - def end; end - - # source://parser//lib/parser/source/map/send.rb#9 - def operator; end - - # source://parser//lib/parser/source/map/send.rb#8 - def selector; end - - # source://parser//lib/parser/source/map/send.rb#24 - def with_operator(operator_l); end - - protected - - # source://parser//lib/parser/source/map/send.rb#30 - def update_operator(operator_l); end -end - -# source://parser//lib/parser/source/map/ternary.rb#6 -class Parser::Source::Map::Ternary < ::Parser::Source::Map - # source://parser//lib/parser/source/map/ternary.rb#10 - def initialize(question_l, colon_l, expression_l); end - - # source://parser//lib/parser/source/map/ternary.rb#8 - def colon; end - - # source://parser//lib/parser/source/map/ternary.rb#7 - def question; end -end - -# source://parser//lib/parser/source/map/variable.rb#6 -class Parser::Source::Map::Variable < ::Parser::Source::Map - # source://parser//lib/parser/source/map/variable.rb#10 - def initialize(name_l, expression_l = T.unsafe(nil)); end - - # source://parser//lib/parser/source/map/variable.rb#7 - def name; end - - # source://parser//lib/parser/source/map/variable.rb#8 - def operator; end - - # source://parser//lib/parser/source/map/variable.rb#19 - def with_operator(operator_l); end - - protected - - # source://parser//lib/parser/source/map/variable.rb#25 - def update_operator(operator_l); end -end - -# A range of characters in a particular source buffer. -# -# The range is always exclusive, i.e. a range with `begin_pos` of 3 and -# `end_pos` of 5 will contain the following characters: -# -# example -# ^^ -# -# @api public -# -# source://parser//lib/parser/source/range.rb#26 -class Parser::Source::Range - include ::Comparable - - # @api public - # @param source_buffer [Buffer] - # @param begin_pos [Integer] - # @param end_pos [Integer] - # @return [Range] a new instance of Range - # - # source://parser//lib/parser/source/range.rb#37 - def initialize(source_buffer, begin_pos, end_pos); end - - # Compare ranges, first by begin_pos, then by end_pos. - # - # @api public - # - # source://parser//lib/parser/source/range.rb#301 - def <=>(other); end - - # by the given amount(s) - # - # @api public - # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos - # @return [Range] the same range as this range but with the given end point(s) adjusted - # - # source://parser//lib/parser/source/range.rb#193 - def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end - - # @api public - # @return [Range] a zero-length range located just before the beginning - # of this range. - # - # source://parser//lib/parser/source/range.rb#55 - def begin; end - - # @api public - # @return [Integer] index of the first character in the range - # - # source://parser//lib/parser/source/range.rb#30 - def begin_pos; end - - # @api public - # @return [Integer] zero-based column number of the beginning of this range. - # - # source://parser//lib/parser/source/range.rb#92 - def column; end - - # @api public - # @raise RangeError - # @return [::Range] a range of columns spanned by this range. - # - # source://parser//lib/parser/source/range.rb#114 - def column_range; end - - # Return `other.contains?(self)` - # - # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? - # - # @api public - # @param other [Range] - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#274 - def contained?(other); end - - # Returns true iff this range contains (strictly) `other`. - # - # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? - # - # @api public - # @param other [Range] - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#262 - def contains?(other); end - - # Returns true iff both ranges intersect and also have different elements from one another. - # - # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? - # - # @api public - # @param other [Range] - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#286 - def crossing?(other); end - - # Return `true` iff this range and `other` are disjoint. - # - # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? - # - # @api public - # @param other [Range] - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#236 - def disjoint?(other); end - - # Checks if a range is empty; if it contains no characters - # - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#294 - def empty?; end - - # @api public - # @return [Range] a zero-length range located just after the end - # of this range. - # - # source://parser//lib/parser/source/range.rb#63 - def end; end - - # @api public - # @return [Integer] index of the character after the last character in the range - # - # source://parser//lib/parser/source/range.rb#30 - def end_pos; end - - # @api public - def eql?(_arg0); end - - # Line number of the beginning of this range. By default, the first line - # of a buffer is 1; as such, line numbers are most commonly one-based. - # - # @api public - # @return [Integer] line number of the beginning of this range. - # @see Buffer - # - # source://parser//lib/parser/source/range.rb#83 - def first_line; end - - # Support for Ranges be used in as Hash indices and in Sets. - # - # @api public - # - # source://parser//lib/parser/source/range.rb#313 - def hash; end - - # @api public - # @return [String] a human-readable representation of this range. - # - # source://parser//lib/parser/source/range.rb#320 - def inspect; end - - # @api public - # @param other [Range] - # @return [Range] overlapping region of this range and `other`, or `nil` - # if they do not overlap - # - # source://parser//lib/parser/source/range.rb#220 - def intersect(other); end - - # `is?` provides a concise way to compare the source corresponding to this range. - # For example, `r.source == '(' || r.source == 'begin'` is equivalent to - # `r.is?('(', 'begin')`. - # - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#141 - def is?(*what); end - - # @api public - # @param other [Range] - # @return [Range] smallest possible range spanning both this range and `other`. - # - # source://parser//lib/parser/source/range.rb#209 - def join(other); end - - # @api public - # @return [Integer] zero-based column number of the end of this range. - # - # source://parser//lib/parser/source/range.rb#106 - def last_column; end - - # @api public - # @return [Integer] line number of the end of this range. - # - # source://parser//lib/parser/source/range.rb#99 - def last_line; end - - # @api public - # @return [Integer] amount of characters included in this range. - # - # source://parser//lib/parser/source/range.rb#70 - def length; end - - # Line number of the beginning of this range. By default, the first line - # of a buffer is 1; as such, line numbers are most commonly one-based. - # - # @api public - # @return [Integer] line number of the beginning of this range. - # @see Buffer - # - # source://parser//lib/parser/source/range.rb#83 - def line; end - - # Return `true` iff this range is not disjoint from `other`. - # - # @api public - # @param other [Range] - # @return [Boolean] `true` if this range and `other` overlap - # - # source://parser//lib/parser/source/range.rb#250 - def overlaps?(other); end - - # @api public - # @param new_size [Integer] - # @return [Range] a range beginning at the same point as this range and length `new_size`. - # - # source://parser//lib/parser/source/range.rb#201 - def resize(new_size); end - - # @api public - # @return [Integer] amount of characters included in this range. - # - # source://parser//lib/parser/source/range.rb#70 - def size; end - - # @api public - # @return [String] all source code covered by this range. - # - # source://parser//lib/parser/source/range.rb#132 - def source; end - - # @api public - # @return [Parser::Source::Buffer] - # - # source://parser//lib/parser/source/range.rb#29 - def source_buffer; end - - # @api public - # @return [String] a line of source code containing the beginning of this range. - # - # source://parser//lib/parser/source/range.rb#125 - def source_line; end - - # @api public - # @return [Array] a set of character indexes contained in this range. - # - # source://parser//lib/parser/source/range.rb#148 - def to_a; end - - # @api public - # @return [Range] a Ruby range with the same `begin_pos` and `end_pos` - # - # source://parser//lib/parser/source/range.rb#155 - def to_range; end - - # Composes a GNU/Clang-style string representation of the beginning of this - # range. - # - # For example, for the following range in file `foo.rb`, - # - # def foo - # ^^^ - # - # `to_s` will return `foo.rb:1:5`. - # Note that the column index is one-based. - # - # @api public - # @return [String] - # - # source://parser//lib/parser/source/range.rb#173 - def to_s; end - - # to the given value(s). - # - # @api public - # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos - # @return [Range] the same range as this range but with the given end point(s) changed - # - # source://parser//lib/parser/source/range.rb#184 - def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end -end - -# {Rewriter} is deprecated. Use {TreeRewriter} instead. -# -# TreeRewriter has simplified semantics, and customizable policies -# with regards to clobbering. Please read the documentation. -# -# Keep in mind: -# - Rewriter was discarding the `end_pos` of the given range for `insert_before`, -# and the `begin_pos` for `insert_after`. These are meaningful in TreeRewriter. -# - TreeRewriter's wrap/insert_before/insert_after are multiple by default, while -# Rewriter would raise clobbering errors if the non '_multi' version was called. -# - The TreeRewriter policy closest to Rewriter's behavior is: -# different_replacements: :raise, -# swallowed_insertions: :raise, -# crossing_deletions: :accept -# -# @api public -# @deprecated Use {TreeRewriter} -# -# source://parser//lib/parser/source/rewriter.rb#31 -class Parser::Source::Rewriter - extend ::Parser::Deprecation - - # @api public - # @deprecated Use {TreeRewriter} - # @param source_buffer [Source::Buffer] - # @return [Rewriter] a new instance of Rewriter - # - # source://parser//lib/parser/source/rewriter.rb#39 - def initialize(source_buffer); end - - # @api public - # @return [Diagnostic::Engine] - # - # source://parser//lib/parser/source/rewriter.rb#33 - def diagnostics; end - - # Inserts new code after the given source range. - # - # @api public - # @deprecated Use {TreeRewriter#insert_after} - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#131 - def insert_after(range, content); end - - # Inserts new code after the given source range by allowing other - # insertions at the same position. - # Note that an insertion with latter invocation comes _after_ earlier - # insertion at the same position in the rewritten source. - # - # @api public - # @deprecated Use {TreeRewriter#insert_after} - # @example Inserting ')]' - # rewriter. - # insert_after_multi(range, ')'). - # insert_after_multi(range, ']'). - # process - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#153 - def insert_after_multi(range, content); end - - # Inserts new code before the given source range. - # - # @api public - # @deprecated Use {TreeRewriter#insert_before} - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#80 - def insert_before(range, content); end - - # Inserts new code before the given source range by allowing other - # insertions at the same position. - # Note that an insertion with latter invocation comes _before_ earlier - # insertion at the same position in the rewritten source. - # - # @api public - # @deprecated Use {TreeRewriter#insert_before} - # @example Inserting '[(' - # rewriter. - # insert_before_multi(range, '('). - # insert_before_multi(range, '['). - # process - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#117 - def insert_before_multi(range, content); end - - # Applies all scheduled changes to the `source_buffer` and returns - # modified source as a new string. - # - # @api public - # @deprecated Use {TreeRewriter#process} - # @return [String] - # - # source://parser//lib/parser/source/rewriter.rb#178 - def process; end - - # Removes the source range. - # - # @api public - # @deprecated Use {TreeRewriter#remove} - # @param range [Range] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#67 - def remove(range); end - - # Replaces the code of the source range `range` with `content`. - # - # @api public - # @deprecated Use {TreeRewriter#replace} - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#167 - def replace(range, content); end - - # @api public - # @return [Source::Buffer] - # - # source://parser//lib/parser/source/rewriter.rb#32 - def source_buffer; end - - # Provides a protected block where a sequence of multiple rewrite actions - # are handled atomically. If any of the actions failed by clobbering, - # all the actions are rolled back. - # - # @api public - # @deprecated Use {TreeRewriter#transaction} - # @example - # begin - # rewriter.transaction do - # rewriter.insert_before(range_of_something, '(') - # rewriter.insert_after(range_of_something, ')') - # end - # rescue Parser::ClobberingError - # end - # @raise [RuntimeError] when no block is passed - # @raise [RuntimeError] when already in a transaction - # - # source://parser//lib/parser/source/rewriter.rb#216 - def transaction; end - - # Inserts new code before and after the given source range. - # - # @api public - # @deprecated Use {TreeRewriter#wrap} - # @param range [Range] - # @param before [String] - # @param after [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#94 - def wrap(range, before, after); end - - private - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#476 - def active_clobber; end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#484 - def active_clobber=(value); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#480 - def active_insertions; end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#492 - def active_insertions=(value); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#472 - def active_queue; end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#500 - def adjacent?(range1, range2); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#351 - def adjacent_insertion_mask(range); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#366 - def adjacent_insertions?(range); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#347 - def adjacent_position_mask(range); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#377 - def adjacent_updates?(range); end - - # Schedule a code update. If it overlaps with another update, check - # whether they conflict, and raise a clobbering error if they do. - # (As a special case, zero-length ranges at the same position are - # considered to "overlap".) Otherwise, merge them. - # - # Updates which are adjacent to each other, but do not overlap, are also - # merged. - # - # RULES: - # - # - Insertion ("replacing" a zero-length range): - # - Two insertions at the same point conflict. This is true even - # if the earlier insertion has already been merged with an adjacent - # update, and even if they are both inserting the same text. - # - An insertion never conflicts with a replace or remove operation - # on its right or left side, which does not overlap it (in other - # words, which does not update BOTH its right and left sides). - # - An insertion always conflicts with a remove operation which spans - # both its sides. - # - An insertion conflicts with a replace operation which spans both its - # sides, unless the replacement text is longer than the replaced text - # by the size of the insertion (or more), and the portion of - # replacement text immediately after the insertion position is - # identical to the inserted text. - # - # - Removal operations never conflict with each other. - # - # - Replacement operations: - # - Take the portion of each replacement text which falls within: - # - The other operation's replaced region - # - The other operation's replacement text, if it extends past the - # end of its own replaced region (in other words, if the replacement - # text is longer than the text it replaces) - # - If and only if the taken texts are identical for both operations, - # they do not conflict. - # - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#280 - def append(action); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#389 - def can_merge?(action, existing); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#355 - def clobbered_insertion?(insertion); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#343 - def clobbered_position_mask(range); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#468 - def in_transaction?; end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#410 - def merge_actions(action, existing); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#419 - def merge_actions!(action, existing); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#425 - def merge_replacements(actions); end - - # @api public - # @raise [ClobberingError] - # - # source://parser//lib/parser/source/rewriter.rb#450 - def raise_clobber_error(action, existing); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#335 - def record_insertion(range); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#339 - def record_replace(range); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#445 - def replace_actions(old, updated); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#383 - def replace_compatible_with_insertion?(replace, insertion); end -end - -# source://parser//lib/parser/source/rewriter/action.rb#9 -class Parser::Source::Rewriter::Action - include ::Comparable - - # source://parser//lib/parser/source/rewriter/action.rb#15 - def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end - - # source://parser//lib/parser/source/rewriter/action.rb#24 - def <=>(other); end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def allow_multiple_insertions; end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def allow_multiple_insertions?; end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def order; end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def range; end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def replacement; end - - # source://parser//lib/parser/source/rewriter/action.rb#30 - def to_s; end -end - -# @api public -# -# source://parser//lib/parser/source/rewriter.rb#504 -Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -# {TreeRewriter} performs the heavy lifting in the source rewriting process. -# It schedules code updates to be performed in the correct order. -# -# For simple cases, the resulting source will be obvious. -# -# Examples for more complex cases follow. Assume these examples are acting on -# the source `'puts(:hello, :world)`. The methods #wrap, #remove, etc. -# receive a Range as first argument; for clarity, examples below use english -# sentences and a string of raw code instead. -# -# ## Overlapping ranges: -# -# Any two rewriting actions on overlapping ranges will fail and raise -# a `ClobberingError`, unless they are both deletions (covered next). -# -# * wrap ':hello, ' with '(' and ')' -# * wrap ', :world' with '(' and ')' -# => CloberringError -# -# ## Overlapping deletions: -# -# * remove ':hello, ' -# * remove ', :world' -# -# The overlapping ranges are merged and `':hello, :world'` will be removed. -# This policy can be changed. `:crossing_deletions` defaults to `:accept` -# but can be set to `:warn` or `:raise`. -# -# ## Multiple actions at the same end points: -# -# Results will always be independent on the order they were given. -# Exception: rewriting actions done on exactly the same range (covered next). -# -# Example: -# * replace ', ' by ' => ' -# * wrap ':hello, :world' with '{' and '}' -# * replace ':world' with ':everybody' -# * wrap ':world' with '[', ']' -# -# The resulting string will be `'puts({:hello => [:everybody]})'` -# and this result is independent on the order the instructions were given in. -# -# Note that if the two "replace" were given as a single replacement of ', :world' -# for ' => :everybody', the result would be a `ClobberingError` because of the wrap -# in square brackets. -# -# ## Multiple wraps on same range: -# * wrap ':hello' with '(' and ')' -# * wrap ':hello' with '[' and ']' -# -# The wraps are combined in order given and results would be `'puts([(:hello)], :world)'`. -# -# ## Multiple replacements on same range: -# * replace ':hello' by ':hi', then -# * replace ':hello' by ':hey' -# -# The replacements are made in the order given, so the latter replacement -# supersedes the former and ':hello' will be replaced by ':hey'. -# -# This policy can be changed. `:different_replacements` defaults to `:accept` -# but can be set to `:warn` or `:raise`. -# -# ## Swallowed insertions: -# wrap 'world' by '__', '__' -# replace ':hello, :world' with ':hi' -# -# A containing replacement will swallow the contained rewriting actions -# and `':hello, :world'` will be replaced by `':hi'`. -# -# This policy can be changed for swallowed insertions. `:swallowed_insertions` -# defaults to `:accept` but can be set to `:warn` or `:raise` -# -# ## Implementation -# The updates are organized in a tree, according to the ranges they act on -# (where children are strictly contained by their parent), hence the name. -# -# @api public -# -# source://parser//lib/parser/source/tree_rewriter.rb#91 -class Parser::Source::TreeRewriter - extend ::Parser::Deprecation - - # @api public - # @param source_buffer [Source::Buffer] - # @return [TreeRewriter] a new instance of TreeRewriter - # - # source://parser//lib/parser/source/tree_rewriter.rb#98 - def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end - - # Returns a representation of the rewriter as nested insertions (:wrap) and replacements. - # - # rewriter.as_actions # =>[ [:wrap, 1...10, '(', ')'], - # [:wrap, 2...6, '', '!'], # aka "insert_after" - # [:replace, 2...4, 'foo'], - # [:replace, 5...6, ''], # aka "removal" - # ], - # - # Contrary to `as_replacements`, this representation is sufficient to recreate exactly - # the rewriter. - # - # @api public - # @return [Array<(Symbol, Range, String{, String})>] - # - # source://parser//lib/parser/source/tree_rewriter.rb#299 - def as_nested_actions; end - - # Returns a representation of the rewriter as an ordered list of replacements. - # - # rewriter.as_replacements # => [ [1...1, '('], - # [2...4, 'foo'], - # [5...6, ''], - # [6...6, '!'], - # [10...10, ')'], - # ] - # - # This representation is sufficient to recreate the result of `process` but it is - # not sufficient to recreate completely the rewriter for further merging/actions. - # See `as_nested_actions` - # - # @api public - # @return [Array] an ordered list of pairs of range & replacement - # - # source://parser//lib/parser/source/tree_rewriter.rb#281 - def as_replacements; end - - # @api public - # @return [Diagnostic::Engine] - # - # source://parser//lib/parser/source/tree_rewriter.rb#93 - def diagnostics; end - - # Returns true iff no (non trivial) update has been recorded - # - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/tree_rewriter.rb#125 - def empty?; end - - # For special cases where one needs to merge a rewriter attached to a different source_buffer - # or that needs to be offset. Policies of the receiver are used. - # - # @api public - # @param rewriter [TreeRewriter] from different source_buffer - # @param offset [Integer] - # @raise [IndexError] if action ranges (once offset) don't fit the current buffer - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#168 - def import!(foreign_rewriter, offset: T.unsafe(nil)); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/tree_rewriter.rb#329 - def in_transaction?; end - - # Shortcut for `wrap(range, nil, content)` - # - # @api public - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#242 - def insert_after(range, content); end - - # @api private - # @deprecated Use insert_after or wrap - # - # source://parser//lib/parser/source/tree_rewriter.rb#351 - def insert_after_multi(range, text); end - - # Shortcut for `wrap(range, content, nil)` - # - # @api public - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#230 - def insert_before(range, content); end - - # @api private - # @deprecated Use insert_after or wrap - # - # source://parser//lib/parser/source/tree_rewriter.rb#342 - def insert_before_multi(range, text); end - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#334 - def inspect; end - - # Returns a new rewriter that consists of the updates of the received - # and the given argument. Policies of the receiver are used. - # - # @api public - # @param with [Rewriter] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] merge of receiver and argument - # - # source://parser//lib/parser/source/tree_rewriter.rb#155 - def merge(with); end - - # Merges the updates of argument with the receiver. - # Policies of the receiver are used. - # This action is atomic in that it won't change the receiver - # unless it succeeds. - # - # @api public - # @param with [Rewriter] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#139 - def merge!(with); end - - # Applies all scheduled changes to the `source_buffer` and returns - # modified source as a new string. - # - # @api public - # @return [String] - # - # source://parser//lib/parser/source/tree_rewriter.rb#252 - def process; end - - # Shortcut for `replace(range, '')` - # - # @api public - # @param range [Range] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#217 - def remove(range); end - - # Replaces the code of the source range `range` with `content`. - # - # @api public - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#193 - def replace(range, content); end - - # @api public - # @return [Source::Buffer] - # - # source://parser//lib/parser/source/tree_rewriter.rb#92 - def source_buffer; end - - # Provides a protected block where a sequence of multiple rewrite actions - # are handled atomically. If any of the actions failed by clobbering, - # all the actions are rolled back. Transactions can be nested. - # - # @api public - # @raise [RuntimeError] when no block is passed - # - # source://parser//lib/parser/source/tree_rewriter.rb#310 - def transaction; end - - # Inserts the given strings before and after the given range. - # - # @api public - # @param range [Range] - # @param insert_before [String, nil] - # @param insert_after [String, nil] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#206 - def wrap(range, insert_before, insert_after); end - - protected - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#365 - def action_root; end - - private - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#369 - def action_summary; end - - # @api public - # @raise [ArgumentError] - # - # source://parser//lib/parser/source/tree_rewriter.rb#392 - def check_policy_validity; end - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#404 - def check_range_validity(range); end - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#397 - def combine(range, attributes); end - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#411 - def enforce_policy(event); end - - # @api public - # @raise [Parser::ClobberingError] - # - # source://parser//lib/parser/source/tree_rewriter.rb#418 - def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end -end - -# @api public -# -# source://parser//lib/parser/source/tree_rewriter.rb#391 -Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) - -# source://parser//lib/parser/source/tree_rewriter/action.rb#14 -class Parser::Source::TreeRewriter::Action - # source://parser//lib/parser/source/tree_rewriter/action.rb#17 - def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#29 - def combine(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#68 - def contract; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#34 - def empty?; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#15 - def insert_after; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#15 - def insert_before; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#58 - def insertion?; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#81 - def moved(source_buffer, offset); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#50 - def nested_actions; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#41 - def ordered_replacements; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#15 - def range; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#15 - def replacement; end - - protected - - # source://parser//lib/parser/source/tree_rewriter/action.rb#159 - def analyse_hierarchy(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#146 - def bsearch_child_index(from = T.unsafe(nil)); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#225 - def call_enforcer_for_merge(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#205 - def check_fusible(action, *fusible); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#95 - def children; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#130 - def combine_children(more_children); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#103 - def do_combine(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#136 - def fuse_deletions(action, fusible, other_sibblings); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#216 - def merge(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#111 - def place_in_hierarchy(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#233 - def swallow(children); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#97 - def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end -end - -# @api public -# -# source://parser//lib/parser/source/tree_rewriter.rb#356 -Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -# @api public -# -# source://parser//lib/parser/source/tree_rewriter.rb#417 -Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/static_environment.rb#5 -class Parser::StaticEnvironment - # @return [StaticEnvironment] a new instance of StaticEnvironment - # - # source://parser//lib/parser/static_environment.rb#17 - def initialize; end - - # source://parser//lib/parser/static_environment.rb#55 - def declare(name); end - - # Anonymous blockarg - # - # source://parser//lib/parser/static_environment.rb#77 - def declare_anonymous_blockarg; end - - # Anonymous kwresarg - # - # source://parser//lib/parser/static_environment.rb#113 - def declare_anonymous_kwrestarg; end - - # Anonymous restarg - # - # source://parser//lib/parser/static_environment.rb#95 - def declare_anonymous_restarg; end - - # Forward args - # - # source://parser//lib/parser/static_environment.rb#67 - def declare_forward_args; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#61 - def declared?(name); end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#81 - def declared_anonymous_blockarg?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#85 - def declared_anonymous_blockarg_in_current_scpe?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#117 - def declared_anonymous_kwrestarg?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#121 - def declared_anonymous_kwrestarg_in_current_scope?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#99 - def declared_anonymous_restarg?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#103 - def declared_anonymous_restarg_in_current_scope?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#71 - def declared_forward_args?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#129 - def empty?; end - - # source://parser//lib/parser/static_environment.rb#33 - def extend_dynamic; end - - # source://parser//lib/parser/static_environment.rb#26 - def extend_static; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#89 - def parent_has_anonymous_blockarg?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#125 - def parent_has_anonymous_kwrestarg?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#107 - def parent_has_anonymous_restarg?; end - - # source://parser//lib/parser/static_environment.rb#21 - def reset; end - - # source://parser//lib/parser/static_environment.rb#49 - def unextend; end -end - -# source://parser//lib/parser/static_environment.rb#15 -Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_INHERITED = T.let(T.unsafe(nil), Symbol) - -# source://parser//lib/parser/static_environment.rb#14 -Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) - -# source://parser//lib/parser/static_environment.rb#12 -Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) - -# source://parser//lib/parser/static_environment.rb#11 -Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) - -# source://parser//lib/parser/static_environment.rb#9 -Parser::StaticEnvironment::ANONYMOUS_RESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) - -# source://parser//lib/parser/static_environment.rb#8 -Parser::StaticEnvironment::ANONYMOUS_RESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) - -# source://parser//lib/parser/static_environment.rb#6 -Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) - -# {Parser::SyntaxError} is raised whenever parser detects a syntax error, -# similar to the standard SyntaxError class. -# -# @api public -# -# source://parser//lib/parser/syntax_error.rb#13 -class Parser::SyntaxError < ::StandardError - # @api public - # @return [SyntaxError] a new instance of SyntaxError - # - # source://parser//lib/parser/syntax_error.rb#16 - def initialize(diagnostic); end - - # @api public - # @return [Parser::Diagnostic] - # - # source://parser//lib/parser/syntax_error.rb#14 - def diagnostic; end -end - -# {Parser::TreeRewriter} offers a basic API that makes it easy to rewrite -# existing ASTs. It's built on top of {Parser::AST::Processor} and -# {Parser::Source::TreeRewriter} -# -# For example, assume you want to remove `do` tokens from a while statement. -# You can do this as following: -# -# require 'parser/current' -# -# class RemoveDo < Parser::TreeRewriter -# def on_while(node) -# # Check if the statement starts with "do" -# if node.location.begin.is?('do') -# remove(node.location.begin) -# end -# end -# end -# -# code = <<-EOF -# while true do -# puts 'hello' -# end -# EOF -# -# ast = Parser::CurrentRuby.parse code -# buffer = Parser::Source::Buffer.new('(example)', source: code) -# rewriter = RemoveDo.new -# -# # Rewrite the AST, returns a String with the new form. -# puts rewriter.rewrite(buffer, ast) -# -# This would result in the following Ruby code: -# -# while true -# puts 'hello' -# end -# -# Keep in mind that {Parser::TreeRewriter} does not take care of indentation when -# inserting/replacing code so you'll have to do this yourself. -# -# See also [a blog entry](http://whitequark.org/blog/2013/04/26/lets-play-with-ruby-code/) -# describing rewriters in greater detail. -# -# @api public -# -# source://parser//lib/parser/tree_rewriter.rb#51 -class Parser::TreeRewriter < ::Parser::AST::Processor - # Returns `true` if the specified node is an assignment node, returns false - # otherwise. - # - # @api public - # @param node [Parser::AST::Node] - # @return [Boolean] - # - # source://parser//lib/parser/tree_rewriter.rb#79 - def assignment?(node); end - - # Inserts new code after the given source range. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/tree_rewriter.rb#118 - def insert_after(range, content); end - - # Inserts new code before the given source range. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/tree_rewriter.rb#108 - def insert_before(range, content); end - - # Removes the source range. - # - # @api public - # @param range [Parser::Source::Range] - # - # source://parser//lib/parser/tree_rewriter.rb#88 - def remove(range); end - - # Replaces the code of the source range `range` with `content`. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/tree_rewriter.rb#128 - def replace(range, content); end - - # Rewrites the AST/source buffer and returns a String containing the new - # version. - # - # @api public - # @param source_buffer [Parser::Source::Buffer] - # @param ast [Parser::AST::Node] - # @param crossing_deletions:, [Symbol] different_replacements:, swallowed_insertions: - # policy arguments for TreeRewriter (optional) - # @return [String] - # - # source://parser//lib/parser/tree_rewriter.rb#62 - def rewrite(source_buffer, ast, **policy); end - - # Wraps the given source range with the given values. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/tree_rewriter.rb#98 - def wrap(range, before, after); end -end - -# {Parser::UnknownEncodingInMagicComment} is raised when a magic encoding -# comment is encountered that the currently running Ruby version doesn't -# recognize. It inherits from {ArgumentError} since that is the exception -# Ruby itself raises when trying to execute a file with an unknown encoding. -# As such, it is also not a {Parser::SyntaxError}. -# -# @api public -# -# source://parser//lib/parser/unknown_encoding_in_magic_comment_error.rb#13 -class Parser::UnknownEncodingInMagicComment < ::ArgumentError; end - -# source://parser//lib/parser/version.rb#4 -Parser::VERSION = T.let(T.unsafe(nil), String) - -# source://parser//lib/parser/variables_stack.rb#5 -class Parser::VariablesStack - # @return [VariablesStack] a new instance of VariablesStack - # - # source://parser//lib/parser/variables_stack.rb#6 - def initialize; end - - # source://parser//lib/parser/variables_stack.rb#27 - def declare(name); end - - # @return [Boolean] - # - # source://parser//lib/parser/variables_stack.rb#31 - def declared?(name); end - - # @return [Boolean] - # - # source://parser//lib/parser/variables_stack.rb#11 - def empty?; end - - # source://parser//lib/parser/variables_stack.rb#19 - def pop; end - - # source://parser//lib/parser/variables_stack.rb#15 - def push; end - - # source://parser//lib/parser/variables_stack.rb#23 - def reset; end -end diff --git a/sorbet/rbi/gems/pp@0.6.2.rbi b/sorbet/rbi/gems/pp@0.6.2.rbi new file mode 100644 index 000000000..a07ee880d --- /dev/null +++ b/sorbet/rbi/gems/pp@0.6.2.rbi @@ -0,0 +1,369 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `pp` gem. +# Please instead update this file by running `bin/tapioca gem pp`. + + +class Array + include ::Enumerable + + # pkg:gem/pp#lib/pp.rb:402 + def pretty_print(q); end + + # pkg:gem/pp#lib/pp.rb:410 + def pretty_print_cycle(q); end +end + +class Data + # pkg:gem/pp#lib/pp.rb:456 + def pretty_print(q); end + + # pkg:gem/pp#lib/pp.rb:484 + def pretty_print_cycle(q); end +end + +class File::Stat + include ::Comparable + + # pkg:gem/pp#lib/pp.rb:518 + def pretty_print(q); end +end + +class Hash + include ::Enumerable + + # pkg:gem/pp#lib/pp.rb:416 + def pretty_print(q); end + + # pkg:gem/pp#lib/pp.rb:420 + def pretty_print_cycle(q); end +end + +module Kernel + # Returns a pretty printed object as a string. + # + # See the PP module for more information. + # + # pkg:gem/pp#lib/pp.rb:685 + def pretty_inspect; end + + private + + # prints arguments in pretty form. + # + # +#pp+ returns argument(s). + # + # pkg:gem/pp#lib/pp.rb:692 + def pp(*objs); end + + class << self + # prints arguments in pretty form. + # + # +#pp+ returns argument(s). + # + # pkg:gem/pp#lib/pp.rb:692 + def pp(*objs); end + end +end + +class MatchData + # pkg:gem/pp#lib/pp.rb:601 + def pretty_print(q); end +end + +# A pretty-printer for Ruby objects. +# +# +# == What PP Does +# +# Standard output by #p returns this: +# #, @group_queue=#], []]>, @buffer=[], @newline="\n", @group_stack=[#], @buffer_width=0, @indent=0, @maxwidth=79, @output_width=2, @output=#> +# +# Pretty-printed output returns this: +# #, +# @group_queue= +# #], +# []]>, +# @group_stack= +# [#], +# @indent=0, +# @maxwidth=79, +# @newline="\n", +# @output=#, +# @output_width=2> +# +# +# == Usage +# +# pp(obj) #=> obj +# pp obj #=> obj +# pp(obj1, obj2, ...) #=> [obj1, obj2, ...] +# pp() #=> nil +# +# Output obj(s) to $> in pretty printed format. +# +# It returns obj(s). +# +# +# == Output Customization +# +# To define a customized pretty printing function for your classes, +# redefine method #pretty_print(pp) in the class. +# Note that require 'pp' is needed before redefining #pretty_print(pp). +# +# #pretty_print takes the +pp+ argument, which is an instance of the PP class. +# The method uses #text, #breakable, #nest, #group and #pp to print the +# object. +# +# +# == Pretty-Print JSON +# +# To pretty-print JSON refer to JSON#pretty_generate. +# +# +# == Author +# Tanaka Akira +class PP < ::PrettyPrint + include ::PP::PPMethods + + class << self + # :stopdoc: + # + # pkg:gem/pp#lib/pp.rb:116 + def mcall(obj, mod, meth, *args, &block); end + + # Outputs +obj+ to +out+ in pretty printed format of + # +width+ columns in width. + # + # If +out+ is omitted, $> is assumed. + # If +width+ is omitted, the width of +out+ is assumed (see + # width_for). + # + # PP.pp returns +out+. + # + # pkg:gem/pp#lib/pp.rb:96 + def pp(obj, out = T.unsafe(nil), width = T.unsafe(nil)); end + + # Returns the sharing detection flag as a boolean value. + # It is false (nil) by default. + # Returns the sharing detection flag as a boolean value. + # It is false by default. + # + # pkg:gem/pp#lib/pp.rb:125 + def sharing_detection; end + + # Sets the sharing detection flag to b. + # + # pkg:gem/pp#lib/pp.rb:129 + def sharing_detection=(b); end + + # Outputs +obj+ to +out+ like PP.pp but with no indent and + # newline. + # + # PP.singleline_pp returns +out+. + # + # pkg:gem/pp#lib/pp.rb:108 + def singleline_pp(obj, out = T.unsafe(nil)); end + + # Returns the usable width for +out+. + # As the width of +out+: + # 1. If +out+ is assigned to a tty device, its width is used. + # 2. Otherwise, or it could not get the value, the +COLUMN+ + # environment variable is assumed to be set to the width. + # 3. If +COLUMN+ is not set to a non-zero number, 80 is assumed. + # + # And finally, returns the above width value - 1. + # * This -1 is for Windows command prompt, which moves the cursor to + # the next line if it reaches the last column. + # + # pkg:gem/pp#lib/pp.rb:79 + def width_for(out); end + end +end + +module PP::ObjectMixin + # A default pretty printing method for general objects. + # It calls #pretty_print_instance_variables to list instance variables. + # + # If +self+ has a customized (redefined) #inspect method, + # the result of self.inspect is used but it obviously has no + # line break hints. + # + # This module provides predefined #pretty_print methods for some of + # the most commonly used built-in classes for convenience. + # + # pkg:gem/pp#lib/pp.rb:353 + def pretty_print(q); end + + # A default pretty printing method for general objects that are + # detected as part of a cycle. + # + # pkg:gem/pp#lib/pp.rb:370 + def pretty_print_cycle(q); end + + # Is #inspect implementation using #pretty_print. + # If you implement #pretty_print, it can be used as follows. + # + # alias inspect pretty_print_inspect + # + # However, doing this requires that every class that #inspect is called on + # implement #pretty_print, or a RuntimeError will be raised. + # + # pkg:gem/pp#lib/pp.rb:392 + def pretty_print_inspect; end + + # Returns a sorted array of instance variable names. + # + # This method should return an array of names of instance variables as symbols or strings as: + # +[:@a, :@b]+. + # + # pkg:gem/pp#lib/pp.rb:381 + def pretty_print_instance_variables; end +end + +# Module that defines helper methods for pretty_print. +module PP::PPMethods + # Check whether the object_id +id+ is in the current buffer of objects + # to be pretty printed. Used to break cycles in chains of objects to be + # pretty printed. + # + # pkg:gem/pp#lib/pp.rb:169 + def check_inspect_key(id); end + + # A convenience method which is same as follows: + # + # text ',' + # breakable + # + # pkg:gem/pp#lib/pp.rb:232 + def comma_breakable; end + + # Yields to a block + # and preserves the previous set of objects being printed. + # + # pkg:gem/pp#lib/pp.rb:147 + def guard_inspect_key; end + + # A convenience method, like object_group, but also reformats the Object's + # object_id. + # + # pkg:gem/pp#lib/pp.rb:222 + def object_address_group(obj, &block); end + + # A convenience method which is same as follows: + # + # group(1, '#<' + obj.class.name, '>') { ... } + # + # pkg:gem/pp#lib/pp.rb:216 + def object_group(obj, &block); end + + # Removes an object from the set of objects being pretty printed. + # + # pkg:gem/pp#lib/pp.rb:182 + def pop_inspect_key(id); end + + # Adds +obj+ to the pretty printing buffer + # using Object#pretty_print or Object#pretty_print_cycle. + # + # Object#pretty_print_cycle is used when +obj+ is already + # printed, a.k.a the object reference chain has a cycle. + # + # pkg:gem/pp#lib/pp.rb:191 + def pp(obj); end + + # A pretty print for a Hash + # + # pkg:gem/pp#lib/pp.rb:291 + def pp_hash(obj); end + + # A pretty print for a pair of Hash + # + # pkg:gem/pp#lib/pp.rb:303 + def pp_hash_pair(k, v); end + + # A present standard failsafe for pretty printing any given Object + # + # pkg:gem/pp#lib/pp.rb:275 + def pp_object(obj); end + + # Adds the object_id +id+ to the set of objects being pretty printed, so + # as to not repeat objects. + # + # pkg:gem/pp#lib/pp.rb:177 + def push_inspect_key(id); end + + # Adds a separated list. + # The list is separated by comma with breakable space, by default. + # + # #seplist iterates the +list+ using +iter_method+. + # It yields each object to the block given for #seplist. + # The procedure +separator_proc+ is called between each yields. + # + # If the iteration is zero times, +separator_proc+ is not called at all. + # + # If +separator_proc+ is nil or not given, + # +lambda { comma_breakable }+ is used. + # If +iter_method+ is not given, :each is used. + # + # For example, following 3 code fragments has similar effect. + # + # q.seplist([1,2,3]) {|v| xxx v } + # + # q.seplist([1,2,3], lambda { q.comma_breakable }, :each) {|v| xxx v } + # + # xxx 1 + # q.comma_breakable + # xxx 2 + # q.comma_breakable + # xxx 3 + # + # pkg:gem/pp#lib/pp.rb:261 + def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end +end + +class PP::SingleLine < ::PrettyPrint::SingleLine + include ::PP::PPMethods +end + +# The version string +# +# pkg:gem/pp#lib/pp.rb:67 +PP::VERSION = T.let(T.unsafe(nil), String) + +class Range + include ::Enumerable + + # pkg:gem/pp#lib/pp.rb:490 + def pretty_print(q); end +end + +class RubyVM::AbstractSyntaxTree::Node + # pkg:gem/pp#lib/pp.rb:640 + def pretty_print(q); end + + # pkg:gem/pp#lib/pp.rb:627 + def pretty_print_children(q, names = T.unsafe(nil)); end +end + +class String + include ::Comparable + + # pkg:gem/pp#lib/pp.rb:502 + def pretty_print(q); end +end + +class Struct + include ::Enumerable + + # pkg:gem/pp#lib/pp.rb:436 + def pretty_print(q); end + + # pkg:gem/pp#lib/pp.rb:450 + def pretty_print_cycle(q); end +end diff --git a/sorbet/rbi/gems/prettyprint@0.2.0.rbi b/sorbet/rbi/gems/prettyprint@0.2.0.rbi new file mode 100644 index 000000000..81d5bfcb9 --- /dev/null +++ b/sorbet/rbi/gems/prettyprint@0.2.0.rbi @@ -0,0 +1,455 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `prettyprint` gem. +# Please instead update this file by running `bin/tapioca gem prettyprint`. + + +# This class implements a pretty printing algorithm. It finds line breaks and +# nice indentations for grouped structure. +# +# By default, the class assumes that primitive elements are strings and each +# byte in the strings have single column in width. But it can be used for +# other situations by giving suitable arguments for some methods: +# * newline object and space generation block for PrettyPrint.new +# * optional width argument for PrettyPrint#text +# * PrettyPrint#breakable +# +# There are several candidate uses: +# * text formatting using proportional fonts +# * multibyte characters which has columns different to number of bytes +# * non-string formatting +# +# == Bugs +# * Box based formatting? +# * Other (better) model/algorithm? +# +# Report any bugs at http://bugs.ruby-lang.org +# +# == References +# Christian Lindig, Strictly Pretty, March 2000, +# https://lindig.github.io/papers/strictly-pretty-2000.pdf +# +# Philip Wadler, A prettier printer, March 1998, +# https://homepages.inf.ed.ac.uk/wadler/topics/language-design.html#prettier +# +# == Author +# Tanaka Akira +class PrettyPrint + # Creates a buffer for pretty printing. + # + # +output+ is an output target. If it is not specified, '' is assumed. It + # should have a << method which accepts the first argument +obj+ of + # PrettyPrint#text, the first argument +sep+ of PrettyPrint#breakable, the + # first argument +newline+ of PrettyPrint.new, and the result of a given + # block for PrettyPrint.new. + # + # +maxwidth+ specifies maximum line length. If it is not specified, 79 is + # assumed. However actual outputs may overflow +maxwidth+ if long + # non-breakable texts are provided. + # + # +newline+ is used for line breaks. "\n" is used if it is not specified. + # + # The block is used to generate spaces. {|width| ' ' * width} is used if it + # is not given. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:84 + def initialize(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), &genspace); end + + # Breaks the buffer into lines that are shorter than #maxwidth + # + # pkg:gem/prettyprint#lib/prettyprint.rb:162 + def break_outmost_groups; end + + # This says "you can break a line here if necessary", and a +width+\-column + # text +sep+ is inserted if a line is not broken at the point. + # + # If +sep+ is not specified, " " is used. + # + # If +width+ is not specified, +sep.length+ is used. You will have to + # specify this when +sep+ is a multibyte character, for example. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:226 + def breakable(sep = T.unsafe(nil), width = T.unsafe(nil)); end + + # Returns the group most recently added to the stack. + # + # Contrived example: + # out = "" + # => "" + # q = PrettyPrint.new(out) + # => #, @output_width=0, @buffer_width=0, @buffer=[], @group_stack=[#], @group_queue=#]]>, @indent=0> + # q.group { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # } + # } + # } + # } + # => 284 + # puts out + # # + # # + # # + # # + # + # pkg:gem/prettyprint#lib/prettyprint.rb:157 + def current_group; end + + # This is similar to #breakable except + # the decision to break or not is determined individually. + # + # Two #fill_breakable under a group may cause 4 results: + # (break,break), (break,non-break), (non-break,break), (non-break,non-break). + # This is different to #breakable because two #breakable under a group + # may cause 2 results: + # (break,break), (non-break,non-break). + # + # The text +sep+ is inserted if a line is not broken at this point. + # + # If +sep+ is not specified, " " is used. + # + # If +width+ is not specified, +sep.length+ is used. You will have to + # specify this when +sep+ is a multibyte character, for example. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:214 + def fill_breakable(sep = T.unsafe(nil), width = T.unsafe(nil)); end + + # outputs buffered data. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:290 + def flush; end + + # A lambda or Proc, that takes one argument, of an Integer, and returns + # the corresponding number of spaces. + # + # By default this is: + # lambda {|n| ' ' * n} + # + # pkg:gem/prettyprint#lib/prettyprint.rb:120 + def genspace; end + + # Groups line break hints added in the block. The line break hints are all + # to be used or not. + # + # If +indent+ is specified, the method call is regarded as nested by + # nest(indent) { ... }. + # + # If +open_obj+ is specified, text open_obj, open_width is called + # before grouping. If +close_obj+ is specified, text close_obj, + # close_width is called after grouping. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:251 + def group(indent = T.unsafe(nil), open_obj = T.unsafe(nil), close_obj = T.unsafe(nil), open_width = T.unsafe(nil), close_width = T.unsafe(nil)); end + + # The PrettyPrint::GroupQueue of groups in stack to be pretty printed + # + # pkg:gem/prettyprint#lib/prettyprint.rb:126 + def group_queue; end + + # Takes a block and queues a new group that is indented 1 level further. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:262 + def group_sub; end + + # The number of spaces to be indented + # + # pkg:gem/prettyprint#lib/prettyprint.rb:123 + def indent; end + + # The maximum width of a line, before it is separated in to a newline + # + # This defaults to 79, and should be an Integer + # + # pkg:gem/prettyprint#lib/prettyprint.rb:108 + def maxwidth; end + + # Increases left margin after newline with +indent+ for line breaks added in + # the block. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:279 + def nest(indent); end + + # The value that is appended to +output+ to add a new line. + # + # This defaults to "\n", and should be String + # + # pkg:gem/prettyprint#lib/prettyprint.rb:113 + def newline; end + + # The output object. + # + # This defaults to '', and should accept the << method + # + # pkg:gem/prettyprint#lib/prettyprint.rb:103 + def output; end + + # This adds +obj+ as a text of +width+ columns in width. + # + # If +width+ is not specified, obj.length is used. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:182 + def text(obj, width = T.unsafe(nil)); end + + class << self + # This is a convenience method which is same as follows: + # + # begin + # q = PrettyPrint.new(output, maxwidth, newline, &genspace) + # ... + # q.flush + # output + # end + # + # pkg:gem/prettyprint#lib/prettyprint.rb:47 + def format(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), genspace = T.unsafe(nil)); end + + # This is similar to PrettyPrint::format but the result has no breaks. + # + # +maxwidth+, +newline+ and +genspace+ are ignored. + # + # The invocation of +breakable+ in the block doesn't break a line and is + # treated as just an invocation of +text+. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:61 + def singleline_format(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), genspace = T.unsafe(nil)); end + end +end + +# The Breakable class is used for breaking up object information +# +# This class is intended for internal use of the PrettyPrint buffers. +class PrettyPrint::Breakable + # Create a new Breakable object. + # + # Arguments: + # * +sep+ String of the separator + # * +width+ Integer width of the +sep+ + # * +q+ parent PrettyPrint object, to base from + # + # pkg:gem/prettyprint#lib/prettyprint.rb:347 + def initialize(sep, width, q); end + + # The number of spaces to indent. + # + # This is inferred from +q+ within PrettyPrint, passed in ::new + # + # pkg:gem/prettyprint#lib/prettyprint.rb:367 + def indent; end + + # Holds the separator String + # + # The +sep+ argument from ::new + # + # pkg:gem/prettyprint#lib/prettyprint.rb:359 + def obj; end + + # Render the String text of the objects that have been added to this + # Breakable object. + # + # Output the text to +out+, and increment the width to +output_width+ + # + # pkg:gem/prettyprint#lib/prettyprint.rb:373 + def output(out, output_width); end + + # The width of +obj+ / +sep+ + # + # pkg:gem/prettyprint#lib/prettyprint.rb:362 + def width; end +end + +# The Group class is used for making indentation easier. +# +# While this class does neither the breaking into newlines nor indentation, +# it is used in a stack (as well as a queue) within PrettyPrint, to group +# objects. +# +# For information on using groups, see PrettyPrint#group +# +# This class is intended for internal use of the PrettyPrint buffers. +class PrettyPrint::Group + # Create a Group object + # + # Arguments: + # * +depth+ - this group's relation to previous groups + # + # pkg:gem/prettyprint#lib/prettyprint.rb:401 + def initialize(depth); end + + # Makes a break for this Group, and returns true + # + # pkg:gem/prettyprint#lib/prettyprint.rb:414 + def break; end + + # Boolean of whether this Group has made a break + # + # pkg:gem/prettyprint#lib/prettyprint.rb:419 + def break?; end + + # Array to hold the Breakable objects for this Group + # + # pkg:gem/prettyprint#lib/prettyprint.rb:411 + def breakables; end + + # This group's relation to previous groups + # + # pkg:gem/prettyprint#lib/prettyprint.rb:408 + def depth; end + + # Boolean of whether this Group has been queried for being first + # + # This is used as a predicate, and ought to be called first. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:426 + def first?; end +end + +# The GroupQueue class is used for managing the queue of Group to be pretty +# printed. +# +# This queue groups the Group objects, based on their depth. +# +# This class is intended for internal use of the PrettyPrint buffers. +class PrettyPrint::GroupQueue + # Create a GroupQueue object + # + # Arguments: + # * +groups+ - one or more PrettyPrint::Group objects + # + # pkg:gem/prettyprint#lib/prettyprint.rb:447 + def initialize(*groups); end + + # Remote +group+ from this queue + # + # pkg:gem/prettyprint#lib/prettyprint.rb:479 + def delete(group); end + + # Returns the outer group of the queue + # + # pkg:gem/prettyprint#lib/prettyprint.rb:463 + def deq; end + + # Enqueue +group+ + # + # This does not strictly append the group to the end of the queue, + # but instead adds it in line, base on the +group.depth+ + # + # pkg:gem/prettyprint#lib/prettyprint.rb:456 + def enq(group); end +end + +# PrettyPrint::SingleLine is used by PrettyPrint.singleline_format +# +# It is passed to be similar to a PrettyPrint object itself, by responding to: +# * #text +# * #breakable +# * #nest +# * #group +# * #flush +# * #first? +# +# but instead, the output has no line breaks +class PrettyPrint::SingleLine + # Create a PrettyPrint::SingleLine object + # + # Arguments: + # * +output+ - String (or similar) to store rendered text. Needs to respond to '<<' + # * +maxwidth+ - Argument position expected to be here for compatibility. + # This argument is a noop. + # * +newline+ - Argument position expected to be here for compatibility. + # This argument is a noop. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:505 + def initialize(output, maxwidth = T.unsafe(nil), newline = T.unsafe(nil)); end + + # Appends +sep+ to the text to be output. By default +sep+ is ' ' + # + # +width+ argument is here for compatibility. It is a noop argument. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:520 + def breakable(sep = T.unsafe(nil), width = T.unsafe(nil)); end + + # This is used as a predicate, and ought to be called first. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:552 + def first?; end + + # Method present for compatibility, but is a noop + # + # pkg:gem/prettyprint#lib/prettyprint.rb:548 + def flush; end + + # Opens a block for grouping objects to be pretty printed. + # + # Arguments: + # * +indent+ - noop argument. Present for compatibility. + # * +open_obj+ - text appended before the &blok. Default is '' + # * +close_obj+ - text appended after the &blok. Default is '' + # * +open_width+ - noop argument. Present for compatibility. + # * +close_width+ - noop argument. Present for compatibility. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:539 + def group(indent = T.unsafe(nil), open_obj = T.unsafe(nil), close_obj = T.unsafe(nil), open_width = T.unsafe(nil), close_width = T.unsafe(nil)); end + + # Takes +indent+ arg, but does nothing with it. + # + # Yields to a block. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:527 + def nest(indent); end + + # Add +obj+ to the text to be output. + # + # +width+ argument is here for compatibility. It is a noop argument. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:513 + def text(obj, width = T.unsafe(nil)); end +end + +# The Text class is the means by which to collect strings from objects. +# +# This class is intended for internal use of the PrettyPrint buffers. +class PrettyPrint::Text + # Creates a new text object. + # + # This constructor takes no arguments. + # + # The workflow is to append a PrettyPrint::Text object to the buffer, and + # being able to call the buffer.last() to reference it. + # + # As there are objects, use PrettyPrint::Text#add to include the objects + # and the width to utilized by the String version of this object. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:312 + def initialize; end + + # Include +obj+ in the objects to be pretty printed, and increment + # this Text object's total width by +width+ + # + # pkg:gem/prettyprint#lib/prettyprint.rb:330 + def add(obj, width); end + + # Render the String text of the objects that have been added to this Text object. + # + # Output the text to +out+, and increment the width to +output_width+ + # + # pkg:gem/prettyprint#lib/prettyprint.rb:323 + def output(out, output_width); end + + # The total width of the objects included in this Text object. + # + # pkg:gem/prettyprint#lib/prettyprint.rb:318 + def width; end +end + +# pkg:gem/prettyprint#lib/prettyprint.rb:36 +PrettyPrint::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/prism@1.9.0.rbi b/sorbet/rbi/gems/prism@1.9.0.rbi index b89ad6cc2..34faa867c 100644 --- a/sorbet/rbi/gems/prism@1.9.0.rbi +++ b/sorbet/rbi/gems/prism@1.9.0.rbi @@ -29,21 +29,106 @@ module Parser; end class Parser::Base; end +# pkg:gem/prism#lib/prism/translation/parser.rb:30 +class Parser::Diagnostic; end + # The Prism Ruby parser. # # "Parsing Ruby is suddenly manageable!" # - You, hopefully # -# source://prism//lib/prism.rb#9 +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/compiler.rb.erb +# if you are looking to modify the template +# ++ +# =end +# :markup: markdown +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/dispatcher.rb.erb +# if you are looking to modify the template +# ++ +# =end +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/dsl.rb.erb +# if you are looking to modify the template +# ++ +# =end +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/inspect_visitor.rb.erb +# if you are looking to modify the template +# ++ +# =end +# :markup: markdown +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/mutation_compiler.rb.erb +# if you are looking to modify the template +# ++ +# =end +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/node.rb.erb +# if you are looking to modify the template +# ++ +# =end +# -- +# Here we are reopening the prism module to provide methods on nodes that aren't +# templated and are meant as convenience methods. +# ++ +# +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/reflection.rb.erb +# if you are looking to modify the template +# ++ +# =end +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# +# :markup: markdown +# :markup: markdown +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/visitor.rb.erb +# if you are looking to modify the template +# ++ +# =end +# +# pkg:gem/prism#lib/prism.rb:9 module Prism class << self # Mirror the Prism.dump API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def dump(*_arg0); end # Mirror the Prism.dump_file API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def dump_file(*_arg0); end # Mirror the Prism.lex API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def lex(*_arg0); end # :call-seq: @@ -54,11 +139,13 @@ module Prism # # For supported options, see Prism::parse. # - # source://prism//lib/prism.rb#65 + # pkg:gem/prism#lib/prism.rb:65 sig { params(source: String, options: T::Hash[Symbol, T.untyped]).returns(Prism::LexCompat::Result) } def lex_compat(source, **options); end # Mirror the Prism.lex_file API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def lex_file(*_arg0); end # :call-seq: @@ -66,66 +153,84 @@ module Prism # # Load the serialized AST using the source as a reference into a tree. # - # source://prism//lib/prism.rb#73 + # pkg:gem/prism#lib/prism.rb:73 sig { params(source: String, serialized: String, freeze: T.nilable(T::Boolean)).returns(Prism::ParseResult) } def load(source, serialized, freeze = T.unsafe(nil)); end # Mirror the Prism.parse API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def parse(*_arg0); end # Mirror the Prism.parse_comments API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def parse_comments(*_arg0); end # Mirror the Prism.parse_failure? API by using the serialization API. # - # @return [Boolean] + # pkg:gem/prism#lib/prism.rb:92 def parse_failure?(*_arg0); end # Mirror the Prism.parse_file API by using the serialization API. This uses # native strings instead of Ruby strings because it allows us to use mmap # when it is available. + # + # pkg:gem/prism#lib/prism.rb:92 def parse_file(*_arg0); end # Mirror the Prism.parse_file_comments API by using the serialization # API. This uses native strings instead of Ruby strings because it allows us # to use mmap when it is available. + # + # pkg:gem/prism#lib/prism.rb:92 def parse_file_comments(*_arg0); end # Mirror the Prism.parse_file_failure? API by using the serialization API. # - # @return [Boolean] + # pkg:gem/prism#lib/prism.rb:92 def parse_file_failure?(*_arg0); end # Mirror the Prism.parse_file_success? API by using the serialization API. # - # @return [Boolean] + # pkg:gem/prism#lib/prism.rb:92 def parse_file_success?(*_arg0); end # Mirror the Prism.parse_lex API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def parse_lex(*_arg0); end # Mirror the Prism.parse_lex_file API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def parse_lex_file(*_arg0); end # Mirror the Prism.parse_stream API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def parse_stream(*_arg0); end # Mirror the Prism.parse_success? API by using the serialization API. # - # @return [Boolean] + # pkg:gem/prism#lib/prism.rb:92 def parse_success?(*_arg0); end # Mirror the Prism.profile API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def profile(*_arg0); end # Mirror the Prism.profile_file API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def profile_file(*_arg0); end # Create a new scope with the given locals and forwarding options that is # suitable for passing into one of the Prism.* methods that accepts the # `scopes` option. # - # source://prism//lib/prism/parse_result.rb#904 + # pkg:gem/prism#lib/prism/parse_result.rb:904 sig { params(locals: T::Array[Symbol], forwarding: T::Array[Symbol]).returns(Prism::Scope) } def scope(locals: T.unsafe(nil), forwarding: T.unsafe(nil)); end end @@ -140,17 +245,17 @@ end # eagerly converted to UTF-8, this class will be used as well. This is because # at that point we will treat everything as single-byte characters. # -# source://prism//lib/prism/parse_result.rb#250 +# pkg:gem/prism#lib/prism/parse_result.rb:250 class Prism::ASCIISource < ::Prism::Source # Return the column number in characters for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#257 + # pkg:gem/prism#lib/prism/parse_result.rb:257 sig { params(byte_offset: Integer).returns(Integer) } def character_column(byte_offset); end # Return the character offset for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#252 + # pkg:gem/prism#lib/prism/parse_result.rb:252 sig { params(byte_offset: Integer).returns(Integer) } def character_offset(byte_offset); end @@ -158,7 +263,7 @@ class Prism::ASCIISource < ::Prism::Source # same interface. We can do this because code units are always equivalent to # byte offsets for ASCII-only sources. # - # source://prism//lib/prism/parse_result.rb#274 + # pkg:gem/prism#lib/prism/parse_result.rb:274 sig do params( encoding: Encoding @@ -170,7 +275,7 @@ class Prism::ASCIISource < ::Prism::Source # `code_units_offset`, which is a more expensive operation. This is # essentially the same as `Prism::Source#column`. # - # source://prism//lib/prism/parse_result.rb#281 + # pkg:gem/prism#lib/prism/parse_result.rb:281 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -181,7 +286,7 @@ class Prism::ASCIISource < ::Prism::Source # concept of code units that differs from the number of characters in other # encodings, it is not captured here. # - # source://prism//lib/prism/parse_result.rb#267 + # pkg:gem/prism#lib/prism/parse_result.rb:267 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_offset(byte_offset, encoding); end end @@ -191,13 +296,11 @@ end # alias $foo $bar # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#334 +# pkg:gem/prism#lib/prism/node.rb:334 class Prism::AliasGlobalVariableNode < ::Prism::Node # Initialize a new AliasGlobalVariableNode node. # - # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode - # - # source://prism//lib/prism/node.rb#336 + # pkg:gem/prism#lib/prism/node.rb:336 sig do params( source: Prism::Source, @@ -214,36 +317,36 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#437 + # pkg:gem/prism#lib/prism/node.rb:437 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#347 + # pkg:gem/prism#lib/prism/node.rb:347 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#352 + # pkg:gem/prism#lib/prism/node.rb:352 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#370 + # pkg:gem/prism#lib/prism/node.rb:370 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#365 + # pkg:gem/prism#lib/prism/node.rb:365 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, ?old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, ?keyword_loc: Location) -> AliasGlobalVariableNode # - # source://prism//lib/prism/node.rb#375 + # pkg:gem/prism#lib/prism/node.rb:375 sig do params( node_id: Integer, @@ -256,24 +359,21 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#352 + # pkg:gem/prism#lib/prism/node.rb:380 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#383 + # pkg:gem/prism#lib/prism/node.rb:383 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [new_name] - # - # source://prism//lib/prism/node.rb#357 + # pkg:gem/prism#lib/prism/node.rb:357 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -281,13 +381,13 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#421 + # pkg:gem/prism#lib/prism/node.rb:421 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#416 + # pkg:gem/prism#lib/prism/node.rb:416 sig { returns(String) } def keyword; end @@ -296,7 +396,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^^ # - # source://prism//lib/prism/node.rb#403 + # pkg:gem/prism#lib/prism/node.rb:403 sig { returns(Prism::Location) } def keyword_loc; end @@ -305,7 +405,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^ # - # source://prism//lib/prism/node.rb#391 + # pkg:gem/prism#lib/prism/node.rb:391 sig { returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) } def new_name; end @@ -314,7 +414,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^ # - # source://prism//lib/prism/node.rb#397 + # pkg:gem/prism#lib/prism/node.rb:397 sig do returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode)) end @@ -323,19 +423,19 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#411 + # pkg:gem/prism#lib/prism/node.rb:411 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#426 + # pkg:gem/prism#lib/prism/node.rb:426 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#431 + # pkg:gem/prism#lib/prism/node.rb:431 def type; end end end @@ -345,13 +445,11 @@ end # alias foo bar # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#449 +# pkg:gem/prism#lib/prism/node.rb:449 class Prism::AliasMethodNode < ::Prism::Node # Initialize a new AliasMethodNode node. # - # @return [AliasMethodNode] a new instance of AliasMethodNode - # - # source://prism//lib/prism/node.rb#451 + # pkg:gem/prism#lib/prism/node.rb:451 sig do params( source: Prism::Source, @@ -368,36 +466,36 @@ class Prism::AliasMethodNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#564 + # pkg:gem/prism#lib/prism/node.rb:564 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#462 + # pkg:gem/prism#lib/prism/node.rb:462 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#467 + # pkg:gem/prism#lib/prism/node.rb:467 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#485 + # pkg:gem/prism#lib/prism/node.rb:485 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#480 + # pkg:gem/prism#lib/prism/node.rb:480 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: SymbolNode | InterpolatedSymbolNode, ?old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, ?keyword_loc: Location) -> AliasMethodNode # - # source://prism//lib/prism/node.rb#490 + # pkg:gem/prism#lib/prism/node.rb:490 sig do params( node_id: Integer, @@ -410,24 +508,21 @@ class Prism::AliasMethodNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#467 + # pkg:gem/prism#lib/prism/node.rb:495 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: SymbolNode | InterpolatedSymbolNode, old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#498 + # pkg:gem/prism#lib/prism/node.rb:498 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [new_name] - # - # source://prism//lib/prism/node.rb#472 + # pkg:gem/prism#lib/prism/node.rb:472 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -435,13 +530,13 @@ class Prism::AliasMethodNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#548 + # pkg:gem/prism#lib/prism/node.rb:548 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#543 + # pkg:gem/prism#lib/prism/node.rb:543 sig { returns(String) } def keyword; end @@ -450,7 +545,7 @@ class Prism::AliasMethodNode < ::Prism::Node # alias foo bar # ^^^^^ # - # source://prism//lib/prism/node.rb#530 + # pkg:gem/prism#lib/prism/node.rb:530 sig { returns(Prism::Location) } def keyword_loc; end @@ -465,7 +560,7 @@ class Prism::AliasMethodNode < ::Prism::Node # alias :"#{foo}" :"#{bar}" # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#512 + # pkg:gem/prism#lib/prism/node.rb:512 sig { returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)) } def new_name; end @@ -480,7 +575,7 @@ class Prism::AliasMethodNode < ::Prism::Node # alias :"#{foo}" :"#{bar}" # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#524 + # pkg:gem/prism#lib/prism/node.rb:524 sig do returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode)) end @@ -489,19 +584,19 @@ class Prism::AliasMethodNode < ::Prism::Node # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#538 + # pkg:gem/prism#lib/prism/node.rb:538 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#553 + # pkg:gem/prism#lib/prism/node.rb:553 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#558 + # pkg:gem/prism#lib/prism/node.rb:558 def type; end end end @@ -511,13 +606,11 @@ end # foo => bar | baz # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#576 +# pkg:gem/prism#lib/prism/node.rb:576 class Prism::AlternationPatternNode < ::Prism::Node # Initialize a new AlternationPatternNode node. # - # @return [AlternationPatternNode] a new instance of AlternationPatternNode - # - # source://prism//lib/prism/node.rb#578 + # pkg:gem/prism#lib/prism/node.rb:578 sig do params( source: Prism::Source, @@ -534,36 +627,36 @@ class Prism::AlternationPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#679 + # pkg:gem/prism#lib/prism/node.rb:679 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#589 + # pkg:gem/prism#lib/prism/node.rb:589 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#594 + # pkg:gem/prism#lib/prism/node.rb:594 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#612 + # pkg:gem/prism#lib/prism/node.rb:612 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#607 + # pkg:gem/prism#lib/prism/node.rb:607 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AlternationPatternNode # - # source://prism//lib/prism/node.rb#617 + # pkg:gem/prism#lib/prism/node.rb:617 sig do params( node_id: Integer, @@ -576,24 +669,21 @@ class Prism::AlternationPatternNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#594 + # pkg:gem/prism#lib/prism/node.rb:622 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#625 + # pkg:gem/prism#lib/prism/node.rb:625 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [left] - # - # source://prism//lib/prism/node.rb#599 + # pkg:gem/prism#lib/prism/node.rb:599 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -601,7 +691,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#663 + # pkg:gem/prism#lib/prism/node.rb:663 sig { override.returns(String) } def inspect; end @@ -610,13 +700,13 @@ class Prism::AlternationPatternNode < ::Prism::Node # foo => bar | baz # ^^^ # - # source://prism//lib/prism/node.rb#633 + # pkg:gem/prism#lib/prism/node.rb:633 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#658 + # pkg:gem/prism#lib/prism/node.rb:658 sig { returns(String) } def operator; end @@ -625,7 +715,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # foo => bar | baz # ^ # - # source://prism//lib/prism/node.rb#645 + # pkg:gem/prism#lib/prism/node.rb:645 sig { returns(Prism::Location) } def operator_loc; end @@ -634,26 +724,26 @@ class Prism::AlternationPatternNode < ::Prism::Node # foo => bar | baz # ^^^ # - # source://prism//lib/prism/node.rb#639 + # pkg:gem/prism#lib/prism/node.rb:639 sig { returns(Prism::Node) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#653 + # pkg:gem/prism#lib/prism/node.rb:653 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#668 + # pkg:gem/prism#lib/prism/node.rb:668 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#673 + # pkg:gem/prism#lib/prism/node.rb:673 def type; end end end @@ -663,13 +753,11 @@ end # left and right # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#691 +# pkg:gem/prism#lib/prism/node.rb:691 class Prism::AndNode < ::Prism::Node # Initialize a new AndNode node. # - # @return [AndNode] a new instance of AndNode - # - # source://prism//lib/prism/node.rb#693 + # pkg:gem/prism#lib/prism/node.rb:693 sig do params( source: Prism::Source, @@ -686,36 +774,36 @@ class Prism::AndNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#800 + # pkg:gem/prism#lib/prism/node.rb:800 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#704 + # pkg:gem/prism#lib/prism/node.rb:704 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#709 + # pkg:gem/prism#lib/prism/node.rb:709 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#727 + # pkg:gem/prism#lib/prism/node.rb:727 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#722 + # pkg:gem/prism#lib/prism/node.rb:722 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AndNode # - # source://prism//lib/prism/node.rb#732 + # pkg:gem/prism#lib/prism/node.rb:732 sig do params( node_id: Integer, @@ -728,24 +816,21 @@ class Prism::AndNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#709 + # pkg:gem/prism#lib/prism/node.rb:737 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#740 + # pkg:gem/prism#lib/prism/node.rb:740 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [left] - # - # source://prism//lib/prism/node.rb#714 + # pkg:gem/prism#lib/prism/node.rb:714 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -753,7 +838,7 @@ class Prism::AndNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#784 + # pkg:gem/prism#lib/prism/node.rb:784 sig { override.returns(String) } def inspect; end @@ -765,13 +850,13 @@ class Prism::AndNode < ::Prism::Node # 1 && 2 # ^ # - # source://prism//lib/prism/node.rb#751 + # pkg:gem/prism#lib/prism/node.rb:751 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#779 + # pkg:gem/prism#lib/prism/node.rb:779 sig { returns(String) } def operator; end @@ -780,7 +865,7 @@ class Prism::AndNode < ::Prism::Node # left and right # ^^^ # - # source://prism//lib/prism/node.rb#766 + # pkg:gem/prism#lib/prism/node.rb:766 sig { returns(Prism::Location) } def operator_loc; end @@ -792,26 +877,26 @@ class Prism::AndNode < ::Prism::Node # 1 and 2 # ^ # - # source://prism//lib/prism/node.rb#760 + # pkg:gem/prism#lib/prism/node.rb:760 sig { returns(Prism::Node) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#774 + # pkg:gem/prism#lib/prism/node.rb:774 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#789 + # pkg:gem/prism#lib/prism/node.rb:789 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#794 + # pkg:gem/prism#lib/prism/node.rb:794 def type; end end end @@ -821,13 +906,11 @@ end # return foo, bar, baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#812 +# pkg:gem/prism#lib/prism/node.rb:812 class Prism::ArgumentsNode < ::Prism::Node # Initialize a new ArgumentsNode node. # - # @return [ArgumentsNode] a new instance of ArgumentsNode - # - # source://prism//lib/prism/node.rb#814 + # pkg:gem/prism#lib/prism/node.rb:814 sig do params( source: Prism::Source, @@ -842,12 +925,12 @@ class Prism::ArgumentsNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#910 + # pkg:gem/prism#lib/prism/node.rb:910 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#823 + # pkg:gem/prism#lib/prism/node.rb:823 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -856,71 +939,61 @@ class Prism::ArgumentsNode < ::Prism::Node # foo(bar, baz) # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#891 + # pkg:gem/prism#lib/prism/node.rb:891 sig { returns(T::Array[Prism::Node]) } def arguments; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#828 + # pkg:gem/prism#lib/prism/node.rb:828 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#845 + # pkg:gem/prism#lib/prism/node.rb:845 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#840 + # pkg:gem/prism#lib/prism/node.rb:840 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def contains_forwarding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#863 + # pkg:gem/prism#lib/prism/node.rb:863 sig { returns(T::Boolean) } def contains_forwarding?; end # def contains_keyword_splat?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#873 + # pkg:gem/prism#lib/prism/node.rb:873 sig { returns(T::Boolean) } def contains_keyword_splat?; end # def contains_keywords?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#868 + # pkg:gem/prism#lib/prism/node.rb:868 sig { returns(T::Boolean) } def contains_keywords?; end # def contains_multiple_splats?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#883 + # pkg:gem/prism#lib/prism/node.rb:883 sig { returns(T::Boolean) } def contains_multiple_splats?; end # def contains_splat?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#878 + # pkg:gem/prism#lib/prism/node.rb:878 sig { returns(T::Boolean) } def contains_splat?; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: Array[Prism::node]) -> ArgumentsNode # - # source://prism//lib/prism/node.rb#850 + # pkg:gem/prism#lib/prism/node.rb:850 sig do params( node_id: Integer, @@ -931,22 +1004,21 @@ class Prism::ArgumentsNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#828 + # pkg:gem/prism#lib/prism/node.rb:855 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: Array[Prism::node] } # - # source://prism//lib/prism/node.rb#858 + # pkg:gem/prism#lib/prism/node.rb:858 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#833 + # pkg:gem/prism#lib/prism/node.rb:833 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -954,52 +1026,52 @@ class Prism::ArgumentsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#894 + # pkg:gem/prism#lib/prism/node.rb:894 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#899 + # pkg:gem/prism#lib/prism/node.rb:899 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#904 + # pkg:gem/prism#lib/prism/node.rb:904 def type; end end end # Flags for arguments nodes. # -# source://prism//lib/prism/node.rb#19780 +# pkg:gem/prism#lib/prism/node.rb:19780 module Prism::ArgumentsNodeFlags; end # if the arguments contain forwarding # -# source://prism//lib/prism/node.rb#19782 +# pkg:gem/prism#lib/prism/node.rb:19782 Prism::ArgumentsNodeFlags::CONTAINS_FORWARDING = T.let(T.unsafe(nil), Integer) # if the arguments contain keywords # -# source://prism//lib/prism/node.rb#19785 +# pkg:gem/prism#lib/prism/node.rb:19785 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) # if the arguments contain a keyword splat # -# source://prism//lib/prism/node.rb#19788 +# pkg:gem/prism#lib/prism/node.rb:19788 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) # if the arguments contain multiple splats # -# source://prism//lib/prism/node.rb#19794 +# pkg:gem/prism#lib/prism/node.rb:19794 Prism::ArgumentsNodeFlags::CONTAINS_MULTIPLE_SPLATS = T.let(T.unsafe(nil), Integer) # if the arguments contain a splat # -# source://prism//lib/prism/node.rb#19791 +# pkg:gem/prism#lib/prism/node.rb:19791 Prism::ArgumentsNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. @@ -1007,13 +1079,11 @@ Prism::ArgumentsNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # [1, 2, 3] # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#922 +# pkg:gem/prism#lib/prism/node.rb:922 class Prism::ArrayNode < ::Prism::Node # Initialize a new ArrayNode node. # - # @return [ArrayNode] a new instance of ArrayNode - # - # source://prism//lib/prism/node.rb#924 + # pkg:gem/prism#lib/prism/node.rb:924 sig do params( source: Prism::Source, @@ -1030,24 +1100,24 @@ class Prism::ArrayNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1057 + # pkg:gem/prism#lib/prism/node.rb:1057 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#935 + # pkg:gem/prism#lib/prism/node.rb:935 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#940 + # pkg:gem/prism#lib/prism/node.rb:940 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#1036 + # pkg:gem/prism#lib/prism/node.rb:1036 sig { returns(T.nilable(String)) } def closing; end @@ -1058,33 +1128,31 @@ class Prism::ArrayNode < ::Prism::Node # %I(apple orange banana) # ")" # foo = 1, 2, 3 # nil # - # source://prism//lib/prism/node.rb#1012 + # pkg:gem/prism#lib/prism/node.rb:1012 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#957 + # pkg:gem/prism#lib/prism/node.rb:957 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#952 + # pkg:gem/prism#lib/prism/node.rb:952 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def contains_splat?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#975 + # pkg:gem/prism#lib/prism/node.rb:975 sig { returns(T::Boolean) } def contains_splat?; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayNode # - # source://prism//lib/prism/node.rb#962 + # pkg:gem/prism#lib/prism/node.rb:962 sig do params( node_id: Integer, @@ -1097,27 +1165,26 @@ class Prism::ArrayNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#940 + # pkg:gem/prism#lib/prism/node.rb:967 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#970 + # pkg:gem/prism#lib/prism/node.rb:970 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#945 + # pkg:gem/prism#lib/prism/node.rb:945 def each_child_node; end # Represent the list of zero or more [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression) within the array. # - # source://prism//lib/prism/node.rb#980 + # pkg:gem/prism#lib/prism/node.rb:980 sig { returns(T::Array[Prism::Node]) } def elements; end @@ -1126,13 +1193,13 @@ class Prism::ArrayNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1041 + # pkg:gem/prism#lib/prism/node.rb:1041 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#1031 + # pkg:gem/prism#lib/prism/node.rb:1031 sig { returns(T.nilable(String)) } def opening; end @@ -1143,44 +1210,44 @@ class Prism::ArrayNode < ::Prism::Node # %I(apple orange banana) # "%I(" # foo = 1, 2, 3 # nil # - # source://prism//lib/prism/node.rb#988 + # pkg:gem/prism#lib/prism/node.rb:988 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1026 + # pkg:gem/prism#lib/prism/node.rb:1026 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1002 + # pkg:gem/prism#lib/prism/node.rb:1002 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1046 + # pkg:gem/prism#lib/prism/node.rb:1046 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1051 + # pkg:gem/prism#lib/prism/node.rb:1051 def type; end end end # Flags for array nodes. # -# source://prism//lib/prism/node.rb#19798 +# pkg:gem/prism#lib/prism/node.rb:19798 module Prism::ArrayNodeFlags; end # if array contains splat nodes # -# source://prism//lib/prism/node.rb#19800 +# pkg:gem/prism#lib/prism/node.rb:19800 Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array pattern in pattern matching. @@ -1200,13 +1267,11 @@ Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # foo in Bar[1, 2, 3] # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1083 +# pkg:gem/prism#lib/prism/node.rb:1083 class Prism::ArrayPatternNode < ::Prism::Node # Initialize a new ArrayPatternNode node. # - # @return [ArrayPatternNode] a new instance of ArrayPatternNode - # - # source://prism//lib/prism/node.rb#1085 + # pkg:gem/prism#lib/prism/node.rb:1085 sig do params( source: Prism::Source, @@ -1226,24 +1291,24 @@ class Prism::ArrayPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1247 + # pkg:gem/prism#lib/prism/node.rb:1247 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1099 + # pkg:gem/prism#lib/prism/node.rb:1099 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1104 + # pkg:gem/prism#lib/prism/node.rb:1104 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#1226 + # pkg:gem/prism#lib/prism/node.rb:1226 sig { returns(T.nilable(String)) } def closing; end @@ -1252,19 +1317,19 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in [1, 2] # ^ # - # source://prism//lib/prism/node.rb#1202 + # pkg:gem/prism#lib/prism/node.rb:1202 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1129 + # pkg:gem/prism#lib/prism/node.rb:1129 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1119 + # pkg:gem/prism#lib/prism/node.rb:1119 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -1279,13 +1344,13 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in Bar::Baz[1, 2, 3] # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#1156 + # pkg:gem/prism#lib/prism/node.rb:1156 sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } def constant; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayPatternNode # - # source://prism//lib/prism/node.rb#1134 + # pkg:gem/prism#lib/prism/node.rb:1134 sig do params( node_id: Integer, @@ -1301,24 +1366,21 @@ class Prism::ArrayPatternNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1104 + # pkg:gem/prism#lib/prism/node.rb:1139 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#1142 + # pkg:gem/prism#lib/prism/node.rb:1142 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [constant] - # - # source://prism//lib/prism/node.rb#1109 + # pkg:gem/prism#lib/prism/node.rb:1109 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1326,13 +1388,13 @@ class Prism::ArrayPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1231 + # pkg:gem/prism#lib/prism/node.rb:1231 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#1221 + # pkg:gem/prism#lib/prism/node.rb:1221 sig { returns(T.nilable(String)) } def opening; end @@ -1341,7 +1403,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in [1, 2] # ^ # - # source://prism//lib/prism/node.rb#1180 + # pkg:gem/prism#lib/prism/node.rb:1180 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -1350,7 +1412,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in *bar, baz # ^^^ # - # source://prism//lib/prism/node.rb#1174 + # pkg:gem/prism#lib/prism/node.rb:1174 sig { returns(T::Array[Prism::Node]) } def posts; end @@ -1359,7 +1421,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in [1, 2] # ^ ^ # - # source://prism//lib/prism/node.rb#1162 + # pkg:gem/prism#lib/prism/node.rb:1162 sig { returns(T::Array[Prism::Node]) } def requireds; end @@ -1368,32 +1430,32 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in *bar # ^^^^ # - # source://prism//lib/prism/node.rb#1168 + # pkg:gem/prism#lib/prism/node.rb:1168 sig { returns(T.nilable(Prism::Node)) } def rest; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1216 + # pkg:gem/prism#lib/prism/node.rb:1216 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1194 + # pkg:gem/prism#lib/prism/node.rb:1194 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1236 + # pkg:gem/prism#lib/prism/node.rb:1236 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1241 + # pkg:gem/prism#lib/prism/node.rb:1241 def type; end end end @@ -1403,13 +1465,11 @@ end # { a => b } # ^^^^^^ # -# source://prism//lib/prism/node.rb#1264 +# pkg:gem/prism#lib/prism/node.rb:1264 class Prism::AssocNode < ::Prism::Node # Initialize a new AssocNode node. # - # @return [AssocNode] a new instance of AssocNode - # - # source://prism//lib/prism/node.rb#1266 + # pkg:gem/prism#lib/prism/node.rb:1266 sig do params( source: Prism::Source, @@ -1426,36 +1486,36 @@ class Prism::AssocNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1382 + # pkg:gem/prism#lib/prism/node.rb:1382 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1277 + # pkg:gem/prism#lib/prism/node.rb:1277 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1282 + # pkg:gem/prism#lib/prism/node.rb:1282 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1300 + # pkg:gem/prism#lib/prism/node.rb:1300 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1295 + # pkg:gem/prism#lib/prism/node.rb:1295 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?) -> AssocNode # - # source://prism//lib/prism/node.rb#1305 + # pkg:gem/prism#lib/prism/node.rb:1305 sig do params( node_id: Integer, @@ -1468,24 +1528,21 @@ class Prism::AssocNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1282 + # pkg:gem/prism#lib/prism/node.rb:1310 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, key: Prism::node, value: Prism::node, operator_loc: Location? } # - # source://prism//lib/prism/node.rb#1313 + # pkg:gem/prism#lib/prism/node.rb:1313 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [key] - # - # source://prism//lib/prism/node.rb#1287 + # pkg:gem/prism#lib/prism/node.rb:1287 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1493,7 +1550,7 @@ class Prism::AssocNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1366 + # pkg:gem/prism#lib/prism/node.rb:1366 sig { override.returns(String) } def inspect; end @@ -1508,13 +1565,13 @@ class Prism::AssocNode < ::Prism::Node # { def a; end => 1 } # ^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#1327 + # pkg:gem/prism#lib/prism/node.rb:1327 sig { returns(Prism::Node) } def key; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#1361 + # pkg:gem/prism#lib/prism/node.rb:1361 sig { returns(T.nilable(String)) } def operator; end @@ -1523,19 +1580,19 @@ class Prism::AssocNode < ::Prism::Node # { foo => bar } # ^^ # - # source://prism//lib/prism/node.rb#1342 + # pkg:gem/prism#lib/prism/node.rb:1342 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1356 + # pkg:gem/prism#lib/prism/node.rb:1356 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1371 + # pkg:gem/prism#lib/prism/node.rb:1371 sig { override.returns(Symbol) } def type; end @@ -1547,14 +1604,14 @@ class Prism::AssocNode < ::Prism::Node # { x: 1 } # ^ # - # source://prism//lib/prism/node.rb#1336 + # pkg:gem/prism#lib/prism/node.rb:1336 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1376 + # pkg:gem/prism#lib/prism/node.rb:1376 def type; end end end @@ -1564,13 +1621,11 @@ end # { **foo } # ^^^^^ # -# source://prism//lib/prism/node.rb#1394 +# pkg:gem/prism#lib/prism/node.rb:1394 class Prism::AssocSplatNode < ::Prism::Node # Initialize a new AssocSplatNode node. # - # @return [AssocSplatNode] a new instance of AssocSplatNode - # - # source://prism//lib/prism/node.rb#1396 + # pkg:gem/prism#lib/prism/node.rb:1396 sig do params( source: Prism::Source, @@ -1586,36 +1641,36 @@ class Prism::AssocSplatNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1491 + # pkg:gem/prism#lib/prism/node.rb:1491 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1406 + # pkg:gem/prism#lib/prism/node.rb:1406 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1411 + # pkg:gem/prism#lib/prism/node.rb:1411 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1430 + # pkg:gem/prism#lib/prism/node.rb:1430 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1423 + # pkg:gem/prism#lib/prism/node.rb:1423 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node?, ?operator_loc: Location) -> AssocSplatNode # - # source://prism//lib/prism/node.rb#1435 + # pkg:gem/prism#lib/prism/node.rb:1435 sig do params( node_id: Integer, @@ -1627,24 +1682,21 @@ class Prism::AssocSplatNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1411 + # pkg:gem/prism#lib/prism/node.rb:1440 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#1443 + # pkg:gem/prism#lib/prism/node.rb:1443 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#1416 + # pkg:gem/prism#lib/prism/node.rb:1416 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1652,13 +1704,13 @@ class Prism::AssocSplatNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1475 + # pkg:gem/prism#lib/prism/node.rb:1475 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1470 + # pkg:gem/prism#lib/prism/node.rb:1470 sig { returns(String) } def operator; end @@ -1667,19 +1719,19 @@ class Prism::AssocSplatNode < ::Prism::Node # { **x } # ^^ # - # source://prism//lib/prism/node.rb#1457 + # pkg:gem/prism#lib/prism/node.rb:1457 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1465 + # pkg:gem/prism#lib/prism/node.rb:1465 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1480 + # pkg:gem/prism#lib/prism/node.rb:1480 sig { override.returns(Symbol) } def type; end @@ -1688,21 +1740,19 @@ class Prism::AssocSplatNode < ::Prism::Node # { **foo } # ^^^ # - # source://prism//lib/prism/node.rb#1451 + # pkg:gem/prism#lib/prism/node.rb:1451 sig { returns(T.nilable(Prism::Node)) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1485 + # pkg:gem/prism#lib/prism/node.rb:1485 def type; end end end -# The FFI backend is used on other Ruby implementations. -# -# source://prism//lib/prism.rb#90 +# pkg:gem/prism#lib/prism.rb:90 Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # Represents reading a reference to a field in the previous match. @@ -1710,49 +1760,47 @@ Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # $' # ^^ # -# source://prism//lib/prism/node.rb#1502 +# pkg:gem/prism#lib/prism/node.rb:1502 class Prism::BackReferenceReadNode < ::Prism::Node # Initialize a new BackReferenceReadNode node. # - # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode - # - # source://prism//lib/prism/node.rb#1504 + # pkg:gem/prism#lib/prism/node.rb:1504 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1575 + # pkg:gem/prism#lib/prism/node.rb:1575 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1513 + # pkg:gem/prism#lib/prism/node.rb:1513 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1518 + # pkg:gem/prism#lib/prism/node.rb:1518 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1534 + # pkg:gem/prism#lib/prism/node.rb:1534 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1529 + # pkg:gem/prism#lib/prism/node.rb:1529 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BackReferenceReadNode # - # source://prism//lib/prism/node.rb#1539 + # pkg:gem/prism#lib/prism/node.rb:1539 sig do params( node_id: Integer, @@ -1763,22 +1811,21 @@ class Prism::BackReferenceReadNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1518 + # pkg:gem/prism#lib/prism/node.rb:1544 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#1547 + # pkg:gem/prism#lib/prism/node.rb:1547 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#1523 + # pkg:gem/prism#lib/prism/node.rb:1523 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1786,7 +1833,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1559 + # pkg:gem/prism#lib/prism/node.rb:1559 sig { override.returns(String) } def inspect; end @@ -1796,20 +1843,20 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # $+ # name `:$+` # - # source://prism//lib/prism/node.rb#1556 + # pkg:gem/prism#lib/prism/node.rb:1556 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1564 + # pkg:gem/prism#lib/prism/node.rb:1564 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1569 + # pkg:gem/prism#lib/prism/node.rb:1569 def type; end end end @@ -1819,24 +1866,24 @@ end # implement each one that they need. For a default implementation that # continues walking the tree, see the Visitor class. # -# source://prism//lib/prism/visitor.rb#17 +# pkg:gem/prism#lib/prism/visitor.rb:17 class Prism::BasicVisitor # Calls `accept` on the given node if it is not `nil`, which in turn should # call back into this visitor by calling the appropriate `visit_*` method. # - # source://prism//lib/prism/visitor.rb#20 + # pkg:gem/prism#lib/prism/visitor.rb:20 sig { params(node: T.nilable(Prism::Node)).void } def visit(node); end # Visits each node in `nodes` by calling `accept` on each one. # - # source://prism//lib/prism/visitor.rb#26 + # pkg:gem/prism#lib/prism/visitor.rb:26 sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void } def visit_all(nodes); end # Visits the child nodes of `node` by calling `accept` on each one. # - # source://prism//lib/prism/visitor.rb#32 + # pkg:gem/prism#lib/prism/visitor.rb:32 sig { params(node: Prism::Node).void } def visit_child_nodes(node); end end @@ -1848,13 +1895,11 @@ end # end # ^^^^^ # -# source://prism//lib/prism/node.rb#1587 +# pkg:gem/prism#lib/prism/node.rb:1587 class Prism::BeginNode < ::Prism::Node # Initialize a new BeginNode node. # - # @return [BeginNode] a new instance of BeginNode - # - # source://prism//lib/prism/node.rb#1589 + # pkg:gem/prism#lib/prism/node.rb:1589 sig do params( source: Prism::Source, @@ -1874,18 +1919,18 @@ class Prism::BeginNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1745 + # pkg:gem/prism#lib/prism/node.rb:1745 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1603 + # pkg:gem/prism#lib/prism/node.rb:1603 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1719 + # pkg:gem/prism#lib/prism/node.rb:1719 sig { returns(T.nilable(String)) } def begin_keyword; end @@ -1894,31 +1939,31 @@ class Prism::BeginNode < ::Prism::Node # begin x end # ^^^^^ # - # source://prism//lib/prism/node.rb#1654 + # pkg:gem/prism#lib/prism/node.rb:1654 sig { returns(T.nilable(Prism::Location)) } def begin_keyword_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1608 + # pkg:gem/prism#lib/prism/node.rb:1608 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1633 + # pkg:gem/prism#lib/prism/node.rb:1633 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1623 + # pkg:gem/prism#lib/prism/node.rb:1623 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?) -> BeginNode # - # source://prism//lib/prism/node.rb#1638 + # pkg:gem/prism#lib/prism/node.rb:1638 sig do params( node_id: Integer, @@ -1934,24 +1979,21 @@ class Prism::BeginNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1608 + # pkg:gem/prism#lib/prism/node.rb:1643 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#1646 + # pkg:gem/prism#lib/prism/node.rb:1646 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [statements] - # - # source://prism//lib/prism/node.rb#1613 + # pkg:gem/prism#lib/prism/node.rb:1613 def each_child_node; end # Represents the else clause within the begin block. @@ -1959,13 +2001,13 @@ class Prism::BeginNode < ::Prism::Node # begin x; rescue y; else z; end # ^^^^^^ # - # source://prism//lib/prism/node.rb#1688 + # pkg:gem/prism#lib/prism/node.rb:1688 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1724 + # pkg:gem/prism#lib/prism/node.rb:1724 sig { returns(T.nilable(String)) } def end_keyword; end @@ -1974,7 +2016,7 @@ class Prism::BeginNode < ::Prism::Node # begin x end # ^^^ # - # source://prism//lib/prism/node.rb#1700 + # pkg:gem/prism#lib/prism/node.rb:1700 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -1983,7 +2025,7 @@ class Prism::BeginNode < ::Prism::Node # begin x; ensure y; end # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#1694 + # pkg:gem/prism#lib/prism/node.rb:1694 sig { returns(T.nilable(Prism::EnsureNode)) } def ensure_clause; end @@ -1992,11 +2034,11 @@ class Prism::BeginNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1729 + # pkg:gem/prism#lib/prism/node.rb:1729 sig { override.returns(String) } def inspect; end - # source://prism//lib/prism/parse_result/newlines.rb#80 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:80 def newline_flag!(lines); end # Represents the rescue clause within the begin block. @@ -2004,20 +2046,20 @@ class Prism::BeginNode < ::Prism::Node # begin x; rescue y; end # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#1682 + # pkg:gem/prism#lib/prism/node.rb:1682 sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end # Save the begin_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1668 + # pkg:gem/prism#lib/prism/node.rb:1668 def save_begin_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1714 + # pkg:gem/prism#lib/prism/node.rb:1714 def save_end_keyword_loc(repository); end # Represents the statements within the begin block. @@ -2025,20 +2067,20 @@ class Prism::BeginNode < ::Prism::Node # begin x end # ^ # - # source://prism//lib/prism/node.rb#1676 + # pkg:gem/prism#lib/prism/node.rb:1676 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1734 + # pkg:gem/prism#lib/prism/node.rb:1734 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1739 + # pkg:gem/prism#lib/prism/node.rb:1739 def type; end end end @@ -2048,13 +2090,11 @@ end # bar(&args) # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1760 +# pkg:gem/prism#lib/prism/node.rb:1760 class Prism::BlockArgumentNode < ::Prism::Node # Initialize a new BlockArgumentNode node. # - # @return [BlockArgumentNode] a new instance of BlockArgumentNode - # - # source://prism//lib/prism/node.rb#1762 + # pkg:gem/prism#lib/prism/node.rb:1762 sig do params( source: Prism::Source, @@ -2070,36 +2110,36 @@ class Prism::BlockArgumentNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1857 + # pkg:gem/prism#lib/prism/node.rb:1857 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1772 + # pkg:gem/prism#lib/prism/node.rb:1772 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1777 + # pkg:gem/prism#lib/prism/node.rb:1777 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1796 + # pkg:gem/prism#lib/prism/node.rb:1796 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1789 + # pkg:gem/prism#lib/prism/node.rb:1789 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node?, ?operator_loc: Location) -> BlockArgumentNode # - # source://prism//lib/prism/node.rb#1801 + # pkg:gem/prism#lib/prism/node.rb:1801 sig do params( node_id: Integer, @@ -2111,24 +2151,21 @@ class Prism::BlockArgumentNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1777 + # pkg:gem/prism#lib/prism/node.rb:1806 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#1809 + # pkg:gem/prism#lib/prism/node.rb:1809 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [expression] - # - # source://prism//lib/prism/node.rb#1782 + # pkg:gem/prism#lib/prism/node.rb:1782 def each_child_node; end # The expression that is being passed as a block argument. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). @@ -2136,7 +2173,7 @@ class Prism::BlockArgumentNode < ::Prism::Node # foo(&args) # ^^^^^ # - # source://prism//lib/prism/node.rb#1817 + # pkg:gem/prism#lib/prism/node.rb:1817 sig { returns(T.nilable(Prism::Node)) } def expression; end @@ -2145,13 +2182,13 @@ class Prism::BlockArgumentNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1841 + # pkg:gem/prism#lib/prism/node.rb:1841 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1836 + # pkg:gem/prism#lib/prism/node.rb:1836 sig { returns(String) } def operator; end @@ -2160,26 +2197,26 @@ class Prism::BlockArgumentNode < ::Prism::Node # foo(&args) # ^ # - # source://prism//lib/prism/node.rb#1823 + # pkg:gem/prism#lib/prism/node.rb:1823 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1831 + # pkg:gem/prism#lib/prism/node.rb:1831 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1846 + # pkg:gem/prism#lib/prism/node.rb:1846 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1851 + # pkg:gem/prism#lib/prism/node.rb:1851 def type; end end end @@ -2189,49 +2226,47 @@ end # a { |; b| } # ^ # -# source://prism//lib/prism/node.rb#1868 +# pkg:gem/prism#lib/prism/node.rb:1868 class Prism::BlockLocalVariableNode < ::Prism::Node # Initialize a new BlockLocalVariableNode node. # - # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode - # - # source://prism//lib/prism/node.rb#1870 + # pkg:gem/prism#lib/prism/node.rb:1870 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1945 + # pkg:gem/prism#lib/prism/node.rb:1945 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1879 + # pkg:gem/prism#lib/prism/node.rb:1879 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1884 + # pkg:gem/prism#lib/prism/node.rb:1884 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1900 + # pkg:gem/prism#lib/prism/node.rb:1900 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1895 + # pkg:gem/prism#lib/prism/node.rb:1895 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BlockLocalVariableNode # - # source://prism//lib/prism/node.rb#1905 + # pkg:gem/prism#lib/prism/node.rb:1905 sig do params( node_id: Integer, @@ -2242,22 +2277,21 @@ class Prism::BlockLocalVariableNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1884 + # pkg:gem/prism#lib/prism/node.rb:1910 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#1913 + # pkg:gem/prism#lib/prism/node.rb:1913 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#1889 + # pkg:gem/prism#lib/prism/node.rb:1889 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -2265,7 +2299,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1929 + # pkg:gem/prism#lib/prism/node.rb:1929 sig { override.returns(String) } def inspect; end @@ -2274,28 +2308,26 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # a { |; b| } # name `:b` # ^ # - # source://prism//lib/prism/node.rb#1926 + # pkg:gem/prism#lib/prism/node.rb:1926 sig { returns(Symbol) } def name; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#1918 + # pkg:gem/prism#lib/prism/node.rb:1918 sig { returns(T::Boolean) } def repeated_parameter?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1934 + # pkg:gem/prism#lib/prism/node.rb:1934 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1939 + # pkg:gem/prism#lib/prism/node.rb:1939 def type; end end end @@ -2305,13 +2337,11 @@ end # [1, 2, 3].each { |i| puts x } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1956 +# pkg:gem/prism#lib/prism/node.rb:1956 class Prism::BlockNode < ::Prism::Node # Initialize a new BlockNode node. # - # @return [BlockNode] a new instance of BlockNode - # - # source://prism//lib/prism/node.rb#1958 + # pkg:gem/prism#lib/prism/node.rb:1958 sig do params( source: Prism::Source, @@ -2330,12 +2360,12 @@ class Prism::BlockNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2095 + # pkg:gem/prism#lib/prism/node.rb:2095 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1971 + # pkg:gem/prism#lib/prism/node.rb:1971 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2344,19 +2374,19 @@ class Prism::BlockNode < ::Prism::Node # [1, 2, 3].each { |i| puts x } # ^^^^^^ # - # source://prism//lib/prism/node.rb#2034 + # pkg:gem/prism#lib/prism/node.rb:2034 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1976 + # pkg:gem/prism#lib/prism/node.rb:1976 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#2074 + # pkg:gem/prism#lib/prism/node.rb:2074 sig { returns(String) } def closing; end @@ -2365,25 +2395,25 @@ class Prism::BlockNode < ::Prism::Node # [1, 2, 3].each { |i| puts x } # ^ # - # source://prism//lib/prism/node.rb#2056 + # pkg:gem/prism#lib/prism/node.rb:2056 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1997 + # pkg:gem/prism#lib/prism/node.rb:1997 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1989 + # pkg:gem/prism#lib/prism/node.rb:1989 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil, ?opening_loc: Location, ?closing_loc: Location) -> BlockNode # - # source://prism//lib/prism/node.rb#2002 + # pkg:gem/prism#lib/prism/node.rb:2002 sig do params( node_id: Integer, @@ -2398,24 +2428,21 @@ class Prism::BlockNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1976 + # pkg:gem/prism#lib/prism/node.rb:2007 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#2010 + # pkg:gem/prism#lib/prism/node.rb:2010 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [parameters] - # - # source://prism//lib/prism/node.rb#1981 + # pkg:gem/prism#lib/prism/node.rb:1981 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -2423,7 +2450,7 @@ class Prism::BlockNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#2079 + # pkg:gem/prism#lib/prism/node.rb:2079 sig { override.returns(String) } def inspect; end @@ -2432,13 +2459,13 @@ class Prism::BlockNode < ::Prism::Node # [1, 2, 3].each { |i| puts x } # locals: [:i] # ^ # - # source://prism//lib/prism/node.rb#2018 + # pkg:gem/prism#lib/prism/node.rb:2018 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#2069 + # pkg:gem/prism#lib/prism/node.rb:2069 sig { returns(String) } def opening; end @@ -2447,7 +2474,7 @@ class Prism::BlockNode < ::Prism::Node # [1, 2, 3].each { |i| puts x } # ^ # - # source://prism//lib/prism/node.rb#2040 + # pkg:gem/prism#lib/prism/node.rb:2040 sig { returns(Prism::Location) } def opening_loc; end @@ -2460,32 +2487,32 @@ class Prism::BlockNode < ::Prism::Node # [1, 2, 3].each { puts it } # ^^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#2028 + # pkg:gem/prism#lib/prism/node.rb:2028 sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2064 + # pkg:gem/prism#lib/prism/node.rb:2064 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2048 + # pkg:gem/prism#lib/prism/node.rb:2048 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2084 + # pkg:gem/prism#lib/prism/node.rb:2084 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2089 + # pkg:gem/prism#lib/prism/node.rb:2089 def type; end end end @@ -2496,13 +2523,11 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#2111 +# pkg:gem/prism#lib/prism/node.rb:2111 class Prism::BlockParameterNode < ::Prism::Node # Initialize a new BlockParameterNode node. # - # @return [BlockParameterNode] a new instance of BlockParameterNode - # - # source://prism//lib/prism/node.rb#2113 + # pkg:gem/prism#lib/prism/node.rb:2113 sig do params( source: Prism::Source, @@ -2519,36 +2544,36 @@ class Prism::BlockParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2235 + # pkg:gem/prism#lib/prism/node.rb:2235 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2124 + # pkg:gem/prism#lib/prism/node.rb:2124 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2129 + # pkg:gem/prism#lib/prism/node.rb:2129 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2145 + # pkg:gem/prism#lib/prism/node.rb:2145 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2140 + # pkg:gem/prism#lib/prism/node.rb:2140 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> BlockParameterNode # - # source://prism//lib/prism/node.rb#2150 + # pkg:gem/prism#lib/prism/node.rb:2150 sig do params( node_id: Integer, @@ -2561,22 +2586,21 @@ class Prism::BlockParameterNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2129 + # pkg:gem/prism#lib/prism/node.rb:2155 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#2158 + # pkg:gem/prism#lib/prism/node.rb:2158 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#2134 + # pkg:gem/prism#lib/prism/node.rb:2134 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -2584,7 +2608,7 @@ class Prism::BlockParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#2219 + # pkg:gem/prism#lib/prism/node.rb:2219 sig { override.returns(String) } def inspect; end @@ -2594,7 +2618,7 @@ class Prism::BlockParameterNode < ::Prism::Node # ^ # end # - # source://prism//lib/prism/node.rb#2172 + # pkg:gem/prism#lib/prism/node.rb:2172 sig { returns(T.nilable(Symbol)) } def name; end @@ -2603,13 +2627,13 @@ class Prism::BlockParameterNode < ::Prism::Node # def a(&b) # ^ # - # source://prism//lib/prism/node.rb#2178 + # pkg:gem/prism#lib/prism/node.rb:2178 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2214 + # pkg:gem/prism#lib/prism/node.rb:2214 sig { returns(String) } def operator; end @@ -2619,40 +2643,38 @@ class Prism::BlockParameterNode < ::Prism::Node # ^ # end # - # source://prism//lib/prism/node.rb#2201 + # pkg:gem/prism#lib/prism/node.rb:2201 sig { returns(Prism::Location) } def operator_loc; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2163 + # pkg:gem/prism#lib/prism/node.rb:2163 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2192 + # pkg:gem/prism#lib/prism/node.rb:2192 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2209 + # pkg:gem/prism#lib/prism/node.rb:2209 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2224 + # pkg:gem/prism#lib/prism/node.rb:2224 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2229 + # pkg:gem/prism#lib/prism/node.rb:2229 def type; end end end @@ -2666,13 +2688,11 @@ end # ^^^^^^^^^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#2252 +# pkg:gem/prism#lib/prism/node.rb:2252 class Prism::BlockParametersNode < ::Prism::Node # Initialize a new BlockParametersNode node. # - # @return [BlockParametersNode] a new instance of BlockParametersNode - # - # source://prism//lib/prism/node.rb#2254 + # pkg:gem/prism#lib/prism/node.rb:2254 sig do params( source: Prism::Source, @@ -2690,24 +2710,24 @@ class Prism::BlockParametersNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2408 + # pkg:gem/prism#lib/prism/node.rb:2408 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2266 + # pkg:gem/prism#lib/prism/node.rb:2266 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2271 + # pkg:gem/prism#lib/prism/node.rb:2271 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2387 + # pkg:gem/prism#lib/prism/node.rb:2387 sig { returns(T.nilable(String)) } def closing; end @@ -2720,25 +2740,25 @@ class Prism::BlockParametersNode < ::Prism::Node # ^ # end # - # source://prism//lib/prism/node.rb#2363 + # pkg:gem/prism#lib/prism/node.rb:2363 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2292 + # pkg:gem/prism#lib/prism/node.rb:2292 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2284 + # pkg:gem/prism#lib/prism/node.rb:2284 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?) -> BlockParametersNode # - # source://prism//lib/prism/node.rb#2297 + # pkg:gem/prism#lib/prism/node.rb:2297 sig do params( node_id: Integer, @@ -2752,24 +2772,21 @@ class Prism::BlockParametersNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2271 + # pkg:gem/prism#lib/prism/node.rb:2302 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#2305 + # pkg:gem/prism#lib/prism/node.rb:2305 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [parameters] - # - # source://prism//lib/prism/node.rb#2276 + # pkg:gem/prism#lib/prism/node.rb:2276 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -2777,7 +2794,7 @@ class Prism::BlockParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#2392 + # pkg:gem/prism#lib/prism/node.rb:2392 sig { override.returns(String) } def inspect; end @@ -2790,13 +2807,13 @@ class Prism::BlockParametersNode < ::Prism::Node # ^^^^^ # end # - # source://prism//lib/prism/node.rb#2327 + # pkg:gem/prism#lib/prism/node.rb:2327 sig { returns(T::Array[Prism::BlockLocalVariableNode]) } def locals; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2382 + # pkg:gem/prism#lib/prism/node.rb:2382 sig { returns(T.nilable(String)) } def opening; end @@ -2809,7 +2826,7 @@ class Prism::BlockParametersNode < ::Prism::Node # ^ # end # - # source://prism//lib/prism/node.rb#2337 + # pkg:gem/prism#lib/prism/node.rb:2337 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -2822,32 +2839,32 @@ class Prism::BlockParametersNode < ::Prism::Node # ^^^^^^^^ # end # - # source://prism//lib/prism/node.rb#2317 + # pkg:gem/prism#lib/prism/node.rb:2317 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2377 + # pkg:gem/prism#lib/prism/node.rb:2377 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2351 + # pkg:gem/prism#lib/prism/node.rb:2351 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2397 + # pkg:gem/prism#lib/prism/node.rb:2397 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2402 + # pkg:gem/prism#lib/prism/node.rb:2402 def type; end end end @@ -2857,13 +2874,11 @@ end # break foo # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2422 +# pkg:gem/prism#lib/prism/node.rb:2422 class Prism::BreakNode < ::Prism::Node # Initialize a new BreakNode node. # - # @return [BreakNode] a new instance of BreakNode - # - # source://prism//lib/prism/node.rb#2424 + # pkg:gem/prism#lib/prism/node.rb:2424 sig do params( source: Prism::Source, @@ -2879,12 +2894,12 @@ class Prism::BreakNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2519 + # pkg:gem/prism#lib/prism/node.rb:2519 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2434 + # pkg:gem/prism#lib/prism/node.rb:2434 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2893,31 +2908,31 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^ # - # source://prism//lib/prism/node.rb#2479 + # pkg:gem/prism#lib/prism/node.rb:2479 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2439 + # pkg:gem/prism#lib/prism/node.rb:2439 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2458 + # pkg:gem/prism#lib/prism/node.rb:2458 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2451 + # pkg:gem/prism#lib/prism/node.rb:2451 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> BreakNode # - # source://prism//lib/prism/node.rb#2463 + # pkg:gem/prism#lib/prism/node.rb:2463 sig do params( node_id: Integer, @@ -2929,24 +2944,21 @@ class Prism::BreakNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2439 + # pkg:gem/prism#lib/prism/node.rb:2468 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#2471 + # pkg:gem/prism#lib/prism/node.rb:2471 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [arguments] - # - # source://prism//lib/prism/node.rb#2444 + # pkg:gem/prism#lib/prism/node.rb:2444 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -2954,13 +2966,13 @@ class Prism::BreakNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#2503 + # pkg:gem/prism#lib/prism/node.rb:2503 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#2498 + # pkg:gem/prism#lib/prism/node.rb:2498 sig { returns(String) } def keyword; end @@ -2969,26 +2981,26 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^^^ # - # source://prism//lib/prism/node.rb#2485 + # pkg:gem/prism#lib/prism/node.rb:2485 sig { returns(Prism::Location) } def keyword_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2493 + # pkg:gem/prism#lib/prism/node.rb:2493 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2508 + # pkg:gem/prism#lib/prism/node.rb:2508 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2513 + # pkg:gem/prism#lib/prism/node.rb:2513 def type; end end end @@ -2998,13 +3010,11 @@ end # foo.bar &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2530 +# pkg:gem/prism#lib/prism/node.rb:2530 class Prism::CallAndWriteNode < ::Prism::Node # Initialize a new CallAndWriteNode node. # - # @return [CallAndWriteNode] a new instance of CallAndWriteNode - # - # source://prism//lib/prism/node.rb#2532 + # pkg:gem/prism#lib/prism/node.rb:2532 sig do params( source: Prism::Source, @@ -3025,26 +3035,24 @@ class Prism::CallAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2726 + # pkg:gem/prism#lib/prism/node.rb:2726 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2547 + # pkg:gem/prism#lib/prism/node.rb:2547 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2601 + # pkg:gem/prism#lib/prism/node.rb:2601 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2695 + # pkg:gem/prism#lib/prism/node.rb:2695 sig { returns(T.nilable(String)) } def call_operator; end @@ -3053,31 +3061,31 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^ # - # source://prism//lib/prism/node.rb#2620 + # pkg:gem/prism#lib/prism/node.rb:2620 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2552 + # pkg:gem/prism#lib/prism/node.rb:2552 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2573 + # pkg:gem/prism#lib/prism/node.rb:2573 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2565 + # pkg:gem/prism#lib/prism/node.rb:2565 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallAndWriteNode # - # source://prism//lib/prism/node.rb#2578 + # pkg:gem/prism#lib/prism/node.rb:2578 sig do params( node_id: Integer, @@ -3094,24 +3102,21 @@ class Prism::CallAndWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2552 + # pkg:gem/prism#lib/prism/node.rb:2583 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#2586 + # pkg:gem/prism#lib/prism/node.rb:2586 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [receiver] - # - # source://prism//lib/prism/node.rb#2557 + # pkg:gem/prism#lib/prism/node.rb:2557 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -3119,21 +3124,19 @@ class Prism::CallAndWriteNode < ::Prism::Node # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2606 + # pkg:gem/prism#lib/prism/node.rb:2606 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#2710 + # pkg:gem/prism#lib/prism/node.rb:2710 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2700 + # pkg:gem/prism#lib/prism/node.rb:2700 sig { returns(T.nilable(String)) } def message; end @@ -3142,13 +3145,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^^^ # - # source://prism//lib/prism/node.rb#2642 + # pkg:gem/prism#lib/prism/node.rb:2642 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2705 + # pkg:gem/prism#lib/prism/node.rb:2705 sig { returns(String) } def operator; end @@ -3157,7 +3160,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^^^ # - # source://prism//lib/prism/node.rb#2676 + # pkg:gem/prism#lib/prism/node.rb:2676 sig { returns(Prism::Location) } def operator_loc; end @@ -3166,7 +3169,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # read_name `:bar` # ^^^ # - # source://prism//lib/prism/node.rb#2664 + # pkg:gem/prism#lib/prism/node.rb:2664 sig { returns(Symbol) } def read_name; end @@ -3175,39 +3178,37 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^^^ # - # source://prism//lib/prism/node.rb#2614 + # pkg:gem/prism#lib/prism/node.rb:2614 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2591 + # pkg:gem/prism#lib/prism/node.rb:2591 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2634 + # pkg:gem/prism#lib/prism/node.rb:2634 def save_call_operator_loc(repository); end # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2656 + # pkg:gem/prism#lib/prism/node.rb:2656 def save_message_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2684 + # pkg:gem/prism#lib/prism/node.rb:2684 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2715 + # pkg:gem/prism#lib/prism/node.rb:2715 sig { override.returns(Symbol) } def type; end @@ -3216,15 +3217,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^^^^^ # - # source://prism//lib/prism/node.rb#2692 + # pkg:gem/prism#lib/prism/node.rb:2692 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2596 + # pkg:gem/prism#lib/prism/node.rb:2596 sig { returns(T::Boolean) } def variable_call?; end @@ -3233,14 +3232,14 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # write_name `:bar=` # ^^^ # - # source://prism//lib/prism/node.rb#2670 + # pkg:gem/prism#lib/prism/node.rb:2670 sig { returns(Symbol) } def write_name; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2720 + # pkg:gem/prism#lib/prism/node.rb:2720 def type; end end end @@ -3265,13 +3264,11 @@ end # foo&.bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#2758 +# pkg:gem/prism#lib/prism/node.rb:2758 class Prism::CallNode < ::Prism::Node # Initialize a new CallNode node. # - # @return [CallNode] a new instance of CallNode - # - # source://prism//lib/prism/node.rb#2760 + # pkg:gem/prism#lib/prism/node.rb:2760 sig do params( source: Prism::Source, @@ -3294,12 +3291,12 @@ class Prism::CallNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3029 + # pkg:gem/prism#lib/prism/node.rb:3029 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2777 + # pkg:gem/prism#lib/prism/node.rb:2777 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3308,15 +3305,13 @@ class Prism::CallNode < ::Prism::Node # foo(bar) # ^^^ # - # source://prism//lib/prism/node.rb#2932 + # pkg:gem/prism#lib/prism/node.rb:2932 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2833 + # pkg:gem/prism#lib/prism/node.rb:2833 sig { returns(T::Boolean) } def attribute_write?; end @@ -3325,13 +3320,13 @@ class Prism::CallNode < ::Prism::Node # foo { |a| a } # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#2985 + # pkg:gem/prism#lib/prism/node.rb:2985 sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2988 + # pkg:gem/prism#lib/prism/node.rb:2988 sig { returns(T.nilable(String)) } def call_operator; end @@ -3343,19 +3338,19 @@ class Prism::CallNode < ::Prism::Node # foo&.bar # ^^ # - # source://prism//lib/prism/node.rb#2861 + # pkg:gem/prism#lib/prism/node.rb:2861 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2782 + # pkg:gem/prism#lib/prism/node.rb:2782 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#3003 + # pkg:gem/prism#lib/prism/node.rb:3003 sig { returns(T.nilable(String)) } def closing; end @@ -3364,25 +3359,25 @@ class Prism::CallNode < ::Prism::Node # foo(bar) # ^ # - # source://prism//lib/prism/node.rb#2938 + # pkg:gem/prism#lib/prism/node.rb:2938 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2805 + # pkg:gem/prism#lib/prism/node.rb:2805 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2796 + # pkg:gem/prism#lib/prism/node.rb:2796 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?equal_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> CallNode # - # source://prism//lib/prism/node.rb#2810 + # pkg:gem/prism#lib/prism/node.rb:2810 sig do params( node_id: Integer, @@ -3401,29 +3396,26 @@ class Prism::CallNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), block: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2782 + # pkg:gem/prism#lib/prism/node.rb:2815 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, equal_loc: Location?, block: BlockNode | BlockArgumentNode | nil } # - # source://prism//lib/prism/node.rb#2818 + # pkg:gem/prism#lib/prism/node.rb:2818 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [receiver] - # - # source://prism//lib/prism/node.rb#2787 + # pkg:gem/prism#lib/prism/node.rb:2787 def each_child_node; end # def equal: () -> String? # - # source://prism//lib/prism/node.rb#3008 + # pkg:gem/prism#lib/prism/node.rb:3008 sig { returns(T.nilable(String)) } def equal; end @@ -3435,7 +3427,7 @@ class Prism::CallNode < ::Prism::Node # foo[bar] = value # ^ # - # source://prism//lib/prism/node.rb#2963 + # pkg:gem/prism#lib/prism/node.rb:2963 sig { returns(T.nilable(Prism::Location)) } def equal_loc; end @@ -3452,27 +3444,25 @@ class Prism::CallNode < ::Prism::Node # sometimes you want the location of the full message including the inner # space and the = sign. This method provides that. # - # source://prism//lib/prism/node_ext.rb#334 + # pkg:gem/prism#lib/prism/node_ext.rb:334 sig { returns(T.nilable(Prism::Location)) } def full_message_loc; end # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2838 + # pkg:gem/prism#lib/prism/node.rb:2838 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3013 + # pkg:gem/prism#lib/prism/node.rb:3013 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2993 + # pkg:gem/prism#lib/prism/node.rb:2993 sig { returns(T.nilable(String)) } def message; end @@ -3481,7 +3471,7 @@ class Prism::CallNode < ::Prism::Node # foo.bar # ^^^ # - # source://prism//lib/prism/node.rb#2889 + # pkg:gem/prism#lib/prism/node.rb:2889 sig { returns(T.nilable(Prism::Location)) } def message_loc; end @@ -3490,13 +3480,13 @@ class Prism::CallNode < ::Prism::Node # foo.bar # name `:foo` # ^^^ # - # source://prism//lib/prism/node.rb#2883 + # pkg:gem/prism#lib/prism/node.rb:2883 sig { returns(Symbol) } def name; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2998 + # pkg:gem/prism#lib/prism/node.rb:2998 sig { returns(T.nilable(String)) } def opening; end @@ -3504,7 +3494,7 @@ class Prism::CallNode < ::Prism::Node # foo(bar) # ^ # - # source://prism//lib/prism/node.rb#2910 + # pkg:gem/prism#lib/prism/node.rb:2910 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -3519,93 +3509,89 @@ class Prism::CallNode < ::Prism::Node # foo + bar # ^^^ # - # source://prism//lib/prism/node.rb#2852 + # pkg:gem/prism#lib/prism/node.rb:2852 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2823 + # pkg:gem/prism#lib/prism/node.rb:2823 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2875 + # pkg:gem/prism#lib/prism/node.rb:2875 def save_call_operator_loc(repository); end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2952 + # pkg:gem/prism#lib/prism/node.rb:2952 def save_closing_loc(repository); end # Save the equal_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2977 + # pkg:gem/prism#lib/prism/node.rb:2977 def save_equal_loc(repository); end # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2903 + # pkg:gem/prism#lib/prism/node.rb:2903 def save_message_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2924 + # pkg:gem/prism#lib/prism/node.rb:2924 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3018 + # pkg:gem/prism#lib/prism/node.rb:3018 sig { override.returns(Symbol) } def type; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2828 + # pkg:gem/prism#lib/prism/node.rb:2828 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3023 + # pkg:gem/prism#lib/prism/node.rb:3023 def type; end end end # Flags for call nodes. # -# source://prism//lib/prism/node.rb#19804 +# pkg:gem/prism#lib/prism/node.rb:19804 module Prism::CallNodeFlags; end # a call that is an attribute write, so the value being written should be returned # -# source://prism//lib/prism/node.rb#19812 +# pkg:gem/prism#lib/prism/node.rb:19812 Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) # a call that ignores method visibility # -# source://prism//lib/prism/node.rb#19815 +# pkg:gem/prism#lib/prism/node.rb:19815 Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) # &. operator # -# source://prism//lib/prism/node.rb#19806 +# pkg:gem/prism#lib/prism/node.rb:19806 Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) # a call that could have been a local variable # -# source://prism//lib/prism/node.rb#19809 +# pkg:gem/prism#lib/prism/node.rb:19809 Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # Represents the use of an assignment operator on a call. @@ -3613,13 +3599,11 @@ Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # foo.bar += baz # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3048 +# pkg:gem/prism#lib/prism/node.rb:3048 class Prism::CallOperatorWriteNode < ::Prism::Node # Initialize a new CallOperatorWriteNode node. # - # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode - # - # source://prism//lib/prism/node.rb#3050 + # pkg:gem/prism#lib/prism/node.rb:3050 sig do params( source: Prism::Source, @@ -3641,20 +3625,18 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3246 + # pkg:gem/prism#lib/prism/node.rb:3246 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3066 + # pkg:gem/prism#lib/prism/node.rb:3066 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3120 + # pkg:gem/prism#lib/prism/node.rb:3120 sig { returns(T::Boolean) } def attribute_write?; end @@ -3663,7 +3645,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # binary_operator `:+` # ^ # - # source://prism//lib/prism/node.rb#3195 + # pkg:gem/prism#lib/prism/node.rb:3195 sig { returns(Symbol) } def binary_operator; end @@ -3672,13 +3654,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^^ # - # source://prism//lib/prism/node.rb#3201 + # pkg:gem/prism#lib/prism/node.rb:3201 sig { returns(Prism::Location) } def binary_operator_loc; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#3220 + # pkg:gem/prism#lib/prism/node.rb:3220 sig { returns(T.nilable(String)) } def call_operator; end @@ -3687,31 +3669,31 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^ # - # source://prism//lib/prism/node.rb#3139 + # pkg:gem/prism#lib/prism/node.rb:3139 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3071 + # pkg:gem/prism#lib/prism/node.rb:3071 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3092 + # pkg:gem/prism#lib/prism/node.rb:3092 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3084 + # pkg:gem/prism#lib/prism/node.rb:3084 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> CallOperatorWriteNode # - # source://prism//lib/prism/node.rb#3097 + # pkg:gem/prism#lib/prism/node.rb:3097 sig do params( node_id: Integer, @@ -3729,24 +3711,21 @@ class Prism::CallOperatorWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3071 + # pkg:gem/prism#lib/prism/node.rb:3102 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#3105 + # pkg:gem/prism#lib/prism/node.rb:3105 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [receiver] - # - # source://prism//lib/prism/node.rb#3076 + # pkg:gem/prism#lib/prism/node.rb:3076 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -3754,21 +3733,19 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3125 + # pkg:gem/prism#lib/prism/node.rb:3125 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3230 + # pkg:gem/prism#lib/prism/node.rb:3230 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#3225 + # pkg:gem/prism#lib/prism/node.rb:3225 sig { returns(T.nilable(String)) } def message; end @@ -3777,20 +3754,20 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^^^ # - # source://prism//lib/prism/node.rb#3161 + # pkg:gem/prism#lib/prism/node.rb:3161 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#342 + # pkg:gem/prism#lib/prism/node_ext.rb:342 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#349 + # pkg:gem/prism#lib/prism/node_ext.rb:349 def operator_loc; end # Represents the name of the method being called. @@ -3798,7 +3775,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # read_name `:bar` # ^^^ # - # source://prism//lib/prism/node.rb#3183 + # pkg:gem/prism#lib/prism/node.rb:3183 sig { returns(Symbol) } def read_name; end @@ -3807,39 +3784,37 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^^^ # - # source://prism//lib/prism/node.rb#3133 + # pkg:gem/prism#lib/prism/node.rb:3133 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3110 + # pkg:gem/prism#lib/prism/node.rb:3110 sig { returns(T::Boolean) } def safe_navigation?; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3209 + # pkg:gem/prism#lib/prism/node.rb:3209 def save_binary_operator_loc(repository); end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3153 + # pkg:gem/prism#lib/prism/node.rb:3153 def save_call_operator_loc(repository); end # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3175 + # pkg:gem/prism#lib/prism/node.rb:3175 def save_message_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3235 + # pkg:gem/prism#lib/prism/node.rb:3235 sig { override.returns(Symbol) } def type; end @@ -3848,15 +3823,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^^^^^ # - # source://prism//lib/prism/node.rb#3217 + # pkg:gem/prism#lib/prism/node.rb:3217 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3115 + # pkg:gem/prism#lib/prism/node.rb:3115 sig { returns(T::Boolean) } def variable_call?; end @@ -3865,14 +3838,14 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # write_name `:bar=` # ^^^ # - # source://prism//lib/prism/node.rb#3189 + # pkg:gem/prism#lib/prism/node.rb:3189 sig { returns(Symbol) } def write_name; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3240 + # pkg:gem/prism#lib/prism/node.rb:3240 def type; end end end @@ -3882,13 +3855,11 @@ end # foo.bar ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3264 +# pkg:gem/prism#lib/prism/node.rb:3264 class Prism::CallOrWriteNode < ::Prism::Node # Initialize a new CallOrWriteNode node. # - # @return [CallOrWriteNode] a new instance of CallOrWriteNode - # - # source://prism//lib/prism/node.rb#3266 + # pkg:gem/prism#lib/prism/node.rb:3266 sig do params( source: Prism::Source, @@ -3909,26 +3880,24 @@ class Prism::CallOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3460 + # pkg:gem/prism#lib/prism/node.rb:3460 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3281 + # pkg:gem/prism#lib/prism/node.rb:3281 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3335 + # pkg:gem/prism#lib/prism/node.rb:3335 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#3429 + # pkg:gem/prism#lib/prism/node.rb:3429 sig { returns(T.nilable(String)) } def call_operator; end @@ -3937,31 +3906,31 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^ # - # source://prism//lib/prism/node.rb#3354 + # pkg:gem/prism#lib/prism/node.rb:3354 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3286 + # pkg:gem/prism#lib/prism/node.rb:3286 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3307 + # pkg:gem/prism#lib/prism/node.rb:3307 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3299 + # pkg:gem/prism#lib/prism/node.rb:3299 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallOrWriteNode # - # source://prism//lib/prism/node.rb#3312 + # pkg:gem/prism#lib/prism/node.rb:3312 sig do params( node_id: Integer, @@ -3978,24 +3947,21 @@ class Prism::CallOrWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3286 + # pkg:gem/prism#lib/prism/node.rb:3317 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#3320 + # pkg:gem/prism#lib/prism/node.rb:3320 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [receiver] - # - # source://prism//lib/prism/node.rb#3291 + # pkg:gem/prism#lib/prism/node.rb:3291 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4003,21 +3969,19 @@ class Prism::CallOrWriteNode < ::Prism::Node # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3340 + # pkg:gem/prism#lib/prism/node.rb:3340 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3444 + # pkg:gem/prism#lib/prism/node.rb:3444 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#3434 + # pkg:gem/prism#lib/prism/node.rb:3434 sig { returns(T.nilable(String)) } def message; end @@ -4026,13 +3990,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^^^ # - # source://prism//lib/prism/node.rb#3376 + # pkg:gem/prism#lib/prism/node.rb:3376 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3439 + # pkg:gem/prism#lib/prism/node.rb:3439 sig { returns(String) } def operator; end @@ -4041,7 +4005,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^^^ # - # source://prism//lib/prism/node.rb#3410 + # pkg:gem/prism#lib/prism/node.rb:3410 sig { returns(Prism::Location) } def operator_loc; end @@ -4050,7 +4014,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # read_name `:bar` # ^^^ # - # source://prism//lib/prism/node.rb#3398 + # pkg:gem/prism#lib/prism/node.rb:3398 sig { returns(Symbol) } def read_name; end @@ -4059,39 +4023,37 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^^^ # - # source://prism//lib/prism/node.rb#3348 + # pkg:gem/prism#lib/prism/node.rb:3348 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3325 + # pkg:gem/prism#lib/prism/node.rb:3325 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3368 + # pkg:gem/prism#lib/prism/node.rb:3368 def save_call_operator_loc(repository); end # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3390 + # pkg:gem/prism#lib/prism/node.rb:3390 def save_message_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3418 + # pkg:gem/prism#lib/prism/node.rb:3418 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3449 + # pkg:gem/prism#lib/prism/node.rb:3449 sig { override.returns(Symbol) } def type; end @@ -4100,15 +4062,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^^^^^ # - # source://prism//lib/prism/node.rb#3426 + # pkg:gem/prism#lib/prism/node.rb:3426 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3330 + # pkg:gem/prism#lib/prism/node.rb:3330 sig { returns(T::Boolean) } def variable_call?; end @@ -4117,14 +4077,14 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # write_name `:bar=` # ^^^ # - # source://prism//lib/prism/node.rb#3404 + # pkg:gem/prism#lib/prism/node.rb:3404 sig { returns(Symbol) } def write_name; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3454 + # pkg:gem/prism#lib/prism/node.rb:3454 def type; end end end @@ -4142,13 +4102,11 @@ end # for foo.bar in baz do end # ^^^^^^^ # -# source://prism//lib/prism/node.rb#3485 +# pkg:gem/prism#lib/prism/node.rb:3485 class Prism::CallTargetNode < ::Prism::Node # Initialize a new CallTargetNode node. # - # @return [CallTargetNode] a new instance of CallTargetNode - # - # source://prism//lib/prism/node.rb#3487 + # pkg:gem/prism#lib/prism/node.rb:3487 sig do params( source: Prism::Source, @@ -4166,26 +4124,24 @@ class Prism::CallTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3629 + # pkg:gem/prism#lib/prism/node.rb:3629 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3499 + # pkg:gem/prism#lib/prism/node.rb:3499 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3549 + # pkg:gem/prism#lib/prism/node.rb:3549 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String # - # source://prism//lib/prism/node.rb#3603 + # pkg:gem/prism#lib/prism/node.rb:3603 sig { returns(String) } def call_operator; end @@ -4194,31 +4150,31 @@ class Prism::CallTargetNode < ::Prism::Node # foo.bar = 1 # ^ # - # source://prism//lib/prism/node.rb#3568 + # pkg:gem/prism#lib/prism/node.rb:3568 sig { returns(Prism::Location) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3504 + # pkg:gem/prism#lib/prism/node.rb:3504 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3521 + # pkg:gem/prism#lib/prism/node.rb:3521 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3516 + # pkg:gem/prism#lib/prism/node.rb:3516 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location) -> CallTargetNode # - # source://prism//lib/prism/node.rb#3526 + # pkg:gem/prism#lib/prism/node.rb:3526 sig do params( node_id: Integer, @@ -4232,24 +4188,21 @@ class Prism::CallTargetNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3504 + # pkg:gem/prism#lib/prism/node.rb:3531 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location } # - # source://prism//lib/prism/node.rb#3534 + # pkg:gem/prism#lib/prism/node.rb:3534 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [receiver] - # - # source://prism//lib/prism/node.rb#3509 + # pkg:gem/prism#lib/prism/node.rb:3509 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4257,21 +4210,19 @@ class Prism::CallTargetNode < ::Prism::Node # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3554 + # pkg:gem/prism#lib/prism/node.rb:3554 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3613 + # pkg:gem/prism#lib/prism/node.rb:3613 sig { override.returns(String) } def inspect; end # def message: () -> String # - # source://prism//lib/prism/node.rb#3608 + # pkg:gem/prism#lib/prism/node.rb:3608 sig { returns(String) } def message; end @@ -4280,7 +4231,7 @@ class Prism::CallTargetNode < ::Prism::Node # foo.bar = 1 # ^^^ # - # source://prism//lib/prism/node.rb#3590 + # pkg:gem/prism#lib/prism/node.rb:3590 sig { returns(Prism::Location) } def message_loc; end @@ -4289,7 +4240,7 @@ class Prism::CallTargetNode < ::Prism::Node # foo.bar = 1 # name `:foo` # ^^^ # - # source://prism//lib/prism/node.rb#3584 + # pkg:gem/prism#lib/prism/node.rb:3584 sig { returns(Symbol) } def name; end @@ -4298,48 +4249,44 @@ class Prism::CallTargetNode < ::Prism::Node # foo.bar = 1 # ^^^ # - # source://prism//lib/prism/node.rb#3562 + # pkg:gem/prism#lib/prism/node.rb:3562 sig { returns(Prism::Node) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3539 + # pkg:gem/prism#lib/prism/node.rb:3539 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3576 + # pkg:gem/prism#lib/prism/node.rb:3576 def save_call_operator_loc(repository); end # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3598 + # pkg:gem/prism#lib/prism/node.rb:3598 def save_message_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3618 + # pkg:gem/prism#lib/prism/node.rb:3618 sig { override.returns(Symbol) } def type; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3544 + # pkg:gem/prism#lib/prism/node.rb:3544 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3623 + # pkg:gem/prism#lib/prism/node.rb:3623 def type; end end end @@ -4349,13 +4296,11 @@ end # foo => [bar => baz] # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3643 +# pkg:gem/prism#lib/prism/node.rb:3643 class Prism::CapturePatternNode < ::Prism::Node # Initialize a new CapturePatternNode node. # - # @return [CapturePatternNode] a new instance of CapturePatternNode - # - # source://prism//lib/prism/node.rb#3645 + # pkg:gem/prism#lib/prism/node.rb:3645 sig do params( source: Prism::Source, @@ -4372,36 +4317,36 @@ class Prism::CapturePatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3746 + # pkg:gem/prism#lib/prism/node.rb:3746 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3656 + # pkg:gem/prism#lib/prism/node.rb:3656 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3661 + # pkg:gem/prism#lib/prism/node.rb:3661 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3679 + # pkg:gem/prism#lib/prism/node.rb:3679 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3674 + # pkg:gem/prism#lib/prism/node.rb:3674 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target: LocalVariableTargetNode, ?operator_loc: Location) -> CapturePatternNode # - # source://prism//lib/prism/node.rb#3684 + # pkg:gem/prism#lib/prism/node.rb:3684 sig do params( node_id: Integer, @@ -4414,24 +4359,21 @@ class Prism::CapturePatternNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3661 + # pkg:gem/prism#lib/prism/node.rb:3689 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: LocalVariableTargetNode, operator_loc: Location } # - # source://prism//lib/prism/node.rb#3692 + # pkg:gem/prism#lib/prism/node.rb:3692 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#3666 + # pkg:gem/prism#lib/prism/node.rb:3666 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4439,13 +4381,13 @@ class Prism::CapturePatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3730 + # pkg:gem/prism#lib/prism/node.rb:3730 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3725 + # pkg:gem/prism#lib/prism/node.rb:3725 sig { returns(String) } def operator; end @@ -4454,14 +4396,14 @@ class Prism::CapturePatternNode < ::Prism::Node # foo => bar # ^^ # - # source://prism//lib/prism/node.rb#3712 + # pkg:gem/prism#lib/prism/node.rb:3712 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3720 + # pkg:gem/prism#lib/prism/node.rb:3720 def save_operator_loc(repository); end # Represents the target of the capture. @@ -4469,13 +4411,13 @@ class Prism::CapturePatternNode < ::Prism::Node # foo => bar # ^^^ # - # source://prism//lib/prism/node.rb#3706 + # pkg:gem/prism#lib/prism/node.rb:3706 sig { returns(Prism::LocalVariableTargetNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3735 + # pkg:gem/prism#lib/prism/node.rb:3735 sig { override.returns(Symbol) } def type; end @@ -4484,14 +4426,14 @@ class Prism::CapturePatternNode < ::Prism::Node # foo => bar # ^^^ # - # source://prism//lib/prism/node.rb#3700 + # pkg:gem/prism#lib/prism/node.rb:3700 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3740 + # pkg:gem/prism#lib/prism/node.rb:3740 def type; end end end @@ -4503,13 +4445,11 @@ end # end # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3760 +# pkg:gem/prism#lib/prism/node.rb:3760 class Prism::CaseMatchNode < ::Prism::Node # Initialize a new CaseMatchNode node. # - # @return [CaseMatchNode] a new instance of CaseMatchNode - # - # source://prism//lib/prism/node.rb#3762 + # pkg:gem/prism#lib/prism/node.rb:3762 sig do params( source: Prism::Source, @@ -4528,18 +4468,18 @@ class Prism::CaseMatchNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3897 + # pkg:gem/prism#lib/prism/node.rb:3897 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3775 + # pkg:gem/prism#lib/prism/node.rb:3775 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3871 + # pkg:gem/prism#lib/prism/node.rb:3871 sig { returns(String) } def case_keyword; end @@ -4548,25 +4488,25 @@ class Prism::CaseMatchNode < ::Prism::Node # case true; in false; end # ^^^^ # - # source://prism//lib/prism/node.rb#3842 + # pkg:gem/prism#lib/prism/node.rb:3842 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3780 + # pkg:gem/prism#lib/prism/node.rb:3780 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3803 + # pkg:gem/prism#lib/prism/node.rb:3803 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3794 + # pkg:gem/prism#lib/prism/node.rb:3794 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -4575,19 +4515,19 @@ class Prism::CaseMatchNode < ::Prism::Node # case true; in false; end # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#3830 + # pkg:gem/prism#lib/prism/node.rb:3830 sig { returns(T::Array[Prism::InNode]) } def conditions; end # Returns the else clause of the case match node. This method is deprecated # in favor of #else_clause. # - # source://prism//lib/prism/node_ext.rb#470 + # pkg:gem/prism#lib/prism/node_ext.rb:470 def consequent; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[InNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseMatchNode # - # source://prism//lib/prism/node.rb#3808 + # pkg:gem/prism#lib/prism/node.rb:3808 sig do params( node_id: Integer, @@ -4602,24 +4542,21 @@ class Prism::CaseMatchNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3780 + # pkg:gem/prism#lib/prism/node.rb:3813 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[InNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#3816 + # pkg:gem/prism#lib/prism/node.rb:3816 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [predicate] - # - # source://prism//lib/prism/node.rb#3785 + # pkg:gem/prism#lib/prism/node.rb:3785 def each_child_node; end # Represents the else clause of the case match. @@ -4627,13 +4564,13 @@ class Prism::CaseMatchNode < ::Prism::Node # case true; in false; else; end # ^^^^ # - # source://prism//lib/prism/node.rb#3836 + # pkg:gem/prism#lib/prism/node.rb:3836 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3876 + # pkg:gem/prism#lib/prism/node.rb:3876 sig { returns(String) } def end_keyword; end @@ -4642,7 +4579,7 @@ class Prism::CaseMatchNode < ::Prism::Node # case true; in false; end # ^^^ # - # source://prism//lib/prism/node.rb#3858 + # pkg:gem/prism#lib/prism/node.rb:3858 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4651,7 +4588,7 @@ class Prism::CaseMatchNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3881 + # pkg:gem/prism#lib/prism/node.rb:3881 sig { override.returns(String) } def inspect; end @@ -4660,32 +4597,32 @@ class Prism::CaseMatchNode < ::Prism::Node # case true; in false; end # ^^^^ # - # source://prism//lib/prism/node.rb#3824 + # pkg:gem/prism#lib/prism/node.rb:3824 sig { returns(T.nilable(Prism::Node)) } def predicate; end # Save the case_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3850 + # pkg:gem/prism#lib/prism/node.rb:3850 def save_case_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3866 + # pkg:gem/prism#lib/prism/node.rb:3866 def save_end_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3886 + # pkg:gem/prism#lib/prism/node.rb:3886 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3891 + # pkg:gem/prism#lib/prism/node.rb:3891 def type; end end end @@ -4697,13 +4634,11 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3914 +# pkg:gem/prism#lib/prism/node.rb:3914 class Prism::CaseNode < ::Prism::Node # Initialize a new CaseNode node. # - # @return [CaseNode] a new instance of CaseNode - # - # source://prism//lib/prism/node.rb#3916 + # pkg:gem/prism#lib/prism/node.rb:3916 sig do params( source: Prism::Source, @@ -4722,18 +4657,18 @@ class Prism::CaseNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4051 + # pkg:gem/prism#lib/prism/node.rb:4051 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3929 + # pkg:gem/prism#lib/prism/node.rb:3929 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#4025 + # pkg:gem/prism#lib/prism/node.rb:4025 sig { returns(String) } def case_keyword; end @@ -4742,25 +4677,25 @@ class Prism::CaseNode < ::Prism::Node # case true; when false; end # ^^^^ # - # source://prism//lib/prism/node.rb#3996 + # pkg:gem/prism#lib/prism/node.rb:3996 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3934 + # pkg:gem/prism#lib/prism/node.rb:3934 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3957 + # pkg:gem/prism#lib/prism/node.rb:3957 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3948 + # pkg:gem/prism#lib/prism/node.rb:3948 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -4769,19 +4704,19 @@ class Prism::CaseNode < ::Prism::Node # case true; when false; end # ^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#3984 + # pkg:gem/prism#lib/prism/node.rb:3984 sig { returns(T::Array[Prism::WhenNode]) } def conditions; end # Returns the else clause of the case node. This method is deprecated in # favor of #else_clause. # - # source://prism//lib/prism/node_ext.rb#479 + # pkg:gem/prism#lib/prism/node_ext.rb:479 def consequent; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[WhenNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseNode # - # source://prism//lib/prism/node.rb#3962 + # pkg:gem/prism#lib/prism/node.rb:3962 sig do params( node_id: Integer, @@ -4796,24 +4731,21 @@ class Prism::CaseNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3934 + # pkg:gem/prism#lib/prism/node.rb:3967 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[WhenNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#3970 + # pkg:gem/prism#lib/prism/node.rb:3970 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [predicate] - # - # source://prism//lib/prism/node.rb#3939 + # pkg:gem/prism#lib/prism/node.rb:3939 def each_child_node; end # Represents the else clause of the case statement. @@ -4821,13 +4753,13 @@ class Prism::CaseNode < ::Prism::Node # case true; when false; else; end # ^^^^ # - # source://prism//lib/prism/node.rb#3990 + # pkg:gem/prism#lib/prism/node.rb:3990 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#4030 + # pkg:gem/prism#lib/prism/node.rb:4030 sig { returns(String) } def end_keyword; end @@ -4836,7 +4768,7 @@ class Prism::CaseNode < ::Prism::Node # case true; when false; end # ^^^ # - # source://prism//lib/prism/node.rb#4012 + # pkg:gem/prism#lib/prism/node.rb:4012 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4845,7 +4777,7 @@ class Prism::CaseNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4035 + # pkg:gem/prism#lib/prism/node.rb:4035 sig { override.returns(String) } def inspect; end @@ -4854,32 +4786,32 @@ class Prism::CaseNode < ::Prism::Node # case true; when false; end # ^^^^ # - # source://prism//lib/prism/node.rb#3978 + # pkg:gem/prism#lib/prism/node.rb:3978 sig { returns(T.nilable(Prism::Node)) } def predicate; end # Save the case_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4004 + # pkg:gem/prism#lib/prism/node.rb:4004 def save_case_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4020 + # pkg:gem/prism#lib/prism/node.rb:4020 def save_end_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4040 + # pkg:gem/prism#lib/prism/node.rb:4040 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4045 + # pkg:gem/prism#lib/prism/node.rb:4045 def type; end end end @@ -4889,13 +4821,11 @@ end # class Foo end # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4066 +# pkg:gem/prism#lib/prism/node.rb:4066 class Prism::ClassNode < ::Prism::Node # Initialize a new ClassNode node. # - # @return [ClassNode] a new instance of ClassNode - # - # source://prism//lib/prism/node.rb#4068 + # pkg:gem/prism#lib/prism/node.rb:4068 sig do params( source: Prism::Source, @@ -4917,12 +4847,12 @@ class Prism::ClassNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4239 + # pkg:gem/prism#lib/prism/node.rb:4239 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4084 + # pkg:gem/prism#lib/prism/node.rb:4084 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -4932,19 +4862,19 @@ class Prism::ClassNode < ::Prism::Node # foo # ^^^ # - # source://prism//lib/prism/node.rb#4184 + # pkg:gem/prism#lib/prism/node.rb:4184 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4089 + # pkg:gem/prism#lib/prism/node.rb:4089 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#4208 + # pkg:gem/prism#lib/prism/node.rb:4208 sig { returns(String) } def class_keyword; end @@ -4953,31 +4883,31 @@ class Prism::ClassNode < ::Prism::Node # class Foo end # ^^^^^ # - # source://prism//lib/prism/node.rb#4136 + # pkg:gem/prism#lib/prism/node.rb:4136 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4112 + # pkg:gem/prism#lib/prism/node.rb:4112 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4103 + # pkg:gem/prism#lib/prism/node.rb:4103 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode # - # source://prism//lib/prism/node.rb#4149 + # pkg:gem/prism#lib/prism/node.rb:4149 sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode)) } def constant_path; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | CallNode, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ClassNode # - # source://prism//lib/prism/node.rb#4117 + # pkg:gem/prism#lib/prism/node.rb:4117 sig do params( node_id: Integer, @@ -4995,29 +4925,26 @@ class Prism::ClassNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4089 + # pkg:gem/prism#lib/prism/node.rb:4122 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | CallNode, inheritance_operator_loc: Location?, superclass: Prism::node?, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#4125 + # pkg:gem/prism#lib/prism/node.rb:4125 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [constant_path] - # - # source://prism//lib/prism/node.rb#4094 + # pkg:gem/prism#lib/prism/node.rb:4094 def each_child_node; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#4218 + # pkg:gem/prism#lib/prism/node.rb:4218 sig { returns(String) } def end_keyword; end @@ -5026,7 +4953,7 @@ class Prism::ClassNode < ::Prism::Node # class Foo end # ^^^ # - # source://prism//lib/prism/node.rb#4190 + # pkg:gem/prism#lib/prism/node.rb:4190 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -5035,7 +4962,7 @@ class Prism::ClassNode < ::Prism::Node # def inheritance_operator: () -> String? # - # source://prism//lib/prism/node.rb#4213 + # pkg:gem/prism#lib/prism/node.rb:4213 sig { returns(T.nilable(String)) } def inheritance_operator; end @@ -5044,19 +4971,19 @@ class Prism::ClassNode < ::Prism::Node # class Foo < Bar # ^ # - # source://prism//lib/prism/node.rb#4155 + # pkg:gem/prism#lib/prism/node.rb:4155 sig { returns(T.nilable(Prism::Location)) } def inheritance_operator_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#4223 + # pkg:gem/prism#lib/prism/node.rb:4223 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#4130 + # pkg:gem/prism#lib/prism/node.rb:4130 sig { returns(T::Array[Symbol]) } def locals; end @@ -5064,26 +4991,26 @@ class Prism::ClassNode < ::Prism::Node # # class Foo end # name `:Foo` # - # source://prism//lib/prism/node.rb#4205 + # pkg:gem/prism#lib/prism/node.rb:4205 sig { returns(Symbol) } def name; end # Save the class_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4144 + # pkg:gem/prism#lib/prism/node.rb:4144 def save_class_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4198 + # pkg:gem/prism#lib/prism/node.rb:4198 def save_end_keyword_loc(repository); end # Save the inheritance_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4169 + # pkg:gem/prism#lib/prism/node.rb:4169 def save_inheritance_operator_loc(repository); end # Represents the superclass of the class. @@ -5091,20 +5018,20 @@ class Prism::ClassNode < ::Prism::Node # class Foo < Bar # ^^^ # - # source://prism//lib/prism/node.rb#4177 + # pkg:gem/prism#lib/prism/node.rb:4177 sig { returns(T.nilable(Prism::Node)) } def superclass; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4228 + # pkg:gem/prism#lib/prism/node.rb:4228 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4233 + # pkg:gem/prism#lib/prism/node.rb:4233 def type; end end end @@ -5114,13 +5041,11 @@ end # @@target &&= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4257 +# pkg:gem/prism#lib/prism/node.rb:4257 class Prism::ClassVariableAndWriteNode < ::Prism::Node # Initialize a new ClassVariableAndWriteNode node. # - # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#4259 + # pkg:gem/prism#lib/prism/node.rb:4259 sig do params( source: Prism::Source, @@ -5138,36 +5063,36 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4376 + # pkg:gem/prism#lib/prism/node.rb:4376 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4271 + # pkg:gem/prism#lib/prism/node.rb:4271 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4276 + # pkg:gem/prism#lib/prism/node.rb:4276 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4293 + # pkg:gem/prism#lib/prism/node.rb:4293 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4288 + # pkg:gem/prism#lib/prism/node.rb:4288 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableAndWriteNode # - # source://prism//lib/prism/node.rb#4298 + # pkg:gem/prism#lib/prism/node.rb:4298 sig do params( node_id: Integer, @@ -5181,27 +5106,24 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4276 + # pkg:gem/prism#lib/prism/node.rb:4303 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4306 + # pkg:gem/prism#lib/prism/node.rb:4306 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#165 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:165 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#4281 + # pkg:gem/prism#lib/prism/node.rb:4281 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5209,7 +5131,7 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4360 + # pkg:gem/prism#lib/prism/node.rb:4360 sig { override.returns(String) } def inspect; end @@ -5218,7 +5140,7 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # @@target &&= value # name `:@@target` # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#4314 + # pkg:gem/prism#lib/prism/node.rb:4314 sig { returns(Symbol) } def name; end @@ -5227,13 +5149,13 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # @@target &&= value # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#4320 + # pkg:gem/prism#lib/prism/node.rb:4320 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4355 + # pkg:gem/prism#lib/prism/node.rb:4355 sig { returns(String) } def operator; end @@ -5242,25 +5164,25 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # @@target &&= value # ^^^ # - # source://prism//lib/prism/node.rb#4336 + # pkg:gem/prism#lib/prism/node.rb:4336 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4328 + # pkg:gem/prism#lib/prism/node.rb:4328 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4344 + # pkg:gem/prism#lib/prism/node.rb:4344 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4365 + # pkg:gem/prism#lib/prism/node.rb:4365 sig { override.returns(Symbol) } def type; end @@ -5269,14 +5191,14 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # @@target &&= value # ^^^^^ # - # source://prism//lib/prism/node.rb#4352 + # pkg:gem/prism#lib/prism/node.rb:4352 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4370 + # pkg:gem/prism#lib/prism/node.rb:4370 def type; end end end @@ -5286,13 +5208,11 @@ end # @@target += value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4389 +# pkg:gem/prism#lib/prism/node.rb:4389 class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # Initialize a new ClassVariableOperatorWriteNode node. # - # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#4391 + # pkg:gem/prism#lib/prism/node.rb:4391 sig do params( source: Prism::Source, @@ -5311,48 +5231,48 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4495 + # pkg:gem/prism#lib/prism/node.rb:4495 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4404 + # pkg:gem/prism#lib/prism/node.rb:4404 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#4476 + # pkg:gem/prism#lib/prism/node.rb:4476 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#4460 + # pkg:gem/prism#lib/prism/node.rb:4460 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4409 + # pkg:gem/prism#lib/prism/node.rb:4409 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4426 + # pkg:gem/prism#lib/prism/node.rb:4426 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4421 + # pkg:gem/prism#lib/prism/node.rb:4421 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#4431 + # pkg:gem/prism#lib/prism/node.rb:4431 sig do params( node_id: Integer, @@ -5367,27 +5287,24 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4409 + # pkg:gem/prism#lib/prism/node.rb:4436 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#4439 + # pkg:gem/prism#lib/prism/node.rb:4439 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#177 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:177 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#4414 + # pkg:gem/prism#lib/prism/node.rb:4414 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5395,62 +5312,62 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4479 + # pkg:gem/prism#lib/prism/node.rb:4479 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4444 + # pkg:gem/prism#lib/prism/node.rb:4444 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4447 + # pkg:gem/prism#lib/prism/node.rb:4447 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#358 + # pkg:gem/prism#lib/prism/node_ext.rb:358 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#365 + # pkg:gem/prism#lib/prism/node_ext.rb:365 def operator_loc; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4468 + # pkg:gem/prism#lib/prism/node.rb:4468 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4455 + # pkg:gem/prism#lib/prism/node.rb:4455 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4484 + # pkg:gem/prism#lib/prism/node.rb:4484 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4473 + # pkg:gem/prism#lib/prism/node.rb:4473 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4489 + # pkg:gem/prism#lib/prism/node.rb:4489 def type; end end end @@ -5460,13 +5377,11 @@ end # @@target ||= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4509 +# pkg:gem/prism#lib/prism/node.rb:4509 class Prism::ClassVariableOrWriteNode < ::Prism::Node # Initialize a new ClassVariableOrWriteNode node. # - # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#4511 + # pkg:gem/prism#lib/prism/node.rb:4511 sig do params( source: Prism::Source, @@ -5484,36 +5399,36 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4616 + # pkg:gem/prism#lib/prism/node.rb:4616 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4523 + # pkg:gem/prism#lib/prism/node.rb:4523 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4528 + # pkg:gem/prism#lib/prism/node.rb:4528 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4545 + # pkg:gem/prism#lib/prism/node.rb:4545 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4540 + # pkg:gem/prism#lib/prism/node.rb:4540 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableOrWriteNode # - # source://prism//lib/prism/node.rb#4550 + # pkg:gem/prism#lib/prism/node.rb:4550 sig do params( node_id: Integer, @@ -5527,27 +5442,24 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4528 + # pkg:gem/prism#lib/prism/node.rb:4555 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4558 + # pkg:gem/prism#lib/prism/node.rb:4558 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#171 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:171 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#4533 + # pkg:gem/prism#lib/prism/node.rb:4533 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5555,62 +5467,62 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4600 + # pkg:gem/prism#lib/prism/node.rb:4600 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4563 + # pkg:gem/prism#lib/prism/node.rb:4563 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4566 + # pkg:gem/prism#lib/prism/node.rb:4566 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4595 + # pkg:gem/prism#lib/prism/node.rb:4595 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4579 + # pkg:gem/prism#lib/prism/node.rb:4579 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4574 + # pkg:gem/prism#lib/prism/node.rb:4574 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4587 + # pkg:gem/prism#lib/prism/node.rb:4587 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4605 + # pkg:gem/prism#lib/prism/node.rb:4605 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4592 + # pkg:gem/prism#lib/prism/node.rb:4592 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4610 + # pkg:gem/prism#lib/prism/node.rb:4610 def type; end end end @@ -5620,49 +5532,47 @@ end # @@foo # ^^^^^ # -# source://prism//lib/prism/node.rb#4629 +# pkg:gem/prism#lib/prism/node.rb:4629 class Prism::ClassVariableReadNode < ::Prism::Node # Initialize a new ClassVariableReadNode node. # - # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode - # - # source://prism//lib/prism/node.rb#4631 + # pkg:gem/prism#lib/prism/node.rb:4631 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4702 + # pkg:gem/prism#lib/prism/node.rb:4702 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4640 + # pkg:gem/prism#lib/prism/node.rb:4640 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4645 + # pkg:gem/prism#lib/prism/node.rb:4645 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4661 + # pkg:gem/prism#lib/prism/node.rb:4661 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4656 + # pkg:gem/prism#lib/prism/node.rb:4656 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableReadNode # - # source://prism//lib/prism/node.rb#4666 + # pkg:gem/prism#lib/prism/node.rb:4666 sig do params( node_id: Integer, @@ -5673,22 +5583,21 @@ class Prism::ClassVariableReadNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4645 + # pkg:gem/prism#lib/prism/node.rb:4671 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#4674 + # pkg:gem/prism#lib/prism/node.rb:4674 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#4650 + # pkg:gem/prism#lib/prism/node.rb:4650 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5696,7 +5605,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4686 + # pkg:gem/prism#lib/prism/node.rb:4686 sig { override.returns(String) } def inspect; end @@ -5706,20 +5615,20 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # @@_test # name `:@@_test` # - # source://prism//lib/prism/node.rb#4683 + # pkg:gem/prism#lib/prism/node.rb:4683 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4691 + # pkg:gem/prism#lib/prism/node.rb:4691 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4696 + # pkg:gem/prism#lib/prism/node.rb:4696 def type; end end end @@ -5729,49 +5638,47 @@ end # @@foo, @@bar = baz # ^^^^^ ^^^^^ # -# source://prism//lib/prism/node.rb#4712 +# pkg:gem/prism#lib/prism/node.rb:4712 class Prism::ClassVariableTargetNode < ::Prism::Node # Initialize a new ClassVariableTargetNode node. # - # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode - # - # source://prism//lib/prism/node.rb#4714 + # pkg:gem/prism#lib/prism/node.rb:4714 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4781 + # pkg:gem/prism#lib/prism/node.rb:4781 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4723 + # pkg:gem/prism#lib/prism/node.rb:4723 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4728 + # pkg:gem/prism#lib/prism/node.rb:4728 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4744 + # pkg:gem/prism#lib/prism/node.rb:4744 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4739 + # pkg:gem/prism#lib/prism/node.rb:4739 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableTargetNode # - # source://prism//lib/prism/node.rb#4749 + # pkg:gem/prism#lib/prism/node.rb:4749 sig do params( node_id: Integer, @@ -5782,22 +5689,21 @@ class Prism::ClassVariableTargetNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4728 + # pkg:gem/prism#lib/prism/node.rb:4754 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#4757 + # pkg:gem/prism#lib/prism/node.rb:4757 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#4733 + # pkg:gem/prism#lib/prism/node.rb:4733 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5805,26 +5711,26 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4765 + # pkg:gem/prism#lib/prism/node.rb:4765 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4762 + # pkg:gem/prism#lib/prism/node.rb:4762 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4770 + # pkg:gem/prism#lib/prism/node.rb:4770 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4775 + # pkg:gem/prism#lib/prism/node.rb:4775 def type; end end end @@ -5834,13 +5740,11 @@ end # @@foo = 1 # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4791 +# pkg:gem/prism#lib/prism/node.rb:4791 class Prism::ClassVariableWriteNode < ::Prism::Node # Initialize a new ClassVariableWriteNode node. # - # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode - # - # source://prism//lib/prism/node.rb#4793 + # pkg:gem/prism#lib/prism/node.rb:4793 sig do params( source: Prism::Source, @@ -5858,36 +5762,36 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4914 + # pkg:gem/prism#lib/prism/node.rb:4914 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4805 + # pkg:gem/prism#lib/prism/node.rb:4805 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4810 + # pkg:gem/prism#lib/prism/node.rb:4810 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4827 + # pkg:gem/prism#lib/prism/node.rb:4827 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4822 + # pkg:gem/prism#lib/prism/node.rb:4822 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ClassVariableWriteNode # - # source://prism//lib/prism/node.rb#4832 + # pkg:gem/prism#lib/prism/node.rb:4832 sig do params( node_id: Integer, @@ -5901,24 +5805,21 @@ class Prism::ClassVariableWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4810 + # pkg:gem/prism#lib/prism/node.rb:4837 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#4840 + # pkg:gem/prism#lib/prism/node.rb:4840 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#4815 + # pkg:gem/prism#lib/prism/node.rb:4815 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5926,7 +5827,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4898 + # pkg:gem/prism#lib/prism/node.rb:4898 sig { override.returns(String) } def inspect; end @@ -5936,7 +5837,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # @@_test = :test # name `@@_test` # - # source://prism//lib/prism/node.rb#4849 + # pkg:gem/prism#lib/prism/node.rb:4849 sig { returns(Symbol) } def name; end @@ -5945,13 +5846,13 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^^^^^ # - # source://prism//lib/prism/node.rb#4855 + # pkg:gem/prism#lib/prism/node.rb:4855 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4893 + # pkg:gem/prism#lib/prism/node.rb:4893 sig { returns(String) } def operator; end @@ -5960,25 +5861,25 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^ # - # source://prism//lib/prism/node.rb#4880 + # pkg:gem/prism#lib/prism/node.rb:4880 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4863 + # pkg:gem/prism#lib/prism/node.rb:4863 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4888 + # pkg:gem/prism#lib/prism/node.rb:4888 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4903 + # pkg:gem/prism#lib/prism/node.rb:4903 sig { override.returns(Symbol) } def type; end @@ -5990,14 +5891,14 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@_xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#4874 + # pkg:gem/prism#lib/prism/node.rb:4874 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4908 + # pkg:gem/prism#lib/prism/node.rb:4908 def type; end end end @@ -6016,75 +5917,67 @@ end # introduce some kind of LRU cache to limit the number of entries, but this # has not yet been implemented. # -# source://prism//lib/prism/parse_result.rb#186 +# pkg:gem/prism#lib/prism/parse_result.rb:186 class Prism::CodeUnitsCache # Initialize a new cache with the given source and encoding. # - # @return [CodeUnitsCache] a new instance of CodeUnitsCache - # - # source://prism//lib/prism/parse_result.rb#212 + # pkg:gem/prism#lib/prism/parse_result.rb:212 sig { params(source: String, encoding: Encoding).void } def initialize(source, encoding); end # Retrieve the code units offset from the given byte offset. # - # source://prism//lib/prism/parse_result.rb#226 + # pkg:gem/prism#lib/prism/parse_result.rb:226 sig { params(byte_offset: Integer).returns(Integer) } def [](byte_offset); end end -# source://prism//lib/prism/parse_result.rb#198 +# pkg:gem/prism#lib/prism/parse_result.rb:198 class Prism::CodeUnitsCache::LengthCounter - # @return [LengthCounter] a new instance of LengthCounter - # - # source://prism//lib/prism/parse_result.rb#199 + # pkg:gem/prism#lib/prism/parse_result.rb:199 def initialize(source, encoding); end - # source://prism//lib/prism/parse_result.rb#204 + # pkg:gem/prism#lib/prism/parse_result.rb:204 def count(byte_offset, byte_length); end end -# source://prism//lib/prism/parse_result.rb#187 +# pkg:gem/prism#lib/prism/parse_result.rb:187 class Prism::CodeUnitsCache::UTF16Counter - # @return [UTF16Counter] a new instance of UTF16Counter - # - # source://prism//lib/prism/parse_result.rb#188 + # pkg:gem/prism#lib/prism/parse_result.rb:188 def initialize(source, encoding); end - # source://prism//lib/prism/parse_result.rb#193 + # pkg:gem/prism#lib/prism/parse_result.rb:193 def count(byte_offset, byte_length); end end # This represents a comment that was encountered during parsing. It is the # base class for all comment types. # -# source://prism//lib/prism/parse_result.rb#521 +# pkg:gem/prism#lib/prism/parse_result.rb:521 class Prism::Comment abstract! # Create a new comment object with the given location. # - # @return [Comment] a new instance of Comment - # - # source://prism//lib/prism/parse_result.rb#526 + # pkg:gem/prism#lib/prism/parse_result.rb:526 sig { params(location: Prism::Location).void } def initialize(location); end # Implement the hash pattern matching interface for Comment. # - # source://prism//lib/prism/parse_result.rb#531 + # pkg:gem/prism#lib/prism/parse_result.rb:531 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The location of this comment in the source. # - # source://prism//lib/prism/parse_result.rb#523 + # pkg:gem/prism#lib/prism/parse_result.rb:523 sig { returns(Prism::Location) } def location; end # Returns the content of the comment by slicing it from the source code. # - # source://prism//lib/prism/parse_result.rb#536 + # pkg:gem/prism#lib/prism/parse_result.rb:536 sig { returns(String) } def slice; end @@ -6109,779 +6002,779 @@ end # Prism.parse("1 + 2").value.accept(SExpressions.new) # # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] # -# source://prism//lib/prism/compiler.rb#30 +# pkg:gem/prism#lib/prism/compiler.rb:30 class Prism::Compiler < ::Prism::Visitor # Visit an individual node. # - # source://prism//lib/prism/compiler.rb#32 + # pkg:gem/prism#lib/prism/compiler.rb:32 sig { params(node: T.nilable(Prism::Node)).returns(T.untyped) } def visit(node); end # Compile a AliasGlobalVariableNode node # - # source://prism//lib/prism/compiler.rb#47 + # pkg:gem/prism#lib/prism/compiler.rb:47 def visit_alias_global_variable_node(node); end # Compile a AliasMethodNode node # - # source://prism//lib/prism/compiler.rb#52 + # pkg:gem/prism#lib/prism/compiler.rb:52 def visit_alias_method_node(node); end # Visit a list of nodes. # - # source://prism//lib/prism/compiler.rb#37 + # pkg:gem/prism#lib/prism/compiler.rb:37 sig { params(nodes: T::Array[T.nilable(Prism::Node)]).returns(T::Array[T.untyped]) } def visit_all(nodes); end # Compile a AlternationPatternNode node # - # source://prism//lib/prism/compiler.rb#57 + # pkg:gem/prism#lib/prism/compiler.rb:57 def visit_alternation_pattern_node(node); end # Compile a AndNode node # - # source://prism//lib/prism/compiler.rb#62 + # pkg:gem/prism#lib/prism/compiler.rb:62 def visit_and_node(node); end # Compile a ArgumentsNode node # - # source://prism//lib/prism/compiler.rb#67 + # pkg:gem/prism#lib/prism/compiler.rb:67 def visit_arguments_node(node); end # Compile a ArrayNode node # - # source://prism//lib/prism/compiler.rb#72 + # pkg:gem/prism#lib/prism/compiler.rb:72 def visit_array_node(node); end # Compile a ArrayPatternNode node # - # source://prism//lib/prism/compiler.rb#77 + # pkg:gem/prism#lib/prism/compiler.rb:77 def visit_array_pattern_node(node); end # Compile a AssocNode node # - # source://prism//lib/prism/compiler.rb#82 + # pkg:gem/prism#lib/prism/compiler.rb:82 def visit_assoc_node(node); end # Compile a AssocSplatNode node # - # source://prism//lib/prism/compiler.rb#87 + # pkg:gem/prism#lib/prism/compiler.rb:87 def visit_assoc_splat_node(node); end # Compile a BackReferenceReadNode node # - # source://prism//lib/prism/compiler.rb#92 + # pkg:gem/prism#lib/prism/compiler.rb:92 def visit_back_reference_read_node(node); end # Compile a BeginNode node # - # source://prism//lib/prism/compiler.rb#97 + # pkg:gem/prism#lib/prism/compiler.rb:97 def visit_begin_node(node); end # Compile a BlockArgumentNode node # - # source://prism//lib/prism/compiler.rb#102 + # pkg:gem/prism#lib/prism/compiler.rb:102 def visit_block_argument_node(node); end # Compile a BlockLocalVariableNode node # - # source://prism//lib/prism/compiler.rb#107 + # pkg:gem/prism#lib/prism/compiler.rb:107 def visit_block_local_variable_node(node); end # Compile a BlockNode node # - # source://prism//lib/prism/compiler.rb#112 + # pkg:gem/prism#lib/prism/compiler.rb:112 def visit_block_node(node); end # Compile a BlockParameterNode node # - # source://prism//lib/prism/compiler.rb#117 + # pkg:gem/prism#lib/prism/compiler.rb:117 def visit_block_parameter_node(node); end # Compile a BlockParametersNode node # - # source://prism//lib/prism/compiler.rb#122 + # pkg:gem/prism#lib/prism/compiler.rb:122 def visit_block_parameters_node(node); end # Compile a BreakNode node # - # source://prism//lib/prism/compiler.rb#127 + # pkg:gem/prism#lib/prism/compiler.rb:127 def visit_break_node(node); end # Compile a CallAndWriteNode node # - # source://prism//lib/prism/compiler.rb#132 + # pkg:gem/prism#lib/prism/compiler.rb:132 def visit_call_and_write_node(node); end # Compile a CallNode node # - # source://prism//lib/prism/compiler.rb#137 + # pkg:gem/prism#lib/prism/compiler.rb:137 def visit_call_node(node); end # Compile a CallOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#142 + # pkg:gem/prism#lib/prism/compiler.rb:142 def visit_call_operator_write_node(node); end # Compile a CallOrWriteNode node # - # source://prism//lib/prism/compiler.rb#147 + # pkg:gem/prism#lib/prism/compiler.rb:147 def visit_call_or_write_node(node); end # Compile a CallTargetNode node # - # source://prism//lib/prism/compiler.rb#152 + # pkg:gem/prism#lib/prism/compiler.rb:152 def visit_call_target_node(node); end # Compile a CapturePatternNode node # - # source://prism//lib/prism/compiler.rb#157 + # pkg:gem/prism#lib/prism/compiler.rb:157 def visit_capture_pattern_node(node); end # Compile a CaseMatchNode node # - # source://prism//lib/prism/compiler.rb#162 + # pkg:gem/prism#lib/prism/compiler.rb:162 def visit_case_match_node(node); end # Compile a CaseNode node # - # source://prism//lib/prism/compiler.rb#167 + # pkg:gem/prism#lib/prism/compiler.rb:167 def visit_case_node(node); end # Visit the child nodes of the given node. # - # source://prism//lib/prism/compiler.rb#42 + # pkg:gem/prism#lib/prism/compiler.rb:42 sig { params(node: Prism::Node).returns(T::Array[T.untyped]) } def visit_child_nodes(node); end # Compile a ClassNode node # - # source://prism//lib/prism/compiler.rb#172 + # pkg:gem/prism#lib/prism/compiler.rb:172 def visit_class_node(node); end # Compile a ClassVariableAndWriteNode node # - # source://prism//lib/prism/compiler.rb#177 + # pkg:gem/prism#lib/prism/compiler.rb:177 def visit_class_variable_and_write_node(node); end # Compile a ClassVariableOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#182 + # pkg:gem/prism#lib/prism/compiler.rb:182 def visit_class_variable_operator_write_node(node); end # Compile a ClassVariableOrWriteNode node # - # source://prism//lib/prism/compiler.rb#187 + # pkg:gem/prism#lib/prism/compiler.rb:187 def visit_class_variable_or_write_node(node); end # Compile a ClassVariableReadNode node # - # source://prism//lib/prism/compiler.rb#192 + # pkg:gem/prism#lib/prism/compiler.rb:192 def visit_class_variable_read_node(node); end # Compile a ClassVariableTargetNode node # - # source://prism//lib/prism/compiler.rb#197 + # pkg:gem/prism#lib/prism/compiler.rb:197 def visit_class_variable_target_node(node); end # Compile a ClassVariableWriteNode node # - # source://prism//lib/prism/compiler.rb#202 + # pkg:gem/prism#lib/prism/compiler.rb:202 def visit_class_variable_write_node(node); end # Compile a ConstantAndWriteNode node # - # source://prism//lib/prism/compiler.rb#207 + # pkg:gem/prism#lib/prism/compiler.rb:207 def visit_constant_and_write_node(node); end # Compile a ConstantOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#212 + # pkg:gem/prism#lib/prism/compiler.rb:212 def visit_constant_operator_write_node(node); end # Compile a ConstantOrWriteNode node # - # source://prism//lib/prism/compiler.rb#217 + # pkg:gem/prism#lib/prism/compiler.rb:217 def visit_constant_or_write_node(node); end # Compile a ConstantPathAndWriteNode node # - # source://prism//lib/prism/compiler.rb#222 + # pkg:gem/prism#lib/prism/compiler.rb:222 def visit_constant_path_and_write_node(node); end # Compile a ConstantPathNode node # - # source://prism//lib/prism/compiler.rb#227 + # pkg:gem/prism#lib/prism/compiler.rb:227 def visit_constant_path_node(node); end # Compile a ConstantPathOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#232 + # pkg:gem/prism#lib/prism/compiler.rb:232 def visit_constant_path_operator_write_node(node); end # Compile a ConstantPathOrWriteNode node # - # source://prism//lib/prism/compiler.rb#237 + # pkg:gem/prism#lib/prism/compiler.rb:237 def visit_constant_path_or_write_node(node); end # Compile a ConstantPathTargetNode node # - # source://prism//lib/prism/compiler.rb#242 + # pkg:gem/prism#lib/prism/compiler.rb:242 def visit_constant_path_target_node(node); end # Compile a ConstantPathWriteNode node # - # source://prism//lib/prism/compiler.rb#247 + # pkg:gem/prism#lib/prism/compiler.rb:247 def visit_constant_path_write_node(node); end # Compile a ConstantReadNode node # - # source://prism//lib/prism/compiler.rb#252 + # pkg:gem/prism#lib/prism/compiler.rb:252 def visit_constant_read_node(node); end # Compile a ConstantTargetNode node # - # source://prism//lib/prism/compiler.rb#257 + # pkg:gem/prism#lib/prism/compiler.rb:257 def visit_constant_target_node(node); end # Compile a ConstantWriteNode node # - # source://prism//lib/prism/compiler.rb#262 + # pkg:gem/prism#lib/prism/compiler.rb:262 def visit_constant_write_node(node); end # Compile a DefNode node # - # source://prism//lib/prism/compiler.rb#267 + # pkg:gem/prism#lib/prism/compiler.rb:267 def visit_def_node(node); end # Compile a DefinedNode node # - # source://prism//lib/prism/compiler.rb#272 + # pkg:gem/prism#lib/prism/compiler.rb:272 def visit_defined_node(node); end # Compile a ElseNode node # - # source://prism//lib/prism/compiler.rb#277 + # pkg:gem/prism#lib/prism/compiler.rb:277 def visit_else_node(node); end # Compile a EmbeddedStatementsNode node # - # source://prism//lib/prism/compiler.rb#282 + # pkg:gem/prism#lib/prism/compiler.rb:282 def visit_embedded_statements_node(node); end # Compile a EmbeddedVariableNode node # - # source://prism//lib/prism/compiler.rb#287 + # pkg:gem/prism#lib/prism/compiler.rb:287 def visit_embedded_variable_node(node); end # Compile a EnsureNode node # - # source://prism//lib/prism/compiler.rb#292 + # pkg:gem/prism#lib/prism/compiler.rb:292 def visit_ensure_node(node); end # Compile a FalseNode node # - # source://prism//lib/prism/compiler.rb#297 + # pkg:gem/prism#lib/prism/compiler.rb:297 def visit_false_node(node); end # Compile a FindPatternNode node # - # source://prism//lib/prism/compiler.rb#302 + # pkg:gem/prism#lib/prism/compiler.rb:302 def visit_find_pattern_node(node); end # Compile a FlipFlopNode node # - # source://prism//lib/prism/compiler.rb#307 + # pkg:gem/prism#lib/prism/compiler.rb:307 def visit_flip_flop_node(node); end # Compile a FloatNode node # - # source://prism//lib/prism/compiler.rb#312 + # pkg:gem/prism#lib/prism/compiler.rb:312 def visit_float_node(node); end # Compile a ForNode node # - # source://prism//lib/prism/compiler.rb#317 + # pkg:gem/prism#lib/prism/compiler.rb:317 def visit_for_node(node); end # Compile a ForwardingArgumentsNode node # - # source://prism//lib/prism/compiler.rb#322 + # pkg:gem/prism#lib/prism/compiler.rb:322 def visit_forwarding_arguments_node(node); end # Compile a ForwardingParameterNode node # - # source://prism//lib/prism/compiler.rb#327 + # pkg:gem/prism#lib/prism/compiler.rb:327 def visit_forwarding_parameter_node(node); end # Compile a ForwardingSuperNode node # - # source://prism//lib/prism/compiler.rb#332 + # pkg:gem/prism#lib/prism/compiler.rb:332 def visit_forwarding_super_node(node); end # Compile a GlobalVariableAndWriteNode node # - # source://prism//lib/prism/compiler.rb#337 + # pkg:gem/prism#lib/prism/compiler.rb:337 def visit_global_variable_and_write_node(node); end # Compile a GlobalVariableOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#342 + # pkg:gem/prism#lib/prism/compiler.rb:342 def visit_global_variable_operator_write_node(node); end # Compile a GlobalVariableOrWriteNode node # - # source://prism//lib/prism/compiler.rb#347 + # pkg:gem/prism#lib/prism/compiler.rb:347 def visit_global_variable_or_write_node(node); end # Compile a GlobalVariableReadNode node # - # source://prism//lib/prism/compiler.rb#352 + # pkg:gem/prism#lib/prism/compiler.rb:352 def visit_global_variable_read_node(node); end # Compile a GlobalVariableTargetNode node # - # source://prism//lib/prism/compiler.rb#357 + # pkg:gem/prism#lib/prism/compiler.rb:357 def visit_global_variable_target_node(node); end # Compile a GlobalVariableWriteNode node # - # source://prism//lib/prism/compiler.rb#362 + # pkg:gem/prism#lib/prism/compiler.rb:362 def visit_global_variable_write_node(node); end # Compile a HashNode node # - # source://prism//lib/prism/compiler.rb#367 + # pkg:gem/prism#lib/prism/compiler.rb:367 def visit_hash_node(node); end # Compile a HashPatternNode node # - # source://prism//lib/prism/compiler.rb#372 + # pkg:gem/prism#lib/prism/compiler.rb:372 def visit_hash_pattern_node(node); end # Compile a IfNode node # - # source://prism//lib/prism/compiler.rb#377 + # pkg:gem/prism#lib/prism/compiler.rb:377 def visit_if_node(node); end # Compile a ImaginaryNode node # - # source://prism//lib/prism/compiler.rb#382 + # pkg:gem/prism#lib/prism/compiler.rb:382 def visit_imaginary_node(node); end # Compile a ImplicitNode node # - # source://prism//lib/prism/compiler.rb#387 + # pkg:gem/prism#lib/prism/compiler.rb:387 def visit_implicit_node(node); end # Compile a ImplicitRestNode node # - # source://prism//lib/prism/compiler.rb#392 + # pkg:gem/prism#lib/prism/compiler.rb:392 def visit_implicit_rest_node(node); end # Compile a InNode node # - # source://prism//lib/prism/compiler.rb#397 + # pkg:gem/prism#lib/prism/compiler.rb:397 def visit_in_node(node); end # Compile a IndexAndWriteNode node # - # source://prism//lib/prism/compiler.rb#402 + # pkg:gem/prism#lib/prism/compiler.rb:402 def visit_index_and_write_node(node); end # Compile a IndexOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#407 + # pkg:gem/prism#lib/prism/compiler.rb:407 def visit_index_operator_write_node(node); end # Compile a IndexOrWriteNode node # - # source://prism//lib/prism/compiler.rb#412 + # pkg:gem/prism#lib/prism/compiler.rb:412 def visit_index_or_write_node(node); end # Compile a IndexTargetNode node # - # source://prism//lib/prism/compiler.rb#417 + # pkg:gem/prism#lib/prism/compiler.rb:417 def visit_index_target_node(node); end # Compile a InstanceVariableAndWriteNode node # - # source://prism//lib/prism/compiler.rb#422 + # pkg:gem/prism#lib/prism/compiler.rb:422 def visit_instance_variable_and_write_node(node); end # Compile a InstanceVariableOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#427 + # pkg:gem/prism#lib/prism/compiler.rb:427 def visit_instance_variable_operator_write_node(node); end # Compile a InstanceVariableOrWriteNode node # - # source://prism//lib/prism/compiler.rb#432 + # pkg:gem/prism#lib/prism/compiler.rb:432 def visit_instance_variable_or_write_node(node); end # Compile a InstanceVariableReadNode node # - # source://prism//lib/prism/compiler.rb#437 + # pkg:gem/prism#lib/prism/compiler.rb:437 def visit_instance_variable_read_node(node); end # Compile a InstanceVariableTargetNode node # - # source://prism//lib/prism/compiler.rb#442 + # pkg:gem/prism#lib/prism/compiler.rb:442 def visit_instance_variable_target_node(node); end # Compile a InstanceVariableWriteNode node # - # source://prism//lib/prism/compiler.rb#447 + # pkg:gem/prism#lib/prism/compiler.rb:447 def visit_instance_variable_write_node(node); end # Compile a IntegerNode node # - # source://prism//lib/prism/compiler.rb#452 + # pkg:gem/prism#lib/prism/compiler.rb:452 def visit_integer_node(node); end # Compile a InterpolatedMatchLastLineNode node # - # source://prism//lib/prism/compiler.rb#457 + # pkg:gem/prism#lib/prism/compiler.rb:457 def visit_interpolated_match_last_line_node(node); end # Compile a InterpolatedRegularExpressionNode node # - # source://prism//lib/prism/compiler.rb#462 + # pkg:gem/prism#lib/prism/compiler.rb:462 def visit_interpolated_regular_expression_node(node); end # Compile a InterpolatedStringNode node # - # source://prism//lib/prism/compiler.rb#467 + # pkg:gem/prism#lib/prism/compiler.rb:467 def visit_interpolated_string_node(node); end # Compile a InterpolatedSymbolNode node # - # source://prism//lib/prism/compiler.rb#472 + # pkg:gem/prism#lib/prism/compiler.rb:472 def visit_interpolated_symbol_node(node); end # Compile a InterpolatedXStringNode node # - # source://prism//lib/prism/compiler.rb#477 + # pkg:gem/prism#lib/prism/compiler.rb:477 def visit_interpolated_x_string_node(node); end # Compile a ItLocalVariableReadNode node # - # source://prism//lib/prism/compiler.rb#482 + # pkg:gem/prism#lib/prism/compiler.rb:482 def visit_it_local_variable_read_node(node); end # Compile a ItParametersNode node # - # source://prism//lib/prism/compiler.rb#487 + # pkg:gem/prism#lib/prism/compiler.rb:487 def visit_it_parameters_node(node); end # Compile a KeywordHashNode node # - # source://prism//lib/prism/compiler.rb#492 + # pkg:gem/prism#lib/prism/compiler.rb:492 def visit_keyword_hash_node(node); end # Compile a KeywordRestParameterNode node # - # source://prism//lib/prism/compiler.rb#497 + # pkg:gem/prism#lib/prism/compiler.rb:497 def visit_keyword_rest_parameter_node(node); end # Compile a LambdaNode node # - # source://prism//lib/prism/compiler.rb#502 + # pkg:gem/prism#lib/prism/compiler.rb:502 def visit_lambda_node(node); end # Compile a LocalVariableAndWriteNode node # - # source://prism//lib/prism/compiler.rb#507 + # pkg:gem/prism#lib/prism/compiler.rb:507 def visit_local_variable_and_write_node(node); end # Compile a LocalVariableOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#512 + # pkg:gem/prism#lib/prism/compiler.rb:512 def visit_local_variable_operator_write_node(node); end # Compile a LocalVariableOrWriteNode node # - # source://prism//lib/prism/compiler.rb#517 + # pkg:gem/prism#lib/prism/compiler.rb:517 def visit_local_variable_or_write_node(node); end # Compile a LocalVariableReadNode node # - # source://prism//lib/prism/compiler.rb#522 + # pkg:gem/prism#lib/prism/compiler.rb:522 def visit_local_variable_read_node(node); end # Compile a LocalVariableTargetNode node # - # source://prism//lib/prism/compiler.rb#527 + # pkg:gem/prism#lib/prism/compiler.rb:527 def visit_local_variable_target_node(node); end # Compile a LocalVariableWriteNode node # - # source://prism//lib/prism/compiler.rb#532 + # pkg:gem/prism#lib/prism/compiler.rb:532 def visit_local_variable_write_node(node); end # Compile a MatchLastLineNode node # - # source://prism//lib/prism/compiler.rb#537 + # pkg:gem/prism#lib/prism/compiler.rb:537 def visit_match_last_line_node(node); end # Compile a MatchPredicateNode node # - # source://prism//lib/prism/compiler.rb#542 + # pkg:gem/prism#lib/prism/compiler.rb:542 def visit_match_predicate_node(node); end # Compile a MatchRequiredNode node # - # source://prism//lib/prism/compiler.rb#547 + # pkg:gem/prism#lib/prism/compiler.rb:547 def visit_match_required_node(node); end # Compile a MatchWriteNode node # - # source://prism//lib/prism/compiler.rb#552 + # pkg:gem/prism#lib/prism/compiler.rb:552 def visit_match_write_node(node); end # Compile a MissingNode node # - # source://prism//lib/prism/compiler.rb#557 + # pkg:gem/prism#lib/prism/compiler.rb:557 def visit_missing_node(node); end # Compile a ModuleNode node # - # source://prism//lib/prism/compiler.rb#562 + # pkg:gem/prism#lib/prism/compiler.rb:562 def visit_module_node(node); end # Compile a MultiTargetNode node # - # source://prism//lib/prism/compiler.rb#567 + # pkg:gem/prism#lib/prism/compiler.rb:567 def visit_multi_target_node(node); end # Compile a MultiWriteNode node # - # source://prism//lib/prism/compiler.rb#572 + # pkg:gem/prism#lib/prism/compiler.rb:572 def visit_multi_write_node(node); end # Compile a NextNode node # - # source://prism//lib/prism/compiler.rb#577 + # pkg:gem/prism#lib/prism/compiler.rb:577 def visit_next_node(node); end # Compile a NilNode node # - # source://prism//lib/prism/compiler.rb#582 + # pkg:gem/prism#lib/prism/compiler.rb:582 def visit_nil_node(node); end # Compile a NoKeywordsParameterNode node # - # source://prism//lib/prism/compiler.rb#587 + # pkg:gem/prism#lib/prism/compiler.rb:587 def visit_no_keywords_parameter_node(node); end # Compile a NumberedParametersNode node # - # source://prism//lib/prism/compiler.rb#592 + # pkg:gem/prism#lib/prism/compiler.rb:592 def visit_numbered_parameters_node(node); end # Compile a NumberedReferenceReadNode node # - # source://prism//lib/prism/compiler.rb#597 + # pkg:gem/prism#lib/prism/compiler.rb:597 def visit_numbered_reference_read_node(node); end # Compile a OptionalKeywordParameterNode node # - # source://prism//lib/prism/compiler.rb#602 + # pkg:gem/prism#lib/prism/compiler.rb:602 def visit_optional_keyword_parameter_node(node); end # Compile a OptionalParameterNode node # - # source://prism//lib/prism/compiler.rb#607 + # pkg:gem/prism#lib/prism/compiler.rb:607 def visit_optional_parameter_node(node); end # Compile a OrNode node # - # source://prism//lib/prism/compiler.rb#612 + # pkg:gem/prism#lib/prism/compiler.rb:612 def visit_or_node(node); end # Compile a ParametersNode node # - # source://prism//lib/prism/compiler.rb#617 + # pkg:gem/prism#lib/prism/compiler.rb:617 def visit_parameters_node(node); end # Compile a ParenthesesNode node # - # source://prism//lib/prism/compiler.rb#622 + # pkg:gem/prism#lib/prism/compiler.rb:622 def visit_parentheses_node(node); end # Compile a PinnedExpressionNode node # - # source://prism//lib/prism/compiler.rb#627 + # pkg:gem/prism#lib/prism/compiler.rb:627 def visit_pinned_expression_node(node); end # Compile a PinnedVariableNode node # - # source://prism//lib/prism/compiler.rb#632 + # pkg:gem/prism#lib/prism/compiler.rb:632 def visit_pinned_variable_node(node); end # Compile a PostExecutionNode node # - # source://prism//lib/prism/compiler.rb#637 + # pkg:gem/prism#lib/prism/compiler.rb:637 def visit_post_execution_node(node); end # Compile a PreExecutionNode node # - # source://prism//lib/prism/compiler.rb#642 + # pkg:gem/prism#lib/prism/compiler.rb:642 def visit_pre_execution_node(node); end # Compile a ProgramNode node # - # source://prism//lib/prism/compiler.rb#647 + # pkg:gem/prism#lib/prism/compiler.rb:647 def visit_program_node(node); end # Compile a RangeNode node # - # source://prism//lib/prism/compiler.rb#652 + # pkg:gem/prism#lib/prism/compiler.rb:652 def visit_range_node(node); end # Compile a RationalNode node # - # source://prism//lib/prism/compiler.rb#657 + # pkg:gem/prism#lib/prism/compiler.rb:657 def visit_rational_node(node); end # Compile a RedoNode node # - # source://prism//lib/prism/compiler.rb#662 + # pkg:gem/prism#lib/prism/compiler.rb:662 def visit_redo_node(node); end # Compile a RegularExpressionNode node # - # source://prism//lib/prism/compiler.rb#667 + # pkg:gem/prism#lib/prism/compiler.rb:667 def visit_regular_expression_node(node); end # Compile a RequiredKeywordParameterNode node # - # source://prism//lib/prism/compiler.rb#672 + # pkg:gem/prism#lib/prism/compiler.rb:672 def visit_required_keyword_parameter_node(node); end # Compile a RequiredParameterNode node # - # source://prism//lib/prism/compiler.rb#677 + # pkg:gem/prism#lib/prism/compiler.rb:677 def visit_required_parameter_node(node); end # Compile a RescueModifierNode node # - # source://prism//lib/prism/compiler.rb#682 + # pkg:gem/prism#lib/prism/compiler.rb:682 def visit_rescue_modifier_node(node); end # Compile a RescueNode node # - # source://prism//lib/prism/compiler.rb#687 + # pkg:gem/prism#lib/prism/compiler.rb:687 def visit_rescue_node(node); end # Compile a RestParameterNode node # - # source://prism//lib/prism/compiler.rb#692 + # pkg:gem/prism#lib/prism/compiler.rb:692 def visit_rest_parameter_node(node); end # Compile a RetryNode node # - # source://prism//lib/prism/compiler.rb#697 + # pkg:gem/prism#lib/prism/compiler.rb:697 def visit_retry_node(node); end # Compile a ReturnNode node # - # source://prism//lib/prism/compiler.rb#702 + # pkg:gem/prism#lib/prism/compiler.rb:702 def visit_return_node(node); end # Compile a SelfNode node # - # source://prism//lib/prism/compiler.rb#707 + # pkg:gem/prism#lib/prism/compiler.rb:707 def visit_self_node(node); end # Compile a ShareableConstantNode node # - # source://prism//lib/prism/compiler.rb#712 + # pkg:gem/prism#lib/prism/compiler.rb:712 def visit_shareable_constant_node(node); end # Compile a SingletonClassNode node # - # source://prism//lib/prism/compiler.rb#717 + # pkg:gem/prism#lib/prism/compiler.rb:717 def visit_singleton_class_node(node); end # Compile a SourceEncodingNode node # - # source://prism//lib/prism/compiler.rb#722 + # pkg:gem/prism#lib/prism/compiler.rb:722 def visit_source_encoding_node(node); end # Compile a SourceFileNode node # - # source://prism//lib/prism/compiler.rb#727 + # pkg:gem/prism#lib/prism/compiler.rb:727 def visit_source_file_node(node); end # Compile a SourceLineNode node # - # source://prism//lib/prism/compiler.rb#732 + # pkg:gem/prism#lib/prism/compiler.rb:732 def visit_source_line_node(node); end # Compile a SplatNode node # - # source://prism//lib/prism/compiler.rb#737 + # pkg:gem/prism#lib/prism/compiler.rb:737 def visit_splat_node(node); end # Compile a StatementsNode node # - # source://prism//lib/prism/compiler.rb#742 + # pkg:gem/prism#lib/prism/compiler.rb:742 def visit_statements_node(node); end # Compile a StringNode node # - # source://prism//lib/prism/compiler.rb#747 + # pkg:gem/prism#lib/prism/compiler.rb:747 def visit_string_node(node); end # Compile a SuperNode node # - # source://prism//lib/prism/compiler.rb#752 + # pkg:gem/prism#lib/prism/compiler.rb:752 def visit_super_node(node); end # Compile a SymbolNode node # - # source://prism//lib/prism/compiler.rb#757 + # pkg:gem/prism#lib/prism/compiler.rb:757 def visit_symbol_node(node); end # Compile a TrueNode node # - # source://prism//lib/prism/compiler.rb#762 + # pkg:gem/prism#lib/prism/compiler.rb:762 def visit_true_node(node); end # Compile a UndefNode node # - # source://prism//lib/prism/compiler.rb#767 + # pkg:gem/prism#lib/prism/compiler.rb:767 def visit_undef_node(node); end # Compile a UnlessNode node # - # source://prism//lib/prism/compiler.rb#772 + # pkg:gem/prism#lib/prism/compiler.rb:772 def visit_unless_node(node); end # Compile a UntilNode node # - # source://prism//lib/prism/compiler.rb#777 + # pkg:gem/prism#lib/prism/compiler.rb:777 def visit_until_node(node); end # Compile a WhenNode node # - # source://prism//lib/prism/compiler.rb#782 + # pkg:gem/prism#lib/prism/compiler.rb:782 def visit_when_node(node); end # Compile a WhileNode node # - # source://prism//lib/prism/compiler.rb#787 + # pkg:gem/prism#lib/prism/compiler.rb:787 def visit_while_node(node); end # Compile a XStringNode node # - # source://prism//lib/prism/compiler.rb#792 + # pkg:gem/prism#lib/prism/compiler.rb:792 def visit_x_string_node(node); end # Compile a YieldNode node # - # source://prism//lib/prism/compiler.rb#797 + # pkg:gem/prism#lib/prism/compiler.rb:797 def visit_yield_node(node); end end @@ -6890,13 +6783,11 @@ end # Target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4927 +# pkg:gem/prism#lib/prism/node.rb:4927 class Prism::ConstantAndWriteNode < ::Prism::Node # Initialize a new ConstantAndWriteNode node. # - # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode - # - # source://prism//lib/prism/node.rb#4929 + # pkg:gem/prism#lib/prism/node.rb:4929 sig do params( source: Prism::Source, @@ -6914,36 +6805,36 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5034 + # pkg:gem/prism#lib/prism/node.rb:5034 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4941 + # pkg:gem/prism#lib/prism/node.rb:4941 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4946 + # pkg:gem/prism#lib/prism/node.rb:4946 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4963 + # pkg:gem/prism#lib/prism/node.rb:4963 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4958 + # pkg:gem/prism#lib/prism/node.rb:4958 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantAndWriteNode # - # source://prism//lib/prism/node.rb#4968 + # pkg:gem/prism#lib/prism/node.rb:4968 sig do params( node_id: Integer, @@ -6957,27 +6848,24 @@ class Prism::ConstantAndWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4946 + # pkg:gem/prism#lib/prism/node.rb:4973 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4976 + # pkg:gem/prism#lib/prism/node.rb:4976 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#183 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:183 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#4951 + # pkg:gem/prism#lib/prism/node.rb:4951 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6985,62 +6873,62 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5018 + # pkg:gem/prism#lib/prism/node.rb:5018 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4981 + # pkg:gem/prism#lib/prism/node.rb:4981 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4984 + # pkg:gem/prism#lib/prism/node.rb:4984 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5013 + # pkg:gem/prism#lib/prism/node.rb:5013 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4997 + # pkg:gem/prism#lib/prism/node.rb:4997 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4992 + # pkg:gem/prism#lib/prism/node.rb:4992 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5005 + # pkg:gem/prism#lib/prism/node.rb:5005 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5023 + # pkg:gem/prism#lib/prism/node.rb:5023 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5010 + # pkg:gem/prism#lib/prism/node.rb:5010 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5028 + # pkg:gem/prism#lib/prism/node.rb:5028 def type; end end end @@ -7050,13 +6938,11 @@ end # Target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5047 +# pkg:gem/prism#lib/prism/node.rb:5047 class Prism::ConstantOperatorWriteNode < ::Prism::Node # Initialize a new ConstantOperatorWriteNode node. # - # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode - # - # source://prism//lib/prism/node.rb#5049 + # pkg:gem/prism#lib/prism/node.rb:5049 sig do params( source: Prism::Source, @@ -7075,48 +6961,48 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5153 + # pkg:gem/prism#lib/prism/node.rb:5153 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5062 + # pkg:gem/prism#lib/prism/node.rb:5062 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#5134 + # pkg:gem/prism#lib/prism/node.rb:5134 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#5118 + # pkg:gem/prism#lib/prism/node.rb:5118 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5067 + # pkg:gem/prism#lib/prism/node.rb:5067 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5084 + # pkg:gem/prism#lib/prism/node.rb:5084 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5079 + # pkg:gem/prism#lib/prism/node.rb:5079 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#5089 + # pkg:gem/prism#lib/prism/node.rb:5089 sig do params( node_id: Integer, @@ -7131,27 +7017,24 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5067 + # pkg:gem/prism#lib/prism/node.rb:5094 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#5097 + # pkg:gem/prism#lib/prism/node.rb:5097 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#195 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:195 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#5072 + # pkg:gem/prism#lib/prism/node.rb:5072 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -7159,62 +7042,62 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5137 + # pkg:gem/prism#lib/prism/node.rb:5137 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5102 + # pkg:gem/prism#lib/prism/node.rb:5102 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5105 + # pkg:gem/prism#lib/prism/node.rb:5105 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#374 + # pkg:gem/prism#lib/prism/node_ext.rb:374 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#381 + # pkg:gem/prism#lib/prism/node_ext.rb:381 def operator_loc; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5126 + # pkg:gem/prism#lib/prism/node.rb:5126 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5113 + # pkg:gem/prism#lib/prism/node.rb:5113 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5142 + # pkg:gem/prism#lib/prism/node.rb:5142 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5131 + # pkg:gem/prism#lib/prism/node.rb:5131 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5147 + # pkg:gem/prism#lib/prism/node.rb:5147 def type; end end end @@ -7224,13 +7107,11 @@ end # Target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5167 +# pkg:gem/prism#lib/prism/node.rb:5167 class Prism::ConstantOrWriteNode < ::Prism::Node # Initialize a new ConstantOrWriteNode node. # - # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode - # - # source://prism//lib/prism/node.rb#5169 + # pkg:gem/prism#lib/prism/node.rb:5169 sig do params( source: Prism::Source, @@ -7248,36 +7129,36 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5274 + # pkg:gem/prism#lib/prism/node.rb:5274 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5181 + # pkg:gem/prism#lib/prism/node.rb:5181 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5186 + # pkg:gem/prism#lib/prism/node.rb:5186 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5203 + # pkg:gem/prism#lib/prism/node.rb:5203 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5198 + # pkg:gem/prism#lib/prism/node.rb:5198 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantOrWriteNode # - # source://prism//lib/prism/node.rb#5208 + # pkg:gem/prism#lib/prism/node.rb:5208 sig do params( node_id: Integer, @@ -7291,27 +7172,24 @@ class Prism::ConstantOrWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5186 + # pkg:gem/prism#lib/prism/node.rb:5213 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#5216 + # pkg:gem/prism#lib/prism/node.rb:5216 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#189 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:189 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#5191 + # pkg:gem/prism#lib/prism/node.rb:5191 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -7319,62 +7197,62 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5258 + # pkg:gem/prism#lib/prism/node.rb:5258 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5221 + # pkg:gem/prism#lib/prism/node.rb:5221 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5224 + # pkg:gem/prism#lib/prism/node.rb:5224 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5253 + # pkg:gem/prism#lib/prism/node.rb:5253 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5237 + # pkg:gem/prism#lib/prism/node.rb:5237 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5232 + # pkg:gem/prism#lib/prism/node.rb:5232 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5245 + # pkg:gem/prism#lib/prism/node.rb:5245 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5263 + # pkg:gem/prism#lib/prism/node.rb:5263 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5250 + # pkg:gem/prism#lib/prism/node.rb:5250 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5268 + # pkg:gem/prism#lib/prism/node.rb:5268 def type; end end end @@ -7384,13 +7262,11 @@ end # Parent::Child &&= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5287 +# pkg:gem/prism#lib/prism/node.rb:5287 class Prism::ConstantPathAndWriteNode < ::Prism::Node # Initialize a new ConstantPathAndWriteNode node. # - # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode - # - # source://prism//lib/prism/node.rb#5289 + # pkg:gem/prism#lib/prism/node.rb:5289 sig do params( source: Prism::Source, @@ -7407,36 +7283,36 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5381 + # pkg:gem/prism#lib/prism/node.rb:5381 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5300 + # pkg:gem/prism#lib/prism/node.rb:5300 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5305 + # pkg:gem/prism#lib/prism/node.rb:5305 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5323 + # pkg:gem/prism#lib/prism/node.rb:5323 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5318 + # pkg:gem/prism#lib/prism/node.rb:5318 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#5328 + # pkg:gem/prism#lib/prism/node.rb:5328 sig do params( node_id: Integer, @@ -7449,24 +7325,21 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5305 + # pkg:gem/prism#lib/prism/node.rb:5333 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#5336 + # pkg:gem/prism#lib/prism/node.rb:5336 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [target] - # - # source://prism//lib/prism/node.rb#5310 + # pkg:gem/prism#lib/prism/node.rb:5310 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -7474,50 +7347,50 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5365 + # pkg:gem/prism#lib/prism/node.rb:5365 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5360 + # pkg:gem/prism#lib/prism/node.rb:5360 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5344 + # pkg:gem/prism#lib/prism/node.rb:5344 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5352 + # pkg:gem/prism#lib/prism/node.rb:5352 def save_operator_loc(repository); end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5341 + # pkg:gem/prism#lib/prism/node.rb:5341 sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5370 + # pkg:gem/prism#lib/prism/node.rb:5370 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5357 + # pkg:gem/prism#lib/prism/node.rb:5357 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5375 + # pkg:gem/prism#lib/prism/node.rb:5375 def type; end end end @@ -7527,13 +7400,11 @@ end # Foo::Bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5393 +# pkg:gem/prism#lib/prism/node.rb:5393 class Prism::ConstantPathNode < ::Prism::Node # Initialize a new ConstantPathNode node. # - # @return [ConstantPathNode] a new instance of ConstantPathNode - # - # source://prism//lib/prism/node.rb#5395 + # pkg:gem/prism#lib/prism/node.rb:5395 sig do params( source: Prism::Source, @@ -7551,12 +7422,12 @@ class Prism::ConstantPathNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5523 + # pkg:gem/prism#lib/prism/node.rb:5523 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5407 + # pkg:gem/prism#lib/prism/node.rb:5407 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -7564,30 +7435,30 @@ class Prism::ConstantPathNode < ::Prism::Node # constant read or a missing node. To not cause a breaking change, we # continue to supply that API. # - # source://prism//lib/prism/node_ext.rb#205 + # pkg:gem/prism#lib/prism/node_ext.rb:205 def child; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5412 + # pkg:gem/prism#lib/prism/node.rb:5412 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5431 + # pkg:gem/prism#lib/prism/node.rb:5431 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5424 + # pkg:gem/prism#lib/prism/node.rb:5424 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathNode # - # source://prism//lib/prism/node.rb#5436 + # pkg:gem/prism#lib/prism/node.rb:5436 sig do params( node_id: Integer, @@ -7601,22 +7472,21 @@ class Prism::ConstantPathNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5412 + # pkg:gem/prism#lib/prism/node.rb:5441 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } # - # source://prism//lib/prism/node.rb#5444 + # pkg:gem/prism#lib/prism/node.rb:5444 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def delimiter: () -> String # - # source://prism//lib/prism/node.rb#5502 + # pkg:gem/prism#lib/prism/node.rb:5502 sig { returns(String) } def delimiter; end @@ -7628,15 +7498,13 @@ class Prism::ConstantPathNode < ::Prism::Node # One::Two # ^^ # - # source://prism//lib/prism/node.rb#5470 + # pkg:gem/prism#lib/prism/node.rb:5470 sig { returns(Prism::Location) } def delimiter_loc; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [parent] - # - # source://prism//lib/prism/node.rb#5417 + # pkg:gem/prism#lib/prism/node.rb:5417 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -7644,26 +7512,26 @@ class Prism::ConstantPathNode < ::Prism::Node # Returns the full name of this constant path. For example: "Foo::Bar" # - # source://prism//lib/prism/node_ext.rb#198 + # pkg:gem/prism#lib/prism/node_ext.rb:198 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant path. # For example: [:Foo, :Bar] # - # source://prism//lib/prism/node_ext.rb#176 + # pkg:gem/prism#lib/prism/node_ext.rb:176 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5507 + # pkg:gem/prism#lib/prism/node.rb:5507 sig { override.returns(String) } def inspect; end # The name of the constant being accessed. This could be `nil` in the event of a syntax error. # - # source://prism//lib/prism/node.rb#5461 + # pkg:gem/prism#lib/prism/node.rb:5461 sig { returns(T.nilable(Symbol)) } def name; end @@ -7675,7 +7543,7 @@ class Prism::ConstantPathNode < ::Prism::Node # One::Two # ^^^ # - # source://prism//lib/prism/node.rb#5489 + # pkg:gem/prism#lib/prism/node.rb:5489 sig { returns(Prism::Location) } def name_loc; end @@ -7690,32 +7558,32 @@ class Prism::ConstantPathNode < ::Prism::Node # a.b::C # ^^^ # - # source://prism//lib/prism/node.rb#5458 + # pkg:gem/prism#lib/prism/node.rb:5458 sig { returns(T.nilable(Prism::Node)) } def parent; end # Save the delimiter_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5478 + # pkg:gem/prism#lib/prism/node.rb:5478 def save_delimiter_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5497 + # pkg:gem/prism#lib/prism/node.rb:5497 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5512 + # pkg:gem/prism#lib/prism/node.rb:5512 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5517 + # pkg:gem/prism#lib/prism/node.rb:5517 def type; end end end @@ -7727,14 +7595,14 @@ end # var::Bar::Baz -> raises because the first part of the constant path is a # local variable # -# source://prism//lib/prism/node_ext.rb#167 +# pkg:gem/prism#lib/prism/node_ext.rb:167 class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end # An error class raised when missing nodes are found while computing a # constant path's full name. For example: # Foo:: -> raises because the constant path is missing the last part # -# source://prism//lib/prism/node_ext.rb#172 +# pkg:gem/prism#lib/prism/node_ext.rb:172 class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError; end # Represents assigning to a constant path using an operator that isn't `=`. @@ -7742,13 +7610,11 @@ class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError # Parent::Child += value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5536 +# pkg:gem/prism#lib/prism/node.rb:5536 class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # Initialize a new ConstantPathOperatorWriteNode node. # - # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode - # - # source://prism//lib/prism/node.rb#5538 + # pkg:gem/prism#lib/prism/node.rb:5538 sig do params( source: Prism::Source, @@ -7766,48 +7632,48 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5629 + # pkg:gem/prism#lib/prism/node.rb:5629 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5550 + # pkg:gem/prism#lib/prism/node.rb:5550 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#5610 + # pkg:gem/prism#lib/prism/node.rb:5610 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#5594 + # pkg:gem/prism#lib/prism/node.rb:5594 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5555 + # pkg:gem/prism#lib/prism/node.rb:5555 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5573 + # pkg:gem/prism#lib/prism/node.rb:5573 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5568 + # pkg:gem/prism#lib/prism/node.rb:5568 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#5578 + # pkg:gem/prism#lib/prism/node.rb:5578 sig do params( node_id: Integer, @@ -7821,24 +7687,21 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5555 + # pkg:gem/prism#lib/prism/node.rb:5583 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#5586 + # pkg:gem/prism#lib/prism/node.rb:5586 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [target] - # - # source://prism//lib/prism/node.rb#5560 + # pkg:gem/prism#lib/prism/node.rb:5560 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -7846,50 +7709,50 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5613 + # pkg:gem/prism#lib/prism/node.rb:5613 sig { override.returns(String) } def inspect; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#390 + # pkg:gem/prism#lib/prism/node_ext.rb:390 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#397 + # pkg:gem/prism#lib/prism/node_ext.rb:397 def operator_loc; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5602 + # pkg:gem/prism#lib/prism/node.rb:5602 def save_binary_operator_loc(repository); end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5591 + # pkg:gem/prism#lib/prism/node.rb:5591 sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5618 + # pkg:gem/prism#lib/prism/node.rb:5618 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5607 + # pkg:gem/prism#lib/prism/node.rb:5607 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5623 + # pkg:gem/prism#lib/prism/node.rb:5623 def type; end end end @@ -7899,13 +7762,11 @@ end # Parent::Child ||= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5642 +# pkg:gem/prism#lib/prism/node.rb:5642 class Prism::ConstantPathOrWriteNode < ::Prism::Node # Initialize a new ConstantPathOrWriteNode node. # - # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode - # - # source://prism//lib/prism/node.rb#5644 + # pkg:gem/prism#lib/prism/node.rb:5644 sig do params( source: Prism::Source, @@ -7922,36 +7783,36 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5736 + # pkg:gem/prism#lib/prism/node.rb:5736 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5655 + # pkg:gem/prism#lib/prism/node.rb:5655 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5660 + # pkg:gem/prism#lib/prism/node.rb:5660 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5678 + # pkg:gem/prism#lib/prism/node.rb:5678 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5673 + # pkg:gem/prism#lib/prism/node.rb:5673 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5683 + # pkg:gem/prism#lib/prism/node.rb:5683 sig do params( node_id: Integer, @@ -7964,24 +7825,21 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5660 + # pkg:gem/prism#lib/prism/node.rb:5688 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#5691 + # pkg:gem/prism#lib/prism/node.rb:5691 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [target] - # - # source://prism//lib/prism/node.rb#5665 + # pkg:gem/prism#lib/prism/node.rb:5665 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -7989,50 +7847,50 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5720 + # pkg:gem/prism#lib/prism/node.rb:5720 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5715 + # pkg:gem/prism#lib/prism/node.rb:5715 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5699 + # pkg:gem/prism#lib/prism/node.rb:5699 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5707 + # pkg:gem/prism#lib/prism/node.rb:5707 def save_operator_loc(repository); end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5696 + # pkg:gem/prism#lib/prism/node.rb:5696 sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5725 + # pkg:gem/prism#lib/prism/node.rb:5725 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5712 + # pkg:gem/prism#lib/prism/node.rb:5712 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5730 + # pkg:gem/prism#lib/prism/node.rb:5730 def type; end end end @@ -8042,13 +7900,11 @@ end # Foo::Foo, Bar::Bar = baz # ^^^^^^^^ ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5748 +# pkg:gem/prism#lib/prism/node.rb:5748 class Prism::ConstantPathTargetNode < ::Prism::Node # Initialize a new ConstantPathTargetNode node. # - # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode - # - # source://prism//lib/prism/node.rb#5750 + # pkg:gem/prism#lib/prism/node.rb:5750 sig do params( source: Prism::Source, @@ -8066,12 +7922,12 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5857 + # pkg:gem/prism#lib/prism/node.rb:5857 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5762 + # pkg:gem/prism#lib/prism/node.rb:5762 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -8079,30 +7935,30 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # constant read or a missing node. To not cause a breaking change, we # continue to supply that API. # - # source://prism//lib/prism/node_ext.rb#246 + # pkg:gem/prism#lib/prism/node_ext.rb:246 def child; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5767 + # pkg:gem/prism#lib/prism/node.rb:5767 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5786 + # pkg:gem/prism#lib/prism/node.rb:5786 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5779 + # pkg:gem/prism#lib/prism/node.rb:5779 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathTargetNode # - # source://prism//lib/prism/node.rb#5791 + # pkg:gem/prism#lib/prism/node.rb:5791 sig do params( node_id: Integer, @@ -8116,36 +7972,33 @@ class Prism::ConstantPathTargetNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5767 + # pkg:gem/prism#lib/prism/node.rb:5796 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } # - # source://prism//lib/prism/node.rb#5799 + # pkg:gem/prism#lib/prism/node.rb:5799 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def delimiter: () -> String # - # source://prism//lib/prism/node.rb#5836 + # pkg:gem/prism#lib/prism/node.rb:5836 sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # - # source://prism//lib/prism/node.rb#5810 + # pkg:gem/prism#lib/prism/node.rb:5810 sig { returns(Prism::Location) } def delimiter_loc; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [parent] - # - # source://prism//lib/prism/node.rb#5772 + # pkg:gem/prism#lib/prism/node.rb:5772 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -8153,63 +8006,63 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # Returns the full name of this constant path. For example: "Foo::Bar" # - # source://prism//lib/prism/node_ext.rb#239 + # pkg:gem/prism#lib/prism/node_ext.rb:239 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant path. # For example: [:Foo, :Bar] # - # source://prism//lib/prism/node_ext.rb#219 + # pkg:gem/prism#lib/prism/node_ext.rb:219 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5841 + # pkg:gem/prism#lib/prism/node.rb:5841 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#5807 + # pkg:gem/prism#lib/prism/node.rb:5807 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5823 + # pkg:gem/prism#lib/prism/node.rb:5823 sig { returns(Prism::Location) } def name_loc; end # attr_reader parent: Prism::node? # - # source://prism//lib/prism/node.rb#5804 + # pkg:gem/prism#lib/prism/node.rb:5804 sig { returns(T.nilable(Prism::Node)) } def parent; end # Save the delimiter_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5818 + # pkg:gem/prism#lib/prism/node.rb:5818 def save_delimiter_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5831 + # pkg:gem/prism#lib/prism/node.rb:5831 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5846 + # pkg:gem/prism#lib/prism/node.rb:5846 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5851 + # pkg:gem/prism#lib/prism/node.rb:5851 def type; end end end @@ -8225,13 +8078,11 @@ end # ::Foo::Bar = 1 # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5876 +# pkg:gem/prism#lib/prism/node.rb:5876 class Prism::ConstantPathWriteNode < ::Prism::Node # Initialize a new ConstantPathWriteNode node. # - # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode - # - # source://prism//lib/prism/node.rb#5878 + # pkg:gem/prism#lib/prism/node.rb:5878 sig do params( source: Prism::Source, @@ -8248,36 +8099,36 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5982 + # pkg:gem/prism#lib/prism/node.rb:5982 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5889 + # pkg:gem/prism#lib/prism/node.rb:5889 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5894 + # pkg:gem/prism#lib/prism/node.rb:5894 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5912 + # pkg:gem/prism#lib/prism/node.rb:5912 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5907 + # pkg:gem/prism#lib/prism/node.rb:5907 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5917 + # pkg:gem/prism#lib/prism/node.rb:5917 sig do params( node_id: Integer, @@ -8290,24 +8141,21 @@ class Prism::ConstantPathWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5894 + # pkg:gem/prism#lib/prism/node.rb:5922 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#5925 + # pkg:gem/prism#lib/prism/node.rb:5925 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [target] - # - # source://prism//lib/prism/node.rb#5899 + # pkg:gem/prism#lib/prism/node.rb:5899 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -8315,13 +8163,13 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5966 + # pkg:gem/prism#lib/prism/node.rb:5966 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5961 + # pkg:gem/prism#lib/prism/node.rb:5961 sig { returns(String) } def operator; end @@ -8330,14 +8178,14 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::ABC = 123 # ^ # - # source://prism//lib/prism/node.rb#5942 + # pkg:gem/prism#lib/prism/node.rb:5942 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5950 + # pkg:gem/prism#lib/prism/node.rb:5950 def save_operator_loc(repository); end # A node representing the constant path being written to. @@ -8348,13 +8196,13 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::Foo = :abc # ^^^^^ # - # source://prism//lib/prism/node.rb#5936 + # pkg:gem/prism#lib/prism/node.rb:5936 sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5971 + # pkg:gem/prism#lib/prism/node.rb:5971 sig { override.returns(Symbol) } def type; end @@ -8363,14 +8211,14 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # FOO::BAR = :abc # ^^^^ # - # source://prism//lib/prism/node.rb#5958 + # pkg:gem/prism#lib/prism/node.rb:5958 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5976 + # pkg:gem/prism#lib/prism/node.rb:5976 def type; end end end @@ -8380,49 +8228,47 @@ end # Foo # ^^^ # -# source://prism//lib/prism/node.rb#5994 +# pkg:gem/prism#lib/prism/node.rb:5994 class Prism::ConstantReadNode < ::Prism::Node # Initialize a new ConstantReadNode node. # - # @return [ConstantReadNode] a new instance of ConstantReadNode - # - # source://prism//lib/prism/node.rb#5996 + # pkg:gem/prism#lib/prism/node.rb:5996 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6067 + # pkg:gem/prism#lib/prism/node.rb:6067 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6005 + # pkg:gem/prism#lib/prism/node.rb:6005 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6010 + # pkg:gem/prism#lib/prism/node.rb:6010 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6026 + # pkg:gem/prism#lib/prism/node.rb:6026 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6021 + # pkg:gem/prism#lib/prism/node.rb:6021 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantReadNode # - # source://prism//lib/prism/node.rb#6031 + # pkg:gem/prism#lib/prism/node.rb:6031 sig do params( node_id: Integer, @@ -8433,22 +8279,21 @@ class Prism::ConstantReadNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6010 + # pkg:gem/prism#lib/prism/node.rb:6036 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#6039 + # pkg:gem/prism#lib/prism/node.rb:6039 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#6015 + # pkg:gem/prism#lib/prism/node.rb:6015 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -8456,20 +8301,20 @@ class Prism::ConstantReadNode < ::Prism::Node # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#142 + # pkg:gem/prism#lib/prism/node_ext.rb:142 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant. # For example: [:Foo] # - # source://prism//lib/prism/node_ext.rb#137 + # pkg:gem/prism#lib/prism/node_ext.rb:137 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#6051 + # pkg:gem/prism#lib/prism/node.rb:6051 sig { override.returns(String) } def inspect; end @@ -8479,20 +8324,20 @@ class Prism::ConstantReadNode < ::Prism::Node # # SOME_CONSTANT # name `:SOME_CONSTANT` # - # source://prism//lib/prism/node.rb#6048 + # pkg:gem/prism#lib/prism/node.rb:6048 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6056 + # pkg:gem/prism#lib/prism/node.rb:6056 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6061 + # pkg:gem/prism#lib/prism/node.rb:6061 def type; end end end @@ -8502,49 +8347,47 @@ end # Foo, Bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#6077 +# pkg:gem/prism#lib/prism/node.rb:6077 class Prism::ConstantTargetNode < ::Prism::Node # Initialize a new ConstantTargetNode node. # - # @return [ConstantTargetNode] a new instance of ConstantTargetNode - # - # source://prism//lib/prism/node.rb#6079 + # pkg:gem/prism#lib/prism/node.rb:6079 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6146 + # pkg:gem/prism#lib/prism/node.rb:6146 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6088 + # pkg:gem/prism#lib/prism/node.rb:6088 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6093 + # pkg:gem/prism#lib/prism/node.rb:6093 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6109 + # pkg:gem/prism#lib/prism/node.rb:6109 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6104 + # pkg:gem/prism#lib/prism/node.rb:6104 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantTargetNode # - # source://prism//lib/prism/node.rb#6114 + # pkg:gem/prism#lib/prism/node.rb:6114 sig do params( node_id: Integer, @@ -8555,22 +8398,21 @@ class Prism::ConstantTargetNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6093 + # pkg:gem/prism#lib/prism/node.rb:6119 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#6122 + # pkg:gem/prism#lib/prism/node.rb:6122 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#6098 + # pkg:gem/prism#lib/prism/node.rb:6098 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -8578,39 +8420,39 @@ class Prism::ConstantTargetNode < ::Prism::Node # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#265 + # pkg:gem/prism#lib/prism/node_ext.rb:265 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant. # For example: [:Foo] # - # source://prism//lib/prism/node_ext.rb#260 + # pkg:gem/prism#lib/prism/node_ext.rb:260 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#6130 + # pkg:gem/prism#lib/prism/node.rb:6130 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#6127 + # pkg:gem/prism#lib/prism/node.rb:6127 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6135 + # pkg:gem/prism#lib/prism/node.rb:6135 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6140 + # pkg:gem/prism#lib/prism/node.rb:6140 def type; end end end @@ -8620,13 +8462,11 @@ end # Foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#6156 +# pkg:gem/prism#lib/prism/node.rb:6156 class Prism::ConstantWriteNode < ::Prism::Node # Initialize a new ConstantWriteNode node. # - # @return [ConstantWriteNode] a new instance of ConstantWriteNode - # - # source://prism//lib/prism/node.rb#6158 + # pkg:gem/prism#lib/prism/node.rb:6158 sig do params( source: Prism::Source, @@ -8644,36 +8484,36 @@ class Prism::ConstantWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6279 + # pkg:gem/prism#lib/prism/node.rb:6279 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6170 + # pkg:gem/prism#lib/prism/node.rb:6170 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6175 + # pkg:gem/prism#lib/prism/node.rb:6175 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6192 + # pkg:gem/prism#lib/prism/node.rb:6192 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6187 + # pkg:gem/prism#lib/prism/node.rb:6187 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ConstantWriteNode # - # source://prism//lib/prism/node.rb#6197 + # pkg:gem/prism#lib/prism/node.rb:6197 sig do params( node_id: Integer, @@ -8687,24 +8527,21 @@ class Prism::ConstantWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6175 + # pkg:gem/prism#lib/prism/node.rb:6202 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#6205 + # pkg:gem/prism#lib/prism/node.rb:6205 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#6180 + # pkg:gem/prism#lib/prism/node.rb:6180 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -8712,20 +8549,20 @@ class Prism::ConstantWriteNode < ::Prism::Node # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#155 + # pkg:gem/prism#lib/prism/node_ext.rb:155 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant. # For example: [:Foo] # - # source://prism//lib/prism/node_ext.rb#150 + # pkg:gem/prism#lib/prism/node_ext.rb:150 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#6263 + # pkg:gem/prism#lib/prism/node.rb:6263 sig { override.returns(String) } def inspect; end @@ -8735,7 +8572,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # # XYZ = 1 # name `:XYZ` # - # source://prism//lib/prism/node.rb#6214 + # pkg:gem/prism#lib/prism/node.rb:6214 sig { returns(Symbol) } def name; end @@ -8744,13 +8581,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = 1 # ^^^ # - # source://prism//lib/prism/node.rb#6220 + # pkg:gem/prism#lib/prism/node.rb:6220 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6258 + # pkg:gem/prism#lib/prism/node.rb:6258 sig { returns(String) } def operator; end @@ -8759,25 +8596,25 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = :bar # ^ # - # source://prism//lib/prism/node.rb#6245 + # pkg:gem/prism#lib/prism/node.rb:6245 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6228 + # pkg:gem/prism#lib/prism/node.rb:6228 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6253 + # pkg:gem/prism#lib/prism/node.rb:6253 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6268 + # pkg:gem/prism#lib/prism/node.rb:6268 sig { override.returns(Symbol) } def type; end @@ -8789,27 +8626,25 @@ class Prism::ConstantWriteNode < ::Prism::Node # MyClass = Class.new # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#6239 + # pkg:gem/prism#lib/prism/node.rb:6239 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6273 + # pkg:gem/prism#lib/prism/node.rb:6273 def type; end end end # Raised when requested to parse as the currently running Ruby version but Prism has no support for it. # -# source://prism//lib/prism.rb#39 +# pkg:gem/prism#lib/prism.rb:39 class Prism::CurrentVersionError < ::ArgumentError # Initialize a new exception for the given ruby version string. # - # @return [CurrentVersionError] a new instance of CurrentVersionError - # - # source://prism//lib/prism.rb#41 + # pkg:gem/prism#lib/prism.rb:41 def initialize(version); end end @@ -8865,13 +8700,13 @@ end # # This is mostly helpful in the context of generating trees programmatically. # -# source://prism//lib/prism/dsl.rb#64 +# pkg:gem/prism#lib/prism/dsl.rb:64 module Prism::DSL extend ::Prism::DSL # Create a new AliasGlobalVariableNode node. # - # source://prism//lib/prism/dsl.rb#80 + # pkg:gem/prism#lib/prism/dsl.rb:80 sig do params( source: Prism::Source, @@ -8887,7 +8722,7 @@ module Prism::DSL # Create a new AliasMethodNode node. # - # source://prism//lib/prism/dsl.rb#85 + # pkg:gem/prism#lib/prism/dsl.rb:85 sig do params( source: Prism::Source, @@ -8903,7 +8738,7 @@ module Prism::DSL # Create a new AlternationPatternNode node. # - # source://prism//lib/prism/dsl.rb#90 + # pkg:gem/prism#lib/prism/dsl.rb:90 sig do params( source: Prism::Source, @@ -8919,7 +8754,7 @@ module Prism::DSL # Create a new AndNode node. # - # source://prism//lib/prism/dsl.rb#95 + # pkg:gem/prism#lib/prism/dsl.rb:95 sig do params( source: Prism::Source, @@ -8935,7 +8770,7 @@ module Prism::DSL # Create a new ArgumentsNode node. # - # source://prism//lib/prism/dsl.rb#100 + # pkg:gem/prism#lib/prism/dsl.rb:100 sig do params( source: Prism::Source, @@ -8949,13 +8784,13 @@ module Prism::DSL # Retrieve the value of one of the ArgumentsNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#835 + # pkg:gem/prism#lib/prism/dsl.rb:835 sig { params(name: Symbol).returns(Integer) } def arguments_node_flag(name); end # Create a new ArrayNode node. # - # source://prism//lib/prism/dsl.rb#105 + # pkg:gem/prism#lib/prism/dsl.rb:105 sig do params( source: Prism::Source, @@ -8971,13 +8806,13 @@ module Prism::DSL # Retrieve the value of one of the ArrayNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#847 + # pkg:gem/prism#lib/prism/dsl.rb:847 sig { params(name: Symbol).returns(Integer) } def array_node_flag(name); end # Create a new ArrayPatternNode node. # - # source://prism//lib/prism/dsl.rb#110 + # pkg:gem/prism#lib/prism/dsl.rb:110 sig do params( source: Prism::Source, @@ -8996,7 +8831,7 @@ module Prism::DSL # Create a new AssocNode node. # - # source://prism//lib/prism/dsl.rb#115 + # pkg:gem/prism#lib/prism/dsl.rb:115 sig do params( source: Prism::Source, @@ -9012,7 +8847,7 @@ module Prism::DSL # Create a new AssocSplatNode node. # - # source://prism//lib/prism/dsl.rb#120 + # pkg:gem/prism#lib/prism/dsl.rb:120 sig do params( source: Prism::Source, @@ -9027,7 +8862,7 @@ module Prism::DSL # Create a new BackReferenceReadNode node. # - # source://prism//lib/prism/dsl.rb#125 + # pkg:gem/prism#lib/prism/dsl.rb:125 sig do params( source: Prism::Source, @@ -9041,7 +8876,7 @@ module Prism::DSL # Create a new BeginNode node. # - # source://prism//lib/prism/dsl.rb#130 + # pkg:gem/prism#lib/prism/dsl.rb:130 sig do params( source: Prism::Source, @@ -9060,7 +8895,7 @@ module Prism::DSL # Create a new BlockArgumentNode node. # - # source://prism//lib/prism/dsl.rb#135 + # pkg:gem/prism#lib/prism/dsl.rb:135 sig do params( source: Prism::Source, @@ -9075,7 +8910,7 @@ module Prism::DSL # Create a new BlockLocalVariableNode node. # - # source://prism//lib/prism/dsl.rb#140 + # pkg:gem/prism#lib/prism/dsl.rb:140 sig do params( source: Prism::Source, @@ -9089,7 +8924,7 @@ module Prism::DSL # Create a new BlockNode node. # - # source://prism//lib/prism/dsl.rb#145 + # pkg:gem/prism#lib/prism/dsl.rb:145 sig do params( source: Prism::Source, @@ -9107,7 +8942,7 @@ module Prism::DSL # Create a new BlockParameterNode node. # - # source://prism//lib/prism/dsl.rb#150 + # pkg:gem/prism#lib/prism/dsl.rb:150 sig do params( source: Prism::Source, @@ -9123,7 +8958,7 @@ module Prism::DSL # Create a new BlockParametersNode node. # - # source://prism//lib/prism/dsl.rb#155 + # pkg:gem/prism#lib/prism/dsl.rb:155 sig do params( source: Prism::Source, @@ -9140,7 +8975,7 @@ module Prism::DSL # Create a new BreakNode node. # - # source://prism//lib/prism/dsl.rb#160 + # pkg:gem/prism#lib/prism/dsl.rb:160 sig do params( source: Prism::Source, @@ -9155,7 +8990,7 @@ module Prism::DSL # Create a new CallAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#165 + # pkg:gem/prism#lib/prism/dsl.rb:165 sig do params( source: Prism::Source, @@ -9175,7 +9010,7 @@ module Prism::DSL # Create a new CallNode node. # - # source://prism//lib/prism/dsl.rb#170 + # pkg:gem/prism#lib/prism/dsl.rb:170 sig do params( source: Prism::Source, @@ -9197,13 +9032,13 @@ module Prism::DSL # Retrieve the value of one of the CallNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#855 + # pkg:gem/prism#lib/prism/dsl.rb:855 sig { params(name: Symbol).returns(Integer) } def call_node_flag(name); end # Create a new CallOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#175 + # pkg:gem/prism#lib/prism/dsl.rb:175 sig do params( source: Prism::Source, @@ -9224,7 +9059,7 @@ module Prism::DSL # Create a new CallOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#180 + # pkg:gem/prism#lib/prism/dsl.rb:180 sig do params( source: Prism::Source, @@ -9244,7 +9079,7 @@ module Prism::DSL # Create a new CallTargetNode node. # - # source://prism//lib/prism/dsl.rb#185 + # pkg:gem/prism#lib/prism/dsl.rb:185 sig do params( source: Prism::Source, @@ -9261,7 +9096,7 @@ module Prism::DSL # Create a new CapturePatternNode node. # - # source://prism//lib/prism/dsl.rb#190 + # pkg:gem/prism#lib/prism/dsl.rb:190 sig do params( source: Prism::Source, @@ -9277,7 +9112,7 @@ module Prism::DSL # Create a new CaseMatchNode node. # - # source://prism//lib/prism/dsl.rb#195 + # pkg:gem/prism#lib/prism/dsl.rb:195 sig do params( source: Prism::Source, @@ -9295,7 +9130,7 @@ module Prism::DSL # Create a new CaseNode node. # - # source://prism//lib/prism/dsl.rb#200 + # pkg:gem/prism#lib/prism/dsl.rb:200 sig do params( source: Prism::Source, @@ -9313,7 +9148,7 @@ module Prism::DSL # Create a new ClassNode node. # - # source://prism//lib/prism/dsl.rb#205 + # pkg:gem/prism#lib/prism/dsl.rb:205 sig do params( source: Prism::Source, @@ -9334,7 +9169,7 @@ module Prism::DSL # Create a new ClassVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#210 + # pkg:gem/prism#lib/prism/dsl.rb:210 sig do params( source: Prism::Source, @@ -9351,7 +9186,7 @@ module Prism::DSL # Create a new ClassVariableOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#215 + # pkg:gem/prism#lib/prism/dsl.rb:215 sig do params( source: Prism::Source, @@ -9369,7 +9204,7 @@ module Prism::DSL # Create a new ClassVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#220 + # pkg:gem/prism#lib/prism/dsl.rb:220 sig do params( source: Prism::Source, @@ -9386,7 +9221,7 @@ module Prism::DSL # Create a new ClassVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#225 + # pkg:gem/prism#lib/prism/dsl.rb:225 sig do params( source: Prism::Source, @@ -9400,7 +9235,7 @@ module Prism::DSL # Create a new ClassVariableTargetNode node. # - # source://prism//lib/prism/dsl.rb#230 + # pkg:gem/prism#lib/prism/dsl.rb:230 sig do params( source: Prism::Source, @@ -9414,7 +9249,7 @@ module Prism::DSL # Create a new ClassVariableWriteNode node. # - # source://prism//lib/prism/dsl.rb#235 + # pkg:gem/prism#lib/prism/dsl.rb:235 sig do params( source: Prism::Source, @@ -9431,7 +9266,7 @@ module Prism::DSL # Create a new ConstantAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#240 + # pkg:gem/prism#lib/prism/dsl.rb:240 sig do params( source: Prism::Source, @@ -9448,7 +9283,7 @@ module Prism::DSL # Create a new ConstantOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#245 + # pkg:gem/prism#lib/prism/dsl.rb:245 sig do params( source: Prism::Source, @@ -9466,7 +9301,7 @@ module Prism::DSL # Create a new ConstantOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#250 + # pkg:gem/prism#lib/prism/dsl.rb:250 sig do params( source: Prism::Source, @@ -9483,7 +9318,7 @@ module Prism::DSL # Create a new ConstantPathAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#255 + # pkg:gem/prism#lib/prism/dsl.rb:255 sig do params( source: Prism::Source, @@ -9499,7 +9334,7 @@ module Prism::DSL # Create a new ConstantPathNode node. # - # source://prism//lib/prism/dsl.rb#260 + # pkg:gem/prism#lib/prism/dsl.rb:260 sig do params( source: Prism::Source, @@ -9516,7 +9351,7 @@ module Prism::DSL # Create a new ConstantPathOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#265 + # pkg:gem/prism#lib/prism/dsl.rb:265 sig do params( source: Prism::Source, @@ -9533,7 +9368,7 @@ module Prism::DSL # Create a new ConstantPathOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#270 + # pkg:gem/prism#lib/prism/dsl.rb:270 sig do params( source: Prism::Source, @@ -9549,7 +9384,7 @@ module Prism::DSL # Create a new ConstantPathTargetNode node. # - # source://prism//lib/prism/dsl.rb#275 + # pkg:gem/prism#lib/prism/dsl.rb:275 sig do params( source: Prism::Source, @@ -9566,7 +9401,7 @@ module Prism::DSL # Create a new ConstantPathWriteNode node. # - # source://prism//lib/prism/dsl.rb#280 + # pkg:gem/prism#lib/prism/dsl.rb:280 sig do params( source: Prism::Source, @@ -9582,7 +9417,7 @@ module Prism::DSL # Create a new ConstantReadNode node. # - # source://prism//lib/prism/dsl.rb#285 + # pkg:gem/prism#lib/prism/dsl.rb:285 sig do params( source: Prism::Source, @@ -9596,7 +9431,7 @@ module Prism::DSL # Create a new ConstantTargetNode node. # - # source://prism//lib/prism/dsl.rb#290 + # pkg:gem/prism#lib/prism/dsl.rb:290 sig do params( source: Prism::Source, @@ -9610,7 +9445,7 @@ module Prism::DSL # Create a new ConstantWriteNode node. # - # source://prism//lib/prism/dsl.rb#295 + # pkg:gem/prism#lib/prism/dsl.rb:295 sig do params( source: Prism::Source, @@ -9627,7 +9462,7 @@ module Prism::DSL # Create a new DefNode node. # - # source://prism//lib/prism/dsl.rb#300 + # pkg:gem/prism#lib/prism/dsl.rb:300 sig do params( source: Prism::Source, @@ -9652,7 +9487,7 @@ module Prism::DSL # Create a new DefinedNode node. # - # source://prism//lib/prism/dsl.rb#305 + # pkg:gem/prism#lib/prism/dsl.rb:305 sig do params( source: Prism::Source, @@ -9669,7 +9504,7 @@ module Prism::DSL # Create a new ElseNode node. # - # source://prism//lib/prism/dsl.rb#310 + # pkg:gem/prism#lib/prism/dsl.rb:310 sig do params( source: Prism::Source, @@ -9685,7 +9520,7 @@ module Prism::DSL # Create a new EmbeddedStatementsNode node. # - # source://prism//lib/prism/dsl.rb#315 + # pkg:gem/prism#lib/prism/dsl.rb:315 sig do params( source: Prism::Source, @@ -9701,7 +9536,7 @@ module Prism::DSL # Create a new EmbeddedVariableNode node. # - # source://prism//lib/prism/dsl.rb#320 + # pkg:gem/prism#lib/prism/dsl.rb:320 sig do params( source: Prism::Source, @@ -9716,13 +9551,13 @@ module Prism::DSL # Retrieve the value of one of the EncodingFlags flags. # - # source://prism//lib/prism/dsl.rb#866 + # pkg:gem/prism#lib/prism/dsl.rb:866 sig { params(name: Symbol).returns(Integer) } def encoding_flag(name); end # Create a new EnsureNode node. # - # source://prism//lib/prism/dsl.rb#325 + # pkg:gem/prism#lib/prism/dsl.rb:325 sig do params( source: Prism::Source, @@ -9738,7 +9573,7 @@ module Prism::DSL # Create a new FalseNode node. # - # source://prism//lib/prism/dsl.rb#330 + # pkg:gem/prism#lib/prism/dsl.rb:330 sig do params( source: Prism::Source, @@ -9751,7 +9586,7 @@ module Prism::DSL # Create a new FindPatternNode node. # - # source://prism//lib/prism/dsl.rb#335 + # pkg:gem/prism#lib/prism/dsl.rb:335 sig do params( source: Prism::Source, @@ -9770,7 +9605,7 @@ module Prism::DSL # Create a new FlipFlopNode node. # - # source://prism//lib/prism/dsl.rb#340 + # pkg:gem/prism#lib/prism/dsl.rb:340 sig do params( source: Prism::Source, @@ -9786,7 +9621,7 @@ module Prism::DSL # Create a new FloatNode node. # - # source://prism//lib/prism/dsl.rb#345 + # pkg:gem/prism#lib/prism/dsl.rb:345 sig do params( source: Prism::Source, @@ -9800,7 +9635,7 @@ module Prism::DSL # Create a new ForNode node. # - # source://prism//lib/prism/dsl.rb#350 + # pkg:gem/prism#lib/prism/dsl.rb:350 sig do params( source: Prism::Source, @@ -9820,7 +9655,7 @@ module Prism::DSL # Create a new ForwardingArgumentsNode node. # - # source://prism//lib/prism/dsl.rb#355 + # pkg:gem/prism#lib/prism/dsl.rb:355 sig do params( source: Prism::Source, @@ -9833,7 +9668,7 @@ module Prism::DSL # Create a new ForwardingParameterNode node. # - # source://prism//lib/prism/dsl.rb#360 + # pkg:gem/prism#lib/prism/dsl.rb:360 sig do params( source: Prism::Source, @@ -9846,7 +9681,7 @@ module Prism::DSL # Create a new ForwardingSuperNode node. # - # source://prism//lib/prism/dsl.rb#365 + # pkg:gem/prism#lib/prism/dsl.rb:365 sig do params( source: Prism::Source, @@ -9860,7 +9695,7 @@ module Prism::DSL # Create a new GlobalVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#370 + # pkg:gem/prism#lib/prism/dsl.rb:370 sig do params( source: Prism::Source, @@ -9877,7 +9712,7 @@ module Prism::DSL # Create a new GlobalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#375 + # pkg:gem/prism#lib/prism/dsl.rb:375 sig do params( source: Prism::Source, @@ -9895,7 +9730,7 @@ module Prism::DSL # Create a new GlobalVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#380 + # pkg:gem/prism#lib/prism/dsl.rb:380 sig do params( source: Prism::Source, @@ -9912,7 +9747,7 @@ module Prism::DSL # Create a new GlobalVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#385 + # pkg:gem/prism#lib/prism/dsl.rb:385 sig do params( source: Prism::Source, @@ -9926,7 +9761,7 @@ module Prism::DSL # Create a new GlobalVariableTargetNode node. # - # source://prism//lib/prism/dsl.rb#390 + # pkg:gem/prism#lib/prism/dsl.rb:390 sig do params( source: Prism::Source, @@ -9940,7 +9775,7 @@ module Prism::DSL # Create a new GlobalVariableWriteNode node. # - # source://prism//lib/prism/dsl.rb#395 + # pkg:gem/prism#lib/prism/dsl.rb:395 sig do params( source: Prism::Source, @@ -9957,7 +9792,7 @@ module Prism::DSL # Create a new HashNode node. # - # source://prism//lib/prism/dsl.rb#400 + # pkg:gem/prism#lib/prism/dsl.rb:400 sig do params( source: Prism::Source, @@ -9973,7 +9808,7 @@ module Prism::DSL # Create a new HashPatternNode node. # - # source://prism//lib/prism/dsl.rb#405 + # pkg:gem/prism#lib/prism/dsl.rb:405 sig do params( source: Prism::Source, @@ -9991,7 +9826,7 @@ module Prism::DSL # Create a new IfNode node. # - # source://prism//lib/prism/dsl.rb#410 + # pkg:gem/prism#lib/prism/dsl.rb:410 sig do params( source: Prism::Source, @@ -10010,7 +9845,7 @@ module Prism::DSL # Create a new ImaginaryNode node. # - # source://prism//lib/prism/dsl.rb#415 + # pkg:gem/prism#lib/prism/dsl.rb:415 sig do params( source: Prism::Source, @@ -10024,7 +9859,7 @@ module Prism::DSL # Create a new ImplicitNode node. # - # source://prism//lib/prism/dsl.rb#420 + # pkg:gem/prism#lib/prism/dsl.rb:420 sig do params( source: Prism::Source, @@ -10038,7 +9873,7 @@ module Prism::DSL # Create a new ImplicitRestNode node. # - # source://prism//lib/prism/dsl.rb#425 + # pkg:gem/prism#lib/prism/dsl.rb:425 sig do params( source: Prism::Source, @@ -10051,7 +9886,7 @@ module Prism::DSL # Create a new InNode node. # - # source://prism//lib/prism/dsl.rb#430 + # pkg:gem/prism#lib/prism/dsl.rb:430 sig do params( source: Prism::Source, @@ -10068,7 +9903,7 @@ module Prism::DSL # Create a new IndexAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#435 + # pkg:gem/prism#lib/prism/dsl.rb:435 sig do params( source: Prism::Source, @@ -10089,7 +9924,7 @@ module Prism::DSL # Create a new IndexOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#440 + # pkg:gem/prism#lib/prism/dsl.rb:440 sig do params( source: Prism::Source, @@ -10111,7 +9946,7 @@ module Prism::DSL # Create a new IndexOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#445 + # pkg:gem/prism#lib/prism/dsl.rb:445 sig do params( source: Prism::Source, @@ -10132,7 +9967,7 @@ module Prism::DSL # Create a new IndexTargetNode node. # - # source://prism//lib/prism/dsl.rb#450 + # pkg:gem/prism#lib/prism/dsl.rb:450 sig do params( source: Prism::Source, @@ -10150,7 +9985,7 @@ module Prism::DSL # Create a new InstanceVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#455 + # pkg:gem/prism#lib/prism/dsl.rb:455 sig do params( source: Prism::Source, @@ -10167,7 +10002,7 @@ module Prism::DSL # Create a new InstanceVariableOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#460 + # pkg:gem/prism#lib/prism/dsl.rb:460 sig do params( source: Prism::Source, @@ -10185,7 +10020,7 @@ module Prism::DSL # Create a new InstanceVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#465 + # pkg:gem/prism#lib/prism/dsl.rb:465 sig do params( source: Prism::Source, @@ -10202,7 +10037,7 @@ module Prism::DSL # Create a new InstanceVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#470 + # pkg:gem/prism#lib/prism/dsl.rb:470 sig do params( source: Prism::Source, @@ -10216,7 +10051,7 @@ module Prism::DSL # Create a new InstanceVariableTargetNode node. # - # source://prism//lib/prism/dsl.rb#475 + # pkg:gem/prism#lib/prism/dsl.rb:475 sig do params( source: Prism::Source, @@ -10230,7 +10065,7 @@ module Prism::DSL # Create a new InstanceVariableWriteNode node. # - # source://prism//lib/prism/dsl.rb#480 + # pkg:gem/prism#lib/prism/dsl.rb:480 sig do params( source: Prism::Source, @@ -10247,13 +10082,13 @@ module Prism::DSL # Retrieve the value of one of the IntegerBaseFlags flags. # - # source://prism//lib/prism/dsl.rb#875 + # pkg:gem/prism#lib/prism/dsl.rb:875 sig { params(name: Symbol).returns(Integer) } def integer_base_flag(name); end # Create a new IntegerNode node. # - # source://prism//lib/prism/dsl.rb#485 + # pkg:gem/prism#lib/prism/dsl.rb:485 sig do params( source: Prism::Source, @@ -10267,7 +10102,7 @@ module Prism::DSL # Create a new InterpolatedMatchLastLineNode node. # - # source://prism//lib/prism/dsl.rb#490 + # pkg:gem/prism#lib/prism/dsl.rb:490 sig do params( source: Prism::Source, @@ -10283,7 +10118,7 @@ module Prism::DSL # Create a new InterpolatedRegularExpressionNode node. # - # source://prism//lib/prism/dsl.rb#495 + # pkg:gem/prism#lib/prism/dsl.rb:495 sig do params( source: Prism::Source, @@ -10299,7 +10134,7 @@ module Prism::DSL # Create a new InterpolatedStringNode node. # - # source://prism//lib/prism/dsl.rb#500 + # pkg:gem/prism#lib/prism/dsl.rb:500 sig do params( source: Prism::Source, @@ -10315,13 +10150,13 @@ module Prism::DSL # Retrieve the value of one of the InterpolatedStringNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#886 + # pkg:gem/prism#lib/prism/dsl.rb:886 sig { params(name: Symbol).returns(Integer) } def interpolated_string_node_flag(name); end # Create a new InterpolatedSymbolNode node. # - # source://prism//lib/prism/dsl.rb#505 + # pkg:gem/prism#lib/prism/dsl.rb:505 sig do params( source: Prism::Source, @@ -10337,7 +10172,7 @@ module Prism::DSL # Create a new InterpolatedXStringNode node. # - # source://prism//lib/prism/dsl.rb#510 + # pkg:gem/prism#lib/prism/dsl.rb:510 sig do params( source: Prism::Source, @@ -10353,7 +10188,7 @@ module Prism::DSL # Create a new ItLocalVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#515 + # pkg:gem/prism#lib/prism/dsl.rb:515 sig do params( source: Prism::Source, @@ -10366,7 +10201,7 @@ module Prism::DSL # Create a new ItParametersNode node. # - # source://prism//lib/prism/dsl.rb#520 + # pkg:gem/prism#lib/prism/dsl.rb:520 sig do params( source: Prism::Source, @@ -10379,7 +10214,7 @@ module Prism::DSL # Create a new KeywordHashNode node. # - # source://prism//lib/prism/dsl.rb#525 + # pkg:gem/prism#lib/prism/dsl.rb:525 sig do params( source: Prism::Source, @@ -10393,13 +10228,13 @@ module Prism::DSL # Retrieve the value of one of the KeywordHashNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#895 + # pkg:gem/prism#lib/prism/dsl.rb:895 sig { params(name: Symbol).returns(Integer) } def keyword_hash_node_flag(name); end # Create a new KeywordRestParameterNode node. # - # source://prism//lib/prism/dsl.rb#530 + # pkg:gem/prism#lib/prism/dsl.rb:530 sig do params( source: Prism::Source, @@ -10415,7 +10250,7 @@ module Prism::DSL # Create a new LambdaNode node. # - # source://prism//lib/prism/dsl.rb#535 + # pkg:gem/prism#lib/prism/dsl.rb:535 sig do params( source: Prism::Source, @@ -10434,7 +10269,7 @@ module Prism::DSL # Create a new LocalVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#540 + # pkg:gem/prism#lib/prism/dsl.rb:540 sig do params( source: Prism::Source, @@ -10452,7 +10287,7 @@ module Prism::DSL # Create a new LocalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#545 + # pkg:gem/prism#lib/prism/dsl.rb:545 sig do params( source: Prism::Source, @@ -10471,7 +10306,7 @@ module Prism::DSL # Create a new LocalVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#550 + # pkg:gem/prism#lib/prism/dsl.rb:550 sig do params( source: Prism::Source, @@ -10489,7 +10324,7 @@ module Prism::DSL # Create a new LocalVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#555 + # pkg:gem/prism#lib/prism/dsl.rb:555 sig do params( source: Prism::Source, @@ -10504,7 +10339,7 @@ module Prism::DSL # Create a new LocalVariableTargetNode node. # - # source://prism//lib/prism/dsl.rb#560 + # pkg:gem/prism#lib/prism/dsl.rb:560 sig do params( source: Prism::Source, @@ -10519,7 +10354,7 @@ module Prism::DSL # Create a new LocalVariableWriteNode node. # - # source://prism//lib/prism/dsl.rb#565 + # pkg:gem/prism#lib/prism/dsl.rb:565 sig do params( source: Prism::Source, @@ -10537,19 +10372,19 @@ module Prism::DSL # Create a new Location object. # - # source://prism//lib/prism/dsl.rb#75 + # pkg:gem/prism#lib/prism/dsl.rb:75 sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } def location(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end # Retrieve the value of one of the LoopFlags flags. # - # source://prism//lib/prism/dsl.rb#903 + # pkg:gem/prism#lib/prism/dsl.rb:903 sig { params(name: Symbol).returns(Integer) } def loop_flag(name); end # Create a new MatchLastLineNode node. # - # source://prism//lib/prism/dsl.rb#570 + # pkg:gem/prism#lib/prism/dsl.rb:570 sig do params( source: Prism::Source, @@ -10566,7 +10401,7 @@ module Prism::DSL # Create a new MatchPredicateNode node. # - # source://prism//lib/prism/dsl.rb#575 + # pkg:gem/prism#lib/prism/dsl.rb:575 sig do params( source: Prism::Source, @@ -10582,7 +10417,7 @@ module Prism::DSL # Create a new MatchRequiredNode node. # - # source://prism//lib/prism/dsl.rb#580 + # pkg:gem/prism#lib/prism/dsl.rb:580 sig do params( source: Prism::Source, @@ -10598,7 +10433,7 @@ module Prism::DSL # Create a new MatchWriteNode node. # - # source://prism//lib/prism/dsl.rb#585 + # pkg:gem/prism#lib/prism/dsl.rb:585 sig do params( source: Prism::Source, @@ -10613,7 +10448,7 @@ module Prism::DSL # Create a new MissingNode node. # - # source://prism//lib/prism/dsl.rb#590 + # pkg:gem/prism#lib/prism/dsl.rb:590 sig do params( source: Prism::Source, @@ -10626,7 +10461,7 @@ module Prism::DSL # Create a new ModuleNode node. # - # source://prism//lib/prism/dsl.rb#595 + # pkg:gem/prism#lib/prism/dsl.rb:595 sig do params( source: Prism::Source, @@ -10645,7 +10480,7 @@ module Prism::DSL # Create a new MultiTargetNode node. # - # source://prism//lib/prism/dsl.rb#600 + # pkg:gem/prism#lib/prism/dsl.rb:600 sig do params( source: Prism::Source, @@ -10663,7 +10498,7 @@ module Prism::DSL # Create a new MultiWriteNode node. # - # source://prism//lib/prism/dsl.rb#605 + # pkg:gem/prism#lib/prism/dsl.rb:605 sig do params( source: Prism::Source, @@ -10683,7 +10518,7 @@ module Prism::DSL # Create a new NextNode node. # - # source://prism//lib/prism/dsl.rb#610 + # pkg:gem/prism#lib/prism/dsl.rb:610 sig do params( source: Prism::Source, @@ -10698,7 +10533,7 @@ module Prism::DSL # Create a new NilNode node. # - # source://prism//lib/prism/dsl.rb#615 + # pkg:gem/prism#lib/prism/dsl.rb:615 sig do params( source: Prism::Source, @@ -10711,7 +10546,7 @@ module Prism::DSL # Create a new NoKeywordsParameterNode node. # - # source://prism//lib/prism/dsl.rb#620 + # pkg:gem/prism#lib/prism/dsl.rb:620 sig do params( source: Prism::Source, @@ -10726,7 +10561,7 @@ module Prism::DSL # Create a new NumberedParametersNode node. # - # source://prism//lib/prism/dsl.rb#625 + # pkg:gem/prism#lib/prism/dsl.rb:625 sig do params( source: Prism::Source, @@ -10740,7 +10575,7 @@ module Prism::DSL # Create a new NumberedReferenceReadNode node. # - # source://prism//lib/prism/dsl.rb#630 + # pkg:gem/prism#lib/prism/dsl.rb:630 sig do params( source: Prism::Source, @@ -10754,7 +10589,7 @@ module Prism::DSL # Create a new OptionalKeywordParameterNode node. # - # source://prism//lib/prism/dsl.rb#635 + # pkg:gem/prism#lib/prism/dsl.rb:635 sig do params( source: Prism::Source, @@ -10770,7 +10605,7 @@ module Prism::DSL # Create a new OptionalParameterNode node. # - # source://prism//lib/prism/dsl.rb#640 + # pkg:gem/prism#lib/prism/dsl.rb:640 sig do params( source: Prism::Source, @@ -10787,7 +10622,7 @@ module Prism::DSL # Create a new OrNode node. # - # source://prism//lib/prism/dsl.rb#645 + # pkg:gem/prism#lib/prism/dsl.rb:645 sig do params( source: Prism::Source, @@ -10803,13 +10638,13 @@ module Prism::DSL # Retrieve the value of one of the ParameterFlags flags. # - # source://prism//lib/prism/dsl.rb#911 + # pkg:gem/prism#lib/prism/dsl.rb:911 sig { params(name: Symbol).returns(Integer) } def parameter_flag(name); end # Create a new ParametersNode node. # - # source://prism//lib/prism/dsl.rb#650 + # pkg:gem/prism#lib/prism/dsl.rb:650 sig do params( source: Prism::Source, @@ -10829,7 +10664,7 @@ module Prism::DSL # Create a new ParenthesesNode node. # - # source://prism//lib/prism/dsl.rb#655 + # pkg:gem/prism#lib/prism/dsl.rb:655 sig do params( source: Prism::Source, @@ -10845,13 +10680,13 @@ module Prism::DSL # Retrieve the value of one of the ParenthesesNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#919 + # pkg:gem/prism#lib/prism/dsl.rb:919 sig { params(name: Symbol).returns(Integer) } def parentheses_node_flag(name); end # Create a new PinnedExpressionNode node. # - # source://prism//lib/prism/dsl.rb#660 + # pkg:gem/prism#lib/prism/dsl.rb:660 sig do params( source: Prism::Source, @@ -10868,7 +10703,7 @@ module Prism::DSL # Create a new PinnedVariableNode node. # - # source://prism//lib/prism/dsl.rb#665 + # pkg:gem/prism#lib/prism/dsl.rb:665 sig do params( source: Prism::Source, @@ -10883,7 +10718,7 @@ module Prism::DSL # Create a new PostExecutionNode node. # - # source://prism//lib/prism/dsl.rb#670 + # pkg:gem/prism#lib/prism/dsl.rb:670 sig do params( source: Prism::Source, @@ -10900,7 +10735,7 @@ module Prism::DSL # Create a new PreExecutionNode node. # - # source://prism//lib/prism/dsl.rb#675 + # pkg:gem/prism#lib/prism/dsl.rb:675 sig do params( source: Prism::Source, @@ -10917,7 +10752,7 @@ module Prism::DSL # Create a new ProgramNode node. # - # source://prism//lib/prism/dsl.rb#680 + # pkg:gem/prism#lib/prism/dsl.rb:680 sig do params( source: Prism::Source, @@ -10932,13 +10767,13 @@ module Prism::DSL # Retrieve the value of one of the RangeFlags flags. # - # source://prism//lib/prism/dsl.rb#927 + # pkg:gem/prism#lib/prism/dsl.rb:927 sig { params(name: Symbol).returns(Integer) } def range_flag(name); end # Create a new RangeNode node. # - # source://prism//lib/prism/dsl.rb#685 + # pkg:gem/prism#lib/prism/dsl.rb:685 sig do params( source: Prism::Source, @@ -10954,7 +10789,7 @@ module Prism::DSL # Create a new RationalNode node. # - # source://prism//lib/prism/dsl.rb#690 + # pkg:gem/prism#lib/prism/dsl.rb:690 sig do params( source: Prism::Source, @@ -10969,7 +10804,7 @@ module Prism::DSL # Create a new RedoNode node. # - # source://prism//lib/prism/dsl.rb#695 + # pkg:gem/prism#lib/prism/dsl.rb:695 sig do params( source: Prism::Source, @@ -10982,13 +10817,13 @@ module Prism::DSL # Retrieve the value of one of the RegularExpressionFlags flags. # - # source://prism//lib/prism/dsl.rb#935 + # pkg:gem/prism#lib/prism/dsl.rb:935 sig { params(name: Symbol).returns(Integer) } def regular_expression_flag(name); end # Create a new RegularExpressionNode node. # - # source://prism//lib/prism/dsl.rb#700 + # pkg:gem/prism#lib/prism/dsl.rb:700 sig do params( source: Prism::Source, @@ -11005,7 +10840,7 @@ module Prism::DSL # Create a new RequiredKeywordParameterNode node. # - # source://prism//lib/prism/dsl.rb#705 + # pkg:gem/prism#lib/prism/dsl.rb:705 sig do params( source: Prism::Source, @@ -11020,7 +10855,7 @@ module Prism::DSL # Create a new RequiredParameterNode node. # - # source://prism//lib/prism/dsl.rb#710 + # pkg:gem/prism#lib/prism/dsl.rb:710 sig do params( source: Prism::Source, @@ -11034,7 +10869,7 @@ module Prism::DSL # Create a new RescueModifierNode node. # - # source://prism//lib/prism/dsl.rb#715 + # pkg:gem/prism#lib/prism/dsl.rb:715 sig do params( source: Prism::Source, @@ -11050,7 +10885,7 @@ module Prism::DSL # Create a new RescueNode node. # - # source://prism//lib/prism/dsl.rb#720 + # pkg:gem/prism#lib/prism/dsl.rb:720 sig do params( source: Prism::Source, @@ -11070,7 +10905,7 @@ module Prism::DSL # Create a new RestParameterNode node. # - # source://prism//lib/prism/dsl.rb#725 + # pkg:gem/prism#lib/prism/dsl.rb:725 sig do params( source: Prism::Source, @@ -11086,7 +10921,7 @@ module Prism::DSL # Create a new RetryNode node. # - # source://prism//lib/prism/dsl.rb#730 + # pkg:gem/prism#lib/prism/dsl.rb:730 sig do params( source: Prism::Source, @@ -11099,7 +10934,7 @@ module Prism::DSL # Create a new ReturnNode node. # - # source://prism//lib/prism/dsl.rb#735 + # pkg:gem/prism#lib/prism/dsl.rb:735 sig do params( source: Prism::Source, @@ -11114,7 +10949,7 @@ module Prism::DSL # Create a new SelfNode node. # - # source://prism//lib/prism/dsl.rb#740 + # pkg:gem/prism#lib/prism/dsl.rb:740 sig do params( source: Prism::Source, @@ -11127,7 +10962,7 @@ module Prism::DSL # Create a new ShareableConstantNode node. # - # source://prism//lib/prism/dsl.rb#745 + # pkg:gem/prism#lib/prism/dsl.rb:745 sig do params( source: Prism::Source, @@ -11141,13 +10976,13 @@ module Prism::DSL # Retrieve the value of one of the ShareableConstantNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#953 + # pkg:gem/prism#lib/prism/dsl.rb:953 sig { params(name: Symbol).returns(Integer) } def shareable_constant_node_flag(name); end # Create a new SingletonClassNode node. # - # source://prism//lib/prism/dsl.rb#750 + # pkg:gem/prism#lib/prism/dsl.rb:750 sig do params( source: Prism::Source, @@ -11166,13 +11001,13 @@ module Prism::DSL # Create a new Source object. # - # source://prism//lib/prism/dsl.rb#70 + # pkg:gem/prism#lib/prism/dsl.rb:70 sig { params(string: String).returns(Prism::Source) } def source(string); end # Create a new SourceEncodingNode node. # - # source://prism//lib/prism/dsl.rb#755 + # pkg:gem/prism#lib/prism/dsl.rb:755 sig do params( source: Prism::Source, @@ -11185,7 +11020,7 @@ module Prism::DSL # Create a new SourceFileNode node. # - # source://prism//lib/prism/dsl.rb#760 + # pkg:gem/prism#lib/prism/dsl.rb:760 sig do params( source: Prism::Source, @@ -11199,7 +11034,7 @@ module Prism::DSL # Create a new SourceLineNode node. # - # source://prism//lib/prism/dsl.rb#765 + # pkg:gem/prism#lib/prism/dsl.rb:765 sig do params( source: Prism::Source, @@ -11212,7 +11047,7 @@ module Prism::DSL # Create a new SplatNode node. # - # source://prism//lib/prism/dsl.rb#770 + # pkg:gem/prism#lib/prism/dsl.rb:770 sig do params( source: Prism::Source, @@ -11227,7 +11062,7 @@ module Prism::DSL # Create a new StatementsNode node. # - # source://prism//lib/prism/dsl.rb#775 + # pkg:gem/prism#lib/prism/dsl.rb:775 sig do params( source: Prism::Source, @@ -11241,13 +11076,13 @@ module Prism::DSL # Retrieve the value of one of the StringFlags flags. # - # source://prism//lib/prism/dsl.rb#963 + # pkg:gem/prism#lib/prism/dsl.rb:963 sig { params(name: Symbol).returns(Integer) } def string_flag(name); end # Create a new StringNode node. # - # source://prism//lib/prism/dsl.rb#780 + # pkg:gem/prism#lib/prism/dsl.rb:780 sig do params( source: Prism::Source, @@ -11264,7 +11099,7 @@ module Prism::DSL # Create a new SuperNode node. # - # source://prism//lib/prism/dsl.rb#785 + # pkg:gem/prism#lib/prism/dsl.rb:785 sig do params( source: Prism::Source, @@ -11282,13 +11117,13 @@ module Prism::DSL # Retrieve the value of one of the SymbolFlags flags. # - # source://prism//lib/prism/dsl.rb#974 + # pkg:gem/prism#lib/prism/dsl.rb:974 sig { params(name: Symbol).returns(Integer) } def symbol_flag(name); end # Create a new SymbolNode node. # - # source://prism//lib/prism/dsl.rb#790 + # pkg:gem/prism#lib/prism/dsl.rb:790 sig do params( source: Prism::Source, @@ -11305,7 +11140,7 @@ module Prism::DSL # Create a new TrueNode node. # - # source://prism//lib/prism/dsl.rb#795 + # pkg:gem/prism#lib/prism/dsl.rb:795 sig do params( source: Prism::Source, @@ -11318,7 +11153,7 @@ module Prism::DSL # Create a new UndefNode node. # - # source://prism//lib/prism/dsl.rb#800 + # pkg:gem/prism#lib/prism/dsl.rb:800 sig do params( source: Prism::Source, @@ -11333,7 +11168,7 @@ module Prism::DSL # Create a new UnlessNode node. # - # source://prism//lib/prism/dsl.rb#805 + # pkg:gem/prism#lib/prism/dsl.rb:805 sig do params( source: Prism::Source, @@ -11352,7 +11187,7 @@ module Prism::DSL # Create a new UntilNode node. # - # source://prism//lib/prism/dsl.rb#810 + # pkg:gem/prism#lib/prism/dsl.rb:810 sig do params( source: Prism::Source, @@ -11370,7 +11205,7 @@ module Prism::DSL # Create a new WhenNode node. # - # source://prism//lib/prism/dsl.rb#815 + # pkg:gem/prism#lib/prism/dsl.rb:815 sig do params( source: Prism::Source, @@ -11387,7 +11222,7 @@ module Prism::DSL # Create a new WhileNode node. # - # source://prism//lib/prism/dsl.rb#820 + # pkg:gem/prism#lib/prism/dsl.rb:820 sig do params( source: Prism::Source, @@ -11405,7 +11240,7 @@ module Prism::DSL # Create a new XStringNode node. # - # source://prism//lib/prism/dsl.rb#825 + # pkg:gem/prism#lib/prism/dsl.rb:825 sig do params( source: Prism::Source, @@ -11422,7 +11257,7 @@ module Prism::DSL # Create a new YieldNode node. # - # source://prism//lib/prism/dsl.rb#830 + # pkg:gem/prism#lib/prism/dsl.rb:830 sig do params( source: Prism::Source, @@ -11442,21 +11277,21 @@ module Prism::DSL # The default location object that gets attached to nodes if no location is # specified, which uses the given source. # - # source://prism//lib/prism/dsl.rb#993 + # pkg:gem/prism#lib/prism/dsl.rb:993 sig { returns(Prism::Location) } def default_location; end # The default node that gets attached to nodes if no node is specified for a # required node field. # - # source://prism//lib/prism/dsl.rb#999 + # pkg:gem/prism#lib/prism/dsl.rb:999 sig { params(source: Prism::Source, location: Prism::Location).returns(Prism::Node) } def default_node(source, location); end # The default source object that gets attached to nodes and locations if no # source is specified. # - # source://prism//lib/prism/dsl.rb#987 + # pkg:gem/prism#lib/prism/dsl.rb:987 sig { returns(Prism::Source) } def default_source; end end @@ -11467,13 +11302,11 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6293 +# pkg:gem/prism#lib/prism/node.rb:6293 class Prism::DefNode < ::Prism::Node # Initialize a new DefNode node. # - # @return [DefNode] a new instance of DefNode - # - # source://prism//lib/prism/node.rb#6295 + # pkg:gem/prism#lib/prism/node.rb:6295 sig do params( source: Prism::Source, @@ -11499,42 +11332,42 @@ class Prism::DefNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6543 + # pkg:gem/prism#lib/prism/node.rb:6543 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6315 + # pkg:gem/prism#lib/prism/node.rb:6315 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#6383 + # pkg:gem/prism#lib/prism/node.rb:6383 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6320 + # pkg:gem/prism#lib/prism/node.rb:6320 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6343 + # pkg:gem/prism#lib/prism/node.rb:6343 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6334 + # pkg:gem/prism#lib/prism/node.rb:6334 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: StatementsNode | BeginNode | nil, ?locals: Array[Symbol], ?def_keyword_loc: Location, ?operator_loc: Location?, ?lparen_loc: Location?, ?rparen_loc: Location?, ?equal_loc: Location?, ?end_keyword_loc: Location?) -> DefNode # - # source://prism//lib/prism/node.rb#6348 + # pkg:gem/prism#lib/prism/node.rb:6348 sig do params( node_id: Integer, @@ -11556,59 +11389,56 @@ class Prism::DefNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6320 + # pkg:gem/prism#lib/prism/node.rb:6353 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: StatementsNode | BeginNode | nil, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#6356 + # pkg:gem/prism#lib/prism/node.rb:6356 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def def_keyword: () -> String # - # source://prism//lib/prism/node.rb#6497 + # pkg:gem/prism#lib/prism/node.rb:6497 sig { returns(String) } def def_keyword; end # attr_reader def_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6389 + # pkg:gem/prism#lib/prism/node.rb:6389 sig { returns(Prism::Location) } def def_keyword_loc; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [receiver] - # - # source://prism//lib/prism/node.rb#6325 + # pkg:gem/prism#lib/prism/node.rb:6325 def each_child_node; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6522 + # pkg:gem/prism#lib/prism/node.rb:6522 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6478 + # pkg:gem/prism#lib/prism/node.rb:6478 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def equal: () -> String? # - # source://prism//lib/prism/node.rb#6517 + # pkg:gem/prism#lib/prism/node.rb:6517 sig { returns(T.nilable(String)) } def equal; end # attr_reader equal_loc: Location? # - # source://prism//lib/prism/node.rb#6459 + # pkg:gem/prism#lib/prism/node.rb:6459 sig { returns(T.nilable(Prism::Location)) } def equal_loc; end @@ -11617,128 +11447,128 @@ class Prism::DefNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6527 + # pkg:gem/prism#lib/prism/node.rb:6527 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#6386 + # pkg:gem/prism#lib/prism/node.rb:6386 sig { returns(T::Array[Symbol]) } def locals; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6507 + # pkg:gem/prism#lib/prism/node.rb:6507 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6421 + # pkg:gem/prism#lib/prism/node.rb:6421 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#6361 + # pkg:gem/prism#lib/prism/node.rb:6361 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#6364 + # pkg:gem/prism#lib/prism/node.rb:6364 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#6502 + # pkg:gem/prism#lib/prism/node.rb:6502 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#6402 + # pkg:gem/prism#lib/prism/node.rb:6402 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#6380 + # pkg:gem/prism#lib/prism/node.rb:6380 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#6377 + # pkg:gem/prism#lib/prism/node.rb:6377 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6512 + # pkg:gem/prism#lib/prism/node.rb:6512 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6440 + # pkg:gem/prism#lib/prism/node.rb:6440 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the def_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6397 + # pkg:gem/prism#lib/prism/node.rb:6397 def save_def_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6492 + # pkg:gem/prism#lib/prism/node.rb:6492 def save_end_keyword_loc(repository); end # Save the equal_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6473 + # pkg:gem/prism#lib/prism/node.rb:6473 def save_equal_loc(repository); end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6435 + # pkg:gem/prism#lib/prism/node.rb:6435 def save_lparen_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6372 + # pkg:gem/prism#lib/prism/node.rb:6372 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6416 + # pkg:gem/prism#lib/prism/node.rb:6416 def save_operator_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6454 + # pkg:gem/prism#lib/prism/node.rb:6454 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6532 + # pkg:gem/prism#lib/prism/node.rb:6532 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6537 + # pkg:gem/prism#lib/prism/node.rb:6537 def type; end end end @@ -11748,13 +11578,11 @@ end # defined?(a) # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6565 +# pkg:gem/prism#lib/prism/node.rb:6565 class Prism::DefinedNode < ::Prism::Node # Initialize a new DefinedNode node. # - # @return [DefinedNode] a new instance of DefinedNode - # - # source://prism//lib/prism/node.rb#6567 + # pkg:gem/prism#lib/prism/node.rb:6567 sig do params( source: Prism::Source, @@ -11772,36 +11600,36 @@ class Prism::DefinedNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6704 + # pkg:gem/prism#lib/prism/node.rb:6704 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6579 + # pkg:gem/prism#lib/prism/node.rb:6579 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6584 + # pkg:gem/prism#lib/prism/node.rb:6584 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6601 + # pkg:gem/prism#lib/prism/node.rb:6601 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6596 + # pkg:gem/prism#lib/prism/node.rb:6596 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location) -> DefinedNode # - # source://prism//lib/prism/node.rb#6606 + # pkg:gem/prism#lib/prism/node.rb:6606 sig do params( node_id: Integer, @@ -11815,24 +11643,21 @@ class Prism::DefinedNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6584 + # pkg:gem/prism#lib/prism/node.rb:6611 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#6614 + # pkg:gem/prism#lib/prism/node.rb:6614 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#6589 + # pkg:gem/prism#lib/prism/node.rb:6589 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -11840,128 +11665,116 @@ class Prism::DefinedNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6688 + # pkg:gem/prism#lib/prism/node.rb:6688 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#6683 + # pkg:gem/prism#lib/prism/node.rb:6683 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#6660 + # pkg:gem/prism#lib/prism/node.rb:6660 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6673 + # pkg:gem/prism#lib/prism/node.rb:6673 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6619 + # pkg:gem/prism#lib/prism/node.rb:6619 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6678 + # pkg:gem/prism#lib/prism/node.rb:6678 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6641 + # pkg:gem/prism#lib/prism/node.rb:6641 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6668 + # pkg:gem/prism#lib/prism/node.rb:6668 def save_keyword_loc(repository); end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6633 + # pkg:gem/prism#lib/prism/node.rb:6633 def save_lparen_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6655 + # pkg:gem/prism#lib/prism/node.rb:6655 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6693 + # pkg:gem/prism#lib/prism/node.rb:6693 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#6638 + # pkg:gem/prism#lib/prism/node.rb:6638 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6698 + # pkg:gem/prism#lib/prism/node.rb:6698 def type; end end end -# source://prism//lib/prism/desugar_compiler.rb#5 +# pkg:gem/prism#lib/prism/desugar_compiler.rb:5 class Prism::DesugarAndWriteNode include ::Prism::DSL - # @return [DesugarAndWriteNode] a new instance of DesugarAndWriteNode - # - # source://prism//lib/prism/desugar_compiler.rb#10 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:10 def initialize(node, default_source, read_class, write_class, **arguments); end - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#8 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 def arguments; end # Desugar `x &&= y` to `x && x = y` # - # source://prism//lib/prism/desugar_compiler.rb#19 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:19 def compile; end - # Returns the value of attribute default_source. - # - # source://prism//lib/prism/desugar_compiler.rb#8 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 def default_source; end - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#8 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 def node; end - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#8 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 def read_class; end - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#8 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 def write_class; end end # DesugarCompiler is a compiler that desugars Ruby code into a more primitive # form. This is useful for consumers that want to deal with fewer node types. # -# source://prism//lib/prism/desugar_compiler.rb#256 +# pkg:gem/prism#lib/prism/desugar_compiler.rb:256 class Prism::DesugarCompiler < ::Prism::MutationCompiler # @@foo &&= bar # @@ -11969,7 +11782,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # @@foo && @@foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#262 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:262 def visit_class_variable_and_write_node(node); end # @@foo += bar @@ -11978,7 +11791,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # @@foo = @@foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#280 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:280 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar @@ -11987,7 +11800,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?(@@foo) ? @@foo : @@foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#271 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:271 def visit_class_variable_or_write_node(node); end # Foo &&= bar @@ -11996,7 +11809,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # Foo && Foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#289 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:289 def visit_constant_and_write_node(node); end # Foo += bar @@ -12005,7 +11818,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # Foo = Foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#307 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:307 def visit_constant_operator_write_node(node); end # Foo ||= bar @@ -12014,7 +11827,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?(Foo) ? Foo : Foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#298 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:298 def visit_constant_or_write_node(node); end # $foo &&= bar @@ -12023,7 +11836,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # $foo && $foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#316 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:316 def visit_global_variable_and_write_node(node); end # $foo += bar @@ -12032,7 +11845,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # $foo = $foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#334 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:334 def visit_global_variable_operator_write_node(node); end # $foo ||= bar @@ -12041,22 +11854,34 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?($foo) ? $foo : $foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#325 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:325 def visit_global_variable_or_write_node(node); end + # @foo &&= bar + # # becomes # - # source://prism//lib/prism/desugar_compiler.rb#343 + # @foo && @foo = bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:343 def visit_instance_variable_and_write_node(node); end + # @foo += bar + # # becomes # - # source://prism//lib/prism/desugar_compiler.rb#361 + # @foo = @foo + bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:361 def visit_instance_variable_operator_write_node(node); end + # @foo ||= bar + # # becomes # - # source://prism//lib/prism/desugar_compiler.rb#352 + # @foo || @foo = bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:352 def visit_instance_variable_or_write_node(node); end # foo &&= bar @@ -12065,7 +11890,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo && foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#370 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:370 def visit_local_variable_and_write_node(node); end # foo += bar @@ -12074,7 +11899,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo = foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#388 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:388 def visit_local_variable_operator_write_node(node); end # foo ||= bar @@ -12083,127 +11908,91 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo || foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#379 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:379 def visit_local_variable_or_write_node(node); end end -# source://prism//lib/prism/desugar_compiler.rb#87 +# pkg:gem/prism#lib/prism/desugar_compiler.rb:87 class Prism::DesugarOperatorWriteNode include ::Prism::DSL - # @return [DesugarOperatorWriteNode] a new instance of DesugarOperatorWriteNode - # - # source://prism//lib/prism/desugar_compiler.rb#92 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:92 def initialize(node, default_source, read_class, write_class, **arguments); end - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#90 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 def arguments; end # Desugar `x += y` to `x = x + y` # - # source://prism//lib/prism/desugar_compiler.rb#101 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:101 def compile; end - # Returns the value of attribute default_source. - # - # source://prism//lib/prism/desugar_compiler.rb#90 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 def default_source; end - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#90 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 def node; end - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#90 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 def read_class; end - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#90 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 def write_class; end end -# source://prism//lib/prism/desugar_compiler.rb#36 +# pkg:gem/prism#lib/prism/desugar_compiler.rb:36 class Prism::DesugarOrWriteDefinedNode include ::Prism::DSL - # @return [DesugarOrWriteDefinedNode] a new instance of DesugarOrWriteDefinedNode - # - # source://prism//lib/prism/desugar_compiler.rb#41 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:41 def initialize(node, default_source, read_class, write_class, **arguments); end - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#39 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 def arguments; end # Desugar `x ||= y` to `defined?(x) ? x : x = y` # - # source://prism//lib/prism/desugar_compiler.rb#50 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:50 def compile; end - # Returns the value of attribute default_source. - # - # source://prism//lib/prism/desugar_compiler.rb#39 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 def default_source; end - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#39 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 def node; end - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#39 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 def read_class; end - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#39 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 def write_class; end end -# source://prism//lib/prism/desugar_compiler.rb#131 +# pkg:gem/prism#lib/prism/desugar_compiler.rb:131 class Prism::DesugarOrWriteNode include ::Prism::DSL - # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode - # - # source://prism//lib/prism/desugar_compiler.rb#136 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:136 def initialize(node, default_source, read_class, write_class, **arguments); end - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#134 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 def arguments; end # Desugar `x ||= y` to `x || x = y` # - # source://prism//lib/prism/desugar_compiler.rb#145 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:145 def compile; end - # Returns the value of attribute default_source. - # - # source://prism//lib/prism/desugar_compiler.rb#134 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 def default_source; end - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#134 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 def node; end - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#134 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 def read_class; end - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#134 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 def write_class; end end @@ -12239,39 +12028,37 @@ end # integer = result.value.statements.body.first.receiver.receiver # dispatcher.dispatch_once(integer) # -# source://prism//lib/prism/dispatcher.rb#45 +# pkg:gem/prism#lib/prism/dispatcher.rb:45 class Prism::Dispatcher < ::Prism::Visitor # Initialize a new dispatcher. # - # @return [Dispatcher] a new instance of Dispatcher - # - # source://prism//lib/prism/dispatcher.rb#50 + # pkg:gem/prism#lib/prism/dispatcher.rb:50 def initialize; end # Walks `root` dispatching events to all registered listeners. # # def dispatch: (Node) -> void # - # source://prism//lib/prism/visitor.rb#20 + # pkg:gem/prism#lib/prism/dispatcher.rb:77 def dispatch(node); end # Dispatches a single event for `node` to all registered listeners. # # def dispatch_once: (Node) -> void # - # source://prism//lib/prism/dispatcher.rb#82 + # pkg:gem/prism#lib/prism/dispatcher.rb:82 def dispatch_once(node); end # attr_reader listeners: Hash[Symbol, Array[Listener]] # - # source://prism//lib/prism/dispatcher.rb#47 + # pkg:gem/prism#lib/prism/dispatcher.rb:47 def listeners; end # Register a listener for one or more events. # # def register: (Listener, *Symbol) -> void # - # source://prism//lib/prism/dispatcher.rb#57 + # pkg:gem/prism#lib/prism/dispatcher.rb:57 def register(listener, *events); end # Register all public methods of a listener that match the pattern @@ -12279,2466 +12066,2460 @@ class Prism::Dispatcher < ::Prism::Visitor # # def register_public_methods: (Listener) -> void # - # source://prism//lib/prism/dispatcher.rb#65 + # pkg:gem/prism#lib/prism/dispatcher.rb:65 def register_public_methods(listener); end # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#88 + # pkg:gem/prism#lib/prism/dispatcher.rb:88 def visit_alias_global_variable_node(node); end # Dispatch enter and leave events for AliasMethodNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#96 + # pkg:gem/prism#lib/prism/dispatcher.rb:96 def visit_alias_method_node(node); end # Dispatch enter and leave events for AlternationPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#104 + # pkg:gem/prism#lib/prism/dispatcher.rb:104 def visit_alternation_pattern_node(node); end # Dispatch enter and leave events for AndNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#112 + # pkg:gem/prism#lib/prism/dispatcher.rb:112 def visit_and_node(node); end # Dispatch enter and leave events for ArgumentsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#120 + # pkg:gem/prism#lib/prism/dispatcher.rb:120 def visit_arguments_node(node); end # Dispatch enter and leave events for ArrayNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#128 + # pkg:gem/prism#lib/prism/dispatcher.rb:128 def visit_array_node(node); end # Dispatch enter and leave events for ArrayPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#136 + # pkg:gem/prism#lib/prism/dispatcher.rb:136 def visit_array_pattern_node(node); end # Dispatch enter and leave events for AssocNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#144 + # pkg:gem/prism#lib/prism/dispatcher.rb:144 def visit_assoc_node(node); end # Dispatch enter and leave events for AssocSplatNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#152 + # pkg:gem/prism#lib/prism/dispatcher.rb:152 def visit_assoc_splat_node(node); end # Dispatch enter and leave events for BackReferenceReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#160 + # pkg:gem/prism#lib/prism/dispatcher.rb:160 def visit_back_reference_read_node(node); end # Dispatch enter and leave events for BeginNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#168 + # pkg:gem/prism#lib/prism/dispatcher.rb:168 def visit_begin_node(node); end # Dispatch enter and leave events for BlockArgumentNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#176 + # pkg:gem/prism#lib/prism/dispatcher.rb:176 def visit_block_argument_node(node); end # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#184 + # pkg:gem/prism#lib/prism/dispatcher.rb:184 def visit_block_local_variable_node(node); end # Dispatch enter and leave events for BlockNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#192 + # pkg:gem/prism#lib/prism/dispatcher.rb:192 def visit_block_node(node); end # Dispatch enter and leave events for BlockParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#200 + # pkg:gem/prism#lib/prism/dispatcher.rb:200 def visit_block_parameter_node(node); end # Dispatch enter and leave events for BlockParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#208 + # pkg:gem/prism#lib/prism/dispatcher.rb:208 def visit_block_parameters_node(node); end # Dispatch enter and leave events for BreakNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#216 + # pkg:gem/prism#lib/prism/dispatcher.rb:216 def visit_break_node(node); end # Dispatch enter and leave events for CallAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#224 + # pkg:gem/prism#lib/prism/dispatcher.rb:224 def visit_call_and_write_node(node); end # Dispatch enter and leave events for CallNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#232 + # pkg:gem/prism#lib/prism/dispatcher.rb:232 def visit_call_node(node); end # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#240 + # pkg:gem/prism#lib/prism/dispatcher.rb:240 def visit_call_operator_write_node(node); end # Dispatch enter and leave events for CallOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#248 + # pkg:gem/prism#lib/prism/dispatcher.rb:248 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CallTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#256 + # pkg:gem/prism#lib/prism/dispatcher.rb:256 def visit_call_target_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#264 + # pkg:gem/prism#lib/prism/dispatcher.rb:264 def visit_capture_pattern_node(node); end # Dispatch enter and leave events for CaseMatchNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#272 + # pkg:gem/prism#lib/prism/dispatcher.rb:272 def visit_case_match_node(node); end # Dispatch enter and leave events for CaseNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#280 + # pkg:gem/prism#lib/prism/dispatcher.rb:280 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#288 + # pkg:gem/prism#lib/prism/dispatcher.rb:288 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#296 + # pkg:gem/prism#lib/prism/dispatcher.rb:296 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#304 + # pkg:gem/prism#lib/prism/dispatcher.rb:304 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#312 + # pkg:gem/prism#lib/prism/dispatcher.rb:312 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#320 + # pkg:gem/prism#lib/prism/dispatcher.rb:320 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#328 + # pkg:gem/prism#lib/prism/dispatcher.rb:328 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#336 + # pkg:gem/prism#lib/prism/dispatcher.rb:336 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#344 + # pkg:gem/prism#lib/prism/dispatcher.rb:344 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#352 + # pkg:gem/prism#lib/prism/dispatcher.rb:352 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#360 + # pkg:gem/prism#lib/prism/dispatcher.rb:360 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#368 + # pkg:gem/prism#lib/prism/dispatcher.rb:368 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#376 + # pkg:gem/prism#lib/prism/dispatcher.rb:376 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#384 + # pkg:gem/prism#lib/prism/dispatcher.rb:384 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#392 + # pkg:gem/prism#lib/prism/dispatcher.rb:392 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#400 + # pkg:gem/prism#lib/prism/dispatcher.rb:400 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#408 + # pkg:gem/prism#lib/prism/dispatcher.rb:408 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#416 + # pkg:gem/prism#lib/prism/dispatcher.rb:416 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#424 + # pkg:gem/prism#lib/prism/dispatcher.rb:424 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#432 + # pkg:gem/prism#lib/prism/dispatcher.rb:432 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#440 + # pkg:gem/prism#lib/prism/dispatcher.rb:440 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#448 + # pkg:gem/prism#lib/prism/dispatcher.rb:448 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#456 + # pkg:gem/prism#lib/prism/dispatcher.rb:456 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#464 + # pkg:gem/prism#lib/prism/dispatcher.rb:464 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#472 + # pkg:gem/prism#lib/prism/dispatcher.rb:472 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#480 + # pkg:gem/prism#lib/prism/dispatcher.rb:480 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#488 + # pkg:gem/prism#lib/prism/dispatcher.rb:488 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#496 + # pkg:gem/prism#lib/prism/dispatcher.rb:496 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#504 + # pkg:gem/prism#lib/prism/dispatcher.rb:504 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#512 + # pkg:gem/prism#lib/prism/dispatcher.rb:512 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#520 + # pkg:gem/prism#lib/prism/dispatcher.rb:520 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#528 + # pkg:gem/prism#lib/prism/dispatcher.rb:528 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#536 + # pkg:gem/prism#lib/prism/dispatcher.rb:536 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#544 + # pkg:gem/prism#lib/prism/dispatcher.rb:544 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#552 + # pkg:gem/prism#lib/prism/dispatcher.rb:552 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#560 + # pkg:gem/prism#lib/prism/dispatcher.rb:560 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#568 + # pkg:gem/prism#lib/prism/dispatcher.rb:568 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#576 + # pkg:gem/prism#lib/prism/dispatcher.rb:576 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#584 + # pkg:gem/prism#lib/prism/dispatcher.rb:584 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#592 + # pkg:gem/prism#lib/prism/dispatcher.rb:592 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#600 + # pkg:gem/prism#lib/prism/dispatcher.rb:600 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#608 + # pkg:gem/prism#lib/prism/dispatcher.rb:608 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#616 + # pkg:gem/prism#lib/prism/dispatcher.rb:616 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#624 + # pkg:gem/prism#lib/prism/dispatcher.rb:624 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#632 + # pkg:gem/prism#lib/prism/dispatcher.rb:632 def visit_implicit_node(node); end # Dispatch enter and leave events for ImplicitRestNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#640 + # pkg:gem/prism#lib/prism/dispatcher.rb:640 def visit_implicit_rest_node(node); end # Dispatch enter and leave events for InNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#648 + # pkg:gem/prism#lib/prism/dispatcher.rb:648 def visit_in_node(node); end # Dispatch enter and leave events for IndexAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#656 + # pkg:gem/prism#lib/prism/dispatcher.rb:656 def visit_index_and_write_node(node); end # Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#664 + # pkg:gem/prism#lib/prism/dispatcher.rb:664 def visit_index_operator_write_node(node); end # Dispatch enter and leave events for IndexOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#672 + # pkg:gem/prism#lib/prism/dispatcher.rb:672 def visit_index_or_write_node(node); end # Dispatch enter and leave events for IndexTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#680 + # pkg:gem/prism#lib/prism/dispatcher.rb:680 def visit_index_target_node(node); end # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#688 + # pkg:gem/prism#lib/prism/dispatcher.rb:688 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#696 + # pkg:gem/prism#lib/prism/dispatcher.rb:696 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#704 + # pkg:gem/prism#lib/prism/dispatcher.rb:704 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#712 + # pkg:gem/prism#lib/prism/dispatcher.rb:712 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#720 + # pkg:gem/prism#lib/prism/dispatcher.rb:720 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#728 + # pkg:gem/prism#lib/prism/dispatcher.rb:728 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#736 + # pkg:gem/prism#lib/prism/dispatcher.rb:736 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#744 + # pkg:gem/prism#lib/prism/dispatcher.rb:744 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#752 + # pkg:gem/prism#lib/prism/dispatcher.rb:752 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#760 + # pkg:gem/prism#lib/prism/dispatcher.rb:760 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#768 + # pkg:gem/prism#lib/prism/dispatcher.rb:768 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#776 + # pkg:gem/prism#lib/prism/dispatcher.rb:776 def visit_interpolated_x_string_node(node); end # Dispatch enter and leave events for ItLocalVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#784 + # pkg:gem/prism#lib/prism/dispatcher.rb:784 def visit_it_local_variable_read_node(node); end # Dispatch enter and leave events for ItParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#792 + # pkg:gem/prism#lib/prism/dispatcher.rb:792 def visit_it_parameters_node(node); end # Dispatch enter and leave events for KeywordHashNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#800 + # pkg:gem/prism#lib/prism/dispatcher.rb:800 def visit_keyword_hash_node(node); end # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#808 + # pkg:gem/prism#lib/prism/dispatcher.rb:808 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#816 + # pkg:gem/prism#lib/prism/dispatcher.rb:816 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#824 + # pkg:gem/prism#lib/prism/dispatcher.rb:824 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#832 + # pkg:gem/prism#lib/prism/dispatcher.rb:832 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#840 + # pkg:gem/prism#lib/prism/dispatcher.rb:840 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#848 + # pkg:gem/prism#lib/prism/dispatcher.rb:848 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#856 + # pkg:gem/prism#lib/prism/dispatcher.rb:856 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#864 + # pkg:gem/prism#lib/prism/dispatcher.rb:864 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#872 + # pkg:gem/prism#lib/prism/dispatcher.rb:872 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#880 + # pkg:gem/prism#lib/prism/dispatcher.rb:880 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#888 + # pkg:gem/prism#lib/prism/dispatcher.rb:888 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#896 + # pkg:gem/prism#lib/prism/dispatcher.rb:896 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#904 + # pkg:gem/prism#lib/prism/dispatcher.rb:904 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#912 + # pkg:gem/prism#lib/prism/dispatcher.rb:912 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#920 + # pkg:gem/prism#lib/prism/dispatcher.rb:920 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#928 + # pkg:gem/prism#lib/prism/dispatcher.rb:928 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#936 + # pkg:gem/prism#lib/prism/dispatcher.rb:936 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#944 + # pkg:gem/prism#lib/prism/dispatcher.rb:944 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#952 + # pkg:gem/prism#lib/prism/dispatcher.rb:952 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#960 + # pkg:gem/prism#lib/prism/dispatcher.rb:960 def visit_numbered_parameters_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#968 + # pkg:gem/prism#lib/prism/dispatcher.rb:968 def visit_numbered_reference_read_node(node); end # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#976 + # pkg:gem/prism#lib/prism/dispatcher.rb:976 def visit_optional_keyword_parameter_node(node); end # Dispatch enter and leave events for OptionalParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#984 + # pkg:gem/prism#lib/prism/dispatcher.rb:984 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#992 + # pkg:gem/prism#lib/prism/dispatcher.rb:992 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1000 + # pkg:gem/prism#lib/prism/dispatcher.rb:1000 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1008 + # pkg:gem/prism#lib/prism/dispatcher.rb:1008 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1016 + # pkg:gem/prism#lib/prism/dispatcher.rb:1016 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1024 + # pkg:gem/prism#lib/prism/dispatcher.rb:1024 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1032 + # pkg:gem/prism#lib/prism/dispatcher.rb:1032 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1040 + # pkg:gem/prism#lib/prism/dispatcher.rb:1040 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1048 + # pkg:gem/prism#lib/prism/dispatcher.rb:1048 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1056 + # pkg:gem/prism#lib/prism/dispatcher.rb:1056 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1064 + # pkg:gem/prism#lib/prism/dispatcher.rb:1064 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1072 + # pkg:gem/prism#lib/prism/dispatcher.rb:1072 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1080 + # pkg:gem/prism#lib/prism/dispatcher.rb:1080 def visit_regular_expression_node(node); end # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1088 + # pkg:gem/prism#lib/prism/dispatcher.rb:1088 def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1096 + # pkg:gem/prism#lib/prism/dispatcher.rb:1096 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1104 + # pkg:gem/prism#lib/prism/dispatcher.rb:1104 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1112 + # pkg:gem/prism#lib/prism/dispatcher.rb:1112 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1120 + # pkg:gem/prism#lib/prism/dispatcher.rb:1120 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1128 + # pkg:gem/prism#lib/prism/dispatcher.rb:1128 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1136 + # pkg:gem/prism#lib/prism/dispatcher.rb:1136 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1144 + # pkg:gem/prism#lib/prism/dispatcher.rb:1144 def visit_self_node(node); end # Dispatch enter and leave events for ShareableConstantNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1152 + # pkg:gem/prism#lib/prism/dispatcher.rb:1152 def visit_shareable_constant_node(node); end # Dispatch enter and leave events for SingletonClassNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1160 + # pkg:gem/prism#lib/prism/dispatcher.rb:1160 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1168 + # pkg:gem/prism#lib/prism/dispatcher.rb:1168 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1176 + # pkg:gem/prism#lib/prism/dispatcher.rb:1176 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1184 + # pkg:gem/prism#lib/prism/dispatcher.rb:1184 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1192 + # pkg:gem/prism#lib/prism/dispatcher.rb:1192 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1200 + # pkg:gem/prism#lib/prism/dispatcher.rb:1200 def visit_statements_node(node); end # Dispatch enter and leave events for StringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1208 + # pkg:gem/prism#lib/prism/dispatcher.rb:1208 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1216 + # pkg:gem/prism#lib/prism/dispatcher.rb:1216 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1224 + # pkg:gem/prism#lib/prism/dispatcher.rb:1224 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1232 + # pkg:gem/prism#lib/prism/dispatcher.rb:1232 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1240 + # pkg:gem/prism#lib/prism/dispatcher.rb:1240 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1248 + # pkg:gem/prism#lib/prism/dispatcher.rb:1248 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1256 + # pkg:gem/prism#lib/prism/dispatcher.rb:1256 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1264 + # pkg:gem/prism#lib/prism/dispatcher.rb:1264 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1272 + # pkg:gem/prism#lib/prism/dispatcher.rb:1272 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1280 + # pkg:gem/prism#lib/prism/dispatcher.rb:1280 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1288 + # pkg:gem/prism#lib/prism/dispatcher.rb:1288 def visit_yield_node(node); end private # Register a listener for the given events. # - # source://prism//lib/prism/dispatcher.rb#70 + # pkg:gem/prism#lib/prism/dispatcher.rb:70 def register_events(listener, events); end end -# source://prism//lib/prism/dispatcher.rb#1294 +# pkg:gem/prism#lib/prism/dispatcher.rb:1294 class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor - # @return [DispatchOnce] a new instance of DispatchOnce - # - # source://prism//lib/prism/dispatcher.rb#1297 + # pkg:gem/prism#lib/prism/dispatcher.rb:1297 def initialize(listeners); end - # Returns the value of attribute listeners. - # - # source://prism//lib/prism/dispatcher.rb#1295 + # pkg:gem/prism#lib/prism/dispatcher.rb:1295 def listeners; end # Dispatch enter and leave events for AliasGlobalVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1302 + # pkg:gem/prism#lib/prism/dispatcher.rb:1302 def visit_alias_global_variable_node(node); end # Dispatch enter and leave events for AliasMethodNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1308 + # pkg:gem/prism#lib/prism/dispatcher.rb:1308 def visit_alias_method_node(node); end # Dispatch enter and leave events for AlternationPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1314 + # pkg:gem/prism#lib/prism/dispatcher.rb:1314 def visit_alternation_pattern_node(node); end # Dispatch enter and leave events for AndNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1320 + # pkg:gem/prism#lib/prism/dispatcher.rb:1320 def visit_and_node(node); end # Dispatch enter and leave events for ArgumentsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1326 + # pkg:gem/prism#lib/prism/dispatcher.rb:1326 def visit_arguments_node(node); end # Dispatch enter and leave events for ArrayNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1332 + # pkg:gem/prism#lib/prism/dispatcher.rb:1332 def visit_array_node(node); end # Dispatch enter and leave events for ArrayPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1338 + # pkg:gem/prism#lib/prism/dispatcher.rb:1338 def visit_array_pattern_node(node); end # Dispatch enter and leave events for AssocNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1344 + # pkg:gem/prism#lib/prism/dispatcher.rb:1344 def visit_assoc_node(node); end # Dispatch enter and leave events for AssocSplatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1350 + # pkg:gem/prism#lib/prism/dispatcher.rb:1350 def visit_assoc_splat_node(node); end # Dispatch enter and leave events for BackReferenceReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1356 + # pkg:gem/prism#lib/prism/dispatcher.rb:1356 def visit_back_reference_read_node(node); end # Dispatch enter and leave events for BeginNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1362 + # pkg:gem/prism#lib/prism/dispatcher.rb:1362 def visit_begin_node(node); end # Dispatch enter and leave events for BlockArgumentNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1368 + # pkg:gem/prism#lib/prism/dispatcher.rb:1368 def visit_block_argument_node(node); end # Dispatch enter and leave events for BlockLocalVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1374 + # pkg:gem/prism#lib/prism/dispatcher.rb:1374 def visit_block_local_variable_node(node); end # Dispatch enter and leave events for BlockNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1380 + # pkg:gem/prism#lib/prism/dispatcher.rb:1380 def visit_block_node(node); end # Dispatch enter and leave events for BlockParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1386 + # pkg:gem/prism#lib/prism/dispatcher.rb:1386 def visit_block_parameter_node(node); end # Dispatch enter and leave events for BlockParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1392 + # pkg:gem/prism#lib/prism/dispatcher.rb:1392 def visit_block_parameters_node(node); end # Dispatch enter and leave events for BreakNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1398 + # pkg:gem/prism#lib/prism/dispatcher.rb:1398 def visit_break_node(node); end # Dispatch enter and leave events for CallAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1404 + # pkg:gem/prism#lib/prism/dispatcher.rb:1404 def visit_call_and_write_node(node); end # Dispatch enter and leave events for CallNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1410 + # pkg:gem/prism#lib/prism/dispatcher.rb:1410 def visit_call_node(node); end # Dispatch enter and leave events for CallOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1416 + # pkg:gem/prism#lib/prism/dispatcher.rb:1416 def visit_call_operator_write_node(node); end # Dispatch enter and leave events for CallOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1422 + # pkg:gem/prism#lib/prism/dispatcher.rb:1422 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CallTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1428 + # pkg:gem/prism#lib/prism/dispatcher.rb:1428 def visit_call_target_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1434 + # pkg:gem/prism#lib/prism/dispatcher.rb:1434 def visit_capture_pattern_node(node); end # Dispatch enter and leave events for CaseMatchNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1440 + # pkg:gem/prism#lib/prism/dispatcher.rb:1440 def visit_case_match_node(node); end # Dispatch enter and leave events for CaseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1446 + # pkg:gem/prism#lib/prism/dispatcher.rb:1446 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1452 + # pkg:gem/prism#lib/prism/dispatcher.rb:1452 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1458 + # pkg:gem/prism#lib/prism/dispatcher.rb:1458 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1464 + # pkg:gem/prism#lib/prism/dispatcher.rb:1464 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1470 + # pkg:gem/prism#lib/prism/dispatcher.rb:1470 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1476 + # pkg:gem/prism#lib/prism/dispatcher.rb:1476 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1482 + # pkg:gem/prism#lib/prism/dispatcher.rb:1482 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1488 + # pkg:gem/prism#lib/prism/dispatcher.rb:1488 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1494 + # pkg:gem/prism#lib/prism/dispatcher.rb:1494 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1500 + # pkg:gem/prism#lib/prism/dispatcher.rb:1500 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1506 + # pkg:gem/prism#lib/prism/dispatcher.rb:1506 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1512 + # pkg:gem/prism#lib/prism/dispatcher.rb:1512 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1518 + # pkg:gem/prism#lib/prism/dispatcher.rb:1518 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1524 + # pkg:gem/prism#lib/prism/dispatcher.rb:1524 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1530 + # pkg:gem/prism#lib/prism/dispatcher.rb:1530 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1536 + # pkg:gem/prism#lib/prism/dispatcher.rb:1536 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1542 + # pkg:gem/prism#lib/prism/dispatcher.rb:1542 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1548 + # pkg:gem/prism#lib/prism/dispatcher.rb:1548 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1554 + # pkg:gem/prism#lib/prism/dispatcher.rb:1554 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1560 + # pkg:gem/prism#lib/prism/dispatcher.rb:1560 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1566 + # pkg:gem/prism#lib/prism/dispatcher.rb:1566 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1572 + # pkg:gem/prism#lib/prism/dispatcher.rb:1572 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1578 + # pkg:gem/prism#lib/prism/dispatcher.rb:1578 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1584 + # pkg:gem/prism#lib/prism/dispatcher.rb:1584 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1590 + # pkg:gem/prism#lib/prism/dispatcher.rb:1590 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1596 + # pkg:gem/prism#lib/prism/dispatcher.rb:1596 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1602 + # pkg:gem/prism#lib/prism/dispatcher.rb:1602 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1608 + # pkg:gem/prism#lib/prism/dispatcher.rb:1608 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1614 + # pkg:gem/prism#lib/prism/dispatcher.rb:1614 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1620 + # pkg:gem/prism#lib/prism/dispatcher.rb:1620 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1626 + # pkg:gem/prism#lib/prism/dispatcher.rb:1626 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1632 + # pkg:gem/prism#lib/prism/dispatcher.rb:1632 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1638 + # pkg:gem/prism#lib/prism/dispatcher.rb:1638 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1644 + # pkg:gem/prism#lib/prism/dispatcher.rb:1644 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1650 + # pkg:gem/prism#lib/prism/dispatcher.rb:1650 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1656 + # pkg:gem/prism#lib/prism/dispatcher.rb:1656 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1662 + # pkg:gem/prism#lib/prism/dispatcher.rb:1662 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1668 + # pkg:gem/prism#lib/prism/dispatcher.rb:1668 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1674 + # pkg:gem/prism#lib/prism/dispatcher.rb:1674 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1680 + # pkg:gem/prism#lib/prism/dispatcher.rb:1680 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1686 + # pkg:gem/prism#lib/prism/dispatcher.rb:1686 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1692 + # pkg:gem/prism#lib/prism/dispatcher.rb:1692 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1698 + # pkg:gem/prism#lib/prism/dispatcher.rb:1698 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1704 + # pkg:gem/prism#lib/prism/dispatcher.rb:1704 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1710 + # pkg:gem/prism#lib/prism/dispatcher.rb:1710 def visit_implicit_node(node); end # Dispatch enter and leave events for ImplicitRestNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1716 + # pkg:gem/prism#lib/prism/dispatcher.rb:1716 def visit_implicit_rest_node(node); end # Dispatch enter and leave events for InNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1722 + # pkg:gem/prism#lib/prism/dispatcher.rb:1722 def visit_in_node(node); end # Dispatch enter and leave events for IndexAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1728 + # pkg:gem/prism#lib/prism/dispatcher.rb:1728 def visit_index_and_write_node(node); end # Dispatch enter and leave events for IndexOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1734 + # pkg:gem/prism#lib/prism/dispatcher.rb:1734 def visit_index_operator_write_node(node); end # Dispatch enter and leave events for IndexOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1740 + # pkg:gem/prism#lib/prism/dispatcher.rb:1740 def visit_index_or_write_node(node); end # Dispatch enter and leave events for IndexTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1746 + # pkg:gem/prism#lib/prism/dispatcher.rb:1746 def visit_index_target_node(node); end # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1752 + # pkg:gem/prism#lib/prism/dispatcher.rb:1752 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1758 + # pkg:gem/prism#lib/prism/dispatcher.rb:1758 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1764 + # pkg:gem/prism#lib/prism/dispatcher.rb:1764 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1770 + # pkg:gem/prism#lib/prism/dispatcher.rb:1770 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1776 + # pkg:gem/prism#lib/prism/dispatcher.rb:1776 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1782 + # pkg:gem/prism#lib/prism/dispatcher.rb:1782 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1788 + # pkg:gem/prism#lib/prism/dispatcher.rb:1788 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1794 + # pkg:gem/prism#lib/prism/dispatcher.rb:1794 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1800 + # pkg:gem/prism#lib/prism/dispatcher.rb:1800 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1806 + # pkg:gem/prism#lib/prism/dispatcher.rb:1806 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1812 + # pkg:gem/prism#lib/prism/dispatcher.rb:1812 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1818 + # pkg:gem/prism#lib/prism/dispatcher.rb:1818 def visit_interpolated_x_string_node(node); end # Dispatch enter and leave events for ItLocalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1824 + # pkg:gem/prism#lib/prism/dispatcher.rb:1824 def visit_it_local_variable_read_node(node); end # Dispatch enter and leave events for ItParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1830 + # pkg:gem/prism#lib/prism/dispatcher.rb:1830 def visit_it_parameters_node(node); end # Dispatch enter and leave events for KeywordHashNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1836 + # pkg:gem/prism#lib/prism/dispatcher.rb:1836 def visit_keyword_hash_node(node); end # Dispatch enter and leave events for KeywordRestParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1842 + # pkg:gem/prism#lib/prism/dispatcher.rb:1842 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1848 + # pkg:gem/prism#lib/prism/dispatcher.rb:1848 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1854 + # pkg:gem/prism#lib/prism/dispatcher.rb:1854 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1860 + # pkg:gem/prism#lib/prism/dispatcher.rb:1860 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1866 + # pkg:gem/prism#lib/prism/dispatcher.rb:1866 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1872 + # pkg:gem/prism#lib/prism/dispatcher.rb:1872 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1878 + # pkg:gem/prism#lib/prism/dispatcher.rb:1878 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1884 + # pkg:gem/prism#lib/prism/dispatcher.rb:1884 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1890 + # pkg:gem/prism#lib/prism/dispatcher.rb:1890 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1896 + # pkg:gem/prism#lib/prism/dispatcher.rb:1896 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1902 + # pkg:gem/prism#lib/prism/dispatcher.rb:1902 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1908 + # pkg:gem/prism#lib/prism/dispatcher.rb:1908 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1914 + # pkg:gem/prism#lib/prism/dispatcher.rb:1914 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1920 + # pkg:gem/prism#lib/prism/dispatcher.rb:1920 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1926 + # pkg:gem/prism#lib/prism/dispatcher.rb:1926 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1932 + # pkg:gem/prism#lib/prism/dispatcher.rb:1932 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1938 + # pkg:gem/prism#lib/prism/dispatcher.rb:1938 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1944 + # pkg:gem/prism#lib/prism/dispatcher.rb:1944 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1950 + # pkg:gem/prism#lib/prism/dispatcher.rb:1950 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1956 + # pkg:gem/prism#lib/prism/dispatcher.rb:1956 def visit_numbered_parameters_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1962 + # pkg:gem/prism#lib/prism/dispatcher.rb:1962 def visit_numbered_reference_read_node(node); end # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1968 + # pkg:gem/prism#lib/prism/dispatcher.rb:1968 def visit_optional_keyword_parameter_node(node); end # Dispatch enter and leave events for OptionalParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1974 + # pkg:gem/prism#lib/prism/dispatcher.rb:1974 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1980 + # pkg:gem/prism#lib/prism/dispatcher.rb:1980 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1986 + # pkg:gem/prism#lib/prism/dispatcher.rb:1986 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1992 + # pkg:gem/prism#lib/prism/dispatcher.rb:1992 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1998 + # pkg:gem/prism#lib/prism/dispatcher.rb:1998 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2004 + # pkg:gem/prism#lib/prism/dispatcher.rb:2004 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2010 + # pkg:gem/prism#lib/prism/dispatcher.rb:2010 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2016 + # pkg:gem/prism#lib/prism/dispatcher.rb:2016 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2022 + # pkg:gem/prism#lib/prism/dispatcher.rb:2022 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2028 + # pkg:gem/prism#lib/prism/dispatcher.rb:2028 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2034 + # pkg:gem/prism#lib/prism/dispatcher.rb:2034 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2040 + # pkg:gem/prism#lib/prism/dispatcher.rb:2040 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2046 + # pkg:gem/prism#lib/prism/dispatcher.rb:2046 def visit_regular_expression_node(node); end # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2052 + # pkg:gem/prism#lib/prism/dispatcher.rb:2052 def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2058 + # pkg:gem/prism#lib/prism/dispatcher.rb:2058 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2064 + # pkg:gem/prism#lib/prism/dispatcher.rb:2064 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2070 + # pkg:gem/prism#lib/prism/dispatcher.rb:2070 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2076 + # pkg:gem/prism#lib/prism/dispatcher.rb:2076 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2082 + # pkg:gem/prism#lib/prism/dispatcher.rb:2082 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2088 + # pkg:gem/prism#lib/prism/dispatcher.rb:2088 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2094 + # pkg:gem/prism#lib/prism/dispatcher.rb:2094 def visit_self_node(node); end # Dispatch enter and leave events for ShareableConstantNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2100 + # pkg:gem/prism#lib/prism/dispatcher.rb:2100 def visit_shareable_constant_node(node); end # Dispatch enter and leave events for SingletonClassNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2106 + # pkg:gem/prism#lib/prism/dispatcher.rb:2106 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2112 + # pkg:gem/prism#lib/prism/dispatcher.rb:2112 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2118 + # pkg:gem/prism#lib/prism/dispatcher.rb:2118 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2124 + # pkg:gem/prism#lib/prism/dispatcher.rb:2124 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2130 + # pkg:gem/prism#lib/prism/dispatcher.rb:2130 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2136 + # pkg:gem/prism#lib/prism/dispatcher.rb:2136 def visit_statements_node(node); end # Dispatch enter and leave events for StringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2142 + # pkg:gem/prism#lib/prism/dispatcher.rb:2142 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2148 + # pkg:gem/prism#lib/prism/dispatcher.rb:2148 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2154 + # pkg:gem/prism#lib/prism/dispatcher.rb:2154 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2160 + # pkg:gem/prism#lib/prism/dispatcher.rb:2160 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2166 + # pkg:gem/prism#lib/prism/dispatcher.rb:2166 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2172 + # pkg:gem/prism#lib/prism/dispatcher.rb:2172 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2178 + # pkg:gem/prism#lib/prism/dispatcher.rb:2178 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2184 + # pkg:gem/prism#lib/prism/dispatcher.rb:2184 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2190 + # pkg:gem/prism#lib/prism/dispatcher.rb:2190 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2196 + # pkg:gem/prism#lib/prism/dispatcher.rb:2196 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2202 + # pkg:gem/prism#lib/prism/dispatcher.rb:2202 def visit_yield_node(node); end end # This visitor provides the ability to call Node#to_dot, which converts a # subtree into a graphviz dot graph. # -# source://prism//lib/prism/dot_visitor.rb#18 +# pkg:gem/prism#lib/prism/dot_visitor.rb:18 class Prism::DotVisitor < ::Prism::Visitor # Initialize a new dot visitor. # - # @return [DotVisitor] a new instance of DotVisitor - # - # source://prism//lib/prism/dot_visitor.rb#110 + # pkg:gem/prism#lib/prism/dot_visitor.rb:110 def initialize; end # The digraph that is being built. # - # source://prism//lib/prism/dot_visitor.rb#107 + # pkg:gem/prism#lib/prism/dot_visitor.rb:107 def digraph; end # Convert this visitor into a graphviz dot graph string. # - # source://prism//lib/prism/dot_visitor.rb#115 + # pkg:gem/prism#lib/prism/dot_visitor.rb:115 def to_dot; end # Visit a AliasGlobalVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#120 + # pkg:gem/prism#lib/prism/dot_visitor.rb:120 def visit_alias_global_variable_node(node); end # Visit a AliasMethodNode node. # - # source://prism//lib/prism/dot_visitor.rb#145 + # pkg:gem/prism#lib/prism/dot_visitor.rb:145 def visit_alias_method_node(node); end # Visit a AlternationPatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#170 + # pkg:gem/prism#lib/prism/dot_visitor.rb:170 def visit_alternation_pattern_node(node); end # Visit a AndNode node. # - # source://prism//lib/prism/dot_visitor.rb#195 + # pkg:gem/prism#lib/prism/dot_visitor.rb:195 def visit_and_node(node); end # Visit a ArgumentsNode node. # - # source://prism//lib/prism/dot_visitor.rb#220 + # pkg:gem/prism#lib/prism/dot_visitor.rb:220 def visit_arguments_node(node); end # Visit a ArrayNode node. # - # source://prism//lib/prism/dot_visitor.rb#250 + # pkg:gem/prism#lib/prism/dot_visitor.rb:250 def visit_array_node(node); end # Visit a ArrayPatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#290 + # pkg:gem/prism#lib/prism/dot_visitor.rb:290 def visit_array_pattern_node(node); end # Visit a AssocNode node. # - # source://prism//lib/prism/dot_visitor.rb#352 + # pkg:gem/prism#lib/prism/dot_visitor.rb:352 def visit_assoc_node(node); end # Visit a AssocSplatNode node. # - # source://prism//lib/prism/dot_visitor.rb#379 + # pkg:gem/prism#lib/prism/dot_visitor.rb:379 def visit_assoc_splat_node(node); end # Visit a BackReferenceReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#402 + # pkg:gem/prism#lib/prism/dot_visitor.rb:402 def visit_back_reference_read_node(node); end # Visit a BeginNode node. # - # source://prism//lib/prism/dot_visitor.rb#419 + # pkg:gem/prism#lib/prism/dot_visitor.rb:419 def visit_begin_node(node); end # Visit a BlockArgumentNode node. # - # source://prism//lib/prism/dot_visitor.rb#467 + # pkg:gem/prism#lib/prism/dot_visitor.rb:467 def visit_block_argument_node(node); end # Visit a BlockLocalVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#490 + # pkg:gem/prism#lib/prism/dot_visitor.rb:490 def visit_block_local_variable_node(node); end # Visit a BlockNode node. # - # source://prism//lib/prism/dot_visitor.rb#510 + # pkg:gem/prism#lib/prism/dot_visitor.rb:510 def visit_block_node(node); end # Visit a BlockParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#545 + # pkg:gem/prism#lib/prism/dot_visitor.rb:545 def visit_block_parameter_node(node); end # Visit a BlockParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#573 + # pkg:gem/prism#lib/prism/dot_visitor.rb:573 def visit_block_parameters_node(node); end # Visit a BreakNode node. # - # source://prism//lib/prism/dot_visitor.rb#616 + # pkg:gem/prism#lib/prism/dot_visitor.rb:616 def visit_break_node(node); end # Visit a CallAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#639 + # pkg:gem/prism#lib/prism/dot_visitor.rb:639 def visit_call_and_write_node(node); end # Visit a CallNode node. # - # source://prism//lib/prism/dot_visitor.rb#685 + # pkg:gem/prism#lib/prism/dot_visitor.rb:685 def visit_call_node(node); end # Visit a CallOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#748 + # pkg:gem/prism#lib/prism/dot_visitor.rb:748 def visit_call_operator_write_node(node); end # Visit a CallOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#797 + # pkg:gem/prism#lib/prism/dot_visitor.rb:797 def visit_call_or_write_node(node); end # Visit a CallTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#843 + # pkg:gem/prism#lib/prism/dot_visitor.rb:843 def visit_call_target_node(node); end # Visit a CapturePatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#873 + # pkg:gem/prism#lib/prism/dot_visitor.rb:873 def visit_capture_pattern_node(node); end # Visit a CaseMatchNode node. # - # source://prism//lib/prism/dot_visitor.rb#898 + # pkg:gem/prism#lib/prism/dot_visitor.rb:898 def visit_case_match_node(node); end # Visit a CaseNode node. # - # source://prism//lib/prism/dot_visitor.rb#943 + # pkg:gem/prism#lib/prism/dot_visitor.rb:943 def visit_case_node(node); end # Visit a ClassNode node. # - # source://prism//lib/prism/dot_visitor.rb#988 + # pkg:gem/prism#lib/prism/dot_visitor.rb:988 def visit_class_node(node); end # Visit a ClassVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1035 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1035 def visit_class_variable_and_write_node(node); end # Visit a ClassVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1062 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1062 def visit_class_variable_operator_write_node(node); end # Visit a ClassVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1092 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1092 def visit_class_variable_or_write_node(node); end # Visit a ClassVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#1119 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1119 def visit_class_variable_read_node(node); end # Visit a ClassVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1136 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1136 def visit_class_variable_target_node(node); end # Visit a ClassVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1153 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1153 def visit_class_variable_write_node(node); end # Visit a ConstantAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1180 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1180 def visit_constant_and_write_node(node); end # Visit a ConstantOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1207 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1207 def visit_constant_operator_write_node(node); end # Visit a ConstantOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1237 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1237 def visit_constant_or_write_node(node); end # Visit a ConstantPathAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1264 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1264 def visit_constant_path_and_write_node(node); end # Visit a ConstantPathNode node. # - # source://prism//lib/prism/dot_visitor.rb#1289 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1289 def visit_constant_path_node(node); end # Visit a ConstantPathOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1318 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1318 def visit_constant_path_operator_write_node(node); end # Visit a ConstantPathOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1346 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1346 def visit_constant_path_or_write_node(node); end # Visit a ConstantPathTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1371 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1371 def visit_constant_path_target_node(node); end # Visit a ConstantPathWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1400 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1400 def visit_constant_path_write_node(node); end # Visit a ConstantReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#1425 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1425 def visit_constant_read_node(node); end # Visit a ConstantTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1442 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1442 def visit_constant_target_node(node); end # Visit a ConstantWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1459 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1459 def visit_constant_write_node(node); end # Visit a DefNode node. # - # source://prism//lib/prism/dot_visitor.rb#1486 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1486 def visit_def_node(node); end # Visit a DefinedNode node. # - # source://prism//lib/prism/dot_visitor.rb#1555 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1555 def visit_defined_node(node); end # Visit a ElseNode node. # - # source://prism//lib/prism/dot_visitor.rb#1586 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1586 def visit_else_node(node); end # Visit a EmbeddedStatementsNode node. # - # source://prism//lib/prism/dot_visitor.rb#1614 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1614 def visit_embedded_statements_node(node); end # Visit a EmbeddedVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#1640 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1640 def visit_embedded_variable_node(node); end # Visit a EnsureNode node. # - # source://prism//lib/prism/dot_visitor.rb#1661 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1661 def visit_ensure_node(node); end # Visit a FalseNode node. # - # source://prism//lib/prism/dot_visitor.rb#1687 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1687 def visit_false_node(node); end # Visit a FindPatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#1701 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1701 def visit_find_pattern_node(node); end # Visit a FlipFlopNode node. # - # source://prism//lib/prism/dot_visitor.rb#1752 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1752 def visit_flip_flop_node(node); end # Visit a FloatNode node. # - # source://prism//lib/prism/dot_visitor.rb#1784 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1784 def visit_float_node(node); end # Visit a ForNode node. # - # source://prism//lib/prism/dot_visitor.rb#1801 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1801 def visit_for_node(node); end # Visit a ForwardingArgumentsNode node. # - # source://prism//lib/prism/dot_visitor.rb#1843 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1843 def visit_forwarding_arguments_node(node); end # Visit a ForwardingParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#1857 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1857 def visit_forwarding_parameter_node(node); end # Visit a ForwardingSuperNode node. # - # source://prism//lib/prism/dot_visitor.rb#1871 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1871 def visit_forwarding_super_node(node); end # Visit a GlobalVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1891 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1891 def visit_global_variable_and_write_node(node); end # Visit a GlobalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1918 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1918 def visit_global_variable_operator_write_node(node); end # Visit a GlobalVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1948 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1948 def visit_global_variable_or_write_node(node); end # Visit a GlobalVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#1975 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1975 def visit_global_variable_read_node(node); end # Visit a GlobalVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1992 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1992 def visit_global_variable_target_node(node); end # Visit a GlobalVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2009 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2009 def visit_global_variable_write_node(node); end # Visit a HashNode node. # - # source://prism//lib/prism/dot_visitor.rb#2036 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2036 def visit_hash_node(node); end # Visit a HashPatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#2069 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2069 def visit_hash_pattern_node(node); end # Visit a IfNode node. # - # source://prism//lib/prism/dot_visitor.rb#2118 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2118 def visit_if_node(node); end # Visit a ImaginaryNode node. # - # source://prism//lib/prism/dot_visitor.rb#2163 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2163 def visit_imaginary_node(node); end # Visit a ImplicitNode node. # - # source://prism//lib/prism/dot_visitor.rb#2181 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2181 def visit_implicit_node(node); end # Visit a ImplicitRestNode node. # - # source://prism//lib/prism/dot_visitor.rb#2199 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2199 def visit_implicit_rest_node(node); end # Visit a InNode node. # - # source://prism//lib/prism/dot_visitor.rb#2213 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2213 def visit_in_node(node); end # Visit a IndexAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2245 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2245 def visit_index_and_write_node(node); end # Visit a IndexOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2298 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2298 def visit_index_operator_write_node(node); end # Visit a IndexOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2354 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2354 def visit_index_or_write_node(node); end # Visit a IndexTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#2407 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2407 def visit_index_target_node(node); end # Visit a InstanceVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2446 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2446 def visit_instance_variable_and_write_node(node); end # Visit a InstanceVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2473 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2473 def visit_instance_variable_operator_write_node(node); end # Visit a InstanceVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2503 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2503 def visit_instance_variable_or_write_node(node); end # Visit a InstanceVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#2530 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2530 def visit_instance_variable_read_node(node); end # Visit a InstanceVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#2547 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2547 def visit_instance_variable_target_node(node); end # Visit a InstanceVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2564 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2564 def visit_instance_variable_write_node(node); end # Visit a IntegerNode node. # - # source://prism//lib/prism/dot_visitor.rb#2591 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2591 def visit_integer_node(node); end # Visit a InterpolatedMatchLastLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#2611 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2611 def visit_interpolated_match_last_line_node(node); end # Visit a InterpolatedRegularExpressionNode node. # - # source://prism//lib/prism/dot_visitor.rb#2647 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2647 def visit_interpolated_regular_expression_node(node); end # Visit a InterpolatedStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#2683 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2683 def visit_interpolated_string_node(node); end # Visit a InterpolatedSymbolNode node. # - # source://prism//lib/prism/dot_visitor.rb#2723 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2723 def visit_interpolated_symbol_node(node); end # Visit a InterpolatedXStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#2760 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2760 def visit_interpolated_x_string_node(node); end # Visit a ItLocalVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#2793 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2793 def visit_it_local_variable_read_node(node); end # Visit a ItParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#2807 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2807 def visit_it_parameters_node(node); end # Visit a KeywordHashNode node. # - # source://prism//lib/prism/dot_visitor.rb#2821 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2821 def visit_keyword_hash_node(node); end # Visit a KeywordRestParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#2851 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2851 def visit_keyword_rest_parameter_node(node); end # Visit a LambdaNode node. # - # source://prism//lib/prism/dot_visitor.rb#2879 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2879 def visit_lambda_node(node); end # Visit a LocalVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2917 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2917 def visit_local_variable_and_write_node(node); end # Visit a LocalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2947 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2947 def visit_local_variable_operator_write_node(node); end # Visit a LocalVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2980 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2980 def visit_local_variable_or_write_node(node); end # Visit a LocalVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#3010 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3010 def visit_local_variable_read_node(node); end # Visit a LocalVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#3030 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3030 def visit_local_variable_target_node(node); end # Visit a LocalVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3050 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3050 def visit_local_variable_write_node(node); end # Visit a MatchLastLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#3080 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3080 def visit_match_last_line_node(node); end # Visit a MatchPredicateNode node. # - # source://prism//lib/prism/dot_visitor.rb#3109 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3109 def visit_match_predicate_node(node); end # Visit a MatchRequiredNode node. # - # source://prism//lib/prism/dot_visitor.rb#3134 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3134 def visit_match_required_node(node); end # Visit a MatchWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3159 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3159 def visit_match_write_node(node); end # Visit a MissingNode node. # - # source://prism//lib/prism/dot_visitor.rb#3190 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3190 def visit_missing_node(node); end # Visit a ModuleNode node. # - # source://prism//lib/prism/dot_visitor.rb#3204 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3204 def visit_module_node(node); end # Visit a MultiTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#3240 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3240 def visit_multi_target_node(node); end # Visit a MultiWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3296 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3296 def visit_multi_write_node(node); end # Visit a NextNode node. # - # source://prism//lib/prism/dot_visitor.rb#3359 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3359 def visit_next_node(node); end # Visit a NilNode node. # - # source://prism//lib/prism/dot_visitor.rb#3382 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3382 def visit_nil_node(node); end # Visit a NoKeywordsParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3396 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3396 def visit_no_keywords_parameter_node(node); end # Visit a NumberedParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#3416 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3416 def visit_numbered_parameters_node(node); end # Visit a NumberedReferenceReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#3433 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3433 def visit_numbered_reference_read_node(node); end # Visit a OptionalKeywordParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3450 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3450 def visit_optional_keyword_parameter_node(node); end # Visit a OptionalParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3477 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3477 def visit_optional_parameter_node(node); end # Visit a OrNode node. # - # source://prism//lib/prism/dot_visitor.rb#3507 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3507 def visit_or_node(node); end # Visit a ParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#3532 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3532 def visit_parameters_node(node); end # Visit a ParenthesesNode node. # - # source://prism//lib/prism/dot_visitor.rb#3616 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3616 def visit_parentheses_node(node); end # Visit a PinnedExpressionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3645 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3645 def visit_pinned_expression_node(node); end # Visit a PinnedVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#3672 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3672 def visit_pinned_variable_node(node); end # Visit a PostExecutionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3693 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3693 def visit_post_execution_node(node); end # Visit a PreExecutionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3722 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3722 def visit_pre_execution_node(node); end # Visit a ProgramNode node. # - # source://prism//lib/prism/dot_visitor.rb#3751 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3751 def visit_program_node(node); end # Visit a RangeNode node. # - # source://prism//lib/prism/dot_visitor.rb#3772 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3772 def visit_range_node(node); end # Visit a RationalNode node. # - # source://prism//lib/prism/dot_visitor.rb#3804 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3804 def visit_rational_node(node); end # Visit a RedoNode node. # - # source://prism//lib/prism/dot_visitor.rb#3827 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3827 def visit_redo_node(node); end # Visit a RegularExpressionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3841 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3841 def visit_regular_expression_node(node); end # Visit a RequiredKeywordParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3870 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3870 def visit_required_keyword_parameter_node(node); end # Visit a RequiredParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3893 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3893 def visit_required_parameter_node(node); end # Visit a RescueModifierNode node. # - # source://prism//lib/prism/dot_visitor.rb#3913 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3913 def visit_rescue_modifier_node(node); end # Visit a RescueNode node. # - # source://prism//lib/prism/dot_visitor.rb#3938 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3938 def visit_rescue_node(node); end # Visit a RestParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3996 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3996 def visit_rest_parameter_node(node); end # Visit a RetryNode node. # - # source://prism//lib/prism/dot_visitor.rb#4024 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4024 def visit_retry_node(node); end # Visit a ReturnNode node. # - # source://prism//lib/prism/dot_visitor.rb#4038 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4038 def visit_return_node(node); end # Visit a SelfNode node. # - # source://prism//lib/prism/dot_visitor.rb#4061 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4061 def visit_self_node(node); end # Visit a ShareableConstantNode node. # - # source://prism//lib/prism/dot_visitor.rb#4075 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4075 def visit_shareable_constant_node(node); end # Visit a SingletonClassNode node. # - # source://prism//lib/prism/dot_visitor.rb#4096 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4096 def visit_singleton_class_node(node); end # Visit a SourceEncodingNode node. # - # source://prism//lib/prism/dot_visitor.rb#4132 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4132 def visit_source_encoding_node(node); end # Visit a SourceFileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4146 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4146 def visit_source_file_node(node); end # Visit a SourceLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#4166 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4166 def visit_source_line_node(node); end # Visit a SplatNode node. # - # source://prism//lib/prism/dot_visitor.rb#4180 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4180 def visit_splat_node(node); end # Visit a StatementsNode node. # - # source://prism//lib/prism/dot_visitor.rb#4203 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4203 def visit_statements_node(node); end # Visit a StringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4230 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4230 def visit_string_node(node); end # Visit a SuperNode node. # - # source://prism//lib/prism/dot_visitor.rb#4263 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4263 def visit_super_node(node); end # Visit a SymbolNode node. # - # source://prism//lib/prism/dot_visitor.rb#4302 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4302 def visit_symbol_node(node); end # Visit a TrueNode node. # - # source://prism//lib/prism/dot_visitor.rb#4337 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4337 def visit_true_node(node); end # Visit a UndefNode node. # - # source://prism//lib/prism/dot_visitor.rb#4351 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4351 def visit_undef_node(node); end # Visit a UnlessNode node. # - # source://prism//lib/prism/dot_visitor.rb#4381 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4381 def visit_unless_node(node); end # Visit a UntilNode node. # - # source://prism//lib/prism/dot_visitor.rb#4424 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4424 def visit_until_node(node); end # Visit a WhenNode node. # - # source://prism//lib/prism/dot_visitor.rb#4464 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4464 def visit_when_node(node); end # Visit a WhileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4505 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4505 def visit_while_node(node); end # Visit a XStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4545 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4545 def visit_x_string_node(node); end # Visit a YieldNode node. # - # source://prism//lib/prism/dot_visitor.rb#4574 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4574 def visit_yield_node(node); end private @@ -14746,186 +14527,164 @@ class Prism::DotVisitor < ::Prism::Visitor # Inspect a node that has arguments_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4620 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4620 def arguments_node_flags_inspect(node); end # Inspect a node that has array_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4632 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4632 def array_node_flags_inspect(node); end # Inspect a node that has call_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4640 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4640 def call_node_flags_inspect(node); end # Inspect a node that has encoding_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4651 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4651 def encoding_flags_inspect(node); end # Inspect a node that has integer_base_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4660 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4660 def integer_base_flags_inspect(node); end # Inspect a node that has interpolated_string_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4671 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4671 def interpolated_string_node_flags_inspect(node); end # Inspect a node that has keyword_hash_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4680 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4680 def keyword_hash_node_flags_inspect(node); end # Inspect a location to display the start and end line and column numbers. # - # source://prism//lib/prism/dot_visitor.rb#4614 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4614 def location_inspect(location); end # Inspect a node that has loop_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4688 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4688 def loop_flags_inspect(node); end # Generate a unique node ID for a node throughout the digraph. # - # source://prism//lib/prism/dot_visitor.rb#4609 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4609 def node_id(node); end # Inspect a node that has parameter_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4696 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4696 def parameter_flags_inspect(node); end # Inspect a node that has parentheses_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4704 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4704 def parentheses_node_flags_inspect(node); end # Inspect a node that has range_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4712 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4712 def range_flags_inspect(node); end # Inspect a node that has regular_expression_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4720 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4720 def regular_expression_flags_inspect(node); end # Inspect a node that has shareable_constant_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4738 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4738 def shareable_constant_node_flags_inspect(node); end # Inspect a node that has string_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4748 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4748 def string_flags_inspect(node); end # Inspect a node that has symbol_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4759 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4759 def symbol_flags_inspect(node); end end -# source://prism//lib/prism/dot_visitor.rb#63 +# pkg:gem/prism#lib/prism/dot_visitor.rb:63 class Prism::DotVisitor::Digraph - # @return [Digraph] a new instance of Digraph - # - # source://prism//lib/prism/dot_visitor.rb#66 + # pkg:gem/prism#lib/prism/dot_visitor.rb:66 def initialize; end - # source://prism//lib/prism/dot_visitor.rb#80 + # pkg:gem/prism#lib/prism/dot_visitor.rb:80 def edge(value); end - # Returns the value of attribute edges. - # - # source://prism//lib/prism/dot_visitor.rb#64 + # pkg:gem/prism#lib/prism/dot_visitor.rb:64 def edges; end - # source://prism//lib/prism/dot_visitor.rb#72 + # pkg:gem/prism#lib/prism/dot_visitor.rb:72 def node(value); end - # Returns the value of attribute nodes. - # - # source://prism//lib/prism/dot_visitor.rb#64 + # pkg:gem/prism#lib/prism/dot_visitor.rb:64 def nodes; end - # source://prism//lib/prism/dot_visitor.rb#84 + # pkg:gem/prism#lib/prism/dot_visitor.rb:84 def to_dot; end - # source://prism//lib/prism/dot_visitor.rb#76 + # pkg:gem/prism#lib/prism/dot_visitor.rb:76 def waypoint(value); end - # Returns the value of attribute waypoints. - # - # source://prism//lib/prism/dot_visitor.rb#64 + # pkg:gem/prism#lib/prism/dot_visitor.rb:64 def waypoints; end end -# source://prism//lib/prism/dot_visitor.rb#19 +# pkg:gem/prism#lib/prism/dot_visitor.rb:19 class Prism::DotVisitor::Field - # @return [Field] a new instance of Field - # - # source://prism//lib/prism/dot_visitor.rb#22 + # pkg:gem/prism#lib/prism/dot_visitor.rb:22 def initialize(name, value, port); end - # Returns the value of attribute name. - # - # source://prism//lib/prism/dot_visitor.rb#20 + # pkg:gem/prism#lib/prism/dot_visitor.rb:20 def name; end - # Returns the value of attribute port. - # - # source://prism//lib/prism/dot_visitor.rb#20 + # pkg:gem/prism#lib/prism/dot_visitor.rb:20 def port; end - # source://prism//lib/prism/dot_visitor.rb#28 + # pkg:gem/prism#lib/prism/dot_visitor.rb:28 def to_dot; end - # Returns the value of attribute value. - # - # source://prism//lib/prism/dot_visitor.rb#20 + # pkg:gem/prism#lib/prism/dot_visitor.rb:20 def value; end end -# source://prism//lib/prism/dot_visitor.rb#37 +# pkg:gem/prism#lib/prism/dot_visitor.rb:37 class Prism::DotVisitor::Table - # @return [Table] a new instance of Table - # - # source://prism//lib/prism/dot_visitor.rb#40 + # pkg:gem/prism#lib/prism/dot_visitor.rb:40 def initialize(name); end - # source://prism//lib/prism/dot_visitor.rb#45 + # pkg:gem/prism#lib/prism/dot_visitor.rb:45 def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end - # Returns the value of attribute fields. - # - # source://prism//lib/prism/dot_visitor.rb#38 + # pkg:gem/prism#lib/prism/dot_visitor.rb:38 def fields; end - # Returns the value of attribute name. - # - # source://prism//lib/prism/dot_visitor.rb#38 + # pkg:gem/prism#lib/prism/dot_visitor.rb:38 def name; end - # source://prism//lib/prism/dot_visitor.rb#49 + # pkg:gem/prism#lib/prism/dot_visitor.rb:49 def to_dot; end end @@ -14934,13 +14693,11 @@ end # if a then b else c end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6717 +# pkg:gem/prism#lib/prism/node.rb:6717 class Prism::ElseNode < ::Prism::Node # Initialize a new ElseNode node. # - # @return [ElseNode] a new instance of ElseNode - # - # source://prism//lib/prism/node.rb#6719 + # pkg:gem/prism#lib/prism/node.rb:6719 sig do params( source: Prism::Source, @@ -14957,36 +14714,36 @@ class Prism::ElseNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6833 + # pkg:gem/prism#lib/prism/node.rb:6833 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6730 + # pkg:gem/prism#lib/prism/node.rb:6730 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6735 + # pkg:gem/prism#lib/prism/node.rb:6735 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6754 + # pkg:gem/prism#lib/prism/node.rb:6754 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6747 + # pkg:gem/prism#lib/prism/node.rb:6747 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?) -> ElseNode # - # source://prism//lib/prism/node.rb#6759 + # pkg:gem/prism#lib/prism/node.rb:6759 sig do params( node_id: Integer, @@ -14999,47 +14756,44 @@ class Prism::ElseNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6735 + # pkg:gem/prism#lib/prism/node.rb:6764 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#6767 + # pkg:gem/prism#lib/prism/node.rb:6767 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [statements] - # - # source://prism//lib/prism/node.rb#6740 + # pkg:gem/prism#lib/prism/node.rb:6740 def each_child_node; end # def else_keyword: () -> String # - # source://prism//lib/prism/node.rb#6807 + # pkg:gem/prism#lib/prism/node.rb:6807 sig { returns(String) } def else_keyword; end # attr_reader else_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6772 + # pkg:gem/prism#lib/prism/node.rb:6772 sig { returns(Prism::Location) } def else_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6812 + # pkg:gem/prism#lib/prism/node.rb:6812 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6788 + # pkg:gem/prism#lib/prism/node.rb:6788 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -15048,38 +14802,38 @@ class Prism::ElseNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6817 + # pkg:gem/prism#lib/prism/node.rb:6817 sig { override.returns(String) } def inspect; end # Save the else_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6780 + # pkg:gem/prism#lib/prism/node.rb:6780 def save_else_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6802 + # pkg:gem/prism#lib/prism/node.rb:6802 def save_end_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6785 + # pkg:gem/prism#lib/prism/node.rb:6785 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6822 + # pkg:gem/prism#lib/prism/node.rb:6822 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6827 + # pkg:gem/prism#lib/prism/node.rb:6827 def type; end end end @@ -15087,19 +14841,17 @@ end # EmbDocComment objects correspond to comments that are surrounded by =begin # and =end. # -# source://prism//lib/prism/parse_result.rb#558 +# pkg:gem/prism#lib/prism/parse_result.rb:558 class Prism::EmbDocComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#565 + # pkg:gem/prism#lib/prism/parse_result.rb:565 sig { returns(String) } def inspect; end # This can only be true for inline comments. # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#560 + # pkg:gem/prism#lib/prism/parse_result.rb:560 sig { override.returns(T::Boolean) } def trailing?; end end @@ -15109,13 +14861,11 @@ end # "foo #{bar}" # ^^^^^^ # -# source://prism//lib/prism/node.rb#6845 +# pkg:gem/prism#lib/prism/node.rb:6845 class Prism::EmbeddedStatementsNode < ::Prism::Node # Initialize a new EmbeddedStatementsNode node. # - # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode - # - # source://prism//lib/prism/node.rb#6847 + # pkg:gem/prism#lib/prism/node.rb:6847 sig do params( source: Prism::Source, @@ -15132,48 +14882,48 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6955 + # pkg:gem/prism#lib/prism/node.rb:6955 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6858 + # pkg:gem/prism#lib/prism/node.rb:6858 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6863 + # pkg:gem/prism#lib/prism/node.rb:6863 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#6934 + # pkg:gem/prism#lib/prism/node.rb:6934 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#6916 + # pkg:gem/prism#lib/prism/node.rb:6916 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6882 + # pkg:gem/prism#lib/prism/node.rb:6882 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6875 + # pkg:gem/prism#lib/prism/node.rb:6875 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location) -> EmbeddedStatementsNode # - # source://prism//lib/prism/node.rb#6887 + # pkg:gem/prism#lib/prism/node.rb:6887 sig do params( node_id: Integer, @@ -15186,24 +14936,21 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6863 + # pkg:gem/prism#lib/prism/node.rb:6892 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, statements: StatementsNode?, closing_loc: Location } # - # source://prism//lib/prism/node.rb#6895 + # pkg:gem/prism#lib/prism/node.rb:6895 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [statements] - # - # source://prism//lib/prism/node.rb#6868 + # pkg:gem/prism#lib/prism/node.rb:6868 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15211,50 +14958,50 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6939 + # pkg:gem/prism#lib/prism/node.rb:6939 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#6929 + # pkg:gem/prism#lib/prism/node.rb:6929 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#6900 + # pkg:gem/prism#lib/prism/node.rb:6900 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6924 + # pkg:gem/prism#lib/prism/node.rb:6924 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6908 + # pkg:gem/prism#lib/prism/node.rb:6908 def save_opening_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6913 + # pkg:gem/prism#lib/prism/node.rb:6913 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6944 + # pkg:gem/prism#lib/prism/node.rb:6944 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6949 + # pkg:gem/prism#lib/prism/node.rb:6949 def type; end end end @@ -15264,13 +15011,11 @@ end # "foo #@bar" # ^^^^^ # -# source://prism//lib/prism/node.rb#6967 +# pkg:gem/prism#lib/prism/node.rb:6967 class Prism::EmbeddedVariableNode < ::Prism::Node # Initialize a new EmbeddedVariableNode node. # - # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode - # - # source://prism//lib/prism/node.rb#6969 + # pkg:gem/prism#lib/prism/node.rb:6969 sig do params( source: Prism::Source, @@ -15286,36 +15031,36 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7056 + # pkg:gem/prism#lib/prism/node.rb:7056 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6979 + # pkg:gem/prism#lib/prism/node.rb:6979 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6984 + # pkg:gem/prism#lib/prism/node.rb:6984 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7001 + # pkg:gem/prism#lib/prism/node.rb:7001 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6996 + # pkg:gem/prism#lib/prism/node.rb:6996 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode) -> EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#7006 + # pkg:gem/prism#lib/prism/node.rb:7006 sig do params( node_id: Integer, @@ -15327,24 +15072,21 @@ class Prism::EmbeddedVariableNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6984 + # pkg:gem/prism#lib/prism/node.rb:7011 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode } # - # source://prism//lib/prism/node.rb#7014 + # pkg:gem/prism#lib/prism/node.rb:7014 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [variable] - # - # source://prism//lib/prism/node.rb#6989 + # pkg:gem/prism#lib/prism/node.rb:6989 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15352,37 +15094,37 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7040 + # pkg:gem/prism#lib/prism/node.rb:7040 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7035 + # pkg:gem/prism#lib/prism/node.rb:7035 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7019 + # pkg:gem/prism#lib/prism/node.rb:7019 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7027 + # pkg:gem/prism#lib/prism/node.rb:7027 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7045 + # pkg:gem/prism#lib/prism/node.rb:7045 sig { override.returns(Symbol) } def type; end # attr_reader variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#7032 + # pkg:gem/prism#lib/prism/node.rb:7032 sig do returns(T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) end @@ -15391,24 +15133,24 @@ class Prism::EmbeddedVariableNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7050 + # pkg:gem/prism#lib/prism/node.rb:7050 def type; end end end # Flags for nodes that have unescaped content. # -# source://prism//lib/prism/node.rb#19819 +# pkg:gem/prism#lib/prism/node.rb:19819 module Prism::EncodingFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19824 +# pkg:gem/prism#lib/prism/node.rb:19824 Prism::EncodingFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#19821 +# pkg:gem/prism#lib/prism/node.rb:19821 Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents an `ensure` clause in a `begin` statement. @@ -15420,13 +15162,11 @@ Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # bar # end # -# source://prism//lib/prism/node.rb#7071 +# pkg:gem/prism#lib/prism/node.rb:7071 class Prism::EnsureNode < ::Prism::Node # Initialize a new EnsureNode node. # - # @return [EnsureNode] a new instance of EnsureNode - # - # source://prism//lib/prism/node.rb#7073 + # pkg:gem/prism#lib/prism/node.rb:7073 sig do params( source: Prism::Source, @@ -15443,36 +15183,36 @@ class Prism::EnsureNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7181 + # pkg:gem/prism#lib/prism/node.rb:7181 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7084 + # pkg:gem/prism#lib/prism/node.rb:7084 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7089 + # pkg:gem/prism#lib/prism/node.rb:7089 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7108 + # pkg:gem/prism#lib/prism/node.rb:7108 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7101 + # pkg:gem/prism#lib/prism/node.rb:7101 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location) -> EnsureNode # - # source://prism//lib/prism/node.rb#7113 + # pkg:gem/prism#lib/prism/node.rb:7113 sig do params( node_id: Integer, @@ -15485,47 +15225,44 @@ class Prism::EnsureNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7089 + # pkg:gem/prism#lib/prism/node.rb:7118 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#7121 + # pkg:gem/prism#lib/prism/node.rb:7121 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [statements] - # - # source://prism//lib/prism/node.rb#7094 + # pkg:gem/prism#lib/prism/node.rb:7094 def each_child_node; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#7160 + # pkg:gem/prism#lib/prism/node.rb:7160 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7142 + # pkg:gem/prism#lib/prism/node.rb:7142 sig { returns(Prism::Location) } def end_keyword_loc; end # def ensure_keyword: () -> String # - # source://prism//lib/prism/node.rb#7155 + # pkg:gem/prism#lib/prism/node.rb:7155 sig { returns(String) } def ensure_keyword; end # attr_reader ensure_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7126 + # pkg:gem/prism#lib/prism/node.rb:7126 sig { returns(Prism::Location) } def ensure_keyword_loc; end @@ -15534,38 +15271,38 @@ class Prism::EnsureNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7165 + # pkg:gem/prism#lib/prism/node.rb:7165 sig { override.returns(String) } def inspect; end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7150 + # pkg:gem/prism#lib/prism/node.rb:7150 def save_end_keyword_loc(repository); end # Save the ensure_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7134 + # pkg:gem/prism#lib/prism/node.rb:7134 def save_ensure_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#7139 + # pkg:gem/prism#lib/prism/node.rb:7139 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7170 + # pkg:gem/prism#lib/prism/node.rb:7170 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7175 + # pkg:gem/prism#lib/prism/node.rb:7175 def type; end end end @@ -15575,68 +15312,65 @@ end # false # ^^^^^ # -# source://prism//lib/prism/node.rb#7193 +# pkg:gem/prism#lib/prism/node.rb:7193 class Prism::FalseNode < ::Prism::Node # Initialize a new FalseNode node. # - # @return [FalseNode] a new instance of FalseNode - # - # source://prism//lib/prism/node.rb#7195 + # pkg:gem/prism#lib/prism/node.rb:7195 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7258 + # pkg:gem/prism#lib/prism/node.rb:7258 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7203 + # pkg:gem/prism#lib/prism/node.rb:7203 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7208 + # pkg:gem/prism#lib/prism/node.rb:7208 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7224 + # pkg:gem/prism#lib/prism/node.rb:7224 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7219 + # pkg:gem/prism#lib/prism/node.rb:7219 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> FalseNode # - # source://prism//lib/prism/node.rb#7229 + # pkg:gem/prism#lib/prism/node.rb:7229 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::FalseNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7208 + # pkg:gem/prism#lib/prism/node.rb:7234 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#7237 + # pkg:gem/prism#lib/prism/node.rb:7237 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#7213 + # pkg:gem/prism#lib/prism/node.rb:7213 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15644,20 +15378,20 @@ class Prism::FalseNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7242 + # pkg:gem/prism#lib/prism/node.rb:7242 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7247 + # pkg:gem/prism#lib/prism/node.rb:7247 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7252 + # pkg:gem/prism#lib/prism/node.rb:7252 def type; end end end @@ -15676,13 +15410,11 @@ end # foo => *bar, baz, *qux # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7276 +# pkg:gem/prism#lib/prism/node.rb:7276 class Prism::FindPatternNode < ::Prism::Node # Initialize a new FindPatternNode node. # - # @return [FindPatternNode] a new instance of FindPatternNode - # - # source://prism//lib/prism/node.rb#7278 + # pkg:gem/prism#lib/prism/node.rb:7278 sig do params( source: Prism::Source, @@ -15702,24 +15434,24 @@ class Prism::FindPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7449 + # pkg:gem/prism#lib/prism/node.rb:7449 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7292 + # pkg:gem/prism#lib/prism/node.rb:7292 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7297 + # pkg:gem/prism#lib/prism/node.rb:7297 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#7428 + # pkg:gem/prism#lib/prism/node.rb:7428 sig { returns(T.nilable(String)) } def closing; end @@ -15731,19 +15463,19 @@ class Prism::FindPatternNode < ::Prism::Node # foo in Foo(*bar, baz, *qux) # ^ # - # source://prism//lib/prism/node.rb#7404 + # pkg:gem/prism#lib/prism/node.rb:7404 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7322 + # pkg:gem/prism#lib/prism/node.rb:7322 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7312 + # pkg:gem/prism#lib/prism/node.rb:7312 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -15752,13 +15484,13 @@ class Prism::FindPatternNode < ::Prism::Node # foo in Foo(*bar, baz, *qux) # ^^^ # - # source://prism//lib/prism/node.rb#7343 + # pkg:gem/prism#lib/prism/node.rb:7343 sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } def constant; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?left: SplatNode, ?requireds: Array[Prism::node], ?right: SplatNode | MissingNode, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode # - # source://prism//lib/prism/node.rb#7327 + # pkg:gem/prism#lib/prism/node.rb:7327 sig do params( node_id: Integer, @@ -15774,24 +15506,21 @@ class Prism::FindPatternNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7297 + # pkg:gem/prism#lib/prism/node.rb:7332 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, left: SplatNode, requireds: Array[Prism::node], right: SplatNode | MissingNode, opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#7335 + # pkg:gem/prism#lib/prism/node.rb:7335 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [constant] - # - # source://prism//lib/prism/node.rb#7302 + # pkg:gem/prism#lib/prism/node.rb:7302 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15799,7 +15528,7 @@ class Prism::FindPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7433 + # pkg:gem/prism#lib/prism/node.rb:7433 sig { override.returns(String) } def inspect; end @@ -15811,13 +15540,13 @@ class Prism::FindPatternNode < ::Prism::Node # foo in Foo(*bar, baz, *qux) # ^^^^ # - # source://prism//lib/prism/node.rb#7352 + # pkg:gem/prism#lib/prism/node.rb:7352 sig { returns(Prism::SplatNode) } def left; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#7423 + # pkg:gem/prism#lib/prism/node.rb:7423 sig { returns(T.nilable(String)) } def opening; end @@ -15829,7 +15558,7 @@ class Prism::FindPatternNode < ::Prism::Node # foo in Foo(*bar, baz, *qux) # ^ # - # source://prism//lib/prism/node.rb#7379 + # pkg:gem/prism#lib/prism/node.rb:7379 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -15841,7 +15570,7 @@ class Prism::FindPatternNode < ::Prism::Node # foo in Foo(*bar, baz, 1, *qux) # ^^^^^^ # - # source://prism//lib/prism/node.rb#7361 + # pkg:gem/prism#lib/prism/node.rb:7361 sig { returns(T::Array[Prism::Node]) } def requireds; end @@ -15853,32 +15582,32 @@ class Prism::FindPatternNode < ::Prism::Node # foo in Foo(*bar, baz, *qux) # ^^^^ # - # source://prism//lib/prism/node.rb#7370 + # pkg:gem/prism#lib/prism/node.rb:7370 sig { returns(T.any(Prism::SplatNode, Prism::MissingNode)) } def right; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7418 + # pkg:gem/prism#lib/prism/node.rb:7418 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7393 + # pkg:gem/prism#lib/prism/node.rb:7393 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7438 + # pkg:gem/prism#lib/prism/node.rb:7438 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7443 + # pkg:gem/prism#lib/prism/node.rb:7443 def type; end end end @@ -15888,13 +15617,11 @@ end # baz if foo .. bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7465 +# pkg:gem/prism#lib/prism/node.rb:7465 class Prism::FlipFlopNode < ::Prism::Node # Initialize a new FlipFlopNode node. # - # @return [FlipFlopNode] a new instance of FlipFlopNode - # - # source://prism//lib/prism/node.rb#7467 + # pkg:gem/prism#lib/prism/node.rb:7467 sig do params( source: Prism::Source, @@ -15911,36 +15638,36 @@ class Prism::FlipFlopNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7567 + # pkg:gem/prism#lib/prism/node.rb:7567 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7478 + # pkg:gem/prism#lib/prism/node.rb:7478 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7483 + # pkg:gem/prism#lib/prism/node.rb:7483 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7504 + # pkg:gem/prism#lib/prism/node.rb:7504 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7496 + # pkg:gem/prism#lib/prism/node.rb:7496 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> FlipFlopNode # - # source://prism//lib/prism/node.rb#7509 + # pkg:gem/prism#lib/prism/node.rb:7509 sig do params( node_id: Integer, @@ -15953,31 +15680,26 @@ class Prism::FlipFlopNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7483 + # pkg:gem/prism#lib/prism/node.rb:7514 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#7517 + # pkg:gem/prism#lib/prism/node.rb:7517 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [left] - # - # source://prism//lib/prism/node.rb#7488 + # pkg:gem/prism#lib/prism/node.rb:7488 def each_child_node; end # def exclude_end?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#7522 + # pkg:gem/prism#lib/prism/node.rb:7522 sig { returns(T::Boolean) } def exclude_end?; end @@ -15986,50 +15708,50 @@ class Prism::FlipFlopNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7551 + # pkg:gem/prism#lib/prism/node.rb:7551 sig { override.returns(String) } def inspect; end # attr_reader left: Prism::node? # - # source://prism//lib/prism/node.rb#7527 + # pkg:gem/prism#lib/prism/node.rb:7527 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7546 + # pkg:gem/prism#lib/prism/node.rb:7546 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7533 + # pkg:gem/prism#lib/prism/node.rb:7533 sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Prism::node? # - # source://prism//lib/prism/node.rb#7530 + # pkg:gem/prism#lib/prism/node.rb:7530 sig { returns(T.nilable(Prism::Node)) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7541 + # pkg:gem/prism#lib/prism/node.rb:7541 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7556 + # pkg:gem/prism#lib/prism/node.rb:7556 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7561 + # pkg:gem/prism#lib/prism/node.rb:7561 def type; end end end @@ -16039,68 +15761,65 @@ end # 1.0 # ^^^ # -# source://prism//lib/prism/node.rb#7580 +# pkg:gem/prism#lib/prism/node.rb:7580 class Prism::FloatNode < ::Prism::Node # Initialize a new FloatNode node. # - # @return [FloatNode] a new instance of FloatNode - # - # source://prism//lib/prism/node.rb#7582 + # pkg:gem/prism#lib/prism/node.rb:7582 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, value: Float).void } def initialize(source, node_id, location, flags, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7649 + # pkg:gem/prism#lib/prism/node.rb:7649 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7591 + # pkg:gem/prism#lib/prism/node.rb:7591 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7596 + # pkg:gem/prism#lib/prism/node.rb:7596 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7612 + # pkg:gem/prism#lib/prism/node.rb:7612 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7607 + # pkg:gem/prism#lib/prism/node.rb:7607 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Float) -> FloatNode # - # source://prism//lib/prism/node.rb#7617 + # pkg:gem/prism#lib/prism/node.rb:7617 sig { params(node_id: Integer, location: Prism::Location, flags: Integer, value: Float).returns(Prism::FloatNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7596 + # pkg:gem/prism#lib/prism/node.rb:7622 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Float } # - # source://prism//lib/prism/node.rb#7625 + # pkg:gem/prism#lib/prism/node.rb:7625 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#7601 + # pkg:gem/prism#lib/prism/node.rb:7601 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -16108,26 +15827,26 @@ class Prism::FloatNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7633 + # pkg:gem/prism#lib/prism/node.rb:7633 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7638 + # pkg:gem/prism#lib/prism/node.rb:7638 sig { override.returns(Symbol) } def type; end # The value of the floating point number as a Float. # - # source://prism//lib/prism/node.rb#7630 + # pkg:gem/prism#lib/prism/node.rb:7630 sig { returns(Float) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7643 + # pkg:gem/prism#lib/prism/node.rb:7643 def type; end end end @@ -16137,13 +15856,11 @@ end # for i in a end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7659 +# pkg:gem/prism#lib/prism/node.rb:7659 class Prism::ForNode < ::Prism::Node # Initialize a new ForNode node. # - # @return [ForNode] a new instance of ForNode - # - # source://prism//lib/prism/node.rb#7661 + # pkg:gem/prism#lib/prism/node.rb:7661 sig do params( source: Prism::Source, @@ -16164,18 +15881,18 @@ class Prism::ForNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7848 + # pkg:gem/prism#lib/prism/node.rb:7848 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7676 + # pkg:gem/prism#lib/prism/node.rb:7676 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7681 + # pkg:gem/prism#lib/prism/node.rb:7681 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end @@ -16184,25 +15901,25 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^ # - # source://prism//lib/prism/node.rb#7731 + # pkg:gem/prism#lib/prism/node.rb:7731 sig { returns(Prism::Node) } def collection; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7704 + # pkg:gem/prism#lib/prism/node.rb:7704 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7695 + # pkg:gem/prism#lib/prism/node.rb:7695 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location) -> ForNode # - # source://prism//lib/prism/node.rb#7709 + # pkg:gem/prism#lib/prism/node.rb:7709 sig do params( node_id: Integer, @@ -16219,22 +15936,21 @@ class Prism::ForNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7681 + # pkg:gem/prism#lib/prism/node.rb:7714 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#7717 + # pkg:gem/prism#lib/prism/node.rb:7717 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def do_keyword: () -> String? # - # source://prism//lib/prism/node.rb#7822 + # pkg:gem/prism#lib/prism/node.rb:7822 sig { returns(T.nilable(String)) } def do_keyword; end @@ -16243,20 +15959,18 @@ class Prism::ForNode < ::Prism::Node # for i in a do end # ^^ # - # source://prism//lib/prism/node.rb#7777 + # pkg:gem/prism#lib/prism/node.rb:7777 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [index] - # - # source://prism//lib/prism/node.rb#7686 + # pkg:gem/prism#lib/prism/node.rb:7686 def each_child_node; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#7827 + # pkg:gem/prism#lib/prism/node.rb:7827 sig { returns(String) } def end_keyword; end @@ -16265,7 +15979,7 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^^ # - # source://prism//lib/prism/node.rb#7799 + # pkg:gem/prism#lib/prism/node.rb:7799 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -16274,7 +15988,7 @@ class Prism::ForNode < ::Prism::Node # def for_keyword: () -> String # - # source://prism//lib/prism/node.rb#7812 + # pkg:gem/prism#lib/prism/node.rb:7812 sig { returns(String) } def for_keyword; end @@ -16283,13 +15997,13 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^^ # - # source://prism//lib/prism/node.rb#7745 + # pkg:gem/prism#lib/prism/node.rb:7745 sig { returns(Prism::Location) } def for_keyword_loc; end # def in_keyword: () -> String # - # source://prism//lib/prism/node.rb#7817 + # pkg:gem/prism#lib/prism/node.rb:7817 sig { returns(String) } def in_keyword; end @@ -16298,7 +16012,7 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^ # - # source://prism//lib/prism/node.rb#7761 + # pkg:gem/prism#lib/prism/node.rb:7761 sig { returns(Prism::Location) } def in_keyword_loc; end @@ -16307,7 +16021,7 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^ # - # source://prism//lib/prism/node.rb#7725 + # pkg:gem/prism#lib/prism/node.rb:7725 sig do returns(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)) end @@ -16315,32 +16029,32 @@ class Prism::ForNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7832 + # pkg:gem/prism#lib/prism/node.rb:7832 sig { override.returns(String) } def inspect; end # Save the do_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7791 + # pkg:gem/prism#lib/prism/node.rb:7791 def save_do_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7807 + # pkg:gem/prism#lib/prism/node.rb:7807 def save_end_keyword_loc(repository); end # Save the for_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7753 + # pkg:gem/prism#lib/prism/node.rb:7753 def save_for_keyword_loc(repository); end # Save the in_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7769 + # pkg:gem/prism#lib/prism/node.rb:7769 def save_in_keyword_loc(repository); end # Represents the body of statements to execute for each iteration of the loop. @@ -16350,20 +16064,20 @@ class Prism::ForNode < ::Prism::Node # ^^^^^^ # end # - # source://prism//lib/prism/node.rb#7739 + # pkg:gem/prism#lib/prism/node.rb:7739 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7837 + # pkg:gem/prism#lib/prism/node.rb:7837 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7842 + # pkg:gem/prism#lib/prism/node.rb:7842 def type; end end end @@ -16375,68 +16089,65 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7866 +# pkg:gem/prism#lib/prism/node.rb:7866 class Prism::ForwardingArgumentsNode < ::Prism::Node # Initialize a new ForwardingArgumentsNode node. # - # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode - # - # source://prism//lib/prism/node.rb#7868 + # pkg:gem/prism#lib/prism/node.rb:7868 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7931 + # pkg:gem/prism#lib/prism/node.rb:7931 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7876 + # pkg:gem/prism#lib/prism/node.rb:7876 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7881 + # pkg:gem/prism#lib/prism/node.rb:7881 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7897 + # pkg:gem/prism#lib/prism/node.rb:7897 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7892 + # pkg:gem/prism#lib/prism/node.rb:7892 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7902 + # pkg:gem/prism#lib/prism/node.rb:7902 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingArgumentsNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7881 + # pkg:gem/prism#lib/prism/node.rb:7907 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#7910 + # pkg:gem/prism#lib/prism/node.rb:7910 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#7886 + # pkg:gem/prism#lib/prism/node.rb:7886 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -16444,20 +16155,20 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7915 + # pkg:gem/prism#lib/prism/node.rb:7915 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7920 + # pkg:gem/prism#lib/prism/node.rb:7920 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7925 + # pkg:gem/prism#lib/prism/node.rb:7925 def type; end end end @@ -16468,68 +16179,65 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7941 +# pkg:gem/prism#lib/prism/node.rb:7941 class Prism::ForwardingParameterNode < ::Prism::Node # Initialize a new ForwardingParameterNode node. # - # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode - # - # source://prism//lib/prism/node.rb#7943 + # pkg:gem/prism#lib/prism/node.rb:7943 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8006 + # pkg:gem/prism#lib/prism/node.rb:8006 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7951 + # pkg:gem/prism#lib/prism/node.rb:7951 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7956 + # pkg:gem/prism#lib/prism/node.rb:7956 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7972 + # pkg:gem/prism#lib/prism/node.rb:7972 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7967 + # pkg:gem/prism#lib/prism/node.rb:7967 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7977 + # pkg:gem/prism#lib/prism/node.rb:7977 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingParameterNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7956 + # pkg:gem/prism#lib/prism/node.rb:7982 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#7985 + # pkg:gem/prism#lib/prism/node.rb:7985 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#7961 + # pkg:gem/prism#lib/prism/node.rb:7961 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -16537,20 +16245,20 @@ class Prism::ForwardingParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7990 + # pkg:gem/prism#lib/prism/node.rb:7990 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7995 + # pkg:gem/prism#lib/prism/node.rb:7995 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8000 + # pkg:gem/prism#lib/prism/node.rb:8000 def type; end end end @@ -16565,13 +16273,11 @@ end # # If it has any other arguments, it would be a `SuperNode` instead. # -# source://prism//lib/prism/node.rb#8020 +# pkg:gem/prism#lib/prism/node.rb:8020 class Prism::ForwardingSuperNode < ::Prism::Node # Initialize a new ForwardingSuperNode node. # - # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode - # - # source://prism//lib/prism/node.rb#8022 + # pkg:gem/prism#lib/prism/node.rb:8022 sig do params( source: Prism::Source, @@ -16586,42 +16292,42 @@ class Prism::ForwardingSuperNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8092 + # pkg:gem/prism#lib/prism/node.rb:8092 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8031 + # pkg:gem/prism#lib/prism/node.rb:8031 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # All other arguments are forwarded as normal, except the original block is replaced with the new block. # - # source://prism//lib/prism/node.rb#8073 + # pkg:gem/prism#lib/prism/node.rb:8073 sig { returns(T.nilable(Prism::BlockNode)) } def block; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8036 + # pkg:gem/prism#lib/prism/node.rb:8036 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8055 + # pkg:gem/prism#lib/prism/node.rb:8055 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8048 + # pkg:gem/prism#lib/prism/node.rb:8048 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?block: BlockNode?) -> ForwardingSuperNode # - # source://prism//lib/prism/node.rb#8060 + # pkg:gem/prism#lib/prism/node.rb:8060 sig do params( node_id: Integer, @@ -16632,24 +16338,21 @@ class Prism::ForwardingSuperNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8036 + # pkg:gem/prism#lib/prism/node.rb:8065 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, block: BlockNode? } # - # source://prism//lib/prism/node.rb#8068 + # pkg:gem/prism#lib/prism/node.rb:8068 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [block] - # - # source://prism//lib/prism/node.rb#8041 + # pkg:gem/prism#lib/prism/node.rb:8041 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -16657,20 +16360,20 @@ class Prism::ForwardingSuperNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8076 + # pkg:gem/prism#lib/prism/node.rb:8076 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8081 + # pkg:gem/prism#lib/prism/node.rb:8081 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8086 + # pkg:gem/prism#lib/prism/node.rb:8086 def type; end end end @@ -16680,13 +16383,11 @@ end # $target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8102 +# pkg:gem/prism#lib/prism/node.rb:8102 class Prism::GlobalVariableAndWriteNode < ::Prism::Node # Initialize a new GlobalVariableAndWriteNode node. # - # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#8104 + # pkg:gem/prism#lib/prism/node.rb:8104 sig do params( source: Prism::Source, @@ -16704,36 +16405,36 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8209 + # pkg:gem/prism#lib/prism/node.rb:8209 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8116 + # pkg:gem/prism#lib/prism/node.rb:8116 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8121 + # pkg:gem/prism#lib/prism/node.rb:8121 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8138 + # pkg:gem/prism#lib/prism/node.rb:8138 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8133 + # pkg:gem/prism#lib/prism/node.rb:8133 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#8143 + # pkg:gem/prism#lib/prism/node.rb:8143 sig do params( node_id: Integer, @@ -16747,27 +16448,24 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8121 + # pkg:gem/prism#lib/prism/node.rb:8148 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#8151 + # pkg:gem/prism#lib/prism/node.rb:8151 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#201 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:201 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#8126 + # pkg:gem/prism#lib/prism/node.rb:8126 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -16775,62 +16473,62 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8193 + # pkg:gem/prism#lib/prism/node.rb:8193 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8156 + # pkg:gem/prism#lib/prism/node.rb:8156 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#8159 + # pkg:gem/prism#lib/prism/node.rb:8159 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8188 + # pkg:gem/prism#lib/prism/node.rb:8188 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#8172 + # pkg:gem/prism#lib/prism/node.rb:8172 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8167 + # pkg:gem/prism#lib/prism/node.rb:8167 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8180 + # pkg:gem/prism#lib/prism/node.rb:8180 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8198 + # pkg:gem/prism#lib/prism/node.rb:8198 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8185 + # pkg:gem/prism#lib/prism/node.rb:8185 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8203 + # pkg:gem/prism#lib/prism/node.rb:8203 def type; end end end @@ -16840,13 +16538,11 @@ end # $target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8222 +# pkg:gem/prism#lib/prism/node.rb:8222 class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # Initialize a new GlobalVariableOperatorWriteNode node. # - # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#8224 + # pkg:gem/prism#lib/prism/node.rb:8224 sig do params( source: Prism::Source, @@ -16865,48 +16561,48 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8328 + # pkg:gem/prism#lib/prism/node.rb:8328 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8237 + # pkg:gem/prism#lib/prism/node.rb:8237 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#8309 + # pkg:gem/prism#lib/prism/node.rb:8309 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#8293 + # pkg:gem/prism#lib/prism/node.rb:8293 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8242 + # pkg:gem/prism#lib/prism/node.rb:8242 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8259 + # pkg:gem/prism#lib/prism/node.rb:8259 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8254 + # pkg:gem/prism#lib/prism/node.rb:8254 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#8264 + # pkg:gem/prism#lib/prism/node.rb:8264 sig do params( node_id: Integer, @@ -16921,27 +16617,24 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8242 + # pkg:gem/prism#lib/prism/node.rb:8269 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#8272 + # pkg:gem/prism#lib/prism/node.rb:8272 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#213 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:213 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#8247 + # pkg:gem/prism#lib/prism/node.rb:8247 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -16949,62 +16642,62 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8312 + # pkg:gem/prism#lib/prism/node.rb:8312 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8277 + # pkg:gem/prism#lib/prism/node.rb:8277 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#8280 + # pkg:gem/prism#lib/prism/node.rb:8280 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#406 + # pkg:gem/prism#lib/prism/node_ext.rb:406 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#413 + # pkg:gem/prism#lib/prism/node_ext.rb:413 def operator_loc; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8301 + # pkg:gem/prism#lib/prism/node.rb:8301 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8288 + # pkg:gem/prism#lib/prism/node.rb:8288 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8317 + # pkg:gem/prism#lib/prism/node.rb:8317 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8306 + # pkg:gem/prism#lib/prism/node.rb:8306 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8322 + # pkg:gem/prism#lib/prism/node.rb:8322 def type; end end end @@ -17014,13 +16707,11 @@ end # $target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8342 +# pkg:gem/prism#lib/prism/node.rb:8342 class Prism::GlobalVariableOrWriteNode < ::Prism::Node # Initialize a new GlobalVariableOrWriteNode node. # - # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#8344 + # pkg:gem/prism#lib/prism/node.rb:8344 sig do params( source: Prism::Source, @@ -17038,36 +16729,36 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8449 + # pkg:gem/prism#lib/prism/node.rb:8449 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8356 + # pkg:gem/prism#lib/prism/node.rb:8356 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8361 + # pkg:gem/prism#lib/prism/node.rb:8361 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8378 + # pkg:gem/prism#lib/prism/node.rb:8378 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8373 + # pkg:gem/prism#lib/prism/node.rb:8373 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#8383 + # pkg:gem/prism#lib/prism/node.rb:8383 sig do params( node_id: Integer, @@ -17081,27 +16772,24 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8361 + # pkg:gem/prism#lib/prism/node.rb:8388 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#8391 + # pkg:gem/prism#lib/prism/node.rb:8391 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#207 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:207 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#8366 + # pkg:gem/prism#lib/prism/node.rb:8366 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -17109,62 +16797,62 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8433 + # pkg:gem/prism#lib/prism/node.rb:8433 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8396 + # pkg:gem/prism#lib/prism/node.rb:8396 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#8399 + # pkg:gem/prism#lib/prism/node.rb:8399 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8428 + # pkg:gem/prism#lib/prism/node.rb:8428 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#8412 + # pkg:gem/prism#lib/prism/node.rb:8412 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8407 + # pkg:gem/prism#lib/prism/node.rb:8407 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8420 + # pkg:gem/prism#lib/prism/node.rb:8420 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8438 + # pkg:gem/prism#lib/prism/node.rb:8438 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8425 + # pkg:gem/prism#lib/prism/node.rb:8425 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8443 + # pkg:gem/prism#lib/prism/node.rb:8443 def type; end end end @@ -17174,49 +16862,47 @@ end # $foo # ^^^^ # -# source://prism//lib/prism/node.rb#8462 +# pkg:gem/prism#lib/prism/node.rb:8462 class Prism::GlobalVariableReadNode < ::Prism::Node # Initialize a new GlobalVariableReadNode node. # - # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode - # - # source://prism//lib/prism/node.rb#8464 + # pkg:gem/prism#lib/prism/node.rb:8464 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8535 + # pkg:gem/prism#lib/prism/node.rb:8535 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8473 + # pkg:gem/prism#lib/prism/node.rb:8473 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8478 + # pkg:gem/prism#lib/prism/node.rb:8478 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8494 + # pkg:gem/prism#lib/prism/node.rb:8494 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8489 + # pkg:gem/prism#lib/prism/node.rb:8489 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableReadNode # - # source://prism//lib/prism/node.rb#8499 + # pkg:gem/prism#lib/prism/node.rb:8499 sig do params( node_id: Integer, @@ -17227,22 +16913,21 @@ class Prism::GlobalVariableReadNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8478 + # pkg:gem/prism#lib/prism/node.rb:8504 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#8507 + # pkg:gem/prism#lib/prism/node.rb:8507 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#8483 + # pkg:gem/prism#lib/prism/node.rb:8483 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -17250,7 +16935,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8519 + # pkg:gem/prism#lib/prism/node.rb:8519 sig { override.returns(String) } def inspect; end @@ -17260,20 +16945,20 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # $_Test # name `:$_Test` # - # source://prism//lib/prism/node.rb#8516 + # pkg:gem/prism#lib/prism/node.rb:8516 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8524 + # pkg:gem/prism#lib/prism/node.rb:8524 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8529 + # pkg:gem/prism#lib/prism/node.rb:8529 def type; end end end @@ -17283,49 +16968,47 @@ end # $foo, $bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#8545 +# pkg:gem/prism#lib/prism/node.rb:8545 class Prism::GlobalVariableTargetNode < ::Prism::Node # Initialize a new GlobalVariableTargetNode node. # - # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode - # - # source://prism//lib/prism/node.rb#8547 + # pkg:gem/prism#lib/prism/node.rb:8547 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8614 + # pkg:gem/prism#lib/prism/node.rb:8614 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8556 + # pkg:gem/prism#lib/prism/node.rb:8556 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8561 + # pkg:gem/prism#lib/prism/node.rb:8561 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8577 + # pkg:gem/prism#lib/prism/node.rb:8577 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8572 + # pkg:gem/prism#lib/prism/node.rb:8572 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableTargetNode # - # source://prism//lib/prism/node.rb#8582 + # pkg:gem/prism#lib/prism/node.rb:8582 sig do params( node_id: Integer, @@ -17336,22 +17019,21 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8561 + # pkg:gem/prism#lib/prism/node.rb:8587 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#8590 + # pkg:gem/prism#lib/prism/node.rb:8590 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#8566 + # pkg:gem/prism#lib/prism/node.rb:8566 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -17359,26 +17041,26 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8598 + # pkg:gem/prism#lib/prism/node.rb:8598 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8595 + # pkg:gem/prism#lib/prism/node.rb:8595 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8603 + # pkg:gem/prism#lib/prism/node.rb:8603 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8608 + # pkg:gem/prism#lib/prism/node.rb:8608 def type; end end end @@ -17388,13 +17070,11 @@ end # $foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#8624 +# pkg:gem/prism#lib/prism/node.rb:8624 class Prism::GlobalVariableWriteNode < ::Prism::Node # Initialize a new GlobalVariableWriteNode node. # - # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode - # - # source://prism//lib/prism/node.rb#8626 + # pkg:gem/prism#lib/prism/node.rb:8626 sig do params( source: Prism::Source, @@ -17412,36 +17092,36 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8747 + # pkg:gem/prism#lib/prism/node.rb:8747 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8638 + # pkg:gem/prism#lib/prism/node.rb:8638 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8643 + # pkg:gem/prism#lib/prism/node.rb:8643 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8660 + # pkg:gem/prism#lib/prism/node.rb:8660 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8655 + # pkg:gem/prism#lib/prism/node.rb:8655 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> GlobalVariableWriteNode # - # source://prism//lib/prism/node.rb#8665 + # pkg:gem/prism#lib/prism/node.rb:8665 sig do params( node_id: Integer, @@ -17455,24 +17135,21 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8643 + # pkg:gem/prism#lib/prism/node.rb:8670 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#8673 + # pkg:gem/prism#lib/prism/node.rb:8673 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#8648 + # pkg:gem/prism#lib/prism/node.rb:8648 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -17480,7 +17157,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8731 + # pkg:gem/prism#lib/prism/node.rb:8731 sig { override.returns(String) } def inspect; end @@ -17490,7 +17167,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # $_Test = 123 # name `:$_Test` # - # source://prism//lib/prism/node.rb#8682 + # pkg:gem/prism#lib/prism/node.rb:8682 sig { returns(Symbol) } def name; end @@ -17499,13 +17176,13 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^^^^ # - # source://prism//lib/prism/node.rb#8688 + # pkg:gem/prism#lib/prism/node.rb:8688 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8726 + # pkg:gem/prism#lib/prism/node.rb:8726 sig { returns(String) } def operator; end @@ -17514,25 +17191,25 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^ # - # source://prism//lib/prism/node.rb#8713 + # pkg:gem/prism#lib/prism/node.rb:8713 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8696 + # pkg:gem/prism#lib/prism/node.rb:8696 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8721 + # pkg:gem/prism#lib/prism/node.rb:8721 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8736 + # pkg:gem/prism#lib/prism/node.rb:8736 sig { override.returns(Symbol) } def type; end @@ -17544,14 +17221,14 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $-xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#8707 + # pkg:gem/prism#lib/prism/node.rb:8707 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8741 + # pkg:gem/prism#lib/prism/node.rb:8741 def type; end end end @@ -17561,13 +17238,11 @@ end # { a => b } # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8760 +# pkg:gem/prism#lib/prism/node.rb:8760 class Prism::HashNode < ::Prism::Node # Initialize a new HashNode node. # - # @return [HashNode] a new instance of HashNode - # - # source://prism//lib/prism/node.rb#8762 + # pkg:gem/prism#lib/prism/node.rb:8762 sig do params( source: Prism::Source, @@ -17584,24 +17259,24 @@ class Prism::HashNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8880 + # pkg:gem/prism#lib/prism/node.rb:8880 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8773 + # pkg:gem/prism#lib/prism/node.rb:8773 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8778 + # pkg:gem/prism#lib/prism/node.rb:8778 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#8859 + # pkg:gem/prism#lib/prism/node.rb:8859 sig { returns(String) } def closing; end @@ -17610,25 +17285,25 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8841 + # pkg:gem/prism#lib/prism/node.rb:8841 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8795 + # pkg:gem/prism#lib/prism/node.rb:8795 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8790 + # pkg:gem/prism#lib/prism/node.rb:8790 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location) -> HashNode # - # source://prism//lib/prism/node.rb#8800 + # pkg:gem/prism#lib/prism/node.rb:8800 sig do params( node_id: Integer, @@ -17641,22 +17316,21 @@ class Prism::HashNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8778 + # pkg:gem/prism#lib/prism/node.rb:8805 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#8808 + # pkg:gem/prism#lib/prism/node.rb:8808 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#8783 + # pkg:gem/prism#lib/prism/node.rb:8783 def each_child_node; end # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. @@ -17667,7 +17341,7 @@ class Prism::HashNode < ::Prism::Node # { **foo } # ^^^^^ # - # source://prism//lib/prism/node.rb#8835 + # pkg:gem/prism#lib/prism/node.rb:8835 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end @@ -17676,13 +17350,13 @@ class Prism::HashNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8864 + # pkg:gem/prism#lib/prism/node.rb:8864 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#8854 + # pkg:gem/prism#lib/prism/node.rb:8854 sig { returns(String) } def opening; end @@ -17691,32 +17365,32 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8816 + # pkg:gem/prism#lib/prism/node.rb:8816 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8849 + # pkg:gem/prism#lib/prism/node.rb:8849 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8824 + # pkg:gem/prism#lib/prism/node.rb:8824 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8869 + # pkg:gem/prism#lib/prism/node.rb:8869 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8874 + # pkg:gem/prism#lib/prism/node.rb:8874 def type; end end end @@ -17735,13 +17409,11 @@ end # foo in { a: 1, b: 2 } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8902 +# pkg:gem/prism#lib/prism/node.rb:8902 class Prism::HashPatternNode < ::Prism::Node # Initialize a new HashPatternNode node. # - # @return [HashPatternNode] a new instance of HashPatternNode - # - # source://prism//lib/prism/node.rb#8904 + # pkg:gem/prism#lib/prism/node.rb:8904 sig do params( source: Prism::Source, @@ -17760,24 +17432,24 @@ class Prism::HashPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9066 + # pkg:gem/prism#lib/prism/node.rb:9066 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8917 + # pkg:gem/prism#lib/prism/node.rb:8917 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8922 + # pkg:gem/prism#lib/prism/node.rb:8922 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#9045 + # pkg:gem/prism#lib/prism/node.rb:9045 sig { returns(T.nilable(String)) } def closing; end @@ -17789,19 +17461,19 @@ class Prism::HashPatternNode < ::Prism::Node # foo => Bar[a: 1] # ^ # - # source://prism//lib/prism/node.rb#9021 + # pkg:gem/prism#lib/prism/node.rb:9021 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8945 + # pkg:gem/prism#lib/prism/node.rb:8945 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8936 + # pkg:gem/prism#lib/prism/node.rb:8936 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -17813,13 +17485,13 @@ class Prism::HashPatternNode < ::Prism::Node # foo => Bar::Baz[a: 1, b: 2] # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#8969 + # pkg:gem/prism#lib/prism/node.rb:8969 sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } def constant; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode # - # source://prism//lib/prism/node.rb#8950 + # pkg:gem/prism#lib/prism/node.rb:8950 sig do params( node_id: Integer, @@ -17834,24 +17506,21 @@ class Prism::HashPatternNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8922 + # pkg:gem/prism#lib/prism/node.rb:8955 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#8958 + # pkg:gem/prism#lib/prism/node.rb:8958 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [constant] - # - # source://prism//lib/prism/node.rb#8927 + # pkg:gem/prism#lib/prism/node.rb:8927 def each_child_node; end # Represents the explicit named hash keys and values. @@ -17859,7 +17528,7 @@ class Prism::HashPatternNode < ::Prism::Node # foo => { a: 1, b:, ** } # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#8975 + # pkg:gem/prism#lib/prism/node.rb:8975 sig { returns(T::Array[Prism::AssocNode]) } def elements; end @@ -17868,13 +17537,13 @@ class Prism::HashPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#9050 + # pkg:gem/prism#lib/prism/node.rb:9050 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#9040 + # pkg:gem/prism#lib/prism/node.rb:9040 sig { returns(T.nilable(String)) } def opening; end @@ -17886,7 +17555,7 @@ class Prism::HashPatternNode < ::Prism::Node # foo => Bar[a: 1] # ^ # - # source://prism//lib/prism/node.rb#8996 + # pkg:gem/prism#lib/prism/node.rb:8996 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -17901,43 +17570,41 @@ class Prism::HashPatternNode < ::Prism::Node # foo => { a: 1, b:, **nil } # ^^^^^ # - # source://prism//lib/prism/node.rb#8987 + # pkg:gem/prism#lib/prism/node.rb:8987 sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } def rest; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9035 + # pkg:gem/prism#lib/prism/node.rb:9035 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9010 + # pkg:gem/prism#lib/prism/node.rb:9010 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9055 + # pkg:gem/prism#lib/prism/node.rb:9055 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9060 + # pkg:gem/prism#lib/prism/node.rb:9060 def type; end end end -# source://prism//lib/prism/node_ext.rb#55 +# pkg:gem/prism#lib/prism/node_ext.rb:55 module Prism::HeredocQuery # Returns true if this node was represented as a heredoc in the source code. # - # @return [Boolean] - # - # source://prism//lib/prism/node_ext.rb#57 + # pkg:gem/prism#lib/prism/node_ext.rb:57 def heredoc?; end end @@ -17952,13 +17619,11 @@ end # foo ? bar : baz # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9087 +# pkg:gem/prism#lib/prism/node.rb:9087 class Prism::IfNode < ::Prism::Node # Initialize a new IfNode node. # - # @return [IfNode] a new instance of IfNode - # - # source://prism//lib/prism/node.rb#9089 + # pkg:gem/prism#lib/prism/node.rb:9089 sig do params( source: Prism::Source, @@ -17978,42 +17643,42 @@ class Prism::IfNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9292 + # pkg:gem/prism#lib/prism/node.rb:9292 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9103 + # pkg:gem/prism#lib/prism/node.rb:9103 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9108 + # pkg:gem/prism#lib/prism/node.rb:9108 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9131 + # pkg:gem/prism#lib/prism/node.rb:9131 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9122 + # pkg:gem/prism#lib/prism/node.rb:9122 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # Returns the subsequent if/elsif/else clause of the if node. This method is # deprecated in favor of #subsequent. # - # source://prism//lib/prism/node_ext.rb#488 + # pkg:gem/prism#lib/prism/node_ext.rb:488 def consequent; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?subsequent: ElseNode | IfNode | nil, ?end_keyword_loc: Location?) -> IfNode # - # source://prism//lib/prism/node.rb#9136 + # pkg:gem/prism#lib/prism/node.rb:9136 sig do params( node_id: Integer, @@ -18029,29 +17694,26 @@ class Prism::IfNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9108 + # pkg:gem/prism#lib/prism/node.rb:9141 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: ElseNode | IfNode | nil, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#9144 + # pkg:gem/prism#lib/prism/node.rb:9144 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [predicate] - # - # source://prism//lib/prism/node.rb#9113 + # pkg:gem/prism#lib/prism/node.rb:9113 def each_child_node; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#9271 + # pkg:gem/prism#lib/prism/node.rb:9271 sig { returns(T.nilable(String)) } def end_keyword; end @@ -18062,7 +17724,7 @@ class Prism::IfNode < ::Prism::Node # end # ^^^ # - # source://prism//lib/prism/node.rb#9242 + # pkg:gem/prism#lib/prism/node.rb:9242 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -18071,7 +17733,7 @@ class Prism::IfNode < ::Prism::Node # def if_keyword: () -> String? # - # source://prism//lib/prism/node.rb#9261 + # pkg:gem/prism#lib/prism/node.rb:9261 sig { returns(T.nilable(String)) } def if_keyword; end @@ -18082,17 +17744,17 @@ class Prism::IfNode < ::Prism::Node # # The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression. # - # source://prism//lib/prism/node.rb#9154 + # pkg:gem/prism#lib/prism/node.rb:9154 sig { returns(T.nilable(Prism::Location)) } def if_keyword_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9276 + # pkg:gem/prism#lib/prism/node.rb:9276 sig { override.returns(String) } def inspect; end - # source://prism//lib/prism/parse_result/newlines.rb#92 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:92 def newline_flag!(lines); end # The node for the condition the `IfNode` is testing. @@ -18108,26 +17770,26 @@ class Prism::IfNode < ::Prism::Node # foo ? bar : baz # ^^^ # - # source://prism//lib/prism/node.rb#9184 + # pkg:gem/prism#lib/prism/node.rb:9184 sig { returns(Prism::Node) } def predicate; end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9256 + # pkg:gem/prism#lib/prism/node.rb:9256 def save_end_keyword_loc(repository); end # Save the if_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9168 + # pkg:gem/prism#lib/prism/node.rb:9168 def save_if_keyword_loc(repository); end # Save the then_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9207 + # pkg:gem/prism#lib/prism/node.rb:9207 def save_then_keyword_loc(repository); end # Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided. @@ -18139,7 +17801,7 @@ class Prism::IfNode < ::Prism::Node # ^^^ # end # - # source://prism//lib/prism/node.rb#9219 + # pkg:gem/prism#lib/prism/node.rb:9219 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -18157,13 +17819,13 @@ class Prism::IfNode < ::Prism::Node # if foo then bar else baz end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#9234 + # pkg:gem/prism#lib/prism/node.rb:9234 sig { returns(T.nilable(T.any(Prism::ElseNode, Prism::IfNode))) } def subsequent; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#9266 + # pkg:gem/prism#lib/prism/node.rb:9266 sig { returns(T.nilable(String)) } def then_keyword; end @@ -18175,20 +17837,20 @@ class Prism::IfNode < ::Prism::Node # a ? b : c # ^ # - # source://prism//lib/prism/node.rb#9193 + # pkg:gem/prism#lib/prism/node.rb:9193 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9281 + # pkg:gem/prism#lib/prism/node.rb:9281 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9286 + # pkg:gem/prism#lib/prism/node.rb:9286 def type; end end end @@ -18198,13 +17860,11 @@ end # 1.0i # ^^^^ # -# source://prism//lib/prism/node.rb#9307 +# pkg:gem/prism#lib/prism/node.rb:9307 class Prism::ImaginaryNode < ::Prism::Node # Initialize a new ImaginaryNode node. # - # @return [ImaginaryNode] a new instance of ImaginaryNode - # - # source://prism//lib/prism/node.rb#9309 + # pkg:gem/prism#lib/prism/node.rb:9309 sig do params( source: Prism::Source, @@ -18219,36 +17879,36 @@ class Prism::ImaginaryNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9377 + # pkg:gem/prism#lib/prism/node.rb:9377 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9318 + # pkg:gem/prism#lib/prism/node.rb:9318 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9323 + # pkg:gem/prism#lib/prism/node.rb:9323 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9340 + # pkg:gem/prism#lib/prism/node.rb:9340 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9335 + # pkg:gem/prism#lib/prism/node.rb:9335 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numeric: FloatNode | IntegerNode | RationalNode) -> ImaginaryNode # - # source://prism//lib/prism/node.rb#9345 + # pkg:gem/prism#lib/prism/node.rb:9345 sig do params( node_id: Integer, @@ -18259,24 +17919,21 @@ class Prism::ImaginaryNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9323 + # pkg:gem/prism#lib/prism/node.rb:9350 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numeric: FloatNode | IntegerNode | RationalNode } # - # source://prism//lib/prism/node.rb#9353 + # pkg:gem/prism#lib/prism/node.rb:9353 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [numeric] - # - # source://prism//lib/prism/node.rb#9328 + # pkg:gem/prism#lib/prism/node.rb:9328 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18284,32 +17941,32 @@ class Prism::ImaginaryNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#9361 + # pkg:gem/prism#lib/prism/node.rb:9361 sig { override.returns(String) } def inspect; end # attr_reader numeric: FloatNode | IntegerNode | RationalNode # - # source://prism//lib/prism/node.rb#9358 + # pkg:gem/prism#lib/prism/node.rb:9358 sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } def numeric; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9366 + # pkg:gem/prism#lib/prism/node.rb:9366 sig { override.returns(Symbol) } def type; end # Returns the value of the node as a Ruby Complex. # - # source://prism//lib/prism/node_ext.rb#110 + # pkg:gem/prism#lib/prism/node_ext.rb:110 sig { returns(Complex) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9371 + # pkg:gem/prism#lib/prism/node.rb:9371 def type; end end end @@ -18325,13 +17982,11 @@ end # foo in { bar: } # ^^^^ # -# source://prism//lib/prism/node.rb#9393 +# pkg:gem/prism#lib/prism/node.rb:9393 class Prism::ImplicitNode < ::Prism::Node # Initialize a new ImplicitNode node. # - # @return [ImplicitNode] a new instance of ImplicitNode - # - # source://prism//lib/prism/node.rb#9395 + # pkg:gem/prism#lib/prism/node.rb:9395 sig do params( source: Prism::Source, @@ -18346,36 +18001,36 @@ class Prism::ImplicitNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9463 + # pkg:gem/prism#lib/prism/node.rb:9463 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9404 + # pkg:gem/prism#lib/prism/node.rb:9404 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9409 + # pkg:gem/prism#lib/prism/node.rb:9409 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9426 + # pkg:gem/prism#lib/prism/node.rb:9426 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9421 + # pkg:gem/prism#lib/prism/node.rb:9421 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode) -> ImplicitNode # - # source://prism//lib/prism/node.rb#9431 + # pkg:gem/prism#lib/prism/node.rb:9431 sig do params( node_id: Integer, @@ -18386,24 +18041,21 @@ class Prism::ImplicitNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9409 + # pkg:gem/prism#lib/prism/node.rb:9436 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode } # - # source://prism//lib/prism/node.rb#9439 + # pkg:gem/prism#lib/prism/node.rb:9439 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#9414 + # pkg:gem/prism#lib/prism/node.rb:9414 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18411,19 +18063,19 @@ class Prism::ImplicitNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#9447 + # pkg:gem/prism#lib/prism/node.rb:9447 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9452 + # pkg:gem/prism#lib/prism/node.rb:9452 sig { override.returns(Symbol) } def type; end # attr_reader value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#9444 + # pkg:gem/prism#lib/prism/node.rb:9444 sig do returns(T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode)) end @@ -18432,7 +18084,7 @@ class Prism::ImplicitNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9457 + # pkg:gem/prism#lib/prism/node.rb:9457 def type; end end end @@ -18451,68 +18103,65 @@ end # foo, = bar # ^ # -# source://prism//lib/prism/node.rb#9482 +# pkg:gem/prism#lib/prism/node.rb:9482 class Prism::ImplicitRestNode < ::Prism::Node # Initialize a new ImplicitRestNode node. # - # @return [ImplicitRestNode] a new instance of ImplicitRestNode - # - # source://prism//lib/prism/node.rb#9484 + # pkg:gem/prism#lib/prism/node.rb:9484 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9547 + # pkg:gem/prism#lib/prism/node.rb:9547 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9492 + # pkg:gem/prism#lib/prism/node.rb:9492 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9497 + # pkg:gem/prism#lib/prism/node.rb:9497 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9513 + # pkg:gem/prism#lib/prism/node.rb:9513 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9508 + # pkg:gem/prism#lib/prism/node.rb:9508 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ImplicitRestNode # - # source://prism//lib/prism/node.rb#9518 + # pkg:gem/prism#lib/prism/node.rb:9518 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ImplicitRestNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9497 + # pkg:gem/prism#lib/prism/node.rb:9523 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#9526 + # pkg:gem/prism#lib/prism/node.rb:9526 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#9502 + # pkg:gem/prism#lib/prism/node.rb:9502 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18520,20 +18169,20 @@ class Prism::ImplicitRestNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#9531 + # pkg:gem/prism#lib/prism/node.rb:9531 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9536 + # pkg:gem/prism#lib/prism/node.rb:9536 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9541 + # pkg:gem/prism#lib/prism/node.rb:9541 def type; end end end @@ -18543,13 +18192,11 @@ end # case a; in b then c end # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9556 +# pkg:gem/prism#lib/prism/node.rb:9556 class Prism::InNode < ::Prism::Node # Initialize a new InNode node. # - # @return [InNode] a new instance of InNode - # - # source://prism//lib/prism/node.rb#9558 + # pkg:gem/prism#lib/prism/node.rb:9558 sig do params( source: Prism::Source, @@ -18567,36 +18214,36 @@ class Prism::InNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9678 + # pkg:gem/prism#lib/prism/node.rb:9678 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9570 + # pkg:gem/prism#lib/prism/node.rb:9570 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9575 + # pkg:gem/prism#lib/prism/node.rb:9575 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9596 + # pkg:gem/prism#lib/prism/node.rb:9596 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9588 + # pkg:gem/prism#lib/prism/node.rb:9588 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?) -> InNode # - # source://prism//lib/prism/node.rb#9601 + # pkg:gem/prism#lib/prism/node.rb:9601 sig do params( node_id: Integer, @@ -18610,24 +18257,21 @@ class Prism::InNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9575 + # pkg:gem/prism#lib/prism/node.rb:9606 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location? } # - # source://prism//lib/prism/node.rb#9609 + # pkg:gem/prism#lib/prism/node.rb:9609 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [pattern] - # - # source://prism//lib/prism/node.rb#9580 + # pkg:gem/prism#lib/prism/node.rb:9580 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18635,68 +18279,68 @@ class Prism::InNode < ::Prism::Node # def in: () -> String # - # source://prism//lib/prism/node.rb#9652 + # pkg:gem/prism#lib/prism/node.rb:9652 sig { returns(String) } def in; end # attr_reader in_loc: Location # - # source://prism//lib/prism/node.rb#9620 + # pkg:gem/prism#lib/prism/node.rb:9620 sig { returns(Prism::Location) } def in_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9662 + # pkg:gem/prism#lib/prism/node.rb:9662 sig { override.returns(String) } def inspect; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#9614 + # pkg:gem/prism#lib/prism/node.rb:9614 sig { returns(Prism::Node) } def pattern; end # Save the in_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9628 + # pkg:gem/prism#lib/prism/node.rb:9628 def save_in_loc(repository); end # Save the then_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9647 + # pkg:gem/prism#lib/prism/node.rb:9647 def save_then_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#9617 + # pkg:gem/prism#lib/prism/node.rb:9617 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then: () -> String? # - # source://prism//lib/prism/node.rb#9657 + # pkg:gem/prism#lib/prism/node.rb:9657 sig { returns(T.nilable(String)) } def then; end # attr_reader then_loc: Location? # - # source://prism//lib/prism/node.rb#9633 + # pkg:gem/prism#lib/prism/node.rb:9633 sig { returns(T.nilable(Prism::Location)) } def then_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9667 + # pkg:gem/prism#lib/prism/node.rb:9667 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9672 + # pkg:gem/prism#lib/prism/node.rb:9672 def type; end end end @@ -18706,13 +18350,11 @@ end # foo.bar[baz] &&= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9691 +# pkg:gem/prism#lib/prism/node.rb:9691 class Prism::IndexAndWriteNode < ::Prism::Node # Initialize a new IndexAndWriteNode node. # - # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode - # - # source://prism//lib/prism/node.rb#9693 + # pkg:gem/prism#lib/prism/node.rb:9693 sig do params( source: Prism::Source, @@ -18734,80 +18376,78 @@ class Prism::IndexAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9883 + # pkg:gem/prism#lib/prism/node.rb:9883 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9709 + # pkg:gem/prism#lib/prism/node.rb:9709 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9812 + # pkg:gem/prism#lib/prism/node.rb:9812 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9767 + # pkg:gem/prism#lib/prism/node.rb:9767 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#9828 + # pkg:gem/prism#lib/prism/node.rb:9828 sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9847 + # pkg:gem/prism#lib/prism/node.rb:9847 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9780 + # pkg:gem/prism#lib/prism/node.rb:9780 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9714 + # pkg:gem/prism#lib/prism/node.rb:9714 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9857 + # pkg:gem/prism#lib/prism/node.rb:9857 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9815 + # pkg:gem/prism#lib/prism/node.rb:9815 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9739 + # pkg:gem/prism#lib/prism/node.rb:9739 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9729 + # pkg:gem/prism#lib/prism/node.rb:9729 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexAndWriteNode # - # source://prism//lib/prism/node.rb#9744 + # pkg:gem/prism#lib/prism/node.rb:9744 sig do params( node_id: Integer, @@ -18825,24 +18465,21 @@ class Prism::IndexAndWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9714 + # pkg:gem/prism#lib/prism/node.rb:9749 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#9752 + # pkg:gem/prism#lib/prism/node.rb:9752 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [receiver] - # - # source://prism//lib/prism/node.rb#9719 + # pkg:gem/prism#lib/prism/node.rb:9719 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18850,104 +18487,98 @@ class Prism::IndexAndWriteNode < ::Prism::Node # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9772 + # pkg:gem/prism#lib/prism/node.rb:9772 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9867 + # pkg:gem/prism#lib/prism/node.rb:9867 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9852 + # pkg:gem/prism#lib/prism/node.rb:9852 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9799 + # pkg:gem/prism#lib/prism/node.rb:9799 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9862 + # pkg:gem/prism#lib/prism/node.rb:9862 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9831 + # pkg:gem/prism#lib/prism/node.rb:9831 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9777 + # pkg:gem/prism#lib/prism/node.rb:9777 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9757 + # pkg:gem/prism#lib/prism/node.rb:9757 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9794 + # pkg:gem/prism#lib/prism/node.rb:9794 def save_call_operator_loc(repository); end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9823 + # pkg:gem/prism#lib/prism/node.rb:9823 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9807 + # pkg:gem/prism#lib/prism/node.rb:9807 def save_opening_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9839 + # pkg:gem/prism#lib/prism/node.rb:9839 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9872 + # pkg:gem/prism#lib/prism/node.rb:9872 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9844 + # pkg:gem/prism#lib/prism/node.rb:9844 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9762 + # pkg:gem/prism#lib/prism/node.rb:9762 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9877 + # pkg:gem/prism#lib/prism/node.rb:9877 def type; end end end @@ -18957,13 +18588,11 @@ end # foo.bar[baz] += value # ^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9901 +# pkg:gem/prism#lib/prism/node.rb:9901 class Prism::IndexOperatorWriteNode < ::Prism::Node # Initialize a new IndexOperatorWriteNode node. # - # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode - # - # source://prism//lib/prism/node.rb#9903 + # pkg:gem/prism#lib/prism/node.rb:9903 sig do params( source: Prism::Source, @@ -18986,92 +18615,90 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10092 + # pkg:gem/prism#lib/prism/node.rb:10092 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9920 + # pkg:gem/prism#lib/prism/node.rb:9920 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#10023 + # pkg:gem/prism#lib/prism/node.rb:10023 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9978 + # pkg:gem/prism#lib/prism/node.rb:9978 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#10042 + # pkg:gem/prism#lib/prism/node.rb:10042 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#10045 + # pkg:gem/prism#lib/prism/node.rb:10045 sig { returns(Prism::Location) } def binary_operator_loc; end # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#10039 + # pkg:gem/prism#lib/prism/node.rb:10039 sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#10061 + # pkg:gem/prism#lib/prism/node.rb:10061 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9991 + # pkg:gem/prism#lib/prism/node.rb:9991 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9925 + # pkg:gem/prism#lib/prism/node.rb:9925 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10071 + # pkg:gem/prism#lib/prism/node.rb:10071 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10026 + # pkg:gem/prism#lib/prism/node.rb:10026 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9950 + # pkg:gem/prism#lib/prism/node.rb:9950 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9940 + # pkg:gem/prism#lib/prism/node.rb:9940 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> IndexOperatorWriteNode # - # source://prism//lib/prism/node.rb#9955 + # pkg:gem/prism#lib/prism/node.rb:9955 sig do params( node_id: Integer, @@ -19090,24 +18717,21 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9925 + # pkg:gem/prism#lib/prism/node.rb:9960 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#9963 + # pkg:gem/prism#lib/prism/node.rb:9963 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [receiver] - # - # source://prism//lib/prism/node.rb#9930 + # pkg:gem/prism#lib/prism/node.rb:9930 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -19115,104 +18739,98 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9983 + # pkg:gem/prism#lib/prism/node.rb:9983 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10076 + # pkg:gem/prism#lib/prism/node.rb:10076 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10066 + # pkg:gem/prism#lib/prism/node.rb:10066 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10010 + # pkg:gem/prism#lib/prism/node.rb:10010 sig { returns(Prism::Location) } def opening_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#422 + # pkg:gem/prism#lib/prism/node_ext.rb:422 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#429 + # pkg:gem/prism#lib/prism/node_ext.rb:429 def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9988 + # pkg:gem/prism#lib/prism/node.rb:9988 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9968 + # pkg:gem/prism#lib/prism/node.rb:9968 sig { returns(T::Boolean) } def safe_navigation?; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10053 + # pkg:gem/prism#lib/prism/node.rb:10053 def save_binary_operator_loc(repository); end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10005 + # pkg:gem/prism#lib/prism/node.rb:10005 def save_call_operator_loc(repository); end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10034 + # pkg:gem/prism#lib/prism/node.rb:10034 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10018 + # pkg:gem/prism#lib/prism/node.rb:10018 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10081 + # pkg:gem/prism#lib/prism/node.rb:10081 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10058 + # pkg:gem/prism#lib/prism/node.rb:10058 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9973 + # pkg:gem/prism#lib/prism/node.rb:9973 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10086 + # pkg:gem/prism#lib/prism/node.rb:10086 def type; end end end @@ -19222,13 +18840,11 @@ end # foo.bar[baz] ||= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10111 +# pkg:gem/prism#lib/prism/node.rb:10111 class Prism::IndexOrWriteNode < ::Prism::Node # Initialize a new IndexOrWriteNode node. # - # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode - # - # source://prism//lib/prism/node.rb#10113 + # pkg:gem/prism#lib/prism/node.rb:10113 sig do params( source: Prism::Source, @@ -19250,80 +18866,78 @@ class Prism::IndexOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10303 + # pkg:gem/prism#lib/prism/node.rb:10303 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10129 + # pkg:gem/prism#lib/prism/node.rb:10129 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#10232 + # pkg:gem/prism#lib/prism/node.rb:10232 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10187 + # pkg:gem/prism#lib/prism/node.rb:10187 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#10248 + # pkg:gem/prism#lib/prism/node.rb:10248 sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#10267 + # pkg:gem/prism#lib/prism/node.rb:10267 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#10200 + # pkg:gem/prism#lib/prism/node.rb:10200 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10134 + # pkg:gem/prism#lib/prism/node.rb:10134 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10277 + # pkg:gem/prism#lib/prism/node.rb:10277 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10235 + # pkg:gem/prism#lib/prism/node.rb:10235 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10159 + # pkg:gem/prism#lib/prism/node.rb:10159 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10149 + # pkg:gem/prism#lib/prism/node.rb:10149 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexOrWriteNode # - # source://prism//lib/prism/node.rb#10164 + # pkg:gem/prism#lib/prism/node.rb:10164 sig do params( node_id: Integer, @@ -19341,24 +18955,21 @@ class Prism::IndexOrWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10134 + # pkg:gem/prism#lib/prism/node.rb:10169 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#10172 + # pkg:gem/prism#lib/prism/node.rb:10172 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [receiver] - # - # source://prism//lib/prism/node.rb#10139 + # pkg:gem/prism#lib/prism/node.rb:10139 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -19366,104 +18977,98 @@ class Prism::IndexOrWriteNode < ::Prism::Node # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10192 + # pkg:gem/prism#lib/prism/node.rb:10192 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10287 + # pkg:gem/prism#lib/prism/node.rb:10287 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10272 + # pkg:gem/prism#lib/prism/node.rb:10272 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10219 + # pkg:gem/prism#lib/prism/node.rb:10219 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10282 + # pkg:gem/prism#lib/prism/node.rb:10282 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10251 + # pkg:gem/prism#lib/prism/node.rb:10251 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#10197 + # pkg:gem/prism#lib/prism/node.rb:10197 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10177 + # pkg:gem/prism#lib/prism/node.rb:10177 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10214 + # pkg:gem/prism#lib/prism/node.rb:10214 def save_call_operator_loc(repository); end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10243 + # pkg:gem/prism#lib/prism/node.rb:10243 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10227 + # pkg:gem/prism#lib/prism/node.rb:10227 def save_opening_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10259 + # pkg:gem/prism#lib/prism/node.rb:10259 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10292 + # pkg:gem/prism#lib/prism/node.rb:10292 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10264 + # pkg:gem/prism#lib/prism/node.rb:10264 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10182 + # pkg:gem/prism#lib/prism/node.rb:10182 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10297 + # pkg:gem/prism#lib/prism/node.rb:10297 def type; end end end @@ -19481,13 +19086,11 @@ end # for foo[bar] in baz do end # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#10329 +# pkg:gem/prism#lib/prism/node.rb:10329 class Prism::IndexTargetNode < ::Prism::Node # Initialize a new IndexTargetNode node. # - # @return [IndexTargetNode] a new instance of IndexTargetNode - # - # source://prism//lib/prism/node.rb#10331 + # pkg:gem/prism#lib/prism/node.rb:10331 sig do params( source: Prism::Source, @@ -19506,68 +19109,66 @@ class Prism::IndexTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10471 + # pkg:gem/prism#lib/prism/node.rb:10471 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10344 + # pkg:gem/prism#lib/prism/node.rb:10344 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#10426 + # pkg:gem/prism#lib/prism/node.rb:10426 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10400 + # pkg:gem/prism#lib/prism/node.rb:10400 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#10442 + # pkg:gem/prism#lib/prism/node.rb:10442 sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10349 + # pkg:gem/prism#lib/prism/node.rb:10349 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10450 + # pkg:gem/prism#lib/prism/node.rb:10450 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10429 + # pkg:gem/prism#lib/prism/node.rb:10429 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10372 + # pkg:gem/prism#lib/prism/node.rb:10372 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10363 + # pkg:gem/prism#lib/prism/node.rb:10363 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?) -> IndexTargetNode # - # source://prism//lib/prism/node.rb#10377 + # pkg:gem/prism#lib/prism/node.rb:10377 sig do params( node_id: Integer, @@ -19582,24 +19183,21 @@ class Prism::IndexTargetNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10349 + # pkg:gem/prism#lib/prism/node.rb:10382 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode? } # - # source://prism//lib/prism/node.rb#10385 + # pkg:gem/prism#lib/prism/node.rb:10385 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [receiver] - # - # source://prism//lib/prism/node.rb#10354 + # pkg:gem/prism#lib/prism/node.rb:10354 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -19607,74 +19205,68 @@ class Prism::IndexTargetNode < ::Prism::Node # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10405 + # pkg:gem/prism#lib/prism/node.rb:10405 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10455 + # pkg:gem/prism#lib/prism/node.rb:10455 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10445 + # pkg:gem/prism#lib/prism/node.rb:10445 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10413 + # pkg:gem/prism#lib/prism/node.rb:10413 sig { returns(Prism::Location) } def opening_loc; end # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#10410 + # pkg:gem/prism#lib/prism/node.rb:10410 sig { returns(Prism::Node) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10390 + # pkg:gem/prism#lib/prism/node.rb:10390 sig { returns(T::Boolean) } def safe_navigation?; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10437 + # pkg:gem/prism#lib/prism/node.rb:10437 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10421 + # pkg:gem/prism#lib/prism/node.rb:10421 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10460 + # pkg:gem/prism#lib/prism/node.rb:10460 sig { override.returns(Symbol) } def type; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10395 + # pkg:gem/prism#lib/prism/node.rb:10395 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10465 + # pkg:gem/prism#lib/prism/node.rb:10465 def type; end end end @@ -19682,20 +19274,18 @@ end # InlineComment objects are the most common. They correspond to comments in # the source file like this one that start with #. # -# source://prism//lib/prism/parse_result.rb#543 +# pkg:gem/prism#lib/prism/parse_result.rb:543 class Prism::InlineComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#551 + # pkg:gem/prism#lib/prism/parse_result.rb:551 sig { returns(String) } def inspect; end # Returns true if this comment happens on the same line as other code and # false if the comment is by itself. # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#546 + # pkg:gem/prism#lib/prism/parse_result.rb:546 sig { override.returns(T::Boolean) } def trailing?; end end @@ -19703,804 +19293,802 @@ end # This visitor is responsible for composing the strings that get returned by # the various #inspect methods defined on each of the nodes. # -# source://prism//lib/prism/inspect_visitor.rb#15 +# pkg:gem/prism#lib/prism/inspect_visitor.rb:15 class Prism::InspectVisitor < ::Prism::Visitor # Initializes a new instance of the InspectVisitor. # - # @return [InspectVisitor] a new instance of InspectVisitor - # - # source://prism//lib/prism/inspect_visitor.rb#38 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:38 sig { params(indent: String).void } def initialize(indent = T.unsafe(nil)); end # The list of commands that we need to execute in order to compose the # final string. # - # source://prism//lib/prism/inspect_visitor.rb#35 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:35 def commands; end # Compose the final string. # - # source://prism//lib/prism/inspect_visitor.rb#51 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:51 sig { returns(String) } def compose; end # The current prefix string. # - # source://prism//lib/prism/inspect_visitor.rb#31 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:31 def indent; end # Inspect a AliasGlobalVariableNode node. # - # source://prism//lib/prism/inspect_visitor.rb#80 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:80 def visit_alias_global_variable_node(node); end # Inspect a AliasMethodNode node. # - # source://prism//lib/prism/inspect_visitor.rb#92 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:92 def visit_alias_method_node(node); end # Inspect a AlternationPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#104 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:104 def visit_alternation_pattern_node(node); end # Inspect a AndNode node. # - # source://prism//lib/prism/inspect_visitor.rb#116 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:116 def visit_and_node(node); end # Inspect a ArgumentsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#128 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:128 def visit_arguments_node(node); end # Inspect a ArrayNode node. # - # source://prism//lib/prism/inspect_visitor.rb#144 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:144 def visit_array_node(node); end # Inspect a ArrayPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#162 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:162 def visit_array_pattern_node(node); end # Inspect a AssocNode node. # - # source://prism//lib/prism/inspect_visitor.rb#201 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:201 def visit_assoc_node(node); end # Inspect a AssocSplatNode node. # - # source://prism//lib/prism/inspect_visitor.rb#213 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:213 def visit_assoc_splat_node(node); end # Inspect a BackReferenceReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#227 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:227 def visit_back_reference_read_node(node); end # Inspect a BeginNode node. # - # source://prism//lib/prism/inspect_visitor.rb#235 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:235 def visit_begin_node(node); end # Inspect a BlockArgumentNode node. # - # source://prism//lib/prism/inspect_visitor.rb#268 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:268 def visit_block_argument_node(node); end # Inspect a BlockLocalVariableNode node. # - # source://prism//lib/prism/inspect_visitor.rb#282 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:282 def visit_block_local_variable_node(node); end # Inspect a BlockNode node. # - # source://prism//lib/prism/inspect_visitor.rb#290 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:290 def visit_block_node(node); end # Inspect a BlockParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#312 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:312 def visit_block_parameter_node(node); end # Inspect a BlockParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#326 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:326 def visit_block_parameters_node(node); end # Inspect a BreakNode node. # - # source://prism//lib/prism/inspect_visitor.rb#350 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:350 def visit_break_node(node); end # Inspect a CallAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#364 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:364 def visit_call_and_write_node(node); end # Inspect a CallNode node. # - # source://prism//lib/prism/inspect_visitor.rb#384 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:384 def visit_call_node(node); end # Inspect a CallOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#415 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:415 def visit_call_operator_write_node(node); end # Inspect a CallOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#436 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:436 def visit_call_or_write_node(node); end # Inspect a CallTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#456 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:456 def visit_call_target_node(node); end # Inspect a CapturePatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#468 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:468 def visit_capture_pattern_node(node); end # Inspect a CaseMatchNode node. # - # source://prism//lib/prism/inspect_visitor.rb#480 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:480 def visit_case_match_node(node); end # Inspect a CaseNode node. # - # source://prism//lib/prism/inspect_visitor.rb#510 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:510 def visit_case_node(node); end # Inspect a ClassNode node. # - # source://prism//lib/prism/inspect_visitor.rb#540 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:540 def visit_class_node(node); end # Inspect a ClassVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#566 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:566 def visit_class_variable_and_write_node(node); end # Inspect a ClassVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#578 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:578 def visit_class_variable_operator_write_node(node); end # Inspect a ClassVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#591 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:591 def visit_class_variable_or_write_node(node); end # Inspect a ClassVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#603 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:603 def visit_class_variable_read_node(node); end # Inspect a ClassVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#611 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:611 def visit_class_variable_target_node(node); end # Inspect a ClassVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#619 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:619 def visit_class_variable_write_node(node); end # Inspect a ConstantAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#631 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:631 def visit_constant_and_write_node(node); end # Inspect a ConstantOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#643 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:643 def visit_constant_operator_write_node(node); end # Inspect a ConstantOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#656 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:656 def visit_constant_or_write_node(node); end # Inspect a ConstantPathAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#668 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:668 def visit_constant_path_and_write_node(node); end # Inspect a ConstantPathNode node. # - # source://prism//lib/prism/inspect_visitor.rb#680 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:680 def visit_constant_path_node(node); end # Inspect a ConstantPathOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#700 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:700 def visit_constant_path_operator_write_node(node); end # Inspect a ConstantPathOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#713 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:713 def visit_constant_path_or_write_node(node); end # Inspect a ConstantPathTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#725 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:725 def visit_constant_path_target_node(node); end # Inspect a ConstantPathWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#745 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:745 def visit_constant_path_write_node(node); end # Inspect a ConstantReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#757 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:757 def visit_constant_read_node(node); end # Inspect a ConstantTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#765 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:765 def visit_constant_target_node(node); end # Inspect a ConstantWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#773 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:773 def visit_constant_write_node(node); end # Inspect a DefNode node. # - # source://prism//lib/prism/inspect_visitor.rb#785 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:785 def visit_def_node(node); end # Inspect a DefinedNode node. # - # source://prism//lib/prism/inspect_visitor.rb#819 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:819 def visit_defined_node(node); end # Inspect a ElseNode node. # - # source://prism//lib/prism/inspect_visitor.rb#831 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:831 def visit_else_node(node); end # Inspect a EmbeddedStatementsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#846 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:846 def visit_embedded_statements_node(node); end # Inspect a EmbeddedVariableNode node. # - # source://prism//lib/prism/inspect_visitor.rb#861 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:861 def visit_embedded_variable_node(node); end # Inspect a EnsureNode node. # - # source://prism//lib/prism/inspect_visitor.rb#871 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:871 def visit_ensure_node(node); end # Inspect a FalseNode node. # - # source://prism//lib/prism/inspect_visitor.rb#886 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:886 def visit_false_node(node); end # Inspect a FindPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#893 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:893 def visit_find_pattern_node(node); end # Inspect a FlipFlopNode node. # - # source://prism//lib/prism/inspect_visitor.rb#921 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:921 def visit_flip_flop_node(node); end # Inspect a FloatNode node. # - # source://prism//lib/prism/inspect_visitor.rb#941 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:941 def visit_float_node(node); end # Inspect a ForNode node. # - # source://prism//lib/prism/inspect_visitor.rb#949 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:949 def visit_for_node(node); end # Inspect a ForwardingArgumentsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#970 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:970 def visit_forwarding_arguments_node(node); end # Inspect a ForwardingParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#977 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:977 def visit_forwarding_parameter_node(node); end # Inspect a ForwardingSuperNode node. # - # source://prism//lib/prism/inspect_visitor.rb#984 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:984 def visit_forwarding_super_node(node); end # Inspect a GlobalVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#997 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:997 def visit_global_variable_and_write_node(node); end # Inspect a GlobalVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1009 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1009 def visit_global_variable_operator_write_node(node); end # Inspect a GlobalVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1022 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1022 def visit_global_variable_or_write_node(node); end # Inspect a GlobalVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1034 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1034 def visit_global_variable_read_node(node); end # Inspect a GlobalVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1042 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1042 def visit_global_variable_target_node(node); end # Inspect a GlobalVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1050 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1050 def visit_global_variable_write_node(node); end # Inspect a HashNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1062 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1062 def visit_hash_node(node); end # Inspect a HashPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1080 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1080 def visit_hash_pattern_node(node); end # Inspect a IfNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1110 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1110 def visit_if_node(node); end # Inspect a ImaginaryNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1134 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1134 def visit_imaginary_node(node); end # Inspect a ImplicitNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1143 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1143 def visit_implicit_node(node); end # Inspect a ImplicitRestNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1152 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1152 def visit_implicit_rest_node(node); end # Inspect a InNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1159 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1159 def visit_in_node(node); end # Inspect a IndexAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1176 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1176 def visit_index_and_write_node(node); end # Inspect a IndexOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1207 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1207 def visit_index_operator_write_node(node); end # Inspect a IndexOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1239 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1239 def visit_index_or_write_node(node); end # Inspect a IndexTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1270 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1270 def visit_index_target_node(node); end # Inspect a InstanceVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1293 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1293 def visit_instance_variable_and_write_node(node); end # Inspect a InstanceVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1305 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1305 def visit_instance_variable_operator_write_node(node); end # Inspect a InstanceVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1318 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1318 def visit_instance_variable_or_write_node(node); end # Inspect a InstanceVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1330 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1330 def visit_instance_variable_read_node(node); end # Inspect a InstanceVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1338 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1338 def visit_instance_variable_target_node(node); end # Inspect a InstanceVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1346 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1346 def visit_instance_variable_write_node(node); end # Inspect a IntegerNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1358 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1358 def visit_integer_node(node); end # Inspect a InterpolatedMatchLastLineNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1366 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1366 def visit_interpolated_match_last_line_node(node); end # Inspect a InterpolatedRegularExpressionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1384 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1384 def visit_interpolated_regular_expression_node(node); end # Inspect a InterpolatedStringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1402 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1402 def visit_interpolated_string_node(node); end # Inspect a InterpolatedSymbolNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1420 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1420 def visit_interpolated_symbol_node(node); end # Inspect a InterpolatedXStringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1438 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1438 def visit_interpolated_x_string_node(node); end # Inspect a ItLocalVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1456 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1456 def visit_it_local_variable_read_node(node); end # Inspect a ItParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1463 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1463 def visit_it_parameters_node(node); end # Inspect a KeywordHashNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1470 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1470 def visit_keyword_hash_node(node); end # Inspect a KeywordRestParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1486 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1486 def visit_keyword_rest_parameter_node(node); end # Inspect a LambdaNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1500 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1500 def visit_lambda_node(node); end # Inspect a LocalVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1523 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1523 def visit_local_variable_and_write_node(node); end # Inspect a LocalVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1536 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1536 def visit_local_variable_operator_write_node(node); end # Inspect a LocalVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1550 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1550 def visit_local_variable_or_write_node(node); end # Inspect a LocalVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1563 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1563 def visit_local_variable_read_node(node); end # Inspect a LocalVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1572 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1572 def visit_local_variable_target_node(node); end # Inspect a LocalVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1581 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1581 def visit_local_variable_write_node(node); end # Inspect a MatchLastLineNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1594 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1594 def visit_match_last_line_node(node); end # Inspect a MatchPredicateNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1605 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1605 def visit_match_predicate_node(node); end # Inspect a MatchRequiredNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1617 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1617 def visit_match_required_node(node); end # Inspect a MatchWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1629 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1629 def visit_match_write_node(node); end # Inspect a MissingNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1647 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1647 def visit_missing_node(node); end # Inspect a ModuleNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1654 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1654 def visit_module_node(node); end # Inspect a MultiTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1673 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1673 def visit_multi_target_node(node); end # Inspect a MultiWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1706 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1706 def visit_multi_write_node(node); end # Inspect a NextNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1742 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1742 def visit_next_node(node); end # Inspect a NilNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1756 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1756 def visit_nil_node(node); end # Inspect a NoKeywordsParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1763 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1763 def visit_no_keywords_parameter_node(node); end # Inspect a NumberedParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1772 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1772 def visit_numbered_parameters_node(node); end # Inspect a NumberedReferenceReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1780 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1780 def visit_numbered_reference_read_node(node); end # Inspect a OptionalKeywordParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1788 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1788 def visit_optional_keyword_parameter_node(node); end # Inspect a OptionalParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1799 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1799 def visit_optional_parameter_node(node); end # Inspect a OrNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1811 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1811 def visit_or_node(node); end # Inspect a ParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1823 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1823 def visit_parameters_node(node); end # Inspect a ParenthesesNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1884 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1884 def visit_parentheses_node(node); end # Inspect a PinnedExpressionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1899 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1899 def visit_pinned_expression_node(node); end # Inspect a PinnedVariableNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1911 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1911 def visit_pinned_variable_node(node); end # Inspect a PostExecutionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1921 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1921 def visit_post_execution_node(node); end # Inspect a PreExecutionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1937 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1937 def visit_pre_execution_node(node); end # Inspect a ProgramNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1953 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1953 def visit_program_node(node); end # Inspect a RangeNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1963 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1963 def visit_range_node(node); end # Inspect a RationalNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1983 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1983 def visit_rational_node(node); end # Inspect a RedoNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1992 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1992 def visit_redo_node(node); end # Inspect a RegularExpressionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1999 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1999 def visit_regular_expression_node(node); end # Inspect a RequiredKeywordParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2010 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2010 def visit_required_keyword_parameter_node(node); end # Inspect a RequiredParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2019 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2019 def visit_required_parameter_node(node); end # Inspect a RescueModifierNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2027 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2027 def visit_rescue_modifier_node(node); end # Inspect a RescueNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2039 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2039 def visit_rescue_node(node); end # Inspect a RestParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2076 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2076 def visit_rest_parameter_node(node); end # Inspect a RetryNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2090 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2090 def visit_retry_node(node); end # Inspect a ReturnNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2097 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2097 def visit_return_node(node); end # Inspect a SelfNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2111 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2111 def visit_self_node(node); end # Inspect a ShareableConstantNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2118 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2118 def visit_shareable_constant_node(node); end # Inspect a SingletonClassNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2127 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2127 def visit_singleton_class_node(node); end # Inspect a SourceEncodingNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2146 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2146 def visit_source_encoding_node(node); end # Inspect a SourceFileNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2153 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2153 def visit_source_file_node(node); end # Inspect a SourceLineNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2161 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2161 def visit_source_line_node(node); end # Inspect a SplatNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2168 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2168 def visit_splat_node(node); end # Inspect a StatementsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2182 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2182 def visit_statements_node(node); end # Inspect a StringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2198 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2198 def visit_string_node(node); end # Inspect a SuperNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2209 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2209 def visit_super_node(node); end # Inspect a SymbolNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2231 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2231 def visit_symbol_node(node); end # Inspect a TrueNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2242 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2242 def visit_true_node(node); end # Inspect a UndefNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2249 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2249 def visit_undef_node(node); end # Inspect a UnlessNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2266 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2266 def visit_unless_node(node); end # Inspect a UntilNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2290 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2290 def visit_until_node(node); end # Inspect a WhenNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2308 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2308 def visit_when_node(node); end # Inspect a WhileNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2332 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2332 def visit_while_node(node); end # Inspect a XStringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2350 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2350 def visit_x_string_node(node); end # Inspect a YieldNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2361 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2361 def visit_yield_node(node); end private # Compose a string representing the given inner location field. # - # source://prism//lib/prism/inspect_visitor.rb#2385 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2385 def inspect_location(location); end # Compose a header for the given node. # - # source://prism//lib/prism/inspect_visitor.rb#2379 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2379 def inspect_node(name, node); end class << self # Compose an inspect string for the given node. # - # source://prism//lib/prism/inspect_visitor.rb#44 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:44 sig { params(node: Prism::Node).returns(String) } def compose(node); end end @@ -20511,14 +20099,12 @@ end # when we hit an element in that list. In this case, we have a special # command that replaces the subsequent indent with the given value. # -# source://prism//lib/prism/inspect_visitor.rb#20 +# pkg:gem/prism#lib/prism/inspect_visitor.rb:20 class Prism::InspectVisitor::Replace - # @return [Replace] a new instance of Replace - # - # source://prism//lib/prism/inspect_visitor.rb#23 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:23 def initialize(value); end - # source://prism//lib/prism/inspect_visitor.rb#21 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:21 def value; end end @@ -20527,13 +20113,11 @@ end # @target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10486 +# pkg:gem/prism#lib/prism/node.rb:10486 class Prism::InstanceVariableAndWriteNode < ::Prism::Node # Initialize a new InstanceVariableAndWriteNode node. # - # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#10488 + # pkg:gem/prism#lib/prism/node.rb:10488 sig do params( source: Prism::Source, @@ -20551,36 +20135,36 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10593 + # pkg:gem/prism#lib/prism/node.rb:10593 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10500 + # pkg:gem/prism#lib/prism/node.rb:10500 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10505 + # pkg:gem/prism#lib/prism/node.rb:10505 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10522 + # pkg:gem/prism#lib/prism/node.rb:10522 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10517 + # pkg:gem/prism#lib/prism/node.rb:10517 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#10527 + # pkg:gem/prism#lib/prism/node.rb:10527 sig do params( node_id: Integer, @@ -20594,27 +20178,24 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10505 + # pkg:gem/prism#lib/prism/node.rb:10532 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#10535 + # pkg:gem/prism#lib/prism/node.rb:10535 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#219 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:219 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#10510 + # pkg:gem/prism#lib/prism/node.rb:10510 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -20622,62 +20203,62 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10577 + # pkg:gem/prism#lib/prism/node.rb:10577 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10540 + # pkg:gem/prism#lib/prism/node.rb:10540 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10543 + # pkg:gem/prism#lib/prism/node.rb:10543 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10572 + # pkg:gem/prism#lib/prism/node.rb:10572 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10556 + # pkg:gem/prism#lib/prism/node.rb:10556 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10551 + # pkg:gem/prism#lib/prism/node.rb:10551 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10564 + # pkg:gem/prism#lib/prism/node.rb:10564 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10582 + # pkg:gem/prism#lib/prism/node.rb:10582 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10569 + # pkg:gem/prism#lib/prism/node.rb:10569 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10587 + # pkg:gem/prism#lib/prism/node.rb:10587 def type; end end end @@ -20687,13 +20268,11 @@ end # @target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10606 +# pkg:gem/prism#lib/prism/node.rb:10606 class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # Initialize a new InstanceVariableOperatorWriteNode node. # - # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#10608 + # pkg:gem/prism#lib/prism/node.rb:10608 sig do params( source: Prism::Source, @@ -20712,48 +20291,48 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10712 + # pkg:gem/prism#lib/prism/node.rb:10712 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10621 + # pkg:gem/prism#lib/prism/node.rb:10621 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#10693 + # pkg:gem/prism#lib/prism/node.rb:10693 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#10677 + # pkg:gem/prism#lib/prism/node.rb:10677 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10626 + # pkg:gem/prism#lib/prism/node.rb:10626 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10643 + # pkg:gem/prism#lib/prism/node.rb:10643 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10638 + # pkg:gem/prism#lib/prism/node.rb:10638 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#10648 + # pkg:gem/prism#lib/prism/node.rb:10648 sig do params( node_id: Integer, @@ -20768,27 +20347,24 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10626 + # pkg:gem/prism#lib/prism/node.rb:10653 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#10656 + # pkg:gem/prism#lib/prism/node.rb:10656 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#231 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:231 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#10631 + # pkg:gem/prism#lib/prism/node.rb:10631 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -20796,62 +20372,62 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10696 + # pkg:gem/prism#lib/prism/node.rb:10696 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10661 + # pkg:gem/prism#lib/prism/node.rb:10661 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10664 + # pkg:gem/prism#lib/prism/node.rb:10664 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#438 + # pkg:gem/prism#lib/prism/node_ext.rb:438 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#445 + # pkg:gem/prism#lib/prism/node_ext.rb:445 def operator_loc; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10685 + # pkg:gem/prism#lib/prism/node.rb:10685 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10672 + # pkg:gem/prism#lib/prism/node.rb:10672 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10701 + # pkg:gem/prism#lib/prism/node.rb:10701 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10690 + # pkg:gem/prism#lib/prism/node.rb:10690 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10706 + # pkg:gem/prism#lib/prism/node.rb:10706 def type; end end end @@ -20861,13 +20437,11 @@ end # @target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10726 +# pkg:gem/prism#lib/prism/node.rb:10726 class Prism::InstanceVariableOrWriteNode < ::Prism::Node # Initialize a new InstanceVariableOrWriteNode node. # - # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#10728 + # pkg:gem/prism#lib/prism/node.rb:10728 sig do params( source: Prism::Source, @@ -20885,36 +20459,36 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10833 + # pkg:gem/prism#lib/prism/node.rb:10833 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10740 + # pkg:gem/prism#lib/prism/node.rb:10740 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10745 + # pkg:gem/prism#lib/prism/node.rb:10745 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10762 + # pkg:gem/prism#lib/prism/node.rb:10762 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10757 + # pkg:gem/prism#lib/prism/node.rb:10757 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#10767 + # pkg:gem/prism#lib/prism/node.rb:10767 sig do params( node_id: Integer, @@ -20928,27 +20502,24 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10745 + # pkg:gem/prism#lib/prism/node.rb:10772 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#10775 + # pkg:gem/prism#lib/prism/node.rb:10775 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#225 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:225 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#10750 + # pkg:gem/prism#lib/prism/node.rb:10750 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -20956,62 +20527,62 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10817 + # pkg:gem/prism#lib/prism/node.rb:10817 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10780 + # pkg:gem/prism#lib/prism/node.rb:10780 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10783 + # pkg:gem/prism#lib/prism/node.rb:10783 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10812 + # pkg:gem/prism#lib/prism/node.rb:10812 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10796 + # pkg:gem/prism#lib/prism/node.rb:10796 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10791 + # pkg:gem/prism#lib/prism/node.rb:10791 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10804 + # pkg:gem/prism#lib/prism/node.rb:10804 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10822 + # pkg:gem/prism#lib/prism/node.rb:10822 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10809 + # pkg:gem/prism#lib/prism/node.rb:10809 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10827 + # pkg:gem/prism#lib/prism/node.rb:10827 def type; end end end @@ -21021,49 +20592,47 @@ end # @foo # ^^^^ # -# source://prism//lib/prism/node.rb#10846 +# pkg:gem/prism#lib/prism/node.rb:10846 class Prism::InstanceVariableReadNode < ::Prism::Node # Initialize a new InstanceVariableReadNode node. # - # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode - # - # source://prism//lib/prism/node.rb#10848 + # pkg:gem/prism#lib/prism/node.rb:10848 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10919 + # pkg:gem/prism#lib/prism/node.rb:10919 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10857 + # pkg:gem/prism#lib/prism/node.rb:10857 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10862 + # pkg:gem/prism#lib/prism/node.rb:10862 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10878 + # pkg:gem/prism#lib/prism/node.rb:10878 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10873 + # pkg:gem/prism#lib/prism/node.rb:10873 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableReadNode # - # source://prism//lib/prism/node.rb#10883 + # pkg:gem/prism#lib/prism/node.rb:10883 sig do params( node_id: Integer, @@ -21074,22 +20643,21 @@ class Prism::InstanceVariableReadNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10862 + # pkg:gem/prism#lib/prism/node.rb:10888 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#10891 + # pkg:gem/prism#lib/prism/node.rb:10891 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#10867 + # pkg:gem/prism#lib/prism/node.rb:10867 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21097,7 +20665,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10903 + # pkg:gem/prism#lib/prism/node.rb:10903 sig { override.returns(String) } def inspect; end @@ -21107,20 +20675,20 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # @_test # name `:@_test` # - # source://prism//lib/prism/node.rb#10900 + # pkg:gem/prism#lib/prism/node.rb:10900 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10908 + # pkg:gem/prism#lib/prism/node.rb:10908 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10913 + # pkg:gem/prism#lib/prism/node.rb:10913 def type; end end end @@ -21130,49 +20698,47 @@ end # @foo, @bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#10929 +# pkg:gem/prism#lib/prism/node.rb:10929 class Prism::InstanceVariableTargetNode < ::Prism::Node # Initialize a new InstanceVariableTargetNode node. # - # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode - # - # source://prism//lib/prism/node.rb#10931 + # pkg:gem/prism#lib/prism/node.rb:10931 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10998 + # pkg:gem/prism#lib/prism/node.rb:10998 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10940 + # pkg:gem/prism#lib/prism/node.rb:10940 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10945 + # pkg:gem/prism#lib/prism/node.rb:10945 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10961 + # pkg:gem/prism#lib/prism/node.rb:10961 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10956 + # pkg:gem/prism#lib/prism/node.rb:10956 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableTargetNode # - # source://prism//lib/prism/node.rb#10966 + # pkg:gem/prism#lib/prism/node.rb:10966 sig do params( node_id: Integer, @@ -21183,22 +20749,21 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10945 + # pkg:gem/prism#lib/prism/node.rb:10971 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#10974 + # pkg:gem/prism#lib/prism/node.rb:10974 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#10950 + # pkg:gem/prism#lib/prism/node.rb:10950 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21206,26 +20771,26 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10982 + # pkg:gem/prism#lib/prism/node.rb:10982 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10979 + # pkg:gem/prism#lib/prism/node.rb:10979 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10987 + # pkg:gem/prism#lib/prism/node.rb:10987 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10992 + # pkg:gem/prism#lib/prism/node.rb:10992 def type; end end end @@ -21235,13 +20800,11 @@ end # @foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#11008 +# pkg:gem/prism#lib/prism/node.rb:11008 class Prism::InstanceVariableWriteNode < ::Prism::Node # Initialize a new InstanceVariableWriteNode node. # - # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode - # - # source://prism//lib/prism/node.rb#11010 + # pkg:gem/prism#lib/prism/node.rb:11010 sig do params( source: Prism::Source, @@ -21259,36 +20822,36 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11131 + # pkg:gem/prism#lib/prism/node.rb:11131 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11022 + # pkg:gem/prism#lib/prism/node.rb:11022 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11027 + # pkg:gem/prism#lib/prism/node.rb:11027 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11044 + # pkg:gem/prism#lib/prism/node.rb:11044 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11039 + # pkg:gem/prism#lib/prism/node.rb:11039 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> InstanceVariableWriteNode # - # source://prism//lib/prism/node.rb#11049 + # pkg:gem/prism#lib/prism/node.rb:11049 sig do params( node_id: Integer, @@ -21302,24 +20865,21 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11027 + # pkg:gem/prism#lib/prism/node.rb:11054 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#11057 + # pkg:gem/prism#lib/prism/node.rb:11057 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#11032 + # pkg:gem/prism#lib/prism/node.rb:11032 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21327,7 +20887,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11115 + # pkg:gem/prism#lib/prism/node.rb:11115 sig { override.returns(String) } def inspect; end @@ -21337,7 +20897,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # @_foo = "bar" # name `@_foo` # - # source://prism//lib/prism/node.rb#11066 + # pkg:gem/prism#lib/prism/node.rb:11066 sig { returns(Symbol) } def name; end @@ -21346,13 +20906,13 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1 # ^^^ # - # source://prism//lib/prism/node.rb#11072 + # pkg:gem/prism#lib/prism/node.rb:11072 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11110 + # pkg:gem/prism#lib/prism/node.rb:11110 sig { returns(String) } def operator; end @@ -21361,25 +20921,25 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @x = y # ^ # - # source://prism//lib/prism/node.rb#11097 + # pkg:gem/prism#lib/prism/node.rb:11097 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11080 + # pkg:gem/prism#lib/prism/node.rb:11080 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11105 + # pkg:gem/prism#lib/prism/node.rb:11105 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11120 + # pkg:gem/prism#lib/prism/node.rb:11120 sig { override.returns(Symbol) } def type; end @@ -21391,41 +20951,41 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1234 # ^^^^ # - # source://prism//lib/prism/node.rb#11091 + # pkg:gem/prism#lib/prism/node.rb:11091 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11125 + # pkg:gem/prism#lib/prism/node.rb:11125 def type; end end end # Flags for integer nodes that correspond to the base of the integer. # -# source://prism//lib/prism/node.rb#19828 +# pkg:gem/prism#lib/prism/node.rb:19828 module Prism::IntegerBaseFlags; end # 0b prefix # -# source://prism//lib/prism/node.rb#19830 +# pkg:gem/prism#lib/prism/node.rb:19830 Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) # 0d or no prefix # -# source://prism//lib/prism/node.rb#19833 +# pkg:gem/prism#lib/prism/node.rb:19833 Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) # 0x prefix # -# source://prism//lib/prism/node.rb#19839 +# pkg:gem/prism#lib/prism/node.rb:19839 Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) # 0o or 0 prefix # -# source://prism//lib/prism/node.rb#19836 +# pkg:gem/prism#lib/prism/node.rb:19836 Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # Represents an integer number literal. @@ -21433,13 +20993,11 @@ Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # 1 # ^ # -# source://prism//lib/prism/node.rb#11144 +# pkg:gem/prism#lib/prism/node.rb:11144 class Prism::IntegerNode < ::Prism::Node # Initialize a new IntegerNode node. # - # @return [IntegerNode] a new instance of IntegerNode - # - # source://prism//lib/prism/node.rb#11146 + # pkg:gem/prism#lib/prism/node.rb:11146 sig do params( source: Prism::Source, @@ -21454,44 +21012,42 @@ class Prism::IntegerNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11233 + # pkg:gem/prism#lib/prism/node.rb:11233 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11155 + # pkg:gem/prism#lib/prism/node.rb:11155 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def binary?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11194 + # pkg:gem/prism#lib/prism/node.rb:11194 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11160 + # pkg:gem/prism#lib/prism/node.rb:11160 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11176 + # pkg:gem/prism#lib/prism/node.rb:11176 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11171 + # pkg:gem/prism#lib/prism/node.rb:11171 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Integer) -> IntegerNode # - # source://prism//lib/prism/node.rb#11181 + # pkg:gem/prism#lib/prism/node.rb:11181 sig do params( node_id: Integer, @@ -21504,28 +21060,25 @@ class Prism::IntegerNode < ::Prism::Node # def decimal?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11199 + # pkg:gem/prism#lib/prism/node.rb:11199 sig { returns(T::Boolean) } def decimal?; end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11160 + # pkg:gem/prism#lib/prism/node.rb:11186 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Integer } # - # source://prism//lib/prism/node.rb#11189 + # pkg:gem/prism#lib/prism/node.rb:11189 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#11165 + # pkg:gem/prism#lib/prism/node.rb:11165 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21533,42 +21086,38 @@ class Prism::IntegerNode < ::Prism::Node # def hexadecimal?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11209 + # pkg:gem/prism#lib/prism/node.rb:11209 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#11217 + # pkg:gem/prism#lib/prism/node.rb:11217 sig { override.returns(String) } def inspect; end # def octal?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11204 + # pkg:gem/prism#lib/prism/node.rb:11204 sig { returns(T::Boolean) } def octal?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11222 + # pkg:gem/prism#lib/prism/node.rb:11222 sig { override.returns(Symbol) } def type; end # The value of the integer literal as a number. # - # source://prism//lib/prism/node.rb#11214 + # pkg:gem/prism#lib/prism/node.rb:11214 sig { returns(Integer) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11227 + # pkg:gem/prism#lib/prism/node.rb:11227 def type; end end end @@ -21578,15 +21127,13 @@ end # if /foo #{bar} baz/ then end # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11244 +# pkg:gem/prism#lib/prism/node.rb:11244 class Prism::InterpolatedMatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions # Initialize a new InterpolatedMatchLastLineNode node. # - # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode - # - # source://prism//lib/prism/node.rb#11246 + # pkg:gem/prism#lib/prism/node.rb:11246 sig do params( source: Prism::Source, @@ -21603,56 +21150,54 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11407 + # pkg:gem/prism#lib/prism/node.rb:11407 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11257 + # pkg:gem/prism#lib/prism/node.rb:11257 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def ascii_8bit?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11322 + # pkg:gem/prism#lib/prism/node.rb:11322 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11262 + # pkg:gem/prism#lib/prism/node.rb:11262 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11386 + # pkg:gem/prism#lib/prism/node.rb:11386 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11368 + # pkg:gem/prism#lib/prism/node.rb:11368 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11279 + # pkg:gem/prism#lib/prism/node.rb:11279 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11274 + # pkg:gem/prism#lib/prism/node.rb:11274 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#11284 + # pkg:gem/prism#lib/prism/node.rb:11284 sig do params( node_id: Integer, @@ -21665,37 +21210,32 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11262 + # pkg:gem/prism#lib/prism/node.rb:11289 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#11292 + # pkg:gem/prism#lib/prism/node.rb:11292 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#11267 + # pkg:gem/prism#lib/prism/node.rb:11267 def each_child_node; end # def euc_jp?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11317 + # pkg:gem/prism#lib/prism/node.rb:11317 sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11302 + # pkg:gem/prism#lib/prism/node.rb:11302 sig { returns(T::Boolean) } def extended?; end @@ -21704,70 +21244,58 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11342 + # pkg:gem/prism#lib/prism/node.rb:11342 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11347 + # pkg:gem/prism#lib/prism/node.rb:11347 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11337 + # pkg:gem/prism#lib/prism/node.rb:11337 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def ignore_case?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11297 + # pkg:gem/prism#lib/prism/node.rb:11297 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#11391 + # pkg:gem/prism#lib/prism/node.rb:11391 sig { override.returns(String) } def inspect; end # def multi_line?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11307 + # pkg:gem/prism#lib/prism/node.rb:11307 sig { returns(T::Boolean) } def multi_line?; end - # source://prism//lib/prism/parse_result/newlines.rb#122 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:122 def newline_flag!(lines); end # def once?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11312 + # pkg:gem/prism#lib/prism/node.rb:11312 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11381 + # pkg:gem/prism#lib/prism/node.rb:11381 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11352 + # pkg:gem/prism#lib/prism/node.rb:11352 sig { returns(Prism::Location) } def opening_loc; end @@ -21776,48 +21304,44 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11365 + # pkg:gem/prism#lib/prism/node.rb:11365 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11376 + # pkg:gem/prism#lib/prism/node.rb:11376 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11360 + # pkg:gem/prism#lib/prism/node.rb:11360 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11396 + # pkg:gem/prism#lib/prism/node.rb:11396 sig { override.returns(Symbol) } def type; end # def utf_8?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11332 + # pkg:gem/prism#lib/prism/node.rb:11332 sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11327 + # pkg:gem/prism#lib/prism/node.rb:11327 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11401 + # pkg:gem/prism#lib/prism/node.rb:11401 def type; end end end @@ -21827,15 +21351,13 @@ end # /foo #{bar} baz/ # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11421 +# pkg:gem/prism#lib/prism/node.rb:11421 class Prism::InterpolatedRegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions # Initialize a new InterpolatedRegularExpressionNode node. # - # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode - # - # source://prism//lib/prism/node.rb#11423 + # pkg:gem/prism#lib/prism/node.rb:11423 sig do params( source: Prism::Source, @@ -21852,56 +21374,54 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11584 + # pkg:gem/prism#lib/prism/node.rb:11584 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11434 + # pkg:gem/prism#lib/prism/node.rb:11434 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def ascii_8bit?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11499 + # pkg:gem/prism#lib/prism/node.rb:11499 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11439 + # pkg:gem/prism#lib/prism/node.rb:11439 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11563 + # pkg:gem/prism#lib/prism/node.rb:11563 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11545 + # pkg:gem/prism#lib/prism/node.rb:11545 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11456 + # pkg:gem/prism#lib/prism/node.rb:11456 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11451 + # pkg:gem/prism#lib/prism/node.rb:11451 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#11461 + # pkg:gem/prism#lib/prism/node.rb:11461 sig do params( node_id: Integer, @@ -21914,37 +21434,32 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11439 + # pkg:gem/prism#lib/prism/node.rb:11466 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#11469 + # pkg:gem/prism#lib/prism/node.rb:11469 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#11444 + # pkg:gem/prism#lib/prism/node.rb:11444 def each_child_node; end # def euc_jp?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11494 + # pkg:gem/prism#lib/prism/node.rb:11494 sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11479 + # pkg:gem/prism#lib/prism/node.rb:11479 sig { returns(T::Boolean) } def extended?; end @@ -21953,70 +21468,58 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11519 + # pkg:gem/prism#lib/prism/node.rb:11519 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11524 + # pkg:gem/prism#lib/prism/node.rb:11524 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11514 + # pkg:gem/prism#lib/prism/node.rb:11514 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def ignore_case?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11474 + # pkg:gem/prism#lib/prism/node.rb:11474 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#11568 + # pkg:gem/prism#lib/prism/node.rb:11568 sig { override.returns(String) } def inspect; end # def multi_line?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11484 + # pkg:gem/prism#lib/prism/node.rb:11484 sig { returns(T::Boolean) } def multi_line?; end - # source://prism//lib/prism/parse_result/newlines.rb#129 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:129 def newline_flag!(lines); end # def once?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11489 + # pkg:gem/prism#lib/prism/node.rb:11489 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11558 + # pkg:gem/prism#lib/prism/node.rb:11558 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11529 + # pkg:gem/prism#lib/prism/node.rb:11529 sig { returns(Prism::Location) } def opening_loc; end @@ -22025,48 +21528,44 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11542 + # pkg:gem/prism#lib/prism/node.rb:11542 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11553 + # pkg:gem/prism#lib/prism/node.rb:11553 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11537 + # pkg:gem/prism#lib/prism/node.rb:11537 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11573 + # pkg:gem/prism#lib/prism/node.rb:11573 sig { override.returns(Symbol) } def type; end # def utf_8?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11509 + # pkg:gem/prism#lib/prism/node.rb:11509 sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11504 + # pkg:gem/prism#lib/prism/node.rb:11504 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11578 + # pkg:gem/prism#lib/prism/node.rb:11578 def type; end end end @@ -22076,15 +21575,13 @@ end # "foo #{bar} baz" # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11598 +# pkg:gem/prism#lib/prism/node.rb:11598 class Prism::InterpolatedStringNode < ::Prism::Node include ::Prism::HeredocQuery # Initialize a new InterpolatedStringNode node. # - # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode - # - # source://prism//lib/prism/node.rb#11600 + # pkg:gem/prism#lib/prism/node.rb:11600 sig do params( source: Prism::Source, @@ -22101,48 +21598,48 @@ class Prism::InterpolatedStringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11728 + # pkg:gem/prism#lib/prism/node.rb:11728 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11611 + # pkg:gem/prism#lib/prism/node.rb:11611 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11616 + # pkg:gem/prism#lib/prism/node.rb:11616 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11707 + # pkg:gem/prism#lib/prism/node.rb:11707 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11683 + # pkg:gem/prism#lib/prism/node.rb:11683 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11633 + # pkg:gem/prism#lib/prism/node.rb:11633 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11628 + # pkg:gem/prism#lib/prism/node.rb:11628 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode], ?closing_loc: Location?) -> InterpolatedStringNode # - # source://prism//lib/prism/node.rb#11638 + # pkg:gem/prism#lib/prism/node.rb:11638 sig do params( node_id: Integer, @@ -22155,22 +21652,21 @@ class Prism::InterpolatedStringNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11616 + # pkg:gem/prism#lib/prism/node.rb:11643 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode], closing_loc: Location? } # - # source://prism//lib/prism/node.rb#11646 + # pkg:gem/prism#lib/prism/node.rb:11646 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#11621 + # pkg:gem/prism#lib/prism/node.rb:11621 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22178,9 +21674,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # def frozen?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11651 + # pkg:gem/prism#lib/prism/node.rb:11651 sig { returns(T::Boolean) } def frozen?; end @@ -22189,36 +21683,34 @@ class Prism::InterpolatedStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11712 + # pkg:gem/prism#lib/prism/node.rb:11712 sig { override.returns(String) } def inspect; end # def mutable?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11656 + # pkg:gem/prism#lib/prism/node.rb:11656 sig { returns(T::Boolean) } def mutable?; end - # source://prism//lib/prism/parse_result/newlines.rb#136 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:136 def newline_flag!(lines); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11702 + # pkg:gem/prism#lib/prism/node.rb:11702 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11661 + # pkg:gem/prism#lib/prism/node.rb:11661 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode] # - # source://prism//lib/prism/node.rb#11680 + # pkg:gem/prism#lib/prism/node.rb:11680 sig do returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode, Prism::InterpolatedXStringNode, Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) end @@ -22227,38 +21719,38 @@ class Prism::InterpolatedStringNode < ::Prism::Node # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11697 + # pkg:gem/prism#lib/prism/node.rb:11697 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11675 + # pkg:gem/prism#lib/prism/node.rb:11675 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11717 + # pkg:gem/prism#lib/prism/node.rb:11717 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11722 + # pkg:gem/prism#lib/prism/node.rb:11722 def type; end end end # Flags for interpolated string nodes that indicated mutability if they are also marked as literals. # -# source://prism//lib/prism/node.rb#19843 +# pkg:gem/prism#lib/prism/node.rb:19843 module Prism::InterpolatedStringNodeFlags; end -# source://prism//lib/prism/node.rb#19845 +# pkg:gem/prism#lib/prism/node.rb:19845 Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#19848 +# pkg:gem/prism#lib/prism/node.rb:19848 Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # Represents a symbol literal that contains interpolation. @@ -22266,13 +21758,11 @@ Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # :"foo #{bar} baz" # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11742 +# pkg:gem/prism#lib/prism/node.rb:11742 class Prism::InterpolatedSymbolNode < ::Prism::Node # Initialize a new InterpolatedSymbolNode node. # - # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode - # - # source://prism//lib/prism/node.rb#11744 + # pkg:gem/prism#lib/prism/node.rb:11744 sig do params( source: Prism::Source, @@ -22289,48 +21779,48 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11862 + # pkg:gem/prism#lib/prism/node.rb:11862 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11755 + # pkg:gem/prism#lib/prism/node.rb:11755 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11760 + # pkg:gem/prism#lib/prism/node.rb:11760 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11841 + # pkg:gem/prism#lib/prism/node.rb:11841 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11817 + # pkg:gem/prism#lib/prism/node.rb:11817 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11777 + # pkg:gem/prism#lib/prism/node.rb:11777 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11772 + # pkg:gem/prism#lib/prism/node.rb:11772 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?) -> InterpolatedSymbolNode # - # source://prism//lib/prism/node.rb#11782 + # pkg:gem/prism#lib/prism/node.rb:11782 sig do params( node_id: Integer, @@ -22343,22 +21833,21 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11760 + # pkg:gem/prism#lib/prism/node.rb:11787 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location? } # - # source://prism//lib/prism/node.rb#11790 + # pkg:gem/prism#lib/prism/node.rb:11790 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#11765 + # pkg:gem/prism#lib/prism/node.rb:11765 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22366,53 +21855,53 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11846 + # pkg:gem/prism#lib/prism/node.rb:11846 sig { override.returns(String) } def inspect; end - # source://prism//lib/prism/parse_result/newlines.rb#143 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:143 def newline_flag!(lines); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11836 + # pkg:gem/prism#lib/prism/node.rb:11836 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11795 + # pkg:gem/prism#lib/prism/node.rb:11795 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11814 + # pkg:gem/prism#lib/prism/node.rb:11814 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11831 + # pkg:gem/prism#lib/prism/node.rb:11831 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11809 + # pkg:gem/prism#lib/prism/node.rb:11809 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11851 + # pkg:gem/prism#lib/prism/node.rb:11851 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11856 + # pkg:gem/prism#lib/prism/node.rb:11856 def type; end end end @@ -22422,15 +21911,13 @@ end # `foo #{bar} baz` # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11875 +# pkg:gem/prism#lib/prism/node.rb:11875 class Prism::InterpolatedXStringNode < ::Prism::Node include ::Prism::HeredocQuery # Initialize a new InterpolatedXStringNode node. # - # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode - # - # source://prism//lib/prism/node.rb#11877 + # pkg:gem/prism#lib/prism/node.rb:11877 sig do params( source: Prism::Source, @@ -22447,48 +21934,48 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11983 + # pkg:gem/prism#lib/prism/node.rb:11983 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11888 + # pkg:gem/prism#lib/prism/node.rb:11888 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11893 + # pkg:gem/prism#lib/prism/node.rb:11893 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11962 + # pkg:gem/prism#lib/prism/node.rb:11962 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11944 + # pkg:gem/prism#lib/prism/node.rb:11944 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11910 + # pkg:gem/prism#lib/prism/node.rb:11910 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11905 + # pkg:gem/prism#lib/prism/node.rb:11905 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#11915 + # pkg:gem/prism#lib/prism/node.rb:11915 sig do params( node_id: Integer, @@ -22501,22 +21988,21 @@ class Prism::InterpolatedXStringNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11893 + # pkg:gem/prism#lib/prism/node.rb:11920 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#11923 + # pkg:gem/prism#lib/prism/node.rb:11923 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#11898 + # pkg:gem/prism#lib/prism/node.rb:11898 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22527,53 +22013,53 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11967 + # pkg:gem/prism#lib/prism/node.rb:11967 sig { override.returns(String) } def inspect; end - # source://prism//lib/prism/parse_result/newlines.rb#150 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:150 def newline_flag!(lines); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11957 + # pkg:gem/prism#lib/prism/node.rb:11957 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11928 + # pkg:gem/prism#lib/prism/node.rb:11928 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11941 + # pkg:gem/prism#lib/prism/node.rb:11941 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11952 + # pkg:gem/prism#lib/prism/node.rb:11952 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11936 + # pkg:gem/prism#lib/prism/node.rb:11936 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11972 + # pkg:gem/prism#lib/prism/node.rb:11972 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11977 + # pkg:gem/prism#lib/prism/node.rb:11977 def type; end end end @@ -22583,68 +22069,65 @@ end # -> { it } # ^^ # -# source://prism//lib/prism/node.rb#11996 +# pkg:gem/prism#lib/prism/node.rb:11996 class Prism::ItLocalVariableReadNode < ::Prism::Node # Initialize a new ItLocalVariableReadNode node. # - # @return [ItLocalVariableReadNode] a new instance of ItLocalVariableReadNode - # - # source://prism//lib/prism/node.rb#11998 + # pkg:gem/prism#lib/prism/node.rb:11998 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12061 + # pkg:gem/prism#lib/prism/node.rb:12061 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12006 + # pkg:gem/prism#lib/prism/node.rb:12006 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12011 + # pkg:gem/prism#lib/prism/node.rb:12011 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12027 + # pkg:gem/prism#lib/prism/node.rb:12027 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12022 + # pkg:gem/prism#lib/prism/node.rb:12022 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItLocalVariableReadNode # - # source://prism//lib/prism/node.rb#12032 + # pkg:gem/prism#lib/prism/node.rb:12032 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItLocalVariableReadNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12011 + # pkg:gem/prism#lib/prism/node.rb:12037 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#12040 + # pkg:gem/prism#lib/prism/node.rb:12040 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#12016 + # pkg:gem/prism#lib/prism/node.rb:12016 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22652,20 +22135,20 @@ class Prism::ItLocalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12045 + # pkg:gem/prism#lib/prism/node.rb:12045 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12050 + # pkg:gem/prism#lib/prism/node.rb:12050 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12055 + # pkg:gem/prism#lib/prism/node.rb:12055 def type; end end end @@ -22675,68 +22158,65 @@ end # -> { it + it } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12070 +# pkg:gem/prism#lib/prism/node.rb:12070 class Prism::ItParametersNode < ::Prism::Node # Initialize a new ItParametersNode node. # - # @return [ItParametersNode] a new instance of ItParametersNode - # - # source://prism//lib/prism/node.rb#12072 + # pkg:gem/prism#lib/prism/node.rb:12072 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12135 + # pkg:gem/prism#lib/prism/node.rb:12135 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12080 + # pkg:gem/prism#lib/prism/node.rb:12080 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12085 + # pkg:gem/prism#lib/prism/node.rb:12085 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12101 + # pkg:gem/prism#lib/prism/node.rb:12101 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12096 + # pkg:gem/prism#lib/prism/node.rb:12096 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItParametersNode # - # source://prism//lib/prism/node.rb#12106 + # pkg:gem/prism#lib/prism/node.rb:12106 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItParametersNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12085 + # pkg:gem/prism#lib/prism/node.rb:12111 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#12114 + # pkg:gem/prism#lib/prism/node.rb:12114 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#12090 + # pkg:gem/prism#lib/prism/node.rb:12090 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22744,20 +22224,20 @@ class Prism::ItParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12119 + # pkg:gem/prism#lib/prism/node.rb:12119 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12124 + # pkg:gem/prism#lib/prism/node.rb:12124 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12129 + # pkg:gem/prism#lib/prism/node.rb:12129 def type; end end end @@ -22767,13 +22247,11 @@ end # foo(a: b) # ^^^^ # -# source://prism//lib/prism/node.rb#12144 +# pkg:gem/prism#lib/prism/node.rb:12144 class Prism::KeywordHashNode < ::Prism::Node # Initialize a new KeywordHashNode node. # - # @return [KeywordHashNode] a new instance of KeywordHashNode - # - # source://prism//lib/prism/node.rb#12146 + # pkg:gem/prism#lib/prism/node.rb:12146 sig do params( source: Prism::Source, @@ -22788,36 +22266,36 @@ class Prism::KeywordHashNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12219 + # pkg:gem/prism#lib/prism/node.rb:12219 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12155 + # pkg:gem/prism#lib/prism/node.rb:12155 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12160 + # pkg:gem/prism#lib/prism/node.rb:12160 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12177 + # pkg:gem/prism#lib/prism/node.rb:12177 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12172 + # pkg:gem/prism#lib/prism/node.rb:12172 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode]) -> KeywordHashNode # - # source://prism//lib/prism/node.rb#12182 + # pkg:gem/prism#lib/prism/node.rb:12182 sig do params( node_id: Integer, @@ -22828,27 +22306,26 @@ class Prism::KeywordHashNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12160 + # pkg:gem/prism#lib/prism/node.rb:12187 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[AssocNode | AssocSplatNode] } # - # source://prism//lib/prism/node.rb#12190 + # pkg:gem/prism#lib/prism/node.rb:12190 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#12165 + # pkg:gem/prism#lib/prism/node.rb:12165 def each_child_node; end # attr_reader elements: Array[AssocNode | AssocSplatNode] # - # source://prism//lib/prism/node.rb#12200 + # pkg:gem/prism#lib/prism/node.rb:12200 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end @@ -22857,40 +22334,38 @@ class Prism::KeywordHashNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12203 + # pkg:gem/prism#lib/prism/node.rb:12203 sig { override.returns(String) } def inspect; end # def symbol_keys?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12195 + # pkg:gem/prism#lib/prism/node.rb:12195 sig { returns(T::Boolean) } def symbol_keys?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12208 + # pkg:gem/prism#lib/prism/node.rb:12208 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12213 + # pkg:gem/prism#lib/prism/node.rb:12213 def type; end end end # Flags for keyword hash nodes. # -# source://prism//lib/prism/node.rb#19852 +# pkg:gem/prism#lib/prism/node.rb:19852 module Prism::KeywordHashNodeFlags; end # a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments # -# source://prism//lib/prism/node.rb#19854 +# pkg:gem/prism#lib/prism/node.rb:19854 Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # Represents a keyword rest parameter to a method, block, or lambda definition. @@ -22899,13 +22374,11 @@ Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # ^^^ # end # -# source://prism//lib/prism/node.rb#12232 +# pkg:gem/prism#lib/prism/node.rb:12232 class Prism::KeywordRestParameterNode < ::Prism::Node # Initialize a new KeywordRestParameterNode node. # - # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode - # - # source://prism//lib/prism/node.rb#12234 + # pkg:gem/prism#lib/prism/node.rb:12234 sig do params( source: Prism::Source, @@ -22922,36 +22395,36 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12345 + # pkg:gem/prism#lib/prism/node.rb:12345 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12245 + # pkg:gem/prism#lib/prism/node.rb:12245 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12250 + # pkg:gem/prism#lib/prism/node.rb:12250 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12266 + # pkg:gem/prism#lib/prism/node.rb:12266 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12261 + # pkg:gem/prism#lib/prism/node.rb:12261 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> KeywordRestParameterNode # - # source://prism//lib/prism/node.rb#12271 + # pkg:gem/prism#lib/prism/node.rb:12271 sig do params( node_id: Integer, @@ -22964,22 +22437,21 @@ class Prism::KeywordRestParameterNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12250 + # pkg:gem/prism#lib/prism/node.rb:12276 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#12279 + # pkg:gem/prism#lib/prism/node.rb:12279 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#12255 + # pkg:gem/prism#lib/prism/node.rb:12255 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22987,64 +22459,62 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12329 + # pkg:gem/prism#lib/prism/node.rb:12329 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#12289 + # pkg:gem/prism#lib/prism/node.rb:12289 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#12292 + # pkg:gem/prism#lib/prism/node.rb:12292 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12324 + # pkg:gem/prism#lib/prism/node.rb:12324 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12311 + # pkg:gem/prism#lib/prism/node.rb:12311 sig { returns(Prism::Location) } def operator_loc; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12284 + # pkg:gem/prism#lib/prism/node.rb:12284 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12306 + # pkg:gem/prism#lib/prism/node.rb:12306 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12319 + # pkg:gem/prism#lib/prism/node.rb:12319 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12334 + # pkg:gem/prism#lib/prism/node.rb:12334 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12339 + # pkg:gem/prism#lib/prism/node.rb:12339 def type; end end end @@ -23054,13 +22524,11 @@ end # ->(value) { value * 2 } # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12358 +# pkg:gem/prism#lib/prism/node.rb:12358 class Prism::LambdaNode < ::Prism::Node # Initialize a new LambdaNode node. # - # @return [LambdaNode] a new instance of LambdaNode - # - # source://prism//lib/prism/node.rb#12360 + # pkg:gem/prism#lib/prism/node.rb:12360 sig do params( source: Prism::Source, @@ -23080,54 +22548,54 @@ class Prism::LambdaNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12497 + # pkg:gem/prism#lib/prism/node.rb:12497 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12374 + # pkg:gem/prism#lib/prism/node.rb:12374 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#12463 + # pkg:gem/prism#lib/prism/node.rb:12463 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12379 + # pkg:gem/prism#lib/prism/node.rb:12379 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#12476 + # pkg:gem/prism#lib/prism/node.rb:12476 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#12447 + # pkg:gem/prism#lib/prism/node.rb:12447 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12400 + # pkg:gem/prism#lib/prism/node.rb:12400 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12392 + # pkg:gem/prism#lib/prism/node.rb:12392 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil) -> LambdaNode # - # source://prism//lib/prism/node.rb#12405 + # pkg:gem/prism#lib/prism/node.rb:12405 sig do params( node_id: Integer, @@ -23143,24 +22611,21 @@ class Prism::LambdaNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12379 + # pkg:gem/prism#lib/prism/node.rb:12410 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil } # - # source://prism//lib/prism/node.rb#12413 + # pkg:gem/prism#lib/prism/node.rb:12413 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [parameters] - # - # source://prism//lib/prism/node.rb#12384 + # pkg:gem/prism#lib/prism/node.rb:12384 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23168,74 +22633,74 @@ class Prism::LambdaNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12481 + # pkg:gem/prism#lib/prism/node.rb:12481 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#12418 + # pkg:gem/prism#lib/prism/node.rb:12418 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#12471 + # pkg:gem/prism#lib/prism/node.rb:12471 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#12434 + # pkg:gem/prism#lib/prism/node.rb:12434 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12466 + # pkg:gem/prism#lib/prism/node.rb:12466 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12421 + # pkg:gem/prism#lib/prism/node.rb:12421 sig { returns(Prism::Location) } def operator_loc; end # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil # - # source://prism//lib/prism/node.rb#12460 + # pkg:gem/prism#lib/prism/node.rb:12460 sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12455 + # pkg:gem/prism#lib/prism/node.rb:12455 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12442 + # pkg:gem/prism#lib/prism/node.rb:12442 def save_opening_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12429 + # pkg:gem/prism#lib/prism/node.rb:12429 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12486 + # pkg:gem/prism#lib/prism/node.rb:12486 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12491 + # pkg:gem/prism#lib/prism/node.rb:12491 def type; end end end @@ -23246,42 +22711,38 @@ end # generally lines up. However, there are a few cases that require special # handling. # -# source://prism//lib/prism/lex_compat.rb#10 +# pkg:gem/prism#lib/prism/lex_compat.rb:10 class Prism::LexCompat - # @return [LexCompat] a new instance of LexCompat - # - # source://prism//lib/prism/lex_compat.rb#586 + # pkg:gem/prism#lib/prism/lex_compat.rb:586 def initialize(code, **options); end - # source://prism//lib/prism/lex_compat.rb#828 + # pkg:gem/prism#lib/prism/lex_compat.rb:828 def add_on_sp_tokens(tokens, source, data_loc, bom, eof_token); end - # Returns the value of attribute options. - # - # source://prism//lib/prism/lex_compat.rb#584 + # pkg:gem/prism#lib/prism/lex_compat.rb:584 def options; end - # source://prism//lib/prism/lex_compat.rb#591 + # pkg:gem/prism#lib/prism/lex_compat.rb:591 def result; end end # In previous versions of Ruby, Ripper wouldn't flush the bom before the # first token, so we had to have a hack in place to account for that. # -# source://prism//lib/prism/lex_compat.rb#581 -Prism::LexCompat::BOM_FLUSHED = T.let(T.unsafe(nil), FalseClass) +# pkg:gem/prism#lib/prism/lex_compat.rb:581 +Prism::LexCompat::BOM_FLUSHED = T.let(T.unsafe(nil), TrueClass) # A heredoc in this case is a list of tokens that belong to the body of the # heredoc that should be appended onto the list of tokens when the heredoc # closes. # -# source://prism//lib/prism/lex_compat.rb#253 +# pkg:gem/prism#lib/prism/lex_compat.rb:253 module Prism::LexCompat::Heredoc class << self # Here we will split between the two types of heredocs and return the # object that will store their tokens. # - # source://prism//lib/prism/lex_compat.rb#565 + # pkg:gem/prism#lib/prism/lex_compat.rb:565 def build(opening); end end end @@ -23290,23 +22751,21 @@ end # that need to be split on "\\\n" to mimic Ripper's behavior. We also need # to keep track of the state that the heredoc was opened in. # -# source://prism//lib/prism/lex_compat.rb#277 +# pkg:gem/prism#lib/prism/lex_compat.rb:277 class Prism::LexCompat::Heredoc::DashHeredoc - # @return [DashHeredoc] a new instance of DashHeredoc - # - # source://prism//lib/prism/lex_compat.rb#280 + # pkg:gem/prism#lib/prism/lex_compat.rb:280 def initialize(split); end - # source://prism//lib/prism/lex_compat.rb#285 + # pkg:gem/prism#lib/prism/lex_compat.rb:285 def <<(token); end - # source://prism//lib/prism/lex_compat.rb#278 + # pkg:gem/prism#lib/prism/lex_compat.rb:278 def split; end - # source://prism//lib/prism/lex_compat.rb#289 + # pkg:gem/prism#lib/prism/lex_compat.rb:289 def to_a; end - # source://prism//lib/prism/lex_compat.rb#278 + # pkg:gem/prism#lib/prism/lex_compat.rb:278 def tokens; end end @@ -23321,45 +22780,35 @@ end # some extra manipulation on the tokens to make them match Ripper's # output by mirroring the dedent logic that Ripper uses. # -# source://prism//lib/prism/lex_compat.rb#336 +# pkg:gem/prism#lib/prism/lex_compat.rb:336 class Prism::LexCompat::Heredoc::DedentingHeredoc - # @return [DedentingHeredoc] a new instance of DedentingHeredoc - # - # source://prism//lib/prism/lex_compat.rb#341 + # pkg:gem/prism#lib/prism/lex_compat.rb:341 def initialize; end # As tokens are coming in, we track the minimum amount of common leading # whitespace on plain string content tokens. This allows us to later # remove that amount of whitespace from the beginning of each line. # - # source://prism//lib/prism/lex_compat.rb#352 + # pkg:gem/prism#lib/prism/lex_compat.rb:352 def <<(token); end - # Returns the value of attribute dedent. - # - # source://prism//lib/prism/lex_compat.rb#339 + # pkg:gem/prism#lib/prism/lex_compat.rb:339 def dedent; end - # Returns the value of attribute dedent_next. - # - # source://prism//lib/prism/lex_compat.rb#339 + # pkg:gem/prism#lib/prism/lex_compat.rb:339 def dedent_next; end - # Returns the value of attribute embexpr_balance. - # - # source://prism//lib/prism/lex_compat.rb#339 + # pkg:gem/prism#lib/prism/lex_compat.rb:339 def embexpr_balance; end - # source://prism//lib/prism/lex_compat.rb#389 + # pkg:gem/prism#lib/prism/lex_compat.rb:389 def to_a; end - # Returns the value of attribute tokens. - # - # source://prism//lib/prism/lex_compat.rb#339 + # pkg:gem/prism#lib/prism/lex_compat.rb:339 def tokens; end end -# source://prism//lib/prism/lex_compat.rb#337 +# pkg:gem/prism#lib/prism/lex_compat.rb:337 Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) # Heredocs that are no dash or tilde heredocs are just a list of tokens. @@ -23367,29 +22816,27 @@ Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), In # order back into the token stream and set the state of the last token to # the state that the heredoc was opened in. # -# source://prism//lib/prism/lex_compat.rb#258 +# pkg:gem/prism#lib/prism/lex_compat.rb:258 class Prism::LexCompat::Heredoc::PlainHeredoc - # @return [PlainHeredoc] a new instance of PlainHeredoc - # - # source://prism//lib/prism/lex_compat.rb#261 + # pkg:gem/prism#lib/prism/lex_compat.rb:261 def initialize; end - # source://prism//lib/prism/lex_compat.rb#265 + # pkg:gem/prism#lib/prism/lex_compat.rb:265 def <<(token); end - # source://prism//lib/prism/lex_compat.rb#269 + # pkg:gem/prism#lib/prism/lex_compat.rb:269 def to_a; end - # source://prism//lib/prism/lex_compat.rb#259 + # pkg:gem/prism#lib/prism/lex_compat.rb:259 def tokens; end end # Tokens where state should be ignored # used for :on_sp, :on_comment, :on_heredoc_end, :on_embexpr_end # -# source://prism//lib/prism/lex_compat.rb#244 +# pkg:gem/prism#lib/prism/lex_compat.rb:244 class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#245 + # pkg:gem/prism#lib/prism/lex_compat.rb:245 def ==(other); end end @@ -23397,28 +22844,26 @@ end # many-to-one mapping because we split up our token types, whereas Ripper # tends to group them. # -# source://prism//lib/prism/lex_compat.rb#31 +# pkg:gem/prism#lib/prism/lex_compat.rb:31 Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) # A result class specialized for holding tokens produced by the lexer. # -# source://prism//lib/prism/lex_compat.rb#12 +# pkg:gem/prism#lib/prism/lex_compat.rb:12 class Prism::LexCompat::Result < ::Prism::Result # Create a new lex compat result object with the given values. # - # @return [Result] a new instance of Result - # - # source://prism//lib/prism/lex_compat.rb#17 + # pkg:gem/prism#lib/prism/lex_compat.rb:17 def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end # Implement the hash pattern matching interface for Result. # - # source://prism//lib/prism/lex_compat.rb#23 + # pkg:gem/prism#lib/prism/lex_compat.rb:23 def deconstruct_keys(keys); end # The list of tokens that were produced by the lexer. # - # source://prism//lib/prism/lex_compat.rb#14 + # pkg:gem/prism#lib/prism/lex_compat.rb:14 def value; end end @@ -23426,60 +22871,54 @@ end # However, we add a couple of convenience methods onto them to make them a # little easier to work with. We delegate all other methods to the array. # -# source://prism//lib/prism/lex_compat.rb#202 +# pkg:gem/prism#lib/prism/lex_compat.rb:202 class Prism::LexCompat::Token < ::BasicObject # Create a new token object with the given ripper-compatible array. # - # @return [Token] a new instance of Token - # - # source://prism//lib/prism/lex_compat.rb#204 + # pkg:gem/prism#lib/prism/lex_compat.rb:204 def initialize(array); end # We want to pretend that this is just an Array. # - # source://prism//lib/prism/lex_compat.rb#229 + # pkg:gem/prism#lib/prism/lex_compat.rb:229 def ==(other); end # The type of the token. # - # source://prism//lib/prism/lex_compat.rb#214 + # pkg:gem/prism#lib/prism/lex_compat.rb:214 def event; end # The location of the token in the source. # - # source://prism//lib/prism/lex_compat.rb#209 + # pkg:gem/prism#lib/prism/lex_compat.rb:209 def location; end - # source://prism//lib/prism/lex_compat.rb#237 + # pkg:gem/prism#lib/prism/lex_compat.rb:237 def method_missing(name, *_arg1, **_arg2, &_arg3); end # The state of the lexer when this token was produced. # - # source://prism//lib/prism/lex_compat.rb#224 + # pkg:gem/prism#lib/prism/lex_compat.rb:224 def state; end # The slice of the source that this token represents. # - # source://prism//lib/prism/lex_compat.rb#219 + # pkg:gem/prism#lib/prism/lex_compat.rb:219 def value; end private - # @return [Boolean] - # - # source://prism//lib/prism/lex_compat.rb#233 + # pkg:gem/prism#lib/prism/lex_compat.rb:233 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end # This is a result specific to the `lex` and `lex_file` methods. # -# source://prism//lib/prism/parse_result.rb#778 +# pkg:gem/prism#lib/prism/parse_result.rb:778 class Prism::LexResult < ::Prism::Result # Create a new lex result object with the given values. # - # @return [LexResult] a new instance of LexResult - # - # source://prism//lib/prism/parse_result.rb#783 + # pkg:gem/prism#lib/prism/parse_result.rb:783 sig do params( value: T::Array[T.untyped], @@ -23495,13 +22934,13 @@ class Prism::LexResult < ::Prism::Result # Implement the hash pattern matching interface for LexResult. # - # source://prism//lib/prism/parse_result.rb#789 + # pkg:gem/prism#lib/prism/parse_result.rb:789 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The list of tokens that were parsed from the source code. # - # source://prism//lib/prism/parse_result.rb#780 + # pkg:gem/prism#lib/prism/parse_result.rb:780 sig { returns(T::Array[T.untyped]) } def value; end end @@ -23511,13 +22950,11 @@ end # target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12513 +# pkg:gem/prism#lib/prism/node.rb:12513 class Prism::LocalVariableAndWriteNode < ::Prism::Node # Initialize a new LocalVariableAndWriteNode node. # - # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#12515 + # pkg:gem/prism#lib/prism/node.rb:12515 sig do params( source: Prism::Source, @@ -23536,36 +22973,36 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12624 + # pkg:gem/prism#lib/prism/node.rb:12624 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12528 + # pkg:gem/prism#lib/prism/node.rb:12528 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12533 + # pkg:gem/prism#lib/prism/node.rb:12533 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12550 + # pkg:gem/prism#lib/prism/node.rb:12550 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12545 + # pkg:gem/prism#lib/prism/node.rb:12545 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#12555 + # pkg:gem/prism#lib/prism/node.rb:12555 sig do params( node_id: Integer, @@ -23580,33 +23017,30 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12533 + # pkg:gem/prism#lib/prism/node.rb:12560 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12563 + # pkg:gem/prism#lib/prism/node.rb:12563 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#12600 + # pkg:gem/prism#lib/prism/node.rb:12600 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#237 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:237 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#12538 + # pkg:gem/prism#lib/prism/node.rb:12538 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23614,62 +23048,62 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12608 + # pkg:gem/prism#lib/prism/node.rb:12608 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12597 + # pkg:gem/prism#lib/prism/node.rb:12597 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12568 + # pkg:gem/prism#lib/prism/node.rb:12568 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12603 + # pkg:gem/prism#lib/prism/node.rb:12603 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12581 + # pkg:gem/prism#lib/prism/node.rb:12581 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12576 + # pkg:gem/prism#lib/prism/node.rb:12576 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12589 + # pkg:gem/prism#lib/prism/node.rb:12589 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12613 + # pkg:gem/prism#lib/prism/node.rb:12613 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12594 + # pkg:gem/prism#lib/prism/node.rb:12594 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12618 + # pkg:gem/prism#lib/prism/node.rb:12618 def type; end end end @@ -23679,13 +23113,11 @@ end # target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12638 +# pkg:gem/prism#lib/prism/node.rb:12638 class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # Initialize a new LocalVariableOperatorWriteNode node. # - # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#12640 + # pkg:gem/prism#lib/prism/node.rb:12640 sig do params( source: Prism::Source, @@ -23705,48 +23137,48 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12748 + # pkg:gem/prism#lib/prism/node.rb:12748 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12654 + # pkg:gem/prism#lib/prism/node.rb:12654 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#12726 + # pkg:gem/prism#lib/prism/node.rb:12726 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#12707 + # pkg:gem/prism#lib/prism/node.rb:12707 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12659 + # pkg:gem/prism#lib/prism/node.rb:12659 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12676 + # pkg:gem/prism#lib/prism/node.rb:12676 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12671 + # pkg:gem/prism#lib/prism/node.rb:12671 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer) -> LocalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#12681 + # pkg:gem/prism#lib/prism/node.rb:12681 sig do params( node_id: Integer, @@ -23762,33 +23194,30 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12659 + # pkg:gem/prism#lib/prism/node.rb:12686 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12689 + # pkg:gem/prism#lib/prism/node.rb:12689 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#12729 + # pkg:gem/prism#lib/prism/node.rb:12729 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#249 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:249 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#12664 + # pkg:gem/prism#lib/prism/node.rb:12664 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23796,62 +23225,62 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12732 + # pkg:gem/prism#lib/prism/node.rb:12732 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12723 + # pkg:gem/prism#lib/prism/node.rb:12723 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12694 + # pkg:gem/prism#lib/prism/node.rb:12694 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#454 + # pkg:gem/prism#lib/prism/node_ext.rb:454 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#461 + # pkg:gem/prism#lib/prism/node_ext.rb:461 def operator_loc; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12715 + # pkg:gem/prism#lib/prism/node.rb:12715 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12702 + # pkg:gem/prism#lib/prism/node.rb:12702 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12737 + # pkg:gem/prism#lib/prism/node.rb:12737 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12720 + # pkg:gem/prism#lib/prism/node.rb:12720 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12742 + # pkg:gem/prism#lib/prism/node.rb:12742 def type; end end end @@ -23861,13 +23290,11 @@ end # target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12763 +# pkg:gem/prism#lib/prism/node.rb:12763 class Prism::LocalVariableOrWriteNode < ::Prism::Node # Initialize a new LocalVariableOrWriteNode node. # - # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#12765 + # pkg:gem/prism#lib/prism/node.rb:12765 sig do params( source: Prism::Source, @@ -23886,36 +23313,36 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12874 + # pkg:gem/prism#lib/prism/node.rb:12874 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12778 + # pkg:gem/prism#lib/prism/node.rb:12778 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12783 + # pkg:gem/prism#lib/prism/node.rb:12783 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12800 + # pkg:gem/prism#lib/prism/node.rb:12800 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12795 + # pkg:gem/prism#lib/prism/node.rb:12795 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#12805 + # pkg:gem/prism#lib/prism/node.rb:12805 sig do params( node_id: Integer, @@ -23930,33 +23357,30 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12783 + # pkg:gem/prism#lib/prism/node.rb:12810 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12813 + # pkg:gem/prism#lib/prism/node.rb:12813 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#12850 + # pkg:gem/prism#lib/prism/node.rb:12850 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#243 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:243 def desugar; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#12788 + # pkg:gem/prism#lib/prism/node.rb:12788 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23964,62 +23388,62 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12858 + # pkg:gem/prism#lib/prism/node.rb:12858 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12847 + # pkg:gem/prism#lib/prism/node.rb:12847 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12818 + # pkg:gem/prism#lib/prism/node.rb:12818 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12853 + # pkg:gem/prism#lib/prism/node.rb:12853 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12831 + # pkg:gem/prism#lib/prism/node.rb:12831 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12826 + # pkg:gem/prism#lib/prism/node.rb:12826 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12839 + # pkg:gem/prism#lib/prism/node.rb:12839 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12863 + # pkg:gem/prism#lib/prism/node.rb:12863 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12844 + # pkg:gem/prism#lib/prism/node.rb:12844 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12868 + # pkg:gem/prism#lib/prism/node.rb:12868 def type; end end end @@ -24029,13 +23453,11 @@ end # foo # ^^^ # -# source://prism//lib/prism/node.rb#12888 +# pkg:gem/prism#lib/prism/node.rb:12888 class Prism::LocalVariableReadNode < ::Prism::Node # Initialize a new LocalVariableReadNode node. # - # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode - # - # source://prism//lib/prism/node.rb#12890 + # pkg:gem/prism#lib/prism/node.rb:12890 sig do params( source: Prism::Source, @@ -24051,36 +23473,36 @@ class Prism::LocalVariableReadNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12975 + # pkg:gem/prism#lib/prism/node.rb:12975 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12900 + # pkg:gem/prism#lib/prism/node.rb:12900 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12905 + # pkg:gem/prism#lib/prism/node.rb:12905 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12921 + # pkg:gem/prism#lib/prism/node.rb:12921 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12916 + # pkg:gem/prism#lib/prism/node.rb:12916 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableReadNode # - # source://prism//lib/prism/node.rb#12926 + # pkg:gem/prism#lib/prism/node.rb:12926 sig do params( node_id: Integer, @@ -24092,16 +23514,15 @@ class Prism::LocalVariableReadNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12905 + # pkg:gem/prism#lib/prism/node.rb:12931 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12934 + # pkg:gem/prism#lib/prism/node.rb:12934 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -24113,13 +23534,13 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). # - # source://prism//lib/prism/node.rb#12956 + # pkg:gem/prism#lib/prism/node.rb:12956 sig { returns(Integer) } def depth; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#12910 + # pkg:gem/prism#lib/prism/node.rb:12910 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24127,7 +23548,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12959 + # pkg:gem/prism#lib/prism/node.rb:12959 sig { override.returns(String) } def inspect; end @@ -24141,20 +23562,20 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # _1 # name `:_1` # - # source://prism//lib/prism/node.rb#12947 + # pkg:gem/prism#lib/prism/node.rb:12947 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12964 + # pkg:gem/prism#lib/prism/node.rb:12964 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12969 + # pkg:gem/prism#lib/prism/node.rb:12969 def type; end end end @@ -24167,13 +23588,11 @@ end # foo => baz # ^^^ # -# source://prism//lib/prism/node.rb#12989 +# pkg:gem/prism#lib/prism/node.rb:12989 class Prism::LocalVariableTargetNode < ::Prism::Node # Initialize a new LocalVariableTargetNode node. # - # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode - # - # source://prism//lib/prism/node.rb#12991 + # pkg:gem/prism#lib/prism/node.rb:12991 sig do params( source: Prism::Source, @@ -24189,36 +23608,36 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13062 + # pkg:gem/prism#lib/prism/node.rb:13062 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13001 + # pkg:gem/prism#lib/prism/node.rb:13001 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13006 + # pkg:gem/prism#lib/prism/node.rb:13006 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13022 + # pkg:gem/prism#lib/prism/node.rb:13022 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13017 + # pkg:gem/prism#lib/prism/node.rb:13017 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#13027 + # pkg:gem/prism#lib/prism/node.rb:13027 sig do params( node_id: Integer, @@ -24230,28 +23649,27 @@ class Prism::LocalVariableTargetNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13006 + # pkg:gem/prism#lib/prism/node.rb:13032 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#13035 + # pkg:gem/prism#lib/prism/node.rb:13035 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#13043 + # pkg:gem/prism#lib/prism/node.rb:13043 sig { returns(Integer) } def depth; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#13011 + # pkg:gem/prism#lib/prism/node.rb:13011 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24259,26 +23677,26 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13046 + # pkg:gem/prism#lib/prism/node.rb:13046 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13040 + # pkg:gem/prism#lib/prism/node.rb:13040 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13051 + # pkg:gem/prism#lib/prism/node.rb:13051 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13056 + # pkg:gem/prism#lib/prism/node.rb:13056 def type; end end end @@ -24288,13 +23706,11 @@ end # foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#13073 +# pkg:gem/prism#lib/prism/node.rb:13073 class Prism::LocalVariableWriteNode < ::Prism::Node # Initialize a new LocalVariableWriteNode node. # - # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode - # - # source://prism//lib/prism/node.rb#13075 + # pkg:gem/prism#lib/prism/node.rb:13075 sig do params( source: Prism::Source, @@ -24313,36 +23729,36 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13210 + # pkg:gem/prism#lib/prism/node.rb:13210 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13088 + # pkg:gem/prism#lib/prism/node.rb:13088 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13093 + # pkg:gem/prism#lib/prism/node.rb:13093 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13110 + # pkg:gem/prism#lib/prism/node.rb:13110 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13105 + # pkg:gem/prism#lib/prism/node.rb:13105 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> LocalVariableWriteNode # - # source://prism//lib/prism/node.rb#13115 + # pkg:gem/prism#lib/prism/node.rb:13115 sig do params( node_id: Integer, @@ -24357,16 +23773,15 @@ class Prism::LocalVariableWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13093 + # pkg:gem/prism#lib/prism/node.rb:13120 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#13123 + # pkg:gem/prism#lib/prism/node.rb:13123 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -24378,15 +23793,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). # - # source://prism//lib/prism/node.rb#13141 + # pkg:gem/prism#lib/prism/node.rb:13141 sig { returns(Integer) } def depth; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#13098 + # pkg:gem/prism#lib/prism/node.rb:13098 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24394,7 +23807,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13194 + # pkg:gem/prism#lib/prism/node.rb:13194 sig { override.returns(String) } def inspect; end @@ -24404,7 +23817,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # abc = 123 # name `:abc` # - # source://prism//lib/prism/node.rb#13132 + # pkg:gem/prism#lib/prism/node.rb:13132 sig { returns(Symbol) } def name; end @@ -24413,13 +23826,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # foo = :bar # ^^^ # - # source://prism//lib/prism/node.rb#13147 + # pkg:gem/prism#lib/prism/node.rb:13147 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13189 + # pkg:gem/prism#lib/prism/node.rb:13189 sig { returns(String) } def operator; end @@ -24428,25 +23841,25 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # x = :y # ^ # - # source://prism//lib/prism/node.rb#13176 + # pkg:gem/prism#lib/prism/node.rb:13176 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13155 + # pkg:gem/prism#lib/prism/node.rb:13155 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13184 + # pkg:gem/prism#lib/prism/node.rb:13184 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13199 + # pkg:gem/prism#lib/prism/node.rb:13199 sig { override.returns(Symbol) } def type; end @@ -24462,34 +23875,32 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # foo = foo # - # source://prism//lib/prism/node.rb#13170 + # pkg:gem/prism#lib/prism/node.rb:13170 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13204 + # pkg:gem/prism#lib/prism/node.rb:13204 def type; end end end # This represents a location in the source. # -# source://prism//lib/prism/parse_result.rb#287 +# pkg:gem/prism#lib/prism/parse_result.rb:287 class Prism::Location # Create a new location object with the given source, start byte offset, and # byte length. # - # @return [Location] a new instance of Location - # - # source://prism//lib/prism/parse_result.rb#302 + # pkg:gem/prism#lib/prism/parse_result.rb:302 sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void } def initialize(source, start_offset, length); end # Returns true if the given other location is equal to this location. # - # source://prism//lib/prism/parse_result.rb#490 + # pkg:gem/prism#lib/prism/parse_result.rb:490 sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end @@ -24497,14 +23908,14 @@ class Prism::Location # that occurs after this location on the same line, and return the new # location. This will raise an error if the string does not exist. # - # source://prism//lib/prism/parse_result.rb#509 + # pkg:gem/prism#lib/prism/parse_result.rb:509 sig { params(string: String).returns(Prism::Location) } def adjoin(string); end # The end column in code units using the given cache to fetch or calculate # the value. # - # source://prism//lib/prism/parse_result.rb#475 + # pkg:gem/prism#lib/prism/parse_result.rb:475 sig do params( cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) @@ -24515,7 +23926,7 @@ class Prism::Location # The end offset from the start of the file in code units using the given # cache to fetch or calculate the value. # - # source://prism//lib/prism/parse_result.rb#411 + # pkg:gem/prism#lib/prism/parse_result.rb:411 sig do params( cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) @@ -24526,7 +23937,7 @@ class Prism::Location # The start column in code units using the given cache to fetch or calculate # the value. # - # source://prism//lib/prism/parse_result.rb#451 + # pkg:gem/prism#lib/prism/parse_result.rb:451 sig do params( cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) @@ -24537,7 +23948,7 @@ class Prism::Location # The start offset from the start of the file in code units using the given # cache to fetch or calculate the value. # - # source://prism//lib/prism/parse_result.rb#389 + # pkg:gem/prism#lib/prism/parse_result.rb:389 sig do params( cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) @@ -24547,78 +23958,78 @@ class Prism::Location # Returns a new location that is the result of chopping off the last byte. # - # source://prism//lib/prism/parse_result.rb#348 + # pkg:gem/prism#lib/prism/parse_result.rb:348 sig { returns(Prism::Location) } def chop; end # Returns all comments that are associated with this location (both leading # and trailing comments). # - # source://prism//lib/prism/parse_result.rb#338 + # pkg:gem/prism#lib/prism/parse_result.rb:338 sig { returns(T::Array[Prism::Comment]) } def comments; end # Create a new location object with the given options. # - # source://prism//lib/prism/parse_result.rb#343 + # pkg:gem/prism#lib/prism/parse_result.rb:343 sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } def copy(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end # Implement the hash pattern matching interface for Location. # - # source://prism//lib/prism/parse_result.rb#480 + # pkg:gem/prism#lib/prism/parse_result.rb:480 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The column number in characters where this location ends from the start of # the line. # - # source://prism//lib/prism/parse_result.rb#463 + # pkg:gem/prism#lib/prism/parse_result.rb:463 sig { returns(Integer) } def end_character_column; end # The character offset from the beginning of the source where this location # ends. # - # source://prism//lib/prism/parse_result.rb#400 + # pkg:gem/prism#lib/prism/parse_result.rb:400 sig { returns(Integer) } def end_character_offset; end # The column number in code units of the given encoding where this location # ends from the start of the line. # - # source://prism//lib/prism/parse_result.rb#469 + # pkg:gem/prism#lib/prism/parse_result.rb:469 sig { params(encoding: Encoding).returns(Integer) } def end_code_units_column(encoding = T.unsafe(nil)); end # The offset from the start of the file in code units of the given encoding. # - # source://prism//lib/prism/parse_result.rb#405 + # pkg:gem/prism#lib/prism/parse_result.rb:405 sig { params(encoding: Encoding).returns(Integer) } def end_code_units_offset(encoding = T.unsafe(nil)); end # The column number in bytes where this location ends from the start of the # line. # - # source://prism//lib/prism/parse_result.rb#457 + # pkg:gem/prism#lib/prism/parse_result.rb:457 sig { returns(Integer) } def end_column; end # The line number where this location ends. # - # source://prism//lib/prism/parse_result.rb#427 + # pkg:gem/prism#lib/prism/parse_result.rb:427 sig { returns(Integer) } def end_line; end # The byte offset from the beginning of the source where this location ends. # - # source://prism//lib/prism/parse_result.rb#394 + # pkg:gem/prism#lib/prism/parse_result.rb:394 sig { returns(Integer) } def end_offset; end # Returns a string representation of this location. # - # source://prism//lib/prism/parse_result.rb#353 + # pkg:gem/prism#lib/prism/parse_result.rb:353 sig { returns(String) } def inspect; end @@ -24626,38 +24037,38 @@ class Prism::Location # other location. Raises an error if this location is not before the other # location or if they don't share the same source. # - # source://prism//lib/prism/parse_result.rb#499 + # pkg:gem/prism#lib/prism/parse_result.rb:499 sig { params(other: Prism::Location).returns(Prism::Location) } def join(other); end # Attach a comment to the leading comments of this location. # - # source://prism//lib/prism/parse_result.rb#321 + # pkg:gem/prism#lib/prism/parse_result.rb:321 sig { params(comment: Prism::Comment).void } def leading_comment(comment); end # These are the comments that are associated with this location that exist # before the start of this location. # - # source://prism//lib/prism/parse_result.rb#316 + # pkg:gem/prism#lib/prism/parse_result.rb:316 sig { returns(T::Array[Prism::Comment]) } def leading_comments; end # The length of this location in bytes. # - # source://prism//lib/prism/parse_result.rb#298 + # pkg:gem/prism#lib/prism/parse_result.rb:298 sig { returns(Integer) } def length; end # Implement the pretty print interface for Location. # - # source://prism//lib/prism/parse_result.rb#485 + # pkg:gem/prism#lib/prism/parse_result.rb:485 sig { params(q: T.untyped).void } def pretty_print(q); end # The source code that this location represents. # - # source://prism//lib/prism/parse_result.rb#363 + # pkg:gem/prism#lib/prism/parse_result.rb:363 sig { returns(String) } def slice; end @@ -24665,78 +24076,78 @@ class Prism::Location # of the line that this location starts on to the end of the line that this # location ends on. # - # source://prism//lib/prism/parse_result.rb#370 + # pkg:gem/prism#lib/prism/parse_result.rb:370 def slice_lines; end # Returns all of the lines of the source code associated with this location. # - # source://prism//lib/prism/parse_result.rb#358 + # pkg:gem/prism#lib/prism/parse_result.rb:358 sig { returns(T::Array[String]) } def source_lines; end # The column number in characters where this location ends from the start of # the line. # - # source://prism//lib/prism/parse_result.rb#439 + # pkg:gem/prism#lib/prism/parse_result.rb:439 sig { returns(Integer) } def start_character_column; end # The character offset from the beginning of the source where this location # starts. # - # source://prism//lib/prism/parse_result.rb#378 + # pkg:gem/prism#lib/prism/parse_result.rb:378 sig { returns(Integer) } def start_character_offset; end # The column number in code units of the given encoding where this location # starts from the start of the line. # - # source://prism//lib/prism/parse_result.rb#445 + # pkg:gem/prism#lib/prism/parse_result.rb:445 sig { params(encoding: Encoding).returns(Integer) } def start_code_units_column(encoding = T.unsafe(nil)); end # The offset from the start of the file in code units of the given encoding. # - # source://prism//lib/prism/parse_result.rb#383 + # pkg:gem/prism#lib/prism/parse_result.rb:383 sig { params(encoding: Encoding).returns(Integer) } def start_code_units_offset(encoding = T.unsafe(nil)); end # The column number in bytes where this location starts from the start of # the line. # - # source://prism//lib/prism/parse_result.rb#433 + # pkg:gem/prism#lib/prism/parse_result.rb:433 sig { returns(Integer) } def start_column; end # The line number where this location starts. # - # source://prism//lib/prism/parse_result.rb#416 + # pkg:gem/prism#lib/prism/parse_result.rb:416 sig { returns(Integer) } def start_line; end # The content of the line where this location starts before this location. # - # source://prism//lib/prism/parse_result.rb#421 + # pkg:gem/prism#lib/prism/parse_result.rb:421 sig { returns(String) } def start_line_slice; end # The byte offset from the beginning of the source where this location # starts. # - # source://prism//lib/prism/parse_result.rb#295 + # pkg:gem/prism#lib/prism/parse_result.rb:295 sig { returns(Integer) } def start_offset; end # Attach a comment to the trailing comments of this location. # - # source://prism//lib/prism/parse_result.rb#332 + # pkg:gem/prism#lib/prism/parse_result.rb:332 sig { params(comment: Prism::Comment).void } def trailing_comment(comment); end # These are the comments that are associated with this location that exist # after the end of this location. # - # source://prism//lib/prism/parse_result.rb#327 + # pkg:gem/prism#lib/prism/parse_result.rb:327 sig { returns(T::Array[Prism::Comment]) } def trailing_comments; end @@ -24745,66 +24156,64 @@ class Prism::Location # A Source object that is used to determine more information from the given # offset and length. # - # source://prism//lib/prism/parse_result.rb#290 + # pkg:gem/prism#lib/prism/parse_result.rb:290 sig { returns(Prism::Source) } def source; end end # Flags for while and until loop nodes. # -# source://prism//lib/prism/node.rb#19858 +# pkg:gem/prism#lib/prism/node.rb:19858 module Prism::LoopFlags; end # a loop after a begin statement, so the body is executed first before the condition # -# source://prism//lib/prism/node.rb#19860 +# pkg:gem/prism#lib/prism/node.rb:19860 Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) # This represents a magic comment that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#571 +# pkg:gem/prism#lib/prism/parse_result.rb:571 class Prism::MagicComment # Create a new magic comment object with the given key and value locations. # - # @return [MagicComment] a new instance of MagicComment - # - # source://prism//lib/prism/parse_result.rb#579 + # pkg:gem/prism#lib/prism/parse_result.rb:579 sig { params(key_loc: Prism::Location, value_loc: Prism::Location).void } def initialize(key_loc, value_loc); end # Implement the hash pattern matching interface for MagicComment. # - # source://prism//lib/prism/parse_result.rb#595 + # pkg:gem/prism#lib/prism/parse_result.rb:595 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this magic comment. # - # source://prism//lib/prism/parse_result.rb#600 + # pkg:gem/prism#lib/prism/parse_result.rb:600 sig { returns(String) } def inspect; end # Returns the key of the magic comment by slicing it from the source code. # - # source://prism//lib/prism/parse_result.rb#585 + # pkg:gem/prism#lib/prism/parse_result.rb:585 sig { returns(String) } def key; end # A Location object representing the location of the key in the source. # - # source://prism//lib/prism/parse_result.rb#573 + # pkg:gem/prism#lib/prism/parse_result.rb:573 sig { returns(Prism::Location) } def key_loc; end # Returns the value of the magic comment by slicing it from the source code. # - # source://prism//lib/prism/parse_result.rb#590 + # pkg:gem/prism#lib/prism/parse_result.rb:590 sig { returns(String) } def value; end # A Location object representing the location of the value in the source. # - # source://prism//lib/prism/parse_result.rb#576 + # pkg:gem/prism#lib/prism/parse_result.rb:576 sig { returns(Prism::Location) } def value_loc; end end @@ -24814,15 +24223,13 @@ end # if /foo/i then end # ^^^^^^ # -# source://prism//lib/prism/node.rb#13224 +# pkg:gem/prism#lib/prism/node.rb:13224 class Prism::MatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions # Initialize a new MatchLastLineNode node. # - # @return [MatchLastLineNode] a new instance of MatchLastLineNode - # - # source://prism//lib/prism/node.rb#13226 + # pkg:gem/prism#lib/prism/node.rb:13226 sig do params( source: Prism::Source, @@ -24840,68 +24247,66 @@ class Prism::MatchLastLineNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13405 + # pkg:gem/prism#lib/prism/node.rb:13405 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13238 + # pkg:gem/prism#lib/prism/node.rb:13238 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def ascii_8bit?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13302 + # pkg:gem/prism#lib/prism/node.rb:13302 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13243 + # pkg:gem/prism#lib/prism/node.rb:13243 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#13384 + # pkg:gem/prism#lib/prism/node.rb:13384 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#13358 + # pkg:gem/prism#lib/prism/node.rb:13358 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13259 + # pkg:gem/prism#lib/prism/node.rb:13259 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13254 + # pkg:gem/prism#lib/prism/node.rb:13254 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#13379 + # pkg:gem/prism#lib/prism/node.rb:13379 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#13345 + # pkg:gem/prism#lib/prism/node.rb:13345 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode # - # source://prism//lib/prism/node.rb#13264 + # pkg:gem/prism#lib/prism/node.rb:13264 sig do params( node_id: Integer, @@ -24915,37 +24320,32 @@ class Prism::MatchLastLineNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13243 + # pkg:gem/prism#lib/prism/node.rb:13269 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism//lib/prism/node.rb#13272 + # pkg:gem/prism#lib/prism/node.rb:13272 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#13248 + # pkg:gem/prism#lib/prism/node.rb:13248 def each_child_node; end # def euc_jp?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13297 + # pkg:gem/prism#lib/prism/node.rb:13297 sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13282 + # pkg:gem/prism#lib/prism/node.rb:13282 sig { returns(T::Boolean) } def extended?; end @@ -24954,67 +24354,55 @@ class Prism::MatchLastLineNode < ::Prism::Node # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13322 + # pkg:gem/prism#lib/prism/node.rb:13322 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13327 + # pkg:gem/prism#lib/prism/node.rb:13327 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13317 + # pkg:gem/prism#lib/prism/node.rb:13317 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def ignore_case?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13277 + # pkg:gem/prism#lib/prism/node.rb:13277 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#13389 + # pkg:gem/prism#lib/prism/node.rb:13389 sig { override.returns(String) } def inspect; end # def multi_line?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13287 + # pkg:gem/prism#lib/prism/node.rb:13287 sig { returns(T::Boolean) } def multi_line?; end # def once?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13292 + # pkg:gem/prism#lib/prism/node.rb:13292 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#13374 + # pkg:gem/prism#lib/prism/node.rb:13374 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#13332 + # pkg:gem/prism#lib/prism/node.rb:13332 sig { returns(Prism::Location) } def opening_loc; end @@ -25024,53 +24412,49 @@ class Prism::MatchLastLineNode < ::Prism::Node # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13366 + # pkg:gem/prism#lib/prism/node.rb:13366 def save_closing_loc(repository); end # Save the content_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13353 + # pkg:gem/prism#lib/prism/node.rb:13353 def save_content_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13340 + # pkg:gem/prism#lib/prism/node.rb:13340 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13394 + # pkg:gem/prism#lib/prism/node.rb:13394 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#13371 + # pkg:gem/prism#lib/prism/node.rb:13371 sig { returns(String) } def unescaped; end # def utf_8?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13312 + # pkg:gem/prism#lib/prism/node.rb:13312 sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13307 + # pkg:gem/prism#lib/prism/node.rb:13307 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13399 + # pkg:gem/prism#lib/prism/node.rb:13399 def type; end end end @@ -25080,13 +24464,11 @@ end # foo in bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13419 +# pkg:gem/prism#lib/prism/node.rb:13419 class Prism::MatchPredicateNode < ::Prism::Node # Initialize a new MatchPredicateNode node. # - # @return [MatchPredicateNode] a new instance of MatchPredicateNode - # - # source://prism//lib/prism/node.rb#13421 + # pkg:gem/prism#lib/prism/node.rb:13421 sig do params( source: Prism::Source, @@ -25103,36 +24485,36 @@ class Prism::MatchPredicateNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13513 + # pkg:gem/prism#lib/prism/node.rb:13513 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13432 + # pkg:gem/prism#lib/prism/node.rb:13432 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13437 + # pkg:gem/prism#lib/prism/node.rb:13437 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13455 + # pkg:gem/prism#lib/prism/node.rb:13455 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13450 + # pkg:gem/prism#lib/prism/node.rb:13450 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchPredicateNode # - # source://prism//lib/prism/node.rb#13460 + # pkg:gem/prism#lib/prism/node.rb:13460 sig do params( node_id: Integer, @@ -25145,24 +24527,21 @@ class Prism::MatchPredicateNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13437 + # pkg:gem/prism#lib/prism/node.rb:13465 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#13468 + # pkg:gem/prism#lib/prism/node.rb:13468 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#13442 + # pkg:gem/prism#lib/prism/node.rb:13442 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -25170,50 +24549,50 @@ class Prism::MatchPredicateNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13497 + # pkg:gem/prism#lib/prism/node.rb:13497 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13492 + # pkg:gem/prism#lib/prism/node.rb:13492 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13479 + # pkg:gem/prism#lib/prism/node.rb:13479 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#13476 + # pkg:gem/prism#lib/prism/node.rb:13476 sig { returns(Prism::Node) } def pattern; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13487 + # pkg:gem/prism#lib/prism/node.rb:13487 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13502 + # pkg:gem/prism#lib/prism/node.rb:13502 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13473 + # pkg:gem/prism#lib/prism/node.rb:13473 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13507 + # pkg:gem/prism#lib/prism/node.rb:13507 def type; end end end @@ -25223,13 +24602,11 @@ end # foo => bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13525 +# pkg:gem/prism#lib/prism/node.rb:13525 class Prism::MatchRequiredNode < ::Prism::Node # Initialize a new MatchRequiredNode node. # - # @return [MatchRequiredNode] a new instance of MatchRequiredNode - # - # source://prism//lib/prism/node.rb#13527 + # pkg:gem/prism#lib/prism/node.rb:13527 sig do params( source: Prism::Source, @@ -25246,36 +24623,36 @@ class Prism::MatchRequiredNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13667 + # pkg:gem/prism#lib/prism/node.rb:13667 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13538 + # pkg:gem/prism#lib/prism/node.rb:13538 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13543 + # pkg:gem/prism#lib/prism/node.rb:13543 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13561 + # pkg:gem/prism#lib/prism/node.rb:13561 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13556 + # pkg:gem/prism#lib/prism/node.rb:13556 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchRequiredNode # - # source://prism//lib/prism/node.rb#13566 + # pkg:gem/prism#lib/prism/node.rb:13566 sig do params( node_id: Integer, @@ -25288,24 +24665,21 @@ class Prism::MatchRequiredNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13543 + # pkg:gem/prism#lib/prism/node.rb:13571 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#13574 + # pkg:gem/prism#lib/prism/node.rb:13574 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#13548 + # pkg:gem/prism#lib/prism/node.rb:13548 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -25313,13 +24687,13 @@ class Prism::MatchRequiredNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13651 + # pkg:gem/prism#lib/prism/node.rb:13651 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13646 + # pkg:gem/prism#lib/prism/node.rb:13646 sig { returns(String) } def operator; end @@ -25328,7 +24702,7 @@ class Prism::MatchRequiredNode < ::Prism::Node # foo => bar # ^^ # - # source://prism//lib/prism/node.rb#13633 + # pkg:gem/prism#lib/prism/node.rb:13633 sig { returns(Prism::Location) } def operator_loc; end @@ -25376,19 +24750,19 @@ class Prism::MatchRequiredNode < ::Prism::Node # # foo => CONST # - # source://prism//lib/prism/node.rb#13627 + # pkg:gem/prism#lib/prism/node.rb:13627 sig { returns(Prism::Node) } def pattern; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13641 + # pkg:gem/prism#lib/prism/node.rb:13641 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13656 + # pkg:gem/prism#lib/prism/node.rb:13656 sig { override.returns(Symbol) } def type; end @@ -25397,14 +24771,14 @@ class Prism::MatchRequiredNode < ::Prism::Node # foo => bar # ^^^ # - # source://prism//lib/prism/node.rb#13582 + # pkg:gem/prism#lib/prism/node.rb:13582 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13661 + # pkg:gem/prism#lib/prism/node.rb:13661 def type; end end end @@ -25414,13 +24788,11 @@ end # /(?bar)/ =~ baz # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13679 +# pkg:gem/prism#lib/prism/node.rb:13679 class Prism::MatchWriteNode < ::Prism::Node # Initialize a new MatchWriteNode node. # - # @return [MatchWriteNode] a new instance of MatchWriteNode - # - # source://prism//lib/prism/node.rb#13681 + # pkg:gem/prism#lib/prism/node.rb:13681 sig do params( source: Prism::Source, @@ -25436,42 +24808,42 @@ class Prism::MatchWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13754 + # pkg:gem/prism#lib/prism/node.rb:13754 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13691 + # pkg:gem/prism#lib/prism/node.rb:13691 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader call: CallNode # - # source://prism//lib/prism/node.rb#13732 + # pkg:gem/prism#lib/prism/node.rb:13732 sig { returns(Prism::CallNode) } def call; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13696 + # pkg:gem/prism#lib/prism/node.rb:13696 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13714 + # pkg:gem/prism#lib/prism/node.rb:13714 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13709 + # pkg:gem/prism#lib/prism/node.rb:13709 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?call: CallNode, ?targets: Array[LocalVariableTargetNode]) -> MatchWriteNode # - # source://prism//lib/prism/node.rb#13719 + # pkg:gem/prism#lib/prism/node.rb:13719 sig do params( node_id: Integer, @@ -25483,24 +24855,21 @@ class Prism::MatchWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13696 + # pkg:gem/prism#lib/prism/node.rb:13724 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, call: CallNode, targets: Array[LocalVariableTargetNode] } # - # source://prism//lib/prism/node.rb#13727 + # pkg:gem/prism#lib/prism/node.rb:13727 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [call] - # - # source://prism//lib/prism/node.rb#13701 + # pkg:gem/prism#lib/prism/node.rb:13701 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -25508,94 +24877,91 @@ class Prism::MatchWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13738 + # pkg:gem/prism#lib/prism/node.rb:13738 sig { override.returns(String) } def inspect; end # attr_reader targets: Array[LocalVariableTargetNode] # - # source://prism//lib/prism/node.rb#13735 + # pkg:gem/prism#lib/prism/node.rb:13735 sig { returns(T::Array[Prism::LocalVariableTargetNode]) } def targets; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13743 + # pkg:gem/prism#lib/prism/node.rb:13743 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13748 + # pkg:gem/prism#lib/prism/node.rb:13748 def type; end end end # Represents a node that is missing from the source and results in a syntax error. # -# source://prism//lib/prism/node.rb#13763 +# pkg:gem/prism#lib/prism/node.rb:13763 class Prism::MissingNode < ::Prism::Node # Initialize a new MissingNode node. # - # @return [MissingNode] a new instance of MissingNode - # - # source://prism//lib/prism/node.rb#13765 + # pkg:gem/prism#lib/prism/node.rb:13765 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13828 + # pkg:gem/prism#lib/prism/node.rb:13828 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13773 + # pkg:gem/prism#lib/prism/node.rb:13773 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13778 + # pkg:gem/prism#lib/prism/node.rb:13778 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13794 + # pkg:gem/prism#lib/prism/node.rb:13794 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13789 + # pkg:gem/prism#lib/prism/node.rb:13789 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> MissingNode # - # source://prism//lib/prism/node.rb#13799 + # pkg:gem/prism#lib/prism/node.rb:13799 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::MissingNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13778 + # pkg:gem/prism#lib/prism/node.rb:13804 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#13807 + # pkg:gem/prism#lib/prism/node.rb:13807 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#13783 + # pkg:gem/prism#lib/prism/node.rb:13783 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -25603,20 +24969,20 @@ class Prism::MissingNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13812 + # pkg:gem/prism#lib/prism/node.rb:13812 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13817 + # pkg:gem/prism#lib/prism/node.rb:13817 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13822 + # pkg:gem/prism#lib/prism/node.rb:13822 def type; end end end @@ -25626,13 +24992,11 @@ end # module Foo end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13837 +# pkg:gem/prism#lib/prism/node.rb:13837 class Prism::ModuleNode < ::Prism::Node # Initialize a new ModuleNode node. # - # @return [ModuleNode] a new instance of ModuleNode - # - # source://prism//lib/prism/node.rb#13839 + # pkg:gem/prism#lib/prism/node.rb:13839 sig do params( source: Prism::Source, @@ -25652,48 +25016,48 @@ class Prism::ModuleNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13961 + # pkg:gem/prism#lib/prism/node.rb:13961 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13853 + # pkg:gem/prism#lib/prism/node.rb:13853 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#13916 + # pkg:gem/prism#lib/prism/node.rb:13916 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13858 + # pkg:gem/prism#lib/prism/node.rb:13858 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13879 + # pkg:gem/prism#lib/prism/node.rb:13879 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13871 + # pkg:gem/prism#lib/prism/node.rb:13871 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant_path: ConstantReadNode | ConstantPathNode | MissingNode # - # source://prism//lib/prism/node.rb#13913 + # pkg:gem/prism#lib/prism/node.rb:13913 sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode)) } def constant_path; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | MissingNode, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ModuleNode # - # source://prism//lib/prism/node.rb#13884 + # pkg:gem/prism#lib/prism/node.rb:13884 sig do params( node_id: Integer, @@ -25709,35 +25073,32 @@ class Prism::ModuleNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13858 + # pkg:gem/prism#lib/prism/node.rb:13889 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | MissingNode, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#13892 + # pkg:gem/prism#lib/prism/node.rb:13892 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [constant_path] - # - # source://prism//lib/prism/node.rb#13863 + # pkg:gem/prism#lib/prism/node.rb:13863 def each_child_node; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#13940 + # pkg:gem/prism#lib/prism/node.rb:13940 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#13919 + # pkg:gem/prism#lib/prism/node.rb:13919 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -25746,56 +25107,56 @@ class Prism::ModuleNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13945 + # pkg:gem/prism#lib/prism/node.rb:13945 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#13897 + # pkg:gem/prism#lib/prism/node.rb:13897 sig { returns(T::Array[Symbol]) } def locals; end # def module_keyword: () -> String # - # source://prism//lib/prism/node.rb#13935 + # pkg:gem/prism#lib/prism/node.rb:13935 sig { returns(String) } def module_keyword; end # attr_reader module_keyword_loc: Location # - # source://prism//lib/prism/node.rb#13900 + # pkg:gem/prism#lib/prism/node.rb:13900 sig { returns(Prism::Location) } def module_keyword_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13932 + # pkg:gem/prism#lib/prism/node.rb:13932 sig { returns(Symbol) } def name; end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13927 + # pkg:gem/prism#lib/prism/node.rb:13927 def save_end_keyword_loc(repository); end # Save the module_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13908 + # pkg:gem/prism#lib/prism/node.rb:13908 def save_module_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13950 + # pkg:gem/prism#lib/prism/node.rb:13950 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13955 + # pkg:gem/prism#lib/prism/node.rb:13955 def type; end end end @@ -25810,13 +25171,11 @@ end # for a, b in [[1, 2], [3, 4]] # ^^^^ # -# source://prism//lib/prism/node.rb#13982 +# pkg:gem/prism#lib/prism/node.rb:13982 class Prism::MultiTargetNode < ::Prism::Node # Initialize a new MultiTargetNode node. # - # @return [MultiTargetNode] a new instance of MultiTargetNode - # - # source://prism//lib/prism/node.rb#13984 + # pkg:gem/prism#lib/prism/node.rb:13984 sig do params( source: Prism::Source, @@ -25835,36 +25194,36 @@ class Prism::MultiTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14146 + # pkg:gem/prism#lib/prism/node.rb:14146 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13997 + # pkg:gem/prism#lib/prism/node.rb:13997 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14002 + # pkg:gem/prism#lib/prism/node.rb:14002 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14025 + # pkg:gem/prism#lib/prism/node.rb:14025 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14016 + # pkg:gem/prism#lib/prism/node.rb:14016 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?) -> MultiTargetNode # - # source://prism//lib/prism/node.rb#14030 + # pkg:gem/prism#lib/prism/node.rb:14030 sig do params( node_id: Integer, @@ -25879,24 +25238,21 @@ class Prism::MultiTargetNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14002 + # pkg:gem/prism#lib/prism/node.rb:14035 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location? } # - # source://prism//lib/prism/node.rb#14038 + # pkg:gem/prism#lib/prism/node.rb:14038 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [rest] - # - # source://prism//lib/prism/node.rb#14007 + # pkg:gem/prism#lib/prism/node.rb:14007 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -25904,7 +25260,7 @@ class Prism::MultiTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14130 + # pkg:gem/prism#lib/prism/node.rb:14130 sig { override.returns(String) } def inspect; end @@ -25918,7 +25274,7 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b, c) = 1, 2, 3, 4, 5 # ^^^^ # - # source://prism//lib/prism/node.rb#14051 + # pkg:gem/prism#lib/prism/node.rb:14051 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end @@ -25926,7 +25282,7 @@ class Prism::MultiTargetNode < ::Prism::Node # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#14120 + # pkg:gem/prism#lib/prism/node.rb:14120 sig { returns(T.nilable(String)) } def lparen; end @@ -25935,7 +25291,7 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b, c) = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#14079 + # pkg:gem/prism#lib/prism/node.rb:14079 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end @@ -25954,7 +25310,7 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b,) = 1, 2, 3, 4 # ^ # - # source://prism//lib/prism/node.rb#14067 + # pkg:gem/prism#lib/prism/node.rb:14067 sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } def rest; end @@ -25963,7 +25319,7 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (*, b, c) = 1, 2, 3, 4, 5 # ^^^^ # - # source://prism//lib/prism/node.rb#14073 + # pkg:gem/prism#lib/prism/node.rb:14073 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end @@ -25971,7 +25327,7 @@ class Prism::MultiTargetNode < ::Prism::Node # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#14125 + # pkg:gem/prism#lib/prism/node.rb:14125 sig { returns(T.nilable(String)) } def rparen; end @@ -25980,32 +25336,32 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b, c) = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#14101 + # pkg:gem/prism#lib/prism/node.rb:14101 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14093 + # pkg:gem/prism#lib/prism/node.rb:14093 def save_lparen_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14115 + # pkg:gem/prism#lib/prism/node.rb:14115 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14135 + # pkg:gem/prism#lib/prism/node.rb:14135 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14140 + # pkg:gem/prism#lib/prism/node.rb:14140 def type; end end end @@ -26015,13 +25371,11 @@ end # a, b, c = 1, 2, 3 # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14162 +# pkg:gem/prism#lib/prism/node.rb:14162 class Prism::MultiWriteNode < ::Prism::Node # Initialize a new MultiWriteNode node. # - # @return [MultiWriteNode] a new instance of MultiWriteNode - # - # source://prism//lib/prism/node.rb#14164 + # pkg:gem/prism#lib/prism/node.rb:14164 sig do params( source: Prism::Source, @@ -26042,36 +25396,36 @@ class Prism::MultiWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14357 + # pkg:gem/prism#lib/prism/node.rb:14357 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14179 + # pkg:gem/prism#lib/prism/node.rb:14179 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14184 + # pkg:gem/prism#lib/prism/node.rb:14184 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14209 + # pkg:gem/prism#lib/prism/node.rb:14209 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14199 + # pkg:gem/prism#lib/prism/node.rb:14199 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node) -> MultiWriteNode # - # source://prism//lib/prism/node.rb#14214 + # pkg:gem/prism#lib/prism/node.rb:14214 sig do params( node_id: Integer, @@ -26088,24 +25442,21 @@ class Prism::MultiWriteNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14184 + # pkg:gem/prism#lib/prism/node.rb:14219 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#14222 + # pkg:gem/prism#lib/prism/node.rb:14222 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [rest] - # - # source://prism//lib/prism/node.rb#14189 + # pkg:gem/prism#lib/prism/node.rb:14189 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -26113,7 +25464,7 @@ class Prism::MultiWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14341 + # pkg:gem/prism#lib/prism/node.rb:14341 sig { override.returns(String) } def inspect; end @@ -26127,7 +25478,7 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, c = 1, 2, 3, 4, 5 # ^^^^^^^ # - # source://prism//lib/prism/node.rb#14235 + # pkg:gem/prism#lib/prism/node.rb:14235 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end @@ -26135,7 +25486,7 @@ class Prism::MultiWriteNode < ::Prism::Node # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#14326 + # pkg:gem/prism#lib/prism/node.rb:14326 sig { returns(T.nilable(String)) } def lparen; end @@ -26144,13 +25495,13 @@ class Prism::MultiWriteNode < ::Prism::Node # (a, b, c) = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#14263 + # pkg:gem/prism#lib/prism/node.rb:14263 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14336 + # pkg:gem/prism#lib/prism/node.rb:14336 sig { returns(String) } def operator; end @@ -26159,7 +25510,7 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, c = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#14307 + # pkg:gem/prism#lib/prism/node.rb:14307 sig { returns(Prism::Location) } def operator_loc; end @@ -26178,7 +25529,7 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, = 1, 2, 3, 4 # ^ # - # source://prism//lib/prism/node.rb#14251 + # pkg:gem/prism#lib/prism/node.rb:14251 sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } def rest; end @@ -26187,7 +25538,7 @@ class Prism::MultiWriteNode < ::Prism::Node # a, *, b, c = 1, 2, 3, 4, 5 # ^^^^ # - # source://prism//lib/prism/node.rb#14257 + # pkg:gem/prism#lib/prism/node.rb:14257 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end @@ -26195,7 +25546,7 @@ class Prism::MultiWriteNode < ::Prism::Node # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#14331 + # pkg:gem/prism#lib/prism/node.rb:14331 sig { returns(T.nilable(String)) } def rparen; end @@ -26204,31 +25555,31 @@ class Prism::MultiWriteNode < ::Prism::Node # (a, b, c) = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#14285 + # pkg:gem/prism#lib/prism/node.rb:14285 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14277 + # pkg:gem/prism#lib/prism/node.rb:14277 def save_lparen_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14315 + # pkg:gem/prism#lib/prism/node.rb:14315 def save_operator_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14299 + # pkg:gem/prism#lib/prism/node.rb:14299 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14346 + # pkg:gem/prism#lib/prism/node.rb:14346 sig { override.returns(Symbol) } def type; end @@ -26237,14 +25588,14 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, c = 1, 2, 3 # ^^^^^^^ # - # source://prism//lib/prism/node.rb#14323 + # pkg:gem/prism#lib/prism/node.rb:14323 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14351 + # pkg:gem/prism#lib/prism/node.rb:14351 def type; end end end @@ -26253,761 +25604,761 @@ end # visited. This is useful for consumers that want to mutate the tree, as you # can change subtrees in place without effecting the rest of the tree. # -# source://prism//lib/prism/mutation_compiler.rb#16 +# pkg:gem/prism#lib/prism/mutation_compiler.rb:16 class Prism::MutationCompiler < ::Prism::Compiler # Copy a AliasGlobalVariableNode node # - # source://prism//lib/prism/mutation_compiler.rb#18 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:18 def visit_alias_global_variable_node(node); end # Copy a AliasMethodNode node # - # source://prism//lib/prism/mutation_compiler.rb#23 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:23 def visit_alias_method_node(node); end # Copy a AlternationPatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#28 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:28 def visit_alternation_pattern_node(node); end # Copy a AndNode node # - # source://prism//lib/prism/mutation_compiler.rb#33 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:33 def visit_and_node(node); end # Copy a ArgumentsNode node # - # source://prism//lib/prism/mutation_compiler.rb#38 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:38 def visit_arguments_node(node); end # Copy a ArrayNode node # - # source://prism//lib/prism/mutation_compiler.rb#43 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:43 def visit_array_node(node); end # Copy a ArrayPatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#48 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:48 def visit_array_pattern_node(node); end # Copy a AssocNode node # - # source://prism//lib/prism/mutation_compiler.rb#53 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:53 def visit_assoc_node(node); end # Copy a AssocSplatNode node # - # source://prism//lib/prism/mutation_compiler.rb#58 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:58 def visit_assoc_splat_node(node); end # Copy a BackReferenceReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#63 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:63 def visit_back_reference_read_node(node); end # Copy a BeginNode node # - # source://prism//lib/prism/mutation_compiler.rb#68 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:68 def visit_begin_node(node); end # Copy a BlockArgumentNode node # - # source://prism//lib/prism/mutation_compiler.rb#73 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:73 def visit_block_argument_node(node); end # Copy a BlockLocalVariableNode node # - # source://prism//lib/prism/mutation_compiler.rb#78 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:78 def visit_block_local_variable_node(node); end # Copy a BlockNode node # - # source://prism//lib/prism/mutation_compiler.rb#83 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:83 def visit_block_node(node); end # Copy a BlockParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#88 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:88 def visit_block_parameter_node(node); end # Copy a BlockParametersNode node # - # source://prism//lib/prism/mutation_compiler.rb#93 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:93 def visit_block_parameters_node(node); end # Copy a BreakNode node # - # source://prism//lib/prism/mutation_compiler.rb#98 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:98 def visit_break_node(node); end # Copy a CallAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#103 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:103 def visit_call_and_write_node(node); end # Copy a CallNode node # - # source://prism//lib/prism/mutation_compiler.rb#108 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:108 def visit_call_node(node); end # Copy a CallOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#113 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:113 def visit_call_operator_write_node(node); end # Copy a CallOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#118 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:118 def visit_call_or_write_node(node); end # Copy a CallTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#123 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:123 def visit_call_target_node(node); end # Copy a CapturePatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#128 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:128 def visit_capture_pattern_node(node); end # Copy a CaseMatchNode node # - # source://prism//lib/prism/mutation_compiler.rb#133 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:133 def visit_case_match_node(node); end # Copy a CaseNode node # - # source://prism//lib/prism/mutation_compiler.rb#138 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:138 def visit_case_node(node); end # Copy a ClassNode node # - # source://prism//lib/prism/mutation_compiler.rb#143 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:143 def visit_class_node(node); end # Copy a ClassVariableAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#148 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:148 def visit_class_variable_and_write_node(node); end # Copy a ClassVariableOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#153 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:153 def visit_class_variable_operator_write_node(node); end # Copy a ClassVariableOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#158 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:158 def visit_class_variable_or_write_node(node); end # Copy a ClassVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#163 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:163 def visit_class_variable_read_node(node); end # Copy a ClassVariableTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#168 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:168 def visit_class_variable_target_node(node); end # Copy a ClassVariableWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#173 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:173 def visit_class_variable_write_node(node); end # Copy a ConstantAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#178 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:178 def visit_constant_and_write_node(node); end # Copy a ConstantOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#183 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:183 def visit_constant_operator_write_node(node); end # Copy a ConstantOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#188 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:188 def visit_constant_or_write_node(node); end # Copy a ConstantPathAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#193 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:193 def visit_constant_path_and_write_node(node); end # Copy a ConstantPathNode node # - # source://prism//lib/prism/mutation_compiler.rb#198 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:198 def visit_constant_path_node(node); end # Copy a ConstantPathOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#203 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:203 def visit_constant_path_operator_write_node(node); end # Copy a ConstantPathOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#208 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:208 def visit_constant_path_or_write_node(node); end # Copy a ConstantPathTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#213 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:213 def visit_constant_path_target_node(node); end # Copy a ConstantPathWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#218 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:218 def visit_constant_path_write_node(node); end # Copy a ConstantReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#223 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:223 def visit_constant_read_node(node); end # Copy a ConstantTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#228 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:228 def visit_constant_target_node(node); end # Copy a ConstantWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#233 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:233 def visit_constant_write_node(node); end # Copy a DefNode node # - # source://prism//lib/prism/mutation_compiler.rb#238 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:238 def visit_def_node(node); end # Copy a DefinedNode node # - # source://prism//lib/prism/mutation_compiler.rb#243 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:243 def visit_defined_node(node); end # Copy a ElseNode node # - # source://prism//lib/prism/mutation_compiler.rb#248 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:248 def visit_else_node(node); end # Copy a EmbeddedStatementsNode node # - # source://prism//lib/prism/mutation_compiler.rb#253 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:253 def visit_embedded_statements_node(node); end # Copy a EmbeddedVariableNode node # - # source://prism//lib/prism/mutation_compiler.rb#258 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:258 def visit_embedded_variable_node(node); end # Copy a EnsureNode node # - # source://prism//lib/prism/mutation_compiler.rb#263 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:263 def visit_ensure_node(node); end # Copy a FalseNode node # - # source://prism//lib/prism/mutation_compiler.rb#268 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:268 def visit_false_node(node); end # Copy a FindPatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#273 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:273 def visit_find_pattern_node(node); end # Copy a FlipFlopNode node # - # source://prism//lib/prism/mutation_compiler.rb#278 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:278 def visit_flip_flop_node(node); end # Copy a FloatNode node # - # source://prism//lib/prism/mutation_compiler.rb#283 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:283 def visit_float_node(node); end # Copy a ForNode node # - # source://prism//lib/prism/mutation_compiler.rb#288 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:288 def visit_for_node(node); end # Copy a ForwardingArgumentsNode node # - # source://prism//lib/prism/mutation_compiler.rb#293 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:293 def visit_forwarding_arguments_node(node); end # Copy a ForwardingParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#298 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:298 def visit_forwarding_parameter_node(node); end # Copy a ForwardingSuperNode node # - # source://prism//lib/prism/mutation_compiler.rb#303 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:303 def visit_forwarding_super_node(node); end # Copy a GlobalVariableAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#308 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:308 def visit_global_variable_and_write_node(node); end # Copy a GlobalVariableOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#313 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:313 def visit_global_variable_operator_write_node(node); end # Copy a GlobalVariableOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#318 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:318 def visit_global_variable_or_write_node(node); end # Copy a GlobalVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#323 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:323 def visit_global_variable_read_node(node); end # Copy a GlobalVariableTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#328 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:328 def visit_global_variable_target_node(node); end # Copy a GlobalVariableWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#333 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:333 def visit_global_variable_write_node(node); end # Copy a HashNode node # - # source://prism//lib/prism/mutation_compiler.rb#338 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:338 def visit_hash_node(node); end # Copy a HashPatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#343 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:343 def visit_hash_pattern_node(node); end # Copy a IfNode node # - # source://prism//lib/prism/mutation_compiler.rb#348 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:348 def visit_if_node(node); end # Copy a ImaginaryNode node # - # source://prism//lib/prism/mutation_compiler.rb#353 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:353 def visit_imaginary_node(node); end # Copy a ImplicitNode node # - # source://prism//lib/prism/mutation_compiler.rb#358 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:358 def visit_implicit_node(node); end # Copy a ImplicitRestNode node # - # source://prism//lib/prism/mutation_compiler.rb#363 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:363 def visit_implicit_rest_node(node); end # Copy a InNode node # - # source://prism//lib/prism/mutation_compiler.rb#368 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:368 def visit_in_node(node); end # Copy a IndexAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#373 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:373 def visit_index_and_write_node(node); end # Copy a IndexOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#378 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:378 def visit_index_operator_write_node(node); end # Copy a IndexOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#383 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:383 def visit_index_or_write_node(node); end # Copy a IndexTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#388 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:388 def visit_index_target_node(node); end # Copy a InstanceVariableAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#393 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:393 def visit_instance_variable_and_write_node(node); end # Copy a InstanceVariableOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#398 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:398 def visit_instance_variable_operator_write_node(node); end # Copy a InstanceVariableOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#403 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:403 def visit_instance_variable_or_write_node(node); end # Copy a InstanceVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#408 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:408 def visit_instance_variable_read_node(node); end # Copy a InstanceVariableTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#413 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:413 def visit_instance_variable_target_node(node); end # Copy a InstanceVariableWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#418 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:418 def visit_instance_variable_write_node(node); end # Copy a IntegerNode node # - # source://prism//lib/prism/mutation_compiler.rb#423 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:423 def visit_integer_node(node); end # Copy a InterpolatedMatchLastLineNode node # - # source://prism//lib/prism/mutation_compiler.rb#428 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:428 def visit_interpolated_match_last_line_node(node); end # Copy a InterpolatedRegularExpressionNode node # - # source://prism//lib/prism/mutation_compiler.rb#433 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:433 def visit_interpolated_regular_expression_node(node); end # Copy a InterpolatedStringNode node # - # source://prism//lib/prism/mutation_compiler.rb#438 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:438 def visit_interpolated_string_node(node); end # Copy a InterpolatedSymbolNode node # - # source://prism//lib/prism/mutation_compiler.rb#443 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:443 def visit_interpolated_symbol_node(node); end # Copy a InterpolatedXStringNode node # - # source://prism//lib/prism/mutation_compiler.rb#448 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:448 def visit_interpolated_x_string_node(node); end # Copy a ItLocalVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#453 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:453 def visit_it_local_variable_read_node(node); end # Copy a ItParametersNode node # - # source://prism//lib/prism/mutation_compiler.rb#458 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:458 def visit_it_parameters_node(node); end # Copy a KeywordHashNode node # - # source://prism//lib/prism/mutation_compiler.rb#463 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:463 def visit_keyword_hash_node(node); end # Copy a KeywordRestParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#468 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:468 def visit_keyword_rest_parameter_node(node); end # Copy a LambdaNode node # - # source://prism//lib/prism/mutation_compiler.rb#473 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:473 def visit_lambda_node(node); end # Copy a LocalVariableAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#478 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:478 def visit_local_variable_and_write_node(node); end # Copy a LocalVariableOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#483 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:483 def visit_local_variable_operator_write_node(node); end # Copy a LocalVariableOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#488 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:488 def visit_local_variable_or_write_node(node); end # Copy a LocalVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#493 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:493 def visit_local_variable_read_node(node); end # Copy a LocalVariableTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#498 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:498 def visit_local_variable_target_node(node); end # Copy a LocalVariableWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#503 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:503 def visit_local_variable_write_node(node); end # Copy a MatchLastLineNode node # - # source://prism//lib/prism/mutation_compiler.rb#508 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:508 def visit_match_last_line_node(node); end # Copy a MatchPredicateNode node # - # source://prism//lib/prism/mutation_compiler.rb#513 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:513 def visit_match_predicate_node(node); end # Copy a MatchRequiredNode node # - # source://prism//lib/prism/mutation_compiler.rb#518 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:518 def visit_match_required_node(node); end # Copy a MatchWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#523 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:523 def visit_match_write_node(node); end # Copy a MissingNode node # - # source://prism//lib/prism/mutation_compiler.rb#528 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:528 def visit_missing_node(node); end # Copy a ModuleNode node # - # source://prism//lib/prism/mutation_compiler.rb#533 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:533 def visit_module_node(node); end # Copy a MultiTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#538 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:538 def visit_multi_target_node(node); end # Copy a MultiWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#543 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:543 def visit_multi_write_node(node); end # Copy a NextNode node # - # source://prism//lib/prism/mutation_compiler.rb#548 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:548 def visit_next_node(node); end # Copy a NilNode node # - # source://prism//lib/prism/mutation_compiler.rb#553 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:553 def visit_nil_node(node); end # Copy a NoKeywordsParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#558 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:558 def visit_no_keywords_parameter_node(node); end # Copy a NumberedParametersNode node # - # source://prism//lib/prism/mutation_compiler.rb#563 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:563 def visit_numbered_parameters_node(node); end # Copy a NumberedReferenceReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#568 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:568 def visit_numbered_reference_read_node(node); end # Copy a OptionalKeywordParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#573 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:573 def visit_optional_keyword_parameter_node(node); end # Copy a OptionalParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#578 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:578 def visit_optional_parameter_node(node); end # Copy a OrNode node # - # source://prism//lib/prism/mutation_compiler.rb#583 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:583 def visit_or_node(node); end # Copy a ParametersNode node # - # source://prism//lib/prism/mutation_compiler.rb#588 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:588 def visit_parameters_node(node); end # Copy a ParenthesesNode node # - # source://prism//lib/prism/mutation_compiler.rb#593 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:593 def visit_parentheses_node(node); end # Copy a PinnedExpressionNode node # - # source://prism//lib/prism/mutation_compiler.rb#598 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:598 def visit_pinned_expression_node(node); end # Copy a PinnedVariableNode node # - # source://prism//lib/prism/mutation_compiler.rb#603 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:603 def visit_pinned_variable_node(node); end # Copy a PostExecutionNode node # - # source://prism//lib/prism/mutation_compiler.rb#608 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:608 def visit_post_execution_node(node); end # Copy a PreExecutionNode node # - # source://prism//lib/prism/mutation_compiler.rb#613 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:613 def visit_pre_execution_node(node); end # Copy a ProgramNode node # - # source://prism//lib/prism/mutation_compiler.rb#618 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:618 def visit_program_node(node); end # Copy a RangeNode node # - # source://prism//lib/prism/mutation_compiler.rb#623 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:623 def visit_range_node(node); end # Copy a RationalNode node # - # source://prism//lib/prism/mutation_compiler.rb#628 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:628 def visit_rational_node(node); end # Copy a RedoNode node # - # source://prism//lib/prism/mutation_compiler.rb#633 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:633 def visit_redo_node(node); end # Copy a RegularExpressionNode node # - # source://prism//lib/prism/mutation_compiler.rb#638 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:638 def visit_regular_expression_node(node); end # Copy a RequiredKeywordParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#643 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:643 def visit_required_keyword_parameter_node(node); end # Copy a RequiredParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#648 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:648 def visit_required_parameter_node(node); end # Copy a RescueModifierNode node # - # source://prism//lib/prism/mutation_compiler.rb#653 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:653 def visit_rescue_modifier_node(node); end # Copy a RescueNode node # - # source://prism//lib/prism/mutation_compiler.rb#658 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:658 def visit_rescue_node(node); end # Copy a RestParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#663 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:663 def visit_rest_parameter_node(node); end # Copy a RetryNode node # - # source://prism//lib/prism/mutation_compiler.rb#668 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:668 def visit_retry_node(node); end # Copy a ReturnNode node # - # source://prism//lib/prism/mutation_compiler.rb#673 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:673 def visit_return_node(node); end # Copy a SelfNode node # - # source://prism//lib/prism/mutation_compiler.rb#678 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:678 def visit_self_node(node); end # Copy a ShareableConstantNode node # - # source://prism//lib/prism/mutation_compiler.rb#683 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:683 def visit_shareable_constant_node(node); end # Copy a SingletonClassNode node # - # source://prism//lib/prism/mutation_compiler.rb#688 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:688 def visit_singleton_class_node(node); end # Copy a SourceEncodingNode node # - # source://prism//lib/prism/mutation_compiler.rb#693 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:693 def visit_source_encoding_node(node); end # Copy a SourceFileNode node # - # source://prism//lib/prism/mutation_compiler.rb#698 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:698 def visit_source_file_node(node); end # Copy a SourceLineNode node # - # source://prism//lib/prism/mutation_compiler.rb#703 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:703 def visit_source_line_node(node); end # Copy a SplatNode node # - # source://prism//lib/prism/mutation_compiler.rb#708 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:708 def visit_splat_node(node); end # Copy a StatementsNode node # - # source://prism//lib/prism/mutation_compiler.rb#713 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:713 def visit_statements_node(node); end # Copy a StringNode node # - # source://prism//lib/prism/mutation_compiler.rb#718 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:718 def visit_string_node(node); end # Copy a SuperNode node # - # source://prism//lib/prism/mutation_compiler.rb#723 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:723 def visit_super_node(node); end # Copy a SymbolNode node # - # source://prism//lib/prism/mutation_compiler.rb#728 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:728 def visit_symbol_node(node); end # Copy a TrueNode node # - # source://prism//lib/prism/mutation_compiler.rb#733 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:733 def visit_true_node(node); end # Copy a UndefNode node # - # source://prism//lib/prism/mutation_compiler.rb#738 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:738 def visit_undef_node(node); end # Copy a UnlessNode node # - # source://prism//lib/prism/mutation_compiler.rb#743 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:743 def visit_unless_node(node); end # Copy a UntilNode node # - # source://prism//lib/prism/mutation_compiler.rb#748 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:748 def visit_until_node(node); end # Copy a WhenNode node # - # source://prism//lib/prism/mutation_compiler.rb#753 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:753 def visit_when_node(node); end # Copy a WhileNode node # - # source://prism//lib/prism/mutation_compiler.rb#758 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:758 def visit_while_node(node); end # Copy a XStringNode node # - # source://prism//lib/prism/mutation_compiler.rb#763 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:763 def visit_x_string_node(node); end # Copy a YieldNode node # - # source://prism//lib/prism/mutation_compiler.rb#768 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:768 def visit_yield_node(node); end end @@ -27016,13 +26367,11 @@ end # next 1 # ^^^^^^ # -# source://prism//lib/prism/node.rb#14375 +# pkg:gem/prism#lib/prism/node.rb:14375 class Prism::NextNode < ::Prism::Node # Initialize a new NextNode node. # - # @return [NextNode] a new instance of NextNode - # - # source://prism//lib/prism/node.rb#14377 + # pkg:gem/prism#lib/prism/node.rb:14377 sig do params( source: Prism::Source, @@ -27038,42 +26387,42 @@ class Prism::NextNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14466 + # pkg:gem/prism#lib/prism/node.rb:14466 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14387 + # pkg:gem/prism#lib/prism/node.rb:14387 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#14429 + # pkg:gem/prism#lib/prism/node.rb:14429 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14392 + # pkg:gem/prism#lib/prism/node.rb:14392 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14411 + # pkg:gem/prism#lib/prism/node.rb:14411 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14404 + # pkg:gem/prism#lib/prism/node.rb:14404 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> NextNode # - # source://prism//lib/prism/node.rb#14416 + # pkg:gem/prism#lib/prism/node.rb:14416 sig do params( node_id: Integer, @@ -27085,24 +26434,21 @@ class Prism::NextNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14392 + # pkg:gem/prism#lib/prism/node.rb:14421 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#14424 + # pkg:gem/prism#lib/prism/node.rb:14424 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [arguments] - # - # source://prism//lib/prism/node.rb#14397 + # pkg:gem/prism#lib/prism/node.rb:14397 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27110,38 +26456,38 @@ class Prism::NextNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14450 + # pkg:gem/prism#lib/prism/node.rb:14450 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#14445 + # pkg:gem/prism#lib/prism/node.rb:14445 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#14432 + # pkg:gem/prism#lib/prism/node.rb:14432 sig { returns(Prism::Location) } def keyword_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14440 + # pkg:gem/prism#lib/prism/node.rb:14440 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14455 + # pkg:gem/prism#lib/prism/node.rb:14455 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14460 + # pkg:gem/prism#lib/prism/node.rb:14460 def type; end end end @@ -27151,68 +26497,65 @@ end # nil # ^^^ # -# source://prism//lib/prism/node.rb#14477 +# pkg:gem/prism#lib/prism/node.rb:14477 class Prism::NilNode < ::Prism::Node # Initialize a new NilNode node. # - # @return [NilNode] a new instance of NilNode - # - # source://prism//lib/prism/node.rb#14479 + # pkg:gem/prism#lib/prism/node.rb:14479 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14542 + # pkg:gem/prism#lib/prism/node.rb:14542 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14487 + # pkg:gem/prism#lib/prism/node.rb:14487 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14492 + # pkg:gem/prism#lib/prism/node.rb:14492 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14508 + # pkg:gem/prism#lib/prism/node.rb:14508 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14503 + # pkg:gem/prism#lib/prism/node.rb:14503 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> NilNode # - # source://prism//lib/prism/node.rb#14513 + # pkg:gem/prism#lib/prism/node.rb:14513 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::NilNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14492 + # pkg:gem/prism#lib/prism/node.rb:14518 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#14521 + # pkg:gem/prism#lib/prism/node.rb:14521 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#14497 + # pkg:gem/prism#lib/prism/node.rb:14497 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27220,20 +26563,20 @@ class Prism::NilNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14526 + # pkg:gem/prism#lib/prism/node.rb:14526 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14531 + # pkg:gem/prism#lib/prism/node.rb:14531 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14536 + # pkg:gem/prism#lib/prism/node.rb:14536 def type; end end end @@ -27244,13 +26587,11 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#14552 +# pkg:gem/prism#lib/prism/node.rb:14552 class Prism::NoKeywordsParameterNode < ::Prism::Node # Initialize a new NoKeywordsParameterNode node. # - # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode - # - # source://prism//lib/prism/node.rb#14554 + # pkg:gem/prism#lib/prism/node.rb:14554 sig do params( source: Prism::Source, @@ -27266,36 +26607,36 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14655 + # pkg:gem/prism#lib/prism/node.rb:14655 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14564 + # pkg:gem/prism#lib/prism/node.rb:14564 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14569 + # pkg:gem/prism#lib/prism/node.rb:14569 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14585 + # pkg:gem/prism#lib/prism/node.rb:14585 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14580 + # pkg:gem/prism#lib/prism/node.rb:14580 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?keyword_loc: Location) -> NoKeywordsParameterNode # - # source://prism//lib/prism/node.rb#14590 + # pkg:gem/prism#lib/prism/node.rb:14590 sig do params( node_id: Integer, @@ -27307,22 +26648,21 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14569 + # pkg:gem/prism#lib/prism/node.rb:14595 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#14598 + # pkg:gem/prism#lib/prism/node.rb:14598 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#14574 + # pkg:gem/prism#lib/prism/node.rb:14574 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27330,56 +26670,56 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14639 + # pkg:gem/prism#lib/prism/node.rb:14639 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#14634 + # pkg:gem/prism#lib/prism/node.rb:14634 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#14616 + # pkg:gem/prism#lib/prism/node.rb:14616 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14629 + # pkg:gem/prism#lib/prism/node.rb:14629 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14603 + # pkg:gem/prism#lib/prism/node.rb:14603 sig { returns(Prism::Location) } def operator_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14624 + # pkg:gem/prism#lib/prism/node.rb:14624 def save_keyword_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14611 + # pkg:gem/prism#lib/prism/node.rb:14611 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14644 + # pkg:gem/prism#lib/prism/node.rb:14644 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14649 + # pkg:gem/prism#lib/prism/node.rb:14649 def type; end end end @@ -27387,15 +26727,13 @@ end # This represents a node in the tree. It is the parent class of all of the # various node types. # -# source://prism//lib/prism/node.rb#15 +# pkg:gem/prism#lib/prism/node.rb:15 class Prism::Node abstract! # Accepts a visitor and calls back into the specialized visit function. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#269 + # pkg:gem/prism#lib/prism/node.rb:269 sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -27405,7 +26743,7 @@ class Prism::Node # # node.breadth_first_search { |node| node.node_id == node_id } # - # source://prism//lib/prism/node.rb#219 + # pkg:gem/prism#lib/prism/node.rb:219 sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T.nilable(Prism::Node)) } def breadth_first_search(&block); end @@ -27415,169 +26753,138 @@ class Prism::Node # # node.breadth_first_search_all { |node| node.is_a?(Prism::CallNode) } # - # source://prism//lib/prism/node.rb#237 + # pkg:gem/prism#lib/prism/node.rb:237 sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T::Array[Prism::Node]) } def breadth_first_search_all(&block); end # Delegates to the cached_end_code_units_column of the associated location # object. # - # source://prism//lib/prism/node.rb#118 + # pkg:gem/prism#lib/prism/node.rb:118 def cached_end_code_units_column(cache); end # Delegates to the cached_end_code_units_offset of the associated location # object. # - # source://prism//lib/prism/node.rb#86 + # pkg:gem/prism#lib/prism/node.rb:86 def cached_end_code_units_offset(cache); end # Delegates to the cached_start_code_units_column of the associated location # object. # - # source://prism//lib/prism/node.rb#112 + # pkg:gem/prism#lib/prism/node.rb:112 def cached_start_code_units_column(cache); end # Delegates to the cached_start_code_units_offset of the associated location # object. # - # source://prism//lib/prism/node.rb#80 + # pkg:gem/prism#lib/prism/node.rb:80 def cached_start_code_units_offset(cache); end # Returns an array of child nodes, including `nil`s in the place of optional # nodes that were not present. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#275 + # pkg:gem/prism#lib/prism/node.rb:275 sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # Returns an array of child nodes and locations that could potentially have # comments attached to them. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#296 + # pkg:gem/prism#lib/prism/node.rb:296 sig { abstract.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # Delegates to the comments of the associated location object. # - # source://prism//lib/prism/node.rb#133 + # pkg:gem/prism#lib/prism/node.rb:133 def comments; end # Returns an array of child nodes, excluding any `nil`s in the place of # optional nodes that were not present. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#290 + # pkg:gem/prism#lib/prism/node.rb:290 sig { abstract.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # Returns an array of child nodes, including `nil`s in the place of optional - # nodes that were not present. - # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#275 + # pkg:gem/prism#lib/prism/node.rb:279 sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # source://prism//lib/prism/node_ext.rb#10 + # pkg:gem/prism#lib/prism/node_ext.rb:10 def deprecated(*replacements); end # With a block given, yields each child node. Without a block, returns # an enumerator that contains each child node. Excludes any `nil`s in # the place of optional nodes that were not present. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#284 + # pkg:gem/prism#lib/prism/node.rb:284 def each_child_node; end # Delegates to the end_character_column of the associated location object. # - # source://prism//lib/prism/node.rb#106 + # pkg:gem/prism#lib/prism/node.rb:106 def end_character_column; end # Delegates to the end_character_offset of the associated location object. # - # source://prism//lib/prism/node.rb#74 + # pkg:gem/prism#lib/prism/node.rb:74 def end_character_offset; end # Delegates to the end_column of the associated location object. # - # source://prism//lib/prism/node.rb#96 + # pkg:gem/prism#lib/prism/node.rb:96 def end_column; end # Delegates to the end_line of the associated location object. # - # source://prism//lib/prism/node.rb#50 + # pkg:gem/prism#lib/prism/node.rb:50 def end_line; end # The end offset of the node in the source. This method is effectively a # delegate method to the location object. # - # source://prism//lib/prism/node.rb#63 + # pkg:gem/prism#lib/prism/node.rb:63 sig { returns(Integer) } def end_offset; end sig { abstract.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # Returns the first node that matches the given block when visited in a - # breadth-first search. This is useful for finding a node that matches a - # particular condition. - # - # node.breadth_first_search { |node| node.node_id == node_id } - # - # source://prism//lib/prism/node.rb#219 + # pkg:gem/prism#lib/prism/node.rb:229 def find(&block); end - # Returns all of the nodes that match the given block when visited in a - # breadth-first search. This is useful for finding all nodes that match a - # particular condition. - # - # node.breadth_first_search_all { |node| node.is_a?(Prism::CallNode) } - # - # source://prism//lib/prism/node.rb#237 + # pkg:gem/prism#lib/prism/node.rb:248 def find_all(&block); end # Returns a string representation of the node. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#301 + # pkg:gem/prism#lib/prism/node.rb:301 sig { abstract.returns(String) } def inspect; end # Delegates to the leading_comments of the associated location object. # - # source://prism//lib/prism/node.rb#123 + # pkg:gem/prism#lib/prism/node.rb:123 def leading_comments; end # A Location instance that represents the location of this node in the # source. # - # source://prism//lib/prism/node.rb#33 + # pkg:gem/prism#lib/prism/node.rb:33 sig { returns(Prism::Location) } def location; end # Returns true if the node has the newline flag set. # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#164 + # pkg:gem/prism#lib/prism/node.rb:164 sig { returns(T::Boolean) } def newline?; end - # source://prism//lib/prism/parse_result/newlines.rb#70 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:70 def newline_flag!(lines); end - # @return [Boolean] - # - # source://prism//lib/prism/parse_result/newlines.rb#66 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:66 def newline_flag?; end # A unique identifier for this node. This is used in a very specific @@ -27585,38 +26892,37 @@ class Prism::Node # having to keep around the syntax tree in memory. This unique identifier # will be consistent across multiple parses of the same source code. # - # source://prism//lib/prism/node.rb#24 + # pkg:gem/prism#lib/prism/node.rb:24 sig { returns(Integer) } def node_id; end # Similar to inspect, but respects the current level of indentation given by # the pretty print object. # - # source://prism//lib/prism/node.rb#175 + # pkg:gem/prism#lib/prism/node.rb:175 sig { params(q: T.untyped).void } def pretty_print(q); end # Save this node using a saved source so that it can be retrieved later. # - # source://prism//lib/prism/node.rb#27 + # pkg:gem/prism#lib/prism/node.rb:27 def save(repository); end # Save the location using a saved source so that it can be retrieved later. # - # source://prism//lib/prism/node.rb#40 + # pkg:gem/prism#lib/prism/node.rb:40 def save_location(repository); end - # Returns all of the lines of the source code associated with this node. # An alias for source_lines, used to mimic the API from # RubyVM::AbstractSyntaxTree to make it easier to migrate. # - # source://prism//lib/prism/node.rb#138 + # pkg:gem/prism#lib/prism/node.rb:144 sig { returns(T::Array[String]) } def script_lines; end # Slice the location of the node from the source. # - # source://prism//lib/prism/node.rb#147 + # pkg:gem/prism#lib/prism/node.rb:147 sig { returns(String) } def slice; end @@ -27624,60 +26930,58 @@ class Prism::Node # of the line that the location starts on, ending at the end of the line # that the location ends on. # - # source://prism//lib/prism/node.rb#154 + # pkg:gem/prism#lib/prism/node.rb:154 sig { returns(String) } def slice_lines; end # Returns all of the lines of the source code associated with this node. # - # source://prism//lib/prism/node.rb#138 + # pkg:gem/prism#lib/prism/node.rb:138 sig { returns(T::Array[String]) } def source_lines; end # Delegates to the start_character_column of the associated location object. # - # source://prism//lib/prism/node.rb#101 + # pkg:gem/prism#lib/prism/node.rb:101 def start_character_column; end # Delegates to the start_character_offset of the associated location object. # - # source://prism//lib/prism/node.rb#69 + # pkg:gem/prism#lib/prism/node.rb:69 def start_character_offset; end # Delegates to the start_column of the associated location object. # - # source://prism//lib/prism/node.rb#91 + # pkg:gem/prism#lib/prism/node.rb:91 def start_column; end # Delegates to the start_line of the associated location object. # - # source://prism//lib/prism/node.rb#45 + # pkg:gem/prism#lib/prism/node.rb:45 def start_line; end # The start offset of the node in the source. This method is effectively a # delegate method to the location object. # - # source://prism//lib/prism/node.rb#56 + # pkg:gem/prism#lib/prism/node.rb:56 sig { returns(Integer) } def start_offset; end # Returns true if the node has the static literal flag set. # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#169 + # pkg:gem/prism#lib/prism/node.rb:169 sig { returns(T::Boolean) } def static_literal?; end # Convert this node into a graphviz dot graph string. # - # source://prism//lib/prism/node.rb#183 + # pkg:gem/prism#lib/prism/node.rb:183 sig { returns(String) } def to_dot; end # Delegates to the trailing_comments of the associated location object. # - # source://prism//lib/prism/node.rb#128 + # pkg:gem/prism#lib/prism/node.rb:128 def trailing_comments; end # Returns a list of nodes that are descendants of this node that contain the @@ -27687,7 +26991,7 @@ class Prism::Node # Important to note is that the column given to this method should be in # bytes, as opposed to characters or code units. # - # source://prism//lib/prism/node.rb#194 + # pkg:gem/prism#lib/prism/node.rb:194 sig { params(line: Integer, column: Integer).returns(T::Array[Prism::Node]) } def tunnel(line, column); end @@ -27704,9 +27008,7 @@ class Prism::Node # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#317 + # pkg:gem/prism#lib/prism/node.rb:317 sig { abstract.returns(Symbol) } def type; end @@ -27715,7 +27017,7 @@ class Prism::Node # An bitset of flags for this node. There are certain flags that are common # for all nodes, and then some nodes have specific flags. # - # source://prism//lib/prism/node.rb#160 + # pkg:gem/prism#lib/prism/node.rb:160 sig { returns(Integer) } def flags; end @@ -27723,7 +27025,7 @@ class Prism::Node # A pointer to the source that this node was created from. # - # source://prism//lib/prism/node.rb#17 + # pkg:gem/prism#lib/prism/node.rb:17 sig { returns(Prism::Source) } def source; end @@ -27732,9 +27034,7 @@ class Prism::Node # describe the structure of the node. This kind of reflection is useful for # things like recursively visiting each node _and_ field in the tree. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#253 + # pkg:gem/prism#lib/prism/node.rb:253 def fields; end # Similar to #type, this method returns a symbol that you can use for @@ -27742,28 +27042,26 @@ class Prism::Node # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#325 + # pkg:gem/prism#lib/prism/node.rb:325 def type; end end end # The flags that are common to all nodes. # -# source://prism//lib/prism/node.rb#19957 +# pkg:gem/prism#lib/prism/node.rb:19957 module Prism::NodeFlags; end # A flag to indicate that the node is a candidate to emit a :line event # through tracepoint when compiled. # -# source://prism//lib/prism/node.rb#19960 +# pkg:gem/prism#lib/prism/node.rb:19960 Prism::NodeFlags::NEWLINE = T.let(T.unsafe(nil), Integer) # A flag to indicate that the value that the node represents is a value that # can be determined at parse-time. # -# source://prism//lib/prism/node.rb#19964 +# pkg:gem/prism#lib/prism/node.rb:19964 Prism::NodeFlags::STATIC_LITERAL = T.let(T.unsafe(nil), Integer) # Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. @@ -27771,13 +27069,11 @@ Prism::NodeFlags::STATIC_LITERAL = T.let(T.unsafe(nil), Integer) # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14666 +# pkg:gem/prism#lib/prism/node.rb:14666 class Prism::NumberedParametersNode < ::Prism::Node # Initialize a new NumberedParametersNode node. # - # @return [NumberedParametersNode] a new instance of NumberedParametersNode - # - # source://prism//lib/prism/node.rb#14668 + # pkg:gem/prism#lib/prism/node.rb:14668 sig do params( source: Prism::Source, @@ -27792,36 +27088,36 @@ class Prism::NumberedParametersNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14735 + # pkg:gem/prism#lib/prism/node.rb:14735 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14677 + # pkg:gem/prism#lib/prism/node.rb:14677 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14682 + # pkg:gem/prism#lib/prism/node.rb:14682 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14698 + # pkg:gem/prism#lib/prism/node.rb:14698 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14693 + # pkg:gem/prism#lib/prism/node.rb:14693 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?maximum: Integer) -> NumberedParametersNode # - # source://prism//lib/prism/node.rb#14703 + # pkg:gem/prism#lib/prism/node.rb:14703 sig do params( node_id: Integer, @@ -27832,22 +27128,21 @@ class Prism::NumberedParametersNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14682 + # pkg:gem/prism#lib/prism/node.rb:14708 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, maximum: Integer } # - # source://prism//lib/prism/node.rb#14711 + # pkg:gem/prism#lib/prism/node.rb:14711 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#14687 + # pkg:gem/prism#lib/prism/node.rb:14687 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27855,26 +27150,26 @@ class Prism::NumberedParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14719 + # pkg:gem/prism#lib/prism/node.rb:14719 sig { override.returns(String) } def inspect; end # attr_reader maximum: Integer # - # source://prism//lib/prism/node.rb#14716 + # pkg:gem/prism#lib/prism/node.rb:14716 sig { returns(Integer) } def maximum; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14724 + # pkg:gem/prism#lib/prism/node.rb:14724 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14729 + # pkg:gem/prism#lib/prism/node.rb:14729 def type; end end end @@ -27884,13 +27179,11 @@ end # $1 # ^^ # -# source://prism//lib/prism/node.rb#14745 +# pkg:gem/prism#lib/prism/node.rb:14745 class Prism::NumberedReferenceReadNode < ::Prism::Node # Initialize a new NumberedReferenceReadNode node. # - # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode - # - # source://prism//lib/prism/node.rb#14747 + # pkg:gem/prism#lib/prism/node.rb:14747 sig do params( source: Prism::Source, @@ -27905,36 +27198,36 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14820 + # pkg:gem/prism#lib/prism/node.rb:14820 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14756 + # pkg:gem/prism#lib/prism/node.rb:14756 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14761 + # pkg:gem/prism#lib/prism/node.rb:14761 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14777 + # pkg:gem/prism#lib/prism/node.rb:14777 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14772 + # pkg:gem/prism#lib/prism/node.rb:14772 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?number: Integer) -> NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#14782 + # pkg:gem/prism#lib/prism/node.rb:14782 sig do params( node_id: Integer, @@ -27945,22 +27238,21 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14761 + # pkg:gem/prism#lib/prism/node.rb:14787 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, number: Integer } # - # source://prism//lib/prism/node.rb#14790 + # pkg:gem/prism#lib/prism/node.rb:14790 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#14766 + # pkg:gem/prism#lib/prism/node.rb:14766 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27968,7 +27260,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14804 + # pkg:gem/prism#lib/prism/node.rb:14804 sig { override.returns(String) } def inspect; end @@ -27980,20 +27272,20 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # $4294967296 # number `0` # - # source://prism//lib/prism/node.rb#14801 + # pkg:gem/prism#lib/prism/node.rb:14801 sig { returns(Integer) } def number; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14809 + # pkg:gem/prism#lib/prism/node.rb:14809 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14814 + # pkg:gem/prism#lib/prism/node.rb:14814 def type; end end end @@ -28004,13 +27296,11 @@ end # ^^^^ # end # -# source://prism//lib/prism/node.rb#14831 +# pkg:gem/prism#lib/prism/node.rb:14831 class Prism::OptionalKeywordParameterNode < ::Prism::Node # Initialize a new OptionalKeywordParameterNode node. # - # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode - # - # source://prism//lib/prism/node.rb#14833 + # pkg:gem/prism#lib/prism/node.rb:14833 sig do params( source: Prism::Source, @@ -28027,36 +27317,36 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14924 + # pkg:gem/prism#lib/prism/node.rb:14924 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14844 + # pkg:gem/prism#lib/prism/node.rb:14844 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14849 + # pkg:gem/prism#lib/prism/node.rb:14849 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14866 + # pkg:gem/prism#lib/prism/node.rb:14866 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14861 + # pkg:gem/prism#lib/prism/node.rb:14861 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node) -> OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#14871 + # pkg:gem/prism#lib/prism/node.rb:14871 sig do params( node_id: Integer, @@ -28069,24 +27359,21 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14849 + # pkg:gem/prism#lib/prism/node.rb:14876 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#14879 + # pkg:gem/prism#lib/prism/node.rb:14879 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#14854 + # pkg:gem/prism#lib/prism/node.rb:14854 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -28094,52 +27381,50 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14908 + # pkg:gem/prism#lib/prism/node.rb:14908 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#14889 + # pkg:gem/prism#lib/prism/node.rb:14889 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#14892 + # pkg:gem/prism#lib/prism/node.rb:14892 sig { returns(Prism::Location) } def name_loc; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14884 + # pkg:gem/prism#lib/prism/node.rb:14884 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14900 + # pkg:gem/prism#lib/prism/node.rb:14900 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14913 + # pkg:gem/prism#lib/prism/node.rb:14913 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#14905 + # pkg:gem/prism#lib/prism/node.rb:14905 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14918 + # pkg:gem/prism#lib/prism/node.rb:14918 def type; end end end @@ -28150,13 +27435,11 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#14938 +# pkg:gem/prism#lib/prism/node.rb:14938 class Prism::OptionalParameterNode < ::Prism::Node # Initialize a new OptionalParameterNode node. # - # @return [OptionalParameterNode] a new instance of OptionalParameterNode - # - # source://prism//lib/prism/node.rb#14940 + # pkg:gem/prism#lib/prism/node.rb:14940 sig do params( source: Prism::Source, @@ -28174,36 +27457,36 @@ class Prism::OptionalParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15050 + # pkg:gem/prism#lib/prism/node.rb:15050 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14952 + # pkg:gem/prism#lib/prism/node.rb:14952 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14957 + # pkg:gem/prism#lib/prism/node.rb:14957 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14974 + # pkg:gem/prism#lib/prism/node.rb:14974 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14969 + # pkg:gem/prism#lib/prism/node.rb:14969 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> OptionalParameterNode # - # source://prism//lib/prism/node.rb#14979 + # pkg:gem/prism#lib/prism/node.rb:14979 sig do params( node_id: Integer, @@ -28217,24 +27500,21 @@ class Prism::OptionalParameterNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14957 + # pkg:gem/prism#lib/prism/node.rb:14984 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#14987 + # pkg:gem/prism#lib/prism/node.rb:14987 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [value] - # - # source://prism//lib/prism/node.rb#14962 + # pkg:gem/prism#lib/prism/node.rb:14962 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -28242,70 +27522,68 @@ class Prism::OptionalParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15034 + # pkg:gem/prism#lib/prism/node.rb:15034 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#14997 + # pkg:gem/prism#lib/prism/node.rb:14997 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#15000 + # pkg:gem/prism#lib/prism/node.rb:15000 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15029 + # pkg:gem/prism#lib/prism/node.rb:15029 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#15013 + # pkg:gem/prism#lib/prism/node.rb:15013 sig { returns(Prism::Location) } def operator_loc; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14992 + # pkg:gem/prism#lib/prism/node.rb:14992 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15008 + # pkg:gem/prism#lib/prism/node.rb:15008 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15021 + # pkg:gem/prism#lib/prism/node.rb:15021 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15039 + # pkg:gem/prism#lib/prism/node.rb:15039 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#15026 + # pkg:gem/prism#lib/prism/node.rb:15026 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15044 + # pkg:gem/prism#lib/prism/node.rb:15044 def type; end end end @@ -28315,13 +27593,11 @@ end # left or right # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15064 +# pkg:gem/prism#lib/prism/node.rb:15064 class Prism::OrNode < ::Prism::Node # Initialize a new OrNode node. # - # @return [OrNode] a new instance of OrNode - # - # source://prism//lib/prism/node.rb#15066 + # pkg:gem/prism#lib/prism/node.rb:15066 sig do params( source: Prism::Source, @@ -28338,36 +27614,36 @@ class Prism::OrNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15173 + # pkg:gem/prism#lib/prism/node.rb:15173 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15077 + # pkg:gem/prism#lib/prism/node.rb:15077 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15082 + # pkg:gem/prism#lib/prism/node.rb:15082 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15100 + # pkg:gem/prism#lib/prism/node.rb:15100 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15095 + # pkg:gem/prism#lib/prism/node.rb:15095 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> OrNode # - # source://prism//lib/prism/node.rb#15105 + # pkg:gem/prism#lib/prism/node.rb:15105 sig do params( node_id: Integer, @@ -28380,24 +27656,21 @@ class Prism::OrNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15082 + # pkg:gem/prism#lib/prism/node.rb:15110 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#15113 + # pkg:gem/prism#lib/prism/node.rb:15113 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [left] - # - # source://prism//lib/prism/node.rb#15087 + # pkg:gem/prism#lib/prism/node.rb:15087 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -28405,7 +27678,7 @@ class Prism::OrNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15157 + # pkg:gem/prism#lib/prism/node.rb:15157 sig { override.returns(String) } def inspect; end @@ -28417,13 +27690,13 @@ class Prism::OrNode < ::Prism::Node # 1 || 2 # ^ # - # source://prism//lib/prism/node.rb#15124 + # pkg:gem/prism#lib/prism/node.rb:15124 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15152 + # pkg:gem/prism#lib/prism/node.rb:15152 sig { returns(String) } def operator; end @@ -28432,7 +27705,7 @@ class Prism::OrNode < ::Prism::Node # left or right # ^^ # - # source://prism//lib/prism/node.rb#15139 + # pkg:gem/prism#lib/prism/node.rb:15139 sig { returns(Prism::Location) } def operator_loc; end @@ -28444,280 +27717,277 @@ class Prism::OrNode < ::Prism::Node # 1 or 2 # ^ # - # source://prism//lib/prism/node.rb#15133 + # pkg:gem/prism#lib/prism/node.rb:15133 sig { returns(Prism::Node) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15147 + # pkg:gem/prism#lib/prism/node.rb:15147 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15162 + # pkg:gem/prism#lib/prism/node.rb:15162 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15167 + # pkg:gem/prism#lib/prism/node.rb:15167 def type; end end end # A parser for the pack template language. # -# source://prism//lib/prism/pack.rb#8 +# pkg:gem/prism#lib/prism/pack.rb:8 module Prism::Pack class << self + # pkg:gem/prism#lib/prism.rb:92 def parse(_arg0, _arg1, _arg2); end end end -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) # A directive in the pack template language. # -# source://prism//lib/prism/pack.rb#62 +# pkg:gem/prism#lib/prism/pack.rb:62 class Prism::Pack::Directive # Initialize a new directive with the given values. # - # @return [Directive] a new instance of Directive - # - # source://prism//lib/prism/pack.rb#91 + # pkg:gem/prism#lib/prism/pack.rb:91 def initialize(version, variant, source, type, signed, endian, size, length_type, length); end # Provide a human-readable description of the directive. # - # source://prism//lib/prism/pack.rb#133 + # pkg:gem/prism#lib/prism/pack.rb:133 def describe; end # The type of endianness of the directive. # - # source://prism//lib/prism/pack.rb#79 + # pkg:gem/prism#lib/prism/pack.rb:79 def endian; end # The length of this directive (used for integers). # - # source://prism//lib/prism/pack.rb#88 + # pkg:gem/prism#lib/prism/pack.rb:88 def length; end # The length type of this directive (used for integers). # - # source://prism//lib/prism/pack.rb#85 + # pkg:gem/prism#lib/prism/pack.rb:85 def length_type; end # The type of signedness of the directive. # - # source://prism//lib/prism/pack.rb#76 + # pkg:gem/prism#lib/prism/pack.rb:76 def signed; end # The size of the directive. # - # source://prism//lib/prism/pack.rb#82 + # pkg:gem/prism#lib/prism/pack.rb:82 def size; end # A byteslice of the source string that this directive represents. # - # source://prism//lib/prism/pack.rb#70 + # pkg:gem/prism#lib/prism/pack.rb:70 def source; end # The type of the directive. # - # source://prism//lib/prism/pack.rb#73 + # pkg:gem/prism#lib/prism/pack.rb:73 def type; end # A symbol representing whether or not we are packing or unpacking. # - # source://prism//lib/prism/pack.rb#67 + # pkg:gem/prism#lib/prism/pack.rb:67 def variant; end # A symbol representing the version of Ruby. # - # source://prism//lib/prism/pack.rb#64 + # pkg:gem/prism#lib/prism/pack.rb:64 def version; end end # The descriptions of the various types of endianness. # -# source://prism//lib/prism/pack.rb#104 +# pkg:gem/prism#lib/prism/pack.rb:104 Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) # The descriptions of the various types of signedness. # -# source://prism//lib/prism/pack.rb#113 +# pkg:gem/prism#lib/prism/pack.rb:113 Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) # The descriptions of the various types of sizes. # -# source://prism//lib/prism/pack.rb#120 +# pkg:gem/prism#lib/prism/pack.rb:120 Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) # The result of parsing a pack template. # -# source://prism//lib/prism/pack.rb#200 +# pkg:gem/prism#lib/prism/pack.rb:200 class Prism::Pack::Format # Create a new Format with the given directives and encoding. # - # @return [Format] a new instance of Format - # - # source://prism//lib/prism/pack.rb#208 + # pkg:gem/prism#lib/prism/pack.rb:208 def initialize(directives, encoding); end # Provide a human-readable description of the format. # - # source://prism//lib/prism/pack.rb#214 + # pkg:gem/prism#lib/prism/pack.rb:214 def describe; end # A list of the directives in the template. # - # source://prism//lib/prism/pack.rb#202 + # pkg:gem/prism#lib/prism/pack.rb:202 def directives; end # The encoding of the template. # - # source://prism//lib/prism/pack.rb#205 + # pkg:gem/prism#lib/prism/pack.rb:205 def encoding; end end -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#58 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) # Flags for parameter nodes. # -# source://prism//lib/prism/node.rb#19864 +# pkg:gem/prism#lib/prism/node.rb:19864 module Prism::ParameterFlags; end # a parameter name that has been repeated in the method signature # -# source://prism//lib/prism/node.rb#19866 +# pkg:gem/prism#lib/prism/node.rb:19866 Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # Represents the list of parameters on a method, block, or lambda definition. @@ -28726,13 +27996,11 @@ Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # ^^^^^^^ # end # -# source://prism//lib/prism/node.rb#15186 +# pkg:gem/prism#lib/prism/node.rb:15186 class Prism::ParametersNode < ::Prism::Node # Initialize a new ParametersNode node. # - # @return [ParametersNode] a new instance of ParametersNode - # - # source://prism//lib/prism/node.rb#15188 + # pkg:gem/prism#lib/prism/node.rb:15188 sig do params( source: Prism::Source, @@ -28753,42 +28021,42 @@ class Prism::ParametersNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15294 + # pkg:gem/prism#lib/prism/node.rb:15294 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15203 + # pkg:gem/prism#lib/prism/node.rb:15203 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockParameterNode? # - # source://prism//lib/prism/node.rb#15275 + # pkg:gem/prism#lib/prism/node.rb:15275 sig { returns(T.nilable(Prism::BlockParameterNode)) } def block; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15208 + # pkg:gem/prism#lib/prism/node.rb:15208 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15239 + # pkg:gem/prism#lib/prism/node.rb:15239 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15226 + # pkg:gem/prism#lib/prism/node.rb:15226 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?) -> ParametersNode # - # source://prism//lib/prism/node.rb#15244 + # pkg:gem/prism#lib/prism/node.rb:15244 sig do params( node_id: Integer, @@ -28805,24 +28073,21 @@ class Prism::ParametersNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15208 + # pkg:gem/prism#lib/prism/node.rb:15249 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode? } # - # source://prism//lib/prism/node.rb#15252 + # pkg:gem/prism#lib/prism/node.rb:15252 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [rest] - # - # source://prism//lib/prism/node.rb#15213 + # pkg:gem/prism#lib/prism/node.rb:15213 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -28830,13 +28095,13 @@ class Prism::ParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15278 + # pkg:gem/prism#lib/prism/node.rb:15278 sig { override.returns(String) } def inspect; end # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#15272 + # pkg:gem/prism#lib/prism/node.rb:15272 sig do returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) end @@ -28844,19 +28109,19 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] # - # source://prism//lib/prism/node.rb#15269 + # pkg:gem/prism#lib/prism/node.rb:15269 sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } def keywords; end # attr_reader optionals: Array[OptionalParameterNode] # - # source://prism//lib/prism/node.rb#15260 + # pkg:gem/prism#lib/prism/node.rb:15260 sig { returns(T::Array[Prism::OptionalParameterNode]) } def optionals; end # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] # - # source://prism//lib/prism/node.rb#15266 + # pkg:gem/prism#lib/prism/node.rb:15266 sig do returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)]) end @@ -28864,32 +28129,32 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#15257 + # pkg:gem/prism#lib/prism/node.rb:15257 sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } def requireds; end # attr_reader rest: RestParameterNode | ImplicitRestNode | nil # - # source://prism//lib/prism/node.rb#15263 + # pkg:gem/prism#lib/prism/node.rb:15263 sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) } def rest; end # Mirrors the Method#parameters method. # - # source://prism//lib/prism/node_ext.rb#272 + # pkg:gem/prism#lib/prism/node_ext.rb:272 sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } def signature; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15283 + # pkg:gem/prism#lib/prism/node.rb:15283 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15288 + # pkg:gem/prism#lib/prism/node.rb:15288 def type; end end end @@ -28899,13 +28164,11 @@ end # (10 + 34) # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15314 +# pkg:gem/prism#lib/prism/node.rb:15314 class Prism::ParenthesesNode < ::Prism::Node # Initialize a new ParenthesesNode node. # - # @return [ParenthesesNode] a new instance of ParenthesesNode - # - # source://prism//lib/prism/node.rb#15316 + # pkg:gem/prism#lib/prism/node.rb:15316 sig do params( source: Prism::Source, @@ -28922,54 +28185,54 @@ class Prism::ParenthesesNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15429 + # pkg:gem/prism#lib/prism/node.rb:15429 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15327 + # pkg:gem/prism#lib/prism/node.rb:15327 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#15374 + # pkg:gem/prism#lib/prism/node.rb:15374 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15332 + # pkg:gem/prism#lib/prism/node.rb:15332 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15408 + # pkg:gem/prism#lib/prism/node.rb:15408 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15390 + # pkg:gem/prism#lib/prism/node.rb:15390 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15351 + # pkg:gem/prism#lib/prism/node.rb:15351 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15344 + # pkg:gem/prism#lib/prism/node.rb:15344 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location) -> ParenthesesNode # - # source://prism//lib/prism/node.rb#15356 + # pkg:gem/prism#lib/prism/node.rb:15356 sig do params( node_id: Integer, @@ -28982,24 +28245,21 @@ class Prism::ParenthesesNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15332 + # pkg:gem/prism#lib/prism/node.rb:15361 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Prism::node?, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#15364 + # pkg:gem/prism#lib/prism/node.rb:15364 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [body] - # - # source://prism//lib/prism/node.rb#15337 + # pkg:gem/prism#lib/prism/node.rb:15337 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -29007,128 +28267,122 @@ class Prism::ParenthesesNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15413 + # pkg:gem/prism#lib/prism/node.rb:15413 sig { override.returns(String) } def inspect; end # def multiple_statements?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15369 + # pkg:gem/prism#lib/prism/node.rb:15369 sig { returns(T::Boolean) } def multiple_statements?; end - # source://prism//lib/prism/parse_result/newlines.rb#86 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:86 def newline_flag!(lines); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15403 + # pkg:gem/prism#lib/prism/node.rb:15403 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15377 + # pkg:gem/prism#lib/prism/node.rb:15377 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15398 + # pkg:gem/prism#lib/prism/node.rb:15398 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15385 + # pkg:gem/prism#lib/prism/node.rb:15385 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15418 + # pkg:gem/prism#lib/prism/node.rb:15418 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15423 + # pkg:gem/prism#lib/prism/node.rb:15423 def type; end end end # Flags for parentheses nodes. # -# source://prism//lib/prism/node.rb#19870 +# pkg:gem/prism#lib/prism/node.rb:19870 module Prism::ParenthesesNodeFlags; end # parentheses that contain multiple potentially void statements # -# source://prism//lib/prism/node.rb#19872 +# pkg:gem/prism#lib/prism/node.rb:19872 Prism::ParenthesesNodeFlags::MULTIPLE_STATEMENTS = T.let(T.unsafe(nil), Integer) # This represents an error that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#606 +# pkg:gem/prism#lib/prism/parse_result.rb:606 class Prism::ParseError # Create a new error object with the given message and location. # - # @return [ParseError] a new instance of ParseError - # - # source://prism//lib/prism/parse_result.rb#621 + # pkg:gem/prism#lib/prism/parse_result.rb:621 sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } def initialize(type, message, location, level); end # Implement the hash pattern matching interface for ParseError. # - # source://prism//lib/prism/parse_result.rb#629 + # pkg:gem/prism#lib/prism/parse_result.rb:629 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this error. # - # source://prism//lib/prism/parse_result.rb#634 + # pkg:gem/prism#lib/prism/parse_result.rb:634 sig { returns(String) } def inspect; end # The level of this error. # - # source://prism//lib/prism/parse_result.rb#618 + # pkg:gem/prism#lib/prism/parse_result.rb:618 sig { returns(Symbol) } def level; end # A Location object representing the location of this error in the source. # - # source://prism//lib/prism/parse_result.rb#615 + # pkg:gem/prism#lib/prism/parse_result.rb:615 sig { returns(Prism::Location) } def location; end # The message associated with this error. # - # source://prism//lib/prism/parse_result.rb#612 + # pkg:gem/prism#lib/prism/parse_result.rb:612 sig { returns(String) } def message; end # The type of error. This is an _internal_ symbol that is used for # communicating with translation layers. It is not meant to be public API. # - # source://prism//lib/prism/parse_result.rb#609 + # pkg:gem/prism#lib/prism/parse_result.rb:609 sig { returns(Symbol) } def type; end end # This is a result specific to the `parse_lex` and `parse_lex_file` methods. # -# source://prism//lib/prism/parse_result.rb#795 +# pkg:gem/prism#lib/prism/parse_result.rb:795 class Prism::ParseLexResult < ::Prism::Result # Create a new parse lex result object with the given values. # - # @return [ParseLexResult] a new instance of ParseLexResult - # - # source://prism//lib/prism/parse_result.rb#801 + # pkg:gem/prism#lib/prism/parse_result.rb:801 sig do params( value: [Prism::ProgramNode, T::Array[T.untyped]], @@ -29144,27 +28398,25 @@ class Prism::ParseLexResult < ::Prism::Result # Implement the hash pattern matching interface for ParseLexResult. # - # source://prism//lib/prism/parse_result.rb#807 + # pkg:gem/prism#lib/prism/parse_result.rb:807 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # A tuple of the syntax tree and the list of tokens that were parsed from # the source code. # - # source://prism//lib/prism/parse_result.rb#798 + # pkg:gem/prism#lib/prism/parse_result.rb:798 sig { returns([Prism::ProgramNode, T::Array[T.untyped]]) } def value; end end # This is a result specific to the `parse` and `parse_file` methods. # -# source://prism//lib/prism/parse_result.rb#736 +# pkg:gem/prism#lib/prism/parse_result.rb:736 class Prism::ParseResult < ::Prism::Result # Create a new parse result object with the given values. # - # @return [ParseResult] a new instance of ParseResult - # - # source://prism//lib/prism/parse_result.rb#749 + # pkg:gem/prism#lib/prism/parse_result.rb:749 sig do params( value: Prism::ProgramNode, @@ -29180,30 +28432,30 @@ class Prism::ParseResult < ::Prism::Result # Attach the list of comments to their respective locations in the tree. # - # source://prism//lib/prism/parse_result.rb#760 + # pkg:gem/prism#lib/prism/parse_result.rb:760 def attach_comments!; end # Implement the hash pattern matching interface for ParseResult. # - # source://prism//lib/prism/parse_result.rb#755 + # pkg:gem/prism#lib/prism/parse_result.rb:755 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of the syntax tree with the errors # displayed inline. # - # source://prism//lib/prism/parse_result.rb#772 + # pkg:gem/prism#lib/prism/parse_result.rb:772 def errors_format; end # Walk the tree and mark nodes that are on a new line, loosely emulating # the behavior of CRuby's `:line` tracepoint event. # - # source://prism//lib/prism/parse_result.rb#766 + # pkg:gem/prism#lib/prism/parse_result.rb:766 def mark_newlines!; end # The syntax tree that was parsed from the source code. # - # source://prism//lib/prism/parse_result.rb#746 + # pkg:gem/prism#lib/prism/parse_result.rb:746 sig { returns(Prism::ProgramNode) } def value; end end @@ -29223,25 +28475,23 @@ end # the comment. Otherwise it will favor attaching to the nearest location # that is after the comment. # -# source://prism//lib/prism/parse_result/comments.rb#20 +# pkg:gem/prism#lib/prism/parse_result/comments.rb:20 class Prism::ParseResult::Comments # Create a new Comments object that will attach comments to the given # parse result. # - # @return [Comments] a new instance of Comments - # - # source://prism//lib/prism/parse_result/comments.rb#87 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:87 def initialize(parse_result); end # Attach the comments to their respective locations in the tree by # mutating the parse result. # - # source://prism//lib/prism/parse_result/comments.rb#93 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:93 def attach!; end # The parse result that we are attaching comments to. # - # source://prism//lib/prism/parse_result/comments.rb#83 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:83 def parse_result; end private @@ -29249,92 +28499,82 @@ class Prism::ParseResult::Comments # Responsible for finding the nearest targets to the given comment within # the context of the given encapsulating node. # - # source://prism//lib/prism/parse_result/comments.rb#120 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:120 def nearest_targets(node, comment); end end # A target for attaching comments that is based on a location field on a # node. For example, the `end` token of a ClassNode. # -# source://prism//lib/prism/parse_result/comments.rb#54 +# pkg:gem/prism#lib/prism/parse_result/comments.rb:54 class Prism::ParseResult::Comments::LocationTarget - # @return [LocationTarget] a new instance of LocationTarget - # - # source://prism//lib/prism/parse_result/comments.rb#57 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:57 def initialize(location); end - # @return [Boolean] - # - # source://prism//lib/prism/parse_result/comments.rb#69 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:69 def encloses?(comment); end - # source://prism//lib/prism/parse_result/comments.rb#65 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:65 def end_offset; end - # source://prism//lib/prism/parse_result/comments.rb#73 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:73 def leading_comment(comment); end - # source://prism//lib/prism/parse_result/comments.rb#55 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:55 def location; end - # source://prism//lib/prism/parse_result/comments.rb#61 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:61 def start_offset; end - # source://prism//lib/prism/parse_result/comments.rb#77 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:77 def trailing_comment(comment); end end # A target for attaching comments that is based on a specific node's # location. # -# source://prism//lib/prism/parse_result/comments.rb#23 +# pkg:gem/prism#lib/prism/parse_result/comments.rb:23 class Prism::ParseResult::Comments::NodeTarget - # @return [NodeTarget] a new instance of NodeTarget - # - # source://prism//lib/prism/parse_result/comments.rb#26 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:26 def initialize(node); end - # @return [Boolean] - # - # source://prism//lib/prism/parse_result/comments.rb#38 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:38 def encloses?(comment); end - # source://prism//lib/prism/parse_result/comments.rb#34 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:34 def end_offset; end - # source://prism//lib/prism/parse_result/comments.rb#43 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:43 def leading_comment(comment); end - # source://prism//lib/prism/parse_result/comments.rb#24 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:24 def node; end - # source://prism//lib/prism/parse_result/comments.rb#30 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:30 def start_offset; end - # source://prism//lib/prism/parse_result/comments.rb#47 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:47 def trailing_comment(comment); end end # An object to represent the set of errors on a parse result. This object # can be used to format the errors in a human-readable way. # -# source://prism//lib/prism/parse_result/errors.rb#10 +# pkg:gem/prism#lib/prism/parse_result/errors.rb:10 class Prism::ParseResult::Errors # Initialize a new set of errors from the given parse result. # - # @return [Errors] a new instance of Errors - # - # source://prism//lib/prism/parse_result/errors.rb#15 + # pkg:gem/prism#lib/prism/parse_result/errors.rb:15 def initialize(parse_result); end # Formats the errors in a human-readable way and return them as a string. # - # source://prism//lib/prism/parse_result/errors.rb#20 + # pkg:gem/prism#lib/prism/parse_result/errors.rb:20 def format; end # The parse result that contains the errors. # - # source://prism//lib/prism/parse_result/errors.rb#12 + # pkg:gem/prism#lib/prism/parse_result/errors.rb:12 def parse_result; end end @@ -29359,87 +28599,79 @@ end # that case. We do that to avoid storing the extra `@newline` instance # variable on every node if we don't need it. # -# source://prism//lib/prism/parse_result/newlines.rb#26 +# pkg:gem/prism#lib/prism/parse_result/newlines.rb:26 class Prism::ParseResult::Newlines < ::Prism::Visitor # Create a new Newlines visitor with the given newline offsets. # - # @return [Newlines] a new instance of Newlines - # - # source://prism//lib/prism/parse_result/newlines.rb#28 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:28 def initialize(lines); end # Permit block/lambda nodes to mark newlines within themselves. # - # source://prism//lib/prism/parse_result/newlines.rb#34 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:34 def visit_block_node(node); end # Mark if/unless nodes as newlines. # - # source://prism//lib/prism/parse_result/newlines.rb#48 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:48 def visit_if_node(node); end - # Permit block/lambda nodes to mark newlines within themselves. - # - # source://prism//lib/prism/parse_result/newlines.rb#34 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:45 def visit_lambda_node(node); end # Permit statements lists to mark newlines within themselves. # - # source://prism//lib/prism/parse_result/newlines.rb#56 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:56 def visit_statements_node(node); end - # Mark if/unless nodes as newlines. - # - # source://prism//lib/prism/parse_result/newlines.rb#48 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:53 def visit_unless_node(node); end end # This represents a warning that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#640 +# pkg:gem/prism#lib/prism/parse_result.rb:640 class Prism::ParseWarning # Create a new warning object with the given message and location. # - # @return [ParseWarning] a new instance of ParseWarning - # - # source://prism//lib/prism/parse_result.rb#655 + # pkg:gem/prism#lib/prism/parse_result.rb:655 sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } def initialize(type, message, location, level); end # Implement the hash pattern matching interface for ParseWarning. # - # source://prism//lib/prism/parse_result.rb#663 + # pkg:gem/prism#lib/prism/parse_result.rb:663 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this warning. # - # source://prism//lib/prism/parse_result.rb#668 + # pkg:gem/prism#lib/prism/parse_result.rb:668 sig { returns(String) } def inspect; end # The level of this warning. # - # source://prism//lib/prism/parse_result.rb#652 + # pkg:gem/prism#lib/prism/parse_result.rb:652 sig { returns(Symbol) } def level; end # A Location object representing the location of this warning in the source. # - # source://prism//lib/prism/parse_result.rb#649 + # pkg:gem/prism#lib/prism/parse_result.rb:649 sig { returns(Prism::Location) } def location; end # The message associated with this warning. # - # source://prism//lib/prism/parse_result.rb#646 + # pkg:gem/prism#lib/prism/parse_result.rb:646 sig { returns(String) } def message; end # The type of warning. This is an _internal_ symbol that is used for # communicating with translation layers. It is not meant to be public API. # - # source://prism//lib/prism/parse_result.rb#643 + # pkg:gem/prism#lib/prism/parse_result.rb:643 sig { returns(Symbol) } def type; end end @@ -29478,27 +28710,23 @@ end # do not yet support) then a Prism::Pattern::CompilationError will be # raised. # -# source://prism//lib/prism/pattern.rb#38 +# pkg:gem/prism#lib/prism/pattern.rb:38 class Prism::Pattern # Create a new pattern with the given query. The query should be a string # containing a Ruby pattern matching expression. # - # @return [Pattern] a new instance of Pattern - # - # source://prism//lib/prism/pattern.rb#64 + # pkg:gem/prism#lib/prism/pattern.rb:64 def initialize(query); end # Compile the query into a callable object that can be used to match against # nodes. # - # @raise [CompilationError] - # - # source://prism//lib/prism/pattern.rb#71 + # pkg:gem/prism#lib/prism/pattern.rb:71 def compile; end # The query that this pattern was initialized with. # - # source://prism//lib/prism/pattern.rb#60 + # pkg:gem/prism#lib/prism/pattern.rb:60 def query; end # Scan the given node and all of its children for nodes that match the @@ -29506,7 +28734,7 @@ class Prism::Pattern # matches the pattern. If no block is given, an enumerator will be returned # that will yield each node that matches the pattern. # - # source://prism//lib/prism/pattern.rb#87 + # pkg:gem/prism#lib/prism/pattern.rb:87 def scan(root); end private @@ -29514,94 +28742,90 @@ class Prism::Pattern # Shortcut for combining two procs into one that returns true if both return # true. # - # source://prism//lib/prism/pattern.rb#103 + # pkg:gem/prism#lib/prism/pattern.rb:103 def combine_and(left, right); end # Shortcut for combining two procs into one that returns true if either # returns true. # - # source://prism//lib/prism/pattern.rb#109 + # pkg:gem/prism#lib/prism/pattern.rb:109 def combine_or(left, right); end # in foo | bar # - # source://prism//lib/prism/pattern.rb#144 + # pkg:gem/prism#lib/prism/pattern.rb:144 def compile_alternation_pattern_node(node); end # in [foo, bar, baz] # - # source://prism//lib/prism/pattern.rb#119 + # pkg:gem/prism#lib/prism/pattern.rb:119 def compile_array_pattern_node(node); end # Compile a name associated with a constant. # - # source://prism//lib/prism/pattern.rb#169 + # pkg:gem/prism#lib/prism/pattern.rb:169 def compile_constant_name(node, name); end # in Prism::ConstantReadNode # - # source://prism//lib/prism/pattern.rb#149 + # pkg:gem/prism#lib/prism/pattern.rb:149 def compile_constant_path_node(node); end # in ConstantReadNode # in String # - # source://prism//lib/prism/pattern.rb#164 + # pkg:gem/prism#lib/prism/pattern.rb:164 def compile_constant_read_node(node); end # Raise an error because the given node is not supported. # - # @raise [CompilationError] - # - # source://prism//lib/prism/pattern.rb#114 + # pkg:gem/prism#lib/prism/pattern.rb:114 def compile_error(node); end # in InstanceVariableReadNode[name: Symbol] # in { name: Symbol } # - # source://prism//lib/prism/pattern.rb#185 + # pkg:gem/prism#lib/prism/pattern.rb:185 def compile_hash_pattern_node(node); end # in nil # - # source://prism//lib/prism/pattern.rb#215 + # pkg:gem/prism#lib/prism/pattern.rb:215 def compile_nil_node(node); end # Compile any kind of node. Dispatch out to the individual compilation # methods based on the type of node. # - # source://prism//lib/prism/pattern.rb#244 + # pkg:gem/prism#lib/prism/pattern.rb:244 def compile_node(node); end # in /foo/ # - # source://prism//lib/prism/pattern.rb#220 + # pkg:gem/prism#lib/prism/pattern.rb:220 def compile_regular_expression_node(node); end # in "" # in "foo" # - # source://prism//lib/prism/pattern.rb#228 + # pkg:gem/prism#lib/prism/pattern.rb:228 def compile_string_node(node); end # in :+ # in :foo # - # source://prism//lib/prism/pattern.rb#236 + # pkg:gem/prism#lib/prism/pattern.rb:236 def compile_symbol_node(node); end end # Raised when the query given to a pattern is either invalid Ruby syntax or # is using syntax that we don't yet support. # -# source://prism//lib/prism/pattern.rb#41 +# pkg:gem/prism#lib/prism/pattern.rb:41 class Prism::Pattern::CompilationError < ::StandardError # Create a new CompilationError with the given representation of the node # that caused the error. # - # @return [CompilationError] a new instance of CompilationError - # - # source://prism//lib/prism/pattern.rb#44 + # pkg:gem/prism#lib/prism/pattern.rb:44 def initialize(repr); end end @@ -29610,13 +28834,11 @@ end # foo in ^(bar) # ^^^^^^ # -# source://prism//lib/prism/node.rb#15442 +# pkg:gem/prism#lib/prism/node.rb:15442 class Prism::PinnedExpressionNode < ::Prism::Node # Initialize a new PinnedExpressionNode node. # - # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode - # - # source://prism//lib/prism/node.rb#15444 + # pkg:gem/prism#lib/prism/node.rb:15444 sig do params( source: Prism::Source, @@ -29634,36 +28856,36 @@ class Prism::PinnedExpressionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15581 + # pkg:gem/prism#lib/prism/node.rb:15581 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15456 + # pkg:gem/prism#lib/prism/node.rb:15456 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15461 + # pkg:gem/prism#lib/prism/node.rb:15461 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15478 + # pkg:gem/prism#lib/prism/node.rb:15478 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15473 + # pkg:gem/prism#lib/prism/node.rb:15473 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location) -> PinnedExpressionNode # - # source://prism//lib/prism/node.rb#15483 + # pkg:gem/prism#lib/prism/node.rb:15483 sig do params( node_id: Integer, @@ -29677,24 +28899,21 @@ class Prism::PinnedExpressionNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15461 + # pkg:gem/prism#lib/prism/node.rb:15488 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location } # - # source://prism//lib/prism/node.rb#15491 + # pkg:gem/prism#lib/prism/node.rb:15491 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [expression] - # - # source://prism//lib/prism/node.rb#15466 + # pkg:gem/prism#lib/prism/node.rb:15466 def each_child_node; end # The expression used in the pinned expression @@ -29702,7 +28921,7 @@ class Prism::PinnedExpressionNode < ::Prism::Node # foo in ^(bar) # ^^^ # - # source://prism//lib/prism/node.rb#15499 + # pkg:gem/prism#lib/prism/node.rb:15499 sig { returns(Prism::Node) } def expression; end @@ -29711,13 +28930,13 @@ class Prism::PinnedExpressionNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15565 + # pkg:gem/prism#lib/prism/node.rb:15565 sig { override.returns(String) } def inspect; end # def lparen: () -> String # - # source://prism//lib/prism/node.rb#15555 + # pkg:gem/prism#lib/prism/node.rb:15555 sig { returns(String) } def lparen; end @@ -29726,13 +28945,13 @@ class Prism::PinnedExpressionNode < ::Prism::Node # foo in ^(bar) # ^ # - # source://prism//lib/prism/node.rb#15521 + # pkg:gem/prism#lib/prism/node.rb:15521 sig { returns(Prism::Location) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15550 + # pkg:gem/prism#lib/prism/node.rb:15550 sig { returns(String) } def operator; end @@ -29741,13 +28960,13 @@ class Prism::PinnedExpressionNode < ::Prism::Node # foo in ^(bar) # ^ # - # source://prism//lib/prism/node.rb#15505 + # pkg:gem/prism#lib/prism/node.rb:15505 sig { returns(Prism::Location) } def operator_loc; end # def rparen: () -> String # - # source://prism//lib/prism/node.rb#15560 + # pkg:gem/prism#lib/prism/node.rb:15560 sig { returns(String) } def rparen; end @@ -29756,38 +28975,38 @@ class Prism::PinnedExpressionNode < ::Prism::Node # foo in ^(bar) # ^ # - # source://prism//lib/prism/node.rb#15537 + # pkg:gem/prism#lib/prism/node.rb:15537 sig { returns(Prism::Location) } def rparen_loc; end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15529 + # pkg:gem/prism#lib/prism/node.rb:15529 def save_lparen_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15513 + # pkg:gem/prism#lib/prism/node.rb:15513 def save_operator_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15545 + # pkg:gem/prism#lib/prism/node.rb:15545 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15570 + # pkg:gem/prism#lib/prism/node.rb:15570 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15575 + # pkg:gem/prism#lib/prism/node.rb:15575 def type; end end end @@ -29797,13 +29016,11 @@ end # foo in ^bar # ^^^^ # -# source://prism//lib/prism/node.rb#15594 +# pkg:gem/prism#lib/prism/node.rb:15594 class Prism::PinnedVariableNode < ::Prism::Node # Initialize a new PinnedVariableNode node. # - # @return [PinnedVariableNode] a new instance of PinnedVariableNode - # - # source://prism//lib/prism/node.rb#15596 + # pkg:gem/prism#lib/prism/node.rb:15596 sig do params( source: Prism::Source, @@ -29819,36 +29036,36 @@ class Prism::PinnedVariableNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15689 + # pkg:gem/prism#lib/prism/node.rb:15689 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15606 + # pkg:gem/prism#lib/prism/node.rb:15606 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15611 + # pkg:gem/prism#lib/prism/node.rb:15611 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15628 + # pkg:gem/prism#lib/prism/node.rb:15628 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15623 + # pkg:gem/prism#lib/prism/node.rb:15623 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, ?operator_loc: Location) -> PinnedVariableNode # - # source://prism//lib/prism/node.rb#15633 + # pkg:gem/prism#lib/prism/node.rb:15633 sig do params( node_id: Integer, @@ -29860,24 +29077,21 @@ class Prism::PinnedVariableNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15611 + # pkg:gem/prism#lib/prism/node.rb:15638 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, operator_loc: Location } # - # source://prism//lib/prism/node.rb#15641 + # pkg:gem/prism#lib/prism/node.rb:15641 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [variable] - # - # source://prism//lib/prism/node.rb#15616 + # pkg:gem/prism#lib/prism/node.rb:15616 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -29885,13 +29099,13 @@ class Prism::PinnedVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15673 + # pkg:gem/prism#lib/prism/node.rb:15673 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15668 + # pkg:gem/prism#lib/prism/node.rb:15668 sig { returns(String) } def operator; end @@ -29900,19 +29114,19 @@ class Prism::PinnedVariableNode < ::Prism::Node # foo in ^bar # ^ # - # source://prism//lib/prism/node.rb#15655 + # pkg:gem/prism#lib/prism/node.rb:15655 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15663 + # pkg:gem/prism#lib/prism/node.rb:15663 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15678 + # pkg:gem/prism#lib/prism/node.rb:15678 sig { override.returns(Symbol) } def type; end @@ -29921,7 +29135,7 @@ class Prism::PinnedVariableNode < ::Prism::Node # foo in ^bar # ^^^ # - # source://prism//lib/prism/node.rb#15649 + # pkg:gem/prism#lib/prism/node.rb:15649 sig do returns(T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode)) end @@ -29930,7 +29144,7 @@ class Prism::PinnedVariableNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15683 + # pkg:gem/prism#lib/prism/node.rb:15683 def type; end end end @@ -29940,13 +29154,11 @@ end # END { foo } # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15700 +# pkg:gem/prism#lib/prism/node.rb:15700 class Prism::PostExecutionNode < ::Prism::Node # Initialize a new PostExecutionNode node. # - # @return [PostExecutionNode] a new instance of PostExecutionNode - # - # source://prism//lib/prism/node.rb#15702 + # pkg:gem/prism#lib/prism/node.rb:15702 sig do params( source: Prism::Source, @@ -29964,48 +29176,48 @@ class Prism::PostExecutionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15829 + # pkg:gem/prism#lib/prism/node.rb:15829 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15714 + # pkg:gem/prism#lib/prism/node.rb:15714 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15719 + # pkg:gem/prism#lib/prism/node.rb:15719 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15808 + # pkg:gem/prism#lib/prism/node.rb:15808 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15785 + # pkg:gem/prism#lib/prism/node.rb:15785 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15738 + # pkg:gem/prism#lib/prism/node.rb:15738 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15731 + # pkg:gem/prism#lib/prism/node.rb:15731 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PostExecutionNode # - # source://prism//lib/prism/node.rb#15743 + # pkg:gem/prism#lib/prism/node.rb:15743 sig do params( node_id: Integer, @@ -30019,24 +29231,21 @@ class Prism::PostExecutionNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15719 + # pkg:gem/prism#lib/prism/node.rb:15748 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#15751 + # pkg:gem/prism#lib/prism/node.rb:15751 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [statements] - # - # source://prism//lib/prism/node.rb#15724 + # pkg:gem/prism#lib/prism/node.rb:15724 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -30044,68 +29253,68 @@ class Prism::PostExecutionNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15813 + # pkg:gem/prism#lib/prism/node.rb:15813 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15798 + # pkg:gem/prism#lib/prism/node.rb:15798 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15759 + # pkg:gem/prism#lib/prism/node.rb:15759 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15803 + # pkg:gem/prism#lib/prism/node.rb:15803 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15772 + # pkg:gem/prism#lib/prism/node.rb:15772 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15793 + # pkg:gem/prism#lib/prism/node.rb:15793 def save_closing_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15767 + # pkg:gem/prism#lib/prism/node.rb:15767 def save_keyword_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15780 + # pkg:gem/prism#lib/prism/node.rb:15780 def save_opening_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#15756 + # pkg:gem/prism#lib/prism/node.rb:15756 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15818 + # pkg:gem/prism#lib/prism/node.rb:15818 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15823 + # pkg:gem/prism#lib/prism/node.rb:15823 def type; end end end @@ -30115,13 +29324,11 @@ end # BEGIN { foo } # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15842 +# pkg:gem/prism#lib/prism/node.rb:15842 class Prism::PreExecutionNode < ::Prism::Node # Initialize a new PreExecutionNode node. # - # @return [PreExecutionNode] a new instance of PreExecutionNode - # - # source://prism//lib/prism/node.rb#15844 + # pkg:gem/prism#lib/prism/node.rb:15844 sig do params( source: Prism::Source, @@ -30139,48 +29346,48 @@ class Prism::PreExecutionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15971 + # pkg:gem/prism#lib/prism/node.rb:15971 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15856 + # pkg:gem/prism#lib/prism/node.rb:15856 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15861 + # pkg:gem/prism#lib/prism/node.rb:15861 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15950 + # pkg:gem/prism#lib/prism/node.rb:15950 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15927 + # pkg:gem/prism#lib/prism/node.rb:15927 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15880 + # pkg:gem/prism#lib/prism/node.rb:15880 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15873 + # pkg:gem/prism#lib/prism/node.rb:15873 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PreExecutionNode # - # source://prism//lib/prism/node.rb#15885 + # pkg:gem/prism#lib/prism/node.rb:15885 sig do params( node_id: Integer, @@ -30194,24 +29401,21 @@ class Prism::PreExecutionNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15861 + # pkg:gem/prism#lib/prism/node.rb:15890 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#15893 + # pkg:gem/prism#lib/prism/node.rb:15893 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [statements] - # - # source://prism//lib/prism/node.rb#15866 + # pkg:gem/prism#lib/prism/node.rb:15866 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -30219,81 +29423,79 @@ class Prism::PreExecutionNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15955 + # pkg:gem/prism#lib/prism/node.rb:15955 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15940 + # pkg:gem/prism#lib/prism/node.rb:15940 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15901 + # pkg:gem/prism#lib/prism/node.rb:15901 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15945 + # pkg:gem/prism#lib/prism/node.rb:15945 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15914 + # pkg:gem/prism#lib/prism/node.rb:15914 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15935 + # pkg:gem/prism#lib/prism/node.rb:15935 def save_closing_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15909 + # pkg:gem/prism#lib/prism/node.rb:15909 def save_keyword_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15922 + # pkg:gem/prism#lib/prism/node.rb:15922 def save_opening_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#15898 + # pkg:gem/prism#lib/prism/node.rb:15898 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15960 + # pkg:gem/prism#lib/prism/node.rb:15960 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15965 + # pkg:gem/prism#lib/prism/node.rb:15965 def type; end end end # The top level node of any parse tree. # -# source://prism//lib/prism/node.rb#15981 +# pkg:gem/prism#lib/prism/node.rb:15981 class Prism::ProgramNode < ::Prism::Node # Initialize a new ProgramNode node. # - # @return [ProgramNode] a new instance of ProgramNode - # - # source://prism//lib/prism/node.rb#15983 + # pkg:gem/prism#lib/prism/node.rb:15983 sig do params( source: Prism::Source, @@ -30309,36 +29511,36 @@ class Prism::ProgramNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16055 + # pkg:gem/prism#lib/prism/node.rb:16055 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15993 + # pkg:gem/prism#lib/prism/node.rb:15993 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15998 + # pkg:gem/prism#lib/prism/node.rb:15998 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16015 + # pkg:gem/prism#lib/prism/node.rb:16015 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16010 + # pkg:gem/prism#lib/prism/node.rb:16010 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?statements: StatementsNode) -> ProgramNode # - # source://prism//lib/prism/node.rb#16020 + # pkg:gem/prism#lib/prism/node.rb:16020 sig do params( node_id: Integer, @@ -30350,24 +29552,21 @@ class Prism::ProgramNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15998 + # pkg:gem/prism#lib/prism/node.rb:16025 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], statements: StatementsNode } # - # source://prism//lib/prism/node.rb#16028 + # pkg:gem/prism#lib/prism/node.rb:16028 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [statements] - # - # source://prism//lib/prism/node.rb#16003 + # pkg:gem/prism#lib/prism/node.rb:16003 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -30375,44 +29574,44 @@ class Prism::ProgramNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16039 + # pkg:gem/prism#lib/prism/node.rb:16039 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#16033 + # pkg:gem/prism#lib/prism/node.rb:16033 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader statements: StatementsNode # - # source://prism//lib/prism/node.rb#16036 + # pkg:gem/prism#lib/prism/node.rb:16036 sig { returns(Prism::StatementsNode) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16044 + # pkg:gem/prism#lib/prism/node.rb:16044 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16049 + # pkg:gem/prism#lib/prism/node.rb:16049 def type; end end end # Flags for range and flip-flop nodes. # -# source://prism//lib/prism/node.rb#19876 +# pkg:gem/prism#lib/prism/node.rb:19876 module Prism::RangeFlags; end # ... operator # -# source://prism//lib/prism/node.rb#19878 +# pkg:gem/prism#lib/prism/node.rb:19878 Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # Represents the use of the `..` or `...` operators. @@ -30423,13 +29622,11 @@ Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # c if a =~ /left/ ... b =~ /right/ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16070 +# pkg:gem/prism#lib/prism/node.rb:16070 class Prism::RangeNode < ::Prism::Node # Initialize a new RangeNode node. # - # @return [RangeNode] a new instance of RangeNode - # - # source://prism//lib/prism/node.rb#16072 + # pkg:gem/prism#lib/prism/node.rb:16072 sig do params( source: Prism::Source, @@ -30446,36 +29643,36 @@ class Prism::RangeNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16185 + # pkg:gem/prism#lib/prism/node.rb:16185 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16083 + # pkg:gem/prism#lib/prism/node.rb:16083 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16088 + # pkg:gem/prism#lib/prism/node.rb:16088 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16109 + # pkg:gem/prism#lib/prism/node.rb:16109 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16101 + # pkg:gem/prism#lib/prism/node.rb:16101 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> RangeNode # - # source://prism//lib/prism/node.rb#16114 + # pkg:gem/prism#lib/prism/node.rb:16114 sig do params( node_id: Integer, @@ -30488,31 +29685,26 @@ class Prism::RangeNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16088 + # pkg:gem/prism#lib/prism/node.rb:16119 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#16122 + # pkg:gem/prism#lib/prism/node.rb:16122 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [left] - # - # source://prism//lib/prism/node.rb#16093 + # pkg:gem/prism#lib/prism/node.rb:16093 def each_child_node; end # def exclude_end?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16127 + # pkg:gem/prism#lib/prism/node.rb:16127 sig { returns(T::Boolean) } def exclude_end?; end @@ -30521,7 +29713,7 @@ class Prism::RangeNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16169 + # pkg:gem/prism#lib/prism/node.rb:16169 sig { override.returns(String) } def inspect; end @@ -30533,19 +29725,19 @@ class Prism::RangeNode < ::Prism::Node # hello...goodbye # ^^^^^ # - # source://prism//lib/prism/node.rb#16138 + # pkg:gem/prism#lib/prism/node.rb:16138 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#16164 + # pkg:gem/prism#lib/prism/node.rb:16164 sig { returns(String) } def operator; end # The location of the `..` or `...` operator. # - # source://prism//lib/prism/node.rb#16151 + # pkg:gem/prism#lib/prism/node.rb:16151 sig { returns(Prism::Location) } def operator_loc; end @@ -30558,26 +29750,26 @@ class Prism::RangeNode < ::Prism::Node # ^^^ # If neither right-hand or left-hand side was included, this will be a MissingNode. # - # source://prism//lib/prism/node.rb#16148 + # pkg:gem/prism#lib/prism/node.rb:16148 sig { returns(T.nilable(Prism::Node)) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16159 + # pkg:gem/prism#lib/prism/node.rb:16159 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16174 + # pkg:gem/prism#lib/prism/node.rb:16174 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16179 + # pkg:gem/prism#lib/prism/node.rb:16179 def type; end end end @@ -30587,13 +29779,11 @@ end # 1.0r # ^^^^ # -# source://prism//lib/prism/node.rb#16198 +# pkg:gem/prism#lib/prism/node.rb:16198 class Prism::RationalNode < ::Prism::Node # Initialize a new RationalNode node. # - # @return [RationalNode] a new instance of RationalNode - # - # source://prism//lib/prism/node.rb#16200 + # pkg:gem/prism#lib/prism/node.rb:16200 sig do params( source: Prism::Source, @@ -30609,44 +29799,42 @@ class Prism::RationalNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16295 + # pkg:gem/prism#lib/prism/node.rb:16295 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16210 + # pkg:gem/prism#lib/prism/node.rb:16210 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def binary?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16249 + # pkg:gem/prism#lib/prism/node.rb:16249 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16215 + # pkg:gem/prism#lib/prism/node.rb:16215 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16231 + # pkg:gem/prism#lib/prism/node.rb:16231 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16226 + # pkg:gem/prism#lib/prism/node.rb:16226 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numerator: Integer, ?denominator: Integer) -> RationalNode # - # source://prism//lib/prism/node.rb#16236 + # pkg:gem/prism#lib/prism/node.rb:16236 sig do params( node_id: Integer, @@ -30660,22 +29848,19 @@ class Prism::RationalNode < ::Prism::Node # def decimal?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16254 + # pkg:gem/prism#lib/prism/node.rb:16254 sig { returns(T::Boolean) } def decimal?; end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16215 + # pkg:gem/prism#lib/prism/node.rb:16241 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numerator: Integer, denominator: Integer } # - # source://prism//lib/prism/node.rb#16244 + # pkg:gem/prism#lib/prism/node.rb:16244 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -30683,13 +29868,13 @@ class Prism::RationalNode < ::Prism::Node # # 1.5r # denominator 2 # - # source://prism//lib/prism/node.rb#16276 + # pkg:gem/prism#lib/prism/node.rb:16276 sig { returns(Integer) } def denominator; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#16220 + # pkg:gem/prism#lib/prism/node.rb:16220 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -30697,15 +29882,13 @@ class Prism::RationalNode < ::Prism::Node # def hexadecimal?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16264 + # pkg:gem/prism#lib/prism/node.rb:16264 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#16279 + # pkg:gem/prism#lib/prism/node.rb:16279 sig { override.returns(String) } def inspect; end @@ -30713,40 +29896,38 @@ class Prism::RationalNode < ::Prism::Node # # 1.5r # numerator 3 # - # source://prism//lib/prism/node.rb#16271 + # pkg:gem/prism#lib/prism/node.rb:16271 sig { returns(Integer) } def numerator; end # Returns the value of the node as an IntegerNode or a FloatNode. This # method is deprecated in favor of #value or #numerator/#denominator. # - # source://prism//lib/prism/node_ext.rb#123 + # pkg:gem/prism#lib/prism/node_ext.rb:123 def numeric; end # def octal?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16259 + # pkg:gem/prism#lib/prism/node.rb:16259 sig { returns(T::Boolean) } def octal?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16284 + # pkg:gem/prism#lib/prism/node.rb:16284 sig { override.returns(Symbol) } def type; end # Returns the value of the node as a Ruby Rational. # - # source://prism//lib/prism/node_ext.rb#117 + # pkg:gem/prism#lib/prism/node_ext.rb:117 sig { returns(Rational) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16289 + # pkg:gem/prism#lib/prism/node.rb:16289 def type; end end end @@ -30756,68 +29937,65 @@ end # redo # ^^^^ # -# source://prism//lib/prism/node.rb#16307 +# pkg:gem/prism#lib/prism/node.rb:16307 class Prism::RedoNode < ::Prism::Node # Initialize a new RedoNode node. # - # @return [RedoNode] a new instance of RedoNode - # - # source://prism//lib/prism/node.rb#16309 + # pkg:gem/prism#lib/prism/node.rb:16309 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16372 + # pkg:gem/prism#lib/prism/node.rb:16372 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16317 + # pkg:gem/prism#lib/prism/node.rb:16317 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16322 + # pkg:gem/prism#lib/prism/node.rb:16322 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16338 + # pkg:gem/prism#lib/prism/node.rb:16338 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16333 + # pkg:gem/prism#lib/prism/node.rb:16333 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RedoNode # - # source://prism//lib/prism/node.rb#16343 + # pkg:gem/prism#lib/prism/node.rb:16343 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RedoNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16322 + # pkg:gem/prism#lib/prism/node.rb:16348 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#16351 + # pkg:gem/prism#lib/prism/node.rb:16351 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#16327 + # pkg:gem/prism#lib/prism/node.rb:16327 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -30825,20 +30003,20 @@ class Prism::RedoNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16356 + # pkg:gem/prism#lib/prism/node.rb:16356 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16361 + # pkg:gem/prism#lib/prism/node.rb:16361 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16366 + # pkg:gem/prism#lib/prism/node.rb:16366 def type; end end end @@ -30847,12 +30025,12 @@ end # the syntax tree itself, as opposed to looking at a single syntax tree. This # is useful in metaprogramming contexts. # -# source://prism//lib/prism/reflection.rb#16 +# pkg:gem/prism#lib/prism/reflection.rb:16 module Prism::Reflection class << self # Returns the fields for the given node. # - # source://prism//lib/prism/reflection.rb#107 + # pkg:gem/prism#lib/prism/reflection.rb:107 sig { params(node: T.class_of(Prism::Node)).returns(T::Array[Prism::Reflection::Field]) } def fields_for(node); end end @@ -30862,31 +30040,29 @@ end # represents an identifier found within the source. It resolves to a symbol # in Ruby. # -# source://prism//lib/prism/reflection.rb#48 +# pkg:gem/prism#lib/prism/reflection.rb:48 class Prism::Reflection::ConstantField < ::Prism::Reflection::Field; end # A constant list field represents a list of constant values on a node. It # resolves to an array of symbols in Ruby. # -# source://prism//lib/prism/reflection.rb#58 +# pkg:gem/prism#lib/prism/reflection.rb:58 class Prism::Reflection::ConstantListField < ::Prism::Reflection::Field; end # A field represents a single piece of data on a node. It is the base class # for all other field types. # -# source://prism//lib/prism/reflection.rb#19 +# pkg:gem/prism#lib/prism/reflection.rb:19 class Prism::Reflection::Field # Initializes the field with the given name. # - # @return [Field] a new instance of Field - # - # source://prism//lib/prism/reflection.rb#24 + # pkg:gem/prism#lib/prism/reflection.rb:24 sig { params(name: Symbol).void } def initialize(name); end # The name of the field. # - # source://prism//lib/prism/reflection.rb#21 + # pkg:gem/prism#lib/prism/reflection.rb:21 sig { returns(Symbol) } def name; end end @@ -30896,19 +30072,17 @@ end # node because the integer is kept private. Instead, the various flags in # the bitset should be accessed through their query methods. # -# source://prism//lib/prism/reflection.rb#95 +# pkg:gem/prism#lib/prism/reflection.rb:95 class Prism::Reflection::FlagsField < ::Prism::Reflection::Field # Initializes the flags field with the given name and flags. # - # @return [FlagsField] a new instance of FlagsField - # - # source://prism//lib/prism/reflection.rb#100 + # pkg:gem/prism#lib/prism/reflection.rb:100 sig { params(name: Symbol, flags: T::Array[Symbol]).void } def initialize(name, flags); end # The names of the flags in the bitset. # - # source://prism//lib/prism/reflection.rb#97 + # pkg:gem/prism#lib/prism/reflection.rb:97 sig { returns(T::Array[Symbol]) } def flags; end end @@ -30917,120 +30091,120 @@ end # used exclusively to represent the value of a floating point literal. It # resolves to a Float in Ruby. # -# source://prism//lib/prism/reflection.rb#88 +# pkg:gem/prism#lib/prism/reflection.rb:88 class Prism::Reflection::FloatField < ::Prism::Reflection::Field; end # An integer field represents an integer value. It is used to represent the # value of an integer literal, the depth of local variables, and the number # of a numbered reference. It resolves to an Integer in Ruby. # -# source://prism//lib/prism/reflection.rb#82 +# pkg:gem/prism#lib/prism/reflection.rb:82 class Prism::Reflection::IntegerField < ::Prism::Reflection::Field; end # A location field represents the location of some part of the node in the # source code. For example, the location of a keyword or an operator. It # resolves to a Prism::Location in Ruby. # -# source://prism//lib/prism/reflection.rb#70 +# pkg:gem/prism#lib/prism/reflection.rb:70 class Prism::Reflection::LocationField < ::Prism::Reflection::Field; end # A node field represents a single child node in the syntax tree. It # resolves to a Prism::Node in Ruby. # -# source://prism//lib/prism/reflection.rb#31 +# pkg:gem/prism#lib/prism/reflection.rb:31 class Prism::Reflection::NodeField < ::Prism::Reflection::Field; end # A node list field represents a list of child nodes in the syntax tree. It # resolves to an array of Prism::Node instances in Ruby. # -# source://prism//lib/prism/reflection.rb#42 +# pkg:gem/prism#lib/prism/reflection.rb:42 class Prism::Reflection::NodeListField < ::Prism::Reflection::Field; end # An optional constant field represents a constant value on a node that may # or may not be present. It resolves to either a symbol or nil in Ruby. # -# source://prism//lib/prism/reflection.rb#53 +# pkg:gem/prism#lib/prism/reflection.rb:53 class Prism::Reflection::OptionalConstantField < ::Prism::Reflection::Field; end # An optional location field represents the location of some part of the # node in the source code that may or may not be present. It resolves to # either a Prism::Location or nil in Ruby. # -# source://prism//lib/prism/reflection.rb#76 +# pkg:gem/prism#lib/prism/reflection.rb:76 class Prism::Reflection::OptionalLocationField < ::Prism::Reflection::Field; end # An optional node field represents a single child node in the syntax tree # that may or may not be present. It resolves to either a Prism::Node or nil # in Ruby. # -# source://prism//lib/prism/reflection.rb#37 +# pkg:gem/prism#lib/prism/reflection.rb:37 class Prism::Reflection::OptionalNodeField < ::Prism::Reflection::Field; end # A string field represents a string value on a node. It almost always # represents the unescaped value of a string-like literal. It resolves to a # string in Ruby. # -# source://prism//lib/prism/reflection.rb#64 +# pkg:gem/prism#lib/prism/reflection.rb:64 class Prism::Reflection::StringField < ::Prism::Reflection::Field; end # Flags for regular expression and match last line nodes. # -# source://prism//lib/prism/node.rb#19882 +# pkg:gem/prism#lib/prism/node.rb:19882 module Prism::RegularExpressionFlags; end # n - forces the ASCII-8BIT encoding # -# source://prism//lib/prism/node.rb#19899 +# pkg:gem/prism#lib/prism/node.rb:19899 Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) # e - forces the EUC-JP encoding # -# source://prism//lib/prism/node.rb#19896 +# pkg:gem/prism#lib/prism/node.rb:19896 Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) # x - ignores whitespace and allows comments in regular expressions # -# source://prism//lib/prism/node.rb#19887 +# pkg:gem/prism#lib/prism/node.rb:19887 Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19911 +# pkg:gem/prism#lib/prism/node.rb:19911 Prism::RegularExpressionFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to US-ASCII # -# source://prism//lib/prism/node.rb#19914 +# pkg:gem/prism#lib/prism/node.rb:19914 Prism::RegularExpressionFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#19908 +# pkg:gem/prism#lib/prism/node.rb:19908 Prism::RegularExpressionFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # i - ignores the case of characters when matching # -# source://prism//lib/prism/node.rb#19884 +# pkg:gem/prism#lib/prism/node.rb:19884 Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) # m - allows $ to match the end of lines within strings # -# source://prism//lib/prism/node.rb#19890 +# pkg:gem/prism#lib/prism/node.rb:19890 Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) # o - only interpolates values into the regular expression once # -# source://prism//lib/prism/node.rb#19893 +# pkg:gem/prism#lib/prism/node.rb:19893 Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) # u - forces the UTF-8 encoding # -# source://prism//lib/prism/node.rb#19905 +# pkg:gem/prism#lib/prism/node.rb:19905 Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) # s - forces the Windows-31J encoding # -# source://prism//lib/prism/node.rb#19902 +# pkg:gem/prism#lib/prism/node.rb:19902 Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # Represents a regular expression literal with no interpolation. @@ -31038,15 +30212,13 @@ Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # /foo/i # ^^^^^^ # -# source://prism//lib/prism/node.rb#16381 +# pkg:gem/prism#lib/prism/node.rb:16381 class Prism::RegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions # Initialize a new RegularExpressionNode node. # - # @return [RegularExpressionNode] a new instance of RegularExpressionNode - # - # source://prism//lib/prism/node.rb#16383 + # pkg:gem/prism#lib/prism/node.rb:16383 sig do params( source: Prism::Source, @@ -31064,68 +30236,66 @@ class Prism::RegularExpressionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16562 + # pkg:gem/prism#lib/prism/node.rb:16562 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16395 + # pkg:gem/prism#lib/prism/node.rb:16395 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def ascii_8bit?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16459 + # pkg:gem/prism#lib/prism/node.rb:16459 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16400 + # pkg:gem/prism#lib/prism/node.rb:16400 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#16541 + # pkg:gem/prism#lib/prism/node.rb:16541 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#16515 + # pkg:gem/prism#lib/prism/node.rb:16515 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16416 + # pkg:gem/prism#lib/prism/node.rb:16416 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16411 + # pkg:gem/prism#lib/prism/node.rb:16411 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#16536 + # pkg:gem/prism#lib/prism/node.rb:16536 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#16502 + # pkg:gem/prism#lib/prism/node.rb:16502 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode # - # source://prism//lib/prism/node.rb#16421 + # pkg:gem/prism#lib/prism/node.rb:16421 sig do params( node_id: Integer, @@ -31139,37 +30309,32 @@ class Prism::RegularExpressionNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16400 + # pkg:gem/prism#lib/prism/node.rb:16426 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism//lib/prism/node.rb#16429 + # pkg:gem/prism#lib/prism/node.rb:16429 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#16405 + # pkg:gem/prism#lib/prism/node.rb:16405 def each_child_node; end # def euc_jp?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16454 + # pkg:gem/prism#lib/prism/node.rb:16454 sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16439 + # pkg:gem/prism#lib/prism/node.rb:16439 sig { returns(T::Boolean) } def extended?; end @@ -31178,67 +30343,55 @@ class Prism::RegularExpressionNode < ::Prism::Node # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16479 + # pkg:gem/prism#lib/prism/node.rb:16479 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16484 + # pkg:gem/prism#lib/prism/node.rb:16484 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16474 + # pkg:gem/prism#lib/prism/node.rb:16474 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def ignore_case?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16434 + # pkg:gem/prism#lib/prism/node.rb:16434 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#16546 + # pkg:gem/prism#lib/prism/node.rb:16546 sig { override.returns(String) } def inspect; end # def multi_line?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16444 + # pkg:gem/prism#lib/prism/node.rb:16444 sig { returns(T::Boolean) } def multi_line?; end # def once?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16449 + # pkg:gem/prism#lib/prism/node.rb:16449 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#16531 + # pkg:gem/prism#lib/prism/node.rb:16531 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#16489 + # pkg:gem/prism#lib/prism/node.rb:16489 sig { returns(Prism::Location) } def opening_loc; end @@ -31248,63 +30401,59 @@ class Prism::RegularExpressionNode < ::Prism::Node # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16523 + # pkg:gem/prism#lib/prism/node.rb:16523 def save_closing_loc(repository); end # Save the content_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16510 + # pkg:gem/prism#lib/prism/node.rb:16510 def save_content_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16497 + # pkg:gem/prism#lib/prism/node.rb:16497 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16551 + # pkg:gem/prism#lib/prism/node.rb:16551 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#16528 + # pkg:gem/prism#lib/prism/node.rb:16528 sig { returns(String) } def unescaped; end # def utf_8?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16469 + # pkg:gem/prism#lib/prism/node.rb:16469 sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16464 + # pkg:gem/prism#lib/prism/node.rb:16464 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16556 + # pkg:gem/prism#lib/prism/node.rb:16556 def type; end end end -# source://prism//lib/prism/node_ext.rb#23 +# pkg:gem/prism#lib/prism/node_ext.rb:23 module Prism::RegularExpressionOptions # Returns a numeric value that represents the flags that were used to create # the regular expression. # - # source://prism//lib/prism/node_ext.rb#26 + # pkg:gem/prism#lib/prism/node_ext.rb:26 def options; end end @@ -31318,276 +30467,268 @@ end # "save" nodes and locations using a minimal amount of memory (just the # node_id and a field identifier) and then reify them later. # -# source://prism//lib/prism/relocation.rb#14 +# pkg:gem/prism#lib/prism/relocation.rb:14 module Prism::Relocation class << self # Create a new repository for the given filepath. # - # source://prism//lib/prism/relocation.rb#496 + # pkg:gem/prism#lib/prism/relocation.rb:496 def filepath(value); end # Create a new repository for the given string. # - # source://prism//lib/prism/relocation.rb#501 + # pkg:gem/prism#lib/prism/relocation.rb:501 def string(value); end end end # A field representing the start and end character columns. # -# source://prism//lib/prism/relocation.rb#270 +# pkg:gem/prism#lib/prism/relocation.rb:270 class Prism::Relocation::CharacterColumnsField # Fetches the start and end character column of a value. # - # source://prism//lib/prism/relocation.rb#272 + # pkg:gem/prism#lib/prism/relocation.rb:272 def fields(value); end end # A field representing the start and end character offsets. # -# source://prism//lib/prism/relocation.rb#218 +# pkg:gem/prism#lib/prism/relocation.rb:218 class Prism::Relocation::CharacterOffsetsField # Fetches the start and end character offset of a value. # - # source://prism//lib/prism/relocation.rb#220 + # pkg:gem/prism#lib/prism/relocation.rb:220 def fields(value); end end # A field representing the start and end code unit columns for a specific # encoding. # -# source://prism//lib/prism/relocation.rb#282 +# pkg:gem/prism#lib/prism/relocation.rb:282 class Prism::Relocation::CodeUnitColumnsField # Initialize a new field with the associated repository and encoding. # - # @return [CodeUnitColumnsField] a new instance of CodeUnitColumnsField - # - # source://prism//lib/prism/relocation.rb#291 + # pkg:gem/prism#lib/prism/relocation.rb:291 def initialize(repository, encoding); end # The associated encoding for the code units. # - # source://prism//lib/prism/relocation.rb#288 + # pkg:gem/prism#lib/prism/relocation.rb:288 def encoding; end # Fetches the start and end code units column of a value for a particular # encoding. # - # source://prism//lib/prism/relocation.rb#299 + # pkg:gem/prism#lib/prism/relocation.rb:299 def fields(value); end # The repository object that is used for lazily creating a code units # cache. # - # source://prism//lib/prism/relocation.rb#285 + # pkg:gem/prism#lib/prism/relocation.rb:285 def repository; end private # Lazily create a code units cache for the associated encoding. # - # source://prism//lib/prism/relocation.rb#309 + # pkg:gem/prism#lib/prism/relocation.rb:309 def cache; end end # A field representing the start and end code unit offsets. # -# source://prism//lib/prism/relocation.rb#229 +# pkg:gem/prism#lib/prism/relocation.rb:229 class Prism::Relocation::CodeUnitOffsetsField # Initialize a new field with the associated repository and encoding. # - # @return [CodeUnitOffsetsField] a new instance of CodeUnitOffsetsField - # - # source://prism//lib/prism/relocation.rb#238 + # pkg:gem/prism#lib/prism/relocation.rb:238 def initialize(repository, encoding); end # The associated encoding for the code units. # - # source://prism//lib/prism/relocation.rb#235 + # pkg:gem/prism#lib/prism/relocation.rb:235 def encoding; end # Fetches the start and end code units offset of a value for a particular # encoding. # - # source://prism//lib/prism/relocation.rb#246 + # pkg:gem/prism#lib/prism/relocation.rb:246 def fields(value); end # A pointer to the repository object that is used for lazily creating a # code units cache. # - # source://prism//lib/prism/relocation.rb#232 + # pkg:gem/prism#lib/prism/relocation.rb:232 def repository; end private # Lazily create a code units cache for the associated encoding. # - # source://prism//lib/prism/relocation.rb#256 + # pkg:gem/prism#lib/prism/relocation.rb:256 def cache; end end # A field representing the start and end byte columns. # -# source://prism//lib/prism/relocation.rb#262 +# pkg:gem/prism#lib/prism/relocation.rb:262 class Prism::Relocation::ColumnsField # Fetches the start and end byte column of a value. # - # source://prism//lib/prism/relocation.rb#264 + # pkg:gem/prism#lib/prism/relocation.rb:264 def fields(value); end end # An abstract field used as the parent class of the two comments fields. # -# source://prism//lib/prism/relocation.rb#315 +# pkg:gem/prism#lib/prism/relocation.rb:315 class Prism::Relocation::CommentsField private # Create comment objects from the given values. # - # source://prism//lib/prism/relocation.rb#330 + # pkg:gem/prism#lib/prism/relocation.rb:330 def comments(values); end end # An object that represents a slice of a comment. # -# source://prism//lib/prism/relocation.rb#317 +# pkg:gem/prism#lib/prism/relocation.rb:317 class Prism::Relocation::CommentsField::Comment # Initialize a new comment with the given slice. # - # @return [Comment] a new instance of Comment - # - # source://prism//lib/prism/relocation.rb#322 + # pkg:gem/prism#lib/prism/relocation.rb:322 def initialize(slice); end # The slice of the comment. # - # source://prism//lib/prism/relocation.rb#319 + # pkg:gem/prism#lib/prism/relocation.rb:319 def slice; end end # An entry in a repository that will lazily reify its values when they are # first accessed. # -# source://prism//lib/prism/relocation.rb#17 +# pkg:gem/prism#lib/prism/relocation.rb:17 class Prism::Relocation::Entry # Initialize a new entry with the given repository. # - # @return [Entry] a new instance of Entry - # - # source://prism//lib/prism/relocation.rb#25 + # pkg:gem/prism#lib/prism/relocation.rb:25 def initialize(repository); end # Fetch the leading and trailing comments of the value. # - # source://prism//lib/prism/relocation.rb#120 + # pkg:gem/prism#lib/prism/relocation.rb:120 def comments; end # Fetch the end character column of the value. # - # source://prism//lib/prism/relocation.rb#93 + # pkg:gem/prism#lib/prism/relocation.rb:93 def end_character_column; end # Fetch the end character offset of the value. # - # source://prism//lib/prism/relocation.rb#61 + # pkg:gem/prism#lib/prism/relocation.rb:61 def end_character_offset; end # Fetch the end code units column of the value, for the encoding that was # configured on the repository. # - # source://prism//lib/prism/relocation.rb#105 + # pkg:gem/prism#lib/prism/relocation.rb:105 def end_code_units_column; end # Fetch the end code units offset of the value, for the encoding that was # configured on the repository. # - # source://prism//lib/prism/relocation.rb#73 + # pkg:gem/prism#lib/prism/relocation.rb:73 def end_code_units_offset; end # Fetch the end byte column of the value. # - # source://prism//lib/prism/relocation.rb#83 + # pkg:gem/prism#lib/prism/relocation.rb:83 def end_column; end # Fetch the end line of the value. # - # source://prism//lib/prism/relocation.rb#41 + # pkg:gem/prism#lib/prism/relocation.rb:41 def end_line; end # Fetch the end byte offset of the value. # - # source://prism//lib/prism/relocation.rb#51 + # pkg:gem/prism#lib/prism/relocation.rb:51 def end_offset; end # Fetch the filepath of the value. # - # source://prism//lib/prism/relocation.rb#31 + # pkg:gem/prism#lib/prism/relocation.rb:31 def filepath; end # Fetch the leading comments of the value. # - # source://prism//lib/prism/relocation.rb#110 + # pkg:gem/prism#lib/prism/relocation.rb:110 def leading_comments; end # Reify the values on this entry with the given values. This is an # internal-only API that is called from the repository when it is time to # reify the values. # - # source://prism//lib/prism/relocation.rb#127 + # pkg:gem/prism#lib/prism/relocation.rb:127 def reify!(values); end # Fetch the start character column of the value. # - # source://prism//lib/prism/relocation.rb#88 + # pkg:gem/prism#lib/prism/relocation.rb:88 def start_character_column; end # Fetch the start character offset of the value. # - # source://prism//lib/prism/relocation.rb#56 + # pkg:gem/prism#lib/prism/relocation.rb:56 def start_character_offset; end # Fetch the start code units column of the value, for the encoding that # was configured on the repository. # - # source://prism//lib/prism/relocation.rb#99 + # pkg:gem/prism#lib/prism/relocation.rb:99 def start_code_units_column; end # Fetch the start code units offset of the value, for the encoding that # was configured on the repository. # - # source://prism//lib/prism/relocation.rb#67 + # pkg:gem/prism#lib/prism/relocation.rb:67 def start_code_units_offset; end # Fetch the start byte column of the value. # - # source://prism//lib/prism/relocation.rb#78 + # pkg:gem/prism#lib/prism/relocation.rb:78 def start_column; end # Fetch the start line of the value. # - # source://prism//lib/prism/relocation.rb#36 + # pkg:gem/prism#lib/prism/relocation.rb:36 def start_line; end # Fetch the start byte offset of the value. # - # source://prism//lib/prism/relocation.rb#46 + # pkg:gem/prism#lib/prism/relocation.rb:46 def start_offset; end # Fetch the trailing comments of the value. # - # source://prism//lib/prism/relocation.rb#115 + # pkg:gem/prism#lib/prism/relocation.rb:115 def trailing_comments; end private # Fetch a value from the entry, raising an error if it is missing. # - # source://prism//lib/prism/relocation.rb#135 + # pkg:gem/prism#lib/prism/relocation.rb:135 def fetch_value(name); end # Return the values from the repository, reifying them if necessary. # - # source://prism//lib/prism/relocation.rb#143 + # pkg:gem/prism#lib/prism/relocation.rb:143 def values; end end @@ -31595,170 +30736,164 @@ end # because it was either not configured on the repository or it has not yet # been fetched. # -# source://prism//lib/prism/relocation.rb#21 +# pkg:gem/prism#lib/prism/relocation.rb:21 class Prism::Relocation::Entry::MissingValueError < ::StandardError; end # A field that represents the file path. # -# source://prism//lib/prism/relocation.rb#186 +# pkg:gem/prism#lib/prism/relocation.rb:186 class Prism::Relocation::FilepathField # Initialize a new field with the given file path. # - # @return [FilepathField] a new instance of FilepathField - # - # source://prism//lib/prism/relocation.rb#191 + # pkg:gem/prism#lib/prism/relocation.rb:191 def initialize(value); end # Fetch the file path. # - # source://prism//lib/prism/relocation.rb#196 + # pkg:gem/prism#lib/prism/relocation.rb:196 def fields(_value); end # The file path that this field represents. # - # source://prism//lib/prism/relocation.rb#188 + # pkg:gem/prism#lib/prism/relocation.rb:188 def value; end end # A field representing the leading comments. # -# source://prism//lib/prism/relocation.rb#336 +# pkg:gem/prism#lib/prism/relocation.rb:336 class Prism::Relocation::LeadingCommentsField < ::Prism::Relocation::CommentsField # Fetches the leading comments of a value. # - # source://prism//lib/prism/relocation.rb#338 + # pkg:gem/prism#lib/prism/relocation.rb:338 def fields(value); end end # A field representing the start and end lines. # -# source://prism//lib/prism/relocation.rb#202 +# pkg:gem/prism#lib/prism/relocation.rb:202 class Prism::Relocation::LinesField # Fetches the start and end line of a value. # - # source://prism//lib/prism/relocation.rb#204 + # pkg:gem/prism#lib/prism/relocation.rb:204 def fields(value); end end # A field representing the start and end byte offsets. # -# source://prism//lib/prism/relocation.rb#210 +# pkg:gem/prism#lib/prism/relocation.rb:210 class Prism::Relocation::OffsetsField # Fetches the start and end byte offset of a value. # - # source://prism//lib/prism/relocation.rb#212 + # pkg:gem/prism#lib/prism/relocation.rb:212 def fields(value); end end # A repository is a configured collection of fields and a set of entries # that knows how to reparse a source and reify the values. # -# source://prism//lib/prism/relocation.rb#353 +# pkg:gem/prism#lib/prism/relocation.rb:353 class Prism::Relocation::Repository # Initialize a new repository with the given source. # - # @return [Repository] a new instance of Repository - # - # source://prism//lib/prism/relocation.rb#370 + # pkg:gem/prism#lib/prism/relocation.rb:370 def initialize(source); end # Configure the character columns field for this repository and return # self. # - # source://prism//lib/prism/relocation.rb#416 + # pkg:gem/prism#lib/prism/relocation.rb:416 def character_columns; end # Configure the character offsets field for this repository and return # self. # - # source://prism//lib/prism/relocation.rb#399 + # pkg:gem/prism#lib/prism/relocation.rb:399 def character_offsets; end # Configure the code unit columns field for this repository for a specific # encoding and return self. # - # source://prism//lib/prism/relocation.rb#422 + # pkg:gem/prism#lib/prism/relocation.rb:422 def code_unit_columns(encoding); end # Configure the code unit offsets field for this repository for a specific # encoding and return self. # - # source://prism//lib/prism/relocation.rb#405 + # pkg:gem/prism#lib/prism/relocation.rb:405 def code_unit_offsets(encoding); end # Create a code units cache for the given encoding from the source. # - # source://prism//lib/prism/relocation.rb#377 + # pkg:gem/prism#lib/prism/relocation.rb:377 def code_units_cache(encoding); end # Configure the columns field for this repository and return self. # - # source://prism//lib/prism/relocation.rb#410 + # pkg:gem/prism#lib/prism/relocation.rb:410 def columns; end # Configure both the leading and trailing comment fields for this # repository and return self. # - # source://prism//lib/prism/relocation.rb#440 + # pkg:gem/prism#lib/prism/relocation.rb:440 def comments; end # This method is called from nodes and locations when they want to enter # themselves into the repository. It it internal-only and meant to be # called from the #save* APIs. # - # source://prism//lib/prism/relocation.rb#447 + # pkg:gem/prism#lib/prism/relocation.rb:447 def enter(node_id, field_name); end # The entries that have been saved on this repository. # - # source://prism//lib/prism/relocation.rb#367 + # pkg:gem/prism#lib/prism/relocation.rb:367 def entries; end # The fields that have been configured on this repository. # - # source://prism//lib/prism/relocation.rb#364 + # pkg:gem/prism#lib/prism/relocation.rb:364 def fields; end # Configure the filepath field for this repository and return self. # - # @raise [ConfigurationError] - # - # source://prism//lib/prism/relocation.rb#382 + # pkg:gem/prism#lib/prism/relocation.rb:382 def filepath; end # Configure the leading comments field for this repository and return # self. # - # source://prism//lib/prism/relocation.rb#428 + # pkg:gem/prism#lib/prism/relocation.rb:428 def leading_comments; end # Configure the lines field for this repository and return self. # - # source://prism//lib/prism/relocation.rb#388 + # pkg:gem/prism#lib/prism/relocation.rb:388 def lines; end # Configure the offsets field for this repository and return self. # - # source://prism//lib/prism/relocation.rb#393 + # pkg:gem/prism#lib/prism/relocation.rb:393 def offsets; end # This method is called from the entries in the repository when they need # to reify their values. It is internal-only and meant to be called from # the various value APIs. # - # source://prism//lib/prism/relocation.rb#456 + # pkg:gem/prism#lib/prism/relocation.rb:456 def reify!; end # The source associated with this repository. This will be either a # SourceFilepath (the most common use case) or a SourceString. # - # source://prism//lib/prism/relocation.rb#361 + # pkg:gem/prism#lib/prism/relocation.rb:361 def source; end # Configure the trailing comments field for this repository and return # self. # - # source://prism//lib/prism/relocation.rb#434 + # pkg:gem/prism#lib/prism/relocation.rb:434 def trailing_comments; end private @@ -31766,74 +30901,68 @@ class Prism::Relocation::Repository # Append the given field to the repository and return the repository so # that these calls can be chained. # - # @raise [ConfigurationError] - # - # source://prism//lib/prism/relocation.rb#488 + # pkg:gem/prism#lib/prism/relocation.rb:488 def field(name, value); end end # Raised when multiple fields of the same type are configured on the same # repository. # -# source://prism//lib/prism/relocation.rb#356 +# pkg:gem/prism#lib/prism/relocation.rb:356 class Prism::Relocation::Repository::ConfigurationError < ::StandardError; end # Represents the source of a repository that will be reparsed. # -# source://prism//lib/prism/relocation.rb#149 +# pkg:gem/prism#lib/prism/relocation.rb:149 class Prism::Relocation::Source # Initialize the source with the given value. # - # @return [Source] a new instance of Source - # - # source://prism//lib/prism/relocation.rb#154 + # pkg:gem/prism#lib/prism/relocation.rb:154 def initialize(value); end # Create a code units cache for the given encoding. # - # source://prism//lib/prism/relocation.rb#164 + # pkg:gem/prism#lib/prism/relocation.rb:164 def code_units_cache(encoding); end # Reparse the value and return the parse result. # - # @raise [NotImplementedError] - # - # source://prism//lib/prism/relocation.rb#159 + # pkg:gem/prism#lib/prism/relocation.rb:159 def result; end # The value that will need to be reparsed. # - # source://prism//lib/prism/relocation.rb#151 + # pkg:gem/prism#lib/prism/relocation.rb:151 def value; end end # A source that is represented by a file path. # -# source://prism//lib/prism/relocation.rb#170 +# pkg:gem/prism#lib/prism/relocation.rb:170 class Prism::Relocation::SourceFilepath < ::Prism::Relocation::Source # Reparse the file and return the parse result. # - # source://prism//lib/prism/relocation.rb#172 + # pkg:gem/prism#lib/prism/relocation.rb:172 def result; end end # A source that is represented by a string. # -# source://prism//lib/prism/relocation.rb#178 +# pkg:gem/prism#lib/prism/relocation.rb:178 class Prism::Relocation::SourceString < ::Prism::Relocation::Source # Reparse the string and return the parse result. # - # source://prism//lib/prism/relocation.rb#180 + # pkg:gem/prism#lib/prism/relocation.rb:180 def result; end end # A field representing the trailing comments. # -# source://prism//lib/prism/relocation.rb#344 +# pkg:gem/prism#lib/prism/relocation.rb:344 class Prism::Relocation::TrailingCommentsField < ::Prism::Relocation::CommentsField # Fetches the trailing comments of a value. # - # source://prism//lib/prism/relocation.rb#346 + # pkg:gem/prism#lib/prism/relocation.rb:346 def fields(value); end end @@ -31843,13 +30972,11 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#16577 +# pkg:gem/prism#lib/prism/node.rb:16577 class Prism::RequiredKeywordParameterNode < ::Prism::Node # Initialize a new RequiredKeywordParameterNode node. # - # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode - # - # source://prism//lib/prism/node.rb#16579 + # pkg:gem/prism#lib/prism/node.rb:16579 sig do params( source: Prism::Source, @@ -31865,36 +30992,36 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16665 + # pkg:gem/prism#lib/prism/node.rb:16665 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16589 + # pkg:gem/prism#lib/prism/node.rb:16589 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16594 + # pkg:gem/prism#lib/prism/node.rb:16594 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16610 + # pkg:gem/prism#lib/prism/node.rb:16610 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16605 + # pkg:gem/prism#lib/prism/node.rb:16605 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location) -> RequiredKeywordParameterNode # - # source://prism//lib/prism/node.rb#16615 + # pkg:gem/prism#lib/prism/node.rb:16615 sig do params( node_id: Integer, @@ -31906,22 +31033,21 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16594 + # pkg:gem/prism#lib/prism/node.rb:16620 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location } # - # source://prism//lib/prism/node.rb#16623 + # pkg:gem/prism#lib/prism/node.rb:16623 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#16599 + # pkg:gem/prism#lib/prism/node.rb:16599 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -31929,46 +31055,44 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16649 + # pkg:gem/prism#lib/prism/node.rb:16649 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#16633 + # pkg:gem/prism#lib/prism/node.rb:16633 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#16636 + # pkg:gem/prism#lib/prism/node.rb:16636 sig { returns(Prism::Location) } def name_loc; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16628 + # pkg:gem/prism#lib/prism/node.rb:16628 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16644 + # pkg:gem/prism#lib/prism/node.rb:16644 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16654 + # pkg:gem/prism#lib/prism/node.rb:16654 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16659 + # pkg:gem/prism#lib/prism/node.rb:16659 def type; end end end @@ -31979,49 +31103,47 @@ end # ^ # end # -# source://prism//lib/prism/node.rb#16678 +# pkg:gem/prism#lib/prism/node.rb:16678 class Prism::RequiredParameterNode < ::Prism::Node # Initialize a new RequiredParameterNode node. # - # @return [RequiredParameterNode] a new instance of RequiredParameterNode - # - # source://prism//lib/prism/node.rb#16680 + # pkg:gem/prism#lib/prism/node.rb:16680 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16752 + # pkg:gem/prism#lib/prism/node.rb:16752 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16689 + # pkg:gem/prism#lib/prism/node.rb:16689 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16694 + # pkg:gem/prism#lib/prism/node.rb:16694 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16710 + # pkg:gem/prism#lib/prism/node.rb:16710 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16705 + # pkg:gem/prism#lib/prism/node.rb:16705 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> RequiredParameterNode # - # source://prism//lib/prism/node.rb#16715 + # pkg:gem/prism#lib/prism/node.rb:16715 sig do params( node_id: Integer, @@ -32032,22 +31154,21 @@ class Prism::RequiredParameterNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16694 + # pkg:gem/prism#lib/prism/node.rb:16720 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#16723 + # pkg:gem/prism#lib/prism/node.rb:16723 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#16699 + # pkg:gem/prism#lib/prism/node.rb:16699 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -32055,34 +31176,32 @@ class Prism::RequiredParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16736 + # pkg:gem/prism#lib/prism/node.rb:16736 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#16733 + # pkg:gem/prism#lib/prism/node.rb:16733 sig { returns(Symbol) } def name; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16728 + # pkg:gem/prism#lib/prism/node.rb:16728 sig { returns(T::Boolean) } def repeated_parameter?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16741 + # pkg:gem/prism#lib/prism/node.rb:16741 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16746 + # pkg:gem/prism#lib/prism/node.rb:16746 def type; end end end @@ -32092,13 +31211,11 @@ end # foo rescue nil # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16763 +# pkg:gem/prism#lib/prism/node.rb:16763 class Prism::RescueModifierNode < ::Prism::Node # Initialize a new RescueModifierNode node. # - # @return [RescueModifierNode] a new instance of RescueModifierNode - # - # source://prism//lib/prism/node.rb#16765 + # pkg:gem/prism#lib/prism/node.rb:16765 sig do params( source: Prism::Source, @@ -32115,36 +31232,36 @@ class Prism::RescueModifierNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16857 + # pkg:gem/prism#lib/prism/node.rb:16857 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16776 + # pkg:gem/prism#lib/prism/node.rb:16776 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16781 + # pkg:gem/prism#lib/prism/node.rb:16781 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16799 + # pkg:gem/prism#lib/prism/node.rb:16799 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16794 + # pkg:gem/prism#lib/prism/node.rb:16794 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node) -> RescueModifierNode # - # source://prism//lib/prism/node.rb#16804 + # pkg:gem/prism#lib/prism/node.rb:16804 sig do params( node_id: Integer, @@ -32157,29 +31274,26 @@ class Prism::RescueModifierNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16781 + # pkg:gem/prism#lib/prism/node.rb:16809 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node } # - # source://prism//lib/prism/node.rb#16812 + # pkg:gem/prism#lib/prism/node.rb:16812 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [expression] - # - # source://prism//lib/prism/node.rb#16786 + # pkg:gem/prism#lib/prism/node.rb:16786 def each_child_node; end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#16817 + # pkg:gem/prism#lib/prism/node.rb:16817 sig { returns(Prism::Node) } def expression; end @@ -32188,47 +31302,47 @@ class Prism::RescueModifierNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16841 + # pkg:gem/prism#lib/prism/node.rb:16841 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16836 + # pkg:gem/prism#lib/prism/node.rb:16836 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16820 + # pkg:gem/prism#lib/prism/node.rb:16820 sig { returns(Prism::Location) } def keyword_loc; end - # source://prism//lib/prism/parse_result/newlines.rb#116 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:116 def newline_flag!(lines); end # attr_reader rescue_expression: Prism::node # - # source://prism//lib/prism/node.rb#16833 + # pkg:gem/prism#lib/prism/node.rb:16833 sig { returns(Prism::Node) } def rescue_expression; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16828 + # pkg:gem/prism#lib/prism/node.rb:16828 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16846 + # pkg:gem/prism#lib/prism/node.rb:16846 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16851 + # pkg:gem/prism#lib/prism/node.rb:16851 def type; end end end @@ -32243,13 +31357,11 @@ end # # `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `reference` field. # -# source://prism//lib/prism/node.rb#16874 +# pkg:gem/prism#lib/prism/node.rb:16874 class Prism::RescueNode < ::Prism::Node # Initialize a new RescueNode node. # - # @return [RescueNode] a new instance of RescueNode - # - # source://prism//lib/prism/node.rb#16876 + # pkg:gem/prism#lib/prism/node.rb:16876 sig do params( source: Prism::Source, @@ -32270,42 +31382,42 @@ class Prism::RescueNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17033 + # pkg:gem/prism#lib/prism/node.rb:17033 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16891 + # pkg:gem/prism#lib/prism/node.rb:16891 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16896 + # pkg:gem/prism#lib/prism/node.rb:16896 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16921 + # pkg:gem/prism#lib/prism/node.rb:16921 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16911 + # pkg:gem/prism#lib/prism/node.rb:16911 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # Returns the subsequent rescue clause of the rescue node. This method is # deprecated in favor of #subsequent. # - # source://prism//lib/prism/node_ext.rb#497 + # pkg:gem/prism#lib/prism/node_ext.rb:497 def consequent; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?subsequent: RescueNode?) -> RescueNode # - # source://prism//lib/prism/node.rb#16926 + # pkg:gem/prism#lib/prism/node.rb:16926 sig do params( node_id: Integer, @@ -32322,29 +31434,26 @@ class Prism::RescueNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16896 + # pkg:gem/prism#lib/prism/node.rb:16931 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: RescueNode? } # - # source://prism//lib/prism/node.rb#16934 + # pkg:gem/prism#lib/prism/node.rb:16934 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [reference] - # - # source://prism//lib/prism/node.rb#16901 + # pkg:gem/prism#lib/prism/node.rb:16901 def each_child_node; end # attr_reader exceptions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#16952 + # pkg:gem/prism#lib/prism/node.rb:16952 sig { returns(T::Array[Prism::Node]) } def exceptions; end @@ -32353,37 +31462,37 @@ class Prism::RescueNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17017 + # pkg:gem/prism#lib/prism/node.rb:17017 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17002 + # pkg:gem/prism#lib/prism/node.rb:17002 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16939 + # pkg:gem/prism#lib/prism/node.rb:16939 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#17007 + # pkg:gem/prism#lib/prism/node.rb:17007 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#16955 + # pkg:gem/prism#lib/prism/node.rb:16955 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil # - # source://prism//lib/prism/node.rb#16974 + # pkg:gem/prism#lib/prism/node.rb:16974 sig do returns(T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode))) end @@ -32392,55 +31501,55 @@ class Prism::RescueNode < ::Prism::Node # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16947 + # pkg:gem/prism#lib/prism/node.rb:16947 def save_keyword_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16969 + # pkg:gem/prism#lib/prism/node.rb:16969 def save_operator_loc(repository); end # Save the then_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16991 + # pkg:gem/prism#lib/prism/node.rb:16991 def save_then_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#16996 + # pkg:gem/prism#lib/prism/node.rb:16996 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # attr_reader subsequent: RescueNode? # - # source://prism//lib/prism/node.rb#16999 + # pkg:gem/prism#lib/prism/node.rb:16999 sig { returns(T.nilable(Prism::RescueNode)) } def subsequent; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#17012 + # pkg:gem/prism#lib/prism/node.rb:17012 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#16977 + # pkg:gem/prism#lib/prism/node.rb:16977 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17022 + # pkg:gem/prism#lib/prism/node.rb:17022 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17027 + # pkg:gem/prism#lib/prism/node.rb:17027 def type; end end end @@ -32451,13 +31560,11 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#17051 +# pkg:gem/prism#lib/prism/node.rb:17051 class Prism::RestParameterNode < ::Prism::Node # Initialize a new RestParameterNode node. # - # @return [RestParameterNode] a new instance of RestParameterNode - # - # source://prism//lib/prism/node.rb#17053 + # pkg:gem/prism#lib/prism/node.rb:17053 sig do params( source: Prism::Source, @@ -32474,36 +31581,36 @@ class Prism::RestParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17164 + # pkg:gem/prism#lib/prism/node.rb:17164 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17064 + # pkg:gem/prism#lib/prism/node.rb:17064 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17069 + # pkg:gem/prism#lib/prism/node.rb:17069 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17085 + # pkg:gem/prism#lib/prism/node.rb:17085 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17080 + # pkg:gem/prism#lib/prism/node.rb:17080 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> RestParameterNode # - # source://prism//lib/prism/node.rb#17090 + # pkg:gem/prism#lib/prism/node.rb:17090 sig do params( node_id: Integer, @@ -32516,22 +31623,21 @@ class Prism::RestParameterNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17069 + # pkg:gem/prism#lib/prism/node.rb:17095 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#17098 + # pkg:gem/prism#lib/prism/node.rb:17098 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#17074 + # pkg:gem/prism#lib/prism/node.rb:17074 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -32539,64 +31645,62 @@ class Prism::RestParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17148 + # pkg:gem/prism#lib/prism/node.rb:17148 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#17108 + # pkg:gem/prism#lib/prism/node.rb:17108 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#17111 + # pkg:gem/prism#lib/prism/node.rb:17111 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17143 + # pkg:gem/prism#lib/prism/node.rb:17143 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17130 + # pkg:gem/prism#lib/prism/node.rb:17130 sig { returns(Prism::Location) } def operator_loc; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17103 + # pkg:gem/prism#lib/prism/node.rb:17103 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17125 + # pkg:gem/prism#lib/prism/node.rb:17125 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17138 + # pkg:gem/prism#lib/prism/node.rb:17138 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17153 + # pkg:gem/prism#lib/prism/node.rb:17153 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17158 + # pkg:gem/prism#lib/prism/node.rb:17158 def type; end end end @@ -32605,13 +31709,11 @@ end # the requested structure, any comments that were encounters, and any errors # that were encountered. # -# source://prism//lib/prism/parse_result.rb#676 +# pkg:gem/prism#lib/prism/parse_result.rb:676 class Prism::Result # Create a new result object with the given values. # - # @return [Result] a new instance of Result - # - # source://prism//lib/prism/parse_result.rb#698 + # pkg:gem/prism#lib/prism/parse_result.rb:698 sig do params( comments: T::Array[Prism::Comment], @@ -32626,7 +31728,7 @@ class Prism::Result # Create a code units cache for the given encoding. # - # source://prism//lib/prism/parse_result.rb#730 + # pkg:gem/prism#lib/prism/parse_result.rb:730 sig do params( encoding: Encoding @@ -32636,7 +31738,7 @@ class Prism::Result # The list of comments that were encountered during parsing. # - # source://prism//lib/prism/parse_result.rb#678 + # pkg:gem/prism#lib/prism/parse_result.rb:678 sig { returns(T::Array[Prism::Comment]) } def comments; end @@ -32644,61 +31746,57 @@ class Prism::Result # and the rest of the content of the file. This content is loaded into the # DATA constant when the file being parsed is the main file being executed. # - # source://prism//lib/prism/parse_result.rb#686 + # pkg:gem/prism#lib/prism/parse_result.rb:686 sig { returns(T.nilable(Prism::Location)) } def data_loc; end # Implement the hash pattern matching interface for Result. # - # source://prism//lib/prism/parse_result.rb#708 + # pkg:gem/prism#lib/prism/parse_result.rb:708 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns the encoding of the source code that was parsed. # - # source://prism//lib/prism/parse_result.rb#713 + # pkg:gem/prism#lib/prism/parse_result.rb:713 sig { returns(Encoding) } def encoding; end # The list of errors that were generated during parsing. # - # source://prism//lib/prism/parse_result.rb#689 + # pkg:gem/prism#lib/prism/parse_result.rb:689 sig { returns(T::Array[Prism::ParseError]) } def errors; end # Returns true if there were errors during parsing and false if there were # not. # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#725 + # pkg:gem/prism#lib/prism/parse_result.rb:725 sig { returns(T::Boolean) } def failure?; end # The list of magic comments that were encountered during parsing. # - # source://prism//lib/prism/parse_result.rb#681 + # pkg:gem/prism#lib/prism/parse_result.rb:681 sig { returns(T::Array[Prism::MagicComment]) } def magic_comments; end # A Source instance that represents the source code that was parsed. # - # source://prism//lib/prism/parse_result.rb#695 + # pkg:gem/prism#lib/prism/parse_result.rb:695 sig { returns(Prism::Source) } def source; end # Returns true if there were no errors during parsing and false if there # were. # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#719 + # pkg:gem/prism#lib/prism/parse_result.rb:719 sig { returns(T::Boolean) } def success?; end # The list of warnings that were generated during parsing. # - # source://prism//lib/prism/parse_result.rb#692 + # pkg:gem/prism#lib/prism/parse_result.rb:692 sig { returns(T::Array[Prism::ParseWarning]) } def warnings; end end @@ -32708,68 +31806,65 @@ end # retry # ^^^^^ # -# source://prism//lib/prism/node.rb#17177 +# pkg:gem/prism#lib/prism/node.rb:17177 class Prism::RetryNode < ::Prism::Node # Initialize a new RetryNode node. # - # @return [RetryNode] a new instance of RetryNode - # - # source://prism//lib/prism/node.rb#17179 + # pkg:gem/prism#lib/prism/node.rb:17179 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17242 + # pkg:gem/prism#lib/prism/node.rb:17242 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17187 + # pkg:gem/prism#lib/prism/node.rb:17187 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17192 + # pkg:gem/prism#lib/prism/node.rb:17192 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17208 + # pkg:gem/prism#lib/prism/node.rb:17208 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17203 + # pkg:gem/prism#lib/prism/node.rb:17203 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RetryNode # - # source://prism//lib/prism/node.rb#17213 + # pkg:gem/prism#lib/prism/node.rb:17213 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RetryNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17192 + # pkg:gem/prism#lib/prism/node.rb:17218 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#17221 + # pkg:gem/prism#lib/prism/node.rb:17221 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#17197 + # pkg:gem/prism#lib/prism/node.rb:17197 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -32777,20 +31872,20 @@ class Prism::RetryNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17226 + # pkg:gem/prism#lib/prism/node.rb:17226 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17231 + # pkg:gem/prism#lib/prism/node.rb:17231 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17236 + # pkg:gem/prism#lib/prism/node.rb:17236 def type; end end end @@ -32800,13 +31895,11 @@ end # return 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#17251 +# pkg:gem/prism#lib/prism/node.rb:17251 class Prism::ReturnNode < ::Prism::Node # Initialize a new ReturnNode node. # - # @return [ReturnNode] a new instance of ReturnNode - # - # source://prism//lib/prism/node.rb#17253 + # pkg:gem/prism#lib/prism/node.rb:17253 sig do params( source: Prism::Source, @@ -32822,42 +31915,42 @@ class Prism::ReturnNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17342 + # pkg:gem/prism#lib/prism/node.rb:17342 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17263 + # pkg:gem/prism#lib/prism/node.rb:17263 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#17318 + # pkg:gem/prism#lib/prism/node.rb:17318 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17268 + # pkg:gem/prism#lib/prism/node.rb:17268 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17287 + # pkg:gem/prism#lib/prism/node.rb:17287 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17280 + # pkg:gem/prism#lib/prism/node.rb:17280 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?) -> ReturnNode # - # source://prism//lib/prism/node.rb#17292 + # pkg:gem/prism#lib/prism/node.rb:17292 sig do params( node_id: Integer, @@ -32869,24 +31962,21 @@ class Prism::ReturnNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17268 + # pkg:gem/prism#lib/prism/node.rb:17297 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, arguments: ArgumentsNode? } # - # source://prism//lib/prism/node.rb#17300 + # pkg:gem/prism#lib/prism/node.rb:17300 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [arguments] - # - # source://prism//lib/prism/node.rb#17273 + # pkg:gem/prism#lib/prism/node.rb:17273 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -32894,38 +31984,38 @@ class Prism::ReturnNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17326 + # pkg:gem/prism#lib/prism/node.rb:17326 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17321 + # pkg:gem/prism#lib/prism/node.rb:17321 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17305 + # pkg:gem/prism#lib/prism/node.rb:17305 sig { returns(Prism::Location) } def keyword_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17313 + # pkg:gem/prism#lib/prism/node.rb:17313 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17331 + # pkg:gem/prism#lib/prism/node.rb:17331 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17336 + # pkg:gem/prism#lib/prism/node.rb:17336 def type; end end end @@ -32935,13 +32025,11 @@ end # variables visible at that scope as well as the forwarding parameters # available at that scope. # -# source://prism//lib/prism/parse_result.rb#884 +# pkg:gem/prism#lib/prism/parse_result.rb:884 class Prism::Scope # Create a new scope object with the given locals and forwarding. # - # @return [Scope] a new instance of Scope - # - # source://prism//lib/prism/parse_result.rb#895 + # pkg:gem/prism#lib/prism/parse_result.rb:895 sig { params(locals: T::Array[Symbol], forwarding: T::Array[Symbol]).void } def initialize(locals, forwarding); end @@ -32949,14 +32037,14 @@ class Prism::Scope # should by defined as an array of symbols containing the specific values of # :*, :**, :&, or :"...". # - # source://prism//lib/prism/parse_result.rb#892 + # pkg:gem/prism#lib/prism/parse_result.rb:892 sig { returns(T::Array[Symbol]) } def forwarding; end # The list of local variables that are defined in this scope. This should be # defined as an array of symbols. # - # source://prism//lib/prism/parse_result.rb#887 + # pkg:gem/prism#lib/prism/parse_result.rb:887 sig { returns(T::Array[Symbol]) } def locals; end end @@ -32966,68 +32054,65 @@ end # self # ^^^^ # -# source://prism//lib/prism/node.rb#17353 +# pkg:gem/prism#lib/prism/node.rb:17353 class Prism::SelfNode < ::Prism::Node # Initialize a new SelfNode node. # - # @return [SelfNode] a new instance of SelfNode - # - # source://prism//lib/prism/node.rb#17355 + # pkg:gem/prism#lib/prism/node.rb:17355 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17418 + # pkg:gem/prism#lib/prism/node.rb:17418 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17363 + # pkg:gem/prism#lib/prism/node.rb:17363 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17368 + # pkg:gem/prism#lib/prism/node.rb:17368 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17384 + # pkg:gem/prism#lib/prism/node.rb:17384 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17379 + # pkg:gem/prism#lib/prism/node.rb:17379 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SelfNode # - # source://prism//lib/prism/node.rb#17389 + # pkg:gem/prism#lib/prism/node.rb:17389 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SelfNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17368 + # pkg:gem/prism#lib/prism/node.rb:17394 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#17397 + # pkg:gem/prism#lib/prism/node.rb:17397 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#17373 + # pkg:gem/prism#lib/prism/node.rb:17373 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -33035,27 +32120,27 @@ class Prism::SelfNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17402 + # pkg:gem/prism#lib/prism/node.rb:17402 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17407 + # pkg:gem/prism#lib/prism/node.rb:17407 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17412 + # pkg:gem/prism#lib/prism/node.rb:17412 def type; end end end # A module responsible for deserializing parse results. # -# source://prism//lib/prism/serialize.rb#17 +# pkg:gem/prism#lib/prism/serialize.rb:17 module Prism::Serialize class << self # Deserialize the dumped output from a request to lex or lex_file. @@ -33063,7 +32148,7 @@ module Prism::Serialize # The formatting of the source of this method is purposeful to illustrate # the structure of the serialized data. # - # source://prism//lib/prism/serialize.rb#87 + # pkg:gem/prism#lib/prism/serialize.rb:87 def load_lex(input, serialized, freeze); end # Deserialize the dumped output from a request to parse or parse_file. @@ -33071,7 +32156,7 @@ module Prism::Serialize # The formatting of the source of this method is purposeful to illustrate # the structure of the serialized data. # - # source://prism//lib/prism/serialize.rb#34 + # pkg:gem/prism#lib/prism/serialize.rb:34 def load_parse(input, serialized, freeze); end # Deserialize the dumped output from a request to parse_comments or @@ -33080,7 +32165,7 @@ module Prism::Serialize # The formatting of the source of this method is purposeful to illustrate # the structure of the serialized data. # - # source://prism//lib/prism/serialize.rb#131 + # pkg:gem/prism#lib/prism/serialize.rb:131 def load_parse_comments(input, serialized, freeze); end # Deserialize the dumped output from a request to parse_lex or @@ -33089,165 +32174,151 @@ module Prism::Serialize # The formatting of the source of this method is purposeful to illustrate # the structure of the serialized data. # - # source://prism//lib/prism/serialize.rb#153 + # pkg:gem/prism#lib/prism/serialize.rb:153 def load_parse_lex(input, serialized, freeze); end end end -# source://prism//lib/prism/serialize.rb#202 +# pkg:gem/prism#lib/prism/serialize.rb:202 class Prism::Serialize::ConstantPool - # @return [ConstantPool] a new instance of ConstantPool - # - # source://prism//lib/prism/serialize.rb#205 + # pkg:gem/prism#lib/prism/serialize.rb:205 def initialize(input, serialized, base, size); end - # source://prism//lib/prism/serialize.rb#213 + # pkg:gem/prism#lib/prism/serialize.rb:213 def get(index, encoding); end - # Returns the value of attribute size. - # - # source://prism//lib/prism/serialize.rb#203 + # pkg:gem/prism#lib/prism/serialize.rb:203 def size; end end # StringIO is synchronized and that adds a high overhead on TruffleRuby. # -# source://prism//lib/prism/serialize.rb#256 +# pkg:gem/prism#lib/prism/serialize.rb:256 Prism::Serialize::FastStringIO = StringIO -# source://prism//lib/prism/serialize.rb#259 +# pkg:gem/prism#lib/prism/serialize.rb:259 class Prism::Serialize::Loader - # @return [Loader] a new instance of Loader - # - # source://prism//lib/prism/serialize.rb#262 + # pkg:gem/prism#lib/prism/serialize.rb:262 def initialize(source, serialized); end - # @return [Boolean] - # - # source://prism//lib/prism/serialize.rb#270 + # pkg:gem/prism#lib/prism/serialize.rb:270 def eof?; end - # Returns the value of attribute input. - # - # source://prism//lib/prism/serialize.rb#260 + # pkg:gem/prism#lib/prism/serialize.rb:260 def input; end - # Returns the value of attribute io. - # - # source://prism//lib/prism/serialize.rb#260 + # pkg:gem/prism#lib/prism/serialize.rb:260 def io; end - # source://prism//lib/prism/serialize.rb#304 + # pkg:gem/prism#lib/prism/serialize.rb:304 def load_comments(freeze); end - # source://prism//lib/prism/serialize.rb#831 + # pkg:gem/prism#lib/prism/serialize.rb:831 def load_constant(constant_pool, encoding); end - # source://prism//lib/prism/serialize.rb#275 + # pkg:gem/prism#lib/prism/serialize.rb:275 def load_constant_pool(constant_pool); end - # source://prism//lib/prism/serialize.rb#782 + # pkg:gem/prism#lib/prism/serialize.rb:782 def load_double; end - # source://prism//lib/prism/serialize.rb#797 + # pkg:gem/prism#lib/prism/serialize.rb:797 def load_embedded_string(encoding); end - # source://prism//lib/prism/serialize.rb#292 + # pkg:gem/prism#lib/prism/serialize.rb:292 def load_encoding; end - # source://prism//lib/prism/serialize.rb#667 + # pkg:gem/prism#lib/prism/serialize.rb:667 def load_error_level; end - # source://prism//lib/prism/serialize.rb#682 + # pkg:gem/prism#lib/prism/serialize.rb:682 def load_errors(encoding, freeze); end - # source://prism//lib/prism/serialize.rb#286 + # pkg:gem/prism#lib/prism/serialize.rb:286 def load_header; end - # source://prism//lib/prism/serialize.rb#771 + # pkg:gem/prism#lib/prism/serialize.rb:771 def load_integer; end - # source://prism//lib/prism/serialize.rb#298 + # pkg:gem/prism#lib/prism/serialize.rb:298 def load_line_offsets(freeze); end - # source://prism//lib/prism/serialize.rb#818 + # pkg:gem/prism#lib/prism/serialize.rb:818 def load_location(freeze); end - # source://prism//lib/prism/serialize.rb#812 + # pkg:gem/prism#lib/prism/serialize.rb:812 def load_location_object(freeze); end - # source://prism//lib/prism/serialize.rb#321 + # pkg:gem/prism#lib/prism/serialize.rb:321 def load_magic_comments(freeze); end - # source://prism//lib/prism/serialize.rb#842 + # pkg:gem/prism#lib/prism/serialize.rb:842 def load_node(constant_pool, encoding, freeze); end - # source://prism//lib/prism/serialize.rb#836 + # pkg:gem/prism#lib/prism/serialize.rb:836 def load_optional_constant(constant_pool, encoding); end - # source://prism//lib/prism/serialize.rb#823 + # pkg:gem/prism#lib/prism/serialize.rb:823 def load_optional_location(freeze); end - # source://prism//lib/prism/serialize.rb#827 + # pkg:gem/prism#lib/prism/serialize.rb:827 def load_optional_location_object(freeze); end - # source://prism//lib/prism/serialize.rb#790 + # pkg:gem/prism#lib/prism/serialize.rb:790 def load_optional_node(constant_pool, encoding, freeze); end - # source://prism//lib/prism/serialize.rb#801 + # pkg:gem/prism#lib/prism/serialize.rb:801 def load_string(encoding); end - # source://prism//lib/prism/serialize.rb#733 + # pkg:gem/prism#lib/prism/serialize.rb:733 def load_tokens; end - # source://prism//lib/prism/serialize.rb#786 + # pkg:gem/prism#lib/prism/serialize.rb:786 def load_uint32; end - # source://prism//lib/prism/serialize.rb#766 + # pkg:gem/prism#lib/prism/serialize.rb:766 def load_varsint; end # variable-length integer using https://en.wikipedia.org/wiki/LEB128 # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints # - # source://prism//lib/prism/serialize.rb#752 + # pkg:gem/prism#lib/prism/serialize.rb:752 def load_varuint; end - # source://prism//lib/prism/serialize.rb#701 + # pkg:gem/prism#lib/prism/serialize.rb:701 def load_warning_level; end - # source://prism//lib/prism/serialize.rb#714 + # pkg:gem/prism#lib/prism/serialize.rb:714 def load_warnings(encoding, freeze); end - # Returns the value of attribute source. - # - # source://prism//lib/prism/serialize.rb#260 + # pkg:gem/prism#lib/prism/serialize.rb:260 def source; end end -# source://prism//lib/prism/serialize.rb#338 +# pkg:gem/prism#lib/prism/serialize.rb:338 Prism::Serialize::Loader::DIAGNOSTIC_TYPES = T.let(T.unsafe(nil), Array) # The major version of prism that we are expecting to find in the serialized # strings. # -# source://prism//lib/prism/serialize.rb#20 +# pkg:gem/prism#lib/prism/serialize.rb:20 Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) # The minor version of prism that we are expecting to find in the serialized # strings. # -# source://prism//lib/prism/serialize.rb#24 +# pkg:gem/prism#lib/prism/serialize.rb:24 Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) # The patch version of prism that we are expecting to find in the serialized # strings. # -# source://prism//lib/prism/serialize.rb#28 +# pkg:gem/prism#lib/prism/serialize.rb:28 Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) # The token types that can be indexed by their enum values. # -# source://prism//lib/prism/serialize.rb#2227 +# pkg:gem/prism#lib/prism/serialize.rb:2227 Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified. @@ -33255,13 +32326,11 @@ Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # C = { a: 1 } # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17428 +# pkg:gem/prism#lib/prism/node.rb:17428 class Prism::ShareableConstantNode < ::Prism::Node # Initialize a new ShareableConstantNode node. # - # @return [ShareableConstantNode] a new instance of ShareableConstantNode - # - # source://prism//lib/prism/node.rb#17430 + # pkg:gem/prism#lib/prism/node.rb:17430 sig do params( source: Prism::Source, @@ -33276,36 +32345,36 @@ class Prism::ShareableConstantNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17513 + # pkg:gem/prism#lib/prism/node.rb:17513 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17439 + # pkg:gem/prism#lib/prism/node.rb:17439 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17444 + # pkg:gem/prism#lib/prism/node.rb:17444 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17461 + # pkg:gem/prism#lib/prism/node.rb:17461 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17456 + # pkg:gem/prism#lib/prism/node.rb:17456 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode) -> ShareableConstantNode # - # source://prism//lib/prism/node.rb#17466 + # pkg:gem/prism#lib/prism/node.rb:17466 sig do params( node_id: Integer, @@ -33316,39 +32385,32 @@ class Prism::ShareableConstantNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), write: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17444 + # pkg:gem/prism#lib/prism/node.rb:17471 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode } # - # source://prism//lib/prism/node.rb#17474 + # pkg:gem/prism#lib/prism/node.rb:17474 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [write] - # - # source://prism//lib/prism/node.rb#17449 + # pkg:gem/prism#lib/prism/node.rb:17449 def each_child_node; end # def experimental_copy?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17489 + # pkg:gem/prism#lib/prism/node.rb:17489 sig { returns(T::Boolean) } def experimental_copy?; end # def experimental_everything?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17484 + # pkg:gem/prism#lib/prism/node.rb:17484 sig { returns(T::Boolean) } def experimental_everything?; end @@ -33357,27 +32419,25 @@ class Prism::ShareableConstantNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17497 + # pkg:gem/prism#lib/prism/node.rb:17497 sig { override.returns(String) } def inspect; end # def literal?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17479 + # pkg:gem/prism#lib/prism/node.rb:17479 sig { returns(T::Boolean) } def literal?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17502 + # pkg:gem/prism#lib/prism/node.rb:17502 sig { override.returns(Symbol) } def type; end # The constant write that should be modified with the shareability state. # - # source://prism//lib/prism/node.rb#17494 + # pkg:gem/prism#lib/prism/node.rb:17494 sig do returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) end @@ -33386,29 +32446,29 @@ class Prism::ShareableConstantNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17507 + # pkg:gem/prism#lib/prism/node.rb:17507 def type; end end end # Flags for shareable constant nodes. # -# source://prism//lib/prism/node.rb#19918 +# pkg:gem/prism#lib/prism/node.rb:19918 module Prism::ShareableConstantNodeFlags; end # constant writes that should be modified with shareable constant value experimental copy # -# source://prism//lib/prism/node.rb#19926 +# pkg:gem/prism#lib/prism/node.rb:19926 Prism::ShareableConstantNodeFlags::EXPERIMENTAL_COPY = T.let(T.unsafe(nil), Integer) # constant writes that should be modified with shareable constant value experimental everything # -# source://prism//lib/prism/node.rb#19923 +# pkg:gem/prism#lib/prism/node.rb:19923 Prism::ShareableConstantNodeFlags::EXPERIMENTAL_EVERYTHING = T.let(T.unsafe(nil), Integer) # constant writes that should be modified with shareable constant value literal # -# source://prism//lib/prism/node.rb#19920 +# pkg:gem/prism#lib/prism/node.rb:19920 Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # Represents a singleton class declaration involving the `class` keyword. @@ -33416,13 +32476,11 @@ Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # class << self end # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17524 +# pkg:gem/prism#lib/prism/node.rb:17524 class Prism::SingletonClassNode < ::Prism::Node # Initialize a new SingletonClassNode node. # - # @return [SingletonClassNode] a new instance of SingletonClassNode - # - # source://prism//lib/prism/node.rb#17526 + # pkg:gem/prism#lib/prism/node.rb:17526 sig do params( source: Prism::Source, @@ -33442,54 +32500,54 @@ class Prism::SingletonClassNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17663 + # pkg:gem/prism#lib/prism/node.rb:17663 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17540 + # pkg:gem/prism#lib/prism/node.rb:17540 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#17616 + # pkg:gem/prism#lib/prism/node.rb:17616 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17545 + # pkg:gem/prism#lib/prism/node.rb:17545 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#17632 + # pkg:gem/prism#lib/prism/node.rb:17632 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#17587 + # pkg:gem/prism#lib/prism/node.rb:17587 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17566 + # pkg:gem/prism#lib/prism/node.rb:17566 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17558 + # pkg:gem/prism#lib/prism/node.rb:17558 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location) -> SingletonClassNode # - # source://prism//lib/prism/node.rb#17571 + # pkg:gem/prism#lib/prism/node.rb:17571 sig do params( node_id: Integer, @@ -33505,41 +32563,38 @@ class Prism::SingletonClassNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17545 + # pkg:gem/prism#lib/prism/node.rb:17576 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#17579 + # pkg:gem/prism#lib/prism/node.rb:17579 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [expression] - # - # source://prism//lib/prism/node.rb#17550 + # pkg:gem/prism#lib/prism/node.rb:17550 def each_child_node; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#17642 + # pkg:gem/prism#lib/prism/node.rb:17642 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#17619 + # pkg:gem/prism#lib/prism/node.rb:17619 sig { returns(Prism::Location) } def end_keyword_loc; end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#17613 + # pkg:gem/prism#lib/prism/node.rb:17613 sig { returns(Prism::Node) } def expression; end @@ -33548,56 +32603,56 @@ class Prism::SingletonClassNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17647 + # pkg:gem/prism#lib/prism/node.rb:17647 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#17584 + # pkg:gem/prism#lib/prism/node.rb:17584 sig { returns(T::Array[Symbol]) } def locals; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17637 + # pkg:gem/prism#lib/prism/node.rb:17637 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17600 + # pkg:gem/prism#lib/prism/node.rb:17600 sig { returns(Prism::Location) } def operator_loc; end # Save the class_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17595 + # pkg:gem/prism#lib/prism/node.rb:17595 def save_class_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17627 + # pkg:gem/prism#lib/prism/node.rb:17627 def save_end_keyword_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17608 + # pkg:gem/prism#lib/prism/node.rb:17608 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17652 + # pkg:gem/prism#lib/prism/node.rb:17652 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17657 + # pkg:gem/prism#lib/prism/node.rb:17657 def type; end end end @@ -33606,37 +32661,35 @@ end # conjunction with locations to allow them to resolve line numbers and source # ranges. # -# source://prism//lib/prism/parse_result.rb#8 +# pkg:gem/prism#lib/prism/parse_result.rb:8 class Prism::Source # Create a new source object with the given source code. # - # @return [Source] a new instance of Source - # - # source://prism//lib/prism/parse_result.rb#46 + # pkg:gem/prism#lib/prism/parse_result.rb:46 sig { params(source: String, start_line: Integer, offsets: T::Array[Integer]).void } def initialize(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end # Converts the line number and column in bytes to a byte offset. # - # source://prism//lib/prism/parse_result.rb#80 + # pkg:gem/prism#lib/prism/parse_result.rb:80 def byte_offset(line, column); end # Return the column number in characters for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#117 + # pkg:gem/prism#lib/prism/parse_result.rb:117 sig { params(byte_offset: Integer).returns(Integer) } def character_column(byte_offset); end # Return the character offset for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#112 + # pkg:gem/prism#lib/prism/parse_result.rb:112 sig { params(byte_offset: Integer).returns(Integer) } def character_offset(byte_offset); end # Generate a cache that targets a specific encoding for calculating code # unit offsets. # - # source://prism//lib/prism/parse_result.rb#145 + # pkg:gem/prism#lib/prism/parse_result.rb:145 sig do params( encoding: Encoding @@ -33647,7 +32700,7 @@ class Prism::Source # Returns the column number in code units for the given encoding for the # given byte offset. # - # source://prism//lib/prism/parse_result.rb#151 + # pkg:gem/prism#lib/prism/parse_result.rb:151 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -33664,88 +32717,88 @@ class Prism::Source # boundary. Second, it's possible that the source code will contain a # character that has no equivalent in the given encoding. # - # source://prism//lib/prism/parse_result.rb#133 + # pkg:gem/prism#lib/prism/parse_result.rb:133 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_offset(byte_offset, encoding); end # Return the column number for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#107 + # pkg:gem/prism#lib/prism/parse_result.rb:107 sig { params(byte_offset: Integer).returns(Integer) } def column(byte_offset); end # Freeze this object and the objects it contains. # - # source://prism//lib/prism/parse_result.rb#156 + # pkg:gem/prism#lib/prism/parse_result.rb:156 def deep_freeze; end # Returns the encoding of the source code, which is set by parameters to the # parser or by the encoding magic comment. # - # source://prism//lib/prism/parse_result.rb#64 + # pkg:gem/prism#lib/prism/parse_result.rb:64 sig { returns(Encoding) } def encoding; end # Binary search through the offsets to find the line number for the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#90 + # pkg:gem/prism#lib/prism/parse_result.rb:90 sig { params(byte_offset: Integer).returns(Integer) } def line(byte_offset); end # Returns the byte offset of the end of the line corresponding to the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#102 + # pkg:gem/prism#lib/prism/parse_result.rb:102 def line_end(byte_offset); end # Return the byte offset of the start of the line corresponding to the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#96 + # pkg:gem/prism#lib/prism/parse_result.rb:96 sig { params(byte_offset: Integer).returns(Integer) } def line_start(byte_offset); end # Returns the lines of the source code as an array of strings. # - # source://prism//lib/prism/parse_result.rb#69 + # pkg:gem/prism#lib/prism/parse_result.rb:69 sig { returns(T::Array[String]) } def lines; end # The list of newline byte offsets in the source code. # - # source://prism//lib/prism/parse_result.rb#43 + # pkg:gem/prism#lib/prism/parse_result.rb:43 sig { returns(T::Array[Integer]) } def offsets; end # Replace the value of offsets with the given value. # - # source://prism//lib/prism/parse_result.rb#58 + # pkg:gem/prism#lib/prism/parse_result.rb:58 sig { params(offsets: T::Array[Integer]).void } def replace_offsets(offsets); end # Replace the value of start_line with the given value. # - # source://prism//lib/prism/parse_result.rb#53 + # pkg:gem/prism#lib/prism/parse_result.rb:53 sig { params(start_line: Integer).void } def replace_start_line(start_line); end # Perform a byteslice on the source code using the given byte offset and # byte length. # - # source://prism//lib/prism/parse_result.rb#75 + # pkg:gem/prism#lib/prism/parse_result.rb:75 sig { params(byte_offset: Integer, length: Integer).returns(String) } def slice(byte_offset, length); end # The source code that this source object represents. # - # source://prism//lib/prism/parse_result.rb#37 + # pkg:gem/prism#lib/prism/parse_result.rb:37 sig { returns(String) } def source; end # The line number where this source starts. # - # source://prism//lib/prism/parse_result.rb#40 + # pkg:gem/prism#lib/prism/parse_result.rb:40 sig { returns(Integer) } def start_line; end @@ -33754,7 +32807,7 @@ class Prism::Source # Binary search through the offsets to find the line number for the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#166 + # pkg:gem/prism#lib/prism/parse_result.rb:166 def find_line(byte_offset); end class << self @@ -33763,7 +32816,7 @@ class Prism::Source # specialized and more performant `ASCIISource` if no multibyte characters # are present in the source code. # - # source://prism//lib/prism/parse_result.rb#13 + # pkg:gem/prism#lib/prism/parse_result.rb:13 def for(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end end end @@ -33773,68 +32826,65 @@ end # __ENCODING__ # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17679 +# pkg:gem/prism#lib/prism/node.rb:17679 class Prism::SourceEncodingNode < ::Prism::Node # Initialize a new SourceEncodingNode node. # - # @return [SourceEncodingNode] a new instance of SourceEncodingNode - # - # source://prism//lib/prism/node.rb#17681 + # pkg:gem/prism#lib/prism/node.rb:17681 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17744 + # pkg:gem/prism#lib/prism/node.rb:17744 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17689 + # pkg:gem/prism#lib/prism/node.rb:17689 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17694 + # pkg:gem/prism#lib/prism/node.rb:17694 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17710 + # pkg:gem/prism#lib/prism/node.rb:17710 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17705 + # pkg:gem/prism#lib/prism/node.rb:17705 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceEncodingNode # - # source://prism//lib/prism/node.rb#17715 + # pkg:gem/prism#lib/prism/node.rb:17715 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceEncodingNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17694 + # pkg:gem/prism#lib/prism/node.rb:17720 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#17723 + # pkg:gem/prism#lib/prism/node.rb:17723 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#17699 + # pkg:gem/prism#lib/prism/node.rb:17699 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -33842,20 +32892,20 @@ class Prism::SourceEncodingNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17728 + # pkg:gem/prism#lib/prism/node.rb:17728 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17733 + # pkg:gem/prism#lib/prism/node.rb:17733 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17738 + # pkg:gem/prism#lib/prism/node.rb:17738 def type; end end end @@ -33865,13 +32915,11 @@ end # __FILE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#17753 +# pkg:gem/prism#lib/prism/node.rb:17753 class Prism::SourceFileNode < ::Prism::Node # Initialize a new SourceFileNode node. # - # @return [SourceFileNode] a new instance of SourceFileNode - # - # source://prism//lib/prism/node.rb#17755 + # pkg:gem/prism#lib/prism/node.rb:17755 sig do params( source: Prism::Source, @@ -33886,36 +32934,36 @@ class Prism::SourceFileNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17842 + # pkg:gem/prism#lib/prism/node.rb:17842 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17764 + # pkg:gem/prism#lib/prism/node.rb:17764 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17769 + # pkg:gem/prism#lib/prism/node.rb:17769 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17785 + # pkg:gem/prism#lib/prism/node.rb:17785 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17780 + # pkg:gem/prism#lib/prism/node.rb:17780 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?filepath: String) -> SourceFileNode # - # source://prism//lib/prism/node.rb#17790 + # pkg:gem/prism#lib/prism/node.rb:17790 sig do params( node_id: Integer, @@ -33926,22 +32974,21 @@ class Prism::SourceFileNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), filepath: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17769 + # pkg:gem/prism#lib/prism/node.rb:17795 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, filepath: String } # - # source://prism//lib/prism/node.rb#17798 + # pkg:gem/prism#lib/prism/node.rb:17798 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#17774 + # pkg:gem/prism#lib/prism/node.rb:17774 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -33949,58 +32996,50 @@ class Prism::SourceFileNode < ::Prism::Node # Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism::parse*` APIs. # - # source://prism//lib/prism/node.rb#17823 + # pkg:gem/prism#lib/prism/node.rb:17823 sig { returns(String) } def filepath; end # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17808 + # pkg:gem/prism#lib/prism/node.rb:17808 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17803 + # pkg:gem/prism#lib/prism/node.rb:17803 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def frozen?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17813 + # pkg:gem/prism#lib/prism/node.rb:17813 sig { returns(T::Boolean) } def frozen?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#17826 + # pkg:gem/prism#lib/prism/node.rb:17826 sig { override.returns(String) } def inspect; end # def mutable?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17818 + # pkg:gem/prism#lib/prism/node.rb:17818 sig { returns(T::Boolean) } def mutable?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17831 + # pkg:gem/prism#lib/prism/node.rb:17831 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17836 + # pkg:gem/prism#lib/prism/node.rb:17836 def type; end end end @@ -34010,68 +33049,65 @@ end # __LINE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#17853 +# pkg:gem/prism#lib/prism/node.rb:17853 class Prism::SourceLineNode < ::Prism::Node # Initialize a new SourceLineNode node. # - # @return [SourceLineNode] a new instance of SourceLineNode - # - # source://prism//lib/prism/node.rb#17855 + # pkg:gem/prism#lib/prism/node.rb:17855 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17918 + # pkg:gem/prism#lib/prism/node.rb:17918 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17863 + # pkg:gem/prism#lib/prism/node.rb:17863 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17868 + # pkg:gem/prism#lib/prism/node.rb:17868 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17884 + # pkg:gem/prism#lib/prism/node.rb:17884 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17879 + # pkg:gem/prism#lib/prism/node.rb:17879 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceLineNode # - # source://prism//lib/prism/node.rb#17889 + # pkg:gem/prism#lib/prism/node.rb:17889 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceLineNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17868 + # pkg:gem/prism#lib/prism/node.rb:17894 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#17897 + # pkg:gem/prism#lib/prism/node.rb:17897 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#17873 + # pkg:gem/prism#lib/prism/node.rb:17873 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -34079,20 +33115,20 @@ class Prism::SourceLineNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17902 + # pkg:gem/prism#lib/prism/node.rb:17902 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17907 + # pkg:gem/prism#lib/prism/node.rb:17907 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17912 + # pkg:gem/prism#lib/prism/node.rb:17912 def type; end end end @@ -34102,13 +33138,11 @@ end # [*a] # ^^ # -# source://prism//lib/prism/node.rb#17927 +# pkg:gem/prism#lib/prism/node.rb:17927 class Prism::SplatNode < ::Prism::Node # Initialize a new SplatNode node. # - # @return [SplatNode] a new instance of SplatNode - # - # source://prism//lib/prism/node.rb#17929 + # pkg:gem/prism#lib/prism/node.rb:17929 sig do params( source: Prism::Source, @@ -34124,36 +33158,36 @@ class Prism::SplatNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18018 + # pkg:gem/prism#lib/prism/node.rb:18018 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17939 + # pkg:gem/prism#lib/prism/node.rb:17939 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17944 + # pkg:gem/prism#lib/prism/node.rb:17944 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17963 + # pkg:gem/prism#lib/prism/node.rb:17963 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17956 + # pkg:gem/prism#lib/prism/node.rb:17956 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?expression: Prism::node?) -> SplatNode # - # source://prism//lib/prism/node.rb#17968 + # pkg:gem/prism#lib/prism/node.rb:17968 sig do params( node_id: Integer, @@ -34165,29 +33199,26 @@ class Prism::SplatNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17944 + # pkg:gem/prism#lib/prism/node.rb:17973 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, expression: Prism::node? } # - # source://prism//lib/prism/node.rb#17976 + # pkg:gem/prism#lib/prism/node.rb:17976 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [expression] - # - # source://prism//lib/prism/node.rb#17949 + # pkg:gem/prism#lib/prism/node.rb:17949 def each_child_node; end # attr_reader expression: Prism::node? # - # source://prism//lib/prism/node.rb#17994 + # pkg:gem/prism#lib/prism/node.rb:17994 sig { returns(T.nilable(Prism::Node)) } def expression; end @@ -34196,38 +33227,38 @@ class Prism::SplatNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18002 + # pkg:gem/prism#lib/prism/node.rb:18002 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17997 + # pkg:gem/prism#lib/prism/node.rb:17997 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17981 + # pkg:gem/prism#lib/prism/node.rb:17981 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17989 + # pkg:gem/prism#lib/prism/node.rb:17989 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18007 + # pkg:gem/prism#lib/prism/node.rb:18007 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18012 + # pkg:gem/prism#lib/prism/node.rb:18012 def type; end end end @@ -34237,13 +33268,11 @@ end # foo; bar; baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18029 +# pkg:gem/prism#lib/prism/node.rb:18029 class Prism::StatementsNode < ::Prism::Node # Initialize a new StatementsNode node. # - # @return [StatementsNode] a new instance of StatementsNode - # - # source://prism//lib/prism/node.rb#18031 + # pkg:gem/prism#lib/prism/node.rb:18031 sig do params( source: Prism::Source, @@ -34258,42 +33287,42 @@ class Prism::StatementsNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18099 + # pkg:gem/prism#lib/prism/node.rb:18099 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18040 + # pkg:gem/prism#lib/prism/node.rb:18040 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Array[Prism::node] # - # source://prism//lib/prism/node.rb#18080 + # pkg:gem/prism#lib/prism/node.rb:18080 sig { returns(T::Array[Prism::Node]) } def body; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18045 + # pkg:gem/prism#lib/prism/node.rb:18045 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18062 + # pkg:gem/prism#lib/prism/node.rb:18062 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18057 + # pkg:gem/prism#lib/prism/node.rb:18057 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Array[Prism::node]) -> StatementsNode # - # source://prism//lib/prism/node.rb#18067 + # pkg:gem/prism#lib/prism/node.rb:18067 sig do params( node_id: Integer, @@ -34304,22 +33333,21 @@ class Prism::StatementsNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18045 + # pkg:gem/prism#lib/prism/node.rb:18072 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Array[Prism::node] } # - # source://prism//lib/prism/node.rb#18075 + # pkg:gem/prism#lib/prism/node.rb:18075 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#18050 + # pkg:gem/prism#lib/prism/node.rb:18050 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -34327,43 +33355,43 @@ class Prism::StatementsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18083 + # pkg:gem/prism#lib/prism/node.rb:18083 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18088 + # pkg:gem/prism#lib/prism/node.rb:18088 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18093 + # pkg:gem/prism#lib/prism/node.rb:18093 def type; end end end # Flags for string nodes. # -# source://prism//lib/prism/node.rb#19930 +# pkg:gem/prism#lib/prism/node.rb:19930 module Prism::StringFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19935 +# pkg:gem/prism#lib/prism/node.rb:19935 Prism::StringFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#19932 +# pkg:gem/prism#lib/prism/node.rb:19932 Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#19938 +# pkg:gem/prism#lib/prism/node.rb:19938 Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#19941 +# pkg:gem/prism#lib/prism/node.rb:19941 Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string. @@ -34377,15 +33405,13 @@ Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # "foo #{bar} baz" # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#18116 +# pkg:gem/prism#lib/prism/node.rb:18116 class Prism::StringNode < ::Prism::Node include ::Prism::HeredocQuery # Initialize a new StringNode node. # - # @return [StringNode] a new instance of StringNode - # - # source://prism//lib/prism/node.rb#18118 + # pkg:gem/prism#lib/prism/node.rb:18118 sig do params( source: Prism::Source, @@ -34403,60 +33429,60 @@ class Prism::StringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18274 + # pkg:gem/prism#lib/prism/node.rb:18274 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18130 + # pkg:gem/prism#lib/prism/node.rb:18130 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18135 + # pkg:gem/prism#lib/prism/node.rb:18135 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18253 + # pkg:gem/prism#lib/prism/node.rb:18253 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18221 + # pkg:gem/prism#lib/prism/node.rb:18221 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18151 + # pkg:gem/prism#lib/prism/node.rb:18151 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18146 + # pkg:gem/prism#lib/prism/node.rb:18146 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#18248 + # pkg:gem/prism#lib/prism/node.rb:18248 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#18208 + # pkg:gem/prism#lib/prism/node.rb:18208 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode # - # source://prism//lib/prism/node.rb#18156 + # pkg:gem/prism#lib/prism/node.rb:18156 sig do params( node_id: Integer, @@ -34470,22 +33496,21 @@ class Prism::StringNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18135 + # pkg:gem/prism#lib/prism/node.rb:18161 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String } # - # source://prism//lib/prism/node.rb#18164 + # pkg:gem/prism#lib/prism/node.rb:18164 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#18140 + # pkg:gem/prism#lib/prism/node.rb:18140 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -34493,25 +33518,19 @@ class Prism::StringNode < ::Prism::Node # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18174 + # pkg:gem/prism#lib/prism/node.rb:18174 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18169 + # pkg:gem/prism#lib/prism/node.rb:18169 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def frozen?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18179 + # pkg:gem/prism#lib/prism/node.rb:18179 sig { returns(T::Boolean) } def frozen?; end @@ -34520,129 +33539,121 @@ class Prism::StringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18258 + # pkg:gem/prism#lib/prism/node.rb:18258 sig { override.returns(String) } def inspect; end # def mutable?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18184 + # pkg:gem/prism#lib/prism/node.rb:18184 sig { returns(T::Boolean) } def mutable?; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#18243 + # pkg:gem/prism#lib/prism/node.rb:18243 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#18189 + # pkg:gem/prism#lib/prism/node.rb:18189 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18235 + # pkg:gem/prism#lib/prism/node.rb:18235 def save_closing_loc(repository); end # Save the content_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18216 + # pkg:gem/prism#lib/prism/node.rb:18216 def save_content_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18203 + # pkg:gem/prism#lib/prism/node.rb:18203 def save_opening_loc(repository); end # Occasionally it's helpful to treat a string as if it were interpolated so # that there's a consistent interface for working with strings. # - # source://prism//lib/prism/node_ext.rb#75 + # pkg:gem/prism#lib/prism/node_ext.rb:75 sig { returns(Prism::InterpolatedStringNode) } def to_interpolated; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18263 + # pkg:gem/prism#lib/prism/node.rb:18263 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#18240 + # pkg:gem/prism#lib/prism/node.rb:18240 sig { returns(String) } def unescaped; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18268 + # pkg:gem/prism#lib/prism/node.rb:18268 def type; end end end +# Here we are going to patch StringQuery to put in the class-level methods so +# that it can maintain a consistent interface # Query methods that allow categorizing strings based on their context for # where they could be valid in a Ruby syntax tree. # -# source://prism//lib/prism/string_query.rb#7 +# pkg:gem/prism#lib/prism/string_query.rb:7 class Prism::StringQuery # Initialize a new query with the given string. # - # @return [StringQuery] a new instance of StringQuery - # - # source://prism//lib/prism/string_query.rb#12 + # pkg:gem/prism#lib/prism/string_query.rb:12 def initialize(string); end # Whether or not this string is a valid constant name. # - # @return [Boolean] - # - # source://prism//lib/prism/string_query.rb#22 + # pkg:gem/prism#lib/prism/string_query.rb:22 def constant?; end # Whether or not this string is a valid local variable name. # - # @return [Boolean] - # - # source://prism//lib/prism/string_query.rb#17 + # pkg:gem/prism#lib/prism/string_query.rb:17 def local?; end # Whether or not this string is a valid method name. # - # @return [Boolean] - # - # source://prism//lib/prism/string_query.rb#27 + # pkg:gem/prism#lib/prism/string_query.rb:27 def method_name?; end # The string that this query is wrapping. # - # source://prism//lib/prism/string_query.rb#9 + # pkg:gem/prism#lib/prism/string_query.rb:9 def string; end class << self # Mirrors the C extension's StringQuery::constant? method. # - # @return [Boolean] + # pkg:gem/prism#lib/prism.rb:92 sig { params(string: String).returns(T::Boolean) } def constant?(string); end # Mirrors the C extension's StringQuery::local? method. # - # @return [Boolean] + # pkg:gem/prism#lib/prism.rb:92 sig { params(string: String).returns(T::Boolean) } def local?(string); end # Mirrors the C extension's StringQuery::method_name? method. # - # @return [Boolean] + # pkg:gem/prism#lib/prism.rb:92 sig { params(string: String).returns(T::Boolean) } def method_name?(string); end end @@ -34658,13 +33669,11 @@ end # # If no arguments are provided (except for a block), it would be a `ForwardingSuperNode` instead. # -# source://prism//lib/prism/node.rb#18293 +# pkg:gem/prism#lib/prism/node.rb:18293 class Prism::SuperNode < ::Prism::Node # Initialize a new SuperNode node. # - # @return [SuperNode] a new instance of SuperNode - # - # source://prism//lib/prism/node.rb#18295 + # pkg:gem/prism#lib/prism/node.rb:18295 sig do params( source: Prism::Source, @@ -34683,48 +33692,48 @@ class Prism::SuperNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18440 + # pkg:gem/prism#lib/prism/node.rb:18440 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18308 + # pkg:gem/prism#lib/prism/node.rb:18308 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # Can be only `nil` when there are empty parentheses, like `super()`. # - # source://prism//lib/prism/node.rb#18384 + # pkg:gem/prism#lib/prism/node.rb:18384 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # attr_reader block: BlockNode | BlockArgumentNode | nil # - # source://prism//lib/prism/node.rb#18406 + # pkg:gem/prism#lib/prism/node.rb:18406 sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18313 + # pkg:gem/prism#lib/prism/node.rb:18313 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18334 + # pkg:gem/prism#lib/prism/node.rb:18334 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18326 + # pkg:gem/prism#lib/prism/node.rb:18326 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> SuperNode # - # source://prism//lib/prism/node.rb#18339 + # pkg:gem/prism#lib/prism/node.rb:18339 sig do params( node_id: Integer, @@ -34739,24 +33748,21 @@ class Prism::SuperNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18313 + # pkg:gem/prism#lib/prism/node.rb:18344 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: BlockNode | BlockArgumentNode | nil } # - # source://prism//lib/prism/node.rb#18347 + # pkg:gem/prism#lib/prism/node.rb:18347 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [arguments] - # - # source://prism//lib/prism/node.rb#18318 + # pkg:gem/prism#lib/prism/node.rb:18318 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -34764,96 +33770,96 @@ class Prism::SuperNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18424 + # pkg:gem/prism#lib/prism/node.rb:18424 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18409 + # pkg:gem/prism#lib/prism/node.rb:18409 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18352 + # pkg:gem/prism#lib/prism/node.rb:18352 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#18414 + # pkg:gem/prism#lib/prism/node.rb:18414 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#18365 + # pkg:gem/prism#lib/prism/node.rb:18365 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#18419 + # pkg:gem/prism#lib/prism/node.rb:18419 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#18387 + # pkg:gem/prism#lib/prism/node.rb:18387 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18360 + # pkg:gem/prism#lib/prism/node.rb:18360 def save_keyword_loc(repository); end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18379 + # pkg:gem/prism#lib/prism/node.rb:18379 def save_lparen_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18401 + # pkg:gem/prism#lib/prism/node.rb:18401 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18429 + # pkg:gem/prism#lib/prism/node.rb:18429 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18434 + # pkg:gem/prism#lib/prism/node.rb:18434 def type; end end end # Flags for symbol nodes. # -# source://prism//lib/prism/node.rb#19945 +# pkg:gem/prism#lib/prism/node.rb:19945 module Prism::SymbolFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19950 +# pkg:gem/prism#lib/prism/node.rb:19950 Prism::SymbolFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to US-ASCII # -# source://prism//lib/prism/node.rb#19953 +# pkg:gem/prism#lib/prism/node.rb:19953 Prism::SymbolFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#19947 +# pkg:gem/prism#lib/prism/node.rb:19947 Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents a symbol literal or a symbol contained within a `%i` list. @@ -34864,13 +33870,11 @@ Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # %i[foo] # ^^^ # -# source://prism//lib/prism/node.rb#18457 +# pkg:gem/prism#lib/prism/node.rb:18457 class Prism::SymbolNode < ::Prism::Node # Initialize a new SymbolNode node. # - # @return [SymbolNode] a new instance of SymbolNode - # - # source://prism//lib/prism/node.rb#18459 + # pkg:gem/prism#lib/prism/node.rb:18459 sig do params( source: Prism::Source, @@ -34888,48 +33892,48 @@ class Prism::SymbolNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18616 + # pkg:gem/prism#lib/prism/node.rb:18616 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18471 + # pkg:gem/prism#lib/prism/node.rb:18471 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18476 + # pkg:gem/prism#lib/prism/node.rb:18476 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18595 + # pkg:gem/prism#lib/prism/node.rb:18595 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18563 + # pkg:gem/prism#lib/prism/node.rb:18563 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18492 + # pkg:gem/prism#lib/prism/node.rb:18492 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18487 + # pkg:gem/prism#lib/prism/node.rb:18487 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String) -> SymbolNode # - # source://prism//lib/prism/node.rb#18497 + # pkg:gem/prism#lib/prism/node.rb:18497 sig do params( node_id: Integer, @@ -34943,22 +33947,21 @@ class Prism::SymbolNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18476 + # pkg:gem/prism#lib/prism/node.rb:18502 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String } # - # source://prism//lib/prism/node.rb#18505 + # pkg:gem/prism#lib/prism/node.rb:18505 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#18481 + # pkg:gem/prism#lib/prism/node.rb:18481 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -34966,151 +33969,143 @@ class Prism::SymbolNode < ::Prism::Node # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18515 + # pkg:gem/prism#lib/prism/node.rb:18515 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18520 + # pkg:gem/prism#lib/prism/node.rb:18520 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18510 + # pkg:gem/prism#lib/prism/node.rb:18510 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#18600 + # pkg:gem/prism#lib/prism/node.rb:18600 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#18585 + # pkg:gem/prism#lib/prism/node.rb:18585 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#18525 + # pkg:gem/prism#lib/prism/node.rb:18525 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18577 + # pkg:gem/prism#lib/prism/node.rb:18577 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18539 + # pkg:gem/prism#lib/prism/node.rb:18539 def save_opening_loc(repository); end # Save the value_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18558 + # pkg:gem/prism#lib/prism/node.rb:18558 def save_value_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18605 + # pkg:gem/prism#lib/prism/node.rb:18605 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#18582 + # pkg:gem/prism#lib/prism/node.rb:18582 sig { returns(String) } def unescaped; end # def value: () -> String? # - # source://prism//lib/prism/node.rb#18590 + # pkg:gem/prism#lib/prism/node.rb:18590 sig { returns(T.nilable(String)) } def value; end # attr_reader value_loc: Location? # - # source://prism//lib/prism/node.rb#18544 + # pkg:gem/prism#lib/prism/node.rb:18544 sig { returns(T.nilable(Prism::Location)) } def value_loc; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18610 + # pkg:gem/prism#lib/prism/node.rb:18610 def type; end end end # This represents a token from the Ruby source. # -# source://prism//lib/prism/parse_result.rb#813 +# pkg:gem/prism#lib/prism/parse_result.rb:813 class Prism::Token # Create a new token object with the given type, value, and location. # - # @return [Token] a new instance of Token - # - # source://prism//lib/prism/parse_result.rb#825 + # pkg:gem/prism#lib/prism/parse_result.rb:825 sig { params(source: Prism::Source, type: Symbol, value: String, location: T.any(Integer, Prism::Location)).void } def initialize(source, type, value, location); end # Returns true if the given other token is equal to this token. # - # source://prism//lib/prism/parse_result.rb#860 + # pkg:gem/prism#lib/prism/parse_result.rb:860 sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end # Implement the hash pattern matching interface for Token. # - # source://prism//lib/prism/parse_result.rb#833 + # pkg:gem/prism#lib/prism/parse_result.rb:833 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Freeze this object and the objects it contains. # - # source://prism//lib/prism/parse_result.rb#873 + # pkg:gem/prism#lib/prism/parse_result.rb:873 def deep_freeze; end # Returns a string representation of this token. # - # source://prism//lib/prism/parse_result.rb#867 + # pkg:gem/prism#lib/prism/parse_result.rb:867 def inspect; end # A Location object representing the location of this token in the source. # - # source://prism//lib/prism/parse_result.rb#838 + # pkg:gem/prism#lib/prism/parse_result.rb:838 sig { returns(Prism::Location) } def location; end # Implement the pretty print interface for Token. # - # source://prism//lib/prism/parse_result.rb#845 + # pkg:gem/prism#lib/prism/parse_result.rb:845 sig { params(q: T.untyped).void } def pretty_print(q); end # The type of token that this token is. # - # source://prism//lib/prism/parse_result.rb#819 + # pkg:gem/prism#lib/prism/parse_result.rb:819 sig { returns(Symbol) } def type; end # A byteslice of the source that this token represents. # - # source://prism//lib/prism/parse_result.rb#822 + # pkg:gem/prism#lib/prism/parse_result.rb:822 sig { returns(String) } def value; end @@ -35118,7 +34113,7 @@ class Prism::Token # The Source object that represents the source this token came from. # - # source://prism//lib/prism/parse_result.rb#815 + # pkg:gem/prism#lib/prism/parse_result.rb:815 sig { returns(Prism::Source) } def source; end end @@ -35126,7 +34121,7 @@ end # This module is responsible for converting the prism syntax tree into other # syntax trees. # -# source://prism//lib/prism/translation.rb#7 +# pkg:gem/prism#lib/prism/translation.rb:7 module Prism::Translation; end # This class is the entry-point for converting a prism syntax tree into the @@ -35141,7 +34136,7 @@ module Prism::Translation; end # version of Ruby syntax as the currently running version of Ruby, use # `Prism::Translation::ParserCurrent`. # -# source://prism//lib/prism/translation/parser.rb#29 +# pkg:gem/prism#lib/prism/translation/parser.rb:29 class Prism::Translation::Parser < ::Parser::Base # The `builder` argument is used to create the parser using our custom builder class by default. # @@ -35168,55 +34163,53 @@ class Prism::Translation::Parser < ::Parser::Base # In an object passed to the `:parser` keyword argument, the `parse` and `parse_lex` methods # should be implemented as needed. # - # @return [Parser] a new instance of Parser - # - # source://prism//lib/prism/translation/parser.rb#74 + # pkg:gem/prism#lib/prism/translation/parser.rb:74 def initialize(builder = T.unsafe(nil), parser: T.unsafe(nil)); end # The default encoding for Ruby files is UTF-8. # - # source://prism//lib/prism/translation/parser.rb#91 + # pkg:gem/prism#lib/prism/translation/parser.rb:91 def default_encoding; end # Parses a source buffer and returns the AST. # - # source://prism//lib/prism/translation/parser.rb#99 + # pkg:gem/prism#lib/prism/translation/parser.rb:99 def parse(source_buffer); end # Parses a source buffer and returns the AST and the source code comments. # - # source://prism//lib/prism/translation/parser.rb#112 + # pkg:gem/prism#lib/prism/translation/parser.rb:112 def parse_with_comments(source_buffer); end # Parses a source buffer and returns the AST, the source code comments, # and the tokens emitted by the lexer. # - # source://prism//lib/prism/translation/parser.rb#129 + # pkg:gem/prism#lib/prism/translation/parser.rb:129 def tokenize(source_buffer, recover = T.unsafe(nil)); end # Since prism resolves num params for us, we don't need to support this # kind of logic here. # - # source://prism//lib/prism/translation/parser.rb#155 + # pkg:gem/prism#lib/prism/translation/parser.rb:155 def try_declare_numparam(node); end - # source://prism//lib/prism/translation/parser.rb#86 + # pkg:gem/prism#lib/prism/translation/parser.rb:86 sig { overridable.returns(Integer) } def version; end - # source://prism//lib/prism/translation/parser.rb#95 + # pkg:gem/prism#lib/prism/translation/parser.rb:95 def yyerror; end private # Build the parser gem AST from the prism AST. # - # source://prism//lib/prism/translation/parser.rb#313 + # pkg:gem/prism#lib/prism/translation/parser.rb:313 def build_ast(program, offset_cache); end # Build the parser gem comments from the prism comments. # - # source://prism//lib/prism/translation/parser.rb#318 + # pkg:gem/prism#lib/prism/translation/parser.rb:318 def build_comments(comments, offset_cache); end # Prism deals with offsets in bytes, while the parser gem deals with @@ -35227,104 +34220,100 @@ class Prism::Translation::Parser < ::Parser::Base # just use the offset directly. Otherwise, we build an array where the # index is the byte offset and the value is the character offset. # - # source://prism//lib/prism/translation/parser.rb#296 + # pkg:gem/prism#lib/prism/translation/parser.rb:296 def build_offset_cache(source); end # Build a range from a prism location. # - # source://prism//lib/prism/translation/parser.rb#330 + # pkg:gem/prism#lib/prism/translation/parser.rb:330 def build_range(location, offset_cache); end # Build the parser gem tokens from the prism tokens. # - # source://prism//lib/prism/translation/parser.rb#325 + # pkg:gem/prism#lib/prism/translation/parser.rb:325 def build_tokens(tokens, offset_cache); end # Converts the version format handled by Parser to the format handled by Prism. # - # source://prism//lib/prism/translation/parser.rb#353 + # pkg:gem/prism#lib/prism/translation/parser.rb:353 def convert_for_prism(version); end # Build a diagnostic from the given prism parse error. # - # source://prism//lib/prism/translation/parser.rb#174 + # pkg:gem/prism#lib/prism/translation/parser.rb:174 def error_diagnostic(error, offset_cache); end # Options for how prism should parse/lex the source. # - # source://prism//lib/prism/translation/parser.rb#339 + # pkg:gem/prism#lib/prism/translation/parser.rb:339 def prism_options; end # If there was a error generated during the parse, then raise an # appropriate syntax error. Otherwise return the result. # - # source://prism//lib/prism/translation/parser.rb#274 + # pkg:gem/prism#lib/prism/translation/parser.rb:274 def unwrap(result, offset_cache); end # This is a hook to allow consumers to disable some errors if they don't # want them to block creating the syntax tree. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser.rb#163 + # pkg:gem/prism#lib/prism/translation/parser.rb:163 def valid_error?(error); end # This is a hook to allow consumers to disable some warnings if they don't # want them to block creating the syntax tree. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser.rb#169 + # pkg:gem/prism#lib/prism/translation/parser.rb:169 def valid_warning?(warning); end # Build a diagnostic from the given prism parse warning. # - # source://prism//lib/prism/translation/parser.rb#247 + # pkg:gem/prism#lib/prism/translation/parser.rb:247 def warning_diagnostic(warning, offset_cache); end end # This class is the entry-point for Ruby 3.3 of `Prism::Translation::Parser`. # -# source://prism//lib/prism/translation/parser_versions.rb#7 +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:7 class Prism::Translation::Parser33 < ::Prism::Translation::Parser - # source://prism//lib/prism/translation/parser_versions.rb#8 + # pkg:gem/prism#lib/prism/translation/parser_versions.rb:8 sig { override.returns(Integer) } def version; end end # This class is the entry-point for Ruby 3.4 of `Prism::Translation::Parser`. # -# source://prism//lib/prism/translation/parser_versions.rb#14 +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:14 class Prism::Translation::Parser34 < ::Prism::Translation::Parser - # source://prism//lib/prism/translation/parser_versions.rb#15 + # pkg:gem/prism#lib/prism/translation/parser_versions.rb:15 sig { override.returns(Integer) } def version; end end -# source://prism//lib/prism/translation/parser_versions.rb#27 +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:27 Prism::Translation::Parser35 = Prism::Translation::Parser40 # This class is the entry-point for Ruby 4.0 of `Prism::Translation::Parser`. # -# source://prism//lib/prism/translation/parser_versions.rb#21 +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:21 class Prism::Translation::Parser40 < ::Prism::Translation::Parser - # source://prism//lib/prism/translation/parser_versions.rb#22 + # pkg:gem/prism#lib/prism/translation/parser_versions.rb:22 sig { override.returns(Integer) } def version; end end # This class is the entry-point for Ruby 4.1 of `Prism::Translation::Parser`. # -# source://prism//lib/prism/translation/parser_versions.rb#30 +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:30 class Prism::Translation::Parser41 < ::Prism::Translation::Parser - # source://prism//lib/prism/translation/parser_versions.rb#31 + # pkg:gem/prism#lib/prism/translation/parser_versions.rb:31 def version; end end # A builder that knows how to convert more modern Ruby syntax # into whitequark/parser gem's syntax tree. # -# source://prism//lib/prism/translation/parser/builder.rb#9 +# pkg:gem/prism#lib/prism/translation/parser/builder.rb:9 class Prism::Translation::Parser::Builder < ::Parser::Builders::Default # The following three lines have been added to support the `it` block parameter syntax in the source code below. # @@ -35334,112 +34323,110 @@ class Prism::Translation::Parser::Builder < ::Parser::Builders::Default # # https://github.com/whitequark/parser/blob/v3.3.7.1/lib/parser/builders/default.rb#L1122-L1155 # - # source://prism//lib/prism/translation/parser/builder.rb#22 + # pkg:gem/prism#lib/prism/translation/parser/builder.rb:22 def block(method_call, begin_t, args, body, end_t); end # It represents the `it` block argument, which is not yet implemented in the Parser gem. # - # source://prism//lib/prism/translation/parser/builder.rb#11 + # pkg:gem/prism#lib/prism/translation/parser/builder.rb:11 def itarg; end end # A visitor that knows how to convert a prism syntax tree into the # whitequark/parser gem's syntax tree. # -# source://prism//lib/prism/translation/parser/compiler.rb#9 +# pkg:gem/prism#lib/prism/translation/parser/compiler.rb:9 class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Initialize a new compiler with the given parser, offset cache, and # options. # - # @return [Compiler] a new instance of Compiler - # - # source://prism//lib/prism/translation/parser/compiler.rb#40 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:40 def initialize(parser, offset_cache, forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end # The Parser::Builders::Default instance that is being used to build the # AST. # - # source://prism//lib/prism/translation/parser/compiler.rb#19 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:19 def builder; end # The types of values that can be forwarded in the current scope. # - # source://prism//lib/prism/translation/parser/compiler.rb#30 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:30 def forwarding; end # Whether or not the current node is in a destructure. # - # source://prism//lib/prism/translation/parser/compiler.rb#33 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:33 def in_destructure; end # Whether or not the current node is in a pattern. # - # source://prism//lib/prism/translation/parser/compiler.rb#36 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:36 def in_pattern; end # The offset cache that is used to map between byte and character # offsets in the file. # - # source://prism//lib/prism/translation/parser/compiler.rb#27 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:27 def offset_cache; end # The Parser::Base instance that is being used to build the AST. # - # source://prism//lib/prism/translation/parser/compiler.rb#15 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:15 def parser; end # The Parser::Source::Buffer instance that is holding a reference to the # source code. # - # source://prism//lib/prism/translation/parser/compiler.rb#23 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:23 def source_buffer; end # alias $foo $bar # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#59 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:59 def visit_alias_global_variable_node(node); end # alias foo bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#53 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:53 def visit_alias_method_node(node); end # foo => bar | baz # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#65 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:65 def visit_alternation_pattern_node(node); end # a and b # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#71 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:71 def visit_and_node(node); end # foo(bar) # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#128 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:128 def visit_arguments_node(node); end # [] # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#77 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:77 def visit_array_node(node); end # foo => [bar] # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#105 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:105 def visit_array_pattern_node(node); end # { a: 1 } # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#134 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:134 def visit_assoc_node(node); end # def foo(**); bar(**); end @@ -35448,49 +34435,47 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # { **foo } # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#182 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:182 def visit_assoc_splat_node(node); end # $+ # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#194 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:194 def visit_back_reference_read_node(node); end # begin end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#200 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:200 def visit_begin_node(node); end # foo(&bar) # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#245 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:245 def visit_block_argument_node(node); end # foo { |; bar| } # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#251 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:251 def visit_block_local_variable_node(node); end # A block on a keyword or method call. # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#256 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:256 def visit_block_node(node); end # def foo(&bar); end # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#262 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:262 def visit_block_parameter_node(node); end # A block's parameters. # - # source://prism//lib/prism/translation/parser/compiler.rb#267 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:267 def visit_block_parameters_node(node); end # break @@ -35499,13 +34484,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # break foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#276 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:276 def visit_break_node(node); end # foo.bar &&= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#381 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:381 def visit_call_and_write_node(node); end # foo @@ -35517,133 +34502,133 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo.bar() {} # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#288 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:288 def visit_call_node(node); end # foo.bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#362 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:362 def visit_call_operator_write_node(node); end # foo.bar ||= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#400 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:400 def visit_call_or_write_node(node); end # foo.bar, = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#419 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:419 def visit_call_target_node(node); end # foo => bar => baz # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#431 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:431 def visit_capture_pattern_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#450 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:450 def visit_case_match_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#437 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:437 def visit_case_node(node); end # class Foo; end # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#463 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:463 def visit_class_node(node); end # @@foo &&= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#502 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:502 def visit_class_variable_and_write_node(node); end # @@foo += bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#492 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:492 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#512 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:512 def visit_class_variable_or_write_node(node); end # @@foo # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#476 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:476 def visit_class_variable_read_node(node); end # @@foo, = bar # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#522 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:522 def visit_class_variable_target_node(node); end # @@foo = 1 # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#482 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:482 def visit_class_variable_write_node(node); end # Foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#553 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:553 def visit_constant_and_write_node(node); end # Foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#543 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:543 def visit_constant_operator_write_node(node); end # Foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#563 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:563 def visit_constant_or_write_node(node); end # Foo::Bar &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#619 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:619 def visit_constant_path_and_write_node(node); end # Foo::Bar # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#579 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:579 def visit_constant_path_node(node); end # Foo::Bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#609 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:609 def visit_constant_path_operator_write_node(node); end # Foo::Bar ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#629 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:629 def visit_constant_path_or_write_node(node); end # Foo::Bar, = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#639 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:639 def visit_constant_path_target_node(node); end # Foo::Bar = 1 @@ -35652,19 +34637,19 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo::Foo, Bar::Bar = 1 # ^^^^^^^^ ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#599 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:599 def visit_constant_path_write_node(node); end # Foo # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#528 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:528 def visit_constant_read_node(node); end # Foo, = bar # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#573 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:573 def visit_constant_target_node(node); end # Foo = 1 @@ -35673,7 +34658,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo, Bar = 1 # ^^^ ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#537 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:537 def visit_constant_write_node(node); end # def foo; end @@ -35682,7 +34667,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def self.foo; end # ^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#648 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:648 def visit_def_node(node); end # defined? a @@ -35691,77 +34676,73 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # defined?(a) # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#695 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:695 def visit_defined_node(node); end # if foo then bar else baz end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#731 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:731 def visit_else_node(node); end # "foo #{bar}" # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#737 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:737 def visit_embedded_statements_node(node); end # "foo #@bar" # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#747 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:747 def visit_embedded_variable_node(node); end # begin; foo; ensure; bar; end # ^^^^^^^^^^^^ # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#753 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:753 def visit_ensure_node(node); end # false # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#759 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:759 def visit_false_node(node); end # foo => [*, bar, *] # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#765 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:765 def visit_find_pattern_node(node); end - # 0..5 - # ^^^^ # if foo .. bar; end # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1523 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1541 def visit_flip_flop_node(node); end # 1.0 # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#777 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:777 def visit_float_node(node); end # for foo in bar do end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#783 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:783 def visit_for_node(node); end # def foo(...); bar(...); end # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#801 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:801 def visit_forwarding_arguments_node(node); end # def foo(...); end # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#807 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:807 def visit_forwarding_parameter_node(node); end # super @@ -35770,55 +34751,55 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # super {} # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#816 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:816 def visit_forwarding_super_node(node); end # $foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#854 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:854 def visit_global_variable_and_write_node(node); end # $foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#844 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:844 def visit_global_variable_operator_write_node(node); end # $foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#864 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:864 def visit_global_variable_or_write_node(node); end # $foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#828 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:828 def visit_global_variable_read_node(node); end # $foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#874 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:874 def visit_global_variable_target_node(node); end # $foo = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#834 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:834 def visit_global_variable_write_node(node); end # {} # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#880 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:880 def visit_hash_node(node); end # foo => {} # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#890 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:890 def visit_hash_pattern_node(node); end # if foo then bar end @@ -35830,146 +34811,145 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo ? bar : baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#908 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:908 def visit_if_node(node); end # 1i # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#950 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:950 def visit_imaginary_node(node); end # { foo: } # ^^^^ # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#956 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:956 def visit_implicit_node(node); end # foo { |bar,| } # ^ # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#962 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:962 def visit_implicit_rest_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#968 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:968 def visit_in_node(node); end # foo[bar] &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1016 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1016 def visit_index_and_write_node(node); end # foo[bar] += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#998 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:998 def visit_index_operator_write_node(node); end # foo[bar] ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1034 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1034 def visit_index_or_write_node(node); end # foo[bar], = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1052 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1052 def visit_index_target_node(node); end + # @foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1089 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1089 def visit_instance_variable_and_write_node(node); end + # @foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1079 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1079 def visit_instance_variable_operator_write_node(node); end + # @foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1099 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1099 def visit_instance_variable_or_write_node(node); end + # @foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1063 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1063 def visit_instance_variable_read_node(node); end # @foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1109 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1109 def visit_instance_variable_target_node(node); end + # @foo = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1069 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1069 def visit_instance_variable_write_node(node); end # 1 # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1115 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1115 def visit_integer_node(node); end - # /foo #{bar}/ - # ^^^^^^^^^^^^ # if /foo #{bar}/ then end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1121 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1132 def visit_interpolated_match_last_line_node(node); end # /foo #{bar}/ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1121 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1121 def visit_interpolated_regular_expression_node(node); end # "foo #{bar}" # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1136 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1136 def visit_interpolated_string_node(node); end # :"foo #{bar}" # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1150 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1150 def visit_interpolated_symbol_node(node); end # `foo #{bar}` # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1160 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1160 def visit_interpolated_x_string_node(node); end # -> { it } # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1174 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1174 def visit_it_local_variable_read_node(node); end # -> { it } # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1180 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1180 def visit_it_parameters_node(node); end # foo(bar: baz) # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1196 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1196 def visit_keyword_hash_node(node); end # def foo(**bar); end @@ -35978,100 +34958,98 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(**); end # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1205 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1205 def visit_keyword_rest_parameter_node(node); end # -> {} # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1214 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1214 def visit_lambda_node(node); end # foo &&= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1266 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1266 def visit_local_variable_and_write_node(node); end # foo += bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1256 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1256 def visit_local_variable_operator_write_node(node); end # foo ||= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1276 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1276 def visit_local_variable_or_write_node(node); end # foo # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1240 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1240 def visit_local_variable_read_node(node); end # foo, = bar # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1286 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1286 def visit_local_variable_target_node(node); end # foo = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1246 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1246 def visit_local_variable_write_node(node); end - # /foo/ - # ^^^^^ # if /foo/ then end # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1557 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1577 def visit_match_last_line_node(node); end # foo in bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1296 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1296 def visit_match_predicate_node(node); end # foo => bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1306 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1306 def visit_match_required_node(node); end # /(?foo)/ =~ bar # ^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1316 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1316 def visit_match_write_node(node); end # A node that is missing from the syntax tree. This is only used in the # case of a syntax error. The parser gem doesn't have such a concept, so # we invent our own here. # - # source://prism//lib/prism/translation/parser/compiler.rb#1327 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1327 def visit_missing_node(node); end # module Foo; end # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1333 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1333 def visit_module_node(node); end # foo, bar = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1344 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1344 def visit_multi_target_node(node); end # foo, bar = baz # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1354 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1354 def visit_multi_write_node(node); end # next @@ -36080,55 +35058,55 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # next foo # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1377 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1377 def visit_next_node(node); end # nil # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1389 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1389 def visit_nil_node(node); end # def foo(**nil); end # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1395 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1395 def visit_no_keywords_parameter_node(node); end # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1405 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1405 def visit_numbered_parameters_node(node); end # $1 # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1411 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1411 def visit_numbered_reference_read_node(node); end # def foo(bar: baz); end # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1417 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1417 def visit_optional_keyword_parameter_node(node); end # def foo(bar = 1); end # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1423 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1423 def visit_optional_parameter_node(node); end # a or b # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1429 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1429 def visit_or_node(node); end # def foo(bar, *baz); end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1435 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1435 def visit_parameters_node(node); end # () @@ -36137,84 +35115,82 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # (1) # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1474 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1474 def visit_parentheses_node(node); end # foo => ^(bar) # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1484 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1484 def visit_pinned_expression_node(node); end # foo = 1 and bar => ^foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1492 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1492 def visit_pinned_variable_node(node); end # END {} # - # source://prism//lib/prism/translation/parser/compiler.rb#1497 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1497 def visit_post_execution_node(node); end # BEGIN {} # - # source://prism//lib/prism/translation/parser/compiler.rb#1507 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1507 def visit_pre_execution_node(node); end # The top-level program node. # - # source://prism//lib/prism/translation/parser/compiler.rb#1517 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1517 def visit_program_node(node); end # 0..5 # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1523 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1523 def visit_range_node(node); end # 1r # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1545 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1545 def visit_rational_node(node); end # redo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1551 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1551 def visit_redo_node(node); end # /foo/ # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1557 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1557 def visit_regular_expression_node(node); end # def foo(bar:); end # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1581 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1581 def visit_required_keyword_parameter_node(node); end # def foo(bar); end # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1587 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1587 def visit_required_parameter_node(node); end # foo rescue bar # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1593 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1593 def visit_rescue_modifier_node(node); end # begin; rescue; end # ^^^^^^^ # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#1611 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1611 def visit_rescue_node(node); end # def foo(*bar); end @@ -36223,13 +35199,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(*); end # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1620 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1620 def visit_rest_parameter_node(node); end # retry # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1626 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1626 def visit_retry_node(node); end # return @@ -36238,42 +35214,42 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # return 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1635 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1635 def visit_return_node(node); end # self # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1647 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1647 def visit_self_node(node); end # A shareable constant. # - # source://prism//lib/prism/translation/parser/compiler.rb#1652 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1652 def visit_shareable_constant_node(node); end # class << self; end # ^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1658 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1658 def visit_singleton_class_node(node); end # __ENCODING__ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1670 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1670 def visit_source_encoding_node(node); end # __FILE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1676 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1676 def visit_source_file_node(node); end # __LINE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1682 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1682 def visit_source_line_node(node); end # foo(*bar) @@ -36285,42 +35261,42 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(*); bar(*); end # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1694 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1694 def visit_splat_node(node); end # A list of statements. # - # source://prism//lib/prism/translation/parser/compiler.rb#1707 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1707 def visit_statements_node(node); end # "foo" # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1713 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1713 def visit_string_node(node); end # super(foo) # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1738 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1738 def visit_super_node(node); end # :foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1761 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1761 def visit_symbol_node(node); end # true # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1788 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1788 def visit_true_node(node); end # undef foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1794 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1794 def visit_undef_node(node); end # unless foo; bar end @@ -36329,7 +35305,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar unless foo # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1803 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1803 def visit_unless_node(node); end # until foo; bar end @@ -36338,13 +35314,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar until foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1833 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1833 def visit_until_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1859 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1859 def visit_when_node(node); end # while foo; bar end @@ -36353,13 +35329,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar while foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1877 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1877 def visit_while_node(node); end # `foo` # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1903 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1903 def visit_x_string_node(node); end # yield @@ -36368,7 +35344,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # yield 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1929 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1929 def visit_yield_node(node); end private @@ -36376,19 +35352,19 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Initialize a new compiler with the given option overrides, used to # visit a subtree with the given options. # - # source://prism//lib/prism/translation/parser/compiler.rb#1943 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1943 def copy_compiler(forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end # When *, **, &, or ... are used as an argument in a method call, we # check if they were allowed by the current context. To determine that # we build this lookup table. # - # source://prism//lib/prism/translation/parser/compiler.rb#1950 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1950 def find_forwarding(node); end # Returns the set of targets for a MultiTargetNode or a MultiWriteNode. # - # source://prism//lib/prism/translation/parser/compiler.rb#1963 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1963 def multi_target_elements(node); end # Negate the value of a numeric node. This is a special case where you @@ -36397,26 +35373,24 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # however, marks this as a numeric literal. We have to massage the tree # here to get it into the correct form. # - # source://prism//lib/prism/translation/parser/compiler.rb#1975 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1975 def numeric_negate(message_loc, receiver); end # Blocks can have a special set of parameters that automatically expand # when given arrays if they have a single required parameter and no # other parameters. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser/compiler.rb#1989 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1989 def procarg0?(parameters); end # Constructs a new source range from the given start and end offsets. # - # source://prism//lib/prism/translation/parser/compiler.rb#2006 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2006 def srange(location); end # Constructs a new source range from the given start and end offsets. # - # source://prism//lib/prism/translation/parser/compiler.rb#2011 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2011 def srange_offsets(start_offset, end_offset); end # Constructs a new source range by finding a semicolon between the given @@ -36426,94 +35400,92 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Note that end_offset is allowed to be nil, in which case this will # search until the end of the string. # - # source://prism//lib/prism/translation/parser/compiler.rb#2021 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2021 def srange_semicolon(start_offset, end_offset); end # When the content of a string node is split across multiple lines, the # parser gem creates individual string nodes for each line the content is part of. # - # source://prism//lib/prism/translation/parser/compiler.rb#2138 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2138 def string_nodes_from_interpolation(node, opening); end # Create parser string nodes from a single prism node. The parser gem # "glues" strings together when a line continuation is encountered. # - # source://prism//lib/prism/translation/parser/compiler.rb#2150 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2150 def string_nodes_from_line_continuations(unescaped, escaped, start_offset, opening); end # Transform a location into a token that the parser gem expects. # - # source://prism//lib/prism/translation/parser/compiler.rb#2029 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2029 def token(location); end # Visit a block node on a call. # - # source://prism//lib/prism/translation/parser/compiler.rb#2034 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2034 def visit_block(call, block); end # Visit a heredoc that can be either a string or an xstring. # - # source://prism//lib/prism/translation/parser/compiler.rb#2069 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2069 def visit_heredoc(node); end # Visit a numeric node and account for the optional sign. # - # source://prism//lib/prism/translation/parser/compiler.rb#2115 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2115 def visit_numeric(node, value); end # Within the given block, track that we're within a pattern. # - # source://prism//lib/prism/translation/parser/compiler.rb#2127 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2127 def within_pattern; end end # Raised when the tree is malformed or there is a bug in the compiler. # -# source://prism//lib/prism/translation/parser/compiler.rb#11 +# pkg:gem/prism#lib/prism/translation/parser/compiler.rb:11 class Prism::Translation::Parser::Compiler::CompilationError < ::StandardError; end # Locations in the parser gem AST are generated using this class. We # store a reference to its constant to make it slightly faster to look # up. # -# source://prism//lib/prism/translation/parser/compiler.rb#2003 +# pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2003 Prism::Translation::Parser::Compiler::Range = Parser::Source::Range -# source://prism//lib/prism/translation/parser.rb#30 +# pkg:gem/prism#lib/prism/translation/parser.rb:30 Prism::Translation::Parser::Diagnostic = Parser::Diagnostic # Accepts a list of prism tokens and converts them into the expected # format for the parser gem. # -# source://prism//lib/prism/translation/parser/lexer.rb#13 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:13 class Prism::Translation::Parser::Lexer # Initialize the lexer with the given source buffer, prism tokens, and # offset cache. # - # @return [Lexer] a new instance of Lexer - # - # source://prism//lib/prism/translation/parser/lexer.rb#231 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:231 def initialize(source_buffer, lexed, offset_cache); end # An array of tuples that contain prism tokens and their associated lex # state when they were lexed. # - # source://prism//lib/prism/translation/parser/lexer.rb#224 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:224 def lexed; end # A hash that maps offsets in bytes to offsets in characters. # - # source://prism//lib/prism/translation/parser/lexer.rb#227 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:227 def offset_cache; end # The Parser::Source::Buffer that the tokens were lexed from. # - # source://prism//lib/prism/translation/parser/lexer.rb#220 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:220 def source_buffer; end # Convert the prism tokens into the expected format for the parser gem. # - # source://prism//lib/prism/translation/parser/lexer.rb#241 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:241 def to_a; end private @@ -36521,111 +35493,103 @@ class Prism::Translation::Parser::Lexer # Wonky heredoc tab/spaces rules. # https://github.com/ruby/prism/blob/v1.3.0/src/prism.c#L10548-L10558 # - # source://prism//lib/prism/translation/parser/lexer.rb#593 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:593 def calculate_heredoc_whitespace(heredoc_token_index); end # Escape a byte value, given the control and meta flags. # - # source://prism//lib/prism/translation/parser/lexer.rb#735 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:735 def escape_build(value, control, meta); end # Read an escape out of the string scanner, given the control and meta # flags, and push the unescaped value into the result. # - # source://prism//lib/prism/translation/parser/lexer.rb#743 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:743 def escape_read(result, scanner, control, meta); end # Determine if characters preceeded by a backslash should be escaped or not # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser/lexer.rb#804 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:804 def interpolation?(quote); end # Parse a complex from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#564 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:564 def parse_complex(value); end # Parse a float from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#557 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:557 def parse_float(value); end # Parse an integer from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#550 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:550 def parse_integer(value); end # Parse a rational from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#579 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:579 def parse_rational(value); end # Determine if the string is part of a %-style array. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser/lexer.rb#814 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:814 def percent_array?(quote); end # For %-arrays whitespace, the parser gem only considers whitespace before the newline. # - # source://prism//lib/prism/translation/parser/lexer.rb#792 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:792 def percent_array_leading_whitespace(string); end # In a percent array, certain whitespace can be preceeded with a backslash, # causing the following characters to be part of the previous element. # - # source://prism//lib/prism/translation/parser/lexer.rb#784 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:784 def percent_array_unescape(string); end # Creates a new parser range, taking prisms byte offsets into account # - # source://prism//lib/prism/translation/parser/lexer.rb#545 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:545 def range(start_offset, end_offset); end # Regexp allow interpolation but are handled differently during unescaping # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser/lexer.rb#809 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:809 def regexp?(quote); end # Certain strings are merged into a single string token. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser/lexer.rb#718 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:718 def simplify_string?(value, quote); end # Wonky heredoc tab/spaces rules. # https://github.com/ruby/prism/blob/v1.3.0/src/prism.c#L16528-L16545 # - # source://prism//lib/prism/translation/parser/lexer.rb#640 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:640 def trim_heredoc_whitespace(string, heredoc); end # Apply Ruby string escaping rules # - # source://prism//lib/prism/translation/parser/lexer.rb#675 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:675 def unescape_string(string, quote); end end # Types of tokens that are allowed to continue a method call with comments in-between. # For these, the parser gem doesn't emit a newline token after the last comment. # -# source://prism//lib/prism/translation/parser/lexer.rb#211 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:211 Prism::Translation::Parser::Lexer::COMMENT_CONTINUATION_TYPES = T.let(T.unsafe(nil), Set) # When one of these delimiters is encountered, then the other # one is allowed to be escaped as well. # -# source://prism//lib/prism/translation/parser/lexer.rb#666 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:666 Prism::Translation::Parser::Lexer::DELIMITER_SYMETRY = T.let(T.unsafe(nil), Hash) # Escape sequences that have special and should appear unescaped in the resulting string. # -# source://prism//lib/prism/translation/parser/lexer.rb#657 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:657 Prism::Translation::Parser::Lexer::ESCAPES = T.let(T.unsafe(nil), Hash) # These constants represent flags in our lex state. We really, really @@ -36636,43 +35600,42 @@ Prism::Translation::Parser::Lexer::ESCAPES = T.let(T.unsafe(nil), Hash) # meantime we'll hide them from the documentation and mark them as # private constants. # -# source://prism//lib/prism/translation/parser/lexer.rb#193 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:193 Prism::Translation::Parser::Lexer::EXPR_BEG = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/parser/lexer.rb#194 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:194 Prism::Translation::Parser::Lexer::EXPR_LABEL = T.let(T.unsafe(nil), Integer) # Heredocs are complex and require us to keep track of a bit of info to refer to later # -# source://prism//lib/prism/translation/parser/lexer.rb#215 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 class Prism::Translation::Parser::Lexer::HeredocData < ::Struct - # Returns the value of attribute common_whitespace - # - # @return [Object] the current value of common_whitespace + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def common_whitespace; end - # Sets the attribute common_whitespace - # - # @param value [Object] the value to set the attribute common_whitespace to. - # @return [Object] the newly set value + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def common_whitespace=(_); end - # Returns the value of attribute identifier - # - # @return [Object] the current value of identifier + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def identifier; end - # Sets the attribute identifier - # - # @param value [Object] the value to set the attribute identifier to. - # @return [Object] the newly set value + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def identifier=(_); end class << self + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def [](*_arg0); end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def inspect; end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def keyword_init?; end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def members; end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def new(*_arg0); end end end @@ -36682,56 +35645,54 @@ end # NOTE: In edge cases like `-> (foo = -> (bar) {}) do end`, please note that `kDO` is still returned # instead of `kDO_LAMBDA`, which is expected: https://github.com/ruby/prism/pull/3046 # -# source://prism//lib/prism/translation/parser/lexer.rb#200 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:200 Prism::Translation::Parser::Lexer::LAMBDA_TOKEN_TYPES = T.let(T.unsafe(nil), Set) # The `PARENTHESIS_LEFT` token in Prism is classified as either `tLPAREN` or `tLPAREN2` in the Parser gem. # The following token types are listed as those classified as `tLPAREN`. # -# source://prism//lib/prism/translation/parser/lexer.rb#204 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:204 Prism::Translation::Parser::Lexer::LPAREN_CONVERSION_TOKEN_TYPES = T.let(T.unsafe(nil), Set) # https://github.com/whitequark/parser/blob/v3.3.6.0/lib/parser/lexer-strings.rl#L14 # -# source://prism//lib/prism/translation/parser/lexer.rb#671 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:671 Prism::Translation::Parser::Lexer::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Array) -# source://prism//lib/prism/translation/parser/lexer.rb#237 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:237 Prism::Translation::Parser::Lexer::Range = Parser::Source::Range # The direct translating of types between the two lexers. # -# source://prism//lib/prism/translation/parser/lexer.rb#19 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:19 Prism::Translation::Parser::Lexer::TYPES = T.let(T.unsafe(nil), Hash) # These tokens are always skipped # -# source://prism//lib/prism/translation/parser/lexer.rb#15 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:15 Prism::Translation::Parser::Lexer::TYPES_ALWAYS_SKIP = T.let(T.unsafe(nil), Set) # The parser gem has a list of diagnostics with a hard-coded set of error # messages. We create our own diagnostic class in order to set our own # error messages. # -# source://prism//lib/prism/translation/parser.rb#36 +# pkg:gem/prism#lib/prism/translation/parser.rb:36 class Prism::Translation::Parser::PrismDiagnostic < ::Parser::Diagnostic # Initialize a new diagnostic with the given message and location. # - # @return [PrismDiagnostic] a new instance of PrismDiagnostic - # - # source://prism//lib/prism/translation/parser.rb#41 + # pkg:gem/prism#lib/prism/translation/parser.rb:41 def initialize(message, level, reason, location); end # This is the cached message coming from prism. # - # source://prism//lib/prism/translation/parser.rb#38 + # pkg:gem/prism#lib/prism/translation/parser.rb:38 def message; end end -# source://prism//lib/prism/translation/parser.rb#47 +# pkg:gem/prism#lib/prism/translation/parser.rb:47 Prism::Translation::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) -# source://prism//lib/prism/translation/parser_current.rb#23 +# pkg:gem/prism#lib/prism/translation/parser_current.rb:14 Prism::Translation::ParserCurrent = Prism::Translation::Parser40 # This class provides a compatibility layer between prism and Ripper. It @@ -36770,95 +35731,91 @@ Prism::Translation::ParserCurrent = Prism::Translation::Parser40 # - on_tstring_beg # - on_tstring_end # -# source://prism//lib/prism/translation/ripper.rb#42 +# pkg:gem/prism#lib/prism/translation/ripper.rb:42 class Prism::Translation::Ripper < ::Prism::Compiler # Create a new Translation::Ripper object with the given source. # - # @return [Ripper] a new instance of Ripper - # - # source://prism//lib/prism/translation/ripper.rb#482 + # pkg:gem/prism#lib/prism/translation/ripper.rb:482 def initialize(source, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end # The current column number of the parser. # - # source://prism//lib/prism/translation/ripper.rb#479 + # pkg:gem/prism#lib/prism/translation/ripper.rb:479 def column; end # True if the parser encountered an error during parsing. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/ripper.rb#495 + # pkg:gem/prism#lib/prism/translation/ripper.rb:495 sig { returns(T::Boolean) } def error?; end # The filename of the source being parsed. # - # source://prism//lib/prism/translation/ripper.rb#473 + # pkg:gem/prism#lib/prism/translation/ripper.rb:473 def filename; end # The current line number of the parser. # - # source://prism//lib/prism/translation/ripper.rb#476 + # pkg:gem/prism#lib/prism/translation/ripper.rb:476 def lineno; end # Parse the source and return the result. # - # source://prism//lib/prism/translation/ripper.rb#500 + # pkg:gem/prism#lib/prism/translation/ripper.rb:500 sig { returns(T.untyped) } def parse; end # The source that is being parsed. # - # source://prism//lib/prism/translation/ripper.rb#470 + # pkg:gem/prism#lib/prism/translation/ripper.rb:470 def source; end # alias $foo $bar # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#599 + # pkg:gem/prism#lib/prism/translation/ripper.rb:599 def visit_alias_global_variable_node(node); end # alias foo bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#589 + # pkg:gem/prism#lib/prism/translation/ripper.rb:589 def visit_alias_method_node(node); end # foo => bar | baz # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#623 + # pkg:gem/prism#lib/prism/translation/ripper.rb:623 def visit_alternation_pattern_node(node); end # a and b # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#643 + # pkg:gem/prism#lib/prism/translation/ripper.rb:643 def visit_and_node(node); end # foo(bar) # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#834 + # pkg:gem/prism#lib/prism/translation/ripper.rb:834 def visit_arguments_node(node); end # [] # ^^ # - # source://prism//lib/prism/translation/ripper.rb#653 + # pkg:gem/prism#lib/prism/translation/ripper.rb:653 def visit_array_node(node); end # foo => [bar] # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#813 + # pkg:gem/prism#lib/prism/translation/ripper.rb:813 def visit_array_pattern_node(node); end # { a: 1 } # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#841 + # pkg:gem/prism#lib/prism/translation/ripper.rb:841 def visit_assoc_node(node); end # def foo(**); bar(**); end @@ -36867,47 +35824,47 @@ class Prism::Translation::Ripper < ::Prism::Compiler # { **foo } # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#854 + # pkg:gem/prism#lib/prism/translation/ripper.rb:854 def visit_assoc_splat_node(node); end # $+ # ^^ # - # source://prism//lib/prism/translation/ripper.rb#863 + # pkg:gem/prism#lib/prism/translation/ripper.rb:863 def visit_back_reference_read_node(node); end # begin end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#870 + # pkg:gem/prism#lib/prism/translation/ripper.rb:870 def visit_begin_node(node); end # foo(&bar) # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#934 + # pkg:gem/prism#lib/prism/translation/ripper.rb:934 def visit_block_argument_node(node); end # foo { |; bar| } # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#940 + # pkg:gem/prism#lib/prism/translation/ripper.rb:940 def visit_block_local_variable_node(node); end # Visit a BlockNode. # - # source://prism//lib/prism/translation/ripper.rb#946 + # pkg:gem/prism#lib/prism/translation/ripper.rb:946 def visit_block_node(node); end # def foo(&bar); end # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#982 + # pkg:gem/prism#lib/prism/translation/ripper.rb:982 def visit_block_parameter_node(node); end # A block's parameters. # - # source://prism//lib/prism/translation/ripper.rb#996 + # pkg:gem/prism#lib/prism/translation/ripper.rb:996 def visit_block_parameters_node(node); end # break @@ -36916,13 +35873,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # break foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1020 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1020 def visit_break_node(node); end # foo.bar &&= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1251 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1251 def visit_call_and_write_node(node); end # foo @@ -36934,79 +35891,79 @@ class Prism::Translation::Ripper < ::Prism::Compiler # foo.bar() {} # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1040 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1040 def visit_call_node(node); end # foo.bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1229 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1229 def visit_call_operator_write_node(node); end # foo.bar ||= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1273 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1273 def visit_call_or_write_node(node); end # foo.bar, = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1295 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1295 def visit_call_target_node(node); end # foo => bar => baz # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1320 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1320 def visit_capture_pattern_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1343 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1343 def visit_case_match_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1330 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1330 def visit_case_node(node); end # class Foo; end # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1356 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1356 def visit_class_node(node); end # @@foo &&= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1409 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1409 def visit_class_variable_and_write_node(node); end # @@foo += bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1395 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1423 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1423 def visit_class_variable_or_write_node(node); end # @@foo # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1374 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1374 def visit_class_variable_read_node(node); end # @@foo, = bar # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1437 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1437 def visit_class_variable_target_node(node); end # @@foo = 1 @@ -37015,55 +35972,55 @@ class Prism::Translation::Ripper < ::Prism::Compiler # @@foo, @@bar = 1 # ^^^^^ ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1384 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1384 def visit_class_variable_write_node(node); end # Foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1479 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1479 def visit_constant_and_write_node(node); end # Foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1465 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1465 def visit_constant_operator_write_node(node); end # Foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1493 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1493 def visit_constant_or_write_node(node); end # Foo::Bar &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1580 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1580 def visit_constant_path_and_write_node(node); end # Foo::Bar # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1514 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1514 def visit_constant_path_node(node); end # Foo::Bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1566 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1566 def visit_constant_path_operator_write_node(node); end # Foo::Bar ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1594 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1594 def visit_constant_path_or_write_node(node); end # Foo::Bar, = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1608 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1608 def visit_constant_path_target_node(node); end # Foo::Bar = 1 @@ -37072,19 +36029,19 @@ class Prism::Translation::Ripper < ::Prism::Compiler # Foo::Foo, Bar::Bar = 1 # ^^^^^^^^ ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1537 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1537 def visit_constant_path_write_node(node); end # Foo # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1444 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1444 def visit_constant_read_node(node); end # Foo, = bar # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1507 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1507 def visit_constant_target_node(node); end # Foo = 1 @@ -37093,7 +36050,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # Foo, Bar = 1 # ^^^ ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1454 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1454 def visit_constant_write_node(node); end # def foo; end @@ -37102,7 +36059,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def self.foo; end # ^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1617 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1617 def visit_def_node(node); end # defined? a @@ -37111,72 +36068,72 @@ class Prism::Translation::Ripper < ::Prism::Compiler # defined?(a) # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1664 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1664 def visit_defined_node(node); end # if foo then bar else baz end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1686 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1686 def visit_else_node(node); end # "foo #{bar}" # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1702 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1702 def visit_embedded_statements_node(node); end # "foo #@bar" # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1723 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1723 def visit_embedded_variable_node(node); end # Visit an EnsureNode node. # - # source://prism//lib/prism/translation/ripper.rb#1734 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1734 def visit_ensure_node(node); end # false # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1752 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1752 def visit_false_node(node); end # foo => [*, bar, *] # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1759 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1759 def visit_find_pattern_node(node); end # if foo .. bar; end # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1784 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1784 def visit_flip_flop_node(node); end # 1.0 # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1798 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1798 def visit_float_node(node); end # for foo in bar do end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1804 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1804 def visit_for_node(node); end # def foo(...); bar(...); end # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1821 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1821 def visit_forwarding_arguments_node(node); end # def foo(...); end # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1828 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1828 def visit_forwarding_parameter_node(node); end # super @@ -37185,37 +36142,37 @@ class Prism::Translation::Ripper < ::Prism::Compiler # super {} # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1838 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1838 def visit_forwarding_super_node(node); end # $foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1887 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1887 def visit_global_variable_and_write_node(node); end # $foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1873 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1873 def visit_global_variable_operator_write_node(node); end # $foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1901 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1901 def visit_global_variable_or_write_node(node); end # $foo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1852 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1852 def visit_global_variable_read_node(node); end # $foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1915 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1915 def visit_global_variable_target_node(node); end # $foo = 1 @@ -37224,19 +36181,19 @@ class Prism::Translation::Ripper < ::Prism::Compiler # $foo, $bar = 1 # ^^^^ ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1862 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1862 def visit_global_variable_write_node(node); end # {} # ^^ # - # source://prism//lib/prism/translation/ripper.rb#1922 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1922 def visit_hash_node(node); end # foo => {} # ^^ # - # source://prism//lib/prism/translation/ripper.rb#1937 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1937 def visit_hash_pattern_node(node); end # if foo then bar end @@ -37248,140 +36205,145 @@ class Prism::Translation::Ripper < ::Prism::Compiler # foo ? bar : baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1979 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1979 def visit_if_node(node); end # 1i # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2015 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2015 def visit_imaginary_node(node); end # { foo: } # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2021 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2021 def visit_implicit_node(node); end # foo { |bar,| } # ^ # - # source://prism//lib/prism/translation/ripper.rb#2026 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2026 def visit_implicit_rest_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2033 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2033 def visit_in_node(node); end # foo[bar] &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2068 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2068 def visit_index_and_write_node(node); end # foo[bar] += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2051 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2051 def visit_index_operator_write_node(node); end # foo[bar] ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2085 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2085 def visit_index_or_write_node(node); end # foo[bar], = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2102 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2102 def visit_index_target_node(node); end + # @foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2144 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2144 def visit_instance_variable_and_write_node(node); end + # @foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2130 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2130 def visit_instance_variable_operator_write_node(node); end + # @foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2158 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2158 def visit_instance_variable_or_write_node(node); end + # @foo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2112 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2112 def visit_instance_variable_read_node(node); end # @foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2172 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2172 def visit_instance_variable_target_node(node); end + # @foo = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2119 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2119 def visit_instance_variable_write_node(node); end # 1 # ^ # - # source://prism//lib/prism/translation/ripper.rb#2179 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2179 def visit_integer_node(node); end # if /foo #{bar}/ then end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2185 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2185 def visit_interpolated_match_last_line_node(node); end # /foo #{bar}/ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2204 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2204 def visit_interpolated_regular_expression_node(node); end # "foo #{bar}" # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2223 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2223 def visit_interpolated_string_node(node); end # :"foo #{bar}" # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2251 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2251 def visit_interpolated_symbol_node(node); end # `foo #{bar}` # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2264 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2264 def visit_interpolated_x_string_node(node); end # -> { it } # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2294 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2294 def visit_it_local_variable_read_node(node); end # -> { it } # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2301 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2301 def visit_it_parameters_node(node); end # foo(bar: baz) # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2306 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2306 def visit_keyword_hash_node(node); end # def foo(**bar); end @@ -37390,96 +36352,96 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def foo(**); end # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2318 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2318 def visit_keyword_rest_parameter_node(node); end # -> {} # - # source://prism//lib/prism/translation/ripper.rb#2332 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2332 def visit_lambda_node(node); end # foo &&= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2424 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2424 def visit_local_variable_and_write_node(node); end # foo += bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2410 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2410 def visit_local_variable_operator_write_node(node); end # foo ||= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2438 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2438 def visit_local_variable_or_write_node(node); end # foo # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2392 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2392 def visit_local_variable_read_node(node); end # foo, = bar # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2452 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2452 def visit_local_variable_target_node(node); end # foo = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2399 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2399 def visit_local_variable_write_node(node); end # if /foo/ then end # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2459 def visit_match_last_line_node(node); end # foo in bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2474 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2474 def visit_match_predicate_node(node); end # foo => bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2483 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2483 def visit_match_required_node(node); end # /(?foo)/ =~ bar # ^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2492 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2492 def visit_match_write_node(node); end # A node that is missing from the syntax tree. This is only used in the # case of a syntax error. # - # source://prism//lib/prism/translation/ripper.rb#2498 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2498 def visit_missing_node(node); end # module Foo; end # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2504 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2504 def visit_module_node(node); end # (foo, bar), bar = qux # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2521 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2521 def visit_multi_target_node(node); end # foo, bar = baz # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2575 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2575 def visit_multi_write_node(node); end # next @@ -37488,55 +36450,55 @@ class Prism::Translation::Ripper < ::Prism::Compiler # next foo # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2595 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2595 def visit_next_node(node); end # nil # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2609 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2609 def visit_nil_node(node); end # def foo(**nil); end # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2616 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2616 def visit_no_keywords_parameter_node(node); end # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2625 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2625 def visit_numbered_parameters_node(node); end # $1 # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2630 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2630 def visit_numbered_reference_read_node(node); end # def foo(bar: baz); end # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2637 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2637 def visit_optional_keyword_parameter_node(node); end # def foo(bar = 1); end # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2647 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2647 def visit_optional_parameter_node(node); end # a or b # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2657 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2657 def visit_or_node(node); end # def foo(bar, *baz); end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2667 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2667 def visit_parameters_node(node); end # () @@ -37545,84 +36507,84 @@ class Prism::Translation::Ripper < ::Prism::Compiler # (1) # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2694 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2694 def visit_parentheses_node(node); end # foo => ^(bar) # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2708 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2708 def visit_pinned_expression_node(node); end # foo = 1 and bar => ^foo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2717 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2717 def visit_pinned_variable_node(node); end # END {} # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2723 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2723 def visit_post_execution_node(node); end # BEGIN {} # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2738 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2738 def visit_pre_execution_node(node); end # The top-level program node. # - # source://prism//lib/prism/translation/ripper.rb#2752 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2752 def visit_program_node(node); end # 0..5 # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2763 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2763 def visit_range_node(node); end # 1r # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2777 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2777 def visit_rational_node(node); end # redo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2783 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2783 def visit_redo_node(node); end # /foo/ # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2790 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2790 def visit_regular_expression_node(node); end # def foo(bar:); end # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2812 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2812 def visit_required_keyword_parameter_node(node); end # def foo(bar); end # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2819 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2819 def visit_required_parameter_node(node); end # foo rescue bar # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2826 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2826 def visit_rescue_modifier_node(node); end # begin; rescue; end # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2836 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2836 def visit_rescue_node(node); end # def foo(*bar); end @@ -37631,13 +36593,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def foo(*); end # ^ # - # source://prism//lib/prism/translation/ripper.rb#2894 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2894 def visit_rest_parameter_node(node); end # retry # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2906 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2906 def visit_retry_node(node); end # return @@ -37646,42 +36608,42 @@ class Prism::Translation::Ripper < ::Prism::Compiler # return 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2916 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2916 def visit_return_node(node); end # self # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2930 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2930 def visit_self_node(node); end # A shareable constant. # - # source://prism//lib/prism/translation/ripper.rb#2936 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2936 def visit_shareable_constant_node(node); end # class << self; end # ^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2942 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2942 def visit_singleton_class_node(node); end # __ENCODING__ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2952 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2952 def visit_source_encoding_node(node); end # __FILE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2959 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2959 def visit_source_file_node(node); end # __LINE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2966 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2966 def visit_source_line_node(node); end # foo(*bar) @@ -37693,42 +36655,42 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def foo(*); bar(*); end # ^ # - # source://prism//lib/prism/translation/ripper.rb#2979 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2979 def visit_splat_node(node); end # A list of statements. # - # source://prism//lib/prism/translation/ripper.rb#2984 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2984 def visit_statements_node(node); end # "foo" # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3001 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3001 def visit_string_node(node); end # super(foo) # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3133 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3133 def visit_super_node(node); end # :foo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3154 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3154 def visit_symbol_node(node); end # true # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3178 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3178 def visit_true_node(node); end # undef foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3185 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3185 def visit_undef_node(node); end # unless foo; bar end @@ -37737,7 +36699,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # bar unless foo # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3197 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3197 def visit_unless_node(node); end # until foo; bar end @@ -37746,13 +36708,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # bar until foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3225 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3225 def visit_until_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3249 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3249 def visit_when_node(node); end # while foo; bar end @@ -37761,13 +36723,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # bar while foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3270 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3270 def visit_while_node(node); end # `foo` # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3294 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3294 def visit_x_string_node(node); end # yield @@ -37776,32 +36738,32 @@ class Prism::Translation::Ripper < ::Prism::Compiler # yield 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3317 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3317 def visit_yield_node(node); end private # :stopdoc: # - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3457 def _dispatch_0; end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3458 def _dispatch_1(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3459 def _dispatch_2(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3460 def _dispatch_3(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3461 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3461 def _dispatch_4(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3462 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3462 def _dispatch_5(arg, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3463 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3463 def _dispatch_7(arg, _, _, _, _, _, _); end # This method is responsible for updating lineno and column information @@ -37810,19 +36772,17 @@ class Prism::Translation::Ripper < ::Prism::Compiler # This method could be drastically improved with some caching on the start # of every line, but for now it's good enough. # - # source://prism//lib/prism/translation/ripper.rb#3447 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3447 def bounds(location); end # Returns true if the given node is a command node. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/ripper.rb#1220 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1220 def command?(node); end # This method is called when the parser found syntax error. # - # source://prism//lib/prism/translation/ripper.rb#3485 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3485 def compile_error(msg); end # This method is provided by the Ripper C extension. It is called when a @@ -37830,637 +36790,635 @@ class Prism::Translation::Ripper < ::Prism::Compiler # that it will modify the string in place and return the number of bytes # that were removed. # - # source://prism//lib/prism/translation/ripper.rb#3500 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3500 def dedent_string(string, width); end # Extract the arguments and block Ripper-style, which means if the block # is like `&b` then it's moved to arguments. # - # source://prism//lib/prism/translation/ripper.rb#1184 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1184 def get_arguments_and_block(arguments_node, block_node); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_BEGIN(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_CHAR(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_END(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on___end__(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_alias(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_alias_error(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_aref(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_aref_field(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_arg_ambiguous(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_arg_paren(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_args_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_args_add_block(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_args_add_star(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_args_forward; end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_args_new; end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_array(arg); end - # source://prism//lib/prism/translation/ripper.rb#3461 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_aryptn(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_assign(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_assign_error(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_assoc_new(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_assoc_splat(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_assoclist_from_args(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_backref(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_backtick(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_bare_assoc_hash(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_begin(arg); end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_binary(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_block_var(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_blockarg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3461 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_bodystmt(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_brace_block(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_break(arg); end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_call(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_case(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_class(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_class_name_error(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_comma(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_command(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3461 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_command_call(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_comment(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_const(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_const_path_field(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_const_path_ref(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_const_ref(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_cvar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_def(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_defined(arg); end - # source://prism//lib/prism/translation/ripper.rb#3462 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_defs(arg, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_do_block(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_dot2(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_dot3(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_dyna_symbol(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_else(arg); end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_elsif(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_embdoc(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_embdoc_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_embdoc_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_embexpr_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_embexpr_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_embvar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_ensure(arg); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_excessed_comma; end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_fcall(arg); end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_field(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_float(arg); end - # source://prism//lib/prism/translation/ripper.rb#3461 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_fndptn(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_for(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_gvar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_hash(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_heredoc_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_heredoc_dedent(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_heredoc_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_hshptn(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_ident(arg); end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_if(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_if_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_ifop(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_ignored_nl(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_ignored_sp(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_imaginary(arg); end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_in(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_int(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_ivar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_kw(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_kwrest_param(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_label(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_label_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_lambda(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_lbrace(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_lbracket(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_lparen(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_magic_comment(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_massign(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_method_add_arg(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_method_add_block(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_mlhs_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_mlhs_add_post(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_mlhs_add_star(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_mlhs_new; end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_mlhs_paren(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_module(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_mrhs_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_mrhs_add_star(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_mrhs_new; end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_mrhs_new_from_args(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_next(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_nl(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_nokw_param(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_op(arg); end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_opassign(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_operator_ambiguous(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_param_error(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3463 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_params(arg, _, _, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_paren(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_parse_error(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_period(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_program(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_qsymbols_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_qsymbols_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_qsymbols_new; end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_qwords_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_qwords_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_qwords_new; end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_rational(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_rbrace(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_rbracket(arg); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_redo; end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_regexp_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_regexp_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_regexp_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_regexp_literal(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_regexp_new; end - # source://prism//lib/prism/translation/ripper.rb#3461 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_rescue(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_rescue_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_rest_param(arg); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_retry; end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_return(arg); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_return0; end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_rparen(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_sclass(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_semicolon(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_sp(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_stmts_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_stmts_new; end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_string_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_string_concat(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_string_content; end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_string_dvar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_string_embexpr(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_string_literal(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_super(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_symbeg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_symbol(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_symbol_literal(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_symbols_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_symbols_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_symbols_new; end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_tlambda(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_tlambeg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_top_const_field(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_top_const_ref(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_tstring_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_tstring_content(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_tstring_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_unary(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_undef(arg); end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_unless(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_unless_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_until(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_until_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_var_alias(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_var_field(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_var_ref(arg); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_vcall(arg); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_void_stmt; end - # source://prism//lib/prism/translation/ripper.rb#3460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_when(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_while(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_while_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_word_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_word_new; end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_words_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_words_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_words_new; end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 def on_words_sep(arg); end - # source://prism//lib/prism/translation/ripper.rb#3459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_xstring_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_xstring_literal(arg); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_xstring_new; end - # source://prism//lib/prism/translation/ripper.rb#3458 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_yield(arg); end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_yield0; end - # source://prism//lib/prism/translation/ripper.rb#3457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_zsuper; end # Lazily initialize the parse result. # - # source://prism//lib/prism/translation/ripper.rb#3343 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3343 def result; end # Returns true if there is a comma between the two locations. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/ripper.rb#3352 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3352 def trailing_comma?(left, right); end # Visit one side of an alias global variable node. # - # source://prism//lib/prism/translation/ripper.rb#608 + # pkg:gem/prism#lib/prism/translation/ripper.rb:608 def visit_alias_global_variable_node_value(node); end # Visit a list of elements, like the elements of an array or arguments. # - # source://prism//lib/prism/translation/ripper.rb#794 + # pkg:gem/prism#lib/prism/translation/ripper.rb:794 def visit_arguments(elements); end # Visit the clauses of a begin node to form an on_bodystmt call. # - # source://prism//lib/prism/translation/ripper.rb#878 + # pkg:gem/prism#lib/prism/translation/ripper.rb:878 def visit_begin_node_clauses(location, node, allow_newline); end # Visit the body of a structure that can have either a set of statements # or statements wrapped in rescue/else/ensure. # - # source://prism//lib/prism/translation/ripper.rb#913 + # pkg:gem/prism#lib/prism/translation/ripper.rb:913 def visit_body_node(location, node, allow_newline = T.unsafe(nil)); end # Visit the arguments and block of a call node and return the arguments # and block as they should be used. # - # source://prism//lib/prism/translation/ripper.rb#1198 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1198 def visit_call_node_arguments(arguments_node, block_node, trailing_comma); end # Visit a constant path that is part of a write node. # - # source://prism//lib/prism/translation/ripper.rb#1546 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1546 def visit_constant_path_write_node_target(node); end # Visit a destructured positional parameter node. # - # source://prism//lib/prism/translation/ripper.rb#2681 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2681 def visit_destructured_parameter_node(node); end # Visit a string that is expressed using a <<~ heredoc. # - # source://prism//lib/prism/translation/ripper.rb#3052 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3052 def visit_heredoc_node(parts, base); end # Ripper gives back the escaped string content but strips out the common @@ -38469,34 +37427,34 @@ class Prism::Translation::Ripper < ::Prism::Compiler # work well together, so here we need to re-derive the common leading # whitespace. # - # source://prism//lib/prism/translation/ripper.rb#3027 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3027 def visit_heredoc_node_whitespace(parts); end # Visit a heredoc node that is representing a string. # - # source://prism//lib/prism/translation/ripper.rb#3098 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3098 def visit_heredoc_string_node(node); end # Visit a heredoc node that is representing an xstring. # - # source://prism//lib/prism/translation/ripper.rb#3115 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3115 def visit_heredoc_x_string_node(node); end # Visit the targets of a multi-target node. # - # source://prism//lib/prism/translation/ripper.rb#2534 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2534 def visit_multi_target_node_targets(lefts, rest, rights, skippable); end # Visit a node that represents a number. We need to explicitly handle the # unary - operator. # - # source://prism//lib/prism/translation/ripper.rb#3391 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3391 def visit_number_node(node); end # Visit a pattern within a pattern match. This is used to bypass the # parenthesis node that can be used to wrap patterns. # - # source://prism//lib/prism/translation/ripper.rb#633 + # pkg:gem/prism#lib/prism/translation/ripper.rb:633 def visit_pattern_node(node); end # Visit the list of statements of a statements node. We support nil @@ -38504,49 +37462,47 @@ class Prism::Translation::Ripper < ::Prism::Compiler # structure of the prism parse tree, but we manually add them here so that # we can mirror Ripper's void stmt. # - # source://prism//lib/prism/translation/ripper.rb#2993 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2993 def visit_statements_node_body(body); end # Visit an individual part of a string-like node. # - # source://prism//lib/prism/translation/ripper.rb#2283 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2283 def visit_string_content(part); end # Visit the string content of a particular node. This method is used to # split into the various token types. # - # source://prism//lib/prism/translation/ripper.rb#3364 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3364 def visit_token(token, allow_keywords = T.unsafe(nil)); end # Dispatch a words_sep event that contains the space between the elements # of list literals. # - # source://prism//lib/prism/translation/ripper.rb#783 + # pkg:gem/prism#lib/prism/translation/ripper.rb:783 def visit_words_sep(opening_loc, previous, current); end # Visit a node that represents a write value. This is used to handle the # special case of an implicit array that is generated without brackets. # - # source://prism//lib/prism/translation/ripper.rb#3409 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3409 def visit_write_value(node); end # Returns true if there is a semicolon between the two locations. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/ripper.rb#3357 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3357 def void_stmt?(left, right, allow_newline); end # This method is called when weak warning is produced by the parser. # +fmt+ and +args+ is printf style. # - # source://prism//lib/prism/translation/ripper.rb#3476 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3476 def warn(fmt, *args); end # This method is called when strong warning is produced by the parser. # +fmt+ and +args+ is printf style. # - # source://prism//lib/prism/translation/ripper.rb#3481 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3481 def warning(fmt, *args); end class << self @@ -38572,16 +37528,16 @@ class Prism::Translation::Ripper < ::Prism::Compiler # [[1, 12], :on_sp, " ", END ], # [[1, 13], :on_kw, "end", END ]] # - # source://prism//lib/prism/translation/ripper.rb#71 + # pkg:gem/prism#lib/prism/translation/ripper.rb:71 def lex(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end - # source://prism//lib/prism/translation/ripper.rb#463 + # pkg:gem/prism#lib/prism/translation/ripper.rb:463 def lex_state_name(state); end # Parses the given Ruby program read from +src+. # +src+ must be a String or an IO or a object with a #gets method. # - # source://prism//lib/prism/translation/ripper.rb#45 + # pkg:gem/prism#lib/prism/translation/ripper.rb:45 def parse(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end # Parses +src+ and create S-exp tree. @@ -38602,7 +37558,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]], # [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]] # - # source://prism//lib/prism/translation/ripper.rb#393 + # pkg:gem/prism#lib/prism/translation/ripper.rb:393 def sexp(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end # Parses +src+ and create S-exp tree. @@ -38628,7 +37584,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # nil, # nil]]]] # - # source://prism//lib/prism/translation/ripper.rb#428 + # pkg:gem/prism#lib/prism/translation/ripper.rb:428 def sexp_raw(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end # Tokenizes the Ruby program and returns an array of strings. @@ -38640,901 +37596,851 @@ class Prism::Translation::Ripper < ::Prism::Compiler # p Ripper.tokenize("def m(a) nil end") # # => ["def", " ", "m", "(", "a", ")", " ", "nil", " ", "end"] # - # source://prism//lib/prism/translation/ripper.rb#90 + # pkg:gem/prism#lib/prism/translation/ripper.rb:90 def tokenize(*_arg0, **_arg1, &_arg2); end end end # A list of all of the Ruby binary operators. # -# source://prism//lib/prism/translation/ripper.rb#349 +# pkg:gem/prism#lib/prism/translation/ripper.rb:349 Prism::Translation::Ripper::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) # This array contains name of all ripper events. # -# source://prism//lib/prism/translation/ripper.rb#301 +# pkg:gem/prism#lib/prism/translation/ripper.rb:301 Prism::Translation::Ripper::EVENTS = T.let(T.unsafe(nil), Array) -# source://prism//lib/prism/translation/ripper.rb#455 +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 Prism::Translation::Ripper::EXPR_ARG = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#460 +# pkg:gem/prism#lib/prism/translation/ripper.rb:460 Prism::Translation::Ripper::EXPR_ARG_ANY = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#455 +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 Prism::Translation::Ripper::EXPR_BEG = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#459 +# pkg:gem/prism#lib/prism/translation/ripper.rb:459 Prism::Translation::Ripper::EXPR_BEG_ANY = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#455 +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 Prism::Translation::Ripper::EXPR_CLASS = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#455 +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 Prism::Translation::Ripper::EXPR_CMDARG = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#455 +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 Prism::Translation::Ripper::EXPR_DOT = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#455 +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 Prism::Translation::Ripper::EXPR_END = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#455 +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 Prism::Translation::Ripper::EXPR_ENDARG = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#455 +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 Prism::Translation::Ripper::EXPR_ENDFN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#461 +# pkg:gem/prism#lib/prism/translation/ripper.rb:461 Prism::Translation::Ripper::EXPR_END_ANY = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#455 +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 Prism::Translation::Ripper::EXPR_FITEM = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#455 +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 Prism::Translation::Ripper::EXPR_FNAME = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#455 +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 Prism::Translation::Ripper::EXPR_LABEL = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#455 +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 Prism::Translation::Ripper::EXPR_LABELED = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#455 +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 Prism::Translation::Ripper::EXPR_MID = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#457 +# pkg:gem/prism#lib/prism/translation/ripper.rb:457 Prism::Translation::Ripper::EXPR_NONE = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper.rb#458 +# pkg:gem/prism#lib/prism/translation/ripper.rb:458 Prism::Translation::Ripper::EXPR_VALUE = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/ripper/filter.rb#6 +# pkg:gem/prism#lib/prism/translation/ripper/filter.rb:6 class Prism::Translation::Ripper::Filter # :stopdoc: # - # @return [Filter] a new instance of Filter - # - # source://prism//lib/prism/translation/ripper/filter.rb#8 + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:8 def initialize(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end - # source://prism//lib/prism/translation/ripper/filter.rb#23 + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:23 def column; end - # source://prism//lib/prism/translation/ripper/filter.rb#15 + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:15 def filename; end - # source://prism//lib/prism/translation/ripper/filter.rb#19 + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:19 def lineno; end - # source://prism//lib/prism/translation/ripper/filter.rb#31 + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:31 def parse(init = T.unsafe(nil)); end - # source://prism//lib/prism/translation/ripper/filter.rb#27 + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:27 def state; end private - # source://prism//lib/prism/translation/ripper/filter.rb#46 + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:46 def on_default(event, token, data); end end # A list of all of the Ruby keywords. # -# source://prism//lib/prism/translation/ripper.rb#304 +# pkg:gem/prism#lib/prism/translation/ripper.rb:304 Prism::Translation::Ripper::KEYWORDS = T.let(T.unsafe(nil), Array) # Ripper-internal bitflags. # -# source://prism//lib/prism/translation/ripper.rb#449 +# pkg:gem/prism#lib/prism/translation/ripper.rb:449 Prism::Translation::Ripper::LEX_STATE_NAMES = T.let(T.unsafe(nil), Hash) -# source://prism//lib/prism/translation/ripper/lexer.rb#10 +# pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:9 class Prism::Translation::Ripper::Lexer < ::Prism::Translation::Ripper # Pretty much just the same as Prism.lex_compat. # - # source://prism//lib/prism/translation/ripper/lexer.rb#111 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:111 def lex(raise_errors: T.unsafe(nil)); end # Returns the lex_compat result wrapped in `Elem`. Errors are omitted. # Since ripper is a streaming parser, tokens are expected to be emitted in the order # that the parser encounters them. This is not implemented. # - # source://prism//lib/prism/translation/ripper/lexer.rb#118 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:118 def parse(*_arg0, **_arg1, &_arg2); end # Similar to parse but ripper sorts the elements by position in the source. Also # includes errors. Since prism does error recovery, in cases of syntax errors # the result may differ greatly compared to ripper. # - # source://prism//lib/prism/translation/ripper/lexer.rb#127 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:127 def scan(*_arg0, **_arg1, &_arg2); end end -# source://prism//lib/prism/translation/ripper/lexer.rb#50 +# pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:50 class Prism::Translation::Ripper::Lexer::Elem - # @return [Elem] a new instance of Elem - # - # source://prism//lib/prism/translation/ripper/lexer.rb#53 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:53 def initialize(pos, event, tok, state, message = T.unsafe(nil)); end - # source://prism//lib/prism/translation/ripper/lexer.rb#61 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:61 def [](index); end - # Returns the value of attribute event. - # - # source://prism//lib/prism/translation/ripper/lexer.rb#51 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 def event; end - # Sets the attribute event - # - # @param value the value to set the attribute event to. - # - # source://prism//lib/prism/translation/ripper/lexer.rb#51 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 def event=(_arg0); end - # source://prism//lib/prism/translation/ripper/lexer.rb#78 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:78 def inspect; end - # Returns the value of attribute message. - # - # source://prism//lib/prism/translation/ripper/lexer.rb#51 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 def message; end - # Sets the attribute message - # - # @param value the value to set the attribute message to. - # - # source://prism//lib/prism/translation/ripper/lexer.rb#51 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 def message=(_arg0); end - # Returns the value of attribute pos. - # - # source://prism//lib/prism/translation/ripper/lexer.rb#51 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 def pos; end - # Sets the attribute pos - # - # @param value the value to set the attribute pos to. - # - # source://prism//lib/prism/translation/ripper/lexer.rb#51 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 def pos=(_arg0); end - # source://prism//lib/prism/translation/ripper/lexer.rb#84 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:84 def pretty_print(q); end - # Returns the value of attribute state. - # - # source://prism//lib/prism/translation/ripper/lexer.rb#51 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 def state; end - # Sets the attribute state - # - # @param value the value to set the attribute state to. - # - # source://prism//lib/prism/translation/ripper/lexer.rb#51 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 def state=(_arg0); end - # source://prism//lib/prism/translation/ripper/lexer.rb#101 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:101 def to_a; end - # source://prism//lib/prism/translation/ripper/lexer.rb#78 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:82 def to_s; end - # Returns the value of attribute tok. - # - # source://prism//lib/prism/translation/ripper/lexer.rb#51 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 def tok; end - # Sets the attribute tok - # - # @param value the value to set the attribute tok to. - # - # source://prism//lib/prism/translation/ripper/lexer.rb#51 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 def tok=(_arg0); end end # :stopdoc: # -# source://prism//lib/prism/translation/ripper/lexer.rb#11 +# pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:11 class Prism::Translation::Ripper::Lexer::State - # @return [State] a new instance of State - # - # source://prism//lib/prism/translation/ripper/lexer.rb#15 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:15 def initialize(i); end - # source://prism//lib/prism/translation/ripper/lexer.rb#36 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:36 def &(i); end - # source://prism//lib/prism/translation/ripper/lexer.rb#35 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:35 def ==(i); end - # source://prism//lib/prism/translation/ripper/lexer.rb#21 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:21 def [](index); end - # @return [Boolean] - # - # source://prism//lib/prism/translation/ripper/lexer.rb#38 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:38 def allbits?(i); end - # @return [Boolean] - # - # source://prism//lib/prism/translation/ripper/lexer.rb#39 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:39 def anybits?(i); end - # Returns the value of attribute to_s. - # - # source://prism//lib/prism/translation/ripper/lexer.rb#13 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:33 def inspect; end - # @return [Boolean] - # - # source://prism//lib/prism/translation/ripper/lexer.rb#40 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:40 def nobits?(i); end - # source://prism//lib/prism/translation/ripper/lexer.rb#34 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:34 def pretty_print(q); end - # Returns the value of attribute to_int. - # - # source://prism//lib/prism/translation/ripper/lexer.rb#13 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:32 def to_i; end - # Returns the value of attribute to_int. - # - # source://prism//lib/prism/translation/ripper/lexer.rb#13 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:13 def to_int; end - # Returns the value of attribute to_s. - # - # source://prism//lib/prism/translation/ripper/lexer.rb#13 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:13 def to_s; end - # source://prism//lib/prism/translation/ripper/lexer.rb#37 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:37 def |(i); end class << self - # source://prism//lib/prism/translation/ripper/lexer.rb#45 + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:45 def cached(i); end end end # Instances are frozen and there are only a handful of them so we cache them here. # -# source://prism//lib/prism/translation/ripper/lexer.rb#43 +# pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:43 Prism::Translation::Ripper::Lexer::State::STATES = T.let(T.unsafe(nil), Hash) # This array contains name of parser events. # -# source://prism//lib/prism/translation/ripper.rb#295 +# pkg:gem/prism#lib/prism/translation/ripper.rb:295 Prism::Translation::Ripper::PARSER_EVENTS = T.let(T.unsafe(nil), Array) # This contains a table of all of the parser events and their # corresponding arity. # -# source://prism//lib/prism/translation/ripper.rb#96 +# pkg:gem/prism#lib/prism/translation/ripper.rb:96 Prism::Translation::Ripper::PARSER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) # This array contains name of scanner events. # -# source://prism//lib/prism/translation/ripper.rb#298 +# pkg:gem/prism#lib/prism/translation/ripper.rb:298 Prism::Translation::Ripper::SCANNER_EVENTS = T.let(T.unsafe(nil), Array) # This contains a table of all of the scanner events and their # corresponding arity. # -# source://prism//lib/prism/translation/ripper.rb#239 +# pkg:gem/prism#lib/prism/translation/ripper.rb:239 Prism::Translation::Ripper::SCANNER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) # This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that # returns the arrays of [type, *children]. # -# source://prism//lib/prism/translation/ripper/sexp.rb#11 +# pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:11 class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper # :stopdoc: # - # source://prism//lib/prism/translation/ripper/sexp.rb#14 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:14 def error; end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_BEGIN(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_CHAR(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_END(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on___end__(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_alias(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_alias_error(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_aref(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_aref_field(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_arg_ambiguous(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_arg_paren(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_args_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_args_add_block(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_args_add_star(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_args_forward(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_args_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_array(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_aryptn(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_assign(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_assign_error(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_assoc_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_assoc_splat(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_assoclist_from_args(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_backref(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_backtick(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_bare_assoc_hash(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_begin(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_binary(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_block_var(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_blockarg(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_bodystmt(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_brace_block(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_break(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_call(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_case(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_class(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_class_name_error(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_comma(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_command(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_command_call(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_comment(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_const(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_const_path_field(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_const_path_ref(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_const_ref(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_cvar(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_def(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_defined(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_defs(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_do_block(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_dot2(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_dot3(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_dyna_symbol(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_else(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_elsif(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_embdoc(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_embdoc_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_embdoc_end(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_embexpr_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_embexpr_end(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_embvar(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_ensure(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_excessed_comma(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_fcall(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_field(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_float(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_fndptn(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_for(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_gvar(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_hash(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_heredoc_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_heredoc_end(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_hshptn(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_ident(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_if(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_if_mod(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_ifop(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_ignored_nl(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_ignored_sp(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_imaginary(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_in(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_int(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_ivar(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_kw(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_kwrest_param(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_label(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_label_end(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_lambda(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_lbrace(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_lbracket(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_lparen(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_magic_comment(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_massign(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_method_add_arg(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_method_add_block(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mlhs_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mlhs_add_post(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mlhs_add_star(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mlhs_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mlhs_paren(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_module(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mrhs_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mrhs_add_star(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mrhs_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mrhs_new_from_args(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_next(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_nl(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_nokw_param(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_op(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_opassign(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_operator_ambiguous(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_param_error(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_params(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_paren(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_period(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_program(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_qsymbols_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_qsymbols_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_qsymbols_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_qwords_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_qwords_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_qwords_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_rational(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_rbrace(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_rbracket(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_redo(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_regexp_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_regexp_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_regexp_end(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_regexp_literal(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_regexp_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_rescue(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_rescue_mod(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_rest_param(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_retry(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_return(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_return0(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_rparen(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_sclass(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_semicolon(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_sp(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_stmts_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_stmts_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_string_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_string_concat(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_string_content(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_string_dvar(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_string_embexpr(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_string_literal(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_super(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_symbeg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_symbol(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_symbol_literal(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_symbols_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_symbols_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_symbols_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_tlambda(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_tlambeg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_top_const_field(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_top_const_ref(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_tstring_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_tstring_content(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_tstring_end(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_unary(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_undef(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_unless(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_unless_mod(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_until(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_until_mod(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_var_alias(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_var_field(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_var_ref(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_vcall(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_void_stmt(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_when(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_while(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_while_mod(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_word_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_word_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_words_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_words_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_words_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#56 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_words_sep(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_xstring_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_xstring_literal(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_xstring_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_yield(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_yield0(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#48 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_zsuper(*args); end private - # source://prism//lib/prism/translation/ripper/sexp.rb#62 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:67 def compile_error(mesg); end - # source://prism//lib/prism/translation/ripper/sexp.rb#18 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:18 def dedent_element(e, width); end - # source://prism//lib/prism/translation/ripper/sexp.rb#62 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:62 def on_error(mesg); end - # source://prism//lib/prism/translation/ripper/sexp.rb#25 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:25 def on_heredoc_dedent(val, width); end - # source://prism//lib/prism/translation/ripper/sexp.rb#62 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_parse_error(mesg); end end @@ -39542,113 +38448,113 @@ end # returns the same values as ::Ripper::SexpBuilder except with a couple of # niceties that flatten linked lists into arrays. # -# source://prism//lib/prism/translation/ripper/sexp.rb#75 +# pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:75 class Prism::Translation::Ripper::SexpBuilderPP < ::Prism::Translation::Ripper::SexpBuilder private - # source://prism//lib/prism/translation/ripper/sexp.rb#93 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:93 def _dispatch_event_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#97 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:97 def _dispatch_event_push(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#97 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_args_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#93 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_args_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#80 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:80 def on_heredoc_dedent(val, width); end - # source://prism//lib/prism/translation/ripper/sexp.rb#97 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_mlhs_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#110 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:110 def on_mlhs_add_post(list, post); end - # source://prism//lib/prism/translation/ripper/sexp.rb#106 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:106 def on_mlhs_add_star(list, star); end - # source://prism//lib/prism/translation/ripper/sexp.rb#93 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_mlhs_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#102 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:102 def on_mlhs_paren(list); end - # source://prism//lib/prism/translation/ripper/sexp.rb#97 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_mrhs_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#93 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_mrhs_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#97 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_qsymbols_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#93 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_qsymbols_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#97 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_qwords_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#93 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_qwords_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#97 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_regexp_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#93 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_regexp_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#97 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_stmts_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#93 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_stmts_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#97 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_string_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#97 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_symbols_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#93 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_symbols_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#97 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_word_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#93 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_word_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#97 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_words_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#93 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_words_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#97 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_xstring_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#93 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_xstring_new; end end # This module is the entry-point for converting a prism syntax tree into the # seattlerb/ruby_parser gem's syntax tree. # -# source://prism//lib/prism/translation/ruby_parser.rb#20 +# pkg:gem/prism#lib/prism/translation/ruby_parser.rb:20 class Prism::Translation::RubyParser # Parse the given source and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1917 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1917 def parse(source, filepath = T.unsafe(nil)); end # Parse the given file and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1923 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1923 def parse_file(filepath); end # Parse the give file and translate it into the @@ -39656,7 +38562,7 @@ class Prism::Translation::RubyParser # provided for API compatibility to RubyParser and takes an # optional +timeout+ argument. # - # source://prism//lib/prism/translation/ruby_parser.rb#1931 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1931 def process(ruby, file = T.unsafe(nil), timeout = T.unsafe(nil)); end private @@ -39664,52 +38570,50 @@ class Prism::Translation::RubyParser # Translate the given parse result and filepath into the # seattlerb/ruby_parser gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1953 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1953 def translate(result, filepath); end class << self # Parse the given source and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1938 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1938 def parse(source, filepath = T.unsafe(nil)); end # Parse the given file and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1944 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1944 def parse_file(filepath); end end end # A prism visitor that builds Sexp objects. # -# source://prism//lib/prism/translation/ruby_parser.rb#22 +# pkg:gem/prism#lib/prism/translation/ruby_parser.rb:22 class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # Initialize a new compiler with the given file name. # - # @return [Compiler] a new instance of Compiler - # - # source://prism//lib/prism/translation/ruby_parser.rb#37 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:37 def initialize(file, in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end # This is the name of the file that we are compiling. We set it on every # Sexp object that is generated, and also use it to compile `__FILE__` # nodes. # - # source://prism//lib/prism/translation/ruby_parser.rb#26 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:26 def file; end # Class variables will change their type based on if they are inside of # a method definition or not, so we need to track that state. # - # source://prism//lib/prism/translation/ruby_parser.rb#30 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:30 def in_def; end # Some nodes will change their representation if they are inside of a # pattern, so we need to track that state. # - # source://prism//lib/prism/translation/ruby_parser.rb#34 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:34 def in_pattern; end # ``` @@ -39717,7 +38621,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#55 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:55 def visit_alias_global_variable_node(node); end # ``` @@ -39725,7 +38629,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#47 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:47 def visit_alias_method_node(node); end # ``` @@ -39733,7 +38637,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#63 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:63 def visit_alternation_pattern_node(node); end # ``` @@ -39741,7 +38645,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#71 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:71 def visit_and_node(node); end # ``` @@ -39749,7 +38653,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#128 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:128 def visit_arguments_node(node); end # ``` @@ -39757,7 +38661,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#91 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:91 def visit_array_node(node); end # ``` @@ -39765,7 +38669,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#103 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:103 def visit_array_pattern_node(node); end # ``` @@ -39773,7 +38677,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#136 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:136 def visit_assoc_node(node); end # ``` @@ -39784,7 +38688,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#147 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:147 def visit_assoc_splat_node(node); end # ``` @@ -39792,7 +38696,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#159 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:159 def visit_back_reference_read_node(node); end # ``` @@ -39800,7 +38704,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#167 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:167 def visit_begin_node(node); end # ``` @@ -39808,7 +38712,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#202 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:202 def visit_block_argument_node(node); end # ``` @@ -39816,12 +38720,12 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#212 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:212 def visit_block_local_variable_node(node); end # A block on a keyword or method call. # - # source://prism//lib/prism/translation/ruby_parser.rb#217 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:217 def visit_block_node(node); end # ``` @@ -39829,12 +38733,12 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#225 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:225 def visit_block_parameter_node(node); end # A block's parameters. # - # source://prism//lib/prism/translation/ruby_parser.rb#230 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:230 def visit_block_parameters_node(node); end # ``` @@ -39845,7 +38749,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#272 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:272 def visit_break_node(node); end # ``` @@ -39853,7 +38757,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#346 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:346 def visit_call_and_write_node(node); end # ``` @@ -39867,7 +38771,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#292 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:292 def visit_call_node(node); end # ``` @@ -39875,7 +38779,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#334 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:334 def visit_call_operator_write_node(node); end # ``` @@ -39883,7 +38787,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#358 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:358 def visit_call_or_write_node(node); end # ``` @@ -39891,7 +38795,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#383 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:383 def visit_call_target_node(node); end # ``` @@ -39899,7 +38803,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#391 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:391 def visit_capture_pattern_node(node); end # ``` @@ -39907,7 +38811,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#407 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:407 def visit_case_match_node(node); end # ``` @@ -39915,7 +38819,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#399 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:399 def visit_case_node(node); end # ``` @@ -39923,7 +38827,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#415 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:415 def visit_class_node(node); end # ``` @@ -39931,7 +38835,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#468 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:468 def visit_class_variable_and_write_node(node); end # ``` @@ -39939,7 +38843,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#460 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:460 def visit_class_variable_operator_write_node(node); end # ``` @@ -39947,7 +38851,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#476 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:476 def visit_class_variable_or_write_node(node); end # ``` @@ -39955,7 +38859,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#441 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:441 def visit_class_variable_read_node(node); end # ``` @@ -39963,7 +38867,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#484 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:484 def visit_class_variable_target_node(node); end # ``` @@ -39974,7 +38878,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^ ^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#452 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:452 def visit_class_variable_write_node(node); end # ``` @@ -39982,7 +38886,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#525 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:525 def visit_constant_and_write_node(node); end # ``` @@ -39990,7 +38894,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#517 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:517 def visit_constant_operator_write_node(node); end # ``` @@ -39998,7 +38902,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#533 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:533 def visit_constant_or_write_node(node); end # ``` @@ -40006,7 +38910,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#580 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:580 def visit_constant_path_and_write_node(node); end # ``` @@ -40014,7 +38918,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#549 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:549 def visit_constant_path_node(node); end # ``` @@ -40022,7 +38926,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#572 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:572 def visit_constant_path_operator_write_node(node); end # ``` @@ -40030,7 +38934,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#588 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:588 def visit_constant_path_or_write_node(node); end # ``` @@ -40038,7 +38942,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#596 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:596 def visit_constant_path_target_node(node); end # ``` @@ -40049,7 +38953,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^ ^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#564 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:564 def visit_constant_path_write_node(node); end # ``` @@ -40057,7 +38961,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#498 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:498 def visit_constant_read_node(node); end # ``` @@ -40065,7 +38969,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#541 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:541 def visit_constant_target_node(node); end # ``` @@ -40076,7 +38980,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^ ^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#509 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:509 def visit_constant_write_node(node); end # ``` @@ -40087,7 +38991,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#614 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:614 def visit_def_node(node); end # ``` @@ -40098,7 +39002,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#649 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:649 def visit_defined_node(node); end # ``` @@ -40106,7 +39010,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#657 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:657 def visit_else_node(node); end # ``` @@ -40114,7 +39018,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#665 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:665 def visit_embedded_statements_node(node); end # ``` @@ -40122,7 +39026,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#675 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:675 def visit_embedded_variable_node(node); end # ``` @@ -40130,7 +39034,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#683 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:683 def visit_ensure_node(node); end # ``` @@ -40138,7 +39042,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#691 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:691 def visit_false_node(node); end # ``` @@ -40146,7 +39050,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#699 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:699 def visit_find_pattern_node(node); end # ``` @@ -40154,7 +39058,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#707 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:707 def visit_flip_flop_node(node); end # ``` @@ -40162,7 +39066,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#719 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:719 def visit_float_node(node); end # ``` @@ -40170,7 +39074,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#727 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:727 def visit_for_node(node); end # ``` @@ -40178,7 +39082,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#735 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:735 def visit_forwarding_arguments_node(node); end # ``` @@ -40186,7 +39090,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#743 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:743 def visit_forwarding_parameter_node(node); end # ``` @@ -40197,7 +39101,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#754 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:754 def visit_forwarding_super_node(node); end # ``` @@ -40205,7 +39109,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#789 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:789 def visit_global_variable_and_write_node(node); end # ``` @@ -40213,7 +39117,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#781 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:781 def visit_global_variable_operator_write_node(node); end # ``` @@ -40221,7 +39125,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#797 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:797 def visit_global_variable_or_write_node(node); end # ``` @@ -40229,7 +39133,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#762 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:762 def visit_global_variable_read_node(node); end # ``` @@ -40237,7 +39141,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#805 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:805 def visit_global_variable_target_node(node); end # ``` @@ -40248,7 +39152,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#773 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:773 def visit_global_variable_write_node(node); end # ``` @@ -40256,7 +39160,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#813 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:813 def visit_hash_node(node); end # ``` @@ -40264,7 +39168,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#821 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:821 def visit_hash_pattern_node(node); end # ``` @@ -40278,12 +39182,12 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#844 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:844 def visit_if_node(node); end # 1i # - # source://prism//lib/prism/translation/ruby_parser.rb#849 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:849 def visit_imaginary_node(node); end # ``` @@ -40291,7 +39195,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#857 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:857 def visit_implicit_node(node); end # ``` @@ -40299,7 +39203,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#864 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:864 def visit_implicit_rest_node(node); end # ``` @@ -40307,7 +39211,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#871 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:871 def visit_in_node(node); end # ``` @@ -40315,7 +39219,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#901 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:901 def visit_index_and_write_node(node); end # ``` @@ -40323,7 +39227,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#886 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:886 def visit_index_operator_write_node(node); end # ``` @@ -40331,7 +39235,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#916 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:916 def visit_index_or_write_node(node); end # ``` @@ -40339,35 +39243,39 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#931 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:931 def visit_index_target_node(node); end # ``` + # @foo &&= bar # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#969 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:969 def visit_instance_variable_and_write_node(node); end # ``` + # @foo += bar # ^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#961 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:961 def visit_instance_variable_operator_write_node(node); end # ``` + # @foo ||= bar # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#977 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:977 def visit_instance_variable_or_write_node(node); end # ``` + # @foo # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#942 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:942 def visit_instance_variable_read_node(node); end # ``` @@ -40375,17 +39283,18 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#985 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:985 def visit_instance_variable_target_node(node); end # ``` + # @foo = 1 # ^^^^^^^^ # # @foo, @bar = 1 # ^^^^ ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#953 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:953 def visit_instance_variable_write_node(node); end # ``` @@ -40393,7 +39302,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#993 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:993 def visit_integer_node(node); end # ``` @@ -40401,7 +39310,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1001 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1001 def visit_interpolated_match_last_line_node(node); end # ``` @@ -40409,7 +39318,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1020 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1020 def visit_interpolated_regular_expression_node(node); end # ``` @@ -40417,7 +39326,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1037 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1037 def visit_interpolated_string_node(node); end # ``` @@ -40425,7 +39334,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1046 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1046 def visit_interpolated_symbol_node(node); end # ``` @@ -40433,7 +39342,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1055 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1055 def visit_interpolated_x_string_node(node); end # ``` @@ -40441,7 +39350,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1138 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1138 def visit_it_local_variable_read_node(node); end # ``` @@ -40449,7 +39358,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1146 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1146 def visit_keyword_hash_node(node); end # ``` @@ -40460,12 +39369,12 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1157 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1157 def visit_keyword_rest_parameter_node(node); end # -> {} # - # source://prism//lib/prism/translation/ruby_parser.rb#1162 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1162 def visit_lambda_node(node); end # ``` @@ -40473,7 +39382,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1213 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1213 def visit_local_variable_and_write_node(node); end # ``` @@ -40481,7 +39390,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1205 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1205 def visit_local_variable_operator_write_node(node); end # ``` @@ -40489,7 +39398,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1221 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1221 def visit_local_variable_or_write_node(node); end # ``` @@ -40497,7 +39406,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1182 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1182 def visit_local_variable_read_node(node); end # ``` @@ -40505,7 +39414,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1229 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1229 def visit_local_variable_target_node(node); end # ``` @@ -40516,7 +39425,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^ ^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1197 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1197 def visit_local_variable_write_node(node); end # ``` @@ -40524,7 +39433,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1237 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1237 def visit_match_last_line_node(node); end # ``` @@ -40532,7 +39441,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1245 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1245 def visit_match_predicate_node(node); end # ``` @@ -40540,7 +39449,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1253 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1253 def visit_match_required_node(node); end # ``` @@ -40548,14 +39457,14 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1261 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1261 def visit_match_write_node(node); end # A node that is missing from the syntax tree. This is only used in the # case of a syntax error. The parser gem doesn't have such a concept, so # we invent our own here. # - # source://prism//lib/prism/translation/ruby_parser.rb#1268 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1268 def visit_missing_node(node); end # ``` @@ -40563,7 +39472,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1276 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1276 def visit_module_node(node); end # ``` @@ -40571,7 +39480,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1302 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1302 def visit_multi_target_node(node); end # ``` @@ -40579,7 +39488,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1314 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1314 def visit_multi_write_node(node); end # ``` @@ -40590,7 +39499,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1340 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1340 def visit_next_node(node); end # ``` @@ -40598,7 +39507,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1355 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1355 def visit_nil_node(node); end # ``` @@ -40606,7 +39515,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1363 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1363 def visit_no_keywords_parameter_node(node); end # ``` @@ -40614,7 +39523,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1371 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1371 def visit_numbered_parameters_node(node); end # ``` @@ -40622,7 +39531,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1379 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1379 def visit_numbered_reference_read_node(node); end # ``` @@ -40630,7 +39539,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1387 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1387 def visit_optional_keyword_parameter_node(node); end # ``` @@ -40638,7 +39547,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1395 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1395 def visit_optional_parameter_node(node); end # ``` @@ -40646,7 +39555,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1403 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1403 def visit_or_node(node); end # ``` @@ -40654,7 +39563,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1423 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1423 def visit_parameters_node(node); end # ``` @@ -40665,7 +39574,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1465 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1465 def visit_parentheses_node(node); end # ``` @@ -40673,7 +39582,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1477 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1477 def visit_pinned_expression_node(node); end # ``` @@ -40681,22 +39590,22 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1485 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1485 def visit_pinned_variable_node(node); end # END {} # - # source://prism//lib/prism/translation/ruby_parser.rb#1494 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1494 def visit_post_execution_node(node); end # BEGIN {} # - # source://prism//lib/prism/translation/ruby_parser.rb#1499 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1499 def visit_pre_execution_node(node); end # The top-level program node. # - # source://prism//lib/prism/translation/ruby_parser.rb#1504 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1504 def visit_program_node(node); end # ``` @@ -40704,7 +39613,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1512 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1512 def visit_range_node(node); end # ``` @@ -40712,7 +39621,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1536 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1536 def visit_rational_node(node); end # ``` @@ -40720,7 +39629,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1544 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1544 def visit_redo_node(node); end # ``` @@ -40728,7 +39637,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1552 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1552 def visit_regular_expression_node(node); end # ``` @@ -40736,7 +39645,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1560 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1560 def visit_required_keyword_parameter_node(node); end # ``` @@ -40744,7 +39653,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1568 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1568 def visit_required_parameter_node(node); end # ``` @@ -40752,7 +39661,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1576 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1576 def visit_rescue_modifier_node(node); end # ``` @@ -40760,7 +39669,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1584 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1584 def visit_rescue_node(node); end # ``` @@ -40771,7 +39680,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1606 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1606 def visit_rest_parameter_node(node); end # ``` @@ -40779,7 +39688,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1614 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1614 def visit_retry_node(node); end # ``` @@ -40790,7 +39699,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1625 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1625 def visit_return_node(node); end # ``` @@ -40798,12 +39707,12 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1640 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1640 def visit_self_node(node); end # A shareable constant. # - # source://prism//lib/prism/translation/ruby_parser.rb#1645 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1645 def visit_shareable_constant_node(node); end # ``` @@ -40811,7 +39720,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1653 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1653 def visit_singleton_class_node(node); end # ``` @@ -40819,7 +39728,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1663 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1663 def visit_source_encoding_node(node); end # ``` @@ -40827,7 +39736,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1672 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1672 def visit_source_file_node(node); end # ``` @@ -40835,7 +39744,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1680 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1680 def visit_source_line_node(node); end # ``` @@ -40849,12 +39758,12 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1694 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1694 def visit_splat_node(node); end # A list of statements. # - # source://prism//lib/prism/translation/ruby_parser.rb#1703 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1703 def visit_statements_node(node); end # ``` @@ -40862,7 +39771,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1717 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1717 def visit_string_node(node); end # ``` @@ -40870,7 +39779,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1732 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1732 def visit_super_node(node); end # ``` @@ -40878,7 +39787,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1748 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1748 def visit_symbol_node(node); end # ``` @@ -40886,7 +39795,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1756 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1756 def visit_true_node(node); end # ``` @@ -40894,7 +39803,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1764 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1764 def visit_undef_node(node); end # ``` @@ -40905,7 +39814,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1776 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1776 def visit_unless_node(node); end # ``` @@ -40916,7 +39825,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1787 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1787 def visit_until_node(node); end # ``` @@ -40924,7 +39833,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1795 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1795 def visit_when_node(node); end # ``` @@ -40935,7 +39844,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1806 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1806 def visit_while_node(node); end # ``` @@ -40943,7 +39852,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1814 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1814 def visit_x_string_node(node); end # ``` @@ -40954,51 +39863,49 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1832 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1832 def visit_yield_node(node); end private # Attach prism comments to the given sexp. # - # source://prism//lib/prism/translation/ruby_parser.rb#1839 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1839 def attach_comments(sexp, node); end # If a class variable is written within a method definition, it has a # different type than everywhere else. # - # source://prism//lib/prism/translation/ruby_parser.rb#490 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:490 def class_variable_write_type; end # Create a new compiler with the given options. # - # source://prism//lib/prism/translation/ruby_parser.rb#1850 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1850 def copy_compiler(in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end # Call nodes with operators following them will either be op_asgn or # op_asgn2 nodes. That is determined by their call operator and their # right-hand side. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/ruby_parser.rb#369 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:369 def op_asgn?(node); end # Call nodes with operators following them can use &. as an operator, # which changes their type by prefixing "safe_". # - # source://prism//lib/prism/translation/ruby_parser.rb#375 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:375 def op_asgn_type(node, type); end # Create a new Sexp object from the given prism node and arguments. # - # source://prism//lib/prism/translation/ruby_parser.rb#1855 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1855 def s(node, *arguments); end # Visit a block node, which will modify the AST by wrapping the given # visited node in an iter node. # - # source://prism//lib/prism/translation/ruby_parser.rb#1865 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1865 def visit_block(node, sexp, block); end # ``` @@ -41006,30 +39913,30 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # ^^^^^^^^^^ # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1440 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1440 def visit_destructured_parameter(node); end # Visit the interpolated content of the string-like node. # - # source://prism//lib/prism/translation/ruby_parser.rb#1062 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1062 def visit_interpolated_parts(parts); end # Pattern constants get wrapped in another layer of :const. # - # source://prism//lib/prism/translation/ruby_parser.rb#1886 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1886 def visit_pattern_constant(node); end # If the bounds of a range node are empty parentheses, then they do not # get replaced by their usual s(:nil), but instead are s(:begin). # - # source://prism//lib/prism/translation/ruby_parser.rb#1524 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1524 def visit_range_bounds_node(node); end # Visit the value of a write, which will be on the right-hand side of # a write operator. Because implicit arrays can have splats, those could # potentially be wrapped in an svalue node. # - # source://prism//lib/prism/translation/ruby_parser.rb#1900 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1900 def visit_write_value(node); end end @@ -41038,68 +39945,65 @@ end # true # ^^^^ # -# source://prism//lib/prism/node.rb#18630 +# pkg:gem/prism#lib/prism/node.rb:18630 class Prism::TrueNode < ::Prism::Node # Initialize a new TrueNode node. # - # @return [TrueNode] a new instance of TrueNode - # - # source://prism//lib/prism/node.rb#18632 + # pkg:gem/prism#lib/prism/node.rb:18632 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18695 + # pkg:gem/prism#lib/prism/node.rb:18695 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18640 + # pkg:gem/prism#lib/prism/node.rb:18640 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18645 + # pkg:gem/prism#lib/prism/node.rb:18645 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18661 + # pkg:gem/prism#lib/prism/node.rb:18661 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18656 + # pkg:gem/prism#lib/prism/node.rb:18656 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> TrueNode # - # source://prism//lib/prism/node.rb#18666 + # pkg:gem/prism#lib/prism/node.rb:18666 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::TrueNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18645 + # pkg:gem/prism#lib/prism/node.rb:18671 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#18674 + # pkg:gem/prism#lib/prism/node.rb:18674 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#18650 + # pkg:gem/prism#lib/prism/node.rb:18650 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -41107,20 +40011,20 @@ class Prism::TrueNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18679 + # pkg:gem/prism#lib/prism/node.rb:18679 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18684 + # pkg:gem/prism#lib/prism/node.rb:18684 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18689 + # pkg:gem/prism#lib/prism/node.rb:18689 def type; end end end @@ -41130,13 +40034,11 @@ end # undef :foo, :bar, :baz # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18704 +# pkg:gem/prism#lib/prism/node.rb:18704 class Prism::UndefNode < ::Prism::Node # Initialize a new UndefNode node. # - # @return [UndefNode] a new instance of UndefNode - # - # source://prism//lib/prism/node.rb#18706 + # pkg:gem/prism#lib/prism/node.rb:18706 sig do params( source: Prism::Source, @@ -41152,36 +40054,36 @@ class Prism::UndefNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18793 + # pkg:gem/prism#lib/prism/node.rb:18793 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18716 + # pkg:gem/prism#lib/prism/node.rb:18716 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18721 + # pkg:gem/prism#lib/prism/node.rb:18721 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18738 + # pkg:gem/prism#lib/prism/node.rb:18738 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18733 + # pkg:gem/prism#lib/prism/node.rb:18733 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location) -> UndefNode # - # source://prism//lib/prism/node.rb#18743 + # pkg:gem/prism#lib/prism/node.rb:18743 sig do params( node_id: Integer, @@ -41193,22 +40095,21 @@ class Prism::UndefNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18721 + # pkg:gem/prism#lib/prism/node.rb:18748 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location } # - # source://prism//lib/prism/node.rb#18751 + # pkg:gem/prism#lib/prism/node.rb:18751 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#18726 + # pkg:gem/prism#lib/prism/node.rb:18726 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -41216,44 +40117,44 @@ class Prism::UndefNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18777 + # pkg:gem/prism#lib/prism/node.rb:18777 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18772 + # pkg:gem/prism#lib/prism/node.rb:18772 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18759 + # pkg:gem/prism#lib/prism/node.rb:18759 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] # - # source://prism//lib/prism/node.rb#18756 + # pkg:gem/prism#lib/prism/node.rb:18756 sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } def names; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18767 + # pkg:gem/prism#lib/prism/node.rb:18767 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18782 + # pkg:gem/prism#lib/prism/node.rb:18782 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18787 + # pkg:gem/prism#lib/prism/node.rb:18787 def type; end end end @@ -41266,13 +40167,11 @@ end # unless foo then bar end # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18808 +# pkg:gem/prism#lib/prism/node.rb:18808 class Prism::UnlessNode < ::Prism::Node # Initialize a new UnlessNode node. # - # @return [UnlessNode] a new instance of UnlessNode - # - # source://prism//lib/prism/node.rb#18810 + # pkg:gem/prism#lib/prism/node.rb:18810 sig do params( source: Prism::Source, @@ -41292,42 +40191,42 @@ class Prism::UnlessNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18986 + # pkg:gem/prism#lib/prism/node.rb:18986 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18824 + # pkg:gem/prism#lib/prism/node.rb:18824 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18829 + # pkg:gem/prism#lib/prism/node.rb:18829 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18852 + # pkg:gem/prism#lib/prism/node.rb:18852 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18843 + # pkg:gem/prism#lib/prism/node.rb:18843 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # Returns the else clause of the unless node. This method is deprecated in # favor of #else_clause. # - # source://prism//lib/prism/node_ext.rb#506 + # pkg:gem/prism#lib/prism/node_ext.rb:506 def consequent; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?else_clause: ElseNode?, ?end_keyword_loc: Location?) -> UnlessNode # - # source://prism//lib/prism/node.rb#18857 + # pkg:gem/prism#lib/prism/node.rb:18857 sig do params( node_id: Integer, @@ -41343,24 +40242,21 @@ class Prism::UnlessNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18829 + # pkg:gem/prism#lib/prism/node.rb:18862 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, else_clause: ElseNode?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#18865 + # pkg:gem/prism#lib/prism/node.rb:18865 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [predicate] - # - # source://prism//lib/prism/node.rb#18834 + # pkg:gem/prism#lib/prism/node.rb:18834 def each_child_node; end # The else clause of the unless expression, if present. @@ -41368,13 +40264,13 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar else baz end # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#18930 + # pkg:gem/prism#lib/prism/node.rb:18930 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18965 + # pkg:gem/prism#lib/prism/node.rb:18965 sig { returns(T.nilable(String)) } def end_keyword; end @@ -41383,7 +40279,7 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism//lib/prism/node.rb#18936 + # pkg:gem/prism#lib/prism/node.rb:18936 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -41392,13 +40288,13 @@ class Prism::UnlessNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18970 + # pkg:gem/prism#lib/prism/node.rb:18970 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18955 + # pkg:gem/prism#lib/prism/node.rb:18955 sig { returns(String) } def keyword; end @@ -41410,11 +40306,11 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^^^ # - # source://prism//lib/prism/node.rb#18876 + # pkg:gem/prism#lib/prism/node.rb:18876 sig { returns(Prism::Location) } def keyword_loc; end - # source://prism//lib/prism/parse_result/newlines.rb#98 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:98 def newline_flag!(lines); end # The condition to be evaluated for the unless expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). @@ -41425,26 +40321,26 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^ # - # source://prism//lib/prism/node.rb#18895 + # pkg:gem/prism#lib/prism/node.rb:18895 sig { returns(Prism::Node) } def predicate; end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18950 + # pkg:gem/prism#lib/prism/node.rb:18950 def save_end_keyword_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18884 + # pkg:gem/prism#lib/prism/node.rb:18884 def save_keyword_loc(repository); end # Save the then_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18915 + # pkg:gem/prism#lib/prism/node.rb:18915 def save_then_keyword_loc(repository); end # The body of statements that will executed if the unless condition is @@ -41453,13 +40349,13 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism//lib/prism/node.rb#18924 + # pkg:gem/prism#lib/prism/node.rb:18924 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18960 + # pkg:gem/prism#lib/prism/node.rb:18960 sig { returns(T.nilable(String)) } def then_keyword; end @@ -41468,20 +40364,20 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^^ # - # source://prism//lib/prism/node.rb#18901 + # pkg:gem/prism#lib/prism/node.rb:18901 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18975 + # pkg:gem/prism#lib/prism/node.rb:18975 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18980 + # pkg:gem/prism#lib/prism/node.rb:18980 def type; end end end @@ -41494,13 +40390,11 @@ end # until foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#19004 +# pkg:gem/prism#lib/prism/node.rb:19004 class Prism::UntilNode < ::Prism::Node # Initialize a new UntilNode node. # - # @return [UntilNode] a new instance of UntilNode - # - # source://prism//lib/prism/node.rb#19006 + # pkg:gem/prism#lib/prism/node.rb:19006 sig do params( source: Prism::Source, @@ -41519,56 +40413,54 @@ class Prism::UntilNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19156 + # pkg:gem/prism#lib/prism/node.rb:19156 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19019 + # pkg:gem/prism#lib/prism/node.rb:19019 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_modifier?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#19063 + # pkg:gem/prism#lib/prism/node.rb:19063 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19024 + # pkg:gem/prism#lib/prism/node.rb:19024 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#19135 + # pkg:gem/prism#lib/prism/node.rb:19135 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#19100 + # pkg:gem/prism#lib/prism/node.rb:19100 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19045 + # pkg:gem/prism#lib/prism/node.rb:19045 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19037 + # pkg:gem/prism#lib/prism/node.rb:19037 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?do_keyword_loc: Location?, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> UntilNode # - # source://prism//lib/prism/node.rb#19050 + # pkg:gem/prism#lib/prism/node.rb:19050 sig do params( node_id: Integer, @@ -41583,36 +40475,33 @@ class Prism::UntilNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19024 + # pkg:gem/prism#lib/prism/node.rb:19055 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, do_keyword_loc: Location?, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } # - # source://prism//lib/prism/node.rb#19058 + # pkg:gem/prism#lib/prism/node.rb:19058 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def do_keyword: () -> String? # - # source://prism//lib/prism/node.rb#19130 + # pkg:gem/prism#lib/prism/node.rb:19130 sig { returns(T.nilable(String)) } def do_keyword; end # attr_reader do_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#19081 + # pkg:gem/prism#lib/prism/node.rb:19081 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [predicate] - # - # source://prism//lib/prism/node.rb#19029 + # pkg:gem/prism#lib/prism/node.rb:19029 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -41620,65 +40509,65 @@ class Prism::UntilNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#19140 + # pkg:gem/prism#lib/prism/node.rb:19140 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19125 + # pkg:gem/prism#lib/prism/node.rb:19125 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19068 + # pkg:gem/prism#lib/prism/node.rb:19068 sig { returns(Prism::Location) } def keyword_loc; end - # source://prism//lib/prism/parse_result/newlines.rb#104 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:104 def newline_flag!(lines); end # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#19119 + # pkg:gem/prism#lib/prism/node.rb:19119 sig { returns(Prism::Node) } def predicate; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19114 + # pkg:gem/prism#lib/prism/node.rb:19114 def save_closing_loc(repository); end # Save the do_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19095 + # pkg:gem/prism#lib/prism/node.rb:19095 def save_do_keyword_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19076 + # pkg:gem/prism#lib/prism/node.rb:19076 def save_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#19122 + # pkg:gem/prism#lib/prism/node.rb:19122 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#19145 + # pkg:gem/prism#lib/prism/node.rb:19145 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#19150 + # pkg:gem/prism#lib/prism/node.rb:19150 def type; end end end @@ -41705,911 +40594,911 @@ Prism::VERSION = T.let(T.unsafe(nil), String) # end # end # -# source://prism//lib/prism/visitor.rb#57 +# pkg:gem/prism#lib/prism/visitor.rb:57 class Prism::Visitor < ::Prism::BasicVisitor # Visit a AliasGlobalVariableNode node # - # source://prism//lib/prism/visitor.rb#59 + # pkg:gem/prism#lib/prism/visitor.rb:59 sig { params(node: Prism::AliasGlobalVariableNode).void } def visit_alias_global_variable_node(node); end # Visit a AliasMethodNode node # - # source://prism//lib/prism/visitor.rb#64 + # pkg:gem/prism#lib/prism/visitor.rb:64 sig { params(node: Prism::AliasMethodNode).void } def visit_alias_method_node(node); end # Visit a AlternationPatternNode node # - # source://prism//lib/prism/visitor.rb#69 + # pkg:gem/prism#lib/prism/visitor.rb:69 sig { params(node: Prism::AlternationPatternNode).void } def visit_alternation_pattern_node(node); end # Visit a AndNode node # - # source://prism//lib/prism/visitor.rb#74 + # pkg:gem/prism#lib/prism/visitor.rb:74 sig { params(node: Prism::AndNode).void } def visit_and_node(node); end # Visit a ArgumentsNode node # - # source://prism//lib/prism/visitor.rb#79 + # pkg:gem/prism#lib/prism/visitor.rb:79 sig { params(node: Prism::ArgumentsNode).void } def visit_arguments_node(node); end # Visit a ArrayNode node # - # source://prism//lib/prism/visitor.rb#84 + # pkg:gem/prism#lib/prism/visitor.rb:84 sig { params(node: Prism::ArrayNode).void } def visit_array_node(node); end # Visit a ArrayPatternNode node # - # source://prism//lib/prism/visitor.rb#89 + # pkg:gem/prism#lib/prism/visitor.rb:89 sig { params(node: Prism::ArrayPatternNode).void } def visit_array_pattern_node(node); end # Visit a AssocNode node # - # source://prism//lib/prism/visitor.rb#94 + # pkg:gem/prism#lib/prism/visitor.rb:94 sig { params(node: Prism::AssocNode).void } def visit_assoc_node(node); end # Visit a AssocSplatNode node # - # source://prism//lib/prism/visitor.rb#99 + # pkg:gem/prism#lib/prism/visitor.rb:99 sig { params(node: Prism::AssocSplatNode).void } def visit_assoc_splat_node(node); end # Visit a BackReferenceReadNode node # - # source://prism//lib/prism/visitor.rb#104 + # pkg:gem/prism#lib/prism/visitor.rb:104 sig { params(node: Prism::BackReferenceReadNode).void } def visit_back_reference_read_node(node); end # Visit a BeginNode node # - # source://prism//lib/prism/visitor.rb#109 + # pkg:gem/prism#lib/prism/visitor.rb:109 sig { params(node: Prism::BeginNode).void } def visit_begin_node(node); end # Visit a BlockArgumentNode node # - # source://prism//lib/prism/visitor.rb#114 + # pkg:gem/prism#lib/prism/visitor.rb:114 sig { params(node: Prism::BlockArgumentNode).void } def visit_block_argument_node(node); end # Visit a BlockLocalVariableNode node # - # source://prism//lib/prism/visitor.rb#119 + # pkg:gem/prism#lib/prism/visitor.rb:119 sig { params(node: Prism::BlockLocalVariableNode).void } def visit_block_local_variable_node(node); end # Visit a BlockNode node # - # source://prism//lib/prism/visitor.rb#124 + # pkg:gem/prism#lib/prism/visitor.rb:124 sig { params(node: Prism::BlockNode).void } def visit_block_node(node); end # Visit a BlockParameterNode node # - # source://prism//lib/prism/visitor.rb#129 + # pkg:gem/prism#lib/prism/visitor.rb:129 sig { params(node: Prism::BlockParameterNode).void } def visit_block_parameter_node(node); end # Visit a BlockParametersNode node # - # source://prism//lib/prism/visitor.rb#134 + # pkg:gem/prism#lib/prism/visitor.rb:134 sig { params(node: Prism::BlockParametersNode).void } def visit_block_parameters_node(node); end # Visit a BreakNode node # - # source://prism//lib/prism/visitor.rb#139 + # pkg:gem/prism#lib/prism/visitor.rb:139 sig { params(node: Prism::BreakNode).void } def visit_break_node(node); end # Visit a CallAndWriteNode node # - # source://prism//lib/prism/visitor.rb#144 + # pkg:gem/prism#lib/prism/visitor.rb:144 sig { params(node: Prism::CallAndWriteNode).void } def visit_call_and_write_node(node); end # Visit a CallNode node # - # source://prism//lib/prism/visitor.rb#149 + # pkg:gem/prism#lib/prism/visitor.rb:149 sig { params(node: Prism::CallNode).void } def visit_call_node(node); end # Visit a CallOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#154 + # pkg:gem/prism#lib/prism/visitor.rb:154 sig { params(node: Prism::CallOperatorWriteNode).void } def visit_call_operator_write_node(node); end # Visit a CallOrWriteNode node # - # source://prism//lib/prism/visitor.rb#159 + # pkg:gem/prism#lib/prism/visitor.rb:159 sig { params(node: Prism::CallOrWriteNode).void } def visit_call_or_write_node(node); end # Visit a CallTargetNode node # - # source://prism//lib/prism/visitor.rb#164 + # pkg:gem/prism#lib/prism/visitor.rb:164 sig { params(node: Prism::CallTargetNode).void } def visit_call_target_node(node); end # Visit a CapturePatternNode node # - # source://prism//lib/prism/visitor.rb#169 + # pkg:gem/prism#lib/prism/visitor.rb:169 sig { params(node: Prism::CapturePatternNode).void } def visit_capture_pattern_node(node); end # Visit a CaseMatchNode node # - # source://prism//lib/prism/visitor.rb#174 + # pkg:gem/prism#lib/prism/visitor.rb:174 sig { params(node: Prism::CaseMatchNode).void } def visit_case_match_node(node); end # Visit a CaseNode node # - # source://prism//lib/prism/visitor.rb#179 + # pkg:gem/prism#lib/prism/visitor.rb:179 sig { params(node: Prism::CaseNode).void } def visit_case_node(node); end # Visit a ClassNode node # - # source://prism//lib/prism/visitor.rb#184 + # pkg:gem/prism#lib/prism/visitor.rb:184 sig { params(node: Prism::ClassNode).void } def visit_class_node(node); end # Visit a ClassVariableAndWriteNode node # - # source://prism//lib/prism/visitor.rb#189 + # pkg:gem/prism#lib/prism/visitor.rb:189 sig { params(node: Prism::ClassVariableAndWriteNode).void } def visit_class_variable_and_write_node(node); end # Visit a ClassVariableOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#194 + # pkg:gem/prism#lib/prism/visitor.rb:194 sig { params(node: Prism::ClassVariableOperatorWriteNode).void } def visit_class_variable_operator_write_node(node); end # Visit a ClassVariableOrWriteNode node # - # source://prism//lib/prism/visitor.rb#199 + # pkg:gem/prism#lib/prism/visitor.rb:199 sig { params(node: Prism::ClassVariableOrWriteNode).void } def visit_class_variable_or_write_node(node); end # Visit a ClassVariableReadNode node # - # source://prism//lib/prism/visitor.rb#204 + # pkg:gem/prism#lib/prism/visitor.rb:204 sig { params(node: Prism::ClassVariableReadNode).void } def visit_class_variable_read_node(node); end # Visit a ClassVariableTargetNode node # - # source://prism//lib/prism/visitor.rb#209 + # pkg:gem/prism#lib/prism/visitor.rb:209 sig { params(node: Prism::ClassVariableTargetNode).void } def visit_class_variable_target_node(node); end # Visit a ClassVariableWriteNode node # - # source://prism//lib/prism/visitor.rb#214 + # pkg:gem/prism#lib/prism/visitor.rb:214 sig { params(node: Prism::ClassVariableWriteNode).void } def visit_class_variable_write_node(node); end # Visit a ConstantAndWriteNode node # - # source://prism//lib/prism/visitor.rb#219 + # pkg:gem/prism#lib/prism/visitor.rb:219 sig { params(node: Prism::ConstantAndWriteNode).void } def visit_constant_and_write_node(node); end # Visit a ConstantOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#224 + # pkg:gem/prism#lib/prism/visitor.rb:224 sig { params(node: Prism::ConstantOperatorWriteNode).void } def visit_constant_operator_write_node(node); end # Visit a ConstantOrWriteNode node # - # source://prism//lib/prism/visitor.rb#229 + # pkg:gem/prism#lib/prism/visitor.rb:229 sig { params(node: Prism::ConstantOrWriteNode).void } def visit_constant_or_write_node(node); end # Visit a ConstantPathAndWriteNode node # - # source://prism//lib/prism/visitor.rb#234 + # pkg:gem/prism#lib/prism/visitor.rb:234 sig { params(node: Prism::ConstantPathAndWriteNode).void } def visit_constant_path_and_write_node(node); end # Visit a ConstantPathNode node # - # source://prism//lib/prism/visitor.rb#239 + # pkg:gem/prism#lib/prism/visitor.rb:239 sig { params(node: Prism::ConstantPathNode).void } def visit_constant_path_node(node); end # Visit a ConstantPathOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#244 + # pkg:gem/prism#lib/prism/visitor.rb:244 sig { params(node: Prism::ConstantPathOperatorWriteNode).void } def visit_constant_path_operator_write_node(node); end # Visit a ConstantPathOrWriteNode node # - # source://prism//lib/prism/visitor.rb#249 + # pkg:gem/prism#lib/prism/visitor.rb:249 sig { params(node: Prism::ConstantPathOrWriteNode).void } def visit_constant_path_or_write_node(node); end # Visit a ConstantPathTargetNode node # - # source://prism//lib/prism/visitor.rb#254 + # pkg:gem/prism#lib/prism/visitor.rb:254 sig { params(node: Prism::ConstantPathTargetNode).void } def visit_constant_path_target_node(node); end # Visit a ConstantPathWriteNode node # - # source://prism//lib/prism/visitor.rb#259 + # pkg:gem/prism#lib/prism/visitor.rb:259 sig { params(node: Prism::ConstantPathWriteNode).void } def visit_constant_path_write_node(node); end # Visit a ConstantReadNode node # - # source://prism//lib/prism/visitor.rb#264 + # pkg:gem/prism#lib/prism/visitor.rb:264 sig { params(node: Prism::ConstantReadNode).void } def visit_constant_read_node(node); end # Visit a ConstantTargetNode node # - # source://prism//lib/prism/visitor.rb#269 + # pkg:gem/prism#lib/prism/visitor.rb:269 sig { params(node: Prism::ConstantTargetNode).void } def visit_constant_target_node(node); end # Visit a ConstantWriteNode node # - # source://prism//lib/prism/visitor.rb#274 + # pkg:gem/prism#lib/prism/visitor.rb:274 sig { params(node: Prism::ConstantWriteNode).void } def visit_constant_write_node(node); end # Visit a DefNode node # - # source://prism//lib/prism/visitor.rb#279 + # pkg:gem/prism#lib/prism/visitor.rb:279 sig { params(node: Prism::DefNode).void } def visit_def_node(node); end # Visit a DefinedNode node # - # source://prism//lib/prism/visitor.rb#284 + # pkg:gem/prism#lib/prism/visitor.rb:284 sig { params(node: Prism::DefinedNode).void } def visit_defined_node(node); end # Visit a ElseNode node # - # source://prism//lib/prism/visitor.rb#289 + # pkg:gem/prism#lib/prism/visitor.rb:289 sig { params(node: Prism::ElseNode).void } def visit_else_node(node); end # Visit a EmbeddedStatementsNode node # - # source://prism//lib/prism/visitor.rb#294 + # pkg:gem/prism#lib/prism/visitor.rb:294 sig { params(node: Prism::EmbeddedStatementsNode).void } def visit_embedded_statements_node(node); end # Visit a EmbeddedVariableNode node # - # source://prism//lib/prism/visitor.rb#299 + # pkg:gem/prism#lib/prism/visitor.rb:299 sig { params(node: Prism::EmbeddedVariableNode).void } def visit_embedded_variable_node(node); end # Visit a EnsureNode node # - # source://prism//lib/prism/visitor.rb#304 + # pkg:gem/prism#lib/prism/visitor.rb:304 sig { params(node: Prism::EnsureNode).void } def visit_ensure_node(node); end # Visit a FalseNode node # - # source://prism//lib/prism/visitor.rb#309 + # pkg:gem/prism#lib/prism/visitor.rb:309 sig { params(node: Prism::FalseNode).void } def visit_false_node(node); end # Visit a FindPatternNode node # - # source://prism//lib/prism/visitor.rb#314 + # pkg:gem/prism#lib/prism/visitor.rb:314 sig { params(node: Prism::FindPatternNode).void } def visit_find_pattern_node(node); end # Visit a FlipFlopNode node # - # source://prism//lib/prism/visitor.rb#319 + # pkg:gem/prism#lib/prism/visitor.rb:319 sig { params(node: Prism::FlipFlopNode).void } def visit_flip_flop_node(node); end # Visit a FloatNode node # - # source://prism//lib/prism/visitor.rb#324 + # pkg:gem/prism#lib/prism/visitor.rb:324 sig { params(node: Prism::FloatNode).void } def visit_float_node(node); end # Visit a ForNode node # - # source://prism//lib/prism/visitor.rb#329 + # pkg:gem/prism#lib/prism/visitor.rb:329 sig { params(node: Prism::ForNode).void } def visit_for_node(node); end # Visit a ForwardingArgumentsNode node # - # source://prism//lib/prism/visitor.rb#334 + # pkg:gem/prism#lib/prism/visitor.rb:334 sig { params(node: Prism::ForwardingArgumentsNode).void } def visit_forwarding_arguments_node(node); end # Visit a ForwardingParameterNode node # - # source://prism//lib/prism/visitor.rb#339 + # pkg:gem/prism#lib/prism/visitor.rb:339 sig { params(node: Prism::ForwardingParameterNode).void } def visit_forwarding_parameter_node(node); end # Visit a ForwardingSuperNode node # - # source://prism//lib/prism/visitor.rb#344 + # pkg:gem/prism#lib/prism/visitor.rb:344 sig { params(node: Prism::ForwardingSuperNode).void } def visit_forwarding_super_node(node); end # Visit a GlobalVariableAndWriteNode node # - # source://prism//lib/prism/visitor.rb#349 + # pkg:gem/prism#lib/prism/visitor.rb:349 sig { params(node: Prism::GlobalVariableAndWriteNode).void } def visit_global_variable_and_write_node(node); end # Visit a GlobalVariableOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#354 + # pkg:gem/prism#lib/prism/visitor.rb:354 sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } def visit_global_variable_operator_write_node(node); end # Visit a GlobalVariableOrWriteNode node # - # source://prism//lib/prism/visitor.rb#359 + # pkg:gem/prism#lib/prism/visitor.rb:359 sig { params(node: Prism::GlobalVariableOrWriteNode).void } def visit_global_variable_or_write_node(node); end # Visit a GlobalVariableReadNode node # - # source://prism//lib/prism/visitor.rb#364 + # pkg:gem/prism#lib/prism/visitor.rb:364 sig { params(node: Prism::GlobalVariableReadNode).void } def visit_global_variable_read_node(node); end # Visit a GlobalVariableTargetNode node # - # source://prism//lib/prism/visitor.rb#369 + # pkg:gem/prism#lib/prism/visitor.rb:369 sig { params(node: Prism::GlobalVariableTargetNode).void } def visit_global_variable_target_node(node); end # Visit a GlobalVariableWriteNode node # - # source://prism//lib/prism/visitor.rb#374 + # pkg:gem/prism#lib/prism/visitor.rb:374 sig { params(node: Prism::GlobalVariableWriteNode).void } def visit_global_variable_write_node(node); end # Visit a HashNode node # - # source://prism//lib/prism/visitor.rb#379 + # pkg:gem/prism#lib/prism/visitor.rb:379 sig { params(node: Prism::HashNode).void } def visit_hash_node(node); end # Visit a HashPatternNode node # - # source://prism//lib/prism/visitor.rb#384 + # pkg:gem/prism#lib/prism/visitor.rb:384 sig { params(node: Prism::HashPatternNode).void } def visit_hash_pattern_node(node); end # Visit a IfNode node # - # source://prism//lib/prism/visitor.rb#389 + # pkg:gem/prism#lib/prism/visitor.rb:389 sig { params(node: Prism::IfNode).void } def visit_if_node(node); end # Visit a ImaginaryNode node # - # source://prism//lib/prism/visitor.rb#394 + # pkg:gem/prism#lib/prism/visitor.rb:394 sig { params(node: Prism::ImaginaryNode).void } def visit_imaginary_node(node); end # Visit a ImplicitNode node # - # source://prism//lib/prism/visitor.rb#399 + # pkg:gem/prism#lib/prism/visitor.rb:399 sig { params(node: Prism::ImplicitNode).void } def visit_implicit_node(node); end # Visit a ImplicitRestNode node # - # source://prism//lib/prism/visitor.rb#404 + # pkg:gem/prism#lib/prism/visitor.rb:404 sig { params(node: Prism::ImplicitRestNode).void } def visit_implicit_rest_node(node); end # Visit a InNode node # - # source://prism//lib/prism/visitor.rb#409 + # pkg:gem/prism#lib/prism/visitor.rb:409 sig { params(node: Prism::InNode).void } def visit_in_node(node); end # Visit a IndexAndWriteNode node # - # source://prism//lib/prism/visitor.rb#414 + # pkg:gem/prism#lib/prism/visitor.rb:414 sig { params(node: Prism::IndexAndWriteNode).void } def visit_index_and_write_node(node); end # Visit a IndexOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#419 + # pkg:gem/prism#lib/prism/visitor.rb:419 sig { params(node: Prism::IndexOperatorWriteNode).void } def visit_index_operator_write_node(node); end # Visit a IndexOrWriteNode node # - # source://prism//lib/prism/visitor.rb#424 + # pkg:gem/prism#lib/prism/visitor.rb:424 sig { params(node: Prism::IndexOrWriteNode).void } def visit_index_or_write_node(node); end # Visit a IndexTargetNode node # - # source://prism//lib/prism/visitor.rb#429 + # pkg:gem/prism#lib/prism/visitor.rb:429 sig { params(node: Prism::IndexTargetNode).void } def visit_index_target_node(node); end # Visit a InstanceVariableAndWriteNode node # - # source://prism//lib/prism/visitor.rb#434 + # pkg:gem/prism#lib/prism/visitor.rb:434 sig { params(node: Prism::InstanceVariableAndWriteNode).void } def visit_instance_variable_and_write_node(node); end # Visit a InstanceVariableOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#439 + # pkg:gem/prism#lib/prism/visitor.rb:439 sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } def visit_instance_variable_operator_write_node(node); end # Visit a InstanceVariableOrWriteNode node # - # source://prism//lib/prism/visitor.rb#444 + # pkg:gem/prism#lib/prism/visitor.rb:444 sig { params(node: Prism::InstanceVariableOrWriteNode).void } def visit_instance_variable_or_write_node(node); end # Visit a InstanceVariableReadNode node # - # source://prism//lib/prism/visitor.rb#449 + # pkg:gem/prism#lib/prism/visitor.rb:449 sig { params(node: Prism::InstanceVariableReadNode).void } def visit_instance_variable_read_node(node); end # Visit a InstanceVariableTargetNode node # - # source://prism//lib/prism/visitor.rb#454 + # pkg:gem/prism#lib/prism/visitor.rb:454 sig { params(node: Prism::InstanceVariableTargetNode).void } def visit_instance_variable_target_node(node); end # Visit a InstanceVariableWriteNode node # - # source://prism//lib/prism/visitor.rb#459 + # pkg:gem/prism#lib/prism/visitor.rb:459 sig { params(node: Prism::InstanceVariableWriteNode).void } def visit_instance_variable_write_node(node); end # Visit a IntegerNode node # - # source://prism//lib/prism/visitor.rb#464 + # pkg:gem/prism#lib/prism/visitor.rb:464 sig { params(node: Prism::IntegerNode).void } def visit_integer_node(node); end # Visit a InterpolatedMatchLastLineNode node # - # source://prism//lib/prism/visitor.rb#469 + # pkg:gem/prism#lib/prism/visitor.rb:469 sig { params(node: Prism::InterpolatedMatchLastLineNode).void } def visit_interpolated_match_last_line_node(node); end # Visit a InterpolatedRegularExpressionNode node # - # source://prism//lib/prism/visitor.rb#474 + # pkg:gem/prism#lib/prism/visitor.rb:474 sig { params(node: Prism::InterpolatedRegularExpressionNode).void } def visit_interpolated_regular_expression_node(node); end # Visit a InterpolatedStringNode node # - # source://prism//lib/prism/visitor.rb#479 + # pkg:gem/prism#lib/prism/visitor.rb:479 sig { params(node: Prism::InterpolatedStringNode).void } def visit_interpolated_string_node(node); end # Visit a InterpolatedSymbolNode node # - # source://prism//lib/prism/visitor.rb#484 + # pkg:gem/prism#lib/prism/visitor.rb:484 sig { params(node: Prism::InterpolatedSymbolNode).void } def visit_interpolated_symbol_node(node); end # Visit a InterpolatedXStringNode node # - # source://prism//lib/prism/visitor.rb#489 + # pkg:gem/prism#lib/prism/visitor.rb:489 sig { params(node: Prism::InterpolatedXStringNode).void } def visit_interpolated_x_string_node(node); end # Visit a ItLocalVariableReadNode node # - # source://prism//lib/prism/visitor.rb#494 + # pkg:gem/prism#lib/prism/visitor.rb:494 sig { params(node: Prism::ItLocalVariableReadNode).void } def visit_it_local_variable_read_node(node); end # Visit a ItParametersNode node # - # source://prism//lib/prism/visitor.rb#499 + # pkg:gem/prism#lib/prism/visitor.rb:499 sig { params(node: Prism::ItParametersNode).void } def visit_it_parameters_node(node); end # Visit a KeywordHashNode node # - # source://prism//lib/prism/visitor.rb#504 + # pkg:gem/prism#lib/prism/visitor.rb:504 sig { params(node: Prism::KeywordHashNode).void } def visit_keyword_hash_node(node); end # Visit a KeywordRestParameterNode node # - # source://prism//lib/prism/visitor.rb#509 + # pkg:gem/prism#lib/prism/visitor.rb:509 sig { params(node: Prism::KeywordRestParameterNode).void } def visit_keyword_rest_parameter_node(node); end # Visit a LambdaNode node # - # source://prism//lib/prism/visitor.rb#514 + # pkg:gem/prism#lib/prism/visitor.rb:514 sig { params(node: Prism::LambdaNode).void } def visit_lambda_node(node); end # Visit a LocalVariableAndWriteNode node # - # source://prism//lib/prism/visitor.rb#519 + # pkg:gem/prism#lib/prism/visitor.rb:519 sig { params(node: Prism::LocalVariableAndWriteNode).void } def visit_local_variable_and_write_node(node); end # Visit a LocalVariableOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#524 + # pkg:gem/prism#lib/prism/visitor.rb:524 sig { params(node: Prism::LocalVariableOperatorWriteNode).void } def visit_local_variable_operator_write_node(node); end # Visit a LocalVariableOrWriteNode node # - # source://prism//lib/prism/visitor.rb#529 + # pkg:gem/prism#lib/prism/visitor.rb:529 sig { params(node: Prism::LocalVariableOrWriteNode).void } def visit_local_variable_or_write_node(node); end # Visit a LocalVariableReadNode node # - # source://prism//lib/prism/visitor.rb#534 + # pkg:gem/prism#lib/prism/visitor.rb:534 sig { params(node: Prism::LocalVariableReadNode).void } def visit_local_variable_read_node(node); end # Visit a LocalVariableTargetNode node # - # source://prism//lib/prism/visitor.rb#539 + # pkg:gem/prism#lib/prism/visitor.rb:539 sig { params(node: Prism::LocalVariableTargetNode).void } def visit_local_variable_target_node(node); end # Visit a LocalVariableWriteNode node # - # source://prism//lib/prism/visitor.rb#544 + # pkg:gem/prism#lib/prism/visitor.rb:544 sig { params(node: Prism::LocalVariableWriteNode).void } def visit_local_variable_write_node(node); end # Visit a MatchLastLineNode node # - # source://prism//lib/prism/visitor.rb#549 + # pkg:gem/prism#lib/prism/visitor.rb:549 sig { params(node: Prism::MatchLastLineNode).void } def visit_match_last_line_node(node); end # Visit a MatchPredicateNode node # - # source://prism//lib/prism/visitor.rb#554 + # pkg:gem/prism#lib/prism/visitor.rb:554 sig { params(node: Prism::MatchPredicateNode).void } def visit_match_predicate_node(node); end # Visit a MatchRequiredNode node # - # source://prism//lib/prism/visitor.rb#559 + # pkg:gem/prism#lib/prism/visitor.rb:559 sig { params(node: Prism::MatchRequiredNode).void } def visit_match_required_node(node); end # Visit a MatchWriteNode node # - # source://prism//lib/prism/visitor.rb#564 + # pkg:gem/prism#lib/prism/visitor.rb:564 sig { params(node: Prism::MatchWriteNode).void } def visit_match_write_node(node); end # Visit a MissingNode node # - # source://prism//lib/prism/visitor.rb#569 + # pkg:gem/prism#lib/prism/visitor.rb:569 sig { params(node: Prism::MissingNode).void } def visit_missing_node(node); end # Visit a ModuleNode node # - # source://prism//lib/prism/visitor.rb#574 + # pkg:gem/prism#lib/prism/visitor.rb:574 sig { params(node: Prism::ModuleNode).void } def visit_module_node(node); end # Visit a MultiTargetNode node # - # source://prism//lib/prism/visitor.rb#579 + # pkg:gem/prism#lib/prism/visitor.rb:579 sig { params(node: Prism::MultiTargetNode).void } def visit_multi_target_node(node); end # Visit a MultiWriteNode node # - # source://prism//lib/prism/visitor.rb#584 + # pkg:gem/prism#lib/prism/visitor.rb:584 sig { params(node: Prism::MultiWriteNode).void } def visit_multi_write_node(node); end # Visit a NextNode node # - # source://prism//lib/prism/visitor.rb#589 + # pkg:gem/prism#lib/prism/visitor.rb:589 sig { params(node: Prism::NextNode).void } def visit_next_node(node); end # Visit a NilNode node # - # source://prism//lib/prism/visitor.rb#594 + # pkg:gem/prism#lib/prism/visitor.rb:594 sig { params(node: Prism::NilNode).void } def visit_nil_node(node); end # Visit a NoKeywordsParameterNode node # - # source://prism//lib/prism/visitor.rb#599 + # pkg:gem/prism#lib/prism/visitor.rb:599 sig { params(node: Prism::NoKeywordsParameterNode).void } def visit_no_keywords_parameter_node(node); end # Visit a NumberedParametersNode node # - # source://prism//lib/prism/visitor.rb#604 + # pkg:gem/prism#lib/prism/visitor.rb:604 sig { params(node: Prism::NumberedParametersNode).void } def visit_numbered_parameters_node(node); end # Visit a NumberedReferenceReadNode node # - # source://prism//lib/prism/visitor.rb#609 + # pkg:gem/prism#lib/prism/visitor.rb:609 sig { params(node: Prism::NumberedReferenceReadNode).void } def visit_numbered_reference_read_node(node); end # Visit a OptionalKeywordParameterNode node # - # source://prism//lib/prism/visitor.rb#614 + # pkg:gem/prism#lib/prism/visitor.rb:614 sig { params(node: Prism::OptionalKeywordParameterNode).void } def visit_optional_keyword_parameter_node(node); end # Visit a OptionalParameterNode node # - # source://prism//lib/prism/visitor.rb#619 + # pkg:gem/prism#lib/prism/visitor.rb:619 sig { params(node: Prism::OptionalParameterNode).void } def visit_optional_parameter_node(node); end # Visit a OrNode node # - # source://prism//lib/prism/visitor.rb#624 + # pkg:gem/prism#lib/prism/visitor.rb:624 sig { params(node: Prism::OrNode).void } def visit_or_node(node); end # Visit a ParametersNode node # - # source://prism//lib/prism/visitor.rb#629 + # pkg:gem/prism#lib/prism/visitor.rb:629 sig { params(node: Prism::ParametersNode).void } def visit_parameters_node(node); end # Visit a ParenthesesNode node # - # source://prism//lib/prism/visitor.rb#634 + # pkg:gem/prism#lib/prism/visitor.rb:634 sig { params(node: Prism::ParenthesesNode).void } def visit_parentheses_node(node); end # Visit a PinnedExpressionNode node # - # source://prism//lib/prism/visitor.rb#639 + # pkg:gem/prism#lib/prism/visitor.rb:639 sig { params(node: Prism::PinnedExpressionNode).void } def visit_pinned_expression_node(node); end # Visit a PinnedVariableNode node # - # source://prism//lib/prism/visitor.rb#644 + # pkg:gem/prism#lib/prism/visitor.rb:644 sig { params(node: Prism::PinnedVariableNode).void } def visit_pinned_variable_node(node); end # Visit a PostExecutionNode node # - # source://prism//lib/prism/visitor.rb#649 + # pkg:gem/prism#lib/prism/visitor.rb:649 sig { params(node: Prism::PostExecutionNode).void } def visit_post_execution_node(node); end # Visit a PreExecutionNode node # - # source://prism//lib/prism/visitor.rb#654 + # pkg:gem/prism#lib/prism/visitor.rb:654 sig { params(node: Prism::PreExecutionNode).void } def visit_pre_execution_node(node); end # Visit a ProgramNode node # - # source://prism//lib/prism/visitor.rb#659 + # pkg:gem/prism#lib/prism/visitor.rb:659 sig { params(node: Prism::ProgramNode).void } def visit_program_node(node); end # Visit a RangeNode node # - # source://prism//lib/prism/visitor.rb#664 + # pkg:gem/prism#lib/prism/visitor.rb:664 sig { params(node: Prism::RangeNode).void } def visit_range_node(node); end # Visit a RationalNode node # - # source://prism//lib/prism/visitor.rb#669 + # pkg:gem/prism#lib/prism/visitor.rb:669 sig { params(node: Prism::RationalNode).void } def visit_rational_node(node); end # Visit a RedoNode node # - # source://prism//lib/prism/visitor.rb#674 + # pkg:gem/prism#lib/prism/visitor.rb:674 sig { params(node: Prism::RedoNode).void } def visit_redo_node(node); end # Visit a RegularExpressionNode node # - # source://prism//lib/prism/visitor.rb#679 + # pkg:gem/prism#lib/prism/visitor.rb:679 sig { params(node: Prism::RegularExpressionNode).void } def visit_regular_expression_node(node); end # Visit a RequiredKeywordParameterNode node # - # source://prism//lib/prism/visitor.rb#684 + # pkg:gem/prism#lib/prism/visitor.rb:684 sig { params(node: Prism::RequiredKeywordParameterNode).void } def visit_required_keyword_parameter_node(node); end # Visit a RequiredParameterNode node # - # source://prism//lib/prism/visitor.rb#689 + # pkg:gem/prism#lib/prism/visitor.rb:689 sig { params(node: Prism::RequiredParameterNode).void } def visit_required_parameter_node(node); end # Visit a RescueModifierNode node # - # source://prism//lib/prism/visitor.rb#694 + # pkg:gem/prism#lib/prism/visitor.rb:694 sig { params(node: Prism::RescueModifierNode).void } def visit_rescue_modifier_node(node); end # Visit a RescueNode node # - # source://prism//lib/prism/visitor.rb#699 + # pkg:gem/prism#lib/prism/visitor.rb:699 sig { params(node: Prism::RescueNode).void } def visit_rescue_node(node); end # Visit a RestParameterNode node # - # source://prism//lib/prism/visitor.rb#704 + # pkg:gem/prism#lib/prism/visitor.rb:704 sig { params(node: Prism::RestParameterNode).void } def visit_rest_parameter_node(node); end # Visit a RetryNode node # - # source://prism//lib/prism/visitor.rb#709 + # pkg:gem/prism#lib/prism/visitor.rb:709 sig { params(node: Prism::RetryNode).void } def visit_retry_node(node); end # Visit a ReturnNode node # - # source://prism//lib/prism/visitor.rb#714 + # pkg:gem/prism#lib/prism/visitor.rb:714 sig { params(node: Prism::ReturnNode).void } def visit_return_node(node); end # Visit a SelfNode node # - # source://prism//lib/prism/visitor.rb#719 + # pkg:gem/prism#lib/prism/visitor.rb:719 sig { params(node: Prism::SelfNode).void } def visit_self_node(node); end # Visit a ShareableConstantNode node # - # source://prism//lib/prism/visitor.rb#724 + # pkg:gem/prism#lib/prism/visitor.rb:724 sig { params(node: Prism::ShareableConstantNode).void } def visit_shareable_constant_node(node); end # Visit a SingletonClassNode node # - # source://prism//lib/prism/visitor.rb#729 + # pkg:gem/prism#lib/prism/visitor.rb:729 sig { params(node: Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end # Visit a SourceEncodingNode node # - # source://prism//lib/prism/visitor.rb#734 + # pkg:gem/prism#lib/prism/visitor.rb:734 sig { params(node: Prism::SourceEncodingNode).void } def visit_source_encoding_node(node); end # Visit a SourceFileNode node # - # source://prism//lib/prism/visitor.rb#739 + # pkg:gem/prism#lib/prism/visitor.rb:739 sig { params(node: Prism::SourceFileNode).void } def visit_source_file_node(node); end # Visit a SourceLineNode node # - # source://prism//lib/prism/visitor.rb#744 + # pkg:gem/prism#lib/prism/visitor.rb:744 sig { params(node: Prism::SourceLineNode).void } def visit_source_line_node(node); end # Visit a SplatNode node # - # source://prism//lib/prism/visitor.rb#749 + # pkg:gem/prism#lib/prism/visitor.rb:749 sig { params(node: Prism::SplatNode).void } def visit_splat_node(node); end # Visit a StatementsNode node # - # source://prism//lib/prism/visitor.rb#754 + # pkg:gem/prism#lib/prism/visitor.rb:754 sig { params(node: Prism::StatementsNode).void } def visit_statements_node(node); end # Visit a StringNode node # - # source://prism//lib/prism/visitor.rb#759 + # pkg:gem/prism#lib/prism/visitor.rb:759 sig { params(node: Prism::StringNode).void } def visit_string_node(node); end # Visit a SuperNode node # - # source://prism//lib/prism/visitor.rb#764 + # pkg:gem/prism#lib/prism/visitor.rb:764 sig { params(node: Prism::SuperNode).void } def visit_super_node(node); end # Visit a SymbolNode node # - # source://prism//lib/prism/visitor.rb#769 + # pkg:gem/prism#lib/prism/visitor.rb:769 sig { params(node: Prism::SymbolNode).void } def visit_symbol_node(node); end # Visit a TrueNode node # - # source://prism//lib/prism/visitor.rb#774 + # pkg:gem/prism#lib/prism/visitor.rb:774 sig { params(node: Prism::TrueNode).void } def visit_true_node(node); end # Visit a UndefNode node # - # source://prism//lib/prism/visitor.rb#779 + # pkg:gem/prism#lib/prism/visitor.rb:779 sig { params(node: Prism::UndefNode).void } def visit_undef_node(node); end # Visit a UnlessNode node # - # source://prism//lib/prism/visitor.rb#784 + # pkg:gem/prism#lib/prism/visitor.rb:784 sig { params(node: Prism::UnlessNode).void } def visit_unless_node(node); end # Visit a UntilNode node # - # source://prism//lib/prism/visitor.rb#789 + # pkg:gem/prism#lib/prism/visitor.rb:789 sig { params(node: Prism::UntilNode).void } def visit_until_node(node); end # Visit a WhenNode node # - # source://prism//lib/prism/visitor.rb#794 + # pkg:gem/prism#lib/prism/visitor.rb:794 sig { params(node: Prism::WhenNode).void } def visit_when_node(node); end # Visit a WhileNode node # - # source://prism//lib/prism/visitor.rb#799 + # pkg:gem/prism#lib/prism/visitor.rb:799 sig { params(node: Prism::WhileNode).void } def visit_while_node(node); end # Visit a XStringNode node # - # source://prism//lib/prism/visitor.rb#804 + # pkg:gem/prism#lib/prism/visitor.rb:804 sig { params(node: Prism::XStringNode).void } def visit_x_string_node(node); end # Visit a YieldNode node # - # source://prism//lib/prism/visitor.rb#809 + # pkg:gem/prism#lib/prism/visitor.rb:809 sig { params(node: Prism::YieldNode).void } def visit_yield_node(node); end end @@ -42621,13 +41510,11 @@ end # ^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#19173 +# pkg:gem/prism#lib/prism/node.rb:19173 class Prism::WhenNode < ::Prism::Node # Initialize a new WhenNode node. # - # @return [WhenNode] a new instance of WhenNode - # - # source://prism//lib/prism/node.rb#19175 + # pkg:gem/prism#lib/prism/node.rb:19175 sig do params( source: Prism::Source, @@ -42645,42 +41532,42 @@ class Prism::WhenNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19295 + # pkg:gem/prism#lib/prism/node.rb:19295 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19187 + # pkg:gem/prism#lib/prism/node.rb:19187 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19192 + # pkg:gem/prism#lib/prism/node.rb:19192 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19213 + # pkg:gem/prism#lib/prism/node.rb:19213 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19205 + # pkg:gem/prism#lib/prism/node.rb:19205 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#19244 + # pkg:gem/prism#lib/prism/node.rb:19244 sig { returns(T::Array[Prism::Node]) } def conditions; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?) -> WhenNode # - # source://prism//lib/prism/node.rb#19218 + # pkg:gem/prism#lib/prism/node.rb:19218 sig do params( node_id: Integer, @@ -42694,24 +41581,21 @@ class Prism::WhenNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19192 + # pkg:gem/prism#lib/prism/node.rb:19223 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode? } # - # source://prism//lib/prism/node.rb#19226 + # pkg:gem/prism#lib/prism/node.rb:19226 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [statements] - # - # source://prism//lib/prism/node.rb#19197 + # pkg:gem/prism#lib/prism/node.rb:19197 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -42719,62 +41603,62 @@ class Prism::WhenNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#19279 + # pkg:gem/prism#lib/prism/node.rb:19279 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19269 + # pkg:gem/prism#lib/prism/node.rb:19269 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19231 + # pkg:gem/prism#lib/prism/node.rb:19231 sig { returns(Prism::Location) } def keyword_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19239 + # pkg:gem/prism#lib/prism/node.rb:19239 def save_keyword_loc(repository); end # Save the then_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19261 + # pkg:gem/prism#lib/prism/node.rb:19261 def save_then_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#19266 + # pkg:gem/prism#lib/prism/node.rb:19266 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#19274 + # pkg:gem/prism#lib/prism/node.rb:19274 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#19247 + # pkg:gem/prism#lib/prism/node.rb:19247 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#19284 + # pkg:gem/prism#lib/prism/node.rb:19284 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#19289 + # pkg:gem/prism#lib/prism/node.rb:19289 def type; end end end @@ -42787,13 +41671,11 @@ end # while foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#19312 +# pkg:gem/prism#lib/prism/node.rb:19312 class Prism::WhileNode < ::Prism::Node # Initialize a new WhileNode node. # - # @return [WhileNode] a new instance of WhileNode - # - # source://prism//lib/prism/node.rb#19314 + # pkg:gem/prism#lib/prism/node.rb:19314 sig do params( source: Prism::Source, @@ -42812,56 +41694,54 @@ class Prism::WhileNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19464 + # pkg:gem/prism#lib/prism/node.rb:19464 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19327 + # pkg:gem/prism#lib/prism/node.rb:19327 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_modifier?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#19371 + # pkg:gem/prism#lib/prism/node.rb:19371 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19332 + # pkg:gem/prism#lib/prism/node.rb:19332 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#19443 + # pkg:gem/prism#lib/prism/node.rb:19443 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#19408 + # pkg:gem/prism#lib/prism/node.rb:19408 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19353 + # pkg:gem/prism#lib/prism/node.rb:19353 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19345 + # pkg:gem/prism#lib/prism/node.rb:19345 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?do_keyword_loc: Location?, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> WhileNode # - # source://prism//lib/prism/node.rb#19358 + # pkg:gem/prism#lib/prism/node.rb:19358 sig do params( node_id: Integer, @@ -42876,36 +41756,33 @@ class Prism::WhileNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19332 + # pkg:gem/prism#lib/prism/node.rb:19363 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, do_keyword_loc: Location?, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } # - # source://prism//lib/prism/node.rb#19366 + # pkg:gem/prism#lib/prism/node.rb:19366 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def do_keyword: () -> String? # - # source://prism//lib/prism/node.rb#19438 + # pkg:gem/prism#lib/prism/node.rb:19438 sig { returns(T.nilable(String)) } def do_keyword; end # attr_reader do_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#19389 + # pkg:gem/prism#lib/prism/node.rb:19389 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [predicate] - # - # source://prism//lib/prism/node.rb#19337 + # pkg:gem/prism#lib/prism/node.rb:19337 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -42913,65 +41790,65 @@ class Prism::WhileNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#19448 + # pkg:gem/prism#lib/prism/node.rb:19448 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19433 + # pkg:gem/prism#lib/prism/node.rb:19433 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19376 + # pkg:gem/prism#lib/prism/node.rb:19376 sig { returns(Prism::Location) } def keyword_loc; end - # source://prism//lib/prism/parse_result/newlines.rb#110 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:110 def newline_flag!(lines); end # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#19427 + # pkg:gem/prism#lib/prism/node.rb:19427 sig { returns(Prism::Node) } def predicate; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19422 + # pkg:gem/prism#lib/prism/node.rb:19422 def save_closing_loc(repository); end # Save the do_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19403 + # pkg:gem/prism#lib/prism/node.rb:19403 def save_do_keyword_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19384 + # pkg:gem/prism#lib/prism/node.rb:19384 def save_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#19430 + # pkg:gem/prism#lib/prism/node.rb:19430 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#19453 + # pkg:gem/prism#lib/prism/node.rb:19453 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#19458 + # pkg:gem/prism#lib/prism/node.rb:19458 def type; end end end @@ -42981,15 +41858,13 @@ end # `foo` # ^^^^^ # -# source://prism//lib/prism/node.rb#19479 +# pkg:gem/prism#lib/prism/node.rb:19479 class Prism::XStringNode < ::Prism::Node include ::Prism::HeredocQuery # Initialize a new XStringNode node. # - # @return [XStringNode] a new instance of XStringNode - # - # source://prism//lib/prism/node.rb#19481 + # pkg:gem/prism#lib/prism/node.rb:19481 sig do params( source: Prism::Source, @@ -43007,60 +41882,60 @@ class Prism::XStringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19615 + # pkg:gem/prism#lib/prism/node.rb:19615 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19493 + # pkg:gem/prism#lib/prism/node.rb:19493 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19498 + # pkg:gem/prism#lib/prism/node.rb:19498 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#19594 + # pkg:gem/prism#lib/prism/node.rb:19594 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#19568 + # pkg:gem/prism#lib/prism/node.rb:19568 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19514 + # pkg:gem/prism#lib/prism/node.rb:19514 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19509 + # pkg:gem/prism#lib/prism/node.rb:19509 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#19589 + # pkg:gem/prism#lib/prism/node.rb:19589 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#19555 + # pkg:gem/prism#lib/prism/node.rb:19555 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode # - # source://prism//lib/prism/node.rb#19519 + # pkg:gem/prism#lib/prism/node.rb:19519 sig do params( node_id: Integer, @@ -43074,22 +41949,21 @@ class Prism::XStringNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19498 + # pkg:gem/prism#lib/prism/node.rb:19524 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism//lib/prism/node.rb#19527 + # pkg:gem/prism#lib/prism/node.rb:19527 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # source://prism//lib/prism/node.rb#19503 + # pkg:gem/prism#lib/prism/node.rb:19503 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -43097,17 +41971,13 @@ class Prism::XStringNode < ::Prism::Node # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#19537 + # pkg:gem/prism#lib/prism/node.rb:19537 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#19532 + # pkg:gem/prism#lib/prism/node.rb:19532 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -43116,63 +41986,63 @@ class Prism::XStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#19599 + # pkg:gem/prism#lib/prism/node.rb:19599 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#19584 + # pkg:gem/prism#lib/prism/node.rb:19584 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#19542 + # pkg:gem/prism#lib/prism/node.rb:19542 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19576 + # pkg:gem/prism#lib/prism/node.rb:19576 def save_closing_loc(repository); end # Save the content_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19563 + # pkg:gem/prism#lib/prism/node.rb:19563 def save_content_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19550 + # pkg:gem/prism#lib/prism/node.rb:19550 def save_opening_loc(repository); end # Occasionally it's helpful to treat a string as if it were interpolated so # that there's a consistent interface for working with strings. # - # source://prism//lib/prism/node_ext.rb#93 + # pkg:gem/prism#lib/prism/node_ext.rb:93 sig { returns(Prism::InterpolatedXStringNode) } def to_interpolated; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#19604 + # pkg:gem/prism#lib/prism/node.rb:19604 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#19581 + # pkg:gem/prism#lib/prism/node.rb:19581 sig { returns(String) } def unescaped; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#19609 + # pkg:gem/prism#lib/prism/node.rb:19609 def type; end end end @@ -43182,13 +42052,11 @@ end # yield 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#19629 +# pkg:gem/prism#lib/prism/node.rb:19629 class Prism::YieldNode < ::Prism::Node # Initialize a new YieldNode node. # - # @return [YieldNode] a new instance of YieldNode - # - # source://prism//lib/prism/node.rb#19631 + # pkg:gem/prism#lib/prism/node.rb:19631 sig do params( source: Prism::Source, @@ -43206,42 +42074,42 @@ class Prism::YieldNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19770 + # pkg:gem/prism#lib/prism/node.rb:19770 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19643 + # pkg:gem/prism#lib/prism/node.rb:19643 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#19717 + # pkg:gem/prism#lib/prism/node.rb:19717 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19648 + # pkg:gem/prism#lib/prism/node.rb:19648 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19667 + # pkg:gem/prism#lib/prism/node.rb:19667 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19660 + # pkg:gem/prism#lib/prism/node.rb:19660 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?) -> YieldNode # - # source://prism//lib/prism/node.rb#19672 + # pkg:gem/prism#lib/prism/node.rb:19672 sig do params( node_id: Integer, @@ -43255,24 +42123,21 @@ class Prism::YieldNode < ::Prism::Node end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end - # def child_nodes: () -> Array[Node?] # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#19648 + # pkg:gem/prism#lib/prism/node.rb:19677 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location? } # - # source://prism//lib/prism/node.rb#19680 + # pkg:gem/prism#lib/prism/node.rb:19680 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @yield [arguments] - # - # source://prism//lib/prism/node.rb#19653 + # pkg:gem/prism#lib/prism/node.rb:19653 def each_child_node; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -43280,80 +42145,80 @@ class Prism::YieldNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#19754 + # pkg:gem/prism#lib/prism/node.rb:19754 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19739 + # pkg:gem/prism#lib/prism/node.rb:19739 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19685 + # pkg:gem/prism#lib/prism/node.rb:19685 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#19744 + # pkg:gem/prism#lib/prism/node.rb:19744 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#19698 + # pkg:gem/prism#lib/prism/node.rb:19698 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#19749 + # pkg:gem/prism#lib/prism/node.rb:19749 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#19720 + # pkg:gem/prism#lib/prism/node.rb:19720 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19693 + # pkg:gem/prism#lib/prism/node.rb:19693 def save_keyword_loc(repository); end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19712 + # pkg:gem/prism#lib/prism/node.rb:19712 def save_lparen_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#19734 + # pkg:gem/prism#lib/prism/node.rb:19734 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#19759 + # pkg:gem/prism#lib/prism/node.rb:19759 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#19764 + # pkg:gem/prism#lib/prism/node.rb:19764 def type; end end end -# source://prism//lib/prism/translation/ruby_parser.rb#11 +# pkg:gem/prism#lib/prism/translation/ruby_parser.rb:11 class RubyParser; end -# source://prism//lib/prism/translation/ruby_parser.rb#12 +# pkg:gem/prism#lib/prism/translation/ruby_parser.rb:12 class RubyParser::SyntaxError < ::RuntimeError; end diff --git a/sorbet/rbi/gems/psych@5.2.6.rbi b/sorbet/rbi/gems/psych@5.2.6.rbi new file mode 100644 index 000000000..6d9cf5c43 --- /dev/null +++ b/sorbet/rbi/gems/psych@5.2.6.rbi @@ -0,0 +1,2385 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `psych` gem. +# Please instead update this file by running `bin/tapioca gem psych`. + + +# pkg:gem/psych#lib/psych/core_ext.rb:2 +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + # call-seq: to_yaml(options = {}) + # + # Convert an object to YAML. See Psych.dump for more information on the + # available +options+. + # + # pkg:gem/psych#lib/psych/core_ext.rb:12 + def to_yaml(options = T.unsafe(nil)); end + + class << self + # pkg:gem/psych#lib/psych/core_ext.rb:3 + def yaml_tag(url); end + end +end + +# = Overview +# +# Psych is a YAML parser and emitter. +# Psych leverages libyaml [Home page: https://pyyaml.org/wiki/LibYAML] +# or [git repo: https://github.com/yaml/libyaml] for its YAML parsing +# and emitting capabilities. In addition to wrapping libyaml, Psych also +# knows how to serialize and de-serialize most Ruby objects to and from +# the YAML format. +# +# = I NEED TO PARSE OR EMIT YAML RIGHT NOW! +# +# # Parse some YAML +# Psych.load("--- foo") # => "foo" +# +# # Emit some YAML +# Psych.dump("foo") # => "--- foo\n...\n" +# { :a => 'b'}.to_yaml # => "---\n:a: b\n" +# +# Got more time on your hands? Keep on reading! +# +# == YAML Parsing +# +# Psych provides a range of interfaces for parsing a YAML document ranging from +# low level to high level, depending on your parsing needs. At the lowest +# level, is an event based parser. Mid level is access to the raw YAML AST, +# and at the highest level is the ability to unmarshal YAML to Ruby objects. +# +# == YAML Emitting +# +# Psych provides a range of interfaces ranging from low to high level for +# producing YAML documents. Very similar to the YAML parsing interfaces, Psych +# provides at the lowest level, an event based system, mid-level is building +# a YAML AST, and the highest level is converting a Ruby object straight to +# a YAML document. +# +# == High-level API +# +# === Parsing +# +# The high level YAML parser provided by Psych simply takes YAML as input and +# returns a Ruby data structure. For information on using the high level parser +# see Psych.load +# +# ==== Reading from a string +# +# Psych.safe_load("--- a") # => 'a' +# Psych.safe_load("---\n - a\n - b") # => ['a', 'b'] +# # From a trusted string: +# Psych.load("--- !ruby/range\nbegin: 0\nend: 42\nexcl: false\n") # => 0..42 +# +# ==== Reading from a file +# +# Psych.safe_load_file("data.yml", permitted_classes: [Date]) +# Psych.load_file("trusted_database.yml") +# +# ==== \Exception handling +# +# begin +# # The second argument changes only the exception contents +# Psych.parse("--- `", "file.txt") +# rescue Psych::SyntaxError => ex +# ex.file # => 'file.txt' +# ex.message # => "(file.txt): found character that cannot start any token" +# end +# +# === Emitting +# +# The high level emitter has the easiest interface. Psych simply takes a Ruby +# data structure and converts it to a YAML document. See Psych.dump for more +# information on dumping a Ruby data structure. +# +# ==== Writing to a string +# +# # Dump an array, get back a YAML string +# Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" +# +# # Dump an array to an IO object +# Psych.dump(['a', 'b'], StringIO.new) # => # +# +# # Dump an array with indentation set +# Psych.dump(['a', ['b']], :indentation => 3) # => "---\n- a\n- - b\n" +# +# # Dump an array to an IO with indentation set +# Psych.dump(['a', ['b']], StringIO.new, :indentation => 3) +# +# ==== Writing to a file +# +# Currently there is no direct API for dumping Ruby structure to file: +# +# File.open('database.yml', 'w') do |file| +# file.write(Psych.dump(['a', 'b'])) +# end +# +# == Mid-level API +# +# === Parsing +# +# Psych provides access to an AST produced from parsing a YAML document. This +# tree is built using the Psych::Parser and Psych::TreeBuilder. The AST can +# be examined and manipulated freely. Please see Psych::parse_stream, +# Psych::Nodes, and Psych::Nodes::Node for more information on dealing with +# YAML syntax trees. +# +# ==== Reading from a string +# +# # Returns Psych::Nodes::Stream +# Psych.parse_stream("---\n - a\n - b") +# +# # Returns Psych::Nodes::Document +# Psych.parse("---\n - a\n - b") +# +# ==== Reading from a file +# +# # Returns Psych::Nodes::Stream +# Psych.parse_stream(File.read('database.yml')) +# +# # Returns Psych::Nodes::Document +# Psych.parse_file('database.yml') +# +# ==== \Exception handling +# +# begin +# # The second argument changes only the exception contents +# Psych.parse("--- `", "file.txt") +# rescue Psych::SyntaxError => ex +# ex.file # => 'file.txt' +# ex.message # => "(file.txt): found character that cannot start any token" +# end +# +# === Emitting +# +# At the mid level is building an AST. This AST is exactly the same as the AST +# used when parsing a YAML document. Users can build an AST by hand and the +# AST knows how to emit itself as a YAML document. See Psych::Nodes, +# Psych::Nodes::Node, and Psych::TreeBuilder for more information on building +# a YAML AST. +# +# ==== Writing to a string +# +# # We need Psych::Nodes::Stream (not Psych::Nodes::Document) +# stream = Psych.parse_stream("---\n - a\n - b") +# +# stream.to_yaml # => "---\n- a\n- b\n" +# +# ==== Writing to a file +# +# # We need Psych::Nodes::Stream (not Psych::Nodes::Document) +# stream = Psych.parse_stream(File.read('database.yml')) +# +# File.open('database.yml', 'w') do |file| +# file.write(stream.to_yaml) +# end +# +# == Low-level API +# +# === Parsing +# +# The lowest level parser should be used when the YAML input is already known, +# and the developer does not want to pay the price of building an AST or +# automatic detection and conversion to Ruby objects. See Psych::Parser for +# more information on using the event based parser. +# +# ==== Reading to Psych::Nodes::Stream structure +# +# parser = Psych::Parser.new(TreeBuilder.new) # => # +# parser = Psych.parser # it's an alias for the above +# +# parser.parse("---\n - a\n - b") # => # +# parser.handler # => # +# parser.handler.root # => # +# +# ==== Receiving an events stream +# +# recorder = Psych::Handlers::Recorder.new +# parser = Psych::Parser.new(recorder) +# +# parser.parse("---\n - a\n - b") +# recorder.events # => [list of [event, args] lists] +# # event is one of: Psych::Handler::EVENTS +# # args are the arguments passed to the event +# +# === Emitting +# +# The lowest level emitter is an event based system. Events are sent to a +# Psych::Emitter object. That object knows how to convert the events to a YAML +# document. This interface should be used when document format is known in +# advance or speed is a concern. See Psych::Emitter for more information. +# +# ==== Writing to a Ruby structure +# +# Psych.parser.parse("--- a") # => # +# +# parser.handler.first # => # +# parser.handler.first.to_ruby # => ["a"] +# +# parser.handler.root.first # => # +# parser.handler.root.first.to_ruby # => "a" +# +# # You can instantiate an Emitter manually +# Psych::Visitors::ToRuby.new.accept(parser.handler.root.first) +# # => "a" +# +# pkg:gem/psych#lib/psych/versions.rb:3 +module Psych + class << self + # pkg:gem/psych#lib/psych.rb:728 + def add_builtin_type(type_tag, &block); end + + # :stopdoc: + # + # pkg:gem/psych#lib/psych.rb:722 + def add_domain_type(domain, type_tag, &block); end + + # pkg:gem/psych#lib/psych.rb:738 + def add_tag(tag, klass); end + + # pkg:gem/psych#lib/psych.rb:754 + def config; end + + # pkg:gem/psych#lib/psych.rb:766 + def domain_types; end + + # pkg:gem/psych#lib/psych.rb:778 + def domain_types=(value); end + + # call-seq: + # Psych.dump(o) -> string of yaml + # Psych.dump(o, options) -> string of yaml + # Psych.dump(o, io) -> io object passed in + # Psych.dump(o, io, options) -> io object passed in + # + # Dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in + # to control the output format. If an IO object is passed in, the YAML will + # be dumped to that IO object. + # + # Currently supported options are: + # + # [:indentation] Number of space characters used to indent. + # Acceptable value should be in 0..9 range, + # otherwise option is ignored. + # + # Default: 2. + # [:line_width] Max character to wrap line at. + # For unlimited line width use -1. + # + # Default: 0 (meaning "wrap at 81"). + # [:canonical] Write "canonical" YAML form (very verbose, yet + # strictly formal). + # + # Default: false. + # [:header] Write %YAML [version] at the beginning of document. + # + # Default: false. + # + # [:stringify_names] Dump symbol keys in Hash objects as string. + # + # Default: false. + # + # Example: + # + # # Dump an array, get back a YAML string + # Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" + # + # # Dump an array to an IO object + # Psych.dump(['a', 'b'], StringIO.new) # => # + # + # # Dump an array with indentation set + # Psych.dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" + # + # # Dump an array to an IO with indentation set + # Psych.dump(['a', ['b']], StringIO.new, indentation: 3) + # + # # Dump hash with symbol keys as string + # Psych.dump({a: "b"}, stringify_names: true) # => "---\na: b\n" + # + # pkg:gem/psych#lib/psych.rb:514 + def dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end + + # Dump a list of objects as separate documents to a document stream. + # + # Example: + # + # Psych.dump_stream("foo\n ", {}) # => "--- ! \"foo\\n \"\n--- {}\n" + # + # pkg:gem/psych#lib/psych.rb:612 + def dump_stream(*objects); end + + # pkg:gem/psych#lib/psych.rb:762 + def dump_tags; end + + # pkg:gem/psych#lib/psych.rb:774 + def dump_tags=(value); end + + # pkg:gem/psych#lib/psych.rb:15 + def libyaml_version; end + + # Load +yaml+ in to a Ruby data structure. If multiple documents are + # provided, the object contained in the first document will be returned. + # +filename+ will be used in the exception message if any exception + # is raised while parsing. If +yaml+ is empty, it returns + # the specified +fallback+ return value, which defaults to +nil+. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.load("--- a") # => 'a' + # Psych.load("---\n - a\n - b") # => ['a', 'b'] + # + # begin + # Psych.load("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # Raises a TypeError when `yaml` parameter is NilClass. This method is + # similar to `safe_load` except that `Symbol` objects are allowed by default. + # + # pkg:gem/psych#lib/psych.rb:369 + def load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Loads the document contained in +filename+. Returns the yaml contained in + # +filename+ as a Ruby object, or if the file is empty, it returns + # the specified +fallback+ return value, which defaults to +nil+. + # See load for options. + # + # pkg:gem/psych#lib/psych.rb:715 + def load_file(filename, **kwargs); end + + # Load multiple documents given in +yaml+. Returns the parsed documents + # as a list. If a block is given, each document will be converted to Ruby + # and passed to the block during parsing + # + # Example: + # + # Psych.load_stream("--- foo\n...\n--- bar\n...") # => ['foo', 'bar'] + # + # list = [] + # Psych.load_stream("--- foo\n...\n--- bar\n...") do |ruby| + # list << ruby + # end + # list # => ['foo', 'bar'] + # + # pkg:gem/psych#lib/psych.rb:643 + def load_stream(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), **kwargs); end + + # pkg:gem/psych#lib/psych.rb:758 + def load_tags; end + + # pkg:gem/psych#lib/psych.rb:770 + def load_tags=(value); end + + # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Document. + # +filename+ is used in the exception message if a Psych::SyntaxError is + # raised. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.parse("---\n - a\n - b") # => # + # + # begin + # Psych.parse("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # See Psych::Nodes for more information about YAML AST. + # + # pkg:gem/psych#lib/psych.rb:399 + def parse(yaml, filename: T.unsafe(nil)); end + + # Parse a file at +filename+. Returns the Psych::Nodes::Document. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # pkg:gem/psych#lib/psych.rb:411 + def parse_file(filename, fallback: T.unsafe(nil)); end + + # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Stream. + # This method can handle multiple YAML documents contained in +yaml+. + # +filename+ is used in the exception message if a Psych::SyntaxError is + # raised. + # + # If a block is given, a Psych::Nodes::Document node will be yielded to the + # block as it's being parsed. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.parse_stream("---\n - a\n - b") # => # + # + # Psych.parse_stream("--- a\n--- b") do |node| + # node # => # + # end + # + # begin + # Psych.parse_stream("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # Raises a TypeError when NilClass is passed. + # + # See Psych::Nodes for more information about YAML AST. + # + # pkg:gem/psych#lib/psych.rb:453 + def parse_stream(yaml, filename: T.unsafe(nil), &block); end + + # Returns a default parser + # + # pkg:gem/psych#lib/psych.rb:420 + def parser; end + + # pkg:gem/psych#lib/psych.rb:734 + def remove_type(type_tag); end + + # call-seq: + # Psych.safe_dump(o) -> string of yaml + # Psych.safe_dump(o, options) -> string of yaml + # Psych.safe_dump(o, io) -> io object passed in + # Psych.safe_dump(o, io, options) -> io object passed in + # + # Safely dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in + # to control the output format. If an IO object is passed in, the YAML will + # be dumped to that IO object. By default, only the following + # classes are allowed to be serialized: + # + # * TrueClass + # * FalseClass + # * NilClass + # * Integer + # * Float + # * String + # * Array + # * Hash + # + # Arbitrary classes can be allowed by adding those classes to the +permitted_classes+ + # keyword argument. They are additive. For example, to allow Date serialization: + # + # Psych.safe_dump(yaml, permitted_classes: [Date]) + # + # Now the Date class can be dumped in addition to the classes listed above. + # + # A Psych::DisallowedClass exception will be raised if the object contains a + # class that isn't in the +permitted_classes+ list. + # + # Currently supported options are: + # + # [:indentation] Number of space characters used to indent. + # Acceptable value should be in 0..9 range, + # otherwise option is ignored. + # + # Default: 2. + # [:line_width] Max character to wrap line at. + # For unlimited line width use -1. + # + # Default: 0 (meaning "wrap at 81"). + # [:canonical] Write "canonical" YAML form (very verbose, yet + # strictly formal). + # + # Default: false. + # [:header] Write %YAML [version] at the beginning of document. + # + # Default: false. + # + # [:stringify_names] Dump symbol keys in Hash objects as string. + # + # Default: false. + # + # Example: + # + # # Dump an array, get back a YAML string + # Psych.safe_dump(['a', 'b']) # => "---\n- a\n- b\n" + # + # # Dump an array to an IO object + # Psych.safe_dump(['a', 'b'], StringIO.new) # => # + # + # # Dump an array with indentation set + # Psych.safe_dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" + # + # # Dump an array to an IO with indentation set + # Psych.safe_dump(['a', ['b']], StringIO.new, indentation: 3) + # + # # Dump hash with symbol keys as string + # Psych.dump({a: "b"}, stringify_names: true) # => "---\na: b\n" + # + # pkg:gem/psych#lib/psych.rb:595 + def safe_dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end + + # Safely load the yaml string in +yaml+. By default, only the following + # classes are allowed to be deserialized: + # + # * TrueClass + # * FalseClass + # * NilClass + # * Integer + # * Float + # * String + # * Array + # * Hash + # + # Recursive data structures are not allowed by default. Arbitrary classes + # can be allowed by adding those classes to the +permitted_classes+ keyword argument. They are + # additive. For example, to allow Date deserialization: + # + # Psych.safe_load(yaml, permitted_classes: [Date]) + # + # Now the Date class can be loaded in addition to the classes listed above. + # + # Aliases can be explicitly allowed by changing the +aliases+ keyword argument. + # For example: + # + # x = [] + # x << x + # yaml = Psych.dump x + # Psych.safe_load yaml # => raises an exception + # Psych.safe_load yaml, aliases: true # => loads the aliases + # + # A Psych::DisallowedClass exception will be raised if the yaml contains a + # class that isn't in the +permitted_classes+ list. + # + # A Psych::AliasesNotEnabled exception will be raised if the yaml contains aliases + # but the +aliases+ keyword argument is set to false. + # + # +filename+ will be used in the exception message if any exception is raised + # while parsing. + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.safe_load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.safe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # pkg:gem/psych#lib/psych.rb:323 + def safe_load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Safely loads the document contained in +filename+. Returns the yaml contained in + # +filename+ as a Ruby object, or if the file is empty, it returns + # the specified +fallback+ return value, which defaults to +nil+. + # See safe_load for options. + # + # pkg:gem/psych#lib/psych.rb:704 + def safe_load_file(filename, **kwargs); end + + # Load multiple documents given in +yaml+. Returns the parsed documents + # as a list. + # + # Example: + # + # Psych.safe_load_stream("--- foo\n...\n--- bar\n...") # => ['foo', 'bar'] + # + # list = [] + # Psych.safe_load_stream("--- foo\n...\n--- bar\n...") do |ruby| + # list << ruby + # end + # list # => ['foo', 'bar'] + # + # pkg:gem/psych#lib/psych.rb:670 + def safe_load_stream(yaml, filename: T.unsafe(nil), permitted_classes: T.unsafe(nil), aliases: T.unsafe(nil)); end + + # Dump Ruby +object+ to a JSON string. + # + # pkg:gem/psych#lib/psych.rb:622 + def to_json(object); end + + # Load +yaml+ in to a Ruby data structure. If multiple documents are + # provided, the object contained in the first document will be returned. + # +filename+ will be used in the exception message if any exception + # is raised while parsing. If +yaml+ is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.unsafe_load("--- a") # => 'a' + # Psych.unsafe_load("---\n - a\n - b") # => ['a', 'b'] + # + # begin + # Psych.unsafe_load("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.unsafe_load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.unsafe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # Raises a TypeError when `yaml` parameter is NilClass + # + # NOTE: This method *should not* be used to parse untrusted documents, such as + # YAML documents that are supplied via user input. Instead, please use the + # load method or the safe_load method. + # + # pkg:gem/psych#lib/psych.rb:272 + def unsafe_load(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Load the document contained in +filename+. Returns the yaml contained in + # +filename+ as a Ruby object, or if the file is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # + # NOTE: This method *should not* be used to parse untrusted documents, such as + # YAML documents that are supplied via user input. Instead, please use the + # safe_load_file method. + # + # pkg:gem/psych#lib/psych.rb:693 + def unsafe_load_file(filename, **kwargs); end + end +end + +# Subclasses `BadAlias` for backwards compatibility +# +# pkg:gem/psych#lib/psych/exception.rb:10 +class Psych::AliasesNotEnabled < ::Psych::BadAlias + # pkg:gem/psych#lib/psych/exception.rb:11 + def initialize; end +end + +# Subclasses `BadAlias` for backwards compatibility +# +# pkg:gem/psych#lib/psych/exception.rb:17 +class Psych::AnchorNotDefined < ::Psych::BadAlias + # pkg:gem/psych#lib/psych/exception.rb:18 + def initialize(anchor_name); end +end + +# pkg:gem/psych#lib/psych.rb:15 +class Psych::ClassLoader + # pkg:gem/psych#lib/psych/class_loader.rb:22 + def initialize; end + + # pkg:gem/psych#lib/psych/class_loader.rb:39 + def big_decimal; end + + # pkg:gem/psych#lib/psych/class_loader.rb:39 + def complex; end + + # pkg:gem/psych#lib/psych/class_loader.rb:39 + def data; end + + # pkg:gem/psych#lib/psych/class_loader.rb:39 + def date; end + + # pkg:gem/psych#lib/psych/class_loader.rb:39 + def date_time; end + + # pkg:gem/psych#lib/psych/class_loader.rb:39 + def exception; end + + # pkg:gem/psych#lib/psych/class_loader.rb:26 + def load(klassname); end + + # pkg:gem/psych#lib/psych/class_loader.rb:39 + def object; end + + # pkg:gem/psych#lib/psych/class_loader.rb:39 + def psych_omap; end + + # pkg:gem/psych#lib/psych/class_loader.rb:39 + def psych_set; end + + # pkg:gem/psych#lib/psych/class_loader.rb:39 + def range; end + + # pkg:gem/psych#lib/psych/class_loader.rb:39 + def rational; end + + # pkg:gem/psych#lib/psych/class_loader.rb:39 + def regexp; end + + # pkg:gem/psych#lib/psych/class_loader.rb:39 + def struct; end + + # pkg:gem/psych#lib/psych/class_loader.rb:39 + def symbol; end + + # pkg:gem/psych#lib/psych/class_loader.rb:32 + def symbolize(sym); end + + private + + # pkg:gem/psych#lib/psych/class_loader.rb:48 + def find(klassname); end + + # pkg:gem/psych#lib/psych.rb:15 + def path2class(_arg0); end + + # pkg:gem/psych#lib/psych/class_loader.rb:52 + def resolve(klassname); end +end + +# pkg:gem/psych#lib/psych/class_loader.rb:9 +Psych::ClassLoader::DATA = T.let(T.unsafe(nil), String) + +# pkg:gem/psych#lib/psych/class_loader.rb:77 +class Psych::ClassLoader::Restricted < ::Psych::ClassLoader + # pkg:gem/psych#lib/psych/class_loader.rb:78 + def initialize(classes, symbols); end + + # pkg:gem/psych#lib/psych/class_loader.rb:84 + def symbolize(sym); end + + private + + # pkg:gem/psych#lib/psych/class_loader.rb:96 + def find(klassname); end +end + +# If an object defines +encode_with+, then an instance of Psych::Coder will +# be passed to the method when the object is being serialized. The Coder +# automatically assumes a Psych::Nodes::Mapping is being emitted. Other +# objects like Sequence and Scalar may be emitted if +seq=+ or +scalar=+ are +# called, respectively. +# +# pkg:gem/psych#lib/psych/coder.rb:9 +class Psych::Coder + # pkg:gem/psych#lib/psych/coder.rb:13 + def initialize(tag); end + + # pkg:gem/psych#lib/psych/coder.rb:84 + def [](k); end + + # pkg:gem/psych#lib/psych/coder.rb:78 + def []=(k, v); end + + # pkg:gem/psych#lib/psych/coder.rb:82 + def add(k, v); end + + # pkg:gem/psych#lib/psych/coder.rb:10 + def implicit; end + + # pkg:gem/psych#lib/psych/coder.rb:10 + def implicit=(_arg0); end + + # Emit a map. The coder will be yielded to the block. + # + # pkg:gem/psych#lib/psych/coder.rb:34 + def map(tag = T.unsafe(nil), style = T.unsafe(nil)); end + + # Emit a map with +value+ + # + # pkg:gem/psych#lib/psych/coder.rb:73 + def map=(map); end + + # pkg:gem/psych#lib/psych/coder.rb:10 + def object; end + + # pkg:gem/psych#lib/psych/coder.rb:10 + def object=(_arg0); end + + # Emit a sequence with +map+ and +tag+ + # + # pkg:gem/psych#lib/psych/coder.rb:54 + def represent_map(tag, map); end + + # Emit an arbitrary object +obj+ and +tag+ + # + # pkg:gem/psych#lib/psych/coder.rb:60 + def represent_object(tag, obj); end + + # Emit a scalar with +value+ and +tag+ + # + # pkg:gem/psych#lib/psych/coder.rb:42 + def represent_scalar(tag, value); end + + # Emit a sequence with +list+ and +tag+ + # + # pkg:gem/psych#lib/psych/coder.rb:48 + def represent_seq(tag, list); end + + # pkg:gem/psych#lib/psych/coder.rb:24 + def scalar(*args); end + + # Emit a scalar with +value+ + # + # pkg:gem/psych#lib/psych/coder.rb:67 + def scalar=(value); end + + # pkg:gem/psych#lib/psych/coder.rb:11 + def seq; end + + # Emit a sequence of +list+ + # + # pkg:gem/psych#lib/psych/coder.rb:90 + def seq=(list); end + + # pkg:gem/psych#lib/psych/coder.rb:10 + def style; end + + # pkg:gem/psych#lib/psych/coder.rb:10 + def style=(_arg0); end + + # pkg:gem/psych#lib/psych/coder.rb:10 + def tag; end + + # pkg:gem/psych#lib/psych/coder.rb:10 + def tag=(_arg0); end + + # pkg:gem/psych#lib/psych/coder.rb:11 + def type; end +end + +# pkg:gem/psych#lib/psych/exception.rb:23 +class Psych::DisallowedClass < ::Psych::Exception + # pkg:gem/psych#lib/psych/exception.rb:24 + def initialize(action, klass_name); end +end + +# pkg:gem/psych#lib/psych.rb:15 +class Psych::Emitter < ::Psych::Handler + # pkg:gem/psych#lib/psych.rb:15 + def initialize(*_arg0); end + + # pkg:gem/psych#lib/psych.rb:15 + def alias(_arg0); end + + # pkg:gem/psych#lib/psych.rb:15 + def canonical; end + + # pkg:gem/psych#lib/psych.rb:15 + def canonical=(_arg0); end + + # pkg:gem/psych#lib/psych.rb:15 + def end_document(_arg0); end + + # pkg:gem/psych#lib/psych.rb:15 + def end_mapping; end + + # pkg:gem/psych#lib/psych.rb:15 + def end_sequence; end + + # pkg:gem/psych#lib/psych.rb:15 + def end_stream; end + + # pkg:gem/psych#lib/psych.rb:15 + def indentation; end + + # pkg:gem/psych#lib/psych.rb:15 + def indentation=(_arg0); end + + # pkg:gem/psych#lib/psych.rb:15 + def line_width; end + + # pkg:gem/psych#lib/psych.rb:15 + def line_width=(_arg0); end + + # pkg:gem/psych#lib/psych.rb:15 + def scalar(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end + + # pkg:gem/psych#lib/psych.rb:15 + def start_document(_arg0, _arg1, _arg2); end + + # pkg:gem/psych#lib/psych.rb:15 + def start_mapping(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/psych#lib/psych.rb:15 + def start_sequence(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/psych#lib/psych.rb:15 + def start_stream(_arg0); end +end + +# Psych::Handler is an abstract base class that defines the events used +# when dealing with Psych::Parser. Clients who want to use Psych::Parser +# should implement a class that inherits from Psych::Handler and define +# events that they can handle. +# +# Psych::Handler defines all events that Psych::Parser can possibly send to +# event handlers. +# +# See Psych::Parser for more details +# +# pkg:gem/psych#lib/psych.rb:15 +class Psych::Handler + # Called when an alias is found to +anchor+. +anchor+ will be the name + # of the anchor found. + # + # === Example + # + # Here we have an example of an array that references itself in YAML: + # + # --- &ponies + # - first element + # - *ponies + # + # &ponies is the anchor, *ponies is the alias. In this case, alias is + # called with "ponies". + # + # pkg:gem/psych#lib/psych/handler.rb:110 + def alias(anchor); end + + # Called when an empty event happens. (Which, as far as I can tell, is + # never). + # + # pkg:gem/psych#lib/psych/handler.rb:236 + def empty; end + + # Called with the document ends. +implicit+ is a boolean value indicating + # whether or not the document has an implicit ending. + # + # === Example + # + # Given the following YAML: + # + # --- + # hello world + # + # +implicit+ will be true. Given this YAML: + # + # --- + # hello world + # ... + # + # +implicit+ will be false. + # + # pkg:gem/psych#lib/psych/handler.rb:93 + def end_document(implicit); end + + # Called when a map ends + # + # pkg:gem/psych#lib/psych/handler.rb:230 + def end_mapping; end + + # Called when a sequence ends. + # + # pkg:gem/psych#lib/psych/handler.rb:191 + def end_sequence; end + + # Called when the YAML stream ends + # + # pkg:gem/psych#lib/psych/handler.rb:241 + def end_stream; end + + # Called before each event with line/column information. + # + # pkg:gem/psych#lib/psych/handler.rb:246 + def event_location(start_line, start_column, end_line, end_column); end + + # Called when a scalar +value+ is found. The scalar may have an + # +anchor+, a +tag+, be implicitly +plain+ or implicitly +quoted+ + # + # +value+ is the string value of the scalar + # +anchor+ is an associated anchor or nil + # +tag+ is an associated tag or nil + # +plain+ is a boolean value + # +quoted+ is a boolean value + # +style+ is an integer indicating the string style + # + # See the constants in Psych::Nodes::Scalar for the possible values of + # +style+ + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # - !str "foo" + # - &anchor fun + # - many + # lines + # - | + # many + # newlines + # + # The above YAML document contains a list with four strings. Here are + # the parameters sent to this method in the same order: + # + # # value anchor tag plain quoted style + # ["foo", nil, "!str", false, false, 3 ] + # ["fun", "anchor", nil, true, false, 1 ] + # ["many lines", nil, nil, true, false, 1 ] + # ["many\nnewlines\n", nil, nil, false, true, 4 ] + # + # pkg:gem/psych#lib/psych/handler.rb:150 + def scalar(value, anchor, tag, plain, quoted, style); end + + # Called when the document starts with the declared +version+, + # +tag_directives+, if the document is +implicit+. + # + # +version+ will be an array of integers indicating the YAML version being + # dealt with, +tag_directives+ is a list of tuples indicating the prefix + # and suffix of each tag, and +implicit+ is a boolean indicating whether + # the document is started implicitly. + # + # === Example + # + # Given the following YAML: + # + # %YAML 1.1 + # %TAG ! tag:tenderlovemaking.com,2009: + # --- !squee + # + # The parameters for start_document must be this: + # + # version # => [1, 1] + # tag_directives # => [["!", "tag:tenderlovemaking.com,2009:"]] + # implicit # => false + # + # pkg:gem/psych#lib/psych/handler.rb:72 + def start_document(version, tag_directives, implicit); end + + # Called when a map starts. + # + # +anchor+ is the anchor associated with the map or +nil+. + # +tag+ is the tag associated with the map or +nil+. + # +implicit+ is a boolean indicating whether or not the map was implicitly + # started. + # +style+ is an integer indicating the mapping style. + # + # See the constants in Psych::Nodes::Mapping for the possible values of + # +style+. + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # k: !!map { hello: world } + # v: &pewpew + # hello: world + # + # The above YAML document consists of three maps, an outer map that contains + # two inner maps. Below is a matrix of the parameters sent in order to + # represent these three maps: + # + # # anchor tag implicit style + # [nil, nil, true, 1 ] + # [nil, "tag:yaml.org,2002:map", false, 2 ] + # ["pewpew", nil, true, 1 ] + # + # pkg:gem/psych#lib/psych/handler.rb:225 + def start_mapping(anchor, tag, implicit, style); end + + # Called when a sequence is started. + # + # +anchor+ is the anchor associated with the sequence or nil. + # +tag+ is the tag associated with the sequence or nil. + # +implicit+ a boolean indicating whether or not the sequence was implicitly + # started. + # +style+ is an integer indicating the list style. + # + # See the constants in Psych::Nodes::Sequence for the possible values of + # +style+. + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # - !!seq [ + # a + # ] + # - &pewpew + # - b + # + # The above YAML document consists of three lists, an outer list that + # contains two inner lists. Here is a matrix of the parameters sent + # to represent these lists: + # + # # anchor tag implicit style + # [nil, nil, true, 1 ] + # [nil, "tag:yaml.org,2002:seq", false, 2 ] + # ["pewpew", nil, true, 1 ] + # + # pkg:gem/psych#lib/psych/handler.rb:186 + def start_sequence(anchor, tag, implicit, style); end + + # Called with +encoding+ when the YAML stream starts. This method is + # called once per stream. A stream may contain multiple documents. + # + # See the constants in Psych::Parser for the possible values of +encoding+. + # + # pkg:gem/psych#lib/psych/handler.rb:47 + def start_stream(encoding); end + + # Is this handler a streaming handler? + # + # pkg:gem/psych#lib/psych/handler.rb:251 + def streaming?; end +end + +# Configuration options for dumping YAML. +# +# pkg:gem/psych#lib/psych/handler.rb:16 +class Psych::Handler::DumperOptions + # pkg:gem/psych#lib/psych/handler.rb:19 + def initialize; end + + # pkg:gem/psych#lib/psych/handler.rb:17 + def canonical; end + + # pkg:gem/psych#lib/psych/handler.rb:17 + def canonical=(_arg0); end + + # pkg:gem/psych#lib/psych/handler.rb:17 + def indentation; end + + # pkg:gem/psych#lib/psych/handler.rb:17 + def indentation=(_arg0); end + + # pkg:gem/psych#lib/psych/handler.rb:17 + def line_width; end + + # pkg:gem/psych#lib/psych/handler.rb:17 + def line_width=(_arg0); end +end + +# pkg:gem/psych#lib/psych/handlers/document_stream.rb:6 +class Psych::Handlers::DocumentStream < ::Psych::TreeBuilder + # pkg:gem/psych#lib/psych/handlers/document_stream.rb:7 + def initialize(&block); end + + # pkg:gem/psych#lib/psych/handlers/document_stream.rb:17 + def end_document(implicit_end = T.unsafe(nil)); end + + # pkg:gem/psych#lib/psych/handlers/document_stream.rb:12 + def start_document(version, tag_directives, implicit); end +end + +# pkg:gem/psych#lib/psych/json/ruby_events.rb:4 +module Psych::JSON::RubyEvents + # pkg:gem/psych#lib/psych/json/ruby_events.rb:10 + def visit_DateTime(o); end + + # pkg:gem/psych#lib/psych/json/ruby_events.rb:14 + def visit_String(o); end + + # pkg:gem/psych#lib/psych/json/ruby_events.rb:17 + def visit_Symbol(o); end + + # pkg:gem/psych#lib/psych/json/ruby_events.rb:5 + def visit_Time(o); end +end + +# pkg:gem/psych#lib/psych/json/stream.rb:7 +class Psych::JSON::Stream < ::Psych::Visitors::JSONTree + include ::Psych::Streaming + extend ::Psych::Streaming::ClassMethods +end + +# pkg:gem/psych#lib/psych/json/stream.rb:12 +class Psych::JSON::Stream::Emitter < ::Psych::Stream::Emitter + include ::Psych::JSON::YAMLEvents +end + +# Psych::JSON::TreeBuilder is an event based AST builder. Events are sent +# to an instance of Psych::JSON::TreeBuilder and a JSON AST is constructed. +# +# pkg:gem/psych#lib/psych/json/tree_builder.rb:9 +class Psych::JSON::TreeBuilder < ::Psych::TreeBuilder + include ::Psych::JSON::YAMLEvents +end + +# pkg:gem/psych#lib/psych/json/yaml_events.rb:4 +module Psych::JSON::YAMLEvents + # pkg:gem/psych#lib/psych/json/yaml_events.rb:9 + def end_document(implicit_end = T.unsafe(nil)); end + + # pkg:gem/psych#lib/psych/json/yaml_events.rb:21 + def scalar(value, anchor, tag, plain, quoted, style); end + + # pkg:gem/psych#lib/psych/json/yaml_events.rb:5 + def start_document(version, tag_directives, implicit); end + + # pkg:gem/psych#lib/psych/json/yaml_events.rb:13 + def start_mapping(anchor, tag, implicit, style); end + + # pkg:gem/psych#lib/psych/json/yaml_events.rb:17 + def start_sequence(anchor, tag, implicit, style); end +end + +# This class represents a {YAML Alias}[http://yaml.org/spec/1.1/#alias]. +# It points to an +anchor+. +# +# A Psych::Nodes::Alias is a terminal node and may have no children. +# +# pkg:gem/psych#lib/psych/nodes/alias.rb:9 +class Psych::Nodes::Alias < ::Psych::Nodes::Node + # Create a new Alias that points to an +anchor+ + # + # pkg:gem/psych#lib/psych/nodes/alias.rb:14 + def initialize(anchor); end + + # pkg:gem/psych#lib/psych/nodes/alias.rb:18 + def alias?; end + + # The anchor this alias links to + # + # pkg:gem/psych#lib/psych/nodes/alias.rb:11 + def anchor; end + + # The anchor this alias links to + # + # pkg:gem/psych#lib/psych/nodes/alias.rb:11 + def anchor=(_arg0); end +end + +# This represents a YAML Document. This node must be a child of +# Psych::Nodes::Stream. A Psych::Nodes::Document must have one child, +# and that child may be one of the following: +# +# * Psych::Nodes::Sequence +# * Psych::Nodes::Mapping +# * Psych::Nodes::Scalar +# +# pkg:gem/psych#lib/psych/nodes/document.rb:12 +class Psych::Nodes::Document < ::Psych::Nodes::Node + # Create a new Psych::Nodes::Document object. + # + # +version+ is a list indicating the YAML version. + # +tags_directives+ is a list of tag directive declarations + # +implicit+ is a flag indicating whether the document will be implicitly + # started. + # + # == Example: + # This creates a YAML document object that represents a YAML 1.1 document + # with one tag directive, and has an implicit start: + # + # Psych::Nodes::Document.new( + # [1,1], + # [["!", "tag:tenderlovemaking.com,2009:"]], + # true + # ) + # + # == See Also + # See also Psych::Handler#start_document + # + # pkg:gem/psych#lib/psych/nodes/document.rb:45 + def initialize(version = T.unsafe(nil), tag_directives = T.unsafe(nil), implicit = T.unsafe(nil)); end + + # pkg:gem/psych#lib/psych/nodes/document.rb:60 + def document?; end + + # Was this document implicitly created? + # + # pkg:gem/psych#lib/psych/nodes/document.rb:20 + def implicit; end + + # Was this document implicitly created? + # + # pkg:gem/psych#lib/psych/nodes/document.rb:20 + def implicit=(_arg0); end + + # Is the end of the document implicit? + # + # pkg:gem/psych#lib/psych/nodes/document.rb:23 + def implicit_end; end + + # Is the end of the document implicit? + # + # pkg:gem/psych#lib/psych/nodes/document.rb:23 + def implicit_end=(_arg0); end + + # Returns the root node. A Document may only have one root node: + # http://yaml.org/spec/1.1/#id898031 + # + # pkg:gem/psych#lib/psych/nodes/document.rb:56 + def root; end + + # A list of tag directives for this document + # + # pkg:gem/psych#lib/psych/nodes/document.rb:17 + def tag_directives; end + + # A list of tag directives for this document + # + # pkg:gem/psych#lib/psych/nodes/document.rb:17 + def tag_directives=(_arg0); end + + # The version of the YAML document + # + # pkg:gem/psych#lib/psych/nodes/document.rb:14 + def version; end + + # The version of the YAML document + # + # pkg:gem/psych#lib/psych/nodes/document.rb:14 + def version=(_arg0); end +end + +# This class represents a {YAML Mapping}[http://yaml.org/spec/1.1/#mapping]. +# +# A Psych::Nodes::Mapping node may have 0 or more children, but must have +# an even number of children. Here are the valid children a +# Psych::Nodes::Mapping node may have: +# +# * Psych::Nodes::Sequence +# * Psych::Nodes::Mapping +# * Psych::Nodes::Scalar +# * Psych::Nodes::Alias +# +# pkg:gem/psych#lib/psych/nodes/mapping.rb:15 +class Psych::Nodes::Mapping < ::Psych::Nodes::Node + # Create a new Psych::Nodes::Mapping object. + # + # +anchor+ is the anchor associated with the map or +nil+. + # +tag+ is the tag associated with the map or +nil+. + # +implicit+ is a boolean indicating whether or not the map was implicitly + # started. + # +style+ is an integer indicating the mapping style. + # + # == See Also + # See also Psych::Handler#start_mapping + # + # pkg:gem/psych#lib/psych/nodes/mapping.rb:48 + def initialize(anchor = T.unsafe(nil), tag = T.unsafe(nil), implicit = T.unsafe(nil), style = T.unsafe(nil)); end + + # The optional anchor for this mapping + # + # pkg:gem/psych#lib/psych/nodes/mapping.rb:26 + def anchor; end + + # The optional anchor for this mapping + # + # pkg:gem/psych#lib/psych/nodes/mapping.rb:26 + def anchor=(_arg0); end + + # Is this an implicit mapping? + # + # pkg:gem/psych#lib/psych/nodes/mapping.rb:32 + def implicit; end + + # Is this an implicit mapping? + # + # pkg:gem/psych#lib/psych/nodes/mapping.rb:32 + def implicit=(_arg0); end + + # pkg:gem/psych#lib/psych/nodes/mapping.rb:56 + def mapping?; end + + # The style of this mapping + # + # pkg:gem/psych#lib/psych/nodes/mapping.rb:35 + def style; end + + # The style of this mapping + # + # pkg:gem/psych#lib/psych/nodes/mapping.rb:35 + def style=(_arg0); end + + # The optional tag for this mapping + # + # pkg:gem/psych#lib/psych/nodes/mapping.rb:29 + def tag; end + + # The optional tag for this mapping + # + # pkg:gem/psych#lib/psych/nodes/mapping.rb:29 + def tag=(_arg0); end +end + +# The base class for any Node in a YAML parse tree. This class should +# never be instantiated. +# +# pkg:gem/psych#lib/psych/nodes/node.rb:10 +class Psych::Nodes::Node + include ::Enumerable + + # Create a new Psych::Nodes::Node + # + # pkg:gem/psych#lib/psych/nodes/node.rb:32 + def initialize; end + + # pkg:gem/psych#lib/psych/nodes/node.rb:68 + def alias?; end + + # The children of this node + # + # pkg:gem/psych#lib/psych/nodes/node.rb:14 + def children; end + + # pkg:gem/psych#lib/psych/nodes/node.rb:69 + def document?; end + + # Iterate over each node in the tree. Yields each node to +block+ depth + # first. + # + # pkg:gem/psych#lib/psych/nodes/node.rb:39 + def each(&block); end + + # The column number where this node ends + # + # pkg:gem/psych#lib/psych/nodes/node.rb:29 + def end_column; end + + # The column number where this node ends + # + # pkg:gem/psych#lib/psych/nodes/node.rb:29 + def end_column=(_arg0); end + + # The line number where this node ends + # + # pkg:gem/psych#lib/psych/nodes/node.rb:26 + def end_line; end + + # The line number where this node ends + # + # pkg:gem/psych#lib/psych/nodes/node.rb:26 + def end_line=(_arg0); end + + # pkg:gem/psych#lib/psych/nodes/node.rb:70 + def mapping?; end + + # pkg:gem/psych#lib/psych/nodes/node.rb:71 + def scalar?; end + + # pkg:gem/psych#lib/psych/nodes/node.rb:72 + def sequence?; end + + # The column number where this node start + # + # pkg:gem/psych#lib/psych/nodes/node.rb:23 + def start_column; end + + # The column number where this node start + # + # pkg:gem/psych#lib/psych/nodes/node.rb:23 + def start_column=(_arg0); end + + # The line number where this node start + # + # pkg:gem/psych#lib/psych/nodes/node.rb:20 + def start_line; end + + # The line number where this node start + # + # pkg:gem/psych#lib/psych/nodes/node.rb:20 + def start_line=(_arg0); end + + # pkg:gem/psych#lib/psych/nodes/node.rb:73 + def stream?; end + + # An associated tag + # + # pkg:gem/psych#lib/psych/nodes/node.rb:17 + def tag; end + + # Convert this node to Ruby. + # + # See also Psych::Visitors::ToRuby + # + # pkg:gem/psych#lib/psych/nodes/node.rb:48 + def to_ruby(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # pkg:gem/psych#lib/psych/nodes/node.rb:66 + def to_yaml(io = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/psych#lib/psych/nodes/node.rb:51 + def transform(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Convert this node to YAML. + # + # See also Psych::Visitors::Emitter + # + # pkg:gem/psych#lib/psych/nodes/node.rb:57 + def yaml(io = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# This class represents a {YAML Scalar}[http://yaml.org/spec/1.1/#id858081]. +# +# This node type is a terminal node and should not have any children. +# +# pkg:gem/psych#lib/psych/nodes/scalar.rb:8 +class Psych::Nodes::Scalar < ::Psych::Nodes::Node + # Create a new Psych::Nodes::Scalar object. + # + # +value+ is the string value of the scalar + # +anchor+ is an associated anchor or nil + # +tag+ is an associated tag or nil + # +plain+ is a boolean value + # +quoted+ is a boolean value + # +style+ is an integer indicating the string style + # + # == See Also + # + # See also Psych::Handler#scalar + # + # pkg:gem/psych#lib/psych/nodes/scalar.rb:58 + def initialize(value, anchor = T.unsafe(nil), tag = T.unsafe(nil), plain = T.unsafe(nil), quoted = T.unsafe(nil), style = T.unsafe(nil)); end + + # The anchor value (if there is one) + # + # pkg:gem/psych#lib/psych/nodes/scalar.rb:31 + def anchor; end + + # The anchor value (if there is one) + # + # pkg:gem/psych#lib/psych/nodes/scalar.rb:31 + def anchor=(_arg0); end + + # Is this a plain scalar? + # + # pkg:gem/psych#lib/psych/nodes/scalar.rb:37 + def plain; end + + # Is this a plain scalar? + # + # pkg:gem/psych#lib/psych/nodes/scalar.rb:37 + def plain=(_arg0); end + + # Is this scalar quoted? + # + # pkg:gem/psych#lib/psych/nodes/scalar.rb:40 + def quoted; end + + # Is this scalar quoted? + # + # pkg:gem/psych#lib/psych/nodes/scalar.rb:40 + def quoted=(_arg0); end + + # pkg:gem/psych#lib/psych/nodes/scalar.rb:67 + def scalar?; end + + # The style of this scalar + # + # pkg:gem/psych#lib/psych/nodes/scalar.rb:43 + def style; end + + # The style of this scalar + # + # pkg:gem/psych#lib/psych/nodes/scalar.rb:43 + def style=(_arg0); end + + # The tag value (if there is one) + # + # pkg:gem/psych#lib/psych/nodes/scalar.rb:34 + def tag; end + + # The tag value (if there is one) + # + # pkg:gem/psych#lib/psych/nodes/scalar.rb:34 + def tag=(_arg0); end + + # The scalar value + # + # pkg:gem/psych#lib/psych/nodes/scalar.rb:28 + def value; end + + # The scalar value + # + # pkg:gem/psych#lib/psych/nodes/scalar.rb:28 + def value=(_arg0); end +end + +# This class represents a +# {YAML sequence}[http://yaml.org/spec/1.1/#sequence/syntax]. +# +# A YAML sequence is basically a list, and looks like this: +# +# %YAML 1.1 +# --- +# - I am +# - a Sequence +# +# A YAML sequence may have an anchor like this: +# +# %YAML 1.1 +# --- +# &A [ +# "This sequence", +# "has an anchor" +# ] +# +# A YAML sequence may also have a tag like this: +# +# %YAML 1.1 +# --- +# !!seq [ +# "This sequence", +# "has a tag" +# ] +# +# This class represents a sequence in a YAML document. A +# Psych::Nodes::Sequence node may have 0 or more children. Valid children +# for this node are: +# +# * Psych::Nodes::Sequence +# * Psych::Nodes::Mapping +# * Psych::Nodes::Scalar +# * Psych::Nodes::Alias +# +# pkg:gem/psych#lib/psych/nodes/sequence.rb:41 +class Psych::Nodes::Sequence < ::Psych::Nodes::Node + # Create a new object representing a YAML sequence. + # + # +anchor+ is the anchor associated with the sequence or nil. + # +tag+ is the tag associated with the sequence or nil. + # +implicit+ a boolean indicating whether or not the sequence was + # implicitly started. + # +style+ is an integer indicating the list style. + # + # See Psych::Handler#start_sequence + # + # pkg:gem/psych#lib/psych/nodes/sequence.rb:73 + def initialize(anchor = T.unsafe(nil), tag = T.unsafe(nil), implicit = T.unsafe(nil), style = T.unsafe(nil)); end + + # The anchor for this sequence (if any) + # + # pkg:gem/psych#lib/psych/nodes/sequence.rb:52 + def anchor; end + + # The anchor for this sequence (if any) + # + # pkg:gem/psych#lib/psych/nodes/sequence.rb:52 + def anchor=(_arg0); end + + # Is this sequence started implicitly? + # + # pkg:gem/psych#lib/psych/nodes/sequence.rb:58 + def implicit; end + + # Is this sequence started implicitly? + # + # pkg:gem/psych#lib/psych/nodes/sequence.rb:58 + def implicit=(_arg0); end + + # pkg:gem/psych#lib/psych/nodes/sequence.rb:81 + def sequence?; end + + # The sequence style used + # + # pkg:gem/psych#lib/psych/nodes/sequence.rb:61 + def style; end + + # The sequence style used + # + # pkg:gem/psych#lib/psych/nodes/sequence.rb:61 + def style=(_arg0); end + + # The tag name for this sequence (if any) + # + # pkg:gem/psych#lib/psych/nodes/sequence.rb:55 + def tag; end + + # The tag name for this sequence (if any) + # + # pkg:gem/psych#lib/psych/nodes/sequence.rb:55 + def tag=(_arg0); end +end + +# Represents a YAML stream. This is the root node for any YAML parse +# tree. This node must have one or more child nodes. The only valid +# child node for a Psych::Nodes::Stream node is Psych::Nodes::Document. +# +# pkg:gem/psych#lib/psych/nodes/stream.rb:8 +class Psych::Nodes::Stream < ::Psych::Nodes::Node + # Create a new Psych::Nodes::Stream node with an +encoding+ that + # defaults to Psych::Nodes::Stream::UTF8. + # + # See also Psych::Handler#start_stream + # + # pkg:gem/psych#lib/psych/nodes/stream.rb:32 + def initialize(encoding = T.unsafe(nil)); end + + # The encoding used for this stream + # + # pkg:gem/psych#lib/psych/nodes/stream.rb:25 + def encoding; end + + # The encoding used for this stream + # + # pkg:gem/psych#lib/psych/nodes/stream.rb:25 + def encoding=(_arg0); end + + # pkg:gem/psych#lib/psych/nodes/stream.rb:37 + def stream?; end +end + +# YAML event parser class. This class parses a YAML document and calls +# events on the handler that is passed to the constructor. The events can +# be used for things such as constructing a YAML AST or deserializing YAML +# documents. It can even be fed back to Psych::Emitter to emit the same +# document that was parsed. +# +# See Psych::Handler for documentation on the events that Psych::Parser emits. +# +# Here is an example that prints out ever scalar found in a YAML document: +# +# # Handler for detecting scalar values +# class ScalarHandler < Psych::Handler +# def scalar value, anchor, tag, plain, quoted, style +# puts value +# end +# end +# +# parser = Psych::Parser.new(ScalarHandler.new) +# parser.parse(yaml_document) +# +# Here is an example that feeds the parser back in to Psych::Emitter. The +# YAML document is read from STDIN and written back out to STDERR: +# +# parser = Psych::Parser.new(Psych::Emitter.new($stderr)) +# parser.parse($stdin) +# +# Psych uses Psych::Parser in combination with Psych::TreeBuilder to +# construct an AST of the parsed YAML document. +# +# pkg:gem/psych#lib/psych.rb:15 +class Psych::Parser + # Creates a new Psych::Parser instance with +handler+. YAML events will + # be called on +handler+. See Psych::Parser for more details. + # + # pkg:gem/psych#lib/psych/parser.rb:47 + def initialize(handler = T.unsafe(nil)); end + + # Set the encoding for this parser to +encoding+ + # + # pkg:gem/psych#lib/psych/parser.rb:41 + def external_encoding=(_arg0); end + + # The handler on which events will be called + # + # pkg:gem/psych#lib/psych/parser.rb:38 + def handler; end + + # The handler on which events will be called + # + # pkg:gem/psych#lib/psych/parser.rb:38 + def handler=(_arg0); end + + # pkg:gem/psych#lib/psych.rb:15 + def mark; end + + # call-seq: + # parser.parse(yaml) + # + # Parse the YAML document contained in +yaml+. Events will be called on + # the handler set on the parser instance. + # + # See Psych::Parser and Psych::Parser#handler + # + # pkg:gem/psych#lib/psych/parser.rb:61 + def parse(yaml, path = T.unsafe(nil)); end + + private + + # pkg:gem/psych#lib/psych.rb:15 + def _native_parse(_arg0, _arg1, _arg2); end +end + +# Scan scalars for built in types +# +# pkg:gem/psych#lib/psych/scalar_scanner.rb:6 +class Psych::ScalarScanner + # Create a new scanner + # + # pkg:gem/psych#lib/psych/scalar_scanner.rb:30 + def initialize(class_loader, strict_integer: T.unsafe(nil)); end + + # pkg:gem/psych#lib/psych/scalar_scanner.rb:27 + def class_loader; end + + # Parse and return an int from +string+ + # + # pkg:gem/psych#lib/psych/scalar_scanner.rb:108 + def parse_int(string); end + + # Parse and return a Time from +string+ + # + # pkg:gem/psych#lib/psych/scalar_scanner.rb:114 + def parse_time(string); end + + # Tokenize +string+ returning the Ruby object + # + # pkg:gem/psych#lib/psych/scalar_scanner.rb:37 + def tokenize(string); end +end + +# Same as above, but allows commas. +# Not to YML spec, but kept for backwards compatibility +# +# pkg:gem/psych#lib/psych/scalar_scanner.rb:22 +Psych::ScalarScanner::INTEGER_LEGACY = T.let(T.unsafe(nil), Regexp) + +# Taken from http://yaml.org/type/int.html and modified to ensure at least one numerical symbol exists +# +# pkg:gem/psych#lib/psych/scalar_scanner.rb:15 +Psych::ScalarScanner::INTEGER_STRICT = T.let(T.unsafe(nil), Regexp) + +# Psych::Stream is a streaming YAML emitter. It will not buffer your YAML, +# but send it straight to an IO. +# +# Here is an example use: +# +# stream = Psych::Stream.new($stdout) +# stream.start +# stream.push({:foo => 'bar'}) +# stream.finish +# +# YAML will be immediately emitted to $stdout with no buffering. +# +# Psych::Stream#start will take a block and ensure that Psych::Stream#finish +# is called, so you can do this form: +# +# stream = Psych::Stream.new($stdout) +# stream.start do |em| +# em.push(:foo => 'bar') +# end +# +# pkg:gem/psych#lib/psych/stream.rb:24 +class Psych::Stream < ::Psych::Visitors::YAMLTree + include ::Psych::Streaming + extend ::Psych::Streaming::ClassMethods +end + +# pkg:gem/psych#lib/psych/stream.rb:25 +class Psych::Stream::Emitter < ::Psych::Emitter + # pkg:gem/psych#lib/psych/stream.rb:26 + def end_document(implicit_end = T.unsafe(nil)); end + + # pkg:gem/psych#lib/psych/stream.rb:30 + def streaming?; end +end + +# pkg:gem/psych#lib/psych/streaming.rb:3 +module Psych::Streaming + # Start streaming using +encoding+ + # + # pkg:gem/psych#lib/psych/streaming.rb:18 + def start(encoding = T.unsafe(nil)); end + + private + + # pkg:gem/psych#lib/psych/streaming.rb:25 + def register(target, obj); end +end + +# pkg:gem/psych#lib/psych/streaming.rb:4 +module Psych::Streaming::ClassMethods + # Create a new streaming emitter. Emitter will print to +io+. See + # Psych::Stream for an example. + # + # pkg:gem/psych#lib/psych/streaming.rb:8 + def new(io); end +end + +# pkg:gem/psych#lib/psych/syntax_error.rb:5 +class Psych::SyntaxError < ::Psych::Exception + # pkg:gem/psych#lib/psych/syntax_error.rb:8 + def initialize(file, line, col, offset, problem, context); end + + # pkg:gem/psych#lib/psych/syntax_error.rb:6 + def column; end + + # pkg:gem/psych#lib/psych/syntax_error.rb:6 + def context; end + + # pkg:gem/psych#lib/psych/syntax_error.rb:6 + def file; end + + # pkg:gem/psych#lib/psych/syntax_error.rb:6 + def line; end + + # pkg:gem/psych#lib/psych/syntax_error.rb:6 + def offset; end + + # pkg:gem/psych#lib/psych/syntax_error.rb:6 + def problem; end +end + +# This class works in conjunction with Psych::Parser to build an in-memory +# parse tree that represents a YAML document. +# +# == Example +# +# parser = Psych::Parser.new Psych::TreeBuilder.new +# parser.parse('--- foo') +# tree = parser.handler.root +# +# See Psych::Handler for documentation on the event methods used in this +# class. +# +# pkg:gem/psych#lib/psych/tree_builder.rb:17 +class Psych::TreeBuilder < ::Psych::Handler + # Create a new TreeBuilder instance + # + # pkg:gem/psych#lib/psych/tree_builder.rb:22 + def initialize; end + + # pkg:gem/psych#lib/psych/tree_builder.rb:103 + def alias(anchor); end + + # Handles end_document events with +version+, +tag_directives+, + # and +implicit+ styling. + # + # See Psych::Handler#start_document + # + # pkg:gem/psych#lib/psych/tree_builder.rb:77 + def end_document(implicit_end = T.unsafe(nil)); end + + # pkg:gem/psych#lib/psych/tree_builder.rb:44 + def end_mapping; end + + # pkg:gem/psych#lib/psych/tree_builder.rb:44 + def end_sequence; end + + # pkg:gem/psych#lib/psych/tree_builder.rb:90 + def end_stream; end + + # pkg:gem/psych#lib/psych/tree_builder.rb:33 + def event_location(start_line, start_column, end_line, end_column); end + + # Returns the root node for the built tree + # + # pkg:gem/psych#lib/psych/tree_builder.rb:19 + def root; end + + # pkg:gem/psych#lib/psych/tree_builder.rb:96 + def scalar(value, anchor, tag, plain, quoted, style); end + + # Handles start_document events with +version+, +tag_directives+, + # and +implicit+ styling. + # + # See Psych::Handler#start_document + # + # pkg:gem/psych#lib/psych/tree_builder.rb:65 + def start_document(version, tag_directives, implicit); end + + # pkg:gem/psych#lib/psych/tree_builder.rb:44 + def start_mapping(anchor, tag, implicit, style); end + + # pkg:gem/psych#lib/psych/tree_builder.rb:44 + def start_sequence(anchor, tag, implicit, style); end + + # pkg:gem/psych#lib/psych/tree_builder.rb:84 + def start_stream(encoding); end + + private + + # pkg:gem/psych#lib/psych/tree_builder.rb:116 + def pop; end + + # pkg:gem/psych#lib/psych/tree_builder.rb:111 + def push(value); end + + # pkg:gem/psych#lib/psych/tree_builder.rb:132 + def set_end_location(node); end + + # pkg:gem/psych#lib/psych/tree_builder.rb:122 + def set_location(node); end + + # pkg:gem/psych#lib/psych/tree_builder.rb:127 + def set_start_location(node); end +end + +# The version of Psych you are using +# +# pkg:gem/psych#lib/psych/versions.rb:5 +Psych::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/psych#lib/psych/visitors/depth_first.rb:4 +class Psych::Visitors::DepthFirst < ::Psych::Visitors::Visitor + # pkg:gem/psych#lib/psych/visitors/depth_first.rb:5 + def initialize(block); end + + private + + # pkg:gem/psych#lib/psych/visitors/depth_first.rb:11 + def nary(o); end + + # pkg:gem/psych#lib/psych/visitors/depth_first.rb:20 + def terminal(o); end + + # pkg:gem/psych#lib/psych/visitors/depth_first.rb:24 + def visit_Psych_Nodes_Alias(o); end + + # pkg:gem/psych#lib/psych/visitors/depth_first.rb:16 + def visit_Psych_Nodes_Document(o); end + + # pkg:gem/psych#lib/psych/visitors/depth_first.rb:18 + def visit_Psych_Nodes_Mapping(o); end + + # pkg:gem/psych#lib/psych/visitors/depth_first.rb:23 + def visit_Psych_Nodes_Scalar(o); end + + # pkg:gem/psych#lib/psych/visitors/depth_first.rb:17 + def visit_Psych_Nodes_Sequence(o); end + + # pkg:gem/psych#lib/psych/visitors/depth_first.rb:15 + def visit_Psych_Nodes_Stream(o); end +end + +# pkg:gem/psych#lib/psych/visitors/emitter.rb:4 +class Psych::Visitors::Emitter < ::Psych::Visitors::Visitor + # pkg:gem/psych#lib/psych/visitors/emitter.rb:5 + def initialize(io, options = T.unsafe(nil)); end + + # pkg:gem/psych#lib/psych/visitors/emitter.rb:47 + def visit_Psych_Nodes_Alias(o); end + + # pkg:gem/psych#lib/psych/visitors/emitter.rb:25 + def visit_Psych_Nodes_Document(o); end + + # pkg:gem/psych#lib/psych/visitors/emitter.rb:41 + def visit_Psych_Nodes_Mapping(o); end + + # pkg:gem/psych#lib/psych/visitors/emitter.rb:31 + def visit_Psych_Nodes_Scalar(o); end + + # pkg:gem/psych#lib/psych/visitors/emitter.rb:35 + def visit_Psych_Nodes_Sequence(o); end + + # pkg:gem/psych#lib/psych/visitors/emitter.rb:19 + def visit_Psych_Nodes_Stream(o); end +end + +# pkg:gem/psych#lib/psych/visitors/json_tree.rb:6 +class Psych::Visitors::JSONTree < ::Psych::Visitors::YAMLTree + include ::Psych::JSON::RubyEvents + + # pkg:gem/psych#lib/psych/visitors/json_tree.rb:16 + def accept(target); end + + class << self + # pkg:gem/psych#lib/psych/visitors/json_tree.rb:9 + def create(options = T.unsafe(nil)); end + end +end + +# pkg:gem/psych#lib/psych/visitors/to_ruby.rb:469 +class Psych::Visitors::NoAliasRuby < ::Psych::Visitors::ToRuby + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:470 + def visit_Psych_Nodes_Alias(o); end +end + +# pkg:gem/psych#lib/psych/visitors/yaml_tree.rb:580 +class Psych::Visitors::RestrictedYAMLTree < ::Psych::Visitors::YAMLTree + # pkg:gem/psych#lib/psych/visitors/yaml_tree.rb:592 + def initialize(emitter, ss, options); end + + # pkg:gem/psych#lib/psych/visitors/yaml_tree.rb:605 + def accept(target); end + + # pkg:gem/psych#lib/psych/visitors/yaml_tree.rb:617 + def visit_Symbol(sym); end +end + +# pkg:gem/psych#lib/psych/visitors/yaml_tree.rb:581 +Psych::Visitors::RestrictedYAMLTree::DEFAULT_PERMITTED_CLASSES = T.let(T.unsafe(nil), Hash) + +# This class walks a YAML AST, converting each node to Ruby +# +# pkg:gem/psych#lib/psych.rb:15 +class Psych::Visitors::ToRuby < ::Psych::Visitors::Visitor + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:23 + def initialize(ss, class_loader, symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil)); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:34 + def accept(target); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:21 + def class_loader; end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:352 + def visit_Psych_Nodes_Alias(o); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:344 + def visit_Psych_Nodes_Document(o); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:164 + def visit_Psych_Nodes_Mapping(o); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:128 + def visit_Psych_Nodes_Scalar(o); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:132 + def visit_Psych_Nodes_Sequence(o); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:348 + def visit_Psych_Nodes_Stream(o); end + + private + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:369 + def allocate_anon_data(node, members); end + + # pkg:gem/psych#lib/psych.rb:15 + def build_exception(_arg0, _arg1); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:434 + def deduplicate(key); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:51 + def deserialize(o); end + + # pkg:gem/psych#lib/psych.rb:15 + def init_struct(_arg0, _arg1); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:451 + def init_with(o, h, node); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:443 + def merge_key(hash, key, val); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:358 + def register(node, object); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:363 + def register_empty(object); end + + # Convert +klassname+ to a Class + # + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:464 + def resolve_class(klassname); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:446 + def revive(klass, node); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:374 + def revive_data_members(hash, o); end + + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:383 + def revive_hash(hash, o, tagged = T.unsafe(nil)); end + + class << self + # pkg:gem/psych#lib/psych/visitors/to_ruby.rb:15 + def create(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + end +end + +# pkg:gem/psych#lib/psych.rb:15 +class Psych::Visitors::Visitor + # pkg:gem/psych#lib/psych/visitors/visitor.rb:5 + def accept(target); end + + private + + # pkg:gem/psych#lib/psych/visitors/visitor.rb:19 + def dispatch; end + + # pkg:gem/psych#lib/psych/visitors/visitor.rb:29 + def visit(target); end + + class << self + # @api private + # + # pkg:gem/psych#lib/psych/visitors/visitor.rb:12 + def dispatch_cache; end + end +end + +# YAMLTree builds a YAML ast given a Ruby object. For example: +# +# builder = Psych::Visitors::YAMLTree.new +# builder << { :foo => 'bar' } +# builder.tree # => #env['rack.session.options']. Additionally the id of the +# session can be found within the options hash at the key :id. It is +# highly not recommended to change its value. +# +# Is Rack::Utils::Context compatible. +# +# Not included by default; you must require 'rack/session/abstract/id' +# to use. +# +# pkg:gem/rack-session#lib/rack/session/abstract/id.rb:239 +class Rack::Session::Abstract::Persisted + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:257 + def initialize(app, options = T.unsafe(nil)); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:267 + def call(env); end + + # Acquires the session from the environment and the session id from + # the session options and passes them to #write_session. If successful + # and the :defer option is not true, a cookie will be added to the + # response with the session's id. + # + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:381 + def commit_session(req, res); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:271 + def context(env, app = T.unsafe(nil)); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:255 + def default_options; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:255 + def key; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:255 + def same_site; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:255 + def sid_secure; end + + private + + # Session should be committed if it was loaded, any of specific options like :renew, :drop + # or :expire_after was given and the security permissions match. Skips if skip is given. + # + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:350 + def commit_session?(req, session, options); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:416 + def cookie_value(data); end + + # Returns the current session id from the SessionHash. + # + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:336 + def current_session_id(req); end + + # All thread safety and session destroy procedures should occur here. + # Should return a new session id or nil if options[:drop] + # + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:455 + def delete_session(req, sid, options); end + + # Extract session id from request object. + # + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:328 + def extract_session_id(request); end + + # All thread safety and session retrieval procedures should occur here. + # Should return [session_id, session]. + # If nil is provided as the session id, generation of a new valid id + # should occur within. + # + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:440 + def find_session(env, sid); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:367 + def force_options?(options); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:363 + def forced_session_update?(session, options); end + + # Generate a new session id using Ruby #rand. The size of the + # session id is controlled by the :sidbits option. + # Monkey patch this to use custom methods for session id generation. + # + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:296 + def generate_sid(secure = T.unsafe(nil)); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:286 + def initialize_sid; end + + # Extracts the session id from provided cookies and passes it and the + # environment to #find_session. + # + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:320 + def load_session(req); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:359 + def loaded_session?(session); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:282 + def make_request(env); end + + # Sets the lazy session at 'rack.session' and places options and session + # metadata into 'rack.session.options'. + # + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:309 + def prepare_session(req); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:371 + def security_matches?(request, options); end + + # Allow subclasses to prepare_session for different Session classes + # + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:431 + def session_class; end + + # Check if the session exists or not. + # + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:342 + def session_exists?(req); end + + # Sets the cookie back to the client with session id. We skip the cookie + # setting if the value didn't change (sid is the same) or expires was given. + # + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:423 + def set_cookie(request, response, cookie); end + + # All thread safety and session storage procedures should occur here. + # Must return the session id if the session was saved successfully, or + # false if the session could not be saved. + # + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:448 + def write_session(req, sid, session, options); end +end + +# pkg:gem/rack-session#lib/rack/session/abstract/id.rb:240 +Rack::Session::Abstract::Persisted::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rack-session#lib/rack/session/abstract/id.rb:460 +class Rack::Session::Abstract::PersistedSecure < ::Rack::Session::Abstract::Persisted + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:483 + def extract_session_id(*_arg0); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:477 + def generate_sid(*_arg0); end + + private + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:494 + def cookie_value(data); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:490 + def session_class; end +end + +# pkg:gem/rack-session#lib/rack/session/abstract/id.rb:461 +class Rack::Session::Abstract::PersistedSecure::SecureSessionHash < ::Rack::Session::Abstract::SessionHash + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:462 + def [](key); end +end + +# SessionHash is responsible to lazily load the session from store. +# +# pkg:gem/rack-session#lib/rack/session/abstract/id.rb:50 +class Rack::Session::Abstract::SessionHash + include ::Enumerable + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:68 + def initialize(store, req); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:88 + def [](key); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:114 + def []=(key, value); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:120 + def clear; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:146 + def delete(key); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:125 + def destroy; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:93 + def dig(key, *keys); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:83 + def each(&block); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:169 + def empty?; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:159 + def exists?; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:98 + def fetch(key, default = T.unsafe(nil), &block); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:107 + def has_key?(key); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:74 + def id; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:52 + def id=(_arg0); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:112 + def include?(key); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:151 + def inspect; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:111 + def key?(key); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:174 + def keys; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:165 + def loaded?; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:139 + def merge!(hash); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:79 + def options; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:141 + def replace(hash); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:118 + def store(key, value); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:130 + def to_hash; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:135 + def update(hash); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:179 + def values; end + + private + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:194 + def load!; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:186 + def load_for_read!; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:190 + def load_for_write!; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:200 + def stringify_keys(other); end + + class << self + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:56 + def find(req); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:60 + def set(req, session); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:64 + def set_options(req, options); end + end +end + +# pkg:gem/rack-session#lib/rack/session/abstract/id.rb:54 +Rack::Session::Abstract::SessionHash::Unspecified = T.let(T.unsafe(nil), Object) + +# Rack::Session::Cookie provides simple cookie based session management. +# By default, the session is a Ruby Hash that is serialized and encoded as +# a cookie set to :key (default: rack.session). +# +# This middleware accepts a :secrets option which enables encryption of +# session cookies. This option should be one or more random "secret keys" +# that are each at least 64 bytes in length. Multiple secret keys can be +# supplied in an Array, which is useful when rotating secrets. +# +# Several options are also accepted that are passed to Rack::Session::Encryptor. +# These options include: +# * :serialize_json +# Use JSON for message serialization instead of Marshal. This can be +# viewed as a security enhancement. +# * :gzip_over +# For message data over this many bytes, compress it with the deflate +# algorithm. +# +# Refer to Rack::Session::Encryptor for more details on these options. +# +# Prior to version TODO, the session hash was stored as base64 encoded +# marshalled data. When a :secret option was supplied, the integrity of the +# encoded data was protected with HMAC-SHA1. This functionality is still +# supported using a set of a legacy options. +# +# Lastly, a :coder option is also accepted. When used, both encryption and +# the legacy HMAC will be skipped. This option could create security issues +# in your application! +# +# Example: +# +# use Rack::Session::Cookie, { +# key: 'rack.session', +# domain: 'foo.com', +# path: '/', +# expire_after: 2592000, +# secrets: 'a randomly generated, raw binary string 64 bytes in size', +# } +# +# Example using legacy HMAC options: +# +# Rack::Session:Cookie.new(application, { +# # The secret used for legacy HMAC cookies, this enables the functionality +# legacy_hmac_secret: 'legacy secret', +# # legacy_hmac_coder will default to Rack::Session::Cookie::Base64::Marshal +# legacy_hmac_coder: Rack::Session::Cookie::Identity.new, +# # legacy_hmac will default to OpenSSL::Digest::SHA1 +# legacy_hmac: OpenSSL::Digest::SHA256 +# }) +# +# +# Rack::Session::Cookie.new(application, { +# :coder => Rack::Session::Cookie::Identity.new +# }) +# +# +# Rack::Session::Cookie.new(application, { +# :coder => Class.new { +# def encode(str); str.reverse; end +# def decode(str); str.reverse; end +# }.new +# }) +# +# pkg:gem/rack-session#lib/rack/session/cookie.rb:91 +class Rack::Session::Cookie < ::Rack::Session::Abstract::PersistedSecure + # pkg:gem/rack-session#lib/rack/session/cookie.rb:159 + def initialize(app, options = T.unsafe(nil)); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:157 + def coder; end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:157 + def encryptors; end + + private + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:279 + def delete_session(req, session_id, options); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:294 + def encode_session_data(session); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:209 + def extract_session_id(request); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:203 + def find_session(req, sid); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:284 + def legacy_digest_match?(data, digest); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:290 + def legacy_generate_hmac(data); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:252 + def persistent_session_id!(data, sid = T.unsafe(nil)); end + + # Were consider "secure" if: + # * Encrypted cookies are enabled and one or more encryptor is + # initialized + # * The legacy HMAC option is enabled + # * Customer :coder is used, with :let_coder_handle_secure_encoding + # set to true + # + # pkg:gem/rack-session#lib/rack/session/cookie.rb:308 + def secure?(options); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:213 + def unpacked_cookie_data(request); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:267 + def write_session(req, session_id, session, options); end +end + +# Encode session cookies as Base64 +# +# pkg:gem/rack-session#lib/rack/session/cookie.rb:93 +class Rack::Session::Cookie::Base64 + # pkg:gem/rack-session#lib/rack/session/cookie.rb:98 + def decode(str); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:94 + def encode(str); end +end + +# N.B. Unlike other encoding methods, the contained objects must be a +# valid JSON composite type, either a Hash or an Array. +# +# pkg:gem/rack-session#lib/rack/session/cookie.rb:116 +class Rack::Session::Cookie::Base64::JSON < ::Rack::Session::Cookie::Base64 + # pkg:gem/rack-session#lib/rack/session/cookie.rb:121 + def decode(str); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:117 + def encode(obj); end +end + +# Encode session cookies as Marshaled Base64 data +# +# pkg:gem/rack-session#lib/rack/session/cookie.rb:103 +class Rack::Session::Cookie::Base64::Marshal < ::Rack::Session::Cookie::Base64 + # pkg:gem/rack-session#lib/rack/session/cookie.rb:108 + def decode(str); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:104 + def encode(str); end +end + +# pkg:gem/rack-session#lib/rack/session/cookie.rb:127 +class Rack::Session::Cookie::Base64::ZipJSON < ::Rack::Session::Cookie::Base64 + # pkg:gem/rack-session#lib/rack/session/cookie.rb:132 + def decode(str); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:128 + def encode(obj); end +end + +# Use no encoding for session cookies +# +# pkg:gem/rack-session#lib/rack/session/cookie.rb:142 +class Rack::Session::Cookie::Identity + # pkg:gem/rack-session#lib/rack/session/cookie.rb:144 + def decode(str); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:143 + def encode(str); end +end + +# pkg:gem/rack-session#lib/rack/session/cookie.rb:147 +class Rack::Session::Cookie::Marshal + # pkg:gem/rack-session#lib/rack/session/cookie.rb:152 + def decode(str); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:148 + def encode(str); end +end + +# pkg:gem/rack-session#lib/rack/session/cookie.rb:258 +class Rack::Session::Cookie::SessionId + # pkg:gem/rack-session#lib/rack/session/cookie.rb:261 + def initialize(session_id, cookie_value); end + + # pkg:gem/rack-session#lib/rack/session/cookie.rb:259 + def cookie_value; end +end + +# pkg:gem/rack-session#lib/rack/session/encryptor.rb:16 +class Rack::Session::Encryptor + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:347 + def initialize(secret, opts = T.unsafe(nil)); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:362 + def decrypt(base64_data); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:376 + def encrypt(message); end + + private + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:392 + def guess_decryptor(base64_data); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:390 + def v1; end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:390 + def v2; end +end + +# pkg:gem/rack-session#lib/rack/session/encryptor.rb:17 +class Rack::Session::Encryptor::Error < ::StandardError; end + +# pkg:gem/rack-session#lib/rack/session/encryptor.rb:23 +class Rack::Session::Encryptor::InvalidMessage < ::Rack::Session::Encryptor::Error; end + +# pkg:gem/rack-session#lib/rack/session/encryptor.rb:20 +class Rack::Session::Encryptor::InvalidSignature < ::Rack::Session::Encryptor::Error; end + +# pkg:gem/rack-session#lib/rack/session/encryptor.rb:26 +module Rack::Session::Encryptor::Serializable + private + + # Return the deserialized message. The first 2 bytes will be read as the + # amount of padding. + # + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:45 + def deserialized_message(data); end + + # Returns a serialized payload of the message. If a :pad_size is supplied, + # the message will be padded. The first 2 bytes of the returned string will + # indicating the amount of padding. + # + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:32 + def serialize_payload(message); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:54 + def serializer; end +end + +# pkg:gem/rack-session#lib/rack/session/encryptor.rb:59 +class Rack::Session::Encryptor::V1 + include ::Rack::Session::Encryptor::Serializable + + # The secret String must be at least 64 bytes in size. The first 32 bytes + # will be used for the encryption cipher key. The remainder will be used + # for an HMAC key. + # + # Options may include: + # * :serialize_json + # Use JSON for message serialization instead of Marshal. This can be + # viewed as a security enhancement. + # * :pad_size + # Pad encrypted message data, to a multiple of this many bytes + # (default: 32). This can be between 2-4096 bytes, or +nil+ to disable + # padding. + # * :purpose + # Limit messages to a specific purpose. This can be viewed as a + # security enhancement to prevent message reuse from different contexts + # if keys are reused. + # + # Cryptography and Output Format: + # + # urlsafe_encode64(version + random_data + IV + encrypted data + HMAC) + # + # Where: + # * version - 1 byte with value 0x01 + # * random_data - 32 bytes used for generating the per-message secret + # * IV - 16 bytes random initialization vector + # * HMAC - 32 bytes HMAC-SHA-256 of all preceding data, plus the purpose + # value + # + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:89 + def initialize(secret, opts = T.unsafe(nil)); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:113 + def decrypt(base64_data); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:138 + def encrypt(message); end + + private + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:175 + def cipher_secret_from_message_secret(message_secret); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:183 + def compute_signature(data); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:165 + def new_cipher; end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:169 + def new_message_and_cipher_secret; end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:179 + def set_cipher_key(cipher, key); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:190 + def verify_authenticity!(data, signature); end +end + +# pkg:gem/rack-session#lib/rack/session/encryptor.rb:199 +class Rack::Session::Encryptor::V2 + include ::Rack::Session::Encryptor::Serializable + + # The secret String must be at least 32 bytes in size. + # + # Options may include: + # * :pad_size + # Pad encrypted message data, to a multiple of this many bytes + # (default: 32). This can be between 2-4096 bytes, or +nil+ to disable + # padding. + # * :purpose + # Limit messages to a specific purpose. This can be viewed as a + # security enhancement to prevent message reuse from different contexts + # if keys are reused. + # + # Cryptography and Output Format: + # + # strict_encode64(version + salt + IV + authentication tag + ciphertext) + # + # Where: + # * version - 1 byte with value 0x02 + # * salt - 32 bytes used for generating the per-message secret + # * IV - 12 bytes random initialization vector + # * authentication tag - 16 bytes authentication tag generated by the GCM mode, covering version and salt + # + # Considerations about V2: + # + # 1) It uses non URL-safe Base64 encoding as it's faster than its + # URL-safe counterpart - as of Ruby 3.2, Base64.urlsafe_encode64 is + # roughly equivalent to + # + # Base64.strict_encode64(data).tr("-_", "+/") + # + # - and cookie values don't need to be URL-safe. + # + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:233 + def initialize(secret, opts = T.unsafe(nil)); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:257 + def decrypt(base64_data); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:285 + def encrypt(message); end + + private + + # JRuby's OpenSSL implementation doesn't currently support passing + # an argument to #auth_tag. Here we work around that. + # + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:341 + def auth_tag_from(cipher); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:323 + def message_secret_from_salt(salt); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:313 + def new_cipher; end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:317 + def new_salt_and_message_secret; end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:327 + def set_cipher_key(cipher, key); end +end + +# pkg:gem/rack-session#lib/rack/session/constants.rb:9 +Rack::Session::RACK_SESSION = T.let(T.unsafe(nil), String) + +# pkg:gem/rack-session#lib/rack/session/constants.rb:10 +Rack::Session::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String) + +# pkg:gem/rack-session#lib/rack/session/constants.rb:11 +Rack::Session::RACK_SESSION_UNPACKED_COOKIE_DATA = T.let(T.unsafe(nil), String) + +# pkg:gem/rack-session#lib/rack/session/abstract/id.rb:21 +class Rack::Session::SessionId + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:26 + def initialize(public_id); end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:34 + def cookie_value; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:37 + def empty?; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:38 + def inspect; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:30 + def private_id; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:24 + def public_id; end + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:35 + def to_s; end + + private + + # pkg:gem/rack-session#lib/rack/session/abstract/id.rb:42 + def hash_sid(sid); end +end + +# pkg:gem/rack-session#lib/rack/session/abstract/id.rb:22 +Rack::Session::SessionId::ID_VERSION = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/rack-test@2.2.0.rbi b/sorbet/rbi/gems/rack-test@2.2.0.rbi index 948c11848..2e725b9f2 100644 --- a/sorbet/rbi/gems/rack-test@2.2.0.rbi +++ b/sorbet/rbi/gems/rack-test@2.2.0.rbi @@ -4,30 +4,21 @@ # This is an autogenerated file for types exported from the `rack-test` gem. # Please instead update this file by running `bin/tapioca gem rack-test`. -# source://rack-test//lib/rack/test/cookie_jar.rb#6 -module Rack - class << self - # source://rack/2.2.13/lib/rack/version.rb#26 - def release; end - # source://rack/2.2.13/lib/rack/version.rb#19 - def version; end - end -end +# pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:6 +module Rack; end # For backwards compatibility with 1.1.0 and below # -# source://rack-test//lib/rack/test.rb#381 +# pkg:gem/rack-test#lib/rack/test.rb:381 Rack::MockSession = Rack::Test::Session -# source://rack-test//lib/rack/test/cookie_jar.rb#7 +# pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:7 module Rack::Test class << self # Whether the version of rack in use handles encodings. # - # @return [Boolean] - # - # source://rack-test//lib/rack/test.rb#375 + # pkg:gem/rack-test#lib/rack/test.rb:375 def encoding_aware_strings?; end end end @@ -35,117 +26,99 @@ end # Represents individual cookies in the cookie jar. This is considered private # API and behavior of this class can change at any time. # -# source://rack-test//lib/rack/test/cookie_jar.rb#10 +# pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:10 class Rack::Test::Cookie include ::Rack::Utils - # @return [Cookie] a new instance of Cookie - # - # source://rack-test//lib/rack/test/cookie_jar.rb#23 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:23 def initialize(raw, uri = T.unsafe(nil), default_host = T.unsafe(nil)); end # Order cookies by name, path, and domain. # - # source://rack-test//lib/rack/test/cookie_jar.rb#106 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:106 def <=>(other); end # The explicit or implicit domain for the cookie. # - # source://rack-test//lib/rack/test/cookie_jar.rb#59 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:59 def domain; end # Whether the cookie has a value. # - # @return [Boolean] - # - # source://rack-test//lib/rack/test/cookie_jar.rb#54 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:54 def empty?; end # Whether the cookie is currently expired. # - # @return [Boolean] - # - # source://rack-test//lib/rack/test/cookie_jar.rb#86 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:86 def expired?; end # A Time value for when the cookie expires, if the expires option is set. # - # source://rack-test//lib/rack/test/cookie_jar.rb#81 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:81 def expires; end # Whether the cookie has the httponly flag, indicating it is not available via # a javascript API. # - # @return [Boolean] - # - # source://rack-test//lib/rack/test/cookie_jar.rb#71 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:71 def http_only?; end # Cookies that do not match the URI will not be sent in requests to the URI. # - # @return [Boolean] - # - # source://rack-test//lib/rack/test/cookie_jar.rb#101 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:101 def matches?(uri); end # The name of the cookie, will be a string # - # source://rack-test//lib/rack/test/cookie_jar.rb#14 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:14 def name; end # The explicit or implicit path for the cookie. # - # source://rack-test//lib/rack/test/cookie_jar.rb#76 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:76 def path; end # The raw string for the cookie, without options. Will generally be in # name=value format is name and value are provided. # - # source://rack-test//lib/rack/test/cookie_jar.rb#21 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:21 def raw; end # Wether the given cookie can replace the current cookie in the cookie jar. # - # @return [Boolean] - # - # source://rack-test//lib/rack/test/cookie_jar.rb#49 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:49 def replaces?(other); end # Whether the cookie has the secure flag, indicating it can only be sent over # an encrypted connection. # - # @return [Boolean] - # - # source://rack-test//lib/rack/test/cookie_jar.rb#65 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:65 def secure?; end # A hash of cookie options, including the cookie value, but excluding the cookie name. # - # source://rack-test//lib/rack/test/cookie_jar.rb#111 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:111 def to_h; end - # A hash of cookie options, including the cookie value, but excluding the cookie name. - # - # source://rack-test//lib/rack/test/cookie_jar.rb#111 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:120 def to_hash; end # Whether the cookie is valid for the given URI. # - # @return [Boolean] - # - # source://rack-test//lib/rack/test/cookie_jar.rb#91 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:91 def valid?(uri); end # The value of the cookie, will be a string or nil if there is no value. # - # source://rack-test//lib/rack/test/cookie_jar.rb#17 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:17 def value; end private # The default URI to use for the cookie, including just the host. # - # source://rack-test//lib/rack/test/cookie_jar.rb#125 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:125 def default_uri; end end @@ -154,57 +127,55 @@ end # request. This is considered private API and behavior of this # class can change at any time. # -# source://rack-test//lib/rack/test/cookie_jar.rb#134 +# pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:134 class Rack::Test::CookieJar - # @return [CookieJar] a new instance of CookieJar - # - # source://rack-test//lib/rack/test/cookie_jar.rb#137 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:137 def initialize(cookies = T.unsafe(nil), default_host = T.unsafe(nil)); end # Add a Cookie to the cookie jar. # - # source://rack-test//lib/rack/test/cookie_jar.rb#197 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:197 def <<(new_cookie); end # Return the value for first cookie with the given name, or nil # if no such cookie exists. # - # source://rack-test//lib/rack/test/cookie_jar.rb#150 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:150 def [](name); end # Set a cookie with the given name and value in the # cookie jar. # - # source://rack-test//lib/rack/test/cookie_jar.rb#160 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:160 def []=(name, value); end # Delete all cookies with the given name from the cookie jar. # - # source://rack-test//lib/rack/test/cookie_jar.rb#174 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:174 def delete(name); end # Return a raw cookie string for the cookie header to # use for the given URI. # - # source://rack-test//lib/rack/test/cookie_jar.rb#208 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:208 def for(uri); end # Return the first cookie with the given name, or nil if # no such cookie exists. # - # source://rack-test//lib/rack/test/cookie_jar.rb#166 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:166 def get_cookie(name); end # Add a string of raw cookie information to the cookie jar, # if the cookie is valid for the given URI. # Cookies should be separated with a newline. # - # source://rack-test//lib/rack/test/cookie_jar.rb#184 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:184 def merge(raw_cookies, uri = T.unsafe(nil)); end # Return a hash cookie names and cookie values for cookies in the jar. # - # source://rack-test//lib/rack/test/cookie_jar.rb#225 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:225 def to_hash; end private @@ -217,37 +188,37 @@ class Rack::Test::CookieJar # so that when we are done, the cookies will be unique by name and # we'll have grabbed the most specific to the URI. # - # source://rack-test//lib/rack/test/cookie_jar.rb#244 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:244 def each_cookie_for(uri); end # Ensure the copy uses a distinct cookies array. # - # source://rack-test//lib/rack/test/cookie_jar.rb#143 + # pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:143 def initialize_copy(other); end end -# source://rack-test//lib/rack/test/cookie_jar.rb#135 +# pkg:gem/rack-test#lib/rack/test/cookie_jar.rb:135 Rack::Test::CookieJar::DELIMITER = T.let(T.unsafe(nil), String) # The default host to use for requests, when a full URI is not # provided. # -# source://rack-test//lib/rack/test.rb#33 +# pkg:gem/rack-test#lib/rack/test.rb:33 Rack::Test::DEFAULT_HOST = T.let(T.unsafe(nil), String) # The ending boundary in multipart requests # -# source://rack-test//lib/rack/test.rb#42 +# pkg:gem/rack-test#lib/rack/test.rb:42 Rack::Test::END_BOUNDARY = T.let(T.unsafe(nil), String) # The common base class for exceptions raised by Rack::Test # -# source://rack-test//lib/rack/test.rb#45 +# pkg:gem/rack-test#lib/rack/test.rb:45 class Rack::Test::Error < ::StandardError; end # The default multipart boundary to use for multipart request bodies # -# source://rack-test//lib/rack/test.rb#36 +# pkg:gem/rack-test#lib/rack/test.rb:36 Rack::Test::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) # This module serves as the primary integration point for using Rack::Test @@ -268,110 +239,108 @@ Rack::Test::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) # end # end # -# source://rack-test//lib/rack/test/methods.rb#24 +# pkg:gem/rack-test#lib/rack/test/methods.rb:24 module Rack::Test::Methods extend ::Forwardable # Private accessor to avoid uninitialized instance variable warning in Ruby 2.* # - # source://rack-test//lib/rack/test/methods.rb#90 + # pkg:gem/rack-test#lib/rack/test/methods.rb:90 def _rack_test_current_session=(_arg0); end - # source://forwardable/1.3.3/forwardable.rb#231 - def authorize(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def authorize(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def basic_authorize(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def basic_authorize(*_arg0, **_arg1, &_arg2); end # Create a new Rack::Test::Session for #app. # - # source://rack-test//lib/rack/test/methods.rb#40 + # pkg:gem/rack-test#lib/rack/test/methods.rb:40 def build_rack_test_session(_name); end - # source://forwardable/1.3.3/forwardable.rb#231 - def clear_cookies(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def clear_cookies(*_arg0, **_arg1, &_arg2); end # Return the currently actively session. This is the session to # which the delegated methods are sent. # - # source://rack-test//lib/rack/test/methods.rb#55 + # pkg:gem/rack-test#lib/rack/test/methods.rb:55 def current_session; end - # source://forwardable/1.3.3/forwardable.rb#231 - def custom_request(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def custom_request(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def delete(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def env(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def env(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def follow_redirect!(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def follow_redirect!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def get(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def get(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def head(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def head(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def header(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def header(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def last_request(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def last_request(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def last_response(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def last_response(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def options(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def options(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def patch(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def patch(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def post(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def post(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def put(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def put(*_arg0, **_arg1, &_arg2); end - # Return the existing session with the given name, or a new - # rack session. Always use a new session if name is nil. # For backwards compatibility with older rack-test versions. # - # source://rack-test//lib/rack/test/methods.rb#29 + # pkg:gem/rack-test#lib/rack/test/methods.rb:37 def rack_mock_session(name = T.unsafe(nil)); end # Return the existing session with the given name, or a new # rack session. Always use a new session if name is nil. # - # source://rack-test//lib/rack/test/methods.rb#29 + # pkg:gem/rack-test#lib/rack/test/methods.rb:29 def rack_test_session(name = T.unsafe(nil)); end - # source://forwardable/1.3.3/forwardable.rb#231 - def request(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def request(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def set_cookie(*args, **_arg1, &block); end + # pkg:gem/rack-test#lib/rack/test/methods.rb:68 + def set_cookie(*_arg0, **_arg1, &_arg2); end # Create a new session (or reuse an existing session with the given name), # and make it the current session for the given block. # - # source://rack-test//lib/rack/test/methods.rb#61 + # pkg:gem/rack-test#lib/rack/test/methods.rb:61 def with_session(name); end private # Private accessor to avoid uninitialized instance variable warning in Ruby 2.* # - # source://rack-test//lib/rack/test/methods.rb#90 + # pkg:gem/rack-test#lib/rack/test/methods.rb:90 def _rack_test_current_session; end end # The starting boundary in multipart requests # -# source://rack-test//lib/rack/test.rb#39 +# pkg:gem/rack-test#lib/rack/test.rb:39 Rack::Test::START_BOUNDARY = T.let(T.unsafe(nil), String) # Rack::Test::Session handles a series of requests issued to a Rack app. @@ -381,7 +350,7 @@ Rack::Test::START_BOUNDARY = T.let(T.unsafe(nil), String) # Rack::Test::Session's methods are most often called through Rack::Test::Methods, # which will automatically build a session when it's first used. # -# source://rack-test//lib/rack/test.rb#53 +# pkg:gem/rack-test#lib/rack/test.rb:53 class Rack::Test::Session include ::Rack::Utils include ::Rack::Test::Utils @@ -415,23 +384,15 @@ class Rack::Test::Session # response in #last_response. #last_response is also returned by the methods. # If a block is given, #last_response is also yielded to the block. # - # @return [Session] a new instance of Session - # - # source://rack-test//lib/rack/test.rb#99 + # pkg:gem/rack-test#lib/rack/test.rb:99 def initialize(app, default_host = T.unsafe(nil)); end # Run a block after the each request completes. # - # source://rack-test//lib/rack/test.rb#118 + # pkg:gem/rack-test#lib/rack/test.rb:118 def after_request(&block); end - # Set the username and password for HTTP Basic authorization, to be - # included in subsequent requests in the HTTP_AUTHORIZATION header. - # - # Example: - # basic_authorize "bryan", "secret" - # - # source://rack-test//lib/rack/test.rb#198 + # pkg:gem/rack-test#lib/rack/test.rb:203 def authorize(username, password); end # Set the username and password for HTTP Basic authorization, to be @@ -440,22 +401,22 @@ class Rack::Test::Session # Example: # basic_authorize "bryan", "secret" # - # source://rack-test//lib/rack/test.rb#198 + # pkg:gem/rack-test#lib/rack/test.rb:198 def basic_authorize(username, password); end # Replace the current cookie jar with an empty cookie jar. # - # source://rack-test//lib/rack/test.rb#123 + # pkg:gem/rack-test#lib/rack/test.rb:123 def clear_cookies; end # The Rack::Test::CookieJar for the cookies for the current session. # - # source://rack-test//lib/rack/test.rb#67 + # pkg:gem/rack-test#lib/rack/test.rb:67 def cookie_jar; end # The Rack::Test::CookieJar for the cookies for the current session. # - # source://rack-test//lib/rack/test.rb#67 + # pkg:gem/rack-test#lib/rack/test.rb:67 def cookie_jar=(_arg0); end # Issue a request using the given HTTP verb for the given URI, with optional @@ -463,15 +424,15 @@ class Rack::Test::Session # # custom_request "LINK", "/" # - # source://rack-test//lib/rack/test.rb#160 + # pkg:gem/rack-test#lib/rack/test.rb:160 def custom_request(verb, uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end # The default host used for the session for when using paths for URIs. # - # source://rack-test//lib/rack/test.rb#70 + # pkg:gem/rack-test#lib/rack/test.rb:70 def default_host; end - # source://rack-test//lib/rack/test.rb#111 + # pkg:gem/rack-test#lib/rack/test.rb:110 def delete(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end # Set an entry in the rack environment to be included on all subsequent @@ -480,7 +441,7 @@ class Rack::Test::Session # # env "rack.session", {:csrf => 'token'} # - # source://rack-test//lib/rack/test.rb#185 + # pkg:gem/rack-test#lib/rack/test.rb:185 def env(name, value); end # Rack::Test will not follow any redirects automatically. This method @@ -488,13 +449,13 @@ class Rack::Test::Session # on the new request) in the last response. If the last response was not # a redirect, an error will be raised. # - # source://rack-test//lib/rack/test.rb#209 + # pkg:gem/rack-test#lib/rack/test.rb:209 def follow_redirect!; end - # source://rack-test//lib/rack/test.rb#111 + # pkg:gem/rack-test#lib/rack/test.rb:110 def get(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end - # source://rack-test//lib/rack/test.rb#111 + # pkg:gem/rack-test#lib/rack/test.rb:110 def head(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end # Set a header to be included on all subsequent requests through the @@ -505,35 +466,31 @@ class Rack::Test::Session # # header "user-agent", "Firefox" # - # source://rack-test//lib/rack/test.rb#173 + # pkg:gem/rack-test#lib/rack/test.rb:173 def header(name, value); end # Return the last request issued in the session. Raises an error if no # requests have been sent yet. # - # @raise [Error] - # - # source://rack-test//lib/rack/test.rb#134 + # pkg:gem/rack-test#lib/rack/test.rb:134 def last_request; end # Return the last response received in the session. Raises an error if # no requests have been sent yet. # - # @raise [Error] - # - # source://rack-test//lib/rack/test.rb#141 + # pkg:gem/rack-test#lib/rack/test.rb:141 def last_response; end - # source://rack-test//lib/rack/test.rb#111 + # pkg:gem/rack-test#lib/rack/test.rb:110 def options(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end - # source://rack-test//lib/rack/test.rb#111 + # pkg:gem/rack-test#lib/rack/test.rb:110 def patch(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end - # source://rack-test//lib/rack/test.rb#111 + # pkg:gem/rack-test#lib/rack/test.rb:110 def post(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end - # source://rack-test//lib/rack/test.rb#111 + # pkg:gem/rack-test#lib/rack/test.rb:110 def put(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end # Issue a request to the Rack app for the given URI and optional Rack @@ -541,63 +498,61 @@ class Rack::Test::Session # # request "/" # - # source://rack-test//lib/rack/test.rb#150 + # pkg:gem/rack-test#lib/rack/test.rb:150 def request(uri, env = T.unsafe(nil), &block); end # Yield to the block, and restore the last request, last response, and # cookie jar to the state they were prior to block execution upon # exiting the block. # - # source://rack-test//lib/rack/test.rb#240 + # pkg:gem/rack-test#lib/rack/test.rb:240 def restore_state; end # Set a cookie in the current cookie jar. # - # source://rack-test//lib/rack/test.rb#128 + # pkg:gem/rack-test#lib/rack/test.rb:128 def set_cookie(cookie, uri = T.unsafe(nil)); end private # Append a string version of the query params to the array of query params. # - # source://rack-test//lib/rack/test.rb#340 + # pkg:gem/rack-test#lib/rack/test.rb:340 def append_query_params(query_array, query_params); end # close() gets called automatically in newer Rack versions. # - # source://rack-test//lib/rack/test.rb#266 + # pkg:gem/rack-test#lib/rack/test.rb:266 def close_body(body); end # Update environment to use based on given URI. # - # source://rack-test//lib/rack/test.rb#293 + # pkg:gem/rack-test#lib/rack/test.rb:293 def env_for(uri, env); end # Return the multipart content type to use based on the environment. # - # source://rack-test//lib/rack/test.rb#346 + # pkg:gem/rack-test#lib/rack/test.rb:346 def multipart_content_type(env); end # Normalize URI based on given URI/path and environment. # - # source://rack-test//lib/rack/test.rb#271 + # pkg:gem/rack-test#lib/rack/test.rb:271 def parse_uri(path, env); end # Submit the request with the given URI and rack environment to # the mock session. Returns and potentially yields the last response. # - # @yield [@last_response] - # - # source://rack-test//lib/rack/test.rb#357 + # pkg:gem/rack-test#lib/rack/test.rb:357 def process_request(uri, env); end class << self - # source://rack-test//lib/rack/test.rb#57 + # pkg:gem/rack-test#lib/rack/test.rb:57 def new(app, default_host = T.unsafe(nil)); end end end -# source://rack-test//lib/rack/test.rb#279 +# pkg:gem/rack-test#lib/rack/test.rb:279 Rack::Test::Session::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) # Wraps a Tempfile with a content type. Including one or more UploadedFile's @@ -606,7 +561,7 @@ Rack::Test::Session::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) # Example: # post "/photos", "file" => Rack::Test::UploadedFile.new("me.jpg", "image/jpeg") # -# source://rack-test//lib/rack/test/uploaded_file.rb#14 +# pkg:gem/rack-test#lib/rack/test/uploaded_file.rb:14 class Rack::Test::UploadedFile # Creates a new UploadedFile instance. # @@ -616,9 +571,7 @@ class Rack::Test::UploadedFile # binary :: Whether the file should be set to binmode (content treated as binary). # original_filename :: The filename to use for the file. Required if content is StringIO, optional override if not # - # @return [UploadedFile] a new instance of UploadedFile - # - # source://rack-test//lib/rack/test/uploaded_file.rb#31 + # pkg:gem/rack-test#lib/rack/test/uploaded_file.rb:31 def initialize(content, content_type = T.unsafe(nil), binary = T.unsafe(nil), original_filename: T.unsafe(nil)); end # Append to given buffer in 64K chunks to avoid multiple large @@ -626,42 +579,40 @@ class Rack::Test::UploadedFile # after to make sure all data in tempfile is appended to the # buffer. # - # source://rack-test//lib/rack/test/uploaded_file.rb#60 + # pkg:gem/rack-test#lib/rack/test/uploaded_file.rb:60 def append_to(buffer); end # The content type of the "uploaded" file # - # source://rack-test//lib/rack/test/uploaded_file.rb#22 + # pkg:gem/rack-test#lib/rack/test/uploaded_file.rb:22 def content_type; end # The content type of the "uploaded" file # - # source://rack-test//lib/rack/test/uploaded_file.rb#22 + # pkg:gem/rack-test#lib/rack/test/uploaded_file.rb:22 def content_type=(_arg0); end - # The path to the tempfile. Will not work if the receiver's content is from a StringIO. - # - # source://rack-test//lib/rack/test/uploaded_file.rb#46 + # pkg:gem/rack-test#lib/rack/test/uploaded_file.rb:49 def local_path; end # Delegate all methods not handled to the tempfile. # - # source://rack-test//lib/rack/test/uploaded_file.rb#52 + # pkg:gem/rack-test#lib/rack/test/uploaded_file.rb:52 def method_missing(method_name, *args, &block); end # The filename, *not* including the path, of the "uploaded" file # - # source://rack-test//lib/rack/test/uploaded_file.rb#16 + # pkg:gem/rack-test#lib/rack/test/uploaded_file.rb:16 def original_filename; end # The path to the tempfile. Will not work if the receiver's content is from a StringIO. # - # source://rack-test//lib/rack/test/uploaded_file.rb#46 + # pkg:gem/rack-test#lib/rack/test/uploaded_file.rb:46 def path; end # The tempfile # - # source://rack-test//lib/rack/test/uploaded_file.rb#19 + # pkg:gem/rack-test#lib/rack/test/uploaded_file.rb:19 def tempfile; end private @@ -669,23 +620,19 @@ class Rack::Test::UploadedFile # Create a tempfile and copy the content from the given path into the tempfile, optionally renaming if # original_filename has been set. # - # source://rack-test//lib/rack/test/uploaded_file.rb#86 + # pkg:gem/rack-test#lib/rack/test/uploaded_file.rb:86 def initialize_from_file_path(path); end # Use the StringIO as the tempfile. # - # @raise [ArgumentError] - # - # source://rack-test//lib/rack/test/uploaded_file.rb#78 + # pkg:gem/rack-test#lib/rack/test/uploaded_file.rb:78 def initialize_from_stringio(stringio); end - # @return [Boolean] - # - # source://rack-test//lib/rack/test/uploaded_file.rb#71 + # pkg:gem/rack-test#lib/rack/test/uploaded_file.rb:71 def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end end -# source://rack-test//lib/rack/test/utils.rb#5 +# pkg:gem/rack-test#lib/rack/test/utils.rb:5 module Rack::Test::Utils include ::Rack::Utils extend ::Rack::Utils @@ -693,44 +640,42 @@ module Rack::Test::Utils # Build a multipart body for the given params. # - # @raise [ArgumentError] - # - # source://rack-test//lib/rack/test/utils.rb#34 + # pkg:gem/rack-test#lib/rack/test/utils.rb:34 def build_multipart(params, _first = T.unsafe(nil), multipart = T.unsafe(nil)); end # Build a query string for the given value and prefix. The value # can be an array or hash of parameters. # - # source://rack-test//lib/rack/test/utils.rb#11 + # pkg:gem/rack-test#lib/rack/test/utils.rb:11 def build_nested_query(value, prefix = T.unsafe(nil)); end private # Append each multipart parameter value to the buffer. # - # source://rack-test//lib/rack/test/utils.rb#100 + # pkg:gem/rack-test#lib/rack/test/utils.rb:100 def _build_parts(buffer, parameters); end # Append the multipart fragment for a parameter that is a file upload to the buffer. # - # source://rack-test//lib/rack/test/utils.rb#133 + # pkg:gem/rack-test#lib/rack/test/utils.rb:133 def build_file_part(buffer, parameter_name, uploaded_file); end # Build the multipart content for uploading. # - # source://rack-test//lib/rack/test/utils.rb#94 + # pkg:gem/rack-test#lib/rack/test/utils.rb:94 def build_parts(buffer, parameters); end # Append the multipart fragment for a parameter that isn't a file upload to the buffer. # - # source://rack-test//lib/rack/test/utils.rb#121 + # pkg:gem/rack-test#lib/rack/test/utils.rb:121 def build_primitive_part(buffer, parameter_name, value); end # Return a flattened hash of parameter values based on the given params. # - # source://rack-test//lib/rack/test/utils.rb#62 + # pkg:gem/rack-test#lib/rack/test/utils.rb:62 def normalize_multipart_params(params, first = T.unsafe(nil)); end end -# source://rack-test//lib/rack/test/version.rb#3 +# pkg:gem/rack-test#lib/rack/test/version.rb:3 Rack::Test::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rack@2.2.13.rbi b/sorbet/rbi/gems/rack@2.2.13.rbi deleted file mode 100644 index 64612f6d8..000000000 --- a/sorbet/rbi/gems/rack@2.2.13.rbi +++ /dev/null @@ -1,5633 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rack` gem. -# Please instead update this file by running `bin/tapioca gem rack`. - -# The Rack main module, serving as a namespace for all core Rack -# modules and classes. -# -# All modules meant for use in your application are autoloaded here, -# so it should be enough just to require 'rack' in your code. -# -# source://rack//lib/rack/version.rb#14 -module Rack - class << self - # Return the Rack release as a dotted string. - # - # source://rack//lib/rack/version.rb#26 - def release; end - - # Return the Rack protocol version as a dotted string. - # - # source://rack//lib/rack/version.rb#19 - def version; end - end -end - -# source://rack//lib/rack.rb#124 -module Rack::Auth; end - -# Rack::Auth::AbstractHandler implements common authentication functionality. -# -# +realm+ should be set for all handlers. -# -# source://rack//lib/rack/auth/abstract/handler.rb#9 -class Rack::Auth::AbstractHandler - # @return [AbstractHandler] a new instance of AbstractHandler - # - # source://rack//lib/rack/auth/abstract/handler.rb#13 - def initialize(app, realm = T.unsafe(nil), &authenticator); end - - # Returns the value of attribute realm. - # - # source://rack//lib/rack/auth/abstract/handler.rb#11 - def realm; end - - # Sets the attribute realm - # - # @param value the value to set the attribute realm to. - # - # source://rack//lib/rack/auth/abstract/handler.rb#11 - def realm=(_arg0); end - - private - - # source://rack//lib/rack/auth/abstract/handler.rb#29 - def bad_request; end - - # source://rack//lib/rack/auth/abstract/handler.rb#20 - def unauthorized(www_authenticate = T.unsafe(nil)); end -end - -# source://rack//lib/rack/auth/abstract/request.rb#5 -class Rack::Auth::AbstractRequest - # @return [AbstractRequest] a new instance of AbstractRequest - # - # source://rack//lib/rack/auth/abstract/request.rb#7 - def initialize(env); end - - # source://rack//lib/rack/auth/abstract/request.rb#31 - def params; end - - # source://rack//lib/rack/auth/abstract/request.rb#23 - def parts; end - - # @return [Boolean] - # - # source://rack//lib/rack/auth/abstract/request.rb#15 - def provided?; end - - # source://rack//lib/rack/auth/abstract/request.rb#11 - def request; end - - # source://rack//lib/rack/auth/abstract/request.rb#27 - def scheme; end - - # @return [Boolean] - # - # source://rack//lib/rack/auth/abstract/request.rb#19 - def valid?; end - - private - - # source://rack//lib/rack/auth/abstract/request.rb#40 - def authorization_key; end -end - -# source://rack//lib/rack/auth/abstract/request.rb#38 -Rack::Auth::AbstractRequest::AUTHORIZATION_KEYS = T.let(T.unsafe(nil), Array) - -# Rack::Auth::Basic implements HTTP Basic Authentication, as per RFC 2617. -# -# Initialize with the Rack application that you want protecting, -# and a block that checks if a username and password pair are valid. -# -# See also: example/protectedlobster.rb -# -# source://rack//lib/rack/auth/basic.rb#15 -class Rack::Auth::Basic < ::Rack::Auth::AbstractHandler - # source://rack//lib/rack/auth/basic.rb#17 - def call(env); end - - private - - # source://rack//lib/rack/auth/basic.rb#36 - def challenge; end - - # @return [Boolean] - # - # source://rack//lib/rack/auth/basic.rb#40 - def valid?(auth); end -end - -# source://rack//lib/rack/auth/basic.rb#44 -class Rack::Auth::Basic::Request < ::Rack::Auth::AbstractRequest - # @return [Boolean] - # - # source://rack//lib/rack/auth/basic.rb#45 - def basic?; end - - # source://rack//lib/rack/auth/basic.rb#49 - def credentials; end - - # source://rack//lib/rack/auth/basic.rb#53 - def username; end -end - -# source://rack//lib/rack.rb#128 -module Rack::Auth::Digest; end - -# Rack::Auth::Digest::MD5 implements the MD5 algorithm version of -# HTTP Digest Authentication, as per RFC 2617. -# -# Initialize with the [Rack] application that you want protecting, -# and a block that looks up a plaintext password for a given username. -# -# +opaque+ needs to be set to a constant base64/hexadecimal string. -# -# source://rack//lib/rack/auth/digest/md5.rb#20 -class Rack::Auth::Digest::MD5 < ::Rack::Auth::AbstractHandler - # @return [MD5] a new instance of MD5 - # - # source://rack//lib/rack/auth/digest/md5.rb#26 - def initialize(app, realm = T.unsafe(nil), opaque = T.unsafe(nil), &authenticator); end - - # source://rack//lib/rack/auth/digest/md5.rb#39 - def call(env); end - - # Returns the value of attribute opaque. - # - # source://rack//lib/rack/auth/digest/md5.rb#22 - def opaque; end - - # Sets the attribute opaque - # - # @param value the value to set the attribute opaque to. - # - # source://rack//lib/rack/auth/digest/md5.rb#22 - def opaque=(_arg0); end - - # Sets the attribute passwords_hashed - # - # @param value the value to set the attribute passwords_hashed to. - # - # source://rack//lib/rack/auth/digest/md5.rb#24 - def passwords_hashed=(_arg0); end - - # @return [Boolean] - # - # source://rack//lib/rack/auth/digest/md5.rb#35 - def passwords_hashed?; end - - private - - # source://rack//lib/rack/auth/digest/md5.rb#114 - def A1(auth, password); end - - # source://rack//lib/rack/auth/digest/md5.rb#118 - def A2(auth); end - - # source://rack//lib/rack/auth/digest/md5.rb#104 - def H(data); end - - # source://rack//lib/rack/auth/digest/md5.rb#110 - def KD(secret, data); end - - # source://rack//lib/rack/auth/digest/md5.rb#79 - def challenge(hash = T.unsafe(nil)); end - - # source://rack//lib/rack/auth/digest/md5.rb#122 - def digest(auth, password); end - - # source://rack//lib/rack/auth/digest/md5.rb#104 - def md5(data); end - - # source://rack//lib/rack/auth/digest/md5.rb#68 - def params(hash = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rack//lib/rack/auth/digest/md5.rb#83 - def valid?(auth); end - - # @return [Boolean] - # - # source://rack//lib/rack/auth/digest/md5.rb#99 - def valid_digest?(auth); end - - # @return [Boolean] - # - # source://rack//lib/rack/auth/digest/md5.rb#95 - def valid_nonce?(auth); end - - # @return [Boolean] - # - # source://rack//lib/rack/auth/digest/md5.rb#91 - def valid_opaque?(auth); end - - # @return [Boolean] - # - # source://rack//lib/rack/auth/digest/md5.rb#87 - def valid_qop?(auth); end -end - -# source://rack//lib/rack/auth/digest/md5.rb#66 -Rack::Auth::Digest::MD5::QOP = T.let(T.unsafe(nil), String) - -# Rack::Auth::Digest::Nonce is the default nonce generator for the -# Rack::Auth::Digest::MD5 authentication handler. -# -# +private_key+ needs to set to a constant string. -# -# +time_limit+ can be optionally set to an integer (number of seconds), -# to limit the validity of the generated nonces. -# -# source://rack//lib/rack/auth/digest/nonce.rb#16 -class Rack::Auth::Digest::Nonce - # @return [Nonce] a new instance of Nonce - # - # source://rack//lib/rack/auth/digest/nonce.rb#26 - def initialize(timestamp = T.unsafe(nil), given_digest = T.unsafe(nil)); end - - # source://rack//lib/rack/auth/digest/nonce.rb#34 - def digest; end - - # @return [Boolean] - # - # source://rack//lib/rack/auth/digest/nonce.rb#46 - def fresh?; end - - # @return [Boolean] - # - # source://rack//lib/rack/auth/digest/nonce.rb#42 - def stale?; end - - # source://rack//lib/rack/auth/digest/nonce.rb#30 - def to_s; end - - # @return [Boolean] - # - # source://rack//lib/rack/auth/digest/nonce.rb#38 - def valid?; end - - class << self - # source://rack//lib/rack/auth/digest/nonce.rb#22 - def parse(string); end - - # Returns the value of attribute private_key. - # - # source://rack//lib/rack/auth/digest/nonce.rb#19 - def private_key; end - - # Sets the attribute private_key - # - # @param value the value to set the attribute private_key to. - # - # source://rack//lib/rack/auth/digest/nonce.rb#19 - def private_key=(_arg0); end - - # Returns the value of attribute time_limit. - # - # source://rack//lib/rack/auth/digest/nonce.rb#19 - def time_limit; end - - # Sets the attribute time_limit - # - # @param value the value to set the attribute time_limit to. - # - # source://rack//lib/rack/auth/digest/nonce.rb#19 - def time_limit=(_arg0); end - end -end - -# source://rack//lib/rack/auth/digest/params.rb#6 -class Rack::Auth::Digest::Params < ::Hash - # @return [Params] a new instance of Params - # @yield [_self] - # @yieldparam _self [Rack::Auth::Digest::Params] the object that the method was called on - # - # source://rack//lib/rack/auth/digest/params.rb#25 - def initialize; end - - # source://rack//lib/rack/auth/digest/params.rb#31 - def [](k); end - - # source://rack//lib/rack/auth/digest/params.rb#35 - def []=(k, v); end - - # From WEBrick::HTTPUtils - # - # source://rack//lib/rack/auth/digest/params.rb#47 - def quote(str); end - - # source://rack//lib/rack/auth/digest/params.rb#41 - def to_s; end - - class << self - # From WEBrick::HTTPUtils - # - # source://rack//lib/rack/auth/digest/params.rb#15 - def dequote(str); end - - # source://rack//lib/rack/auth/digest/params.rb#8 - def parse(str); end - - # source://rack//lib/rack/auth/digest/params.rb#21 - def split_header_value(str); end - end -end - -# source://rack//lib/rack/auth/digest/params.rb#39 -Rack::Auth::Digest::Params::UNQUOTED = T.let(T.unsafe(nil), Array) - -# source://rack//lib/rack/auth/digest/request.rb#10 -class Rack::Auth::Digest::Request < ::Rack::Auth::AbstractRequest - # @return [Boolean] - # - # source://rack//lib/rack/auth/digest/request.rb#19 - def correct_uri?; end - - # @return [Boolean] - # - # source://rack//lib/rack/auth/digest/request.rb#15 - def digest?; end - - # source://rack//lib/rack/auth/digest/request.rb#11 - def method; end - - # @raise [ArgumentError] - # - # source://rack//lib/rack/auth/digest/request.rb#35 - def method_missing(sym, *args); end - - # source://rack//lib/rack/auth/digest/request.rb#23 - def nonce; end - - # source://rack//lib/rack/auth/digest/request.rb#27 - def params; end - - # @return [Boolean] - # - # source://rack//lib/rack/auth/digest/request.rb#31 - def respond_to?(sym, *_arg1); end -end - -# Proxy for response bodies allowing calling a block when -# the response body is closed (after the response has been fully -# sent to the client). -# -# source://rack//lib/rack/body_proxy.rb#7 -class Rack::BodyProxy - # Set the response body to wrap, and the block to call when the - # response has been fully sent. - # - # @return [BodyProxy] a new instance of BodyProxy - # - # source://rack//lib/rack/body_proxy.rb#10 - def initialize(body, &block); end - - # If not already closed, close the wrapped body and - # then call the block the proxy was initialized with. - # - # source://rack//lib/rack/body_proxy.rb#23 - def close; end - - # Whether the proxy is closed. The proxy starts as not closed, - # and becomes closed on the first call to close. - # - # @return [Boolean] - # - # source://rack//lib/rack/body_proxy.rb#35 - def closed?; end - - # Delegate missing methods to the wrapped body. - # - # source://rack//lib/rack/body_proxy.rb#40 - def method_missing(method_name, *args, **_arg2, &block); end - - private - - # Return whether the wrapped body responds to the method. - # - # @return [Boolean] - # - # source://rack//lib/rack/body_proxy.rb#17 - def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end -end - -# Rack::Builder implements a small DSL to iteratively construct Rack -# applications. -# -# Example: -# -# require 'rack/lobster' -# app = Rack::Builder.new do -# use Rack::CommonLogger -# use Rack::ShowExceptions -# map "/lobster" do -# use Rack::Lint -# run Rack::Lobster.new -# end -# end -# -# run app -# -# Or -# -# app = Rack::Builder.app do -# use Rack::CommonLogger -# run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] } -# end -# -# run app -# -# +use+ adds middleware to the stack, +run+ dispatches to an application. -# You can use +map+ to construct a Rack::URLMap in a convenient way. -# -# source://rack//lib/rack/builder.rb#33 -class Rack::Builder - # Initialize a new Rack::Builder instance. +default_app+ specifies the - # default application if +run+ is not called later. If a block - # is given, it is evaluted in the context of the instance. - # - # @return [Builder] a new instance of Builder - # - # source://rack//lib/rack/builder.rb#123 - def initialize(default_app = T.unsafe(nil), &block); end - - # Call the Rack application generated by this builder instance. Note that - # this rebuilds the Rack application and runs the warmup code (if any) - # every time it is called, so it should not be used if performance is important. - # - # source://rack//lib/rack/builder.rb#243 - def call(env); end - - # Freeze the app (set using run) and all middleware instances when building the application - # in to_app. - # - # source://rack//lib/rack/builder.rb#226 - def freeze_app; end - - # Creates a route within the application. Routes under the mapped path will be sent to - # the Rack application specified by run inside the block. Other requests will be sent to the - # default application specified by run outside the block. - # - # Rack::Builder.app do - # map '/heartbeat' do - # run Heartbeat - # end - # run App - # end - # - # The +use+ method can also be used inside the block to specify middleware to run under a specific path: - # - # Rack::Builder.app do - # map '/heartbeat' do - # use Middleware - # run Heartbeat - # end - # run App - # end - # - # This example includes a piece of middleware which will run before +/heartbeat+ requests hit +Heartbeat+. - # - # Note that providing a +path+ of +/+ will ignore any default application given in a +run+ statement - # outside the block. - # - # source://rack//lib/rack/builder.rb#219 - def map(path, &block); end - - # Takes an argument that is an object that responds to #call and returns a Rack response. - # The simplest form of this is a lambda object: - # - # run lambda { |env| [200, { "Content-Type" => "text/plain" }, ["OK"]] } - # - # However this could also be a class: - # - # class Heartbeat - # def self.call(env) - # [200, { "Content-Type" => "text/plain" }, ["OK"]] - # end - # end - # - # run Heartbeat - # - # source://rack//lib/rack/builder.rb#176 - def run(app); end - - # Return the Rack application generated by this instance. - # - # source://rack//lib/rack/builder.rb#231 - def to_app; end - - # Specifies middleware to use in a stack. - # - # class Middleware - # def initialize(app) - # @app = app - # end - # - # def call(env) - # env["rack.some_header"] = "setting an example" - # @app.call(env) - # end - # end - # - # use Middleware - # run lambda { |env| [200, { "Content-Type" => "text/plain" }, ["OK"]] } - # - # All requests through to this application will first be processed by the middleware class. - # The +call+ method in this example sets an additional environment key which then can be - # referenced in the application if required. - # - # source://rack//lib/rack/builder.rb#153 - def use(middleware, *args, **_arg2, &block); end - - # Takes a lambda or block that is used to warm-up the application. This block is called - # before the Rack application is returned by to_app. - # - # warmup do |app| - # client = Rack::MockRequest.new(app) - # client.get('/') - # end - # - # use SomeMiddleware - # run MyApp - # - # source://rack//lib/rack/builder.rb#190 - def warmup(prc = T.unsafe(nil), &block); end - - private - - # Generate a URLMap instance by generating new Rack applications for each - # map block in this instance. - # - # source://rack//lib/rack/builder.rb#251 - def generate_map(default_app, mapping); end - - class << self - # Create a new Rack::Builder instance and return the Rack application - # generated from it. - # - # source://rack//lib/rack/builder.rb#130 - def app(default_app = T.unsafe(nil), &block); end - - # Load the given file as a rackup file, treating the - # contents as if specified inside a Rack::Builder block. - # - # Treats the first comment at the beginning of a line - # that starts with a backslash as options similar to - # options passed on a rackup command line. - # - # Ignores content in the file after +__END__+, so that - # use of +__END__+ will not result in a syntax error. - # - # Example config.ru file: - # - # $ cat config.ru - # - # #\ -p 9393 - # - # use Rack::ContentLength - # require './app.rb' - # run App - # - # source://rack//lib/rack/builder.rb#93 - def load_file(path, opts = T.unsafe(nil)); end - - # Evaluate the given +builder_script+ string in the context of - # a Rack::Builder block, returning a Rack application. - # - # source://rack//lib/rack/builder.rb#112 - def new_from_string(builder_script, file = T.unsafe(nil)); end - - # Parse the given config file to get a Rack application. - # - # If the config file ends in +.ru+, it is treated as a - # rackup file and the contents will be treated as if - # specified inside a Rack::Builder block, using the given - # options. - # - # If the config file does not end in +.ru+, it is - # required and Rack will use the basename of the file - # to guess which constant will be the Rack application to run. - # The options given will be ignored in this case. - # - # Examples: - # - # Rack::Builder.parse_file('config.ru') - # # Rack application built using Rack::Builder.new - # - # Rack::Builder.parse_file('app.rb') - # # requires app.rb, which can be anywhere in Ruby's - # # load path. After requiring, assumes App constant - # # contains Rack application - # - # Rack::Builder.parse_file('./my_app.rb') - # # requires ./my_app.rb, which should be in the - # # process's current directory. After requiring, - # # assumes MyApp constant contains Rack application - # - # source://rack//lib/rack/builder.rb#64 - def parse_file(config, opts = T.unsafe(nil)); end - end -end - -# https://stackoverflow.com/questions/2223882/whats-the-difference-between-utf-8-and-utf-8-without-bom -# -# source://rack//lib/rack/builder.rb#36 -Rack::Builder::UTF_8_BOM = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#29 -Rack::CACHE_CONTROL = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#31 -Rack::CONTENT_LENGTH = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#32 -Rack::CONTENT_TYPE = T.let(T.unsafe(nil), String) - -# Rack::Cascade tries a request on several apps, and returns the -# first response that is not 404 or 405 (or in a list of configured -# status codes). If all applications tried return one of the configured -# status codes, return the last response. -# -# source://rack//lib/rack/cascade.rb#9 -class Rack::Cascade - # Set the apps to send requests to, and what statuses result in - # cascading. Arguments: - # - # apps: An enumerable of rack applications. - # cascade_for: The statuses to use cascading for. If a response is received - # from an app, the next app is tried. - # - # @return [Cascade] a new instance of Cascade - # - # source://rack//lib/rack/cascade.rb#22 - def initialize(apps, cascade_for = T.unsafe(nil)); end - - # Append an app to the list of apps to cascade. This app will - # be tried last. - # - # source://rack//lib/rack/cascade.rb#57 - def <<(app); end - - # Append an app to the list of apps to cascade. This app will - # be tried last. - # - # source://rack//lib/rack/cascade.rb#57 - def add(app); end - - # An array of applications to try in order. - # - # source://rack//lib/rack/cascade.rb#14 - def apps; end - - # Call each app in order. If the responses uses a status that requires - # cascading, try the next app. If all responses require cascading, - # return the response from the last app. - # - # source://rack//lib/rack/cascade.rb#33 - def call(env); end - - # Whether the given app is one of the apps to cascade to. - # - # @return [Boolean] - # - # source://rack//lib/rack/cascade.rb#62 - def include?(app); end -end - -# deprecated, no longer used -# -# source://rack//lib/rack/cascade.rb#11 -Rack::Cascade::NotFound = T.let(T.unsafe(nil), Array) - -# Middleware that applies chunked transfer encoding to response bodies -# when the response does not include a Content-Length header. -# -# This supports the Trailer response header to allow the use of trailing -# headers in the chunked encoding. However, using this requires you manually -# specify a response body that supports a +trailers+ method. Example: -# -# [200, { 'Trailer' => 'Expires'}, ["Hello", "World"]] -# # error raised -# -# body = ["Hello", "World"] -# def body.trailers -# { 'Expires' => Time.now.to_s } -# end -# [200, { 'Trailer' => 'Expires'}, body] -# # No exception raised -# -# source://rack//lib/rack/chunked.rb#21 -class Rack::Chunked - include ::Rack::Utils - - # @return [Chunked] a new instance of Chunked - # - # source://rack//lib/rack/chunked.rb#78 - def initialize(app); end - - # If the rack app returns a response that should have a body, - # but does not have Content-Length or Transfer-Encoding headers, - # modify the response to use chunked Transfer-Encoding. - # - # source://rack//lib/rack/chunked.rb#97 - def call(env); end - - # Whether the HTTP version supports chunked encoding (HTTP 1.1 does). - # - # @return [Boolean] - # - # source://rack//lib/rack/chunked.rb#83 - def chunkable_version?(ver); end -end - -# A body wrapper that emits chunked responses. -# -# source://rack//lib/rack/chunked.rb#25 -class Rack::Chunked::Body - # Store the response body to be chunked. - # - # @return [Body] a new instance of Body - # - # source://rack//lib/rack/chunked.rb#30 - def initialize(body); end - - # Close the response body if the response body supports it. - # - # source://rack//lib/rack/chunked.rb#50 - def close; end - - # For each element yielded by the response body, yield - # the element in chunked encoding. - # - # @yield [TAIL] - # - # source://rack//lib/rack/chunked.rb#36 - def each(&block); end - - private - - # Do nothing as this class does not support trailer headers. - # - # source://rack//lib/rack/chunked.rb#57 - def yield_trailers; end -end - -# source://rack//lib/rack/chunked.rb#27 -Rack::Chunked::Body::TAIL = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/chunked.rb#26 -Rack::Chunked::Body::TERM = T.let(T.unsafe(nil), String) - -# A body wrapper that emits chunked responses and also supports -# sending Trailer headers. Note that the response body provided to -# initialize must have a +trailers+ method that returns a hash -# of trailer headers, and the rack response itself should have a -# Trailer header listing the headers that the +trailers+ method -# will return. -# -# source://rack//lib/rack/chunked.rb#67 -class Rack::Chunked::TrailerBody < ::Rack::Chunked::Body - private - - # Yield strings for each trailer header. - # - # source://rack//lib/rack/chunked.rb#71 - def yield_trailers; end -end - -# Rack::CommonLogger forwards every request to the given +app+, and -# logs a line in the -# {Apache common log format}[http://httpd.apache.org/docs/1.3/logs.html#common] -# to the configured logger. -# -# source://rack//lib/rack/common_logger.rb#8 -class Rack::CommonLogger - # +logger+ can be any object that supports the +write+ or +<<+ methods, - # which includes the standard library Logger. These methods are called - # with a single string argument, the log message. - # If +logger+ is nil, CommonLogger will fall back env['rack.errors']. - # - # @return [CommonLogger] a new instance of CommonLogger - # - # source://rack//lib/rack/common_logger.rb#24 - def initialize(app, logger = T.unsafe(nil)); end - - # Log all requests in common_log format after a response has been - # returned. Note that if the app raises an exception, the request - # will not be logged, so if exception handling middleware are used, - # they should be loaded after this middleware. Additionally, because - # the logging happens after the request body has been fully sent, any - # exceptions raised during the sending of the response body will - # cause the request not to be logged. - # - # source://rack//lib/rack/common_logger.rb#36 - def call(env); end - - private - - # Attempt to determine the content length for the response to - # include it in the logged data. - # - # source://rack//lib/rack/common_logger.rb#79 - def extract_content_length(headers); end - - # Log the request to the configured logger. - # - # source://rack//lib/rack/common_logger.rb#47 - def log(env, status, header, began_at); end -end - -# Common Log Format: http://httpd.apache.org/docs/1.3/logs.html#common -# -# lilith.local - - [07/Aug/2006 23:58:02 -0400] "GET / HTTP/1.1" 500 - -# -# %{%s - %s [%s] "%s %s%s %s" %d %s\n} % -# -# The actual format is slightly different than the above due to the -# separation of SCRIPT_NAME and PATH_INFO, and because the elapsed -# time in seconds is included at the end. -# -# source://rack//lib/rack/common_logger.rb#18 -Rack::CommonLogger::FORMAT = T.let(T.unsafe(nil), String) - -# Middleware that enables conditional GET using If-None-Match and -# If-Modified-Since. The application should set either or both of the -# Last-Modified or Etag response headers according to RFC 2616. When -# either of the conditions is met, the response body is set to be zero -# length and the response status is set to 304 Not Modified. -# -# Applications that defer response body generation until the body's each -# message is received will avoid response body generation completely when -# a conditional GET matches. -# -# Adapted from Michael Klishin's Merb implementation: -# https://github.com/wycats/merb/blob/master/merb-core/lib/merb-core/rack/middleware/conditional_get.rb -# -# source://rack//lib/rack/conditional_get.rb#17 -class Rack::ConditionalGet - # @return [ConditionalGet] a new instance of ConditionalGet - # - # source://rack//lib/rack/conditional_get.rb#18 - def initialize(app); end - - # Return empty 304 response if the response has not been - # modified since the last request. - # - # source://rack//lib/rack/conditional_get.rb#24 - def call(env); end - - private - - # Whether the ETag response header matches the If-None-Match request header. - # If so, the request has not been modified. - # - # @return [Boolean] - # - # source://rack//lib/rack/conditional_get.rb#59 - def etag_matches?(none_match, headers); end - - # Return whether the response has not been modified since the - # last request. - # - # @return [Boolean] - # - # source://rack//lib/rack/conditional_get.rb#48 - def fresh?(env, headers); end - - # Whether the Last-Modified response header matches the If-Modified-Since - # request header. If so, the request has not been modified. - # - # @return [Boolean] - # - # source://rack//lib/rack/conditional_get.rb#65 - def modified_since?(modified_since, headers); end - - # Return a Time object for the given string (which should be in RFC2822 - # format), or nil if the string cannot be parsed. - # - # source://rack//lib/rack/conditional_get.rb#72 - def to_rfc2822(since); end -end - -# Rack::Config modifies the environment using the block given during -# initialization. -# -# Example: -# use Rack::Config do |env| -# env['my-key'] = 'some-value' -# end -# -# source://rack//lib/rack/config.rb#11 -class Rack::Config - # @return [Config] a new instance of Config - # - # source://rack//lib/rack/config.rb#12 - def initialize(app, &block); end - - # source://rack//lib/rack/config.rb#17 - def call(env); end -end - -# Sets the Content-Length header on responses that do not specify -# a Content-Length or Transfer-Encoding header. Note that this -# does not fix responses that have an invalid Content-Length -# header specified. -# -# source://rack//lib/rack/content_length.rb#9 -class Rack::ContentLength - include ::Rack::Utils - - # @return [ContentLength] a new instance of ContentLength - # - # source://rack//lib/rack/content_length.rb#12 - def initialize(app); end - - # source://rack//lib/rack/content_length.rb#16 - def call(env); end -end - -# Sets the Content-Type header on responses which don't have one. -# -# Builder Usage: -# use Rack::ContentType, "text/plain" -# -# When no content type argument is provided, "text/html" is the -# default. -# -# source://rack//lib/rack/content_type.rb#12 -class Rack::ContentType - include ::Rack::Utils - - # @return [ContentType] a new instance of ContentType - # - # source://rack//lib/rack/content_type.rb#15 - def initialize(app, content_type = T.unsafe(nil)); end - - # source://rack//lib/rack/content_type.rb#19 - def call(env); end -end - -# source://rack//lib/rack.rb#43 -Rack::DELETE = T.let(T.unsafe(nil), String) - -# This middleware enables content encoding of http responses, -# usually for purposes of compression. -# -# Currently supported encodings: -# -# * gzip -# * identity (no transformation) -# -# This middleware automatically detects when encoding is supported -# and allowed. For example no encoding is made when a cache -# directive of 'no-transform' is present, when the response status -# code is one that doesn't allow an entity body, or when the body -# is empty. -# -# Note that despite the name, Deflater does not support the +deflate+ -# encoding. -# -# source://rack//lib/rack/deflater.rb#23 -class Rack::Deflater - # Creates Rack::Deflater middleware. Options: - # - # :if :: a lambda enabling / disabling deflation based on returned boolean value - # (e.g use Rack::Deflater, :if => lambda { |*, body| sum=0; body.each { |i| sum += i.length }; sum > 512 }). - # However, be aware that calling `body.each` inside the block will break cases where `body.each` is not idempotent, - # such as when it is an +IO+ instance. - # :include :: a list of content types that should be compressed. By default, all content types are compressed. - # :sync :: determines if the stream is going to be flushed after every chunk. Flushing after every chunk reduces - # latency for time-sensitive streaming applications, but hurts compression and throughput. - # Defaults to +true+. - # - # @return [Deflater] a new instance of Deflater - # - # source://rack//lib/rack/deflater.rb#36 - def initialize(app, options = T.unsafe(nil)); end - - # source://rack//lib/rack/deflater.rb#43 - def call(env); end - - private - - # Whether the body should be compressed. - # - # @return [Boolean] - # - # source://rack//lib/rack/deflater.rb#122 - def should_deflate?(env, status, headers, body); end -end - -# Body class used for gzip encoded responses. -# -# source://rack//lib/rack/deflater.rb#79 -class Rack::Deflater::GzipStream - # Initialize the gzip stream. Arguments: - # body :: Response body to compress with gzip - # mtime :: The modification time of the body, used to set the - # modification time in the gzip header. - # sync :: Whether to flush each gzip chunk as soon as it is ready. - # - # @return [GzipStream] a new instance of GzipStream - # - # source://rack//lib/rack/deflater.rb#85 - def initialize(body, mtime, sync); end - - # Close the original body if possible. - # - # source://rack//lib/rack/deflater.rb#114 - def close; end - - # Yield gzip compressed strings to the given block. - # - # source://rack//lib/rack/deflater.rb#92 - def each(&block); end - - # Call the block passed to #each with the the gzipped data. - # - # source://rack//lib/rack/deflater.rb#109 - def write(data); end -end - -# Rack::Directory serves entries below the +root+ given, according to the -# path info of the Rack request. If a directory is found, the file's contents -# will be presented in an html based index. If a file is found, the env will -# be passed to the specified +app+. -# -# If +app+ is not specified, a Rack::Files of the same +root+ will be used. -# -# source://rack//lib/rack/directory.rb#13 -class Rack::Directory - # Set the root directory and application for serving files. - # - # @return [Directory] a new instance of Directory - # - # source://rack//lib/rack/directory.rb#77 - def initialize(root, app = T.unsafe(nil)); end - - # source://rack//lib/rack/directory.rb#83 - def call(env); end - - # Rack response to use for requests with invalid paths, or nil if path is valid. - # - # source://rack//lib/rack/directory.rb#103 - def check_bad_request(path_info); end - - # Rack response to use for requests with paths outside the root, or nil if path is inside the root. - # - # source://rack//lib/rack/directory.rb#113 - def check_forbidden(path_info); end - - # Rack response to use for unreadable and non-file, non-directory entries. - # - # source://rack//lib/rack/directory.rb#175 - def entity_not_found(path_info); end - - # Provide human readable file sizes - # - # source://rack//lib/rack/directory.rb#191 - def filesize_format(int); end - - # Internals of request handling. Similar to call but does - # not remove body for HEAD requests. - # - # source://rack//lib/rack/directory.rb#90 - def get(env); end - - # Rack response to use for directories under the root. - # - # source://rack//lib/rack/directory.rb#124 - def list_directory(path_info, path, script_name); end - - # Rack response to use for files and directories under the root. - # Unreadable and non-file, non-directory entries will get a 404 response. - # - # source://rack//lib/rack/directory.rb#165 - def list_path(env, path, path_info, script_name); end - - # The root of the directory hierarchy. Only requests for files and - # directories inside of the root directory are supported. - # - # source://rack//lib/rack/directory.rb#74 - def root; end - - # File::Stat for the given path, but return nil for missing/bad entries. - # - # source://rack//lib/rack/directory.rb#157 - def stat(path); end -end - -# source://rack//lib/rack/directory.rb#14 -Rack::Directory::DIR_FILE = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/directory.rb#37 -Rack::Directory::DIR_PAGE_FOOTER = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/directory.rb#15 -Rack::Directory::DIR_PAGE_HEADER = T.let(T.unsafe(nil), String) - -# Body class for directory entries, showing an index page with links -# to each file. -# -# source://rack//lib/rack/directory.rb#45 -class Rack::Directory::DirectoryBody < ::Struct - # Yield strings for each part of the directory entry - # - # @yield [DIR_PAGE_HEADER % [ show_path, show_path ]] - # - # source://rack//lib/rack/directory.rb#47 - def each; end - - private - - # Escape each element in the array of html strings. - # - # source://rack//lib/rack/directory.rb#67 - def DIR_FILE_escape(htmls); end -end - -# Stolen from Ramaze -# -# source://rack//lib/rack/directory.rb#183 -Rack::Directory::FILESIZE_FORMAT = T.let(T.unsafe(nil), Array) - -# source://rack//lib/rack.rb#36 -Rack::ETAG = T.let(T.unsafe(nil), String) - -# Automatically sets the ETag header on all String bodies. -# -# The ETag header is skipped if ETag or Last-Modified headers are sent or if -# a sendfile body (body.responds_to :to_path) is given (since such cases -# should be handled by apache/nginx). -# -# On initialization, you can pass two parameters: a Cache-Control directive -# used when Etag is absent and a directive when it is present. The first -# defaults to nil, while the second defaults to "max-age=0, private, must-revalidate" -# -# source://rack//lib/rack/etag.rb#16 -class Rack::ETag - # @return [ETag] a new instance of ETag - # - # source://rack//lib/rack/etag.rb#20 - def initialize(app, no_cache_control = T.unsafe(nil), cache_control = T.unsafe(nil)); end - - # source://rack//lib/rack/etag.rb#26 - def call(env); end - - private - - # source://rack//lib/rack/etag.rb#65 - def digest_body(body); end - - # @return [Boolean] - # - # source://rack//lib/rack/etag.rb#57 - def etag_body?(body); end - - # @return [Boolean] - # - # source://rack//lib/rack/etag.rb#53 - def etag_status?(status); end - - # @return [Boolean] - # - # source://rack//lib/rack/etag.rb#61 - def skip_caching?(headers); end -end - -# source://rack//lib/rack/etag.rb#18 -Rack::ETag::DEFAULT_CACHE_CONTROL = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/etag.rb#17 -Rack::ETag::ETAG_STRING = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#30 -Rack::EXPIRES = T.let(T.unsafe(nil), String) - -# This middleware provides hooks to certain places in the request / -# response lifecycle. This is so that middleware that don't need to filter -# the response data can safely leave it alone and not have to send messages -# down the traditional "rack stack". -# -# The events are: -# -# * on_start(request, response) -# -# This event is sent at the start of the request, before the next -# middleware in the chain is called. This method is called with a request -# object, and a response object. Right now, the response object is always -# nil, but in the future it may actually be a real response object. -# -# * on_commit(request, response) -# -# The response has been committed. The application has returned, but the -# response has not been sent to the webserver yet. This method is always -# called with a request object and the response object. The response -# object is constructed from the rack triple that the application returned. -# Changes may still be made to the response object at this point. -# -# * on_send(request, response) -# -# The webserver has started iterating over the response body and presumably -# has started sending data over the wire. This method is always called with -# a request object and the response object. The response object is -# constructed from the rack triple that the application returned. Changes -# SHOULD NOT be made to the response object as the webserver has already -# started sending data. Any mutations will likely result in an exception. -# -# * on_finish(request, response) -# -# The webserver has closed the response, and all data has been written to -# the response socket. The request and response object should both be -# read-only at this point. The body MAY NOT be available on the response -# object as it may have been flushed to the socket. -# -# * on_error(request, response, error) -# -# An exception has occurred in the application or an `on_commit` event. -# This method will get the request, the response (if available) and the -# exception that was raised. -# -# ## Order -# -# `on_start` is called on the handlers in the order that they were passed to -# the constructor. `on_commit`, on_send`, `on_finish`, and `on_error` are -# called in the reverse order. `on_finish` handlers are called inside an -# `ensure` block, so they are guaranteed to be called even if something -# raises an exception. If something raises an exception in a `on_finish` -# method, then nothing is guaranteed. -# -# source://rack//lib/rack/events.rb#57 -class Rack::Events - # @return [Events] a new instance of Events - # - # source://rack//lib/rack/events.rb#102 - def initialize(app, handlers); end - - # source://rack//lib/rack/events.rb#107 - def call(env); end - - private - - # source://rack//lib/rack/events.rb#145 - def make_request(env); end - - # source://rack//lib/rack/events.rb#149 - def make_response(status, headers, body); end - - # source://rack//lib/rack/events.rb#133 - def on_commit(request, response); end - - # source://rack//lib/rack/events.rb#129 - def on_error(request, response, e); end - - # source://rack//lib/rack/events.rb#141 - def on_finish(request, response); end - - # source://rack//lib/rack/events.rb#137 - def on_start(request, response); end -end - -# source://rack//lib/rack/events.rb#58 -module Rack::Events::Abstract - # source://rack//lib/rack/events.rb#62 - def on_commit(req, res); end - - # source://rack//lib/rack/events.rb#71 - def on_error(req, res, e); end - - # source://rack//lib/rack/events.rb#68 - def on_finish(req, res); end - - # source://rack//lib/rack/events.rb#65 - def on_send(req, res); end - - # source://rack//lib/rack/events.rb#59 - def on_start(req, res); end -end - -# source://rack//lib/rack/events.rb#91 -class Rack::Events::BufferedResponse < ::Rack::Response::Raw - # @return [BufferedResponse] a new instance of BufferedResponse - # - # source://rack//lib/rack/events.rb#94 - def initialize(status, headers, body); end - - # Returns the value of attribute body. - # - # source://rack//lib/rack/events.rb#92 - def body; end - - # source://rack//lib/rack/events.rb#99 - def to_a; end -end - -# source://rack//lib/rack/events.rb#75 -class Rack::Events::EventedBodyProxy < ::Rack::BodyProxy - # @return [EventedBodyProxy] a new instance of EventedBodyProxy - # - # source://rack//lib/rack/events.rb#78 - def initialize(body, request, response, handlers, &block); end - - # source://rack//lib/rack/events.rb#85 - def each; end - - # Returns the value of attribute request. - # - # source://rack//lib/rack/events.rb#76 - def request; end - - # Returns the value of attribute response. - # - # source://rack//lib/rack/events.rb#76 - def response; end -end - -# source://rack//lib/rack/file.rb#6 -Rack::File = Rack::Files - -# Rack::Files serves files below the +root+ directory given, according to the -# path info of the Rack request. -# e.g. when Rack::Files.new("/etc") is used, you can access 'passwd' file -# as http://localhost:9292/passwd -# -# Handlers can detect if bodies are a Rack::Files, and use mechanisms -# like sendfile on the +path+. -# -# source://rack//lib/rack/files.rb#14 -class Rack::Files - # @return [Files] a new instance of Files - # - # source://rack//lib/rack/files.rb#29 - def initialize(root, headers = T.unsafe(nil), default_mime = T.unsafe(nil)); end - - # source://rack//lib/rack/files.rb#36 - def call(env); end - - # source://rack//lib/rack/files.rb#41 - def get(env); end - - # Returns the value of attribute root. - # - # source://rack//lib/rack/files.rb#27 - def root; end - - # source://rack//lib/rack/files.rb#70 - def serving(request, path); end - - private - - # source://rack//lib/rack/files.rb#192 - def fail(status, body, headers = T.unsafe(nil)); end - - # source://rack//lib/rack/files.rb#211 - def filesize(path); end - - # The MIME type for the contents of the file located at @path - # - # source://rack//lib/rack/files.rb#207 - def mime_type(path, default_mime); end - - class << self - # @todo remove in 3.0 - # - # source://rack//lib/rack/files.rb#20 - def method_added(name); end - end -end - -# source://rack//lib/rack/files.rb#15 -Rack::Files::ALLOWED_VERBS = T.let(T.unsafe(nil), Array) - -# source://rack//lib/rack/files.rb#16 -Rack::Files::ALLOW_HEADER = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/files.rb#123 -class Rack::Files::BaseIterator - # @return [BaseIterator] a new instance of BaseIterator - # - # source://rack//lib/rack/files.rb#126 - def initialize(path, ranges, options); end - - # source://rack//lib/rack/files.rb#146 - def bytesize; end - - # source://rack//lib/rack/files.rb#155 - def close; end - - # source://rack//lib/rack/files.rb#132 - def each; end - - # Returns the value of attribute options. - # - # source://rack//lib/rack/files.rb#124 - def options; end - - # Returns the value of attribute path. - # - # source://rack//lib/rack/files.rb#124 - def path; end - - # Returns the value of attribute ranges. - # - # source://rack//lib/rack/files.rb#124 - def ranges; end - - private - - # source://rack//lib/rack/files.rb#173 - def each_range_part(file, range); end - - # @return [Boolean] - # - # source://rack//lib/rack/files.rb#159 - def multipart?; end - - # source://rack//lib/rack/files.rb#163 - def multipart_heading(range); end -end - -# source://rack//lib/rack/files.rb#186 -class Rack::Files::Iterator < ::Rack::Files::BaseIterator - # source://rack//lib/rack/files.rb#124 - def to_path; end -end - -# source://rack//lib/rack/files.rb#17 -Rack::Files::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) - -# Rack::ForwardRequest gets caught by Rack::Recursive and redirects -# the current request to the app at +url+. -# -# raise ForwardRequest.new("/not-found") -# -# source://rack//lib/rack/recursive.rb#12 -class Rack::ForwardRequest < ::Exception - # @return [ForwardRequest] a new instance of ForwardRequest - # - # source://rack//lib/rack/recursive.rb#15 - def initialize(url, env = T.unsafe(nil)); end - - # Returns the value of attribute env. - # - # source://rack//lib/rack/recursive.rb#13 - def env; end - - # Returns the value of attribute url. - # - # source://rack//lib/rack/recursive.rb#13 - def url; end -end - -# HTTP method verbs -# -# source://rack//lib/rack.rb#39 -Rack::GET = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#44 -Rack::HEAD = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#20 -Rack::HTTPS = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#35 -Rack::HTTP_COOKIE = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#17 -Rack::HTTP_HOST = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#18 -Rack::HTTP_PORT = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#19 -Rack::HTTP_VERSION = T.let(T.unsafe(nil), String) - -# *Handlers* connect web servers with Rack. -# -# Rack includes Handlers for Thin, WEBrick, FastCGI, CGI, SCGI -# and LiteSpeed. -# -# Handlers usually are activated by calling MyHandler.run(myapp). -# A second optional hash can be passed to include server-specific -# configuration. -# -# source://rack//lib/rack/handler.rb#12 -module Rack::Handler - class << self - # source://rack//lib/rack/handler.rb#51 - def default; end - - # source://rack//lib/rack/handler.rb#13 - def get(server); end - - # Select first available Rack handler given an `Array` of server names. - # Raises `LoadError` if no handler was found. - # - # > pick ['thin', 'webrick'] - # => Rack::Handler::WEBrick - # - # @raise [LoadError] - # - # source://rack//lib/rack/handler.rb#36 - def pick(server_names); end - - # source://rack//lib/rack/handler.rb#85 - def register(server, klass); end - - # Transforms server-name constants to their canonical form as filenames, - # then tries to require them but silences the LoadError if not found - # - # Naming convention: - # - # Foo # => 'foo' - # FooBar # => 'foo_bar.rb' - # FooBAR # => 'foobar.rb' - # FOObar # => 'foobar.rb' - # FOOBAR # => 'foobar.rb' - # FooBarBaz # => 'foo_bar_baz.rb' - # - # source://rack//lib/rack/handler.rb#75 - def try_require(prefix, const_name); end - end -end - -# source://rack//lib/rack/handler/cgi.rb#5 -class Rack::Handler::CGI - class << self - # source://rack//lib/rack/handler/cgi.rb#6 - def run(app, **options); end - - # source://rack//lib/rack/handler/cgi.rb#51 - def send_body(body); end - - # source://rack//lib/rack/handler/cgi.rb#40 - def send_headers(status, headers); end - - # source://rack//lib/rack/handler/cgi.rb#11 - def serve(app); end - end -end - -# source://rack//lib/rack/handler.rb#48 -Rack::Handler::SERVER_NAMES = T.let(T.unsafe(nil), Array) - -# Rack::Head returns an empty body for all HEAD requests. It leaves -# all other requests unchanged. -# -# source://rack//lib/rack/head.rb#6 -class Rack::Head - # @return [Head] a new instance of Head - # - # source://rack//lib/rack/head.rb#7 - def initialize(app); end - - # source://rack//lib/rack/head.rb#11 - def call(env); end -end - -# source://rack//lib/rack.rb#46 -Rack::LINK = T.let(T.unsafe(nil), String) - -# Rack::Lint validates your application and the requests and -# responses according to the Rack spec. -# -# source://rack//lib/rack/lint.rb#9 -class Rack::Lint - include ::Rack::Lint::Assertion - - # @return [Lint] a new instance of Lint - # - # source://rack//lib/rack/lint.rb#10 - def initialize(app); end - - # @raise [LintError] - # - # source://rack//lib/rack/lint.rb#41 - def _call(env); end - - # A Rack application is a Ruby object (not a class) that - # responds to +call+. - # - # source://rack//lib/rack/lint.rb#37 - def call(env = T.unsafe(nil)); end - - # === The Content-Length - # - # source://rack//lib/rack/lint.rb#708 - def check_content_length(status, headers); end - - # === The Content-Type - # - # source://rack//lib/rack/lint.rb#694 - def check_content_type(status, headers); end - - # == The Environment - # - # @raise [LintError] - # - # source://rack//lib/rack/lint.rb#73 - def check_env(env); end - - # === The Error Stream - # - # source://rack//lib/rack/lint.rb#483 - def check_error(error); end - - # === The Headers - # - # source://rack//lib/rack/lint.rb#656 - def check_headers(header); end - - # === Hijacking - # - # AUTHORS: n.b. The trailing whitespace between paragraphs is important and - # should not be removed. The whitespace creates paragraphs in the RDoc - # output. - # - # ==== Request (before status) - # - # source://rack//lib/rack/lint.rb#548 - def check_hijack(env); end - - # ==== Response (after headers) - # It is also possible to hijack a response after the status and headers - # have been sent. - # - # source://rack//lib/rack/lint.rb#595 - def check_hijack_response(headers, env); end - - # === The Input Stream - # - # The input stream is an IO-like object which contains the raw HTTP - # POST data. - # - # source://rack//lib/rack/lint.rb#365 - def check_input(input); end - - # === The Status - # - # source://rack//lib/rack/lint.rb#647 - def check_status(status); end - - # source://rack//lib/rack/lint.rb#781 - def close; end - - # === The Body - # - # source://rack//lib/rack/lint.rb#734 - def each; end - - # source://rack//lib/rack/lint.rb#721 - def verify_content_length(bytes); end -end - -# source://rack//lib/rack/lint.rb#18 -module Rack::Lint::Assertion - # source://rack//lib/rack/lint.rb#19 - def assert(message); end -end - -# source://rack//lib/rack/lint.rb#492 -class Rack::Lint::ErrorWrapper - include ::Rack::Lint::Assertion - - # @return [ErrorWrapper] a new instance of ErrorWrapper - # - # source://rack//lib/rack/lint.rb#495 - def initialize(error); end - - # * +close+ must never be called on the error stream. - # - # @raise [LintError] - # - # source://rack//lib/rack/lint.rb#517 - def close(*args); end - - # * +flush+ must be called without arguments and must be called - # in order to make the error appear for sure. - # - # source://rack//lib/rack/lint.rb#512 - def flush; end - - # * +puts+ must be called with a single argument that responds to +to_s+. - # - # source://rack//lib/rack/lint.rb#500 - def puts(str); end - - # * +write+ must be called with a single argument that is a String. - # - # @raise [LintError] - # - # source://rack//lib/rack/lint.rb#505 - def write(str); end -end - -# source://rack//lib/rack/lint.rb#522 -class Rack::Lint::HijackWrapper - include ::Rack::Lint::Assertion - extend ::Forwardable - - # @return [HijackWrapper] a new instance of HijackWrapper - # - # source://rack//lib/rack/lint.rb#533 - def initialize(io); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def close(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def close_read(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def close_write(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def closed?(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def flush(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def read(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def read_nonblock(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def write(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def write_nonblock(*args, **_arg1, &block); end -end - -# source://rack//lib/rack/lint.rb#526 -Rack::Lint::HijackWrapper::REQUIRED_METHODS = T.let(T.unsafe(nil), Array) - -# source://rack//lib/rack/lint.rb#383 -class Rack::Lint::InputWrapper - include ::Rack::Lint::Assertion - - # @return [InputWrapper] a new instance of InputWrapper - # - # source://rack//lib/rack/lint.rb#386 - def initialize(input); end - - # * +close+ must never be called on the input stream. - # - # @raise [LintError] - # - # source://rack//lib/rack/lint.rb#477 - def close(*args); end - - # * +each+ must be called without arguments and only yield Strings. - # - # @raise [LintError] - # - # source://rack//lib/rack/lint.rb#451 - def each(*args); end - - # * +gets+ must be called without arguments and return a string, - # or +nil+ on EOF. - # - # @raise [LintError] - # - # source://rack//lib/rack/lint.rb#392 - def gets(*args); end - - # * +read+ behaves like IO#read. - # Its signature is read([length, [buffer]]). - # - # If given, +length+ must be a non-negative Integer (>= 0) or +nil+, - # and +buffer+ must be a String and may not be nil. - # - # If +length+ is given and not nil, then this method reads at most - # +length+ bytes from the input stream. - # - # If +length+ is not given or nil, then this method reads - # all data until EOF. - # - # When EOF is reached, this method returns nil if +length+ is given - # and not nil, or "" if +length+ is not given or is nil. - # - # If +buffer+ is given, then the read data will be placed - # into +buffer+ instead of a newly created String object. - # - # source://rack//lib/rack/lint.rb#418 - def read(*args); end - - # * +rewind+ must be called without arguments. It rewinds the input - # stream back to the beginning. It must not raise Errno::ESPIPE: - # that is, it may not be a pipe or a socket. Therefore, handler - # developers must buffer the input data into some rewindable object - # if the underlying input stream is not rewindable. - # - # @raise [LintError] - # - # source://rack//lib/rack/lint.rb#466 - def rewind(*args); end -end - -# :stopdoc: -# -# source://rack//lib/rack/lint.rb#17 -class Rack::Lint::LintError < ::RuntimeError; end - -# Rack::Lock locks every request inside a mutex, so that every request -# will effectively be executed synchronously. -# -# source://rack//lib/rack/lock.rb#8 -class Rack::Lock - # @return [Lock] a new instance of Lock - # - # source://rack//lib/rack/lock.rb#9 - def initialize(app, mutex = T.unsafe(nil)); end - - # source://rack//lib/rack/lock.rb#13 - def call(env); end - - private - - # source://rack//lib/rack/lock.rb#27 - def unlock; end -end - -# Sets up rack.logger to write to rack.errors stream -# -# source://rack//lib/rack/logger.rb#7 -class Rack::Logger - # @return [Logger] a new instance of Logger - # - # source://rack//lib/rack/logger.rb#8 - def initialize(app, level = T.unsafe(nil)); end - - # source://rack//lib/rack/logger.rb#12 - def call(env); end -end - -# Rack::MediaType parse media type and parameters out of content_type string -# -# source://rack//lib/rack/media_type.rb#6 -class Rack::MediaType - class << self - # The media type parameters provided in CONTENT_TYPE as a Hash, or - # an empty Hash if no CONTENT_TYPE or media-type parameters were - # provided. e.g., when the CONTENT_TYPE is "text/plain;charset=utf-8", - # this method responds with the following Hash: - # { 'charset' => 'utf-8' } - # - # source://rack//lib/rack/media_type.rb#30 - def params(content_type); end - - # The media type (type/subtype) portion of the CONTENT_TYPE header - # without any media type parameters. e.g., when CONTENT_TYPE is - # "text/plain;charset=utf-8", the media-type is "text/plain". - # - # For more information on the use of media types in HTTP, see: - # http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 - # - # source://rack//lib/rack/media_type.rb#16 - def type(content_type); end - - private - - # source://rack//lib/rack/media_type.rb#43 - def strip_doublequotes(str); end - end -end - -# source://rack//lib/rack/media_type.rb#7 -Rack::MediaType::SPLIT_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/method_override.rb#4 -class Rack::MethodOverride - # @return [MethodOverride] a new instance of MethodOverride - # - # source://rack//lib/rack/method_override.rb#11 - def initialize(app); end - - # source://rack//lib/rack/method_override.rb#15 - def call(env); end - - # source://rack//lib/rack/method_override.rb#27 - def method_override(env); end - - private - - # source://rack//lib/rack/method_override.rb#40 - def allowed_methods; end - - # source://rack//lib/rack/method_override.rb#44 - def method_override_param(req); end -end - -# source://rack//lib/rack/method_override.rb#9 -Rack::MethodOverride::ALLOWED_METHODS = T.let(T.unsafe(nil), Array) - -# source://rack//lib/rack/method_override.rb#5 -Rack::MethodOverride::HTTP_METHODS = T.let(T.unsafe(nil), Array) - -# source://rack//lib/rack/method_override.rb#8 -Rack::MethodOverride::HTTP_METHOD_OVERRIDE_HEADER = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/method_override.rb#7 -Rack::MethodOverride::METHOD_OVERRIDE_PARAM_KEY = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/mime.rb#4 -module Rack::Mime - private - - # Returns true if the given value is a mime match for the given mime match - # specification, false otherwise. - # - # Rack::Mime.match?('text/html', 'text/*') => true - # Rack::Mime.match?('text/plain', '*') => true - # Rack::Mime.match?('text/html', 'application/json') => false - # - # @return [Boolean] - # - # source://rack//lib/rack/mime.rb#30 - def match?(value, matcher); end - - # Returns String with mime type if found, otherwise use +fallback+. - # +ext+ should be filename extension in the '.ext' format that - # File.extname(file) returns. - # +fallback+ may be any object - # - # Also see the documentation for MIME_TYPES - # - # Usage: - # Rack::Mime.mime_type('.foo') - # - # This is a shortcut for: - # Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream') - # - # source://rack//lib/rack/mime.rb#18 - def mime_type(ext, fallback = T.unsafe(nil)); end - - class << self - # Returns true if the given value is a mime match for the given mime match - # specification, false otherwise. - # - # Rack::Mime.match?('text/html', 'text/*') => true - # Rack::Mime.match?('text/plain', '*') => true - # Rack::Mime.match?('text/html', 'application/json') => false - # - # @return [Boolean] - # - # source://rack//lib/rack/mime.rb#30 - def match?(value, matcher); end - - # Returns String with mime type if found, otherwise use +fallback+. - # +ext+ should be filename extension in the '.ext' format that - # File.extname(file) returns. - # +fallback+ may be any object - # - # Also see the documentation for MIME_TYPES - # - # Usage: - # Rack::Mime.mime_type('.foo') - # - # This is a shortcut for: - # Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream') - # - # source://rack//lib/rack/mime.rb#18 - def mime_type(ext, fallback = T.unsafe(nil)); end - end -end - -# List of most common mime-types, selected various sources -# according to their usefulness in a webserving scope for Ruby -# users. -# -# To amend this list with your local mime.types list you can use: -# -# require 'webrick/httputils' -# list = WEBrick::HTTPUtils.load_mime_types('/etc/mime.types') -# Rack::Mime::MIME_TYPES.merge!(list) -# -# N.B. On Ubuntu the mime.types file does not include the leading period, so -# users may need to modify the data before merging into the hash. -# -# source://rack//lib/rack/mime.rb#51 -Rack::Mime::MIME_TYPES = T.let(T.unsafe(nil), Hash) - -# Rack::MockRequest helps testing your Rack application without -# actually using HTTP. -# -# After performing a request on a URL with get/post/put/patch/delete, it -# returns a MockResponse with useful helper methods for effective -# testing. -# -# You can pass a hash with additional configuration to the -# get/post/put/patch/delete. -# :input:: A String or IO-like to be used as rack.input. -# :fatal:: Raise a FatalWarning if the app writes to rack.errors. -# :lint:: If true, wrap the application in a Rack::Lint. -# -# source://rack//lib/rack/mock.rb#22 -class Rack::MockRequest - # @return [MockRequest] a new instance of MockRequest - # - # source://rack//lib/rack/mock.rb#52 - def initialize(app); end - - # Make a DELETE request and return a MockResponse. See #request. - # - # source://rack//lib/rack/mock.rb#65 - def delete(uri, opts = T.unsafe(nil)); end - - # Make a GET request and return a MockResponse. See #request. - # - # source://rack//lib/rack/mock.rb#57 - def get(uri, opts = T.unsafe(nil)); end - - # Make a HEAD request and return a MockResponse. See #request. - # - # source://rack//lib/rack/mock.rb#67 - def head(uri, opts = T.unsafe(nil)); end - - # Make an OPTIONS request and return a MockResponse. See #request. - # - # source://rack//lib/rack/mock.rb#69 - def options(uri, opts = T.unsafe(nil)); end - - # Make a PATCH request and return a MockResponse. See #request. - # - # source://rack//lib/rack/mock.rb#63 - def patch(uri, opts = T.unsafe(nil)); end - - # Make a POST request and return a MockResponse. See #request. - # - # source://rack//lib/rack/mock.rb#59 - def post(uri, opts = T.unsafe(nil)); end - - # Make a PUT request and return a MockResponse. See #request. - # - # source://rack//lib/rack/mock.rb#61 - def put(uri, opts = T.unsafe(nil)); end - - # Make a request using the given request method for the given - # uri to the rack application and return a MockResponse. - # Options given are passed to MockRequest.env_for. - # - # source://rack//lib/rack/mock.rb#74 - def request(method = T.unsafe(nil), uri = T.unsafe(nil), opts = T.unsafe(nil)); end - - class << self - # Return the Rack environment used for a request to +uri+. - # All options that are strings are added to the returned environment. - # Options: - # :fatal :: Whether to raise an exception if request outputs to rack.errors - # :input :: The rack.input to set - # :method :: The HTTP request method to use - # :params :: The params to use - # :script_name :: The SCRIPT_NAME to set - # - # source://rack//lib/rack/mock.rb#105 - def env_for(uri = T.unsafe(nil), opts = T.unsafe(nil)); end - - # For historical reasons, we're pinning to RFC 2396. - # URI::Parser = URI::RFC2396_Parser - # - # source://rack//lib/rack/mock.rb#92 - def parse_uri_rfc2396(uri); end - end -end - -# source://rack//lib/rack/mock.rb#43 -Rack::MockRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) - -# source://rack//lib/rack/mock.rb#26 -class Rack::MockRequest::FatalWarner - # source://rack//lib/rack/mock.rb#35 - def flush; end - - # @raise [FatalWarning] - # - # source://rack//lib/rack/mock.rb#27 - def puts(warning); end - - # source://rack//lib/rack/mock.rb#38 - def string; end - - # @raise [FatalWarning] - # - # source://rack//lib/rack/mock.rb#31 - def write(warning); end -end - -# source://rack//lib/rack/mock.rb#23 -class Rack::MockRequest::FatalWarning < ::RuntimeError; end - -# Rack::MockResponse provides useful helpers for testing your apps. -# Usually, you don't create the MockResponse on your own, but use -# MockRequest. -# -# source://rack//lib/rack/mock.rb#173 -class Rack::MockResponse < ::Rack::Response - # @return [MockResponse] a new instance of MockResponse - # - # source://rack//lib/rack/mock.rb#184 - def initialize(status, headers, body, errors = T.unsafe(nil)); end - - # source://rack//lib/rack/mock.rb#194 - def =~(other); end - - # source://rack//lib/rack/mock.rb#202 - def body; end - - # source://rack//lib/rack/mock.rb#226 - def cookie(name); end - - # Headers - # - # source://rack//lib/rack/mock.rb#179 - def cookies; end - - # @return [Boolean] - # - # source://rack//lib/rack/mock.rb#222 - def empty?; end - - # Errors - # - # source://rack//lib/rack/mock.rb#182 - def errors; end - - # Errors - # - # source://rack//lib/rack/mock.rb#182 - def errors=(_arg0); end - - # source://rack//lib/rack/mock.rb#198 - def match(other); end - - # Headers - # - # source://rack//lib/rack/mock.rb#179 - def original_headers; end - - private - - # source://rack//lib/rack/mock.rb#253 - def identify_cookie_attributes(cookie_filling); end - - # source://rack//lib/rack/mock.rb#232 - def parse_cookies_from_header; end - - class << self - def [](*_arg0); end - end -end - -# A multipart form data parser, adapted from IOWA. -# -# Usually, Rack::Request#POST takes care of calling this. -# -# source://rack//lib/rack/multipart/parser.rb#6 -module Rack::Multipart - class << self - # source://rack//lib/rack/multipart.rb#58 - def build_multipart(params, first = T.unsafe(nil)); end - - # source://rack//lib/rack/multipart.rb#44 - def extract_multipart(req, params = T.unsafe(nil)); end - - # source://rack//lib/rack/multipart.rb#40 - def parse_multipart(env, params = T.unsafe(nil)); end - end -end - -# source://rack//lib/rack/multipart.rb#25 -Rack::Multipart::ATTRIBUTE = T.let(T.unsafe(nil), Regexp) - -# Updated definitions from RFC 2231 -# -# source://rack//lib/rack/multipart.rb#24 -Rack::Multipart::ATTRIBUTE_CHAR = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#19 -Rack::Multipart::BROKEN = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#17 -Rack::Multipart::CONDISP = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#36 -Rack::Multipart::DISPPARM = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#13 -Rack::Multipart::EOL = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/multipart.rb#32 -Rack::Multipart::EXTENDED_INITIAL_NAME = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#34 -Rack::Multipart::EXTENDED_INITIAL_PARAMETER = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#33 -Rack::Multipart::EXTENDED_INITIAL_VALUE = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#29 -Rack::Multipart::EXTENDED_OTHER_NAME = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#31 -Rack::Multipart::EXTENDED_OTHER_PARAMETER = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#30 -Rack::Multipart::EXTENDED_OTHER_VALUE = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#35 -Rack::Multipart::EXTENDED_PARAMETER = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart/generator.rb#5 -class Rack::Multipart::Generator - # @return [Generator] a new instance of Generator - # - # source://rack//lib/rack/multipart/generator.rb#6 - def initialize(params, first = T.unsafe(nil)); end - - # source://rack//lib/rack/multipart/generator.rb#14 - def dump; end - - private - - # source://rack//lib/rack/multipart/generator.rb#87 - def content_for_other(file, name); end - - # source://rack//lib/rack/multipart/generator.rb#75 - def content_for_tempfile(io, file, name); end - - # source://rack//lib/rack/multipart/generator.rb#50 - def flattened_params; end - - # @return [Boolean] - # - # source://rack//lib/rack/multipart/generator.rb#35 - def multipart?; end -end - -# source://rack//lib/rack/multipart.rb#15 -Rack::Multipart::MULTIPART = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#14 -Rack::Multipart::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/multipart.rb#21 -Rack::Multipart::MULTIPART_CONTENT_DISPOSITION = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#22 -Rack::Multipart::MULTIPART_CONTENT_ID = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#20 -Rack::Multipart::MULTIPART_CONTENT_TYPE = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart/parser.rb#7 -class Rack::Multipart::MultipartPartLimitError < ::Errno::EMFILE; end - -# source://rack//lib/rack/multipart/parser.rb#8 -class Rack::Multipart::MultipartTotalPartLimitError < ::StandardError; end - -# source://rack//lib/rack/multipart/parser.rb#10 -class Rack::Multipart::Parser - # @return [Parser] a new instance of Parser - # - # source://rack//lib/rack/multipart/parser.rb#180 - def initialize(boundary, tempfile, bufsize, query_parser); end - - # source://rack//lib/rack/multipart/parser.rb#199 - def on_read(content); end - - # source://rack//lib/rack/multipart/parser.rb#205 - def result; end - - # Returns the value of attribute state. - # - # source://rack//lib/rack/multipart/parser.rb#178 - def state; end - - private - - # source://rack//lib/rack/multipart/parser.rb#302 - def consume_boundary; end - - # source://rack//lib/rack/multipart/parser.rb#300 - def full_boundary; end - - # source://rack//lib/rack/multipart/parser.rb#312 - def get_filename(head); end - - # source://rack//lib/rack/multipart/parser.rb#248 - def handle_consume_token; end - - # source://rack//lib/rack/multipart/parser.rb#377 - def handle_empty_content!(content); end - - # source://rack//lib/rack/multipart/parser.rb#234 - def handle_fast_forward; end - - # source://rack//lib/rack/multipart/parser.rb#281 - def handle_mime_body; end - - # source://rack//lib/rack/multipart/parser.rb#258 - def handle_mime_head; end - - # source://rack//lib/rack/multipart/parser.rb#217 - def run_parser; end - - # source://rack//lib/rack/multipart/parser.rb#349 - def tag_multipart_encoding(filename, content_type, name, body); end - - class << self - # source://rack//lib/rack/multipart/parser.rb#66 - def parse(io, content_length, content_type, tmpfile, bufsize, qp); end - - # source://rack//lib/rack/multipart/parser.rb#59 - def parse_boundary(content_type); end - end -end - -# source://rack//lib/rack/multipart/parser.rb#21 -Rack::Multipart::Parser::BOUNDARY_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart/parser.rb#13 -Rack::Multipart::Parser::BUFSIZE = T.let(T.unsafe(nil), Integer) - -# source://rack//lib/rack/multipart/parser.rb#23 -class Rack::Multipart::Parser::BoundedIO - # @return [BoundedIO] a new instance of BoundedIO - # - # source://rack//lib/rack/multipart/parser.rb#24 - def initialize(io, content_length); end - - # source://rack//lib/rack/multipart/parser.rb#30 - def read(size, outbuf = T.unsafe(nil)); end - - # source://rack//lib/rack/multipart/parser.rb#51 - def rewind; end -end - -# source://rack//lib/rack/multipart/parser.rb#347 -Rack::Multipart::Parser::CHARSET = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/multipart/parser.rb#87 -class Rack::Multipart::Parser::Collector - include ::Enumerable - - # @return [Collector] a new instance of Collector - # - # source://rack//lib/rack/multipart/parser.rb#123 - def initialize(tempfile); end - - # source://rack//lib/rack/multipart/parser.rb#129 - def each; end - - # source://rack//lib/rack/multipart/parser.rb#149 - def on_mime_body(mime_index, content); end - - # source://rack//lib/rack/multipart/parser.rb#153 - def on_mime_finish(mime_index); end - - # source://rack//lib/rack/multipart/parser.rb#133 - def on_mime_head(mime_index, head, filename, content_type, name); end - - private - - # source://rack//lib/rack/multipart/parser.rb#158 - def check_part_limits; end -end - -# source://rack//lib/rack/multipart/parser.rb#111 -class Rack::Multipart::Parser::Collector::BufferPart < ::Rack::Multipart::Parser::Collector::MimePart - # source://rack//lib/rack/multipart/parser.rb#113 - def close; end - - # @return [Boolean] - # - # source://rack//lib/rack/multipart/parser.rb#112 - def file?; end -end - -# source://rack//lib/rack/multipart/parser.rb#88 -class Rack::Multipart::Parser::Collector::MimePart < ::Struct - # @yield [data] - # - # source://rack//lib/rack/multipart/parser.rb#89 - def get_data; end -end - -# source://rack//lib/rack/multipart/parser.rb#116 -class Rack::Multipart::Parser::Collector::TempfilePart < ::Rack::Multipart::Parser::Collector::MimePart - # source://rack//lib/rack/multipart/parser.rb#118 - def close; end - - # @return [Boolean] - # - # source://rack//lib/rack/multipart/parser.rb#117 - def file?; end -end - -# source://rack//lib/rack/multipart/parser.rb#57 -Rack::Multipart::Parser::EMPTY = T.let(T.unsafe(nil), Rack::Multipart::Parser::MultipartInfo) - -# source://rack//lib/rack/multipart/parser.rb#56 -class Rack::Multipart::Parser::MultipartInfo < ::Struct - # Returns the value of attribute params - # - # @return [Object] the current value of params - def params; end - - # Sets the attribute params - # - # @param value [Object] the value to set the attribute params to. - # @return [Object] the newly set value - def params=(_); end - - # Returns the value of attribute tmp_files - # - # @return [Object] the current value of tmp_files - def tmp_files; end - - # Sets the attribute tmp_files - # - # @param value [Object] the value to set the attribute tmp_files to. - # @return [Object] the newly set value - def tmp_files=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rack//lib/rack/multipart/parser.rb#15 -Rack::Multipart::Parser::TEMPFILE_FACTORY = T.let(T.unsafe(nil), Proc) - -# source://rack//lib/rack/multipart/parser.rb#14 -Rack::Multipart::Parser::TEXT_PLAIN = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/multipart.rb#28 -Rack::Multipart::REGULAR_PARAMETER = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#27 -Rack::Multipart::REGULAR_PARAMETER_NAME = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#37 -Rack::Multipart::RFC2183 = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#26 -Rack::Multipart::SECTION = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart.rb#16 -Rack::Multipart::TOKEN = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/multipart/uploaded_file.rb#5 -class Rack::Multipart::UploadedFile - # @return [UploadedFile] a new instance of UploadedFile - # - # source://rack//lib/rack/multipart/uploaded_file.rb#12 - def initialize(filepath = T.unsafe(nil), ct = T.unsafe(nil), bin = T.unsafe(nil), path: T.unsafe(nil), content_type: T.unsafe(nil), binary: T.unsafe(nil), filename: T.unsafe(nil), io: T.unsafe(nil)); end - - # The content type of the "uploaded" file - # - # source://rack//lib/rack/multipart/uploaded_file.rb#10 - def content_type; end - - # The content type of the "uploaded" file - # - # source://rack//lib/rack/multipart/uploaded_file.rb#10 - def content_type=(_arg0); end - - # source://rack//lib/rack/multipart/uploaded_file.rb#27 - def local_path; end - - # source://rack//lib/rack/multipart/uploaded_file.rb#36 - def method_missing(method_name, *args, &block); end - - # The filename, *not* including the path, of the "uploaded" file - # - # source://rack//lib/rack/multipart/uploaded_file.rb#7 - def original_filename; end - - # source://rack//lib/rack/multipart/uploaded_file.rb#27 - def path; end - - # @return [Boolean] - # - # source://rack//lib/rack/multipart/uploaded_file.rb#32 - def respond_to?(*args); end -end - -# source://rack//lib/rack/multipart.rb#18 -Rack::Multipart::VALUE = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/null_logger.rb#4 -class Rack::NullLogger - # @return [NullLogger] a new instance of NullLogger - # - # source://rack//lib/rack/null_logger.rb#5 - def initialize(app); end - - # source://rack//lib/rack/null_logger.rb#37 - def <<(msg); end - - # source://rack//lib/rack/null_logger.rb#36 - def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end - - # source://rack//lib/rack/null_logger.rb#9 - def call(env); end - - # source://rack//lib/rack/null_logger.rb#35 - def close; end - - # source://rack//lib/rack/null_logger.rb#27 - def datetime_format; end - - # source://rack//lib/rack/null_logger.rb#32 - def datetime_format=(datetime_format); end - - # source://rack//lib/rack/null_logger.rb#15 - def debug(progname = T.unsafe(nil), &block); end - - # @return [Boolean] - # - # source://rack//lib/rack/null_logger.rb#21 - def debug?; end - - # source://rack//lib/rack/null_logger.rb#17 - def error(progname = T.unsafe(nil), &block); end - - # @return [Boolean] - # - # source://rack//lib/rack/null_logger.rb#23 - def error?; end - - # source://rack//lib/rack/null_logger.rb#18 - def fatal(progname = T.unsafe(nil), &block); end - - # @return [Boolean] - # - # source://rack//lib/rack/null_logger.rb#24 - def fatal?; end - - # source://rack//lib/rack/null_logger.rb#28 - def formatter; end - - # source://rack//lib/rack/null_logger.rb#33 - def formatter=(formatter); end - - # source://rack//lib/rack/null_logger.rb#14 - def info(progname = T.unsafe(nil), &block); end - - # @return [Boolean] - # - # source://rack//lib/rack/null_logger.rb#20 - def info?; end - - # source://rack//lib/rack/null_logger.rb#25 - def level; end - - # source://rack//lib/rack/null_logger.rb#30 - def level=(level); end - - # source://rack//lib/rack/null_logger.rb#26 - def progname; end - - # source://rack//lib/rack/null_logger.rb#31 - def progname=(progname); end - - # source://rack//lib/rack/null_logger.rb#29 - def sev_threshold; end - - # source://rack//lib/rack/null_logger.rb#34 - def sev_threshold=(sev_threshold); end - - # source://rack//lib/rack/null_logger.rb#19 - def unknown(progname = T.unsafe(nil), &block); end - - # source://rack//lib/rack/null_logger.rb#16 - def warn(progname = T.unsafe(nil), &block); end - - # @return [Boolean] - # - # source://rack//lib/rack/null_logger.rb#22 - def warn?; end -end - -# source://rack//lib/rack.rb#45 -Rack::OPTIONS = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#42 -Rack::PATCH = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#21 -Rack::PATH_INFO = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#40 -Rack::POST = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#41 -Rack::PUT = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#25 -Rack::QUERY_STRING = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/query_parser.rb#4 -class Rack::QueryParser - # @return [QueryParser] a new instance of QueryParser - # - # source://rack//lib/rack/query_parser.rb#29 - def initialize(params_class, key_space_limit, param_depth_limit); end - - # Returns the value of attribute key_space_limit. - # - # source://rack//lib/rack/query_parser.rb#27 - def key_space_limit; end - - # source://rack//lib/rack/query_parser.rb#128 - def make_params; end - - # source://rack//lib/rack/query_parser.rb#136 - def new_depth_limit(param_depth_limit); end - - # source://rack//lib/rack/query_parser.rb#132 - def new_space_limit(key_space_limit); end - - # normalize_params recursively expands parameters into structural types. If - # the structural types represented by two different parameter names are in - # conflict, a ParameterTypeError is raised. - # - # @raise [ParamsTooDeepError] - # - # source://rack//lib/rack/query_parser.rb#87 - def normalize_params(params, name, v, depth); end - - # Returns the value of attribute param_depth_limit. - # - # source://rack//lib/rack/query_parser.rb#27 - def param_depth_limit; end - - # parse_nested_query expands a query string into structural types. Supported - # types are Arrays, Hashes and basic value types. It is possible to supply - # query strings with parameters of conflicting types, in this case a - # ParameterTypeError is raised. Users are encouraged to return a 400 in this - # case. - # - # source://rack//lib/rack/query_parser.rb#68 - def parse_nested_query(qs, d = T.unsafe(nil)); end - - # Stolen from Mongrel, with some small modifications: - # Parses a query string by breaking it up at the '&' - # and ';' characters. You can also use this to parse - # cookies by changing the characters used in the second - # parameter (which defaults to '&;'). - # - # source://rack//lib/rack/query_parser.rb#40 - def parse_query(qs, d = T.unsafe(nil), &unescaper); end - - private - - # @return [Boolean] - # - # source://rack//lib/rack/query_parser.rb#146 - def params_hash_has_key?(hash, key); end - - # @return [Boolean] - # - # source://rack//lib/rack/query_parser.rb#142 - def params_hash_type?(obj); end - - # source://rack//lib/rack/query_parser.rb#158 - def unescape(s); end - - class << self - # source://rack//lib/rack/query_parser.rb#23 - def make_default(key_space_limit, param_depth_limit); end - end -end - -# source://rack//lib/rack/query_parser.rb#8 -Rack::QueryParser::COMMON_SEP = T.let(T.unsafe(nil), Hash) - -# source://rack//lib/rack/query_parser.rb#7 -Rack::QueryParser::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) - -# InvalidParameterError is the error that is raised when incoming structural -# parameters (parsed by parse_nested_query) contain invalid format or byte -# sequence. -# -# source://rack//lib/rack/query_parser.rb#17 -class Rack::QueryParser::InvalidParameterError < ::ArgumentError; end - -# ParameterTypeError is the error that is raised when incoming structural -# parameters (parsed by parse_nested_query) contain conflicting types. -# -# source://rack//lib/rack/query_parser.rb#12 -class Rack::QueryParser::ParameterTypeError < ::TypeError; end - -# source://rack//lib/rack/query_parser.rb#162 -class Rack::QueryParser::Params - # @return [Params] a new instance of Params - # - # source://rack//lib/rack/query_parser.rb#163 - def initialize(limit); end - - # source://rack//lib/rack/query_parser.rb#169 - def [](key); end - - # @raise [ParamsTooDeepError] - # - # source://rack//lib/rack/query_parser.rb#173 - def []=(key, value); end - - # @return [Boolean] - # - # source://rack//lib/rack/query_parser.rb#179 - def key?(key); end - - # Recursively unwraps nested `Params` objects and constructs an object - # of the same shape, but using the objects' internal representations - # (Ruby hashes) in place of the objects. The result is a hash consisting - # purely of Ruby primitives. - # - # Mutation warning! - # - # 1. This method mutates the internal representation of the `Params` - # objects in order to save object allocations. - # - # 2. The value you get back is a reference to the internal hash - # representation, not a copy. - # - # 3. Because the `Params` object's internal representation is mutable - # through the `#[]=` method, it is not thread safe. The result of - # getting the hash representation while another thread is adding a - # key to it is non-deterministic. - # - # source://rack//lib/rack/query_parser.rb#201 - def to_h; end - - # Recursively unwraps nested `Params` objects and constructs an object - # of the same shape, but using the objects' internal representations - # (Ruby hashes) in place of the objects. The result is a hash consisting - # purely of Ruby primitives. - # - # Mutation warning! - # - # 1. This method mutates the internal representation of the `Params` - # objects in order to save object allocations. - # - # 2. The value you get back is a reference to the internal hash - # representation, not a copy. - # - # 3. Because the `Params` object's internal representation is mutable - # through the `#[]=` method, it is not thread safe. The result of - # getting the hash representation while another thread is adding a - # key to it is non-deterministic. - # - # source://rack//lib/rack/query_parser.rb#201 - def to_params_hash; end -end - -# ParamsTooDeepError is the error that is raised when params are recursively -# nested over the specified limit. -# -# source://rack//lib/rack/query_parser.rb#21 -class Rack::QueryParser::ParamsTooDeepError < ::RangeError; end - -# source://rack//lib/rack.rb#53 -Rack::RACK_ERRORS = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#63 -Rack::RACK_HIJACK = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#65 -Rack::RACK_HIJACK_IO = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#55 -Rack::RACK_INPUT = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#64 -Rack::RACK_IS_HIJACK = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#54 -Rack::RACK_LOGGER = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#76 -Rack::RACK_METHODOVERRIDE_ORIGINAL_METHOD = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#67 -Rack::RACK_MULTIPART_BUFFER_SIZE = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#68 -Rack::RACK_MULTIPART_TEMPFILE_FACTORY = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#60 -Rack::RACK_MULTIPROCESS = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#59 -Rack::RACK_MULTITHREAD = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#66 -Rack::RACK_RECURSIVE_INCLUDE = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#72 -Rack::RACK_REQUEST_COOKIE_HASH = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#73 -Rack::RACK_REQUEST_COOKIE_STRING = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#70 -Rack::RACK_REQUEST_FORM_HASH = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#69 -Rack::RACK_REQUEST_FORM_INPUT = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#71 -Rack::RACK_REQUEST_FORM_VARS = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#74 -Rack::RACK_REQUEST_QUERY_HASH = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#75 -Rack::RACK_REQUEST_QUERY_STRING = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#61 -Rack::RACK_RUNONCE = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#56 -Rack::RACK_SESSION = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#57 -Rack::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#77 -Rack::RACK_SESSION_UNPACKED_COOKIE_DATA = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#58 -Rack::RACK_SHOWSTATUS_DETAIL = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#52 -Rack::RACK_TEMPFILES = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#62 -Rack::RACK_URL_SCHEME = T.let(T.unsafe(nil), String) - -# Rack environment variables -# -# source://rack//lib/rack.rb#51 -Rack::RACK_VERSION = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/version.rb#23 -Rack::RELEASE = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#22 -Rack::REQUEST_METHOD = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#23 -Rack::REQUEST_PATH = T.let(T.unsafe(nil), String) - -# Rack::Recursive allows applications called down the chain to -# include data from other applications (by using -# rack['rack.recursive.include'][...] or raise a -# ForwardRequest to redirect internally. -# -# source://rack//lib/rack/recursive.rb#34 -class Rack::Recursive - # @return [Recursive] a new instance of Recursive - # - # source://rack//lib/rack/recursive.rb#35 - def initialize(app); end - - # source://rack//lib/rack/recursive.rb#43 - def _call(env); end - - # source://rack//lib/rack/recursive.rb#39 - def call(env); end - - # source://rack//lib/rack/recursive.rb#50 - def include(env, path); end -end - -# High performant source reloader -# -# This class acts as Rack middleware. -# -# What makes it especially suited for use in a production environment is that -# any file will only be checked once and there will only be made one system -# call stat(2). -# -# Please note that this will not reload files in the background, it does so -# only when actively called. -# -# It is performing a check/reload cycle at the start of every request, but -# also respects a cool down time, during which nothing will be done. -# -# source://rack//lib/rack/reloader.rb#24 -class Rack::Reloader - # @return [Reloader] a new instance of Reloader - # - # source://rack//lib/rack/reloader.rb#27 - def initialize(app, cooldown = T.unsafe(nil), backend = T.unsafe(nil)); end - - # source://rack//lib/rack/reloader.rb#38 - def call(env); end - - # source://rack//lib/rack/reloader.rb#52 - def reload!(stderr = T.unsafe(nil)); end - - # A safe Kernel::load, issuing the hooks depending on the results - # - # source://rack//lib/rack/reloader.rb#60 - def safe_load(file, mtime, stderr = T.unsafe(nil)); end -end - -# source://rack//lib/rack/reloader.rb#70 -module Rack::Reloader::Stat - # Takes a relative or absolute +file+ name, a couple possible +paths+ that - # the +file+ might reside in. Returns the full path and File::Stat for the - # path. - # - # source://rack//lib/rack/reloader.rb#90 - def figure_path(file, paths); end - - # source://rack//lib/rack/reloader.rb#71 - def rotation; end - - # source://rack//lib/rack/reloader.rb#105 - def safe_stat(file); end -end - -# Rack::Request provides a convenient interface to a Rack -# environment. It is stateless, the environment +env+ passed to the -# constructor will be directly modified. -# -# req = Rack::Request.new(env) -# req.post? -# req.params["data"] -# -# source://rack//lib/rack/request.rb#12 -class Rack::Request - include ::Rack::Request::Env - include ::Rack::Request::Helpers - - # @return [Request] a new instance of Request - # - # source://rack//lib/rack/request.rb#26 - def initialize(env); end - - # source://rack//lib/rack/request.rb#40 - def delete_param(k); end - - # source://rack//lib/rack/request.rb#31 - def params; end - - # source://rack//lib/rack/request.rb#31 - def query; end - - # source://rack//lib/rack/request.rb#35 - def update_param(k, v); end - - # source://yard/0.9.36/lib/yard/server/rack_adapter.rb#94 - def version_supplied; end - - # source://yard/0.9.36/lib/yard/server/rack_adapter.rb#94 - def version_supplied=(_arg0); end - - # source://yard/0.9.36/lib/yard/server/rack_adapter.rb#96 - def xhr?; end - - class << self - # Returns the value of attribute ip_filter. - # - # source://rack//lib/rack/request.rb#16 - def ip_filter; end - - # Sets the attribute ip_filter - # - # @param value the value to set the attribute ip_filter to. - # - # source://rack//lib/rack/request.rb#16 - def ip_filter=(_arg0); end - end -end - -# source://rack//lib/rack/request.rb#20 -Rack::Request::ALLOWED_SCHEMES = T.let(T.unsafe(nil), Array) - -# source://rack//lib/rack/request.rb#46 -module Rack::Request::Env - # source://rack//lib/rack/request.rb#50 - def initialize(env); end - - # Add a header that may have multiple values. - # - # Example: - # request.add_header 'Accept', 'image/png' - # request.add_header 'Accept', '*/*' - # - # assert_equal 'image/png,*/*', request.get_header('Accept') - # - # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 - # - # source://rack//lib/rack/request.rb#91 - def add_header(key, v); end - - # Delete a request specific value for `name`. - # - # source://rack//lib/rack/request.rb#102 - def delete_header(name); end - - # Loops through each key / value pair in the request specific data. - # - # source://rack//lib/rack/request.rb#73 - def each_header(&block); end - - # The environment of the request. - # - # source://rack//lib/rack/request.rb#48 - def env; end - - # If a block is given, it yields to the block if the value hasn't been set - # on the request. - # - # source://rack//lib/rack/request.rb#68 - def fetch_header(name, &block); end - - # Get a request specific value for `name`. - # - # source://rack//lib/rack/request.rb#62 - def get_header(name); end - - # Predicate method to test to see if `name` has been set as request - # specific data - # - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#57 - def has_header?(name); end - - # Set a request specific value for `name` to `v` - # - # source://rack//lib/rack/request.rb#78 - def set_header(name, v); end - - private - - # source://rack//lib/rack/request.rb#106 - def initialize_copy(other); end -end - -# source://rack//lib/rack/request.rb#111 -module Rack::Request::Helpers - # Returns the data received in the query string. - # - # source://rack//lib/rack/request.rb#426 - def GET; end - - # Returns the data received in the request body. - # - # This method support both application/x-www-form-urlencoded and - # multipart/form-data. - # - # source://rack//lib/rack/request.rb#440 - def POST; end - - # shortcut for request.params[key] - # - # source://rack//lib/rack/request.rb#532 - def [](key); end - - # shortcut for request.params[key] = value - # - # Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params. - # - # source://rack//lib/rack/request.rb#543 - def []=(key, value); end - - # source://rack//lib/rack/request.rb#519 - def accept_encoding; end - - # source://rack//lib/rack/request.rb#523 - def accept_language; end - - # The authority of the incoming request as defined by RFC3976. - # https://tools.ietf.org/html/rfc3986#section-3.2 - # - # In HTTP/1, this is the `host` header. - # In HTTP/2, this is the `:authority` pseudo-header. - # - # source://rack//lib/rack/request.rb#227 - def authority; end - - # source://rack//lib/rack/request.rb#502 - def base_url; end - - # source://rack//lib/rack/request.rb#150 - def body; end - - # The character set of the request body if a "charset" media type - # parameter was given, or nil if no "charset" was specified. Note - # that, per RFC2616, text/* media types that specify no explicit - # charset are to be considered ISO-8859-1. - # - # source://rack//lib/rack/request.rb#400 - def content_charset; end - - # source://rack//lib/rack/request.rb#159 - def content_length; end - - # source://rack//lib/rack/request.rb#271 - def content_type; end - - # source://rack//lib/rack/request.rb#256 - def cookies; end - - # Checks the HTTP request method (or verb) to see if it was of type DELETE - # - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#181 - def delete?; end - - # Destructively delete a parameter, whether it's in GET or POST. Returns the value of the deleted parameter. - # - # If the parameter is in both GET and POST, the POST value takes precedence since that's how #params works. - # - # env['rack.input'] is not touched. - # - # source://rack//lib/rack/request.rb#497 - def delete_param(k); end - - # Determine whether the request body contains form-data by checking - # the request Content-Type for one of the media-types: - # "application/x-www-form-urlencoded" or "multipart/form-data". The - # list of form-data media types can be modified through the - # +FORM_DATA_MEDIA_TYPES+ array. - # - # A request body is also assumed to contain form-data when no - # Content-Type header is provided and the request_method is POST. - # - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#412 - def form_data?; end - - # source://rack//lib/rack/request.rb#344 - def forwarded_authority; end - - # source://rack//lib/rack/request.rb#330 - def forwarded_for; end - - # source://rack//lib/rack/request.rb#338 - def forwarded_port; end - - # source://rack//lib/rack/request.rb#515 - def fullpath; end - - # Checks the HTTP request method (or verb) to see if it was of type GET - # - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#184 - def get?; end - - # Checks the HTTP request method (or verb) to see if it was of type HEAD - # - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#187 - def head?; end - - # Returns a formatted host, suitable for being used in a URI. - # - # source://rack//lib/rack/request.rb#296 - def host; end - - # The `HTTP_HOST` header. - # - # source://rack//lib/rack/request.rb#281 - def host_authority; end - - # source://rack//lib/rack/request.rb#285 - def host_with_port(authority = T.unsafe(nil)); end - - # Returns an address suitable for being to resolve to an address. - # In the case of a domain name or IPv4 address, the result is the same - # as +host+. In the case of IPv6 or future address formats, the square - # brackets are removed. - # - # source://rack//lib/rack/request.rb#304 - def hostname; end - - # source://rack//lib/rack/request.rb#354 - def ip; end - - # Checks the HTTP request method (or verb) to see if it was of type LINK - # - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#193 - def link?; end - - # source://rack//lib/rack/request.rb#160 - def logger; end - - # The media type (type/subtype) portion of the CONTENT_TYPE header - # without any media type parameters. e.g., when CONTENT_TYPE is - # "text/plain;charset=utf-8", the media-type is "text/plain". - # - # For more information on the use of media types in HTTP, see: - # http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 - # - # source://rack//lib/rack/request.rb#383 - def media_type; end - - # The media type parameters provided in CONTENT_TYPE as a Hash, or - # an empty Hash if no CONTENT_TYPE or media-type parameters were - # provided. e.g., when the CONTENT_TYPE is "text/plain;charset=utf-8", - # this method responds with the following Hash: - # { 'charset' => 'utf-8' } - # - # source://rack//lib/rack/request.rb#392 - def media_type_params; end - - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#162 - def multithread?; end - - # Checks the HTTP request method (or verb) to see if it was of type OPTIONS - # - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#190 - def options?; end - - # The union of GET and POST data. - # - # Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params. - # - # source://rack//lib/rack/request.rb#468 - def params; end - - # Determine whether the request body contains data by checking - # the request media_type against registered parse-data media-types - # - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#421 - def parseable_data?; end - - # Checks the HTTP request method (or verb) to see if it was of type PATCH - # - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#196 - def patch?; end - - # source://rack//lib/rack/request.rb#511 - def path; end - - # source://rack//lib/rack/request.rb#154 - def path_info; end - - # source://rack//lib/rack/request.rb#155 - def path_info=(s); end - - # source://rack//lib/rack/request.rb#308 - def port; end - - # Checks the HTTP request method (or verb) to see if it was of type POST - # - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#199 - def post?; end - - # Checks the HTTP request method (or verb) to see if it was of type PUT - # - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#202 - def put?; end - - # source://rack//lib/rack/request.rb#158 - def query_string; end - - # the referer of the client - # - # source://rack//lib/rack/request.rb#165 - def referer; end - - # the referer of the client - # - # source://rack//lib/rack/request.rb#165 - def referrer; end - - # source://rack//lib/rack/request.rb#157 - def request_method; end - - # source://rack//lib/rack/request.rb#210 - def scheme; end - - # source://rack//lib/rack/request.rb#151 - def script_name; end - - # source://rack//lib/rack/request.rb#152 - def script_name=(s); end - - # The authority as defined by the `SERVER_NAME` and `SERVER_PORT` - # variables. - # - # source://rack//lib/rack/request.rb#233 - def server_authority; end - - # source://rack//lib/rack/request.rb#246 - def server_name; end - - # source://rack//lib/rack/request.rb#250 - def server_port; end - - # source://rack//lib/rack/request.rb#168 - def session; end - - # source://rack//lib/rack/request.rb#174 - def session_options; end - - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#350 - def ssl?; end - - # Checks the HTTP request method (or verb) to see if it was of type TRACE - # - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#205 - def trace?; end - - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#527 - def trusted_proxy?(ip); end - - # Checks the HTTP request method (or verb) to see if it was of type UNLINK - # - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#208 - def unlink?; end - - # Destructively update a parameter, whether it's in GET and/or POST. Returns nil. - # - # The parameter is updated wherever it was previous defined, so GET, POST, or both. If it wasn't previously defined, it's inserted into GET. - # - # env['rack.input'] is not touched. - # - # source://rack//lib/rack/request.rb#477 - def update_param(k, v); end - - # Tries to return a remake of the original request URL as a string. - # - # source://rack//lib/rack/request.rb#507 - def url; end - - # source://rack//lib/rack/request.rb#161 - def user_agent; end - - # like Hash#values_at - # - # source://rack//lib/rack/request.rb#552 - def values_at(*keys); end - - # @return [Boolean] - # - # source://rack//lib/rack/request.rb#276 - def xhr?; end - - private - - # source://rack//lib/rack/request.rb#641 - def allowed_scheme(header); end - - # source://rack//lib/rack/request.rb#558 - def default_session; end - - # source://rack//lib/rack/request.rb#645 - def extract_proto_header(header); end - - # source://rack//lib/rack/request.rb#636 - def forwarded_scheme; end - - # source://rack//lib/rack/request.rb#574 - def parse_http_accept_header(header); end - - # source://rack//lib/rack/request.rb#593 - def parse_multipart; end - - # source://rack//lib/rack/request.rb#589 - def parse_query(qs, d = T.unsafe(nil)); end - - # source://rack//lib/rack/request.rb#585 - def query_parser; end - - # source://rack//lib/rack/request.rb#632 - def reject_trusted_ip_addresses(ip_addresses); end - - # source://rack//lib/rack/request.rb#619 - def split_authority(authority); end - - # source://rack//lib/rack/request.rb#597 - def split_header(value); end - - # Assist with compatibility when processing `X-Forwarded-For`. - # - # source://rack//lib/rack/request.rb#561 - def wrap_ipv6(host); end -end - -# source://rack//lib/rack/request.rb#601 -Rack::Request::Helpers::AUTHORITY = T.let(T.unsafe(nil), Regexp) - -# Default ports depending on scheme. Used to decide whether or not -# to include the port in a generated URI. -# -# source://rack//lib/rack/request.rb#130 -Rack::Request::Helpers::DEFAULT_PORTS = T.let(T.unsafe(nil), Hash) - -# The set of form-data media-types. Requests that do not indicate -# one of the media types present in this list will not be eligible -# for form-data / param parsing. -# -# source://rack//lib/rack/request.rb#115 -Rack::Request::Helpers::FORM_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array) - -# The address of the client which connected to the proxy. -# -# source://rack//lib/rack/request.rb#133 -Rack::Request::Helpers::HTTP_X_FORWARDED_FOR = T.let(T.unsafe(nil), String) - -# The contents of the host/:authority header sent to the proxy. -# -# source://rack//lib/rack/request.rb#136 -Rack::Request::Helpers::HTTP_X_FORWARDED_HOST = T.let(T.unsafe(nil), String) - -# The port used to connect to the proxy. -# -# source://rack//lib/rack/request.rb#145 -Rack::Request::Helpers::HTTP_X_FORWARDED_PORT = T.let(T.unsafe(nil), String) - -# The protocol used to connect to the proxy. -# -# source://rack//lib/rack/request.rb#142 -Rack::Request::Helpers::HTTP_X_FORWARDED_PROTO = T.let(T.unsafe(nil), String) - -# The value of the scheme sent to the proxy. -# -# source://rack//lib/rack/request.rb#139 -Rack::Request::Helpers::HTTP_X_FORWARDED_SCHEME = T.let(T.unsafe(nil), String) - -# Another way for specifing https scheme was used. -# -# source://rack//lib/rack/request.rb#148 -Rack::Request::Helpers::HTTP_X_FORWARDED_SSL = T.let(T.unsafe(nil), String) - -# The set of media-types. Requests that do not indicate -# one of the media types present in this list will not be eligible -# for param parsing like soap attachments or generic multiparts -# -# source://rack//lib/rack/request.rb#123 -Rack::Request::Helpers::PARSEABLE_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array) - -# source://rack//lib/rack/request.rb#21 -Rack::Request::SCHEME_WHITELIST = T.let(T.unsafe(nil), Array) - -# Rack::Response provides a convenient interface to create a Rack -# response. -# -# It allows setting of headers and cookies, and provides useful -# defaults (an OK response with empty headers and body). -# -# You can use Response#write to iteratively generate your response, -# but note that this is buffered by Rack::Response until you call -# +finish+. +finish+ however can take a block inside which calls to -# +write+ are synchronous with the Rack response. -# -# Your application's +call+ should end returning Response#finish. -# -# source://rack//lib/rack/response.rb#18 -class Rack::Response - include ::Rack::Response::Helpers - - # Initialize the response object with the specified body, status - # and headers. - # - # HTTP protocol RFCs. - # conform to the HTTP protocol RFCs. - # - # Providing a body which responds to #to_str is legacy behaviour. - # - # @param body [nil, #each, #to_str] the response body. - # @param status [Integer] the integer status as defined by the - # @param headers [#each] a list of key-value header pairs which - # @return [Response] a new instance of Response - # @yield [_self] - # @yieldparam _self [Rack::Response] the object that the method was called on - # - # source://rack//lib/rack/response.rb#42 - def initialize(body = T.unsafe(nil), status = T.unsafe(nil), headers = T.unsafe(nil)); end - - # source://rack//lib/rack/response.rb#127 - def [](key); end - - # source://rack//lib/rack/response.rb#128 - def []=(key, v); end - - # Returns the value of attribute body. - # - # source://rack//lib/rack/response.rb#26 - def body; end - - # Sets the attribute body - # - # @param value the value to set the attribute body to. - # - # source://rack//lib/rack/response.rb#26 - def body=(_arg0); end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#73 - def chunked?; end - - # source://rack//lib/rack/response.rb#118 - def close; end - - # source://rack//lib/rack/response.rb#129 - def delete_header(key); end - - # source://rack//lib/rack/response.rb#98 - def each(&callback); end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#122 - def empty?; end - - # Generate a response array consistent with the requirements of the SPEC. - # which is suitable to be returned from the middleware `#call(env)` method. - # - # @return [Array] a 3-tuple suitable of `[status, headers, body]` - # - # source://rack//lib/rack/response.rb#80 - def finish(&block); end - - # source://rack//lib/rack/response.rb#127 - def get_header(key); end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#126 - def has_header?(key); end - - # Returns the value of attribute headers. - # - # @deprecated Use {#headers} instead. - # - # source://rack//lib/rack/response.rb#27 - def header; end - - # Returns the value of attribute headers. - # - # source://rack//lib/rack/response.rb#27 - def headers; end - - # Returns the value of attribute length. - # - # source://rack//lib/rack/response.rb#26 - def length; end - - # Sets the attribute length - # - # @param value the value to set the attribute length to. - # - # source://rack//lib/rack/response.rb#26 - def length=(_arg0); end - - # source://rack//lib/rack/response.rb#68 - def redirect(target, status = T.unsafe(nil)); end - - # source://rack//lib/rack/response.rb#128 - def set_header(key, v); end - - # Returns the value of attribute status. - # - # source://rack//lib/rack/response.rb#26 - def status; end - - # Sets the attribute status - # - # @param value the value to set the attribute status to. - # - # source://rack//lib/rack/response.rb#26 - def status=(_arg0); end - - # Generate a response array consistent with the requirements of the SPEC. - # which is suitable to be returned from the middleware `#call(env)` method. - # For *response - # - # @return [Array] a 3-tuple suitable of `[status, headers, body]` - # - # source://rack//lib/rack/response.rb#80 - def to_a(&block); end - - # Append to body and update Content-Length. - # - # NOTE: Do not mix #write and direct #body access! - # - # source://rack//lib/rack/response.rb#112 - def write(chunk); end - - class << self - # source://rack//lib/rack/response.rb#19 - def [](status, headers, body); end - end -end - -# source://rack//lib/rack/response.rb#23 -Rack::Response::CHUNKED = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/response.rb#134 -module Rack::Response::Helpers - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#145 - def accepted?; end - - # Add a header that may have multiple values. - # - # Example: - # response.add_header 'Vary', 'Accept-Encoding' - # response.add_header 'Vary', 'Cookie' - # - # assert_equal 'Accept-Encoding,Cookie', response.get_header('Vary') - # - # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 - # - # source://rack//lib/rack/response.rb#171 - def add_header(key, v); end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#148 - def bad_request?; end - - # Specify that the content should be cached. - # - # @option directive - # @param duration [Integer] The number of seconds until the cache expires. - # @param directive [Hash] a customizable set of options - # - # source://rack//lib/rack/response.rb#246 - def cache!(duration = T.unsafe(nil), directive: T.unsafe(nil)); end - - # source://rack//lib/rack/response.rb#229 - def cache_control; end - - # source://rack//lib/rack/response.rb#233 - def cache_control=(v); end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#140 - def client_error?; end - - # source://rack//lib/rack/response.rb#199 - def content_length; end - - # Get the content type of the response. - # - # source://rack//lib/rack/response.rb#182 - def content_type; end - - # Set the content type of the response. - # - # source://rack//lib/rack/response.rb#187 - def content_type=(content_type); end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#144 - def created?; end - - # source://rack//lib/rack/response.rb#217 - def delete_cookie(key, value = T.unsafe(nil)); end - - # Specifies that the content shouldn't be cached. Overrides `cache!` if already called. - # - # source://rack//lib/rack/response.rb#238 - def do_not_cache!; end - - # source://rack//lib/rack/response.rb#253 - def etag; end - - # source://rack//lib/rack/response.rb#257 - def etag=(v); end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#150 - def forbidden?; end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#158 - def include?(header); end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#137 - def informational?; end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#135 - def invalid?; end - - # source://rack//lib/rack/response.rb#204 - def location; end - - # source://rack//lib/rack/response.rb#208 - def location=(location); end - - # source://rack//lib/rack/response.rb#191 - def media_type; end - - # source://rack//lib/rack/response.rb#195 - def media_type_params; end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#152 - def method_not_allowed?; end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#147 - def moved_permanently?; end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#146 - def no_content?; end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#151 - def not_found?; end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#143 - def ok?; end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#153 - def precondition_failed?; end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#156 - def redirect?; end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#139 - def redirection?; end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#141 - def server_error?; end - - # source://rack//lib/rack/response.rb#212 - def set_cookie(key, value); end - - # source://rack//lib/rack/response.rb#221 - def set_cookie_header; end - - # source://rack//lib/rack/response.rb#225 - def set_cookie_header=(v); end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#138 - def successful?; end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#149 - def unauthorized?; end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#154 - def unprocessable?; end - - protected - - # source://rack//lib/rack/response.rb#287 - def append(chunk); end - - # source://rack//lib/rack/response.rb#263 - def buffered_body!; end -end - -# source://rack//lib/rack/response.rb#301 -class Rack::Response::Raw - include ::Rack::Response::Helpers - - # @return [Raw] a new instance of Raw - # - # source://rack//lib/rack/response.rb#307 - def initialize(status, headers); end - - # source://rack//lib/rack/response.rb#315 - def delete_header(key); end - - # source://rack//lib/rack/response.rb#313 - def get_header(key); end - - # @return [Boolean] - # - # source://rack//lib/rack/response.rb#312 - def has_header?(key); end - - # Returns the value of attribute headers. - # - # source://rack//lib/rack/response.rb#304 - def headers; end - - # source://rack//lib/rack/response.rb#314 - def set_header(key, v); end - - # Returns the value of attribute status. - # - # source://rack//lib/rack/response.rb#305 - def status; end - - # Sets the attribute status - # - # @param value the value to set the attribute status to. - # - # source://rack//lib/rack/response.rb#305 - def status=(_arg0); end -end - -# source://rack//lib/rack/response.rb#24 -Rack::Response::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) - -# Class which can make any IO object rewindable, including non-rewindable ones. It does -# this by buffering the data into a tempfile, which is rewindable. -# -# rack.input is required to be rewindable, so if your input stream IO is non-rewindable -# by nature (e.g. a pipe or a socket) then you can wrap it in an object of this class -# to easily make it rewindable. -# -# Don't forget to call #close when you're done. This frees up temporary resources that -# RewindableInput uses, though it does *not* close the original IO object. -# -# source://rack//lib/rack/rewindable_input.rb#16 -class Rack::RewindableInput - # @return [RewindableInput] a new instance of RewindableInput - # - # source://rack//lib/rack/rewindable_input.rb#17 - def initialize(io); end - - # Closes this RewindableInput object without closing the originally - # wrapped IO object. Cleans up any temporary resources that this RewindableInput - # has created. - # - # This method may be called multiple times. It does nothing on subsequent calls. - # - # source://rack//lib/rack/rewindable_input.rb#48 - def close; end - - # source://rack//lib/rack/rewindable_input.rb#33 - def each(&block); end - - # source://rack//lib/rack/rewindable_input.rb#23 - def gets; end - - # source://rack//lib/rack/rewindable_input.rb#28 - def read(*args); end - - # source://rack//lib/rack/rewindable_input.rb#38 - def rewind; end - - private - - # @return [Boolean] - # - # source://rack//lib/rack/rewindable_input.rb#90 - def filesystem_has_posix_semantics?; end - - # source://rack//lib/rack/rewindable_input.rb#61 - def make_rewindable; end -end - -# Sets an "X-Runtime" response header, indicating the response -# time of the request, in seconds -# -# You can put it right before the application to see the processing -# time, or before all the other middlewares to include time for them, -# too. -# -# source://rack//lib/rack/runtime.rb#10 -class Rack::Runtime - # @return [Runtime] a new instance of Runtime - # - # source://rack//lib/rack/runtime.rb#14 - def initialize(app, name = T.unsafe(nil)); end - - # source://rack//lib/rack/runtime.rb#20 - def call(env); end -end - -# source://rack//lib/rack/runtime.rb#11 -Rack::Runtime::FORMAT_STRING = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/runtime.rb#12 -Rack::Runtime::HEADER_NAME = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#24 -Rack::SCRIPT_NAME = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#27 -Rack::SERVER_NAME = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#28 -Rack::SERVER_PORT = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#26 -Rack::SERVER_PROTOCOL = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#33 -Rack::SET_COOKIE = T.let(T.unsafe(nil), String) - -# = Sendfile -# -# The Sendfile middleware intercepts responses whose body is being -# served from a file and replaces it with a server specific X-Sendfile -# header. The web server is then responsible for writing the file contents -# to the client. This can dramatically reduce the amount of work required -# by the Ruby backend and takes advantage of the web server's optimized file -# delivery code. -# -# In order to take advantage of this middleware, the response body must -# respond to +to_path+ and the request must include an X-Sendfile-Type -# header. Rack::Files and other components implement +to_path+ so there's -# rarely anything you need to do in your application. The X-Sendfile-Type -# header is typically set in your web servers configuration. The following -# sections attempt to document -# -# === Nginx -# -# Nginx supports the X-Accel-Redirect header. This is similar to X-Sendfile -# but requires parts of the filesystem to be mapped into a private URL -# hierarchy. -# -# The following example shows the Nginx configuration required to create -# a private "/files/" area, enable X-Accel-Redirect, and pass the special -# X-Sendfile-Type and X-Accel-Mapping headers to the backend: -# -# location ~ /files/(.*) { -# internal; -# alias /var/www/$1; -# } -# -# location / { -# proxy_redirect off; -# -# proxy_set_header Host $host; -# proxy_set_header X-Real-IP $remote_addr; -# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -# -# proxy_set_header X-Sendfile-Type X-Accel-Redirect; -# proxy_set_header X-Accel-Mapping /var/www/=/files/; -# -# proxy_pass http://127.0.0.1:8080/; -# } -# -# Note that the X-Sendfile-Type header must be set exactly as shown above. -# The X-Accel-Mapping header should specify the location on the file system, -# followed by an equals sign (=), followed name of the private URL pattern -# that it maps to. The middleware performs a simple substitution on the -# resulting path. -# -# See Also: https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile -# -# === lighttpd -# -# Lighttpd has supported some variation of the X-Sendfile header for some -# time, although only recent version support X-Sendfile in a reverse proxy -# configuration. -# -# $HTTP["host"] == "example.com" { -# proxy-core.protocol = "http" -# proxy-core.balancer = "round-robin" -# proxy-core.backends = ( -# "127.0.0.1:8000", -# "127.0.0.1:8001", -# ... -# ) -# -# proxy-core.allow-x-sendfile = "enable" -# proxy-core.rewrite-request = ( -# "X-Sendfile-Type" => (".*" => "X-Sendfile") -# ) -# } -# -# See Also: http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModProxyCore -# -# === Apache -# -# X-Sendfile is supported under Apache 2.x using a separate module: -# -# https://tn123.org/mod_xsendfile/ -# -# Once the module is compiled and installed, you can enable it using -# XSendFile config directive: -# -# RequestHeader Set X-Sendfile-Type X-Sendfile -# ProxyPassReverse / http://localhost:8001/ -# XSendFile on -# -# === Mapping parameter -# -# The third parameter allows for an overriding extension of the -# X-Accel-Mapping header. Mappings should be provided in tuples of internal to -# external. The internal values may contain regular expression syntax, they -# will be matched with case indifference. -# -# source://rack//lib/rack/sendfile.rb#100 -class Rack::Sendfile - # @return [Sendfile] a new instance of Sendfile - # - # source://rack//lib/rack/sendfile.rb#101 - def initialize(app, variation = T.unsafe(nil), mappings = T.unsafe(nil)); end - - # source://rack//lib/rack/sendfile.rb#109 - def call(env); end - - private - - # source://rack//lib/rack/sendfile.rb#149 - def map_accel_path(env, path); end - - # source://rack//lib/rack/sendfile.rb#143 - def variation(env); end -end - -# source://rack//lib/rack/server.rb#8 -class Rack::Server - # Options may include: - # * :app - # a rack application to run (overrides :config and :builder) - # * :builder - # a string to evaluate a Rack::Builder from - # * :config - # a rackup configuration file path to load (.ru) - # * :environment - # this selects the middleware that will be wrapped around - # your application. Default options available are: - # - development: CommonLogger, ShowExceptions, and Lint - # - deployment: CommonLogger - # - none: no extra middleware - # note: when the server is a cgi server, CommonLogger is not included. - # * :server - # choose a specific Rack::Handler, e.g. cgi, fcgi, webrick - # * :daemonize - # if true, the server will daemonize itself (fork, detach, etc) - # * :pid - # path to write a pid file after daemonize - # * :Host - # the host address to bind to (used by supporting Rack::Handler) - # * :Port - # the port to bind to (used by supporting Rack::Handler) - # * :AccessLog - # webrick access log options (or supporting Rack::Handler) - # * :debug - # turn on debug output ($DEBUG = true) - # * :warn - # turn on warnings ($-w = true) - # * :include - # add given paths to $LOAD_PATH - # * :require - # require the given libraries - # - # Additional options for profiling app initialization include: - # * :heapfile - # location for ObjectSpace.dump_all to write the output to - # * :profile_file - # location for CPU/Memory (StackProf) profile output (defaults to a tempfile) - # * :profile_mode - # StackProf profile mode (cpu|wall|object) - # - # @return [Server] a new instance of Server - # - # source://rack//lib/rack/server.rb#215 - def initialize(options = T.unsafe(nil)); end - - # source://rack//lib/rack/server.rb#248 - def app; end - - # source://rack//lib/rack/server.rb#234 - def default_options; end - - # source://rack//lib/rack/server.rb#282 - def middleware; end - - # source://rack//lib/rack/server.rb#229 - def options; end - - # Sets the attribute options - # - # @param value the value to set the attribute options to. - # - # source://rack//lib/rack/server.rb#171 - def options=(_arg0); end - - # source://rack//lib/rack/server.rb#330 - def server; end - - # source://rack//lib/rack/server.rb#286 - def start(&block); end - - private - - # source://rack//lib/rack/server.rb#411 - def build_app(app); end - - # source://rack//lib/rack/server.rb#344 - def build_app_and_options_from_config; end - - # source://rack//lib/rack/server.rb#392 - def build_app_from_string; end - - # source://rack//lib/rack/server.rb#440 - def check_pid!; end - - # source://rack//lib/rack/server.rb#425 - def daemonize_app; end - - # source://rack//lib/rack/server.rb#354 - def handle_profiling(heapfile, profile_mode, filename); end - - # source://rack//lib/rack/server.rb#382 - def make_profile_name(filename); end - - # source://rack//lib/rack/server.rb#407 - def opt_parser; end - - # source://rack//lib/rack/server.rb#396 - def parse_options(args); end - - # source://rack//lib/rack/server.rb#450 - def pidfile_process_status; end - - # source://rack//lib/rack/server.rb#421 - def wrapped_app; end - - # source://rack//lib/rack/server.rb#432 - def write_pid; end - - class << self - # source://rack//lib/rack/server.rb#259 - def default_middleware_by_environment; end - - # source://rack//lib/rack/server.rb#253 - def logging_middleware; end - - # source://rack//lib/rack/server.rb#277 - def middleware; end - - # Start a new rack server (like running rackup). This will parse ARGV and - # provide standard ARGV rackup options, defaulting to load 'config.ru'. - # - # Providing an options hash will prevent ARGV parsing and will not include - # any default options. - # - # This method can be used to very easily launch a CGI application, for - # example: - # - # Rack::Server.start( - # :app => lambda do |e| - # [200, {'Content-Type' => 'text/html'}, ['hello world']] - # end, - # :server => 'cgi' - # ) - # - # Further options available here are documented on Rack::Server#initialize - # - # source://rack//lib/rack/server.rb#167 - def start(options = T.unsafe(nil)); end - end -end - -# source://rack//lib/rack/server.rb#11 -class Rack::Server::Options - # source://rack//lib/rack/server.rb#127 - def handler_opts(options); end - - # source://rack//lib/rack/server.rb#12 - def parse!(args); end -end - -# source://rack//lib/rack.rb#136 -module Rack::Session; end - -# source://rack//lib/rack/session/abstract/id.rb#41 -module Rack::Session::Abstract; end - -# source://rack//lib/rack/session/abstract/id.rb#487 -class Rack::Session::Abstract::ID < ::Rack::Session::Abstract::Persisted - # All thread safety and session destroy procedures should occur here. - # Should return a new session id or nil if options[:drop] - # - # source://rack//lib/rack/session/abstract/id.rb#517 - def delete_session(req, sid, options); end - - # All thread safety and session retrieval procedures should occur here. - # Should return [session_id, session]. - # If nil is provided as the session id, generation of a new valid id - # should occur within. - # - # source://rack//lib/rack/session/abstract/id.rb#502 - def find_session(req, sid); end - - # All thread safety and session storage procedures should occur here. - # Must return the session id if the session was saved successfully, or - # false if the session could not be saved. - # - # source://rack//lib/rack/session/abstract/id.rb#510 - def write_session(req, sid, session, options); end - - class << self - # @private - # - # source://rack//lib/rack/session/abstract/id.rb#488 - def inherited(klass); end - end -end - -# ID sets up a basic framework for implementing an id based sessioning -# service. Cookies sent to the client for maintaining sessions will only -# contain an id reference. Only #find_session, #write_session and -# #delete_session are required to be overwritten. -# -# All parameters are optional. -# * :key determines the name of the cookie, by default it is -# 'rack.session' -# * :path, :domain, :expire_after, :secure, and :httponly set the related -# cookie options as by Rack::Response#set_cookie -# * :skip will not a set a cookie in the response nor update the session state -# * :defer will not set a cookie in the response but still update the session -# state if it is used with a backend -# * :renew (implementation dependent) will prompt the generation of a new -# session id, and migration of data to be referenced at the new id. If -# :defer is set, it will be overridden and the cookie will be set. -# * :sidbits sets the number of bits in length that a generated session -# id will be. -# -# These options can be set on a per request basis, at the location of -# env['rack.session.options']. Additionally the id of the -# session can be found within the options hash at the key :id. It is -# highly not recommended to change its value. -# -# Is Rack::Utils::Context compatible. -# -# Not included by default; you must require 'rack/session/abstract/id' -# to use. -# -# source://rack//lib/rack/session/abstract/id.rb#233 -class Rack::Session::Abstract::Persisted - # @return [Persisted] a new instance of Persisted - # - # source://rack//lib/rack/session/abstract/id.rb#250 - def initialize(app, options = T.unsafe(nil)); end - - # source://rack//lib/rack/session/abstract/id.rb#259 - def call(env); end - - # Acquires the session from the environment and the session id from - # the session options and passes them to #write_session. If successful - # and the :defer option is not true, a cookie will be added to the - # response with the session's id. - # - # source://rack//lib/rack/session/abstract/id.rb#373 - def commit_session(req, res); end - - # source://rack//lib/rack/session/abstract/id.rb#263 - def context(env, app = T.unsafe(nil)); end - - # Returns the value of attribute default_options. - # - # source://rack//lib/rack/session/abstract/id.rb#248 - def default_options; end - - # Returns the value of attribute key. - # - # source://rack//lib/rack/session/abstract/id.rb#248 - def key; end - - # Returns the value of attribute sid_secure. - # - # source://rack//lib/rack/session/abstract/id.rb#248 - def sid_secure; end - - private - - # Session should be committed if it was loaded, any of specific options like :renew, :drop - # or :expire_after was given and the security permissions match. Skips if skip is given. - # - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#342 - def commit_session?(req, session, options); end - - # source://rack//lib/rack/session/abstract/id.rb#408 - def cookie_value(data); end - - # Returns the current session id from the SessionHash. - # - # source://rack//lib/rack/session/abstract/id.rb#328 - def current_session_id(req); end - - # All thread safety and session destroy procedures should occur here. - # Should return a new session id or nil if options[:drop] - # - # source://rack//lib/rack/session/abstract/id.rb#448 - def delete_session(req, sid, options); end - - # Extract session id from request object. - # - # source://rack//lib/rack/session/abstract/id.rb#320 - def extract_session_id(request); end - - # All thread safety and session retrieval procedures should occur here. - # Should return [session_id, session]. - # If nil is provided as the session id, generation of a new valid id - # should occur within. - # - # source://rack//lib/rack/session/abstract/id.rb#433 - def find_session(env, sid); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#359 - def force_options?(options); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#355 - def forced_session_update?(session, options); end - - # Generate a new session id using Ruby #rand. The size of the - # session id is controlled by the :sidbits option. - # Monkey patch this to use custom methods for session id generation. - # - # source://rack//lib/rack/session/abstract/id.rb#288 - def generate_sid(secure = T.unsafe(nil)); end - - # source://rack//lib/rack/session/abstract/id.rb#278 - def initialize_sid; end - - # Extracts the session id from provided cookies and passes it and the - # environment to #find_session. - # - # source://rack//lib/rack/session/abstract/id.rb#312 - def load_session(req); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#351 - def loaded_session?(session); end - - # source://rack//lib/rack/session/abstract/id.rb#274 - def make_request(env); end - - # Sets the lazy session at 'rack.session' and places options and session - # metadata into 'rack.session.options'. - # - # source://rack//lib/rack/session/abstract/id.rb#301 - def prepare_session(req); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#363 - def security_matches?(request, options); end - - # Allow subclasses to prepare_session for different Session classes - # - # source://rack//lib/rack/session/abstract/id.rb#424 - def session_class; end - - # Check if the session exists or not. - # - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#334 - def session_exists?(req); end - - # Sets the cookie back to the client with session id. We skip the cookie - # setting if the value didn't change (sid is the same) or expires was given. - # - # source://rack//lib/rack/session/abstract/id.rb#415 - def set_cookie(request, res, cookie); end - - # All thread safety and session storage procedures should occur here. - # Must return the session id if the session was saved successfully, or - # false if the session could not be saved. - # - # source://rack//lib/rack/session/abstract/id.rb#441 - def write_session(req, sid, session, options); end -end - -# source://rack//lib/rack/session/abstract/id.rb#234 -Rack::Session::Abstract::Persisted::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://rack//lib/rack/session/abstract/id.rb#453 -class Rack::Session::Abstract::PersistedSecure < ::Rack::Session::Abstract::Persisted - # source://rack//lib/rack/session/abstract/id.rb#471 - def extract_session_id(*_arg0); end - - # source://rack//lib/rack/session/abstract/id.rb#465 - def generate_sid(*_arg0); end - - private - - # source://rack//lib/rack/session/abstract/id.rb#482 - def cookie_value(data); end - - # source://rack//lib/rack/session/abstract/id.rb#478 - def session_class; end -end - -# source://rack//lib/rack/session/abstract/id.rb#454 -class Rack::Session::Abstract::PersistedSecure::SecureSessionHash < ::Rack::Session::Abstract::SessionHash - # source://rack//lib/rack/session/abstract/id.rb#455 - def [](key); end -end - -# SessionHash is responsible to lazily load the session from store. -# -# source://rack//lib/rack/session/abstract/id.rb#44 -class Rack::Session::Abstract::SessionHash - include ::Enumerable - - # @return [SessionHash] a new instance of SessionHash - # - # source://rack//lib/rack/session/abstract/id.rb#62 - def initialize(store, req); end - - # source://rack//lib/rack/session/abstract/id.rb#82 - def [](key); end - - # source://rack//lib/rack/session/abstract/id.rb#108 - def []=(key, value); end - - # source://rack//lib/rack/session/abstract/id.rb#114 - def clear; end - - # source://rack//lib/rack/session/abstract/id.rb#140 - def delete(key); end - - # source://rack//lib/rack/session/abstract/id.rb#119 - def destroy; end - - # source://rack//lib/rack/session/abstract/id.rb#87 - def dig(key, *keys); end - - # source://rack//lib/rack/session/abstract/id.rb#77 - def each(&block); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#163 - def empty?; end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#153 - def exists?; end - - # source://rack//lib/rack/session/abstract/id.rb#92 - def fetch(key, default = T.unsafe(nil), &block); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#101 - def has_key?(key); end - - # source://rack//lib/rack/session/abstract/id.rb#68 - def id; end - - # Sets the attribute id - # - # @param value the value to set the attribute id to. - # - # source://rack//lib/rack/session/abstract/id.rb#46 - def id=(_arg0); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#101 - def include?(key); end - - # source://rack//lib/rack/session/abstract/id.rb#145 - def inspect; end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#101 - def key?(key); end - - # source://rack//lib/rack/session/abstract/id.rb#168 - def keys; end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#159 - def loaded?; end - - # source://rack//lib/rack/session/abstract/id.rb#129 - def merge!(hash); end - - # source://rack//lib/rack/session/abstract/id.rb#73 - def options; end - - # source://rack//lib/rack/session/abstract/id.rb#135 - def replace(hash); end - - # source://rack//lib/rack/session/abstract/id.rb#108 - def store(key, value); end - - # source://rack//lib/rack/session/abstract/id.rb#124 - def to_hash; end - - # source://rack//lib/rack/session/abstract/id.rb#129 - def update(hash); end - - # source://rack//lib/rack/session/abstract/id.rb#173 - def values; end - - private - - # source://rack//lib/rack/session/abstract/id.rb#188 - def load!; end - - # source://rack//lib/rack/session/abstract/id.rb#180 - def load_for_read!; end - - # source://rack//lib/rack/session/abstract/id.rb#184 - def load_for_write!; end - - # source://rack//lib/rack/session/abstract/id.rb#194 - def stringify_keys(other); end - - class << self - # source://rack//lib/rack/session/abstract/id.rb#50 - def find(req); end - - # source://rack//lib/rack/session/abstract/id.rb#54 - def set(req, session); end - - # source://rack//lib/rack/session/abstract/id.rb#58 - def set_options(req, options); end - end -end - -# source://rack//lib/rack/session/abstract/id.rb#48 -Rack::Session::Abstract::SessionHash::Unspecified = T.let(T.unsafe(nil), Object) - -# Rack::Session::Cookie provides simple cookie based session management. -# By default, the session is a Ruby Hash stored as base64 encoded marshalled -# data set to :key (default: rack.session). The object that encodes the -# session data is configurable and must respond to +encode+ and +decode+. -# Both methods must take a string and return a string. -# -# When the secret key is set, cookie data is checked for data integrity. -# The old secret key is also accepted and allows graceful secret rotation. -# -# Example: -# -# use Rack::Session::Cookie, :key => 'rack.session', -# :domain => 'foo.com', -# :path => '/', -# :expire_after => 2592000, -# :secret => 'change_me', -# :old_secret => 'also_change_me' -# -# All parameters are optional. -# -# -# Rack::Session::Cookie.new(application, { -# :coder => Rack::Session::Cookie::Identity.new -# }) -# -# -# Rack::Session::Cookie.new(application, { -# :coder => Class.new { -# def encode(str); str.reverse; end -# def decode(str); str.reverse; end -# }.new -# }) -# -# source://rack//lib/rack/session/cookie.rb#49 -class Rack::Session::Cookie < ::Rack::Session::Abstract::PersistedSecure - # @return [Cookie] a new instance of Cookie - # - # source://rack//lib/rack/session/cookie.rb#107 - def initialize(app, options = T.unsafe(nil)); end - - # Returns the value of attribute coder. - # - # source://rack//lib/rack/session/cookie.rb#105 - def coder; end - - private - - # source://rack//lib/rack/session/cookie.rb#180 - def delete_session(req, session_id, options); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/cookie.rb#185 - def digest_match?(data, digest); end - - # source://rack//lib/rack/session/cookie.rb#132 - def extract_session_id(request); end - - # source://rack//lib/rack/session/cookie.rb#126 - def find_session(req, sid); end - - # source://rack//lib/rack/session/cookie.rb#192 - def generate_hmac(data, secret); end - - # source://rack//lib/rack/session/cookie.rb#149 - def persistent_session_id!(data, sid = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rack//lib/rack/session/cookie.rb#196 - def secure?(options); end - - # source://rack//lib/rack/session/cookie.rb#136 - def unpacked_cookie_data(request); end - - # source://rack//lib/rack/session/cookie.rb#164 - def write_session(req, session_id, session, options); end -end - -# Encode session cookies as Base64 -# -# source://rack//lib/rack/session/cookie.rb#51 -class Rack::Session::Cookie::Base64 - # source://rack//lib/rack/session/cookie.rb#56 - def decode(str); end - - # source://rack//lib/rack/session/cookie.rb#52 - def encode(str); end -end - -# N.B. Unlike other encoding methods, the contained objects must be a -# valid JSON composite type, either a Hash or an Array. -# -# source://rack//lib/rack/session/cookie.rb#74 -class Rack::Session::Cookie::Base64::JSON < ::Rack::Session::Cookie::Base64 - # source://rack//lib/rack/session/cookie.rb#79 - def decode(str); end - - # source://rack//lib/rack/session/cookie.rb#75 - def encode(obj); end -end - -# Encode session cookies as Marshaled Base64 data -# -# source://rack//lib/rack/session/cookie.rb#61 -class Rack::Session::Cookie::Base64::Marshal < ::Rack::Session::Cookie::Base64 - # source://rack//lib/rack/session/cookie.rb#66 - def decode(str); end - - # source://rack//lib/rack/session/cookie.rb#62 - def encode(str); end -end - -# source://rack//lib/rack/session/cookie.rb#85 -class Rack::Session::Cookie::Base64::ZipJSON < ::Rack::Session::Cookie::Base64 - # source://rack//lib/rack/session/cookie.rb#90 - def decode(str); end - - # source://rack//lib/rack/session/cookie.rb#86 - def encode(obj); end -end - -# Use no encoding for session cookies -# -# source://rack//lib/rack/session/cookie.rb#100 -class Rack::Session::Cookie::Identity - # source://rack//lib/rack/session/cookie.rb#102 - def decode(str); end - - # source://rack//lib/rack/session/cookie.rb#101 - def encode(str); end -end - -# source://rack//lib/rack/session/cookie.rb#155 -class Rack::Session::Cookie::SessionId - # @return [SessionId] a new instance of SessionId - # - # source://rack//lib/rack/session/cookie.rb#158 - def initialize(session_id, cookie_value); end - - # Returns the value of attribute cookie_value. - # - # source://rack//lib/rack/session/cookie.rb#156 - def cookie_value; end -end - -# Rack::Session::Pool provides simple cookie based session management. -# Session data is stored in a hash held by @pool. -# In the context of a multithreaded environment, sessions being -# committed to the pool is done in a merging manner. -# -# The :drop option is available in rack.session.options if you wish to -# explicitly remove the session from the session cache. -# -# Example: -# myapp = MyRackApp.new -# sessioned = Rack::Session::Pool.new(myapp, -# :domain => 'foo.com', -# :expire_after => 2592000 -# ) -# Rack::Handler::WEBrick.run sessioned -# -# source://rack//lib/rack/session/pool.rb#29 -class Rack::Session::Pool < ::Rack::Session::Abstract::PersistedSecure - # @return [Pool] a new instance of Pool - # - # source://rack//lib/rack/session/pool.rb#33 - def initialize(app, options = T.unsafe(nil)); end - - # source://rack//lib/rack/session/pool.rb#63 - def delete_session(req, session_id, options); end - - # source://rack//lib/rack/session/pool.rb#46 - def find_session(req, sid); end - - # source://rack//lib/rack/session/pool.rb#39 - def generate_sid; end - - # Returns the value of attribute mutex. - # - # source://rack//lib/rack/session/pool.rb#30 - def mutex; end - - # Returns the value of attribute pool. - # - # source://rack//lib/rack/session/pool.rb#30 - def pool; end - - # source://rack//lib/rack/session/pool.rb#71 - def with_lock(req); end - - # source://rack//lib/rack/session/pool.rb#56 - def write_session(req, session_id, new_session, options); end - - private - - # source://rack//lib/rack/session/pool.rb#80 - def get_session_with_fallback(sid); end -end - -# source://rack//lib/rack/session/pool.rb#31 -Rack::Session::Pool::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://rack//lib/rack/session/abstract/id.rb#15 -class Rack::Session::SessionId - # @return [SessionId] a new instance of SessionId - # - # source://rack//lib/rack/session/abstract/id.rb#20 - def initialize(public_id); end - - # Returns the value of attribute public_id. - # - # source://rack//lib/rack/session/abstract/id.rb#18 - def cookie_value; end - - # @return [Boolean] - # - # source://rack//lib/rack/session/abstract/id.rb#31 - def empty?; end - - # source://rack//lib/rack/session/abstract/id.rb#32 - def inspect; end - - # source://rack//lib/rack/session/abstract/id.rb#24 - def private_id; end - - # Returns the value of attribute public_id. - # - # source://rack//lib/rack/session/abstract/id.rb#18 - def public_id; end - - # Returns the value of attribute public_id. - # - # source://rack//lib/rack/session/abstract/id.rb#18 - def to_s; end - - private - - # source://rack//lib/rack/session/abstract/id.rb#36 - def hash_sid(sid); end -end - -# source://rack//lib/rack/session/abstract/id.rb#16 -Rack::Session::SessionId::ID_VERSION = T.let(T.unsafe(nil), Integer) - -# Rack::ShowExceptions catches all exceptions raised from the app it -# wraps. It shows a useful backtrace with the sourcefile and -# clickable context, the whole Rack environment and the request -# data. -# -# Be careful when you use this on public-facing sites as it could -# reveal information helpful to attackers. -# -# source://rack//lib/rack/show_exceptions.rb#15 -class Rack::ShowExceptions - # @return [ShowExceptions] a new instance of ShowExceptions - # - # source://rack//lib/rack/show_exceptions.rb#18 - def initialize(app); end - - # source://rack//lib/rack/show_exceptions.rb#22 - def call(env); end - - # source://rack//lib/rack/show_exceptions.rb#57 - def dump_exception(exception); end - - # source://rack//lib/rack/show_exceptions.rb#103 - def h(obj); end - - # @return [Boolean] - # - # source://rack//lib/rack/show_exceptions.rb#48 - def prefers_plaintext?(env); end - - # source://rack//lib/rack/show_exceptions.rb#63 - def pretty(env, exception); end - - # source://rack//lib/rack/show_exceptions.rb#99 - def template; end - - private - - # @return [Boolean] - # - # source://rack//lib/rack/show_exceptions.rb#52 - def accepts_html?(env); end -end - -# source://rack//lib/rack/show_exceptions.rb#16 -Rack::ShowExceptions::CONTEXT = T.let(T.unsafe(nil), Integer) - -# source://rack//lib/rack/show_exceptions.rb#118 -Rack::ShowExceptions::TEMPLATE = T.let(T.unsafe(nil), ERB) - -# Rack::ShowStatus catches all empty responses and replaces them -# with a site explaining the error. -# -# Additional details can be put into rack.showstatus.detail -# and will be shown as HTML. If such details exist, the error page -# is always rendered, even if the reply was not empty. -# -# source://rack//lib/rack/show_status.rb#13 -class Rack::ShowStatus - # @return [ShowStatus] a new instance of ShowStatus - # - # source://rack//lib/rack/show_status.rb#14 - def initialize(app); end - - # source://rack//lib/rack/show_status.rb#19 - def call(env); end - - # source://rack//lib/rack/show_status.rb#44 - def h(obj); end -end - -# source://rack//lib/rack/show_status.rb#59 -Rack::ShowStatus::TEMPLATE = T.let(T.unsafe(nil), String) - -# The Rack::Static middleware intercepts requests for static files -# (javascript files, images, stylesheets, etc) based on the url prefixes or -# route mappings passed in the options, and serves them using a Rack::Files -# object. This allows a Rack stack to serve both static and dynamic content. -# -# Examples: -# -# Serve all requests beginning with /media from the "media" folder located -# in the current directory (ie media/*): -# -# use Rack::Static, :urls => ["/media"] -# -# Same as previous, but instead of returning 404 for missing files under -# /media, call the next middleware: -# -# use Rack::Static, :urls => ["/media"], :cascade => true -# -# Serve all requests beginning with /css or /images from the folder "public" -# in the current directory (ie public/css/* and public/images/*): -# -# use Rack::Static, :urls => ["/css", "/images"], :root => "public" -# -# Serve all requests to / with "index.html" from the folder "public" in the -# current directory (ie public/index.html): -# -# use Rack::Static, :urls => {"/" => 'index.html'}, :root => 'public' -# -# Serve all requests normally from the folder "public" in the current -# directory but uses index.html as default route for "/" -# -# use Rack::Static, :urls => [""], :root => 'public', :index => -# 'index.html' -# -# Set custom HTTP Headers for based on rules: -# -# use Rack::Static, :root => 'public', -# :header_rules => [ -# [rule, {header_field => content, header_field => content}], -# [rule, {header_field => content}] -# ] -# -# Rules for selecting files: -# -# 1) All files -# Provide the :all symbol -# :all => Matches every file -# -# 2) Folders -# Provide the folder path as a string -# '/folder' or '/folder/subfolder' => Matches files in a certain folder -# -# 3) File Extensions -# Provide the file extensions as an array -# ['css', 'js'] or %w(css js) => Matches files ending in .css or .js -# -# 4) Regular Expressions / Regexp -# Provide a regular expression -# %r{\.(?:css|js)\z} => Matches files ending in .css or .js -# /\.(?:eot|ttf|otf|woff2|woff|svg)\z/ => Matches files ending in -# the most common web font formats (.eot, .ttf, .otf, .woff2, .woff, .svg) -# Note: This Regexp is available as a shortcut, using the :fonts rule -# -# 5) Font Shortcut -# Provide the :fonts symbol -# :fonts => Uses the Regexp rule stated right above to match all common web font endings -# -# Rule Ordering: -# Rules are applied in the order that they are provided. -# List rather general rules above special ones. -# -# Complete example use case including HTTP header rules: -# -# use Rack::Static, :root => 'public', -# :header_rules => [ -# # Cache all static files in public caches (e.g. Rack::Cache) -# # as well as in the browser -# [:all, {'Cache-Control' => 'public, max-age=31536000'}], -# -# # Provide web fonts with cross-origin access-control-headers -# # Firefox requires this when serving assets using a Content Delivery Network -# [:fonts, {'Access-Control-Allow-Origin' => '*'}] -# ] -# -# source://rack//lib/rack/static.rb#88 -class Rack::Static - # @return [Static] a new instance of Static - # - # source://rack//lib/rack/static.rb#91 - def initialize(app, options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rack//lib/rack/static.rb#107 - def add_index_root?(path); end - - # Convert HTTP header rules to HTTP headers - # - # source://rack//lib/rack/static.rb#167 - def applicable_rules(path); end - - # source://rack//lib/rack/static.rb#123 - def call(env); end - - # source://rack//lib/rack/static.rb#119 - def can_serve(path); end - - # source://rack//lib/rack/static.rb#111 - def overwrite_file_path(path); end - - # source://rack//lib/rack/static.rb#115 - def route_file(path); end -end - -# source://rack//lib/rack.rb#48 -Rack::TRACE = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack.rb#34 -Rack::TRANSFER_ENCODING = T.let(T.unsafe(nil), String) - -# Middleware tracks and cleans Tempfiles created throughout a request (i.e. Rack::Multipart) -# Ideas/strategy based on posts by Eric Wong and Charles Oliver Nutter -# https://groups.google.com/forum/#!searchin/rack-devel/temp/rack-devel/brK8eh-MByw/sw61oJJCGRMJ -# -# source://rack//lib/rack/tempfile_reaper.rb#8 -class Rack::TempfileReaper - # @return [TempfileReaper] a new instance of TempfileReaper - # - # source://rack//lib/rack/tempfile_reaper.rb#9 - def initialize(app); end - - # source://rack//lib/rack/tempfile_reaper.rb#13 - def call(env); end -end - -# source://rack//lib/rack.rb#47 -Rack::UNLINK = T.let(T.unsafe(nil), String) - -# Rack::URLMap takes a hash mapping urls or paths to apps, and -# dispatches accordingly. Support for HTTP/1.1 host names exists if -# the URLs start with http:// or https://. -# -# URLMap modifies the SCRIPT_NAME and PATH_INFO such that the part -# relevant for dispatch is in the SCRIPT_NAME, and the rest in the -# PATH_INFO. This should be taken care of when you need to -# reconstruct the URL in order to create links. -# -# URLMap dispatches in such a way that the longest paths are tried -# first, since they are most specific. -# -# source://rack//lib/rack/urlmap.rb#18 -class Rack::URLMap - # @return [URLMap] a new instance of URLMap - # - # source://rack//lib/rack/urlmap.rb#19 - def initialize(map = T.unsafe(nil)); end - - # source://rack//lib/rack/urlmap.rb#46 - def call(env); end - - # source://rack//lib/rack/urlmap.rb#23 - def remap(map); end - - private - - # @return [Boolean] - # - # source://rack//lib/rack/urlmap.rb#85 - def casecmp?(v1, v2); end -end - -# Rack::Utils contains a grab-bag of useful methods for writing web -# applications adopted from all kinds of Ruby libraries. -# -# source://rack//lib/rack/utils.rb#16 -module Rack::Utils - private - - # source://rack//lib/rack/utils.rb#238 - def add_cookie_to_header(header, key, value); end - - # Adds a cookie that will *remove* a cookie from the client. Hence the - # strange method name. - # - # source://rack//lib/rack/utils.rb#321 - def add_remove_cookie_to_header(header, key, value = T.unsafe(nil)); end - - # Return best accept value to use, based on the algorithm - # in RFC 2616 Section 14. If there are multiple best - # matches (same specificity and quality), the value returned - # is arbitrary. - # - # source://rack//lib/rack/utils.rb#160 - def best_q_match(q_value_header, available_mimes); end - - # source://rack//lib/rack/utils.rb#127 - def build_nested_query(value, prefix = T.unsafe(nil)); end - - # source://rack//lib/rack/utils.rb#117 - def build_query(params); end - - # Parses the "Range:" header, if present, into an array of Range objects. - # Returns nil if the header is missing or syntactically invalid. - # Returns an empty array if none of the ranges are satisfiable. - # - # source://rack//lib/rack/utils.rb#353 - def byte_ranges(env, size); end - - # source://rack//lib/rack/utils.rb#610 - def clean_path_info(path_info); end - - # :nocov: - # - # source://rack//lib/rack/utils.rb#98 - def clock_time; end - - # source://rack//lib/rack/utils.rb#314 - def delete_cookie_header!(header, key, value = T.unsafe(nil)); end - - # URI escapes. (CGI style space to +) - # - # source://rack//lib/rack/utils.rb#39 - def escape(s); end - - # Escape ampersands, brackets and quotes to their HTML/XML entities. - # - # source://rack//lib/rack/utils.rb#185 - def escape_html(string); end - - # Like URI escaping, but with %20 instead of +. Strictly speaking this is - # true URI escaping. - # - # source://rack//lib/rack/utils.rb#45 - def escape_path(s); end - - # source://rack//lib/rack/utils.rb#358 - def get_byte_ranges(http_range, size); end - - # source://rack//lib/rack/utils.rb#284 - def make_delete_cookie_header(header, key, value); end - - # source://rack//lib/rack/utils.rb#221 - def parse_cookies(env); end - - # source://rack//lib/rack/utils.rb#225 - def parse_cookies_header(header); end - - # source://rack//lib/rack/utils.rb#113 - def parse_nested_query(qs, d = T.unsafe(nil)); end - - # source://rack//lib/rack/utils.rb#109 - def parse_query(qs, d = T.unsafe(nil), &unescaper); end - - # source://rack//lib/rack/utils.rb#145 - def q_values(q_value_header); end - - # Modified version of stdlib time.rb Time#rfc2822 to use '%d-%b-%Y' instead - # of '% %b %Y'. - # It assumes that the time is in GMT to comply to the RFC 2109. - # - # NOTE: I'm not sure the RFC says it requires GMT, but is ambiguous enough - # that I'm certain someone implemented only that option. - # Do not use %a and %b from Time.strptime, it would use localized names for - # weekday and month. - # - # source://rack//lib/rack/utils.rb#344 - def rfc2109(time); end - - # source://rack//lib/rack/utils.rb#331 - def rfc2822(time); end - - # Constant time string comparison. - # - # NOTE: the values compared should be of fixed length, such as strings - # that have already been processed by HMAC. This should not be used - # on variable length plaintext strings because it could leak length info - # via timing attacks. - # - # source://rack//lib/rack/utils.rb#396 - def secure_compare(a, b); end - - # source://rack//lib/rack/utils.rb#189 - def select_best_encoding(available_encodings, accept_encoding); end - - # source://rack//lib/rack/utils.rb#279 - def set_cookie_header!(header, key, value); end - - # source://rack//lib/rack/utils.rb#600 - def status_code(status); end - - # Unescapes a URI escaped string with +encoding+. +encoding+ will be the - # target encoding of the string returned, and it defaults to UTF-8 - # - # source://rack//lib/rack/utils.rb#57 - def unescape(s, encoding = T.unsafe(nil)); end - - # Unescapes the **path** component of a URI. See Rack::Utils.unescape for - # unescaping query parameters or form components. - # - # source://rack//lib/rack/utils.rb#51 - def unescape_path(s); end - - # source://rack//lib/rack/utils.rb#627 - def valid_path?(path); end - - class << self - # source://rack//lib/rack/utils.rb#238 - def add_cookie_to_header(header, key, value); end - - # Adds a cookie that will *remove* a cookie from the client. Hence the - # strange method name. - # - # source://rack//lib/rack/utils.rb#321 - def add_remove_cookie_to_header(header, key, value = T.unsafe(nil)); end - - # Return best accept value to use, based on the algorithm - # in RFC 2616 Section 14. If there are multiple best - # matches (same specificity and quality), the value returned - # is arbitrary. - # - # source://rack//lib/rack/utils.rb#160 - def best_q_match(q_value_header, available_mimes); end - - # source://rack//lib/rack/utils.rb#127 - def build_nested_query(value, prefix = T.unsafe(nil)); end - - # source://rack//lib/rack/utils.rb#117 - def build_query(params); end - - # Parses the "Range:" header, if present, into an array of Range objects. - # Returns nil if the header is missing or syntactically invalid. - # Returns an empty array if none of the ranges are satisfiable. - # - # source://rack//lib/rack/utils.rb#353 - def byte_ranges(env, size); end - - # source://rack//lib/rack/utils.rb#610 - def clean_path_info(path_info); end - - # source://rack//lib/rack/utils.rb#98 - def clock_time; end - - # Returns the value of attribute default_query_parser. - # - # source://rack//lib/rack/utils.rb#30 - def default_query_parser; end - - # Sets the attribute default_query_parser - # - # @param value the value to set the attribute default_query_parser to. - # - # source://rack//lib/rack/utils.rb#30 - def default_query_parser=(_arg0); end - - # source://rack//lib/rack/utils.rb#314 - def delete_cookie_header!(header, key, value = T.unsafe(nil)); end - - # URI escapes. (CGI style space to +) - # - # source://rack//lib/rack/utils.rb#39 - def escape(s); end - - # Escape ampersands, brackets and quotes to their HTML/XML entities. - # - # source://rack//lib/rack/utils.rb#185 - def escape_html(string); end - - # Like URI escaping, but with %20 instead of +. Strictly speaking this is - # true URI escaping. - # - # source://rack//lib/rack/utils.rb#45 - def escape_path(s); end - - # source://rack//lib/rack/utils.rb#358 - def get_byte_ranges(http_range, size); end - - # source://rack//lib/rack/utils.rb#89 - def key_space_limit; end - - # source://rack//lib/rack/utils.rb#93 - def key_space_limit=(v); end - - # source://rack//lib/rack/utils.rb#284 - def make_delete_cookie_header(header, key, value); end - - # Returns the value of attribute multipart_file_limit. - # - # source://rack//lib/rack/utils.rb#64 - def multipart_file_limit; end - - # Sets the attribute multipart_file_limit - # - # @param value the value to set the attribute multipart_file_limit to. - # - # source://rack//lib/rack/utils.rb#64 - def multipart_file_limit=(_arg0); end - - # Returns the value of attribute multipart_file_limit. - # multipart_part_limit is the original name of multipart_file_limit, but - # the limit only counts parts with filenames. - # - # source://rack//lib/rack/utils.rb#64 - def multipart_part_limit; end - - # Sets the attribute multipart_file_limit - # - # @param value the value to set the attribute multipart_file_limit to. - # - # source://rack//lib/rack/utils.rb#64 - def multipart_part_limit=(_arg0); end - - # Returns the value of attribute multipart_total_part_limit. - # - # source://rack//lib/rack/utils.rb#62 - def multipart_total_part_limit; end - - # Sets the attribute multipart_total_part_limit - # - # @param value the value to set the attribute multipart_total_part_limit to. - # - # source://rack//lib/rack/utils.rb#62 - def multipart_total_part_limit=(_arg0); end - - # source://rack//lib/rack/utils.rb#81 - def param_depth_limit; end - - # source://rack//lib/rack/utils.rb#85 - def param_depth_limit=(v); end - - # source://rack//lib/rack/utils.rb#221 - def parse_cookies(env); end - - # source://rack//lib/rack/utils.rb#225 - def parse_cookies_header(header); end - - # source://rack//lib/rack/utils.rb#113 - def parse_nested_query(qs, d = T.unsafe(nil)); end - - # source://rack//lib/rack/utils.rb#109 - def parse_query(qs, d = T.unsafe(nil), &unescaper); end - - # source://rack//lib/rack/utils.rb#145 - def q_values(q_value_header); end - - # Modified version of stdlib time.rb Time#rfc2822 to use '%d-%b-%Y' instead - # of '% %b %Y'. - # It assumes that the time is in GMT to comply to the RFC 2109. - # - # NOTE: I'm not sure the RFC says it requires GMT, but is ambiguous enough - # that I'm certain someone implemented only that option. - # Do not use %a and %b from Time.strptime, it would use localized names for - # weekday and month. - # - # source://rack//lib/rack/utils.rb#344 - def rfc2109(time); end - - # source://rack//lib/rack/utils.rb#331 - def rfc2822(time); end - - # Constant time string comparison. - # - # NOTE: the values compared should be of fixed length, such as strings - # that have already been processed by HMAC. This should not be used - # on variable length plaintext strings because it could leak length info - # via timing attacks. - # - # source://rack//lib/rack/utils.rb#396 - def secure_compare(a, b); end - - # source://rack//lib/rack/utils.rb#189 - def select_best_encoding(available_encodings, accept_encoding); end - - # source://rack//lib/rack/utils.rb#279 - def set_cookie_header!(header, key, value); end - - # source://rack//lib/rack/utils.rb#600 - def status_code(status); end - - # Unescapes a URI escaped string with +encoding+. +encoding+ will be the - # target encoding of the string returned, and it defaults to UTF-8 - # - # source://rack//lib/rack/utils.rb#57 - def unescape(s, encoding = T.unsafe(nil)); end - - # Unescapes the **path** component of a URI. See Rack::Utils.unescape for - # unescaping query parameters or form components. - # - # source://rack//lib/rack/utils.rb#51 - def unescape_path(s); end - - # @return [Boolean] - # - # source://rack//lib/rack/utils.rb#627 - def valid_path?(path); end - end -end - -# source://rack//lib/rack/utils.rb#22 -Rack::Utils::COMMON_SEP = T.let(T.unsafe(nil), Hash) - -# Context allows the use of a compatible middleware at different points -# in a request handling stack. A compatible middleware must define -# #context which should take the arguments env and app. The first of which -# would be the request environment. The second of which would be the rack -# application that the request would be forwarded to. -# -# source://rack//lib/rack/utils.rb#411 -class Rack::Utils::Context - # @return [Context] a new instance of Context - # - # source://rack//lib/rack/utils.rb#414 - def initialize(app_f, app_r); end - - # Returns the value of attribute app. - # - # source://rack//lib/rack/utils.rb#412 - def app; end - - # source://rack//lib/rack/utils.rb#419 - def call(env); end - - # source://rack//lib/rack/utils.rb#427 - def context(env, app = T.unsafe(nil)); end - - # Returns the value of attribute for. - # - # source://rack//lib/rack/utils.rb#412 - def for; end - - # source://rack//lib/rack/utils.rb#423 - def recontext(app); end -end - -# source://rack//lib/rack/utils.rb#21 -Rack::Utils::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/utils.rb#173 -Rack::Utils::ESCAPE_HTML = T.let(T.unsafe(nil), Hash) - -# source://rack//lib/rack/utils.rb#182 -Rack::Utils::ESCAPE_HTML_PATTERN = T.let(T.unsafe(nil), Regexp) - -# Every standard HTTP code mapped to the appropriate message. -# Generated with: -# curl -s https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv | \ -# ruby -ne 'm = /^(\d{3}),(?!Unassigned|\(Unused\))([^,]+)/.match($_) and \ -# puts "#{m[1]} => \x27#{m[2].strip}\x27,"' -# -# source://rack//lib/rack/utils.rb#527 -Rack::Utils::HTTP_STATUS_CODES = T.let(T.unsafe(nil), Hash) - -# A case-insensitive Hash that preserves the original case of a -# header when set. -# -# @api private -# -# source://rack//lib/rack/utils.rb#436 -class Rack::Utils::HeaderHash < ::Hash - # @api private - # @return [HeaderHash] a new instance of HeaderHash - # - # source://rack//lib/rack/utils.rb#445 - def initialize(hash = T.unsafe(nil)); end - - # @api private - # - # source://rack//lib/rack/utils.rb#475 - def [](k); end - - # @api private - # - # source://rack//lib/rack/utils.rb#479 - def []=(k, v); end - - # on clear, we need to clear @names hash - # - # @api private - # - # source://rack//lib/rack/utils.rb#458 - def clear; end - - # @api private - # - # source://rack//lib/rack/utils.rb#486 - def delete(k); end - - # @api private - # - # source://rack//lib/rack/utils.rb#463 - def each; end - - # @api private - # @return [Boolean] - # - # source://rack//lib/rack/utils.rb#492 - def has_key?(k); end - - # @api private - # @return [Boolean] - # - # source://rack//lib/rack/utils.rb#492 - def include?(k); end - - # @api private - # @return [Boolean] - # - # source://rack//lib/rack/utils.rb#492 - def key?(k); end - - # @api private - # @return [Boolean] - # - # source://rack//lib/rack/utils.rb#492 - def member?(k); end - - # @api private - # - # source://rack//lib/rack/utils.rb#505 - def merge(other); end - - # @api private - # - # source://rack//lib/rack/utils.rb#500 - def merge!(other); end - - # @api private - # - # source://rack//lib/rack/utils.rb#510 - def replace(other); end - - # @api private - # - # source://rack//lib/rack/utils.rb#469 - def to_hash; end - - protected - - # @api private - # - # source://rack//lib/rack/utils.rb#517 - def names; end - - private - - # on dup/clone, we need to duplicate @names hash - # - # @api private - # - # source://rack//lib/rack/utils.rb#452 - def initialize_copy(other); end - - class << self - # @api private - # - # source://rack//lib/rack/utils.rb#437 - def [](headers); end - end -end - -# source://rack//lib/rack/utils.rb#20 -Rack::Utils::InvalidParameterError = Rack::QueryParser::InvalidParameterError - -# source://rack//lib/rack/utils.rb#23 -Rack::Utils::KeySpaceConstrainedParams = Rack::QueryParser::Params - -# source://rack//lib/rack/utils.rb#625 -Rack::Utils::NULL_BYTE = T.let(T.unsafe(nil), String) - -# source://rack//lib/rack/utils.rb#608 -Rack::Utils::PATH_SEPS = T.let(T.unsafe(nil), Regexp) - -# source://rack//lib/rack/utils.rb#19 -Rack::Utils::ParameterTypeError = Rack::QueryParser::ParameterTypeError - -# source://rack//lib/rack/utils.rb#27 -Rack::Utils::RFC2396_PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) - -# source://rack//lib/rack/utils.rb#25 -Rack::Utils::RFC2822_DAY_NAME = T.let(T.unsafe(nil), Array) - -# source://rack//lib/rack/utils.rb#26 -Rack::Utils::RFC2822_MONTH_NAME = T.let(T.unsafe(nil), Array) - -# Responses with HTTP status codes that should not have an entity body -# -# source://rack//lib/rack/utils.rb#594 -Rack::Utils::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) - -# source://rack//lib/rack/utils.rb#596 -Rack::Utils::SYMBOL_TO_STATUS_CODE = T.let(T.unsafe(nil), Hash) - -# The Rack protocol version number implemented. -# -# source://rack//lib/rack/version.rb#16 -Rack::VERSION = T.let(T.unsafe(nil), Array) diff --git a/sorbet/rbi/gems/rack@3.2.6.rbi b/sorbet/rbi/gems/rack@3.2.6.rbi new file mode 100644 index 000000000..4b16cb631 --- /dev/null +++ b/sorbet/rbi/gems/rack@3.2.6.rbi @@ -0,0 +1,4653 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rack` gem. +# Please instead update this file by running `bin/tapioca gem rack`. + + +# Copyright (C) 2007-2019 Leah Neukirchen +# +# Rack is freely distributable under the terms of an MIT-style license. +# See MIT-LICENSE or https://opensource.org/licenses/MIT. +# +# pkg:gem/rack#lib/rack/version.rb:8 +module Rack + class << self + # Return the Rack release as a dotted string. + # + # pkg:gem/rack#lib/rack/version.rb:14 + def release; end + end +end + +# pkg:gem/rack#lib/rack.rb:59 +module Rack::Auth; end + +# Rack::Auth::AbstractHandler implements common authentication functionality. +# +# +realm+ should be set for all handlers. +# +# pkg:gem/rack#lib/rack/auth/abstract/handler.rb:11 +class Rack::Auth::AbstractHandler + # pkg:gem/rack#lib/rack/auth/abstract/handler.rb:15 + def initialize(app, realm = T.unsafe(nil), &authenticator); end + + # pkg:gem/rack#lib/rack/auth/abstract/handler.rb:13 + def realm; end + + # pkg:gem/rack#lib/rack/auth/abstract/handler.rb:13 + def realm=(_arg0); end + + private + + # pkg:gem/rack#lib/rack/auth/abstract/handler.rb:31 + def bad_request; end + + # pkg:gem/rack#lib/rack/auth/abstract/handler.rb:22 + def unauthorized(www_authenticate = T.unsafe(nil)); end +end + +# pkg:gem/rack#lib/rack/auth/abstract/request.rb:8 +class Rack::Auth::AbstractRequest + # pkg:gem/rack#lib/rack/auth/abstract/request.rb:10 + def initialize(env); end + + # pkg:gem/rack#lib/rack/auth/abstract/request.rb:35 + def params; end + + # pkg:gem/rack#lib/rack/auth/abstract/request.rb:27 + def parts; end + + # pkg:gem/rack#lib/rack/auth/abstract/request.rb:19 + def provided?; end + + # pkg:gem/rack#lib/rack/auth/abstract/request.rb:14 + def request; end + + # pkg:gem/rack#lib/rack/auth/abstract/request.rb:31 + def scheme; end + + # pkg:gem/rack#lib/rack/auth/abstract/request.rb:23 + def valid?; end + + private + + # pkg:gem/rack#lib/rack/auth/abstract/request.rb:44 + def authorization_key; end +end + +# pkg:gem/rack#lib/rack/auth/abstract/request.rb:42 +Rack::Auth::AbstractRequest::AUTHORIZATION_KEYS = T.let(T.unsafe(nil), Array) + +# Rack::Auth::Basic implements HTTP Basic Authentication, as per RFC 2617. +# +# Initialize with the Rack application that you want protecting, +# and a block that checks if a username and password pair are valid. +# +# pkg:gem/rack#lib/rack/auth/basic.rb:13 +class Rack::Auth::Basic < ::Rack::Auth::AbstractHandler + # pkg:gem/rack#lib/rack/auth/basic.rb:15 + def call(env); end + + private + + # pkg:gem/rack#lib/rack/auth/basic.rb:34 + def challenge; end + + # pkg:gem/rack#lib/rack/auth/basic.rb:38 + def valid?(auth); end +end + +# pkg:gem/rack#lib/rack/auth/basic.rb:42 +class Rack::Auth::Basic::Request < ::Rack::Auth::AbstractRequest + # pkg:gem/rack#lib/rack/auth/basic.rb:43 + def basic?; end + + # pkg:gem/rack#lib/rack/auth/basic.rb:47 + def credentials; end + + # pkg:gem/rack#lib/rack/auth/basic.rb:51 + def username; end +end + +# pkg:gem/rack#lib/rack/builder.rb:6 +Rack::BUILDER_TOPLEVEL_BINDING = T.let(T.unsafe(nil), Proc) + +# Represents a 400 Bad Request error when input data fails to meet the +# requirements. +# +# pkg:gem/rack#lib/rack/bad_request.rb:6 +module Rack::BadRequest; end + +# Proxy for response bodies allowing calling a block when +# the response body is closed (after the response has been fully +# sent to the client). +# +# pkg:gem/rack#lib/rack/body_proxy.rb:7 +class Rack::BodyProxy + # Set the response body to wrap, and the block to call when the + # response has been fully sent. + # + # pkg:gem/rack#lib/rack/body_proxy.rb:10 + def initialize(body, &block); end + + # If not already closed, close the wrapped body and + # then call the block the proxy was initialized with. + # + # pkg:gem/rack#lib/rack/body_proxy.rb:28 + def close; end + + # Whether the proxy is closed. The proxy starts as not closed, + # and becomes closed on the first call to close. + # + # pkg:gem/rack#lib/rack/body_proxy.rb:40 + def closed?; end + + # Delegate missing methods to the wrapped body. + # + # pkg:gem/rack#lib/rack/body_proxy.rb:45 + def method_missing(method_name, *args, **_arg2, &block); end + + private + + # Return whether the wrapped body responds to the method. + # + # pkg:gem/rack#lib/rack/body_proxy.rb:17 + def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end +end + +# Rack::Builder provides a domain-specific language (DSL) to construct Rack +# applications. It is primarily used to parse +config.ru+ files which +# instantiate several middleware and a final application which are hosted +# by a Rack-compatible web server. +# +# Example: +# +# app = Rack::Builder.new do +# use Rack::CommonLogger +# map "/ok" do +# run lambda { |env| [200, {'content-type' => 'text/plain'}, ['OK']] } +# end +# end +# +# run app +# +# Or +# +# app = Rack::Builder.app do +# use Rack::CommonLogger +# run lambda { |env| [200, {'content-type' => 'text/plain'}, ['OK']] } +# end +# +# run app +# +# +use+ adds middleware to the stack, +run+ dispatches to an application. +# You can use +map+ to construct a Rack::URLMap in a convenient way. +# +# pkg:gem/rack#lib/rack/builder.rb:36 +class Rack::Builder + # Initialize a new Rack::Builder instance. +default_app+ specifies the + # default application if +run+ is not called later. If a block + # is given, it is evaluated in the context of the instance. + # + # pkg:gem/rack#lib/rack/builder.rb:116 + def initialize(default_app = T.unsafe(nil), **options, &block); end + + # Call the Rack application generated by this builder instance. Note that + # this rebuilds the Rack application and runs the warmup code (if any) + # every time it is called, so it should not be used if performance is important. + # + # pkg:gem/rack#lib/rack/builder.rb:282 + def call(env); end + + # Freeze the app (set using run) and all middleware instances when building the application + # in to_app. + # + # pkg:gem/rack#lib/rack/builder.rb:265 + def freeze_app; end + + # Creates a route within the application. Routes under the mapped path will be sent to + # the Rack application specified by run inside the block. Other requests will be sent to the + # default application specified by run outside the block. + # + # class App + # def call(env) + # [200, {'content-type' => 'text/plain'}, ["Hello World"]] + # end + # end + # + # class Heartbeat + # def call(env) + # [200, { "content-type" => "text/plain" }, ["OK"]] + # end + # end + # + # app = Rack::Builder.app do + # map '/heartbeat' do + # run Heartbeat.new + # end + # run App.new + # end + # + # run app + # + # The +use+ method can also be used inside the block to specify middleware to run under a specific path: + # + # app = Rack::Builder.app do + # map '/heartbeat' do + # use Middleware + # run Heartbeat.new + # end + # run App.new + # end + # + # This example includes a piece of middleware which will run before +/heartbeat+ requests hit +Heartbeat+. + # + # Note that providing a +path+ of +/+ will ignore any default application given in a +run+ statement + # outside the block. + # + # pkg:gem/rack#lib/rack/builder.rb:256 + def map(path, &block); end + + # Any options provided to the Rack::Builder instance at initialization. + # These options can be server-specific. Some general options are: + # + # * +:isolation+: One of +process+, +thread+ or +fiber+. The execution + # isolation model to use. + # + # pkg:gem/rack#lib/rack/builder.rb:132 + def options; end + + # Takes a block or argument that is an object that responds to #call and + # returns a Rack response. + # + # You can use a block: + # + # run do |env| + # [200, { "content-type" => "text/plain" }, ["Hello World!"]] + # end + # + # You can also provide a lambda: + # + # run lambda { |env| [200, { "content-type" => "text/plain" }, ["OK"]] } + # + # You can also provide a class instance: + # + # class Heartbeat + # def call(env) + # [200, { "content-type" => "text/plain" }, ["OK"]] + # end + # end + # + # run Heartbeat.new + # + # pkg:gem/rack#lib/rack/builder.rb:195 + def run(app = T.unsafe(nil), &block); end + + # Return the Rack application generated by this instance. + # + # pkg:gem/rack#lib/rack/builder.rb:270 + def to_app; end + + # Specifies middleware to use in a stack. + # + # class Middleware + # def initialize(app) + # @app = app + # end + # + # def call(env) + # env["rack.some_header"] = "setting an example" + # @app.call(env) + # end + # end + # + # use Middleware + # run lambda { |env| [200, { "content-type" => "text/plain" }, ["OK"]] } + # + # All requests through to this application will first be processed by the middleware class. + # The +call+ method in this example sets an additional environment key which then can be + # referenced in the application if required. + # + # pkg:gem/rack#lib/rack/builder.rb:159 + def use(middleware, *args, **_arg2, &block); end + + # Takes a lambda or block that is used to warm-up the application. This block is called + # before the Rack application is returned by to_app. + # + # warmup do |app| + # client = Rack::MockRequest.new(app) + # client.get('/') + # end + # + # use SomeMiddleware + # run MyApp + # + # pkg:gem/rack#lib/rack/builder.rb:213 + def warmup(prc = T.unsafe(nil), &block); end + + private + + # Generate a URLMap instance by generating new Rack applications for each + # map block in this instance. + # + # pkg:gem/rack#lib/rack/builder.rb:290 + def generate_map(default_app, mapping); end + + class << self + # Create a new Rack::Builder instance and return the Rack application + # generated from it. + # + # pkg:gem/rack#lib/rack/builder.rb:136 + def app(default_app = T.unsafe(nil), &block); end + + # Load the given file as a rackup file, treating the + # contents as if specified inside a Rack::Builder block. + # + # Ignores content in the file after +__END__+, so that + # use of +__END__+ will not result in a syntax error. + # + # Example config.ru file: + # + # $ cat config.ru + # + # use Rack::ContentLength + # require './app.rb' + # run App + # + # pkg:gem/rack#lib/rack/builder.rb:87 + def load_file(path, **options); end + + # Evaluate the given +builder_script+ string in the context of + # a Rack::Builder block, returning a Rack application. + # + # pkg:gem/rack#lib/rack/builder.rb:102 + def new_from_string(builder_script, path = T.unsafe(nil), **options); end + + # Parse the given config file to get a Rack application. + # + # If the config file ends in +.ru+, it is treated as a + # rackup file and the contents will be treated as if + # specified inside a Rack::Builder block. + # + # If the config file does not end in +.ru+, it is + # required and Rack will use the basename of the file + # to guess which constant will be the Rack application to run. + # + # Examples: + # + # Rack::Builder.parse_file('config.ru') + # # Rack application built using Rack::Builder.new + # + # Rack::Builder.parse_file('app.rb') + # # requires app.rb, which can be anywhere in Ruby's + # # load path. After requiring, assumes App constant + # # is a Rack application + # + # Rack::Builder.parse_file('./my_app.rb') + # # requires ./my_app.rb, which should be in the + # # process's current directory. After requiring, + # # assumes MyApp constant is a Rack application + # + # pkg:gem/rack#lib/rack/builder.rb:65 + def parse_file(path, **options); end + end +end + +# https://stackoverflow.com/questions/2223882/whats-the-difference-between-utf-8-and-utf-8-without-bom +# +# pkg:gem/rack#lib/rack/builder.rb:39 +Rack::Builder::UTF_8_BOM = T.let(T.unsafe(nil), String) + +# Response Header Keys +# +# pkg:gem/rack#lib/rack/constants.rb:19 +Rack::CACHE_CONTROL = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:35 +Rack::CONNECT = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:20 +Rack::CONTENT_LENGTH = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:21 +Rack::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# Rack::Cascade tries a request on several apps, and returns the +# first response that is not 404 or 405 (or in a list of configured +# status codes). If all applications tried return one of the configured +# status codes, return the last response. +# +# pkg:gem/rack#lib/rack/cascade.rb:11 +class Rack::Cascade + # Set the apps to send requests to, and what statuses result in + # cascading. Arguments: + # + # apps: An enumerable of rack applications. + # cascade_for: The statuses to use cascading for. If a response is received + # from an app, the next app is tried. + # + # pkg:gem/rack#lib/rack/cascade.rb:21 + def initialize(apps, cascade_for = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/cascade.rb:65 + def <<(app); end + + # Append an app to the list of apps to cascade. This app will + # be tried last. + # + # pkg:gem/rack#lib/rack/cascade.rb:56 + def add(app); end + + # An array of applications to try in order. + # + # pkg:gem/rack#lib/rack/cascade.rb:13 + def apps; end + + # Call each app in order. If the responses uses a status that requires + # cascading, try the next app. If all responses require cascading, + # return the response from the last app. + # + # pkg:gem/rack#lib/rack/cascade.rb:32 + def call(env); end + + # Whether the given app is one of the apps to cascade to. + # + # pkg:gem/rack#lib/rack/cascade.rb:61 + def include?(app); end +end + +# Rack::CommonLogger forwards every request to the given +app+, and +# logs a line in the +# {Apache common log format}[http://httpd.apache.org/docs/1.3/logs.html#common] +# to the configured logger. +# +# pkg:gem/rack#lib/rack/common_logger.rb:13 +class Rack::CommonLogger + # +logger+ can be any object that supports the +write+ or +<<+ methods, + # which includes the standard library Logger. These methods are called + # with a single string argument, the log message. + # If +logger+ is nil, CommonLogger will fall back env['rack.errors']. + # + # pkg:gem/rack#lib/rack/common_logger.rb:29 + def initialize(app, logger = T.unsafe(nil)); end + + # Log all requests in common_log format after a response has been + # returned. Note that if the app raises an exception, the request + # will not be logged, so if exception handling middleware are used, + # they should be loaded after this middleware. Additionally, because + # the logging happens after the request body has been fully sent, any + # exceptions raised during the sending of the response body will + # cause the request not to be logged. + # + # pkg:gem/rack#lib/rack/common_logger.rb:41 + def call(env); end + + private + + # Attempt to determine the content length for the response to + # include it in the logged data. + # + # pkg:gem/rack#lib/rack/common_logger.rb:84 + def extract_content_length(headers); end + + # Log the request to the configured logger. + # + # pkg:gem/rack#lib/rack/common_logger.rb:52 + def log(env, status, response_headers, began_at); end +end + +# Common Log Format: http://httpd.apache.org/docs/1.3/logs.html#common +# +# lilith.local - - [07/Aug/2006 23:58:02 -0400] "GET / HTTP/1.1" 500 - +# +# %{%s - %s [%s] "%s %s%s %s" %d %s\n} % +# +# The actual format is slightly different than the above due to the +# separation of SCRIPT_NAME and PATH_INFO, and because the elapsed +# time in seconds is included at the end. +# +# pkg:gem/rack#lib/rack/common_logger.rb:23 +Rack::CommonLogger::FORMAT = T.let(T.unsafe(nil), String) + +# Middleware that enables conditional GET using if-none-match and +# if-modified-since. The application should set either or both of the +# last-modified or etag response headers according to RFC 2616. When +# either of the conditions is met, the response body is set to be zero +# length and the response status is set to 304 Not Modified. +# +# Applications that defer response body generation until the body's each +# message is received will avoid response body generation completely when +# a conditional GET matches. +# +# Adapted from Michael Klishin's Merb implementation: +# https://github.com/wycats/merb/blob/master/merb-core/lib/merb-core/rack/middleware/conditional_get.rb +# +# pkg:gem/rack#lib/rack/conditional_get.rb:21 +class Rack::ConditionalGet + # pkg:gem/rack#lib/rack/conditional_get.rb:22 + def initialize(app); end + + # Return empty 304 response if the response has not been + # modified since the last request. + # + # pkg:gem/rack#lib/rack/conditional_get.rb:28 + def call(env); end + + private + + # Whether the etag response header matches the if-none-match request header. + # If so, the request has not been modified. + # + # pkg:gem/rack#lib/rack/conditional_get.rb:63 + def etag_matches?(none_match, headers); end + + # Return whether the response has not been modified since the + # last request. + # + # pkg:gem/rack#lib/rack/conditional_get.rb:52 + def fresh?(env, headers); end + + # Whether the last-modified response header matches the if-modified-since + # request header. If so, the request has not been modified. + # + # pkg:gem/rack#lib/rack/conditional_get.rb:69 + def modified_since?(modified_since, headers); end + + # Return a Time object for the given string (which should be in RFC2822 + # format), or nil if the string cannot be parsed. + # + # pkg:gem/rack#lib/rack/conditional_get.rb:76 + def to_rfc2822(since); end +end + +# Rack::Config modifies the environment using the block given during +# initialization. +# +# Example: +# use Rack::Config do |env| +# env['my-key'] = 'some-value' +# end +# +# pkg:gem/rack#lib/rack/config.rb:11 +class Rack::Config + # pkg:gem/rack#lib/rack/config.rb:12 + def initialize(app, &block); end + + # pkg:gem/rack#lib/rack/config.rb:17 + def call(env); end +end + +# Sets the content-length header on responses that do not specify +# a content-length or transfer-encoding header. Note that this +# does not fix responses that have an invalid content-length +# header specified. +# +# pkg:gem/rack#lib/rack/content_length.rb:12 +class Rack::ContentLength + include ::Rack::Utils + + # pkg:gem/rack#lib/rack/content_length.rb:15 + def initialize(app); end + + # pkg:gem/rack#lib/rack/content_length.rb:19 + def call(env); end +end + +# Sets the content-type header on responses which don't have one. +# +# Builder Usage: +# use Rack::ContentType, "text/plain" +# +# When no content type argument is provided, "text/html" is the +# default. +# +# pkg:gem/rack#lib/rack/content_type.rb:15 +class Rack::ContentType + include ::Rack::Utils + + # pkg:gem/rack#lib/rack/content_type.rb:18 + def initialize(app, content_type = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/content_type.rb:23 + def call(env); end +end + +# pkg:gem/rack#lib/rack/constants.rb:32 +Rack::DELETE = T.let(T.unsafe(nil), String) + +# This middleware enables content encoding of http responses, +# usually for purposes of compression. +# +# Currently supported encodings: +# +# * gzip +# * identity (no transformation) +# +# This middleware automatically detects when encoding is supported +# and allowed. For example no encoding is made when a cache +# directive of 'no-transform' is present, when the response status +# code is one that doesn't allow an entity body, or when the body +# is empty. +# +# Note that despite the name, Deflater does not support the +deflate+ +# encoding. +# +# pkg:gem/rack#lib/rack/deflater.rb:28 +class Rack::Deflater + # Creates Rack::Deflater middleware. Options: + # + # :if :: a lambda enabling / disabling deflation based on returned boolean value + # (e.g use Rack::Deflater, :if => lambda { |*, body| sum=0; body.each { |i| sum += i.length }; sum > 512 }). + # However, be aware that calling `body.each` inside the block will break cases where `body.each` is not idempotent, + # such as when it is an +IO+ instance. + # :include :: a list of content types that should be compressed. By default, all content types are compressed. + # :sync :: determines if the stream is going to be flushed after every chunk. Flushing after every chunk reduces + # latency for time-sensitive streaming applications, but hurts compression and throughput. + # Defaults to +true+. + # + # pkg:gem/rack#lib/rack/deflater.rb:39 + def initialize(app, options = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/deflater.rb:46 + def call(env); end + + private + + # Whether the body should be compressed. + # + # pkg:gem/rack#lib/rack/deflater.rb:136 + def should_deflate?(env, status, headers, body); end +end + +# Body class used for gzip encoded responses. +# +# pkg:gem/rack#lib/rack/deflater.rb:83 +class Rack::Deflater::GzipStream + # Initialize the gzip stream. Arguments: + # body :: Response body to compress with gzip + # mtime :: The modification time of the body, used to set the + # modification time in the gzip header. + # sync :: Whether to flush each gzip chunk as soon as it is ready. + # + # pkg:gem/rack#lib/rack/deflater.rb:92 + def initialize(body, mtime, sync); end + + # Close the original body if possible. + # + # pkg:gem/rack#lib/rack/deflater.rb:128 + def close; end + + # Yield gzip compressed strings to the given block. + # + # pkg:gem/rack#lib/rack/deflater.rb:99 + def each(&block); end + + # Call the block passed to #each with the gzipped data. + # + # pkg:gem/rack#lib/rack/deflater.rb:123 + def write(data); end +end + +# pkg:gem/rack#lib/rack/deflater.rb:85 +Rack::Deflater::GzipStream::BUFFER_LENGTH = T.let(T.unsafe(nil), Integer) + +# Rack::Directory serves entries below the +root+ given, according to the +# path info of the Rack request. If a directory is found, the file's contents +# will be presented in an html based index. If a file is found, the env will +# be passed to the specified +app+. +# +# If +app+ is not specified, a Rack::Files of the same +root+ will be used. +# +# pkg:gem/rack#lib/rack/directory.rb:19 +class Rack::Directory + # Set the root directory and application for serving files. + # + # pkg:gem/rack#lib/rack/directory.rb:83 + def initialize(root, app = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/directory.rb:90 + def call(env); end + + # Rack response to use for requests with invalid paths, or nil if path is valid. + # + # pkg:gem/rack#lib/rack/directory.rb:110 + def check_bad_request(path_info); end + + # Rack response to use for requests with paths outside the root, or nil if path is inside the root. + # + # pkg:gem/rack#lib/rack/directory.rb:120 + def check_forbidden(path_info); end + + # Rack response to use for unreadable and non-file, non-directory entries. + # + # pkg:gem/rack#lib/rack/directory.rb:184 + def entity_not_found(path_info); end + + # Provide human readable file sizes + # + # pkg:gem/rack#lib/rack/directory.rb:200 + def filesize_format(int); end + + # Internals of request handling. Similar to call but does + # not remove body for HEAD requests. + # + # pkg:gem/rack#lib/rack/directory.rb:97 + def get(env); end + + # Rack response to use for directories under the root. + # + # pkg:gem/rack#lib/rack/directory.rb:133 + def list_directory(path_info, path, script_name); end + + # Rack response to use for files and directories under the root. + # Unreadable and non-file, non-directory entries will get a 404 response. + # + # pkg:gem/rack#lib/rack/directory.rb:174 + def list_path(env, path, path_info, script_name); end + + # The root of the directory hierarchy. Only requests for files and + # directories inside of the root directory are supported. + # + # pkg:gem/rack#lib/rack/directory.rb:80 + def root; end + + # File::Stat for the given path, but return nil for missing/bad entries. + # + # pkg:gem/rack#lib/rack/directory.rb:166 + def stat(path); end +end + +# pkg:gem/rack#lib/rack/directory.rb:20 +Rack::Directory::DIR_FILE = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/directory.rb:43 +Rack::Directory::DIR_PAGE_FOOTER = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/directory.rb:21 +Rack::Directory::DIR_PAGE_HEADER = T.let(T.unsafe(nil), String) + +# Body class for directory entries, showing an index page with links +# to each file. +# +# pkg:gem/rack#lib/rack/directory.rb:51 +class Rack::Directory::DirectoryBody < ::Struct + # Yield strings for each part of the directory entry + # + # pkg:gem/rack#lib/rack/directory.rb:53 + def each; end + + private + + # Escape each element in the array of html strings. + # + # pkg:gem/rack#lib/rack/directory.rb:73 + def DIR_FILE_escape(htmls); end +end + +# Stolen from Ramaze +# +# pkg:gem/rack#lib/rack/directory.rb:192 +Rack::Directory::FILESIZE_FORMAT = T.let(T.unsafe(nil), Array) + +# pkg:gem/rack#lib/rack/constants.rb:22 +Rack::ETAG = T.let(T.unsafe(nil), String) + +# Automatically sets the etag header on all String bodies. +# +# The etag header is skipped if etag or last-modified headers are sent or if +# a sendfile body (body.responds_to :to_path) is given (since such cases +# should be handled by apache/nginx). +# +# On initialization, you can pass two parameters: a cache-control directive +# used when etag is absent and a directive when it is present. The first +# defaults to nil, while the second defaults to "max-age=0, private, must-revalidate" +# +# pkg:gem/rack#lib/rack/etag.rb:18 +class Rack::ETag + # pkg:gem/rack#lib/rack/etag.rb:22 + def initialize(app, no_cache_control = T.unsafe(nil), cache_control = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/etag.rb:28 + def call(env); end + + private + + # pkg:gem/rack#lib/rack/etag.rb:61 + def digest_body(body); end + + # pkg:gem/rack#lib/rack/etag.rb:53 + def etag_status?(status); end + + # pkg:gem/rack#lib/rack/etag.rb:57 + def skip_caching?(headers); end +end + +# pkg:gem/rack#lib/rack/etag.rb:20 +Rack::ETag::DEFAULT_CACHE_CONTROL = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/etag.rb:19 +Rack::ETag::ETAG_STRING = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:23 +Rack::EXPIRES = T.let(T.unsafe(nil), String) + +# This middleware provides hooks to certain places in the request / +# response lifecycle. This is so that middleware that don't need to filter +# the response data can safely leave it alone and not have to send messages +# down the traditional "rack stack". +# +# The events are: +# +# * on_start(request, response) +# +# This event is sent at the start of the request, before the next +# middleware in the chain is called. This method is called with a request +# object, and a response object. Right now, the response object is always +# nil, but in the future it may actually be a real response object. +# +# * on_commit(request, response) +# +# The response has been committed. The application has returned, but the +# response has not been sent to the webserver yet. This method is always +# called with a request object and the response object. The response +# object is constructed from the rack triple that the application returned. +# Changes may still be made to the response object at this point. +# +# * on_send(request, response) +# +# The webserver has started iterating over the response body, or has called +# the streaming body, and presumably has started sending data over the +# wire. This method is always called with a request object and the response +# object. The response object is constructed from the rack triple that the +# application returned. Changes SHOULD NOT be made to the response object +# as the webserver has already started sending data. Any mutations will +# likely result in an exception. +# +# * on_finish(request, response) +# +# The webserver has closed the response, and all data has been written to +# the response socket. The request and response object should both be +# read-only at this point. The body MAY NOT be available on the response +# object as it may have been flushed to the socket. +# +# * on_error(request, response, error) +# +# An exception has occurred in the application or an `on_commit` event. +# This method will get the request, the response (if available) and the +# exception that was raised. +# +# ## Order +# +# `on_start` is called on the handlers in the order that they were passed to +# the constructor. `on_commit`, on_send`, `on_finish`, and `on_error` are +# called in the reverse order. `on_finish` handlers are called inside an +# `ensure` block, so they are guaranteed to be called even if something +# raises an exception. If something raises an exception in a `on_finish` +# method, then nothing is guaranteed. +# +# pkg:gem/rack#lib/rack/events.rb:62 +class Rack::Events + # pkg:gem/rack#lib/rack/events.rb:121 + def initialize(app, handlers); end + + # pkg:gem/rack#lib/rack/events.rb:126 + def call(env); end + + private + + # pkg:gem/rack#lib/rack/events.rb:164 + def make_request(env); end + + # pkg:gem/rack#lib/rack/events.rb:168 + def make_response(status, headers, body); end + + # pkg:gem/rack#lib/rack/events.rb:152 + def on_commit(request, response); end + + # pkg:gem/rack#lib/rack/events.rb:148 + def on_error(request, response, e); end + + # pkg:gem/rack#lib/rack/events.rb:160 + def on_finish(request, response); end + + # pkg:gem/rack#lib/rack/events.rb:156 + def on_start(request, response); end +end + +# pkg:gem/rack#lib/rack/events.rb:63 +module Rack::Events::Abstract + # pkg:gem/rack#lib/rack/events.rb:67 + def on_commit(req, res); end + + # pkg:gem/rack#lib/rack/events.rb:76 + def on_error(req, res, e); end + + # pkg:gem/rack#lib/rack/events.rb:73 + def on_finish(req, res); end + + # pkg:gem/rack#lib/rack/events.rb:70 + def on_send(req, res); end + + # pkg:gem/rack#lib/rack/events.rb:64 + def on_start(req, res); end +end + +# pkg:gem/rack#lib/rack/events.rb:110 +class Rack::Events::BufferedResponse < ::Rack::Response::Raw + # pkg:gem/rack#lib/rack/events.rb:113 + def initialize(status, headers, body); end + + # pkg:gem/rack#lib/rack/events.rb:111 + def body; end + + # pkg:gem/rack#lib/rack/events.rb:118 + def to_a; end +end + +# pkg:gem/rack#lib/rack/events.rb:80 +class Rack::Events::EventedBodyProxy < ::Rack::BodyProxy + # pkg:gem/rack#lib/rack/events.rb:83 + def initialize(body, request, response, handlers, &block); end + + # pkg:gem/rack#lib/rack/events.rb:95 + def call(stream); end + + # pkg:gem/rack#lib/rack/events.rb:90 + def each; end + + # pkg:gem/rack#lib/rack/events.rb:81 + def request; end + + # pkg:gem/rack#lib/rack/events.rb:100 + def respond_to?(method_name, include_all = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/events.rb:81 + def response; end +end + +# Rack::Files serves files below the +root+ directory given, according to the +# path info of the Rack request. +# e.g. when Rack::Files.new("/etc") is used, you can access 'passwd' file +# as http://localhost:9292/passwd +# +# Handlers can detect if bodies are a Rack::Files, and use mechanisms +# like sendfile on the +path+. +# +# pkg:gem/rack#lib/rack/files.rb:20 +class Rack::Files + # pkg:gem/rack#lib/rack/files.rb:27 + def initialize(root, headers = T.unsafe(nil), default_mime = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/files.rb:34 + def call(env); end + + # pkg:gem/rack#lib/rack/files.rb:39 + def get(env); end + + # pkg:gem/rack#lib/rack/files.rb:25 + def root; end + + # pkg:gem/rack#lib/rack/files.rb:68 + def serving(request, path); end + + private + + # pkg:gem/rack#lib/rack/files.rb:190 + def fail(status, body, headers = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/files.rb:209 + def filesize(path); end + + # The MIME type for the contents of the file located at @path + # + # pkg:gem/rack#lib/rack/files.rb:205 + def mime_type(path, default_mime); end +end + +# pkg:gem/rack#lib/rack/files.rb:21 +Rack::Files::ALLOWED_VERBS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rack#lib/rack/files.rb:22 +Rack::Files::ALLOW_HEADER = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/files.rb:121 +class Rack::Files::BaseIterator + # pkg:gem/rack#lib/rack/files.rb:124 + def initialize(path, ranges, options); end + + # pkg:gem/rack#lib/rack/files.rb:144 + def bytesize; end + + # pkg:gem/rack#lib/rack/files.rb:153 + def close; end + + # pkg:gem/rack#lib/rack/files.rb:130 + def each; end + + # pkg:gem/rack#lib/rack/files.rb:122 + def options; end + + # pkg:gem/rack#lib/rack/files.rb:122 + def path; end + + # pkg:gem/rack#lib/rack/files.rb:122 + def ranges; end + + private + + # pkg:gem/rack#lib/rack/files.rb:171 + def each_range_part(file, range); end + + # pkg:gem/rack#lib/rack/files.rb:157 + def multipart?; end + + # pkg:gem/rack#lib/rack/files.rb:161 + def multipart_heading(range); end +end + +# pkg:gem/rack#lib/rack/files.rb:184 +class Rack::Files::Iterator < ::Rack::Files::BaseIterator + # pkg:gem/rack#lib/rack/files.rb:185 + def to_path; end +end + +# pkg:gem/rack#lib/rack/files.rb:23 +Rack::Files::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) + +# Rack::ForwardRequest gets caught by Rack::Recursive and redirects +# the current request to the app at +url+. +# +# raise ForwardRequest.new("/not-found") +# +# pkg:gem/rack#lib/rack/recursive.rb:14 +class Rack::ForwardRequest < ::Exception + # pkg:gem/rack#lib/rack/recursive.rb:17 + def initialize(url, env = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/recursive.rb:15 + def env; end + + # pkg:gem/rack#lib/rack/recursive.rb:15 + def url; end +end + +# HTTP method verbs +# +# pkg:gem/rack#lib/rack/constants.rb:28 +Rack::GET = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:33 +Rack::HEAD = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:7 +Rack::HTTPS = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:16 +Rack::HTTP_COOKIE = T.let(T.unsafe(nil), String) + +# Request env keys +# +# pkg:gem/rack#lib/rack/constants.rb:5 +Rack::HTTP_HOST = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:6 +Rack::HTTP_PORT = T.let(T.unsafe(nil), String) + +# Rack::Head returns an empty body for all HEAD requests. It leaves +# all other requests unchanged. +# +# pkg:gem/rack#lib/rack/head.rb:9 +class Rack::Head + # pkg:gem/rack#lib/rack/head.rb:10 + def initialize(app); end + + # pkg:gem/rack#lib/rack/head.rb:14 + def call(env); end +end + +# Rack::Headers is a Hash subclass that downcases all keys. It's designed +# to be used by rack applications that don't implement the Rack 3 SPEC +# (by using non-lowercase response header keys), automatically handling +# the downcasing of keys. +# +# pkg:gem/rack#lib/rack/headers.rb:8 +class Rack::Headers < ::Hash + # pkg:gem/rack#lib/rack/headers.rb:110 + def [](key); end + + # pkg:gem/rack#lib/rack/headers.rb:114 + def []=(key, value); end + + # pkg:gem/rack#lib/rack/headers.rb:119 + def assoc(key); end + + # pkg:gem/rack#lib/rack/headers.rb:123 + def compare_by_identity; end + + # pkg:gem/rack#lib/rack/headers.rb:127 + def delete(key); end + + # pkg:gem/rack#lib/rack/headers.rb:131 + def dig(key, *a); end + + # :nocov: + # + # pkg:gem/rack#lib/rack/headers.rb:227 + def except(*a); end + + # pkg:gem/rack#lib/rack/headers.rb:135 + def fetch(key, *default, &block); end + + # pkg:gem/rack#lib/rack/headers.rb:140 + def fetch_values(*a); end + + # pkg:gem/rack#lib/rack/headers.rb:144 + def has_key?(key); end + + # pkg:gem/rack#lib/rack/headers.rb:147 + def include?(key); end + + # pkg:gem/rack#lib/rack/headers.rb:151 + def invert; end + + # pkg:gem/rack#lib/rack/headers.rb:148 + def key?(key); end + + # pkg:gem/rack#lib/rack/headers.rb:149 + def member?(key); end + + # pkg:gem/rack#lib/rack/headers.rb:157 + def merge(hash, &block); end + + # pkg:gem/rack#lib/rack/headers.rb:196 + def merge!(hash, &block); end + + # pkg:gem/rack#lib/rack/headers.rb:161 + def reject(&block); end + + # pkg:gem/rack#lib/rack/headers.rb:167 + def replace(hash); end + + # pkg:gem/rack#lib/rack/headers.rb:172 + def select(&block); end + + # :nocov: + # + # pkg:gem/rack#lib/rack/headers.rb:205 + def slice(*a); end + + # pkg:gem/rack#lib/rack/headers.rb:117 + def store(key, value); end + + # pkg:gem/rack#lib/rack/headers.rb:178 + def to_proc; end + + # pkg:gem/rack#lib/rack/headers.rb:211 + def transform_keys(&block); end + + # pkg:gem/rack#lib/rack/headers.rb:215 + def transform_keys!; end + + # pkg:gem/rack#lib/rack/headers.rb:182 + def transform_values(&block); end + + # pkg:gem/rack#lib/rack/headers.rb:186 + def update(hash, &block); end + + # pkg:gem/rack#lib/rack/headers.rb:198 + def values_at(*keys); end + + private + + # pkg:gem/rack#lib/rack/headers.rb:234 + def downcase_key(key); end + + class << self + # pkg:gem/rack#lib/rack/headers.rb:91 + def [](*items); end + end +end + +# pkg:gem/rack#lib/rack/headers.rb:9 +Rack::Headers::KNOWN_HEADERS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rack#lib/rack/constants.rb:36 +Rack::LINK = T.let(T.unsafe(nil), String) + +# Validates your application and the requests and responses according to the Rack spec. See SPEC.rdoc for details. +# +# pkg:gem/rack#lib/rack/lint.rb:10 +class Rack::Lint + # N.B. The empty `##` comments creates paragraphs in the output. A trailing "\" is used to escape the newline character, which combines the comments into a single paragraph. + # + # = Rack Specification + # + # This specification aims to formalize the Rack protocol. You can (and should) use +Rack::Lint+ to enforce it. When you develop middleware, be sure to test with +Rack::Lint+ to catch possible violations of this specification. + # + # == The Application + # + # A Rack application is a Ruby object that responds to +call+. \ + # + # pkg:gem/rack#lib/rack/lint.rb:65 + def initialize(app); end + + # Invoke the application, validating the request and response according to the Rack spec. + # + # pkg:gem/rack#lib/rack/lint.rb:15 + def call(env = T.unsafe(nil)); end +end + +# :stopdoc: +# +# pkg:gem/rack#lib/rack/lint.rb:21 +Rack::Lint::ALLOWED_SCHEMES = T.let(T.unsafe(nil), Array) + +# Match a host name, according to RFC3986. Copied from `URI::RFC3986_Parser::HOST` because older Ruby versions (< 3.3) don't expose it. +# +# pkg:gem/rack#lib/rack/lint.rb:29 +Rack::Lint::HOST_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/lint.rb:52 +Rack::Lint::HTTP_HOST_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Represents a failure to meet the Rack specification. +# +# pkg:gem/rack#lib/rack/lint.rb:12 +class Rack::Lint::LintError < ::RuntimeError; end + +# pkg:gem/rack#lib/rack/lint.rb:24 +Rack::Lint::REQUEST_PATH_ABSOLUTE_FORM = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/lint.rb:26 +Rack::Lint::REQUEST_PATH_ASTERISK_FORM = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/lint.rb:25 +Rack::Lint::REQUEST_PATH_AUTHORITY_FORM = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/lint.rb:23 +Rack::Lint::REQUEST_PATH_ORIGIN_FORM = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/lint.rb:51 +Rack::Lint::SERVER_NAME_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/lint.rb:71 +class Rack::Lint::Wrapper + # pkg:gem/rack#lib/rack/lint.rb:72 + def initialize(app, env); end + + # ==== Streaming Body + # + # pkg:gem/rack#lib/rack/lint.rb:918 + def call(stream); end + + # ==== The content-length Header + # + # pkg:gem/rack#lib/rack/lint.rb:768 + def check_content_length_header(status, headers); end + + # ==== The content-type Header + # + # pkg:gem/rack#lib/rack/lint.rb:753 + def check_content_type_header(status, headers); end + + # === Early Hints + # + # The application or any middleware may call the rack.early_hints with an object which would be valid as the headers of a Rack response. + # + # pkg:gem/rack#lib/rack/lint.rb:670 + def check_early_hints(env); end + + # == The Request Environment + # + # Incoming HTTP requests are represented using an environment. \ + # + # pkg:gem/rack#lib/rack/lint.rb:136 + def check_environment(env); end + + # === The Error Stream + # + # pkg:gem/rack#lib/rack/lint.rb:571 + def check_error_stream(error); end + + # pkg:gem/rack#lib/rack/lint.rb:743 + def check_header_value(key, value); end + + # === The Headers + # + # pkg:gem/rack#lib/rack/lint.rb:704 + def check_headers(headers); end + + # === Hijacking + # + # The hijacking interfaces provides a means for an application to take control of the HTTP connection. There are two distinct hijack interfaces: full hijacking where the application takes over the raw connection, and partial hijacking where the application takes over just the response body stream. In both cases, the application is responsible for closing the hijacked stream. + # + # Full hijacking only works with HTTP/1. Partial hijacking is functionally equivalent to streaming bodies, and is still optionally supported for backwards compatibility with older Rack versions. + # + # ==== Full Hijack + # + # Full hijack is used to completely take over an HTTP/1 connection. It occurs before any headers are written and causes the server to ignore any response generated by the application. It is intended to be used when applications need access to the raw HTTP/1 connection. + # + # pkg:gem/rack#lib/rack/lint.rb:618 + def check_hijack(env); end + + # ==== Partial Hijack + # + # Partial hijack is used for bi-directional streaming of the request and response body. It occurs after the status and headers are written by the server and causes the server to ignore the Body of the response. It is intended to be used when applications need bi-directional streaming. + # + # pkg:gem/rack#lib/rack/lint.rb:639 + def check_hijack_response(headers, env); end + + # === The Input Stream + # + # The input stream is an +IO+-like object which contains the raw HTTP request data. \ + # + # pkg:gem/rack#lib/rack/lint.rb:478 + def check_input_stream(input); end + + # ==== The rack.protocol Header + # + # pkg:gem/rack#lib/rack/lint.rb:795 + def check_rack_protocol_header(status, headers); end + + # == The Response + # + # Outgoing HTTP responses are generated from the response tuple generated by the application. The response tuple is an +Array+ of three elements, which are: the HTTP status, the headers, and the response body. The Rack application is responsible for ensuring that the response tuple is well-formed and should follow the rules set out in this specification. + # + # === The Status + # + # pkg:gem/rack#lib/rack/lint.rb:694 + def check_status(status); end + + # Setting this value informs the server that it should perform a connection upgrade. In HTTP/1, this is done using the +upgrade+ header. In HTTP/2+, this is done by accepting the request. + # + # === The Body + # + # The Body is typically an +Array+ of +String+ values, an enumerable that yields +String+ values, a +Proc+, or an +IO+-like object. + # + # The Body must respond to +each+ or +call+. It may optionally respond to +to_path+ or +to_ary+. A Body that responds to +each+ is considered to be an Enumerable Body. A Body that responds to +call+ is considered to be a Streaming Body. + # + # A Body that responds to both +each+ and +call+ must be treated as an Enumerable Body, not a Streaming Body. If it responds to +each+, you must call +each+ and not +call+. If the Body doesn't respond to +each+, then you can assume it responds to +call+. + # + # The Body must either be consumed or returned. The Body is consumed by optionally calling either +each+ or +call+. Then, if the Body responds to +close+, it must be called to release any resources associated with the generation of the body. In other words, +close+ must always be called at least once; typically after the web server has sent the response to the client, but also in cases where the Rack application makes internal/virtual requests and discards the response. + # + # pkg:gem/rack#lib/rack/lint.rb:821 + def close; end + + # ==== Enumerable Body + # + # pkg:gem/rack#lib/rack/lint.rb:852 + def each; end + + # pkg:gem/rack#lib/rack/lint.rb:895 + def respond_to?(name, *_arg1); end + + # pkg:gem/rack#lib/rack/lint.rb:87 + def response; end + + # If the Body responds to +to_ary+, it must return an +Array+ whose contents are identical to that produced by calling +each+. Middleware may call +to_ary+ directly on the Body and return a new Body in its place. In other words, middleware can only process the Body directly if it responds to +to_ary+. If the Body responds to both +to_ary+ and +close+, its implementation of +to_ary+ must call +close+. + # + # pkg:gem/rack#lib/rack/lint.rb:905 + def to_ary; end + + # pkg:gem/rack#lib/rack/lint.rb:891 + def to_path; end + + # pkg:gem/rack#lib/rack/lint.rb:780 + def verify_content_length(size); end + + # pkg:gem/rack#lib/rack/lint.rb:835 + def verify_to_path; end + + private + + # pkg:gem/rack#lib/rack/lint.rb:126 + def assert_required(key); end +end + +# pkg:gem/rack#lib/rack/lint.rb:889 +Rack::Lint::Wrapper::BODY_METHODS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rack#lib/rack/lint.rb:580 +class Rack::Lint::Wrapper::ErrorWrapper + # pkg:gem/rack#lib/rack/lint.rb:581 + def initialize(error); end + + # * +close+ must never be called on the error stream. + # + # pkg:gem/rack#lib/rack/lint.rb:602 + def close(*args); end + + # * +flush+ must be called without arguments and must be called in order to make the error appear for sure. + # + # pkg:gem/rack#lib/rack/lint.rb:597 + def flush; end + + # * +puts+ must be called with a single argument that responds to +to_s+. + # + # pkg:gem/rack#lib/rack/lint.rb:586 + def puts(str); end + + # * +write+ must be called with a single argument that is a +String+. + # + # pkg:gem/rack#lib/rack/lint.rb:591 + def write(str); end +end + +# pkg:gem/rack#lib/rack/lint.rb:495 +class Rack::Lint::Wrapper::InputWrapper + # pkg:gem/rack#lib/rack/lint.rb:496 + def initialize(input); end + + # * +close+ can be called on the input stream to indicate that any remaining input is not needed. + # + # pkg:gem/rack#lib/rack/lint.rb:563 + def close(*args); end + + # * +each+ must be called without arguments and only yield +String+ values. + # + # pkg:gem/rack#lib/rack/lint.rb:552 + def each(*args); end + + # * +gets+ must be called without arguments and return a +String+, or +nil+ on EOF (end-of-file). + # + # pkg:gem/rack#lib/rack/lint.rb:501 + def gets(*args); end + + # * +read+ behaves like IO#read. Its signature is read([length, [buffer]]). + # * If given, +length+ must be a non-negative Integer (>= 0) or +nil+, and +buffer+ must be a +String+ and may not be +nil+. + # * If +length+ is given and not +nil+, then this method reads at most +length+ bytes from the input stream. + # * If +length+ is not given or +nil+, then this method reads all data until EOF. + # * When EOF is reached, this method returns +nil+ if +length+ is given and not +nil+, or +""+ if +length+ is not given or is +nil+. + # * If +buffer+ is given, then the read data will be placed into +buffer+ instead of a newly created +String+. + # + # pkg:gem/rack#lib/rack/lint.rb:519 + def read(*args); end +end + +# pkg:gem/rack#lib/rack/lint.rb:936 +class Rack::Lint::Wrapper::StreamWrapper + extend ::Forwardable + + # pkg:gem/rack#lib/rack/lint.rb:947 + def initialize(stream); end + + # pkg:gem/rack#lib/rack/lint.rb:945 + def <<(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rack#lib/rack/lint.rb:945 + def close(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rack#lib/rack/lint.rb:945 + def close_read(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rack#lib/rack/lint.rb:945 + def close_write(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rack#lib/rack/lint.rb:945 + def closed?(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rack#lib/rack/lint.rb:945 + def flush(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rack#lib/rack/lint.rb:945 + def read(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rack#lib/rack/lint.rb:945 + def write(*_arg0, **_arg1, &_arg2); end +end + +# The semantics of these +IO+ methods must be a best effort match to those of a normal Ruby +IO+ or +Socket+ object, using standard arguments and raising standard exceptions. Servers may simply pass on real +IO+ objects to the Streaming Body. In some cases (e.g. when using transfer-encoding or HTTP/2+), the server may need to provide a wrapper that implements the required methods, in order to provide the correct semantics. +# +# pkg:gem/rack#lib/rack/lint.rb:940 +Rack::Lint::Wrapper::StreamWrapper::REQUIRED_METHODS = T.let(T.unsafe(nil), Array) + +# Rack::Lock locks every request inside a mutex, so that every request +# will effectively be executed synchronously. +# +# pkg:gem/rack#lib/rack/lock.rb:8 +class Rack::Lock + # pkg:gem/rack#lib/rack/lock.rb:9 + def initialize(app, mutex = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/lock.rb:13 + def call(env); end + + private + + # pkg:gem/rack#lib/rack/lock.rb:25 + def unlock; end +end + +# Rack::MediaType parse media type and parameters out of content_type string +# +# pkg:gem/rack#lib/rack/media_type.rb:6 +class Rack::MediaType + class << self + # The media type parameters provided in CONTENT_TYPE as a Hash, or + # an empty Hash if no CONTENT_TYPE or media-type parameters were + # provided. e.g., when the CONTENT_TYPE is "text/plain;charset=utf-8", + # this method responds with the following Hash: + # { 'charset' => 'utf-8' } + # + # This will pass back parameters with empty strings in the hash if they + # lack a value (e.g., "text/plain;charset=" will return { 'charset' => '' }, + # and "text/plain;charset" will return { 'charset' => '' }, similarly to + # the query params parser (barring the latter case, which returns nil instead)). + # + # pkg:gem/rack#lib/rack/media_type.rb:34 + def params(content_type); end + + # The media type (type/subtype) portion of the CONTENT_TYPE header + # without any media type parameters. e.g., when CONTENT_TYPE is + # "text/plain;charset=utf-8", the media-type is "text/plain". + # + # For more information on the use of media types in HTTP, see: + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 + # + # pkg:gem/rack#lib/rack/media_type.rb:16 + def type(content_type); end + + private + + # pkg:gem/rack#lib/rack/media_type.rb:47 + def strip_doublequotes(str); end + end +end + +# pkg:gem/rack#lib/rack/media_type.rb:7 +Rack::MediaType::SPLIT_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/method_override.rb:8 +class Rack::MethodOverride + # pkg:gem/rack#lib/rack/method_override.rb:15 + def initialize(app); end + + # pkg:gem/rack#lib/rack/method_override.rb:19 + def call(env); end + + # pkg:gem/rack#lib/rack/method_override.rb:31 + def method_override(env); end + + private + + # pkg:gem/rack#lib/rack/method_override.rb:44 + def allowed_methods; end + + # pkg:gem/rack#lib/rack/method_override.rb:48 + def method_override_param(req); end +end + +# pkg:gem/rack#lib/rack/method_override.rb:13 +Rack::MethodOverride::ALLOWED_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rack#lib/rack/method_override.rb:9 +Rack::MethodOverride::HTTP_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rack#lib/rack/method_override.rb:12 +Rack::MethodOverride::HTTP_METHOD_OVERRIDE_HEADER = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/method_override.rb:11 +Rack::MethodOverride::METHOD_OVERRIDE_PARAM_KEY = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/mime.rb:4 +module Rack::Mime + private + + # Returns true if the given value is a mime match for the given mime match + # specification, false otherwise. + # + # Rack::Mime.match?('text/html', 'text/*') => true + # Rack::Mime.match?('text/plain', '*') => true + # Rack::Mime.match?('text/html', 'application/json') => false + # + # pkg:gem/rack#lib/rack/mime.rb:30 + def match?(value, matcher); end + + # Returns String with mime type if found, otherwise use +fallback+. + # +ext+ should be filename extension in the '.ext' format that + # File.extname(file) returns. + # +fallback+ may be any object + # + # Also see the documentation for MIME_TYPES + # + # Usage: + # Rack::Mime.mime_type('.foo') + # + # This is a shortcut for: + # Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream') + # + # pkg:gem/rack#lib/rack/mime.rb:18 + def mime_type(ext, fallback = T.unsafe(nil)); end + + class << self + # Returns true if the given value is a mime match for the given mime match + # specification, false otherwise. + # + # Rack::Mime.match?('text/html', 'text/*') => true + # Rack::Mime.match?('text/plain', '*') => true + # Rack::Mime.match?('text/html', 'application/json') => false + # + # pkg:gem/rack#lib/rack/mime.rb:36 + def match?(value, matcher); end + + # Returns String with mime type if found, otherwise use +fallback+. + # +ext+ should be filename extension in the '.ext' format that + # File.extname(file) returns. + # +fallback+ may be any object + # + # Also see the documentation for MIME_TYPES + # + # Usage: + # Rack::Mime.mime_type('.foo') + # + # This is a shortcut for: + # Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream') + # + # pkg:gem/rack#lib/rack/mime.rb:21 + def mime_type(ext, fallback = T.unsafe(nil)); end + end +end + +# List of most common mime-types, selected various sources +# according to their usefulness in a webserving scope for Ruby +# users. +# +# To amend this list with your local mime.types list you can use: +# +# require 'webrick/httputils' +# list = WEBrick::HTTPUtils.load_mime_types('/etc/mime.types') +# Rack::Mime::MIME_TYPES.merge!(list) +# +# N.B. On Ubuntu the mime.types file does not include the leading period, so +# users may need to modify the data before merging into the hash. +# +# pkg:gem/rack#lib/rack/mime.rb:51 +Rack::Mime::MIME_TYPES = T.let(T.unsafe(nil), Hash) + +# Rack::MockRequest helps testing your Rack application without +# actually using HTTP. +# +# After performing a request on a URL with get/post/put/patch/delete, it +# returns a MockResponse with useful helper methods for effective +# testing. +# +# You can pass a hash with additional configuration to the +# get/post/put/patch/delete. +# :input:: A String or IO-like to be used as rack.input. +# :fatal:: Raise a FatalWarning if the app writes to rack.errors. +# :lint:: If true, wrap the application in a Rack::Lint. +# +# pkg:gem/rack#lib/rack/mock_request.rb:23 +class Rack::MockRequest + # pkg:gem/rack#lib/rack/mock_request.rb:44 + def initialize(app); end + + # Make a DELETE request and return a MockResponse. See #request. + # + # pkg:gem/rack#lib/rack/mock_request.rb:57 + def delete(uri, opts = T.unsafe(nil)); end + + # Make a GET request and return a MockResponse. See #request. + # + # pkg:gem/rack#lib/rack/mock_request.rb:49 + def get(uri, opts = T.unsafe(nil)); end + + # Make a HEAD request and return a MockResponse. See #request. + # + # pkg:gem/rack#lib/rack/mock_request.rb:59 + def head(uri, opts = T.unsafe(nil)); end + + # Make an OPTIONS request and return a MockResponse. See #request. + # + # pkg:gem/rack#lib/rack/mock_request.rb:61 + def options(uri, opts = T.unsafe(nil)); end + + # Make a PATCH request and return a MockResponse. See #request. + # + # pkg:gem/rack#lib/rack/mock_request.rb:55 + def patch(uri, opts = T.unsafe(nil)); end + + # Make a POST request and return a MockResponse. See #request. + # + # pkg:gem/rack#lib/rack/mock_request.rb:51 + def post(uri, opts = T.unsafe(nil)); end + + # Make a PUT request and return a MockResponse. See #request. + # + # pkg:gem/rack#lib/rack/mock_request.rb:53 + def put(uri, opts = T.unsafe(nil)); end + + # Make a request using the given request method for the given + # uri to the rack application and return a MockResponse. + # Options given are passed to MockRequest.env_for. + # + # pkg:gem/rack#lib/rack/mock_request.rb:66 + def request(method = T.unsafe(nil), uri = T.unsafe(nil), opts = T.unsafe(nil)); end + + class << self + # Return the Rack environment used for a request to +uri+. + # All options that are strings are added to the returned environment. + # Options: + # :fatal :: Whether to raise an exception if request outputs to rack.errors + # :input :: The rack.input to set + # :http_version :: The SERVER_PROTOCOL to set + # :method :: The HTTP request method to use + # :params :: The params to use + # :script_name :: The SCRIPT_NAME to set + # + # pkg:gem/rack#lib/rack/mock_request.rb:98 + def env_for(uri = T.unsafe(nil), opts = T.unsafe(nil)); end + + # For historical reasons, we're pinning to RFC 2396. + # URI::Parser = URI::RFC2396_Parser + # + # pkg:gem/rack#lib/rack/mock_request.rb:84 + def parse_uri_rfc2396(uri); end + end +end + +# pkg:gem/rack#lib/rack/mock_request.rb:27 +class Rack::MockRequest::FatalWarner + # pkg:gem/rack#lib/rack/mock_request.rb:36 + def flush; end + + # pkg:gem/rack#lib/rack/mock_request.rb:28 + def puts(warning); end + + # pkg:gem/rack#lib/rack/mock_request.rb:39 + def string; end + + # pkg:gem/rack#lib/rack/mock_request.rb:32 + def write(warning); end +end + +# pkg:gem/rack#lib/rack/mock_request.rb:24 +class Rack::MockRequest::FatalWarning < ::RuntimeError; end + +# Rack::MockResponse provides useful helpers for testing your apps. +# Usually, you don't create the MockResponse on your own, but use +# MockRequest. +# +# pkg:gem/rack#lib/rack/mock_response.rb:13 +class Rack::MockResponse < ::Rack::Response + # pkg:gem/rack#lib/rack/mock_response.rb:48 + def initialize(status, headers, body, errors = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/mock_response.rb:63 + def =~(other); end + + # pkg:gem/rack#lib/rack/mock_response.rb:71 + def body; end + + # pkg:gem/rack#lib/rack/mock_response.rb:105 + def cookie(name); end + + # Headers + # + # pkg:gem/rack#lib/rack/mock_response.rb:43 + def cookies; end + + # pkg:gem/rack#lib/rack/mock_response.rb:101 + def empty?; end + + # Errors + # + # pkg:gem/rack#lib/rack/mock_response.rb:46 + def errors; end + + # Errors + # + # pkg:gem/rack#lib/rack/mock_response.rb:46 + def errors=(_arg0); end + + # pkg:gem/rack#lib/rack/mock_response.rb:67 + def match(other); end + + # Headers + # + # pkg:gem/rack#lib/rack/mock_response.rb:43 + def original_headers; end + + private + + # pkg:gem/rack#lib/rack/mock_response.rb:132 + def identify_cookie_attributes(cookie_filling); end + + # pkg:gem/rack#lib/rack/mock_response.rb:111 + def parse_cookies_from_header; end + + class << self + # pkg:gem/rack#lib/rack/mock_response.rb:39 + def [](*_arg0); end + end +end + +# pkg:gem/rack#lib/rack/mock_response.rb:14 +class Rack::MockResponse::Cookie + # pkg:gem/rack#lib/rack/mock_response.rb:17 + def initialize(args); end + + # pkg:gem/rack#lib/rack/mock_response.rb:15 + def domain; end + + # pkg:gem/rack#lib/rack/mock_response.rb:15 + def expires; end + + # pkg:gem/rack#lib/rack/mock_response.rb:26 + def method_missing(method_name, *args, **_arg2, &block); end + + # pkg:gem/rack#lib/rack/mock_response.rb:15 + def name; end + + # pkg:gem/rack#lib/rack/mock_response.rb:15 + def path; end + + # pkg:gem/rack#lib/rack/mock_response.rb:15 + def secure; end + + # pkg:gem/rack#lib/rack/mock_response.rb:15 + def value; end + + private + + # :nocov: + # + # pkg:gem/rack#lib/rack/mock_response.rb:33 + def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end +end + +# A multipart form data parser, adapted from IOWA. +# +# Usually, Rack::Request#POST takes care of calling this. +# +# pkg:gem/rack#lib/rack/multipart/parser.rb:9 +module Rack::Multipart + class << self + # pkg:gem/rack#lib/rack/multipart.rb:72 + def build_multipart(params, first = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/multipart.rb:68 + def extract_multipart(request, params = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/multipart.rb:48 + def parse_multipart(env, params = T.unsafe(nil)); end + end +end + +# Base class for multipart exceptions that do not subclass from +# other exception classes for backwards compatibility. +# +# pkg:gem/rack#lib/rack/multipart/parser.rb:26 +class Rack::Multipart::BoundaryTooLongError < ::StandardError + include ::Rack::BadRequest +end + +# pkg:gem/rack#lib/rack/multipart/parser.rb:33 +Rack::Multipart::EOL = T.let(T.unsafe(nil), String) + +# Use specific error class when parsing multipart request +# that ends early. +# +# pkg:gem/rack#lib/rack/multipart/parser.rb:20 +class Rack::Multipart::EmptyContentError < ::EOFError + include ::Rack::BadRequest +end + +# Prefer to use the BoundaryTooLongError class or Rack::BadRequest. +# +# pkg:gem/rack#lib/rack/multipart/parser.rb:31 +Rack::Multipart::Error = Rack::Multipart::BoundaryTooLongError + +# pkg:gem/rack#lib/rack/multipart/parser.rb:34 +Rack::Multipart::FWS = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/multipart/generator.rb:7 +class Rack::Multipart::Generator + # pkg:gem/rack#lib/rack/multipart/generator.rb:8 + def initialize(params, first = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/multipart/generator.rb:16 + def dump; end + + private + + # pkg:gem/rack#lib/rack/multipart/generator.rb:89 + def content_for_other(file, name); end + + # pkg:gem/rack#lib/rack/multipart/generator.rb:77 + def content_for_tempfile(io, file, name); end + + # pkg:gem/rack#lib/rack/multipart/generator.rb:52 + def flattened_params; end + + # pkg:gem/rack#lib/rack/multipart/generator.rb:37 + def multipart?; end +end + +# whitespace with optional folding +# +# pkg:gem/rack#lib/rack/multipart/parser.rb:35 +Rack::Multipart::HEADER_VALUE = T.let(T.unsafe(nil), String) + +# anything but a non-folding CRLF +# +# pkg:gem/rack#lib/rack/multipart/parser.rb:36 +Rack::Multipart::MULTIPART = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/multipart.rb:16 +Rack::Multipart::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:38 +Rack::Multipart::MULTIPART_CONTENT_DISPOSITION = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:39 +Rack::Multipart::MULTIPART_CONTENT_ID = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:37 +Rack::Multipart::MULTIPART_CONTENT_TYPE = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/multipart.rb:18 +class Rack::Multipart::MissingInputError < ::StandardError + include ::Rack::BadRequest +end + +# pkg:gem/rack#lib/rack/multipart/parser.rb:10 +class Rack::Multipart::MultipartPartLimitError < ::Errno::EMFILE + include ::Rack::BadRequest +end + +# pkg:gem/rack#lib/rack/multipart/parser.rb:14 +class Rack::Multipart::MultipartTotalPartLimitError < ::StandardError + include ::Rack::BadRequest +end + +# Accumulator for multipart form data, conforming to the QueryParser API. +# In future, the Parser could return the pair list directly, but that would +# change its API. +# +# pkg:gem/rack#lib/rack/multipart.rb:25 +class Rack::Multipart::ParamList + # pkg:gem/rack#lib/rack/multipart.rb:34 + def initialize; end + + # pkg:gem/rack#lib/rack/multipart.rb:38 + def <<(pair); end + + # pkg:gem/rack#lib/rack/multipart.rb:42 + def to_params_hash; end + + class << self + # pkg:gem/rack#lib/rack/multipart.rb:26 + def make_params; end + + # pkg:gem/rack#lib/rack/multipart.rb:30 + def normalize_params(params, key, value); end + end +end + +# Rack::Multipart::Parser handles parsing of multipart/form-data requests. +# +# File Parameter Contents +# +# When processing file uploads, the parser returns a hash containing +# information about uploaded files. For +file+ parameters, the hash includes: +# +# * +:filename+ - The original filename, already URL decoded by the parser +# * +:type+ - The content type of the uploaded file +# * +:name+ - The parameter name from the form +# * +:tempfile+ - A Tempfile object containing the uploaded data +# * +:head+ - The raw header content for this part +# +# pkg:gem/rack#lib/rack/multipart/parser.rb:53 +class Rack::Multipart::Parser + # pkg:gem/rack#lib/rack/multipart/parser.rb:254 + def initialize(boundary, tempfile, bufsize, query_parser); end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:275 + def parse(io); end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:299 + def result; end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:252 + def state; end + + private + + # Scan until the we find the start or end of the boundary. + # If we find it, return the appropriate symbol for the start or + # end of the boundary. If we don't find the start or end of the + # boundary, clear the buffer and return nil. + # + # pkg:gem/rack#lib/rack/multipart/parser.rb:534 + def consume_boundary; end + + # Return the related Encoding object. However, because + # enc is submitted by the user, it may be invalid, so + # use a binary encoding in that case. + # + # pkg:gem/rack#lib/rack/multipart/parser.rb:589 + def find_encoding(enc); end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:358 + def handle_consume_token; end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:604 + def handle_dummy_encoding(name, body); end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:614 + def handle_empty_content!(content); end + + # This handles the initial parser state. We read until we find the starting + # boundary, then we can transition to the next state. If we find the ending + # boundary, this is an invalid multipart upload, but keep scanning for opening + # boundary in that case. If no boundary found, we need to keep reading data + # and retry. It's highly unlikely the initial read will not consume the + # boundary. The client would have to deliberately craft a response + # with the opening boundary beyond the buffer size for that to happen. + # + # pkg:gem/rack#lib/rack/multipart/parser.rb:331 + def handle_fast_forward; end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:501 + def handle_mime_body; end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:373 + def handle_mime_head; end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:543 + def normalize_filename(filename); end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:312 + def read_data(io, outbuf); end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:556 + def tag_multipart_encoding(filename, content_type, name, body); end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:523 + def update_retained_size(size); end + + class << self + # pkg:gem/rack#lib/rack/multipart/parser.rb:137 + def parse(io, content_length, content_type, tmpfile, bufsize, qp); end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:122 + def parse_boundary(content_type); end + end +end + +# pkg:gem/rack#lib/rack/multipart/parser.rb:62 +Rack::Multipart::Parser::BOUNDARY_START_LIMIT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:80 +Rack::Multipart::Parser::BUFFERED_UPLOAD_BYTESIZE_LIMIT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:54 +Rack::Multipart::Parser::BUFSIZE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:90 +class Rack::Multipart::Parser::BoundedIO + # pkg:gem/rack#lib/rack/multipart/parser.rb:91 + def initialize(io, content_length); end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:97 + def read(size, outbuf = T.unsafe(nil)); end +end + +# pkg:gem/rack#lib/rack/multipart/parser.rb:553 +Rack::Multipart::Parser::CHARSET = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:369 +Rack::Multipart::Parser::CONTENT_DISPOSITION_MAX_BYTES = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:368 +Rack::Multipart::Parser::CONTENT_DISPOSITION_MAX_PARAMS = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:87 +Rack::Multipart::Parser::CONTENT_DISPOSITION_QUOTED_ESCAPES_LIMIT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:161 +class Rack::Multipart::Parser::Collector + include ::Enumerable + + # pkg:gem/rack#lib/rack/multipart/parser.rb:197 + def initialize(tempfile); end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:203 + def each; end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:223 + def on_mime_body(mime_index, content); end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:227 + def on_mime_finish(mime_index); end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:207 + def on_mime_head(mime_index, head, filename, content_type, name); end + + private + + # pkg:gem/rack#lib/rack/multipart/parser.rb:232 + def check_part_limits; end +end + +# pkg:gem/rack#lib/rack/multipart/parser.rb:185 +class Rack::Multipart::Parser::Collector::BufferPart < ::Rack::Multipart::Parser::Collector::MimePart + # pkg:gem/rack#lib/rack/multipart/parser.rb:187 + def close; end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:186 + def file?; end +end + +# pkg:gem/rack#lib/rack/multipart/parser.rb:162 +class Rack::Multipart::Parser::Collector::MimePart < ::Struct + # pkg:gem/rack#lib/rack/multipart/parser.rb:163 + def get_data; end +end + +# pkg:gem/rack#lib/rack/multipart/parser.rb:190 +class Rack::Multipart::Parser::Collector::TempfilePart < ::Rack::Multipart::Parser::Collector::MimePart + # pkg:gem/rack#lib/rack/multipart/parser.rb:192 + def close; end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:191 + def file?; end +end + +# pkg:gem/rack#lib/rack/multipart/parser.rb:120 +Rack::Multipart::Parser::EMPTY = T.let(T.unsafe(nil), Rack::Multipart::Parser::MultipartInfo) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:65 +Rack::Multipart::Parser::MIME_HEADER_BYTESIZE_LIMIT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:119 +class Rack::Multipart::Parser::MultipartInfo < ::Struct + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 + def params; end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 + def params=(_); end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 + def tmp_files; end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 + def tmp_files=(_); end + + class << self + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 + def [](*_arg0); end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 + def inspect; end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 + def keyword_init?; end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 + def members; end + + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 + def new(*_arg0); end + end +end + +# pkg:gem/rack#lib/rack/multipart/parser.rb:370 +Rack::Multipart::Parser::OBS_UNFOLD = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:84 +Rack::Multipart::Parser::PARSER_BYTESIZE_LIMIT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:595 +Rack::Multipart::Parser::REENCODE_DUMMY_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:56 +Rack::Multipart::Parser::TEMPFILE_FACTORY = T.let(T.unsafe(nil), Proc) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:55 +Rack::Multipart::Parser::TEXT_PLAIN = T.let(T.unsafe(nil), String) + +# Despite the misleading name, UploadedFile is designed for use for +# preparing multipart file upload bodies, generally for use in tests. +# It is not designed for and should not be used for handling uploaded +# files (there is no need for that, since Rack's multipart parser +# already creates Tempfiles for that). Using this with non-trusted +# filenames can create a security vulnerability. +# +# You should only use this class if you plan on passing the instances +# to Rack::MockRequest for use in creating multipart request bodies. +# +# UploadedFile delegates most methods to the tempfile it contains. +# +# pkg:gem/rack#lib/rack/multipart/uploaded_file.rb:19 +class Rack::Multipart::UploadedFile + # Create a new UploadedFile. For backwards compatibility, this accepts + # both positional and keyword versions of the same arguments: + # + # filepath/path :: The path to the file + # ct/content_type :: The content_type of the file + # bin/binary :: Whether to set binmode on the file before copying data into it. + # + # If both positional and keyword arguments are present, the keyword arguments + # take precedence. + # + # The following keyword-only arguments are also accepted: + # + # filename :: Override the filename to use for the file. This is so the + # filename for the upload does not need to match the basename of + # the file path. This should not contain slashes, unless you are + # trying to test how an application handles invalid filenames in + # multipart upload bodies. + # io :: Use the given IO-like instance as the tempfile, instead of creating + # a Tempfile instance. This is useful for building multipart file + # upload bodies without a file being present on the filesystem. If you are + # providing this, you should also provide the filename argument. + # + # pkg:gem/rack#lib/rack/multipart/uploaded_file.rb:49 + def initialize(filepath = T.unsafe(nil), ct = T.unsafe(nil), bin = T.unsafe(nil), path: T.unsafe(nil), content_type: T.unsafe(nil), binary: T.unsafe(nil), filename: T.unsafe(nil), io: T.unsafe(nil)); end + + # The content type of the instance. + # + # pkg:gem/rack#lib/rack/multipart/uploaded_file.rb:26 + def content_type; end + + # The content type of the instance. + # + # pkg:gem/rack#lib/rack/multipart/uploaded_file.rb:26 + def content_type=(_arg0); end + + # pkg:gem/rack#lib/rack/multipart/uploaded_file.rb:69 + def local_path; end + + # Delegate method missing calls to the tempfile. + # + # pkg:gem/rack#lib/rack/multipart/uploaded_file.rb:77 + def method_missing(method_name, *args, &block); end + + # The provided name of the file. This generally is the basename of + # path provided during initialization, but it can contain slashes if they + # were present in the filename argument when the instance was created. + # + # pkg:gem/rack#lib/rack/multipart/uploaded_file.rb:23 + def original_filename; end + + # The path of the tempfile for the instance, if the tempfile has a path. + # nil if the tempfile does not have a path. + # + # pkg:gem/rack#lib/rack/multipart/uploaded_file.rb:66 + def path; end + + private + + # Return true if the tempfile responds to the method. + # + # pkg:gem/rack#lib/rack/multipart/uploaded_file.rb:72 + def respond_to_missing?(*args); end +end + +# pkg:gem/rack#lib/rack/null_logger.rb:6 +class Rack::NullLogger + # pkg:gem/rack#lib/rack/null_logger.rb:7 + def initialize(app); end + + # pkg:gem/rack#lib/rack/null_logger.rb:45 + def <<(msg); end + + # pkg:gem/rack#lib/rack/null_logger.rb:43 + def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end + + # pkg:gem/rack#lib/rack/null_logger.rb:11 + def call(env); end + + # pkg:gem/rack#lib/rack/null_logger.rb:42 + def close; end + + # pkg:gem/rack#lib/rack/null_logger.rb:34 + def datetime_format; end + + # pkg:gem/rack#lib/rack/null_logger.rb:39 + def datetime_format=(datetime_format); end + + # pkg:gem/rack#lib/rack/null_logger.rb:17 + def debug(progname = T.unsafe(nil), &block); end + + # pkg:gem/rack#lib/rack/null_logger.rb:27 + def debug!; end + + # pkg:gem/rack#lib/rack/null_logger.rb:23 + def debug?; end + + # pkg:gem/rack#lib/rack/null_logger.rb:19 + def error(progname = T.unsafe(nil), &block); end + + # pkg:gem/rack#lib/rack/null_logger.rb:28 + def error!; end + + # pkg:gem/rack#lib/rack/null_logger.rb:25 + def error?; end + + # pkg:gem/rack#lib/rack/null_logger.rb:20 + def fatal(progname = T.unsafe(nil), &block); end + + # pkg:gem/rack#lib/rack/null_logger.rb:29 + def fatal!; end + + # pkg:gem/rack#lib/rack/null_logger.rb:26 + def fatal?; end + + # pkg:gem/rack#lib/rack/null_logger.rb:35 + def formatter; end + + # pkg:gem/rack#lib/rack/null_logger.rb:40 + def formatter=(formatter); end + + # pkg:gem/rack#lib/rack/null_logger.rb:16 + def info(progname = T.unsafe(nil), &block); end + + # pkg:gem/rack#lib/rack/null_logger.rb:30 + def info!; end + + # pkg:gem/rack#lib/rack/null_logger.rb:22 + def info?; end + + # pkg:gem/rack#lib/rack/null_logger.rb:32 + def level; end + + # pkg:gem/rack#lib/rack/null_logger.rb:37 + def level=(level); end + + # pkg:gem/rack#lib/rack/null_logger.rb:44 + def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end + + # pkg:gem/rack#lib/rack/null_logger.rb:33 + def progname; end + + # pkg:gem/rack#lib/rack/null_logger.rb:38 + def progname=(progname); end + + # pkg:gem/rack#lib/rack/null_logger.rb:46 + def reopen(logdev = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/null_logger.rb:36 + def sev_threshold; end + + # pkg:gem/rack#lib/rack/null_logger.rb:41 + def sev_threshold=(sev_threshold); end + + # pkg:gem/rack#lib/rack/null_logger.rb:21 + def unknown(progname = T.unsafe(nil), &block); end + + # pkg:gem/rack#lib/rack/null_logger.rb:18 + def warn(progname = T.unsafe(nil), &block); end + + # pkg:gem/rack#lib/rack/null_logger.rb:31 + def warn!; end + + # pkg:gem/rack#lib/rack/null_logger.rb:24 + def warn?; end +end + +# pkg:gem/rack#lib/rack/constants.rb:34 +Rack::OPTIONS = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:31 +Rack::PATCH = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:8 +Rack::PATH_INFO = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:29 +Rack::POST = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:30 +Rack::PUT = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:12 +Rack::QUERY_STRING = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/query_parser.rb:7 +class Rack::QueryParser + # pkg:gem/rack#lib/rack/query_parser.rb:62 + def initialize(params_class, param_depth_limit, bytesize_limit: T.unsafe(nil), params_limit: T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/query_parser.rb:60 + def bytesize_limit; end + + # pkg:gem/rack#lib/rack/query_parser.rb:196 + def make_params; end + + # pkg:gem/rack#lib/rack/query_parser.rb:200 + def new_depth_limit(param_depth_limit); end + + # normalize_params recursively expands parameters into structural types. If + # the structural types represented by two different parameter names are in + # conflict, a ParameterTypeError is raised. The depth argument is deprecated + # and should no longer be used, it is kept for backwards compatibility with + # earlier versions of rack. + # + # pkg:gem/rack#lib/rack/query_parser.rb:124 + def normalize_params(params, name, v, _depth = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/query_parser.rb:40 + def param_depth_limit; end + + # parse_nested_query expands a query string into structural types. Supported + # types are Arrays, Hashes and basic value types. It is possible to supply + # query strings with parameters of conflicting types, in this case a + # ParameterTypeError is raised. Users are encouraged to return a 400 in this + # case. + # + # pkg:gem/rack#lib/rack/query_parser.rb:109 + def parse_nested_query(qs, separator = T.unsafe(nil)); end + + # Stolen from Mongrel, with some small modifications: + # Parses a query string by breaking it up at the '&'. You can also use this + # to parse cookies by changing the characters used in the second parameter + # (which defaults to '&'). + # + # pkg:gem/rack#lib/rack/query_parser.rb:73 + def parse_query(qs, separator = T.unsafe(nil), &unescaper); end + + # Parses a query string by breaking it up at the '&', returning all key-value + # pairs as an array of [key, value] arrays. Unlike parse_query, this preserves + # all duplicate keys rather than collapsing them. + # + # pkg:gem/rack#lib/rack/query_parser.rb:94 + def parse_query_pairs(qs, separator = T.unsafe(nil)); end + + private + + # pkg:gem/rack#lib/rack/query_parser.rb:128 + def _normalize_params(params, name, v, depth); end + + # pkg:gem/rack#lib/rack/query_parser.rb:222 + def each_query_pair(qs, separator, unescaper = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/query_parser.rb:210 + def params_hash_has_key?(hash, key); end + + # pkg:gem/rack#lib/rack/query_parser.rb:206 + def params_hash_type?(obj); end + + # pkg:gem/rack#lib/rack/query_parser.rb:253 + def unescape(string, encoding = T.unsafe(nil)); end + + class << self + # pkg:gem/rack#lib/rack/query_parser.rb:36 + def make_default(param_depth_limit, **options); end + end +end + +# pkg:gem/rack#lib/rack/query_parser.rb:54 +Rack::QueryParser::BYTESIZE_LIMIT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rack#lib/rack/query_parser.rb:9 +Rack::QueryParser::COMMON_SEP = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rack#lib/rack/query_parser.rb:8 +Rack::QueryParser::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) + +# InvalidParameterError is the error that is raised when incoming structural +# parameters (parsed by parse_nested_query) contain invalid format or byte +# sequence. +# +# pkg:gem/rack#lib/rack/query_parser.rb:20 +class Rack::QueryParser::InvalidParameterError < ::ArgumentError + include ::Rack::BadRequest +end + +# pkg:gem/rack#lib/rack/query_parser.rb:57 +Rack::QueryParser::PARAMS_LIMIT = T.let(T.unsafe(nil), Integer) + +# ParameterTypeError is the error that is raised when incoming structural +# parameters (parsed by parse_nested_query) contain conflicting types. +# +# pkg:gem/rack#lib/rack/query_parser.rb:13 +class Rack::QueryParser::ParameterTypeError < ::TypeError + include ::Rack::BadRequest +end + +# pkg:gem/rack#lib/rack/query_parser.rb:257 +class Rack::QueryParser::Params < ::Hash + # pkg:gem/rack#lib/rack/query_parser.rb:258 + def to_params_hash; end +end + +# ParamsTooDeepError is the old name for the error that is raised when params +# are recursively nested over the specified limit. Make it the same as +# as QueryLimitError, so that code that rescues ParamsTooDeepError error +# to handle bad query strings also now handles other limits. +# +# pkg:gem/rack#lib/rack/query_parser.rb:34 +Rack::QueryParser::ParamsTooDeepError = Rack::QueryParser::QueryLimitError + +# QueryLimitError is for errors raised when the query provided exceeds one +# of the query parser limits. +# +# pkg:gem/rack#lib/rack/query_parser.rb:26 +class Rack::QueryParser::QueryLimitError < ::RangeError + include ::Rack::BadRequest +end + +# pkg:gem/rack#lib/rack/constants.rb:43 +Rack::RACK_EARLY_HINTS = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:44 +Rack::RACK_ERRORS = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:51 +Rack::RACK_HIJACK = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:46 +Rack::RACK_INPUT = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:52 +Rack::RACK_IS_HIJACK = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:45 +Rack::RACK_LOGGER = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:67 +Rack::RACK_METHODOVERRIDE_ORIGINAL_METHOD = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:54 +Rack::RACK_MULTIPART_BUFFER_SIZE = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:55 +Rack::RACK_MULTIPART_TEMPFILE_FACTORY = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:57 +Rack::RACK_PROTOCOL = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:53 +Rack::RACK_RECURSIVE_INCLUDE = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:63 +Rack::RACK_REQUEST_COOKIE_HASH = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:64 +Rack::RACK_REQUEST_COOKIE_STRING = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:62 +Rack::RACK_REQUEST_FORM_ERROR = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:59 +Rack::RACK_REQUEST_FORM_HASH = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:58 +Rack::RACK_REQUEST_FORM_INPUT = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:60 +Rack::RACK_REQUEST_FORM_PAIRS = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:61 +Rack::RACK_REQUEST_FORM_VARS = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:65 +Rack::RACK_REQUEST_QUERY_HASH = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:66 +Rack::RACK_REQUEST_QUERY_STRING = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:56 +Rack::RACK_RESPONSE_FINISHED = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:47 +Rack::RACK_SESSION = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:48 +Rack::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:49 +Rack::RACK_SHOWSTATUS_DETAIL = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:42 +Rack::RACK_TEMPFILES = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:50 +Rack::RACK_URL_SCHEME = T.let(T.unsafe(nil), String) + +# Rack environment variables +# +# pkg:gem/rack#lib/rack/constants.rb:41 +Rack::RACK_VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/version.rb:11 +Rack::RELEASE = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:9 +Rack::REQUEST_METHOD = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:10 +Rack::REQUEST_PATH = T.let(T.unsafe(nil), String) + +# Rack::Recursive allows applications called down the chain to +# include data from other applications (by using +# rack['rack.recursive.include'][...] or raise a +# ForwardRequest to redirect internally. +# +# pkg:gem/rack#lib/rack/recursive.rb:36 +class Rack::Recursive + # pkg:gem/rack#lib/rack/recursive.rb:37 + def initialize(app); end + + # pkg:gem/rack#lib/rack/recursive.rb:45 + def _call(env); end + + # pkg:gem/rack#lib/rack/recursive.rb:41 + def call(env); end + + # pkg:gem/rack#lib/rack/recursive.rb:52 + def include(env, path); end +end + +# High performant source reloader +# +# This class acts as Rack middleware. +# +# What makes it especially suited for use in a production environment is that +# any file will only be checked once and there will only be made one system +# call stat(2). +# +# Please note that this will not reload files in the background, it does so +# only when actively called. +# +# It is performing a check/reload cycle at the start of every request, but +# also respects a cool down time, during which nothing will be done. +# +# pkg:gem/rack#lib/rack/reloader.rb:24 +class Rack::Reloader + # pkg:gem/rack#lib/rack/reloader.rb:25 + def initialize(app, cooldown = T.unsafe(nil), backend = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/reloader.rb:36 + def call(env); end + + # pkg:gem/rack#lib/rack/reloader.rb:50 + def reload!(stderr = T.unsafe(nil)); end + + # A safe Kernel::load, issuing the hooks depending on the results + # + # pkg:gem/rack#lib/rack/reloader.rb:58 + def safe_load(file, mtime, stderr = T.unsafe(nil)); end +end + +# pkg:gem/rack#lib/rack/reloader.rb:68 +module Rack::Reloader::Stat + # Takes a relative or absolute +file+ name, a couple possible +paths+ that + # the +file+ might reside in. Returns the full path and File::Stat for the + # path. + # + # pkg:gem/rack#lib/rack/reloader.rb:88 + def figure_path(file, paths); end + + # pkg:gem/rack#lib/rack/reloader.rb:69 + def rotation; end + + # pkg:gem/rack#lib/rack/reloader.rb:103 + def safe_stat(file); end +end + +# Rack::Request provides a convenient interface to a Rack +# environment. It is stateless, the environment +env+ passed to the +# constructor will be directly modified. +# +# req = Rack::Request.new(env) +# req.post? +# req.params["data"] +# +# pkg:gem/rack#lib/rack/request.rb:16 +class Rack::Request + include ::Rack::Request::Env + include ::Rack::Request::Helpers + + # pkg:gem/rack#lib/rack/request.rb:62 + def initialize(env); end + + # pkg:gem/rack#lib/rack/request.rb:81 + def delete_param(k); end + + # pkg:gem/rack#lib/rack/request.rb:68 + def ip; end + + # pkg:gem/rack#lib/rack/request.rb:72 + def params; end + + # pkg:gem/rack#lib/rack/request.rb:76 + def update_param(k, v); end + + class << self + # The priority when checking forwarded headers. The default + # is [:forwarded, :x_forwarded], which means, check the + # +Forwarded+ header first, followed by the appropriate + # X-Forwarded-* header. You can revert the priority by + # reversing the priority, or remove checking of either + # or both headers by removing elements from the array. + # + # This should be set as appropriate in your environment + # based on what reverse proxies are in use. If you are not + # using reverse proxies, you should probably use an empty + # array. + # + # pkg:gem/rack#lib/rack/request.rb:31 + def forwarded_priority; end + + # The priority when checking forwarded headers. The default + # is [:forwarded, :x_forwarded], which means, check the + # +Forwarded+ header first, followed by the appropriate + # X-Forwarded-* header. You can revert the priority by + # reversing the priority, or remove checking of either + # or both headers by removing elements from the array. + # + # This should be set as appropriate in your environment + # based on what reverse proxies are in use. If you are not + # using reverse proxies, you should probably use an empty + # array. + # + # pkg:gem/rack#lib/rack/request.rb:31 + def forwarded_priority=(_arg0); end + + # pkg:gem/rack#lib/rack/request.rb:18 + def ip_filter; end + + # pkg:gem/rack#lib/rack/request.rb:18 + def ip_filter=(_arg0); end + + # The priority when checking either the X-Forwarded-Proto + # or X-Forwarded-Scheme header for the forwarded protocol. + # The default is [:proto, :scheme], to try the + # X-Forwarded-Proto header before the + # X-Forwarded-Scheme header. Rack 2 had behavior + # similar to [:scheme, :proto]. You can remove either or + # both of the entries in array to ignore that respective header. + # + # pkg:gem/rack#lib/rack/request.rb:40 + def x_forwarded_proto_priority; end + + # The priority when checking either the X-Forwarded-Proto + # or X-Forwarded-Scheme header for the forwarded protocol. + # The default is [:proto, :scheme], to try the + # X-Forwarded-Proto header before the + # X-Forwarded-Scheme header. Rack 2 had behavior + # similar to [:scheme, :proto]. You can remove either or + # both of the entries in array to ignore that respective header. + # + # pkg:gem/rack#lib/rack/request.rb:40 + def x_forwarded_proto_priority=(_arg0); end + end +end + +# pkg:gem/rack#lib/rack/request.rb:60 +Rack::Request::ALLOWED_SCHEMES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rack#lib/rack/request.rb:87 +module Rack::Request::Env + # pkg:gem/rack#lib/rack/request.rb:91 + def initialize(env); end + + # Add a header that may have multiple values. + # + # Example: + # request.add_header 'Accept', 'image/png' + # request.add_header 'Accept', '*/*' + # + # assert_equal 'image/png,*/*', request.get_header('Accept') + # + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 + # + # pkg:gem/rack#lib/rack/request.rb:134 + def add_header(key, v); end + + # Delete a request specific value for `name`. + # + # pkg:gem/rack#lib/rack/request.rb:145 + def delete_header(name); end + + # Loops through each key / value pair in the request specific data. + # + # pkg:gem/rack#lib/rack/request.rb:116 + def each_header(&block); end + + # The environment of the request. + # + # pkg:gem/rack#lib/rack/request.rb:89 + def env; end + + # If a block is given, it yields to the block if the value hasn't been set + # on the request. + # + # pkg:gem/rack#lib/rack/request.rb:111 + def fetch_header(name, &block); end + + # Get a request specific value for `name`. + # + # pkg:gem/rack#lib/rack/request.rb:105 + def get_header(name); end + + # Predicate method to test to see if `name` has been set as request + # specific data + # + # pkg:gem/rack#lib/rack/request.rb:100 + def has_header?(name); end + + # Set a request specific value for `name` to `v` + # + # pkg:gem/rack#lib/rack/request.rb:121 + def set_header(name, v); end + + private + + # pkg:gem/rack#lib/rack/request.rb:149 + def initialize_copy(other); end +end + +# pkg:gem/rack#lib/rack/request.rb:154 +module Rack::Request::Helpers + # Returns the data received in the query string. + # + # pkg:gem/rack#lib/rack/request.rb:491 + def GET; end + + # Returns the data received in the request body. + # + # This method support both application/x-www-form-urlencoded and + # multipart/form-data. + # + # pkg:gem/rack#lib/rack/request.rb:542 + def POST; end + + # pkg:gem/rack#lib/rack/request.rb:611 + def accept_encoding; end + + # pkg:gem/rack#lib/rack/request.rb:615 + def accept_language; end + + # The authority of the incoming request as defined by RFC3976. + # https://tools.ietf.org/html/rfc3986#section-3.2 + # + # In HTTP/1, this is the `host` header. + # In HTTP/2, this is the `:authority` pseudo-header. + # + # pkg:gem/rack#lib/rack/request.rb:271 + def authority; end + + # pkg:gem/rack#lib/rack/request.rb:594 + def base_url; end + + # pkg:gem/rack#lib/rack/request.rb:195 + def body; end + + # The character set of the request body if a "charset" media type + # parameter was given, or nil if no "charset" was specified. Note + # that, per RFC2616, text/* media types that specify no explicit + # charset are to be considered ISO-8859-1. + # + # pkg:gem/rack#lib/rack/request.rb:465 + def content_charset; end + + # pkg:gem/rack#lib/rack/request.rb:204 + def content_length; end + + # pkg:gem/rack#lib/rack/request.rb:313 + def content_type; end + + # pkg:gem/rack#lib/rack/request.rb:298 + def cookies; end + + # Checks the HTTP request method (or verb) to see if it was of type DELETE + # + # pkg:gem/rack#lib/rack/request.rb:225 + def delete?; end + + # Destructively delete a parameter, whether it's in GET or POST. Returns the value of the deleted parameter. + # + # If the parameter is in both GET and POST, the POST value takes precedence since that's how #params works. + # + # env['rack.input'] is not touched. + # + # pkg:gem/rack#lib/rack/request.rb:589 + def delete_param(k); end + + # Determine whether the request body contains form-data by checking + # the request content-type for one of the media-types: + # "application/x-www-form-urlencoded" or "multipart/form-data". The + # list of form-data media types can be modified through the + # +FORM_DATA_MEDIA_TYPES+ array. + # + # A request body is also assumed to contain form-data when no + # content-type header is provided and the request_method is POST. + # + # pkg:gem/rack#lib/rack/request.rb:477 + def form_data?; end + + # Returns the form data pairs received in the request body. + # + # This method support both application/x-www-form-urlencoded and + # multipart/form-data. + # + # pkg:gem/rack#lib/rack/request.rb:499 + def form_pairs; end + + # pkg:gem/rack#lib/rack/request.rb:398 + def forwarded_authority; end + + # pkg:gem/rack#lib/rack/request.rb:358 + def forwarded_for; end + + # pkg:gem/rack#lib/rack/request.rb:379 + def forwarded_port; end + + # pkg:gem/rack#lib/rack/request.rb:607 + def fullpath; end + + # Checks the HTTP request method (or verb) to see if it was of type GET + # + # pkg:gem/rack#lib/rack/request.rb:228 + def get?; end + + # Checks the HTTP request method (or verb) to see if it was of type HEAD + # + # pkg:gem/rack#lib/rack/request.rb:231 + def head?; end + + # Returns a formatted host, suitable for being used in a URI. + # + # pkg:gem/rack#lib/rack/request.rb:338 + def host; end + + # The `HTTP_HOST` header. + # + # pkg:gem/rack#lib/rack/request.rb:323 + def host_authority; end + + # pkg:gem/rack#lib/rack/request.rb:327 + def host_with_port(authority = T.unsafe(nil)); end + + # Returns an address suitable for being to resolve to an address. + # In the case of a domain name or IPv4 address, the result is the same + # as +host+. In the case of IPv6 or future address formats, the square + # brackets are removed. + # + # pkg:gem/rack#lib/rack/request.rb:346 + def hostname; end + + # pkg:gem/rack#lib/rack/request.rb:419 + def ip; end + + # Checks the HTTP request method (or verb) to see if it was of type LINK + # + # pkg:gem/rack#lib/rack/request.rb:237 + def link?; end + + # pkg:gem/rack#lib/rack/request.rb:205 + def logger; end + + # The media type (type/subtype) portion of the CONTENT_TYPE header + # without any media type parameters. e.g., when CONTENT_TYPE is + # "text/plain;charset=utf-8", the media-type is "text/plain". + # + # For more information on the use of media types in HTTP, see: + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 + # + # pkg:gem/rack#lib/rack/request.rb:448 + def media_type; end + + # The media type parameters provided in CONTENT_TYPE as a Hash, or + # an empty Hash if no CONTENT_TYPE or media-type parameters were + # provided. e.g., when the CONTENT_TYPE is "text/plain;charset=utf-8", + # this method responds with the following Hash: + # { 'charset' => 'utf-8' } + # + # pkg:gem/rack#lib/rack/request.rb:457 + def media_type_params; end + + # Checks the HTTP request method (or verb) to see if it was of type OPTIONS + # + # pkg:gem/rack#lib/rack/request.rb:234 + def options?; end + + # The union of GET and POST data. + # + # Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params. + # + # pkg:gem/rack#lib/rack/request.rb:556 + def params; end + + # Determine whether the request body contains data by checking + # the request media_type against registered parse-data media-types + # + # pkg:gem/rack#lib/rack/request.rb:486 + def parseable_data?; end + + # Checks the HTTP request method (or verb) to see if it was of type PATCH + # + # pkg:gem/rack#lib/rack/request.rb:240 + def patch?; end + + # pkg:gem/rack#lib/rack/request.rb:603 + def path; end + + # pkg:gem/rack#lib/rack/request.rb:199 + def path_info; end + + # pkg:gem/rack#lib/rack/request.rb:200 + def path_info=(s); end + + # pkg:gem/rack#lib/rack/request.rb:350 + def port; end + + # Checks the HTTP request method (or verb) to see if it was of type POST + # + # pkg:gem/rack#lib/rack/request.rb:243 + def post?; end + + # Checks the HTTP request method (or verb) to see if it was of type PUT + # + # pkg:gem/rack#lib/rack/request.rb:246 + def put?; end + + # Allow overriding the query parser that the receiver will use. + # By default Rack::Utils.default_query_parser is used. + # + # pkg:gem/rack#lib/rack/request.rb:562 + def query_parser=(_arg0); end + + # pkg:gem/rack#lib/rack/request.rb:203 + def query_string; end + + # the referer of the client + # + # pkg:gem/rack#lib/rack/request.rb:209 + def referer; end + + # pkg:gem/rack#lib/rack/request.rb:210 + def referrer; end + + # pkg:gem/rack#lib/rack/request.rb:202 + def request_method; end + + # pkg:gem/rack#lib/rack/request.rb:254 + def scheme; end + + # pkg:gem/rack#lib/rack/request.rb:196 + def script_name; end + + # pkg:gem/rack#lib/rack/request.rb:197 + def script_name=(s); end + + # The authority as defined by the `SERVER_NAME` and `SERVER_PORT` + # variables. + # + # pkg:gem/rack#lib/rack/request.rb:277 + def server_authority; end + + # pkg:gem/rack#lib/rack/request.rb:290 + def server_name; end + + # pkg:gem/rack#lib/rack/request.rb:294 + def server_port; end + + # pkg:gem/rack#lib/rack/request.rb:212 + def session; end + + # pkg:gem/rack#lib/rack/request.rb:218 + def session_options; end + + # pkg:gem/rack#lib/rack/request.rb:415 + def ssl?; end + + # Checks the HTTP request method (or verb) to see if it was of type TRACE + # + # pkg:gem/rack#lib/rack/request.rb:249 + def trace?; end + + # pkg:gem/rack#lib/rack/request.rb:619 + def trusted_proxy?(ip); end + + # Checks the HTTP request method (or verb) to see if it was of type UNLINK + # + # pkg:gem/rack#lib/rack/request.rb:252 + def unlink?; end + + # Destructively update a parameter, whether it's in GET and/or POST. Returns nil. + # + # The parameter is updated wherever it was previous defined, so GET, POST, or both. If it wasn't previously defined, it's inserted into GET. + # + # env['rack.input'] is not touched. + # + # pkg:gem/rack#lib/rack/request.rb:569 + def update_param(k, v); end + + # Tries to return a remake of the original request URL as a string. + # + # pkg:gem/rack#lib/rack/request.rb:599 + def url; end + + # pkg:gem/rack#lib/rack/request.rb:206 + def user_agent; end + + # pkg:gem/rack#lib/rack/request.rb:318 + def xhr?; end + + private + + # pkg:gem/rack#lib/rack/request.rb:770 + def allowed_scheme(header); end + + # pkg:gem/rack#lib/rack/request.rb:625 + def default_session; end + + # pkg:gem/rack#lib/rack/request.rb:682 + def expand_param_pairs(pairs, query_parser = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/request.rb:774 + def forwarded_priority; end + + # pkg:gem/rack#lib/rack/request.rb:746 + def forwarded_scheme; end + + # Get an array of values set in the RFC 7239 `Forwarded` request header. + # + # pkg:gem/rack#lib/rack/request.rb:665 + def get_http_forwarded(token); end + + # pkg:gem/rack#lib/rack/request.rb:641 + def parse_http_accept_header(header); end + + # pkg:gem/rack#lib/rack/request.rb:677 + def parse_multipart; end + + # pkg:gem/rack#lib/rack/request.rb:673 + def parse_query(qs, d = T.unsafe(nil)); end + + # Allow overriding the query parser that the receiver will use. + # By default Rack::Utils.default_query_parser is used. + # + # pkg:gem/rack#lib/rack/request.rb:669 + def query_parser; end + + # pkg:gem/rack#lib/rack/request.rb:735 + def split_authority(authority); end + + # pkg:gem/rack#lib/rack/request.rb:692 + def split_header(value); end + + # Assist with compatibility when processing `X-Forwarded-For`. + # + # pkg:gem/rack#lib/rack/request.rb:628 + def wrap_ipv6(host); end + + # pkg:gem/rack#lib/rack/request.rb:778 + def x_forwarded_proto_priority; end +end + +# pkg:gem/rack#lib/rack/request.rb:720 +Rack::Request::Helpers::AUTHORITY = T.let(T.unsafe(nil), Regexp) + +# Default ports depending on scheme. Used to decide whether or not +# to include the port in a generated URI. +# +# pkg:gem/rack#lib/rack/request.rb:173 +Rack::Request::Helpers::DEFAULT_PORTS = T.let(T.unsafe(nil), Hash) + +# The set of form-data media-types. Requests that do not indicate +# one of the media types present in this list will not be eligible +# for form-data / param parsing. +# +# pkg:gem/rack#lib/rack/request.rb:158 +Rack::Request::Helpers::FORM_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rack#lib/rack/request.rb:741 +Rack::Request::Helpers::FORWARDED_SCHEME_HEADERS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rack#lib/rack/request.rb:181 +Rack::Request::Helpers::HTTP_FORWARDED = T.let(T.unsafe(nil), String) + +# The address of the client which connected to the proxy. +# +# pkg:gem/rack#lib/rack/request.rb:176 +Rack::Request::Helpers::HTTP_X_FORWARDED_FOR = T.let(T.unsafe(nil), String) + +# The contents of the host/:authority header sent to the proxy. +# +# pkg:gem/rack#lib/rack/request.rb:179 +Rack::Request::Helpers::HTTP_X_FORWARDED_HOST = T.let(T.unsafe(nil), String) + +# The port used to connect to the proxy. +# +# pkg:gem/rack#lib/rack/request.rb:190 +Rack::Request::Helpers::HTTP_X_FORWARDED_PORT = T.let(T.unsafe(nil), String) + +# The protocol used to connect to the proxy. +# +# pkg:gem/rack#lib/rack/request.rb:187 +Rack::Request::Helpers::HTTP_X_FORWARDED_PROTO = T.let(T.unsafe(nil), String) + +# The value of the scheme sent to the proxy. +# +# pkg:gem/rack#lib/rack/request.rb:184 +Rack::Request::Helpers::HTTP_X_FORWARDED_SCHEME = T.let(T.unsafe(nil), String) + +# Another way for specifying https scheme was used. +# +# pkg:gem/rack#lib/rack/request.rb:193 +Rack::Request::Helpers::HTTP_X_FORWARDED_SSL = T.let(T.unsafe(nil), String) + +# The set of media-types. Requests that do not indicate +# one of the media types present in this list will not be eligible +# for param parsing like soap attachments or generic multiparts +# +# pkg:gem/rack#lib/rack/request.rb:166 +Rack::Request::Helpers::PARSEABLE_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array) + +# Rack::Response provides a convenient interface to create a Rack +# response. +# +# It allows setting of headers and cookies, and provides useful +# defaults (an OK response with empty headers and body). +# +# You can use Response#write to iteratively generate your response, +# but note that this is buffered by Rack::Response until you call +# +finish+. +finish+ however can take a block inside which calls to +# +write+ are synchronous with the Rack response. +# +# Your application's +call+ should end returning Response#finish. +# +# pkg:gem/rack#lib/rack/response.rb:23 +class Rack::Response + include ::Rack::Response::Helpers + + # Initialize the response object with the specified +body+, +status+ + # and +headers+. + # + # If the +body+ is +nil+, construct an empty response object with internal + # buffering. + # + # If the +body+ responds to +to_str+, assume it's a string-like object and + # construct a buffered response object containing using that string as the + # initial contents of the buffer. + # + # Otherwise it is expected +body+ conforms to the normal requirements of a + # Rack response body, typically implementing one of +each+ (enumerable + # body) or +call+ (streaming body). + # + # The +status+ defaults to +200+ which is the "OK" HTTP status code. You + # can provide any other valid status code. + # + # The +headers+ must be a +Hash+ of key-value header pairs which conform to + # the Rack specification for response headers. The key must be a +String+ + # instance and the value can be either a +String+ or +Array+ instance. + # + # pkg:gem/rack#lib/rack/response.rb:54 + def initialize(body = T.unsafe(nil), status = T.unsafe(nil), headers = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/response.rb:177 + def [](key); end + + # pkg:gem/rack#lib/rack/response.rb:178 + def []=(key, value); end + + # pkg:gem/rack#lib/rack/response.rb:31 + def body; end + + # pkg:gem/rack#lib/rack/response.rb:31 + def body=(_arg0); end + + # pkg:gem/rack#lib/rack/response.rb:95 + def chunked?; end + + # pkg:gem/rack#lib/rack/response.rb:152 + def close; end + + # pkg:gem/rack#lib/rack/response.rb:172 + def delete_header(key); end + + # For *response + # + # pkg:gem/rack#lib/rack/response.rb:130 + def each(&callback); end + + # pkg:gem/rack#lib/rack/response.rb:156 + def empty?; end + + # Generate a response array consistent with the requirements of the SPEC. + # @return [Array] a 3-tuple suitable of `[status, headers, body]` + # which is suitable to be returned from the middleware `#call(env)` method. + # + # pkg:gem/rack#lib/rack/response.rb:107 + def finish(&block); end + + # pkg:gem/rack#lib/rack/response.rb:164 + def get_header(key); end + + # pkg:gem/rack#lib/rack/response.rb:160 + def has_header?(key); end + + # pkg:gem/rack#lib/rack/response.rb:32 + def headers; end + + # pkg:gem/rack#lib/rack/response.rb:31 + def length; end + + # pkg:gem/rack#lib/rack/response.rb:31 + def length=(_arg0); end + + # pkg:gem/rack#lib/rack/response.rb:99 + def no_entity_body?; end + + # pkg:gem/rack#lib/rack/response.rb:90 + def redirect(target, status = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/response.rb:168 + def set_header(key, value); end + + # pkg:gem/rack#lib/rack/response.rb:31 + def status; end + + # pkg:gem/rack#lib/rack/response.rb:31 + def status=(_arg0); end + + # pkg:gem/rack#lib/rack/response.rb:128 + def to_a(&block); end + + # Append a chunk to the response body. + # + # Converts the response into a buffered response if it wasn't already. + # + # NOTE: Do not mix #write and direct #body access! + # + # pkg:gem/rack#lib/rack/response.rb:146 + def write(chunk); end + + class << self + # pkg:gem/rack#lib/rack/response.rb:24 + def [](status, headers, body); end + end +end + +# pkg:gem/rack#lib/rack/response.rb:28 +Rack::Response::CHUNKED = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/response.rb:180 +module Rack::Response::Helpers + # pkg:gem/rack#lib/rack/response.rb:191 + def accepted?; end + + # Add a header that may have multiple values. + # + # Example: + # response.add_header 'vary', 'accept-encoding' + # response.add_header 'vary', 'cookie' + # + # assert_equal 'accept-encoding,cookie', response.get_header('vary') + # + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 + # + # pkg:gem/rack#lib/rack/response.rb:219 + def add_header(key, value); end + + # pkg:gem/rack#lib/rack/response.rb:194 + def bad_request?; end + + # Specify that the content should be cached. + # @param duration [Integer] The number of seconds until the cache expires. + # @option directive [String] The cache control directive, one of "public", "private", "no-cache" or "no-store". + # + # pkg:gem/rack#lib/rack/response.rb:307 + def cache!(duration = T.unsafe(nil), directive: T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/response.rb:290 + def cache_control; end + + # pkg:gem/rack#lib/rack/response.rb:294 + def cache_control=(value); end + + # pkg:gem/rack#lib/rack/response.rb:186 + def client_error?; end + + # pkg:gem/rack#lib/rack/response.rb:257 + def content_length; end + + # Get the content type of the response. + # + # pkg:gem/rack#lib/rack/response.rb:240 + def content_type; end + + # Set the content type of the response. + # + # pkg:gem/rack#lib/rack/response.rb:245 + def content_type=(content_type); end + + # pkg:gem/rack#lib/rack/response.rb:190 + def created?; end + + # pkg:gem/rack#lib/rack/response.rb:274 + def delete_cookie(key, value = T.unsafe(nil)); end + + # Specifies that the content shouldn't be cached. Overrides `cache!` if already called. + # + # pkg:gem/rack#lib/rack/response.rb:299 + def do_not_cache!; end + + # pkg:gem/rack#lib/rack/response.rb:314 + def etag; end + + # pkg:gem/rack#lib/rack/response.rb:318 + def etag=(value); end + + # pkg:gem/rack#lib/rack/response.rb:196 + def forbidden?; end + + # pkg:gem/rack#lib/rack/response.rb:206 + def include?(header); end + + # pkg:gem/rack#lib/rack/response.rb:183 + def informational?; end + + # pkg:gem/rack#lib/rack/response.rb:181 + def invalid?; end + + # pkg:gem/rack#lib/rack/response.rb:262 + def location; end + + # pkg:gem/rack#lib/rack/response.rb:266 + def location=(location); end + + # pkg:gem/rack#lib/rack/response.rb:249 + def media_type; end + + # pkg:gem/rack#lib/rack/response.rb:253 + def media_type_params; end + + # pkg:gem/rack#lib/rack/response.rb:198 + def method_not_allowed?; end + + # pkg:gem/rack#lib/rack/response.rb:193 + def moved_permanently?; end + + # pkg:gem/rack#lib/rack/response.rb:192 + def no_content?; end + + # pkg:gem/rack#lib/rack/response.rb:199 + def not_acceptable?; end + + # pkg:gem/rack#lib/rack/response.rb:197 + def not_found?; end + + # pkg:gem/rack#lib/rack/response.rb:189 + def ok?; end + + # pkg:gem/rack#lib/rack/response.rb:201 + def precondition_failed?; end + + # pkg:gem/rack#lib/rack/response.rb:204 + def redirect?; end + + # pkg:gem/rack#lib/rack/response.rb:185 + def redirection?; end + + # pkg:gem/rack#lib/rack/response.rb:200 + def request_timeout?; end + + # pkg:gem/rack#lib/rack/response.rb:187 + def server_error?; end + + # pkg:gem/rack#lib/rack/response.rb:270 + def set_cookie(key, value); end + + # pkg:gem/rack#lib/rack/response.rb:282 + def set_cookie_header; end + + # pkg:gem/rack#lib/rack/response.rb:286 + def set_cookie_header=(value); end + + # pkg:gem/rack#lib/rack/response.rb:184 + def successful?; end + + # pkg:gem/rack#lib/rack/response.rb:195 + def unauthorized?; end + + # pkg:gem/rack#lib/rack/response.rb:202 + def unprocessable?; end + + protected + + # pkg:gem/rack#lib/rack/response.rb:359 + def append(chunk); end + + # Convert the body of this response into an internally buffered Array if possible. + # + # `@buffered` is a ternary value which indicates whether the body is buffered. It can be: + # * `nil` - The body has not been buffered yet. + # * `true` - The body is buffered as an Array instance. + # * `false` - The body is not buffered and cannot be buffered. + # + # @return [Boolean] whether the body is buffered as an Array instance. + # + # pkg:gem/rack#lib/rack/response.rb:332 + def buffered_body!; end +end + +# pkg:gem/rack#lib/rack/response.rb:375 +class Rack::Response::Raw + include ::Rack::Response::Helpers + + # pkg:gem/rack#lib/rack/response.rb:381 + def initialize(status, headers); end + + # pkg:gem/rack#lib/rack/response.rb:398 + def delete_header(key); end + + # pkg:gem/rack#lib/rack/response.rb:390 + def get_header(key); end + + # pkg:gem/rack#lib/rack/response.rb:386 + def has_header?(key); end + + # pkg:gem/rack#lib/rack/response.rb:378 + def headers; end + + # pkg:gem/rack#lib/rack/response.rb:394 + def set_header(key, value); end + + # pkg:gem/rack#lib/rack/response.rb:379 + def status; end + + # pkg:gem/rack#lib/rack/response.rb:379 + def status=(_arg0); end +end + +# pkg:gem/rack#lib/rack/response.rb:29 +Rack::Response::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) + +# Class which can make any IO object rewindable, including non-rewindable ones. It does +# this by buffering the data into a tempfile, which is rewindable. +# +# Don't forget to call #close when you're done. This frees up temporary resources that +# RewindableInput uses, though it does *not* close the original IO object. +# +# pkg:gem/rack#lib/rack/rewindable_input.rb:14 +class Rack::RewindableInput + # pkg:gem/rack#lib/rack/rewindable_input.rb:32 + def initialize(io); end + + # Closes this RewindableInput object without closing the originally + # wrapped IO object. Cleans up any temporary resources that this RewindableInput + # has created. + # + # This method may be called multiple times. It does nothing on subsequent calls. + # + # pkg:gem/rack#lib/rack/rewindable_input.rb:68 + def close; end + + # pkg:gem/rack#lib/rack/rewindable_input.rb:48 + def each(&block); end + + # pkg:gem/rack#lib/rack/rewindable_input.rb:38 + def gets; end + + # pkg:gem/rack#lib/rack/rewindable_input.rb:43 + def read(*args); end + + # pkg:gem/rack#lib/rack/rewindable_input.rb:53 + def rewind; end + + # pkg:gem/rack#lib/rack/rewindable_input.rb:58 + def size; end + + private + + # pkg:gem/rack#lib/rack/rewindable_input.rb:112 + def filesystem_has_posix_semantics?; end + + # pkg:gem/rack#lib/rack/rewindable_input.rb:81 + def make_rewindable; end +end + +# Makes rack.input rewindable, for compatibility with applications and middleware +# designed for earlier versions of Rack (where rack.input was required to be +# rewindable). +# +# pkg:gem/rack#lib/rack/rewindable_input.rb:18 +class Rack::RewindableInput::Middleware + # pkg:gem/rack#lib/rack/rewindable_input.rb:19 + def initialize(app); end + + # pkg:gem/rack#lib/rack/rewindable_input.rb:23 + def call(env); end +end + +# Sets an "x-runtime" response header, indicating the response +# time of the request, in seconds +# +# You can put it right before the application to see the processing +# time, or before all the other middlewares to include time for them, +# too. +# +# pkg:gem/rack#lib/rack/runtime.rb:12 +class Rack::Runtime + # pkg:gem/rack#lib/rack/runtime.rb:16 + def initialize(app, name = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/runtime.rb:22 + def call(env); end +end + +# pkg:gem/rack#lib/rack/runtime.rb:13 +Rack::Runtime::FORMAT_STRING = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/runtime.rb:14 +Rack::Runtime::HEADER_NAME = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:11 +Rack::SCRIPT_NAME = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:14 +Rack::SERVER_NAME = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:15 +Rack::SERVER_PORT = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:13 +Rack::SERVER_PROTOCOL = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:24 +Rack::SET_COOKIE = T.let(T.unsafe(nil), String) + +# = Sendfile +# +# The Sendfile middleware intercepts responses whose body is being +# served from a file and replaces it with a server specific x-sendfile +# header. The web server is then responsible for writing the file contents +# to the client. This can dramatically reduce the amount of work required +# by the Ruby backend and takes advantage of the web server's optimized file +# delivery code. +# +# In order to take advantage of this middleware, the response body must +# respond to +to_path+ and the request must include an `x-sendfile-type` +# header. Rack::Files and other components implement +to_path+ so there's +# rarely anything you need to do in your application. The `x-sendfile-type` +# header is typically set in your web servers configuration. The following +# sections attempt to document +# +# === Nginx +# +# Nginx supports the `x-accel-redirect` header. This is similar to `x-sendfile` +# but requires parts of the filesystem to be mapped into a private URL +# hierarchy. +# +# The following example shows the Nginx configuration required to create +# a private "/files/" area, enable `x-accel-redirect`, and pass the special +# `x-accel-mapping` header to the backend: +# +# location ~ /files/(.*) { +# internal; +# alias /var/www/$1; +# } +# +# location / { +# proxy_redirect off; +# +# proxy_set_header Host $host; +# proxy_set_header X-Real-IP $remote_addr; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# +# proxy_set_header x-accel-mapping /var/www/=/files/; +# +# proxy_pass http://127.0.0.1:8080/; +# } +# +# The `x-accel-mapping` header should specify the location on the file system, +# followed by an equals sign (=), followed name of the private URL pattern +# that it maps to. The middleware performs a case-insensitive substitution on the +# resulting path. +# +# To enable `x-accel-redirect`, you must configure the middleware explicitly: +# +# use Rack::Sendfile, "x-accel-redirect" +# +# For security reasons, the `x-sendfile-type` header from requests is ignored. +# The sendfile variation must be set via the middleware constructor. +# +# See Also: https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile +# +# === lighttpd +# +# Lighttpd has supported some variation of the `x-sendfile` header for some +# time, although only recent version support `x-sendfile` in a reverse proxy +# configuration. +# +# $HTTP["host"] == "example.com" { +# proxy-core.protocol = "http" +# proxy-core.balancer = "round-robin" +# proxy-core.backends = ( +# "127.0.0.1:8000", +# "127.0.0.1:8001", +# ... +# ) +# +# proxy-core.allow-x-sendfile = "enable" +# proxy-core.rewrite-request = ( +# "x-sendfile-type" => (".*" => "x-sendfile") +# ) +# } +# +# See Also: http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModProxyCore +# +# === Apache +# +# `x-sendfile` is supported under Apache 2.x using a separate module: +# +# https://tn123.org/mod_xsendfile/ +# +# Once the module is compiled and installed, you can enable it using +# XSendFile config directive: +# +# RequestHeader Set x-sendfile-type x-sendfile +# ProxyPassReverse / http://localhost:8001/ +# XSendFile on +# +# === Mapping parameter +# +# The third parameter allows for an overriding extension of the +# `x-accel-mapping` header. Mappings should be provided in tuples of internal to +# external. The internal values may contain regular expression syntax, they +# will be matched with case indifference. +# +# When `x-accel-redirect` is explicitly enabled via the variation parameter, +# and no application-level mappings are provided, the middleware will read +# the `x-accel-mapping` header from the proxy. This allows nginx to control +# the path mapping without requiring application-level configuration. +# +# === Security +# +# For security reasons, the `x-sendfile-type` header from HTTP requests is +# ignored. The sendfile variation must be explicitly configured via the +# middleware constructor to prevent information disclosure vulnerabilities +# where attackers could bypass proxy restrictions. +# +# pkg:gem/rack#lib/rack/sendfile.rb:121 +class Rack::Sendfile + # pkg:gem/rack#lib/rack/sendfile.rb:122 + def initialize(app, variation = T.unsafe(nil), mappings = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/sendfile.rb:130 + def call(env); end + + private + + # pkg:gem/rack#lib/rack/sendfile.rb:182 + def map_accel_path(env, path); end + + # pkg:gem/rack#lib/rack/sendfile.rb:166 + def variation(env); end + + # pkg:gem/rack#lib/rack/sendfile.rb:172 + def x_accel_mapping(env); end +end + +# Rack::ShowExceptions catches all exceptions raised from the app it +# wraps. It shows a useful backtrace with the sourcefile and +# clickable context, the whole Rack environment and the request +# data. +# +# Be careful when you use this on public-facing sites as it could +# reveal information helpful to attackers. +# +# pkg:gem/rack#lib/rack/show_exceptions.rb:18 +class Rack::ShowExceptions + # pkg:gem/rack#lib/rack/show_exceptions.rb:26 + def initialize(app); end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:30 + def call(env); end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:65 + def dump_exception(exception); end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:120 + def h(obj); end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:56 + def prefers_plaintext?(env); end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:80 + def pretty(env, exception); end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:116 + def template; end + + private + + # pkg:gem/rack#lib/rack/show_exceptions.rb:60 + def accepts_html?(env); end +end + +# pkg:gem/rack#lib/rack/show_exceptions.rb:19 +Rack::ShowExceptions::CONTEXT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rack#lib/rack/show_exceptions.rb:21 +class Rack::ShowExceptions::Frame < ::Struct + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def context_line; end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def context_line=(_); end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def filename; end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def filename=(_); end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def function; end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def function=(_); end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def lineno; end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def lineno=(_); end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def post_context; end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def post_context=(_); end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def post_context_lineno; end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def post_context_lineno=(_); end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def pre_context; end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def pre_context=(_); end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def pre_context_lineno; end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def pre_context_lineno=(_); end + + class << self + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def [](*_arg0); end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def inspect; end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def keyword_init?; end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def members; end + + # pkg:gem/rack#lib/rack/show_exceptions.rb:21 + def new(*_arg0); end + end +end + +# adapted from Django +# Copyright (c) Django Software Foundation and individual contributors. +# Used under the modified BSD license: +# http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5 +# +# pkg:gem/rack#lib/rack/show_exceptions.rb:135 +Rack::ShowExceptions::TEMPLATE = T.let(T.unsafe(nil), ERB) + +# Rack::ShowStatus catches all empty responses and replaces them +# with a site explaining the error. +# +# Additional details can be put into rack.showstatus.detail +# and will be shown as HTML. If such details exist, the error page +# is always rendered, even if the reply was not empty. +# +# pkg:gem/rack#lib/rack/show_status.rb:18 +class Rack::ShowStatus + # pkg:gem/rack#lib/rack/show_status.rb:19 + def initialize(app); end + + # pkg:gem/rack#lib/rack/show_status.rb:24 + def call(env); end + + # pkg:gem/rack#lib/rack/show_status.rb:54 + def h(obj); end +end + +# adapted from Django +# Copyright (c) Django Software Foundation and individual contributors. +# Used under the modified BSD license: +# http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5 +# +# pkg:gem/rack#lib/rack/show_status.rb:69 +Rack::ShowStatus::TEMPLATE = T.let(T.unsafe(nil), String) + +# The Rack::Static middleware intercepts requests for static files +# (javascript files, images, stylesheets, etc) based on the url prefixes or +# route mappings passed in the options, and serves them using a Rack::Files +# object. This allows a Rack stack to serve both static and dynamic content. +# +# Examples: +# +# Serve all requests beginning with /media from the "media" folder located +# in the current directory (ie media/*): +# +# use Rack::Static, :urls => ["/media"] +# +# Same as previous, but instead of returning 404 for missing files under +# /media, call the next middleware: +# +# use Rack::Static, :urls => ["/media"], :cascade => true +# +# Serve all requests beginning with /css or /images from the folder "public" +# in the current directory (ie public/css/* and public/images/*): +# +# use Rack::Static, :urls => ["/css", "/images"], :root => "public" +# +# Serve all requests to / with "index.html" from the folder "public" in the +# current directory (ie public/index.html): +# +# use Rack::Static, :urls => {"/" => 'index.html'}, :root => 'public' +# +# Serve all requests normally from the folder "public" in the current +# directory but uses index.html as default route for "/" +# +# use Rack::Static, :urls => [""], :root => 'public', :index => +# 'index.html' +# +# Set custom HTTP Headers for based on rules: +# +# use Rack::Static, :root => 'public', +# :header_rules => [ +# [rule, {header_field => content, header_field => content}], +# [rule, {header_field => content}] +# ] +# +# Rules for selecting files: +# +# 1) All files +# Provide the :all symbol +# :all => Matches every file +# +# 2) Folders +# Provide the folder path as a string +# '/folder' or '/folder/subfolder' => Matches files in a certain folder +# +# 3) File Extensions +# Provide the file extensions as an array +# ['css', 'js'] or %w(css js) => Matches files ending in .css or .js +# +# 4) Regular Expressions / Regexp +# Provide a regular expression +# %r{\.(?:css|js)\z} => Matches files ending in .css or .js +# /\.(?:eot|ttf|otf|woff2|woff|svg)\z/ => Matches files ending in +# the most common web font formats (.eot, .ttf, .otf, .woff2, .woff, .svg) +# Note: This Regexp is available as a shortcut, using the :fonts rule +# +# 5) Font Shortcut +# Provide the :fonts symbol +# :fonts => Uses the Regexp rule stated right above to match all common web font endings +# +# Rule Ordering: +# Rules are applied in the order that they are provided. +# List rather general rules above special ones. +# +# Complete example use case including HTTP header rules: +# +# use Rack::Static, :root => 'public', +# :header_rules => [ +# # Cache all static files in public caches (e.g. Rack::Cache) +# # as well as in the browser +# [:all, {'cache-control' => 'public, max-age=31536000'}], +# +# # Provide web fonts with cross-origin access-control-headers +# # Firefox requires this when serving assets using a Content Delivery Network +# [:fonts, {'access-control-allow-origin' => '*'}] +# ] +# +# pkg:gem/rack#lib/rack/static.rb:92 +class Rack::Static + # pkg:gem/rack#lib/rack/static.rb:93 + def initialize(app, options = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/static.rb:112 + def add_index_root?(path); end + + # Convert HTTP header rules to HTTP headers + # + # pkg:gem/rack#lib/rack/static.rb:170 + def applicable_rules(path); end + + # pkg:gem/rack#lib/rack/static.rb:128 + def call(env); end + + # pkg:gem/rack#lib/rack/static.rb:124 + def can_serve(path); end + + # pkg:gem/rack#lib/rack/static.rb:116 + def overwrite_file_path(path); end + + # pkg:gem/rack#lib/rack/static.rb:120 + def route_file(path); end +end + +# pkg:gem/rack#lib/rack/constants.rb:38 +Rack::TRACE = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/constants.rb:25 +Rack::TRANSFER_ENCODING = T.let(T.unsafe(nil), String) + +# Middleware tracks and cleans Tempfiles created throughout a request (i.e. Rack::Multipart) +# Ideas/strategy based on posts by Eric Wong and Charles Oliver Nutter +# https://groups.google.com/forum/#!searchin/rack-devel/temp/rack-devel/brK8eh-MByw/sw61oJJCGRMJ +# +# pkg:gem/rack#lib/rack/tempfile_reaper.rb:11 +class Rack::TempfileReaper + # pkg:gem/rack#lib/rack/tempfile_reaper.rb:12 + def initialize(app); end + + # pkg:gem/rack#lib/rack/tempfile_reaper.rb:16 + def call(env); end +end + +# pkg:gem/rack#lib/rack/constants.rb:37 +Rack::UNLINK = T.let(T.unsafe(nil), String) + +# Rack::URLMap takes a hash mapping urls or paths to apps, and +# dispatches accordingly. Support for HTTP/1.1 host names exists if +# the URLs start with http:// or https://. +# +# URLMap modifies the SCRIPT_NAME and PATH_INFO such that the part +# relevant for dispatch is in the SCRIPT_NAME, and the rest in the +# PATH_INFO. This should be taken care of when you need to +# reconstruct the URL in order to create links. +# +# URLMap dispatches in such a way that the longest paths are tried +# first, since they are most specific. +# +# pkg:gem/rack#lib/rack/urlmap.rb:20 +class Rack::URLMap + # pkg:gem/rack#lib/rack/urlmap.rb:21 + def initialize(map = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/urlmap.rb:48 + def call(env); end + + # pkg:gem/rack#lib/rack/urlmap.rb:25 + def remap(map); end + + private + + # pkg:gem/rack#lib/rack/urlmap.rb:87 + def casecmp?(v1, v2); end +end + +# Rack::Utils contains a grab-bag of useful methods for writing web +# applications adopted from all kinds of Ruby libraries. +# +# pkg:gem/rack#lib/rack/utils.rb:20 +module Rack::Utils + private + + # Return best accept value to use, based on the algorithm + # in RFC 2616 Section 14. If there are multiple best + # matches (same specificity and quality), the value returned + # is arbitrary. + # + # pkg:gem/rack#lib/rack/utils.rb:227 + def best_q_match(q_value_header, available_mimes); end + + # pkg:gem/rack#lib/rack/utils.rb:120 + def build_nested_query(value, prefix = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/utils.rb:110 + def build_query(params); end + + # Parses the "Range:" header, if present, into an array of Range objects. + # Returns nil if the header is missing or syntactically invalid. + # Returns an empty array if none of the ranges are satisfiable. + # + # pkg:gem/rack#lib/rack/utils.rb:492 + def byte_ranges(env, size, max_ranges: T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/utils.rb:692 + def clean_path_info(path_info); end + + # :nocov: + # + # pkg:gem/rack#lib/rack/utils.rb:91 + def clock_time; end + + # pkg:gem/rack#lib/rack/utils.rb:450 + def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header(key, value = {}) -> encoded string + # + # Generate an encoded string based on the given +key+ and +value+ using + # set_cookie_header for the purpose of causing the specified cookie to be + # deleted. The +value+ may be an instance of +Hash+ and can include + # attributes as outlined by set_cookie_header. The encoded cookie will have + # a +max_age+ of 0 seconds, an +expires+ date in the past and an empty + # +value+. When used with the +set-cookie+ header, it will cause the client + # to *remove* any matching cookie. + # + # delete_set_cookie_header("myname") + # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # pkg:gem/rack#lib/rack/utils.rb:446 + def delete_set_cookie_header(key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header!(header, key, value = {}) -> header value + # + # Set an expired cookie in the specified headers with the given cookie + # +key+ and +value+ using delete_set_cookie_header. This causes + # the client to immediately delete the specified cookie. + # + # delete_set_cookie_header!(nil, "mycookie") + # # => "mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # If the header is non-nil, it will be modified in place. + # + # header = [] + # delete_set_cookie_header!(header, "mycookie") + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # header + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # + # pkg:gem/rack#lib/rack/utils.rb:474 + def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end + + # URI escapes. (CGI style space to +) + # + # pkg:gem/rack#lib/rack/utils.rb:40 + def escape(s); end + + # Escape ampersands, brackets and quotes to their HTML/XML entities. + # + # pkg:gem/rack#lib/rack/utils.rb:243 + def escape_html(_arg0); end + + # Like URI escaping, but with %20 instead of +. Strictly speaking this is + # true URI escaping. + # + # pkg:gem/rack#lib/rack/utils.rb:46 + def escape_path(s); end + + # pkg:gem/rack#lib/rack/utils.rb:152 + def forwarded_values(forwarded_header); end + + # pkg:gem/rack#lib/rack/utils.rb:496 + def get_byte_ranges(http_range, size, max_ranges: T.unsafe(nil)); end + + # :call-seq: + # parse_cookies(env) -> hash + # + # Parse cookies from the provided request environment using + # parse_cookies_header. Returns a map of cookie +key+ to cookie +value+. + # + # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) + # # => {'myname' => 'myvalue'} + # + # pkg:gem/rack#lib/rack/utils.rb:347 + def parse_cookies(env); end + + # :call-seq: + # parse_cookies_header(value) -> hash + # + # Parse cookies from the provided header +value+ according to RFC6265. The + # syntax for cookie headers only supports semicolons. Returns a map of + # cookie +key+ to cookie +value+. + # + # parse_cookies_header('myname=myvalue; max-age=0') + # # => {"myname"=>"myvalue", "max-age"=>"0"} + # + # pkg:gem/rack#lib/rack/utils.rb:328 + def parse_cookies_header(value); end + + # pkg:gem/rack#lib/rack/utils.rb:106 + def parse_nested_query(qs, d = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/utils.rb:102 + def parse_query(qs, d = T.unsafe(nil), &unescaper); end + + # pkg:gem/rack#lib/rack/utils.rb:138 + def q_values(q_value_header); end + + # pkg:gem/rack#lib/rack/utils.rb:485 + def rfc2822(time); end + + # Constant time string comparison. + # + # NOTE: the values compared should be of fixed length, such as strings + # that have already been processed by HMAC. This should not be used + # on variable length plaintext strings because it could leak length info + # via timing attacks. + # + # pkg:gem/rack#lib/rack/utils.rb:540 + def secure_compare(a, b); end + + # Given an array of available encoding strings, and an array of + # acceptable encodings for a request, where each element of the + # acceptable encodings array is an array where the first element + # is an encoding name and the second element is the numeric + # priority for the encoding, return the available encoding with + # the highest priority. + # + # The accept_encoding argument is typically generated by calling + # Request#accept_encoding. + # + # Example: + # + # select_best_encoding(%w(compress gzip identity), + # [["compress", 0.5], ["gzip", 1.0]]) + # # => "gzip" + # + # To reduce denial of service potential, only the first 16 + # acceptable encodings are considered. + # + # pkg:gem/rack#lib/rack/utils.rb:274 + def select_best_encoding(available_encodings, accept_encoding); end + + # :call-seq: + # set_cookie_header(key, value) -> encoded string + # + # Generate an encoded string using the provided +key+ and +value+ suitable + # for the +set-cookie+ header according to RFC6265. The +value+ may be an + # instance of either +String+ or +Hash+. If the cookie key is invalid (as + # defined by RFC6265), an +ArgumentError+ will be raised. + # + # If the cookie +value+ is an instance of +Hash+, it considers the following + # cookie attribute keys: +domain+, +max_age+, +expires+ (must be instance + # of +Time+), +secure+, +http_only+, +same_site+ and +value+. For more + # details about the interpretation of these fields, consult + # [RFC6265 Section 5.2](https://datatracker.ietf.org/doc/html/rfc6265#section-5.2). + # + # set_cookie_header("myname", "myvalue") + # # => "myname=myvalue" + # + # set_cookie_header("myname", {value: "myvalue", max_age: 10}) + # # => "myname=myvalue; max-age=10" + # + # pkg:gem/rack#lib/rack/utils.rb:376 + def set_cookie_header(key, value); end + + # :call-seq: + # set_cookie_header!(headers, key, value) -> header value + # + # Append a cookie in the specified headers with the given cookie +key+ and + # +value+ using set_cookie_header. + # + # If the headers already contains a +set-cookie+ key, it will be converted + # to an +Array+ if not already, and appended to. + # + # pkg:gem/rack#lib/rack/utils.rb:420 + def set_cookie_header!(headers, key, value); end + + # pkg:gem/rack#lib/rack/utils.rb:674 + def status_code(status); end + + # Unescapes a URI escaped string with +encoding+. +encoding+ will be the + # target encoding of the string returned, and it defaults to UTF-8 + # + # pkg:gem/rack#lib/rack/utils.rb:58 + def unescape(s, encoding = T.unsafe(nil)); end + + # Unescapes the **path** component of a URI. See Rack::Utils.unescape for + # unescaping query parameters or form components. + # + # pkg:gem/rack#lib/rack/utils.rb:52 + def unescape_path(s); end + + # pkg:gem/rack#lib/rack/utils.rb:709 + def valid_path?(path); end + + class << self + # Return best accept value to use, based on the algorithm + # in RFC 2616 Section 14. If there are multiple best + # matches (same specificity and quality), the value returned + # is arbitrary. + # + # pkg:gem/rack#lib/rack/utils.rb:227 + def best_q_match(q_value_header, available_mimes); end + + # pkg:gem/rack#lib/rack/utils.rb:120 + def build_nested_query(value, prefix = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/utils.rb:110 + def build_query(params); end + + # Parses the "Range:" header, if present, into an array of Range objects. + # Returns nil if the header is missing or syntactically invalid. + # Returns an empty array if none of the ranges are satisfiable. + # + # pkg:gem/rack#lib/rack/utils.rb:492 + def byte_ranges(env, size, max_ranges: T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/utils.rb:692 + def clean_path_info(path_info); end + + # :nocov: + # + # pkg:gem/rack#lib/rack/utils.rb:91 + def clock_time; end + + # pkg:gem/rack#lib/rack/utils.rb:30 + def default_query_parser; end + + # pkg:gem/rack#lib/rack/utils.rb:30 + def default_query_parser=(_arg0); end + + # pkg:gem/rack#lib/rack/utils.rb:450 + def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header(key, value = {}) -> encoded string + # + # Generate an encoded string based on the given +key+ and +value+ using + # set_cookie_header for the purpose of causing the specified cookie to be + # deleted. The +value+ may be an instance of +Hash+ and can include + # attributes as outlined by set_cookie_header. The encoded cookie will have + # a +max_age+ of 0 seconds, an +expires+ date in the past and an empty + # +value+. When used with the +set-cookie+ header, it will cause the client + # to *remove* any matching cookie. + # + # delete_set_cookie_header("myname") + # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # pkg:gem/rack#lib/rack/utils.rb:446 + def delete_set_cookie_header(key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header!(header, key, value = {}) -> header value + # + # Set an expired cookie in the specified headers with the given cookie + # +key+ and +value+ using delete_set_cookie_header. This causes + # the client to immediately delete the specified cookie. + # + # delete_set_cookie_header!(nil, "mycookie") + # # => "mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # If the header is non-nil, it will be modified in place. + # + # header = [] + # delete_set_cookie_header!(header, "mycookie") + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # header + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # + # pkg:gem/rack#lib/rack/utils.rb:474 + def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end + + # URI escapes. (CGI style space to +) + # + # pkg:gem/rack#lib/rack/utils.rb:40 + def escape(s); end + + # Escape ampersands, brackets and quotes to their HTML/XML entities. + # + # pkg:gem/rack#lib/rack/utils.rb:243 + def escape_html(_arg0); end + + # Like URI escaping, but with %20 instead of +. Strictly speaking this is + # true URI escaping. + # + # pkg:gem/rack#lib/rack/utils.rb:46 + def escape_path(s); end + + # pkg:gem/rack#lib/rack/utils.rb:152 + def forwarded_values(forwarded_header); end + + # pkg:gem/rack#lib/rack/utils.rb:496 + def get_byte_ranges(http_range, size, max_ranges: T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/utils.rb:65 + def multipart_file_limit; end + + # pkg:gem/rack#lib/rack/utils.rb:65 + def multipart_file_limit=(_arg0); end + + # multipart_part_limit is the original name of multipart_file_limit, but + # the limit only counts parts with filenames. + # + # pkg:gem/rack#lib/rack/utils.rb:69 + def multipart_part_limit; end + + # pkg:gem/rack#lib/rack/utils.rb:70 + def multipart_part_limit=(_arg0); end + + # pkg:gem/rack#lib/rack/utils.rb:63 + def multipart_total_part_limit; end + + # pkg:gem/rack#lib/rack/utils.rb:63 + def multipart_total_part_limit=(_arg0); end + + # pkg:gem/rack#lib/rack/utils.rb:82 + def param_depth_limit; end + + # pkg:gem/rack#lib/rack/utils.rb:86 + def param_depth_limit=(v); end + + # :call-seq: + # parse_cookies(env) -> hash + # + # Parse cookies from the provided request environment using + # parse_cookies_header. Returns a map of cookie +key+ to cookie +value+. + # + # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) + # # => {'myname' => 'myvalue'} + # + # pkg:gem/rack#lib/rack/utils.rb:347 + def parse_cookies(env); end + + # :call-seq: + # parse_cookies_header(value) -> hash + # + # Parse cookies from the provided header +value+ according to RFC6265. The + # syntax for cookie headers only supports semicolons. Returns a map of + # cookie +key+ to cookie +value+. + # + # parse_cookies_header('myname=myvalue; max-age=0') + # # => {"myname"=>"myvalue", "max-age"=>"0"} + # + # pkg:gem/rack#lib/rack/utils.rb:328 + def parse_cookies_header(value); end + + # pkg:gem/rack#lib/rack/utils.rb:106 + def parse_nested_query(qs, d = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/utils.rb:102 + def parse_query(qs, d = T.unsafe(nil), &unescaper); end + + # pkg:gem/rack#lib/rack/utils.rb:138 + def q_values(q_value_header); end + + # pkg:gem/rack#lib/rack/utils.rb:485 + def rfc2822(time); end + + # Constant time string comparison. + # + # NOTE: the values compared should be of fixed length, such as strings + # that have already been processed by HMAC. This should not be used + # on variable length plaintext strings because it could leak length info + # via timing attacks. + # + # pkg:gem/rack#lib/rack/utils.rb:540 + def secure_compare(a, b); end + + # Given an array of available encoding strings, and an array of + # acceptable encodings for a request, where each element of the + # acceptable encodings array is an array where the first element + # is an encoding name and the second element is the numeric + # priority for the encoding, return the available encoding with + # the highest priority. + # + # The accept_encoding argument is typically generated by calling + # Request#accept_encoding. + # + # Example: + # + # select_best_encoding(%w(compress gzip identity), + # [["compress", 0.5], ["gzip", 1.0]]) + # # => "gzip" + # + # To reduce denial of service potential, only the first 16 + # acceptable encodings are considered. + # + # pkg:gem/rack#lib/rack/utils.rb:274 + def select_best_encoding(available_encodings, accept_encoding); end + + # :call-seq: + # set_cookie_header(key, value) -> encoded string + # + # Generate an encoded string using the provided +key+ and +value+ suitable + # for the +set-cookie+ header according to RFC6265. The +value+ may be an + # instance of either +String+ or +Hash+. If the cookie key is invalid (as + # defined by RFC6265), an +ArgumentError+ will be raised. + # + # If the cookie +value+ is an instance of +Hash+, it considers the following + # cookie attribute keys: +domain+, +max_age+, +expires+ (must be instance + # of +Time+), +secure+, +http_only+, +same_site+ and +value+. For more + # details about the interpretation of these fields, consult + # [RFC6265 Section 5.2](https://datatracker.ietf.org/doc/html/rfc6265#section-5.2). + # + # set_cookie_header("myname", "myvalue") + # # => "myname=myvalue" + # + # set_cookie_header("myname", {value: "myvalue", max_age: 10}) + # # => "myname=myvalue; max-age=10" + # + # pkg:gem/rack#lib/rack/utils.rb:376 + def set_cookie_header(key, value); end + + # :call-seq: + # set_cookie_header!(headers, key, value) -> header value + # + # Append a cookie in the specified headers with the given cookie +key+ and + # +value+ using set_cookie_header. + # + # If the headers already contains a +set-cookie+ key, it will be converted + # to an +Array+ if not already, and appended to. + # + # pkg:gem/rack#lib/rack/utils.rb:420 + def set_cookie_header!(headers, key, value); end + + # pkg:gem/rack#lib/rack/utils.rb:674 + def status_code(status); end + + # Unescapes a URI escaped string with +encoding+. +encoding+ will be the + # target encoding of the string returned, and it defaults to UTF-8 + # + # pkg:gem/rack#lib/rack/utils.rb:58 + def unescape(s, encoding = T.unsafe(nil)); end + + # Unescapes the **path** component of a URI. See Rack::Utils.unescape for + # unescaping query parameters or form components. + # + # pkg:gem/rack#lib/rack/utils.rb:52 + def unescape_path(s); end + + # pkg:gem/rack#lib/rack/utils.rb:709 + def valid_path?(path); end + end +end + +# pkg:gem/rack#lib/rack/utils.rb:149 +Rack::Utils::ALLOWED_FORWARED_PARAMS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rack#lib/rack/utils.rb:25 +Rack::Utils::COMMON_SEP = T.let(T.unsafe(nil), Hash) + +# Context allows the use of a compatible middleware at different points +# in a request handling stack. A compatible middleware must define +# #context which should take the arguments env and app. The first of which +# would be the request environment. The second of which would be the rack +# application that the request would be forwarded to. +# +# pkg:gem/rack#lib/rack/utils.rb:563 +class Rack::Utils::Context + # pkg:gem/rack#lib/rack/utils.rb:566 + def initialize(app_f, app_r); end + + # pkg:gem/rack#lib/rack/utils.rb:564 + def app; end + + # pkg:gem/rack#lib/rack/utils.rb:571 + def call(env); end + + # pkg:gem/rack#lib/rack/utils.rb:579 + def context(env, app = T.unsafe(nil)); end + + # pkg:gem/rack#lib/rack/utils.rb:564 + def for; end + + # pkg:gem/rack#lib/rack/utils.rb:575 + def recontext(app); end +end + +# pkg:gem/rack#lib/rack/utils.rb:24 +Rack::Utils::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) + +# Every standard HTTP code mapped to the appropriate message. +# Generated with: +# curl -s https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv \ +# | ruby -rcsv -e "puts CSV.parse(STDIN, headers: true) \ +# .reject {|v| v['Description'] == 'Unassigned' or v['Description'].include? '(' } \ +# .map {|v| %Q/#{v['Value']} => '#{v['Description']}'/ }.join(','+?\n)" +# +# pkg:gem/rack#lib/rack/utils.rb:590 +Rack::Utils::HTTP_STATUS_CODES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rack#lib/rack/utils.rb:22 +Rack::Utils::InvalidParameterError = Rack::QueryParser::InvalidParameterError + +# pkg:gem/rack#lib/rack/utils.rb:26 +Rack::Utils::KeySpaceConstrainedParams = Rack::QueryParser::Params + +# pkg:gem/rack#lib/rack/utils.rb:707 +Rack::Utils::NULL_BYTE = T.let(T.unsafe(nil), String) + +# pkg:gem/rack#lib/rack/utils.rb:660 +Rack::Utils::OBSOLETE_SYMBOLS_TO_STATUS_CODES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rack#lib/rack/utils.rb:668 +Rack::Utils::OBSOLETE_SYMBOL_MAPPINGS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rack#lib/rack/utils.rb:690 +Rack::Utils::PATH_SEPS = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/utils.rb:21 +Rack::Utils::ParameterTypeError = Rack::QueryParser::ParameterTypeError + +# pkg:gem/rack#lib/rack/utils.rb:23 +Rack::Utils::ParamsTooDeepError = Rack::QueryParser::QueryLimitError + +# Responses with HTTP status codes that should not have an entity body +# +# pkg:gem/rack#lib/rack/utils.rb:654 +Rack::Utils::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rack#lib/rack/utils.rb:656 +Rack::Utils::SYMBOL_TO_STATUS_CODE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rack#lib/rack/utils.rb:27 +Rack::Utils::URI_PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) + +# A valid cookie key according to RFC6265 and RFC2616. +# A can be any US-ASCII characters, except control characters, spaces, or tabs. It also must not contain a separator character like the following: ( ) < > @ , ; : \ " / [ ] ? = { }. +# +# pkg:gem/rack#lib/rack/utils.rb:353 +Rack::Utils::VALID_COOKIE_KEY = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/version.rb:9 +Rack::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rackup@2.2.1.rbi b/sorbet/rbi/gems/rackup@2.2.1.rbi new file mode 100644 index 000000000..f556867b0 --- /dev/null +++ b/sorbet/rbi/gems/rackup@2.2.1.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rackup` gem. +# Please instead update this file by running `bin/tapioca gem rackup`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi b/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi similarity index 50% rename from sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi rename to sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi index 0bcdcb7e9..6fa5a76fd 100644 --- a/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +++ b/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi @@ -4,117 +4,51 @@ # This is an autogenerated file for types exported from the `rails-dom-testing` gem. # Please instead update this file by running `bin/tapioca gem rails-dom-testing`. -# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#3 -module Rails - class << self - # source://railties/7.0.8.7/lib/rails.rb#38 - def app_class; end - - # source://railties/7.0.8.7/lib/rails.rb#38 - def app_class=(_arg0); end - - # source://railties/7.0.8.7/lib/rails.rb#39 - def application; end - - # source://railties/7.0.8.7/lib/rails.rb#37 - def application=(_arg0); end - - # source://railties/7.0.8.7/lib/rails.rb#123 - def autoloaders; end - - # source://railties/7.0.8.7/lib/rails.rb#50 - def backtrace_cleaner; end - - # source://railties/7.0.8.7/lib/rails.rb#38 - def cache; end - - # source://railties/7.0.8.7/lib/rails.rb#38 - def cache=(_arg0); end - - # source://railties/7.0.8.7/lib/rails.rb#46 - def configuration; end - - # source://railties/7.0.8.7/lib/rails.rb#72 - def env; end - - # source://railties/7.0.8.7/lib/rails.rb#79 - def env=(environment); end - - # source://railties/7.0.8.7/lib/rails.rb#90 - def error; end - - # source://railties/7.0.8.7/lib/rails/gem_version.rb#5 - def gem_version; end - - # source://railties/7.0.8.7/lib/rails.rb#103 - def groups(*groups); end - # source://railties/7.0.8.7/lib/rails.rb#43 - def initialize!(*_arg0, **_arg1, &_arg2); end +# pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:3 +module Rails; end - # source://railties/7.0.8.7/lib/rails.rb#43 - def initialized?(*_arg0, **_arg1, &_arg2); end - - # source://railties/7.0.8.7/lib/rails.rb#38 - def logger; end - - # source://railties/7.0.8.7/lib/rails.rb#38 - def logger=(_arg0); end - - # source://railties/7.0.8.7/lib/rails.rb#119 - def public_path; end - - # source://railties/7.0.8.7/lib/rails.rb#63 - def root; end - - # source://railties/7.0.8.7/lib/rails/version.rb#7 - def version; end - end -end - -# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#4 +# pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:4 module Rails::Dom; end -# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#5 +# pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:5 module Rails::Dom::Testing - # source://rails-dom-testing//lib/rails/dom/testing.rb#12 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing.rb:12 def default_html_version; end - # source://rails-dom-testing//lib/rails/dom/testing.rb#12 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing.rb:12 def default_html_version=(val); end class << self - # source://rails-dom-testing//lib/rails/dom/testing.rb#12 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing.rb:12 def default_html_version; end - # source://rails-dom-testing//lib/rails/dom/testing.rb#12 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing.rb:12 def default_html_version=(val); end - # @return [Boolean] - # - # source://rails-dom-testing//lib/rails/dom/testing.rb#15 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing.rb:15 def html5_support?; end - # source://rails-dom-testing//lib/rails/dom/testing.rb#19 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing.rb:19 def html_document(html_version: T.unsafe(nil)); end - # source://rails-dom-testing//lib/rails/dom/testing.rb#26 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing.rb:26 def html_document_fragment(html_version: T.unsafe(nil)); end private - # source://rails-dom-testing//lib/rails/dom/testing.rb#34 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing.rb:34 def choose_html_parser(parser_classes, html_version: T.unsafe(nil)); end end end -# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#6 +# pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:6 module Rails::Dom::Testing::Assertions include ::Rails::Dom::Testing::Assertions::DomAssertions include ::Rails::Dom::Testing::Assertions::SelectorAssertions end -# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#7 +# pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:7 module Rails::Dom::Testing::Assertions::DomAssertions # \Test two HTML strings for equivalency (e.g., equal even when attributes are in another order) # @@ -143,7 +77,7 @@ module Rails::Dom::Testing::Assertions::DomAssertions # # assert_dom_equal expected, actual, html_version: :html5 # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#35 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:35 def assert_dom_equal(expected, actual, message = T.unsafe(nil), strict: T.unsafe(nil), html_version: T.unsafe(nil)); end # The negated form of +assert_dom_equal+. @@ -173,40 +107,35 @@ module Rails::Dom::Testing::Assertions::DomAssertions # # assert_dom_not_equal expected, actual, html_version: :html5 # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#68 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:68 def assert_dom_not_equal(expected, actual, message = T.unsafe(nil), strict: T.unsafe(nil), html_version: T.unsafe(nil)); end + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:73 + def refute_dom_equal(expected, actual, message = T.unsafe(nil), strict: T.unsafe(nil), html_version: T.unsafe(nil)); end + protected - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#75 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:76 def compare_doms(expected, actual, strict); end - # @return [Boolean] - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#128 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:129 def equal_attribute?(attr, other_attr); end - # @return [Boolean] - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#115 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:116 def equal_attribute_nodes?(nodes, other_nodes); end - # @return [Boolean] - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#107 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:108 def equal_child?(child, other_child, strict); end - # @return [Boolean] - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#95 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:96 def equal_children?(child, other_child, strict); end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#87 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:88 def extract_children(node, strict); end private - # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#133 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/dom_assertions.rb:134 def fragment(text, html_version: T.unsafe(nil)); end end @@ -223,7 +152,7 @@ end # * +assert_dom_encoded+ - Assertions on HTML encoded inside XML, for example for dealing with feed item descriptions. # * +assert_dom_email+ - Assertions on the HTML body of an e-mail. # -# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#7 +# pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb:7 module Rails::Dom::Testing::Assertions::SelectorAssertions # An assertion that selects elements and makes one or more equality tests. # @@ -323,7 +252,7 @@ module Rails::Dom::Testing::Assertions::SelectorAssertions # assert_dom ":match('name', ?)", /.+/ # Not empty # end # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#163 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:163 def assert_dom(*args, &block); end # Extracts the body of an email and runs nested assertions on it. @@ -357,7 +286,7 @@ module Rails::Dom::Testing::Assertions::SelectorAssertions # assert_dom "h1", "Email alert" # end # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#285 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:318 def assert_dom_email(html_version: T.unsafe(nil), &block); end # Extracts the content of an element, treats it as encoded HTML and runs @@ -410,195 +339,35 @@ module Rails::Dom::Testing::Assertions::SelectorAssertions # end # end # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#232 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:265 def assert_dom_encoded(element = T.unsafe(nil), html_version: T.unsafe(nil), &block); end - # An assertion that selects elements and makes one or more equality tests. - # - # If the first argument is an element, selects all matching elements - # starting from (and including) that element and all its children in - # depth-first order. - # - # If no element is specified +assert_dom+ selects from - # the element returned in +document_root_element+ - # unless +assert_dom+ is called from within an +assert_dom+ block. - # Override +document_root_element+ to tell +assert_dom+ what to select from. - # The default implementation raises an exception explaining this. - # - # When called with a block +assert_dom+ passes an array of selected elements - # to the block. Calling +assert_dom+ from the block, with no element specified, - # runs the assertion on the complete set of elements selected by the enclosing assertion. - # Alternatively the array may be iterated through so that +assert_dom+ can be called - # separately for each element. - # - # - # ==== Example - # If the response contains two ordered lists, each with four list elements then: - # assert_dom "ol" do |elements| - # elements.each do |element| - # assert_dom element, "li", 4 - # end - # end - # - # will pass, as will: - # assert_dom "ol" do - # assert_dom "li", 8 - # end - # - # The selector may be a CSS selector expression (String, Symbol, or Numeric) or an expression - # with substitution values (Array). - # Substitution uses a custom pseudo class match. Pass in whatever attribute you want to match (enclosed in quotes) and a ? for the substitution. - # assert_dom returns nil if called with an invalid css selector. - # - # assert_dom "div:match('id', ?)", "id_string" - # assert_dom "div:match('id', ?)", :id_string - # assert_dom "div:match('id', ?)", 1 - # assert_dom "div:match('id', ?)", /\d+/ + # The negated form of +assert_dom+. # # === Equality Tests # - # The equality test may be one of the following: - # * true - Assertion is true if at least one element selected. - # * false - Assertion is true if no element selected. - # * String/Regexp - Assertion is true if the text value of at least - # one element matches the string or regular expression. - # * Integer - Assertion is true if exactly that number of - # elements are selected. - # * Range - Assertion is true if the number of selected - # elements fit the range. - # If no equality test specified, the assertion is true if at least one - # element selected. - # - # To perform more than one equality tests, use a hash with the following keys: - # * :text - Narrow the selection to elements that have this text - # value (string or regexp). - # * :html - Narrow the selection to elements that have this HTML - # content (string or regexp). - # * :count - Assertion is true if the number of selected elements - # is equal to this value. - # * :minimum - Assertion is true if the number of selected - # elements is at least this value. - # * :maximum - Assertion is true if the number of selected - # elements is at most this value. - # - # If the method is called with a block, once all equality tests are - # evaluated the block is called with an array of all matched elements. + # Supports the same equality tests as +assert_dom+ except for: + # * true + # * false + # * Integer + # * Range + # * :count + # * :minimum + # * :maximum # - # # At least one form element - # assert_dom "form" - # - # # Form element includes four input fields - # assert_dom "form input", 4 - # - # # Page title is "Welcome" - # assert_dom "title", "Welcome" - # - # # Page title is "Welcome" and there is only one title element - # assert_dom "title", {count: 1, text: "Welcome"}, - # "Wrong title or more than one title element" - # - # # Page contains no forms - # assert_dom "form", false, "This page must contain no forms" - # - # # Test the content and style - # assert_dom "body div.header ul.menu" - # - # # Use substitution values - # assert_dom "ol>li:match('id', ?)", /item-\d+/ - # - # # All input fields in the form have a name - # assert_dom "form input" do - # assert_dom ":match('name', ?)", /.+/ # Not empty - # end - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#163 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:183 + def assert_not_dom(*args, &block); end + + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:190 + def assert_not_select(*args, &block); end + + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:169 def assert_select(*args, &block); end - # Extracts the body of an email and runs nested assertions on it. - # - # You must enable deliveries for this assertion to work, use: - # ActionMailer::Base.perform_deliveries = true - # - # Example usage: - # - # assert_dom_email do - # assert_dom "h1", "Email alert" - # end - # - # assert_dom_email do - # items = assert_dom "ol>li" - # items.each do - # # Work with items here... - # end - # end - # - # The DOM is created using an HTML parser specified by - # Rails::Dom::Testing.default_html_version (either :html4 or :html5). - # - # When testing in a Rails application, the parser default can also be set by setting - # +Rails.application.config.dom_testing_default_html_version+. - # - # If you want to specify the HTML parser just for a particular assertion, pass - # html_version: :html4 or html_version: :html5 keyword arguments: - # - # assert_dom_email(html_version: :html5) do - # assert_dom "h1", "Email alert" - # end - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#285 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:331 def assert_select_email(html_version: T.unsafe(nil), &block); end - # Extracts the content of an element, treats it as encoded HTML and runs - # nested assertion on it. - # - # You typically call this method within another assertion to operate on - # all currently selected elements. You can also pass an element or array - # of elements. - # - # The content of each element is un-encoded, and wrapped in the root - # element +encoded+. It then calls the block with all un-encoded elements. - # - # # Selects all bold tags from within the title of an Atom feed's entries (perhaps to nab a section name prefix) - # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do - # # Select each entry item and then the title item - # assert_dom "entry>title" do - # # Run assertions on the encoded title elements - # assert_dom_encoded do - # assert_dom "b" - # end - # end - # end - # - # - # # Selects all paragraph tags from within the description of an RSS feed - # assert_dom "rss[version=2.0]" do - # # Select description element of each feed item. - # assert_dom "channel>item>description" do - # # Run assertions on the encoded elements. - # assert_dom_encoded do - # assert_dom "p" - # end - # end - # end - # - # The DOM is created using an HTML parser specified by - # Rails::Dom::Testing.default_html_version (either :html4 or :html5). - # - # When testing in a Rails application, the parser default can also be set by setting - # +Rails.application.config.dom_testing_default_html_version+. - # - # If you want to specify the HTML parser just for a particular assertion, pass - # html_version: :html4 or html_version: :html5 keyword arguments: - # - # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do - # assert_dom "entry>title" do - # assert_dom_encoded(html_version: :html5) do - # assert_dom "b" - # end - # end - # end - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#232 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:285 def assert_select_encoded(element = T.unsafe(nil), html_version: T.unsafe(nil), &block); end # Select and return all matching elements. @@ -638,117 +407,111 @@ module Rails::Dom::Testing::Assertions::SelectorAssertions # ... # end # - # @raise [ArgumentError] - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#58 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:58 def css_select(*args); end + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:189 + def refute_dom(*args, &block); end + + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:191 + def refute_select(*args, &block); end + private # +equals+ must contain :minimum, :maximum and :count keys # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#307 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:340 def assert_size_match!(size, equals, css_selector, message = T.unsafe(nil)); end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#319 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:352 def count_description(min, max, count); end - # @raise [NotImplementedError] - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#301 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:334 def document_root_element; end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#335 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:193 + def dom_assertions(selector, &block); end + + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:368 def nest_selection(selection); end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#344 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:377 def nodeset(node); end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#331 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions.rb:364 def pluralize_element(quantity); end end -# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#12 +# pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:12 class Rails::Dom::Testing::Assertions::SelectorAssertions::HTMLSelector include ::Minitest::Assertions - # @return [HTMLSelector] a new instance of HTMLSelector - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#17 - def initialize(values, previous_selection = T.unsafe(nil), &root_fallback); end + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:17 + def initialize(values, previous_selection = T.unsafe(nil), refute: T.unsafe(nil), &root_fallback); end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#46 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:46 def context; end - # Returns the value of attribute css_selector. - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:13 def css_selector; end - # Returns the value of attribute message. - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:13 def message; end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#39 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:39 def select; end - # @return [Boolean] - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#33 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:33 def selecting_no_body?; end - # Returns the value of attribute tests. - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:13 def tests; end private - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#100 - def extract_equality_tests; end + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:146 + def collapse_html_whitespace!(text); end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#72 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:102 + def extract_equality_tests(refute); end + + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:74 def extract_root(previous_selection, root_fallback); end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#89 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:91 def extract_selectors; end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#48 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:48 def filter(matches); end class << self - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#46 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:46 def context; end end end -# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#44 +# pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb:44 Rails::Dom::Testing::Assertions::SelectorAssertions::HTMLSelector::NO_STRIP = T.let(T.unsafe(nil), Array) -# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#8 +# pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb:8 class Rails::Dom::Testing::Assertions::SelectorAssertions::SubstitutionContext - # @return [SubstitutionContext] a new instance of SubstitutionContext - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#9 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb:9 def initialize; end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#20 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb:20 def match(matches, attribute, matcher); end - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#13 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb:13 def substitute!(selector, values, format_for_presentation = T.unsafe(nil)); end private - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#25 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb:25 def matcher_for(value, format_for_presentation); end - # @return [Boolean] - # - # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#36 + # pkg:gem/rails-dom-testing#lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb:36 def substitutable?(value); end end -# source://rails-dom-testing//lib/rails/dom/testing/railtie.rb#6 +# pkg:gem/rails-dom-testing#lib/rails/dom/testing/railtie.rb:6 class Rails::Dom::Testing::Railtie < ::Rails::Railtie; end diff --git a/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi b/sorbet/rbi/gems/rails-html-sanitizer@1.7.0.rbi similarity index 55% rename from sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi rename to sorbet/rbi/gems/rails-html-sanitizer@1.7.0.rbi index be6352755..0d719d5ff 100644 --- a/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +++ b/sorbet/rbi/gems/rails-html-sanitizer@1.7.0.rbi @@ -4,21 +4,11 @@ # This is an autogenerated file for types exported from the `rails-html-sanitizer` gem. # Please instead update this file by running `bin/tapioca gem rails-html-sanitizer`. -# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#14 -module ActionView - class << self - # source://actionview/7.0.8.7/lib/action_view.rb#90 - def eager_load!; end - - # source://actionview/7.0.8.7/lib/action_view/gem_version.rb#5 - def gem_version; end - # source://actionview/7.0.8.7/lib/action_view/version.rb#7 - def version; end - end -end +# pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:14 +module ActionView; end -# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#15 +# pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:15 module ActionView::Helpers include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::TextHelper @@ -31,197 +21,88 @@ module ActionView::Helpers mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods - - class << self - # source://actionview/7.0.8.7/lib/action_view/helpers.rb#34 - def eager_load!; end - end end -# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#16 +# pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:16 module ActionView::Helpers::SanitizeHelper mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods - - # source://actionview/7.0.8.7/lib/action_view/helpers/sanitize_helper.rb#81 - def sanitize(html, options = T.unsafe(nil)); end - - # source://actionview/7.0.8.7/lib/action_view/helpers/sanitize_helper.rb#86 - def sanitize_css(style); end - - # source://actionview/7.0.8.7/lib/action_view/helpers/sanitize_helper.rb#120 - def strip_links(html); end - - # source://actionview/7.0.8.7/lib/action_view/helpers/sanitize_helper.rb#103 - def strip_tags(html); end end -# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#17 +# pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:17 module ActionView::Helpers::SanitizeHelper::ClassMethods - # source://actionview/7.0.8.7/lib/action_view/helpers/sanitize_helper.rb#145 - def full_sanitizer; end - - # source://actionview/7.0.8.7/lib/action_view/helpers/sanitize_helper.rb#125 - def full_sanitizer=(_arg0); end - - # source://actionview/7.0.8.7/lib/action_view/helpers/sanitize_helper.rb#155 - def link_sanitizer; end - - # source://actionview/7.0.8.7/lib/action_view/helpers/sanitize_helper.rb#125 - def link_sanitizer=(_arg0); end - - # source://actionview/7.0.8.7/lib/action_view/helpers/sanitize_helper.rb#165 - def safe_list_sanitizer; end - - # source://actionview/7.0.8.7/lib/action_view/helpers/sanitize_helper.rb#125 - def safe_list_sanitizer=(_arg0); end - - # source://actionview/7.0.8.7/lib/action_view/helpers/sanitize_helper.rb#135 - def sanitized_allowed_attributes; end - # Replaces the allowed HTML attributes for the +sanitize+ helper. # # class Application < Rails::Application # config.action_view.sanitized_allowed_attributes = ['onclick', 'longdesc'] # end # - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#34 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:34 def sanitized_allowed_attributes=(attributes); end - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:47 def sanitized_allowed_css_keywords; end - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:48 def sanitized_allowed_css_keywords=(_); end - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:47 def sanitized_allowed_css_properties; end - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:48 def sanitized_allowed_css_properties=(_); end - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:47 def sanitized_allowed_protocols; end - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:48 def sanitized_allowed_protocols=(_); end - # source://actionview/7.0.8.7/lib/action_view/helpers/sanitize_helper.rb#131 - def sanitized_allowed_tags; end - # Replaces the allowed tags for the +sanitize+ helper. # # class Application < Rails::Application # config.action_view.sanitized_allowed_tags = 'table', 'tr', 'td' # end # - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#24 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:24 def sanitized_allowed_tags=(tags); end - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:47 def sanitized_bad_tags; end - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:48 def sanitized_bad_tags=(_); end - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:47 def sanitized_protocol_separator; end - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:48 def sanitized_protocol_separator=(_); end - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:47 def sanitized_shorthand_css_properties; end - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:48 def sanitized_shorthand_css_properties=(_); end - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:47 def sanitized_uri_attributes; end - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:48 def sanitized_uri_attributes=(_); end - # source://actionview/7.0.8.7/lib/action_view/helpers/sanitize_helper.rb#127 - def sanitizer_vendor; end - private - # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#52 + # pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:52 def deprecate_option(name); end end -# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#3 -module Rails - class << self - # source://railties/7.0.8.7/lib/rails.rb#38 - def app_class; end - - # source://railties/7.0.8.7/lib/rails.rb#38 - def app_class=(_arg0); end - - # source://railties/7.0.8.7/lib/rails.rb#39 - def application; end - - # source://railties/7.0.8.7/lib/rails.rb#37 - def application=(_arg0); end - - # source://railties/7.0.8.7/lib/rails.rb#123 - def autoloaders; end - - # source://railties/7.0.8.7/lib/rails.rb#50 - def backtrace_cleaner; end +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer/version.rb:3 +module Rails; end - # source://railties/7.0.8.7/lib/rails.rb#38 - def cache; end - - # source://railties/7.0.8.7/lib/rails.rb#38 - def cache=(_arg0); end - - # source://railties/7.0.8.7/lib/rails.rb#46 - def configuration; end - - # source://railties/7.0.8.7/lib/rails.rb#72 - def env; end - - # source://railties/7.0.8.7/lib/rails.rb#79 - def env=(environment); end - - # source://railties/7.0.8.7/lib/rails.rb#90 - def error; end - - # source://railties/7.0.8.7/lib/rails/gem_version.rb#5 - def gem_version; end - - # source://railties/7.0.8.7/lib/rails.rb#103 - def groups(*groups); end - - # source://railties/7.0.8.7/lib/rails.rb#43 - def initialize!(*_arg0, **_arg1, &_arg2); end - - # source://railties/7.0.8.7/lib/rails.rb#43 - def initialized?(*_arg0, **_arg1, &_arg2); end - - # source://railties/7.0.8.7/lib/rails.rb#38 - def logger; end - - # source://railties/7.0.8.7/lib/rails.rb#38 - def logger=(_arg0); end - - # source://railties/7.0.8.7/lib/rails.rb#119 - def public_path; end - - # source://railties/7.0.8.7/lib/rails.rb#63 - def root; end - - # source://railties/7.0.8.7/lib/rails/version.rb#7 - def version; end - end -end - -# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#4 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer/version.rb:4 module Rails::HTML; end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#194 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:198 module Rails::HTML4; end # == Rails::HTML4::FullSanitizer @@ -232,7 +113,7 @@ module Rails::HTML4; end # full_sanitizer.sanitize("Bold no more! See more here...") # # => "Bold no more! See more here..." # -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#225 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:229 class Rails::HTML4::FullSanitizer < ::Rails::HTML::Sanitizer include ::Rails::HTML::Concern::ComposedSanitize include ::Rails::HTML::Concern::Parser::HTML4 @@ -248,7 +129,7 @@ end # link_sanitizer.sanitize('Only the link text will be kept.') # # => "Only the link text will be kept." # -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#240 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:244 class Rails::HTML4::LinkSanitizer < ::Rails::HTML::Sanitizer include ::Rails::HTML::Concern::ComposedSanitize include ::Rails::HTML::Concern::Parser::HTML4 @@ -307,7 +188,7 @@ end # # the sanitizer can also sanitize CSS # safe_list_sanitizer.sanitize_css('background-color: #000;') # -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#298 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:302 class Rails::HTML4::SafeListSanitizer < ::Rails::HTML::Sanitizer include ::Rails::HTML::Concern::ComposedSanitize include ::Rails::HTML::Concern::Parser::HTML4 @@ -315,41 +196,41 @@ class Rails::HTML4::SafeListSanitizer < ::Rails::HTML::Sanitizer include ::Rails::HTML::Concern::Serializer::UTF8Encode class << self - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#145 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:149 def allowed_attributes; end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#145 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:149 def allowed_attributes=(_arg0); end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#144 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:148 def allowed_tags; end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#144 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:148 def allowed_tags=(_arg0); end end end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#195 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:199 module Rails::HTML4::Sanitizer extend ::Rails::HTML4::Sanitizer::VendorMethods end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#196 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:200 module Rails::HTML4::Sanitizer::VendorMethods - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#197 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:201 def full_sanitizer; end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#201 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:205 def link_sanitizer; end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#205 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:209 def safe_list_sanitizer; end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#209 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:213 def white_list_sanitizer; end end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#306 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:310 module Rails::HTML5; end # == Rails::HTML5::FullSanitizer @@ -360,7 +241,7 @@ module Rails::HTML5; end # full_sanitizer.sanitize("Bold no more! See more here...") # # => "Bold no more! See more here..." # -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#335 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:339 class Rails::HTML5::FullSanitizer < ::Rails::HTML::Sanitizer include ::Rails::HTML::Concern::ComposedSanitize include ::Rails::HTML::Concern::Parser::HTML5 @@ -376,7 +257,7 @@ end # link_sanitizer.sanitize('Only the link text will be kept.') # # => "Only the link text will be kept." # -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#350 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:354 class Rails::HTML5::LinkSanitizer < ::Rails::HTML::Sanitizer include ::Rails::HTML::Concern::ComposedSanitize include ::Rails::HTML::Concern::Parser::HTML5 @@ -435,7 +316,7 @@ end # # the sanitizer can also sanitize CSS # safe_list_sanitizer.sanitize_css('background-color: #000;') # -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#408 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:412 class Rails::HTML5::SafeListSanitizer < ::Rails::HTML::Sanitizer include ::Rails::HTML::Concern::ComposedSanitize include ::Rails::HTML::Concern::Parser::HTML5 @@ -443,129 +324,127 @@ class Rails::HTML5::SafeListSanitizer < ::Rails::HTML::Sanitizer include ::Rails::HTML::Concern::Serializer::UTF8Encode class << self - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#145 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:149 def allowed_attributes; end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#145 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:149 def allowed_attributes=(_arg0); end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#144 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:148 def allowed_tags; end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#144 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:148 def allowed_tags=(_arg0); end end end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#307 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:311 class Rails::HTML5::Sanitizer class << self - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#309 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:313 def full_sanitizer; end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#313 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:317 def link_sanitizer; end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#317 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:321 def safe_list_sanitizer; end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#321 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:325 def white_list_sanitizer; end end end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#33 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:37 module Rails::HTML::Concern; end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#34 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:38 module Rails::HTML::Concern::ComposedSanitize - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#35 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:39 def sanitize(html, options = T.unsafe(nil)); end end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#43 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:47 module Rails::HTML::Concern::Parser; end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#44 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:48 module Rails::HTML::Concern::Parser::HTML4 - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#45 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:49 def parse_fragment(html); end end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#50 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:54 module Rails::HTML::Concern::Parser::HTML5 - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#51 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:55 def parse_fragment(html); end end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#57 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:61 module Rails::HTML::Concern::Scrubber; end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#58 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:62 module Rails::HTML::Concern::Scrubber::Full - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#59 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:63 def scrub(fragment, options = T.unsafe(nil)); end end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#64 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:68 module Rails::HTML::Concern::Scrubber::Link - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#65 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:69 def initialize; end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#72 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:76 def scrub(fragment, options = T.unsafe(nil)); end end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#77 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:81 module Rails::HTML::Concern::Scrubber::SafeList - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#152 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:156 def initialize(prune: T.unsafe(nil)); end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#169 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:173 def sanitize_css(style_string); end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#156 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:160 def scrub(fragment, options = T.unsafe(nil)); end private - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#178 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:182 def allowed_attributes(options); end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#174 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:178 def allowed_tags(options); end class << self - # @private - # - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#142 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:146 def included(klass); end end end # The default safe list for attributes # -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#126 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:130 Rails::HTML::Concern::Scrubber::SafeList::DEFAULT_ALLOWED_ATTRIBUTES = T.let(T.unsafe(nil), Set) # The default safe list for tags # -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#79 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:83 Rails::HTML::Concern::Scrubber::SafeList::DEFAULT_ALLOWED_TAGS = T.let(T.unsafe(nil), Set) -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#184 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:188 module Rails::HTML::Concern::Serializer; end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#185 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:189 module Rails::HTML::Concern::Serializer::UTF8Encode - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#186 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:190 def serialize(fragment); end end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#418 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:422 Rails::HTML::FullSanitizer = Rails::HTML4::FullSanitizer -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#419 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:423 Rails::HTML::LinkSanitizer = Rails::HTML4::LinkSanitizer # === Rails::HTML::PermitScrubber @@ -613,107 +492,90 @@ Rails::HTML::LinkSanitizer = Rails::HTML4::LinkSanitizer # See the documentation for +Nokogiri::XML::Node+ to understand what's possible # with nodes: https://nokogiri.org/rdoc/Nokogiri/XML/Node.html # -# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#49 +# pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:49 class Rails::HTML::PermitScrubber < ::Loofah::Scrubber - # @return [PermitScrubber] a new instance of PermitScrubber - # - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#52 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:52 def initialize(prune: T.unsafe(nil)); end - # Returns the value of attribute attributes. - # - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#50 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:50 def attributes; end - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#62 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:62 def attributes=(attributes); end - # Returns the value of attribute prune. - # - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#50 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:50 def prune; end - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#66 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:66 def scrub(node); end - # Returns the value of attribute tags. - # - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#50 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:50 def tags; end - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#58 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:58 def tags=(tags); end protected - # @return [Boolean] - # - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#83 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:83 def allowed_node?(node); end - # @return [Boolean] - # - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#95 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:95 def keep_node?(node); end - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#162 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:162 def scrub_attribute(node, attr_node); end - # @return [Boolean] - # - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#91 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:91 def scrub_attribute?(name); end - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#112 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:112 def scrub_attributes(node); end - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#128 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:128 def scrub_css_attribute(node); end - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#103 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:103 def scrub_node(node); end - # @return [Boolean] - # - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#87 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:87 def skip_node?(node); end - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#137 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:137 def validate!(var, name); end end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#420 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:424 Rails::HTML::SafeListSanitizer = Rails::HTML4::SafeListSanitizer -# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#5 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer/version.rb:5 class Rails::HTML::Sanitizer extend ::Rails::HTML4::Sanitizer::VendorMethods - # @raise [NotImplementedError] - # - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#18 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:22 def sanitize(html, options = T.unsafe(nil)); end private - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#28 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:32 def properly_encode(fragment, options); end - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#23 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:27 def remove_xpaths(node, xpaths); end class << self - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#13 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:17 + def allowed_uri?(uri_string); end + + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:13 def best_supported_vendor; end - # @return [Boolean] - # - # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#7 + # pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:7 def html5_support?; end end end -# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#6 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer/version.rb:6 Rails::HTML::Sanitizer::VERSION = T.let(T.unsafe(nil), String) # === Rails::HTML::TargetScrubber @@ -727,16 +589,12 @@ Rails::HTML::Sanitizer::VERSION = T.let(T.unsafe(nil), String) # +attributes=+ # If set, attributes included will be removed. # -# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#195 +# pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:195 class Rails::HTML::TargetScrubber < ::Rails::HTML::PermitScrubber - # @return [Boolean] - # - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#196 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:196 def allowed_node?(node); end - # @return [Boolean] - # - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#200 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:200 def scrub_attribute?(name); end end @@ -746,19 +604,17 @@ end # # Unallowed elements will be stripped, i.e. element is removed but its subtree kept. # -# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#210 +# pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:210 class Rails::HTML::TextOnlyScrubber < ::Loofah::Scrubber - # @return [TextOnlyScrubber] a new instance of TextOnlyScrubber - # - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#211 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:211 def initialize; end - # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#215 + # pkg:gem/rails-html-sanitizer#lib/rails/html/scrubbers.rb:215 def scrub(node); end end -# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#421 +# pkg:gem/rails-html-sanitizer#lib/rails/html/sanitizer.rb:425 Rails::HTML::WhiteListSanitizer = Rails::HTML4::SafeListSanitizer -# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#11 +# pkg:gem/rails-html-sanitizer#lib/rails-html-sanitizer.rb:11 Rails::Html = Rails::HTML diff --git a/sorbet/rbi/gems/railties@7.0.8.7.rbi b/sorbet/rbi/gems/railties@7.0.8.7.rbi deleted file mode 100644 index 2b7a2bf0b..000000000 --- a/sorbet/rbi/gems/railties@7.0.8.7.rbi +++ /dev/null @@ -1,3517 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `railties` gem. -# Please instead update this file by running `bin/tapioca gem railties`. - -# source://railties//lib/rails/initializable.rb#5 -module Rails - extend ::ActiveSupport::Autoload - extend ::ActiveSupport::Benchmarkable - - class << self - # Returns the value of attribute app_class. - # - # source://railties//lib/rails.rb#38 - def app_class; end - - # Sets the attribute app_class - # - # @param value the value to set the attribute app_class to. - # - # source://railties//lib/rails.rb#38 - def app_class=(_arg0); end - - # source://railties//lib/rails.rb#39 - def application; end - - # Sets the attribute application - # - # @param value the value to set the attribute application to. - # - # source://railties//lib/rails.rb#37 - def application=(_arg0); end - - # source://railties//lib/rails.rb#123 - def autoloaders; end - - # source://railties//lib/rails.rb#50 - def backtrace_cleaner; end - - # Returns the value of attribute cache. - # - # source://railties//lib/rails.rb#38 - def cache; end - - # Sets the attribute cache - # - # @param value the value to set the attribute cache to. - # - # source://railties//lib/rails.rb#38 - def cache=(_arg0); end - - # The Configuration instance used to configure the Rails environment - # - # source://railties//lib/rails.rb#46 - def configuration; end - - # Returns the current Rails environment. - # - # Rails.env # => "development" - # Rails.env.development? # => true - # Rails.env.production? # => false - # - # source://railties//lib/rails.rb#72 - def env; end - - # Sets the Rails environment. - # - # Rails.env = "staging" # => "staging" - # - # source://railties//lib/rails.rb#79 - def env=(environment); end - - # Returns the ActiveSupport::ErrorReporter of the current Rails project, - # otherwise it returns +nil+ if there is no project. - # - # Rails.error.handle(IOError) do - # # ... - # end - # Rails.error.report(error) - # - # source://railties//lib/rails.rb#90 - def error; end - - # Returns the currently loaded version of Rails as a Gem::Version. - # - # source://railties//lib/rails/gem_version.rb#5 - def gem_version; end - - # Returns all Rails groups for loading based on: - # - # * The Rails environment; - # * The environment variable RAILS_GROUPS; - # * The optional envs given as argument and the hash with group dependencies; - # - # Rails.groups assets: [:development, :test] - # # => [:default, "development", :assets] for Rails.env == "development" - # # => [:default, "production"] for Rails.env == "production" - # - # source://railties//lib/rails.rb#103 - def groups(*groups); end - - # source://railties//lib/rails.rb#43 - def initialize!(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails.rb#43 - def initialized?(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute logger. - # - # source://railties//lib/rails.rb#38 - def logger; end - - # Sets the attribute logger - # - # @param value the value to set the attribute logger to. - # - # source://railties//lib/rails.rb#38 - def logger=(_arg0); end - - # Returns a Pathname object of the public folder of the current - # Rails project, otherwise it returns +nil+ if there is no project: - # - # Rails.public_path - # # => # - # - # source://railties//lib/rails.rb#119 - def public_path; end - - # Returns a Pathname object of the current Rails project, - # otherwise it returns +nil+ if there is no project: - # - # Rails.root - # # => # - # - # source://railties//lib/rails.rb#63 - def root; end - - # Returns the currently loaded version of Rails as a string. - # - # source://railties//lib/rails/version.rb#7 - def version; end - end -end - -# An Engine with the responsibility of coordinating the whole boot process. -# -# == Initialization -# -# Rails::Application is responsible for executing all railties and engines -# initializers. It also executes some bootstrap initializers (check -# Rails::Application::Bootstrap) and finishing initializers, after all the others -# are executed (check Rails::Application::Finisher). -# -# == \Configuration -# -# Besides providing the same configuration as Rails::Engine and Rails::Railtie, -# the application object has several specific configurations, for example -# +cache_classes+, +consider_all_requests_local+, +filter_parameters+, -# +logger+, and so forth. -# -# Check Rails::Application::Configuration to see them all. -# -# == Routes -# -# The application object is also responsible for holding the routes and reloading routes -# whenever the files change in development. -# -# == Middlewares -# -# The Application is also responsible for building the middleware stack. -# -# == Booting process -# -# The application is also responsible for setting up and executing the booting -# process. From the moment you require config/application.rb in your app, -# the booting process goes like this: -# -# 1. require "config/boot.rb" to set up load paths. -# 2. +require+ railties and engines. -# 3. Define +Rails.application+ as class MyApp::Application < Rails::Application. -# 4. Run +config.before_configuration+ callbacks. -# 5. Load config/environments/ENV.rb. -# 6. Run +config.before_initialize+ callbacks. -# 7. Run Railtie#initializer defined by railties, engines, and application. -# One by one, each engine sets up its load paths and routes, and runs its config/initializers/* files. -# 8. Custom Railtie#initializers added by railties, engines, and applications are executed. -# 9. Build the middleware stack and run +to_prepare+ callbacks. -# 10. Run +config.before_eager_load+ and +eager_load!+ if +eager_load+ is +true+. -# 11. Run +config.after_initialize+ callbacks. -# -# source://railties//lib/rails/application.rb#61 -class Rails::Application < ::Rails::Engine - # @return [Application] a new instance of Application - # - # source://railties//lib/rails/application.rb#106 - def initialize(initial_variable_values = T.unsafe(nil), &block); end - - # Returns the value of attribute assets. - # - # source://railties//lib/rails/application.rb#97 - def assets; end - - # Sets the attribute assets - # - # @param value the value to set the attribute assets to. - # - # source://railties//lib/rails/application.rb#97 - def assets=(_arg0); end - - # Returns the value of attribute autoloaders. - # - # source://railties//lib/rails/application.rb#99 - def autoloaders; end - - # source://railties//lib/rails/engine.rb#511 - def build_middleware_stack; end - - # source://railties//lib/rails/application.rb#383 - def config; end - - # Sets the attribute config - # - # @param value the value to set the attribute config to. - # - # source://railties//lib/rails/application.rb#387 - def config=(_arg0); end - - # Convenience for loading config/foo.yml for the current Rails env. - # - # Examples: - # - # # config/exception_notification.yml: - # production: - # url: http://127.0.0.1:8080 - # namespace: my_app_production - # - # development: - # url: http://localhost:3001 - # namespace: my_app_development - # - # # config/environments/production.rb - # Rails.application.configure do - # config.middleware.use ExceptionNotifier, config_for(:exception_notification) - # end - # - # # You can also store configurations in a shared section which will be - # # merged with the environment configuration - # - # # config/example.yml - # shared: - # foo: - # bar: - # baz: 1 - # - # development: - # foo: - # bar: - # qux: 2 - # - # # development environment - # Rails.application.config_for(:example)[:foo][:bar] - # # => { baz: 1, qux: 2 } - # - # source://railties//lib/rails/application.rb#221 - def config_for(name, env: T.unsafe(nil)); end - - # Sends any console called in the instance of a new application up - # to the +console+ method defined in Rails::Railtie. - # - # source://railties//lib/rails/application.rb#303 - def console(&blk); end - - # Returns an ActiveSupport::EncryptedConfiguration instance for the - # credentials file specified by +config.credentials.content_path+. - # - # By default, +config.credentials.content_path+ will point to either - # config/credentials/#{environment}.yml.enc for the current - # environment (for example, +config/credentials/production.yml.enc+ for the - # +production+ environment), or +config/credentials.yml.enc+ if that file - # does not exist. - # - # The encryption key is taken from either ENV["RAILS_MASTER_KEY"], - # or from the file specified by +config.credentials.key_path+. By default, - # +config.credentials.key_path+ will point to either - # config/credentials/#{environment}.key for the current - # environment, or +config/master.key+ if that file does not exist. - # - # source://railties//lib/rails/application.rb#439 - def credentials; end - - # Sets the attribute credentials - # - # @param value the value to set the attribute credentials to. - # - # source://railties//lib/rails/application.rb#403 - def credentials=(_arg0); end - - # source://railties//lib/rails/application.rb#101 - def default_url_options(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/application.rb#101 - def default_url_options=(arg); end - - # Eager loads the application code. - # - # source://railties//lib/rails/application.rb#492 - def eager_load!; end - - # Returns an ActiveSupport::EncryptedConfiguration instance for an encrypted - # file. By default, the encryption key is taken from either - # ENV["RAILS_MASTER_KEY"], or from the +config/master.key+ file. - # - # my_config = Rails.application.encrypted("config/my_config.enc") - # - # my_config.read - # # => "foo:\n bar: 123\n" - # - # my_config.foo.bar - # # => 123 - # - # Encrypted files can be edited with the bin/rails encrypted:edit - # command. (See the output of bin/rails encrypted:edit --help for - # more information.) - # - # source://railties//lib/rails/application.rb#458 - def encrypted(path, key_path: T.unsafe(nil), env_key: T.unsafe(nil)); end - - # Stores some of the Rails initial environment parameters which - # will be used by middlewares and engines to configure themselves. - # - # source://railties//lib/rails/application.rb#250 - def env_config; end - - # Returns the value of attribute executor. - # - # source://railties//lib/rails/application.rb#99 - def executor; end - - # Sends any generators called in the instance of a new application up - # to the +generators+ method defined in Rails::Railtie. - # - # source://railties//lib/rails/application.rb#309 - def generators(&blk); end - - # source://railties//lib/rails/application.rb#471 - def helpers_paths; end - - # Initialize the application passing the given group. By default, the - # group is :default - # - # source://railties//lib/rails/application.rb#370 - def initialize!(group = T.unsafe(nil)); end - - # Returns true if the application is initialized. - # - # @return [Boolean] - # - # source://railties//lib/rails/application.rb#129 - def initialized?; end - - # Sends the initializers to the +initializer+ method defined in the - # Rails::Initializable module. Each Rails::Application class has its own - # set of initializers, as defined by the Initializable module. - # - # source://railties//lib/rails/application.rb#291 - def initializer(name, opts = T.unsafe(nil), &block); end - - # source://railties//lib/rails/application.rb#377 - def initializers; end - - # Sends the +isolate_namespace+ method up to the class method. - # - # source://railties//lib/rails/application.rb#320 - def isolate_namespace(mod); end - - # Returns the application's KeyGenerator - # - # source://railties//lib/rails/application.rb#153 - def key_generator; end - - # Returns a message verifier object. - # - # This verifier can be used to generate and verify signed messages in the application. - # - # It is recommended not to use the same verifier for different things, so you can get different - # verifiers passing the +verifier_name+ argument. - # - # ==== Parameters - # - # * +verifier_name+ - the name of the message verifier. - # - # ==== Examples - # - # message = Rails.application.message_verifier('sensitive_data').generate('my sensible data') - # Rails.application.message_verifier('sensitive_data').verify(message) - # # => 'my sensible data' - # - # See the ActiveSupport::MessageVerifier documentation for more information. - # - # source://railties//lib/rails/application.rb#179 - def message_verifier(verifier_name); end - - # Return an array of railties respecting the order they're loaded - # and the order specified by the +railties_order+ config. - # - # While running initializers we need engines in reverse order here when - # copying migrations from railties ; we need them in the order given by - # +railties_order+. - # - # source://railties//lib/rails/application.rb#487 - def migration_railties; end - - # If you try to define a set of Rake tasks on the instance, these will get - # passed up to the Rake tasks defined on the application's class. - # - # source://railties//lib/rails/application.rb#284 - def rake_tasks(&block); end - - # Reload application routes regardless if they changed or not. - # - # source://railties//lib/rails/application.rb#148 - def reload_routes!; end - - # Returns the value of attribute reloader. - # - # source://railties//lib/rails/application.rb#99 - def reloader; end - - # Returns the value of attribute reloaders. - # - # source://railties//lib/rails/application.rb#99 - def reloaders; end - - # source://railties//lib/rails/application.rb#346 - def require_environment!; end - - # source://railties//lib/rails/application.rb#351 - def routes_reloader; end - - # source://railties//lib/rails/application.rb#133 - def run_load_hooks!; end - - # Sends any runner called in the instance of a new application up - # to the +runner+ method defined in Rails::Railtie. - # - # source://railties//lib/rails/application.rb#297 - def runner(&blk); end - - # Returns the value of attribute sandbox. - # - # source://railties//lib/rails/application.rb#97 - def sandbox; end - - # Sets the attribute sandbox - # - # @param value the value to set the attribute sandbox to. - # - # source://railties//lib/rails/application.rb#97 - def sandbox=(_arg0); end - - # Returns the value of attribute sandbox. - # - # source://railties//lib/rails/application.rb#97 - def sandbox?; end - - # The secret_key_base is used as the input secret to the application's key generator, which in turn - # is used to create all ActiveSupport::MessageVerifier and ActiveSupport::MessageEncryptor instances, - # including the ones that sign and encrypt cookies. - # - # In development and test, this is randomly generated and stored in a - # temporary file in tmp/development_secret.txt. - # - # In all other environments, we look for it first in ENV["SECRET_KEY_BASE"], - # then +credentials.secret_key_base+, and finally +secrets.secret_key_base+. For most applications, - # the correct place to store it is in the encrypted credentials file. - # - # source://railties//lib/rails/application.rb#415 - def secret_key_base; end - - # source://railties//lib/rails/application.rb#389 - def secrets; end - - # Sets the attribute secrets - # - # @param value the value to set the attribute secrets to. - # - # source://railties//lib/rails/application.rb#403 - def secrets=(_arg0); end - - # Sends any server called in the instance of a new application up - # to the +server+ method defined in Rails::Railtie. - # - # source://railties//lib/rails/application.rb#315 - def server(&blk); end - - # source://railties//lib/rails/application.rb#467 - def to_app; end - - # Returns an array of file paths appended with a hash of - # directories-extensions suitable for ActiveSupport::FileUpdateChecker - # API. - # - # source://railties//lib/rails/application.rb#358 - def watchable_args; end - - protected - - # source://railties//lib/rails/application.rb#565 - def default_middleware_stack; end - - # Returns the ordered railties for this application considering railties_order. - # - # source://railties//lib/rails/application.rb#531 - def ordered_railties; end - - # source://railties//lib/rails/application.rb#553 - def railties_initializers(current); end - - # source://railties//lib/rails/application.rb#520 - def run_console_blocks(app); end - - # source://railties//lib/rails/application.rb#510 - def run_generators_blocks(app); end - - # source://railties//lib/rails/application.rb#515 - def run_runner_blocks(app); end - - # source://railties//lib/rails/application.rb#525 - def run_server_blocks(app); end - - # source://railties//lib/rails/application.rb#499 - def run_tasks_blocks(app); end - - # source://railties//lib/rails/application.rb#570 - def validate_secret_key_base(secret_key_base); end - - private - - # source://railties//lib/rails/application.rb#604 - def build_middleware; end - - # source://railties//lib/rails/application.rb#597 - def build_request(env); end - - # source://railties//lib/rails/application.rb#608 - def coerce_same_site_protection(protection); end - - # source://railties//lib/rails/application.rb#581 - def generate_development_secret; end - - class << self - # This method is called just after an application inherits from Rails::Application, - # allowing the developer to load classes in lib and use them during application - # configuration. - # - # class MyApplication < Rails::Application - # require "my_backend" # in lib/my_backend - # config.i18n.backend = MyBackend - # end - # - # Notice this method takes into consideration the default root path. So if you - # are changing config.root inside your application definition or having a custom - # Rails application, you will need to add lib to $LOAD_PATH on your own in case - # you need to load files in lib/ during the application configuration as well. - # - # source://railties//lib/rails/application.rb#339 - def add_lib_to_load_path!(root); end - - # source://railties//lib/rails/application.rb#81 - def create(initial_variable_values = T.unsafe(nil), &block); end - - # source://railties//lib/rails/application.rb#85 - def find_root(from); end - - # @private - # - # source://railties//lib/rails/application.rb#70 - def inherited(base); end - - # source://railties//lib/rails/application.rb#77 - def instance; end - - def new(*_arg0); end - end -end - -# source://railties//lib/rails/application/bootstrap.rb#11 -module Rails::Application::Bootstrap - include ::Rails::Initializable - extend ::Rails::Initializable::ClassMethods -end - -# source://railties//lib/rails/application/configuration.rb#12 -class Rails::Application::Configuration < ::Rails::Engine::Configuration - # @return [Configuration] a new instance of Configuration - # - # source://railties//lib/rails/application/configuration.rb#28 - def initialize(*_arg0); end - - # Returns the value of attribute add_autoload_paths_to_load_path. - # - # source://railties//lib/rails/application/configuration.rb#13 - def add_autoload_paths_to_load_path; end - - # Sets the attribute add_autoload_paths_to_load_path - # - # @param value the value to set the attribute add_autoload_paths_to_load_path to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def add_autoload_paths_to_load_path=(_arg0); end - - # Returns the value of attribute allow_concurrency. - # - # source://railties//lib/rails/application/configuration.rb#13 - def allow_concurrency; end - - # Sets the attribute allow_concurrency - # - # @param value the value to set the attribute allow_concurrency to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def allow_concurrency=(_arg0); end - - # source://railties//lib/rails/application/configuration.rb#414 - def annotations; end - - # Returns the value of attribute api_only. - # - # source://railties//lib/rails/application/configuration.rb#26 - def api_only; end - - # source://railties//lib/rails/application/configuration.rb#275 - def api_only=(value); end - - # Returns the value of attribute asset_host. - # - # source://railties//lib/rails/application/configuration.rb#13 - def asset_host; end - - # Sets the attribute asset_host - # - # @param value the value to set the attribute asset_host to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def asset_host=(_arg0); end - - # Returns the value of attribute autoflush_log. - # - # source://railties//lib/rails/application/configuration.rb#13 - def autoflush_log; end - - # Sets the attribute autoflush_log - # - # @param value the value to set the attribute autoflush_log to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def autoflush_log=(_arg0); end - - # Returns the value of attribute beginning_of_week. - # - # source://railties//lib/rails/application/configuration.rb#13 - def beginning_of_week; end - - # Sets the attribute beginning_of_week - # - # @param value the value to set the attribute beginning_of_week to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def beginning_of_week=(_arg0); end - - # Returns the value of attribute cache_classes. - # - # source://railties//lib/rails/application/configuration.rb#13 - def cache_classes; end - - # Sets the attribute cache_classes - # - # @param value the value to set the attribute cache_classes to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def cache_classes=(_arg0); end - - # Returns the value of attribute cache_store. - # - # source://railties//lib/rails/application/configuration.rb#13 - def cache_store; end - - # Sets the attribute cache_store - # - # @param value the value to set the attribute cache_store to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def cache_store=(_arg0); end - - # source://railties//lib/rails/application/configuration.rb#360 - def colorize_logging; end - - # source://railties//lib/rails/application/configuration.rb#364 - def colorize_logging=(val); end - - # Returns the value of attribute consider_all_requests_local. - # - # source://railties//lib/rails/application/configuration.rb#13 - def consider_all_requests_local; end - - # Sets the attribute consider_all_requests_local - # - # @param value the value to set the attribute consider_all_requests_local to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def consider_all_requests_local=(_arg0); end - - # Returns the value of attribute console. - # - # source://railties//lib/rails/application/configuration.rb#13 - def console; end - - # Sets the attribute console - # - # @param value the value to set the attribute console to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def console=(_arg0); end - - # Configures the ActionDispatch::ContentSecurityPolicy. - # - # source://railties//lib/rails/application/configuration.rb#419 - def content_security_policy(&block); end - - # Returns the value of attribute content_security_policy_nonce_directives. - # - # source://railties//lib/rails/application/configuration.rb#13 - def content_security_policy_nonce_directives; end - - # Sets the attribute content_security_policy_nonce_directives - # - # @param value the value to set the attribute content_security_policy_nonce_directives to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def content_security_policy_nonce_directives=(_arg0); end - - # Returns the value of attribute content_security_policy_nonce_generator. - # - # source://railties//lib/rails/application/configuration.rb#13 - def content_security_policy_nonce_generator; end - - # Sets the attribute content_security_policy_nonce_generator - # - # @param value the value to set the attribute content_security_policy_nonce_generator to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def content_security_policy_nonce_generator=(_arg0); end - - # Returns the value of attribute content_security_policy_report_only. - # - # source://railties//lib/rails/application/configuration.rb#13 - def content_security_policy_report_only; end - - # Sets the attribute content_security_policy_report_only - # - # @param value the value to set the attribute content_security_policy_report_only to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def content_security_policy_report_only=(_arg0); end - - # Returns the value of attribute credentials. - # - # source://railties//lib/rails/application/configuration.rb#13 - def credentials; end - - # Sets the attribute credentials - # - # @param value the value to set the attribute credentials to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def credentials=(_arg0); end - - # Loads and returns the entire raw configuration of database from - # values stored in config/database.yml. - # - # source://railties//lib/rails/application/configuration.rb#329 - def database_configuration; end - - # source://railties//lib/rails/application/configuration.rb#282 - def debug_exception_response_format; end - - # Sets the attribute debug_exception_response_format - # - # @param value the value to set the attribute debug_exception_response_format to. - # - # source://railties//lib/rails/application/configuration.rb#286 - def debug_exception_response_format=(_arg0); end - - # source://railties//lib/rails/application/configuration.rb#436 - def default_log_file; end - - # Returns the value of attribute disable_sandbox. - # - # source://railties//lib/rails/application/configuration.rb#13 - def disable_sandbox; end - - # Sets the attribute disable_sandbox - # - # @param value the value to set the attribute disable_sandbox to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def disable_sandbox=(_arg0); end - - # Returns the value of attribute eager_load. - # - # source://railties//lib/rails/application/configuration.rb#13 - def eager_load; end - - # Sets the attribute eager_load - # - # @param value the value to set the attribute eager_load to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def eager_load=(_arg0); end - - # Returns the value of attribute enable_dependency_loading. - # - # source://railties//lib/rails/application/configuration.rb#13 - def enable_dependency_loading; end - - # Sets the attribute enable_dependency_loading - # - # @param value the value to set the attribute enable_dependency_loading to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def enable_dependency_loading=(_arg0); end - - # Returns the value of attribute encoding. - # - # source://railties//lib/rails/application/configuration.rb#26 - def encoding; end - - # source://railties//lib/rails/application/configuration.rb#267 - def encoding=(value); end - - # Returns the value of attribute exceptions_app. - # - # source://railties//lib/rails/application/configuration.rb#13 - def exceptions_app; end - - # Sets the attribute exceptions_app - # - # @param value the value to set the attribute exceptions_app to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def exceptions_app=(_arg0); end - - # Returns the value of attribute file_watcher. - # - # source://railties//lib/rails/application/configuration.rb#13 - def file_watcher; end - - # Sets the attribute file_watcher - # - # @param value the value to set the attribute file_watcher to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def file_watcher=(_arg0); end - - # Returns the value of attribute filter_parameters. - # - # source://railties//lib/rails/application/configuration.rb#13 - def filter_parameters; end - - # Sets the attribute filter_parameters - # - # @param value the value to set the attribute filter_parameters to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def filter_parameters=(_arg0); end - - # Returns the value of attribute filter_redirect. - # - # source://railties//lib/rails/application/configuration.rb#13 - def filter_redirect; end - - # Sets the attribute filter_redirect - # - # @param value the value to set the attribute filter_redirect to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def filter_redirect=(_arg0); end - - # Returns the value of attribute force_ssl. - # - # source://railties//lib/rails/application/configuration.rb#13 - def force_ssl; end - - # Sets the attribute force_ssl - # - # @param value the value to set the attribute force_ssl to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def force_ssl=(_arg0); end - - # Returns the value of attribute helpers_paths. - # - # source://railties//lib/rails/application/configuration.rb#13 - def helpers_paths; end - - # Sets the attribute helpers_paths - # - # @param value the value to set the attribute helpers_paths to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def helpers_paths=(_arg0); end - - # Returns the value of attribute host_authorization. - # - # source://railties//lib/rails/application/configuration.rb#13 - def host_authorization; end - - # Sets the attribute host_authorization - # - # @param value the value to set the attribute host_authorization to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def host_authorization=(_arg0); end - - # Returns the value of attribute hosts. - # - # source://railties//lib/rails/application/configuration.rb#13 - def hosts; end - - # Sets the attribute hosts - # - # @param value the value to set the attribute hosts to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def hosts=(_arg0); end - - # Load the database YAML without evaluating ERB. This allows us to - # create the rake tasks for multiple databases without filling in the - # configuration values or loading the environment. Do not use this - # method. - # - # This uses a DummyERB custom compiler so YAML can ignore the ERB - # tags and load the database.yml for the rake tasks. - # - # source://railties//lib/rails/application/configuration.rb#311 - def load_database_yaml; end - - # Loads default configuration values for a target version. This includes - # defaults for versions prior to the target version. See the - # {configuration guide}[https://guides.rubyonrails.org/configuring.html] - # for the default values associated with a particular version. - # - # source://railties//lib/rails/application/configuration.rb#88 - def load_defaults(target_version); end - - # Returns the value of attribute loaded_config_version. - # - # source://railties//lib/rails/application/configuration.rb#26 - def loaded_config_version; end - - # Returns the value of attribute log_formatter. - # - # source://railties//lib/rails/application/configuration.rb#13 - def log_formatter; end - - # Sets the attribute log_formatter - # - # @param value the value to set the attribute log_formatter to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def log_formatter=(_arg0); end - - # Returns the value of attribute log_level. - # - # source://railties//lib/rails/application/configuration.rb#13 - def log_level; end - - # Sets the attribute log_level - # - # @param value the value to set the attribute log_level to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def log_level=(_arg0); end - - # Returns the value of attribute log_tags. - # - # source://railties//lib/rails/application/configuration.rb#13 - def log_tags; end - - # Sets the attribute log_tags - # - # @param value the value to set the attribute log_tags to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def log_tags=(_arg0); end - - # Returns the value of attribute logger. - # - # source://railties//lib/rails/application/configuration.rb#13 - def logger; end - - # Sets the attribute logger - # - # @param value the value to set the attribute logger to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def logger=(_arg0); end - - # source://railties//lib/rails/application/configuration.rb#288 - def paths; end - - # Configures the ActionDispatch::PermissionsPolicy. - # - # source://railties//lib/rails/application/configuration.rb#428 - def permissions_policy(&block); end - - # Returns the value of attribute public_file_server. - # - # source://railties//lib/rails/application/configuration.rb#13 - def public_file_server; end - - # Sets the attribute public_file_server - # - # @param value the value to set the attribute public_file_server to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def public_file_server=(_arg0); end - - # Returns the value of attribute railties_order. - # - # source://railties//lib/rails/application/configuration.rb#13 - def railties_order; end - - # Sets the attribute railties_order - # - # @param value the value to set the attribute railties_order to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def railties_order=(_arg0); end - - # Returns the value of attribute rake_eager_load. - # - # source://railties//lib/rails/application/configuration.rb#13 - def rake_eager_load; end - - # Sets the attribute rake_eager_load - # - # @param value the value to set the attribute rake_eager_load to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def rake_eager_load=(_arg0); end - - # Returns the value of attribute read_encrypted_secrets. - # - # source://railties//lib/rails/application/configuration.rb#13 - def read_encrypted_secrets; end - - # Sets the attribute read_encrypted_secrets - # - # @param value the value to set the attribute read_encrypted_secrets to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def read_encrypted_secrets=(_arg0); end - - # Returns the value of attribute relative_url_root. - # - # source://railties//lib/rails/application/configuration.rb#13 - def relative_url_root; end - - # Sets the attribute relative_url_root - # - # @param value the value to set the attribute relative_url_root to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def relative_url_root=(_arg0); end - - # Returns the value of attribute reload_classes_only_on_change. - # - # source://railties//lib/rails/application/configuration.rb#13 - def reload_classes_only_on_change; end - - # Sets the attribute reload_classes_only_on_change - # - # @param value the value to set the attribute reload_classes_only_on_change to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def reload_classes_only_on_change=(_arg0); end - - # Returns the value of attribute require_master_key. - # - # source://railties//lib/rails/application/configuration.rb#13 - def require_master_key; end - - # Sets the attribute require_master_key - # - # @param value the value to set the attribute require_master_key to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def require_master_key=(_arg0); end - - # Returns the value of attribute secret_key_base. - # - # source://railties//lib/rails/application/configuration.rb#13 - def secret_key_base; end - - # Sets the attribute secret_key_base - # - # @param value the value to set the attribute secret_key_base to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def secret_key_base=(_arg0); end - - # Returns the value of attribute server_timing. - # - # source://railties//lib/rails/application/configuration.rb#13 - def server_timing; end - - # Sets the attribute server_timing - # - # @param value the value to set the attribute server_timing to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def server_timing=(_arg0); end - - # Returns the value of attribute session_options. - # - # source://railties//lib/rails/application/configuration.rb#13 - def session_options; end - - # Sets the attribute session_options - # - # @param value the value to set the attribute session_options to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def session_options=(_arg0); end - - # Specifies what class to use to store the session. Possible values - # are +:cookie_store+, +:mem_cache_store+, a custom store, or - # +:disabled+. +:disabled+ tells Rails not to deal with sessions. - # - # Additional options will be set as +session_options+: - # - # config.session_store :cookie_store, key: "_your_app_session" - # config.session_options # => {key: "_your_app_session"} - # - # If a custom store is specified as a symbol, it will be resolved to - # the +ActionDispatch::Session+ namespace: - # - # # use ActionDispatch::Session::MyCustomStore as the session store - # config.session_store :my_custom_store - # - # source://railties//lib/rails/application/configuration.rb#383 - def session_store(new_session_store = T.unsafe(nil), **options); end - - # @return [Boolean] - # - # source://railties//lib/rails/application/configuration.rb#410 - def session_store?; end - - # Returns the value of attribute ssl_options. - # - # source://railties//lib/rails/application/configuration.rb#13 - def ssl_options; end - - # Sets the attribute ssl_options - # - # @param value the value to set the attribute ssl_options to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def ssl_options=(_arg0); end - - # Returns the value of attribute time_zone. - # - # source://railties//lib/rails/application/configuration.rb#13 - def time_zone; end - - # Sets the attribute time_zone - # - # @param value the value to set the attribute time_zone to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def time_zone=(_arg0); end - - # Returns the value of attribute x. - # - # source://railties//lib/rails/application/configuration.rb#13 - def x; end - - # Sets the attribute x - # - # @param value the value to set the attribute x to. - # - # source://railties//lib/rails/application/configuration.rb#13 - def x=(_arg0); end - - private - - # @return [Boolean] - # - # source://railties//lib/rails/application/configuration.rb#485 - def credentials_available_for_current_env?; end - - # source://railties//lib/rails/application/configuration.rb#469 - def default_credentials_content_path; end - - # source://railties//lib/rails/application/configuration.rb#477 - def default_credentials_key_path; end -end - -# source://railties//lib/rails/application/configuration.rb#448 -class Rails::Application::Configuration::Custom - # @return [Custom] a new instance of Custom - # - # source://railties//lib/rails/application/configuration.rb#449 - def initialize; end - - # source://railties//lib/rails/application/configuration.rb#453 - def method_missing(method, *args); end - - private - - # @return [Boolean] - # - # source://railties//lib/rails/application/configuration.rb#463 - def respond_to_missing?(symbol, *_arg1); end -end - -# source://railties//lib/rails/application/default_middleware_stack.rb#5 -class Rails::Application::DefaultMiddlewareStack - # @return [DefaultMiddlewareStack] a new instance of DefaultMiddlewareStack - # - # source://railties//lib/rails/application/default_middleware_stack.rb#8 - def initialize(app, config, paths); end - - # Returns the value of attribute app. - # - # source://railties//lib/rails/application/default_middleware_stack.rb#6 - def app; end - - # source://railties//lib/rails/application/default_middleware_stack.rb#14 - def build_stack; end - - # Returns the value of attribute config. - # - # source://railties//lib/rails/application/default_middleware_stack.rb#6 - def config; end - - # Returns the value of attribute paths. - # - # source://railties//lib/rails/application/default_middleware_stack.rb#6 - def paths; end - - private - - # source://railties//lib/rails/application/default_middleware_stack.rb#103 - def load_rack_cache; end - - # source://railties//lib/rails/application/default_middleware_stack.rb#125 - def show_exceptions_app; end -end - -# source://railties//lib/rails/application/finisher.rb#10 -module Rails::Application::Finisher - include ::Rails::Initializable - extend ::Rails::Initializable::ClassMethods -end - -# source://railties//lib/rails/application/finisher.rb#104 -module Rails::Application::Finisher::InterlockHook - class << self - # source://railties//lib/rails/application/finisher.rb#109 - def complete(_state); end - - # source://railties//lib/rails/application/finisher.rb#105 - def run; end - end -end - -# source://railties//lib/rails/application/finisher.rb#90 -class Rails::Application::Finisher::MonitorHook - # @return [MonitorHook] a new instance of MonitorHook - # - # source://railties//lib/rails/application/finisher.rb#91 - def initialize(monitor = T.unsafe(nil)); end - - # source://railties//lib/rails/application/finisher.rb#99 - def complete(_state); end - - # source://railties//lib/rails/application/finisher.rb#95 - def run; end -end - -# source://railties//lib/rails/application.rb#103 -Rails::Application::INITIAL_VARIABLES = T.let(T.unsafe(nil), Array) - -# source://railties//lib/rails/application/routes_reloader.rb#7 -class Rails::Application::RoutesReloader - include ::ActiveSupport::Callbacks - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - - # @return [RoutesReloader] a new instance of RoutesReloader - # - # source://railties//lib/rails/application/routes_reloader.rb#15 - def initialize; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # Returns the value of attribute eager_load. - # - # source://railties//lib/rails/application/routes_reloader.rb#11 - def eager_load; end - - # Sets the attribute eager_load - # - # @param value the value to set the attribute eager_load to. - # - # source://railties//lib/rails/application/routes_reloader.rb#11 - def eager_load=(_arg0); end - - # source://railties//lib/rails/application/routes_reloader.rb#13 - def execute(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/application/routes_reloader.rb#13 - def execute_if_updated(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute external_routes. - # - # source://railties//lib/rails/application/routes_reloader.rb#10 - def external_routes; end - - # Returns the value of attribute paths. - # - # source://railties//lib/rails/application/routes_reloader.rb#10 - def paths; end - - # source://railties//lib/rails/application/routes_reloader.rb#22 - def reload!; end - - # Returns the value of attribute route_sets. - # - # source://railties//lib/rails/application/routes_reloader.rb#10 - def route_sets; end - - # source://railties//lib/rails/application/routes_reloader.rb#12 - def run_after_load_paths=(_arg0); end - - # source://railties//lib/rails/application/routes_reloader.rb#13 - def updated?(*_arg0, **_arg1, &_arg2); end - - private - - # source://railties//lib/rails/application/routes_reloader.rb#42 - def clear!; end - - # source://railties//lib/rails/application/routes_reloader.rb#58 - def finalize!; end - - # source://railties//lib/rails/application/routes_reloader.rb#49 - def load_paths; end - - # source://railties//lib/rails/application/routes_reloader.rb#62 - def revert; end - - # source://railties//lib/rails/application/routes_reloader.rb#54 - def run_after_load_paths; end - - # source://railties//lib/rails/application/routes_reloader.rb#32 - def updater; end - - class << self - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks?; end - end -end - -# source://railties//lib/rails/application_controller.rb#3 -class Rails::ApplicationController < ::ActionController::Base - private - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - # source://railties//lib/rails/application_controller.rb#25 - def disable_content_security_policy_nonce!; end - - # @return [Boolean] - # - # source://railties//lib/rails/application_controller.rb#21 - def local_request?; end - - # source://railties//lib/rails/application_controller.rb#15 - def require_local!; end - - class << self - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#209 - def _layout; end - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#210 - def _layout_conditions; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -# source://railties//lib/rails/autoloaders.rb#4 -class Rails::Autoloaders - include ::Enumerable - - # @return [Autoloaders] a new instance of Autoloaders - # - # source://railties//lib/rails/autoloaders.rb#11 - def initialize; end - - # @yield [main] - # - # source://railties//lib/rails/autoloaders.rb#31 - def each; end - - # source://railties//lib/rails/autoloaders.rb#40 - def log!; end - - # source://railties//lib/rails/autoloaders.rb#36 - def logger=(logger); end - - # Returns the value of attribute main. - # - # source://railties//lib/rails/autoloaders.rb#9 - def main; end - - # Returns the value of attribute once. - # - # source://railties//lib/rails/autoloaders.rb#9 - def once; end - - # @return [Boolean] - # - # source://railties//lib/rails/autoloaders.rb#44 - def zeitwerk_enabled?; end -end - -# source://railties//lib/rails/autoloaders/inflector.rb#7 -module Rails::Autoloaders::Inflector - class << self - # source://railties//lib/rails/autoloaders/inflector.rb#12 - def camelize(basename, _abspath); end - - # source://railties//lib/rails/autoloaders/inflector.rb#16 - def inflect(overrides); end - end -end - -# source://railties//lib/rails/configuration.rb#9 -module Rails::Configuration; end - -# source://railties//lib/rails/configuration.rb#104 -class Rails::Configuration::Generators - # @return [Generators] a new instance of Generators - # - # source://railties//lib/rails/configuration.rb#108 - def initialize; end - - # source://railties//lib/rails/configuration.rb#130 - def after_generate(&block); end - - # Returns the value of attribute after_generate_callbacks. - # - # source://railties//lib/rails/configuration.rb#106 - def after_generate_callbacks; end - - # Returns the value of attribute aliases. - # - # source://railties//lib/rails/configuration.rb#105 - def aliases; end - - # Sets the attribute aliases - # - # @param value the value to set the attribute aliases to. - # - # source://railties//lib/rails/configuration.rb#105 - def aliases=(_arg0); end - - # Returns the value of attribute api_only. - # - # source://railties//lib/rails/configuration.rb#105 - def api_only; end - - # Sets the attribute api_only - # - # @param value the value to set the attribute api_only to. - # - # source://railties//lib/rails/configuration.rb#105 - def api_only=(_arg0); end - - # Returns the value of attribute colorize_logging. - # - # source://railties//lib/rails/configuration.rb#105 - def colorize_logging; end - - # Sets the attribute colorize_logging - # - # @param value the value to set the attribute colorize_logging to. - # - # source://railties//lib/rails/configuration.rb#105 - def colorize_logging=(_arg0); end - - # Returns the value of attribute fallbacks. - # - # source://railties//lib/rails/configuration.rb#105 - def fallbacks; end - - # Sets the attribute fallbacks - # - # @param value the value to set the attribute fallbacks to. - # - # source://railties//lib/rails/configuration.rb#105 - def fallbacks=(_arg0); end - - # Returns the value of attribute hidden_namespaces. - # - # source://railties//lib/rails/configuration.rb#106 - def hidden_namespaces; end - - # source://railties//lib/rails/configuration.rb#126 - def hide_namespace(namespace); end - - # source://railties//lib/rails/configuration.rb#134 - def method_missing(method, *args); end - - # Returns the value of attribute options. - # - # source://railties//lib/rails/configuration.rb#105 - def options; end - - # Sets the attribute options - # - # @param value the value to set the attribute options to. - # - # source://railties//lib/rails/configuration.rb#105 - def options=(_arg0); end - - # Returns the value of attribute templates. - # - # source://railties//lib/rails/configuration.rb#105 - def templates; end - - # Sets the attribute templates - # - # @param value the value to set the attribute templates to. - # - # source://railties//lib/rails/configuration.rb#105 - def templates=(_arg0); end - - private - - # source://railties//lib/rails/configuration.rb#119 - def initialize_copy(source); end -end - -# MiddlewareStackProxy is a proxy for the Rails middleware stack that allows -# you to configure middlewares in your application. It works basically as a -# command recorder, saving each command to be applied after initialization -# over the default middleware stack, so you can add, swap, or remove any -# middleware in Rails. -# -# You can add your own middlewares by using the +config.middleware.use+ method: -# -# config.middleware.use Magical::Unicorns -# -# This will put the Magical::Unicorns middleware on the end of the stack. -# You can use +insert_before+ if you wish to add a middleware before another: -# -# config.middleware.insert_before Rack::Head, Magical::Unicorns -# -# There's also +insert_after+ which will insert a middleware after another: -# -# config.middleware.insert_after Rack::Head, Magical::Unicorns -# -# Middlewares can also be completely swapped out and replaced with others: -# -# config.middleware.swap ActionDispatch::Flash, Magical::Unicorns -# -# Middlewares can be moved from one place to another: -# -# config.middleware.move_before ActionDispatch::Flash, Magical::Unicorns -# -# This will move the Magical::Unicorns middleware before the -# ActionDispatch::Flash. You can also move it after: -# -# config.middleware.move_after ActionDispatch::Flash, Magical::Unicorns -# -# And finally they can also be removed from the stack completely: -# -# config.middleware.delete ActionDispatch::Flash -# -# source://railties//lib/rails/configuration.rb#46 -class Rails::Configuration::MiddlewareStackProxy - # @return [MiddlewareStackProxy] a new instance of MiddlewareStackProxy - # - # source://railties//lib/rails/configuration.rb#47 - def initialize(operations = T.unsafe(nil), delete_operations = T.unsafe(nil)); end - - # source://railties//lib/rails/configuration.rb#96 - def +(other); end - - # source://railties//lib/rails/configuration.rb#70 - def delete(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/configuration.rb#52 - def insert(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/configuration.rb#58 - def insert_after(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/configuration.rb#52 - def insert_before(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/configuration.rb#88 - def merge_into(other); end - - # source://railties//lib/rails/configuration.rb#74 - def move(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/configuration.rb#80 - def move_after(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/configuration.rb#74 - def move_before(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/configuration.rb#62 - def swap(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/configuration.rb#84 - def unshift(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/configuration.rb#66 - def use(*_arg0, **_arg1, &_arg2); end - - protected - - # Returns the value of attribute delete_operations. - # - # source://railties//lib/rails/configuration.rb#101 - def delete_operations; end - - # Returns the value of attribute operations. - # - # source://railties//lib/rails/configuration.rb#101 - def operations; end -end - -# Rails::Engine allows you to wrap a specific Rails application or subset of -# functionality and share it with other applications or within a larger packaged application. -# Every Rails::Application is just an engine, which allows for simple -# feature and application sharing. -# -# Any Rails::Engine is also a Rails::Railtie, so the same -# methods (like rake_tasks and +generators+) and configuration -# options that are available in railties can also be used in engines. -# -# == Creating an Engine -# -# If you want a gem to behave as an engine, you have to specify an +Engine+ -# for it somewhere inside your plugin's +lib+ folder (similar to how we -# specify a +Railtie+): -# -# # lib/my_engine.rb -# module MyEngine -# class Engine < Rails::Engine -# end -# end -# -# Then ensure that this file is loaded at the top of your config/application.rb -# (or in your +Gemfile+), and it will automatically load models, controllers, and helpers -# inside +app+, load routes at config/routes.rb, load locales at -# config/locales/**/*, and load tasks at lib/tasks/**/*. -# -# == Configuration -# -# Like railties, engines can access a config object which contains configuration shared by -# all railties and the application. -# Additionally, each engine can access autoload_paths, eager_load_paths and -# autoload_once_paths settings which are scoped to that engine. -# -# class MyEngine < Rails::Engine -# # Add a load path for this specific Engine -# config.autoload_paths << File.expand_path("lib/some/path", __dir__) -# -# initializer "my_engine.add_middleware" do |app| -# app.middleware.use MyEngine::Middleware -# end -# end -# -# == Generators -# -# You can set up generators for engines with config.generators method: -# -# class MyEngine < Rails::Engine -# config.generators do |g| -# g.orm :active_record -# g.template_engine :erb -# g.test_framework :test_unit -# end -# end -# -# You can also set generators for an application by using config.app_generators: -# -# class MyEngine < Rails::Engine -# # note that you can also pass block to app_generators in the same way you -# # can pass it to generators method -# config.app_generators.orm :datamapper -# end -# -# == Paths -# -# Applications and engines have flexible path configuration, meaning that you -# are not required to place your controllers at app/controllers, but -# in any place which you find convenient. -# -# For example, let's suppose you want to place your controllers in lib/controllers. -# You can set that as an option: -# -# class MyEngine < Rails::Engine -# paths["app/controllers"] = "lib/controllers" -# end -# -# You can also have your controllers loaded from both app/controllers and -# lib/controllers: -# -# class MyEngine < Rails::Engine -# paths["app/controllers"] << "lib/controllers" -# end -# -# The available paths in an engine are: -# -# class MyEngine < Rails::Engine -# paths["app"] # => ["app"] -# paths["app/controllers"] # => ["app/controllers"] -# paths["app/helpers"] # => ["app/helpers"] -# paths["app/models"] # => ["app/models"] -# paths["app/views"] # => ["app/views"] -# paths["lib"] # => ["lib"] -# paths["lib/tasks"] # => ["lib/tasks"] -# paths["config"] # => ["config"] -# paths["config/initializers"] # => ["config/initializers"] -# paths["config/locales"] # => ["config/locales"] -# paths["config/routes.rb"] # => ["config/routes.rb"] -# end -# -# The Application class adds a couple more paths to this set. And as in your -# Application, all folders under +app+ are automatically added to the load path. -# If you have an app/services folder for example, it will be added by default. -# -# == Endpoint -# -# An engine can also be a Rack application. It can be useful if you have a Rack application that -# you would like to provide with some of the +Engine+'s features. -# -# To do that, use the +endpoint+ method: -# -# module MyEngine -# class Engine < Rails::Engine -# endpoint MyRackApplication -# end -# end -# -# Now you can mount your engine in application's routes: -# -# Rails.application.routes.draw do -# mount MyEngine::Engine => "/engine" -# end -# -# == Middleware stack -# -# As an engine can now be a Rack endpoint, it can also have a middleware -# stack. The usage is exactly the same as in Application: -# -# module MyEngine -# class Engine < Rails::Engine -# middleware.use SomeMiddleware -# end -# end -# -# == Routes -# -# If you don't specify an endpoint, routes will be used as the default -# endpoint. You can use them just like you use an application's routes: -# -# # ENGINE/config/routes.rb -# MyEngine::Engine.routes.draw do -# get "/" => "posts#index" -# end -# -# == Mount priority -# -# Note that now there can be more than one router in your application, and it's better to avoid -# passing requests through many routers. Consider this situation: -# -# Rails.application.routes.draw do -# mount MyEngine::Engine => "/blog" -# get "/blog/omg" => "main#omg" -# end -# -# +MyEngine+ is mounted at /blog, and /blog/omg points to application's -# controller. In such a situation, requests to /blog/omg will go through +MyEngine+, -# and if there is no such route in +Engine+'s routes, it will be dispatched to main#omg. -# It's much better to swap that: -# -# Rails.application.routes.draw do -# get "/blog/omg" => "main#omg" -# mount MyEngine::Engine => "/blog" -# end -# -# Now, +Engine+ will get only requests that were not handled by +Application+. -# -# == Engine name -# -# There are some places where an Engine's name is used: -# -# * routes: when you mount an Engine with mount(MyEngine::Engine => '/my_engine'), -# it's used as default :as option -# * rake task for installing migrations my_engine:install:migrations -# -# Engine name is set by default based on class name. For MyEngine::Engine it will be -# my_engine_engine. You can change it manually using the engine_name method: -# -# module MyEngine -# class Engine < Rails::Engine -# engine_name "my_engine" -# end -# end -# -# == Isolated Engine -# -# Normally when you create controllers, helpers, and models inside an engine, they are treated -# as if they were created inside the application itself. This means that all helpers and -# named routes from the application will be available to your engine's controllers as well. -# -# However, sometimes you want to isolate your engine from the application, especially if your engine -# has its own router. To do that, you simply need to call +isolate_namespace+. This method requires -# you to pass a module where all your controllers, helpers, and models should be nested to: -# -# module MyEngine -# class Engine < Rails::Engine -# isolate_namespace MyEngine -# end -# end -# -# With such an engine, everything that is inside the +MyEngine+ module will be isolated from -# the application. -# -# Consider this controller: -# -# module MyEngine -# class FooController < ActionController::Base -# end -# end -# -# If the +MyEngine+ engine is marked as isolated, +FooController+ only has -# access to helpers from +MyEngine+, and url_helpers from -# MyEngine::Engine.routes. -# -# The next thing that changes in isolated engines is the behavior of routes. -# Normally, when you namespace your controllers, you also need to namespace -# the related routes. With an isolated engine, the engine's namespace is -# automatically applied, so you don't need to specify it explicitly in your -# routes: -# -# MyEngine::Engine.routes.draw do -# resources :articles -# end -# -# If +MyEngine+ is isolated, the routes above will point to -# MyEngine::ArticlesController. You also don't need to use longer -# URL helpers like +my_engine_articles_path+. Instead, you should simply use -# +articles_path+, like you would do with your main application. -# -# To make this behavior consistent with other parts of the framework, -# isolated engines also have an effect on ActiveModel::Naming. In a -# normal Rails app, when you use a namespaced model such as -# Namespace::Article, ActiveModel::Naming will generate -# names with the prefix "namespace". In an isolated engine, the prefix will -# be omitted in URL helpers and form fields, for convenience. -# -# polymorphic_url(MyEngine::Article.new) -# # => "articles_path" # not "my_engine_articles_path" -# -# form_for(MyEngine::Article.new) do -# text_field :title # => -# end -# -# Additionally, an isolated engine will set its own name according to its -# namespace, so MyEngine::Engine.engine_name will return -# "my_engine". It will also set +MyEngine.table_name_prefix+ to "my_engine_", -# meaning for example that MyEngine::Article will use the -# +my_engine_articles+ database table by default. -# -# == Using Engine's routes outside Engine -# -# Since you can now mount an engine inside application's routes, you do not have direct access to +Engine+'s -# url_helpers inside +Application+. When you mount an engine in an application's routes, a special helper is -# created to allow you to do that. Consider such a scenario: -# -# # config/routes.rb -# Rails.application.routes.draw do -# mount MyEngine::Engine => "/my_engine", as: "my_engine" -# get "/foo" => "foo#index" -# end -# -# Now, you can use the my_engine helper inside your application: -# -# class FooController < ApplicationController -# def index -# my_engine.root_url # => /my_engine/ -# end -# end -# -# There is also a main_app helper that gives you access to application's routes inside Engine: -# -# module MyEngine -# class BarController -# def index -# main_app.foo_path # => /foo -# end -# end -# end -# -# Note that the :as option given to mount takes the engine_name as default, so most of the time -# you can simply omit it. -# -# Finally, if you want to generate a URL to an engine's route using -# polymorphic_url, you also need to pass the engine helper. Let's -# say that you want to create a form pointing to one of the engine's routes. -# All you need to do is pass the helper as the first element in array with -# attributes for URL: -# -# form_for([my_engine, @user]) -# -# This code will use my_engine.user_path(@user) to generate the proper route. -# -# == Isolated engine's helpers -# -# Sometimes you may want to isolate engine, but use helpers that are defined for it. -# If you want to share just a few specific helpers you can add them to application's -# helpers in ApplicationController: -# -# class ApplicationController < ActionController::Base -# helper MyEngine::SharedEngineHelper -# end -# -# If you want to include all of the engine's helpers, you can use the #helper method on an engine's -# instance: -# -# class ApplicationController < ActionController::Base -# helper MyEngine::Engine.helpers -# end -# -# It will include all of the helpers from engine's directory. Take into account this does -# not include helpers defined in controllers with helper_method or other similar solutions, -# only helpers defined in the helpers directory will be included. -# -# == Migrations & seed data -# -# Engines can have their own migrations. The default path for migrations is exactly the same -# as in application: db/migrate -# -# To use engine's migrations in application you can use the rake task below, which copies them to -# application's dir: -# -# rake ENGINE_NAME:install:migrations -# -# Note that some of the migrations may be skipped if a migration with the same name already exists -# in application. In such a situation you must decide whether to leave that migration or rename the -# migration in the application and rerun copying migrations. -# -# If your engine has migrations, you may also want to prepare data for the database in -# the db/seeds.rb file. You can load that data using the load_seed method, e.g. -# -# MyEngine::Engine.load_seed -# -# == Loading priority -# -# In order to change engine's priority you can use +config.railties_order+ in the main application. -# It will affect the priority of loading views, helpers, assets, and all the other files -# related to engine or application. -# -# # load Blog::Engine with highest priority, followed by application and other railties -# config.railties_order = [Blog::Engine, :main_app, :all] -# -# source://railties//lib/rails/engine/railties.rb#4 -class Rails::Engine < ::Rails::Railtie - include ::ActiveSupport::Callbacks - extend ::ActiveSupport::Callbacks::ClassMethods - - # @return [Engine] a new instance of Engine - # - # source://railties//lib/rails/engine.rb#432 - def initialize; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#940 - def _load_seed_callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#928 - def _run_load_seed_callbacks(&block); end - - # Returns the underlying Rack application for this engine. - # - # source://railties//lib/rails/engine.rb#511 - def app; end - - # Define the Rack API for this engine. - # - # source://railties//lib/rails/engine.rb#528 - def call(env); end - - # Define the configuration object for the engine. - # - # source://railties//lib/rails/engine.rb#547 - def config; end - - # source://railties//lib/rails/engine.rb#484 - def eager_load!; end - - # Returns the endpoint for this engine. If none is registered, - # defaults to an ActionDispatch::Routing::RouteSet. - # - # source://railties//lib/rails/engine.rb#523 - def endpoint; end - - # source://railties//lib/rails/engine.rb#430 - def engine_name(*_arg0, **_arg1, &_arg2); end - - # Defines additional Rack env configuration that is added on each call. - # - # source://railties//lib/rails/engine.rb#534 - def env_config; end - - # Returns a module with all the helpers defined for the engine. - # - # source://railties//lib/rails/engine.rb#494 - def helpers; end - - # Returns all registered helpers paths. - # - # source://railties//lib/rails/engine.rb#506 - def helpers_paths; end - - # source://railties//lib/rails/engine.rb#430 - def isolated?(*_arg0, **_arg1, &_arg2); end - - # Load console and invoke the registered hooks. - # Check Rails::Railtie.console for more info. - # - # source://railties//lib/rails/engine.rb#446 - def load_console(app = T.unsafe(nil)); end - - # Load Rails generators and invoke the registered hooks. - # Check Rails::Railtie.generators for more info. - # - # source://railties//lib/rails/engine.rb#470 - def load_generators(app = T.unsafe(nil)); end - - # Load Rails runner and invoke the registered hooks. - # Check Rails::Railtie.runner for more info. - # - # source://railties//lib/rails/engine.rb#455 - def load_runner(app = T.unsafe(nil)); end - - # Load data from db/seeds.rb file. It can be used in to load engines' - # seeds, e.g.: - # - # Blog::Engine.load_seed - # - # source://railties//lib/rails/engine.rb#555 - def load_seed; end - - # Invoke the server registered hooks. - # Check Rails::Railtie.server for more info. - # - # source://railties//lib/rails/engine.rb#479 - def load_server(app = T.unsafe(nil)); end - - # Load Rake and railties tasks, and invoke the registered hooks. - # Check Rails::Railtie.rake_tasks for more info. - # - # source://railties//lib/rails/engine.rb#462 - def load_tasks(app = T.unsafe(nil)); end - - # source://railties//lib/rails/engine.rb#429 - def middleware(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/engine.rb#429 - def paths(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/engine.rb#489 - def railties; end - - # source://railties//lib/rails/engine.rb#429 - def root(*_arg0, **_arg1, &_arg2); end - - # Defines the routes for this engine. If a block is given to - # routes, it is appended to the engine. - # - # source://railties//lib/rails/engine.rb#540 - def routes(&block); end - - # @return [Boolean] - # - # source://railties//lib/rails/engine.rb#654 - def routes?; end - - protected - - # source://railties//lib/rails/engine.rb#659 - def run_tasks_blocks(*_arg0); end - - private - - # source://railties//lib/rails/engine.rb#691 - def _all_autoload_once_paths; end - - # source://railties//lib/rails/engine.rb#695 - def _all_autoload_paths; end - - # source://railties//lib/rails/engine.rb#704 - def _all_load_paths(add_autoload_paths_to_load_path); end - - # source://railties//lib/rails/engine.rb#723 - def build_middleware; end - - # source://railties//lib/rails/engine.rb#715 - def build_request(env); end - - # source://railties//lib/rails/engine.rb#687 - def default_middleware_stack; end - - # @return [Boolean] - # - # source://railties//lib/rails/engine.rb#671 - def has_migrations?; end - - # source://railties//lib/rails/engine.rb#665 - def load_config_initializer(initializer); end - - class << self - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks=(value); end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks?; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#932 - def _load_seed_callbacks; end - - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#936 - def _load_seed_callbacks=(value); end - - # Returns the value of attribute called_from. - # - # source://railties//lib/rails/engine.rb#353 - def called_from; end - - # Sets the attribute called_from - # - # @param value the value to set the attribute called_from to. - # - # source://railties//lib/rails/engine.rb#353 - def called_from=(_arg0); end - - # source://railties//lib/rails/engine.rb#358 - def eager_load!(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/engine.rb#378 - def endpoint(endpoint = T.unsafe(nil)); end - - # source://railties//lib/rails/railtie.rb#176 - def engine_name(name = T.unsafe(nil)); end - - # Finds engine with given path. - # - # source://railties//lib/rails/engine.rb#416 - def find(path); end - - # source://railties//lib/rails/engine.rb#374 - def find_root(from); end - - # source://railties//lib/rails/engine.rb#675 - def find_root_with_flag(flag, root_path, default = T.unsafe(nil)); end - - # @private - # - # source://railties//lib/rails/engine.rb#360 - def inherited(base); end - - # source://railties//lib/rails/engine.rb#384 - def isolate_namespace(mod); end - - # Returns the value of attribute isolated. - # - # source://railties//lib/rails/engine.rb#353 - def isolated; end - - # Sets the attribute isolated - # - # @param value the value to set the attribute isolated to. - # - # source://railties//lib/rails/engine.rb#353 - def isolated=(_arg0); end - - # Returns the value of attribute isolated. - # - # source://railties//lib/rails/engine.rb#353 - def isolated?; end - end -end - -# source://railties//lib/rails/engine/configuration.rb#7 -class Rails::Engine::Configuration < ::Rails::Railtie::Configuration - # @return [Configuration] a new instance of Configuration - # - # source://railties//lib/rails/engine/configuration.rb#12 - def initialize(root = T.unsafe(nil)); end - - # source://railties//lib/rails/engine/configuration.rb#83 - def autoload_once_paths; end - - # Sets the attribute autoload_once_paths - # - # @param value the value to set the attribute autoload_once_paths to. - # - # source://railties//lib/rails/engine/configuration.rb#10 - def autoload_once_paths=(_arg0); end - - # source://railties//lib/rails/engine/configuration.rb#87 - def autoload_paths; end - - # Sets the attribute autoload_paths - # - # @param value the value to set the attribute autoload_paths to. - # - # source://railties//lib/rails/engine/configuration.rb#10 - def autoload_paths=(_arg0); end - - # source://railties//lib/rails/engine/configuration.rb#79 - def eager_load_paths; end - - # Sets the attribute eager_load_paths - # - # @param value the value to set the attribute eager_load_paths to. - # - # source://railties//lib/rails/engine/configuration.rb#10 - def eager_load_paths=(_arg0); end - - # Holds generators configuration: - # - # config.generators do |g| - # g.orm :data_mapper, migration: true - # g.template_engine :haml - # g.test_framework :rspec - # end - # - # If you want to disable color in console, do: - # - # config.generators.colorize_logging = false - # - # @yield [@generators] - # - # source://railties//lib/rails/engine/configuration.rb#32 - def generators; end - - # Returns the value of attribute javascript_path. - # - # source://railties//lib/rails/engine/configuration.rb#9 - def javascript_path; end - - # Sets the attribute javascript_path - # - # @param value the value to set the attribute javascript_path to. - # - # source://railties//lib/rails/engine/configuration.rb#9 - def javascript_path=(_arg0); end - - # Returns the value of attribute middleware. - # - # source://railties//lib/rails/engine/configuration.rb#9 - def middleware; end - - # Sets the attribute middleware - # - # @param value the value to set the attribute middleware to. - # - # source://railties//lib/rails/engine/configuration.rb#9 - def middleware=(_arg0); end - - # source://railties//lib/rails/engine/configuration.rb#38 - def paths; end - - # Returns the value of attribute root. - # - # source://railties//lib/rails/engine/configuration.rb#8 - def root; end - - # source://railties//lib/rails/engine/configuration.rb#75 - def root=(value); end -end - -# source://railties//lib/rails/engine/railties.rb#5 -class Rails::Engine::Railties - include ::Enumerable - - # @return [Railties] a new instance of Railties - # - # source://railties//lib/rails/engine/railties.rb#9 - def initialize; end - - # source://railties//lib/rails/engine/railties.rb#18 - def -(others); end - - # Returns the value of attribute _all. - # - # source://railties//lib/rails/engine/railties.rb#7 - def _all; end - - # source://railties//lib/rails/engine/railties.rb#14 - def each(*args, &block); end -end - -# This module helps build the runtime properties that are displayed in -# Rails::InfoController responses. These include the active Rails version, -# Ruby version, Rack version, and so on. -# -# source://railties//lib/rails/info.rb#9 -module Rails::Info - # source://railties//lib/rails/info.rb#10 - def properties; end - - # source://railties//lib/rails/info.rb#10 - def properties=(val); end - - class << self - # source://railties//lib/rails/info.rb#31 - def inspect; end - - # source://railties//lib/rails/info.rb#10 - def properties; end - - # source://railties//lib/rails/info.rb#10 - def properties=(val); end - - # source://railties//lib/rails/info.rb#25 - def property(name, value = T.unsafe(nil)); end - - # source://railties//lib/rails/info.rb#43 - def to_html; end - - # source://railties//lib/rails/info.rb#31 - def to_s; end - end -end - -# source://railties//lib/rails/info_controller.rb#6 -class Rails::InfoController < ::Rails::ApplicationController - # source://railties//lib/rails/info_controller.rb#12 - def index; end - - # source://railties//lib/rails/info_controller.rb#16 - def properties; end - - # source://railties//lib/rails/info_controller.rb#21 - def routes; end - - private - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - # source://railties//lib/rails/info_controller.rb#8 - def _layout_from_proc; end - - # source://railties//lib/rails/info_controller.rb#36 - def match_route; end - - # source://railties//lib/rails/info_controller.rb#40 - def with_leading_slash(path); end - - class << self - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#209 - def _layout; end - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#210 - def _layout_conditions; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -# source://railties//lib/rails/initializable.rb#6 -module Rails::Initializable - mixes_in_class_methods ::Rails::Initializable::ClassMethods - - # source://railties//lib/rails/initializable.rb#66 - def initializers; end - - # source://railties//lib/rails/initializable.rb#58 - def run_initializers(group = T.unsafe(nil), *args); end - - class << self - # source://railties//lib/rails/initializable.rb#7 - def included(base); end - end -end - -# source://railties//lib/rails/initializable.rb#70 -module Rails::Initializable::ClassMethods - # @raise [ArgumentError] - # - # source://railties//lib/rails/initializable.rb#88 - def initializer(name, opts = T.unsafe(nil), &blk); end - - # source://railties//lib/rails/initializable.rb#71 - def initializers; end - - # source://railties//lib/rails/initializable.rb#75 - def initializers_chain; end - - # source://railties//lib/rails/initializable.rb#84 - def initializers_for(binding); end -end - -# source://railties//lib/rails/initializable.rb#45 -class Rails::Initializable::Collection < ::Array - include ::TSort - - # source://railties//lib/rails/initializable.rb#53 - def +(other); end - - # source://railties//lib/rails/initializable.rb#49 - def tsort_each_child(initializer, &block); end - - def tsort_each_node; end -end - -# source://railties//lib/rails/initializable.rb#11 -class Rails::Initializable::Initializer - # @return [Initializer] a new instance of Initializer - # - # source://railties//lib/rails/initializable.rb#14 - def initialize(name, context, options, &block); end - - # source://railties//lib/rails/initializable.rb#23 - def after; end - - # source://railties//lib/rails/initializable.rb#19 - def before; end - - # @return [Boolean] - # - # source://railties//lib/rails/initializable.rb#27 - def belongs_to?(group); end - - # source://railties//lib/rails/initializable.rb#35 - def bind(context); end - - # Returns the value of attribute block. - # - # source://railties//lib/rails/initializable.rb#12 - def block; end - - # source://railties//lib/rails/initializable.rb#40 - def context_class; end - - # Returns the value of attribute name. - # - # source://railties//lib/rails/initializable.rb#12 - def name; end - - # source://railties//lib/rails/initializable.rb#31 - def run(*args); end -end - -# source://railties//lib/rails/test_unit/line_filtering.rb#6 -module Rails::LineFiltering - # source://railties//lib/rails/test_unit/line_filtering.rb#7 - def run(reporter, options = T.unsafe(nil)); end -end - -# source://railties//lib/rails/mailers_controller.rb#5 -class Rails::MailersController < ::Rails::ApplicationController - # source://railties//lib/rails/mailers_controller.rb#16 - def index; end - - # source://railties//lib/rails/mailers_controller.rb#21 - def preview; end - - private - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - # source://railties//lib/rails/mailers_controller.rb#80 - def find_part(format); end - - # source://railties//lib/rails/mailers_controller.rb#68 - def find_preferred_part(*formats); end - - # source://railties//lib/rails/mailers_controller.rb#56 - def find_preview; end - - # source://railties//lib/rails/mailers_controller.rb#92 - def locale_query(locale); end - - # source://railties//lib/rails/mailers_controller.rb#88 - def part_query(mime_type); end - - # source://railties//lib/rails/mailers_controller.rb#96 - def set_locale(&block); end - - # @return [Boolean] - # - # source://railties//lib/rails/mailers_controller.rb#52 - def show_previews?; end - - class << self - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#11 - def _helper_methods; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end - -# source://railties//lib/rails/mailers_controller.rb#0 -module Rails::MailersController::HelperMethods - include ::ActionController::Base::HelperMethods - - # source://railties//lib/rails/mailers_controller.rb#12 - def locale_query(*args, **_arg1, &block); end - - # source://railties//lib/rails/mailers_controller.rb#12 - def part_query(*args, **_arg1, &block); end -end - -# source://railties//lib/rails/paths.rb#6 -module Rails::Paths; end - -# source://railties//lib/rails/paths.rb#111 -class Rails::Paths::Path - include ::Enumerable - - # @return [Path] a new instance of Path - # - # source://railties//lib/rails/paths.rb#116 - def initialize(root, current, paths, options = T.unsafe(nil)); end - - # source://railties//lib/rails/paths.rb#168 - def <<(path); end - - # source://railties//lib/rails/paths.rb#129 - def absolute_current; end - - # source://railties//lib/rails/paths.rb#150 - def autoload!; end - - # source://railties//lib/rails/paths.rb#158 - def autoload?; end - - # source://railties//lib/rails/paths.rb#150 - def autoload_once!; end - - # source://railties//lib/rails/paths.rb#158 - def autoload_once?; end - - # source://railties//lib/rails/paths.rb#133 - def children; end - - # source://railties//lib/rails/paths.rb#173 - def concat(paths); end - - # source://railties//lib/rails/paths.rb#164 - def each(&block); end - - # source://railties//lib/rails/paths.rb#150 - def eager_load!; end - - # source://railties//lib/rails/paths.rb#158 - def eager_load?; end - - # Returns all expanded paths but only if they exist in the filesystem. - # - # source://railties//lib/rails/paths.rb#217 - def existent; end - - # source://railties//lib/rails/paths.rb#228 - def existent_directories; end - - # Expands all paths against the root and return all unique values. - # - # source://railties//lib/rails/paths.rb#198 - def expanded; end - - # source://railties//lib/rails/paths.rb#193 - def extensions; end - - # source://railties//lib/rails/paths.rb#140 - def first; end - - # Returns the value of attribute glob. - # - # source://railties//lib/rails/paths.rb#114 - def glob; end - - # Sets the attribute glob - # - # @param value the value to set the attribute glob to. - # - # source://railties//lib/rails/paths.rb#114 - def glob=(_arg0); end - - # source://railties//lib/rails/paths.rb#144 - def last; end - - # source://railties//lib/rails/paths.rb#150 - def load_path!; end - - # source://railties//lib/rails/paths.rb#158 - def load_path?; end - - # source://railties//lib/rails/paths.rb#185 - def paths; end - - # source://railties//lib/rails/paths.rb#168 - def push(path); end - - # source://railties//lib/rails/paths.rb#154 - def skip_autoload!; end - - # source://railties//lib/rails/paths.rb#154 - def skip_autoload_once!; end - - # source://railties//lib/rails/paths.rb#154 - def skip_eager_load!; end - - # source://railties//lib/rails/paths.rb#154 - def skip_load_path!; end - - # Expands all paths against the root and return all unique values. - # - # source://railties//lib/rails/paths.rb#198 - def to_a; end - - # source://railties//lib/rails/paths.rb#181 - def to_ary; end - - # source://railties//lib/rails/paths.rb#177 - def unshift(*paths); end - - private - - # source://railties//lib/rails/paths.rb#235 - def files_in(path); end -end - -# This object is an extended hash that behaves as root of the Rails::Paths system. -# It allows you to collect information about how you want to structure your application -# paths through a Hash-like API. It requires you to give a physical path on initialization. -# -# root = Root.new "/rails" -# root.add "app/controllers", eager_load: true -# -# The above command creates a new root object and adds "app/controllers" as a path. -# This means we can get a Rails::Paths::Path object back like below: -# -# path = root["app/controllers"] -# path.eager_load? # => true -# path.is_a?(Rails::Paths::Path) # => true -# -# The +Path+ object is simply an enumerable and allows you to easily add extra paths: -# -# path.is_a?(Enumerable) # => true -# path.to_ary.inspect # => ["app/controllers"] -# -# path << "lib/controllers" -# path.to_ary.inspect # => ["app/controllers", "lib/controllers"] -# -# Notice that when you add a path using +add+, the path object created already -# contains the path with the same path value given to +add+. In some situations, -# you may not want this behavior, so you can give :with as option. -# -# root.add "config/routes", with: "config/routes.rb" -# root["config/routes"].inspect # => ["config/routes.rb"] -# -# The +add+ method accepts the following options as arguments: -# eager_load, autoload, autoload_once, and glob. -# -# Finally, the +Path+ object also provides a few helpers: -# -# root = Root.new "/rails" -# root.add "app/controllers" -# -# root["app/controllers"].expanded # => ["/rails/app/controllers"] -# root["app/controllers"].existent # => ["/rails/app/controllers"] -# -# Check the Rails::Paths::Path documentation for more information. -# -# source://railties//lib/rails/paths.rb#48 -class Rails::Paths::Root - # @return [Root] a new instance of Root - # - # source://railties//lib/rails/paths.rb#51 - def initialize(path); end - - # source://railties//lib/rails/paths.rb#66 - def [](path); end - - # source://railties//lib/rails/paths.rb#56 - def []=(path, value); end - - # source://railties//lib/rails/paths.rb#61 - def add(path, options = T.unsafe(nil)); end - - # source://railties//lib/rails/paths.rb#82 - def all_paths; end - - # source://railties//lib/rails/paths.rb#86 - def autoload_once; end - - # source://railties//lib/rails/paths.rb#94 - def autoload_paths; end - - # source://railties//lib/rails/paths.rb#90 - def eager_load; end - - # source://railties//lib/rails/paths.rb#74 - def keys; end - - # source://railties//lib/rails/paths.rb#98 - def load_paths; end - - # Returns the value of attribute path. - # - # source://railties//lib/rails/paths.rb#49 - def path; end - - # Sets the attribute path - # - # @param value the value to set the attribute path to. - # - # source://railties//lib/rails/paths.rb#49 - def path=(_arg0); end - - # source://railties//lib/rails/paths.rb#70 - def values; end - - # source://railties//lib/rails/paths.rb#78 - def values_at(*list); end - - private - - # source://railties//lib/rails/paths.rb#103 - def filter_by(&block); end -end - -# source://railties//lib/rails/rack.rb#4 -module Rails::Rack; end - -# Sets log tags, logs the request, calls the app, and flushes the logs. -# -# Log tags (+taggers+) can be an Array containing: methods that the +request+ -# object responds to, objects that respond to +to_s+ or Proc objects that accept -# an instance of the +request+ object. -# -# source://railties//lib/rails/rack/logger.rb#15 -class Rails::Rack::Logger < ::ActiveSupport::LogSubscriber - # @return [Logger] a new instance of Logger - # - # source://railties//lib/rails/rack/logger.rb#16 - def initialize(app, taggers = T.unsafe(nil)); end - - # source://railties//lib/rails/rack/logger.rb#21 - def call(env); end - - private - - # source://railties//lib/rails/rack/logger.rb#32 - def call_app(request, env); end - - # source://railties//lib/rails/rack/logger.rb#59 - def compute_tags(request); end - - # source://railties//lib/rails/rack/logger.rb#72 - def logger; end - - # Started GET "/session/new" for 127.0.0.1 at 2012-09-26 14:51:42 -0700 - # - # source://railties//lib/rails/rack/logger.rb#51 - def started_request_message(request); end -end - -# Rails::Railtie is the core of the Rails framework and provides -# several hooks to extend Rails and/or modify the initialization process. -# -# Every major component of Rails (Action Mailer, Action Controller, Active -# Record, etc.) implements a railtie. Each of them is responsible for their -# own initialization. This makes Rails itself absent of any component hooks, -# allowing other components to be used in place of any of the Rails defaults. -# -# Developing a Rails extension does _not_ require implementing a railtie, but -# if you need to interact with the Rails framework during or after boot, then -# a railtie is needed. -# -# For example, an extension doing any of the following would need a railtie: -# -# * creating initializers -# * configuring a Rails framework for the application, like setting a generator -# * adding config.* keys to the environment -# * setting up a subscriber with ActiveSupport::Notifications -# * adding Rake tasks -# -# == Creating a Railtie -# -# To extend Rails using a railtie, create a subclass of Rails::Railtie. -# This class must be loaded during the Rails boot process, and is conventionally -# called MyNamespace::Railtie. -# -# The following example demonstrates an extension which can be used with or -# without Rails. -# -# # lib/my_gem/railtie.rb -# module MyGem -# class Railtie < Rails::Railtie -# end -# end -# -# # lib/my_gem.rb -# require "my_gem/railtie" if defined?(Rails::Railtie) -# -# == Initializers -# -# To add an initialization step to the Rails boot process from your railtie, just -# define the initialization code with the +initializer+ macro: -# -# class MyRailtie < Rails::Railtie -# initializer "my_railtie.configure_rails_initialization" do -# # some initialization behavior -# end -# end -# -# If specified, the block can also receive the application object, in case you -# need to access some application-specific configuration, like middleware: -# -# class MyRailtie < Rails::Railtie -# initializer "my_railtie.configure_rails_initialization" do |app| -# app.middleware.use MyRailtie::Middleware -# end -# end -# -# Finally, you can also pass :before and :after as options to -# +initializer+, in case you want to couple it with a specific step in the -# initialization process. -# -# == Configuration -# -# Railties can access a config object which contains configuration shared by all -# railties and the application: -# -# class MyRailtie < Rails::Railtie -# # Customize the ORM -# config.app_generators.orm :my_railtie_orm -# -# # Add a to_prepare block which is executed once in production -# # and before each request in development. -# config.to_prepare do -# MyRailtie.setup! -# end -# end -# -# == Loading Rake Tasks and Generators -# -# If your railtie has Rake tasks, you can tell Rails to load them through the method -# +rake_tasks+: -# -# class MyRailtie < Rails::Railtie -# rake_tasks do -# load "path/to/my_railtie.tasks" -# end -# end -# -# By default, Rails loads generators from your load path. However, if you want to place -# your generators at a different location, you can specify in your railtie a block which -# will load them during normal generators lookup: -# -# class MyRailtie < Rails::Railtie -# generators do -# require "path/to/my_railtie_generator" -# end -# end -# -# Since filenames on the load path are shared across gems, be sure that files you load -# through a railtie have unique names. -# -# == Run another program when the Rails server starts -# -# In development, it's very usual to have to run another process next to the Rails Server. In example -# you might want to start the Webpack or React server. Or maybe you need to run your job scheduler process -# like Sidekiq. This is usually done by opening a new shell and running the program from here. -# -# Rails allow you to specify a +server+ block which will get called when a Rails server starts. -# This way, your users don't need to remember to have to open a new shell and run another program, making -# this less confusing for everyone. -# It can be used like this: -# -# class MyRailtie < Rails::Railtie -# server do -# WebpackServer.start -# end -# end -# -# == Application and Engine -# -# An engine is nothing more than a railtie with some initializers already set. And since -# Rails::Application is an engine, the same configuration described here can be -# used in both. -# -# Be sure to look at the documentation of those specific classes for more information. -# -# source://railties//lib/rails/railtie.rb#136 -class Rails::Railtie - include ::Rails::Initializable - extend ::ActiveSupport::DescendantsTracker - extend ::Rails::Initializable::ClassMethods - - # @return [Railtie] a new instance of Railtie - # - # source://railties//lib/rails/railtie.rb#246 - def initialize; end - - # This is used to create the config object on Railties, an instance of - # Railtie::Configuration, that is used by Railties and Application to store - # related configuration. - # - # source://railties//lib/rails/railtie.rb#263 - def config; end - - # source://railties//lib/rails/railtie.rb#256 - def configure(&block); end - - # source://railties//lib/rails/railtie.rb#252 - def inspect; end - - # source://railties//lib/rails/railtie.rb#244 - def railtie_name(*_arg0, **_arg1, &_arg2); end - - # source://railties//lib/rails/railtie.rb#267 - def railtie_namespace; end - - protected - - # source://railties//lib/rails/railtie.rb#272 - def run_console_blocks(app); end - - # source://railties//lib/rails/railtie.rb#276 - def run_generators_blocks(app); end - - # source://railties//lib/rails/railtie.rb#280 - def run_runner_blocks(app); end - - # source://railties//lib/rails/railtie.rb#289 - def run_server_blocks(app); end - - # source://railties//lib/rails/railtie.rb#284 - def run_tasks_blocks(app); end - - private - - # run `&block` in every registered block in `#register_block_for` - # - # source://railties//lib/rails/railtie.rb#295 - def each_registered_block(type, &block); end - - class << self - # source://railties//lib/rails/railtie.rb#194 - def <=>(other); end - - # @return [Boolean] - # - # source://railties//lib/rails/railtie.rb#172 - def abstract_railtie?; end - - # source://railties//lib/rails/railtie.rb#146 - def config(*_arg0, **_arg1, &_arg2); end - - # Allows you to configure the railtie. This is the same method seen in - # Railtie::Configurable, but this module is no longer required for all - # subclasses of Railtie so we provide the class method here. - # - # source://railties//lib/rails/railtie.rb#190 - def configure(&block); end - - # source://railties//lib/rails/railtie.rb#156 - def console(&blk); end - - # source://railties//lib/rails/railtie.rb#164 - def generators(&blk); end - - # @private - # - # source://railties//lib/rails/railtie.rb#198 - def inherited(subclass); end - - # Since Rails::Railtie cannot be instantiated, any methods that call - # +instance+ are intended to be called only on subclasses of a Railtie. - # - # source://railties//lib/rails/railtie.rb#183 - def instance; end - - # source://railties//lib/rails/railtie.rb#176 - def railtie_name(name = T.unsafe(nil)); end - - # source://railties//lib/rails/railtie.rb#152 - def rake_tasks(&blk); end - - # source://railties//lib/rails/railtie.rb#160 - def runner(&blk); end - - # source://railties//lib/rails/railtie.rb#168 - def server(&blk); end - - # source://railties//lib/rails/railtie.rb#148 - def subclasses; end - - protected - - # source://railties//lib/rails/railtie.rb#206 - def increment_load_index; end - - # Returns the value of attribute load_index. - # - # source://railties//lib/rails/railtie.rb#204 - def load_index; end - - private - - # source://railties//lib/rails/railtie.rb#212 - def generate_railtie_name(string); end - - # If the class method does not have a method, then send the method call - # to the Railtie instance. - # - # source://railties//lib/rails/railtie.rb#224 - def method_missing(name, *args, **_arg2, &block); end - - def new(*_arg0); end - - # receives an instance variable identifier, set the variable value if is - # blank and append given block to value, which will be used later in - # `#each_registered_block(type, &block)` - # - # source://railties//lib/rails/railtie.rb#236 - def register_block_for(type, &blk); end - - # @return [Boolean] - # - # source://railties//lib/rails/railtie.rb#216 - def respond_to_missing?(name, _); end - end -end - -# source://railties//lib/rails/railtie.rb#142 -Rails::Railtie::ABSTRACT_RAILTIES = T.let(T.unsafe(nil), Array) - -# source://railties//lib/rails/railtie/configuration.rb#7 -class Rails::Railtie::Configuration - # @return [Configuration] a new instance of Configuration - # - # source://railties//lib/rails/railtie/configuration.rb#8 - def initialize; end - - # Last configurable block to run. Called after frameworks initialize. - # - # source://railties//lib/rails/railtie/configuration.rb#70 - def after_initialize(&block); end - - # This allows you to modify application's generators from Railties. - # - # Values set on app_generators will become defaults for application, unless - # application overwrites them. - # - # @yield [@@app_generators] - # - # source://railties//lib/rails/railtie/configuration.rb#47 - def app_generators; end - - # This allows you to modify the application's middlewares from Engines. - # - # All operations you run on the app_middleware will be replayed on the - # application once it is defined and the default_middlewares are - # created - # - # source://railties//lib/rails/railtie/configuration.rb#39 - def app_middleware; end - - # First configurable block to run. Called before any initializers are run. - # - # source://railties//lib/rails/railtie/configuration.rb#54 - def before_configuration(&block); end - - # Third configurable block to run. Does not run if +config.eager_load+ - # set to false. - # - # source://railties//lib/rails/railtie/configuration.rb#60 - def before_eager_load(&block); end - - # Second configurable block to run. Called before frameworks initialize. - # - # source://railties//lib/rails/railtie/configuration.rb#65 - def before_initialize(&block); end - - # All namespaces that are eager loaded - # - # source://railties//lib/rails/railtie/configuration.rb#18 - def eager_load_namespaces; end - - # @return [Boolean] - # - # source://railties//lib/rails/railtie/configuration.rb#85 - def respond_to?(name, include_private = T.unsafe(nil)); end - - # Defines generic callbacks to run before #after_initialize. Useful for - # Rails::Railtie subclasses. - # - # source://railties//lib/rails/railtie/configuration.rb#81 - def to_prepare(&blk); end - - # Array of callbacks defined by #to_prepare. - # - # source://railties//lib/rails/railtie/configuration.rb#75 - def to_prepare_blocks; end - - # Add directories that should be watched for change. - # The key of the hashes should be directories and the values should - # be an array of extensions to match in each directory. - # - # source://railties//lib/rails/railtie/configuration.rb#30 - def watchable_dirs; end - - # Add files that should be watched for change. - # - # source://railties//lib/rails/railtie/configuration.rb#23 - def watchable_files; end - - private - - # source://railties//lib/rails/railtie/configuration.rb#90 - def method_missing(name, *args, &blk); end - - class << self - # Expose the eager_load_namespaces at "module" level for convenience. - # - # source://railties//lib/rails/railtie/configuration.rb#13 - def eager_load_namespaces; end - end -end - -# Greatly inspired by Ara T. Howard's magnificent sekrets gem. 😘 -# -# source://railties//lib/rails/secrets.rb#9 -class Rails::Secrets - class << self - # source://railties//lib/rails/secrets.rb#46 - def decrypt(data); end - - # source://railties//lib/rails/secrets.rb#42 - def encrypt(data); end - - # source://railties//lib/rails/secrets.rb#38 - def key; end - - # source://railties//lib/rails/secrets.rb#25 - def parse(paths, env:); end - - # source://railties//lib/rails/secrets.rb#50 - def read; end - - # source://railties//lib/rails/secrets.rb#59 - def read_for_editing(&block); end - - # Sets the attribute root - # - # @param value the value to set the attribute root to. - # - # source://railties//lib/rails/secrets.rb#23 - def root=(_arg0); end - - # source://railties//lib/rails/secrets.rb#54 - def write(contents); end - - private - - # source://railties//lib/rails/secrets.rb#105 - def encryptor; end - - # @raise [MissingKeyError] - # - # source://railties//lib/rails/secrets.rb#64 - def handle_missing_key; end - - # source://railties//lib/rails/secrets.rb#74 - def key_path; end - - # source://railties//lib/rails/secrets.rb#78 - def path; end - - # source://railties//lib/rails/secrets.rb#82 - def preprocess(path); end - - # source://railties//lib/rails/secrets.rb#68 - def read_key_file; end - - # source://railties//lib/rails/secrets.rb#90 - def writing(contents); end - end -end - -# source://railties//lib/rails/secrets.rb#10 -class Rails::Secrets::MissingKeyError < ::RuntimeError - # @return [MissingKeyError] a new instance of MissingKeyError - # - # source://railties//lib/rails/secrets.rb#11 - def initialize; end -end - -# Implements the logic behind Rails::Command::NotesCommand. See rails notes --help for usage information. -# -# Annotation objects are triplets :line, :tag, :text that -# represent the line where the annotation lives, its tag, and its text. Note -# the filename is not stored. -# -# Annotations are looked for in comments and modulus whitespace they have to -# start with the tag optionally followed by a colon. Everything up to the end -# of the line (or closing ERB comment tag) is considered to be their text. -# -# source://railties//lib/rails/source_annotation_extractor.rb#13 -class Rails::SourceAnnotationExtractor - # @return [SourceAnnotationExtractor] a new instance of SourceAnnotationExtractor - # - # source://railties//lib/rails/source_annotation_extractor.rb#85 - def initialize(tag); end - - # Prints the mapping from filenames to annotations in +results+ ordered by filename. - # The +options+ hash is passed to each annotation's +to_s+. - # - # source://railties//lib/rails/source_annotation_extractor.rb#137 - def display(results, options = T.unsafe(nil)); end - - # If +file+ is the filename of a file that contains annotations this method returns - # a hash with a single entry that maps +file+ to an array of its annotations. - # Otherwise it returns an empty hash. - # - # source://railties//lib/rails/source_annotation_extractor.rb#125 - def extract_annotations_from(file, pattern); end - - # Returns a hash that maps filenames under +dirs+ (recursively) to arrays - # with their annotations. - # - # source://railties//lib/rails/source_annotation_extractor.rb#91 - def find(dirs); end - - # Returns a hash that maps filenames under +dir+ (recursively) to arrays - # with their annotations. Files with extensions registered in - # Rails::SourceAnnotationExtractor::Annotation.extensions are - # taken into account. Only files with annotations are included. - # - # source://railties//lib/rails/source_annotation_extractor.rb#99 - def find_in(dir); end - - # Returns the value of attribute tag. - # - # source://railties//lib/rails/source_annotation_extractor.rb#83 - def tag; end - - class << self - # Prints all annotations with tag +tag+ under the root directories +app+, - # +config+, +db+, +lib+, and +test+ (recursively). - # - # If +tag+ is nil, annotations with either default or registered tags are printed. - # - # Specific directories can be explicitly set using the :dirs key in +options+. - # - # Rails::SourceAnnotationExtractor.enumerate 'TODO|FIXME', dirs: %w(app lib), tag: true - # - # If +options+ has a :tag flag, it will be passed to each annotation's +to_s+. - # - # See SourceAnnotationExtractor#find_in for a list of file extensions that will be taken into account. - # - # This class method is the single entry point for the rails notes command. - # - # source://railties//lib/rails/source_annotation_extractor.rb#76 - def enumerate(tag = T.unsafe(nil), options = T.unsafe(nil)); end - end -end - -# source://railties//lib/rails/source_annotation_extractor.rb#14 -class Rails::SourceAnnotationExtractor::Annotation < ::Struct - # Returns a representation of the annotation that looks like this: - # - # [126] [TODO] This algorithm is simple and clearly correct, make it faster. - # - # If +options+ has a flag :tag the tag is shown as in the example above. - # Otherwise the string contains just line and text. - # - # source://railties//lib/rails/source_annotation_extractor.rb#55 - def to_s(options = T.unsafe(nil)); end - - class << self - # source://railties//lib/rails/source_annotation_extractor.rb#15 - def directories; end - - # source://railties//lib/rails/source_annotation_extractor.rb#35 - def extensions; end - - # Registers additional directories to be included - # Rails::SourceAnnotationExtractor::Annotation.register_directories("spec", "another") - # - # source://railties//lib/rails/source_annotation_extractor.rb#21 - def register_directories(*dirs); end - - # Registers new Annotations File Extensions - # Rails::SourceAnnotationExtractor::Annotation.register_extensions("css", "scss", "sass", "less", "js") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ } - # - # source://railties//lib/rails/source_annotation_extractor.rb#41 - def register_extensions(*exts, &block); end - - # Registers additional tags - # Rails::SourceAnnotationExtractor::Annotation.register_tags("TESTME", "DEPRECATEME") - # - # source://railties//lib/rails/source_annotation_extractor.rb#31 - def register_tags(*additional_tags); end - - # source://railties//lib/rails/source_annotation_extractor.rb#25 - def tags; end - end -end - -# source://railties//lib/rails/test_unit/runner.rb#10 -module Rails::TestUnit; end - -# source://railties//lib/rails/test_unit/runner.rb#105 -class Rails::TestUnit::CompositeFilter - # @return [CompositeFilter] a new instance of CompositeFilter - # - # source://railties//lib/rails/test_unit/runner.rb#108 - def initialize(runnable, filter, patterns); end - - # minitest uses === to find matching filters. - # - # source://railties//lib/rails/test_unit/runner.rb#115 - def ===(method); end - - # Returns the value of attribute named_filter. - # - # source://railties//lib/rails/test_unit/runner.rb#106 - def named_filter; end - - private - - # source://railties//lib/rails/test_unit/runner.rb#130 - def derive_line_filters(patterns); end - - # source://railties//lib/rails/test_unit/runner.rb#120 - def derive_named_filter(filter); end -end - -# source://railties//lib/rails/test_unit/runner.rb#141 -class Rails::TestUnit::Filter - # @return [Filter] a new instance of Filter - # - # source://railties//lib/rails/test_unit/runner.rb#142 - def initialize(runnable, file, line); end - - # source://railties//lib/rails/test_unit/runner.rb#147 - def ===(method); end - - private - - # source://railties//lib/rails/test_unit/runner.rb#159 - def definition_for(method); end -end - -# source://railties//lib/rails/test_unit/runner.rb#11 -class Rails::TestUnit::Runner - # source://railties//lib/rails/test_unit/runner.rb#12 - def filters; end - - class << self - # source://railties//lib/rails/test_unit/runner.rb#15 - def attach_before_load_options(opts); end - - # source://railties//lib/rails/test_unit/runner.rb#50 - def compose_filter(runnable, filter); end - - # source://railties//lib/rails/test_unit/runner.rb#12 - def filters; end - - # source://railties//lib/rails/test_unit/runner.rb#45 - def load_tests(argv); end - - # source://railties//lib/rails/test_unit/runner.rb#20 - def parse_options(argv); end - - # source://railties//lib/rails/test_unit/runner.rb#33 - def rake_run(argv = T.unsafe(nil)); end - - # source://railties//lib/rails/test_unit/runner.rb#39 - def run(argv = T.unsafe(nil)); end - - private - - # source://railties//lib/rails/test_unit/runner.rb#83 - def default_test_exclude_glob; end - - # source://railties//lib/rails/test_unit/runner.rb#79 - def default_test_glob; end - - # source://railties//lib/rails/test_unit/runner.rb#59 - def extract_filters(argv); end - - # source://railties//lib/rails/test_unit/runner.rb#95 - def list_tests(argv); end - - # @return [Boolean] - # - # source://railties//lib/rails/test_unit/runner.rb#91 - def path_argument?(arg); end - - # @return [Boolean] - # - # source://railties//lib/rails/test_unit/runner.rb#87 - def regexp_filter?(arg); end - end -end - -# source://railties//lib/rails/test_unit/railtie.rb#6 -class Rails::TestUnitRailtie < ::Rails::Railtie; end - -# source://railties//lib/rails/gem_version.rb#9 -module Rails::VERSION; end - -# source://railties//lib/rails/gem_version.rb#10 -Rails::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) - -# source://railties//lib/rails/gem_version.rb#11 -Rails::VERSION::MINOR = T.let(T.unsafe(nil), Integer) - -# source://railties//lib/rails/gem_version.rb#13 -Rails::VERSION::PRE = T.let(T.unsafe(nil), String) - -# source://railties//lib/rails/gem_version.rb#15 -Rails::VERSION::STRING = T.let(T.unsafe(nil), String) - -# source://railties//lib/rails/gem_version.rb#12 -Rails::VERSION::TINY = T.let(T.unsafe(nil), Integer) - -# source://railties//lib/rails/welcome_controller.rb#5 -class Rails::WelcomeController < ::Rails::ApplicationController - # source://railties//lib/rails/welcome_controller.rb#9 - def index; end - - private - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#328 - def _layout(lookup_context, formats); end - - class << self - # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68 - def __callbacks; end - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#209 - def _layout; end - - # source://actionview/7.0.8.7/lib/action_view/layouts.rb#210 - def _layout_conditions; end - - # source://actionpack/7.0.8.7/lib/action_controller/metal.rb#210 - def middleware_stack; end - end -end diff --git a/sorbet/rbi/gems/railties@7.2.3.1.rbi b/sorbet/rbi/gems/railties@7.2.3.1.rbi new file mode 100644 index 000000000..7177fb0e4 --- /dev/null +++ b/sorbet/rbi/gems/railties@7.2.3.1.rbi @@ -0,0 +1,3192 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `railties` gem. +# Please instead update this file by running `bin/tapioca gem railties`. + + +# :include: ../README.rdoc +# :enddoc: +# +# pkg:gem/railties#lib/rails/gem_version.rb:3 +module Rails + extend ::ActiveSupport::Autoload + extend ::ActiveSupport::Benchmarkable + + class << self + # pkg:gem/railties#lib/rails.rb:44 + def app_class; end + + # pkg:gem/railties#lib/rails.rb:44 + def app_class=(_arg0); end + + # pkg:gem/railties#lib/rails.rb:45 + def application; end + + # pkg:gem/railties#lib/rails.rb:43 + def application=(_arg0); end + + # pkg:gem/railties#lib/rails.rb:126 + def autoloaders; end + + # pkg:gem/railties#lib/rails.rb:56 + def backtrace_cleaner; end + + # pkg:gem/railties#lib/rails.rb:44 + def cache; end + + # pkg:gem/railties#lib/rails.rb:44 + def cache=(_arg0); end + + # The Configuration instance used to configure the \Rails environment + # + # pkg:gem/railties#lib/rails.rb:52 + def configuration; end + + # pkg:gem/railties#lib/rails/deprecator.rb:4 + def deprecator; end + + # Returns the current \Rails environment. + # + # Rails.env # => "development" + # Rails.env.development? # => true + # Rails.env.production? # => false + # Rails.env.local? # => true true for "development" and "test", false for anything else + # + # pkg:gem/railties#lib/rails.rb:75 + def env; end + + # Sets the \Rails environment. + # + # Rails.env = "staging" # => "staging" + # + # pkg:gem/railties#lib/rails.rb:82 + def env=(environment); end + + # Returns the ActiveSupport::ErrorReporter of the current \Rails project, + # otherwise it returns +nil+ if there is no project. + # + # Rails.error.handle(IOError) do + # # ... + # end + # Rails.error.report(error) + # + # pkg:gem/railties#lib/rails.rb:93 + def error; end + + # Returns the currently loaded version of \Rails as a +Gem::Version+. + # + # pkg:gem/railties#lib/rails/gem_version.rb:5 + def gem_version; end + + # Returns all \Rails groups for loading based on: + # + # * The \Rails environment; + # * The environment variable RAILS_GROUPS; + # * The optional envs given as argument and the hash with group dependencies; + # + # Rails.groups assets: [:development, :test] + # # => [:default, "development", :assets] for Rails.env == "development" + # # => [:default, "production"] for Rails.env == "production" + # + # pkg:gem/railties#lib/rails.rb:106 + def groups(*groups); end + + # pkg:gem/railties#lib/rails.rb:49 + def initialize!(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails.rb:49 + def initialized?(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails.rb:44 + def logger; end + + # pkg:gem/railties#lib/rails.rb:44 + def logger=(_arg0); end + + # Returns a Pathname object of the public folder of the current + # \Rails project, otherwise it returns +nil+ if there is no project: + # + # Rails.public_path + # # => # + # + # pkg:gem/railties#lib/rails.rb:122 + def public_path; end + + # Returns a Pathname object of the current \Rails project, + # otherwise it returns +nil+ if there is no project: + # + # Rails.root + # # => # + # + # pkg:gem/railties#lib/rails.rb:65 + def root; end + + # Returns the currently loaded version of \Rails as a string. + # + # pkg:gem/railties#lib/rails/version.rb:7 + def version; end + end +end + +# An Engine with the responsibility of coordinating the whole boot process. +# +# == Initialization +# +# Rails::Application is responsible for executing all railties and engines +# initializers. It also executes some bootstrap initializers (check +# Rails::Application::Bootstrap) and finishing initializers, after all the others +# are executed (check Rails::Application::Finisher). +# +# == \Configuration +# +# Besides providing the same configuration as Rails::Engine and Rails::Railtie, +# the application object has several specific configurations, for example +# +enable_reloading+, +consider_all_requests_local+, +filter_parameters+, +# +logger+, and so forth. +# +# Check Rails::Application::Configuration to see them all. +# +# == Routes +# +# The application object is also responsible for holding the routes and reloading routes +# whenever the files change in development. +# +# == Middlewares +# +# The Application is also responsible for building the middleware stack. +# +# == Booting process +# +# The application is also responsible for setting up and executing the booting +# process. From the moment you require config/application.rb in your app, +# the booting process goes like this: +# +# 1. require "config/boot.rb" to set up load paths. +# 2. +require+ railties and engines. +# 3. Define +Rails.application+ as class MyApp::Application < Rails::Application. +# 4. Run +config.before_configuration+ callbacks. +# 5. Load config/environments/ENV.rb. +# 6. Run +config.before_initialize+ callbacks. +# 7. Run Railtie#initializer defined by railties, engines, and application. +# One by one, each engine sets up its load paths and routes, and runs its config/initializers/* files. +# 8. Custom Railtie#initializers added by railties, engines, and applications are executed. +# 9. Build the middleware stack and run +to_prepare+ callbacks. +# 10. Run +config.before_eager_load+ and +eager_load!+ if +eager_load+ is +true+. +# 11. Run +config.after_initialize+ callbacks. +# +# pkg:gem/railties#lib/rails/application.rb:61 +class Rails::Application < ::Rails::Engine + # pkg:gem/railties#lib/rails/application.rb:108 + def initialize(initial_variable_values = T.unsafe(nil), &block); end + + # pkg:gem/railties#lib/rails/application.rb:99 + def assets; end + + # pkg:gem/railties#lib/rails/application.rb:99 + def assets=(_arg0); end + + # pkg:gem/railties#lib/rails/application.rb:101 + def autoloaders; end + + # pkg:gem/railties#lib/rails/application.rb:553 + def build_middleware_stack; end + + # pkg:gem/railties#lib/rails/application.rb:446 + def config; end + + # pkg:gem/railties#lib/rails/application.rb:450 + def config=(_arg0); end + + # Convenience for loading config/foo.yml for the current \Rails env. + # Example: + # + # # config/exception_notification.yml: + # production: + # url: http://127.0.0.1:8080 + # namespace: my_app_production + # + # development: + # url: http://localhost:3001 + # namespace: my_app_development + # + # + # + # # config/environments/production.rb + # Rails.application.configure do + # config.middleware.use ExceptionNotifier, config_for(:exception_notification) + # end + # + # You can also store configurations in a shared section which will be merged + # with the environment configuration + # + # # config/example.yml + # shared: + # foo: + # bar: + # baz: 1 + # + # development: + # foo: + # bar: + # qux: 2 + # + # + # + # # development environment + # Rails.application.config_for(:example)[:foo][:bar] + # # => { baz: 1, qux: 2 } + # + # pkg:gem/railties#lib/rails/application.rb:283 + def config_for(name, env: T.unsafe(nil)); end + + # Sends any console called in the instance of a new application up + # to the +console+ method defined in Rails::Railtie. + # + # pkg:gem/railties#lib/rails/application.rb:366 + def console(&blk); end + + # Returns an ActiveSupport::EncryptedConfiguration instance for the + # credentials file specified by +config.credentials.content_path+. + # + # By default, +config.credentials.content_path+ will point to either + # config/credentials/#{environment}.yml.enc for the current + # environment (for example, +config/credentials/production.yml.enc+ for the + # +production+ environment), or +config/credentials.yml.enc+ if that file + # does not exist. + # + # The encryption key is taken from either ENV["RAILS_MASTER_KEY"], + # or from the file specified by +config.credentials.key_path+. By default, + # +config.credentials.key_path+ will point to either + # config/credentials/#{environment}.key for the current + # environment, or +config/master.key+ if that file does not exist. + # + # pkg:gem/railties#lib/rails/application.rb:490 + def credentials; end + + # Returns an ActiveSupport::EncryptedConfiguration instance for the + # credentials file specified by +config.credentials.content_path+. + # + # By default, +config.credentials.content_path+ will point to either + # config/credentials/#{environment}.yml.enc for the current + # environment (for example, +config/credentials/production.yml.enc+ for the + # +production+ environment), or +config/credentials.yml.enc+ if that file + # does not exist. + # + # The encryption key is taken from either ENV["RAILS_MASTER_KEY"], + # or from the file specified by +config.credentials.key_path+. By default, + # +config.credentials.key_path+ will point to either + # config/credentials/#{environment}.key for the current + # environment, or +config/master.key+ if that file does not exist. + # + # pkg:gem/railties#lib/rails/application.rb:451 + def credentials=(_arg0); end + + # pkg:gem/railties#lib/rails/application.rb:103 + def default_url_options(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/application.rb:103 + def default_url_options=(arg); end + + # A managed collection of deprecators (ActiveSupport::Deprecation::Deprecators). + # The collection's configuration methods affect all deprecators in the + # collection. Additionally, the collection's +silence+ method silences all + # deprecators in the collection for the duration of a given block. + # + # pkg:gem/railties#lib/rails/application.rb:239 + def deprecators; end + + # Eager loads the application code. + # + # pkg:gem/railties#lib/rails/application.rb:548 + def eager_load!; end + + # Returns an ActiveSupport::EncryptedConfiguration instance for an encrypted + # file. By default, the encryption key is taken from either + # ENV["RAILS_MASTER_KEY"], or from the +config/master.key+ file. + # + # my_config = Rails.application.encrypted("config/my_config.enc") + # + # my_config.read + # # => "foo:\n bar: 123\n" + # + # my_config.foo.bar + # # => 123 + # + # Encrypted files can be edited with the bin/rails encrypted:edit + # command. (See the output of bin/rails encrypted:edit --help for + # more information.) + # + # pkg:gem/railties#lib/rails/application.rb:509 + def encrypted(path, key_path: T.unsafe(nil), env_key: T.unsafe(nil)); end + + # Stores some of the \Rails initial environment parameters which + # will be used by middlewares and engines to configure themselves. + # + # pkg:gem/railties#lib/rails/application.rb:312 + def env_config; end + + # pkg:gem/railties#lib/rails/application.rb:101 + def executor; end + + # Sends any generators called in the instance of a new application up + # to the +generators+ method defined in Rails::Railtie. + # + # pkg:gem/railties#lib/rails/application.rb:372 + def generators(&blk); end + + # pkg:gem/railties#lib/rails/application.rb:522 + def helpers_paths; end + + # Initialize the application passing the given group. By default, the + # group is :default + # + # pkg:gem/railties#lib/rails/application.rb:433 + def initialize!(group = T.unsafe(nil)); end + + # Returns true if the application is initialized. + # + # pkg:gem/railties#lib/rails/application.rb:133 + def initialized?; end + + # Sends the initializers to the +initializer+ method defined in the + # Rails::Initializable module. Each Rails::Application class has its own + # set of initializers, as defined by the Initializable module. + # + # pkg:gem/railties#lib/rails/application.rb:354 + def initializer(name, opts = T.unsafe(nil), &block); end + + # pkg:gem/railties#lib/rails/application.rb:440 + def initializers; end + + # Sends the +isolate_namespace+ method up to the class method. + # + # pkg:gem/railties#lib/rails/application.rb:383 + def isolate_namespace(mod); end + + # Returns a key generator (ActiveSupport::CachingKeyGenerator) for a + # specified +secret_key_base+. The return value is memoized, so additional + # calls with the same +secret_key_base+ will return the same key generator + # instance. + # + # pkg:gem/railties#lib/rails/application.rb:167 + def key_generator(secret_key_base = T.unsafe(nil)); end + + # pkg:gem/railties#lib/rails/application.rb:542 + def load_generators(app = T.unsafe(nil)); end + + # Returns a message verifier object. + # + # This verifier can be used to generate and verify signed messages in the application. + # + # It is recommended not to use the same verifier for different things, so you can get different + # verifiers passing the +verifier_name+ argument. + # + # For instance, +ActiveStorage::Blob.signed_id_verifier+ is implemented using this feature, which assures that + # the IDs strings haven't been tampered with and are safe to use in a finder. + # + # See the ActiveSupport::MessageVerifier documentation for more information. + # + # ==== Parameters + # + # * +verifier_name+ - the name of the message verifier. + # + # ==== Examples + # + # message = Rails.application.message_verifier('my_purpose').generate('data to sign against tampering') + # Rails.application.message_verifier('my_purpose').verify(message) + # # => 'data to sign against tampering' + # + # pkg:gem/railties#lib/rails/application.rb:231 + def message_verifier(verifier_name); end + + # Returns a message verifier factory (ActiveSupport::MessageVerifiers). This + # factory can be used as a central point to configure and create message + # verifiers (ActiveSupport::MessageVerifier) for your application. + # + # By default, message verifiers created by this factory will generate + # messages using the default ActiveSupport::MessageVerifier options. You can + # override these options with a combination of + # ActiveSupport::MessageVerifiers#clear_rotations and + # ActiveSupport::MessageVerifiers#rotate. However, this must be done prior + # to building any message verifier instances. For example, in a + # +before_initialize+ block: + # + # # Use `url_safe: true` when generating messages + # config.before_initialize do |app| + # app.message_verifiers.clear_rotations + # app.message_verifiers.rotate(url_safe: true) + # end + # + # Message verifiers created by this factory will always use a secret derived + # from #secret_key_base when generating messages. +clear_rotations+ will not + # affect this behavior. However, older +secret_key_base+ values can be + # rotated for verifying messages: + # + # # Fall back to old `secret_key_base` when verifying messages + # config.before_initialize do |app| + # app.message_verifiers.rotate(secret_key_base: "old secret_key_base") + # end + # + # pkg:gem/railties#lib/rails/application.rb:203 + def message_verifiers; end + + # Return an array of railties respecting the order they're loaded + # and the order specified by the +railties_order+ config. + # + # While running initializers we need engines in reverse order here when + # copying migrations from railties ; we need them in the order given by + # +railties_order+. + # + # pkg:gem/railties#lib/rails/application.rb:538 + def migration_railties; end + + # Returns the dasherized application name. + # + # MyApp::Application.new.name => "my-app" + # + # pkg:gem/railties#lib/rails/application.rb:140 + def name; end + + # If you try to define a set of Rake tasks on the instance, these will get + # passed up to the Rake tasks defined on the application's class. + # + # pkg:gem/railties#lib/rails/application.rb:347 + def rake_tasks(&block); end + + # Reload application routes regardless if they changed or not. + # + # pkg:gem/railties#lib/rails/application.rb:159 + def reload_routes!; end + + # pkg:gem/railties#lib/rails/application.rb:101 + def reloader; end + + # pkg:gem/railties#lib/rails/application.rb:101 + def reloaders; end + + # pkg:gem/railties#lib/rails/application.rb:409 + def require_environment!; end + + # pkg:gem/railties#lib/rails/application.rb:414 + def routes_reloader; end + + # pkg:gem/railties#lib/rails/application.rb:144 + def run_load_hooks!; end + + # Sends any runner called in the instance of a new application up + # to the +runner+ method defined in Rails::Railtie. + # + # pkg:gem/railties#lib/rails/application.rb:360 + def runner(&blk); end + + # pkg:gem/railties#lib/rails/application.rb:99 + def sandbox; end + + # pkg:gem/railties#lib/rails/application.rb:99 + def sandbox=(_arg0); end + + # pkg:gem/railties#lib/rails/application.rb:100 + def sandbox?; end + + # The secret_key_base is used as the input secret to the application's key generator, which in turn + # is used to create all ActiveSupport::MessageVerifier and ActiveSupport::MessageEncryptor instances, + # including the ones that sign and encrypt cookies. + # + # We look for it first in ENV["SECRET_KEY_BASE"], then in + # +credentials.secret_key_base+. For most applications, the correct place + # to store it is in the encrypted credentials file. + # + # In development and test, if the secret_key_base is still empty, it is + # randomly generated and stored in a temporary file in + # tmp/local_secret.txt. + # + # Generating a random secret_key_base and storing it in + # tmp/local_secret.txt can also be triggered by setting + # ENV["SECRET_KEY_BASE_DUMMY"]. This is useful when precompiling + # assets for production as part of a build step that otherwise does not + # need access to the production secrets. + # + # Dockerfile example: RUN SECRET_KEY_BASE_DUMMY=1 bundle exec rails assets:precompile. + # + # pkg:gem/railties#lib/rails/application.rb:472 + def secret_key_base; end + + # Sends any server called in the instance of a new application up + # to the +server+ method defined in Rails::Railtie. + # + # pkg:gem/railties#lib/rails/application.rb:378 + def server(&blk); end + + # pkg:gem/railties#lib/rails/application.rb:518 + def to_app; end + + # Returns an array of file paths appended with a hash of + # directories-extensions suitable for ActiveSupport::FileUpdateChecker + # API. + # + # pkg:gem/railties#lib/rails/application.rb:421 + def watchable_args; end + + protected + + # pkg:gem/railties#lib/rails/application.rb:621 + def default_middleware_stack; end + + # pkg:gem/railties#lib/rails/application.rb:626 + def ensure_generator_templates_added; end + + # Returns the ordered railties for this application considering railties_order. + # + # pkg:gem/railties#lib/rails/application.rb:587 + def ordered_railties; end + + # pkg:gem/railties#lib/rails/application.rb:609 + def railties_initializers(current); end + + # pkg:gem/railties#lib/rails/application.rb:576 + def run_console_blocks(app); end + + # pkg:gem/railties#lib/rails/application.rb:566 + def run_generators_blocks(app); end + + # pkg:gem/railties#lib/rails/application.rb:571 + def run_runner_blocks(app); end + + # pkg:gem/railties#lib/rails/application.rb:581 + def run_server_blocks(app); end + + # pkg:gem/railties#lib/rails/application.rb:555 + def run_tasks_blocks(app); end + + private + + # pkg:gem/railties#lib/rails/application.rb:639 + def build_middleware; end + + # pkg:gem/railties#lib/rails/application.rb:632 + def build_request(env); end + + # pkg:gem/railties#lib/rails/application.rb:643 + def coerce_same_site_protection(protection); end + + # pkg:gem/railties#lib/rails/application.rb:647 + def filter_parameters; end + + class << self + # This method is called just after an application inherits from Rails::Application, + # allowing the developer to load classes in lib and use them during application + # configuration. + # + # class MyApplication < Rails::Application + # require "my_backend" # in lib/my_backend + # config.i18n.backend = MyBackend + # end + # + # Notice this method takes into consideration the default root path. So if you + # are changing config.root inside your application definition or having a custom + # Rails application, you will need to add lib to $LOAD_PATH on your own in case + # you need to load files in lib/ during the application configuration as well. + # + # pkg:gem/railties#lib/rails/application.rb:402 + def add_lib_to_load_path!(root); end + + # pkg:gem/railties#lib/rails/application.rb:83 + def create(initial_variable_values = T.unsafe(nil), &block); end + + # pkg:gem/railties#lib/rails/application.rb:87 + def find_root(from); end + + # pkg:gem/railties#lib/rails/application.rb:70 + def inherited(base); end + + # pkg:gem/railties#lib/rails/application.rb:79 + def instance; end + + # pkg:gem/railties#lib/rails/application.rb:96 + def new(*_arg0); end + end +end + +# pkg:gem/railties#lib/rails/application/bootstrap.rb:11 +module Rails::Application::Bootstrap + include ::Rails::Initializable + extend ::Rails::Initializable::ClassMethods +end + +# pkg:gem/railties#lib/rails/application/configuration.rb:13 +class Rails::Application::Configuration < ::Rails::Engine::Configuration + # pkg:gem/railties#lib/rails/application/configuration.rb:30 + def initialize(*_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def add_autoload_paths_to_load_path; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def add_autoload_paths_to_load_path=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def allow_concurrency; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def allow_concurrency=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:560 + def annotations; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:28 + def api_only; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:373 + def api_only=(value); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def asset_host; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def asset_host=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def assume_ssl; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def assume_ssl=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def autoflush_log; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def autoflush_log=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:468 + def autoload_lib(ignore:); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:480 + def autoload_lib_once(ignore:); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def beginning_of_week; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def beginning_of_week=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:385 + def broadcast_log_level; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def cache_classes; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def cache_classes=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def cache_store; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def cache_store=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:492 + def colorize_logging; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:496 + def colorize_logging=(val); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def consider_all_requests_local; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def consider_all_requests_local=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def console; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def console=(_arg0); end + + # Configures the ActionDispatch::ContentSecurityPolicy. + # + # pkg:gem/railties#lib/rails/application/configuration.rb:565 + def content_security_policy(&block); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def content_security_policy_nonce_directives; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def content_security_policy_nonce_directives=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def content_security_policy_nonce_generator; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def content_security_policy_nonce_generator=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def content_security_policy_report_only; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def content_security_policy_report_only=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def credentials; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def credentials=(_arg0); end + + # Loads and returns the entire raw configuration of database from + # values stored in config/database.yml. + # + # pkg:gem/railties#lib/rails/application/configuration.rb:431 + def database_configuration; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:387 + def debug_exception_response_format; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:391 + def debug_exception_response_format=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:582 + def default_log_file; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def disable_sandbox; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def disable_sandbox=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def dom_testing_default_html_version; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def dom_testing_default_html_version=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def eager_load; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def eager_load=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:349 + def enable_reloading; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:353 + def enable_reloading=(value); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:28 + def encoding; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:365 + def encoding=(value); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def exceptions_app; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def exceptions_app=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def file_watcher; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def file_watcher=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def filter_parameters; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def filter_parameters=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def filter_redirect; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def filter_redirect=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def force_ssl; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def force_ssl=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def helpers_paths; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def helpers_paths=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def host_authorization; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def host_authorization=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def hosts; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def hosts=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:594 + def inspect; end + + # Load the config/database.yml to create the Rake tasks for + # multiple databases without loading the environment and filling in the + # environment specific configuration values. + # + # Do not use this method, use #database_configuration instead. + # + # pkg:gem/railties#lib/rails/application/configuration.rb:413 + def load_database_yaml; end + + # Loads default configuration values for a target version. This includes + # defaults for versions prior to the target version. See the + # {configuration guide}[https://guides.rubyonrails.org/configuring.html#versioned-default-values] + # for the default values associated with a particular version. + # + # pkg:gem/railties#lib/rails/application/configuration.rb:91 + def load_defaults(target_version); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:28 + def loaded_config_version; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def log_file_size; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def log_file_size=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def log_formatter; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def log_formatter=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:28 + def log_level; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:380 + def log_level=(level); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def log_tags; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def log_tags=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def logger; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def logger=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:393 + def paths; end + + # Configures the ActionDispatch::PermissionsPolicy. + # + # pkg:gem/railties#lib/rails/application/configuration.rb:574 + def permissions_policy(&block); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def precompile_filter_parameters; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def precompile_filter_parameters=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def public_file_server; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def public_file_server=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def railties_order; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def railties_order=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def rake_eager_load; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def rake_eager_load=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:357 + def read_encrypted_secrets; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:361 + def read_encrypted_secrets=(value); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def relative_url_root; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def relative_url_root=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def reload_classes_only_on_change; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def reload_classes_only_on_change=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:345 + def reloading_enabled?; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def require_master_key; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def require_master_key=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def sandbox_by_default; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def sandbox_by_default=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:501 + def secret_key_base; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:513 + def secret_key_base=(new_secret_key_base); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def server_timing; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def server_timing=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def session_options; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def session_options=(_arg0); end + + # Specifies what class to use to store the session. Possible values + # are +:cache_store+, +:cookie_store+, +:mem_cache_store+, a custom + # store, or +:disabled+. +:disabled+ tells \Rails not to deal with + # sessions. + # + # Additional options will be set as +session_options+: + # + # config.session_store :cookie_store, key: "_your_app_session" + # config.session_options # => {key: "_your_app_session"} + # + # If a custom store is specified as a symbol, it will be resolved to + # the +ActionDispatch::Session+ namespace: + # + # # use ActionDispatch::Session::MyCustomStore as the session store + # config.session_store :my_custom_store + # + # pkg:gem/railties#lib/rails/application/configuration.rb:540 + def session_store(new_session_store = T.unsafe(nil), **options); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:556 + def session_store?; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def ssl_options; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def ssl_options=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def time_zone; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def time_zone=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def x; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def x=(_arg0); end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def yjit; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:14 + def yjit=(_arg0); end + + private + + # pkg:gem/railties#lib/rails/application/configuration.rb:621 + def credentials_defaults; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:631 + def generate_local_secret; end +end + +# pkg:gem/railties#lib/rails/application/configuration.rb:598 +class Rails::Application::Configuration::Custom + # pkg:gem/railties#lib/rails/application/configuration.rb:599 + def initialize; end + + # pkg:gem/railties#lib/rails/application/configuration.rb:603 + def method_missing(method, *args); end + + private + + # pkg:gem/railties#lib/rails/application/configuration.rb:615 + def respond_to_missing?(symbol, _); end +end + +# pkg:gem/railties#lib/rails/application/default_middleware_stack.rb:5 +class Rails::Application::DefaultMiddlewareStack + # pkg:gem/railties#lib/rails/application/default_middleware_stack.rb:8 + def initialize(app, config, paths); end + + # pkg:gem/railties#lib/rails/application/default_middleware_stack.rb:6 + def app; end + + # pkg:gem/railties#lib/rails/application/default_middleware_stack.rb:14 + def build_stack; end + + # pkg:gem/railties#lib/rails/application/default_middleware_stack.rb:6 + def config; end + + # pkg:gem/railties#lib/rails/application/default_middleware_stack.rb:6 + def paths; end + + private + + # pkg:gem/railties#lib/rails/application/default_middleware_stack.rb:109 + def load_rack_cache; end + + # pkg:gem/railties#lib/rails/application/default_middleware_stack.rb:131 + def show_exceptions_app; end +end + +# pkg:gem/railties#lib/rails/application/finisher.rb:11 +module Rails::Application::Finisher + include ::Rails::Initializable + extend ::Rails::Initializable::ClassMethods +end + +# pkg:gem/railties#lib/rails/application/finisher.rb:111 +module Rails::Application::Finisher::InterlockHook + class << self + # pkg:gem/railties#lib/rails/application/finisher.rb:116 + def complete(_state); end + + # pkg:gem/railties#lib/rails/application/finisher.rb:112 + def run; end + end +end + +# pkg:gem/railties#lib/rails/application/finisher.rb:97 +class Rails::Application::Finisher::MonitorHook + # pkg:gem/railties#lib/rails/application/finisher.rb:98 + def initialize(monitor = T.unsafe(nil)); end + + # pkg:gem/railties#lib/rails/application/finisher.rb:106 + def complete(_state); end + + # pkg:gem/railties#lib/rails/application/finisher.rb:102 + def run; end +end + +# pkg:gem/railties#lib/rails/application.rb:105 +Rails::Application::INITIAL_VARIABLES = T.let(T.unsafe(nil), Array) + +# pkg:gem/railties#lib/rails/application/routes_reloader.rb:7 +class Rails::Application::RoutesReloader + include ::ActiveSupport::Callbacks + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActiveSupport::DescendantsTracker + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:15 + def initialize; end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:8 + def __callbacks; end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:8 + def __callbacks?; end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:11 + def eager_load; end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:11 + def eager_load=(_arg0); end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:13 + def execute(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:13 + def execute_if_updated(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:10 + def external_routes; end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:10 + def paths; end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:22 + def reload!; end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:10 + def route_sets; end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:12 + def run_after_load_paths=(_arg0); end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:13 + def updated?(*_arg0, **_arg1, &_arg2); end + + private + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:42 + def clear!; end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:58 + def finalize!; end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:49 + def load_paths; end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:62 + def revert; end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:54 + def run_after_load_paths; end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:32 + def updater; end + + class << self + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:8 + def __callbacks; end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:8 + def __callbacks=(value); end + + # pkg:gem/railties#lib/rails/application/routes_reloader.rb:8 + def __callbacks?; end + end +end + +# pkg:gem/railties#lib/rails/application_controller.rb:3 +class Rails::ApplicationController < ::ActionController::Base + private + + # pkg:gem/railties#lib/rails/application_controller.rb:3 + def _layout(lookup_context, formats, keys); end + + # pkg:gem/railties#lib/rails/application_controller.rb:25 + def disable_content_security_policy_nonce!; end + + # pkg:gem/railties#lib/rails/application_controller.rb:21 + def local_request?; end + + # pkg:gem/railties#lib/rails/application_controller.rb:15 + def require_local!; end + + class << self + # pkg:gem/railties#lib/rails/application_controller.rb:7 + def __callbacks; end + + # pkg:gem/railties#lib/rails/application_controller.rb:5 + def _layout; end + + # pkg:gem/railties#lib/rails/application_controller.rb:5 + def _layout_conditions; end + + # pkg:gem/railties#lib/rails/application_controller.rb:3 + def middleware_stack; end + end +end + +# pkg:gem/railties#lib/rails/autoloaders.rb:4 +class Rails::Autoloaders + include ::Enumerable + + # pkg:gem/railties#lib/rails/autoloaders.rb:11 + def initialize; end + + # pkg:gem/railties#lib/rails/autoloaders.rb:31 + def each; end + + # pkg:gem/railties#lib/rails/autoloaders.rb:40 + def log!; end + + # pkg:gem/railties#lib/rails/autoloaders.rb:36 + def logger=(logger); end + + # pkg:gem/railties#lib/rails/autoloaders.rb:9 + def main; end + + # pkg:gem/railties#lib/rails/autoloaders.rb:9 + def once; end + + # pkg:gem/railties#lib/rails/autoloaders.rb:44 + def zeitwerk_enabled?; end +end + +# pkg:gem/railties#lib/rails/autoloaders/inflector.rb:7 +module Rails::Autoloaders::Inflector + class << self + # pkg:gem/railties#lib/rails/autoloaders/inflector.rb:12 + def camelize(basename, _abspath); end + + # pkg:gem/railties#lib/rails/autoloaders/inflector.rb:16 + def inflect(overrides); end + end +end + +# pkg:gem/railties#lib/rails/backtrace_cleaner.rb:7 +class Rails::BacktraceCleaner < ::ActiveSupport::BacktraceCleaner + # pkg:gem/railties#lib/rails/backtrace_cleaner.rb:11 + def initialize; end + + # pkg:gem/railties#lib/rails/backtrace_cleaner.rb:29 + def clean(backtrace, kind = T.unsafe(nil)); end + + # pkg:gem/railties#lib/rails/backtrace_cleaner.rb:36 + def clean_frame(frame, kind = T.unsafe(nil)); end + + # pkg:gem/railties#lib/rails/backtrace_cleaner.rb:34 + def filter(backtrace, kind = T.unsafe(nil)); end +end + +# pkg:gem/railties#lib/rails/backtrace_cleaner.rb:8 +Rails::BacktraceCleaner::APP_DIRS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/railties#lib/rails/backtrace_cleaner.rb:9 +Rails::BacktraceCleaner::RENDER_TEMPLATE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/railties#lib/rails/configuration.rb:9 +module Rails::Configuration; end + +# pkg:gem/railties#lib/rails/configuration.rb:104 +class Rails::Configuration::Generators + # pkg:gem/railties#lib/rails/configuration.rb:108 + def initialize; end + + # pkg:gem/railties#lib/rails/configuration.rb:130 + def after_generate(&block); end + + # pkg:gem/railties#lib/rails/configuration.rb:106 + def after_generate_callbacks; end + + # pkg:gem/railties#lib/rails/configuration.rb:105 + def aliases; end + + # pkg:gem/railties#lib/rails/configuration.rb:105 + def aliases=(_arg0); end + + # pkg:gem/railties#lib/rails/configuration.rb:105 + def api_only; end + + # pkg:gem/railties#lib/rails/configuration.rb:105 + def api_only=(_arg0); end + + # pkg:gem/railties#lib/rails/configuration.rb:134 + def apply_rubocop_autocorrect_after_generate!; end + + # pkg:gem/railties#lib/rails/configuration.rb:105 + def colorize_logging; end + + # pkg:gem/railties#lib/rails/configuration.rb:105 + def colorize_logging=(_arg0); end + + # pkg:gem/railties#lib/rails/configuration.rb:105 + def fallbacks; end + + # pkg:gem/railties#lib/rails/configuration.rb:105 + def fallbacks=(_arg0); end + + # pkg:gem/railties#lib/rails/configuration.rb:106 + def hidden_namespaces; end + + # pkg:gem/railties#lib/rails/configuration.rb:126 + def hide_namespace(namespace); end + + # pkg:gem/railties#lib/rails/configuration.rb:143 + def method_missing(method, *args); end + + # pkg:gem/railties#lib/rails/configuration.rb:105 + def options; end + + # pkg:gem/railties#lib/rails/configuration.rb:105 + def options=(_arg0); end + + # pkg:gem/railties#lib/rails/configuration.rb:105 + def templates; end + + # pkg:gem/railties#lib/rails/configuration.rb:105 + def templates=(_arg0); end + + private + + # pkg:gem/railties#lib/rails/configuration.rb:119 + def initialize_copy(source); end +end + +# MiddlewareStackProxy is a proxy for the \Rails middleware stack that allows +# you to configure middlewares in your application. It works basically as a +# command recorder, saving each command to be applied after initialization +# over the default middleware stack, so you can add, swap, or remove any +# middleware in \Rails. +# +# You can add your own middlewares by using the +config.middleware.use+ method: +# +# config.middleware.use Magical::Unicorns +# +# This will put the +Magical::Unicorns+ middleware on the end of the stack. +# You can use +insert_before+ if you wish to add a middleware before another: +# +# config.middleware.insert_before Rack::Head, Magical::Unicorns +# +# There's also +insert_after+ which will insert a middleware after another: +# +# config.middleware.insert_after Rack::Head, Magical::Unicorns +# +# Middlewares can also be completely swapped out and replaced with others: +# +# config.middleware.swap ActionDispatch::Flash, Magical::Unicorns +# +# Middlewares can be moved from one place to another: +# +# config.middleware.move_before ActionDispatch::Flash, Magical::Unicorns +# +# This will move the +Magical::Unicorns+ middleware before the +# +ActionDispatch::Flash+. You can also move it after: +# +# config.middleware.move_after ActionDispatch::Flash, Magical::Unicorns +# +# And finally they can also be removed from the stack completely: +# +# config.middleware.delete ActionDispatch::Flash +# +# pkg:gem/railties#lib/rails/configuration.rb:46 +class Rails::Configuration::MiddlewareStackProxy + # pkg:gem/railties#lib/rails/configuration.rb:47 + def initialize(operations = T.unsafe(nil), delete_operations = T.unsafe(nil)); end + + # pkg:gem/railties#lib/rails/configuration.rb:96 + def +(other); end + + # pkg:gem/railties#lib/rails/configuration.rb:70 + def delete(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/configuration.rb:56 + def insert(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/configuration.rb:58 + def insert_after(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/configuration.rb:52 + def insert_before(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/configuration.rb:88 + def merge_into(other); end + + # pkg:gem/railties#lib/rails/configuration.rb:78 + def move(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/configuration.rb:80 + def move_after(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/configuration.rb:74 + def move_before(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/configuration.rb:62 + def swap(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/configuration.rb:84 + def unshift(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/configuration.rb:66 + def use(*_arg0, **_arg1, &_arg2); end + + protected + + # pkg:gem/railties#lib/rails/configuration.rb:101 + def delete_operations; end + + # pkg:gem/railties#lib/rails/configuration.rb:101 + def operations; end +end + +# +Rails::Engine+ allows you to wrap a specific \Rails application or subset of +# functionality and share it with other applications or within a larger packaged application. +# Every Rails::Application is just an engine, which allows for simple +# feature and application sharing. +# +# Any +Rails::Engine+ is also a Rails::Railtie, so the same +# methods (like {rake_tasks}[rdoc-ref:Rails::Railtie::rake_tasks] and +# {generators}[rdoc-ref:Rails::Railtie::generators]) and configuration +# options that are available in railties can also be used in engines. +# +# == Creating an Engine +# +# If you want a gem to behave as an engine, you have to specify an +Engine+ +# for it somewhere inside your plugin's +lib+ folder (similar to how we +# specify a +Railtie+): +# +# # lib/my_engine.rb +# module MyEngine +# class Engine < Rails::Engine +# end +# end +# +# Then ensure that this file is loaded at the top of your config/application.rb +# (or in your +Gemfile+), and it will automatically load models, controllers, and helpers +# inside +app+, load routes at config/routes.rb, load locales at +# config/locales/**/*, and load tasks at lib/tasks/**/*. +# +# == Configuration +# +# Like railties, engines can access a config object which contains configuration shared by +# all railties and the application. +# Additionally, each engine can access autoload_paths, eager_load_paths and +# autoload_once_paths settings which are scoped to that engine. +# +# class MyEngine < Rails::Engine +# # Add a load path for this specific Engine +# config.autoload_paths << File.expand_path("lib/some/path", __dir__) +# +# initializer "my_engine.add_middleware" do |app| +# app.middleware.use MyEngine::Middleware +# end +# end +# +# == Generators +# +# You can set up generators for engines with config.generators method: +# +# class MyEngine < Rails::Engine +# config.generators do |g| +# g.orm :active_record +# g.template_engine :erb +# g.test_framework :test_unit +# end +# end +# +# You can also set generators for an application by using config.app_generators: +# +# class MyEngine < Rails::Engine +# # note that you can also pass block to app_generators in the same way you +# # can pass it to generators method +# config.app_generators.orm :datamapper +# end +# +# == Paths +# +# Applications and engines have flexible path configuration, meaning that you +# are not required to place your controllers at app/controllers, but +# in any place which you find convenient. +# +# For example, let's suppose you want to place your controllers in lib/controllers. +# You can set that as an option: +# +# class MyEngine < Rails::Engine +# paths["app/controllers"] = "lib/controllers" +# end +# +# You can also have your controllers loaded from both app/controllers and +# lib/controllers: +# +# class MyEngine < Rails::Engine +# paths["app/controllers"] << "lib/controllers" +# end +# +# The available paths in an engine are: +# +# class MyEngine < Rails::Engine +# paths["app"] # => ["app"] +# paths["app/controllers"] # => ["app/controllers"] +# paths["app/helpers"] # => ["app/helpers"] +# paths["app/models"] # => ["app/models"] +# paths["app/views"] # => ["app/views"] +# paths["lib"] # => ["lib"] +# paths["lib/tasks"] # => ["lib/tasks"] +# paths["config"] # => ["config"] +# paths["config/initializers"] # => ["config/initializers"] +# paths["config/locales"] # => ["config/locales"] +# paths["config/routes.rb"] # => ["config/routes.rb"] +# end +# +# The Application class adds a couple more paths to this set. And as in your +# Application, all folders under +app+ are automatically added to the load path. +# If you have an app/services folder for example, it will be added by default. +# +# == Endpoint +# +# An engine can also be a Rack application. It can be useful if you have a Rack application that +# you would like to provide with some of the +Engine+'s features. +# +# To do that, use the ::endpoint method: +# +# module MyEngine +# class Engine < Rails::Engine +# endpoint MyRackApplication +# end +# end +# +# Now you can mount your engine in application's routes: +# +# Rails.application.routes.draw do +# mount MyEngine::Engine => "/engine" +# end +# +# == Middleware stack +# +# As an engine can now be a Rack endpoint, it can also have a middleware +# stack. The usage is exactly the same as in Application: +# +# module MyEngine +# class Engine < Rails::Engine +# middleware.use SomeMiddleware +# end +# end +# +# == Routes +# +# If you don't specify an endpoint, routes will be used as the default +# endpoint. You can use them just like you use an application's routes: +# +# # ENGINE/config/routes.rb +# MyEngine::Engine.routes.draw do +# get "/" => "posts#index" +# end +# +# == Mount priority +# +# Note that now there can be more than one router in your application, and it's better to avoid +# passing requests through many routers. Consider this situation: +# +# Rails.application.routes.draw do +# mount MyEngine::Engine => "/blog" +# get "/blog/omg" => "main#omg" +# end +# +# +MyEngine+ is mounted at /blog, and /blog/omg points to application's +# controller. In such a situation, requests to /blog/omg will go through +MyEngine+, +# and if there is no such route in +Engine+'s routes, it will be dispatched to main#omg. +# It's much better to swap that: +# +# Rails.application.routes.draw do +# get "/blog/omg" => "main#omg" +# mount MyEngine::Engine => "/blog" +# end +# +# Now, +Engine+ will get only requests that were not handled by +Application+. +# +# == Engine name +# +# There are some places where an Engine's name is used: +# +# * routes: when you mount an Engine with mount(MyEngine::Engine => '/my_engine'), +# it's used as default :as option +# * rake task for installing migrations my_engine:install:migrations +# +# Engine name is set by default based on class name. For +MyEngine::Engine+ it will be +# my_engine_engine. You can change it manually using the engine_name method: +# +# module MyEngine +# class Engine < Rails::Engine +# engine_name "my_engine" +# end +# end +# +# == Isolated Engine +# +# Normally when you create controllers, helpers, and models inside an engine, they are treated +# as if they were created inside the application itself. This means that all helpers and +# named routes from the application will be available to your engine's controllers as well. +# +# However, sometimes you want to isolate your engine from the application, especially if your engine +# has its own router. To do that, you simply need to call ::isolate_namespace. This method requires +# you to pass a module where all your controllers, helpers, and models should be nested to: +# +# module MyEngine +# class Engine < Rails::Engine +# isolate_namespace MyEngine +# end +# end +# +# With such an engine, everything that is inside the +MyEngine+ module will be isolated from +# the application. +# +# Consider this controller: +# +# module MyEngine +# class FooController < ActionController::Base +# end +# end +# +# If the +MyEngine+ engine is marked as isolated, +FooController+ only has +# access to helpers from +MyEngine+, and url_helpers from +# MyEngine::Engine.routes. +# +# The next thing that changes in isolated engines is the behavior of routes. +# Normally, when you namespace your controllers, you also need to namespace +# the related routes. With an isolated engine, the engine's namespace is +# automatically applied, so you don't need to specify it explicitly in your +# routes: +# +# MyEngine::Engine.routes.draw do +# resources :articles +# end +# +# If +MyEngine+ is isolated, the routes above will point to +# +MyEngine::ArticlesController+. You also don't need to use longer +# URL helpers like +my_engine_articles_path+. Instead, you should simply use +# +articles_path+, like you would do with your main application. +# +# To make this behavior consistent with other parts of the framework, +# isolated engines also have an effect on ActiveModel::Naming. In a +# normal \Rails app, when you use a namespaced model such as +# +Namespace::Article+, ActiveModel::Naming will generate +# names with the prefix "namespace". In an isolated engine, the prefix will +# be omitted in URL helpers and form fields, for convenience. +# +# polymorphic_url(MyEngine::Article.new) +# # => "articles_path" # not "my_engine_articles_path" +# +# form_for(MyEngine::Article.new) do +# text_field :title # => +# end +# +# Additionally, an isolated engine will set its own name according to its +# namespace, so MyEngine::Engine.engine_name will return +# "my_engine". It will also set +MyEngine.table_name_prefix+ to "my_engine_", +# meaning for example that +MyEngine::Article+ will use the +# +my_engine_articles+ database table by default. +# +# == Using Engine's routes outside Engine +# +# Since you can now mount an engine inside application's routes, you do not have direct access to +Engine+'s +# url_helpers inside +Application+. When you mount an engine in an application's routes, a special helper is +# created to allow you to do that. Consider such a scenario: +# +# # config/routes.rb +# Rails.application.routes.draw do +# mount MyEngine::Engine => "/my_engine", as: "my_engine" +# get "/foo" => "foo#index" +# end +# +# Now, you can use the my_engine helper inside your application: +# +# class FooController < ApplicationController +# def index +# my_engine.root_url # => /my_engine/ +# end +# end +# +# There is also a main_app helper that gives you access to application's routes inside Engine: +# +# module MyEngine +# class BarController +# def index +# main_app.foo_path # => /foo +# end +# end +# end +# +# Note that the :as option given to mount takes the engine_name as default, so most of the time +# you can simply omit it. +# +# Finally, if you want to generate a URL to an engine's route using +# polymorphic_url, you also need to pass the engine helper. Let's +# say that you want to create a form pointing to one of the engine's routes. +# All you need to do is pass the helper as the first element in array with +# attributes for URL: +# +# form_for([my_engine, @user]) +# +# This code will use my_engine.user_path(@user) to generate the proper route. +# +# == Isolated engine's helpers +# +# Sometimes you may want to isolate an engine, but use helpers that are defined for it. +# If you want to share just a few specific helpers you can add them to application's +# helpers in ApplicationController: +# +# class ApplicationController < ActionController::Base +# helper MyEngine::SharedEngineHelper +# end +# +# If you want to include all of the engine's helpers, you can use the #helper method on an engine's +# instance: +# +# class ApplicationController < ActionController::Base +# helper MyEngine::Engine.helpers +# end +# +# It will include all of the helpers from engine's directory. Take into account this does +# not include helpers defined in controllers with helper_method or other similar solutions, +# only helpers defined in the helpers directory will be included. +# +# == Migrations & seed data +# +# Engines can have their own migrations. The default path for migrations is exactly the same +# as in application: db/migrate +# +# To use engine's migrations in application you can use the rake task below, which copies them to +# application's dir: +# +# $ rake ENGINE_NAME:install:migrations +# +# Note that some of the migrations may be skipped if a migration with the same name already exists +# in application. In such a situation you must decide whether to leave that migration or rename the +# migration in the application and rerun copying migrations. +# +# If your engine has migrations, you may also want to prepare data for the database in +# the db/seeds.rb file. You can load that data using the load_seed method, e.g. +# +# MyEngine::Engine.load_seed +# +# == Loading priority +# +# In order to change engine's priority you can use +config.railties_order+ in the main application. +# It will affect the priority of loading views, helpers, assets, and all the other files +# related to engine or application. +# +# # load Blog::Engine with highest priority, followed by application and other railties +# config.railties_order = [Blog::Engine, :main_app, :all] +# +# pkg:gem/railties#lib/rails/engine/railties.rb:4 +class Rails::Engine < ::Rails::Railtie + include ::ActiveSupport::Callbacks + extend ::ActiveSupport::Callbacks::ClassMethods + + # pkg:gem/railties#lib/rails/engine.rb:439 + def initialize; end + + # pkg:gem/railties#lib/rails/engine.rb:433 + def __callbacks; end + + # pkg:gem/railties#lib/rails/engine.rb:433 + def __callbacks?; end + + # pkg:gem/railties#lib/rails/engine.rb:434 + def _load_seed_callbacks; end + + # pkg:gem/railties#lib/rails/engine.rb:434 + def _run_load_seed_callbacks(&block); end + + # Returns the underlying Rack application for this engine. + # + # pkg:gem/railties#lib/rails/engine.rb:516 + def app; end + + # Define the Rack API for this engine. + # + # pkg:gem/railties#lib/rails/engine.rb:533 + def call(env); end + + # Define the configuration object for the engine. + # + # pkg:gem/railties#lib/rails/engine.rb:552 + def config; end + + # pkg:gem/railties#lib/rails/engine.rb:490 + def eager_load!; end + + # Returns the endpoint for this engine. If none is registered, + # defaults to an ActionDispatch::Routing::RouteSet. + # + # pkg:gem/railties#lib/rails/engine.rb:528 + def endpoint; end + + # pkg:gem/railties#lib/rails/engine.rb:437 + def engine_name(*_arg0, **_arg1, &_arg2); end + + # Defines additional Rack env configuration that is added on each call. + # + # pkg:gem/railties#lib/rails/engine.rb:539 + def env_config; end + + # Returns a module with all the helpers defined for the engine. + # + # pkg:gem/railties#lib/rails/engine.rb:500 + def helpers; end + + # Returns all registered helpers paths. + # + # pkg:gem/railties#lib/rails/engine.rb:511 + def helpers_paths; end + + # pkg:gem/railties#lib/rails/engine.rb:437 + def isolated?(&_arg0); end + + # Load console and invoke the registered hooks. + # Check Rails::Railtie.console for more info. + # + # pkg:gem/railties#lib/rails/engine.rb:453 + def load_console(app = T.unsafe(nil)); end + + # Load \Rails generators and invoke the registered hooks. + # Check Rails::Railtie.generators for more info. + # + # pkg:gem/railties#lib/rails/engine.rb:476 + def load_generators(app = T.unsafe(nil)); end + + # Load \Rails runner and invoke the registered hooks. + # Check Rails::Railtie.runner for more info. + # + # pkg:gem/railties#lib/rails/engine.rb:461 + def load_runner(app = T.unsafe(nil)); end + + # Load data from db/seeds.rb file. It can be used in to load engines' + # seeds, e.g.: + # + # Blog::Engine.load_seed + # + # pkg:gem/railties#lib/rails/engine.rb:560 + def load_seed; end + + # Invoke the server registered hooks. + # Check Rails::Railtie.server for more info. + # + # pkg:gem/railties#lib/rails/engine.rb:485 + def load_server(app = T.unsafe(nil)); end + + # Load Rake and railties tasks, and invoke the registered hooks. + # Check Rails::Railtie.rake_tasks for more info. + # + # pkg:gem/railties#lib/rails/engine.rb:468 + def load_tasks(app = T.unsafe(nil)); end + + # pkg:gem/railties#lib/rails/engine.rb:436 + def middleware(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/engine.rb:436 + def paths(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/engine.rb:495 + def railties; end + + # pkg:gem/railties#lib/rails/engine.rb:436 + def root(*_arg0, **_arg1, &_arg2); end + + # Defines the routes for this engine. If a block is given to + # routes, it is appended to the engine. + # + # pkg:gem/railties#lib/rails/engine.rb:545 + def routes(&block); end + + # pkg:gem/railties#lib/rails/engine.rb:676 + def routes?; end + + protected + + # pkg:gem/railties#lib/rails/engine.rb:681 + def run_tasks_blocks(*_arg0); end + + private + + # pkg:gem/railties#lib/rails/engine.rb:713 + def _all_autoload_once_paths; end + + # pkg:gem/railties#lib/rails/engine.rb:717 + def _all_autoload_paths; end + + # pkg:gem/railties#lib/rails/engine.rb:726 + def _all_load_paths(add_autoload_paths_to_load_path); end + + # pkg:gem/railties#lib/rails/engine.rb:751 + def build_middleware; end + + # pkg:gem/railties#lib/rails/engine.rb:743 + def build_request(env); end + + # pkg:gem/railties#lib/rails/engine.rb:709 + def default_middleware_stack; end + + # pkg:gem/railties#lib/rails/engine.rb:737 + def fixtures_in_root_and_not_in_vendor_or_dot_dir?(fixtures); end + + # pkg:gem/railties#lib/rails/engine.rb:693 + def has_migrations?; end + + # pkg:gem/railties#lib/rails/engine.rb:687 + def load_config_initializer(initializer); end + + class << self + # pkg:gem/railties#lib/rails/engine.rb:433 + def __callbacks; end + + # pkg:gem/railties#lib/rails/engine.rb:433 + def __callbacks=(value); end + + # pkg:gem/railties#lib/rails/engine.rb:433 + def __callbacks?; end + + # pkg:gem/railties#lib/rails/engine.rb:434 + def _load_seed_callbacks; end + + # pkg:gem/railties#lib/rails/engine.rb:434 + def _load_seed_callbacks=(value); end + + # pkg:gem/railties#lib/rails/engine.rb:354 + def called_from; end + + # pkg:gem/railties#lib/rails/engine.rb:354 + def called_from=(_arg0); end + + # pkg:gem/railties#lib/rails/engine.rb:359 + def eager_load!(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/engine.rb:379 + def endpoint(endpoint = T.unsafe(nil)); end + + # pkg:gem/railties#lib/rails/engine.rb:357 + def engine_name(name = T.unsafe(nil)); end + + # Finds engine with given path. + # + # pkg:gem/railties#lib/rails/engine.rb:423 + def find(path); end + + # pkg:gem/railties#lib/rails/engine.rb:375 + def find_root(from); end + + # pkg:gem/railties#lib/rails/engine.rb:697 + def find_root_with_flag(flag, root_path, default = T.unsafe(nil)); end + + # pkg:gem/railties#lib/rails/engine.rb:361 + def inherited(base); end + + # pkg:gem/railties#lib/rails/engine.rb:385 + def isolate_namespace(mod); end + + # pkg:gem/railties#lib/rails/engine.rb:354 + def isolated; end + + # pkg:gem/railties#lib/rails/engine.rb:354 + def isolated=(_arg0); end + + # pkg:gem/railties#lib/rails/engine.rb:356 + def isolated?; end + end +end + +# pkg:gem/railties#lib/rails/engine/configuration.rb:7 +class Rails::Engine::Configuration < ::Rails::Railtie::Configuration + # pkg:gem/railties#lib/rails/engine/configuration.rb:41 + def initialize(root = T.unsafe(nil)); end + + # Private method that adds custom autoload once paths to the ones defined + # by +paths+. + # + # pkg:gem/railties#lib/rails/engine/configuration.rb:125 + def all_autoload_once_paths; end + + # Private method that adds custom autoload paths to the ones defined by + # +paths+. + # + # pkg:gem/railties#lib/rails/engine/configuration.rb:119 + def all_autoload_paths; end + + # Private method that adds custom eager load paths to the ones defined by + # +paths+. + # + # pkg:gem/railties#lib/rails/engine/configuration.rb:131 + def all_eager_load_paths; end + + # An array of custom autoload once paths. These won't be eager loaded + # unless you push them to +eager_load_paths+ too, which is recommended. + # + # This collection is empty by default, it accepts strings and +Pathname+ + # objects. + # + # If you'd like to add +lib+ to it, please see +autoload_lib_once+. + # + # pkg:gem/railties#lib/rails/engine/configuration.rb:29 + def autoload_once_paths; end + + # An array of custom autoload once paths. These won't be eager loaded + # unless you push them to +eager_load_paths+ too, which is recommended. + # + # This collection is empty by default, it accepts strings and +Pathname+ + # objects. + # + # If you'd like to add +lib+ to it, please see +autoload_lib_once+. + # + # pkg:gem/railties#lib/rails/engine/configuration.rb:10 + def autoload_once_paths=(_arg0); end + + # An array of custom autoload paths to be added to the ones defined + # automatically by Rails. These won't be eager loaded, unless you push + # them to +eager_load_paths+ too, which is recommended. + # + # This collection is empty by default, it accepts strings and +Pathname+ + # objects. + # + # If you'd like to add +lib+ to it, please see +autoload_lib+. + # + # pkg:gem/railties#lib/rails/engine/configuration.rb:20 + def autoload_paths; end + + # An array of custom autoload paths to be added to the ones defined + # automatically by Rails. These won't be eager loaded, unless you push + # them to +eager_load_paths+ too, which is recommended. + # + # This collection is empty by default, it accepts strings and +Pathname+ + # objects. + # + # If you'd like to add +lib+ to it, please see +autoload_lib+. + # + # pkg:gem/railties#lib/rails/engine/configuration.rb:10 + def autoload_paths=(_arg0); end + + # An array of custom eager load paths to be added to the ones defined + # automatically by Rails. Anything in this collection is considered to be + # an autoload path regardless of whether it was added to +autoload_paths+. + # + # This collection is empty by default, it accepts strings and +Pathname+ + # objects. + # + # If you'd like to add +lib+ to it, please see +autoload_lib+. + # + # pkg:gem/railties#lib/rails/engine/configuration.rb:39 + def eager_load_paths; end + + # An array of custom eager load paths to be added to the ones defined + # automatically by Rails. Anything in this collection is considered to be + # an autoload path regardless of whether it was added to +autoload_paths+. + # + # This collection is empty by default, it accepts strings and +Pathname+ + # objects. + # + # If you'd like to add +lib+ to it, please see +autoload_lib+. + # + # pkg:gem/railties#lib/rails/engine/configuration.rb:10 + def eager_load_paths=(_arg0); end + + # Holds generators configuration: + # + # config.generators do |g| + # g.orm :data_mapper, migration: true + # g.template_engine :haml + # g.test_framework :rspec + # end + # + # If you want to disable color in console, do: + # + # config.generators.colorize_logging = false + # + # pkg:gem/railties#lib/rails/engine/configuration.rb:65 + def generators; end + + # pkg:gem/railties#lib/rails/engine/configuration.rb:9 + def javascript_path; end + + # pkg:gem/railties#lib/rails/engine/configuration.rb:9 + def javascript_path=(_arg0); end + + # pkg:gem/railties#lib/rails/engine/configuration.rb:9 + def middleware; end + + # pkg:gem/railties#lib/rails/engine/configuration.rb:9 + def middleware=(_arg0); end + + # pkg:gem/railties#lib/rails/engine/configuration.rb:71 + def paths; end + + # pkg:gem/railties#lib/rails/engine/configuration.rb:8 + def root; end + + # pkg:gem/railties#lib/rails/engine/configuration.rb:113 + def root=(value); end +end + +# pkg:gem/railties#lib/rails/engine/railties.rb:5 +class Rails::Engine::Railties + include ::Enumerable + + # pkg:gem/railties#lib/rails/engine/railties.rb:9 + def initialize; end + + # pkg:gem/railties#lib/rails/engine/railties.rb:18 + def -(others); end + + # pkg:gem/railties#lib/rails/engine/railties.rb:7 + def _all; end + + # pkg:gem/railties#lib/rails/engine/railties.rb:14 + def each(*args, &block); end +end + +# Built-in Health Check Endpoint +# +# \Rails also comes with a built-in health check endpoint that is reachable at +# the +/up+ path. This endpoint will return a 200 status code if the app has +# booted with no exceptions, and a 500 status code otherwise. +# +# In production, many applications are required to report their status upstream, +# whether it's to an uptime monitor that will page an engineer when things go +# wrong, or a load balancer or Kubernetes controller used to determine a pod's +# health. This health check is designed to be a one-size fits all that will work +# in many situations. +# +# While any newly generated \Rails applications will have the health check at +# +/up+, you can configure the path to be anything you'd like in your +# "config/routes.rb": +# +# Rails.application.routes.draw do +# get "healthz" => "rails/health#show", as: :rails_health_check +# end +# +# The health check will now be accessible via the +/healthz+ path. +# +# NOTE: This endpoint does not reflect the status of all of your application's +# dependencies, such as the database or Redis cluster. Replace +# "rails/health#show" with your own controller action if you have +# application specific needs. +# +# Think carefully about what you want to check as it can lead to situations +# where your application is being restarted due to a third-party service going +# bad. Ideally, you should design your application to handle those outages +# gracefully. +# +# pkg:gem/railties#lib/rails/health_controller.rb:35 +class Rails::HealthController < ::ActionController::Base + # pkg:gem/railties#lib/rails/health_controller.rb:38 + def show; end + + private + + # pkg:gem/railties#lib/rails/health_controller.rb:35 + def _layout(lookup_context, formats, keys); end + + # pkg:gem/railties#lib/rails/health_controller.rb:51 + def html_status(color:); end + + # pkg:gem/railties#lib/rails/health_controller.rb:47 + def render_down; end + + # pkg:gem/railties#lib/rails/health_controller.rb:43 + def render_up; end + + class << self + # pkg:gem/railties#lib/rails/health_controller.rb:35 + def middleware_stack; end + + # pkg:gem/railties#lib/rails/health_controller.rb:36 + def rescue_handlers; end + end +end + +# This module helps build the runtime properties that are displayed in +# Rails::InfoController responses. These include the active \Rails version, +# Ruby version, Rack version, and so on. +# +# pkg:gem/railties#lib/rails/info.rb:9 +module Rails::Info + # pkg:gem/railties#lib/rails/info.rb:10 + def properties; end + + # pkg:gem/railties#lib/rails/info.rb:10 + def properties=(val); end + + class << self + # pkg:gem/railties#lib/rails/info.rb:41 + def inspect; end + + # pkg:gem/railties#lib/rails/info.rb:10 + def properties; end + + # pkg:gem/railties#lib/rails/info.rb:10 + def properties=(val); end + + # pkg:gem/railties#lib/rails/info.rb:25 + def property(name, value = T.unsafe(nil)); end + + # pkg:gem/railties#lib/rails/info.rb:43 + def to_html; end + + # pkg:gem/railties#lib/rails/info.rb:31 + def to_s; end + end +end + +# pkg:gem/railties#lib/rails/info_controller.rb:6 +class Rails::InfoController < ::Rails::ApplicationController + # pkg:gem/railties#lib/rails/info_controller.rb:14 + def index; end + + # pkg:gem/railties#lib/rails/info_controller.rb:18 + def properties; end + + # pkg:gem/railties#lib/rails/info_controller.rb:23 + def routes; end + + private + + # pkg:gem/railties#lib/rails/info_controller.rb:6 + def _layout(lookup_context, formats, keys); end + + # pkg:gem/railties#lib/rails/info_controller.rb:8 + def _layout_from_proc; end + + # pkg:gem/railties#lib/rails/info_controller.rb:38 + def matching_routes(query:, exact_match:); end + + class << self + # pkg:gem/railties#lib/rails/info_controller.rb:12 + def __callbacks; end + + # pkg:gem/railties#lib/rails/info_controller.rb:8 + def _layout; end + + # pkg:gem/railties#lib/rails/info_controller.rb:8 + def _layout_conditions; end + + # pkg:gem/railties#lib/rails/info_controller.rb:6 + def middleware_stack; end + end +end + +# pkg:gem/railties#lib/rails/info_controller.rb:10 +Rails::InfoController::RFC2396_PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) + +# pkg:gem/railties#lib/rails/initializable.rb:6 +module Rails::Initializable + mixes_in_class_methods ::Rails::Initializable::ClassMethods + + # pkg:gem/railties#lib/rails/initializable.rb:66 + def initializers; end + + # pkg:gem/railties#lib/rails/initializable.rb:58 + def run_initializers(group = T.unsafe(nil), *args); end + + class << self + # pkg:gem/railties#lib/rails/initializable.rb:7 + def included(base); end + end +end + +# pkg:gem/railties#lib/rails/initializable.rb:70 +module Rails::Initializable::ClassMethods + # pkg:gem/railties#lib/rails/initializable.rb:88 + def initializer(name, opts = T.unsafe(nil), &blk); end + + # pkg:gem/railties#lib/rails/initializable.rb:71 + def initializers; end + + # pkg:gem/railties#lib/rails/initializable.rb:75 + def initializers_chain; end + + # pkg:gem/railties#lib/rails/initializable.rb:84 + def initializers_for(binding); end +end + +# pkg:gem/railties#lib/rails/initializable.rb:45 +class Rails::Initializable::Collection < ::Array + include ::TSort + + # pkg:gem/railties#lib/rails/initializable.rb:53 + def +(other); end + + # pkg:gem/railties#lib/rails/initializable.rb:49 + def tsort_each_child(initializer, &block); end + + # pkg:gem/railties#lib/rails/initializable.rb:48 + def tsort_each_node; end +end + +# pkg:gem/railties#lib/rails/initializable.rb:11 +class Rails::Initializable::Initializer + # pkg:gem/railties#lib/rails/initializable.rb:14 + def initialize(name, context, options, &block); end + + # pkg:gem/railties#lib/rails/initializable.rb:23 + def after; end + + # pkg:gem/railties#lib/rails/initializable.rb:19 + def before; end + + # pkg:gem/railties#lib/rails/initializable.rb:27 + def belongs_to?(group); end + + # pkg:gem/railties#lib/rails/initializable.rb:35 + def bind(context); end + + # pkg:gem/railties#lib/rails/initializable.rb:12 + def block; end + + # pkg:gem/railties#lib/rails/initializable.rb:40 + def context_class; end + + # pkg:gem/railties#lib/rails/initializable.rb:12 + def name; end + + # pkg:gem/railties#lib/rails/initializable.rb:31 + def run(*args); end +end + +# pkg:gem/railties#lib/rails/mailers_controller.rb:6 +class Rails::MailersController < ::Rails::ApplicationController + # pkg:gem/railties#lib/rails/mailers_controller.rb:22 + def download; end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:17 + def index; end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:32 + def preview; end + + private + + # pkg:gem/railties#lib/rails/mailers_controller.rb:6 + def _layout(lookup_context, formats, keys); end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:107 + def attachment_url(attachment); end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:101 + def attachments_for(email); end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:93 + def find_part(format); end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:81 + def find_preferred_part(*formats); end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:69 + def find_preview; end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:115 + def locale_query(locale); end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:111 + def part_query(mime_type); end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:119 + def set_locale(&block); end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:65 + def show_previews?; end + + class << self + # pkg:gem/railties#lib/rails/mailers_controller.rb:9 + def __callbacks; end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:13 + def _helper_methods; end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:6 + def middleware_stack; end + end +end + +# pkg:gem/railties#lib/rails/mailers_controller.rb:13 +module Rails::MailersController::HelperMethods + include ::ActionController::Base::HelperMethods + + # pkg:gem/railties#lib/rails/mailers_controller.rb:13 + def attachment_url(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:13 + def locale_query(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/mailers_controller.rb:13 + def part_query(*_arg0, **_arg1, &_arg2); end +end + +# pkg:gem/railties#lib/rails/paths.rb:6 +module Rails::Paths; end + +# pkg:gem/railties#lib/rails/paths.rb:114 +class Rails::Paths::Path + include ::Enumerable + + # pkg:gem/railties#lib/rails/paths.rb:119 + def initialize(root, current, paths, options = T.unsafe(nil)); end + + # pkg:gem/railties#lib/rails/paths.rb:171 + def <<(path); end + + # pkg:gem/railties#lib/rails/paths.rb:132 + def absolute_current; end + + # pkg:gem/railties#lib/rails/paths.rb:152 + def autoload!; end + + # pkg:gem/railties#lib/rails/paths.rb:152 + def autoload?; end + + # pkg:gem/railties#lib/rails/paths.rb:152 + def autoload_once!; end + + # pkg:gem/railties#lib/rails/paths.rb:152 + def autoload_once?; end + + # pkg:gem/railties#lib/rails/paths.rb:136 + def children; end + + # pkg:gem/railties#lib/rails/paths.rb:176 + def concat(paths); end + + # pkg:gem/railties#lib/rails/paths.rb:167 + def each(&block); end + + # pkg:gem/railties#lib/rails/paths.rb:152 + def eager_load!; end + + # pkg:gem/railties#lib/rails/paths.rb:152 + def eager_load?; end + + # Returns all expanded paths but only if they exist in the filesystem. + # + # pkg:gem/railties#lib/rails/paths.rb:220 + def existent; end + + # pkg:gem/railties#lib/rails/paths.rb:231 + def existent_directories; end + + # Expands all paths against the root and return all unique values. + # + # pkg:gem/railties#lib/rails/paths.rb:201 + def expanded; end + + # pkg:gem/railties#lib/rails/paths.rb:196 + def extensions; end + + # pkg:gem/railties#lib/rails/paths.rb:143 + def first; end + + # pkg:gem/railties#lib/rails/paths.rb:117 + def glob; end + + # pkg:gem/railties#lib/rails/paths.rb:117 + def glob=(_arg0); end + + # pkg:gem/railties#lib/rails/paths.rb:147 + def last; end + + # pkg:gem/railties#lib/rails/paths.rb:152 + def load_path!; end + + # pkg:gem/railties#lib/rails/paths.rb:152 + def load_path?; end + + # pkg:gem/railties#lib/rails/paths.rb:188 + def paths; end + + # pkg:gem/railties#lib/rails/paths.rb:174 + def push(path); end + + # pkg:gem/railties#lib/rails/paths.rb:152 + def skip_autoload!; end + + # pkg:gem/railties#lib/rails/paths.rb:152 + def skip_autoload_once!; end + + # pkg:gem/railties#lib/rails/paths.rb:152 + def skip_eager_load!; end + + # pkg:gem/railties#lib/rails/paths.rb:152 + def skip_load_path!; end + + # pkg:gem/railties#lib/rails/paths.rb:235 + def to_a; end + + # pkg:gem/railties#lib/rails/paths.rb:184 + def to_ary; end + + # pkg:gem/railties#lib/rails/paths.rb:180 + def unshift(*paths); end + + private + + # pkg:gem/railties#lib/rails/paths.rb:238 + def files_in(path); end +end + +# This object is an extended hash that behaves as root of the Rails::Paths system. +# It allows you to collect information about how you want to structure your application +# paths through a Hash-like \API. It requires you to give a physical path on initialization. +# +# root = Root.new "/rails" +# root.add "app/controllers", eager_load: true +# +# The above command creates a new root object and adds "app/controllers" as a path. +# This means we can get a Rails::Paths::Path object back like below: +# +# path = root["app/controllers"] +# path.eager_load? # => true +# path.is_a?(Rails::Paths::Path) # => true +# +# The Path[rdoc-ref:Rails::Paths::Path] object is simply an enumerable and +# allows you to easily add extra paths: +# +# path.is_a?(Enumerable) # => true +# path.to_ary.inspect # => ["app/controllers"] +# +# path << "lib/controllers" +# path.to_ary.inspect # => ["app/controllers", "lib/controllers"] +# +# Notice that when you add a path using #add, the +# Path[rdoc-ref:Rails::Paths::Path] object created already contains the path +# with the same path value given to #add. In some situations, you may not +# want this behavior, so you can give :with as option. +# +# root.add "config/routes", with: "config/routes.rb" +# root["config/routes"].inspect # => ["config/routes.rb"] +# +# The #add method accepts the following options as arguments: +# +eager_load+, +autoload+, +autoload_once+, and +glob+. +# +# Finally, the Path[rdoc-ref:Rails::Paths::Path] object also provides a few +# helpers: +# +# root = Root.new "/rails" +# root.add "app/controllers" +# +# root["app/controllers"].expanded # => ["/rails/app/controllers"] +# root["app/controllers"].existent # => ["/rails/app/controllers"] +# +# Check the Rails::Paths::Path documentation for more information. +# +# pkg:gem/railties#lib/rails/paths.rb:51 +class Rails::Paths::Root + # pkg:gem/railties#lib/rails/paths.rb:54 + def initialize(path); end + + # pkg:gem/railties#lib/rails/paths.rb:69 + def [](path); end + + # pkg:gem/railties#lib/rails/paths.rb:59 + def []=(path, value); end + + # pkg:gem/railties#lib/rails/paths.rb:64 + def add(path, options = T.unsafe(nil)); end + + # pkg:gem/railties#lib/rails/paths.rb:85 + def all_paths; end + + # pkg:gem/railties#lib/rails/paths.rb:89 + def autoload_once; end + + # pkg:gem/railties#lib/rails/paths.rb:97 + def autoload_paths; end + + # pkg:gem/railties#lib/rails/paths.rb:93 + def eager_load; end + + # pkg:gem/railties#lib/rails/paths.rb:77 + def keys; end + + # pkg:gem/railties#lib/rails/paths.rb:101 + def load_paths; end + + # pkg:gem/railties#lib/rails/paths.rb:52 + def path; end + + # pkg:gem/railties#lib/rails/paths.rb:52 + def path=(_arg0); end + + # pkg:gem/railties#lib/rails/paths.rb:73 + def values; end + + # pkg:gem/railties#lib/rails/paths.rb:81 + def values_at(*list); end + + private + + # pkg:gem/railties#lib/rails/paths.rb:106 + def filter_by(&block); end +end + +# pkg:gem/railties#lib/rails/pwa_controller.rb:5 +class Rails::PwaController < ::Rails::ApplicationController + # pkg:gem/railties#lib/rails/pwa_controller.rb:12 + def manifest; end + + # pkg:gem/railties#lib/rails/pwa_controller.rb:8 + def service_worker; end + + private + + # pkg:gem/railties#lib/rails/pwa_controller.rb:5 + def _layout(lookup_context, formats, keys); end + + class << self + # pkg:gem/railties#lib/rails/pwa_controller.rb:6 + def __callbacks; end + + # pkg:gem/railties#lib/rails/pwa_controller.rb:5 + def middleware_stack; end + end +end + +# pkg:gem/railties#lib/rails/rack.rb:4 +module Rails::Rack; end + +# Sets log tags, logs the request, calls the app, and flushes the logs. +# +# Log tags (+taggers+) can be an Array containing: methods that the +request+ +# object responds to, objects that respond to +to_s+ or Proc objects that accept +# an instance of the +request+ object. +# +# pkg:gem/railties#lib/rails/rack/logger.rb:14 +class Rails::Rack::Logger < ::ActiveSupport::LogSubscriber + # pkg:gem/railties#lib/rails/rack/logger.rb:15 + def initialize(app, taggers = T.unsafe(nil)); end + + # pkg:gem/railties#lib/rails/rack/logger.rb:20 + def call(env); end + + private + + # pkg:gem/railties#lib/rails/rack/logger.rb:33 + def call_app(request, env); end + + # pkg:gem/railties#lib/rails/rack/logger.rb:64 + def compute_tags(request); end + + # pkg:gem/railties#lib/rails/rack/logger.rb:81 + def finish_request_instrumentation(handle, logger_tag_pop_count); end + + # pkg:gem/railties#lib/rails/rack/logger.rb:77 + def logger; end + + # Started GET "/session/new" for 127.0.0.1 at 2012-09-26 14:51:42 -0700 + # + # pkg:gem/railties#lib/rails/rack/logger.rb:56 + def started_request_message(request); end +end + +# +Rails::Railtie+ is the core of the \Rails framework and provides +# several hooks to extend \Rails and/or modify the initialization process. +# +# Every major component of \Rails (Action Mailer, Action Controller, Active +# Record, etc.) implements a railtie. Each of them is responsible for their +# own initialization. This makes \Rails itself absent of any component hooks, +# allowing other components to be used in place of any of the \Rails defaults. +# +# Developing a \Rails extension does _not_ require implementing a railtie, but +# if you need to interact with the \Rails framework during or after boot, then +# a railtie is needed. +# +# For example, an extension doing any of the following would need a railtie: +# +# * creating initializers +# * configuring a \Rails framework for the application, like setting a generator +# * adding config.* keys to the environment +# * setting up a subscriber with ActiveSupport::Notifications +# * adding Rake tasks +# +# == Creating a Railtie +# +# To extend \Rails using a railtie, create a subclass of +Rails::Railtie+. +# This class must be loaded during the \Rails boot process, and is conventionally +# called +MyNamespace::Railtie+. +# +# The following example demonstrates an extension which can be used with or +# without \Rails. +# +# # lib/my_gem/railtie.rb +# module MyGem +# class Railtie < Rails::Railtie +# end +# end +# +# # lib/my_gem.rb +# require "my_gem/railtie" if defined?(Rails::Railtie) +# +# == Initializers +# +# To add an initialization step to the \Rails boot process from your railtie, just +# define the initialization code with the +initializer+ macro: +# +# class MyGem::Railtie < Rails::Railtie +# initializer "my_gem.configure_rails_initialization" do +# # some initialization behavior +# end +# end +# +# If specified, the block can also receive the application object, in case you +# need to access some application-specific configuration, like middleware: +# +# class MyGem::Railtie < Rails::Railtie +# initializer "my_gem.configure_rails_initialization" do |app| +# app.middleware.use MyGem::Middleware +# end +# end +# +# Finally, you can also pass :before and :after as options to +# +initializer+, in case you want to couple it with a specific step in the +# initialization process. +# +# == Configuration +# +# Railties can access a config object which contains configuration shared by all +# railties and the application: +# +# class MyGem::Railtie < Rails::Railtie +# # Customize the ORM +# config.app_generators.orm :my_gem_orm +# +# # Add a to_prepare block which is executed once in production +# # and before each request in development. +# config.to_prepare do +# MyGem.setup! +# end +# end +# +# == Loading Rake Tasks and Generators +# +# If your railtie has Rake tasks, you can tell \Rails to load them through the method +# +rake_tasks+: +# +# class MyGem::Railtie < Rails::Railtie +# rake_tasks do +# load "path/to/my_gem.tasks" +# end +# end +# +# By default, \Rails loads generators from your load path. However, if you want to place +# your generators at a different location, you can specify in your railtie a block which +# will load them during normal generators lookup: +# +# class MyGem::Railtie < Rails::Railtie +# generators do +# require "path/to/my_gem_generator" +# end +# end +# +# Since filenames on the load path are shared across gems, be sure that files you load +# through a railtie have unique names. +# +# == Run another program when the \Rails server starts +# +# In development, it's very usual to have to run another process next to the \Rails Server. In example +# you might want to start the Webpack or React server. Or maybe you need to run your job scheduler process +# like Sidekiq. This is usually done by opening a new shell and running the program from here. +# +# \Rails allow you to specify a +server+ block which will get called when a \Rails server starts. +# This way, your users don't need to remember to have to open a new shell and run another program, making +# this less confusing for everyone. +# It can be used like this: +# +# class MyGem::Railtie < Rails::Railtie +# server do +# WebpackServer.start +# end +# end +# +# == Application and Engine +# +# An engine is nothing more than a railtie with some initializers already set. And since +# Rails::Application is an engine, the same configuration described here can be +# used in both. +# +# Be sure to look at the documentation of those specific classes for more information. +# +# pkg:gem/railties#lib/rails/railtie.rb:136 +class Rails::Railtie + include ::Rails::Initializable + extend ::ActiveSupport::DescendantsTracker + extend ::Rails::Initializable::ClassMethods + + # pkg:gem/railties#lib/rails/railtie.rb:245 + def initialize; end + + # This is used to create the config object on Railties, an instance of + # Railtie::Configuration, that is used by Railties and Application to store + # related configuration. + # + # pkg:gem/railties#lib/rails/railtie.rb:262 + def config; end + + # pkg:gem/railties#lib/rails/railtie.rb:255 + def configure(&block); end + + # pkg:gem/railties#lib/rails/railtie.rb:251 + def inspect; end + + # pkg:gem/railties#lib/rails/railtie.rb:243 + def railtie_name(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/railties#lib/rails/railtie.rb:266 + def railtie_namespace; end + + protected + + # pkg:gem/railties#lib/rails/railtie.rb:271 + def run_console_blocks(app); end + + # pkg:gem/railties#lib/rails/railtie.rb:275 + def run_generators_blocks(app); end + + # pkg:gem/railties#lib/rails/railtie.rb:279 + def run_runner_blocks(app); end + + # pkg:gem/railties#lib/rails/railtie.rb:288 + def run_server_blocks(app); end + + # pkg:gem/railties#lib/rails/railtie.rb:283 + def run_tasks_blocks(app); end + + private + + # run `&block` in every registered block in `#register_block_for` + # + # pkg:gem/railties#lib/rails/railtie.rb:294 + def each_registered_block(type, &block); end + + class << self + # pkg:gem/railties#lib/rails/railtie.rb:194 + def <=>(other); end + + # pkg:gem/railties#lib/rails/railtie.rb:172 + def abstract_railtie?; end + + # This is used to create the config object on Railties, an instance of + # Railtie::Configuration, that is used by Railties and Application to store + # related configuration. + # + # pkg:gem/railties#lib/rails/railtie.rb:146 + def config(*_arg0, **_arg1, &_arg2); end + + # Allows you to configure the railtie. This is the same method seen in + # Railtie::Configurable, but this module is no longer required for all + # subclasses of Railtie so we provide the class method here. + # + # pkg:gem/railties#lib/rails/railtie.rb:190 + def configure(&block); end + + # pkg:gem/railties#lib/rails/railtie.rb:156 + def console(&blk); end + + # pkg:gem/railties#lib/rails/railtie.rb:164 + def generators(&blk); end + + # pkg:gem/railties#lib/rails/railtie.rb:198 + def inherited(subclass); end + + # Since Rails::Railtie cannot be instantiated, any methods that call + # +instance+ are intended to be called only on subclasses of a Railtie. + # + # pkg:gem/railties#lib/rails/railtie.rb:183 + def instance; end + + # pkg:gem/railties#lib/rails/railtie.rb:176 + def railtie_name(name = T.unsafe(nil)); end + + # pkg:gem/railties#lib/rails/railtie.rb:152 + def rake_tasks(&blk); end + + # pkg:gem/railties#lib/rails/railtie.rb:160 + def runner(&blk); end + + # pkg:gem/railties#lib/rails/railtie.rb:168 + def server(&blk); end + + # pkg:gem/railties#lib/rails/railtie.rb:148 + def subclasses; end + + protected + + # pkg:gem/railties#lib/rails/railtie.rb:206 + def increment_load_index; end + + # pkg:gem/railties#lib/rails/railtie.rb:204 + def load_index; end + + private + + # pkg:gem/railties#lib/rails/railtie.rb:212 + def generate_railtie_name(string); end + + # If the class method does not have a method, then send the method call + # to the Railtie instance. + # + # pkg:gem/railties#lib/rails/railtie.rb:224 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + + # pkg:gem/railties#lib/rails/railtie.rb:145 + def new(*_arg0); end + + # receives an instance variable identifier, set the variable value if is + # blank and append given block to value, which will be used later in + # `#each_registered_block(type, &block)` + # + # pkg:gem/railties#lib/rails/railtie.rb:235 + def register_block_for(type, &blk); end + + # pkg:gem/railties#lib/rails/railtie.rb:216 + def respond_to_missing?(name, _); end + end +end + +# pkg:gem/railties#lib/rails/railtie.rb:142 +Rails::Railtie::ABSTRACT_RAILTIES = T.let(T.unsafe(nil), Array) + +# pkg:gem/railties#lib/rails/railtie/configuration.rb:7 +class Rails::Railtie::Configuration + # pkg:gem/railties#lib/rails/railtie/configuration.rb:8 + def initialize; end + + # Last configurable block to run. Called after frameworks initialize. + # + # pkg:gem/railties#lib/rails/railtie/configuration.rb:70 + def after_initialize(&block); end + + # Called after application routes have been loaded. + # + # pkg:gem/railties#lib/rails/railtie/configuration.rb:75 + def after_routes_loaded(&block); end + + # This allows you to modify application's generators from Railties. + # + # Values set on app_generators will become defaults for application, unless + # application overwrites them. + # + # pkg:gem/railties#lib/rails/railtie/configuration.rb:47 + def app_generators; end + + # This allows you to modify the application's middlewares from Engines. + # + # All operations you run on the app_middleware will be replayed on the + # application once it is defined and the default_middlewares are + # created + # + # pkg:gem/railties#lib/rails/railtie/configuration.rb:39 + def app_middleware; end + + # First configurable block to run. Called before any initializers are run. + # + # pkg:gem/railties#lib/rails/railtie/configuration.rb:54 + def before_configuration(&block); end + + # Third configurable block to run. Does not run if +config.eager_load+ + # set to false. + # + # pkg:gem/railties#lib/rails/railtie/configuration.rb:60 + def before_eager_load(&block); end + + # Second configurable block to run. Called before frameworks initialize. + # + # pkg:gem/railties#lib/rails/railtie/configuration.rb:65 + def before_initialize(&block); end + + # All namespaces that are eager loaded + # + # pkg:gem/railties#lib/rails/railtie/configuration.rb:18 + def eager_load_namespaces; end + + # pkg:gem/railties#lib/rails/railtie/configuration.rb:90 + def respond_to?(name, include_private = T.unsafe(nil)); end + + # Defines generic callbacks to run before #after_initialize. Useful for + # Rails::Railtie subclasses. + # + # pkg:gem/railties#lib/rails/railtie/configuration.rb:86 + def to_prepare(&blk); end + + # Array of callbacks defined by #to_prepare. + # + # pkg:gem/railties#lib/rails/railtie/configuration.rb:80 + def to_prepare_blocks; end + + # Add directories that should be watched for change. + # The key of the hashes should be directories and the values should + # be an array of extensions to match in each directory. + # + # pkg:gem/railties#lib/rails/railtie/configuration.rb:30 + def watchable_dirs; end + + # Add files that should be watched for change. + # + # pkg:gem/railties#lib/rails/railtie/configuration.rb:23 + def watchable_files; end + + private + + # pkg:gem/railties#lib/rails/railtie/configuration.rb:95 + def actual_method?(key); end + + # pkg:gem/railties#lib/rails/railtie/configuration.rb:99 + def method_missing(name, *args, &blk); end + + class << self + # Expose the eager_load_namespaces at "module" level for convenience. + # + # pkg:gem/railties#lib/rails/railtie/configuration.rb:13 + def eager_load_namespaces; end + end +end + +# Implements the logic behind +Rails::Command::NotesCommand+. See rails notes --help for usage information. +# +# Annotation objects are triplets :line, :tag, :text that +# represent the line where the annotation lives, its tag, and its text. Note +# the filename is not stored. +# +# Annotations are looked for in comments and modulus whitespace they have to +# start with the tag optionally followed by a colon. Everything up to the end +# of the line (or closing ERB comment tag) is considered to be their text. +# +# pkg:gem/railties#lib/rails/source_annotation_extractor.rb:15 +class Rails::SourceAnnotationExtractor + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:137 + def initialize(tag); end + + # Prints the mapping from filenames to annotations in +results+ ordered by filename. + # The +options+ hash is passed to each annotation's +to_s+. + # + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:186 + def display(results, options = T.unsafe(nil)); end + + # Returns a hash that maps filenames under +dirs+ (recursively) to arrays + # with their annotations. + # + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:143 + def find(dirs); end + + # Returns a hash that maps filenames under +dir+ (recursively) to arrays + # with their annotations. Files with extensions registered in + # Rails::SourceAnnotationExtractor::Annotation.extensions are + # taken into account. Only files with annotations are included. + # + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:151 + def find_in(dir); end + + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:135 + def tag; end + + class << self + # Prints all annotations with tag +tag+ under the root directories +app+, + # +config+, +db+, +lib+, and +test+ (recursively). + # + # If +tag+ is nil, annotations with either default or registered tags are printed. + # + # Specific directories can be explicitly set using the :dirs key in +options+. + # + # Rails::SourceAnnotationExtractor.enumerate 'TODO|FIXME', dirs: %w(app lib), tag: true + # + # If +options+ has a :tag flag, it will be passed to each annotation's +to_s+. + # + # See SourceAnnotationExtractor#find_in for a list of file extensions that will be taken into account. + # + # This class method is the single entry point for the rails notes command. + # + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:128 + def enumerate(tag = T.unsafe(nil), options = T.unsafe(nil)); end + end +end + +# pkg:gem/railties#lib/rails/source_annotation_extractor.rb:54 +class Rails::SourceAnnotationExtractor::Annotation < ::Struct + # Returns a representation of the annotation that looks like this: + # + # [126] [TODO] This algorithm is simple and clearly correct, make it faster. + # + # If +options+ has a flag :tag the tag is shown as in the example above. + # Otherwise the string contains just line and text. + # + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:107 + def to_s(options = T.unsafe(nil)); end + + class << self + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:55 + def directories; end + + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:75 + def extensions; end + + # Registers additional directories to be included + # Rails::SourceAnnotationExtractor::Annotation.register_directories("spec", "another") + # + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:61 + def register_directories(*dirs); end + + # Registers new Annotations File Extensions + # Rails::SourceAnnotationExtractor::Annotation.register_extensions("css", "scss", "sass", "less", "js") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ } + # + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:81 + def register_extensions(*exts, &block); end + + # Registers additional tags + # Rails::SourceAnnotationExtractor::Annotation.register_tags("TESTME", "DEPRECATEME") + # + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:71 + def register_tags(*additional_tags); end + + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:65 + def tags; end + end +end + +# Wraps a regular expression that will be tested against each of the source +# file's comments. +# +# pkg:gem/railties#lib/rails/source_annotation_extractor.rb:18 +class Rails::SourceAnnotationExtractor::ParserExtractor < ::Struct + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:33 + def annotations(file); end +end + +# pkg:gem/railties#lib/rails/source_annotation_extractor.rb:19 +class Rails::SourceAnnotationExtractor::ParserExtractor::Parser < ::Ripper + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:22 + def initialize(source, pattern:); end + + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:20 + def comments; end + + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:28 + def on_comment(value); end + + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:20 + def pattern; end +end + +# Wraps a regular expression that will iterate through a file's lines and +# test each one for the given pattern. +# +# pkg:gem/railties#lib/rails/source_annotation_extractor.rb:42 +class Rails::SourceAnnotationExtractor::PatternExtractor < ::Struct + # pkg:gem/railties#lib/rails/source_annotation_extractor.rb:43 + def annotations(file); end +end + +# pkg:gem/railties#lib/rails/gem_version.rb:9 +module Rails::VERSION; end + +# pkg:gem/railties#lib/rails/gem_version.rb:10 +Rails::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# pkg:gem/railties#lib/rails/gem_version.rb:11 +Rails::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# pkg:gem/railties#lib/rails/gem_version.rb:13 +Rails::VERSION::PRE = T.let(T.unsafe(nil), String) + +# pkg:gem/railties#lib/rails/gem_version.rb:15 +Rails::VERSION::STRING = T.let(T.unsafe(nil), String) + +# pkg:gem/railties#lib/rails/gem_version.rb:12 +Rails::VERSION::TINY = T.let(T.unsafe(nil), Integer) + +# pkg:gem/railties#lib/rails/welcome_controller.rb:5 +class Rails::WelcomeController < ::Rails::ApplicationController + # pkg:gem/railties#lib/rails/welcome_controller.rb:9 + def index; end + + private + + # pkg:gem/railties#lib/rails/welcome_controller.rb:5 + def _layout(lookup_context, formats, keys); end + + class << self + # pkg:gem/railties#lib/rails/welcome_controller.rb:6 + def __callbacks; end + + # pkg:gem/railties#lib/rails/welcome_controller.rb:7 + def _layout; end + + # pkg:gem/railties#lib/rails/welcome_controller.rb:7 + def _layout_conditions; end + + # pkg:gem/railties#lib/rails/welcome_controller.rb:5 + def middleware_stack; end + end +end diff --git a/sorbet/rbi/gems/rainbow@3.1.1.rbi b/sorbet/rbi/gems/rainbow@3.1.1.rbi index 87f4c33ef..8e11eec14 100644 --- a/sorbet/rbi/gems/rainbow@3.1.1.rbi +++ b/sorbet/rbi/gems/rainbow@3.1.1.rbi @@ -4,325 +4,295 @@ # This is an autogenerated file for types exported from the `rainbow` gem. # Please instead update this file by running `bin/tapioca gem rainbow`. + class Object < ::BasicObject include ::Kernel include ::PP::ObjectMixin private - # source://rainbow//lib/rainbow/global.rb#23 + # pkg:gem/rainbow#lib/rainbow/global.rb:23 def Rainbow(string); end end -# source://rainbow//lib/rainbow/string_utils.rb#3 +# pkg:gem/rainbow#lib/rainbow/string_utils.rb:3 module Rainbow class << self - # source://rainbow//lib/rainbow/global.rb#10 + # pkg:gem/rainbow#lib/rainbow/global.rb:10 def enabled; end - # source://rainbow//lib/rainbow/global.rb#14 + # pkg:gem/rainbow#lib/rainbow/global.rb:14 def enabled=(value); end - # source://rainbow//lib/rainbow/global.rb#6 + # pkg:gem/rainbow#lib/rainbow/global.rb:6 def global; end - # source://rainbow//lib/rainbow.rb#6 + # pkg:gem/rainbow#lib/rainbow.rb:6 def new; end - # source://rainbow//lib/rainbow/global.rb#18 + # pkg:gem/rainbow#lib/rainbow/global.rb:18 def uncolor(string); end end end -# source://rainbow//lib/rainbow/color.rb#4 +# pkg:gem/rainbow#lib/rainbow/color.rb:4 class Rainbow::Color - # Returns the value of attribute ground. - # - # source://rainbow//lib/rainbow/color.rb#5 + # pkg:gem/rainbow#lib/rainbow/color.rb:5 def ground; end class << self - # source://rainbow//lib/rainbow/color.rb#7 + # pkg:gem/rainbow#lib/rainbow/color.rb:7 def build(ground, values); end - # source://rainbow//lib/rainbow/color.rb#40 + # pkg:gem/rainbow#lib/rainbow/color.rb:40 def parse_hex_color(hex); end end end -# source://rainbow//lib/rainbow/color.rb#54 +# pkg:gem/rainbow#lib/rainbow/color.rb:54 class Rainbow::Color::Indexed < ::Rainbow::Color - # @return [Indexed] a new instance of Indexed - # - # source://rainbow//lib/rainbow/color.rb#57 + # pkg:gem/rainbow#lib/rainbow/color.rb:57 def initialize(ground, num); end - # source://rainbow//lib/rainbow/color.rb#62 + # pkg:gem/rainbow#lib/rainbow/color.rb:62 def codes; end - # Returns the value of attribute num. - # - # source://rainbow//lib/rainbow/color.rb#55 + # pkg:gem/rainbow#lib/rainbow/color.rb:55 def num; end end -# source://rainbow//lib/rainbow/color.rb#69 +# pkg:gem/rainbow#lib/rainbow/color.rb:69 class Rainbow::Color::Named < ::Rainbow::Color::Indexed - # @return [Named] a new instance of Named - # - # source://rainbow//lib/rainbow/color.rb#90 + # pkg:gem/rainbow#lib/rainbow/color.rb:90 def initialize(ground, name); end class << self - # source://rainbow//lib/rainbow/color.rb#82 + # pkg:gem/rainbow#lib/rainbow/color.rb:82 def color_names; end - # source://rainbow//lib/rainbow/color.rb#86 + # pkg:gem/rainbow#lib/rainbow/color.rb:86 def valid_names; end end end -# source://rainbow//lib/rainbow/color.rb#70 +# pkg:gem/rainbow#lib/rainbow/color.rb:70 Rainbow::Color::Named::NAMES = T.let(T.unsafe(nil), Hash) -# source://rainbow//lib/rainbow/color.rb#100 +# pkg:gem/rainbow#lib/rainbow/color.rb:100 class Rainbow::Color::RGB < ::Rainbow::Color::Indexed - # @return [RGB] a new instance of RGB - # - # source://rainbow//lib/rainbow/color.rb#107 + # pkg:gem/rainbow#lib/rainbow/color.rb:107 def initialize(ground, *values); end - # Returns the value of attribute b. - # - # source://rainbow//lib/rainbow/color.rb#101 + # pkg:gem/rainbow#lib/rainbow/color.rb:101 def b; end - # source://rainbow//lib/rainbow/color.rb#116 + # pkg:gem/rainbow#lib/rainbow/color.rb:116 def codes; end - # Returns the value of attribute g. - # - # source://rainbow//lib/rainbow/color.rb#101 + # pkg:gem/rainbow#lib/rainbow/color.rb:101 def g; end - # Returns the value of attribute r. - # - # source://rainbow//lib/rainbow/color.rb#101 + # pkg:gem/rainbow#lib/rainbow/color.rb:101 def r; end private - # source://rainbow//lib/rainbow/color.rb#122 + # pkg:gem/rainbow#lib/rainbow/color.rb:122 def code_from_rgb; end class << self - # source://rainbow//lib/rainbow/color.rb#103 + # pkg:gem/rainbow#lib/rainbow/color.rb:103 def to_ansi_domain(value); end end end -# source://rainbow//lib/rainbow/color.rb#129 +# pkg:gem/rainbow#lib/rainbow/color.rb:129 class Rainbow::Color::X11Named < ::Rainbow::Color::RGB include ::Rainbow::X11ColorNames - # @return [X11Named] a new instance of X11Named - # - # source://rainbow//lib/rainbow/color.rb#140 + # pkg:gem/rainbow#lib/rainbow/color.rb:140 def initialize(ground, name); end class << self - # source://rainbow//lib/rainbow/color.rb#132 + # pkg:gem/rainbow#lib/rainbow/color.rb:132 def color_names; end - # source://rainbow//lib/rainbow/color.rb#136 + # pkg:gem/rainbow#lib/rainbow/color.rb:136 def valid_names; end end end -# source://rainbow//lib/rainbow/null_presenter.rb#4 +# pkg:gem/rainbow#lib/rainbow/null_presenter.rb:4 class Rainbow::NullPresenter < ::String - # source://rainbow//lib/rainbow/null_presenter.rb#9 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:9 def background(*_values); end - # source://rainbow//lib/rainbow/null_presenter.rb#9 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:95 def bg(*_values); end - # source://rainbow//lib/rainbow/null_presenter.rb#49 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:49 def black; end - # source://rainbow//lib/rainbow/null_presenter.rb#33 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:33 def blink; end - # source://rainbow//lib/rainbow/null_presenter.rb#65 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:65 def blue; end - # source://rainbow//lib/rainbow/null_presenter.rb#17 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:96 def bold; end - # source://rainbow//lib/rainbow/null_presenter.rb#17 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:17 def bright; end - # source://rainbow//lib/rainbow/null_presenter.rb#5 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:5 def color(*_values); end - # source://rainbow//lib/rainbow/null_presenter.rb#45 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:45 def cross_out; end - # source://rainbow//lib/rainbow/null_presenter.rb#73 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:73 def cyan; end - # source://rainbow//lib/rainbow/null_presenter.rb#21 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:97 def dark; end - # source://rainbow//lib/rainbow/null_presenter.rb#21 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:21 def faint; end - # source://rainbow//lib/rainbow/null_presenter.rb#5 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:94 def fg(*_values); end - # source://rainbow//lib/rainbow/null_presenter.rb#5 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:93 def foreground(*_values); end - # source://rainbow//lib/rainbow/null_presenter.rb#57 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:57 def green; end - # source://rainbow//lib/rainbow/null_presenter.rb#41 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:41 def hide; end - # source://rainbow//lib/rainbow/null_presenter.rb#37 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:37 def inverse; end - # source://rainbow//lib/rainbow/null_presenter.rb#25 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:25 def italic; end - # source://rainbow//lib/rainbow/null_presenter.rb#69 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:69 def magenta; end - # source://rainbow//lib/rainbow/null_presenter.rb#81 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:81 def method_missing(method_name, *args); end - # source://rainbow//lib/rainbow/null_presenter.rb#53 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:53 def red; end - # source://rainbow//lib/rainbow/null_presenter.rb#13 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:13 def reset; end - # source://rainbow//lib/rainbow/null_presenter.rb#45 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:98 def strike; end - # source://rainbow//lib/rainbow/null_presenter.rb#29 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:29 def underline; end - # source://rainbow//lib/rainbow/null_presenter.rb#77 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:77 def white; end - # source://rainbow//lib/rainbow/null_presenter.rb#61 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:61 def yellow; end private - # @return [Boolean] - # - # source://rainbow//lib/rainbow/null_presenter.rb#89 + # pkg:gem/rainbow#lib/rainbow/null_presenter.rb:89 def respond_to_missing?(method_name, *args); end end -# source://rainbow//lib/rainbow/presenter.rb#8 +# pkg:gem/rainbow#lib/rainbow/presenter.rb:8 class Rainbow::Presenter < ::String # Sets background color of this text. # - # source://rainbow//lib/rainbow/presenter.rb#30 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:30 def background(*values); end - # Sets background color of this text. - # - # source://rainbow//lib/rainbow/presenter.rb#30 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:34 def bg(*values); end - # source://rainbow//lib/rainbow/presenter.rb#92 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:92 def black; end # Turns on blinking attribute for this text (not well supported by terminal # emulators). # - # source://rainbow//lib/rainbow/presenter.rb#72 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:72 def blink; end - # source://rainbow//lib/rainbow/presenter.rb#108 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:108 def blue; end - # Turns on bright/bold for this text. - # - # source://rainbow//lib/rainbow/presenter.rb#45 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:49 def bold; end # Turns on bright/bold for this text. # - # source://rainbow//lib/rainbow/presenter.rb#45 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:45 def bright; end # Sets color of this text. # - # source://rainbow//lib/rainbow/presenter.rb#22 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:22 def color(*values); end - # source://rainbow//lib/rainbow/presenter.rb#86 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:86 def cross_out; end - # source://rainbow//lib/rainbow/presenter.rb#116 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:116 def cyan; end - # Turns on faint/dark for this text (not well supported by terminal - # emulators). - # - # source://rainbow//lib/rainbow/presenter.rb#53 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:57 def dark; end # Turns on faint/dark for this text (not well supported by terminal # emulators). # - # source://rainbow//lib/rainbow/presenter.rb#53 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:53 def faint; end - # Sets color of this text. - # - # source://rainbow//lib/rainbow/presenter.rb#22 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:27 def fg(*values); end - # Sets color of this text. - # - # source://rainbow//lib/rainbow/presenter.rb#22 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:26 def foreground(*values); end - # source://rainbow//lib/rainbow/presenter.rb#100 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:100 def green; end # Hides this text (set its color to the same as background). # - # source://rainbow//lib/rainbow/presenter.rb#82 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:82 def hide; end # Inverses current foreground/background colors. # - # source://rainbow//lib/rainbow/presenter.rb#77 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:77 def inverse; end # Turns on italic style for this text (not well supported by terminal # emulators). # - # source://rainbow//lib/rainbow/presenter.rb#61 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:61 def italic; end - # source://rainbow//lib/rainbow/presenter.rb#112 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:112 def magenta; end # We take care of X11 color method call here. # Such as #aqua, #ghostwhite. # - # source://rainbow//lib/rainbow/presenter.rb#126 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:126 def method_missing(method_name, *args); end - # source://rainbow//lib/rainbow/presenter.rb#96 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:96 def red; end # Resets terminal to default colors/backgrounds. @@ -330,73 +300,63 @@ class Rainbow::Presenter < ::String # It shouldn't be needed to use this method because all methods # append terminal reset code to end of string. # - # source://rainbow//lib/rainbow/presenter.rb#40 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:40 def reset; end - # source://rainbow//lib/rainbow/presenter.rb#86 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:90 def strike; end # Turns on underline decoration for this text. # - # source://rainbow//lib/rainbow/presenter.rb#66 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:66 def underline; end - # source://rainbow//lib/rainbow/presenter.rb#120 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:120 def white; end - # source://rainbow//lib/rainbow/presenter.rb#104 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:104 def yellow; end private - # @return [Boolean] - # - # source://rainbow//lib/rainbow/presenter.rb#134 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:134 def respond_to_missing?(method_name, *args); end - # source://rainbow//lib/rainbow/presenter.rb#140 + # pkg:gem/rainbow#lib/rainbow/presenter.rb:140 def wrap_with_sgr(codes); end end -# source://rainbow//lib/rainbow/presenter.rb#9 +# pkg:gem/rainbow#lib/rainbow/presenter.rb:9 Rainbow::Presenter::TERM_EFFECTS = T.let(T.unsafe(nil), Hash) -# source://rainbow//lib/rainbow/string_utils.rb#4 +# pkg:gem/rainbow#lib/rainbow/string_utils.rb:4 class Rainbow::StringUtils class << self - # source://rainbow//lib/rainbow/string_utils.rb#17 + # pkg:gem/rainbow#lib/rainbow/string_utils.rb:17 def uncolor(string); end - # source://rainbow//lib/rainbow/string_utils.rb#5 + # pkg:gem/rainbow#lib/rainbow/string_utils.rb:5 def wrap_with_sgr(string, codes); end end end -# source://rainbow//lib/rainbow/wrapper.rb#7 +# pkg:gem/rainbow#lib/rainbow/wrapper.rb:7 class Rainbow::Wrapper - # @return [Wrapper] a new instance of Wrapper - # - # source://rainbow//lib/rainbow/wrapper.rb#10 + # pkg:gem/rainbow#lib/rainbow/wrapper.rb:10 def initialize(enabled = T.unsafe(nil)); end - # Returns the value of attribute enabled. - # - # source://rainbow//lib/rainbow/wrapper.rb#8 + # pkg:gem/rainbow#lib/rainbow/wrapper.rb:8 def enabled; end - # Sets the attribute enabled - # - # @param value the value to set the attribute enabled to. - # - # source://rainbow//lib/rainbow/wrapper.rb#8 + # pkg:gem/rainbow#lib/rainbow/wrapper.rb:8 def enabled=(_arg0); end - # source://rainbow//lib/rainbow/wrapper.rb#14 + # pkg:gem/rainbow#lib/rainbow/wrapper.rb:14 def wrap(string); end end -# source://rainbow//lib/rainbow/x11_color_names.rb#4 +# pkg:gem/rainbow#lib/rainbow/x11_color_names.rb:4 module Rainbow::X11ColorNames; end -# source://rainbow//lib/rainbow/x11_color_names.rb#5 +# pkg:gem/rainbow#lib/rainbow/x11_color_names.rb:5 Rainbow::X11ColorNames::NAMES = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/rake@13.0.6.rbi b/sorbet/rbi/gems/rake@13.2.1.rbi similarity index 63% rename from sorbet/rbi/gems/rake@13.0.6.rbi rename to sorbet/rbi/gems/rake@13.2.1.rbi index b7ce18b0b..92f4f94f5 100644 --- a/sorbet/rbi/gems/rake@13.0.6.rbi +++ b/sorbet/rbi/gems/rake@13.2.1.rbi @@ -4,31 +4,32 @@ # This is an autogenerated file for types exported from the `rake` gem. # Please instead update this file by running `bin/tapioca gem rake`. + # :stopdoc: # # Some top level Constants. # -# source://rake//lib/rake.rb#70 +# pkg:gem/rake#lib/rake.rb:69 FileList = Rake::FileList # -- # This a FileUtils extension that defines several additional commands to be # added to the FileUtils utility functions. # -# source://rake//lib/rake/file_utils.rb#8 +# pkg:gem/rake#lib/rake/file_utils.rb:8 module FileUtils # Run a Ruby interpreter with the given arguments. # # Example: # ruby %{-pe '$_.upcase!' ['a', 'b', 'c'] # - # source://rake//lib/rake/file_utils.rb#128 + # pkg:gem/rake#lib/rake/file_utils.rb:126 def split_all(path); end private - # source://rake//lib/rake/file_utils.rb#61 + # pkg:gem/rake#lib/rake/file_utils.rb:61 def create_shell_runner(cmd); end - # source://rake//lib/rake/file_utils.rb#86 + # pkg:gem/rake#lib/rake/file_utils.rb:84 def set_verbose_option(options); end - # source://rake//lib/rake/file_utils.rb#73 + # pkg:gem/rake#lib/rake/file_utils.rb:71 def sh_show_command(cmd); end end -# source://rake//lib/rake/file_utils.rb#108 +# pkg:gem/rake#lib/rake/file_utils.rb:106 FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array) # Path to the currently running Ruby program # -# source://rake//lib/rake/file_utils.rb#10 +# pkg:gem/rake#lib/rake/file_utils.rb:10 FileUtils::RUBY = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/ext/core.rb#2 +# pkg:gem/rake#lib/rake/ext/core.rb:2 class Module # Check for an existing method in the current class before extending. If # the method already exists, then a warning is printed and the extension is @@ -107,11 +108,34 @@ class Module # end # end # - # source://rake//lib/rake/ext/core.rb#18 + # pkg:gem/rake#lib/rake/ext/core.rb:18 def rake_extension(method); end end -# source://rake//lib/rake.rb#24 +# -- +# Copyright 2003-2010 by Jim Weirich (jim.weirich@gmail.com) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# ++ +# :stopdoc: +# +# pkg:gem/rake#lib/rake.rb:24 module Rake extend ::FileUtils::StreamUtils_ extend ::FileUtils @@ -120,41 +144,41 @@ module Rake class << self # Add files to the rakelib list # - # source://rake//lib/rake/rake_module.rb#33 + # pkg:gem/rake#lib/rake/rake_module.rb:33 def add_rakelib(*files); end # Current Rake Application # - # source://rake//lib/rake/rake_module.rb#8 + # pkg:gem/rake#lib/rake/rake_module.rb:8 def application; end # Set the current Rake application object. # - # source://rake//lib/rake/rake_module.rb#13 + # pkg:gem/rake#lib/rake/rake_module.rb:13 def application=(app); end # Yield each file or directory component. # - # source://rake//lib/rake/file_list.rb#418 + # pkg:gem/rake#lib/rake/file_list.rb:418 def each_dir_parent(dir); end # Convert Pathname and Pathname-like objects to strings; # leave everything else alone # - # source://rake//lib/rake/file_list.rb#429 + # pkg:gem/rake#lib/rake/file_list.rb:429 def from_pathname(path); end # Load a rakefile. # - # source://rake//lib/rake/rake_module.rb#28 + # pkg:gem/rake#lib/rake/rake_module.rb:28 def load_rakefile(path); end # Return the original directory where the Rake application was started. # - # source://rake//lib/rake/rake_module.rb#23 + # pkg:gem/rake#lib/rake/rake_module.rb:23 def original_dir; end - # source://rake//lib/rake/rake_module.rb#17 + # pkg:gem/rake#lib/rake/rake_module.rb:17 def suggested_thread_count; end # Make +block_application+ the default rake application inside a block so @@ -173,7 +197,7 @@ module Rake # # puts other_rake.tasks # - # source://rake//lib/rake/rake_module.rb#54 + # pkg:gem/rake#lib/rake/rake_module.rb:54 def with_application(block_application = T.unsafe(nil)); end end end @@ -181,27 +205,25 @@ end # Rake main application object. When invoking +rake+ from the # command line, a Rake::Application object is created and run. # -# source://rake//lib/rake/application.rb#19 +# pkg:gem/rake#lib/rake/application.rb:19 class Rake::Application include ::Rake::TaskManager include ::Rake::TraceOutput # Initialize a Rake::Application object. # - # @return [Application] a new instance of Application - # - # source://rake//lib/rake/application.rb#49 + # pkg:gem/rake#lib/rake/application.rb:49 def initialize; end # Add a file to the list of files to be imported. # - # source://rake//lib/rake/application.rb#777 + # pkg:gem/rake#lib/rake/application.rb:807 def add_import(fn); end # Add a loader to handle imported files ending in the extension # +ext+. # - # source://rake//lib/rake/application.rb#139 + # pkg:gem/rake#lib/rake/application.rb:161 def add_loader(ext, loader); end # Collect the list of tasks on the command line. If no tasks are @@ -213,13 +235,13 @@ class Rake::Application # recognised command-line options, which OptionParser.parse will # have taken care of already. # - # source://rake//lib/rake/application.rb#758 + # pkg:gem/rake#lib/rake/application.rb:788 def collect_command_line_tasks(args); end # Default task name ("default"). # (May be overridden by subclasses) # - # source://rake//lib/rake/application.rb#772 + # pkg:gem/rake#lib/rake/application.rb:802 def default_task_name; end # Warn about deprecated usage. @@ -227,133 +249,131 @@ class Rake::Application # Example: # Rake.application.deprecate("import", "Rake.import", caller.first) # - # source://rake//lib/rake/application.rb#258 + # pkg:gem/rake#lib/rake/application.rb:288 def deprecate(old_usage, new_usage, call_site); end - # source://rake//lib/rake/application.rb#222 + # pkg:gem/rake#lib/rake/application.rb:250 def display_cause_details(ex); end # Display the error message that caused the exception. # - # source://rake//lib/rake/application.rb#206 + # pkg:gem/rake#lib/rake/application.rb:234 def display_error_message(ex); end - # source://rake//lib/rake/application.rb#245 + # pkg:gem/rake#lib/rake/application.rb:275 def display_exception_backtrace(ex); end - # source://rake//lib/rake/application.rb#214 + # pkg:gem/rake#lib/rake/application.rb:242 def display_exception_details(ex); end - # source://rake//lib/rake/application.rb#229 + # pkg:gem/rake#lib/rake/application.rb:257 def display_exception_details_seen; end - # source://rake//lib/rake/application.rb#237 + # pkg:gem/rake#lib/rake/application.rb:265 def display_exception_message_details(ex); end # Display the tasks and prerequisites # - # source://rake//lib/rake/application.rb#381 + # pkg:gem/rake#lib/rake/application.rb:411 def display_prerequisites; end # Display the tasks and comments. # - # source://rake//lib/rake/application.rb#298 + # pkg:gem/rake#lib/rake/application.rb:328 def display_tasks_and_comments; end # Calculate the dynamic width of the # - # source://rake//lib/rake/application.rb#349 + # pkg:gem/rake#lib/rake/application.rb:379 def dynamic_width; end - # source://rake//lib/rake/application.rb#353 + # pkg:gem/rake#lib/rake/application.rb:383 def dynamic_width_stty; end - # source://rake//lib/rake/application.rb#357 + # pkg:gem/rake#lib/rake/application.rb:387 def dynamic_width_tput; end # Exit the program because of an unhandled exception. # (may be overridden by subclasses) # - # source://rake//lib/rake/application.rb#201 + # pkg:gem/rake#lib/rake/application.rb:229 def exit_because_of_exception(ex); end - # source://rake//lib/rake/application.rb#678 + # pkg:gem/rake#lib/rake/application.rb:708 def find_rakefile_location; end # Read and handle the command line options. Returns the command line # arguments that we didn't understand, which should (in theory) be just # task names and env vars. # - # source://rake//lib/rake/application.rb#644 + # pkg:gem/rake#lib/rake/application.rb:674 def handle_options(argv); end - # @return [Boolean] - # - # source://rake//lib/rake/application.rb#233 + # pkg:gem/rake#lib/rake/application.rb:261 def has_cause?(ex); end # True if one of the files in RAKEFILES is in the current directory. # If a match is found, it is copied into @rakefile. # - # source://rake//lib/rake/application.rb#274 + # pkg:gem/rake#lib/rake/application.rb:304 def have_rakefile; end # Initialize the command line parameters and app name. # - # source://rake//lib/rake/application.rb#88 + # pkg:gem/rake#lib/rake/application.rb:88 def init(app_name = T.unsafe(nil), argv = T.unsafe(nil)); end # Invokes a task with arguments that are extracted from +task_string+ # - # source://rake//lib/rake/application.rb#157 + # pkg:gem/rake#lib/rake/application.rb:185 def invoke_task(task_string); end # Load the pending list of imported files. # - # source://rake//lib/rake/application.rb#782 + # pkg:gem/rake#lib/rake/application.rb:812 def load_imports; end # Find the rakefile and then load it and any pending imports. # - # source://rake//lib/rake/application.rb#102 + # pkg:gem/rake#lib/rake/application.rb:124 def load_rakefile; end # The name of the application (typically 'rake') # - # source://rake//lib/rake/application.rb#24 + # pkg:gem/rake#lib/rake/application.rb:24 def name; end # Application options from the command line # - # source://rake//lib/rake/application.rb#145 + # pkg:gem/rake#lib/rake/application.rb:167 def options; end # The original directory where rake was invoked. # - # source://rake//lib/rake/application.rb#27 + # pkg:gem/rake#lib/rake/application.rb:27 def original_dir; end - # source://rake//lib/rake/application.rb#163 + # pkg:gem/rake#lib/rake/application.rb:191 def parse_task_string(string); end - # source://rake//lib/rake/application.rb#690 + # pkg:gem/rake#lib/rake/application.rb:720 def print_rakefile_directory(location); end # Similar to the regular Ruby +require+ command, but will check # for *.rake files in addition to *.rb files. # - # source://rake//lib/rake/application.rb#664 + # pkg:gem/rake#lib/rake/application.rb:694 def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end # Name of the actual rakefile used. # - # source://rake//lib/rake/application.rb#30 + # pkg:gem/rake#lib/rake/application.rb:30 def rakefile; end - # source://rake//lib/rake/application.rb#798 + # pkg:gem/rake#lib/rake/application.rb:828 def rakefile_location(backtrace = T.unsafe(nil)); end - # source://rake//lib/rake/application.rb#695 + # pkg:gem/rake#lib/rake/application.rb:725 def raw_load_rakefile; end # Run the Rake application. The run method performs the following @@ -367,176 +387,169 @@ class Rake::Application # +init+ on your application. Then define any tasks. Finally, # call +top_level+ to run your top level tasks. # - # source://rake//lib/rake/application.rb#79 + # pkg:gem/rake#lib/rake/application.rb:79 def run(argv = T.unsafe(nil)); end # Run the given block with the thread startup and shutdown. # - # source://rake//lib/rake/application.rb#122 + # pkg:gem/rake#lib/rake/application.rb:144 def run_with_threads; end - # source://rake//lib/rake/application.rb#807 + # pkg:gem/rake#lib/rake/application.rb:837 def set_default_options; end # Provide standard exception handling for the given block. # - # source://rake//lib/rake/application.rb#185 + # pkg:gem/rake#lib/rake/application.rb:213 def standard_exception_handling; end # A list of all the standard options used in rake, suitable for # passing to OptionParser. # - # source://rake//lib/rake/application.rb#402 + # pkg:gem/rake#lib/rake/application.rb:432 def standard_rake_options; end # The directory path containing the system wide rakefiles. # - # source://rake//lib/rake/application.rb#727 + # pkg:gem/rake#lib/rake/application.rb:757 def system_dir; end # Number of columns on the terminal # - # source://rake//lib/rake/application.rb#33 + # pkg:gem/rake#lib/rake/application.rb:33 def terminal_columns; end # Number of columns on the terminal # - # source://rake//lib/rake/application.rb#33 + # pkg:gem/rake#lib/rake/application.rb:33 def terminal_columns=(_arg0); end - # source://rake//lib/rake/application.rb#337 + # pkg:gem/rake#lib/rake/application.rb:367 def terminal_width; end # Return the thread pool used for multithreaded processing. # - # source://rake//lib/rake/application.rb#150 + # pkg:gem/rake#lib/rake/application.rb:178 def thread_pool; end # Run the top level tasks of a Rake application. # - # source://rake//lib/rake/application.rb#109 + # pkg:gem/rake#lib/rake/application.rb:131 def top_level; end # List of the top level task names (task names from the command line). # - # source://rake//lib/rake/application.rb#36 + # pkg:gem/rake#lib/rake/application.rb:36 def top_level_tasks; end - # source://rake//lib/rake/application.rb#388 + # pkg:gem/rake#lib/rake/application.rb:418 def trace(*strings); end - # source://rake//lib/rake/application.rb#370 + # pkg:gem/rake#lib/rake/application.rb:400 def truncate(string, width); end # We will truncate output if we are outputting to a TTY or if we've been # given an explicit column width to honor # - # @return [Boolean] - # - # source://rake//lib/rake/application.rb#293 + # pkg:gem/rake#lib/rake/application.rb:323 def truncate_output?; end # Override the detected TTY output state (mostly for testing) # - # source://rake//lib/rake/application.rb#39 + # pkg:gem/rake#lib/rake/application.rb:39 def tty_output=(_arg0); end # True if we are outputting to TTY, false otherwise # - # @return [Boolean] - # - # source://rake//lib/rake/application.rb#287 + # pkg:gem/rake#lib/rake/application.rb:317 def tty_output?; end - # @return [Boolean] - # - # source://rake//lib/rake/application.rb#361 + # pkg:gem/rake#lib/rake/application.rb:391 def unix?; end - # @return [Boolean] - # - # source://rake//lib/rake/application.rb#366 + # pkg:gem/rake#lib/rake/application.rb:396 def windows?; end private - # source://rake//lib/rake/application.rb#721 + # pkg:gem/rake#lib/rake/application.rb:751 def glob(path, &block); end # Does the exception have a task invocation chain? # - # @return [Boolean] - # - # source://rake//lib/rake/application.rb#267 + # pkg:gem/rake#lib/rake/application.rb:297 def has_chain?(exception); end - # source://rake//lib/rake/application.rb#620 + # pkg:gem/rake#lib/rake/application.rb:102 + def load_debug_at_stop_feature; end + + # pkg:gem/rake#lib/rake/application.rb:650 def select_tasks_to_show(options, show_tasks, value); end - # source://rake//lib/rake/application.rb#627 + # pkg:gem/rake#lib/rake/application.rb:657 def select_trace_output(options, trace_option, value); end - # source://rake//lib/rake/application.rb#393 + # pkg:gem/rake#lib/rake/application.rb:423 def sort_options(options); end - # source://rake//lib/rake/application.rb#744 + # pkg:gem/rake#lib/rake/application.rb:774 def standard_system_dir; end end -# source://rake//lib/rake/application.rb#41 +# pkg:gem/rake#lib/rake/application.rb:41 Rake::Application::DEFAULT_RAKEFILES = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/backtrace.rb#3 +# pkg:gem/rake#lib/rake/backtrace.rb:3 module Rake::Backtrace class << self - # source://rake//lib/rake/backtrace.rb#18 + # pkg:gem/rake#lib/rake/backtrace.rb:19 def collapse(backtrace); end end end -# source://rake//lib/rake/backtrace.rb#8 +# pkg:gem/rake#lib/rake/backtrace.rb:8 Rake::Backtrace::SUPPRESSED_PATHS = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/backtrace.rb#12 +# pkg:gem/rake#lib/rake/backtrace.rb:12 Rake::Backtrace::SUPPRESSED_PATHS_RE = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/backtrace.rb#16 +# pkg:gem/rake#lib/rake/backtrace.rb:17 Rake::Backtrace::SUPPRESS_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://rake//lib/rake/backtrace.rb#4 +# pkg:gem/rake#lib/rake/backtrace.rb:4 Rake::Backtrace::SYS_KEYS = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/backtrace.rb#5 +# pkg:gem/rake#lib/rake/backtrace.rb:5 Rake::Backtrace::SYS_PATHS = T.let(T.unsafe(nil), Array) # Mixin for creating easily cloned objects. # -# source://rake//lib/rake/cloneable.rb#6 +# pkg:gem/rake#lib/rake/cloneable.rb:6 module Rake::Cloneable private # The hook that is invoked by 'clone' and 'dup' methods. # - # source://rake//lib/rake/cloneable.rb#8 + # pkg:gem/rake#lib/rake/cloneable.rb:8 def initialize_copy(source); end end -# source://rake//lib/rake/application.rb#13 +# pkg:gem/rake#lib/rake/application.rb:13 class Rake::CommandLineOptionError < ::StandardError; end # Based on a script at: # http://stackoverflow.com/questions/891537/ruby-detect-number-of-cpus-installed # -# source://rake//lib/rake/cpu_counter.rb#6 +# pkg:gem/rake#lib/rake/cpu_counter.rb:6 class Rake::CpuCounter - # source://rake//lib/rake/cpu_counter.rb#22 + # pkg:gem/rake#lib/rake/cpu_counter.rb:22 def count; end - # source://rake//lib/rake/cpu_counter.rb#11 + # pkg:gem/rake#lib/rake/cpu_counter.rb:11 def count_with_default(default = T.unsafe(nil)); end class << self - # source://rake//lib/rake/cpu_counter.rb#7 + # pkg:gem/rake#lib/rake/cpu_counter.rb:7 def count; end end end @@ -547,7 +560,7 @@ end # For a Rakefile you run from the command line this module is automatically # included. # -# source://rake//lib/rake/dsl_definition.rb#14 +# pkg:gem/rake#lib/rake/dsl_definition.rb:14 module Rake::DSL include ::FileUtils::StreamUtils_ include ::FileUtils @@ -555,34 +568,34 @@ module Rake::DSL private - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def cd(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def chdir(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def chmod(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def chmod_R(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def chown(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def chown_R(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def copy(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def cp(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def cp_lr(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def cp_r(*args, **options, &block); end # Describes the next rake task. Duplicate descriptions are discarded. @@ -591,11 +604,11 @@ module Rake::DSL # # Example: # desc "Run the Unit Tests" - # task test: [:build] + # task test: [:build] do # # ... run tests # end # - # source://rake//lib/rake/dsl_definition.rb#165 + # pkg:gem/rake#lib/rake/dsl_definition.rb:166 def desc(description); end # Declare a set of files tasks to create the given directories on @@ -604,7 +617,7 @@ module Rake::DSL # Example: # directory "testdata/doc" # - # source://rake//lib/rake/dsl_definition.rb#92 + # pkg:gem/rake#lib/rake/dsl_definition.rb:92 def directory(*args, &block); end # Declare a file task. @@ -620,13 +633,13 @@ module Rake::DSL # end # end # - # source://rake//lib/rake/dsl_definition.rb#76 + # pkg:gem/rake#lib/rake/dsl_definition.rb:76 def file(*args, &block); end # Declare a file creation task. # (Mainly used for the directory command). # - # source://rake//lib/rake/dsl_definition.rb#82 + # pkg:gem/rake#lib/rake/dsl_definition.rb:82 def file_create(*args, &block); end # Import the partial Rakefiles +fn+. Imported files are loaded @@ -643,40 +656,40 @@ module Rake::DSL # Example: # import ".depend", "my_rules" # - # source://rake//lib/rake/dsl_definition.rb#183 + # pkg:gem/rake#lib/rake/dsl_definition.rb:184 def import(*fns); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def install(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def link(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def ln(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def ln_s(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def ln_sf(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def ln_sr(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def makedirs(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def mkdir(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def mkdir_p(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def mkpath(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def move(*args, **options, &block); end # Declare a task that performs its prerequisites in @@ -687,10 +700,10 @@ module Rake::DSL # Example: # multitask deploy: %w[deploy_gem deploy_rdoc] # - # source://rake//lib/rake/dsl_definition.rb#112 + # pkg:gem/rake#lib/rake/dsl_definition.rb:113 def multitask(*args, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def mv(*args, **options, &block); end # Create a new rake namespace and use it for evaluating the given @@ -712,65 +725,65 @@ module Rake::DSL # # ... # end # - # source://rake//lib/rake/dsl_definition.rb#135 + # pkg:gem/rake#lib/rake/dsl_definition.rb:136 def namespace(name = T.unsafe(nil), &block); end - # source://rake//lib/rake/file_utils_ext.rb#77 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def nowrite(value = T.unsafe(nil)); end - # source://rake//lib/rake/file_utils_ext.rb#123 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rake_check_options(options, *optdecl); end - # source://rake//lib/rake/file_utils_ext.rb#116 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rake_output_message(message); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def remove(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rm(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rm_f(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rm_r(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rm_rf(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rmdir(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rmtree(*args, **options, &block); end - # source://rake//lib/rake/file_utils.rb#100 + # pkg:gem/rake#lib/rake/dsl_definition.rb:23 def ruby(*args, **options, &block); end # Declare a rule for auto-tasks. # # Example: # rule '.o' => '.c' do |t| - # sh 'cc', '-o', t.name, t.source + # sh 'cc', '-c', '-o', t.name, t.source # end # - # source://rake//lib/rake/dsl_definition.rb#151 + # pkg:gem/rake#lib/rake/dsl_definition.rb:152 def rule(*args, &block); end - # source://rake//lib/rake/file_utils.rb#112 + # pkg:gem/rake#lib/rake/dsl_definition.rb:23 def safe_ln(*args, **options); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def safe_unlink(*args, **options, &block); end - # source://rake//lib/rake/file_utils.rb#43 + # pkg:gem/rake#lib/rake/dsl_definition.rb:23 def sh(*cmd, &block); end - # source://rake//lib/rake/file_utils.rb#128 + # pkg:gem/rake#lib/rake/dsl_definition.rb:23 def split_all(path); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def symlink(*args, **options, &block); end # :call-seq: @@ -804,55 +817,59 @@ module Rake::DSL # # $ rake package[1.2.3] # - # source://rake//lib/rake/dsl_definition.rb#59 + # pkg:gem/rake#lib/rake/dsl_definition.rb:59 def task(*args, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def touch(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#53 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def verbose(value = T.unsafe(nil)); end - # source://rake//lib/rake/file_utils_ext.rb#107 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def when_writing(msg = T.unsafe(nil)); end end # Default Rakefile loader used by +import+. # -# source://rake//lib/rake/default_loader.rb#5 +# pkg:gem/rake#lib/rake/default_loader.rb:5 class Rake::DefaultLoader # Loads a rakefile into the current application from +fn+ # - # source://rake//lib/rake/default_loader.rb#10 + # pkg:gem/rake#lib/rake/default_loader.rb:10 def load(fn); end end -# source://rake//lib/rake/early_time.rb#21 +# pkg:gem/rake#lib/rake/early_time.rb:21 Rake::EARLY = T.let(T.unsafe(nil), Rake::EarlyTime) -# source://rake//lib/rake/task_arguments.rb#108 +# pkg:gem/rake#lib/rake/task_arguments.rb:108 Rake::EMPTY_TASK_ARGS = T.let(T.unsafe(nil), Rake::TaskArguments) # EarlyTime is a fake timestamp that occurs _before_ any other time value. # -# source://rake//lib/rake/early_time.rb#5 +# pkg:gem/rake#lib/rake/early_time.rb:5 class Rake::EarlyTime include ::Comparable + include ::Singleton::SingletonInstanceMethods include ::Singleton extend ::Singleton::SingletonClassMethods # The EarlyTime always comes before +other+! # - # source://rake//lib/rake/early_time.rb#12 + # pkg:gem/rake#lib/rake/early_time.rb:12 def <=>(other); end - # source://rake//lib/rake/early_time.rb#16 + # pkg:gem/rake#lib/rake/early_time.rb:16 def to_s; end class << self private + # pkg:gem/rake#lib/rake/early_time.rb:7 def allocate; end + + # pkg:gem/rake#lib/rake/early_time.rb:7 def new(*_arg0); end end end @@ -862,19 +879,17 @@ end # not re-triggered if any of its dependencies are newer, nor does trigger # any rebuilds of tasks that depend on it whenever it is updated. # -# source://rake//lib/rake/file_creation_task.rb#12 +# pkg:gem/rake#lib/rake/file_creation_task.rb:12 class Rake::FileCreationTask < ::Rake::FileTask # Is this file task needed? Yes if it doesn't exist. # - # @return [Boolean] - # - # source://rake//lib/rake/file_creation_task.rb#14 + # pkg:gem/rake#lib/rake/file_creation_task.rb:14 def needed?; end # Time stamp for file creation task. This time stamp is earlier # than any other time stamp. # - # source://rake//lib/rake/file_creation_task.rb#20 + # pkg:gem/rake#lib/rake/file_creation_task.rb:20 def timestamp; end end @@ -891,7 +906,7 @@ end # FileList/Array is requested, the pending patterns are resolved into a real # list of file names. # -# source://rake//lib/rake/file_list.rb#22 +# pkg:gem/rake#lib/rake/file_list.rb:22 class Rake::FileList include ::Rake::Cloneable @@ -906,165 +921,154 @@ class Rake::FileList # fl.exclude(/\bCVS\b/) # end # - # @return [FileList] a new instance of FileList - # @yield [_self] - # @yieldparam _self [Rake::FileList] the object that the method was called on - # - # source://rake//lib/rake/file_list.rb#99 + # pkg:gem/rake#lib/rake/file_list.rb:99 def initialize(*patterns); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def &(*args, &block); end # Redefine * to return either a string or a new file list. # - # source://rake//lib/rake/file_list.rb#193 + # pkg:gem/rake#lib/rake/file_list.rb:193 def *(other); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def +(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def -(*args, &block); end - # source://rake//lib/rake/file_list.rb#203 + # pkg:gem/rake#lib/rake/file_list.rb:203 def <<(obj); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def <=>(*args, &block); end # A FileList is equal through array equality. # - # source://rake//lib/rake/file_list.rb#171 + # pkg:gem/rake#lib/rake/file_list.rb:171 def ==(array); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def [](*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def []=(*args, &block); end - # Add file names defined by glob patterns to the file list. If an array - # is given, add each element of the array. - # - # Example: - # file_list.include("*.java", "*.cfg") - # file_list.include %w( math.c lib.h *.o ) - # - # source://rake//lib/rake/file_list.rb#116 + # pkg:gem/rake#lib/rake/file_list.rb:128 def add(*filenames); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def all?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def any?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def append(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def assoc(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def at(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def bsearch(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def bsearch_index(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def chain(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def chunk(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def chunk_while(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def clear(*args, &block); end # Clear all the exclude patterns so that we exclude nothing. # - # source://rake//lib/rake/file_list.rb#164 + # pkg:gem/rake#lib/rake/file_list.rb:164 def clear_exclude; end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def collect(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def collect!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def collect_concat(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def combination(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def compact(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def compact!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def concat(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def count(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def cycle(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def deconstruct(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def delete(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def delete_at(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def delete_if(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def detect(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def difference(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def dig(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def drop(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def drop_while(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def each(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def each_cons(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def each_entry(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def each_index(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def each_slice(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def each_with_index(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def each_with_object(*args, &block); end # Grep each of the files in the filelist using the given pattern. If a @@ -1073,13 +1077,13 @@ class Rake::FileList # a standard emacs style file:linenumber:line message will be printed to # standard out. Returns the number of matched items. # - # source://rake//lib/rake/file_list.rb#293 + # pkg:gem/rake#lib/rake/file_list.rb:293 def egrep(pattern, *options); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def empty?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def entries(*args, &block); end # Register a list of file name patterns that should be excluded from the @@ -1102,7 +1106,7 @@ class Rake::FileList # If "a.c" is not a file, then ... # FileList['a.c', 'b.c'].exclude("a.*") => ['a.c', 'b.c'] # - # source://rake//lib/rake/file_list.rb#150 + # pkg:gem/rake#lib/rake/file_list.rb:150 def exclude(*patterns, &block); end # Should the given file name be excluded from the list? @@ -1113,21 +1117,19 @@ class Rake::FileList # confusion. If you were using "FileList#exclude?" in your user # code, you will need to update. # - # @return [Boolean] - # - # source://rake//lib/rake/file_list.rb#364 + # pkg:gem/rake#lib/rake/file_list.rb:364 def excluded_from_list?(fn); end # Return a new file list that only contains file names from the current # file list that exist on the file system. # - # source://rake//lib/rake/file_list.rb#320 + # pkg:gem/rake#lib/rake/file_list.rb:320 def existing; end # Modify the current file list so that it contains only file name that # exist on the file system. # - # source://rake//lib/rake/file_list.rb#326 + # pkg:gem/rake#lib/rake/file_list.rb:326 def existing!; end # Return a new FileList with String#ext method applied to @@ -1139,52 +1141,55 @@ class Rake::FileList # # +ext+ is a user added method for the Array class. # - # source://rake//lib/rake/file_list.rb#284 + # pkg:gem/rake#lib/rake/file_list.rb:284 def ext(newext = T.unsafe(nil)); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def fetch(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 + def fetch_values(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 def fill(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def filter(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def filter!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def filter_map(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def find(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def find_all(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def find_index(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def first(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def flat_map(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def flatten(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def flatten!(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def grep(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def grep_v(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def group_by(*args, &block); end # Return a new FileList with the results of running +gsub+ against each @@ -1194,15 +1199,15 @@ class Rake::FileList # FileList['lib/test/file', 'x/y'].gsub(/\//, "\\") # => ['lib\\test\\file', 'x\\y'] # - # source://rake//lib/rake/file_list.rb#253 + # pkg:gem/rake#lib/rake/file_list.rb:253 def gsub(pat, rep); end # Same as +gsub+ except that the original file list is modified. # - # source://rake//lib/rake/file_list.rb#264 + # pkg:gem/rake#lib/rake/file_list.rb:264 def gsub!(pat, rep); end - # source://rake//lib/rake/file_list.rb#391 + # pkg:gem/rake#lib/rake/file_list.rb:391 def import(array); end # Add file names defined by glob patterns to the file list. If an array @@ -1212,219 +1217,213 @@ class Rake::FileList # file_list.include("*.java", "*.cfg") # file_list.include %w( math.c lib.h *.o ) # - # source://rake//lib/rake/file_list.rb#116 + # pkg:gem/rake#lib/rake/file_list.rb:116 def include(*filenames); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def include?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def index(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def inject(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def insert(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def inspect(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def intersect?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def intersection(*args, &block); end # Lie about our class. # - # @return [Boolean] - # - # source://rake//lib/rake/file_list.rb#187 + # pkg:gem/rake#lib/rake/file_list.rb:187 def is_a?(klass); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def join(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def keep_if(*args, &block); end - # Lie about our class. - # - # @return [Boolean] - # - # source://rake//lib/rake/file_list.rb#187 + # pkg:gem/rake#lib/rake/file_list.rb:190 def kind_of?(klass); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def last(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def lazy(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def length(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def map(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def map!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def max(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def max_by(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def member?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def min(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def min_by(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def minmax(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def minmax_by(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def none?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def one?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def pack(*args, &block); end # FileList version of partition. Needed because the nested arrays should # be FileLists in this version. # - # source://rake//lib/rake/file_list.rb#334 + # pkg:gem/rake#lib/rake/file_list.rb:334 def partition(&block); end # Apply the pathmap spec to each of the included file names, returning a # new file list with the modified paths. (See String#pathmap for # details.) # - # source://rake//lib/rake/file_list.rb#272 + # pkg:gem/rake#lib/rake/file_list.rb:272 def pathmap(spec = T.unsafe(nil), &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def permutation(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 - def place(*args, &block); end - - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def pop(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def prepend(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def product(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def push(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def rassoc(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def reduce(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def reject(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def reject!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def repeated_combination(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def repeated_permutation(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def replace(*args, &block); end # Resolve all the pending adds now. # - # source://rake//lib/rake/file_list.rb#210 + # pkg:gem/rake#lib/rake/file_list.rb:210 def resolve; end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def reverse(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def reverse!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def reverse_each(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 + def rfind(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 def rindex(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def rotate(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def rotate!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def sample(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def select(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def select!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def shelljoin(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def shift(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def shuffle(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def shuffle!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def size(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def slice(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def slice!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def slice_after(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def slice_before(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def slice_when(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def sort(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def sort!(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def sort_by(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def sort_by!(*args, &block); end # Return a new FileList with the results of running +sub+ against each @@ -1433,97 +1432,82 @@ class Rake::FileList # Example: # FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o'] # - # source://rake//lib/rake/file_list.rb#242 + # pkg:gem/rake#lib/rake/file_list.rb:242 def sub(pat, rep); end # Same as +sub+ except that the original file list is modified. # - # source://rake//lib/rake/file_list.rb#258 + # pkg:gem/rake#lib/rake/file_list.rb:258 def sub!(pat, rep); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def sum(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def take(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def take_while(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def tally(*args, &block); end # Return the internal array object. # - # source://rake//lib/rake/file_list.rb#176 + # pkg:gem/rake#lib/rake/file_list.rb:176 def to_a; end # Return the internal array object. # - # source://rake//lib/rake/file_list.rb#182 + # pkg:gem/rake#lib/rake/file_list.rb:182 def to_ary; end - # source://rake//lib/rake/file_list.rb#77 - def to_default_s(*args, &block); end - - # source://rake//lib/rake/file_list.rb#77 - def to_formatted_s(*args, &block); end - - # source://rake//lib/rake/file_list.rb#77 - def to_fs(*args, &block); end - - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def to_h(*args, &block); end # Convert a FileList to a string by joining all elements with a space. # - # source://rake//lib/rake/file_list.rb#344 + # pkg:gem/rake#lib/rake/file_list.rb:344 def to_s; end - # source://rake//lib/rake/file_list.rb#77 - def to_sentence(*args, &block); end - - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def to_set(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 - def to_xml(*args, &block); end - - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def transpose(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def union(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def uniq(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def uniq!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def unshift(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def values_at(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def zip(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def |(*args, &block); end private # Add matching glob patterns. # - # source://rake//lib/rake/file_list.rb#350 + # pkg:gem/rake#lib/rake/file_list.rb:350 def add_matching(pattern); end - # source://rake//lib/rake/file_list.rb#220 + # pkg:gem/rake#lib/rake/file_list.rb:220 def resolve_add(fn); end - # source://rake//lib/rake/file_list.rb#230 + # pkg:gem/rake#lib/rake/file_list.rb:230 def resolve_exclude; end class << self @@ -1531,14 +1515,14 @@ class Rake::FileList # # FileList.new(*args) # - # source://rake//lib/rake/file_list.rb#400 + # pkg:gem/rake#lib/rake/file_list.rb:400 def [](*args); end # Get a sorted list of files matching the pattern. This method # should be preferred to Dir[pattern] and Dir.glob(pattern) because # the files returned are guaranteed to be sorted. # - # source://rake//lib/rake/file_list.rb#407 + # pkg:gem/rake#lib/rake/file_list.rb:407 def glob(pattern, *args); end end end @@ -1546,36 +1530,36 @@ end # List of array methods (that are not in +Object+) that need to be # delegated. # -# source://rake//lib/rake/file_list.rb#44 +# pkg:gem/rake#lib/rake/file_list.rb:44 Rake::FileList::ARRAY_METHODS = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/file_list.rb#381 +# pkg:gem/rake#lib/rake/file_list.rb:381 Rake::FileList::DEFAULT_IGNORE_PATTERNS = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/file_list.rb#387 +# pkg:gem/rake#lib/rake/file_list.rb:387 Rake::FileList::DEFAULT_IGNORE_PROCS = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/file_list.rb#61 +# pkg:gem/rake#lib/rake/file_list.rb:61 Rake::FileList::DELEGATING_METHODS = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/file_list.rb#86 +# pkg:gem/rake#lib/rake/file_list.rb:86 Rake::FileList::GLOB_PATTERN = T.let(T.unsafe(nil), Regexp) # List of additional methods that must be delegated. # -# source://rake//lib/rake/file_list.rb#47 +# pkg:gem/rake#lib/rake/file_list.rb:47 Rake::FileList::MUST_DEFINE = T.let(T.unsafe(nil), Array) # List of methods that should not be delegated here (we define special # versions of them explicitly below). # -# source://rake//lib/rake/file_list.rb#51 +# pkg:gem/rake#lib/rake/file_list.rb:51 Rake::FileList::MUST_NOT_DEFINE = T.let(T.unsafe(nil), Array) # List of delegated methods that return new array values which need # wrapping. # -# source://rake//lib/rake/file_list.rb#55 +# pkg:gem/rake#lib/rake/file_list.rb:55 Rake::FileList::SPECIAL_RETURN = T.let(T.unsafe(nil), Array) # A FileTask is a task that includes time based dependencies. If any of a @@ -1583,35 +1567,31 @@ Rake::FileList::SPECIAL_RETURN = T.let(T.unsafe(nil), Array) # represented by this task, then the file must be rebuilt (using the # supplied actions). # -# source://rake//lib/rake/file_task.rb#12 +# pkg:gem/rake#lib/rake/file_task.rb:12 class Rake::FileTask < ::Rake::Task # Is this file task needed? Yes if it doesn't exist, or if its time stamp # is out of date. # - # @return [Boolean] - # - # source://rake//lib/rake/file_task.rb#16 + # pkg:gem/rake#lib/rake/file_task.rb:16 def needed?; end # Time stamp for file task. # - # source://rake//lib/rake/file_task.rb#21 + # pkg:gem/rake#lib/rake/file_task.rb:25 def timestamp; end private # Are there any prerequisites with a later time than the given time stamp? # - # @return [Boolean] - # - # source://rake//lib/rake/file_task.rb#32 + # pkg:gem/rake#lib/rake/file_task.rb:36 def out_of_date?(stamp); end class << self # Apply the scope to the task name according to the rules for this kind # of task. File based tasks ignore the scope when creating the name. # - # source://rake//lib/rake/file_task.rb#49 + # pkg:gem/rake#lib/rake/file_task.rb:53 def scope_name(scope, task_name); end end end @@ -1620,7 +1600,7 @@ end # that respond to the verbose and nowrite # commands. # -# source://rake//lib/rake/file_utils_ext.rb#10 +# pkg:gem/rake#lib/rake/file_utils_ext.rb:10 module Rake::FileUtilsExt include ::FileUtils::StreamUtils_ include ::FileUtils @@ -1628,70 +1608,70 @@ module Rake::FileUtilsExt extend ::FileUtils extend ::Rake::FileUtilsExt - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def cd(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def chdir(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def chmod(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def chmod_R(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def chown(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def chown_R(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def copy(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def cp(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def cp_lr(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def cp_r(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def install(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def link(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def ln(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def ln_s(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def ln_sf(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def ln_sr(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def makedirs(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def mkdir(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def mkdir_p(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def mkpath(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def move(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def mv(*args, **options, &block); end # Get/set the nowrite flag controlling output from the FileUtils @@ -1706,51 +1686,49 @@ module Rake::FileUtilsExt # # temporarily to _v_. Return to the # # original value when code is done. # - # source://rake//lib/rake/file_utils_ext.rb#77 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:77 def nowrite(value = T.unsafe(nil)); end # Check that the options do not contain options not listed in # +optdecl+. An ArgumentError exception is thrown if non-declared # options are found. # - # @raise [ArgumentError] - # - # source://rake//lib/rake/file_utils_ext.rb#123 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:123 def rake_check_options(options, *optdecl); end # Send the message to the default rake output (which is $stderr). # - # source://rake//lib/rake/file_utils_ext.rb#116 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:116 def rake_output_message(message); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def remove(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def rm(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def rm_f(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def rm_r(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def rm_rf(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def rmdir(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def rmtree(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def safe_unlink(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def symlink(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def touch(*args, **options, &block); end # Get/set the verbose flag controlling output from the FileUtils @@ -1765,7 +1743,7 @@ module Rake::FileUtilsExt # # temporarily to _v_. Return to the # # original value when code is done. # - # source://rake//lib/rake/file_utils_ext.rb#53 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:53 def verbose(value = T.unsafe(nil)); end # Use this function to prevent potentially destructive ruby code @@ -1785,131 +1763,119 @@ module Rake::FileUtilsExt # # instead of actually building the project. # - # source://rake//lib/rake/file_utils_ext.rb#107 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:107 def when_writing(msg = T.unsafe(nil)); end class << self - # Returns the value of attribute nowrite_flag. - # - # source://rake//lib/rake/file_utils_ext.rb#14 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:14 def nowrite_flag; end - # Sets the attribute nowrite_flag - # - # @param value the value to set the attribute nowrite_flag to. - # - # source://rake//lib/rake/file_utils_ext.rb#14 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:14 def nowrite_flag=(_arg0); end - # Returns the value of attribute verbose_flag. - # - # source://rake//lib/rake/file_utils_ext.rb#14 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:14 def verbose_flag; end - # Sets the attribute verbose_flag - # - # @param value the value to set the attribute verbose_flag to. - # - # source://rake//lib/rake/file_utils_ext.rb#14 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:14 def verbose_flag=(_arg0); end end end -# source://rake//lib/rake/file_utils_ext.rb#17 +# pkg:gem/rake#lib/rake/file_utils_ext.rb:17 Rake::FileUtilsExt::DEFAULT = T.let(T.unsafe(nil), Object) # InvocationChain tracks the chain of task invocations to detect # circular dependencies. # -# source://rake//lib/rake/invocation_chain.rb#6 +# pkg:gem/rake#lib/rake/invocation_chain.rb:6 class Rake::InvocationChain < ::Rake::LinkedList # Append an invocation to the chain of invocations. It is an error # if the invocation already listed. # - # source://rake//lib/rake/invocation_chain.rb#15 + # pkg:gem/rake#lib/rake/invocation_chain.rb:15 def append(invocation); end # Is the invocation already in the chain? # - # @return [Boolean] - # - # source://rake//lib/rake/invocation_chain.rb#9 + # pkg:gem/rake#lib/rake/invocation_chain.rb:9 def member?(invocation); end # Convert to string, ie: TOP => invocation => invocation # - # source://rake//lib/rake/invocation_chain.rb#23 + # pkg:gem/rake#lib/rake/invocation_chain.rb:23 def to_s; end private - # source://rake//lib/rake/invocation_chain.rb#34 + # pkg:gem/rake#lib/rake/invocation_chain.rb:34 def prefix; end class << self # Class level append. # - # source://rake//lib/rake/invocation_chain.rb#28 + # pkg:gem/rake#lib/rake/invocation_chain.rb:28 def append(invocation, chain); end end end -# source://rake//lib/rake/invocation_chain.rb#55 +# pkg:gem/rake#lib/rake/invocation_chain.rb:55 Rake::InvocationChain::EMPTY = T.let(T.unsafe(nil), Rake::InvocationChain::EmptyInvocationChain) # Null object for an empty chain. # -# source://rake//lib/rake/invocation_chain.rb#39 +# pkg:gem/rake#lib/rake/invocation_chain.rb:39 class Rake::InvocationChain::EmptyInvocationChain < ::Rake::LinkedList::EmptyLinkedList - # source://rake//lib/rake/invocation_chain.rb#46 + # pkg:gem/rake#lib/rake/invocation_chain.rb:46 def append(invocation); end - # @return [Boolean] - # - # source://rake//lib/rake/invocation_chain.rb#42 + # pkg:gem/rake#lib/rake/invocation_chain.rb:42 def member?(obj); end - # source://rake//lib/rake/invocation_chain.rb#50 + # pkg:gem/rake#lib/rake/invocation_chain.rb:50 def to_s; end end -# source://rake//lib/rake/invocation_exception_mixin.rb#3 +# pkg:gem/rake#lib/rake/invocation_exception_mixin.rb:3 module Rake::InvocationExceptionMixin # Return the invocation chain (list of Rake tasks) that were in # effect when this exception was detected by rake. May be null if # no tasks were active. # - # source://rake//lib/rake/invocation_exception_mixin.rb#7 + # pkg:gem/rake#lib/rake/invocation_exception_mixin.rb:7 def chain; end # Set the invocation chain in effect when this exception was # detected. # - # source://rake//lib/rake/invocation_exception_mixin.rb#13 + # pkg:gem/rake#lib/rake/invocation_exception_mixin.rb:13 def chain=(value); end end -# source://rake//lib/rake/late_time.rb#17 +# pkg:gem/rake#lib/rake/late_time.rb:17 Rake::LATE = T.let(T.unsafe(nil), Rake::LateTime) # LateTime is a fake timestamp that occurs _after_ any other time value. # -# source://rake//lib/rake/late_time.rb#4 +# pkg:gem/rake#lib/rake/late_time.rb:4 class Rake::LateTime include ::Comparable + include ::Singleton::SingletonInstanceMethods include ::Singleton extend ::Singleton::SingletonClassMethods - # source://rake//lib/rake/late_time.rb#8 + # pkg:gem/rake#lib/rake/late_time.rb:8 def <=>(other); end - # source://rake//lib/rake/late_time.rb#12 + # pkg:gem/rake#lib/rake/late_time.rb:12 def to_s; end class << self private + # pkg:gem/rake#lib/rake/late_time.rb:6 def allocate; end + + # pkg:gem/rake#lib/rake/late_time.rb:6 def new(*_arg0); end end end @@ -1917,29 +1883,27 @@ end # Polylithic linked list structure used to implement several data # structures in Rake. # -# source://rake//lib/rake/linked_list.rb#6 +# pkg:gem/rake#lib/rake/linked_list.rb:6 class Rake::LinkedList include ::Enumerable - # @return [LinkedList] a new instance of LinkedList - # - # source://rake//lib/rake/linked_list.rb#84 + # pkg:gem/rake#lib/rake/linked_list.rb:84 def initialize(head, tail = T.unsafe(nil)); end # Lists are structurally equivalent. # - # source://rake//lib/rake/linked_list.rb#25 + # pkg:gem/rake#lib/rake/linked_list.rb:25 def ==(other); end # Polymorphically add a new element to the head of a list. The # type of head node will be the same list type as the tail. # - # source://rake//lib/rake/linked_list.rb#12 + # pkg:gem/rake#lib/rake/linked_list.rb:12 def conj(item); end # For each item in the list. # - # source://rake//lib/rake/linked_list.rb#48 + # pkg:gem/rake#lib/rake/linked_list.rb:48 def each; end # Is the list empty? @@ -1947,51 +1911,45 @@ class Rake::LinkedList # object not empty by default # You should consider overriding this method if you implement your own .make method # - # @return [Boolean] - # - # source://rake//lib/rake/linked_list.rb#20 + # pkg:gem/rake#lib/rake/linked_list.rb:20 def empty?; end - # Returns the value of attribute head. - # - # source://rake//lib/rake/linked_list.rb#8 + # pkg:gem/rake#lib/rake/linked_list.rb:8 def head; end # Same as +to_s+, but with inspected items. # - # source://rake//lib/rake/linked_list.rb#42 + # pkg:gem/rake#lib/rake/linked_list.rb:42 def inspect; end - # Returns the value of attribute tail. - # - # source://rake//lib/rake/linked_list.rb#8 + # pkg:gem/rake#lib/rake/linked_list.rb:8 def tail; end # Convert to string: LL(item, item...) # - # source://rake//lib/rake/linked_list.rb#36 + # pkg:gem/rake#lib/rake/linked_list.rb:36 def to_s; end class << self # Cons a new head onto the tail list. # - # source://rake//lib/rake/linked_list.rb#73 + # pkg:gem/rake#lib/rake/linked_list.rb:73 def cons(head, tail); end # The standard empty list class for the given LinkedList class. # - # source://rake//lib/rake/linked_list.rb#78 + # pkg:gem/rake#lib/rake/linked_list.rb:78 def empty; end # Make a list out of the given arguments. This method is # polymorphic # - # source://rake//lib/rake/linked_list.rb#59 + # pkg:gem/rake#lib/rake/linked_list.rb:59 def make(*args); end end end -# source://rake//lib/rake/linked_list.rb#110 +# pkg:gem/rake#lib/rake/linked_list.rb:110 Rake::LinkedList::EMPTY = T.let(T.unsafe(nil), Rake::LinkedList::EmptyLinkedList) # Represent an empty list, using the Null Object Pattern. @@ -2001,20 +1959,16 @@ Rake::LinkedList::EMPTY = T.let(T.unsafe(nil), Rake::LinkedList::EmptyLinkedList # instance variable @parent to the associated list class (this # allows conj, cons and make to work polymorphically). # -# source://rake//lib/rake/linked_list.rb#95 +# pkg:gem/rake#lib/rake/linked_list.rb:95 class Rake::LinkedList::EmptyLinkedList < ::Rake::LinkedList - # @return [EmptyLinkedList] a new instance of EmptyLinkedList - # - # source://rake//lib/rake/linked_list.rb#98 + # pkg:gem/rake#lib/rake/linked_list.rb:98 def initialize; end - # @return [Boolean] - # - # source://rake//lib/rake/linked_list.rb#101 + # pkg:gem/rake#lib/rake/linked_list.rb:101 def empty?; end class << self - # source://rake//lib/rake/linked_list.rb#105 + # pkg:gem/rake#lib/rake/linked_list.rb:105 def cons(head, tail); end end end @@ -2022,60 +1976,58 @@ end # Same as a regular task, but the immediate prerequisites are done in # parallel using Ruby threads. # -# source://rake//lib/rake/multi_task.rb#7 +# pkg:gem/rake#lib/rake/multi_task.rb:7 class Rake::MultiTask < ::Rake::Task private - # source://rake//lib/rake/multi_task.rb#10 + # pkg:gem/rake#lib/rake/multi_task.rb:10 def invoke_prerequisites(task_args, invocation_chain); end end # The NameSpace class will lookup task names in the scope defined by a # +namespace+ command. # -# source://rake//lib/rake/name_space.rb#6 +# pkg:gem/rake#lib/rake/name_space.rb:6 class Rake::NameSpace # Create a namespace lookup object using the given task manager # and the list of scopes. # - # @return [NameSpace] a new instance of NameSpace - # - # source://rake//lib/rake/name_space.rb#12 + # pkg:gem/rake#lib/rake/name_space.rb:12 def initialize(task_manager, scope_list); end # Lookup a task named +name+ in the namespace. # - # source://rake//lib/rake/name_space.rb#20 + # pkg:gem/rake#lib/rake/name_space.rb:20 def [](name); end # The scope of the namespace (a LinkedList) # - # source://rake//lib/rake/name_space.rb#27 + # pkg:gem/rake#lib/rake/name_space.rb:27 def scope; end # Return the list of tasks defined in this and nested namespaces. # - # source://rake//lib/rake/name_space.rb#34 + # pkg:gem/rake#lib/rake/name_space.rb:34 def tasks; end end # Include PrivateReader to use +private_reader+. # -# source://rake//lib/rake/private_reader.rb#5 +# pkg:gem/rake#lib/rake/private_reader.rb:5 module Rake::PrivateReader mixes_in_class_methods ::Rake::PrivateReader::ClassMethods class << self - # source://rake//lib/rake/private_reader.rb#7 + # pkg:gem/rake#lib/rake/private_reader.rb:7 def included(base); end end end -# source://rake//lib/rake/private_reader.rb#11 +# pkg:gem/rake#lib/rake/private_reader.rb:11 module Rake::PrivateReader::ClassMethods # Declare a list of private accessors # - # source://rake//lib/rake/private_reader.rb#14 + # pkg:gem/rake#lib/rake/private_reader.rb:14 def private_reader(*names); end end @@ -2086,19 +2038,17 @@ end # # Used by ThreadPool. # -# source://rake//lib/rake/promise.rb#11 +# pkg:gem/rake#lib/rake/promise.rb:11 class Rake::Promise # Create a promise to do the chore specified by the block. # - # @return [Promise] a new instance of Promise - # - # source://rake//lib/rake/promise.rb#17 + # pkg:gem/rake#lib/rake/promise.rb:17 def initialize(args, &block); end - # source://rake//lib/rake/promise.rb#14 + # pkg:gem/rake#lib/rake/promise.rb:14 def recorder; end - # source://rake//lib/rake/promise.rb#14 + # pkg:gem/rake#lib/rake/promise.rb:14 def recorder=(_arg0); end # Return the value of this promise. @@ -2106,134 +2056,120 @@ class Rake::Promise # If the promised chore is not yet complete, then do the work # synchronously. We will wait. # - # source://rake//lib/rake/promise.rb#29 + # pkg:gem/rake#lib/rake/promise.rb:29 def value; end # If no one else is working this promise, go ahead and do the chore. # - # source://rake//lib/rake/promise.rb#42 + # pkg:gem/rake#lib/rake/promise.rb:42 def work; end private # Perform the chore promised # - # source://rake//lib/rake/promise.rb#57 + # pkg:gem/rake#lib/rake/promise.rb:57 def chore; end # Are we done with the promise # - # @return [Boolean] - # - # source://rake//lib/rake/promise.rb#83 + # pkg:gem/rake#lib/rake/promise.rb:83 def complete?; end # free up these items for the GC # - # source://rake//lib/rake/promise.rb#88 + # pkg:gem/rake#lib/rake/promise.rb:88 def discard; end # Did the promise throw an error # - # @return [Boolean] - # - # source://rake//lib/rake/promise.rb#78 + # pkg:gem/rake#lib/rake/promise.rb:78 def error?; end # Do we have a result for the promise # - # @return [Boolean] - # - # source://rake//lib/rake/promise.rb#73 + # pkg:gem/rake#lib/rake/promise.rb:73 def result?; end # Record execution statistics if there is a recorder # - # source://rake//lib/rake/promise.rb#94 + # pkg:gem/rake#lib/rake/promise.rb:94 def stat(*args); end end -# source://rake//lib/rake/promise.rb#12 +# pkg:gem/rake#lib/rake/promise.rb:12 Rake::Promise::NOT_SET = T.let(T.unsafe(nil), Object) # Exit status class for times the system just gives us a nil. # -# source://rake//lib/rake/pseudo_status.rb#6 +# pkg:gem/rake#lib/rake/pseudo_status.rb:6 class Rake::PseudoStatus - # @return [PseudoStatus] a new instance of PseudoStatus - # - # source://rake//lib/rake/pseudo_status.rb#9 + # pkg:gem/rake#lib/rake/pseudo_status.rb:9 def initialize(code = T.unsafe(nil)); end - # source://rake//lib/rake/pseudo_status.rb#17 + # pkg:gem/rake#lib/rake/pseudo_status.rb:17 def >>(n); end - # @return [Boolean] - # - # source://rake//lib/rake/pseudo_status.rb#25 + # pkg:gem/rake#lib/rake/pseudo_status.rb:25 def exited?; end - # source://rake//lib/rake/pseudo_status.rb#7 + # pkg:gem/rake#lib/rake/pseudo_status.rb:7 def exitstatus; end - # @return [Boolean] - # - # source://rake//lib/rake/pseudo_status.rb#21 + # pkg:gem/rake#lib/rake/pseudo_status.rb:21 def stopped?; end - # source://rake//lib/rake/pseudo_status.rb#13 + # pkg:gem/rake#lib/rake/pseudo_status.rb:13 def to_i; end end # Error indicating a recursion overflow error in task selection. # -# source://rake//lib/rake/rule_recursion_overflow_error.rb#5 +# pkg:gem/rake#lib/rake/rule_recursion_overflow_error.rb:5 class Rake::RuleRecursionOverflowError < ::StandardError - # @return [RuleRecursionOverflowError] a new instance of RuleRecursionOverflowError - # - # source://rake//lib/rake/rule_recursion_overflow_error.rb#6 + # pkg:gem/rake#lib/rake/rule_recursion_overflow_error.rb:6 def initialize(*args); end - # source://rake//lib/rake/rule_recursion_overflow_error.rb#11 + # pkg:gem/rake#lib/rake/rule_recursion_overflow_error.rb:11 def add_target(target); end - # source://rake//lib/rake/rule_recursion_overflow_error.rb#15 + # pkg:gem/rake#lib/rake/rule_recursion_overflow_error.rb:15 def message; end end -# source://rake//lib/rake/scope.rb#3 +# pkg:gem/rake#lib/rake/scope.rb:3 class Rake::Scope < ::Rake::LinkedList # Path for the scope. # - # source://rake//lib/rake/scope.rb#6 + # pkg:gem/rake#lib/rake/scope.rb:6 def path; end # Path for the scope + the named path. # - # source://rake//lib/rake/scope.rb#11 + # pkg:gem/rake#lib/rake/scope.rb:11 def path_with_task_name(task_name); end # Trim +n+ innermost scope levels from the scope. In no case will # this trim beyond the toplevel scope. # - # source://rake//lib/rake/scope.rb#17 + # pkg:gem/rake#lib/rake/scope.rb:17 def trim(n); end end # Singleton null object for an empty scope. # -# source://rake//lib/rake/scope.rb#41 +# pkg:gem/rake#lib/rake/scope.rb:41 Rake::Scope::EMPTY = T.let(T.unsafe(nil), Rake::Scope::EmptyScope) # Scope lists always end with an EmptyScope object. See Null # Object Pattern) # -# source://rake//lib/rake/scope.rb#28 +# pkg:gem/rake#lib/rake/scope.rb:28 class Rake::Scope::EmptyScope < ::Rake::LinkedList::EmptyLinkedList - # source://rake//lib/rake/scope.rb#31 + # pkg:gem/rake#lib/rake/scope.rb:31 def path; end - # source://rake//lib/rake/scope.rb#35 + # pkg:gem/rake#lib/rake/scope.rb:35 def path_with_task_name(task_name); end end @@ -2245,227 +2181,223 @@ end # Tasks are not usually created directly using the new method, but rather # use the +file+ and +task+ convenience methods. # -# source://rake//lib/rake/task.rb#15 +# pkg:gem/rake#lib/rake/task.rb:15 class Rake::Task # Create a task named +task_name+ with no actions or prerequisites. Use # +enhance+ to add actions and prerequisites. # - # @return [Task] a new instance of Task - # - # source://rake//lib/rake/task.rb#99 + # pkg:gem/rake#lib/rake/task.rb:99 def initialize(task_name, app); end # List of actions attached to a task. # - # source://rake//lib/rake/task.rb#24 + # pkg:gem/rake#lib/rake/task.rb:24 def actions; end # Add a description to the task. The description can consist of an option # argument list (enclosed brackets) and an optional comment. # - # source://rake//lib/rake/task.rb#298 + # pkg:gem/rake#lib/rake/task.rb:298 def add_description(description); end # List of all unique prerequisite tasks including prerequisite tasks' # prerequisites. # Includes self when cyclic dependencies are found. # - # source://rake//lib/rake/task.rb#77 + # pkg:gem/rake#lib/rake/task.rb:77 def all_prerequisite_tasks; end # Has this task already been invoked? Already invoked tasks # will be skipped unless you reenable them. # - # source://rake//lib/rake/task.rb#39 + # pkg:gem/rake#lib/rake/task.rb:39 def already_invoked; end # Application owning this task. # - # source://rake//lib/rake/task.rb#27 + # pkg:gem/rake#lib/rake/task.rb:27 def application; end # Application owning this task. # - # source://rake//lib/rake/task.rb#27 + # pkg:gem/rake#lib/rake/task.rb:27 def application=(_arg0); end # Argument description (nil if none). # - # source://rake//lib/rake/task.rb#136 + # pkg:gem/rake#lib/rake/task.rb:136 def arg_description; end # Name of arguments for this task. # - # source://rake//lib/rake/task.rb#141 + # pkg:gem/rake#lib/rake/task.rb:141 def arg_names; end # Clear the existing prerequisites, actions, comments, and arguments of a rake task. # - # source://rake//lib/rake/task.rb#153 + # pkg:gem/rake#lib/rake/task.rb:153 def clear; end # Clear the existing actions on a rake task. # - # source://rake//lib/rake/task.rb#168 + # pkg:gem/rake#lib/rake/task.rb:168 def clear_actions; end # Clear the existing arguments on a rake task. # - # source://rake//lib/rake/task.rb#180 + # pkg:gem/rake#lib/rake/task.rb:180 def clear_args; end # Clear the existing comments on a rake task. # - # source://rake//lib/rake/task.rb#174 + # pkg:gem/rake#lib/rake/task.rb:174 def clear_comments; end # Clear the existing prerequisites of a rake task. # - # source://rake//lib/rake/task.rb#162 + # pkg:gem/rake#lib/rake/task.rb:162 def clear_prerequisites; end # First line (or sentence) of all comments. Multiple comments are # separated by a "/". # - # source://rake//lib/rake/task.rb#322 + # pkg:gem/rake#lib/rake/task.rb:322 def comment; end - # source://rake//lib/rake/task.rb#304 + # pkg:gem/rake#lib/rake/task.rb:304 def comment=(comment); end # Enhance a task with prerequisites or actions. Returns self. # - # source://rake//lib/rake/task.rb#115 + # pkg:gem/rake#lib/rake/task.rb:115 def enhance(deps = T.unsafe(nil), &block); end # Execute the actions associated with this task. # - # source://rake//lib/rake/task.rb#270 + # pkg:gem/rake#lib/rake/task.rb:270 def execute(args = T.unsafe(nil)); end # Full collection of comments. Multiple comments are separated by # newlines. # - # source://rake//lib/rake/task.rb#316 + # pkg:gem/rake#lib/rake/task.rb:316 def full_comment; end - # source://rake//lib/rake/task.rb#46 + # pkg:gem/rake#lib/rake/task.rb:46 def inspect; end # Return a string describing the internal state of a task. Useful for # debugging. # - # source://rake//lib/rake/task.rb#354 + # pkg:gem/rake#lib/rake/task.rb:354 def investigation; end # Invoke the task if it is needed. Prerequisites are invoked first. # - # source://rake//lib/rake/task.rb#186 + # pkg:gem/rake#lib/rake/task.rb:186 def invoke(*args); end # Invoke all the prerequisites of a task. # - # source://rake//lib/rake/task.rb#237 + # pkg:gem/rake#lib/rake/task.rb:237 def invoke_prerequisites(task_args, invocation_chain); end # Invoke all the prerequisites of a task in parallel. # - # source://rake//lib/rake/task.rb#249 + # pkg:gem/rake#lib/rake/task.rb:249 def invoke_prerequisites_concurrently(task_args, invocation_chain); end # File/Line locations of each of the task definitions for this # task (only valid if the task was defined with the detect # location option set). # - # source://rake//lib/rake/task.rb#35 + # pkg:gem/rake#lib/rake/task.rb:35 def locations; end # Name of the task, including any namespace qualifiers. # - # source://rake//lib/rake/task.rb#122 + # pkg:gem/rake#lib/rake/task.rb:122 def name; end # Name of task with argument list description. # - # source://rake//lib/rake/task.rb#127 + # pkg:gem/rake#lib/rake/task.rb:127 def name_with_args; end # Is this task needed? # - # @return [Boolean] - # - # source://rake//lib/rake/task.rb#286 + # pkg:gem/rake#lib/rake/task.rb:286 def needed?; end # List of order only prerequisites for a task. # - # source://rake//lib/rake/task.rb#21 + # pkg:gem/rake#lib/rake/task.rb:21 def order_only_prerequisites; end - # List of prerequisites for a task. - # - # source://rake//lib/rake/task.rb#17 + # pkg:gem/rake#lib/rake/task.rb:18 def prereqs; end # List of prerequisite tasks # - # source://rake//lib/rake/task.rb#61 + # pkg:gem/rake#lib/rake/task.rb:61 def prerequisite_tasks; end # List of prerequisites for a task. # - # source://rake//lib/rake/task.rb#17 + # pkg:gem/rake#lib/rake/task.rb:17 def prerequisites; end # Reenable the task, allowing its tasks to be executed if the task # is invoked again. # - # source://rake//lib/rake/task.rb#147 + # pkg:gem/rake#lib/rake/task.rb:147 def reenable; end # Array of nested namespaces names used for task lookup by this task. # - # source://rake//lib/rake/task.rb#30 + # pkg:gem/rake#lib/rake/task.rb:30 def scope; end # Set the names of the arguments for this task. +args+ should be # an array of symbols, one for each argument name. # - # source://rake//lib/rake/task.rb#348 + # pkg:gem/rake#lib/rake/task.rb:348 def set_arg_names(args); end # First source from a rule (nil if no sources) # - # source://rake//lib/rake/task.rb#93 + # pkg:gem/rake#lib/rake/task.rb:93 def source; end - # source://rake//lib/rake/task.rb#52 + # List of sources for task. + # + # pkg:gem/rake#lib/rake/task.rb:52 def sources; end # List of sources for task. # - # source://rake//lib/rake/task.rb#51 + # pkg:gem/rake#lib/rake/task.rb:51 def sources=(_arg0); end # Timestamp for this task. Basic tasks return the current time for their # time stamp. Other tasks can be more sophisticated. # - # source://rake//lib/rake/task.rb#292 + # pkg:gem/rake#lib/rake/task.rb:292 def timestamp; end # Return task name # - # source://rake//lib/rake/task.rb#42 + # pkg:gem/rake#lib/rake/task.rb:42 def to_s; end # Add order only dependencies. # - # source://rake//lib/rake/task.rb#379 + # pkg:gem/rake#lib/rake/task.rb:379 def |(deps); end protected - # source://rake//lib/rake/task.rb#83 + # pkg:gem/rake#lib/rake/task.rb:83 def collect_prerequisites(seen); end # Same as invoke, but explicitly pass a call chain to detect @@ -2475,36 +2407,36 @@ class Rake::Task # one in parallel, they will all fail if the first execution of # this task fails. # - # source://rake//lib/rake/task.rb#197 + # pkg:gem/rake#lib/rake/task.rb:197 def invoke_with_call_chain(task_args, invocation_chain); end private - # source://rake//lib/rake/task.rb#229 + # pkg:gem/rake#lib/rake/task.rb:229 def add_chain_to(exception, new_chain); end - # source://rake//lib/rake/task.rb#308 + # pkg:gem/rake#lib/rake/task.rb:308 def add_comment(comment); end # Get the first sentence in a string. The sentence is terminated # by the first period, exclamation mark, or the end of the line. # Decimal points do not count as periods. # - # source://rake//lib/rake/task.rb#341 + # pkg:gem/rake#lib/rake/task.rb:341 def first_sentence(string); end # Format the trace flags for display. # - # source://rake//lib/rake/task.rb#261 + # pkg:gem/rake#lib/rake/task.rb:261 def format_trace_flags; end - # source://rake//lib/rake/task.rb#65 + # pkg:gem/rake#lib/rake/task.rb:65 def lookup_prerequisite(prerequisite_name); end # Transform the list of comments as specified by the block and # join with the separator. # - # source://rake//lib/rake/task.rb#328 + # pkg:gem/rake#lib/rake/task.rb:328 def transform_comments(separator, &block); end class << self @@ -2513,192 +2445,171 @@ class Rake::Task # found, but an existing file matches the task name, assume it is a file # task with no dependencies or actions. # - # source://rake//lib/rake/task.rb#404 + # pkg:gem/rake#lib/rake/task.rb:404 def [](task_name); end # Clear the task list. This cause rake to immediately forget all the # tasks that have been assigned. (Normally used in the unit tests.) # - # source://rake//lib/rake/task.rb#391 + # pkg:gem/rake#lib/rake/task.rb:391 def clear; end # Define a rule for synthesizing tasks. # - # source://rake//lib/rake/task.rb#421 + # pkg:gem/rake#lib/rake/task.rb:421 def create_rule(*args, &block); end # Define a task given +args+ and an option block. If a rule with the # given name already exists, the prerequisites and actions are added to # the existing task. Returns the defined task. # - # source://rake//lib/rake/task.rb#416 + # pkg:gem/rake#lib/rake/task.rb:416 def define_task(*args, &block); end # Format dependencies parameter to pass to task. # - # source://rake//lib/rake/task.rb#373 + # pkg:gem/rake#lib/rake/task.rb:373 def format_deps(deps); end # Apply the scope to the task name according to the rules for # this kind of task. Generic tasks will accept the scope as # part of the name. # - # source://rake//lib/rake/task.rb#428 + # pkg:gem/rake#lib/rake/task.rb:428 def scope_name(scope, task_name); end # TRUE if the task name is already defined. # - # @return [Boolean] - # - # source://rake//lib/rake/task.rb#409 + # pkg:gem/rake#lib/rake/task.rb:409 def task_defined?(task_name); end # List of all defined tasks. # - # source://rake//lib/rake/task.rb#396 + # pkg:gem/rake#lib/rake/task.rb:396 def tasks; end end end # Error indicating an ill-formed task declaration. # -# source://rake//lib/rake/task_argument_error.rb#5 +# pkg:gem/rake#lib/rake/task_argument_error.rb:5 class Rake::TaskArgumentError < ::ArgumentError; end # TaskArguments manage the arguments passed to a task. # -# source://rake//lib/rake/task_arguments.rb#7 +# pkg:gem/rake#lib/rake/task_arguments.rb:7 class Rake::TaskArguments include ::Enumerable # Create a TaskArgument object with a list of argument +names+ and a set # of associated +values+. +parent+ is the parent argument object. # - # @return [TaskArguments] a new instance of TaskArguments - # - # source://rake//lib/rake/task_arguments.rb#15 + # pkg:gem/rake#lib/rake/task_arguments.rb:15 def initialize(names, values, parent = T.unsafe(nil)); end # Find an argument value by name or index. # - # source://rake//lib/rake/task_arguments.rb#44 + # pkg:gem/rake#lib/rake/task_arguments.rb:44 def [](index); end # Enumerates the arguments and their values # - # source://rake//lib/rake/task_arguments.rb#56 + # pkg:gem/rake#lib/rake/task_arguments.rb:56 def each(&block); end # Retrieve the list of values not associated with named arguments # - # source://rake//lib/rake/task_arguments.rb#32 + # pkg:gem/rake#lib/rake/task_arguments.rb:32 def extras; end - # source://rake//lib/rake/task_arguments.rb#93 + # pkg:gem/rake#lib/rake/task_arguments.rb:93 def fetch(*args, &block); end # Returns true if +key+ is one of the arguments # - # @return [Boolean] - # - # source://rake//lib/rake/task_arguments.rb#88 + # pkg:gem/rake#lib/rake/task_arguments.rb:88 def has_key?(key); end - # source://rake//lib/rake/task_arguments.rb#79 + # pkg:gem/rake#lib/rake/task_arguments.rb:79 def inspect; end - # Returns true if +key+ is one of the arguments - # - # @return [Boolean] - # - # source://rake//lib/rake/task_arguments.rb#88 + # pkg:gem/rake#lib/rake/task_arguments.rb:91 def key?(key); end # Returns the value of the given argument via method_missing # - # source://rake//lib/rake/task_arguments.rb#66 + # pkg:gem/rake#lib/rake/task_arguments.rb:66 def method_missing(sym, *args); end # Argument names # - # source://rake//lib/rake/task_arguments.rb#11 + # pkg:gem/rake#lib/rake/task_arguments.rb:11 def names; end # Create a new argument scope using the prerequisite argument # names. # - # source://rake//lib/rake/task_arguments.rb#38 + # pkg:gem/rake#lib/rake/task_arguments.rb:38 def new_scope(names); end # Retrieve the complete array of sequential values # - # source://rake//lib/rake/task_arguments.rb#27 + # pkg:gem/rake#lib/rake/task_arguments.rb:27 def to_a; end # Returns a Hash of arguments and their values # - # source://rake//lib/rake/task_arguments.rb#71 + # pkg:gem/rake#lib/rake/task_arguments.rb:71 def to_hash; end - # source://rake//lib/rake/task_arguments.rb#75 + # pkg:gem/rake#lib/rake/task_arguments.rb:75 def to_s; end # Extracts the argument values at +keys+ # - # source://rake//lib/rake/task_arguments.rb#61 + # pkg:gem/rake#lib/rake/task_arguments.rb:61 def values_at(*keys); end # Specify a hash of default values for task arguments. Use the # defaults only if there is no specific value for the given # argument. # - # source://rake//lib/rake/task_arguments.rb#51 + # pkg:gem/rake#lib/rake/task_arguments.rb:51 def with_defaults(defaults); end protected - # source://rake//lib/rake/task_arguments.rb#99 + # pkg:gem/rake#lib/rake/task_arguments.rb:99 def lookup(name); end end -# Base class for Task Libraries. -# -# source://rake//lib/rake/tasklib.rb#7 -class Rake::TaskLib - include ::Rake::Cloneable - include ::FileUtils::StreamUtils_ - include ::FileUtils - include ::Rake::FileUtilsExt - include ::Rake::DSL -end - # The TaskManager module is a mixin for managing tasks. # -# source://rake//lib/rake/task_manager.rb#5 +# pkg:gem/rake#lib/rake/task_manager.rb:5 module Rake::TaskManager - # source://rake//lib/rake/task_manager.rb#9 + # pkg:gem/rake#lib/rake/task_manager.rb:9 def initialize; end # Find a matching task for +task_name+. # - # source://rake//lib/rake/task_manager.rb#54 + # pkg:gem/rake#lib/rake/task_manager.rb:54 def [](task_name, scopes = T.unsafe(nil)); end # Clear all tasks in this application. # - # source://rake//lib/rake/task_manager.rb#182 + # pkg:gem/rake#lib/rake/task_manager.rb:182 def clear; end - # source://rake//lib/rake/task_manager.rb#17 + # pkg:gem/rake#lib/rake/task_manager.rb:17 def create_rule(*args, &block); end # Return the list of scope names currently active in the task # manager. # - # source://rake//lib/rake/task_manager.rb#222 + # pkg:gem/rake#lib/rake/task_manager.rb:222 def current_scope; end - # source://rake//lib/rake/task_manager.rb#23 + # pkg:gem/rake#lib/rake/task_manager.rb:23 def define_task(task_class, *args, &block); end # If a rule can be found that matches the task name, enhance the @@ -2706,35 +2617,35 @@ module Rake::TaskManager # source attribute of the task appropriately for the rule. Return # the enhanced task or nil of no rule was found. # - # source://rake//lib/rake/task_manager.rb#151 + # pkg:gem/rake#lib/rake/task_manager.rb:151 def enhance_with_matching_rule(task_name, level = T.unsafe(nil)); end - # source://rake//lib/rake/task_manager.rb#68 + # pkg:gem/rake#lib/rake/task_manager.rb:68 def generate_did_you_mean_suggestions(task_name); end - # source://rake//lib/rake/task_manager.rb#62 + # pkg:gem/rake#lib/rake/task_manager.rb:62 def generate_message_for_undefined_task(task_name); end # Evaluate the block in a nested namespace named +name+. Create # an anonymous namespace if +name+ is nil. # - # source://rake//lib/rake/task_manager.rb#228 + # pkg:gem/rake#lib/rake/task_manager.rb:228 def in_namespace(name); end # Lookup a task. Return an existing task if found, otherwise # create a task of the current type. # - # source://rake//lib/rake/task_manager.rb#49 + # pkg:gem/rake#lib/rake/task_manager.rb:49 def intern(task_class, task_name); end # Track the last comment made in the Rakefile. # - # source://rake//lib/rake/task_manager.rb#7 + # pkg:gem/rake#lib/rake/task_manager.rb:7 def last_description; end # Track the last comment made in the Rakefile. # - # source://rake//lib/rake/task_manager.rb#7 + # pkg:gem/rake#lib/rake/task_manager.rb:7 def last_description=(_arg0); end # Lookup a task, using scope and the scope hints in the task name. @@ -2743,65 +2654,65 @@ module Rake::TaskManager # are recognized. If no scope argument is supplied, use the # current scope. Return nil if the task cannot be found. # - # source://rake//lib/rake/task_manager.rb#192 + # pkg:gem/rake#lib/rake/task_manager.rb:192 def lookup(task_name, initial_scope = T.unsafe(nil)); end # Resolve the arguments for a task/rule. Returns a tuple of # [task_name, arg_name_list, prerequisites, order_only_prerequisites]. # - # source://rake//lib/rake/task_manager.rb#88 + # pkg:gem/rake#lib/rake/task_manager.rb:88 def resolve_args(args); end - # source://rake//lib/rake/task_manager.rb#81 + # pkg:gem/rake#lib/rake/task_manager.rb:81 def synthesize_file_task(task_name); end # List of all defined tasks in this application. # - # source://rake//lib/rake/task_manager.rb#168 + # pkg:gem/rake#lib/rake/task_manager.rb:168 def tasks; end # List of all the tasks defined in the given scope (and its # sub-scopes). # - # source://rake//lib/rake/task_manager.rb#174 + # pkg:gem/rake#lib/rake/task_manager.rb:174 def tasks_in_scope(scope); end private # Add a location to the locations field of the given task. # - # source://rake//lib/rake/task_manager.rb#241 + # pkg:gem/rake#lib/rake/task_manager.rb:241 def add_location(task); end # Attempt to create a rule given the list of prerequisites. # - # source://rake//lib/rake/task_manager.rb#271 + # pkg:gem/rake#lib/rake/task_manager.rb:271 def attempt_rule(task_name, task_pattern, args, extensions, block, level); end # Find the location that called into the dsl layer. # - # source://rake//lib/rake/task_manager.rb#248 + # pkg:gem/rake#lib/rake/task_manager.rb:248 def find_location; end # Generate an anonymous namespace name. # - # source://rake//lib/rake/task_manager.rb#259 + # pkg:gem/rake#lib/rake/task_manager.rb:259 def generate_name; end # Return the current description, clearing it in the process. # - # source://rake//lib/rake/task_manager.rb#319 + # pkg:gem/rake#lib/rake/task_manager.rb:319 def get_description(task); end # Lookup the task name # - # source://rake//lib/rake/task_manager.rb#208 + # pkg:gem/rake#lib/rake/task_manager.rb:208 def lookup_in_scope(name, scope); end # Make a list of sources from the list of file name extensions / # translation procs. # - # source://rake//lib/rake/task_manager.rb#293 + # pkg:gem/rake#lib/rake/task_manager.rb:293 def make_sources(task_name, task_pattern, extensions); end # Resolve task arguments for a task or rule when there are @@ -2815,7 +2726,7 @@ module Rake::TaskManager # task :t, [a] => [:d] # task :t, [a] => [:d], order_only: [:e] # - # source://rake//lib/rake/task_manager.rb#127 + # pkg:gem/rake#lib/rake/task_manager.rb:127 def resolve_args_with_dependencies(args, hash); end # Resolve task arguments for a task or rule when there are no @@ -2826,57 +2737,53 @@ module Rake::TaskManager # task :t # task :t, [:a] # - # source://rake//lib/rake/task_manager.rb#105 + # pkg:gem/rake#lib/rake/task_manager.rb:105 def resolve_args_without_dependencies(args); end - # source://rake//lib/rake/task_manager.rb#265 + # pkg:gem/rake#lib/rake/task_manager.rb:265 def trace_rule(level, message); end class << self - # source://rake//lib/rake/task_manager.rb#326 + # pkg:gem/rake#lib/rake/task_manager.rb:326 def record_task_metadata; end - # source://rake//lib/rake/task_manager.rb#326 + # pkg:gem/rake#lib/rake/task_manager.rb:326 def record_task_metadata=(_arg0); end end end -# source://rake//lib/rake/thread_history_display.rb#6 +# pkg:gem/rake#lib/rake/thread_history_display.rb:6 class Rake::ThreadHistoryDisplay include ::Rake::PrivateReader extend ::Rake::PrivateReader::ClassMethods - # @return [ThreadHistoryDisplay] a new instance of ThreadHistoryDisplay - # - # source://rake//lib/rake/thread_history_display.rb#11 + # pkg:gem/rake#lib/rake/thread_history_display.rb:11 def initialize(stats); end - # source://rake//lib/rake/thread_history_display.rb#17 + # pkg:gem/rake#lib/rake/thread_history_display.rb:17 def show; end private - # source://rake//lib/rake/private_reader.rb#15 + # pkg:gem/rake#lib/rake/thread_history_display.rb:9 def items; end - # source://rake//lib/rake/thread_history_display.rb#35 + # pkg:gem/rake#lib/rake/thread_history_display.rb:35 def rename(hash, key, renames); end - # source://rake//lib/rake/private_reader.rb#15 + # pkg:gem/rake#lib/rake/thread_history_display.rb:9 def stats; end - # source://rake//lib/rake/private_reader.rb#15 + # pkg:gem/rake#lib/rake/thread_history_display.rb:9 def threads; end end -# source://rake//lib/rake/thread_pool.rb#7 +# pkg:gem/rake#lib/rake/thread_pool.rb:8 class Rake::ThreadPool # Creates a ThreadPool object. The +thread_count+ parameter is the size # of the pool. # - # @return [ThreadPool] a new instance of ThreadPool - # - # source://rake//lib/rake/thread_pool.rb#11 + # pkg:gem/rake#lib/rake/thread_pool.rb:12 def initialize(thread_count); end # Creates a future executed by the +ThreadPool+. @@ -2888,12 +2795,12 @@ class Rake::ThreadPool # current thread until the future is finished and will return the # result (or raise an exception thrown from the future) # - # source://rake//lib/rake/thread_pool.rb#33 + # pkg:gem/rake#lib/rake/thread_pool.rb:33 def future(*args, &block); end # Enable the gathering of history events. # - # source://rake//lib/rake/thread_pool.rb#68 + # pkg:gem/rake#lib/rake/thread_pool.rb:68 def gather_history; end # Return a array of history events for the thread pool. @@ -2902,43 +2809,43 @@ class Rake::ThreadPool # (see #gather_history). Best to call this when the job is # complete (i.e. after ThreadPool#join is called). # - # source://rake//lib/rake/thread_pool.rb#77 + # pkg:gem/rake#lib/rake/thread_pool.rb:77 def history; end # Waits until the queue of futures is empty and all threads have exited. # - # source://rake//lib/rake/thread_pool.rb#44 + # pkg:gem/rake#lib/rake/thread_pool.rb:44 def join; end # Return a hash of always collected statistics for the thread pool. # - # source://rake//lib/rake/thread_pool.rb#84 + # pkg:gem/rake#lib/rake/thread_pool.rb:84 def statistics; end private # for testing only # - # source://rake//lib/rake/thread_pool.rb#158 + # pkg:gem/rake#lib/rake/thread_pool.rb:158 def __queue__; end # processes one item on the queue. Returns true if there was an # item to process, false if there was no item # - # source://rake//lib/rake/thread_pool.rb#95 + # pkg:gem/rake#lib/rake/thread_pool.rb:95 def process_queue_item; end - # source://rake//lib/rake/thread_pool.rb#111 + # pkg:gem/rake#lib/rake/thread_pool.rb:111 def safe_thread_count; end - # source://rake//lib/rake/thread_pool.rb#117 + # pkg:gem/rake#lib/rake/thread_pool.rb:117 def start_thread; end - # source://rake//lib/rake/thread_pool.rb#145 + # pkg:gem/rake#lib/rake/thread_pool.rb:145 def stat(event, data = T.unsafe(nil)); end end -# source://rake//lib/rake/trace_output.rb#3 +# pkg:gem/rake#lib/rake/trace_output.rb:3 module Rake::TraceOutput # Write trace output to output stream +out+. # @@ -2946,40 +2853,40 @@ module Rake::TraceOutput # chance that the trace output is interrupted by other tasks also # producing output. # - # source://rake//lib/rake/trace_output.rb#10 + # pkg:gem/rake#lib/rake/trace_output.rb:10 def trace_on(out, *strings); end end -# source://rake//lib/rake/version.rb#3 +# pkg:gem/rake#lib/rake/version.rb:3 Rake::VERSION = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/version.rb#5 +# pkg:gem/rake#lib/rake/version.rb:5 module Rake::Version; end -# source://rake//lib/rake/version.rb#6 +# pkg:gem/rake#lib/rake/version.rb:6 Rake::Version::BUILD = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/version.rb#6 +# pkg:gem/rake#lib/rake/version.rb:6 Rake::Version::MAJOR = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/version.rb#6 +# pkg:gem/rake#lib/rake/version.rb:6 Rake::Version::MINOR = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/version.rb#8 +# pkg:gem/rake#lib/rake/version.rb:8 Rake::Version::NUMBERS = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/version.rb#6 +# pkg:gem/rake#lib/rake/version.rb:6 Rake::Version::OTHER = T.let(T.unsafe(nil), Array) # Win 32 interface methods for Rake. Windows specific functionality # will be placed here to collect that knowledge in one spot. # -# source://rake//lib/rake/win32.rb#7 +# pkg:gem/rake#lib/rake/win32.rb:7 module Rake::Win32 class << self # Normalize a win32 path so that the slashes are all forward slashes. # - # source://rake//lib/rake/win32.rb#45 + # pkg:gem/rake#lib/rake/win32.rb:45 def normalize(path); end # The standard directory containing system wide rake files on @@ -2993,16 +2900,12 @@ module Rake::Win32 # # If the above are not defined, the return nil. # - # @raise [Win32HomeError] - # - # source://rake//lib/rake/win32.rb#30 + # pkg:gem/rake#lib/rake/win32.rb:30 def win32_system_dir; end # True if running on a windows system. # - # @return [Boolean] - # - # source://rake//lib/rake/win32.rb#16 + # pkg:gem/rake#lib/rake/win32.rb:16 def windows?; end end end @@ -3010,30 +2913,116 @@ end # Error indicating a problem in locating the home directory on a # Win32 system. # -# source://rake//lib/rake/win32.rb#11 +# pkg:gem/rake#lib/rake/win32.rb:11 class Rake::Win32::Win32HomeError < ::RuntimeError; end -# source://rake//lib/rake.rb#71 +# pkg:gem/rake#lib/rake.rb:70 RakeFileUtils = Rake::FileUtilsExt -# source://rake//lib/rake/ext/string.rb#4 +# pkg:gem/rake#lib/rake/ext/string.rb:4 class String include ::Comparable - # source://rake//lib/rake/ext/string.rb#14 + # Replace the file extension with +newext+. If there is no extension on + # the string, append the new extension to the end. If the new extension + # is not given, or is the empty string, remove any existing extension. + # + # +ext+ is a user added method for the String class. + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:14 def ext(newext = T.unsafe(nil)); end - # source://rake//lib/rake/ext/string.rb#138 + # Map the path according to the given specification. The specification + # controls the details of the mapping. The following special patterns are + # recognized: + # + # %p :: The complete path. + # %f :: The base file name of the path, with its file extension, + # but without any directories. + # %n :: The file name of the path without its file extension. + # %d :: The directory list of the path. + # %x :: The file extension of the path. An empty string if there + # is no extension. + # %X :: Everything *but* the file extension. + # %s :: The alternate file separator if defined, otherwise use # + # the standard file separator. + # %% :: A percent sign. + # + # The %d specifier can also have a numeric prefix (e.g. '%2d'). + # If the number is positive, only return (up to) +n+ directories in the + # path, starting from the left hand side. If +n+ is negative, return (up + # to) +n+ directories from the right hand side of the path. + # + # Examples: + # + # 'a/b/c/d/file.txt'.pathmap("%2d") => 'a/b' + # 'a/b/c/d/file.txt'.pathmap("%-2d") => 'c/d' + # + # Also the %d, %p, %f, %n, + # %x, and %X operators can take a pattern/replacement + # argument to perform simple string substitutions on a particular part of + # the path. The pattern and replacement are separated by a comma and are + # enclosed by curly braces. The replacement spec comes after the % + # character but before the operator letter. (e.g. "%{old,new}d"). + # Multiple replacement specs should be separated by semi-colons (e.g. + # "%{old,new;src,bin}d"). + # + # Regular expressions may be used for the pattern, and back refs may be + # used in the replacement text. Curly braces, commas and semi-colons are + # excluded from both the pattern and replacement text (let's keep parsing + # reasonable). + # + # For example: + # + # "src/org/onestepback/proj/A.java".pathmap("%{^src,class}X.class") + # + # returns: + # + # "class/org/onestepback/proj/A.class" + # + # If the replacement text is '*', then a block may be provided to perform + # some arbitrary calculation for the replacement. + # + # For example: + # + # "/path/to/file.TXT".pathmap("%X%{.*,*}x") { |ext| + # ext.downcase + # } + # + # Returns: + # + # "/path/to/file.txt" + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:138 def pathmap(spec = T.unsafe(nil), &block); end protected - # source://rake//lib/rake/ext/string.rb#27 + # Explode a path into individual components. Used by +pathmap+. + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:27 def pathmap_explode; end - # source://rake//lib/rake/ext/string.rb#41 + # Extract a partial path from the path. Include +n+ directories from the + # front end (left hand side) if +n+ is positive. Include |+n+| + # directories from the back end (right hand side) if +n+ is negative. + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:41 def pathmap_partial(n); end - # source://rake//lib/rake/ext/string.rb#59 + # Perform the pathmap replacement operations on the given path. The + # patterns take the form 'pat1,rep1;pat2,rep2...'. + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:59 def pathmap_replace(patterns, &block); end end diff --git a/sorbet/rbi/gems/rbi@0.1.12.rbi b/sorbet/rbi/gems/rbi@0.1.12.rbi deleted file mode 100644 index c83d4dc34..000000000 --- a/sorbet/rbi/gems/rbi@0.1.12.rbi +++ /dev/null @@ -1,3071 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rbi` gem. -# Please instead update this file by running `bin/tapioca gem rbi`. - -# source://rbi//lib/rbi/loc.rb#4 -module RBI; end - -# source://rbi//lib/rbi/model.rb#1041 -class RBI::Arg < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1053 - sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(value, loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#1059 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#613 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1064 - sig { returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#1045 - sig { returns(::String) } - def value; end -end - -# Attributes -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#349 -class RBI::Attr < ::RBI::NodeWithComments - include ::RBI::Indexable - - abstract! - - # source://rbi//lib/rbi/model.rb#374 - sig do - params( - name: ::Symbol, - names: T::Array[::Symbol], - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).void - end - def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#348 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#412 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#382 - sig { abstract.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/index.rb#113 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#420 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#356 - sig { returns(T::Array[::Symbol]) } - def names; end - - # source://rbi//lib/rbi/printer.rb#375 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/model.rb#362 - sig { returns(T::Array[::RBI::Sig]) } - def sigs; end - - # source://rbi//lib/rbi/model.rb#359 - sig { returns(::RBI::Visibility) } - def visibility; end - - # @return [Visibility] - # - # source://rbi//lib/rbi/model.rb#359 - def visibility=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#385 -class RBI::AttrAccessor < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#399 - sig do - params( - name: ::Symbol, - names: ::Symbol, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void) - ).void - end - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#452 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#405 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#411 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#417 -class RBI::AttrReader < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#431 - sig do - params( - name: ::Symbol, - names: ::Symbol, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void) - ).void - end - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#434 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#437 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#443 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#449 -class RBI::AttrWriter < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#463 - sig do - params( - name: ::Symbol, - names: ::Symbol, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void) - ).void - end - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#443 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#469 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#475 - sig { override.returns(::String) } - def to_s; end -end - -# An arbitrary blank line that can be added both in trees and comments -# -# source://rbi//lib/rbi/model.rb#74 -class RBI::BlankLine < ::RBI::Comment - # source://rbi//lib/rbi/model.rb#78 - sig { params(loc: T.nilable(::RBI::Loc)).void } - def initialize(loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#217 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end -end - -# source://rbi//lib/rbi/model.rb#814 -class RBI::BlockParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#825 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#836 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#543 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#548 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#831 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#218 -class RBI::Class < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#236 - sig do - params( - name: ::String, - superclass_name: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Class).void) - ).void - end - def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#376 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#244 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#222 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#222 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#284 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end - - # source://rbi//lib/rbi/model.rb#225 - sig { returns(T.nilable(::String)) } - def superclass_name; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#225 - def superclass_name=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#53 -class RBI::Comment < ::RBI::Node - # source://rbi//lib/rbi/model.rb#60 - sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(text, loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#66 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#197 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#57 - sig { returns(::String) } - def text; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#57 - def text=(_arg0); end -end - -# A tree showing incompatibles nodes -# -# Is rendered as a merge conflict between `left` and` right`: -# ~~~rb -# class Foo -# <<<<<<< left -# def m1; end -# def m2(a); end -# ======= -# def m1(a); end -# def m2; end -# >>>>>>> right -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#589 -class RBI::ConflictTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#596 - sig { params(left_name: ::String, right_name: ::String).void } - def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#607 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 - sig { returns(::RBI::Tree) } - def left; end - - # @return [Tree] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 - def right; end -end - -# Consts -# -# source://rbi//lib/rbi/model.rb#312 -class RBI::Const < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#327 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Const).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/printer.rb#335 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#403 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#335 - sig { returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#103 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#316 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#342 - sig { override.returns(::String) } - def to_s; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#316 - def value; end -end - -# source://rbi//lib/rbi/model.rb#889 -class RBI::Extend < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#901 - sig do - params( - name: ::String, - names: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Extend).void) - ).void - end - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#502 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#143 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#907 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#137 -class RBI::File - # source://rbi//lib/rbi/model.rb#156 - sig do - params( - strictness: T.nilable(::String), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(file: ::RBI::File).void) - ).void - end - def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#164 - sig { params(node: ::RBI::Node).void } - def <<(node); end - - # source://rbi//lib/rbi/printer.rb#105 - sig { params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#147 - sig { returns(T::Array[::RBI::Comment]) } - def comments; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#147 - def comments=(_arg0); end - - # source://rbi//lib/rbi/model.rb#169 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi//lib/rbi/printer.rb#129 - sig do - params( - out: T.any(::IO, ::StringIO), - indent: ::Integer, - print_locs: T::Boolean, - max_line_length: T.nilable(::Integer) - ).void - end - def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#141 - sig { returns(::RBI::Tree) } - def root; end - - # @return [Tree] - # - # source://rbi//lib/rbi/model.rb#141 - def root=(_arg0); end - - # source://rbi//lib/rbi/model.rb#144 - sig { returns(T.nilable(::String)) } - def strictness; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#144 - def strictness=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#135 - sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } - def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end -end - -# source://rbi//lib/rbi/formatter.rb#5 -class RBI::Formatter - # source://rbi//lib/rbi/formatter.rb#36 - sig do - params( - add_sig_templates: T::Boolean, - group_nodes: T::Boolean, - max_line_length: T.nilable(::Integer), - nest_singleton_methods: T::Boolean, - nest_non_public_methods: T::Boolean, - sort_nodes: T::Boolean - ).void - end - def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end - - # source://rbi//lib/rbi/formatter.rb#15 - sig { params(add_sig_templates: T::Boolean).returns(T::Boolean) } - def add_sig_templates=(add_sig_templates); end - - # source://rbi//lib/rbi/formatter.rb#59 - sig { params(file: ::RBI::File).void } - def format_file(file); end - - # source://rbi//lib/rbi/formatter.rb#64 - sig { params(tree: ::RBI::Tree).void } - def format_tree(tree); end - - # source://rbi//lib/rbi/formatter.rb#18 - sig { params(group_nodes: T::Boolean).returns(T::Boolean) } - def group_nodes=(group_nodes); end - - # source://rbi//lib/rbi/formatter.rb#24 - sig { returns(T.nilable(::Integer)) } - def max_line_length; end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/formatter.rb#24 - def max_line_length=(_arg0); end - - # source://rbi//lib/rbi/formatter.rb#21 - sig { params(nest_non_public_methods: T::Boolean).returns(T::Boolean) } - def nest_non_public_methods=(nest_non_public_methods); end - - # source://rbi//lib/rbi/formatter.rb#12 - sig { params(nest_singleton_methods: T::Boolean).returns(T::Boolean) } - def nest_singleton_methods=(nest_singleton_methods); end - - # source://rbi//lib/rbi/formatter.rb#53 - sig { params(file: ::RBI::File).returns(::String) } - def print_file(file); end - - # source://rbi//lib/rbi/formatter.rb#9 - sig { params(sort_nodes: T::Boolean).returns(T::Boolean) } - def sort_nodes=(sort_nodes); end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#88 -class RBI::Group < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/group_nodes.rb#95 - sig { params(kind: ::RBI::Group::Kind).void } - def initialize(kind); end - - # source://rbi//lib/rbi/printer.rb#838 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#92 - sig { returns(::RBI::Group::Kind) } - def kind; end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#100 -class RBI::Group::Kind < ::T::Enum - enums do - Mixins = new - RequiredAncestors = new - Helpers = new - TypeMembers = new - MixesInClassMethods = new - Sends = new - Attrs = new - TStructFields = new - TEnums = new - Inits = new - Methods = new - SingletonClasses = new - Consts = new - end -end - -# Sorbet's misc. -# -# source://rbi//lib/rbi/model.rb#1372 -class RBI::Helper < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1386 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Helper).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/printer.rb#825 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#520 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#173 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1376 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1393 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#866 -class RBI::Include < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#878 - sig do - params( - name: ::String, - names: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Include).void) - ).void - end - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#493 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#133 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#884 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/index.rb#5 -class RBI::Index < ::RBI::Visitor - # source://rbi//lib/rbi/index.rb#21 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/index.rb#32 - sig { params(id: ::String).returns(T::Array[::RBI::Node]) } - def [](id); end - - # source://rbi//lib/rbi/index.rb#37 - sig { params(nodes: ::RBI::Node).void } - def index(*nodes); end - - # source://rbi//lib/rbi/index.rb#27 - sig { returns(T::Array[::String]) } - def keys; end - - # source://rbi//lib/rbi/index.rb#42 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/index.rb#59 - sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } - def index_node(node); end - - class << self - # source://rbi//lib/rbi/index.rb#13 - sig { params(node: ::RBI::Node).returns(::RBI::Index) } - def index(*node); end - end -end - -# A Node that can be referred to by a unique ID inside an index -# -# @abstract Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/index.rb#74 -module RBI::Indexable - interface! - - # Unique IDs that refer to this node. - # - # Some nodes can have multiple ids, for example an attribute accessor matches the ID of the - # getter and the setter. - # - # @abstract - # - # source://rbi//lib/rbi/index.rb#85 - sig { abstract.returns(T::Array[::String]) } - def index_ids; end -end - -# source://rbi//lib/rbi/model.rb#1069 -class RBI::KwArg < ::RBI::Arg - # source://rbi//lib/rbi/model.rb#1082 - sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(keyword, value, loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#1088 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#622 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1073 - sig { returns(::String) } - def keyword; end - - # source://rbi//lib/rbi/model.rb#1093 - sig { returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#755 -class RBI::KwOptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#770 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#782 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#513 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#518 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#777 - sig { override.returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#759 - sig { returns(::String) } - def value; end -end - -# source://rbi//lib/rbi/model.rb#728 -class RBI::KwParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#739 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::KwParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#750 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#498 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#503 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#745 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#787 -class RBI::KwRestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#798 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#809 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#528 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#533 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#804 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/loc.rb#5 -class RBI::Loc - # source://rbi//lib/rbi/loc.rb#38 - sig do - params( - file: T.nilable(::String), - begin_line: T.nilable(::Integer), - end_line: T.nilable(::Integer), - begin_column: T.nilable(::Integer), - end_column: T.nilable(::Integer) - ).void - end - def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/loc.rb#27 - def begin_column; end - - # source://rbi//lib/rbi/loc.rb#27 - sig { returns(T.nilable(::Integer)) } - def begin_line; end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/loc.rb#27 - def end_column; end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/loc.rb#27 - def end_line; end - - # source://rbi//lib/rbi/loc.rb#24 - sig { returns(T.nilable(::String)) } - def file; end - - # source://rbi//lib/rbi/loc.rb#56 - sig { returns(T.nilable(::String)) } - def source; end - - # source://rbi//lib/rbi/loc.rb#47 - sig { returns(::String) } - def to_s; end - - class << self - # source://rbi//lib/rbi/loc.rb#12 - sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) } - def from_prism(file, prism_location); end - end -end - -# A tree that _might_ contain conflicts -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#330 -class RBI::MergeTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#344 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - conflicts: T::Array[::RBI::Rewriters::Merge::Conflict], - block: T.nilable(T.proc.params(node: ::RBI::Tree).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#334 - sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } - def conflicts; end -end - -# Methods and args -# -# source://rbi//lib/rbi/model.rb#483 -class RBI::Method < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#513 - sig do - params( - name: ::String, - params: T::Array[::RBI::Param], - is_singleton: T::Boolean, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Method).void) - ).void - end - def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#533 - sig { params(param: ::RBI::Param).void } - def <<(param); end - - # source://rbi//lib/rbi/printer.rb#384 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#568 - sig { params(name: ::String).void } - def add_block_param(name); end - - # source://rbi//lib/rbi/model.rb#558 - sig { params(name: ::String, default_value: ::String).void } - def add_kw_opt_param(name, default_value); end - - # source://rbi//lib/rbi/model.rb#553 - sig { params(name: ::String).void } - def add_kw_param(name); end - - # source://rbi//lib/rbi/model.rb#563 - sig { params(name: ::String).void } - def add_kw_rest_param(name); end - - # source://rbi//lib/rbi/model.rb#543 - sig { params(name: ::String, default_value: ::String).void } - def add_opt_param(name, default_value); end - - # source://rbi//lib/rbi/model.rb#538 - sig { params(name: ::String).void } - def add_param(name); end - - # source://rbi//lib/rbi/model.rb#548 - sig { params(name: ::String).void } - def add_rest_param(name); end - - # source://rbi//lib/rbi/model.rb#585 - sig do - params( - params: T::Array[::RBI::SigParam], - return_type: T.nilable(::String), - is_abstract: T::Boolean, - is_override: T::Boolean, - is_overridable: T::Boolean, - is_final: T::Boolean, - type_params: T::Array[::String], - checked: T.nilable(::Symbol), - block: T.proc.params(node: ::RBI::Sig).void - ).void - end - def add_sig(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#461 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#611 - sig { returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#123 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/printer.rb#437 - sig { returns(T::Boolean) } - def inline_params?; end - - # source://rbi//lib/rbi/model.rb#493 - sig { returns(T::Boolean) } - def is_singleton; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#493 - def is_singleton=(_arg0); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#470 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#487 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#487 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#432 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/model.rb#490 - sig { returns(T::Array[::RBI::Param]) } - def params; end - - # source://rbi//lib/rbi/model.rb#499 - sig { returns(T::Array[::RBI::Sig]) } - def sigs; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#499 - def sigs=(_arg0); end - - # source://rbi//lib/rbi/model.rb#620 - sig { override.returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#496 - sig { returns(::RBI::Visibility) } - def visibility; end - - # @return [Visibility] - # - # source://rbi//lib/rbi/model.rb#496 - def visibility=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#1433 -class RBI::MixesInClassMethods < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1445 - sig do - params( - name: ::String, - names: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void) - ).void - end - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#511 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#153 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1451 - sig { override.returns(::String) } - def to_s; end -end - -# Mixins -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#843 -class RBI::Mixin < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#860 - sig do - params( - name: ::String, - names: T::Array[::String], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).void - end - def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#558 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#484 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#850 - sig { returns(T::Array[::String]) } - def names; end -end - -# source://rbi//lib/rbi/model.rb#190 -class RBI::Module < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#204 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Module).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#385 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#211 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#194 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#194 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#270 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#5 -class RBI::Node - abstract! - - # source://rbi//lib/rbi/model.rb#18 - sig { params(loc: T.nilable(::RBI::Loc)).void } - def initialize(loc: T.unsafe(nil)); end - - # @abstract - # - # source://rbi//lib/rbi/printer.rb#146 - sig { abstract.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # Can `self` and `_other` be merged into a single definition? - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#287 - sig { params(_other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(_other); end - - # source://rbi//lib/rbi/model.rb#24 - sig { void } - def detach; end - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#48 - sig { returns(::RBI::Group::Kind) } - def group_kind; end - - # source://rbi//lib/rbi/model.rb#15 - sig { returns(T.nilable(::RBI::Loc)) } - def loc; end - - # @return [Loc, nil] - # - # source://rbi//lib/rbi/model.rb#15 - def loc=(_arg0); end - - # Merge `self` and `other` into a single definition - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#293 - sig { params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/printer.rb#179 - sig { returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#296 - sig { returns(T.nilable(::RBI::ConflictTree)) } - def parent_conflict_tree; end - - # source://rbi//lib/rbi/model.rb#46 - sig { returns(T.nilable(::RBI::Scope)) } - def parent_scope; end - - # source://rbi//lib/rbi/model.rb#12 - sig { returns(T.nilable(::RBI::Tree)) } - def parent_tree; end - - # @return [Tree, nil] - # - # source://rbi//lib/rbi/model.rb#12 - def parent_tree=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#156 - sig do - params( - out: T.any(::IO, ::StringIO), - indent: ::Integer, - print_locs: T::Boolean, - max_line_length: T.nilable(::Integer) - ).void - end - def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#169 - sig { params(v: ::RBI::Printer).void } - def print_blank_line_before(v); end - - # source://rbi//lib/rbi/model.rb#33 - sig { params(node: ::RBI::Node).void } - def replace(node); end - - # source://rbi//lib/rbi/rewriters/filter_versions.rb#94 - sig { params(version: ::Gem::Version).returns(T::Boolean) } - def satisfies_version?(version); end - - # source://rbi//lib/rbi/printer.rb#162 - sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } - def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#83 -class RBI::NodeWithComments < ::RBI::Node - abstract! - - # source://rbi//lib/rbi/model.rb#93 - sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#99 - sig { returns(T::Array[::String]) } - def annotations; end - - # source://rbi//lib/rbi/model.rb#90 - sig { returns(T::Array[::RBI::Comment]) } - def comments; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#90 - def comments=(_arg0); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#311 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/printer.rb#188 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/filter_versions.rb#104 - sig { returns(T::Array[::Gem::Requirement]) } - def version_requirements; end -end - -# source://rbi//lib/rbi/model.rb#674 -class RBI::OptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#689 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::OptParam).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#696 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#468 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#473 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#678 - sig { returns(::String) } - def value; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#625 -class RBI::Param < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#641 - sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#446 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#459 - sig { returns(T::Array[::String]) } - def comments_lines; end - - # source://rbi//lib/rbi/model.rb#632 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/printer.rb#451 - sig { params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#647 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/parser.rb#7 -class RBI::ParseError < ::StandardError - # source://rbi//lib/rbi/parser.rb#14 - sig { params(message: ::String, location: ::RBI::Loc).void } - def initialize(message, location); end - - # source://rbi//lib/rbi/parser.rb#11 - sig { returns(::RBI::Loc) } - def location; end -end - -# source://rbi//lib/rbi/parser.rb#53 -class RBI::Parser - # source://rbi//lib/rbi/parser.rb#88 - sig { params(path: ::String).returns(::RBI::Tree) } - def parse_file(path); end - - # source://rbi//lib/rbi/parser.rb#83 - sig { params(string: ::String).returns(::RBI::Tree) } - def parse_string(string); end - - private - - # source://rbi//lib/rbi/parser.rb#95 - sig { params(source: ::String, file: ::String).returns(::RBI::Tree) } - def parse(source, file:); end - - class << self - # source://rbi//lib/rbi/parser.rb#65 - sig { params(path: ::String).returns(::RBI::Tree) } - def parse_file(path); end - - # source://rbi//lib/rbi/parser.rb#70 - sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } - def parse_files(paths); end - - # source://rbi//lib/rbi/parser.rb#60 - sig { params(string: ::String).returns(::RBI::Tree) } - def parse_string(string); end - - # source://rbi//lib/rbi/parser.rb#76 - sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } - def parse_strings(strings); end - end -end - -# source://rbi//lib/rbi/parser.rb#791 -class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor - # source://rbi//lib/rbi/parser.rb#798 - sig { params(content: ::String, file: ::String).void } - def initialize(content, file:); end - - # source://rbi//lib/rbi/parser.rb#795 - sig { returns(::RBI::Sig) } - def current; end - - # source://rbi//lib/rbi/parser.rb#850 - sig { override.params(node: ::Prism::AssocNode).void } - def visit_assoc_node(node); end - - # source://rbi//lib/rbi/parser.rb#805 - sig { override.params(node: ::Prism::CallNode).void } - def visit_call_node(node); end -end - -# source://rbi//lib/rbi/parser.rb#153 -class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor - # source://rbi//lib/rbi/parser.rb#163 - sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } - def initialize(source, comments:, file:); end - - # source://rbi//lib/rbi/parser.rb#160 - sig { returns(T.nilable(::Prism::Node)) } - def last_node; end - - # source://rbi//lib/rbi/parser.rb#157 - sig { returns(::RBI::Tree) } - def tree; end - - # source://rbi//lib/rbi/parser.rb#299 - sig { params(node: ::Prism::CallNode).void } - def visit_call_node(node); end - - # source://rbi//lib/rbi/parser.rb#176 - sig { override.params(node: ::Prism::ClassNode).void } - def visit_class_node(node); end - - # source://rbi//lib/rbi/parser.rb#208 - sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } - def visit_constant_assign(node); end - - # source://rbi//lib/rbi/parser.rb#201 - sig { override.params(node: ::Prism::ConstantPathWriteNode).void } - def visit_constant_path_write_node(node); end - - # source://rbi//lib/rbi/parser.rb#194 - sig { override.params(node: ::Prism::ConstantWriteNode).void } - def visit_constant_write_node(node); end - - # source://rbi//lib/rbi/parser.rb#241 - sig { override.params(node: ::Prism::DefNode).void } - def visit_def_node(node); end - - # source://rbi//lib/rbi/parser.rb#255 - sig { override.params(node: ::Prism::ModuleNode).void } - def visit_module_node(node); end - - # source://rbi//lib/rbi/parser.rb#272 - sig { override.params(node: ::Prism::ProgramNode).void } - def visit_program_node(node); end - - # source://rbi//lib/rbi/parser.rb#283 - sig { override.params(node: ::Prism::SingletonClassNode).void } - def visit_singleton_class_node(node); end - - private - - # Collect all the remaining comments within a node - # - # source://rbi//lib/rbi/parser.rb#467 - sig { params(node: ::Prism::Node).void } - def collect_dangling_comments(node); end - - # Collect all the remaining comments after visiting the tree - # - # source://rbi//lib/rbi/parser.rb#485 - sig { void } - def collect_orphan_comments; end - - # source://rbi//lib/rbi/parser.rb#508 - sig { returns(::RBI::Tree) } - def current_scope; end - - # source://rbi//lib/rbi/parser.rb#513 - sig { returns(T::Array[::RBI::Sig]) } - def current_sigs; end - - # source://rbi//lib/rbi/parser.rb#520 - sig { returns(T::Array[::RBI::Comment]) } - def current_sigs_comments; end - - # source://rbi//lib/rbi/parser.rb#527 - sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } - def node_comments(node); end - - # source://rbi//lib/rbi/parser.rb#545 - sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } - def parse_comment(node); end - - # source://rbi//lib/rbi/parser.rb#574 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } - def parse_params(node); end - - # source://rbi//lib/rbi/parser.rb#550 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } - def parse_send_args(node); end - - # source://rbi//lib/rbi/parser.rb#648 - sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } - def parse_sig(node); end - - # source://rbi//lib/rbi/parser.rb#658 - sig do - params( - node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) - ).returns(T.nilable(::RBI::Struct)) - end - def parse_struct(node); end - - # source://rbi//lib/rbi/parser.rb#708 - sig { params(send: ::Prism::CallNode).void } - def parse_tstruct_field(send); end - - # source://rbi//lib/rbi/parser.rb#745 - sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } - def parse_visibility(name, node); end - - # source://rbi//lib/rbi/parser.rb#759 - sig { void } - def separate_header_comments; end - - # source://rbi//lib/rbi/parser.rb#769 - sig { void } - def set_root_tree_loc; end - - # source://rbi//lib/rbi/parser.rb#783 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } - def type_variable_definition?(node); end -end - -# source://rbi//lib/rbi/parser.rb#122 -class RBI::Parser::Visitor < ::Prism::Visitor - # source://rbi//lib/rbi/parser.rb#126 - sig { params(source: ::String, file: ::String).void } - def initialize(source, file:); end - - private - - # source://rbi//lib/rbi/parser.rb#136 - sig { params(node: ::Prism::Node).returns(::RBI::Loc) } - def node_loc(node); end - - # source://rbi//lib/rbi/parser.rb#141 - sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } - def node_string(node); end - - # source://rbi//lib/rbi/parser.rb#148 - sig { params(node: ::Prism::Node).returns(::String) } - def node_string!(node); end -end - -# source://rbi//lib/rbi/printer.rb#5 -class RBI::Printer < ::RBI::Visitor - # source://rbi//lib/rbi/printer.rb#28 - sig do - params( - out: T.any(::IO, ::StringIO), - indent: ::Integer, - print_locs: T::Boolean, - max_line_length: T.nilable(::Integer) - ).void - end - def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#15 - sig { returns(::Integer) } - def current_indent; end - - # source://rbi//lib/rbi/printer.rb#46 - sig { void } - def dedent; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#9 - def in_visibility_group; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#9 - def in_visibility_group=(_arg0); end - - # Printing - # - # source://rbi//lib/rbi/printer.rb#41 - sig { void } - def indent; end - - # source://rbi//lib/rbi/printer.rb#18 - sig { returns(T.nilable(::Integer)) } - def max_line_length; end - - # source://rbi//lib/rbi/printer.rb#12 - sig { returns(T.nilable(::RBI::Node)) } - def previous_node; end - - # Print a string without indentation nor `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#52 - sig { params(string: ::String).void } - def print(string); end - - # source://rbi//lib/rbi/printer.rb#9 - sig { returns(T::Boolean) } - def print_locs; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#9 - def print_locs=(_arg0); end - - # Print a string with indentation and `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#72 - sig { params(string: ::String).void } - def printl(string); end - - # Print a string without indentation but with a `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#58 - sig { params(string: T.nilable(::String)).void } - def printn(string = T.unsafe(nil)); end - - # Print a string with indentation but without a `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#65 - sig { params(string: T.nilable(::String)).void } - def printt(string = T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#83 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/printer.rb#90 - sig { override.params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - # source://rbi//lib/rbi/printer.rb#78 - sig { params(file: ::RBI::File).void } - def visit_file(file); end -end - -# source://rbi//lib/rbi/model.rb#982 -class RBI::Private < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#992 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Private).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#966 -class RBI::Protected < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#976 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Protected).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#950 -class RBI::Public < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#960 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Public).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#652 -class RBI::ReqParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#663 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#669 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end -end - -# source://rbi//lib/rbi/model.rb#1456 -class RBI::RequiresAncestor < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1469 - sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#870 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/index.rb#163 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1460 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1475 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#701 -class RBI::RestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#712 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::RestParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#723 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#483 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#488 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#718 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5 -module RBI::Rewriters; end - -# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6 -class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#10 - sig { params(with_todo_comment: T::Boolean).void } - def initialize(with_todo_comment: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#16 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#30 - sig { params(attr: ::RBI::Attr).void } - def add_attr_sig(attr); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#45 - sig { params(method: ::RBI::Method).void } - def add_method_sig(method); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#56 - sig { params(node: ::RBI::NodeWithComments).void } - def add_todo_comment(node); end -end - -# source://rbi//lib/rbi/rewriters/annotate.rb#6 -class RBI::Rewriters::Annotate < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/annotate.rb#10 - sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } - def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/annotate.rb#18 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/annotate.rb#31 - sig { params(node: ::RBI::NodeWithComments).void } - def annotate_node(node); end - - # source://rbi//lib/rbi/rewriters/annotate.rb#38 - sig { params(node: ::RBI::Node).returns(T::Boolean) } - def root?(node); end -end - -# source://rbi//lib/rbi/rewriters/deannotate.rb#6 -class RBI::Rewriters::Deannotate < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/deannotate.rb#10 - sig { params(annotation: ::String).void } - def initialize(annotation); end - - # source://rbi//lib/rbi/rewriters/deannotate.rb#16 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/deannotate.rb#27 - sig { params(node: ::RBI::NodeWithComments).void } - def deannotate_node(node); end -end - -# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations -# in comments. As an example: -# -# ~~~rb -# tree = Parser.parse_string(<<~RBI) -# class Foo -# # @version > 0.3.0 -# def bar -# end -# -# # @version <= 0.3.0 -# def bar(arg1) -# end -# end -# RBI -# -# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1")) -# -# assert_equal(<<~RBI, tree.string) -# class Foo -# # @version > 0.3.0 -# def bar -# end -# end -# RBI -# ~~~ -# -# Supported operators: -# - equals `=` -# - not equals `!=` -# - greater than `>` -# - greater than or equal to `>=` -# - less than `<` -# - less than or equal to `<=` -# - pessimistic or twiddle-wakka`~>` -# -# And/or logic: -# - "And" logic: put multiple versions on the same line -# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0 -# - "Or" logic: put multiple versions on subsequent lines -# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0 -# ``` -# # @version < 0.3.0 -# # @version > 1.0.0 -# ``` -# Prerelease versions: -# - Prerelease versions are considered less than their non-prerelease counterparts -# - e.g. `0.4.0-prerelease` is less than `0.4.0` -# -# RBI with no versions: -# - RBI with no version annotations are automatically counted towards ALL versions -# -# source://rbi//lib/rbi/rewriters/filter_versions.rb#57 -class RBI::Rewriters::FilterVersions < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/filter_versions.rb#73 - sig { params(version: ::Gem::Version).void } - def initialize(version); end - - # source://rbi//lib/rbi/rewriters/filter_versions.rb#79 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - class << self - # source://rbi//lib/rbi/rewriters/filter_versions.rb#66 - sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void } - def filter(tree, version); end - end -end - -# source://rbi//lib/rbi/rewriters/filter_versions.rb#60 -RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#6 -class RBI::Rewriters::GroupNodes < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/group_nodes.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# Merge two RBI trees together -# -# Be this `Tree`: -# ~~~rb -# class Foo -# attr_accessor :a -# def m; end -# C = 10 -# end -# ~~~ -# -# Merged with this one: -# ~~~rb -# class Foo -# attr_reader :a -# def m(x); end -# C = 10 -# end -# ~~~ -# -# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`: -# ~~~rb -# class Foo -# <<<<<<< left -# attr_accessor :a -# def m; end -# ======= -# attr_reader :a -# def m(x); end -# >>>>>>> right -# C = 10 -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#39 -class RBI::Rewriters::Merge - # source://rbi//lib/rbi/rewriters/merge_trees.rb#70 - sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void } - def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#79 - sig { params(tree: ::RBI::Tree).void } - def merge(tree); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#67 - sig { returns(::RBI::MergeTree) } - def tree; end - - class << self - # source://rbi//lib/rbi/rewriters/merge_trees.rb#54 - sig do - params( - left: ::RBI::Tree, - right: ::RBI::Tree, - left_name: ::String, - right_name: ::String, - keep: ::RBI::Rewriters::Merge::Keep - ).returns(::RBI::MergeTree) - end - def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - end -end - -# Used for logging / error displaying purpose -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#86 -class RBI::Rewriters::Merge::Conflict < ::T::Struct - const :left, ::RBI::Node - const :right, ::RBI::Node - const :left_name, ::String - const :right_name, ::String - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#95 - sig { returns(::String) } - def to_s; end - - class << self - # source://sorbet-runtime/0.5.11367/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# Merge adjacent conflict trees -# -# Transform this: -# ~~~rb -# class Foo -# <<<<<<< left -# def m1; end -# ======= -# def m1(a); end -# >>>>>>> right -# <<<<<<< left -# def m2(a); end -# ======= -# def m2; end -# >>>>>>> right -# end -# ~~~ -# -# Into this: -# ~~~rb -# class Foo -# <<<<<<< left -# def m1; end -# def m2(a); end -# ======= -# def m1(a); end -# def m2; end -# >>>>>>> right -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#245 -class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/merge_trees.rb#247 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#252 - sig { override.params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - private - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#273 - sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } - def merge_conflict_trees(left, right); end -end - -# source://rbi//lib/rbi/rewriters/merge_trees.rb#42 -class RBI::Rewriters::Merge::Keep < ::T::Enum - enums do - NONE = new - LEFT = new - RIGHT = new - end -end - -# source://rbi//lib/rbi/rewriters/merge_trees.rb#100 -class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/merge_trees.rb#107 - sig do - params( - output: ::RBI::Tree, - left_name: ::String, - right_name: ::String, - keep: ::RBI::Rewriters::Merge::Keep - ).void - end - def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#104 - sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } - def conflicts; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#119 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#168 - sig { returns(::RBI::Tree) } - def current_scope; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#185 - sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } - def make_conflict_scope(left, right); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#192 - sig { params(left: ::RBI::Node, right: ::RBI::Node).void } - def make_conflict_tree(left, right); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#173 - sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } - def previous_definition(node); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#204 - sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) } - def replace_scope_header(left, right); end -end - -# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#6 -class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6 -class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# Remove all definitions existing in the index from the current tree -# -# Let's create an `Index` from two different `Tree`s: -# ~~~rb -# tree1 = Parse.parse_string(<<~RBI) -# class Foo -# def foo; end -# end -# RBI -# -# tree2 = Parse.parse_string(<<~RBI) -# FOO = 10 -# RBI -# -# index = Index.index(tree1, tree2) -# ~~~ -# -# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean: -# ~~~rb -# tree_to_clean = Parser.parse_string(<<~RBI) -# class Foo -# def foo; end -# def bar; end -# end -# FOO = 10 -# BAR = 42 -# RBI -# -# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index) -# -# assert_equal(<<~RBI, cleaned_tree) -# class Foo -# def bar; end -# end -# BAR = 42 -# RBI -# -# assert_equal(<<~OPERATIONS, operations.join("\n")) -# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16) -# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8) -# OPERATIONS -# ~~~ -# -# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48 -class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#55 - sig { params(index: ::RBI::Index).void } - def initialize(index); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#52 - sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } - def operations; end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#83 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#78 - sig { params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - private - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#111 - sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } - def can_delete_node?(node, previous); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#129 - sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } - def delete_node(node, previous); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#102 - sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } - def previous_definition_for(node); end - - class << self - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#70 - sig do - params( - tree: ::RBI::Tree, - index: ::RBI::Index - ).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]]) - end - def remove(tree, index); end - end -end - -# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#134 -class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct - const :deleted_node, ::RBI::Node - const :duplicate_of, ::RBI::Node - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#141 - sig { returns(::String) } - def to_s; end - - class << self - # source://sorbet-runtime/0.5.11367/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://rbi//lib/rbi/rewriters/sort_nodes.rb#6 -class RBI::Rewriters::SortNodes < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#73 - sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } - def group_rank(kind); end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#94 - sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } - def node_name(node); end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#45 - sig { params(node: ::RBI::Node).returns(::Integer) } - def node_rank(node); end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#106 - sig { params(node: ::RBI::Node).void } - def sort_node_names!(node); end -end - -# Scopes -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#176 -class RBI::Scope < ::RBI::Tree - include ::RBI::Indexable - - abstract! - - # source://rbi//lib/rbi/printer.rb#242 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # Duplicate `self` scope without its body - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#356 - sig { returns(T.self_type) } - def dup_empty; end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#182 - sig { abstract.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#93 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/printer.rb#256 - sig { params(v: ::RBI::Printer).void } - def print_body(v); end - - # @abstract - # - # source://rbi//lib/rbi/printer.rb#253 - sig { abstract.params(v: ::RBI::Printer).void } - def print_header(v); end - - # source://rbi//lib/rbi/model.rb#185 - sig { override.returns(::String) } - def to_s; end -end - -# A conflict between two scope headers -# -# Is rendered as a merge conflict between `left` and` right` for scope definitions: -# ~~~rb -# <<<<<<< left -# class Foo -# ======= -# module Foo -# >>>>>>> right -# def m1; end -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#628 -class RBI::ScopeConflict < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#642 - sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } - def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#651 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 - sig { returns(::RBI::Scope) } - def left; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#667 - sig { override.returns(T::Boolean) } - def oneline?; end - - # @return [Scope] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 - def right; end -end - -# Sends -# -# source://rbi//lib/rbi/model.rb#1000 -class RBI::Send < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1018 - sig do - params( - method: ::String, - args: T::Array[::RBI::Arg], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Send).void) - ).void - end - def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1026 - sig { params(arg: ::RBI::Arg).void } - def <<(arg); end - - # source://rbi//lib/rbi/model.rb#1031 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#592 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1007 - sig { returns(T::Array[::RBI::Arg]) } - def args; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#529 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#193 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1004 - sig { returns(::String) } - def method; end - - # source://rbi//lib/rbi/model.rb#1036 - sig { returns(::String) } - def to_s; end -end - -# Sorbet's sigs -# -# source://rbi//lib/rbi/model.rb#1100 -class RBI::Sig < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1132 - sig do - params( - params: T::Array[::RBI::SigParam], - return_type: T.nilable(::String), - is_abstract: T::Boolean, - is_override: T::Boolean, - is_overridable: T::Boolean, - is_final: T::Boolean, - type_params: T::Array[::String], - checked: T.nilable(::Symbol), - loc: T.nilable(::RBI::Loc), - block: T.nilable(T.proc.params(node: ::RBI::Sig).void) - ).void - end - def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1157 - sig { params(param: ::RBI::SigParam).void } - def <<(param); end - - # source://rbi//lib/rbi/model.rb#1167 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#633 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1162 - sig { params(name: ::String, type: ::String).void } - def add_param(name, type); end - - # source://rbi//lib/rbi/model.rb#1116 - sig { returns(T.nilable(::Symbol)) } - def checked; end - - # @return [Symbol, nil] - # - # source://rbi//lib/rbi/model.rb#1116 - def checked=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#656 - sig { returns(T::Boolean) } - def inline_params?; end - - # source://rbi//lib/rbi/model.rb#1110 - sig { returns(T::Boolean) } - def is_abstract; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1110 - def is_abstract=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1110 - def is_final; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1110 - def is_final=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1110 - def is_overridable; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1110 - def is_overridable=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1110 - def is_override; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1110 - def is_override=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#651 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/model.rb#1104 - sig { returns(T::Array[::RBI::SigParam]) } - def params; end - - # source://rbi//lib/rbi/model.rb#1107 - sig { returns(T.nilable(::String)) } - def return_type; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#1107 - def return_type=(_arg0); end - - # source://rbi//lib/rbi/model.rb#1113 - sig { returns(T::Array[::String]) } - def type_params; end - - private - - # source://rbi//lib/rbi/printer.rb#698 - sig { params(v: ::RBI::Printer).void } - def print_as_block(v); end - - # source://rbi//lib/rbi/printer.rb#674 - sig { params(v: ::RBI::Printer).void } - def print_as_line(v); end - - # source://rbi//lib/rbi/printer.rb#663 - sig { returns(T::Array[::String]) } - def sig_modifiers; end -end - -# source://rbi//lib/rbi/model.rb#1176 -class RBI::SigParam < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1191 - sig do - params( - name: ::String, - type: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::SigParam).void) - ).void - end - def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1199 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#751 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#764 - sig { returns(T::Array[::String]) } - def comments_lines; end - - # source://rbi//lib/rbi/model.rb#1180 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/printer.rb#756 - sig { params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1180 - def type; end -end - -# source://rbi//lib/rbi/model.rb#251 -class RBI::SingletonClass < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#261 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#267 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/printer.rb#321 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end -end - -# source://rbi//lib/rbi/model.rb#272 -class RBI::Struct < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#294 - sig do - params( - name: ::String, - members: T::Array[::Symbol], - keyword_init: T::Boolean, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(struct: ::RBI::Struct).void) - ).void - end - def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#394 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#303 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#282 - sig { returns(T::Boolean) } - def keyword_init; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#282 - def keyword_init=(_arg0); end - - # source://rbi//lib/rbi/model.rb#279 - sig { returns(T::Array[::Symbol]) } - def members; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#279 - def members=(_arg0); end - - # source://rbi//lib/rbi/model.rb#276 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#276 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#300 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end -end - -# Sorbet's T::Enum -# -# source://rbi//lib/rbi/model.rb#1317 -class RBI::TEnum < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1328 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(klass: ::RBI::TEnum).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#1334 -class RBI::TEnumBlock < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1348 - sig do - params( - names: T::Array[::String], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) - ).void - end - def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1360 - sig { params(name: ::String).void } - def <<(name); end - - # source://rbi//lib/rbi/printer.rb#795 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1355 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi//lib/rbi/index.rb#223 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#556 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#1338 - sig { returns(T::Array[::String]) } - def names; end - - # source://rbi//lib/rbi/model.rb#1365 - sig { override.returns(::String) } - def to_s; end -end - -# Sorbet's T::Struct -# -# source://rbi//lib/rbi/model.rb#1206 -class RBI::TStruct < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1217 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(klass: ::RBI::TStruct).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#1255 -class RBI::TStructConst < ::RBI::TStructField - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1268 - sig do - params( - name: ::String, - type: ::String, - default: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void) - ).void - end - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#547 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1274 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/index.rb#203 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1280 - sig { override.returns(::String) } - def to_s; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#1223 -class RBI::TStructField < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#1244 - sig do - params( - name: ::String, - type: ::String, - default: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).void - end - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#773 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#538 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1233 - sig { returns(T.nilable(::String)) } - def default; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#1233 - def default=(_arg0); end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#1252 - sig { abstract.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#1230 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1230 - def name=(_arg0); end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1230 - def type; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1230 - def type=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#1285 -class RBI::TStructProp < ::RBI::TStructField - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1298 - sig do - params( - name: ::String, - type: ::String, - default: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void) - ).void - end - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#570 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1304 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/index.rb#213 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1310 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#106 -class RBI::Tree < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#119 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Tree).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#126 - sig { params(node: ::RBI::Node).void } - def <<(node); end - - # source://rbi//lib/rbi/printer.rb#226 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#66 - sig { params(with_todo_comment: T::Boolean).void } - def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/annotate.rb#49 - sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } - def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - - # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#38 - sig do - params( - name: ::String, - superclass_name: T.nilable(::String), - block: T.nilable(T.proc.params(scope: ::RBI::Scope).void) - ).returns(::RBI::Scope) - end - def create_class(name, superclass_name: T.unsafe(nil), &block); end - - # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#45 - sig { params(name: ::String, value: ::String).void } - def create_constant(name, value:); end - - # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#55 - sig { params(name: ::String).void } - def create_extend(name); end - - # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#50 - sig { params(name: ::String).void } - def create_include(name); end - - # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#89 - sig do - params( - name: ::String, - parameters: T::Array[::RBI::TypedParam], - return_type: ::String, - class_method: T::Boolean, - visibility: ::RBI::Visibility, - comments: T::Array[::RBI::Comment] - ).void - end - def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#113 - sig do - params( - name: ::String, - sigs: T::Array[::RBI::Sig], - parameters: T::Array[::RBI::Param], - class_method: T::Boolean, - visibility: ::RBI::Visibility, - comments: T::Array[::RBI::Comment] - ).void - end - def create_method_with_sigs(name, sigs:, parameters: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#60 - sig { params(name: ::String).void } - def create_mixes_in_class_methods(name); end - - # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#25 - sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } - def create_module(name, &block); end - - # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#9 - sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } - def create_path(constant, &block); end - - # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#134 - sig { params(parameters: T::Hash[T.any(::String, ::Symbol), ::String], return_type: ::String).returns(::RBI::Sig) } - def create_sig(parameters:, return_type: T.unsafe(nil)); end - - # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#74 - sig do - params( - name: ::String, - type: ::String, - variance: ::Symbol, - fixed: T.nilable(::String), - upper: T.nilable(::String), - lower: T.nilable(::String) - ).void - end - def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/deannotate.rb#41 - sig { params(annotation: ::String).void } - def deannotate!(annotation); end - - # source://rbi//lib/rbi/model.rb#132 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi//lib/rbi/rewriters/filter_versions.rb#118 - sig { params(version: ::Gem::Version).void } - def filter_versions!(version); end - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#38 - sig { void } - def group_nodes!; end - - # source://rbi//lib/rbi/index.rb#68 - sig { returns(::RBI::Index) } - def index; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#324 - sig do - params( - other: ::RBI::Tree, - left_name: ::String, - right_name: ::String, - keep: ::RBI::Rewriters::Merge::Keep - ).returns(::RBI::MergeTree) - end - def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#46 - sig { void } - def nest_non_public_methods!; end - - # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36 - sig { void } - def nest_singleton_methods!; end - - # source://rbi//lib/rbi/model.rb#110 - sig { returns(T::Array[::RBI::Node]) } - def nodes; end - - # source://rbi//lib/rbi/printer.rb#233 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119 - sig { void } - def sort_nodes!; end - - private - - # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#149 - sig { params(node: ::RBI::Node).returns(::RBI::Node) } - def create_node(node); end - - # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#144 - sig { returns(T::Hash[::String, ::RBI::Node]) } - def nodes_cache; end -end - -# source://rbi//lib/rbi/model.rb#1398 -class RBI::TypeMember < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1413 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/printer.rb#812 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1421 - sig { returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#183 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1402 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1428 - sig { override.returns(::String) } - def to_s; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1402 - def value; end -end - -# source://rbi//lib/rbi/parser.rb#20 -class RBI::UnexpectedParserError < ::StandardError - # source://rbi//lib/rbi/parser.rb#27 - sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } - def initialize(parent_exception, last_location); end - - # source://rbi//lib/rbi/parser.rb#24 - sig { returns(::RBI::Loc) } - def last_location; end - - # source://rbi//lib/rbi/parser.rb#34 - sig { params(io: T.any(::IO, ::StringIO)).void } - def print_debug(io: T.unsafe(nil)); end -end - -# source://rbi//lib/rbi/version.rb#5 -RBI::VERSION = T.let(T.unsafe(nil), String) - -# Visibility -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#914 -class RBI::Visibility < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#924 - sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#930 - sig { params(other: ::RBI::Visibility).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#579 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#945 - sig { returns(T::Boolean) } - def private?; end - - # source://rbi//lib/rbi/model.rb#940 - sig { returns(T::Boolean) } - def protected?; end - - # source://rbi//lib/rbi/model.rb#935 - sig { returns(T::Boolean) } - def public?; end - - # source://rbi//lib/rbi/model.rb#921 - sig { returns(::Symbol) } - def visibility; end -end - -# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#52 -class RBI::VisibilityGroup < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#59 - sig { params(visibility: ::RBI::Visibility).void } - def initialize(visibility); end - - # source://rbi//lib/rbi/printer.rb#848 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#861 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#56 - sig { returns(::RBI::Visibility) } - def visibility; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/visitor.rb#5 -class RBI::Visitor - abstract! - - # @abstract - # - # source://rbi//lib/rbi/visitor.rb#12 - sig { abstract.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/visitor.rb#15 - sig { params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end -end diff --git a/sorbet/rbi/gems/rbi@0.3.10.rbi b/sorbet/rbi/gems/rbi@0.3.10.rbi new file mode 100644 index 000000000..05af80e91 --- /dev/null +++ b/sorbet/rbi/gems/rbi@0.3.10.rbi @@ -0,0 +1,5520 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbi` gem. +# Please instead update this file by running `bin/tapioca gem rbi`. + + +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbi` gem. +# Please instead update this file by running `bundle exec spoom srb sigs export`. + +# pkg:gem/rbi#lib/rbi.rb:7 +module RBI; end + +# pkg:gem/rbi#lib/rbi/model.rb:862 +class RBI::Arg < ::RBI::Node + # pkg:gem/rbi#lib/rbi/model.rb:867 + sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(value, loc: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:873 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:878 + sig { returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:864 + sig { returns(::String) } + def value; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:325 +class RBI::Attr < ::RBI::NodeWithComments + include ::RBI::Indexable + + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:353 + sig do + params( + name: ::Symbol, + names: T::Array[::Symbol], + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]) + ).void + end + def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:420 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:59 + sig { abstract.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/model.rb:362 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:104 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:429 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:327 + sig { returns(T::Array[::Symbol]) } + def names; end + + # pkg:gem/rbi#lib/rbi/model.rb:333 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # pkg:gem/rbi#lib/rbi/model.rb:343 + sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Sig]) } + def sigs=(sigs); end + + # pkg:gem/rbi#lib/rbi/model.rb:338 + sig { returns(T::Boolean) } + def sigs?; end + + # pkg:gem/rbi#lib/rbi/model.rb:330 + sig { returns(::RBI::Visibility) } + def visibility; end + + # pkg:gem/rbi#lib/rbi/model.rb:330 + def visibility=(_arg0); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:80 + sig do + params( + name: ::String, + sig: T.nilable(::RBI::Sig), + visibility: ::RBI::Visibility, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).returns(::RBI::Method) + end + def create_getter_method(name, sig, visibility, loc, comments); end + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:99 + sig do + params( + name: ::String, + sig: T.nilable(::RBI::Sig), + attribute_type: T.nilable(T.any(::RBI::Type, ::String)), + visibility: ::RBI::Visibility, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).returns(::RBI::Method) + end + def create_setter_method(name, sig, attribute_type, visibility, loc, comments); end + + # @final + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:65 + sig(:final) { returns([T.nilable(::RBI::Sig), T.nilable(T.any(::RBI::Type, ::String))]) } + def parse_sig; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:365 +class RBI::AttrAccessor < ::RBI::Attr + # pkg:gem/rbi#lib/rbi/model.rb:374 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:458 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:130 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:381 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:388 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:394 +class RBI::AttrReader < ::RBI::Attr + # pkg:gem/rbi#lib/rbi/model.rb:403 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:442 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:145 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:410 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:417 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:423 +class RBI::AttrWriter < ::RBI::Attr + # pkg:gem/rbi#lib/rbi/model.rb:432 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:450 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:155 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:439 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:446 + sig { override.returns(::String) } + def to_s; end +end + +# An arbitrary blank line that can be added both in trees and comments +# +# pkg:gem/rbi#lib/rbi/model.rb:70 +class RBI::BlankLine < ::RBI::Comment + # pkg:gem/rbi#lib/rbi/model.rb:72 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:710 +class RBI::BlockParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:712 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:719 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:217 +class RBI::Class < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:230 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Class).void) + ).void + end + def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:388 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:239 + sig { override.returns(::String) } + def fully_qualified_name; end + + # pkg:gem/rbi#lib/rbi/model.rb:219 + sig { returns(::String) } + def name; end + + # pkg:gem/rbi#lib/rbi/model.rb:219 + def name=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:222 + sig { returns(T.nilable(::String)) } + def superclass_name; end + + # pkg:gem/rbi#lib/rbi/model.rb:222 + def superclass_name=(_arg0); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:51 +class RBI::Comment < ::RBI::Node + # pkg:gem/rbi#lib/rbi/model.rb:56 + sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(text, loc: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:62 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:53 + sig { returns(::String) } + def text; end + + # pkg:gem/rbi#lib/rbi/model.rb:53 + def text=(_arg0); end +end + +# A tree showing incompatibles nodes +# +# Is rendered as a merge conflict between `left` and` right`: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:589 +class RBI::ConflictTree < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:597 + sig { params(left_name: ::String, right_name: ::String).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:591 + sig { returns(::RBI::Tree) } + def left; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:594 + sig { returns(::String) } + def left_name; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:591 + def right; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:594 + def right_name; end +end + +# Consts +# +# pkg:gem/rbi#lib/rbi/model.rb:296 +class RBI::Const < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:301 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Const).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:412 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:309 + sig { returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:94 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:298 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:317 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:298 + def value; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:358 +class RBI::DuplicateNodeError < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi.rb:8 +class RBI::Error < ::StandardError; end + +# pkg:gem/rbi#lib/rbi/model.rb:752 +class RBI::Extend < ::RBI::Mixin + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:754 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Extend).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:522 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:134 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:761 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:143 +class RBI::File + # pkg:gem/rbi#lib/rbi/model.rb:164 + sig do + params( + strictness: T.nilable(::String), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(file: ::RBI::File).void) + ).void + end + def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:172 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # pkg:gem/rbi#lib/rbi/model.rb:154 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # pkg:gem/rbi#lib/rbi/model.rb:151 + sig { params(comments: T::Array[::RBI::Comment]).returns(T::Array[::RBI::Comment]) } + def comments=(comments); end + + # pkg:gem/rbi#lib/rbi/model.rb:159 + sig { returns(T::Boolean) } + def comments?; end + + # pkg:gem/rbi#lib/rbi/model.rb:177 + sig { returns(T::Boolean) } + def empty?; end + + # pkg:gem/rbi#lib/rbi/printer.rb:877 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1236 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1242 + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:145 + sig { returns(::RBI::Tree) } + def root; end + + # pkg:gem/rbi#lib/rbi/model.rb:145 + def root=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:148 + sig { returns(T.nilable(::String)) } + def strictness; end + + # pkg:gem/rbi#lib/rbi/model.rb:148 + def strictness=(_arg0); end + + # pkg:gem/rbi#lib/rbi/printer.rb:883 + sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } + def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end +end + +# pkg:gem/rbi#lib/rbi/formatter.rb:5 +class RBI::Formatter + # pkg:gem/rbi#lib/rbi/formatter.rb:18 + sig do + params( + add_sig_templates: T::Boolean, + group_nodes: T::Boolean, + max_line_length: T.nilable(::Integer), + nest_singleton_methods: T::Boolean, + nest_non_public_members: T::Boolean, + sort_nodes: T::Boolean, + replace_attributes_with_methods: T::Boolean + ).void + end + def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_members: T.unsafe(nil), sort_nodes: T.unsafe(nil), replace_attributes_with_methods: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/formatter.rb:43 + sig { params(file: ::RBI::File).void } + def format_file(file); end + + # pkg:gem/rbi#lib/rbi/formatter.rb:48 + sig { params(tree: ::RBI::Tree).void } + def format_tree(tree); end + + # pkg:gem/rbi#lib/rbi/formatter.rb:7 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # pkg:gem/rbi#lib/rbi/formatter.rb:7 + def max_line_length=(_arg0); end + + # pkg:gem/rbi#lib/rbi/formatter.rb:37 + sig { params(file: ::RBI::File).returns(::String) } + def print_file(file); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:86 +class RBI::Group < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:91 + sig { params(kind: ::RBI::Group::Kind).void } + def initialize(kind); end + + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:88 + sig { returns(::RBI::Group::Kind) } + def kind; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:96 +class RBI::Group::Kind + class << self + private + + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:111 + def new(*_arg0); end + end +end + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:103 +RBI::Group::Kind::Attrs = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:109 +RBI::Group::Kind::Consts = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:99 +RBI::Group::Kind::Helpers = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:106 +RBI::Group::Kind::Inits = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:107 +RBI::Group::Kind::Methods = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:101 +RBI::Group::Kind::MixesInClassMethods = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:97 +RBI::Group::Kind::Mixins = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:98 +RBI::Group::Kind::RequiredAncestors = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:102 +RBI::Group::Kind::Sends = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:108 +RBI::Group::Kind::SingletonClasses = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:105 +RBI::Group::Kind::TEnums = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:104 +RBI::Group::Kind::TStructFields = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:100 +RBI::Group::Kind::TypeMembers = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:5 +class RBI::GroupNodesError < ::RBI::Error; end + +# Sorbet's misc. +# +# pkg:gem/rbi#lib/rbi/model.rb:1187 +class RBI::Helper < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1192 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Helper).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:538 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:164 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:1189 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1200 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:738 +class RBI::Include < ::RBI::Mixin + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:740 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Include).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:514 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:124 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:747 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/index.rb:5 +class RBI::Index < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/index.rb:16 + sig { void } + def initialize; end + + # pkg:gem/rbi#lib/rbi/index.rb:27 + sig { params(id: ::String).returns(T::Array[::RBI::Node]) } + def [](id); end + + # pkg:gem/rbi#lib/rbi/index.rb:32 + sig { params(nodes: ::RBI::Node).void } + def index(*nodes); end + + # pkg:gem/rbi#lib/rbi/index.rb:22 + sig { returns(T::Array[::String]) } + def keys; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:38 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/index.rb:55 + sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } + def index_node(node); end + + class << self + # pkg:gem/rbi#lib/rbi/index.rb:8 + sig { params(node: ::RBI::Node).returns(::RBI::Index) } + def index(*node); end + end +end + +# A Node that can be referred to by a unique ID inside an index +# @interface +# +# pkg:gem/rbi#lib/rbi/index.rb:69 +module RBI::Indexable + interface! + + # Unique IDs that refer to this node. + # + # Some nodes can have multiple ids, for example an attribute accessor matches the ID of the + # getter and the setter. + # @abstract + # + # pkg:gem/rbi#lib/rbi/index.rb:76 + sig { abstract.returns(T::Array[::String]) } + def index_ids; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:883 +class RBI::KwArg < ::RBI::Arg + # pkg:gem/rbi#lib/rbi/model.rb:888 + sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(keyword, value, loc: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:894 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:885 + sig { returns(::String) } + def keyword; end + + # pkg:gem/rbi#lib/rbi/model.rb:899 + sig { returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:678 +class RBI::KwOptParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:683 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:691 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:680 + sig { returns(::String) } + def value; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:664 +class RBI::KwParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:666 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::KwParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:673 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:696 +class RBI::KwRestParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:698 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:705 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/loc.rb:5 +class RBI::Loc + # pkg:gem/rbi#lib/rbi/loc.rb:32 + sig do + params( + file: T.nilable(::String), + begin_line: T.nilable(::Integer), + end_line: T.nilable(::Integer), + begin_column: T.nilable(::Integer), + end_column: T.nilable(::Integer) + ).void + end + def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/loc.rb:23 + def begin_column; end + + # pkg:gem/rbi#lib/rbi/loc.rb:23 + sig { returns(T.nilable(::Integer)) } + def begin_line; end + + # pkg:gem/rbi#lib/rbi/loc.rb:23 + def end_column; end + + # pkg:gem/rbi#lib/rbi/loc.rb:23 + def end_line; end + + # pkg:gem/rbi#lib/rbi/loc.rb:20 + sig { returns(T.nilable(::String)) } + def file; end + + # pkg:gem/rbi#lib/rbi/loc.rb:41 + sig { params(other: ::RBI::Loc).returns(::RBI::Loc) } + def join(other); end + + # pkg:gem/rbi#lib/rbi/loc.rb:61 + sig { returns(T.nilable(::String)) } + def source; end + + # pkg:gem/rbi#lib/rbi/loc.rb:52 + sig { returns(::String) } + def to_s; end + + class << self + # pkg:gem/rbi#lib/rbi/loc.rb:8 + sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) } + def from_prism(file, prism_location); end + end +end + +# A tree that _might_ contain conflicts +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:342 +class RBI::MergeTree < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:351 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + conflicts: T::Array[::RBI::Rewriters::Merge::Conflict], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:344 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end +end + +# Methods and args +# +# pkg:gem/rbi#lib/rbi/model.rb:454 +class RBI::Method < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:491 + sig do + params( + name: ::String, + params: T.nilable(T::Array[::RBI::Param]), + is_singleton: T::Boolean, + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Method).void) + ).void + end + def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:511 + sig { params(param: ::RBI::Param).void } + def <<(param); end + + # pkg:gem/rbi#lib/rbi/model.rb:546 + sig { params(name: ::String).void } + def add_block_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:536 + sig { params(name: ::String, default_value: ::String).void } + def add_kw_opt_param(name, default_value); end + + # pkg:gem/rbi#lib/rbi/model.rb:531 + sig { params(name: ::String).void } + def add_kw_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:541 + sig { params(name: ::String).void } + def add_kw_rest_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:521 + sig { params(name: ::String, default_value: ::String).void } + def add_opt_param(name, default_value); end + + # pkg:gem/rbi#lib/rbi/model.rb:516 + sig { params(name: ::String).void } + def add_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:526 + sig { params(name: ::String).void } + def add_rest_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:559 + sig do + params( + params: T.nilable(T::Array[::RBI::SigParam]), + return_type: T.any(::RBI::Type, ::String), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + type_params: T.nilable(T::Array[::String]), + checked: T.nilable(::Symbol), + block: T.nilable(T.proc.params(node: ::RBI::Sig).void) + ).void + end + def add_sig(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:466 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:585 + sig { returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:114 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:464 + sig { returns(T::Boolean) } + def is_singleton; end + + # pkg:gem/rbi#lib/rbi/model.rb:464 + def is_singleton=(_arg0); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:476 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:456 + sig { returns(::String) } + def name; end + + # pkg:gem/rbi#lib/rbi/model.rb:456 + def name=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:459 + sig { returns(T::Array[::RBI::Param]) } + def params; end + + # pkg:gem/rbi#lib/rbi/model.rb:470 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # pkg:gem/rbi#lib/rbi/model.rb:480 + sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Sig]) } + def sigs=(sigs); end + + # pkg:gem/rbi#lib/rbi/model.rb:475 + sig { returns(T::Boolean) } + def sigs?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:595 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:467 + sig { returns(::RBI::Visibility) } + def visibility; end + + # pkg:gem/rbi#lib/rbi/model.rb:467 + def visibility=(_arg0); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:496 + sig { params(other: ::RBI::Method).returns(T::Boolean) } + def at_most_one_side_anonymous?(other); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1231 +class RBI::MixesInClassMethods < ::RBI::Mixin + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1238 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:530 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:144 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1245 + sig { override.returns(::String) } + def to_s; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:727 +class RBI::Mixin < ::RBI::NodeWithComments + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:732 + sig do + params( + name: ::String, + names: T::Array[::String], + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]) + ).void + end + def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:506 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:729 + sig { returns(T::Array[::String]) } + def names; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:197 +class RBI::Module < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:202 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Module).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:396 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:210 + sig { override.returns(::String) } + def fully_qualified_name; end + + # pkg:gem/rbi#lib/rbi/model.rb:199 + sig { returns(::String) } + def name; end + + # pkg:gem/rbi#lib/rbi/model.rb:199 + def name=(_arg0); end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:8 +class RBI::Node + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:16 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end + + # Can `self` and `_other` be merged into a single definition? + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:302 + def compatible_with?(_other); end + + # pkg:gem/rbi#lib/rbi/model.rb:22 + sig { void } + def detach; end + + # pkg:gem/rbi#lib/rbi/model.rb:13 + sig { returns(T.nilable(::RBI::Loc)) } + def loc; end + + # pkg:gem/rbi#lib/rbi/model.rb:13 + def loc=(_arg0); end + + # Merge `self` and `other` into a single definition + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:308 + sig { params(other: ::RBI::Node).void } + def merge_with(other); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:311 + sig { returns(T.nilable(::RBI::ConflictTree)) } + def parent_conflict_tree; end + + # pkg:gem/rbi#lib/rbi/model.rb:44 + sig { returns(T.nilable(::RBI::Scope)) } + def parent_scope; end + + # pkg:gem/rbi#lib/rbi/model.rb:10 + sig { returns(T.nilable(::RBI::Tree)) } + def parent_tree; end + + # pkg:gem/rbi#lib/rbi/model.rb:10 + def parent_tree=(_arg0); end + + # pkg:gem/rbi#lib/rbi/printer.rb:895 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1251 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + positional_names: T::Boolean + ).void + end + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1257 + sig { params(indent: ::Integer, print_locs: T::Boolean, positional_names: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:31 + sig { params(node: ::RBI::Node).void } + def replace(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:91 + sig { params(version: ::Gem::Version).returns(T::Boolean) } + def satisfies_version?(version); end + + # pkg:gem/rbi#lib/rbi/printer.rb:901 + sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } + def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:88 +class RBI::NodeWithComments < ::RBI::Node + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:105 + sig { params(loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:111 + sig { returns(T::Array[::String]) } + def annotations; end + + # pkg:gem/rbi#lib/rbi/model.rb:93 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # pkg:gem/rbi#lib/rbi/model.rb:90 + sig { params(comments: T::Array[::RBI::Comment]).returns(T::Array[::RBI::Comment]) } + def comments=(comments); end + + # Returns true if this node has any comments, without allocating + # an empty array for nodes that have never had comments set. + # + # pkg:gem/rbi#lib/rbi/model.rb:100 + sig { returns(T::Boolean) } + def comments?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:325 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:101 + sig { returns(T::Array[::Gem::Requirement]) } + def version_requirements; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:638 +class RBI::OptParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:643 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::OptParam).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:640 + sig { returns(::String) } + def value; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:601 +class RBI::Param < ::RBI::NodeWithComments + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:606 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:624 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:619 + sig { returns(T::Boolean) } + def anonymous?; end + + # pkg:gem/rbi#lib/rbi/model.rb:603 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:614 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:7 +class RBI::ParseError < ::RBI::Error + # pkg:gem/rbi#lib/rbi/parser.rb:12 + sig { params(message: ::String, location: ::RBI::Loc).void } + def initialize(message, location); end + + # pkg:gem/rbi#lib/rbi/parser.rb:9 + sig { returns(::RBI::Loc) } + def location; end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:49 +class RBI::Parser + # pkg:gem/rbi#lib/rbi/parser.rb:80 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # pkg:gem/rbi#lib/rbi/parser.rb:75 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + private + + # pkg:gem/rbi#lib/rbi/parser.rb:87 + sig { params(source: ::String, file: ::String).returns(::RBI::Tree) } + def parse(source, file:); end + + class << self + # pkg:gem/rbi#lib/rbi/parser.rb:57 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # pkg:gem/rbi#lib/rbi/parser.rb:62 + sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_files(paths); end + + # pkg:gem/rbi#lib/rbi/parser.rb:52 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + # pkg:gem/rbi#lib/rbi/parser.rb:68 + sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_strings(strings); end + end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:1003 +class RBI::Parser::HeredocLocationVisitor < ::Prism::Visitor + # pkg:gem/rbi#lib/rbi/parser.rb:1005 + sig { params(source: ::Prism::Source, begin_offset: ::Integer, end_offset: ::Integer).void } + def initialize(source, begin_offset, end_offset); end + + # pkg:gem/rbi#lib/rbi/parser.rb:1036 + sig { returns(::Prism::Location) } + def location; end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:1026 + sig { override.params(node: ::Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:1015 + sig { override.params(node: ::Prism::StringNode).void } + def visit_string_node(node); end + + private + + # pkg:gem/rbi#lib/rbi/parser.rb:1047 + sig { params(node: T.any(::Prism::InterpolatedStringNode, ::Prism::StringNode)).void } + def handle_string_node(node); end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:915 +class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor + # pkg:gem/rbi#lib/rbi/parser.rb:920 + sig { params(content: ::String, file: ::String).void } + def initialize(content, file:); end + + # pkg:gem/rbi#lib/rbi/parser.rb:986 + sig { params(node: ::Prism::CallNode, value: ::String).returns(T::Boolean) } + def allow_incompatible_override?(node, value); end + + # pkg:gem/rbi#lib/rbi/parser.rb:917 + sig { returns(::RBI::Sig) } + def current; end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:978 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:928 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:164 +class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor + # pkg:gem/rbi#lib/rbi/parser.rb:172 + sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } + def initialize(source, comments:, file:); end + + # pkg:gem/rbi#lib/rbi/parser.rb:169 + sig { returns(T.nilable(::Prism::Node)) } + def last_node; end + + # pkg:gem/rbi#lib/rbi/parser.rb:166 + sig { returns(::RBI::Tree) } + def tree; end + + # pkg:gem/rbi#lib/rbi/parser.rb:361 + sig { params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:185 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:236 + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } + def visit_constant_assign(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:229 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:221 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:291 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:313 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:332 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:344 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # Collect all the remaining comments within a node + # + # pkg:gem/rbi#lib/rbi/parser.rb:539 + sig { params(node: ::Prism::Node).void } + def collect_dangling_comments(node); end + + # Collect all the remaining comments after visiting the tree + # + # pkg:gem/rbi#lib/rbi/parser.rb:557 + sig { void } + def collect_orphan_comments; end + + # pkg:gem/rbi#lib/rbi/parser.rb:580 + sig { returns(::RBI::Tree) } + def current_scope; end + + # pkg:gem/rbi#lib/rbi/parser.rb:585 + sig { returns(T::Array[::RBI::Sig]) } + def current_sigs; end + + # pkg:gem/rbi#lib/rbi/parser.rb:592 + sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } + def detach_comments_from_sigs(sigs); end + + # pkg:gem/rbi#lib/rbi/parser.rb:604 + sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } + def node_comments(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:666 + sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } + def parse_comment(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:699 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } + def parse_params(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:673 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } + def parse_send_args(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:765 + sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } + def parse_sig(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:774 + sig do + params( + node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) + ).returns(T.nilable(::RBI::Struct)) + end + def parse_struct(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:822 + sig { params(send: ::Prism::CallNode).void } + def parse_tstruct_field(send); end + + # pkg:gem/rbi#lib/rbi/parser.rb:859 + sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } + def parse_visibility(name, node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:873 + sig { void } + def separate_header_comments; end + + # pkg:gem/rbi#lib/rbi/parser.rb:883 + sig { void } + def set_root_tree_loc; end + + # pkg:gem/rbi#lib/rbi/parser.rb:902 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_enum_value?(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:897 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def type_variable_definition?(node); end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:114 +class RBI::Parser::Visitor < ::Prism::Visitor + # pkg:gem/rbi#lib/rbi/parser.rb:116 + sig { params(source: ::String, file: ::String).void } + def initialize(source, file:); end + + private + + # pkg:gem/rbi#lib/rbi/parser.rb:143 + sig { params(node: ::Prism::Node).returns(::Prism::Location) } + def adjust_prism_location_for_heredoc(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:126 + sig { params(node: ::Prism::Node).returns(::RBI::Loc) } + def node_loc(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:131 + sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } + def node_string(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:138 + sig { params(node: ::Prism::Node).returns(::String) } + def node_string!(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:154 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def self?(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:159 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_sig_without_runtime?(node); end +end + +# pkg:gem/rbi#lib/rbi/printer.rb:7 +class RBI::Printer < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/printer.rb:25 + sig do + params( + out: T.any(::IO, ::String, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/printer.rb:19 + sig { returns(::Integer) } + def current_indent; end + + # pkg:gem/rbi#lib/rbi/printer.rb:48 + sig { returns(::String) } + def current_indent_string; end + + # pkg:gem/rbi#lib/rbi/printer.rb:43 + sig { void } + def dedent; end + + # pkg:gem/rbi#lib/rbi/printer.rb:13 + def in_visibility_group; end + + # pkg:gem/rbi#lib/rbi/printer.rb:13 + def in_visibility_group=(_arg0); end + + # pkg:gem/rbi#lib/rbi/printer.rb:38 + sig { void } + def indent; end + + # pkg:gem/rbi#lib/rbi/printer.rb:22 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # pkg:gem/rbi#lib/rbi/printer.rb:16 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/printer.rb:54 + sig { params(string: ::String).void } + def print(string); end + + # pkg:gem/rbi#lib/rbi/printer.rb:13 + sig { returns(T::Boolean) } + def print_locs; end + + # pkg:gem/rbi#lib/rbi/printer.rb:13 + def print_locs=(_arg0); end + + # Print a string with indentation and `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/printer.rb:76 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/printer.rb:60 + sig { params(string: T.nilable(::String)).void } + def printn(string = T.unsafe(nil)); end + + # Print a string with indentation but without a `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/printer.rb:69 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:84 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:98 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + private + + # pkg:gem/rbi#lib/rbi/printer.rb:720 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:678 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:688 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:694 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # pkg:gem/rbi#lib/rbi/printer.rb:779 + sig { params(node: ::RBI::Sig).void } + def print_sig_as_block(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:749 + sig { params(node: ::RBI::Sig).void } + def print_sig_as_line(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:712 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end + + # pkg:gem/rbi#lib/rbi/printer.rb:849 + sig { params(node: ::RBI::Sig).returns(T::Array[::String]) } + def sig_modifiers(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:489 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:280 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:263 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:269 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:275 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:160 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:408 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:180 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:139 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:654 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:253 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:421 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:623 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:607 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:415 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:495 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:393 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:386 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:401 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:315 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:617 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:426 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:174 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:371 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:456 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:450 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:444 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:118 + sig { override.params(node: ::RBI::RBSComment).void } + def visit_rbs_comment(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:365 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:644 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:379 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:197 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:242 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:664 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:207 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:471 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:503 + sig { override.params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:524 + sig { override.params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:192 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:186 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:549 + sig { params(node: ::RBI::TStructField).void } + def visit_t_struct_field(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:568 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:574 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:587 + sig { override.params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:166 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:532 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:538 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:544 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:597 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:461 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:630 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end +end + +# pkg:gem/rbi#lib/rbi/printer.rb:846 +RBI::Printer::EMPTY_MODIFIERS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rbi#lib/rbi/printer.rb:10 +RBI::Printer::INDENT_CACHE = T.let(T.unsafe(nil), Array) + +# Pre-computed indentation strings to avoid allocating " " * indent on every line. +# +# pkg:gem/rbi#lib/rbi/printer.rb:9 +RBI::Printer::MAX_CACHED_INDENT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rbi#lib/rbi/printer.rb:5 +class RBI::PrinterError < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi/model.rb:821 +class RBI::Private < ::RBI::Visibility + # pkg:gem/rbi#lib/rbi/model.rb:823 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Private).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:813 +class RBI::Protected < ::RBI::Visibility + # pkg:gem/rbi#lib/rbi/model.rb:815 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Protected).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:802 +class RBI::Public < ::RBI::Visibility + # pkg:gem/rbi#lib/rbi/model.rb:804 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Public).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# Shared default instance to avoid allocating a new Public on every Method/Attr creation. +# +# pkg:gem/rbi#lib/rbi/model.rb:810 +RBI::Public::DEFAULT = T.let(T.unsafe(nil), RBI::Public) + +# pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:5 +module RBI::RBS; end + +# pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:6 +class RBI::RBS::MethodTypeTranslator + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:22 + sig { params(method: ::RBI::Method).void } + def initialize(method); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:19 + sig { returns(::RBI::Sig) } + def result; end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:28 + sig { params(type: ::RBS::MethodType).void } + def visit(type); end + + private + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:100 + sig { params(param: ::RBS::Types::Function::Param, index: ::Integer).returns(::RBI::SigParam) } + def translate_function_param(param, index); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:115 + sig { params(type: T.untyped).returns(::RBI::Type) } + def translate_type(type); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:42 + sig { params(type: ::RBS::Types::Block).void } + def visit_block_type(type); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:57 + sig { params(type: ::RBS::Types::Function).void } + def visit_function_type(type); end + + class << self + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:11 + sig { params(method: ::RBI::Method, type: ::RBS::MethodType).returns(::RBI::Sig) } + def translate(method, type); end + end +end + +# pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:7 +class RBI::RBS::MethodTypeTranslator::Error < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:6 +class RBI::RBS::TypeTranslator + class << self + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:33 + sig do + params( + type: T.any(::RBS::Types::Alias, ::RBS::Types::Bases::Any, ::RBS::Types::Bases::Bool, ::RBS::Types::Bases::Bottom, ::RBS::Types::Bases::Class, ::RBS::Types::Bases::Instance, ::RBS::Types::Bases::Nil, ::RBS::Types::Bases::Self, ::RBS::Types::Bases::Top, ::RBS::Types::Bases::Void, ::RBS::Types::ClassInstance, ::RBS::Types::ClassSingleton, ::RBS::Types::Function, ::RBS::Types::Interface, ::RBS::Types::Intersection, ::RBS::Types::Literal, ::RBS::Types::Optional, ::RBS::Types::Proc, ::RBS::Types::Record, ::RBS::Types::Tuple, ::RBS::Types::Union, ::RBS::Types::UntypedFunction, ::RBS::Types::Variable) + ).returns(::RBI::Type) + end + def translate(type); end + + private + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:114 + sig { params(type: ::RBS::Types::ClassInstance).returns(::RBI::Type) } + def translate_class_instance(type); end + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:122 + sig { params(type: ::RBS::Types::Function).returns(::RBI::Type) } + def translate_function(type); end + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:169 + sig { params(type_name: ::String).returns(::String) } + def translate_t_generic_type(type_name); end + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:102 + sig { params(type: ::RBS::Types::Alias).returns(::RBI::Type) } + def translate_type_alias(type); end + end +end + +# A comment representing a RBS type prefixed with `#:` +# +# pkg:gem/rbi#lib/rbi/model.rb:78 +class RBI::RBSComment < ::RBI::Comment + # pkg:gem/rbi#lib/rbi/model.rb:80 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end +end + +# pkg:gem/rbi#lib/rbi/rbs_printer.rb:5 +class RBI::RBSPrinter < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:30 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + positional_names: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:15 + sig { returns(::Integer) } + def current_indent; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:49 + sig { void } + def dedent; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9 + def in_visibility_group; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9 + def in_visibility_group=(_arg0); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:44 + sig { void } + def indent; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:21 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:18 + sig { returns(T::Boolean) } + def positional_names; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:18 + def positional_names=(_arg0); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:12 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:55 + sig { params(string: ::String).void } + def print(string); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:302 + sig { params(node: ::RBI::Attr, sig: ::RBI::Sig).void } + def print_attr_sig(node, sig); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9 + sig { returns(T::Boolean) } + def print_locs; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9 + def print_locs=(_arg0); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:400 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig(node, sig); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:417 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig_inline(node, sig); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:479 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig_multiline(node, sig); end + + # Print a string with indentation and `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:75 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:61 + sig { params(string: T.nilable(::String)).void } + def printn(string = T.unsafe(nil)); end + + # Print a string with indentation but without a `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:68 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:82 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:680 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:270 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:253 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:259 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:265 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:124 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:612 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:144 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:107 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:816 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:237 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:624 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:94 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:789 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:777 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:618 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:686 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:600 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:594 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:606 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:325 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:783 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:629 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:138 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:574 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:659 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:653 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:647 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:564 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:810 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:584 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:161 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:224 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:826 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:171 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:674 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:545 + sig { params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:558 + sig { params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:156 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:150 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:743 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:749 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:755 + sig { override.params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:130 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:692 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:727 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:735 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:771 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:664 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:796 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end + + private + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:929 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # Parse a string containing a `T.let(x, X)` and extract the type + # + # Returns `nil` is the string is not a `T.let`. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:963 + sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) } + def parse_t_let(code); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:951 + sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) } + def parse_type(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:842 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:861 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:903 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:867 + sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void } + def print_sig_param(node, param); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:921 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end +end + +# pkg:gem/rbi#lib/rbi/rbs_printer.rb:6 +class RBI::RBSPrinter::Error < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi/model.rb:5 +class RBI::ReplaceNodeError < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi/model.rb:630 +class RBI::ReqParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:632 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1250 +class RBI::RequiresAncestor < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1255 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:154 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:1252 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1262 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:650 +class RBI::RestParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:652 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::RestParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:659 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:5 +module RBI::Rewriters; end + +# pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:6 +class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:8 + sig { params(with_todo_comment: T::Boolean).void } + def initialize(with_todo_comment: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:15 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:29 + sig { params(attr: ::RBI::Attr).void } + def add_attr_sig(attr); end + + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:44 + sig { params(method: ::RBI::Method).void } + def add_method_sig(method); end + + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:55 + sig { params(node: ::RBI::NodeWithComments).void } + def add_todo_comment(node); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:6 +class RBI::Rewriters::Annotate < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:8 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:17 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:30 + sig { params(node: ::RBI::NodeWithComments).void } + def annotate_node(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:37 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def root?(node); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:22 +class RBI::Rewriters::AttrToMethods < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:25 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:38 + sig { params(node: ::RBI::Node, with: T::Array[::RBI::Node]).void } + def replace(node, with:); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:6 +class RBI::Rewriters::Deannotate < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:8 + sig { params(annotation: ::String).void } + def initialize(annotation); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:15 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:26 + sig { params(node: ::RBI::NodeWithComments).void } + def deannotate_node(node); end +end + +# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations +# in comments. As an example: +# +# ~~~rb +# tree = Parser.parse_string(<<~RBI) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# +# # @version <= 0.3.0 +# def bar(arg1) +# end +# end +# RBI +# +# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1")) +# +# assert_equal(<<~RBI, tree.string) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# end +# RBI +# ~~~ +# +# Supported operators: +# - equals `=` +# - not equals `!=` +# - greater than `>` +# - greater than or equal to `>=` +# - less than `<` +# - less than or equal to `<=` +# - pessimistic or twiddle-wakka`~>` +# +# And/or logic: +# - "And" logic: put multiple versions on the same line +# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0 +# - "Or" logic: put multiple versions on subsequent lines +# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0 +# ``` +# # @version < 0.3.0 +# # @version > 1.0.0 +# ``` +# Prerelease versions: +# - Prerelease versions are considered less than their non-prerelease counterparts +# - e.g. `0.4.0-prerelease` is less than `0.4.0` +# +# RBI with no versions: +# - RBI with no version annotations are automatically counted towards ALL versions +# +# pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:57 +class RBI::Rewriters::FilterVersions < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:69 + sig { params(version: ::Gem::Version).void } + def initialize(version); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:76 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + class << self + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:62 + sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void } + def filter(tree, version); end + end +end + +# pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:58 +RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) + +# Rewrite non-singleton methods inside singleton classes to singleton methods +# +# Example: +# ~~~rb +# class << self +# def m1; end +# def self.m2; end +# +# class << self +# def m3; end +# end +# end +# ~~~ +# +# will be rewritten to: +# +# ~~~rb +# def self.m1; end +# +# class << self +# def self.m2; end +# def self.m3; end +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/flatten_singleton_methods.rb:30 +class RBI::Rewriters::FlattenSingletonMethods < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/flatten_singleton_methods.rb:33 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Flattens visibility nodes into method nodes +# +# Example: +# ~~~rb +# class A +# def m1; end +# private +# def m2; end +# def m3; end +# end +# ~~~ +# +# will be transformed into: +# +# ~~~rb +# class A +# def m1; end +# private def m2; end +# private def m3; end +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:27 +class RBI::Rewriters::FlattenVisibilities < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:29 + sig { void } + def initialize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:37 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:8 +class RBI::Rewriters::GroupNodes < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:11 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:37 + sig { params(node: ::RBI::Node).returns(::RBI::Group::Kind) } + def group_kind(node); end +end + +# Merge two RBI trees together +# +# Be this `Tree`: +# ~~~rb +# class Foo +# attr_accessor :a +# def m; end +# C = 10 +# end +# ~~~ +# +# Merged with this one: +# ~~~rb +# class Foo +# attr_reader :a +# def m(x); end +# C = 10 +# end +# ~~~ +# +# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`: +# ~~~rb +# class Foo +# <<<<<<< left +# attr_accessor :a +# def m; end +# ======= +# attr_reader :a +# def m(x); end +# >>>>>>> right +# C = 10 +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:39 +class RBI::Rewriters::Merge + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:66 + sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:75 + sig { params(tree: ::RBI::Tree).void } + def merge(tree); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:63 + sig { returns(::RBI::MergeTree) } + def tree; end + + class << self + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:50 + sig do + params( + left: ::RBI::Tree, + right: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + end +end + +# Used for logging / error displaying purpose +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:82 +class RBI::Rewriters::Merge::Conflict + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:90 + sig { params(left: ::RBI::Node, right: ::RBI::Node, left_name: ::String, right_name: ::String).void } + def initialize(left:, right:, left_name:, right_name:); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:84 + sig { returns(::RBI::Node) } + def left; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:87 + sig { returns(::String) } + def left_name; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:84 + def right; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:87 + def right_name; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:98 + sig { returns(::String) } + def to_s; end +end + +# Merge adjacent conflict trees +# +# Transform this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# ======= +# def m1(a); end +# >>>>>>> right +# <<<<<<< left +# def m2(a); end +# ======= +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# Into this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:258 +class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:261 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:267 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:290 + sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } + def merge_conflict_trees(left, right); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:40 +class RBI::Rewriters::Merge::Keep + class << self + private + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:45 + def new(*_arg0); end + end +end + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:42 +RBI::Rewriters::Merge::Keep::LEFT = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep) + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:41 +RBI::Rewriters::Merge::Keep::NONE = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep) + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:43 +RBI::Rewriters::Merge::Keep::RIGHT = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep) + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:103 +class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:108 + sig do + params( + output: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).void + end + def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:105 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:121 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:181 + sig { returns(::RBI::Tree) } + def current_scope; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:198 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } + def make_conflict_scope(left, right); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:205 + sig { params(left: ::RBI::Node, right: ::RBI::Node).void } + def make_conflict_tree(left, right); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:186 + sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } + def previous_definition(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:217 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) } + def replace_scope_header(left, right); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:6 +class RBI::Rewriters::NestNonPublicMembers < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:9 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/nest_singleton_methods.rb:6 +class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/nest_singleton_methods.rb:9 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# This rewriter moves top-level members into a top-level Object class +# +# Example: +# ~~~rb +# def foo; end +# attr_reader :bar +# ~~~ +# +# will be rewritten to: +# +# ~~~rb +# class Object +# def foo; end +# attr_reader :bar +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:22 +class RBI::Rewriters::NestTopLevelMembers < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:24 + sig { void } + def initialize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:32 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Remove all definitions existing in the index from the current tree +# +# Let's create an `Index` from two different `Tree`s: +# ~~~rb +# tree1 = Parse.parse_string(<<~RBI) +# class Foo +# def foo; end +# end +# RBI +# +# tree2 = Parse.parse_string(<<~RBI) +# FOO = 10 +# RBI +# +# index = Index.index(tree1, tree2) +# ~~~ +# +# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean: +# ~~~rb +# tree_to_clean = Parser.parse_string(<<~RBI) +# class Foo +# def foo; end +# def bar; end +# end +# FOO = 10 +# BAR = 42 +# RBI +# +# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index) +# +# assert_equal(<<~RBI, cleaned_tree) +# class Foo +# def bar; end +# end +# BAR = 42 +# RBI +# +# assert_equal(<<~OPERATIONS, operations.join("\n")) +# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16) +# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8) +# OPERATIONS +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:48 +class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:53 + sig { params(index: ::RBI::Index).void } + def initialize(index); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:50 + sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } + def operations; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:75 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:69 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:103 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } + def can_delete_node?(node, previous); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:121 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } + def delete_node(node, previous); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:94 + sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } + def previous_definition_for(node); end + + class << self + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:61 + sig do + params( + tree: ::RBI::Tree, + index: ::RBI::Index + ).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]]) + end + def remove(tree, index); end + end +end + +# pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:126 +class RBI::Rewriters::RemoveKnownDefinitions::Operation + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:131 + sig { params(deleted_node: ::RBI::Node, duplicate_of: ::RBI::Node).void } + def initialize(deleted_node:, duplicate_of:); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:128 + sig { returns(::RBI::Node) } + def deleted_node; end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:128 + def duplicate_of; end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:137 + sig { returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:6 +class RBI::Rewriters::SortNodes < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:9 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:71 + sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } + def group_rank(kind); end + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:92 + sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } + def node_name(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:43 + sig { params(node: ::RBI::Node).returns(::Integer) } + def node_rank(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:104 + sig { params(node: ::RBI::Node).void } + def sort_node_names!(node); end +end + +# Translate all RBS signature comments to Sorbet RBI signatures +# +# pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:7 +class RBI::Rewriters::TranslateRBSSigs < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:12 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:34 + sig { params(node: T.any(::RBI::Attr, ::RBI::Method)).returns(T::Array[::RBI::RBSComment]) } + def extract_rbs_comments(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:61 + sig { params(node: ::RBI::Attr, comment: ::RBI::RBSComment).returns(::RBI::Sig) } + def translate_rbs_attr_type(node, comment); end + + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:53 + sig { params(node: ::RBI::Method, comment: ::RBI::RBSComment).returns(::RBI::Sig) } + def translate_rbs_method_type(node, comment); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:8 +class RBI::Rewriters::TranslateRBSSigs::Error < ::RBI::Error; end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:185 +class RBI::Scope < ::RBI::Tree + include ::RBI::Indexable + + abstract! + + # Duplicate `self` scope without its body + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:363 + sig { returns(T.self_type) } + def dup_empty; end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/model.rb:188 + sig { abstract.returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:84 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:192 + sig { override.returns(::String) } + def to_s; end +end + +# A conflict between two scope headers +# +# Is rendered as a merge conflict between `left` and` right` for scope definitions: +# ~~~rb +# <<<<<<< left +# class Foo +# ======= +# module Foo +# >>>>>>> right +# def m1; end +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:620 +class RBI::ScopeConflict < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:628 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } + def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:622 + sig { returns(::RBI::Scope) } + def left; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:625 + sig { returns(::String) } + def left_name; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:622 + def right; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:625 + def right_name; end +end + +# Sends +# +# pkg:gem/rbi#lib/rbi/model.rb:831 +class RBI::Send < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:839 + sig do + params( + method: ::String, + args: T::Array[::RBI::Arg], + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Send).void) + ).void + end + def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:847 + sig { params(arg: ::RBI::Arg).void } + def <<(arg); end + + # pkg:gem/rbi#lib/rbi/model.rb:852 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:836 + sig { returns(T::Array[::RBI::Arg]) } + def args; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:546 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:184 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:833 + sig { returns(::String) } + def method; end + + # pkg:gem/rbi#lib/rbi/model.rb:857 + sig { returns(::String) } + def to_s; end +end + +# Sorbet's sigs +# +# pkg:gem/rbi#lib/rbi/model.rb:906 +class RBI::Sig < ::RBI::NodeWithComments + # pkg:gem/rbi#lib/rbi/model.rb:964 + sig do + params( + params: T.nilable(T::Array[::RBI::SigParam]), + return_type: T.any(::RBI::Type, ::String), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + allow_incompatible_override: T::Boolean, + allow_incompatible_override_visibility: T::Boolean, + without_runtime: T::Boolean, + type_params: T.nilable(T::Array[::String]), + checked: T.nilable(::Symbol), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Sig).void) + ).void + end + def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), allow_incompatible_override: T.unsafe(nil), allow_incompatible_override_visibility: T.unsafe(nil), without_runtime: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:996 + sig { params(param: ::RBI::SigParam).void } + def <<(param); end + + # pkg:gem/rbi#lib/rbi/model.rb:1006 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:1001 + sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void } + def add_param(name, type); end + + # pkg:gem/rbi#lib/rbi/model.rb:928 + sig { returns(T::Boolean) } + def allow_incompatible_override; end + + # pkg:gem/rbi#lib/rbi/model.rb:928 + def allow_incompatible_override=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:931 + sig { returns(T::Boolean) } + def allow_incompatible_override_visibility; end + + # pkg:gem/rbi#lib/rbi/model.rb:931 + def allow_incompatible_override_visibility=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:947 + sig { returns(T.nilable(::Symbol)) } + def checked; end + + # pkg:gem/rbi#lib/rbi/model.rb:947 + def checked=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:916 + sig { returns(T::Boolean) } + def is_abstract; end + + # pkg:gem/rbi#lib/rbi/model.rb:916 + def is_abstract=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:925 + sig { returns(T::Boolean) } + def is_final; end + + # pkg:gem/rbi#lib/rbi/model.rb:925 + def is_final=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:922 + sig { returns(T::Boolean) } + def is_overridable; end + + # pkg:gem/rbi#lib/rbi/model.rb:922 + def is_overridable=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:919 + sig { returns(T::Boolean) } + def is_override; end + + # pkg:gem/rbi#lib/rbi/model.rb:919 + def is_override=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:908 + sig { returns(T::Array[::RBI::SigParam]) } + def params; end + + # pkg:gem/rbi#lib/rbi/model.rb:913 + sig { returns(T.any(::RBI::Type, ::String)) } + def return_type; end + + # pkg:gem/rbi#lib/rbi/model.rb:913 + def return_type=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:937 + sig { returns(T::Array[::String]) } + def type_params; end + + # pkg:gem/rbi#lib/rbi/model.rb:942 + sig { returns(T::Boolean) } + def type_params?; end + + # pkg:gem/rbi#lib/rbi/model.rb:934 + sig { returns(T::Boolean) } + def without_runtime; end + + # pkg:gem/rbi#lib/rbi/model.rb:934 + def without_runtime=(_arg0); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1015 +class RBI::SigParam < ::RBI::NodeWithComments + # pkg:gem/rbi#lib/rbi/model.rb:1023 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::SigParam).void) + ).void + end + def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:1037 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:1032 + sig { returns(T::Boolean) } + def anonymous?; end + + # pkg:gem/rbi#lib/rbi/model.rb:1017 + sig { returns(::String) } + def name; end + + # pkg:gem/rbi#lib/rbi/model.rb:1020 + sig { returns(T.any(::RBI::Type, ::String)) } + def type; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:246 +class RBI::SingletonClass < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:248 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:255 + sig { override.returns(::String) } + def fully_qualified_name; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:260 +class RBI::Struct < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:277 + sig do + params( + name: ::String, + members: T::Array[::Symbol], + keyword_init: T::Boolean, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(struct: ::RBI::Struct).void) + ).void + end + def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:404 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:287 + sig { override.returns(::String) } + def fully_qualified_name; end + + # pkg:gem/rbi#lib/rbi/model.rb:268 + sig { returns(T::Boolean) } + def keyword_init; end + + # pkg:gem/rbi#lib/rbi/model.rb:268 + def keyword_init=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:265 + sig { returns(T::Array[::Symbol]) } + def members; end + + # pkg:gem/rbi#lib/rbi/model.rb:265 + def members=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:262 + sig { returns(::String) } + def name; end + + # pkg:gem/rbi#lib/rbi/model.rb:262 + def name=(_arg0); end +end + +# Sorbet's T::Enum +# +# pkg:gem/rbi#lib/rbi/model.rb:1134 +class RBI::TEnum < ::RBI::Class + # pkg:gem/rbi#lib/rbi/model.rb:1136 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(klass: ::RBI::TEnum).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1142 +class RBI::TEnumBlock < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:1144 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1151 + sig { override.returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:214 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1157 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1162 +class RBI::TEnumValue < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1167 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::TEnumValue).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:1174 + sig { returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:224 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:1164 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1180 + sig { override.returns(::String) } + def to_s; end +end + +# Sorbet's T::Struct +# +# pkg:gem/rbi#lib/rbi/model.rb:1046 +class RBI::TStruct < ::RBI::Class + # pkg:gem/rbi#lib/rbi/model.rb:1048 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(klass: ::RBI::TStruct).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1078 +class RBI::TStructConst < ::RBI::TStructField + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1086 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void) + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:562 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1093 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:194 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1100 + sig { override.returns(::String) } + def to_s; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:1055 +class RBI::TStructField < ::RBI::NodeWithComments + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:1066 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]) + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:554 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:1063 + sig { returns(T.nilable(::String)) } + def default; end + + # pkg:gem/rbi#lib/rbi/model.rb:1063 + def default=(_arg0); end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/model.rb:1075 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # pkg:gem/rbi#lib/rbi/model.rb:1057 + sig { returns(::String) } + def name; end + + # pkg:gem/rbi#lib/rbi/model.rb:1057 + def name=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:1060 + sig { returns(T.any(::RBI::Type, ::String)) } + def type; end + + # pkg:gem/rbi#lib/rbi/model.rb:1060 + def type=(_arg0); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1105 +class RBI::TStructProp < ::RBI::TStructField + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1113 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void) + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:570 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1120 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:204 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1127 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:120 +class RBI::Tree < ::RBI::NodeWithComments + # pkg:gem/rbi#lib/rbi/model.rb:125 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:132 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:63 + sig { params(with_todo_comment: T::Boolean).void } + def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:46 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:38 + sig { params(annotation: ::String).void } + def deannotate!(annotation); end + + # pkg:gem/rbi#lib/rbi/model.rb:138 + sig { returns(T::Boolean) } + def empty?; end + + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:113 + sig { params(version: ::Gem::Version).void } + def filter_versions!(version); end + + # pkg:gem/rbi#lib/rbi/rewriters/flatten_singleton_methods.rb:58 + sig { void } + def flatten_singleton_methods!; end + + # pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:57 + sig { void } + def flatten_visibilities!; end + + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:80 + sig { void } + def group_nodes!; end + + # pkg:gem/rbi#lib/rbi/index.rb:62 + sig { returns(::RBI::Index) } + def index; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:336 + sig do + params( + other: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:52 + sig { void } + def nest_non_public_members!; end + + # pkg:gem/rbi#lib/rbi/rewriters/nest_singleton_methods.rb:41 + sig { void } + def nest_singleton_methods!; end + + # pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:60 + sig { void } + def nest_top_level_members!; end + + # pkg:gem/rbi#lib/rbi/model.rb:122 + sig { returns(T::Array[::RBI::Node]) } + def nodes; end + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:50 + sig { void } + def replace_attributes_with_methods!; end + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:115 + sig { void } + def sort_nodes!; end + + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:82 + sig { void } + def translate_rbs_sigs!; end +end + +# The base class for all RBI types. +# @abstract +# +# pkg:gem/rbi#lib/rbi/type.rb:7 +class RBI::Type + abstract! + + # pkg:gem/rbi#lib/rbi/type.rb:993 + sig { void } + def initialize; end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/type.rb:1064 + sig { abstract.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:1067 + sig { params(other: ::BasicObject).returns(T::Boolean) } + def eql?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:1073 + sig { override.returns(::Integer) } + def hash; end + + # Returns a new type that is `nilable` if it is not already. + # + # If the type is already nilable, it returns itself. + # ```ruby + # type = RBI::Type.simple("String") + # type.to_rbi # => "String" + # type.nilable.to_rbi # => "::T.nilable(String)" + # type.nilable.nilable.to_rbi # => "::T.nilable(String)" + # ``` + # + # pkg:gem/rbi#lib/rbi/type.rb:1007 + sig { returns(::RBI::Type) } + def nilable; end + + # Returns whether the type is nilable. + # + # pkg:gem/rbi#lib/rbi/type.rb:1034 + sig { returns(T::Boolean) } + def nilable?; end + + # Returns the non-nilable version of the type. + # If the type is already non-nilable, it returns itself. + # If the type is nilable, it returns the inner type. + # + # ```ruby + # type = RBI::Type.nilable(RBI::Type.simple("String")) + # type.to_rbi # => "::T.nilable(String)" + # type.non_nilable.to_rbi # => "String" + # type.non_nilable.non_nilable.to_rbi # => "String" + # ``` + # + # pkg:gem/rbi#lib/rbi/type.rb:1022 + sig { returns(::RBI::Type) } + def non_nilable; end + + # Returns a normalized version of the type. + # + # Normalized types are meant to be easier to process, not to read. + # For example, `T.any(TrueClass, FalseClass)` instead of `T::Boolean` or + # `T.any(String, NilClass)` instead of `T.nilable(String)`. + # + # This is the inverse of `#simplify`. + # + # @abstract + # + # pkg:gem/rbi#lib/rbi/type.rb:1048 + sig { abstract.returns(::RBI::Type) } + def normalize; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1266 + sig { returns(::String) } + def rbs_string; end + + # Returns a simplified version of the type. + # + # Simplified types are meant to be easier to read, not to process. + # For example, `T::Boolean` instead of `T.any(TrueClass, FalseClass)` or + # `T.nilable(String)` instead of `T.any(String, NilClass)`. + # + # This is the inverse of `#normalize`. + # + # @abstract + # + # pkg:gem/rbi#lib/rbi/type.rb:1060 + sig { abstract.returns(::RBI::Type) } + def simplify; end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/type.rb:1079 + sig { abstract.returns(::String) } + def to_rbi; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:1083 + sig { override.returns(::String) } + def to_s; end + + class << self + # Builds a type that represents an intersection of multiple types like `T.all(String, Integer)`. + # + # Note that this method transforms types such as `T.all(String, String)` into `String`, so + # it may return something other than a `All`. + # + # pkg:gem/rbi#lib/rbi/type.rb:929 + sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } + def all(type1, type2, *types); end + + # Builds a type that represents a union of multiple types like `T.any(String, Integer)`. + # + # Note that this method transforms types such as `T.any(String, NilClass)` into `T.nilable(String)`, so + # it may return something other than a `Any`. + # + # pkg:gem/rbi#lib/rbi/type.rb:938 + sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } + def any(type1, type2, *types); end + + # Builds a type that represents `T.anything`. + # + # pkg:gem/rbi#lib/rbi/type.rb:854 + sig { returns(::RBI::Type::Anything) } + def anything; end + + # Builds a type that represents `T.attached_class`. + # + # pkg:gem/rbi#lib/rbi/type.rb:860 + sig { returns(::RBI::Type::AttachedClass) } + def attached_class; end + + # Builds a type that represents `T::Boolean`. + # + # pkg:gem/rbi#lib/rbi/type.rb:866 + sig { returns(::RBI::Type::Boolean) } + def boolean; end + + # Builds a type that represents the singleton class of another type like `T.class_of(Foo)`. + # + # pkg:gem/rbi#lib/rbi/type.rb:910 + sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).returns(::RBI::Type::ClassOf) } + def class_of(type, type_parameter = T.unsafe(nil)); end + + # Builds a type that represents a generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. + # + # pkg:gem/rbi#lib/rbi/type.rb:946 + sig { params(name: ::String, params: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Generic) } + def generic(name, *params); end + + # Builds a type that represents a nilable of another type like `T.nilable(String)`. + # + # Note that this method transforms types such as `T.nilable(T.untyped)` into `T.untyped`, so + # it may return something other than a `RBI::Type::Nilable`. + # + # pkg:gem/rbi#lib/rbi/type.rb:919 + sig { params(type: ::RBI::Type).returns(::RBI::Type) } + def nilable(type); end + + # Builds a type that represents `T.noreturn`. + # + # pkg:gem/rbi#lib/rbi/type.rb:872 + sig { returns(::RBI::Type::NoReturn) } + def noreturn; end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:26 + sig { params(node: ::Prism::Node).returns(::RBI::Type) } + def parse_node(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:10 + sig { params(string: ::String).returns(::RBI::Type) } + def parse_string(string); end + + # Builds a type that represents a proc type like `T.proc.void`. + # + # pkg:gem/rbi#lib/rbi/type.rb:980 + sig { returns(::RBI::Type::Proc) } + def proc; end + + # Builds a type that represents `T.self_type`. + # + # pkg:gem/rbi#lib/rbi/type.rb:878 + sig { returns(::RBI::Type::SelfType) } + def self_type; end + + # Builds a type that represents a shape type like `{name: String, age: Integer}`. + # + # pkg:gem/rbi#lib/rbi/type.rb:972 + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).returns(::RBI::Type::Shape) } + def shape(types = T.unsafe(nil)); end + + # Builds a simple type like `String` or `::Foo::Bar`. + # + # It raises a `NameError` if the name is not a valid Ruby class identifier. + # + # pkg:gem/rbi#lib/rbi/type.rb:843 + sig { params(name: ::String).returns(::RBI::Type::Simple) } + def simple(name); end + + # Builds a type that represents the class of another type like `T::Class[Foo]`. + # + # pkg:gem/rbi#lib/rbi/type.rb:898 + sig { params(type: ::RBI::Type).returns(::RBI::Type::Class) } + def t_class(type); end + + # Builds a type that represents the module of another type like `T::Module[Foo]`. + # + # pkg:gem/rbi#lib/rbi/type.rb:904 + sig { params(type: ::RBI::Type).returns(::RBI::Type::Module) } + def t_module(type); end + + # Builds a type that represents a tuple type like `[String, Integer]`. + # + # pkg:gem/rbi#lib/rbi/type.rb:966 + sig { params(types: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Tuple) } + def tuple(*types); end + + # Builds a type that represents a type alias like `MyTypeAlias`. + # + # pkg:gem/rbi#lib/rbi/type.rb:958 + sig { params(name: ::String, aliased_type: ::RBI::Type).returns(::RBI::Type::TypeAlias) } + def type_alias(name, aliased_type); end + + # Builds a type that represents a type parameter like `T.type_parameter(:U)`. + # + # pkg:gem/rbi#lib/rbi/type.rb:952 + sig { params(name: ::Symbol).returns(::RBI::Type::TypeParameter) } + def type_parameter(name); end + + # Builds a type that represents `T.untyped`. + # + # pkg:gem/rbi#lib/rbi/type.rb:884 + sig { returns(::RBI::Type::Untyped) } + def untyped; end + + # Builds a type that represents `void`. + # + # pkg:gem/rbi#lib/rbi/type.rb:890 + sig { returns(::RBI::Type::Void) } + def void; end + + private + + # pkg:gem/rbi#lib/rbi/type_parser.rb:322 + sig { params(node: ::Prism::CallNode).returns(T::Array[::Prism::Node]) } + def call_chain(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:309 + sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } + def check_arguments_at_least!(node, count); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:294 + sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } + def check_arguments_exactly!(node, count); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:96 + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_call(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:56 + sig { params(node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantReadNode)).returns(::RBI::Type) } + def parse_constant(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:73 + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).returns(::RBI::Type) } + def parse_constant_assignment(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:244 + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_proc(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:223 + sig { params(node: T.any(::Prism::HashNode, ::Prism::KeywordHashNode)).returns(::RBI::Type) } + def parse_shape(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:218 + sig { params(node: ::Prism::ArrayNode).returns(::RBI::Type) } + def parse_tuple(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:335 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:354 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_boolean?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:361 + sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } + def t_class?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:371 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_class_of?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:366 + sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } + def t_module?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:378 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def t_proc?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:347 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_type_alias?(node); end + + # pkg:gem/rbi#lib/rbi/type.rb:987 + sig { params(name: ::String).returns(T::Boolean) } + def valid_identifier?(name); end + end +end + +# A type that is intersection of multiple types like `T.all(String, Integer)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:420 +class RBI::Type::All < ::RBI::Type::Composite + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:429 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:449 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:423 + sig { override.returns(::String) } + def to_rbi; end +end + +# A type that is union of multiple types like `T.any(String, Integer)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:462 +class RBI::Type::Any < ::RBI::Type::Composite + # pkg:gem/rbi#lib/rbi/type.rb:470 + sig { returns(T::Boolean) } + def nilable?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:476 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:496 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:465 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.anything`. +# +# pkg:gem/rbi#lib/rbi/type.rb:51 +class RBI::Type::Anything < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:54 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:66 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:72 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:60 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.attached_class`. +# +# pkg:gem/rbi#lib/rbi/type.rb:78 +class RBI::Type::AttachedClass < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:81 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:93 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:99 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:87 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T::Boolean`. +# +# pkg:gem/rbi#lib/rbi/type.rb:105 +class RBI::Type::Boolean < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:108 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:120 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:126 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:114 + sig { override.returns(::String) } + def to_rbi; end +end + +# The class of another type like `T::Class[Foo]`. +# +# pkg:gem/rbi#lib/rbi/type.rb:242 +class RBI::Type::Class < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:247 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:254 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:266 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:272 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:260 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:244 + sig { returns(::RBI::Type) } + def type; end +end + +# The singleton class of another type like `T.class_of(Foo)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:314 +class RBI::Type::ClassOf < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:322 + sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).void } + def initialize(type, type_parameter = T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:330 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:346 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:352 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:336 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:316 + sig { returns(::RBI::Type::Simple) } + def type; end + + # pkg:gem/rbi#lib/rbi/type.rb:319 + sig { returns(T.nilable(::RBI::Type)) } + def type_parameter; end +end + +# A type that is composed of multiple types like `T.all(String, Integer)`. +# @abstract +# +# pkg:gem/rbi#lib/rbi/type.rb:402 +class RBI::Type::Composite < ::RBI::Type + abstract! + + # pkg:gem/rbi#lib/rbi/type.rb:407 + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:414 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:404 + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +# pkg:gem/rbi#lib/rbi/type_parser.rb:6 +class RBI::Type::Error < ::RBI::Error; end + +# A generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. +# +# pkg:gem/rbi#lib/rbi/type.rb:547 +class RBI::Type::Generic < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:555 + sig { params(name: ::String, params: ::RBI::Type).void } + def initialize(name, *params); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:563 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:549 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:575 + sig { override.returns(::RBI::Type) } + def normalize; end + + # pkg:gem/rbi#lib/rbi/type.rb:552 + sig { returns(T::Array[::RBI::Type]) } + def params; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:581 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:569 + sig { override.returns(::String) } + def to_rbi; end +end + +# The module of another type like `T::Module[Foo]`. +# +# pkg:gem/rbi#lib/rbi/type.rb:278 +class RBI::Type::Module < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:283 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:290 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:302 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:308 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:296 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:280 + sig { returns(::RBI::Type) } + def type; end +end + +# A type that can be `nil` like `T.nilable(String)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:358 +class RBI::Type::Nilable < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:363 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:370 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:382 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:388 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:376 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:360 + sig { returns(::RBI::Type) } + def type; end +end + +# `T.noreturn`. +# +# pkg:gem/rbi#lib/rbi/type.rb:132 +class RBI::Type::NoReturn < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:135 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:147 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:153 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:141 + sig { override.returns(::String) } + def to_rbi; end +end + +# A proc type like `T.proc.void`. +# +# pkg:gem/rbi#lib/rbi/type.rb:743 +class RBI::Type::Proc < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:754 + sig { void } + def initialize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:763 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:791 + sig { params(type: T.untyped).returns(T.self_type) } + def bind(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:823 + sig { override.returns(::RBI::Type) } + def normalize; end + + # pkg:gem/rbi#lib/rbi/type.rb:773 + sig { params(params: ::RBI::Type).returns(T.self_type) } + def params(**params); end + + # pkg:gem/rbi#lib/rbi/type.rb:751 + sig { returns(T.nilable(::RBI::Type)) } + def proc_bind; end + + # pkg:gem/rbi#lib/rbi/type.rb:745 + sig { returns(T::Hash[::Symbol, ::RBI::Type]) } + def proc_params; end + + # pkg:gem/rbi#lib/rbi/type.rb:748 + sig { returns(::RBI::Type) } + def proc_returns; end + + # pkg:gem/rbi#lib/rbi/type.rb:779 + sig { params(type: T.untyped).returns(T.self_type) } + def returns(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:829 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:798 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:785 + sig { returns(T.self_type) } + def void; end +end + +# `T.self_type`. +# +# pkg:gem/rbi#lib/rbi/type.rb:159 +class RBI::Type::SelfType < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:162 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:174 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:180 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:168 + sig { override.returns(::String) } + def to_rbi; end +end + +# A shape type like `{name: String, age: Integer}`. +# +# pkg:gem/rbi#lib/rbi/type.rb:701 +class RBI::Type::Shape < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:706 + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).void } + def initialize(types); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:713 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:729 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:735 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:719 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:703 + sig { returns(T::Hash[T.any(::String, ::Symbol), ::RBI::Type]) } + def types; end +end + +# A type that represents a simple class name like `String` or `Foo`. +# +# It can also be a qualified name like `::Foo` or `Foo::Bar`. +# +# pkg:gem/rbi#lib/rbi/type.rb:13 +class RBI::Type::Simple < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:18 + sig { params(name: ::String).void } + def initialize(name); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:25 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:15 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:37 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:43 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:31 + sig { override.returns(::String) } + def to_rbi; end +end + +# A tuple type like `[String, Integer]`. +# +# pkg:gem/rbi#lib/rbi/type.rb:665 +class RBI::Type::Tuple < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:670 + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:677 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:689 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:695 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:683 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:667 + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +# A type alias that references another type by name like `MyTypeAlias`. +# +# pkg:gem/rbi#lib/rbi/type.rb:623 +class RBI::Type::TypeAlias < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:631 + sig { params(name: ::String, aliased_type: ::RBI::Type).void } + def initialize(name, aliased_type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:639 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:628 + sig { returns(::RBI::Type) } + def aliased_type; end + + # pkg:gem/rbi#lib/rbi/type.rb:625 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:651 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:657 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:645 + sig { override.returns(::String) } + def to_rbi; end +end + +# A type parameter like `T.type_parameter(:U)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:587 +class RBI::Type::TypeParameter < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:592 + sig { params(name: ::Symbol).void } + def initialize(name); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:599 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:589 + sig { returns(::Symbol) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:611 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:617 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:605 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.untyped`. +# +# pkg:gem/rbi#lib/rbi/type.rb:186 +class RBI::Type::Untyped < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:189 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:201 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:207 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:195 + sig { override.returns(::String) } + def to_rbi; end +end + +# pkg:gem/rbi#lib/rbi/type_visitor.rb:6 +class RBI::Type::Visitor + # pkg:gem/rbi#lib/rbi/type_visitor.rb:10 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:58 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:61 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:64 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:67 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:70 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:73 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:76 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:79 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:82 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:88 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:91 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:94 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:100 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:85 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:103 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:112 + sig { params(type: ::RBI::Type::TypeAlias).void } + def visit_type_alias(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:106 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:109 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:97 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end +end + +# pkg:gem/rbi#lib/rbi/type_visitor.rb:7 +class RBI::Type::Visitor::Error < ::RBI::Error; end + +# `void`. +# +# pkg:gem/rbi#lib/rbi/type.rb:213 +class RBI::Type::Void < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:216 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:228 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:234 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:222 + sig { override.returns(::String) } + def to_rbi; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1205 +class RBI::TypeMember < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1210 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:1218 + sig { returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:174 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:1207 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1226 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:1207 + def value; end +end + +# pkg:gem/rbi#lib/rbi/rbs_printer.rb:984 +class RBI::TypePrinter + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:989 + sig { params(max_line_length: T.nilable(::Integer)).void } + def initialize(max_line_length: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:986 + sig { returns(::String) } + def string; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:995 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1117 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1127 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1062 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1087 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1046 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1194 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1105 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1051 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1201 + sig { params(type: ::RBI::Type::Module).void } + def visit_module(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1092 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1072 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1167 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1082 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1147 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1041 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1137 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1189 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1077 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1067 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end + + private + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1210 + sig { params(type_name: ::String).returns(::String) } + def translate_t_type(type_name); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:5 +class RBI::UnexpectedMultipleSigsError < ::RBI::Error + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:10 + sig { params(node: ::RBI::Node).void } + def initialize(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:7 + sig { returns(::RBI::Node) } + def node; end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:18 +class RBI::UnexpectedParserError < ::RBI::Error + # pkg:gem/rbi#lib/rbi/parser.rb:23 + sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } + def initialize(parent_exception, last_location); end + + # pkg:gem/rbi#lib/rbi/parser.rb:20 + sig { returns(::RBI::Loc) } + def last_location; end + + # pkg:gem/rbi#lib/rbi/parser.rb:30 + sig { params(io: T.any(::IO, ::StringIO)).void } + def print_debug(io: T.unsafe(nil)); end +end + +# pkg:gem/rbi#lib/rbi/version.rb:5 +RBI::VERSION = T.let(T.unsafe(nil), String) + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:769 +class RBI::Visibility < ::RBI::NodeWithComments + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:774 + sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } + def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:780 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:797 + sig { returns(T::Boolean) } + def private?; end + + # pkg:gem/rbi#lib/rbi/model.rb:792 + sig { returns(T::Boolean) } + def protected?; end + + # pkg:gem/rbi#lib/rbi/model.rb:787 + sig { returns(T::Boolean) } + def public?; end + + # pkg:gem/rbi#lib/rbi/model.rb:771 + sig { returns(::Symbol) } + def visibility; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:58 +class RBI::VisibilityGroup < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:63 + sig { params(visibility: ::RBI::Visibility).void } + def initialize(visibility); end + + # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:60 + sig { returns(::RBI::Visibility) } + def visibility; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/visitor.rb:8 +class RBI::Visitor + abstract! + + # pkg:gem/rbi#lib/rbi/visitor.rb:10 + sig { params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:108 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:113 + sig { params(file: ::RBI::File).void } + def visit_file(file); end + + private + + # pkg:gem/rbi#lib/rbi/visitor.rb:198 + sig { params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:147 + sig { params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:150 + sig { params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:153 + sig { params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:126 + sig { params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:177 + sig { params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:132 + sig { params(node: ::RBI::Class).void } + def visit_class(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:120 + sig { params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:246 + sig { params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:144 + sig { params(node: ::RBI::Const).void } + def visit_const(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:183 + sig { params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:240 + sig { params(node: ::RBI::Group).void } + def visit_group(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:228 + sig { params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:180 + sig { params(node: ::RBI::Include).void } + def visit_include(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:201 + sig { params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:171 + sig { params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:168 + sig { params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:174 + sig { params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:156 + sig { params(node: ::RBI::Method).void } + def visit_method(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:234 + sig { params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:129 + sig { params(node: ::RBI::Module).void } + def visit_module(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:162 + sig { params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:192 + sig { params(node: ::RBI::Private).void } + def visit_private(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:189 + sig { params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:186 + sig { params(node: ::RBI::Public).void } + def visit_public(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:123 + sig { params(node: ::RBI::RBSComment).void } + def visit_rbs_comment(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:159 + sig { params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:237 + sig { params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:165 + sig { params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:249 + sig { params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:195 + sig { params(node: ::RBI::Send).void } + def visit_send(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:204 + sig { params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:207 + sig { params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:135 + sig { params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:138 + sig { params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:219 + sig { params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:222 + sig { params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:225 + sig { params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:141 + sig { params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:210 + sig { params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:213 + sig { params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:216 + sig { params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:231 + sig { params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:243 + sig { params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end +end + +# pkg:gem/rbi#lib/rbi/visitor.rb:5 +class RBI::VisitorError < ::RBI::Error; end diff --git a/sorbet/rbi/gems/rbs@4.0.2.rbi b/sorbet/rbi/gems/rbs@4.0.2.rbi new file mode 100644 index 000000000..fd7971e7e --- /dev/null +++ b/sorbet/rbi/gems/rbs@4.0.2.rbi @@ -0,0 +1,6908 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbs` gem. +# Please instead update this file by running `bin/tapioca gem rbs`. + + +# pkg:gem/rbs#lib/rbs/version.rb:3 +module RBS + class << self + # pkg:gem/rbs#lib/rbs.rb:80 + def logger; end + + # pkg:gem/rbs#lib/rbs.rb:77 + def logger_level; end + + # pkg:gem/rbs#lib/rbs.rb:89 + def logger_level=(level); end + + # pkg:gem/rbs#lib/rbs.rb:78 + def logger_output; end + + # pkg:gem/rbs#lib/rbs.rb:84 + def logger_output=(val); end + + # pkg:gem/rbs#lib/rbs.rb:94 + def print_warning; end + end +end + +# pkg:gem/rbs#lib/rbs/ast/type_param.rb:4 +module RBS::AST; end + +# pkg:gem/rbs#lib/rbs/ast/annotation.rb:5 +class RBS::AST::Annotation + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:9 + def initialize(string:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:14 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:18 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:20 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:7 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:6 + def string; end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:24 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/comment.rb:5 +class RBS::AST::Comment + # pkg:gem/rbs#lib/rbs/ast/comment.rb:9 + def initialize(string:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:14 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:18 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:20 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:7 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:6 + def string; end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:24 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:5 +module RBS::AST::Declarations; end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:423 +class RBS::AST::Declarations::AliasDecl < ::RBS::AST::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:426 + def initialize(new_name:, old_name:, location:, comment:, annotations: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:434 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:440 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:442 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def new_name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def old_name; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:6 +class RBS::AST::Declarations::Base; end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:55 +class RBS::AST::Declarations::Class < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::NestedDeclarationHelper + include ::RBS::AST::Declarations::MixinHelper + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:97 + def initialize(name:, type_params:, super_class:, members:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:119 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:93 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:95 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:127 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:129 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:94 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:91 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:89 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:92 + def super_class; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:133 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:90 + def type_params; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:107 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), super_class: T.unsafe(nil), members: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:56 +class RBS::AST::Declarations::Class::Super + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:61 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:67 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:58 + def args; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:71 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:73 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:59 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:57 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:77 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:447 +class RBS::AST::Declarations::ClassAlias < ::RBS::AST::Declarations::AliasDecl + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:448 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:347 +class RBS::AST::Declarations::Constant < ::RBS::AST::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:354 + def initialize(name:, type:, location:, comment:, annotations: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:362 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:352 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:351 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:368 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:370 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:350 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:348 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:374 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:349 + def type; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:385 +class RBS::AST::Declarations::Global < ::RBS::AST::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:392 + def initialize(name:, type:, location:, comment:, annotations: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:400 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:390 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:389 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:406 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:408 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:388 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:386 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:412 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:387 + def type; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:248 +class RBS::AST::Declarations::Interface < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::MixinHelper + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:258 + def initialize(name:, type_params:, members:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:278 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:252 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:254 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:285 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:287 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:253 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:251 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:249 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:291 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:250 + def type_params; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:267 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), members: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:35 +module RBS::AST::Declarations::MixinHelper + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:36 + def each_mixin(&block); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:147 +class RBS::AST::Declarations::Module < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::NestedDeclarationHelper + include ::RBS::AST::Declarations::MixinHelper + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:197 + def initialize(name:, type_params:, members:, self_types:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:220 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:193 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:195 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:228 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:230 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:192 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:191 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:189 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:194 + def self_types; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:234 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:190 + def type_params; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:207 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), members: T.unsafe(nil), self_types: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:148 +class RBS::AST::Declarations::Module::Self + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:153 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:159 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:150 + def args; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:163 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:165 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:151 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:149 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:169 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:177 + def to_s; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:459 +class RBS::AST::Declarations::ModuleAlias < ::RBS::AST::Declarations::AliasDecl + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:460 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:9 +module RBS::AST::Declarations::NestedDeclarationHelper + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:22 + def each_decl; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:10 + def each_member; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:304 +class RBS::AST::Declarations::TypeAlias < ::RBS::AST::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:312 + def initialize(name:, type_params:, type:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:321 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:308 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:310 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:328 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:330 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:309 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:305 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:334 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:307 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:306 + def type_params; end +end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:5 +module RBS::AST::Directives; end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:6 +class RBS::AST::Directives::Base; end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:37 +class RBS::AST::Directives::ResolveTypeNames < ::RBS::AST::Directives::Base + # pkg:gem/rbs#lib/rbs/ast/directives.rb:42 + def initialize(value:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:38 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:40 + def value; end +end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:9 +class RBS::AST::Directives::Use < ::RBS::AST::Directives::Base + # pkg:gem/rbs#lib/rbs/ast/directives.rb:31 + def initialize(clauses:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:29 + def clauses; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:29 + def location; end +end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:10 +class RBS::AST::Directives::Use::SingleClause + # pkg:gem/rbs#lib/rbs/ast/directives.rb:13 + def initialize(type_name:, new_name:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:11 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:11 + def new_name; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:11 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:20 +class RBS::AST::Directives::Use::WildcardClause + # pkg:gem/rbs#lib/rbs/ast/directives.rb:23 + def initialize(namespace:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:21 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:21 + def namespace; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:5 +module RBS::AST::Members; end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:399 +class RBS::AST::Members::Alias < ::RBS::AST::Members::Base + # pkg:gem/rbs#lib/rbs/ast/members.rb:407 + def initialize(new_name:, old_name:, kind:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:416 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:403 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:405 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:423 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:425 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:441 + def instance?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:402 + def kind; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:404 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:400 + def new_name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:401 + def old_name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:445 + def singleton?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:429 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:329 +class RBS::AST::Members::AttrAccessor < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # pkg:gem/rbs#lib/rbs/ast/members.rb:332 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:311 +class RBS::AST::Members::AttrReader < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # pkg:gem/rbs#lib/rbs/ast/members.rb:314 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:347 +class RBS::AST::Members::AttrWriter < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # pkg:gem/rbs#lib/rbs/ast/members.rb:350 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:260 +module RBS::AST::Members::Attribute + # pkg:gem/rbs#lib/rbs/ast/members.rb:270 + def initialize(name:, type:, ivar_name:, kind:, annotations:, location:, comment:, visibility: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:281 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:265 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:267 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:290 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:292 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:264 + def ivar_name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:263 + def kind; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:266 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:261 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:262 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:296 + def update(name: T.unsafe(nil), type: T.unsafe(nil), ivar_name: T.unsafe(nil), kind: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:268 + def visibility; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:6 +class RBS::AST::Members::Base; end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:159 +class RBS::AST::Members::ClassInstanceVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # pkg:gem/rbs#lib/rbs/ast/members.rb:162 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:173 +class RBS::AST::Members::ClassVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # pkg:gem/rbs#lib/rbs/ast/members.rb:176 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:230 +class RBS::AST::Members::Extend < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # pkg:gem/rbs#lib/rbs/ast/members.rb:233 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:215 +class RBS::AST::Members::Include < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # pkg:gem/rbs#lib/rbs/ast/members.rb:218 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:145 +class RBS::AST::Members::InstanceVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # pkg:gem/rbs#lib/rbs/ast/members.rb:148 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:365 +module RBS::AST::Members::LocationOnly + # pkg:gem/rbs#lib/rbs/ast/members.rb:368 + def initialize(location:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:372 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:376 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:378 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:366 + def location; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:9 +class RBS::AST::Members::MethodDefinition < ::RBS::AST::Members::Base + # pkg:gem/rbs#lib/rbs/ast/members.rb:55 + def initialize(name:, kind:, overloads:, annotations:, location:, comment:, overloading:, visibility:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:66 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:49 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:51 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:75 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:77 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:81 + def instance?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:47 + def kind; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:50 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:46 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:52 + def overloading; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:89 + def overloading?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:48 + def overloads; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:85 + def singleton?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:106 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:93 + def update(name: T.unsafe(nil), kind: T.unsafe(nil), overloads: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), overloading: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:53 + def visibility; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:10 +class RBS::AST::Members::MethodDefinition::Overload + # pkg:gem/rbs#lib/rbs/ast/members.rb:13 + def initialize(method_type:, annotations:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:18 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:11 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:26 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:22 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:11 + def method_type; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:32 + def sub(subst); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:38 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:28 + def update(annotations: T.unsafe(nil), method_type: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:187 +module RBS::AST::Members::Mixin + # pkg:gem/rbs#lib/rbs/ast/members.rb:194 + def initialize(name:, args:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:202 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:190 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:189 + def args; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:192 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:206 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:210 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:191 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:188 + def name; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:245 +class RBS::AST::Members::Prepend < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # pkg:gem/rbs#lib/rbs/ast/members.rb:248 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:391 +class RBS::AST::Members::Private < ::RBS::AST::Members::Base + include ::RBS::AST::Members::LocationOnly + + # pkg:gem/rbs#lib/rbs/ast/members.rb:394 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:383 +class RBS::AST::Members::Public < ::RBS::AST::Members::Base + include ::RBS::AST::Members::LocationOnly + + # pkg:gem/rbs#lib/rbs/ast/members.rb:386 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:121 +module RBS::AST::Members::Var + # pkg:gem/rbs#lib/rbs/ast/members.rb:127 + def initialize(name:, type:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:134 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:125 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:138 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:140 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:124 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:122 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:123 + def type; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:5 +module RBS::AST::Ruby; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:6 +module RBS::AST::Ruby::Annotations; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:43 +class RBS::AST::Ruby::Annotations::AliasAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:46 + def initialize(location:, prefix_location:, keyword_location:, type_name:, type_name_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:44 + def keyword_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:53 + def map_type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:44 + def type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:44 + def type_name_location; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:7 +class RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:10 + def initialize(location, prefix_location); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:15 + def buffer; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:8 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:8 + def prefix_location; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:356 +class RBS::AST::Ruby::Annotations::BlockParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:359 + def initialize(location:, prefix_location:, ampersand_location:, name_location:, colon_location:, question_location:, type_location:, type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def ampersand_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:370 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:384 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:388 + def optional?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def question_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:392 + def required?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:396 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def type_location; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:64 +class RBS::AST::Ruby::Annotations::ClassAliasAnnotation < ::RBS::AST::Ruby::Annotations::AliasAnnotation + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:65 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:82 +class RBS::AST::Ruby::Annotations::ColonMethodTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:85 + def initialize(location:, prefix_location:, annotations:, method_type:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:83 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:91 + def map_type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:83 + def method_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:100 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:322 +class RBS::AST::Ruby::Annotations::DoubleSplatParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:325 + def initialize(location:, prefix_location:, star2_location:, name_location:, colon_location:, param_type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:334 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def param_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def star2_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:346 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:222 +class RBS::AST::Ruby::Annotations::InstanceVariableAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:225 + def initialize(location:, prefix_location:, ivar_name:, ivar_name_location:, colon_location:, type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def ivar_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def ivar_name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:234 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:246 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:109 +class RBS::AST::Ruby::Annotations::MethodTypesAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:114 + def initialize(location:, prefix_location:, overloads:, vertical_bar_locations:, dot3_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:112 + def dot3_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:121 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:112 + def overloads; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:132 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:112 + def vertical_bar_locations; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:110 +RBS::AST::Ruby::Annotations::MethodTypesAnnotation::Overload = RBS::AST::Members::MethodDefinition::Overload + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:73 +class RBS::AST::Ruby::Annotations::ModuleAliasAnnotation < ::RBS::AST::Ruby::Annotations::AliasAnnotation + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:74 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:20 +class RBS::AST::Ruby::Annotations::NodeTypeAssertion < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:23 + def initialize(location:, prefix_location:, type:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:28 + def map_type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:21 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:35 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:256 +class RBS::AST::Ruby::Annotations::ParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:259 + def initialize(location:, prefix_location:, name_location:, colon_location:, param_type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:257 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:257 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:267 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:257 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:257 + def param_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:278 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:155 +class RBS::AST::Ruby::Annotations::ReturnTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:164 + def initialize(location:, prefix_location:, return_location:, colon_location:, return_type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:158 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:162 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:172 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:156 + def return_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:160 + def return_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:183 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:141 +class RBS::AST::Ruby::Annotations::SkipAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:144 + def initialize(location:, prefix_location:, skip_location:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:142 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:142 + def skip_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:150 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:288 +class RBS::AST::Ruby::Annotations::SplatParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:291 + def initialize(location:, prefix_location:, star_location:, name_location:, colon_location:, param_type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:300 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def param_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def star_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:312 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:192 +class RBS::AST::Ruby::Annotations::TypeApplicationAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:195 + def initialize(location:, prefix_location:, type_args:, close_bracket_location:, comma_locations:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:193 + def close_bracket_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:193 + def comma_locations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:202 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:193 + def type_args; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:214 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:6 +class RBS::AST::Ruby::CommentBlock + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:9 + def initialize(source_buffer, comments); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:226 + def as_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:7 + def comment_buffer; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:211 + def comments; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:98 + def each_paragraph(variables, &block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:50 + def end_line; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:36 + def leading?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:215 + def leading_annotation?(index); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:174 + def line_location(start_line, end_line); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:54 + def line_starts; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:180 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:7 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:7 + def offsets; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:187 + def parse_annotation_lines(start_line, end_line, variables); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:46 + def start_line; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:169 + def text(comment_index); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:41 + def trailing?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:197 + def trailing_annotation(variables); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:130 + def yield_annotation(start_line, end_line, current_line, variables, &block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:110 + def yield_paragraph(start_line, current_line, variables, &block); end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:60 + def build(buffer, comments); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 +class RBS::AST::Ruby::CommentBlock::AnnotationSyntaxError < ::Struct + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def error; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def error=(_); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def location=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def inspect; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:6 +module RBS::AST::Ruby::Declarations; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:7 +class RBS::AST::Ruby::Declarations::Base + include ::RBS::AST::Ruby::Helpers::ConstantHelper + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:13 + def initialize(buffer); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:8 + def buffer; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:18 +class RBS::AST::Ruby::Declarations::ClassDecl < ::RBS::AST::Ruby::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:74 + def initialize(buffer, name, node, super_class); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:66 + def class_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:82 + def each_decl(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:94 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:68 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:98 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:70 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:72 + def super_class; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:102 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:92 + def type_params; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:19 +class RBS::AST::Ruby::Declarations::ClassDecl::SuperClass + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:28 + def initialize(type_name_location, operator_location, type_name, type_annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:56 + def args; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:43 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:55 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:22 + def operator_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:26 + def type_annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:35 + def type_args; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:58 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:24 + def type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:20 + def type_name_location; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:223 +class RBS::AST::Ruby::Declarations::ClassModuleAliasDecl < ::RBS::AST::Ruby::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:230 + def initialize(buffer, node, new_name, infered_old_name, leading_comment, annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:228 + def annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:264 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:227 + def infered_old_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:225 + def leading_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:239 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:243 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:226 + def new_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:224 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:252 + def old_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:268 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:161 +class RBS::AST::Ruby::Declarations::ConstantDecl < ::RBS::AST::Ruby::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:167 + def initialize(buffer, constant_name, node, leading_comment, type_annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:209 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:163 + def constant_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:162 + def leading_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:175 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:179 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:164 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:188 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:165 + def type_annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:213 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:114 +class RBS::AST::Ruby::Declarations::ModuleDecl < ::RBS::AST::Ruby::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:121 + def initialize(buffer, name, node); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:128 + def each_decl(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:142 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:117 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:115 + def module_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:146 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:119 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:140 + def self_types; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:150 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:138 + def type_params; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/helpers/constant_helper.rb:6 +module RBS::AST::Ruby::Helpers; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/helpers/constant_helper.rb:7 +module RBS::AST::Ruby::Helpers::ConstantHelper + private + + # pkg:gem/rbs#lib/rbs/ast/ruby/helpers/constant_helper.rb:10 + def constant_as_type_name(node); end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/helpers/constant_helper.rb:10 + def constant_as_type_name(node); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/helpers/location_helper.rb:7 +module RBS::AST::Ruby::Helpers::LocationHelper + # pkg:gem/rbs#lib/rbs/ast/ruby/helpers/location_helper.rb:8 + def rbs_location(location); end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:6 +module RBS::AST::Ruby::Members; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:690 +class RBS::AST::Ruby::Members::AttrAccessorMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:684 +class RBS::AST::Ruby::Members::AttrReaderMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:687 +class RBS::AST::Ruby::Members::AttrWriterMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:639 +class RBS::AST::Ruby::Members::AttributeMember < ::RBS::AST::Ruby::Members::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:645 + def initialize(buffer, node, name_nodes, leading_comment, type_annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:643 + def leading_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:659 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:663 + def name_locations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:641 + def name_nodes; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:653 + def names; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:640 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:669 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:642 + def type_annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:673 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:7 +class RBS::AST::Ruby::Members::Base + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:10 + def initialize(buffer); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:8 + def buffer; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:547 +class RBS::AST::Ruby::Members::DefMember < ::RBS::AST::Ruby::Members::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:555 + def initialize(buffer, name, node, method_type, leading_comment); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:575 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:553 + def leading_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:563 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:552 + def method_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:550 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:579 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:551 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:571 + def overloading?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:567 + def overloads; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:583 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:548 +RBS::AST::Ruby::Members::DefMember::Overload = RBS::AST::Members::MethodDefinition::Overload + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:633 +class RBS::AST::Ruby::Members::ExtendMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:630 +class RBS::AST::Ruby::Members::IncludeMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:693 +class RBS::AST::Ruby::Members::InstanceVariableMember < ::RBS::AST::Ruby::Members::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:696 + def initialize(buffer, annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:694 + def annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:709 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:701 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:705 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:713 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:17 +class RBS::AST::Ruby::Members::MethodTypeAnnotation + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:403 + def initialize(type_annotations:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:484 + def empty?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:407 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:524 + def overloading?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:488 + def overloads; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:401 + def type_annotations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:535 + def type_fingerprint; end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:420 + def build(leading_block, trailing_block, variables, node); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:18 +class RBS::AST::Ruby::Members::MethodTypeAnnotation::DocStyle + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:29 + def initialize; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:181 + def all_param_annotations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:27 + def block; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:27 + def block=(_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:196 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:287 + def method_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:25 + def optional_keywords; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:21 + def optional_positionals; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:24 + def required_keywords; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:20 + def required_positionals; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:26 + def rest_keywords; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:26 + def rest_keywords=(_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:22 + def rest_positionals; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:22 + def rest_positionals=(_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:19 + def return_type_annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:19 + def return_type_annotation=(_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:23 + def trailing_positionals; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:273 + def type_fingerprint; end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:41 + def build(param_type_annotations, return_type_annotation, node); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:593 +class RBS::AST::Ruby::Members::MixinMember < ::RBS::AST::Ruby::Members::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:598 + def initialize(buffer, node, module_name, annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:596 + def annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:605 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:595 + def module_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:609 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:594 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:616 + def type_args; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:620 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:636 +class RBS::AST::Ruby::Members::PrependMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# pkg:gem/rbs#lib/rbs/ast/type_param.rb:5 +class RBS::AST::TypeParam + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:8 + def initialize(name:, variance:, upper_bound:, lower_bound:, location:, default_type: T.unsafe(nil), unchecked: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:41 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def default_type; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:51 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:53 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:25 + def lower_bound; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def lower_bound_type; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:69 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:57 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:133 + def to_s; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:32 + def unchecked!(value = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:37 + def unchecked?; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:18 + def upper_bound; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def upper_bound_type; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def variance; end + + class << self + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:166 + def application(params, args); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:198 + def normalize_args(params, args); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:114 + def rename(params, new_names:); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:92 + def resolve_variables(params); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:102 + def subst_var(vars, type); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:219 + def validate(type_params); end + end +end + +# The Visitor class implements the Visitor pattern for traversing the RBS Abstract Syntax Tree (AST). +# +# It provides methods to visit each type of node in the AST, allowing for custom processing of each node type. +# +# This class is designed to be subclassed, with specific visit methods overridden to implement custom behavior for +# different node types. +# +# Example usage: +# +# ~~~rb +# class MyVisitor < RBS::AST::Visitor +# def visit_declaration_class(node) +# puts "Visiting class: #{node.name}" +# +# super # call `super` to run the default visiting behavior +# end +# end +# +# visitor = MyVisitor.new +# visitor.visit(ast_node) +# ~~~ +# +# pkg:gem/rbs#lib/rbs/ast/visitor.rb:26 +class RBS::AST::Visitor + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:27 + def visit(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:70 + def visit_all(nodes); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:79 + def visit_declaration_class(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:87 + def visit_declaration_constant(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:76 + def visit_declaration_global(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:93 + def visit_declaration_interface(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:83 + def visit_declaration_module(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:90 + def visit_declaration_type_alias(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:97 + def visit_member_alias(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:124 + def visit_member_attr_accessor(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:118 + def visit_member_attr_reader(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:121 + def visit_member_attr_writer(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:100 + def visit_member_class_instance_variable(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:103 + def visit_member_class_variable(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:133 + def visit_member_extend(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:127 + def visit_member_include(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:106 + def visit_member_instance_variable(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:115 + def visit_member_method_definition(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:130 + def visit_member_prepend(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:109 + def visit_member_private(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:112 + def visit_member_public(node); end +end + +# pkg:gem/rbs#lib/rbs/ancestor_graph.rb:4 +class RBS::AncestorGraph + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:13 + def initialize(env:, ancestor_builder: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:9 + def ancestor_builder; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:19 + def build; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:32 + def build_ancestors(node, ancestors); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:11 + def children; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:64 + def each_ancestor(node, yielded: T.unsafe(nil), &block); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:56 + def each_child(node, &block); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:78 + def each_descendant(node, yielded: T.unsafe(nil), &block); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:48 + def each_parent(node, &block); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:8 + def env; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:10 + def parents; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:43 + def register(parent:, child:); end +end + +# pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 +class RBS::AncestorGraph::InstanceNode < ::Struct + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def type_name; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def inspect; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def members; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 +class RBS::AncestorGraph::SingletonNode < ::Struct + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def type_name; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def inspect; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def members; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:19 +class RBS::BaseError < ::StandardError; end + +# pkg:gem/rbs#lib/rbs/buffer.rb:4 +class RBS::Buffer + # pkg:gem/rbs#lib/rbs/buffer.rb:9 + def initialize(content:, name: T.unsafe(nil), parent: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:131 + def absolute_position(position); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:6 + def content; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:148 + def detach; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:86 + def inspect; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:78 + def last_position; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:26 + def line_count; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:22 + def lines; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:68 + def loc_to_pos(loc); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:5 + def name; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:7 + def parent; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:116 + def parent_buffer; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:122 + def parent_position(position); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:56 + def pos_to_loc(pos); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:30 + def ranges; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:90 + def rbs_location(location, loc2 = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:98 + def sub_buffer(lines:); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:140 + def top_buffer; end +end + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:4 +module RBS::BuiltinNames; end + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:45 +RBS::BuiltinNames::Array = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:37 +RBS::BuiltinNames::BasicObject = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:43 +RBS::BuiltinNames::Class = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:41 +RBS::BuiltinNames::Comparable = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:42 +RBS::BuiltinNames::Enumerable = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:48 +RBS::BuiltinNames::Enumerator = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:55 +RBS::BuiltinNames::FalseClass = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:52 +RBS::BuiltinNames::Float = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:46 +RBS::BuiltinNames::Hash = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:51 +RBS::BuiltinNames::Integer = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:39 +RBS::BuiltinNames::Kernel = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:44 +RBS::BuiltinNames::Module = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:5 +class RBS::BuiltinNames::Name + # pkg:gem/rbs#lib/rbs/builtin_names.rb:8 + def initialize(name:); end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:16 + def instance_type(*args); end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:20 + def instance_type?(type); end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:24 + def singleton_type; end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:28 + def singleton_type?(type); end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:12 + def to_s; end + + class << self + # pkg:gem/rbs#lib/rbs/builtin_names.rb:32 + def define(name, namespace: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:56 +RBS::BuiltinNames::Numeric = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:38 +RBS::BuiltinNames::Object = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:47 +RBS::BuiltinNames::Range = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:53 +RBS::BuiltinNames::Regexp = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:49 +RBS::BuiltinNames::Set = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:40 +RBS::BuiltinNames::String = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:50 +RBS::BuiltinNames::Symbol = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:54 +RBS::BuiltinNames::TrueClass = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/cli/colored_io.rb:4 +class RBS::CLI; end + +# pkg:gem/rbs#lib/rbs/cli/colored_io.rb:5 +class RBS::CLI::ColoredIO + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:8 + def initialize(stdout:); end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:28 + def puts(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:20 + def puts_green(string); end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:12 + def puts_red(string); end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:6 + def stdout; end + + private + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:43 + def are_colors_disabled?; end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:39 + def are_colors_supported?; end + + # https://github.com/rubygems/rubygems/blob/ed65279100234a17d65d71fe26de5083984ac5b8/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb#L99-L109 + # + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:35 + def can_display_colors?; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:345 +class RBS::ClassInstanceVariableDuplicationError < ::RBS::VariableDuplicationError + # pkg:gem/rbs#lib/rbs/errors.rb:346 + def kind; end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/base.rb:4 +module RBS::Collection; end + +# pkg:gem/rbs#lib/rbs/collection/cleaner.rb:5 +class RBS::Collection::Cleaner + # pkg:gem/rbs#lib/rbs/collection/cleaner.rb:8 + def initialize(lockfile_path:); end + + # pkg:gem/rbs#lib/rbs/collection/cleaner.rb:12 + def clean; end + + # pkg:gem/rbs#lib/rbs/collection/cleaner.rb:6 + def lock; end + + # pkg:gem/rbs#lib/rbs/collection/cleaner.rb:30 + def needed?(gem_name, version); end +end + +# This class represent the configuration file. +# +# pkg:gem/rbs#lib/rbs/collection/config.rb:7 +class RBS::Collection::Config + # pkg:gem/rbs#lib/rbs/collection/config.rb:49 + def initialize(data, config_path:); end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:19 + def config_path; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:19 + def data; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:54 + def gem(gem_name); end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:74 + def gems; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:58 + def repo_path; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:62 + def repo_path_data; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:66 + def sources; end + + class << self + # pkg:gem/rbs#lib/rbs/collection/config.rb:21 + def find_config_path; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:41 + def from_path(path); end + + # Generate a rbs lockfile from Gemfile.lock to `config_path`. + # If `with_lockfile` is true, it respects existing rbs lockfile. + # + # pkg:gem/rbs#lib/rbs/collection/config.rb:34 + def generate_lockfile(config_path:, definition:, with_lockfile: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:45 + def to_lockfile_path(config_path); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/config.rb:8 +class RBS::Collection::Config::CollectionNotAvailable < ::StandardError + # pkg:gem/rbs#lib/rbs/collection/config.rb:9 + def initialize; end +end + +# pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:6 +class RBS::Collection::Config::Lockfile + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:9 + def initialize(lockfile_path:, path:, gemfile_lock_path:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:73 + def check_rbs_availability!; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:18 + def fullpath; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:22 + def gemfile_lock_fullpath; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def gemfile_lock_path; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def gems; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:65 + def library_data(lib); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def lockfile_dir; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def lockfile_path; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def path; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def sources; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:28 + def to_lockfile; end + + class << self + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:42 + def from_lockfile(lockfile_path:, data:); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:6 +class RBS::Collection::Config::LockfileGenerator + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:48 + def initialize(config:, definition:, with_lockfile:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:40 + def config; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:40 + def definition; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:40 + def existing_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:40 + def gem_entries; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:40 + def gem_hash; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:76 + def generate; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:40 + def lockfile; end + + private + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:109 + def assign_gem(name:, version:, skip: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:175 + def assign_stdlib(name:, from_gem: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:246 + def find_best_version(version:, versions:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:240 + def find_source(name:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:101 + def validate_gemfile_lock_path!(lock:, gemfile_lock_path:); end + + class << self + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:42 + def generate(config:, definition:, with_lockfile: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:7 +RBS::Collection::Config::LockfileGenerator::ALUMNI_STDLIBS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:24 +class RBS::Collection::Config::LockfileGenerator::GemfileLockMismatchError < ::StandardError + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:25 + def initialize(expected:, actual:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:30 + def message; end +end + +# pkg:gem/rbs#lib/rbs/collection/config.rb:17 +RBS::Collection::Config::PATH = T.let(T.unsafe(nil), Pathname) + +# pkg:gem/rbs#lib/rbs/collection/installer.rb:5 +class RBS::Collection::Installer + # pkg:gem/rbs#lib/rbs/collection/installer.rb:9 + def initialize(lockfile_path:, stdout: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/collection/installer.rb:14 + def install_from_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/installer.rb:6 + def lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/installer.rb:7 + def stdout; end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/base.rb:5 +module RBS::Collection::Sources + class << self + # pkg:gem/rbs#lib/rbs/collection/sources.rb:12 + def from_config_entry(source_entry, base_directory:); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/base.rb:6 +module RBS::Collection::Sources::Base + # pkg:gem/rbs#lib/rbs/collection/sources/base.rb:7 + def dependencies_of(name, version); end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/git.rb:11 +class RBS::Collection::Sources::Git + include ::RBS::Collection::Sources::Base + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:19 + def initialize(name:, revision:, remote:, repo_dir:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:27 + def has?(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:44 + def install(dest:, name:, version:, stdout:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:224 + def load_metadata(dir:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:74 + def manifest_of(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:208 + def metadata_content(name:, version:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:17 + def name; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:17 + def remote; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:17 + def repo_dir; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:173 + def resolved_revision; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:17 + def revision; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:114 + def to_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:37 + def versions(name); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:216 + def write_metadata(dir:, name:, version:); end + + private + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:88 + def _install(dest:, name:, version:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:184 + def commit_hash?; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:100 + def cp_r(src, dest); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:124 + def format_config_entry(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:169 + def gem_repo_dir; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:230 + def gems_versions; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:188 + def git(*cmd, **opt); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:192 + def git?(*cmd, **opt); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:159 + def git_dir; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:153 + def need_to_fetch?(revision); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:131 + def setup!; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:198 + def sh!(*cmd, **opt); end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/git.rb:15 +class RBS::Collection::Sources::Git::CommandError < ::StandardError; end + +# pkg:gem/rbs#lib/rbs/collection/sources/git.rb:13 +RBS::Collection::Sources::Git::METADATA_FILENAME = T.let(T.unsafe(nil), String) + +# pkg:gem/rbs#lib/rbs/collection/sources/local.rb:6 +class RBS::Collection::Sources::Local + include ::RBS::Collection::Sources::Base + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:11 + def initialize(path:, base_directory:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:9 + def full_path; end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:17 + def has?(name, version); end + + # Create a symlink instead of copying file to refer files in @path. + # By avoiding copying RBS files, the users do not need re-run `rbs collection install` + # when the RBS files are updated. + # + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:32 + def install(dest:, name:, version:, stdout:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:64 + def manifest_of(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:9 + def path; end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:72 + def to_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:25 + def versions(name); end + + private + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:59 + def _install(src, dst); end +end + +# Signatures that are included in gem package as sig/ directory. +# +# pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:9 +class RBS::Collection::Sources::Rubygems + include ::RBS::Collection::Sources::Base + include ::Singleton::SingletonInstanceMethods + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:13 + def has?(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:23 + def install(dest:, name:, version:, stdout:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:29 + def manifest_of(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:36 + def to_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:17 + def versions(name); end + + private + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:42 + def gem_sig_path(name, version); end + + class << self + private + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:11 + def allocate; end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:11 + def new(*_arg0); end + end +end + +# signatures that are bundled in rbs gem under the stdlib/ directory +# +# pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:9 +class RBS::Collection::Sources::Stdlib + include ::RBS::Collection::Sources::Base + include ::Singleton::SingletonInstanceMethods + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:15 + def has?(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:23 + def install(dest:, name:, version:, stdout:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:29 + def manifest_of(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:38 + def to_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:19 + def versions(name); end + + private + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:44 + def lookup(name, version); end + + class << self + private + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:11 + def allocate; end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:11 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:13 +RBS::Collection::Sources::Stdlib::REPO = T.let(T.unsafe(nil), RBS::Repository) + +# pkg:gem/rbs#lib/rbs/constant.rb:4 +class RBS::Constant + # pkg:gem/rbs#lib/rbs/constant.rb:9 + def initialize(name:, type:, entry:); end + + # pkg:gem/rbs#lib/rbs/constant.rb:15 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/constant.rb:7 + def entry; end + + # pkg:gem/rbs#lib/rbs/constant.rb:22 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/constant.rb:24 + def hash; end + + # pkg:gem/rbs#lib/rbs/constant.rb:5 + def name; end + + # pkg:gem/rbs#lib/rbs/constant.rb:6 + def type; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:598 +class RBS::CyclicClassAliasDefinitionError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:603 + def initialize(entry); end + + # pkg:gem/rbs#lib/rbs/errors.rb:601 + def alias_entry; end + + # pkg:gem/rbs#lib/rbs/errors.rb:609 + def location; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:559 +class RBS::CyclicTypeParameterBound < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:564 + def initialize(type_name:, method_name:, params:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:562 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:562 + def method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:562 + def params; end + + # pkg:gem/rbs#lib/rbs/errors.rb:562 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:4 +class RBS::Definition + # pkg:gem/rbs#lib/rbs/definition.rb:302 + def initialize(type_name:, entry:, self_type:, ancestors:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:296 + def ancestors; end + + # pkg:gem/rbs#lib/rbs/definition.rb:325 + def class?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:342 + def class_type?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:300 + def class_variables; end + + # pkg:gem/rbs#lib/rbs/definition.rb:389 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:295 + def entry; end + + # pkg:gem/rbs#lib/rbs/definition.rb:346 + def instance_type?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:299 + def instance_variables; end + + # pkg:gem/rbs#lib/rbs/definition.rb:333 + def interface?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:350 + def interface_type?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:379 + def map_method_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:298 + def methods; end + + # pkg:gem/rbs#lib/rbs/definition.rb:329 + def module?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:297 + def self_type; end + + # pkg:gem/rbs#lib/rbs/definition.rb:367 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/definition.rb:294 + def type_name; end + + # pkg:gem/rbs#lib/rbs/definition.rb:354 + def type_params; end + + # pkg:gem/rbs#lib/rbs/definition.rb:358 + def type_params_decl; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:209 +module RBS::Definition::Ancestor; end + +# pkg:gem/rbs#lib/rbs/definition.rb:210 +class RBS::Definition::Ancestor::Instance + # pkg:gem/rbs#lib/rbs/definition.rb:213 + def initialize(name:, args:, source:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:219 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:211 + def args; end + + # pkg:gem/rbs#lib/rbs/definition.rb:223 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:225 + def hash; end + + # pkg:gem/rbs#lib/rbs/definition.rb:211 + def name; end + + # pkg:gem/rbs#lib/rbs/definition.rb:211 + def source; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:230 +class RBS::Definition::Ancestor::Singleton + # pkg:gem/rbs#lib/rbs/definition.rb:233 + def initialize(name:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:237 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:241 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:243 + def hash; end + + # pkg:gem/rbs#lib/rbs/definition.rb:231 + def name; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:249 +class RBS::Definition::InstanceAncestors + # pkg:gem/rbs#lib/rbs/definition.rb:254 + def initialize(type_name:, params:, ancestors:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:252 + def ancestors; end + + # pkg:gem/rbs#lib/rbs/definition.rb:260 + def apply(args, env:, location:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:251 + def params; end + + # pkg:gem/rbs#lib/rbs/definition.rb:250 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:30 +class RBS::Definition::Method + # pkg:gem/rbs#lib/rbs/definition.rb:107 + def initialize(super_method:, defs:, accessibility:, alias_of:, annotations: T.unsafe(nil), alias_member: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition.rb:117 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:101 + def accessibility; end + + # pkg:gem/rbs#lib/rbs/definition.rb:105 + def alias_member; end + + # pkg:gem/rbs#lib/rbs/definition.rb:104 + def alias_of; end + + # pkg:gem/rbs#lib/rbs/definition.rb:103 + def annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:151 + def comments; end + + # pkg:gem/rbs#lib/rbs/definition.rb:133 + def defined_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:100 + def defs; end + + # pkg:gem/rbs#lib/rbs/definition.rb:127 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:102 + def extra_annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:129 + def hash; end + + # pkg:gem/rbs#lib/rbs/definition.rb:140 + def implemented_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:190 + def map_method_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:176 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:183 + def map_type_bound(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:155 + def members; end + + # pkg:gem/rbs#lib/rbs/definition.rb:147 + def method_types; end + + # pkg:gem/rbs#lib/rbs/definition.rb:163 + def private?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:159 + def public?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:167 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/definition.rb:99 + def super_method; end + + # pkg:gem/rbs#lib/rbs/definition.rb:196 + def update(super_method: T.unsafe(nil), defs: T.unsafe(nil), accessibility: T.unsafe(nil), alias_of: T.unsafe(nil), annotations: T.unsafe(nil), alias_member: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:31 +class RBS::Definition::Method::TypeDef + # pkg:gem/rbs#lib/rbs/definition.rb:40 + def initialize(type:, member:, defined_in:, implemented_in:, overload_annotations: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition.rb:50 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:38 + def annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:64 + def comment; end + + # pkg:gem/rbs#lib/rbs/definition.rb:34 + def defined_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:89 + def each_annotation(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:58 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:60 + def hash; end + + # pkg:gem/rbs#lib/rbs/definition.rb:35 + def implemented_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:33 + def member; end + + # pkg:gem/rbs#lib/rbs/definition.rb:36 + def member_annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:80 + def overload?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:37 + def overload_annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:32 + def type; end + + # pkg:gem/rbs#lib/rbs/definition.rb:73 + def update(type: T.unsafe(nil), member: T.unsafe(nil), defined_in: T.unsafe(nil), implemented_in: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:284 +class RBS::Definition::SingletonAncestors + # pkg:gem/rbs#lib/rbs/definition.rb:288 + def initialize(type_name:, ancestors:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:286 + def ancestors; end + + # pkg:gem/rbs#lib/rbs/definition.rb:285 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:5 +class RBS::Definition::Variable + # pkg:gem/rbs#lib/rbs/definition.rb:11 + def initialize(parent_variable:, type:, declared_in:, source:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:8 + def declared_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:6 + def parent_variable; end + + # pkg:gem/rbs#lib/rbs/definition.rb:9 + def source; end + + # pkg:gem/rbs#lib/rbs/definition.rb:18 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/definition.rb:7 + def type; end +end + +# pkg:gem/rbs#lib/rbs/definition_builder.rb:4 +class RBS::DefinitionBuilder + # pkg:gem/rbs#lib/rbs/definition_builder.rb:14 + def initialize(env:, ancestor_builder: T.unsafe(nil), method_builder: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:6 + def ancestor_builder; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:195 + def build_instance(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:43 + def build_interface(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:327 + def build_singleton(type_name); end + + # Builds a definition for singleton without .new method. + # + # pkg:gem/rbs#lib/rbs/definition_builder.rb:257 + def build_singleton0(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:85 + def define_instance(definition, type_name, subst, define_class_vars:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:33 + def define_interface(definition, type_name, subst); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:695 + def define_method(methods, definition, method, subst, self_type_methods, defined_in:, implemented_in: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:25 + def ensure_namespace!(namespace, location:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:5 + def env; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:983 + def expand_alias(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:987 + def expand_alias1(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:994 + def expand_alias2(type_name, args); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:634 + def import_methods(definition, module_name, module_methods, interfaces_methods, subst, self_type_methods); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:583 + def insert_variable(type_name, variables, name:, type:, source:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:9 + def instance_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:12 + def interface_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:453 + def interface_methods(interface_ancestors); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:7 + def method_builder; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:11 + def singleton0_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:10 + def singleton_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:483 + def source_location(source, decl); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:973 + def special_accessibility(is_instance, method_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:66 + def tapp_subst(name, args); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:979 + def try_cache(type_name, cache:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:1018 + def update(env:, except:, ancestor_builder:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:473 + def validate_params_with(type_params, result:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:1047 + def validate_type_name(name, location); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:501 + def validate_type_params(definition, ancestors:, methods:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:1036 + def validate_type_presence(type); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:594 + def validate_variable(var); end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:5 +class RBS::DefinitionBuilder::AncestorBuilder + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:162 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:151 + def env; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:664 + def fill_ancestor_source(ancestor, name:, source:, &block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:492 + def instance_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:154 + def instance_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:628 + def interface_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:160 + def interface_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:474 + def mixin_ancestors(entry, type_name, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:350 + def mixin_ancestors0(decl, type_name, align_params:, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:192 + def one_instance_ancestors(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:153 + def one_instance_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:331 + def one_interface_ancestors(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:159 + def one_interface_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:277 + def one_singleton_ancestors(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:156 + def one_singleton_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:573 + def singleton_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:157 + def singleton_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:175 + def validate_super_class!(type_name, entry); end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:6 +class RBS::DefinitionBuilder::AncestorBuilder::OneAncestors + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:17 + def initialize(type_name:, params:, super_class:, self_types:, included_modules:, included_interfaces:, prepended_modules:, extended_modules:, extended_interfaces:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:29 + def each_ancestor(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:86 + def each_extended_interface(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:78 + def each_extended_module(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:62 + def each_included_interface(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:54 + def each_included_module(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:70 + def each_prepended_module(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:46 + def each_self_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:15 + def extended_interfaces; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:14 + def extended_modules; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:12 + def included_interfaces; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:11 + def included_modules; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:8 + def params; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:13 + def prepended_modules; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:10 + def self_types; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:9 + def super_class; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:7 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:94 + def class_instance(type_name:, params:, super_class:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:136 + def interface(type_name:, params:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:122 + def module_instance(type_name:, params:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:108 + def singleton(type_name:, super_class:); end + end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:5 +class RBS::DefinitionBuilder::MethodBuilder + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:91 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:211 + def build_alias(methods, type, member:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:216 + def build_attribute(methods, type, member:, accessibility:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:99 + def build_instance(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:191 + def build_interface(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:250 + def build_method(methods, type, member:, accessibility:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:232 + def build_ruby_attribute(methods, type, member:, accessibility:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:162 + def build_singleton(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:261 + def each_rbs_member_with_accessibility(members, accessibility: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:86 + def env; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:87 + def instance_methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:89 + def interface_methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:88 + def singleton_methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:274 + def update(env:, except:); end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:6 +class RBS::DefinitionBuilder::MethodBuilder::Methods + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:30 + def initialize(type:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:49 + def each; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:28 + def methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:27 + def type; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:35 + def validate!; end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:7 +class RBS::DefinitionBuilder::MethodBuilder::Methods::Definition < ::Struct + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:14 + def accessibility; end + + # @implements Definition + # + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:10 + def original; end + + class << self + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:22 + def empty(name:, type:); end + end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:63 +class RBS::DefinitionBuilder::MethodBuilder::Methods::Sorter + include ::TSort + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:68 + def initialize(methods); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:66 + def methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:76 + def tsort_each_child(defn); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:72 + def tsort_each_node(&block); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:21 +class RBS::DefinitionError < ::RBS::BaseError; end + +# pkg:gem/rbs#lib/rbs/errors.rb:23 +module RBS::DetailedMessageable + # pkg:gem/rbs#lib/rbs/errors.rb:24 + def detailed_message(highlight: T.unsafe(nil), **_arg1); end +end + +# pkg:gem/rbs#lib/rbs/diff.rb:4 +class RBS::Diff + # pkg:gem/rbs#lib/rbs/diff.rb:5 + def initialize(type_name:, library_options:, after_path: T.unsafe(nil), before_path: T.unsafe(nil), detail: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/diff.rb:13 + def each_diff(&block); end + + private + + # pkg:gem/rbs#lib/rbs/diff.rb:96 + def build_builder(env); end + + # pkg:gem/rbs#lib/rbs/diff.rb:77 + def build_env(path); end + + # pkg:gem/rbs#lib/rbs/diff.rb:49 + def build_methods(path); end + + # pkg:gem/rbs#lib/rbs/diff.rb:122 + def constant_to_s(constant); end + + # pkg:gem/rbs#lib/rbs/diff.rb:100 + def definition_method_to_s(key, kind, definition_method); end + + # pkg:gem/rbs#lib/rbs/diff.rb:38 + def each_diff_constants(before_constant_children, after_constant_children); end + + # pkg:gem/rbs#lib/rbs/diff.rb:27 + def each_diff_methods(kind, before_methods, after_methods); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:419 +class RBS::DuplicatedDeclarationError < ::RBS::LoadingError + # pkg:gem/rbs#lib/rbs/errors.rb:423 + def initialize(name, *decls); end + + # pkg:gem/rbs#lib/rbs/errors.rb:421 + def decls; end + + # pkg:gem/rbs#lib/rbs/errors.rb:420 + def name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:292 +class RBS::DuplicatedInterfaceMethodDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:299 + def initialize(type:, method_name:, member:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:307 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:297 + def member; end + + # pkg:gem/rbs#lib/rbs/errors.rb:296 + def method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:311 + def qualified_method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:295 + def type; end + + # pkg:gem/rbs#lib/rbs/errors.rb:320 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:251 +class RBS::DuplicatedMethodDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:258 + def initialize(type:, method_name:, members:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:283 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:256 + def members; end + + # pkg:gem/rbs#lib/rbs/errors.rb:255 + def method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:287 + def other_locations; end + + # pkg:gem/rbs#lib/rbs/errors.rb:270 + def qualified_method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:254 + def type; end + + # pkg:gem/rbs#lib/rbs/errors.rb:279 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:4 +class RBS::Environment + # pkg:gem/rbs#lib/rbs/environment.rb:48 + def initialize; end + + # pkg:gem/rbs#lib/rbs/environment.rb:981 + def absolute_type(resolver, map, type, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:976 + def absolute_type_name(resolver, map, type_name, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:455 + def add_source(source); end + + # pkg:gem/rbs#lib/rbs/environment.rb:568 + def append_context(context, decl); end + + # pkg:gem/rbs#lib/rbs/environment.rb:992 + def buffers; end + + # pkg:gem/rbs#lib/rbs/environment.rb:117 + def class_alias?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:10 + def class_alias_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:101 + def class_decl?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:5 + def class_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:125 + def class_entry(type_name, normalized: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:97 + def constant_decl?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:8 + def constant_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:167 + def constant_entry(type_name, normalized: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:93 + def constant_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:14 + def declarations; end + + # pkg:gem/rbs#lib/rbs/environment.rb:470 + def each_rbs_source(&block); end + + # pkg:gem/rbs#lib/rbs/environment.rb:482 + def each_ruby_source(&block); end + + # pkg:gem/rbs#lib/rbs/environment.rb:9 + def global_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:277 + def insert_rbs_decl(decl, context:, namespace:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:374 + def insert_ruby_decl(decl, context:, namespace:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:987 + def inspect; end + + # pkg:gem/rbs#lib/rbs/environment.rb:6 + def interface_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:75 + def interface_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:109 + def module_alias?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:154 + def module_class_entry(type_name, normalized: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:105 + def module_decl?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:132 + def module_entry(type_name, normalized: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:83 + def module_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:269 + def normalize_module_name(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:273 + def normalize_module_name!(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:241 + def normalize_module_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:219 + def normalize_type_name(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:206 + def normalize_type_name!(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:187 + def normalize_type_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:139 + def normalized_class_entry(type_name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:163 + def normalized_module_class_entry(type_name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:150 + def normalized_module_entry(type_name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:236 + def normalized_type_name!(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:223 + def normalized_type_name?(type_name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:577 + def resolve_declaration(resolver, map, decl, context:, prefix:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:862 + def resolve_member(resolver, map, member, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:962 + def resolve_method_type(resolver, map, type, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:713 + def resolve_ruby_decl(resolver, decl, context:, prefix:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:790 + def resolve_ruby_member(resolver, member, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:500 + def resolve_signature(resolver, table, dirs, decls, only: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:522 + def resolve_type_names(only: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:970 + def resolve_type_params(resolver, map, params, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:562 + def resolver_context(*nesting); end + + # pkg:gem/rbs#lib/rbs/environment.rb:12 + def sources; end + + # pkg:gem/rbs#lib/rbs/environment.rb:7 + def type_alias_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:79 + def type_alias_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:87 + def type_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:996 + def unload(paths); end + + # pkg:gem/rbs#lib/rbs/environment.rb:494 + def validate_type_params; end + + private + + # pkg:gem/rbs#lib/rbs/environment.rb:59 + def initialize_copy(other); end + + class << self + # pkg:gem/rbs#lib/rbs/environment.rb:69 + def from_loader(loader); end + end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:33 +class RBS::Environment::ClassAliasEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment/class_entry.rb:5 +class RBS::Environment::ClassEntry + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:10 + def initialize(name); end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:15 + def <<(context_decl); end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:8 + def context_decls; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:21 + def each_decl(&block); end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:31 + def empty?; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:35 + def primary_decl; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:47 + def type_params; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:52 + def validate_type_params; end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:42 +class RBS::Environment::ConstantEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment.rb:45 +class RBS::Environment::GlobalEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment.rb:36 +class RBS::Environment::InterfaceEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment.rb:30 +class RBS::Environment::ModuleAliasEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment/module_entry.rb:5 +class RBS::Environment::ModuleEntry + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:10 + def initialize(name); end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:15 + def <<(context_decl); end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:8 + def context_decls; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:20 + def each_decl(&block); end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:30 + def empty?; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:34 + def primary_decl; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:43 + def self_types; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:38 + def type_params; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:49 + def validate_type_params; end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:18 +class RBS::Environment::SingleEntry + # pkg:gem/rbs#lib/rbs/environment.rb:23 + def initialize(name:, decl:, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:20 + def context; end + + # pkg:gem/rbs#lib/rbs/environment.rb:21 + def decl; end + + # pkg:gem/rbs#lib/rbs/environment.rb:19 + def name; end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:39 +class RBS::Environment::TypeAliasEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment/use_map.rb:5 +class RBS::Environment::UseMap + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:30 + def initialize(table:); end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:36 + def build_map(clause); end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:72 + def resolve(type_name); end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:53 + def resolve?(type_name); end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:28 + def use_dirs; end +end + +# pkg:gem/rbs#lib/rbs/environment/use_map.rb:6 +class RBS::Environment::UseMap::Table + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:9 + def initialize; end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:7 + def children; end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:14 + def compute_children; end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:7 + def known_types; end +end + +# pkg:gem/rbs#lib/rbs/environment_loader.rb:4 +class RBS::EnvironmentLoader + include ::RBS::FileFinder + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:40 + def initialize(core_root: T.unsafe(nil), repository: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:48 + def add(path: T.unsafe(nil), library: T.unsafe(nil), version: T.unsafe(nil), resolve_dependencies: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:74 + def add_collection(lockfile); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:20 + def core_root; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:24 + def dirs; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:125 + def each_dir; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:148 + def each_signature; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:98 + def has_library?(library:, version:); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:23 + def libs; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:106 + def load(env:); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:21 + def repository; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:59 + def resolve_dependencies(library:, version:); end + + class << self + # pkg:gem/rbs#lib/rbs/environment_loader.rb:28 + def gem_sig_path(name, version); end + end +end + +# pkg:gem/rbs#lib/rbs/environment_loader.rb:26 +RBS::EnvironmentLoader::DEFAULT_CORE_ROOT = T.let(T.unsafe(nil), Pathname) + +# pkg:gem/rbs#lib/rbs/environment_loader.rb:17 +class RBS::EnvironmentLoader::Library < ::Struct; end + +# pkg:gem/rbs#lib/rbs/environment_loader.rb:5 +class RBS::EnvironmentLoader::UnknownLibraryError < ::StandardError + # pkg:gem/rbs#lib/rbs/environment_loader.rb:8 + def initialize(lib:); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:6 + def library; end +end + +# pkg:gem/rbs#lib/rbs/environment_walker.rb:4 +class RBS::EnvironmentWalker + include ::TSort + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:11 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:16 + def builder; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:99 + def each_type_name(type, &block); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:105 + def each_type_node(type, &block); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:9 + def env; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:20 + def only_ancestors!(only = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:25 + def only_ancestors?; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:44 + def tsort_each_child(node, &block); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:31 + def tsort_each_node(&block); end +end + +# pkg:gem/rbs#lib/rbs/environment_walker.rb:5 +class RBS::EnvironmentWalker::InstanceNode < ::Struct + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def type_name; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def inspect; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def members; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/environment_walker.rb:6 +class RBS::EnvironmentWalker::SingletonNode < ::Struct + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def type_name; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def inspect; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def members; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/environment_walker.rb:7 +class RBS::EnvironmentWalker::TypeNameNode < ::Struct + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def type_name; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def inspect; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def members; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/factory.rb:4 +class RBS::Factory + # pkg:gem/rbs#lib/rbs/factory.rb:5 + def type_name(string); end +end + +# pkg:gem/rbs#lib/rbs/file_finder.rb:4 +module RBS::FileFinder + class << self + # pkg:gem/rbs#lib/rbs/file_finder.rb:7 + def each_file(path, skip_hidden:, immediate: T.unsafe(nil), &block); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:407 +class RBS::GenericParameterMismatchError < ::RBS::LoadingError + # pkg:gem/rbs#lib/rbs/errors.rb:411 + def initialize(name:, decl:, location: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/errors.rb:409 + def decl; end + + # pkg:gem/rbs#lib/rbs/errors.rb:408 + def name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:574 +class RBS::InconsistentClassModuleAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:579 + def initialize(entry); end + + # pkg:gem/rbs#lib/rbs/errors.rb:577 + def alias_entry; end + + # pkg:gem/rbs#lib/rbs/errors.rb:593 + def location; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:187 +class RBS::InheritModuleError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:192 + def initialize(super_decl); end + + # pkg:gem/rbs#lib/rbs/errors.rb:198 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:190 + def super_decl; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:202 + def check!(super_decl, env:); end + end +end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:4 +class RBS::InlineParser + class << self + # pkg:gem/rbs#lib/rbs/inline_parser.rb:45 + def parse(buffer, prism); end + end +end + +# pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:5 +class RBS::InlineParser::CommentAssociation + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:8 + def initialize(blocks); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:6 + def associated_blocks; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:6 + def blocks; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:84 + def each_enclosed_block(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:104 + def each_unassociated_block; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:6 + def end_line_map; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:47 + def leading_block(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:55 + def leading_block!(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:6 + def start_line_map; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:63 + def trailing_block(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:76 + def trailing_block!(node); end + + class << self + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:24 + def build(buffer, result); end + end +end + +# pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:29 +class RBS::InlineParser::CommentAssociation::Reference + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:32 + def initialize(block, association); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:37 + def associate!; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:42 + def associated?; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:30 + def block; end +end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:20 +module RBS::InlineParser::Diagnostic; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:38 +class RBS::InlineParser::Diagnostic::AnnotationSyntaxError < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:41 +class RBS::InlineParser::Diagnostic::AttributeNonSymbolName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:21 +class RBS::InlineParser::Diagnostic::Base + # pkg:gem/rbs#lib/rbs/inline_parser.rb:24 + def initialize(location, message); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:22 + def location; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:22 + def message; end +end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:42 +class RBS::InlineParser::Diagnostic::ClassModuleAliasDeclarationMissingTypeName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:39 +class RBS::InlineParser::Diagnostic::MixinMultipleArguments < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:40 +class RBS::InlineParser::Diagnostic::MixinNonConstantModule < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:31 +class RBS::InlineParser::Diagnostic::NonConstantClassName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:36 +class RBS::InlineParser::Diagnostic::NonConstantConstantDeclaration < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:32 +class RBS::InlineParser::Diagnostic::NonConstantModuleName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:33 +class RBS::InlineParser::Diagnostic::NonConstantSuperClassName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:30 +class RBS::InlineParser::Diagnostic::NotImplementedYet < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:35 +class RBS::InlineParser::Diagnostic::TopLevelAttributeDefinition < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:34 +class RBS::InlineParser::Diagnostic::TopLevelMethodDefinition < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:37 +class RBS::InlineParser::Diagnostic::UnusedInlineAnnotation < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:57 +class RBS::InlineParser::Parser < ::Prism::Visitor + include ::RBS::AST::Ruby::Helpers::ConstantHelper + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:63 + def initialize(result); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:69 + def buffer; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:58 + def comments; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:73 + def current_module; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:77 + def current_module!; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:81 + def diagnostics; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:472 + def insert_declaration(decl); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:58 + def module_nesting; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:315 + def parse_attribute_call(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:375 + def parse_constant_declaration(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:259 + def parse_mixin_call(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:508 + def parse_super_class(super_class_expr, inheritance_operator_loc); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:85 + def push_module_nesting(mod); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:480 + def report_unused_annotation(*annotations); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:495 + def report_unused_block(block); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:58 + def result; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:92 + def skip_node?(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:217 + def visit_call_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:103 + def visit_class_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:253 + def visit_constant_path_write_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:246 + def visit_constant_write_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:178 + def visit_def_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:156 + def visit_module_node(node); end +end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:5 +class RBS::InlineParser::Result + # pkg:gem/rbs#lib/rbs/inline_parser.rb:8 + def initialize(buffer, prism); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:6 + def buffer; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:6 + def declarations; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:6 + def diagnostics; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:6 + def prism_result; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:15 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:341 +class RBS::InstanceVariableDuplicationError < ::RBS::VariableDuplicationError + # pkg:gem/rbs#lib/rbs/errors.rb:342 + def kind; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:378 +class RBS::InvalidOverloadMethodError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:386 + def initialize(type_name:, method_name:, kind:, members:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:383 + def kind; end + + # pkg:gem/rbs#lib/rbs/errors.rb:402 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:384 + def members; end + + # pkg:gem/rbs#lib/rbs/errors.rb:382 + def method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:381 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:67 +class RBS::InvalidTypeApplicationError < ::RBS::DefinitionError + # pkg:gem/rbs#lib/rbs/errors.rb:74 + def initialize(type_name:, args:, params:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:69 + def args; end + + # pkg:gem/rbs#lib/rbs/errors.rb:72 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:70 + def params; end + + # pkg:gem/rbs#lib/rbs/errors.rb:68 + def type_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:71 + def type_params; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:83 + def check!(type_name:, args:, params:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:92 + def check2!(env:, type_name:, args:, location:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:432 +class RBS::InvalidVarianceAnnotationError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:439 + def initialize(type_name:, param:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:437 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:436 + def param; end + + # pkg:gem/rbs#lib/rbs/errors.rb:435 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:20 +class RBS::LoadingError < ::RBS::BaseError; end + +# pkg:gem/rbs#lib/rbs.rb:71 +class RBS::Location + # pkg:gem/rbs#lib/rbs.rb:71 + def initialize(_arg0, _arg1, _arg2); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:79 + def ==(other); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def [](_arg0); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _add_optional_child(_arg0, _arg1, _arg2); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _add_optional_no_child(_arg0); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _add_required_child(_arg0, _arg1, _arg2); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _end_pos; end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _optional_keys; end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _required_keys; end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _start_pos; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:110 + def add_optional_child(name, range); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:106 + def add_required_child(name, range); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:27 + def aref(_arg0); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def buffer; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:118 + def each_optional_key(&block); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:126 + def each_required_key(&block); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:55 + def end_column; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:51 + def end_line; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:63 + def end_loc; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:35 + def end_pos; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:5 + def inspect; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:134 + def key?(name); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:146 + def local_location; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:166 + def local_source; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:39 + def name; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:138 + def optional_key?(name); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:67 + def range; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:142 + def required_key?(name); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:71 + def source; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:47 + def start_column; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:43 + def start_line; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:59 + def start_loc; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:31 + def start_pos; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:86 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:75 + def to_s; end + + private + + # pkg:gem/rbs#lib/rbs.rb:71 + def initialize_copy(_arg0); end + + class << self + # pkg:gem/rbs#lib/rbs/location_aux.rb:16 + def new(buffer_ = T.unsafe(nil), start_pos_ = T.unsafe(nil), end_pos_ = T.unsafe(nil), buffer: T.unsafe(nil), start_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:102 + def to_string(location, default: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/location_aux.rb:29 +RBS::Location::WithChildren = RBS::Location + +# pkg:gem/rbs#lib/rbs/locator.rb:4 +class RBS::Locator + # pkg:gem/rbs#lib/rbs/locator.rb:7 + def initialize(buffer:, dirs:, decls:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:5 + def buffer; end + + # pkg:gem/rbs#lib/rbs/locator.rb:5 + def decls; end + + # pkg:gem/rbs#lib/rbs/locator.rb:5 + def dirs; end + + # pkg:gem/rbs#lib/rbs/locator.rb:13 + def find(line:, column:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:29 + def find2(line:, column:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:60 + def find_in_decl(pos, decl:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:42 + def find_in_directive(pos, dir, array); end + + # pkg:gem/rbs#lib/rbs/locator.rb:212 + def find_in_loc(pos, location:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:131 + def find_in_member(pos, member:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:154 + def find_in_method_type(pos, method_type:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:196 + def find_in_type(pos, type:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:172 + def find_in_type_param(pos, type_param:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:239 + def test_loc(pos, location:); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:4 +module RBS::MethodNameHelper + # pkg:gem/rbs#lib/rbs/errors.rb:5 + def method_name_string; end +end + +# pkg:gem/rbs#lib/rbs/method_type.rb:4 +class RBS::MethodType + # pkg:gem/rbs#lib/rbs/method_type.rb:10 + def initialize(type_params:, type:, block:, location:); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:17 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:7 + def block; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:86 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:59 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:127 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:123 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:8 + def location; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:65 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:74 + def map_type_bound(&block); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:33 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:24 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:100 + def to_s; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:6 + def type; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:119 + def type_param_names; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:5 + def type_params; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:50 + def update(type_params: T.unsafe(nil), type: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:131 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:468 +class RBS::MixinClassError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:474 + def initialize(type_name:, member:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:481 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:472 + def member; end + + # pkg:gem/rbs#lib/rbs/errors.rb:471 + def type_name; end + + private + + # pkg:gem/rbs#lib/rbs/errors.rb:502 + def member_name(member); end + + # pkg:gem/rbs#lib/rbs/errors.rb:513 + def mixin_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:485 + def check!(type_name:, env:, member:); end + end +end + +# pkg:gem/rbs#lib/rbs/namespace.rb:4 +class RBS::Namespace + # pkg:gem/rbs#lib/rbs/namespace.rb:7 + def initialize(path:, absolute:); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:20 + def +(other); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:59 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:47 + def absolute!; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:39 + def absolute?; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:28 + def append(component); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:101 + def ascend; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:55 + def empty?; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:63 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:65 + def hash; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:32 + def parent; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:5 + def path; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:51 + def relative!; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:43 + def relative?; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:69 + def split; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:75 + def to_s; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:84 + def to_type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/namespace.rb:12 + def empty; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:93 + def parse(string); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:16 + def root; end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:229 +class RBS::NoMixinFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:235 + def initialize(type_name:, member:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:242 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:233 + def member; end + + # pkg:gem/rbs#lib/rbs/errors.rb:232 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:246 + def check!(type_name, env:, member:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:210 +class RBS::NoSelfTypeFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:216 + def initialize(type_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:214 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:213 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:223 + def check!(self_type, env:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:167 +class RBS::NoSuperclassFoundError < ::RBS::DefinitionError + # pkg:gem/rbs#lib/rbs/errors.rb:171 + def initialize(type_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:169 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:168 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:178 + def check!(type_name, env:, location:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:148 +class RBS::NoTypeFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:154 + def initialize(type_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:152 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:151 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:161 + def check!(type_name, env:, location:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:545 +class RBS::NonregularTypeAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:551 + def initialize(diagnostic:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:548 + def diagnostic; end + + # pkg:gem/rbs#lib/rbs/errors.rb:549 + def location; end +end + +# pkg:gem/rbs#lib/rbs.rb:71 +class RBS::Parser + class << self + # pkg:gem/rbs#lib/rbs.rb:71 + def _lex(_arg0, _arg1); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _parse_inline_leading_annotation(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _parse_inline_trailing_annotation(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _parse_method_type(_arg0, _arg1, _arg2, _arg3, _arg4); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _parse_signature(_arg0, _arg1, _arg2); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _parse_type(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _parse_type_params(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:79 + def buffer(source); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:132 + def byte_range(char_range, content); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:70 + def lex(source); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:46 + def magic_comment(buf); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:122 + def parse_inline_leading_annotation(source, range, variables: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:127 + def parse_inline_trailing_annotation(source, range, variables: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:14 + def parse_method_type(source, range: T.unsafe(nil), byte_range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:20 + def parse_signature(source); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:8 + def parse_type(source, range: T.unsafe(nil), byte_range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil), void_allowed: T.unsafe(nil), self_allowed: T.unsafe(nil), classish_allowed: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:41 + def parse_type_params(source, module_type_params: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/parser_aux.rb:88 +RBS::Parser::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rbs#lib/rbs/parser/lex_result.rb:5 +class RBS::Parser::LexResult + # pkg:gem/rbs#lib/rbs/parser/lex_result.rb:9 + def initialize(buffer:, value:); end + + # pkg:gem/rbs#lib/rbs/parser/lex_result.rb:6 + def buffer; end + + # pkg:gem/rbs#lib/rbs/parser/lex_result.rb:7 + def value; end +end + +# pkg:gem/rbs#lib/rbs/parser/token.rb:5 +class RBS::Parser::Token + # pkg:gem/rbs#lib/rbs/parser/token.rb:9 + def initialize(type:, location:); end + + # pkg:gem/rbs#lib/rbs/parser/token.rb:18 + def comment?; end + + # pkg:gem/rbs#lib/rbs/parser/token.rb:7 + def location; end + + # pkg:gem/rbs#lib/rbs/parser/token.rb:6 + def type; end + + # pkg:gem/rbs#lib/rbs/parser/token.rb:14 + def value; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:51 +class RBS::ParsingError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:58 + def initialize(location, error_message, token_type); end + + # pkg:gem/rbs#lib/rbs/errors.rb:55 + def error_message; end + + # pkg:gem/rbs#lib/rbs/errors.rb:54 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:56 + def token_type; end +end + +# pkg:gem/rbs#lib/rbs/prototype/helpers.rb:4 +module RBS::Prototype; end + +# pkg:gem/rbs#lib/rbs/prototype/helpers.rb:5 +module RBS::Prototype::Helpers + private + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:153 + def any_node?(node, nodes: T.unsafe(nil), &block); end + + # NOTE: args_node may be a nil by a bug + # https://bugs.ruby-lang.org/issues/17495 + # + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:177 + def args_from_node(args_node); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:65 + def block_from_body(node); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:141 + def each_child(node, &block); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:145 + def each_node(nodes); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:165 + def keyword_hash?(node); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:10 + def parse_comments(string, include_trailing:); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:181 + def symbol_literal_node?(node); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:192 + def untyped; end +end + +# pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:5 +class RBS::Prototype::NodeUsage + include ::RBS::Prototype::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:10 + def initialize(node); end + + # pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:25 + def calculate(node, conditional:); end + + # pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:8 + def conditional_nodes; end + + # pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:17 + def each_conditional_node(&block); end +end + +# pkg:gem/rbs#lib/rbs/prototype/rb.rb:5 +class RBS::Prototype::RB + include ::RBS::Prototype::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:45 + def initialize; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:536 + def block_type(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:516 + def body_type(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:431 + def const_to_name(node, context:); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:408 + def const_to_name!(node, context: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:747 + def current_accessibility(decls, index = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:49 + def decls; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:787 + def find_def_index_by_name(decls, name); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:511 + def function_return_type_from_body(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:453 + def function_type_from_body(node, def_name); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:529 + def if_unless_type(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:783 + def is_accessibility?(decl); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:442 + def literal_to_symbol(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:550 + def literal_to_type(node); end + + # backward compatible + # + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:737 + def node_type(node, default: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:694 + def param_type(node, default: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:75 + def parse(string); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:739 + def private; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:82 + def process(node, decls:, comments:, context:); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:402 + def process_children(node, decls:, comments:, context:); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:743 + def public; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:674 + def range_element_type(types); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:757 + def remove_unnecessary_accessibility_methods!(decls); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:805 + def sort_members!(decls); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:42 + def source_decls; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:43 + def toplevel_members; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:663 + def types_to_union_type(types); end +end + +# pkg:gem/rbs#lib/rbs/prototype/rb.rb:8 +class RBS::Prototype::RB::Context < ::Struct + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:25 + def attribute_kind; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:33 + def enter_namespace(namespace); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:15 + def method_kind; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:37 + def update(module_function: T.unsafe(nil), singleton: T.unsafe(nil), in_def: T.unsafe(nil)); end + + class << self + # @implements Context + # + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:11 + def initial(namespace: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/prototype/rbi.rb:5 +class RBS::Prototype::RBI + include ::RBS::Prototype::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:12 + def initialize; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:545 + def call_node?(node, name:, receiver: T.unsafe(nil), args: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:549 + def const_to_name(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:71 + def current_module; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:75 + def current_module!; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:27 + def current_namespace; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:8 + def decls; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:585 + def each_arg(array, &block); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:599 + def each_child(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:93 + def join_comments(nodes, comments); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:10 + def last_sig; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:262 + def method_type(args_node, type_node, variables:, overloads:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:9 + def modules; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:23 + def nested_name(name); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:607 + def node_to_hash(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:18 + def parse(string); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:335 + def parse_params(args_node, args, method_type, variables:, overloads:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:87 + def pop_sig; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:537 + def proc_type?(type_node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:98 + def process(node, comments:, outer: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:33 + def push_class(name, super_class, comment:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:52 + def push_module(name, comment:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:79 + def push_sig(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:460 + def type_of(type_node, variables:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:473 + def type_of0(type_node, variables:); end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:5 +class RBS::Prototype::Runtime + include ::RBS::Prototype::Helpers + include ::RBS::Prototype::Runtime::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:79 + def initialize(patterns:, env:, merge:, todo: T.unsafe(nil), owners_included: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:662 + def block_from_ast_of(method); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:109 + def builder; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:117 + def decls; end + + # Generate/find outer module declarations + # This is broken down into another method to comply with `DRY` + # This generates/finds declarations in nested form & returns the last array of declarations + # + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:591 + def ensure_outer_module_declarations(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:73 + def env; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:496 + def generate_class(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:433 + def generate_constants(mod, decls); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:309 + def generate_methods(mod, module_name, members); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:573 + def generate_mixin(mod, decl, type_name, type_name_absolute); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:535 + def generate_module(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:481 + def generate_super_class(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:74 + def merge; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:248 + def merge_rbs(module_name, members, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:179 + def method_type(method); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:77 + def outline; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:77 + def outline=(_arg0); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:76 + def owners_included; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:113 + def parse(file); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:72 + def patterns; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:92 + def target?(const); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:296 + def target_method?(mod, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:75 + def todo; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:105 + def todo_object; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:645 + def type_args(type_name); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:653 + def type_params(mod); end + + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:423 + def can_alias?(mod, method); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:137 + def each_mixined_module(type_name, mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:146 + def each_mixined_module_one(type_name, mod); end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:213 +class RBS::Prototype::Runtime::DataGenerator < ::RBS::Prototype::Runtime::ValueObjectBase + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:229 + def add_decl_members(decl); end + + # def self.new: (untyped foo, untyped bar) -> instance + # | (foo: untyped, bar: untyped) -> instance + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:237 + def build_s_new; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:225 + def build_super_class; end + + class << self + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:214 + def generatable?(target); end + end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:6 +module RBS::Prototype::Runtime::Helpers + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:19 + def const_name(const); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:15 + def const_name!(const); end + + # Returns the exact name & not compactly declared name + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:10 + def only_name(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:37 + def to_type_name(name, full_name: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:53 + def untyped; end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/reflection.rb:6 +module RBS::Prototype::Runtime::Reflection + class << self + # pkg:gem/rbs#lib/rbs/prototype/runtime/reflection.rb:12 + def constants_of(mod, inherit = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/reflection.rb:7 + def object_class(value); end + end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:91 +class RBS::Prototype::Runtime::StructGenerator < ::RBS::Prototype::Runtime::ValueObjectBase + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:108 + def add_decl_members(decl); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:165 + def build_overload_for_keyword_arguments; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:151 + def build_overload_for_positional_arguments; end + + # def self.keyword_init?: () -> bool? + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:180 + def build_s_keyword_init_p; end + + # def self.new: (?untyped foo, ?untyped bar) -> instance + # | (?foo: untyped, ?bar: untyped) -> instance + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:117 + def build_s_new; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:104 + def build_super_class; end + + class << self + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:92 + def generatable?(target); end + end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:102 +RBS::Prototype::Runtime::StructGenerator::CAN_CALL_KEYWORD_INIT_P = T.let(T.unsafe(nil), TrueClass) + +# pkg:gem/rbs#lib/rbs/prototype/runtime.rb:10 +class RBS::Prototype::Runtime::Todo + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:11 + def initialize(builder:); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:50 + def skip_constant?(module_name:, name:); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:37 + def skip_instance_method?(module_name:, method:, accessibility:); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:15 + def skip_mixin?(type_name:, module_name:, mixin_class:); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:24 + def skip_singleton_method?(module_name:, method:, accessibility:); end + + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:57 + def mixin_decls(type_name); end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:8 +class RBS::Prototype::Runtime::ValueObjectBase + include ::RBS::Prototype::Runtime::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:11 + def initialize(target_class); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:15 + def build_decl; end + + private + + # attr_accessor foo: untyped + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:74 + def build_member_accessors(ast_members_class); end + + # def self.members: () -> [ :foo, :bar ] + # def members: () -> [ :foo, :bar ] + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:35 + def build_s_members; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:448 +class RBS::RecursiveAliasDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:454 + def initialize(type:, defs:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:452 + def defs; end + + # pkg:gem/rbs#lib/rbs/errors.rb:461 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:451 + def type; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:110 +class RBS::RecursiveAncestorError < ::RBS::DefinitionError + # pkg:gem/rbs#lib/rbs/errors.rb:114 + def initialize(ancestors:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:111 + def ancestors; end + + # pkg:gem/rbs#lib/rbs/errors.rb:112 + def location; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:134 + def check!(self_ancestor, ancestors:, location:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:527 +class RBS::RecursiveTypeAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:533 + def initialize(alias_names:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:530 + def alias_names; end + + # pkg:gem/rbs#lib/rbs/errors.rb:531 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:540 + def name; end +end + +# pkg:gem/rbs#lib/rbs/repository.rb:4 +class RBS::Repository + # pkg:gem/rbs#lib/rbs/repository.rb:74 + def initialize(no_stdlib: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/repository.rb:98 + def add(dir); end + + # pkg:gem/rbs#lib/rbs/repository.rb:71 + def dirs; end + + # pkg:gem/rbs#lib/rbs/repository.rb:72 + def gems; end + + # pkg:gem/rbs#lib/rbs/repository.rb:108 + def lookup(gem, version); end + + # pkg:gem/rbs#lib/rbs/repository.rb:113 + def lookup_path(gem, version); end + + class << self + # pkg:gem/rbs#lib/rbs/repository.rb:83 + def default; end + + # pkg:gem/rbs#lib/rbs/repository.rb:87 + def find_best_version(version, candidates); end + end +end + +# pkg:gem/rbs#lib/rbs/repository.rb:5 +RBS::Repository::DEFAULT_STDLIB_ROOT = T.let(T.unsafe(nil), Pathname) + +# pkg:gem/rbs#lib/rbs/repository.rb:7 +class RBS::Repository::GemRBS + # pkg:gem/rbs#lib/rbs/repository.rb:11 + def initialize(name:); end + + # pkg:gem/rbs#lib/rbs/repository.rb:64 + def empty?; end + + # pkg:gem/rbs#lib/rbs/repository.rb:59 + def find_best_version(version); end + + # pkg:gem/rbs#lib/rbs/repository.rb:54 + def latest_version; end + + # pkg:gem/rbs#lib/rbs/repository.rb:22 + def load!; end + + # pkg:gem/rbs#lib/rbs/repository.rb:8 + def name; end + + # pkg:gem/rbs#lib/rbs/repository.rb:49 + def oldest_version; end + + # pkg:gem/rbs#lib/rbs/repository.rb:9 + def paths; end + + # pkg:gem/rbs#lib/rbs/repository.rb:45 + def version_names; end + + # pkg:gem/rbs#lib/rbs/repository.rb:17 + def versions; end +end + +# pkg:gem/rbs#lib/rbs/repository.rb:69 +class RBS::Repository::VersionPath < ::Struct + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def gem; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def gem=(_); end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def path; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def path=(_); end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def version; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def version=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def inspect; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def members; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:4 +module RBS::Resolver; end + +# pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:5 +class RBS::Resolver::ConstantResolver + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:88 + def initialize(builder:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:85 + def builder; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:86 + def child_constants_cache; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:112 + def children(module_name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:100 + def constants(context); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:178 + def constants_from_ancestors(module_name, constants:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:163 + def constants_from_context(context, constants:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:201 + def constants_itself(context, constants:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:86 + def context_constants_cache; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:138 + def load_child_constants(name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:122 + def load_context_constants(context); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:95 + def resolve(name, context:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:108 + def resolve_child(module_name, name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:85 + def table; end +end + +# pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:6 +class RBS::Resolver::ConstantResolver::Table + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:10 + def initialize(environment); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:63 + def children(name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:7 + def children_table; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:67 + def constant(name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:80 + def constant_of_constant(name, entry); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:71 + def constant_of_module(name, entry); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:8 + def constants_table; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:7 + def toplevel; end +end + +# pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:5 +class RBS::Resolver::TypeNameResolver + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:10 + def initialize(all_names, aliases); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:82 + def aliased_name?(type_name); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:8 + def aliases; end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:6 + def all_names; end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:7 + def cache; end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:76 + def has_type_name?(full_name); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:121 + def normalize_namespace(type_name, rhs, context, visited); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:39 + def resolve(type_name, context:); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:104 + def resolve_head_namespace(head, context); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:62 + def resolve_namespace(type_name, context:); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:136 + def resolve_namespace0(type_name, context, visited); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:88 + def resolve_type_name(type_name, context); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:32 + def try_cache(query); end + + class << self + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:16 + def build(env); end + end +end + +# pkg:gem/rbs#lib/rbs/source.rb:4 +module RBS::Source; end + +# pkg:gem/rbs#lib/rbs/source.rb:5 +class RBS::Source::RBS + # pkg:gem/rbs#lib/rbs/source.rb:8 + def initialize(buffer, directives, decls); end + + # pkg:gem/rbs#lib/rbs/source.rb:6 + def buffer; end + + # pkg:gem/rbs#lib/rbs/source.rb:6 + def declarations; end + + # pkg:gem/rbs#lib/rbs/source.rb:6 + def directives; end + + # pkg:gem/rbs#lib/rbs/source.rb:25 + def each_declaration_type_name(names, decl, &block); end + + # pkg:gem/rbs#lib/rbs/source.rb:14 + def each_type_name(&block); end +end + +# pkg:gem/rbs#lib/rbs/source.rb:52 +class RBS::Source::Ruby + # pkg:gem/rbs#lib/rbs/source.rb:58 + def initialize(buffer, prism, declarations, diagnostics); end + + # pkg:gem/rbs#lib/rbs/source.rb:53 + def buffer; end + + # pkg:gem/rbs#lib/rbs/source.rb:55 + def declarations; end + + # pkg:gem/rbs#lib/rbs/source.rb:56 + def diagnostics; end + + # pkg:gem/rbs#lib/rbs/source.rb:76 + def each_declaration_type_name(names, decl, &block); end + + # pkg:gem/rbs#lib/rbs/source.rb:65 + def each_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/source.rb:54 + def prism_result; end +end + +# pkg:gem/rbs#lib/rbs/substitution.rb:4 +class RBS::Substitution + # pkg:gem/rbs#lib/rbs/substitution.rb:12 + def initialize; end + + # pkg:gem/rbs#lib/rbs/substitution.rb:66 + def +(other); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:53 + def [](ty); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:16 + def add(from:, to:); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:37 + def apply(ty); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:8 + def empty?; end + + # pkg:gem/rbs#lib/rbs/substitution.rb:6 + def instance_type; end + + # pkg:gem/rbs#lib/rbs/substitution.rb:6 + def instance_type=(_arg0); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:5 + def mapping; end + + # pkg:gem/rbs#lib/rbs/substitution.rb:55 + def without(*vars); end + + class << self + # pkg:gem/rbs#lib/rbs/substitution.rb:20 + def build(variables, types, instance_type: T.unsafe(nil), &block); end + end +end + +# pkg:gem/rbs#lib/rbs/subtractor.rb:4 +class RBS::Subtractor + # pkg:gem/rbs#lib/rbs/subtractor.rb:5 + def initialize(minuend, subtrahend); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:10 + def call(minuend = T.unsafe(nil), context: T.unsafe(nil)); end + + private + + # pkg:gem/rbs#lib/rbs/subtractor.rb:180 + def absolute_typename(name, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:163 + def access_modifier?(decl); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:120 + def cvar_exist?(owner, name); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:129 + def each_member(owner, &block); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:48 + def filter_members(decl, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:151 + def filter_redundant_access_modifiers(decls); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:106 + def ivar_exist?(owner, name, kind); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:60 + def member_exist?(owner, member, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:89 + def method_exist?(owner, method_name, kind); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:140 + def mixin_exist?(owner, mixin, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:189 + def typename_candidates(name, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:167 + def update_decl(decl, members:); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:367 +class RBS::SuperclassMismatchError < ::RBS::DefinitionError + # pkg:gem/rbs#lib/rbs/errors.rb:371 + def initialize(name:, entry:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:369 + def entry; end + + # pkg:gem/rbs#lib/rbs/errors.rb:368 + def name; end +end + +# pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:4 +class RBS::TypeAliasDependency + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:14 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:27 + def build_dependencies; end + + # Check if an alias type definition is circular & prohibited + # + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:19 + def circular_definition?(alias_name); end + + # A hash which stores the transitive closure + # of the directed graph + # + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:12 + def dependencies; end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:57 + def dependencies_of(name); end + + # Direct dependencies corresponds to a directed graph + # with vertices as types and directions based on assignment of types + # + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:9 + def direct_dependencies; end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:52 + def direct_dependencies_of(name); end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:5 + def env; end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:43 + def transitive_closure; end + + private + + # Recursive function to construct transitive closure + # + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:81 + def dependency(start, vertex, nested = T.unsafe(nil)); end + + # Constructs directed graph recursively + # + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:65 + def direct_dependency(type, result = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:4 +class RBS::TypeAliasRegularity + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:16 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:61 + def build_alias_type(name); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:14 + def builder; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:69 + def compatible_args?(args1, args2); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:14 + def diagnostics; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:110 + def each_alias_type(type, &block); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:83 + def each_mutual_alias_defs(&block); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:14 + def env; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:79 + def nonregular?(type_name); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:22 + def validate; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:39 + def validate_alias_type(alias_type, names, types); end + + class << self + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:120 + def validate(env:); end + end +end + +# pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:5 +class RBS::TypeAliasRegularity::Diagnostic + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:8 + def initialize(type_name:, nonregular_type:); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:6 + def nonregular_type; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:6 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/type_name.rb:4 +class RBS::TypeName + # pkg:gem/rbs#lib/rbs/type_name.rb:9 + def initialize(namespace:, name:); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:79 + def +(other); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:25 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:55 + def absolute!; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:59 + def absolute?; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:51 + def alias?; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:47 + def class?; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:29 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:31 + def hash; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:67 + def interface?; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:7 + def kind; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:5 + def namespace; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:63 + def relative!; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:75 + def split; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:39 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:43 + def to_namespace; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:35 + def to_s; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:71 + def with_prefix(namespace); end + + class << self + # pkg:gem/rbs#lib/rbs/type_name.rb:90 + def parse(string); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:614 +class RBS::TypeParamDefaultReferenceError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:620 + def initialize(type_param, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:618 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:617 + def type_param; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:626 + def check!(type_params); end + end +end + +# pkg:gem/rbs#lib/rbs/types.rb:4 +module RBS::Types; end + +# pkg:gem/rbs#lib/rbs/types.rb:410 +class RBS::Types::Alias + include ::RBS::Types::Application + + # pkg:gem/rbs#lib/rbs/types.rb:415 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:411 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:439 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:431 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:425 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:421 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:202 +module RBS::Types::Application + # pkg:gem/rbs#lib/rbs/types.rb:206 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:204 + def args; end + + # pkg:gem/rbs#lib/rbs/types.rb:232 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:210 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:216 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:244 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:240 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:212 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:203 + def name; end + + # pkg:gem/rbs#lib/rbs/types.rb:224 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:248 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:41 +module RBS::Types::Bases; end + +# pkg:gem/rbs#lib/rbs/types.rb:109 +class RBS::Types::Bases::Any < ::RBS::Types::Bases::Base + # pkg:gem/rbs#lib/rbs/types.rb:110 + def initialize(location:, todo: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:117 + def to_s(level = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:42 +class RBS::Types::Bases::Base + include ::RBS::Types::NoFreeVariables + include ::RBS::Types::NoSubst + include ::RBS::Types::EmptyEachType + include ::RBS::Types::NoTypeName + + # pkg:gem/rbs#lib/rbs/types.rb:45 + def initialize(location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:49 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:57 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:98 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:94 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:53 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:43 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:64 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:69 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:102 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:107 +class RBS::Types::Bases::Bool < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:123 +class RBS::Types::Bases::Bottom < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:130 +class RBS::Types::Bases::Class < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:125 +class RBS::Types::Bases::Instance < ::RBS::Types::Bases::Base + # pkg:gem/rbs#lib/rbs/types.rb:126 + def sub(s); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:121 +class RBS::Types::Bases::Nil < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:124 +class RBS::Types::Bases::Self < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:122 +class RBS::Types::Bases::Top < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:108 +class RBS::Types::Bases::Void < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:1348 +class RBS::Types::Block + # pkg:gem/rbs#lib/rbs/types.rb:1354 + def initialize(type:, required:, location: T.unsafe(nil), self_type: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1361 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1352 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:1386 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1350 + def required; end + + # pkg:gem/rbs#lib/rbs/types.rb:1351 + def self_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1376 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:1368 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1349 + def type; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:366 +class RBS::Types::ClassInstance + include ::RBS::Types::Application + + # pkg:gem/rbs#lib/rbs/types.rb:371 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:367 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:397 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:389 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:381 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:377 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:260 +class RBS::Types::ClassSingleton + include ::RBS::Types::Application + + # pkg:gem/rbs#lib/rbs/types.rb:265 + def initialize(name:, location:, args: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:271 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:275 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:277 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:261 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:309 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:301 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:281 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:289 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:293 + def to_s(level = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:23 +module RBS::Types::EmptyEachType + # pkg:gem/rbs#lib/rbs/types.rb:24 + def each_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:32 + def map_type(&block); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:915 +class RBS::Types::Function + # pkg:gem/rbs#lib/rbs/types.rb:971 + def initialize(required_positionals:, optional_positionals:, rest_positionals:, trailing_positionals:, required_keywords:, optional_keywords:, rest_keywords:, return_type:); end + + # pkg:gem/rbs#lib/rbs/types.rb:982 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1053 + def amap(array, &block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1192 + def drop_head; end + + # pkg:gem/rbs#lib/rbs/types.rb:1209 + def drop_tail; end + + # pkg:gem/rbs#lib/rbs/types.rb:1090 + def each_param(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1075 + def each_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1163 + def empty?; end + + # pkg:gem/rbs#lib/rbs/types.rb:994 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1008 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1234 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1222 + def has_keyword?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1230 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:996 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:1061 + def hmapv(hash, &block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1036 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1069 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:967 + def optional_keywords; end + + # pkg:gem/rbs#lib/rbs/types.rb:963 + def optional_positionals; end + + # pkg:gem/rbs#lib/rbs/types.rb:1173 + def param_to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:966 + def required_keywords; end + + # pkg:gem/rbs#lib/rbs/types.rb:962 + def required_positionals; end + + # pkg:gem/rbs#lib/rbs/types.rb:968 + def rest_keywords; end + + # pkg:gem/rbs#lib/rbs/types.rb:964 + def rest_positionals; end + + # pkg:gem/rbs#lib/rbs/types.rb:1188 + def return_to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:969 + def return_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1117 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:1104 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:965 + def trailing_positionals; end + + # pkg:gem/rbs#lib/rbs/types.rb:1149 + def update(required_positionals: T.unsafe(nil), optional_positionals: T.unsafe(nil), rest_positionals: T.unsafe(nil), trailing_positionals: T.unsafe(nil), required_keywords: T.unsafe(nil), optional_keywords: T.unsafe(nil), rest_keywords: T.unsafe(nil), return_type: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1238 + def with_nonreturn_void?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1136 + def with_return_type(type); end + + class << self + # pkg:gem/rbs#lib/rbs/types.rb:1123 + def empty(return_type); end + end +end + +# pkg:gem/rbs#lib/rbs/types.rb:916 +class RBS::Types::Function::Param + # pkg:gem/rbs#lib/rbs/types.rb:921 + def initialize(type:, name:, location: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:927 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:931 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:933 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:919 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:937 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:918 + def name; end + + # pkg:gem/rbs#lib/rbs/types.rb:945 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:949 + def to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:917 + def type; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:322 +class RBS::Types::Interface + include ::RBS::Types::Application + + # pkg:gem/rbs#lib/rbs/types.rb:327 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:323 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:353 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:345 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:337 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:333 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:832 +class RBS::Types::Intersection + # pkg:gem/rbs#lib/rbs/types.rb:836 + def initialize(types:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:841 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:879 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:845 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:851 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:906 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:902 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:847 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:834 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:887 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:895 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:863 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:859 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:870 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:833 + def types; end + + # pkg:gem/rbs#lib/rbs/types.rb:910 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1530 +class RBS::Types::Literal + include ::RBS::Types::NoFreeVariables + include ::RBS::Types::NoSubst + include ::RBS::Types::EmptyEachType + include ::RBS::Types::NoTypeName + + # pkg:gem/rbs#lib/rbs/types.rb:1534 + def initialize(literal:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:1539 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1543 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1566 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1562 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1545 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:1531 + def literal; end + + # pkg:gem/rbs#lib/rbs/types.rb:1532 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:1554 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1558 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1570 + def with_nonreturn_void?; end + + class << self + # pkg:gem/rbs#lib/rbs/types.rb:1590 + def unescape_string(string, is_double_quote); end + end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1574 +RBS::Types::Literal::TABLE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rbs#lib/rbs/types.rb:5 +module RBS::Types::NoFreeVariables + # pkg:gem/rbs#lib/rbs/types.rb:6 + def free_variables(set = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:11 +module RBS::Types::NoSubst + # pkg:gem/rbs#lib/rbs/types.rb:12 + def sub(s); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:17 +module RBS::Types::NoTypeName + # pkg:gem/rbs#lib/rbs/types.rb:18 + def map_type_name(&_arg0); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:655 +class RBS::Types::Optional + # pkg:gem/rbs#lib/rbs/types.rb:659 + def initialize(type:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:664 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:702 + def each_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:668 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:674 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:732 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:728 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:670 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:657 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:717 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:710 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:682 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:678 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:688 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:656 + def type; end + + # pkg:gem/rbs#lib/rbs/types.rb:736 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1407 +class RBS::Types::Proc + # pkg:gem/rbs#lib/rbs/types.rb:1413 + def initialize(location:, type:, block:, self_type: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1420 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1409 + def block; end + + # pkg:gem/rbs#lib/rbs/types.rb:1474 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1424 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1430 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1513 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1509 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1426 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:1411 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:1496 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1487 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1410 + def self_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1447 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:1437 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1458 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1408 + def type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1517 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:537 +class RBS::Types::Record + # pkg:gem/rbs#lib/rbs/types.rb:541 + def initialize(location:, all_fields: T.unsafe(nil), fields: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:565 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:538 + def all_fields; end + + # pkg:gem/rbs#lib/rbs/types.rb:615 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:569 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:538 + def fields; end + + # pkg:gem/rbs#lib/rbs/types.rb:575 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:646 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:642 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:571 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:539 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:631 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:624 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:538 + def optional_fields; end + + # pkg:gem/rbs#lib/rbs/types.rb:590 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:586 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:599 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:650 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1395 +module RBS::Types::SelfTypeBindingHelper + private + + # pkg:gem/rbs#lib/rbs/types.rb:1398 + def self_type_binding_to_s(t); end + + class << self + # pkg:gem/rbs#lib/rbs/types.rb:1398 + def self_type_binding_to_s(t); end + end +end + +# pkg:gem/rbs#lib/rbs/types.rb:452 +class RBS::Types::Tuple + # pkg:gem/rbs#lib/rbs/types.rb:456 + def initialize(types:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:461 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:498 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:465 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:471 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:528 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:524 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:467 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:454 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:513 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:506 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:483 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:479 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:490 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:453 + def types; end + + # pkg:gem/rbs#lib/rbs/types.rb:532 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:741 +class RBS::Types::Union + # pkg:gem/rbs#lib/rbs/types.rb:745 + def initialize(types:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:750 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:796 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:754 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:760 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:823 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:819 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:756 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:743 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:804 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:812 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:772 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:768 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:779 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:742 + def types; end + + # pkg:gem/rbs#lib/rbs/types.rb:827 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1251 +class RBS::Types::UntypedFunction + # pkg:gem/rbs#lib/rbs/types.rb:1254 + def initialize(return_type:); end + + # pkg:gem/rbs#lib/rbs/types.rb:1336 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1284 + def each_param(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1276 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1312 + def empty?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1340 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1258 + def free_variables(acc = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1320 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1316 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1342 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:1262 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1270 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1328 + def param_to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:1332 + def return_to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:1252 + def return_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1298 + def sub(subst); end + + # pkg:gem/rbs#lib/rbs/types.rb:1292 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1308 + def update(return_type: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1324 + def with_nonreturn_void?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1304 + def with_return_type(ty); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:133 +class RBS::Types::Variable + include ::RBS::Types::NoTypeName + include ::RBS::Types::EmptyEachType + + # pkg:gem/rbs#lib/rbs/types.rb:139 + def initialize(name:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:144 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:148 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:154 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:193 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:189 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:150 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:135 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:134 + def name; end + + # pkg:gem/rbs#lib/rbs/types.rb:164 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:160 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:183 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:197 + def with_nonreturn_void?; end + + class << self + # pkg:gem/rbs#lib/rbs/types.rb:168 + def build(v); end + + # pkg:gem/rbs#lib/rbs/types.rb:178 + def fresh(v = T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:349 +class RBS::UnknownMethodAliasError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:357 + def initialize(type_name:, original_name:, aliased_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:354 + def aliased_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:355 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:353 + def original_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:352 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/version.rb:4 +RBS::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/rbs#lib/rbs/validator.rb:4 +class RBS::Validator + # pkg:gem/rbs#lib/rbs/validator.rb:9 + def initialize(env:, resolver: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/validator.rb:15 + def absolute_type(type, context:, &block); end + + # pkg:gem/rbs#lib/rbs/validator.rb:7 + def definition_builder; end + + # pkg:gem/rbs#lib/rbs/validator.rb:5 + def env; end + + # pkg:gem/rbs#lib/rbs/validator.rb:6 + def resolver; end + + # pkg:gem/rbs#lib/rbs/validator.rb:178 + def type_alias_dependency; end + + # pkg:gem/rbs#lib/rbs/validator.rb:182 + def type_alias_regularity; end + + # pkg:gem/rbs#lib/rbs/validator.rb:158 + def validate_class_alias(entry:); end + + # pkg:gem/rbs#lib/rbs/validator.rb:104 + def validate_method_definition(method_def, type_name:); end + + # Validates presence of the relative type, and application arity match. + # + # pkg:gem/rbs#lib/rbs/validator.rb:24 + def validate_type(type, context:); end + + # pkg:gem/rbs#lib/rbs/validator.rb:63 + def validate_type_alias(entry:); end + + # pkg:gem/rbs#lib/rbs/validator.rb:120 + def validate_type_params(params, type_name:, location:, method_name: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/validator.rb:154 + def validate_variable(var); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:325 +class RBS::VariableDuplicationError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:332 + def initialize(type_name:, variable_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:330 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:328 + def type_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:329 + def variable_name; end +end + +# pkg:gem/rbs#lib/rbs/variance_calculator.rb:4 +class RBS::VarianceCalculator + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:78 + def initialize(builder:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:76 + def builder; end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:82 + def env; end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:169 + def function(type, result:, context:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:98 + def in_inherit(name:, args:, variables:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:86 + def in_method_type(method_type:, variables:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:110 + def in_type_alias(name:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:176 + def negate(variance); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:121 + def type(type, result:, context:); end +end + +# pkg:gem/rbs#lib/rbs/variance_calculator.rb:5 +class RBS::VarianceCalculator::Result + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:8 + def initialize(variables:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:45 + def compatible?(var, with_annotation:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:24 + def contravariant(x); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:15 + def covariant(x); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:37 + def each(&block); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:41 + def include?(name); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:60 + def incompatible?(params); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:33 + def invariant(x); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:6 + def result; end +end + +# pkg:gem/rbs#lib/rbs/vendorer.rb:4 +class RBS::Vendorer + # pkg:gem/rbs#lib/rbs/vendorer.rb:8 + def initialize(vendor_dir:, loader:); end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:21 + def clean!; end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:28 + def copy!; end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:13 + def ensure_dir; end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:6 + def loader; end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:5 + def vendor_dir; end +end + +# pkg:gem/rbs#lib/rbs/writer.rb:4 +class RBS::Writer + # pkg:gem/rbs#lib/rbs/writer.rb:8 + def initialize(out:); end + + # pkg:gem/rbs#lib/rbs/writer.rb:366 + def attribute(kind, attr); end + + # pkg:gem/rbs#lib/rbs/writer.rb:42 + def format_annotation(annotation); end + + # pkg:gem/rbs#lib/rbs/writer.rb:23 + def indent(size = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/writer.rb:6 + def indentation; end + + # pkg:gem/rbs#lib/rbs/writer.rb:293 + def method_name(name); end + + # pkg:gem/rbs#lib/rbs/writer.rb:219 + def name_and_args(name, args); end + + # pkg:gem/rbs#lib/rbs/writer.rb:207 + def name_and_params(name, params); end + + # pkg:gem/rbs#lib/rbs/writer.rb:5 + def out; end + + # pkg:gem/rbs#lib/rbs/writer.rb:30 + def prefix; end + + # pkg:gem/rbs#lib/rbs/writer.rb:18 + def preserve!(preserve: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/writer.rb:14 + def preserve?; end + + # pkg:gem/rbs#lib/rbs/writer.rb:396 + def preserve_empty_line(prev, decl); end + + # pkg:gem/rbs#lib/rbs/writer.rb:229 + def put_lines(lines, leading_spaces:); end + + # pkg:gem/rbs#lib/rbs/writer.rb:34 + def puts(string = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/writer.rb:79 + def write(contents); end + + # pkg:gem/rbs#lib/rbs/writer.rb:60 + def write_annotation(annotations); end + + # pkg:gem/rbs#lib/rbs/writer.rb:66 + def write_comment(comment); end + + # pkg:gem/rbs#lib/rbs/writer.rb:119 + def write_decl(decl); end + + # pkg:gem/rbs#lib/rbs/writer.rb:314 + def write_def(member); end + + # pkg:gem/rbs#lib/rbs/writer.rb:306 + def write_loc_source(located); end + + # pkg:gem/rbs#lib/rbs/writer.rb:239 + def write_member(member); end + + # pkg:gem/rbs#lib/rbs/writer.rb:102 + def write_use_directive(dir); end +end diff --git a/sorbet/rbi/gems/rdoc@6.14.0.rbi b/sorbet/rbi/gems/rdoc@6.14.0.rbi new file mode 100644 index 000000000..38ceb97a4 --- /dev/null +++ b/sorbet/rbi/gems/rdoc@6.14.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rdoc` gem. +# Please instead update this file by running `bin/tapioca gem rdoc`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/regexp_parser@2.12.0.rbi b/sorbet/rbi/gems/regexp_parser@2.12.0.rbi new file mode 100644 index 000000000..96bef9a63 --- /dev/null +++ b/sorbet/rbi/gems/regexp_parser@2.12.0.rbi @@ -0,0 +1,3398 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `regexp_parser` gem. +# Please instead update this file by running `bin/tapioca gem regexp_parser`. + + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:3 +module Regexp::Expression; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/alternation.rb:7 +class Regexp::Expression::Alternation < ::Regexp::Expression::SequenceOperation + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/alternation.rb:10 + def alternatives; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:11 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:132 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/alternation.rb:8 +Regexp::Expression::Alternation::OPERAND = Regexp::Expression::Alternative + +# A sequence of expressions, used by Alternation as one of its alternatives. +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/alternation.rb:5 +class Regexp::Expression::Alternative < ::Regexp::Expression::Sequence + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:12 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:4 +module Regexp::Expression::Anchor; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:20 +Regexp::Expression::Anchor::BOL = Regexp::Expression::Anchor::BeginningOfLine + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:22 +Regexp::Expression::Anchor::BOS = Regexp::Expression::Anchor::BeginningOfString + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:5 +class Regexp::Expression::Anchor::Base < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:149 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:7 +class Regexp::Expression::Anchor::BeginningOfLine < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:13 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:10 +class Regexp::Expression::Anchor::BeginningOfString < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:14 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:21 +Regexp::Expression::Anchor::EOL = Regexp::Expression::Anchor::EndOfLine + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:23 +Regexp::Expression::Anchor::EOS = Regexp::Expression::Anchor::EndOfString + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:24 +Regexp::Expression::Anchor::EOSobEOL = Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:8 +class Regexp::Expression::Anchor::EndOfLine < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:15 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:11 +class Regexp::Expression::Anchor::EndOfString < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:16 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:13 +class Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:17 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:18 +class Regexp::Expression::Anchor::MatchStart < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:18 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:16 +class Regexp::Expression::Anchor::NonWordBoundary < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:19 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:15 + def negative?; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:15 +class Regexp::Expression::Anchor::WordBoundary < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:20 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:66 +module Regexp::Expression::Assertion; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:67 +class Regexp::Expression::Assertion::Base < ::Regexp::Expression::Group::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:149 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:69 +class Regexp::Expression::Assertion::Lookahead < ::Regexp::Expression::Assertion::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:21 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:72 +class Regexp::Expression::Assertion::Lookbehind < ::Regexp::Expression::Assertion::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:22 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:70 +class Regexp::Expression::Assertion::NegativeLookahead < ::Regexp::Expression::Assertion::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:23 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:16 + def negative?; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:73 +class Regexp::Expression::Assertion::NegativeLookbehind < ::Regexp::Expression::Assertion::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:24 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:17 + def negative?; end +end + +# alias for symmetry between token symbol and Expression class name +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:57 +Regexp::Expression::Backref = Regexp::Expression::Backreference + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:4 +module Regexp::Expression::Backreference; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:5 +class Regexp::Expression::Backreference::Base < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:157 + def match_length; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:142 + def referential?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:17 +class Regexp::Expression::Backreference::Name < ::Regexp::Expression::Backreference::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:21 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:25 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:18 + def name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:19 + def reference; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:33 +class Regexp::Expression::Backreference::NameCall < ::Regexp::Expression::Backreference::Name + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:26 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:45 +class Regexp::Expression::Backreference::NameRecursionLevel < ::Regexp::Expression::Backreference::Name + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:48 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:46 + def recursion_level; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:7 +class Regexp::Expression::Backreference::Number < ::Regexp::Expression::Backreference::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:11 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:27 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:8 + def number; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:9 + def reference; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:32 +class Regexp::Expression::Backreference::NumberCall < ::Regexp::Expression::Backreference::Number + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:29 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:34 +class Regexp::Expression::Backreference::NumberCallRelative < ::Regexp::Expression::Backreference::NumberRelative + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:30 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:36 +class Regexp::Expression::Backreference::NumberRecursionLevel < ::Regexp::Expression::Backreference::NumberRelative + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:39 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:37 + def recursion_level; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:27 +class Regexp::Expression::Backreference::NumberRelative < ::Regexp::Expression::Backreference::Number + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:28 + def effective_number; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:28 + def effective_number=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:28 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:29 + def reference; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:4 +class Regexp::Expression::Base + include ::Regexp::Expression::Shared + include ::Regexp::Expression::ReferencedExpressions + extend ::Regexp::Expression::Shared::ClassMethods + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:7 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match.rb:13 + def =~(string, offset = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:30 + def a?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:27 + def ascii_classes?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:76 + def attributes; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:10 + def case_insensitive?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def conditional_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def conditional_level=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def custom_to_s_handling; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def custom_to_s_handling=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:25 + def d?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:22 + def default_classes?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:20 + def extended?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:16 + def free_spacing?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:49 + def greedy?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:13 + def i?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:14 + def ignore_case?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:56 + def lazy?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def level=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:8 + def m?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match.rb:10 + def match(string, offset = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match.rb:5 + def match?(string); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match.rb:8 + def matches?(string); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:5 + def multiline?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def nesting_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def options; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def options=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def parent; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def parent=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:58 + def possessive?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def pre_quantifier_decorations; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def pre_quantifier_decorations=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def quantifier; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:19 + def quantify(*args); end + + # Deprecated. Prefer `#repetitions` which has a more uniform interface. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:28 + def quantity; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:53 + def reluctant?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:33 + def repetitions; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def set_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def set_level=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/strfregexp.rb:100 + def strfre(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end + + # %l Level (depth) of the expression. Returns 'root' for the root + # expression, returns zero or higher for all others. + # + # %> Indentation at expression's level. + # + # %x Index of the expression at its depth. Available when using + # the sprintf_tree method only. + # + # %s Start offset within the whole expression. + # %e End offset within the whole expression. + # %S Length of expression. + # + # %o Coded offset and length, same as '@%s+%S' + # + # %y Type of expression. + # %k Token of expression. + # %i ID, same as '%y:%k' + # %c Class name + # + # %q Quantifier info, as {m[,M]} + # %Q Quantifier text + # + # %z Quantifier min + # %Z Quantifier max + # + # %t Base text of the expression (excludes quantifier, if any) + # %~t Full text if the expression is terminal, otherwise %i + # %T Full text of the expression (includes quantifier, if any) + # + # %b Basic info, same as '%o %i' + # %m Most info, same as '%b %q' + # %a All info, same as '%m %t' + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/strfregexp.rb:39 + def strfregexp(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def te; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def te=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def text; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def text=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:62 + def to_h; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:11 + def to_re(format = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def token; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def token=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def ts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def ts=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def type; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def type=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:35 + def u?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:32 + def unicode_classes?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:23 + def unquantified_clone; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:19 + def x?; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:4 +class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:8 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:18 + def close; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:5 + def closed; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:5 + def closed=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:6 + def closed?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:14 + def negate; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:5 + def negative; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:5 + def negative=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:18 + def negative?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:17 + def parts; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set/intersection.rb:5 +class Regexp::Expression::CharacterSet::IntersectedSequence < ::Regexp::Expression::Sequence + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:31 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set/intersection.rb:7 +class Regexp::Expression::CharacterSet::Intersection < ::Regexp::Expression::SequenceOperation + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:32 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set/intersection.rb:8 +Regexp::Expression::CharacterSet::Intersection::OPERAND = Regexp::Expression::CharacterSet::IntersectedSequence + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set/range.rb:5 +class Regexp::Expression::CharacterSet::Range < ::Regexp::Expression::Subexpression + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set/range.rb:10 + def <<(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set/range.rb:16 + def complete?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:33 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:18 + def parts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set/range.rb:6 + def ts; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:4 +module Regexp::Expression::CharacterType; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:7 +class Regexp::Expression::CharacterType::Any < ::Regexp::Expression::CharacterType::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:34 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:5 +class Regexp::Expression::CharacterType::Base < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:19 + def negative?; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:8 +class Regexp::Expression::CharacterType::Digit < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:17 +class Regexp::Expression::CharacterType::ExtendedGrapheme < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:10 +class Regexp::Expression::CharacterType::Hex < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:16 +class Regexp::Expression::CharacterType::Linebreak < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:9 +class Regexp::Expression::CharacterType::NonDigit < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:11 +class Regexp::Expression::CharacterType::NonHex < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:15 +class Regexp::Expression::CharacterType::NonSpace < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:13 +class Regexp::Expression::CharacterType::NonWord < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:14 +class Regexp::Expression::CharacterType::Space < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:12 +class Regexp::Expression::CharacterType::Word < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/free_space.rb:10 +class Regexp::Expression::Comment < ::Regexp::Expression::FreeSpace + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:35 + def human_name; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:132 + def comment?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:4 +module Regexp::Expression::Conditional; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:20 +class Regexp::Expression::Conditional::Branch < ::Regexp::Expression::Sequence + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:36 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:11 +class Regexp::Expression::Conditional::Condition < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:37 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:149 + def match_length; end + + # Name or number of the referenced capturing group that determines state. + # Returns a String if reference is by name, Integer if by number. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:14 + def reference; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:143 + def referential?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:22 +class Regexp::Expression::Conditional::Expression < ::Regexp::Expression::Subexpression + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:23 + def <<(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:27 + def add_sequence(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:32 + def branch(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:43 + def branches; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:39 + def condition; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:34 + def condition=(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:38 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:132 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:19 + def parts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:47 + def reference; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:144 + def referential?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:5 +class Regexp::Expression::Conditional::TooManyBranches < ::Regexp::Parser::Error + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:6 + def initialize; end +end + +# alias for symmetry between Token::* and Expression::* +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:32 +Regexp::Expression::Escape = Regexp::Expression::EscapeSequence + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:4 +module Regexp::Expression::EscapeSequence; end + +# e.g. \xE2\x82\xAC +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:25 +class Regexp::Expression::EscapeSequence::AbstractMetaControlSequence < ::Regexp::Expression::EscapeSequence::Base + private + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:48 + def control_sequence_to_s(control_sequence); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:53 + def meta_char_to_codepoint(meta_char); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:7 +class Regexp::Expression::EscapeSequence::AsciiEscape < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:4 + def codepoint; end +end + +# \e +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:8 +class Regexp::Expression::EscapeSequence::Backspace < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:5 + def codepoint; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:5 +class Regexp::Expression::EscapeSequence::Base < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_char.rb:4 + def char; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end +end + +# \b +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:9 +class Regexp::Expression::EscapeSequence::Bell < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:6 + def codepoint; end +end + +# e.g. \x0A +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:20 +class Regexp::Expression::EscapeSequence::Codepoint < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:18 + def codepoint; end +end + +# e.g. \u000A +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:22 +class Regexp::Expression::EscapeSequence::CodepointList < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:28 + def char; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:36 + def chars; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:32 + def codepoint; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:40 + def codepoints; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:166 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:26 +class Regexp::Expression::EscapeSequence::Control < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:60 + def codepoint; end +end + +# \a +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:10 +class Regexp::Expression::EscapeSequence::FormFeed < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:7 + def codepoint; end +end + +# e.g. \012 +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:19 +class Regexp::Expression::EscapeSequence::Hex < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:17 + def codepoint; end +end + +# \v +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:16 +class Regexp::Expression::EscapeSequence::Literal < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:13 + def codepoint; end +end + +# e.g. \cB +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:27 +class Regexp::Expression::EscapeSequence::Meta < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:66 + def codepoint; end +end + +# e.g. \M-Z +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:28 +class Regexp::Expression::EscapeSequence::MetaControl < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:72 + def codepoint; end +end + +# \f +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:11 +class Regexp::Expression::EscapeSequence::Newline < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:8 + def codepoint; end +end + +# e.g. \j, \@, \😀 (ineffectual escapes) +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:18 +class Regexp::Expression::EscapeSequence::Octal < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:15 + def codepoint; end +end + +# \n +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:12 +class Regexp::Expression::EscapeSequence::Return < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:9 + def codepoint; end +end + +# \r +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:13 +class Regexp::Expression::EscapeSequence::Tab < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:10 + def codepoint; end +end + +# e.g. \u{A B} +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:23 +class Regexp::Expression::EscapeSequence::UTF8Hex < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:21 + def codepoint; end +end + +# \t +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:14 +class Regexp::Expression::EscapeSequence::VerticalTab < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:11 + def codepoint; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/free_space.rb:4 +class Regexp::Expression::FreeSpace < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:149 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/free_space.rb:5 + def quantify(*_args); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:137 + def decorative?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:4 +module Regexp::Expression::Group; end + +# Special case. Absence group can match 0.. chars, irrespective of content. +# TODO: in theory, they *can* exclude match lengths with `.`: `(?~.{3})` +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:21 +class Regexp::Expression::Group::Absence < ::Regexp::Expression::Group::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:174 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:22 +class Regexp::Expression::Group::Atomic < ::Regexp::Expression::Group::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:5 +class Regexp::Expression::Group::Base < ::Regexp::Expression::Subexpression + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:20 + def parts; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:42 +class Regexp::Expression::Group::Capture < ::Regexp::Expression::Group::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:39 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:44 + def identifier; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:43 + def number; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:43 + def number=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:43 + def number_at_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:43 + def number_at_level=(_arg0); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:128 + def capturing?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:62 +class Regexp::Expression::Group::Comment < ::Regexp::Expression::Group::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:22 + def parts; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:133 + def comment?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:138 + def decorative?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:47 +class Regexp::Expression::Group::Named < ::Regexp::Expression::Group::Capture + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:51 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:40 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:49 + def identifier; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:48 + def name; end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:56 + def initialize_copy(orig); end +end + +# TODO: should split off OptionsSwitch in v3.0.0. Maybe even make it no +# longer inherit from Group because it is effectively a terminal expression. +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:25 +class Regexp::Expression::Group::Options < ::Regexp::Expression::Group::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:26 + def option_changes; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:26 + def option_changes=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:33 + def quantify(*args); end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:28 + def initialize_copy(orig); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:8 +class Regexp::Expression::Group::Passive < ::Regexp::Expression::Group::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:11 + def initialize(*_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:9 + def implicit=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:16 + def implicit?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:21 + def parts; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/keep.rb:4 +module Regexp::Expression::Keep; end + +# TODO: in regexp_parser v3.0.0 this should possibly be a Subexpression +# that contains all expressions to its left. +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/keep.rb:7 +class Regexp::Expression::Keep::Mark < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:41 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:149 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/literal.rb:4 +class Regexp::Expression::Literal < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:42 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:107 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:87 +Regexp::Expression::MatchLength = Regexp::MatchLength + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/posix_class.rb:12 +Regexp::Expression::Nonposixclass = Regexp::Expression::PosixClass + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:120 +Regexp::Expression::Nonproperty = Regexp::Expression::UnicodeProperty + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/posix_class.rb:4 +class Regexp::Expression::PosixClass < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/posix_class.rb:5 + def name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:20 + def negative?; end +end + +# alias for symmetry between token symbol and Expression class name +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/posix_class.rb:11 +Regexp::Expression::Posixclass = Regexp::Expression::PosixClass + +# alias for symmetry between token symbol and Expression class name +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:119 +Regexp::Expression::Property = Regexp::Expression::UnicodeProperty + +# TODO: in v3.0.0, maybe put Shared back into Base, and inherit from Base and +# call super in #initialize, but raise in #quantifier= and #quantify, +# or introduce an Expression::Quantifiable intermediate class. +# Or actually allow chaining as a more concise but tricky solution than PR#69. +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:8 +class Regexp::Expression::Quantifier + include ::Regexp::Expression::Shared + extend ::Regexp::Expression::Shared::ClassMethods + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:13 + def initialize(*args); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def conditional_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def conditional_level=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def custom_to_s_handling; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def custom_to_s_handling=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:32 + def greedy?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:38 + def lazy?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def level=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:44 + def max; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:40 + def min; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:48 + def mode; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def nesting_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def options; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def options=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def parent; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def parent=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:32 + def possessive?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def pre_quantifier_decorations; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def pre_quantifier_decorations=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def quantifier; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:32 + def reluctant?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def set_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def set_level=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def te; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def te=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def text; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def text=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:21 + def to_h; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def token; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def token=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def ts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def ts=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def type; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def type=(_arg0); end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:54 + def deprecated_old_init(token, text, _min, _max, _mode = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:66 + def derived_data; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:11 +Regexp::Expression::Quantifier::MODES = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/referenced_expressions.rb:4 +module Regexp::Expression::ReferencedExpressions + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/referenced_expressions.rb:7 + def referenced_expression; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/referenced_expressions.rb:5 + def referenced_expressions; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/referenced_expressions.rb:5 + def referenced_expressions=(_arg0); end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/referenced_expressions.rb:11 + def initialize_copy(orig); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/root.rb:4 +class Regexp::Expression::Root < ::Regexp::Expression::Subexpression + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:43 + def human_name; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/root.rb:5 + def build(options = T.unsafe(nil)); end + end +end + +# A sequence of expressions. Differs from a Subexpressions by how it handles +# quantifiers, as it applies them to its last element instead of itself as +# a whole subexpression. +# +# Used as the base class for the Alternation alternatives, Conditional +# branches, and CharacterSet::Intersection intersected sequences. +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence.rb:10 +class Regexp::Expression::Sequence < ::Regexp::Expression::Subexpression + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence.rb:29 + def quantify(token, *args); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence.rb:25 + def ts; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence.rb:12 + def add_to(exp, params = T.unsafe(nil), active_opts = T.unsafe(nil)); end + end +end + +# abstract class +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence_operation.rb:5 +class Regexp::Expression::SequenceOperation < ::Regexp::Expression::Subexpression + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence_operation.rb:14 + def <<(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence_operation.rb:18 + def add_sequence(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence_operation.rb:7 + def operands; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence_operation.rb:8 + def operator; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:24 + def parts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence_operation.rb:6 + def sequences; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence_operation.rb:10 + def ts; end +end + +# alias for symmetry between token symbol and Expression class name +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:24 +Regexp::Expression::Set = Regexp::Expression::CharacterSet + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:4 +module Regexp::Expression::Shared + mixes_in_class_methods ::Regexp::Expression::Shared::ClassMethods + + # Deep-compare two expressions for equality. + # + # When changing the conditions, please make sure to update + # #pretty_print_instance_variables so that it includes all relevant values. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:103 + def ==(other); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:110 + def ===(other); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:53 + def base_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:126 + def capturing?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:99 + def coded_offset; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:130 + def comment?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:135 + def decorative?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:49 + def ends_at(include_quantifier = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:111 + def eql?(other); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:57 + def full_length; end + + # default implementation, e.g. "atomic group", "hex escape", "word type", .. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:6 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/printing.rb:5 + def inspect; end + + # Test if this expression has the given test_token, and optionally a given + # test_type. + # + # # Any expressions + # exp.is? :* # always returns true + # + # # is it a :capture + # exp.is? :capture + # + # # is it a :character and a :set + # exp.is? :character, :set + # + # # is it a :meta :dot + # exp.is? :dot, :meta + # + # # is it a :meta or :escape :dot + # exp.is? :dot, [:meta, :escape] + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:38 + def is?(test_token, test_type = T.unsafe(nil)); end + + # not an alias so as to respect overrides of #negative? + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:10 + def negated?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:5 + def negative?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:103 + def nesting_level=(lvl); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:95 + def offset; end + + # Test if this expression matches an entry in the given scope spec. + # + # A scope spec can be one of: + # + # . An array: Interpreted as a set of tokens, tested for inclusion + # of the expression's token. + # + # . A hash: Where the key is interpreted as the expression type + # and the value is either a symbol or an array. In this + # case, when the scope is a hash, one_of? calls itself to + # evaluate the key's value. + # + # . A symbol: matches the expression's token or type, depending on + # the level of the call. If one_of? is called directly with + # a symbol then it will always be checked against the + # type of the expression. If it's being called for a value + # from a hash, it will be checked against the token of the + # expression. + # + # # any expression + # exp.one_of?(:*) # always true + # + # # like exp.type?(:group) + # exp.one_of?(:group) + # + # # any expression of type meta + # exp.one_of?(:meta => :*) + # + # # meta dots and alternations + # exp.one_of?(:meta => [:dot, :alternation]) + # + # # meta dots and any set tokens + # exp.one_of?({meta: [:dot], set: :*}) + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:77 + def one_of?(scope, top = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:113 + def optional?; end + + # default implementation + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:6 + def parts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:87 + def pre_quantifier_decoration(expression_format = T.unsafe(nil)); end + + # Make pretty-print work despite #inspect implementation. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/printing.rb:14 + def pretty_print(q); end + + # Called by pretty_print (ruby/pp) and #inspect. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/printing.rb:19 + def pretty_print_instance_variables; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:117 + def quantified?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:109 + def quantifier=(qtf); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:91 + def quantifier_affix(expression_format = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:140 + def referential?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:45 + def starts_at; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:122 + def terminal?; end + + # #to_s reproduces the original source, as an unparser would. + # + # It takes an optional format argument. + # + # Example: + # + # lit = Regexp::Parser.parse(/a +/x)[0] + # + # lit.to_s # => 'a+' # default; with quantifier + # lit.to_s(:full) # => 'a+' # default; with quantifier + # lit.to_s(:base) # => 'a' # without quantifier + # lit.to_s(:original) # => 'a +' # with quantifier AND intermittent decorations + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:74 + def to_s(format = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:85 + def to_str(format = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/construct.rb:39 + def token_class; end + + # Test if this expression has the given test_type, which can be either + # a symbol or an array of symbols to check against the expression's type. + # + # # is it a :group expression + # exp.type? :group + # + # # is it a :set, or :meta + # exp.type? [:set, :meta] + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:15 + def type?(test_type); end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:20 + def init_from_token_and_options(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:34 + def initialize_copy(orig); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:12 + def intersperse(expressions, separator); end + + class << self + # filled in ./methods/*.rb + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:7 + def included(mod); end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:5 +module Regexp::Expression::Shared::ClassMethods + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:127 + def capturing?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:131 + def comment?; end + + # Convenience method to init a valid Expression without a Regexp::Token + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/construct.rb:7 + def construct(params = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/construct.rb:17 + def construct_defaults; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:136 + def decorative?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:141 + def referential?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:123 + def terminal?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/construct.rb:27 + def token_class; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:4 +class Regexp::Expression::Subexpression < ::Regexp::Expression::Base + include ::Enumerable + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:9 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:22 + def <<(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def [](*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def at(*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:35 + def dig(*indices); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def each(*args, &block); end + + # Traverses the expression, passing each recursive child to the + # given block. + # If the block takes two arguments, the indices of the children within + # their parents are also passed to it. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:10 + def each_expression(include_self = T.unsafe(nil), &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def empty?(*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:7 + def expressions; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:7 + def expressions=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:52 + def extract_quantifier_target(quantifier_description); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def fetch(*args, &block); end + + # Returns a new array with the results of calling the given block once + # for every expression. If a block is not given, returns an array with + # each expression and its level index as an array. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:58 + def flat_map(include_self = T.unsafe(nil), &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def index(*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:120 + def inner_match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def join(*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def last(*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def length(*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:113 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:23 + def parts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/strfregexp.rb:114 + def strfre_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/strfregexp.rb:104 + def strfregexp_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:41 + def te; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:45 + def to_h; end + + # Traverses the subexpression (depth-first, pre-order) and calls the given + # block for each expression with three arguments; the traversal event, + # the expression, and the index of the expression within its parent. + # + # The event argument is passed as follows: + # + # - For subexpressions, :enter upon entering the subexpression, and + # :exit upon exiting it. + # + # - For terminal expressions, :visit is called once. + # + # Returns self. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:34 + def traverse(include_self = T.unsafe(nil), &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def values_at(*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:53 + def walk(include_self = T.unsafe(nil), &block); end + + protected + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:68 + def each_expression_with_index(&block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:75 + def each_expression_without_index(&block); end + + private + + # Override base method to clone the expressions as well. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:15 + def initialize_copy(orig); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:124 + def terminal?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:4 +module Regexp::Expression::UnicodeProperty; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:110 +class Regexp::Expression::UnicodeProperty::Age < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:15 +class Regexp::Expression::UnicodeProperty::Alnum < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:16 +class Regexp::Expression::UnicodeProperty::Alpha < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:33 +class Regexp::Expression::UnicodeProperty::Any < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:17 +class Regexp::Expression::UnicodeProperty::Ascii < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:34 +class Regexp::Expression::UnicodeProperty::Assigned < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:5 +class Regexp::Expression::UnicodeProperty::Base < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:6 + def name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:21 + def negative?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:10 + def shortcut; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:18 +class Regexp::Expression::UnicodeProperty::Blank < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:111 +class Regexp::Expression::UnicodeProperty::Block < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:19 +class Regexp::Expression::UnicodeProperty::Cntrl < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:99 +module Regexp::Expression::UnicodeProperty::Codepoint; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:102 +class Regexp::Expression::UnicodeProperty::Codepoint::Any < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:100 +class Regexp::Expression::UnicodeProperty::Codepoint::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:103 +class Regexp::Expression::UnicodeProperty::Codepoint::Control < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:104 +class Regexp::Expression::UnicodeProperty::Codepoint::Format < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:106 +class Regexp::Expression::UnicodeProperty::Codepoint::PrivateUse < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:105 +class Regexp::Expression::UnicodeProperty::Codepoint::Surrogate < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:107 +class Regexp::Expression::UnicodeProperty::Codepoint::Unassigned < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:112 +class Regexp::Expression::UnicodeProperty::Derived < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:20 +class Regexp::Expression::UnicodeProperty::Digit < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:113 +class Regexp::Expression::UnicodeProperty::Emoji < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:114 +class Regexp::Expression::UnicodeProperty::Enumerated < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:21 +class Regexp::Expression::UnicodeProperty::Graph < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:36 +module Regexp::Expression::UnicodeProperty::Letter; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:39 +class Regexp::Expression::UnicodeProperty::Letter::Any < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:37 +class Regexp::Expression::UnicodeProperty::Letter::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:40 +class Regexp::Expression::UnicodeProperty::Letter::Cased < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:42 +class Regexp::Expression::UnicodeProperty::Letter::Lowercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:44 +class Regexp::Expression::UnicodeProperty::Letter::Modifier < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:45 +class Regexp::Expression::UnicodeProperty::Letter::Other < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:43 +class Regexp::Expression::UnicodeProperty::Letter::Titlecase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:41 +class Regexp::Expression::UnicodeProperty::Letter::Uppercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:22 +class Regexp::Expression::UnicodeProperty::Lower < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:48 +module Regexp::Expression::UnicodeProperty::Mark; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:51 +class Regexp::Expression::UnicodeProperty::Mark::Any < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:49 +class Regexp::Expression::UnicodeProperty::Mark::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:52 +class Regexp::Expression::UnicodeProperty::Mark::Combining < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:55 +class Regexp::Expression::UnicodeProperty::Mark::Enclosing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:53 +class Regexp::Expression::UnicodeProperty::Mark::Nonspacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:54 +class Regexp::Expression::UnicodeProperty::Mark::Spacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:31 +class Regexp::Expression::UnicodeProperty::Newline < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:58 +module Regexp::Expression::UnicodeProperty::Number; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:61 +class Regexp::Expression::UnicodeProperty::Number::Any < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:59 +class Regexp::Expression::UnicodeProperty::Number::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:62 +class Regexp::Expression::UnicodeProperty::Number::Decimal < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:63 +class Regexp::Expression::UnicodeProperty::Number::Letter < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:64 +class Regexp::Expression::UnicodeProperty::Number::Other < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:23 +class Regexp::Expression::UnicodeProperty::Print < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:24 +class Regexp::Expression::UnicodeProperty::Punct < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:67 +module Regexp::Expression::UnicodeProperty::Punctuation; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:70 +class Regexp::Expression::UnicodeProperty::Punctuation::Any < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:68 +class Regexp::Expression::UnicodeProperty::Punctuation::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:74 +class Regexp::Expression::UnicodeProperty::Punctuation::Close < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:71 +class Regexp::Expression::UnicodeProperty::Punctuation::Connector < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:72 +class Regexp::Expression::UnicodeProperty::Punctuation::Dash < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:76 +class Regexp::Expression::UnicodeProperty::Punctuation::Final < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:75 +class Regexp::Expression::UnicodeProperty::Punctuation::Initial < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:73 +class Regexp::Expression::UnicodeProperty::Punctuation::Open < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:77 +class Regexp::Expression::UnicodeProperty::Punctuation::Other < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:115 +class Regexp::Expression::UnicodeProperty::Script < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:80 +module Regexp::Expression::UnicodeProperty::Separator; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:83 +class Regexp::Expression::UnicodeProperty::Separator::Any < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:81 +class Regexp::Expression::UnicodeProperty::Separator::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:85 +class Regexp::Expression::UnicodeProperty::Separator::Line < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:86 +class Regexp::Expression::UnicodeProperty::Separator::Paragraph < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:84 +class Regexp::Expression::UnicodeProperty::Separator::Space < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:25 +class Regexp::Expression::UnicodeProperty::Space < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:89 +module Regexp::Expression::UnicodeProperty::Symbol; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:92 +class Regexp::Expression::UnicodeProperty::Symbol::Any < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:90 +class Regexp::Expression::UnicodeProperty::Symbol::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:94 +class Regexp::Expression::UnicodeProperty::Symbol::Currency < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:93 +class Regexp::Expression::UnicodeProperty::Symbol::Math < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:95 +class Regexp::Expression::UnicodeProperty::Symbol::Modifier < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:96 +class Regexp::Expression::UnicodeProperty::Symbol::Other < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:26 +class Regexp::Expression::UnicodeProperty::Upper < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:27 +class Regexp::Expression::UnicodeProperty::Word < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:29 +class Regexp::Expression::UnicodeProperty::XPosixPunct < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:28 +class Regexp::Expression::UnicodeProperty::Xdigit < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/free_space.rb:13 +class Regexp::Expression::WhiteSpace < ::Regexp::Expression::FreeSpace + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:44 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/free_space.rb:14 + def merge(exp); end +end + +# A very thin wrapper around the scanner that breaks quantified literal runs, +# collects emitted tokens into an array, calculates their nesting depth, and +# normalizes tokens for the parser, and checks if they are implemented by the +# given syntax flavor. +# +# pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:7 +class Regexp::Lexer + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:73 + def emit(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:22 + def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:93 + def ascend(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def block; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def block=(_arg0); end + + # if a codepoint list is followed by a quantifier, that quantifier applies + # to the last codepoint, e.g. /\u{61 62 63}{3}/ =~ 'abccc' + # c.f. #break_literal. + # + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:145 + def break_codepoint_list(token); end + + # called by scan to break a literal run that is longer than one character + # into two separate tokens when it is followed by a quantifier + # + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:125 + def break_literal(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def collect_tokens; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def collect_tokens=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def conditional_nesting; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def conditional_nesting=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:108 + def descend(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:164 + def merge_condition(current, last); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def nesting; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def nesting=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def preprev_token; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def preprev_token=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def prev_token; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def prev_token=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def set_nesting; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def set_nesting=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def shift; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def shift=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def tokens; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def tokens=(_arg0); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:18 + def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:84 + def scan(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:14 +Regexp::Lexer::CLOSING_TOKENS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:16 +Regexp::Lexer::CONDITION_TOKENS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:9 +Regexp::Lexer::OPENING_TOKENS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:3 +class Regexp::MatchLength + include ::Enumerable + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:11 + def initialize(exp, opts = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:26 + def each(opts = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:37 + def endless_each; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:46 + def fixed?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:42 + def include?(length); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:62 + def inspect; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:54 + def max; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:50 + def min; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:58 + def minmax; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:67 + def to_re; end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def base_max; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def base_max=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def base_min; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def base_min=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def exp_class; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def exp_class=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def max_rep; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def max_rep=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def min_rep; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def min_rep=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def reify; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def reify=(_arg0); end + + # ruby >= 2.4 + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:76 + def test_regexp; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:6 + def of(obj); end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/version.rb:4 +class Regexp::Parser + include ::Regexp::Expression + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:27 + def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:577 + def active_opts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:101 + def anchor(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:264 + def assign_effective_number(exp); end + + # Assigns referenced expressions to referring expressions, e.g. if there is + # an instance of Backreference::Number, its #referenced_expression is set to + # the instance of Group::Capture that it refers to via its number. + # + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:584 + def assign_referenced_expressions; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:229 + def backref(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:204 + def captured_group_count_at_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + def captured_group_counts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + def captured_group_counts=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:573 + def close_completed_character_set_range; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:212 + def close_group; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:541 + def close_set; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:271 + def conditional(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + def conditional_nesting; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + def conditional_nesting=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:208 + def count_captured_group; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:218 + def decrease_nesting; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:307 + def escape(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:62 + def extract_options(input, options); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:352 + def free_space(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:116 + def group(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:512 + def increase_group_level(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:552 + def intersection(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:363 + def keep(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:367 + def literal(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:371 + def meta(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:537 + def negate_set; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:301 + def nest(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:296 + def nest_conditional(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + def nesting; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + def nesting=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + def node; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + def node=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:167 + def open_group(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:530 + def open_set(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:132 + def options_group(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + def options_stack; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + def options_stack=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:78 + def parse_token(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:393 + def posixclass(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:400 + def property(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:482 + def quantifier(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:545 + def range(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + def root; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + def root=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:382 + def sequence_operation(klass, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:518 + def set(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + def switching_options; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + def switching_options=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:200 + def total_captured_group_count; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:556 + def type(token); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:23 + def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:130 +Regexp::Parser::ENC_FLAGS = T.let(T.unsafe(nil), Array) + +# base class for all gem-specific errors +# +# pkg:gem/regexp_parser#lib/regexp_parser/error.rb:5 +class Regexp::Parser::Error < ::StandardError; end + +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:129 +Regexp::Parser::MOD_FLAGS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:9 +class Regexp::Parser::ParserError < ::Regexp::Parser::Error; end + +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:397 +Regexp::Parser::UP = Regexp::Expression::UnicodeProperty + +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:398 +Regexp::Parser::UPTokens = Regexp::Syntax::Token::UnicodeProperty + +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:17 +class Regexp::Parser::UnknownTokenError < ::Regexp::Parser::ParserError + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:18 + def initialize(type, token); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:11 +class Regexp::Parser::UnknownTokenTypeError < ::Regexp::Parser::ParserError + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:12 + def initialize(type, token); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/version.rb:5 +Regexp::Parser::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/scanner_error.rb:5 +class Regexp::Scanner + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2509 + def capturing_group_count; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2509 + def capturing_group_count=(_arg0); end + + # Emits an array with the details of the scanned pattern + # + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2484 + def emit(type, token, text); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2509 + def literal_run; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2509 + def literal_run=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:24 + def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + private + + # Appends one or more characters to the literal buffer, to be emitted later + # by a call to emit_literal. + # + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2555 + def append_literal(data, ts, te); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def block; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def block=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def char_pos; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def char_pos=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def collect_tokens; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def collect_tokens=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def conditional_stack; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def conditional_stack=(_arg0); end + + # Copy from ts to te from data as text + # + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2549 + def copy(data, ts, te); end + + # Emits the literal run collected by calls to the append_literal method. + # + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2560 + def emit_literal; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2595 + def emit_meta_control_sequence(data, ts, te, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2566 + def emit_options(text); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2520 + def extract_encoding(input_object, options); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def free_spacing; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def free_spacing=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2528 + def free_spacing?(input_object, options); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def group_depth; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def group_depth=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2540 + def in_group?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2544 + def in_set?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def prev_token; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def prev_token=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def regexp_encoding; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def regexp_encoding=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def set_depth; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def set_depth=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def spacing_stack; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def spacing_stack=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def tokens; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + def tokens=(_arg0); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2469 + def long_prop_map; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2473 + def parse_prop_map(name); end + + # Scans the given regular expression text, or Regexp object and collects the + # emitted token into an array that gets returned at the end. If a block is + # given, it gets called for each emitted token. + # + # This method may raise errors if a syntax error is encountered. + # -------------------------------------------------------------------------- + # + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:20 + def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + # lazy-load property maps when first needed + # + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2465 + def short_prop_map; end + end +end + +# Invalid back reference. Used for name a number refs/calls. +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:46 +class Regexp::Scanner::InvalidBackrefError < ::Regexp::Scanner::ValidationError + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:47 + def initialize(what, reason); end +end + +# Invalid group. Used for named groups. +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:31 +class Regexp::Scanner::InvalidGroupError < ::Regexp::Scanner::ValidationError + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:32 + def initialize(what, reason); end +end + +# Invalid groupOption. Used for inline options. +# TODO: should become InvalidGroupOptionError in v3.0.0 for consistency +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:39 +class Regexp::Scanner::InvalidGroupOption < ::Regexp::Scanner::ValidationError + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:40 + def initialize(option, text); end +end + +# Invalid sequence format. Used for escape sequences, mainly. +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:24 +class Regexp::Scanner::InvalidSequenceError < ::Regexp::Scanner::ValidationError + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:25 + def initialize(what = T.unsafe(nil), where = T.unsafe(nil)); end +end + +# Use each_with_object for required_ruby_version >= 2.2,or #to_h for >= 2.6 +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2478 +Regexp::Scanner::POSIX_CLASSES = T.let(T.unsafe(nil), Hash) + +# Unexpected end of pattern +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/premature_end_error.rb:5 +class Regexp::Scanner::PrematureEndError < ::Regexp::Scanner::ScannerError + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/premature_end_error.rb:6 + def initialize(where = T.unsafe(nil)); end +end + +# General scanner error (catch all) +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/scanner_error.rb:7 +class Regexp::Scanner::ScannerError < ::Regexp::Parser::Error; end + +# The POSIX class name was not recognized by the scanner. +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:60 +class Regexp::Scanner::UnknownPosixClassError < ::Regexp::Scanner::ValidationError + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:61 + def initialize(text, _); end +end + +# The property name was not recognized by the scanner. +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:53 +class Regexp::Scanner::UnknownUnicodePropertyError < ::Regexp::Scanner::ValidationError + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:54 + def initialize(name, _); end +end + +# Base for all scanner validation errors +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:5 +class Regexp::Scanner::ValidationError < ::Regexp::Scanner::ScannerError + class << self + # Centralizes and unifies the handling of validation related errors. + # + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:7 + def for(type, problem, reason = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:11 + def types; end + end +end + +# Define the base module and the simplest of tokens. +# After loading all the tokens the map is full. Extract all tokens and types +# into the All and Types constants. +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax.rb:5 +module Regexp::Syntax + private + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:63 + def comparable(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:46 + def const_missing(const_name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:53 + def fallback_version_class(version); end + + # Returns the syntax specification class for the given syntax + # version name. The special names 'any' and '*' return Syntax::Any. + # + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:24 + def for(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:28 + def new(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:59 + def specified_versions; end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:34 + def supported?(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:38 + def version_class(version); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:63 + def comparable(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:46 + def const_missing(const_name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:53 + def fallback_version_class(version); end + + # Returns the syntax specification class for the given syntax + # version name. The special names 'any' and '*' return Syntax::Any. + # + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:24 + def for(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:28 + def new(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:59 + def specified_versions; end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:34 + def supported?(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:38 + def version_class(version); end + end +end + +# A syntax that always returns true, passing all tokens as implemented. This +# is useful during development, testing, and should be useful for some types +# of transformations as well. +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/any.rb:7 +class Regexp::Syntax::Any < ::Regexp::Syntax::Base + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/any.rb:10 + def implements?(_type, _token); end + end +end + +# A lookup map of supported types and tokens in a given syntax +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:11 +class Regexp::Syntax::Base + include ::Regexp::Syntax::Token + + # TODO: drop this backwards compatibility code in v3.0.0, do `private :new` + # + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:101 + def initialize; end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:106 + def method_missing(name, *args); end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:117 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:48 + def added_features; end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:46 + def check!(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:36 + def check?(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:28 + def excludes(type, tokens); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:15 + def features; end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:15 + def features=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:38 + def implementations(type); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:23 + def implements(type, tokens); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:42 + def implements!(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:33 + def implements?(type, token); end + + # automatically inherit features through the syntax class hierarchy + # + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:18 + def inherited(subclass); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:56 + def normalize(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:76 + def normalize_backref(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:67 + def normalize_group(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:52 + def removed_features; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions.rb:10 +Regexp::Syntax::CURRENT = Regexp::Syntax::V4_0_0 + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:8 +class Regexp::Syntax::InvalidVersionNameError < ::Regexp::Syntax::SyntaxError + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:9 + def initialize(name); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:4 +class Regexp::Syntax::NotImplementedError < ::Regexp::Syntax::SyntaxError + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:5 + def initialize(syntax, type, token); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax.rb:6 +class Regexp::Syntax::SyntaxError < ::Regexp::Parser::Error; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:5 +module Regexp::Syntax::Token; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:44 +Regexp::Syntax::Token::All = T.let(T.unsafe(nil), Array) + +# alias for symmetry between Token::* and Expression::* +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:17 +module Regexp::Syntax::Token::Alternation; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:18 +Regexp::Syntax::Token::Alternation::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:19 +Regexp::Syntax::Token::Alternation::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/anchor.rb:5 +module Regexp::Syntax::Token::Anchor; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/anchor.rb:11 +Regexp::Syntax::Token::Anchor::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/anchor.rb:6 +Regexp::Syntax::Token::Anchor::Basic = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/anchor.rb:7 +Regexp::Syntax::Token::Anchor::Extended = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/anchor.rb:9 +Regexp::Syntax::Token::Anchor::MatchStart = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/anchor.rb:8 +Regexp::Syntax::Token::Anchor::String = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/anchor.rb:12 +Regexp::Syntax::Token::Anchor::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/assertion.rb:5 +module Regexp::Syntax::Token::Assertion; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/assertion.rb:9 +Regexp::Syntax::Token::Assertion::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/assertion.rb:6 +Regexp::Syntax::Token::Assertion::Lookahead = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/assertion.rb:7 +Regexp::Syntax::Token::Assertion::Lookbehind = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/assertion.rb:10 +Regexp::Syntax::Token::Assertion::Type = T.let(T.unsafe(nil), Symbol) + +# alias for symmetry between token symbol and Expression class name +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:33 +Regexp::Syntax::Token::Backref = Regexp::Syntax::Token::Backreference + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:5 +module Regexp::Syntax::Token::Backreference; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:17 +Regexp::Syntax::Token::Backreference::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:9 +Regexp::Syntax::Token::Backreference::Name = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:8 +Regexp::Syntax::Token::Backreference::Number = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:7 +Regexp::Syntax::Token::Backreference::NumberRef = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:6 +Regexp::Syntax::Token::Backreference::Plain = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:11 +Regexp::Syntax::Token::Backreference::RecursionLevel = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:18 +Regexp::Syntax::Token::Backreference::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:13 +Regexp::Syntax::Token::Backreference::V1_8_6 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:15 +Regexp::Syntax::Token::Backreference::V1_9_1 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_set.rb:5 +module Regexp::Syntax::Token::CharacterSet; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_set.rb:9 +Regexp::Syntax::Token::CharacterSet::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_set.rb:6 +Regexp::Syntax::Token::CharacterSet::Basic = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_set.rb:7 +Regexp::Syntax::Token::CharacterSet::Extended = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_set.rb:10 +Regexp::Syntax::Token::CharacterSet::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_type.rb:5 +module Regexp::Syntax::Token::CharacterType; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_type.rb:12 +Regexp::Syntax::Token::CharacterType::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_type.rb:6 +Regexp::Syntax::Token::CharacterType::Basic = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_type.rb:10 +Regexp::Syntax::Token::CharacterType::Clustered = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_type.rb:7 +Regexp::Syntax::Token::CharacterType::Extended = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_type.rb:8 +Regexp::Syntax::Token::CharacterType::Hex = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_type.rb:13 +Regexp::Syntax::Token::CharacterType::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/conditional.rb:5 +module Regexp::Syntax::Token::Conditional; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/conditional.rb:11 +Regexp::Syntax::Token::Conditional::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/conditional.rb:8 +Regexp::Syntax::Token::Conditional::Condition = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/conditional.rb:6 +Regexp::Syntax::Token::Conditional::Delimiters = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/conditional.rb:9 +Regexp::Syntax::Token::Conditional::Separator = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/conditional.rb:13 +Regexp::Syntax::Token::Conditional::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:5 +module Regexp::Syntax::Token::Escape; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:10 +Regexp::Syntax::Token::Escape::ASCII = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:26 +Regexp::Syntax::Token::Escape::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:6 +Regexp::Syntax::Token::Escape::Basic = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:8 +Regexp::Syntax::Token::Escape::Control = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:22 +Regexp::Syntax::Token::Escape::Hex = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:15 +Regexp::Syntax::Token::Escape::Meta = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:24 +Regexp::Syntax::Token::Escape::Octal = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:27 +Regexp::Syntax::Token::Escape::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:13 +Regexp::Syntax::Token::Escape::Unicode = T.let(T.unsafe(nil), Array) + +# alias for symmetry between Token::* and Expression::* +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:33 +Regexp::Syntax::Token::EscapeSequence = Regexp::Syntax::Token::Escape + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:13 +module Regexp::Syntax::Token::FreeSpace; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:14 +Regexp::Syntax::Token::FreeSpace::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:15 +Regexp::Syntax::Token::FreeSpace::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:5 +module Regexp::Syntax::Token::Group; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:19 +Regexp::Syntax::Token::Group::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:10 +Regexp::Syntax::Token::Group::Atomic = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:6 +Regexp::Syntax::Token::Group::Basic = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:12 +Regexp::Syntax::Token::Group::Comment = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:7 +Regexp::Syntax::Token::Group::Extended = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:9 +Regexp::Syntax::Token::Group::Named = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:11 +Regexp::Syntax::Token::Group::Passive = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:20 +Regexp::Syntax::Token::Group::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:14 +Regexp::Syntax::Token::Group::V1_8_6 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:17 +Regexp::Syntax::Token::Group::V2_4_1 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/keep.rb:5 +module Regexp::Syntax::Token::Keep; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/keep.rb:8 +Regexp::Syntax::Token::Keep::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/keep.rb:6 +Regexp::Syntax::Token::Keep::Mark = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/keep.rb:9 +Regexp::Syntax::Token::Keep::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:8 +module Regexp::Syntax::Token::Literal; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:9 +Regexp::Syntax::Token::Literal::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:10 +Regexp::Syntax::Token::Literal::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:6 +Regexp::Syntax::Token::Map = T.let(T.unsafe(nil), Hash) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:5 +module Regexp::Syntax::Token::Meta; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:10 +Regexp::Syntax::Token::Meta::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:7 +Regexp::Syntax::Token::Meta::Alternation = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:6 +Regexp::Syntax::Token::Meta::Basic = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:8 +Regexp::Syntax::Token::Meta::Extended = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:11 +Regexp::Syntax::Token::Meta::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/posix_class.rb:5 +module Regexp::Syntax::Token::PosixClass; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/posix_class.rb:11 +Regexp::Syntax::Token::PosixClass::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/posix_class.rb:9 +Regexp::Syntax::Token::PosixClass::Extensions = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/posix_class.rb:13 +Regexp::Syntax::Token::PosixClass::NonType = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/posix_class.rb:6 +Regexp::Syntax::Token::PosixClass::Standard = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/posix_class.rb:12 +Regexp::Syntax::Token::PosixClass::Type = T.let(T.unsafe(nil), Symbol) + +# alias for symmetry between token symbol and Token module name +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:809 +Regexp::Syntax::Token::Property = Regexp::Syntax::Token::UnicodeProperty + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:5 +module Regexp::Syntax::Token::Quantifier; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:31 +Regexp::Syntax::Token::Quantifier::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:6 +Regexp::Syntax::Token::Quantifier::Greedy = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:24 +Regexp::Syntax::Token::Quantifier::Interval = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:28 +Regexp::Syntax::Token::Quantifier::IntervalAll = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:26 +Regexp::Syntax::Token::Quantifier::IntervalPossessive = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:25 +Regexp::Syntax::Token::Quantifier::IntervalReluctant = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:18 +Regexp::Syntax::Token::Quantifier::Possessive = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:12 +Regexp::Syntax::Token::Quantifier::Reluctant = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:32 +Regexp::Syntax::Token::Quantifier::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:30 +Regexp::Syntax::Token::Quantifier::V1_8_6 = T.let(T.unsafe(nil), Array) + +# alias for symmetry between token symbol and Token module name +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_set.rb:16 +Regexp::Syntax::Token::Set = Regexp::Syntax::Token::CharacterSet + +# Type is the same as Backreference so keeping it here, for now. +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:22 +module Regexp::Syntax::Token::SubexpressionCall; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:26 +Regexp::Syntax::Token::SubexpressionCall::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:23 +Regexp::Syntax::Token::SubexpressionCall::Name = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:24 +Regexp::Syntax::Token::SubexpressionCall::Number = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:45 +Regexp::Syntax::Token::Types = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:5 +module Regexp::Syntax::Token::UnicodeProperty + class << self + private + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:6 + def all(name); end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:73 +Regexp::Syntax::Token::UnicodeProperty::Age = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:45 +Regexp::Syntax::Token::UnicodeProperty::Age_V1_9_3 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:49 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:51 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:53 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_3_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:55 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_4_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:57 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:59 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:61 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_2 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:63 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_3 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:65 +Regexp::Syntax::Token::UnicodeProperty::Age_V3_1_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:67 +Regexp::Syntax::Token::UnicodeProperty::Age_V3_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:69 +Regexp::Syntax::Token::UnicodeProperty::Age_V3_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:71 +Regexp::Syntax::Token::UnicodeProperty::Age_V4_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:799 +Regexp::Syntax::Token::UnicodeProperty::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:18 +module Regexp::Syntax::Token::UnicodeProperty::Category; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:41 +Regexp::Syntax::Token::UnicodeProperty::Category::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:38 +Regexp::Syntax::Token::UnicodeProperty::Category::Codepoint = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:19 +Regexp::Syntax::Token::UnicodeProperty::Category::Letter = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:22 +Regexp::Syntax::Token::UnicodeProperty::Category::Mark = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:25 +Regexp::Syntax::Token::UnicodeProperty::Category::Number = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:28 +Regexp::Syntax::Token::UnicodeProperty::Category::Punctuation = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:35 +Regexp::Syntax::Token::UnicodeProperty::Category::Separator = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:32 +Regexp::Syntax::Token::UnicodeProperty::Category::Symbol = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:11 +Regexp::Syntax::Token::UnicodeProperty::CharType_V1_9_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:14 +Regexp::Syntax::Token::UnicodeProperty::CharType_V2_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:152 +Regexp::Syntax::Token::UnicodeProperty::Derived = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:75 +Regexp::Syntax::Token::UnicodeProperty::Derived_V1_9_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:129 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:134 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_4_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:138 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:142 +Regexp::Syntax::Token::UnicodeProperty::Derived_V3_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:148 +Regexp::Syntax::Token::UnicodeProperty::Derived_V4_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:782 +Regexp::Syntax::Token::UnicodeProperty::Emoji = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:752 +Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:760 +Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_6_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:780 +Regexp::Syntax::Token::UnicodeProperty::Enumerated = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:764 +Regexp::Syntax::Token::UnicodeProperty::Enumerated_V2_4_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:802 +Regexp::Syntax::Token::UnicodeProperty::NonType = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:16 +Regexp::Syntax::Token::UnicodeProperty::POSIX = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:365 +Regexp::Syntax::Token::UnicodeProperty::Script = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:154 +Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:250 +Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_3 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:256 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:266 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:292 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_3_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:301 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_4_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:310 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:317 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:327 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_2 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:334 +Regexp::Syntax::Token::UnicodeProperty::Script_V3_1_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:341 +Regexp::Syntax::Token::UnicodeProperty::Script_V3_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:351 +Regexp::Syntax::Token::UnicodeProperty::Script_V4_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:801 +Regexp::Syntax::Token::UnicodeProperty::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:750 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:367 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V1_9_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:466 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:594 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:629 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_3_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:642 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_4_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:656 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:666 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:680 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_2 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:692 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_1_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:703 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:725 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:729 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V4_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:784 +Regexp::Syntax::Token::UnicodeProperty::V1_9_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:785 +Regexp::Syntax::Token::UnicodeProperty::V1_9_3 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:786 +Regexp::Syntax::Token::UnicodeProperty::V2_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:787 +Regexp::Syntax::Token::UnicodeProperty::V2_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:788 +Regexp::Syntax::Token::UnicodeProperty::V2_3_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:789 +Regexp::Syntax::Token::UnicodeProperty::V2_4_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:790 +Regexp::Syntax::Token::UnicodeProperty::V2_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:791 +Regexp::Syntax::Token::UnicodeProperty::V2_6_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:792 +Regexp::Syntax::Token::UnicodeProperty::V2_6_2 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:793 +Regexp::Syntax::Token::UnicodeProperty::V2_6_3 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:794 +Regexp::Syntax::Token::UnicodeProperty::V3_1_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:795 +Regexp::Syntax::Token::UnicodeProperty::V3_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:796 +Regexp::Syntax::Token::UnicodeProperty::V3_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:797 +Regexp::Syntax::Token::UnicodeProperty::V4_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:14 +class Regexp::Syntax::UnknownSyntaxNameError < ::Regexp::Syntax::SyntaxError + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:15 + def initialize(name); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/1.8.6.rb:3 +class Regexp::Syntax::V1_8_6 < ::Regexp::Syntax::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/1.9.1.rb:3 +class Regexp::Syntax::V1_9_1 < ::Regexp::Syntax::V1_8_6; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/1.9.3.rb:3 +class Regexp::Syntax::V1_9_3 < ::Regexp::Syntax::V1_9_1; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.0.0.rb:3 +class Regexp::Syntax::V2_0_0 < ::Regexp::Syntax::V1_9_3; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.2.0.rb:3 +class Regexp::Syntax::V2_2_0 < ::Regexp::Syntax::V2_0_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.3.0.rb:3 +class Regexp::Syntax::V2_3_0 < ::Regexp::Syntax::V2_2_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.4.0.rb:3 +class Regexp::Syntax::V2_4_0 < ::Regexp::Syntax::V2_3_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.4.1.rb:3 +class Regexp::Syntax::V2_4_1 < ::Regexp::Syntax::V2_4_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.5.0.rb:3 +class Regexp::Syntax::V2_5_0 < ::Regexp::Syntax::V2_4_1; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.6.0.rb:3 +class Regexp::Syntax::V2_6_0 < ::Regexp::Syntax::V2_5_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.6.2.rb:3 +class Regexp::Syntax::V2_6_2 < ::Regexp::Syntax::V2_6_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.6.3.rb:3 +class Regexp::Syntax::V2_6_3 < ::Regexp::Syntax::V2_6_2; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/3.1.0.rb:3 +class Regexp::Syntax::V3_1_0 < ::Regexp::Syntax::V2_6_3; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/3.2.0.rb:3 +class Regexp::Syntax::V3_2_0 < ::Regexp::Syntax::V3_1_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/3.5.0.rb:1 +class Regexp::Syntax::V3_5_0 < ::Regexp::Syntax::V3_2_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/4.0.0.rb:1 +class Regexp::Syntax::V4_0_0 < ::Regexp::Syntax::V3_5_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:6 +Regexp::Syntax::VERSION_CONST_REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:4 +Regexp::Syntax::VERSION_FORMAT = T.let(T.unsafe(nil), String) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:5 +Regexp::Syntax::VERSION_REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/regexp_parser#lib/regexp_parser/token.rb:4 +Regexp::TOKEN_KEYS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 +class Regexp::Token < ::Struct + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def conditional_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def conditional_level=(_); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:22 + def length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def level=(_); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:16 + def next; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:16 + def next=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:18 + def offset; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:16 + def previous; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:16 + def previous=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def set_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def set_level=(_); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def te; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def te=(_); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def text; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def text=(_); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def token; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def token=(_); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def ts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def ts=(_); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def type; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def type=(_); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def [](*_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def inspect; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def keyword_init?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def members; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def new(*_arg0); end + end +end diff --git a/sorbet/rbi/gems/regexp_parser@2.9.2.rbi b/sorbet/rbi/gems/regexp_parser@2.9.2.rbi deleted file mode 100644 index 5253fea7d..000000000 --- a/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +++ /dev/null @@ -1,3771 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `regexp_parser` gem. -# Please instead update this file by running `bin/tapioca gem regexp_parser`. - -# source://regexp_parser//lib/regexp_parser/expression/shared.rb#1 -module Regexp::Expression; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#5 -class Regexp::Expression::Alternation < ::Regexp::Expression::SequenceOperation - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 - def alternatives; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#9 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#131 - def match_length; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#6 -Regexp::Expression::Alternation::OPERAND = Regexp::Expression::Alternative - -# A sequence of expressions, used by Alternation as one of its alternatives. -# -# source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#3 -class Regexp::Expression::Alternative < ::Regexp::Expression::Sequence - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#10 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#2 -module Regexp::Expression::Anchor; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#18 -Regexp::Expression::Anchor::BOL = Regexp::Expression::Anchor::BeginningOfLine - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#20 -Regexp::Expression::Anchor::BOS = Regexp::Expression::Anchor::BeginningOfString - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#3 -class Regexp::Expression::Anchor::Base < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 - def match_length; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#5 -class Regexp::Expression::Anchor::BeginningOfLine < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#11 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#8 -class Regexp::Expression::Anchor::BeginningOfString < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#12 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#19 -Regexp::Expression::Anchor::EOL = Regexp::Expression::Anchor::EndOfLine - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#21 -Regexp::Expression::Anchor::EOS = Regexp::Expression::Anchor::EndOfString - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#22 -Regexp::Expression::Anchor::EOSobEOL = Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#6 -class Regexp::Expression::Anchor::EndOfLine < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#13 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#9 -class Regexp::Expression::Anchor::EndOfString < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#14 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#11 -class Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#15 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#16 -class Regexp::Expression::Anchor::MatchStart < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#16 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#14 -class Regexp::Expression::Anchor::NonWordBoundary < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#17 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#13 - def negative?; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#13 -class Regexp::Expression::Anchor::WordBoundary < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#18 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#64 -module Regexp::Expression::Assertion; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#65 -class Regexp::Expression::Assertion::Base < ::Regexp::Expression::Group::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 - def match_length; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#67 -class Regexp::Expression::Assertion::Lookahead < ::Regexp::Expression::Assertion::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#19 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#70 -class Regexp::Expression::Assertion::Lookbehind < ::Regexp::Expression::Assertion::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#20 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#68 -class Regexp::Expression::Assertion::NegativeLookahead < ::Regexp::Expression::Assertion::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#21 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#14 - def negative?; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#71 -class Regexp::Expression::Assertion::NegativeLookbehind < ::Regexp::Expression::Assertion::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#22 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#15 - def negative?; end -end - -# alias for symmetry between token symbol and Expression class name -# -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#74 -Regexp::Expression::Backref = Regexp::Expression::Backreference - -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#2 -module Regexp::Expression::Backreference; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#3 -class Regexp::Expression::Backreference::Base < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#155 - def match_length; end - - # Returns the value of attribute referenced_expression. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#4 - def referenced_expression; end - - # Sets the attribute referenced_expression - # - # @param value the value to set the attribute referenced_expression to. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#4 - def referenced_expression=(_arg0); end - - private - - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#6 - def initialize_copy(orig); end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#140 - def referential?; end - end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#34 -class Regexp::Expression::Backreference::Name < ::Regexp::Expression::Backreference::Base - # @return [Name] a new instance of Name - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#38 - def initialize(token, options = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#23 - def human_name; end - - # Returns the value of attribute name. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#35 - def name; end - - # Returns the value of attribute name. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#35 - def reference; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#50 -class Regexp::Expression::Backreference::NameCall < ::Regexp::Expression::Backreference::Name - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#24 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#62 -class Regexp::Expression::Backreference::NameRecursionLevel < ::Regexp::Expression::Backreference::Name - # @return [NameRecursionLevel] a new instance of NameRecursionLevel - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#65 - def initialize(token, options = T.unsafe(nil)); end - - # Returns the value of attribute recursion_level. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#63 - def recursion_level; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#24 -class Regexp::Expression::Backreference::Number < ::Regexp::Expression::Backreference::Base - # @return [Number] a new instance of Number - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#28 - def initialize(token, options = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#25 - def human_name; end - - # Returns the value of attribute number. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#25 - def number; end - - # Returns the value of attribute number. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#25 - def reference; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#49 -class Regexp::Expression::Backreference::NumberCall < ::Regexp::Expression::Backreference::Number - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#27 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#51 -class Regexp::Expression::Backreference::NumberCallRelative < ::Regexp::Expression::Backreference::NumberRelative - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#28 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#53 -class Regexp::Expression::Backreference::NumberRecursionLevel < ::Regexp::Expression::Backreference::NumberRelative - # @return [NumberRecursionLevel] a new instance of NumberRecursionLevel - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#56 - def initialize(token, options = T.unsafe(nil)); end - - # Returns the value of attribute recursion_level. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#54 - def recursion_level; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#44 -class Regexp::Expression::Backreference::NumberRelative < ::Regexp::Expression::Backreference::Number - # Returns the value of attribute effective_number. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#45 - def effective_number; end - - # Sets the attribute effective_number - # - # @param value the value to set the attribute effective_number to. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#45 - def effective_number=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#26 - def human_name; end - - # Returns the value of attribute effective_number. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#45 - def reference; end -end - -# source://regexp_parser//lib/regexp_parser/expression/base.rb#2 -class Regexp::Expression::Base - include ::Regexp::Expression::Shared - extend ::Regexp::Expression::Shared::ClassMethods - - # @return [Base] a new instance of Base - # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 - def initialize(token, options = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#8 - def =~(string, offset = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#25 - def a?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#25 - def ascii_classes?; end - - # source://regexp_parser//lib/regexp_parser/expression/base.rb#60 - def attributes; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#8 - def case_insensitive?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def conditional_level; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def conditional_level=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def custom_to_s_handling; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def custom_to_s_handling=(_arg0); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#20 - def d?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#20 - def default_classes?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#14 - def extended?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#14 - def free_spacing?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#47 - def greedy?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#8 - def i?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#8 - def ignore_case?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#51 - def lazy?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def level; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def level=(_arg0); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#3 - def m?; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#8 - def match(string, offset = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#3 - def match?(string); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#3 - def matches?(string); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#3 - def multiline?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 - def nesting_level; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def options; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def options=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def parent; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def parent=(_arg0); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#56 - def possessive?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def pre_quantifier_decorations; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def pre_quantifier_decorations=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 - def quantifier; end - - # source://regexp_parser//lib/regexp_parser/expression/base.rb#17 - def quantify(*args); end - - # Deprecated. Prefer `#repetitions` which has a more uniform interface. - # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#26 - def quantity; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#51 - def reluctant?; end - - # source://regexp_parser//lib/regexp_parser/expression/base.rb#31 - def repetitions; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def set_level; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def set_level=(_arg0); end - - # %l Level (depth) of the expression. Returns 'root' for the root - # expression, returns zero or higher for all others. - # - # %> Indentation at expression's level. - # - # %x Index of the expression at its depth. Available when using - # the sprintf_tree method only. - # - # %s Start offset within the whole expression. - # %e End offset within the whole expression. - # %S Length of expression. - # - # %o Coded offset and length, same as '@%s+%S' - # - # %y Type of expression. - # %k Token of expression. - # %i ID, same as '%y:%k' - # %c Class name - # - # %q Quantifier info, as {m[,M]} - # %Q Quantifier text - # - # %z Quantifier min - # %Z Quantifier max - # - # %t Base text of the expression (excludes quantifier, if any) - # %~t Full text if the expression is terminal, otherwise %i - # %T Full text of the expression (includes quantifier, if any) - # - # %b Basic info, same as '%o %i' - # %m Most info, same as '%b %q' - # %a All info, same as '%m %t' - # - # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#37 - def strfre(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end - - # %l Level (depth) of the expression. Returns 'root' for the root - # expression, returns zero or higher for all others. - # - # %> Indentation at expression's level. - # - # %x Index of the expression at its depth. Available when using - # the sprintf_tree method only. - # - # %s Start offset within the whole expression. - # %e End offset within the whole expression. - # %S Length of expression. - # - # %o Coded offset and length, same as '@%s+%S' - # - # %y Type of expression. - # %k Token of expression. - # %i ID, same as '%y:%k' - # %c Class name - # - # %q Quantifier info, as {m[,M]} - # %Q Quantifier text - # - # %z Quantifier min - # %Z Quantifier max - # - # %t Base text of the expression (excludes quantifier, if any) - # %~t Full text if the expression is terminal, otherwise %i - # %T Full text of the expression (includes quantifier, if any) - # - # %b Basic info, same as '%o %i' - # %m Most info, same as '%b %q' - # %a All info, same as '%m %t' - # - # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#37 - def strfregexp(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def te; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def te=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def text; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def text=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/base.rb#60 - def to_h; end - - # source://regexp_parser//lib/regexp_parser/expression/base.rb#9 - def to_re(format = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def token; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def token=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def ts; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def ts=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def type; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def type=(_arg0); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#30 - def u?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#30 - def unicode_classes?; end - - # source://regexp_parser//lib/regexp_parser/expression/base.rb#21 - def unquantified_clone; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#14 - def x?; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#2 -class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression - # @return [CharacterSet] a new instance of CharacterSet - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#6 - def initialize(token, options = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#16 - def close; end - - # Returns the value of attribute closed. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 - def closed; end - - # Sets the attribute closed - # - # @param value the value to set the attribute closed to. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 - def closed=(_arg0); end - - # Returns the value of attribute closed. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 - def closed?; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 - def match_length; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#12 - def negate; end - - # Returns the value of attribute negative. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 - def negative; end - - # Sets the attribute negative - # - # @param value the value to set the attribute negative to. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 - def negative=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#16 - def negative?; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#15 - def parts; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/intersection.rb#3 -class Regexp::Expression::CharacterSet::IntersectedSequence < ::Regexp::Expression::Sequence - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#29 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 - def match_length; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/intersection.rb#5 -class Regexp::Expression::CharacterSet::Intersection < ::Regexp::Expression::SequenceOperation - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#30 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 - def match_length; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/intersection.rb#6 -Regexp::Expression::CharacterSet::Intersection::OPERAND = Regexp::Expression::CharacterSet::IntersectedSequence - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#3 -class Regexp::Expression::CharacterSet::Range < ::Regexp::Expression::Subexpression - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#8 - def <<(exp); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#14 - def complete?; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#31 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 - def match_length; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#16 - def parts; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#4 - def ts; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#2 -module Regexp::Expression::CharacterType; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#5 -class Regexp::Expression::CharacterType::Any < ::Regexp::Expression::CharacterType::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#32 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#3 -class Regexp::Expression::CharacterType::Base < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 - def match_length; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#17 - def negative?; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#6 -class Regexp::Expression::CharacterType::Digit < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#15 -class Regexp::Expression::CharacterType::ExtendedGrapheme < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#8 -class Regexp::Expression::CharacterType::Hex < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#14 -class Regexp::Expression::CharacterType::Linebreak < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#7 -class Regexp::Expression::CharacterType::NonDigit < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#9 -class Regexp::Expression::CharacterType::NonHex < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#13 -class Regexp::Expression::CharacterType::NonSpace < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#11 -class Regexp::Expression::CharacterType::NonWord < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#12 -class Regexp::Expression::CharacterType::Space < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#10 -class Regexp::Expression::CharacterType::Word < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#8 -class Regexp::Expression::Comment < ::Regexp::Expression::FreeSpace - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#33 - def human_name; end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#130 - def comment?; end - end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#2 -module Regexp::Expression::Conditional; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#25 -class Regexp::Expression::Conditional::Branch < ::Regexp::Expression::Sequence - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#34 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#9 -class Regexp::Expression::Conditional::Condition < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#35 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 - def match_length; end - - # Name or number of the referenced capturing group that determines state. - # Returns a String if reference is by name, Integer if by number. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#14 - def reference; end - - # Returns the value of attribute referenced_expression. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#10 - def referenced_expression; end - - # Sets the attribute referenced_expression - # - # @param value the value to set the attribute referenced_expression to. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#10 - def referenced_expression=(_arg0); end - - private - - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#19 - def initialize_copy(orig); end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#141 - def referential?; end - end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#27 -class Regexp::Expression::Conditional::Expression < ::Regexp::Expression::Subexpression - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#30 - def <<(exp); end - - # @raise [TooManyBranches] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#34 - def add_sequence(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end - - # @raise [TooManyBranches] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#34 - def branch(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#50 - def branches; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#46 - def condition; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#41 - def condition=(exp); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#36 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#131 - def match_length; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#17 - def parts; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#54 - def reference; end - - # Returns the value of attribute referenced_expression. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#28 - def referenced_expression; end - - # Sets the attribute referenced_expression - # - # @param value the value to set the attribute referenced_expression to. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#28 - def referenced_expression=(_arg0); end - - private - - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#58 - def initialize_copy(orig); end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#142 - def referential?; end - end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#3 -class Regexp::Expression::Conditional::TooManyBranches < ::Regexp::Parser::Error - # @return [TooManyBranches] a new instance of TooManyBranches - # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#4 - def initialize; end -end - -# alias for symmetry between Token::* and Expression::* -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#101 -Regexp::Expression::Escape = Regexp::Expression::EscapeSequence - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#2 -module Regexp::Expression::EscapeSequence; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#63 -class Regexp::Expression::EscapeSequence::AbstractMetaControlSequence < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#64 - def char; end - - private - - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#70 - def control_sequence_to_s(control_sequence); end - - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#75 - def meta_char_to_codepoint(meta_char); end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#27 -class Regexp::Expression::EscapeSequence::AsciiEscape < ::Regexp::Expression::EscapeSequence::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#28 -class Regexp::Expression::EscapeSequence::Backspace < ::Regexp::Expression::EscapeSequence::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#3 -class Regexp::Expression::EscapeSequence::Base < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#9 - def char; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#4 - def codepoint; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 - def match_length; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#29 -class Regexp::Expression::EscapeSequence::Bell < ::Regexp::Expression::EscapeSequence::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#37 -class Regexp::Expression::EscapeSequence::Codepoint < ::Regexp::Expression::EscapeSequence::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#39 -class Regexp::Expression::EscapeSequence::CodepointList < ::Regexp::Expression::EscapeSequence::Base - # @raise [NoMethodError] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#40 - def char; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#48 - def chars; end - - # @raise [NoMethodError] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#44 - def codepoint; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#52 - def codepoints; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#164 - def match_length; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#81 -class Regexp::Expression::EscapeSequence::Control < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#82 - def codepoint; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#30 -class Regexp::Expression::EscapeSequence::FormFeed < ::Regexp::Expression::EscapeSequence::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#36 -class Regexp::Expression::EscapeSequence::Hex < ::Regexp::Expression::EscapeSequence::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#21 -class Regexp::Expression::EscapeSequence::Literal < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#22 - def char; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#87 -class Regexp::Expression::EscapeSequence::Meta < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#88 - def codepoint; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#93 -class Regexp::Expression::EscapeSequence::MetaControl < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#94 - def codepoint; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#31 -class Regexp::Expression::EscapeSequence::Newline < ::Regexp::Expression::EscapeSequence::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#57 -class Regexp::Expression::EscapeSequence::Octal < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#58 - def char; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#32 -class Regexp::Expression::EscapeSequence::Return < ::Regexp::Expression::EscapeSequence::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#33 -class Regexp::Expression::EscapeSequence::Tab < ::Regexp::Expression::EscapeSequence::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#34 -class Regexp::Expression::EscapeSequence::VerticalTab < ::Regexp::Expression::EscapeSequence::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#2 -class Regexp::Expression::FreeSpace < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 - def match_length; end - - # @raise [Regexp::Parser::Error] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#3 - def quantify(*_args); end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#135 - def decorative?; end - end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#2 -module Regexp::Expression::Group; end - -# Special case. Absence group can match 0.. chars, irrespective of content. -# TODO: in theory, they *can* exclude match lengths with `.`: `(?~.{3})` -# -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#19 -class Regexp::Expression::Group::Absence < ::Regexp::Expression::Group::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#172 - def match_length; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#20 -class Regexp::Expression::Group::Atomic < ::Regexp::Expression::Group::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#3 -class Regexp::Expression::Group::Base < ::Regexp::Expression::Subexpression - # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#18 - def parts; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#40 -class Regexp::Expression::Group::Capture < ::Regexp::Expression::Group::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#37 - def human_name; end - - # Returns the value of attribute number. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 - def identifier; end - - # Returns the value of attribute number. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 - def number; end - - # Sets the attribute number - # - # @param value the value to set the attribute number to. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 - def number=(_arg0); end - - # Returns the value of attribute number_at_level. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 - def number_at_level; end - - # Sets the attribute number_at_level - # - # @param value the value to set the attribute number_at_level to. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 - def number_at_level=(_arg0); end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#126 - def capturing?; end - end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#60 -class Regexp::Expression::Group::Comment < ::Regexp::Expression::Group::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#20 - def parts; end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#131 - def comment?; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#136 - def decorative?; end - end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#45 -class Regexp::Expression::Group::Named < ::Regexp::Expression::Group::Capture - # @return [Named] a new instance of Named - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#49 - def initialize(token, options = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#38 - def human_name; end - - # Returns the value of attribute name. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#46 - def identifier; end - - # Returns the value of attribute name. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#46 - def name; end - - private - - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#54 - def initialize_copy(orig); end -end - -# TODO: should split off OptionsSwitch in v3.0.0. Maybe even make it no -# longer inherit from Group because it is effectively a terminal expression. -# -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#23 -class Regexp::Expression::Group::Options < ::Regexp::Expression::Group::Base - # Returns the value of attribute option_changes. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#24 - def option_changes; end - - # Sets the attribute option_changes - # - # @param value the value to set the attribute option_changes to. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#24 - def option_changes=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#31 - def quantify(*args); end - - private - - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#26 - def initialize_copy(orig); end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#6 -class Regexp::Expression::Group::Passive < ::Regexp::Expression::Group::Base - # @return [Passive] a new instance of Passive - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#9 - def initialize(*_arg0); end - - # Sets the attribute implicit - # - # @param value the value to set the attribute implicit to. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#7 - def implicit=(_arg0); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#14 - def implicit?; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#19 - def parts; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#2 -module Regexp::Expression::Keep; end - -# TODO: in regexp_parser v3.0.0 this should possibly be a Subexpression -# that contains all expressions to its left. -# -# source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#5 -class Regexp::Expression::Keep::Mark < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#39 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 - def match_length; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/literal.rb#2 -class Regexp::Expression::Literal < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#40 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#105 - def match_length; end -end - -# source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#85 -Regexp::Expression::MatchLength = Regexp::MatchLength - -# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#10 -Regexp::Expression::Nonposixclass = Regexp::Expression::PosixClass - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#118 -Regexp::Expression::Nonproperty = Regexp::Expression::UnicodeProperty - -# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#2 -class Regexp::Expression::PosixClass < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 - def match_length; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#3 - def name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#18 - def negative?; end -end - -# alias for symmetry between token symbol and Expression class name -# -# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#9 -Regexp::Expression::Posixclass = Regexp::Expression::PosixClass - -# alias for symmetry between token symbol and Expression class name -# -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#117 -Regexp::Expression::Property = Regexp::Expression::UnicodeProperty - -# TODO: in v3.0.0, maybe put Shared back into Base, and inherit from Base and -# call super in #initialize, but raise in #quantifier= and #quantify, -# or introduce an Expression::Quantifiable intermediate class. -# Or actually allow chaining as a more concise but tricky solution than PR#69. -# -# source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#6 -class Regexp::Expression::Quantifier - include ::Regexp::Expression::Shared - extend ::Regexp::Expression::Shared::ClassMethods - - # @return [Quantifier] a new instance of Quantifier - # - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#11 - def initialize(*args); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def conditional_level; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def conditional_level=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def custom_to_s_handling; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def custom_to_s_handling=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 - def greedy?; end - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 - def lazy?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def level; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def level=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#42 - def max; end - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#38 - def min; end - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#46 - def mode; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 - def nesting_level; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def options; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def options=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def parent; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def parent=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 - def possessive?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def pre_quantifier_decorations; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def pre_quantifier_decorations=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 - def quantifier; end - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 - def reluctant?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def set_level; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def set_level=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def te; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def te=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def text; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def text=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#19 - def to_h; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def token; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def token=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def ts; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def ts=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def type; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def type=(_arg0); end - - private - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#52 - def deprecated_old_init(token, text, _min, _max, _mode = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#64 - def derived_data; end -end - -# source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 -Regexp::Expression::Quantifier::MODES = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/expression/classes/root.rb#2 -class Regexp::Expression::Root < ::Regexp::Expression::Subexpression - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#41 - def human_name; end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/classes/root.rb#3 - def build(options = T.unsafe(nil)); end - end -end - -# A sequence of expressions. Differs from a Subexpressions by how it handles -# quantifiers, as it applies them to its last element instead of itself as -# a whole subexpression. -# -# Used as the base class for the Alternation alternatives, Conditional -# branches, and CharacterSet::Intersection intersected sequences. -# -# source://regexp_parser//lib/regexp_parser/expression/sequence.rb#8 -class Regexp::Expression::Sequence < ::Regexp::Expression::Subexpression - # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#27 - def quantify(token, *args); end - - # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#23 - def ts; end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#10 - def add_to(exp, params = T.unsafe(nil), active_opts = T.unsafe(nil)); end - end -end - -# abstract class -# -# source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#3 -class Regexp::Expression::SequenceOperation < ::Regexp::Expression::Subexpression - # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#12 - def <<(exp); end - - # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#16 - def add_sequence(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 - def operands; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def operator; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#22 - def parts; end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 - def sequences; end - - # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#8 - def ts; end -end - -# alias for symmetry between token symbol and Expression class name -# -# source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#22 -Regexp::Expression::Set = Regexp::Expression::CharacterSet - -# source://regexp_parser//lib/regexp_parser/expression/shared.rb#2 -module Regexp::Expression::Shared - mixes_in_class_methods ::Regexp::Expression::Shared::ClassMethods - - # Deep-compare two expressions for equality. - # - # When changing the conditions, please make sure to update - # #pretty_print_instance_variables so that it includes all relevant values. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#101 - def ==(other); end - - # Deep-compare two expressions for equality. - # - # When changing the conditions, please make sure to update - # #pretty_print_instance_variables so that it includes all relevant values. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#101 - def ===(other); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#51 - def base_length; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#124 - def capturing?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#96 - def coded_offset; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#128 - def comment?; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#133 - def decorative?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#47 - def ends_at(include_quantifier = T.unsafe(nil)); end - - # Deep-compare two expressions for equality. - # - # When changing the conditions, please make sure to update - # #pretty_print_instance_variables so that it includes all relevant values. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#101 - def eql?(other); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#55 - def full_length; end - - # default implementation, e.g. "atomic group", "hex escape", "word type", .. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#4 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#3 - def inspect; end - - # Test if this expression has the given test_token, and optionally a given - # test_type. - # - # # Any expressions - # exp.is? :* # always returns true - # - # # is it a :capture - # exp.is? :capture - # - # # is it a :character and a :set - # exp.is? :character, :set - # - # # is it a :meta :dot - # exp.is? :dot, :meta - # - # # is it a :meta or :escape :dot - # exp.is? :dot, [:meta, :escape] - # - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#36 - def is?(test_token, test_type = T.unsafe(nil)); end - - # not an alias so as to respect overrides of #negative? - # - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#8 - def negated?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#3 - def negative?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#100 - def nesting_level=(lvl); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#92 - def offset; end - - # Test if this expression matches an entry in the given scope spec. - # - # A scope spec can be one of: - # - # . An array: Interpreted as a set of tokens, tested for inclusion - # of the expression's token. - # - # . A hash: Where the key is interpreted as the expression type - # and the value is either a symbol or an array. In this - # case, when the scope is a hash, one_of? calls itself to - # evaluate the key's value. - # - # . A symbol: matches the expression's token or type, depending on - # the level of the call. If one_of? is called directly with - # a symbol then it will always be checked against the - # type of the expression. If it's being called for a value - # from a hash, it will be checked against the token of the - # expression. - # - # # any expression - # exp.one_of?(:*) # always true - # - # # like exp.type?(:group) - # exp.one_of?(:group) - # - # # any expression of type meta - # exp.one_of?(:meta => :*) - # - # # meta dots and alternations - # exp.one_of?(:meta => [:dot, :alternation]) - # - # # meta dots and any set tokens - # exp.one_of?({meta: [:dot], set: :*}) - # - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#75 - def one_of?(scope, top = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#111 - def optional?; end - - # default implementation - # - # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#4 - def parts; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#84 - def pre_quantifier_decoration(expression_format = T.unsafe(nil)); end - - # Make pretty-print work despite #inspect implementation. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#12 - def pretty_print(q); end - - # Called by pretty_print (ruby/pp) and #inspect. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#17 - def pretty_print_instance_variables; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#115 - def quantified?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#106 - def quantifier=(qtf); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#88 - def quantifier_affix(expression_format = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#138 - def referential?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#43 - def starts_at; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#120 - def terminal?; end - - # #to_s reproduces the original source, as an unparser would. - # - # It takes an optional format argument. - # - # Example: - # - # lit = Regexp::Parser.parse(/a +/x)[0] - # - # lit.to_s # => 'a+' # default; with quantifier - # lit.to_s(:full) # => 'a+' # default; with quantifier - # lit.to_s(:base) # => 'a' # without quantifier - # lit.to_s(:original) # => 'a +' # with quantifier AND intermittent decorations - # - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#72 - def to_s(format = T.unsafe(nil)); end - - # #to_s reproduces the original source, as an unparser would. - # - # It takes an optional format argument. - # - # Example: - # - # lit = Regexp::Parser.parse(/a +/x)[0] - # - # lit.to_s # => 'a+' # default; with quantifier - # lit.to_s(:full) # => 'a+' # default; with quantifier - # lit.to_s(:base) # => 'a' # without quantifier - # lit.to_s(:original) # => 'a +' # with quantifier AND intermittent decorations - # - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#72 - def to_str(format = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#37 - def token_class; end - - # Test if this expression has the given test_type, which can be either - # a symbol or an array of symbols to check against the expression's type. - # - # # is it a :group expression - # exp.type? :group - # - # # is it a :set, or :meta - # exp.type? [:set, :meta] - # - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#13 - def type?(test_type); end - - private - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#18 - def init_from_token_and_options(token, options = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#32 - def initialize_copy(orig); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#10 - def intersperse(expressions, separator); end - - class << self - # @private - # - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#5 - def included(mod); end - end -end - -# filled in ./methods/*.rb -# -# source://regexp_parser//lib/regexp_parser/expression/shared.rb#3 -module Regexp::Expression::Shared::ClassMethods - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#125 - def capturing?; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#129 - def comment?; end - - # Convenience method to init a valid Expression without a Regexp::Token - # - # @raise [ArgumentError] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#5 - def construct(params = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#15 - def construct_defaults; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#134 - def decorative?; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#139 - def referential?; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#121 - def terminal?; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#25 - def token_class; end -end - -# source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#2 -class Regexp::Expression::Subexpression < ::Regexp::Expression::Base - include ::Enumerable - - # @return [Subexpression] a new instance of Subexpression - # - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#7 - def initialize(token, options = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#20 - def <<(exp); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def [](*args, &block); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def at(*args, &block); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#33 - def dig(*indices); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def each(*args, &block); end - - # Traverses the expression, passing each recursive child to the - # given block. - # If the block takes two arguments, the indices of the children within - # their parents are also passed to it. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#8 - def each_expression(include_self = T.unsafe(nil), &block); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def empty?(*args, &block); end - - # Returns the value of attribute expressions. - # - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 - def expressions; end - - # Sets the attribute expressions - # - # @param value the value to set the attribute expressions to. - # - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 - def expressions=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#50 - def extract_quantifier_target(quantifier_description); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def fetch(*args, &block); end - - # Returns a new array with the results of calling the given block once - # for every expression. If a block is not given, returns an array with - # each expression and its level index as an array. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#56 - def flat_map(include_self = T.unsafe(nil), &block); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def index(*args, &block); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#118 - def inner_match_length; end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def join(*args, &block); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def last(*args, &block); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def length(*args, &block); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#111 - def match_length; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#21 - def parts; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#102 - def strfre_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#102 - def strfregexp_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#39 - def te; end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#43 - def to_h; end - - # Traverses the subexpression (depth-first, pre-order) and calls the given - # block for each expression with three arguments; the traversal event, - # the expression, and the index of the expression within its parent. - # - # The event argument is passed as follows: - # - # - For subexpressions, :enter upon entering the subexpression, and - # :exit upon exiting it. - # - # - For terminal expressions, :visit is called once. - # - # Returns self. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#32 - def traverse(include_self = T.unsafe(nil), &block); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def values_at(*args, &block); end - - # Traverses the subexpression (depth-first, pre-order) and calls the given - # block for each expression with three arguments; the traversal event, - # the expression, and the index of the expression within its parent. - # - # The event argument is passed as follows: - # - # - For subexpressions, :enter upon entering the subexpression, and - # :exit upon exiting it. - # - # - For terminal expressions, :visit is called once. - # - # Returns self. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#32 - def walk(include_self = T.unsafe(nil), &block); end - - protected - - # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#66 - def each_expression_with_index(&block); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#73 - def each_expression_without_index(&block); end - - private - - # Override base method to clone the expressions as well. - # - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#13 - def initialize_copy(orig); end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#122 - def terminal?; end - end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#2 -module Regexp::Expression::UnicodeProperty; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#108 -class Regexp::Expression::UnicodeProperty::Age < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#13 -class Regexp::Expression::UnicodeProperty::Alnum < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#14 -class Regexp::Expression::UnicodeProperty::Alpha < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#31 -class Regexp::Expression::UnicodeProperty::Any < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#15 -class Regexp::Expression::UnicodeProperty::Ascii < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#32 -class Regexp::Expression::UnicodeProperty::Assigned < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#3 -class Regexp::Expression::UnicodeProperty::Base < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 - def match_length; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#4 - def name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#19 - def negative?; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#8 - def shortcut; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#16 -class Regexp::Expression::UnicodeProperty::Blank < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#109 -class Regexp::Expression::UnicodeProperty::Block < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#17 -class Regexp::Expression::UnicodeProperty::Cntrl < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#97 -module Regexp::Expression::UnicodeProperty::Codepoint; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#100 -class Regexp::Expression::UnicodeProperty::Codepoint::Any < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#98 -class Regexp::Expression::UnicodeProperty::Codepoint::Base < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#101 -class Regexp::Expression::UnicodeProperty::Codepoint::Control < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#102 -class Regexp::Expression::UnicodeProperty::Codepoint::Format < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#104 -class Regexp::Expression::UnicodeProperty::Codepoint::PrivateUse < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#103 -class Regexp::Expression::UnicodeProperty::Codepoint::Surrogate < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#105 -class Regexp::Expression::UnicodeProperty::Codepoint::Unassigned < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#110 -class Regexp::Expression::UnicodeProperty::Derived < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#18 -class Regexp::Expression::UnicodeProperty::Digit < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#111 -class Regexp::Expression::UnicodeProperty::Emoji < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#112 -class Regexp::Expression::UnicodeProperty::Enumerated < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#19 -class Regexp::Expression::UnicodeProperty::Graph < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#34 -module Regexp::Expression::UnicodeProperty::Letter; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#37 -class Regexp::Expression::UnicodeProperty::Letter::Any < ::Regexp::Expression::UnicodeProperty::Letter::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#35 -class Regexp::Expression::UnicodeProperty::Letter::Base < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#38 -class Regexp::Expression::UnicodeProperty::Letter::Cased < ::Regexp::Expression::UnicodeProperty::Letter::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#40 -class Regexp::Expression::UnicodeProperty::Letter::Lowercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#42 -class Regexp::Expression::UnicodeProperty::Letter::Modifier < ::Regexp::Expression::UnicodeProperty::Letter::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#43 -class Regexp::Expression::UnicodeProperty::Letter::Other < ::Regexp::Expression::UnicodeProperty::Letter::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#41 -class Regexp::Expression::UnicodeProperty::Letter::Titlecase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#39 -class Regexp::Expression::UnicodeProperty::Letter::Uppercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#20 -class Regexp::Expression::UnicodeProperty::Lower < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#46 -module Regexp::Expression::UnicodeProperty::Mark; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#49 -class Regexp::Expression::UnicodeProperty::Mark::Any < ::Regexp::Expression::UnicodeProperty::Mark::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#47 -class Regexp::Expression::UnicodeProperty::Mark::Base < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#50 -class Regexp::Expression::UnicodeProperty::Mark::Combining < ::Regexp::Expression::UnicodeProperty::Mark::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#53 -class Regexp::Expression::UnicodeProperty::Mark::Enclosing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#51 -class Regexp::Expression::UnicodeProperty::Mark::Nonspacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#52 -class Regexp::Expression::UnicodeProperty::Mark::Spacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#29 -class Regexp::Expression::UnicodeProperty::Newline < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#56 -module Regexp::Expression::UnicodeProperty::Number; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#59 -class Regexp::Expression::UnicodeProperty::Number::Any < ::Regexp::Expression::UnicodeProperty::Number::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#57 -class Regexp::Expression::UnicodeProperty::Number::Base < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#60 -class Regexp::Expression::UnicodeProperty::Number::Decimal < ::Regexp::Expression::UnicodeProperty::Number::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#61 -class Regexp::Expression::UnicodeProperty::Number::Letter < ::Regexp::Expression::UnicodeProperty::Number::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#62 -class Regexp::Expression::UnicodeProperty::Number::Other < ::Regexp::Expression::UnicodeProperty::Number::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#21 -class Regexp::Expression::UnicodeProperty::Print < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#22 -class Regexp::Expression::UnicodeProperty::Punct < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#65 -module Regexp::Expression::UnicodeProperty::Punctuation; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#68 -class Regexp::Expression::UnicodeProperty::Punctuation::Any < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#66 -class Regexp::Expression::UnicodeProperty::Punctuation::Base < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#72 -class Regexp::Expression::UnicodeProperty::Punctuation::Close < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#69 -class Regexp::Expression::UnicodeProperty::Punctuation::Connector < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#70 -class Regexp::Expression::UnicodeProperty::Punctuation::Dash < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#74 -class Regexp::Expression::UnicodeProperty::Punctuation::Final < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#73 -class Regexp::Expression::UnicodeProperty::Punctuation::Initial < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#71 -class Regexp::Expression::UnicodeProperty::Punctuation::Open < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#75 -class Regexp::Expression::UnicodeProperty::Punctuation::Other < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#113 -class Regexp::Expression::UnicodeProperty::Script < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#78 -module Regexp::Expression::UnicodeProperty::Separator; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#81 -class Regexp::Expression::UnicodeProperty::Separator::Any < ::Regexp::Expression::UnicodeProperty::Separator::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#79 -class Regexp::Expression::UnicodeProperty::Separator::Base < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#83 -class Regexp::Expression::UnicodeProperty::Separator::Line < ::Regexp::Expression::UnicodeProperty::Separator::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#84 -class Regexp::Expression::UnicodeProperty::Separator::Paragraph < ::Regexp::Expression::UnicodeProperty::Separator::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#82 -class Regexp::Expression::UnicodeProperty::Separator::Space < ::Regexp::Expression::UnicodeProperty::Separator::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#23 -class Regexp::Expression::UnicodeProperty::Space < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#87 -module Regexp::Expression::UnicodeProperty::Symbol; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#90 -class Regexp::Expression::UnicodeProperty::Symbol::Any < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#88 -class Regexp::Expression::UnicodeProperty::Symbol::Base < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#92 -class Regexp::Expression::UnicodeProperty::Symbol::Currency < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#91 -class Regexp::Expression::UnicodeProperty::Symbol::Math < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#93 -class Regexp::Expression::UnicodeProperty::Symbol::Modifier < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#94 -class Regexp::Expression::UnicodeProperty::Symbol::Other < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#24 -class Regexp::Expression::UnicodeProperty::Upper < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#25 -class Regexp::Expression::UnicodeProperty::Word < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#27 -class Regexp::Expression::UnicodeProperty::XPosixPunct < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#26 -class Regexp::Expression::UnicodeProperty::Xdigit < ::Regexp::Expression::UnicodeProperty::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#11 -class Regexp::Expression::WhiteSpace < ::Regexp::Expression::FreeSpace - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#42 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#12 - def merge(exp); end -end - -# A very thin wrapper around the scanner that breaks quantified literal runs, -# collects emitted tokens into an array, calculates their nesting depth, and -# normalizes tokens for the parser, and checks if they are implemented by the -# given syntax flavor. -# -# source://regexp_parser//lib/regexp_parser/lexer.rb#5 -class Regexp::Lexer - # source://regexp_parser//lib/regexp_parser/lexer.rb#71 - def emit(token); end - - # source://regexp_parser//lib/regexp_parser/lexer.rb#20 - def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end - - private - - # source://regexp_parser//lib/regexp_parser/lexer.rb#91 - def ascend(type, token); end - - # Returns the value of attribute block. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def block; end - - # Sets the attribute block - # - # @param value the value to set the attribute block to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def block=(_arg0); end - - # if a codepoint list is followed by a quantifier, that quantifier applies - # to the last codepoint, e.g. /\u{61 62 63}{3}/ =~ 'abccc' - # c.f. #break_literal. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#143 - def break_codepoint_list(token); end - - # called by scan to break a literal run that is longer than one character - # into two separate tokens when it is followed by a quantifier - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#123 - def break_literal(token); end - - # Returns the value of attribute collect_tokens. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def collect_tokens; end - - # Sets the attribute collect_tokens - # - # @param value the value to set the attribute collect_tokens to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def collect_tokens=(_arg0); end - - # Returns the value of attribute conditional_nesting. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def conditional_nesting; end - - # Sets the attribute conditional_nesting - # - # @param value the value to set the attribute conditional_nesting to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def conditional_nesting=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/lexer.rb#106 - def descend(type, token); end - - # source://regexp_parser//lib/regexp_parser/lexer.rb#162 - def merge_condition(current, last); end - - # Returns the value of attribute nesting. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def nesting; end - - # Sets the attribute nesting - # - # @param value the value to set the attribute nesting to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def nesting=(_arg0); end - - # Returns the value of attribute preprev_token. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def preprev_token; end - - # Sets the attribute preprev_token - # - # @param value the value to set the attribute preprev_token to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def preprev_token=(_arg0); end - - # Returns the value of attribute prev_token. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def prev_token; end - - # Sets the attribute prev_token - # - # @param value the value to set the attribute prev_token to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def prev_token=(_arg0); end - - # Returns the value of attribute set_nesting. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def set_nesting; end - - # Sets the attribute set_nesting - # - # @param value the value to set the attribute set_nesting to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def set_nesting=(_arg0); end - - # Returns the value of attribute shift. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def shift; end - - # Sets the attribute shift - # - # @param value the value to set the attribute shift to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def shift=(_arg0); end - - # Returns the value of attribute tokens. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def tokens; end - - # Sets the attribute tokens - # - # @param value the value to set the attribute tokens to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def tokens=(_arg0); end - - class << self - # source://regexp_parser//lib/regexp_parser/lexer.rb#16 - def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end - - # source://regexp_parser//lib/regexp_parser/lexer.rb#16 - def scan(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end - end -end - -# source://regexp_parser//lib/regexp_parser/lexer.rb#12 -Regexp::Lexer::CLOSING_TOKENS = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/lexer.rb#14 -Regexp::Lexer::CONDITION_TOKENS = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/lexer.rb#7 -Regexp::Lexer::OPENING_TOKENS = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#1 -class Regexp::MatchLength - include ::Enumerable - - # @return [MatchLength] a new instance of MatchLength - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#9 - def initialize(exp, opts = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#24 - def each(opts = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#35 - def endless_each; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#44 - def fixed?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#40 - def include?(length); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#60 - def inspect; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#52 - def max; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#48 - def min; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#56 - def minmax; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#65 - def to_re; end - - private - - # Returns the value of attribute base_max. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def base_max; end - - # Sets the attribute base_max - # - # @param value the value to set the attribute base_max to. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def base_max=(_arg0); end - - # Returns the value of attribute base_min. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def base_min; end - - # Sets the attribute base_min - # - # @param value the value to set the attribute base_min to. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def base_min=(_arg0); end - - # Returns the value of attribute exp_class. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def exp_class; end - - # Sets the attribute exp_class - # - # @param value the value to set the attribute exp_class to. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def exp_class=(_arg0); end - - # Returns the value of attribute max_rep. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def max_rep; end - - # Sets the attribute max_rep - # - # @param value the value to set the attribute max_rep to. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def max_rep=(_arg0); end - - # Returns the value of attribute min_rep. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def min_rep; end - - # Sets the attribute min_rep - # - # @param value the value to set the attribute min_rep to. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def min_rep=(_arg0); end - - # Returns the value of attribute reify. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def reify; end - - # Sets the attribute reify - # - # @param value the value to set the attribute reify to. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def reify=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#74 - def test_regexp; end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#4 - def of(obj); end - end -end - -# source://regexp_parser//lib/regexp_parser/version.rb#2 -class Regexp::Parser - include ::Regexp::Expression - - # source://regexp_parser//lib/regexp_parser/parser.rb#25 - def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end - - private - - # source://regexp_parser//lib/regexp_parser/parser.rb#574 - def active_opts; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#99 - def anchor(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#262 - def assign_effective_number(exp); end - - # Assigns referenced expressions to referring expressions, e.g. if there is - # an instance of Backreference::Number, its #referenced_expression is set to - # the instance of Group::Capture that it refers to via its number. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#581 - def assign_referenced_expressions; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#227 - def backref(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#202 - def captured_group_count_at_level; end - - # Returns the value of attribute captured_group_counts. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def captured_group_counts; end - - # Sets the attribute captured_group_counts - # - # @param value the value to set the attribute captured_group_counts to. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def captured_group_counts=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#570 - def close_completed_character_set_range; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#210 - def close_group; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#538 - def close_set; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#269 - def conditional(token); end - - # Returns the value of attribute conditional_nesting. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def conditional_nesting; end - - # Sets the attribute conditional_nesting - # - # @param value the value to set the attribute conditional_nesting to. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def conditional_nesting=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#206 - def count_captured_group; end - - # @yield [node] - # - # source://regexp_parser//lib/regexp_parser/parser.rb#216 - def decrease_nesting; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#305 - def escape(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#60 - def extract_options(input, options); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#349 - def free_space(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#114 - def group(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#509 - def increase_group_level(exp); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#549 - def intersection(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#360 - def keep(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#364 - def literal(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#368 - def meta(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#534 - def negate_set; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#299 - def nest(exp); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#294 - def nest_conditional(exp); end - - # Returns the value of attribute nesting. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def nesting; end - - # Sets the attribute nesting - # - # @param value the value to set the attribute nesting to. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def nesting=(_arg0); end - - # Returns the value of attribute node. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def node; end - - # Sets the attribute node - # - # @param value the value to set the attribute node to. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def node=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#165 - def open_group(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#527 - def open_set(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#130 - def options_group(token); end - - # Returns the value of attribute options_stack. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def options_stack; end - - # Sets the attribute options_stack - # - # @param value the value to set the attribute options_stack to. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def options_stack=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#76 - def parse_token(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#390 - def posixclass(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#397 - def property(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#479 - def quantifier(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#542 - def range(token); end - - # Returns the value of attribute root. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def root; end - - # Sets the attribute root - # - # @param value the value to set the attribute root to. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def root=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#379 - def sequence_operation(klass, token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#515 - def set(token); end - - # Returns the value of attribute switching_options. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def switching_options; end - - # Sets the attribute switching_options - # - # @param value the value to set the attribute switching_options to. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def switching_options=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#198 - def total_captured_group_count; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#553 - def type(token); end - - class << self - # source://regexp_parser//lib/regexp_parser/parser.rb#21 - def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end - end -end - -# source://regexp_parser//lib/regexp_parser/parser.rb#128 -Regexp::Parser::ENC_FLAGS = T.let(T.unsafe(nil), Array) - -# base class for all gem-specific errors -# -# source://regexp_parser//lib/regexp_parser/error.rb#3 -class Regexp::Parser::Error < ::StandardError; end - -# source://regexp_parser//lib/regexp_parser/parser.rb#127 -Regexp::Parser::MOD_FLAGS = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/parser.rb#7 -class Regexp::Parser::ParserError < ::Regexp::Parser::Error; end - -# source://regexp_parser//lib/regexp_parser/parser.rb#394 -Regexp::Parser::UP = Regexp::Expression::UnicodeProperty - -# source://regexp_parser//lib/regexp_parser/parser.rb#395 -Regexp::Parser::UPTokens = Regexp::Syntax::Token::UnicodeProperty - -# source://regexp_parser//lib/regexp_parser/parser.rb#15 -class Regexp::Parser::UnknownTokenError < ::Regexp::Parser::ParserError - # @return [UnknownTokenError] a new instance of UnknownTokenError - # - # source://regexp_parser//lib/regexp_parser/parser.rb#16 - def initialize(type, token); end -end - -# source://regexp_parser//lib/regexp_parser/parser.rb#9 -class Regexp::Parser::UnknownTokenTypeError < ::Regexp::Parser::ParserError - # @return [UnknownTokenTypeError] a new instance of UnknownTokenTypeError - # - # source://regexp_parser//lib/regexp_parser/parser.rb#10 - def initialize(type, token); end -end - -# source://regexp_parser//lib/regexp_parser/version.rb#3 -Regexp::Parser::VERSION = T.let(T.unsafe(nil), String) - -# source://regexp_parser//lib/regexp_parser/scanner/errors/scanner_error.rb#3 -class Regexp::Scanner - # Emits an array with the details of the scanned pattern - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2406 - def emit(type, token, text); end - - # only public for #||= to work on ruby <= 2.5 - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2431 - def literal_run; end - - # only public for #||= to work on ruby <= 2.5 - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2431 - def literal_run=(_arg0); end - - # @raise [PrematureEndError] - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#24 - def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end - - private - - # Appends one or more characters to the literal buffer, to be emitted later - # by a call to emit_literal. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2468 - def append_literal(data, ts, te); end - - # Returns the value of attribute block. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def block; end - - # Sets the attribute block - # - # @param value the value to set the attribute block to. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def block=(_arg0); end - - # Returns the value of attribute char_pos. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def char_pos; end - - # Sets the attribute char_pos - # - # @param value the value to set the attribute char_pos to. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def char_pos=(_arg0); end - - # Returns the value of attribute collect_tokens. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def collect_tokens; end - - # Sets the attribute collect_tokens - # - # @param value the value to set the attribute collect_tokens to. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def collect_tokens=(_arg0); end - - # Returns the value of attribute conditional_stack. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def conditional_stack; end - - # Sets the attribute conditional_stack - # - # @param value the value to set the attribute conditional_stack to. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def conditional_stack=(_arg0); end - - # Copy from ts to te from data as text - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2462 - def copy(data, ts, te); end - - # Emits the literal run collected by calls to the append_literal method. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2473 - def emit_literal; end - - # source://regexp_parser//lib/regexp_parser/scanner.rb#2508 - def emit_meta_control_sequence(data, ts, te, token); end - - # source://regexp_parser//lib/regexp_parser/scanner.rb#2479 - def emit_options(text); end - - # Returns the value of attribute free_spacing. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def free_spacing; end - - # Sets the attribute free_spacing - # - # @param value the value to set the attribute free_spacing to. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def free_spacing=(_arg0); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2441 - def free_spacing?(input_object, options); end - - # Returns the value of attribute group_depth. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def group_depth; end - - # Sets the attribute group_depth - # - # @param value the value to set the attribute group_depth to. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def group_depth=(_arg0); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2453 - def in_group?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2457 - def in_set?; end - - # Returns the value of attribute prev_token. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def prev_token; end - - # Sets the attribute prev_token - # - # @param value the value to set the attribute prev_token to. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def prev_token=(_arg0); end - - # Returns the value of attribute set_depth. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def set_depth; end - - # Sets the attribute set_depth - # - # @param value the value to set the attribute set_depth to. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def set_depth=(_arg0); end - - # Returns the value of attribute spacing_stack. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def spacing_stack; end - - # Sets the attribute spacing_stack - # - # @param value the value to set the attribute spacing_stack to. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def spacing_stack=(_arg0); end - - # Returns the value of attribute tokens. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def tokens; end - - # Sets the attribute tokens - # - # @param value the value to set the attribute tokens to. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 - def tokens=(_arg0); end - - class << self - # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 - def long_prop_map; end - - # source://regexp_parser//lib/regexp_parser/scanner.rb#2396 - def parse_prop_map(name); end - - # source://regexp_parser//lib/regexp_parser/scanner.rb#2400 - def posix_classes; end - - # Scans the given regular expression text, or Regexp object and collects the - # emitted token into an array that gets returned at the end. If a block is - # given, it gets called for each emitted token. - # - # This method may raise errors if a syntax error is encountered. - # -------------------------------------------------------------------------- - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#20 - def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end - - # lazy-load property maps when first needed - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2388 - def short_prop_map; end - end -end - -# Invalid back reference. Used for name a number refs/calls. -# -# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#44 -class Regexp::Scanner::InvalidBackrefError < ::Regexp::Scanner::ValidationError - # @return [InvalidBackrefError] a new instance of InvalidBackrefError - # - # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#45 - def initialize(what, reason); end -end - -# Invalid group. Used for named groups. -# -# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#29 -class Regexp::Scanner::InvalidGroupError < ::Regexp::Scanner::ValidationError - # @return [InvalidGroupError] a new instance of InvalidGroupError - # - # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#30 - def initialize(what, reason); end -end - -# Invalid groupOption. Used for inline options. -# TODO: should become InvalidGroupOptionError in v3.0.0 for consistency -# -# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#37 -class Regexp::Scanner::InvalidGroupOption < ::Regexp::Scanner::ValidationError - # @return [InvalidGroupOption] a new instance of InvalidGroupOption - # - # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#38 - def initialize(option, text); end -end - -# Invalid sequence format. Used for escape sequences, mainly. -# -# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#22 -class Regexp::Scanner::InvalidSequenceError < ::Regexp::Scanner::ValidationError - # @return [InvalidSequenceError] a new instance of InvalidSequenceError - # - # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#23 - def initialize(what = T.unsafe(nil), where = T.unsafe(nil)); end -end - -# Unexpected end of pattern -# -# source://regexp_parser//lib/regexp_parser/scanner/errors/premature_end_error.rb#3 -class Regexp::Scanner::PrematureEndError < ::Regexp::Scanner::ScannerError - # @return [PrematureEndError] a new instance of PrematureEndError - # - # source://regexp_parser//lib/regexp_parser/scanner/errors/premature_end_error.rb#4 - def initialize(where = T.unsafe(nil)); end -end - -# General scanner error (catch all) -# -# source://regexp_parser//lib/regexp_parser/scanner/errors/scanner_error.rb#5 -class Regexp::Scanner::ScannerError < ::Regexp::Parser::Error; end - -# The POSIX class name was not recognized by the scanner. -# -# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#58 -class Regexp::Scanner::UnknownPosixClassError < ::Regexp::Scanner::ValidationError - # @return [UnknownPosixClassError] a new instance of UnknownPosixClassError - # - # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#59 - def initialize(text, _); end -end - -# The property name was not recognized by the scanner. -# -# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#51 -class Regexp::Scanner::UnknownUnicodePropertyError < ::Regexp::Scanner::ValidationError - # @return [UnknownUnicodePropertyError] a new instance of UnknownUnicodePropertyError - # - # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#52 - def initialize(name, _); end -end - -# Base for all scanner validation errors -# -# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#3 -class Regexp::Scanner::ValidationError < ::Regexp::Scanner::ScannerError - class << self - # Centralizes and unifies the handling of validation related errors. - # - # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#5 - def for(type, problem, reason = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#9 - def types; end - end -end - -# After loading all the tokens the map is full. Extract all tokens and types -# into the All and Types constants. -# -# source://regexp_parser//lib/regexp_parser/syntax.rb#3 -module Regexp::Syntax - private - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#61 - def comparable(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#44 - def const_missing(const_name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#51 - def fallback_version_class(version); end - - # Returns the syntax specification class for the given syntax - # version name. The special names 'any' and '*' return Syntax::Any. - # - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#22 - def for(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#26 - def new(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#57 - def specified_versions; end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#32 - def supported?(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#36 - def version_class(version); end - - class << self - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#61 - def comparable(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#44 - def const_missing(const_name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#51 - def fallback_version_class(version); end - - # Returns the syntax specification class for the given syntax - # version name. The special names 'any' and '*' return Syntax::Any. - # - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#22 - def for(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#26 - def new(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#57 - def specified_versions; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#32 - def supported?(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#36 - def version_class(version); end - end -end - -# A syntax that always returns true, passing all tokens as implemented. This -# is useful during development, testing, and should be useful for some types -# of transformations as well. -# -# source://regexp_parser//lib/regexp_parser/syntax/any.rb#5 -class Regexp::Syntax::Any < ::Regexp::Syntax::Base - class << self - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/syntax/any.rb#8 - def implements?(_type, _token); end - end -end - -# A lookup map of supported types and tokens in a given syntax -# -# source://regexp_parser//lib/regexp_parser/syntax/base.rb#9 -class Regexp::Syntax::Base - include ::Regexp::Syntax::Token - - # TODO: drop this backwards compatibility code in v3.0.0, do `private :new` - # - # @return [Base] a new instance of Base - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#99 - def initialize; end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#104 - def method_missing(name, *args); end - - private - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#115 - def respond_to_missing?(name, include_private = T.unsafe(nil)); end - - class << self - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#46 - def added_features; end - - # @raise [NotImplementedError] - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#40 - def check!(type, token); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#31 - def check?(type, token); end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#26 - def excludes(type, tokens); end - - # Returns the value of attribute features. - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#13 - def features; end - - # Sets the attribute features - # - # @param value the value to set the attribute features to. - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#13 - def features=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#36 - def implementations(type); end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#21 - def implements(type, tokens); end - - # @raise [NotImplementedError] - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#40 - def implements!(type, token); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#31 - def implements?(type, token); end - - # automatically inherit features through the syntax class hierarchy - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#16 - def inherited(subclass); end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#54 - def normalize(type, token); end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#74 - def normalize_backref(type, token); end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#65 - def normalize_group(type, token); end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#50 - def removed_features; end - end -end - -# source://regexp_parser//lib/regexp_parser/syntax/versions.rb#8 -Regexp::Syntax::CURRENT = Regexp::Syntax::V3_2_0 - -# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#6 -class Regexp::Syntax::InvalidVersionNameError < ::Regexp::Syntax::SyntaxError - # @return [InvalidVersionNameError] a new instance of InvalidVersionNameError - # - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#7 - def initialize(name); end -end - -# source://regexp_parser//lib/regexp_parser/syntax/base.rb#2 -class Regexp::Syntax::NotImplementedError < ::Regexp::Syntax::SyntaxError - # @return [NotImplementedError] a new instance of NotImplementedError - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#3 - def initialize(syntax, type, token); end -end - -# source://regexp_parser//lib/regexp_parser/syntax.rb#4 -class Regexp::Syntax::SyntaxError < ::Regexp::Parser::Error; end - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#3 -module Regexp::Syntax::Token; end - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#42 -Regexp::Syntax::Token::All = T.let(T.unsafe(nil), Array) - -# alias for symmetry between Token::* and Expression::* -# -# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#15 -module Regexp::Syntax::Token::Alternation; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#16 -Regexp::Syntax::Token::Alternation::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#17 -Regexp::Syntax::Token::Alternation::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#3 -module Regexp::Syntax::Token::Anchor; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#9 -Regexp::Syntax::Token::Anchor::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#4 -Regexp::Syntax::Token::Anchor::Basic = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#5 -Regexp::Syntax::Token::Anchor::Extended = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#7 -Regexp::Syntax::Token::Anchor::MatchStart = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#6 -Regexp::Syntax::Token::Anchor::String = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#10 -Regexp::Syntax::Token::Anchor::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#3 -module Regexp::Syntax::Token::Assertion; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#7 -Regexp::Syntax::Token::Assertion::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#4 -Regexp::Syntax::Token::Assertion::Lookahead = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#5 -Regexp::Syntax::Token::Assertion::Lookbehind = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#8 -Regexp::Syntax::Token::Assertion::Type = T.let(T.unsafe(nil), Symbol) - -# alias for symmetry between token symbol and Expression class name -# -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#31 -Regexp::Syntax::Token::Backref = Regexp::Syntax::Token::Backreference - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#3 -module Regexp::Syntax::Token::Backreference; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#15 -Regexp::Syntax::Token::Backreference::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#7 -Regexp::Syntax::Token::Backreference::Name = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#6 -Regexp::Syntax::Token::Backreference::Number = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#5 -Regexp::Syntax::Token::Backreference::NumberRef = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#4 -Regexp::Syntax::Token::Backreference::Plain = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#9 -Regexp::Syntax::Token::Backreference::RecursionLevel = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#16 -Regexp::Syntax::Token::Backreference::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#11 -Regexp::Syntax::Token::Backreference::V1_8_6 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#13 -Regexp::Syntax::Token::Backreference::V1_9_1 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#3 -module Regexp::Syntax::Token::CharacterSet; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#7 -Regexp::Syntax::Token::CharacterSet::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#4 -Regexp::Syntax::Token::CharacterSet::Basic = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#5 -Regexp::Syntax::Token::CharacterSet::Extended = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#8 -Regexp::Syntax::Token::CharacterSet::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#3 -module Regexp::Syntax::Token::CharacterType; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#10 -Regexp::Syntax::Token::CharacterType::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#4 -Regexp::Syntax::Token::CharacterType::Basic = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#8 -Regexp::Syntax::Token::CharacterType::Clustered = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#5 -Regexp::Syntax::Token::CharacterType::Extended = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#6 -Regexp::Syntax::Token::CharacterType::Hex = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#11 -Regexp::Syntax::Token::CharacterType::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#3 -module Regexp::Syntax::Token::Conditional; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#9 -Regexp::Syntax::Token::Conditional::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#6 -Regexp::Syntax::Token::Conditional::Condition = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#4 -Regexp::Syntax::Token::Conditional::Delimiters = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#7 -Regexp::Syntax::Token::Conditional::Separator = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#11 -Regexp::Syntax::Token::Conditional::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#3 -module Regexp::Syntax::Token::Escape; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#8 -Regexp::Syntax::Token::Escape::ASCII = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#24 -Regexp::Syntax::Token::Escape::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#4 -Regexp::Syntax::Token::Escape::Basic = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#6 -Regexp::Syntax::Token::Escape::Control = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#20 -Regexp::Syntax::Token::Escape::Hex = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#13 -Regexp::Syntax::Token::Escape::Meta = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#22 -Regexp::Syntax::Token::Escape::Octal = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#25 -Regexp::Syntax::Token::Escape::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#11 -Regexp::Syntax::Token::Escape::Unicode = T.let(T.unsafe(nil), Array) - -# alias for symmetry between Token::* and Expression::* -# -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#31 -Regexp::Syntax::Token::EscapeSequence = Regexp::Syntax::Token::Escape - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#11 -module Regexp::Syntax::Token::FreeSpace; end - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#12 -Regexp::Syntax::Token::FreeSpace::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#13 -Regexp::Syntax::Token::FreeSpace::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#3 -module Regexp::Syntax::Token::Group; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#17 -Regexp::Syntax::Token::Group::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#8 -Regexp::Syntax::Token::Group::Atomic = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#4 -Regexp::Syntax::Token::Group::Basic = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#10 -Regexp::Syntax::Token::Group::Comment = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#5 -Regexp::Syntax::Token::Group::Extended = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#7 -Regexp::Syntax::Token::Group::Named = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#9 -Regexp::Syntax::Token::Group::Passive = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#18 -Regexp::Syntax::Token::Group::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#12 -Regexp::Syntax::Token::Group::V1_8_6 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#15 -Regexp::Syntax::Token::Group::V2_4_1 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#3 -module Regexp::Syntax::Token::Keep; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#6 -Regexp::Syntax::Token::Keep::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#4 -Regexp::Syntax::Token::Keep::Mark = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#7 -Regexp::Syntax::Token::Keep::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#6 -module Regexp::Syntax::Token::Literal; end - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#7 -Regexp::Syntax::Token::Literal::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#8 -Regexp::Syntax::Token::Literal::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#4 -Regexp::Syntax::Token::Map = T.let(T.unsafe(nil), Hash) - -# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#3 -module Regexp::Syntax::Token::Meta; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#8 -Regexp::Syntax::Token::Meta::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#5 -Regexp::Syntax::Token::Meta::Alternation = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#4 -Regexp::Syntax::Token::Meta::Basic = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#6 -Regexp::Syntax::Token::Meta::Extended = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#9 -Regexp::Syntax::Token::Meta::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#3 -module Regexp::Syntax::Token::PosixClass; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#9 -Regexp::Syntax::Token::PosixClass::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#7 -Regexp::Syntax::Token::PosixClass::Extensions = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#11 -Regexp::Syntax::Token::PosixClass::NonType = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#4 -Regexp::Syntax::Token::PosixClass::Standard = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#10 -Regexp::Syntax::Token::PosixClass::Type = T.let(T.unsafe(nil), Symbol) - -# alias for symmetry between token symbol and Token module name -# -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#749 -Regexp::Syntax::Token::Property = Regexp::Syntax::Token::UnicodeProperty - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#3 -module Regexp::Syntax::Token::Quantifier; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#29 -Regexp::Syntax::Token::Quantifier::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#4 -Regexp::Syntax::Token::Quantifier::Greedy = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#22 -Regexp::Syntax::Token::Quantifier::Interval = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#26 -Regexp::Syntax::Token::Quantifier::IntervalAll = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#24 -Regexp::Syntax::Token::Quantifier::IntervalPossessive = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#23 -Regexp::Syntax::Token::Quantifier::IntervalReluctant = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#16 -Regexp::Syntax::Token::Quantifier::Possessive = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#10 -Regexp::Syntax::Token::Quantifier::Reluctant = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#30 -Regexp::Syntax::Token::Quantifier::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#28 -Regexp::Syntax::Token::Quantifier::V1_8_6 = T.let(T.unsafe(nil), Array) - -# alias for symmetry between token symbol and Token module name -# -# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#14 -Regexp::Syntax::Token::Set = Regexp::Syntax::Token::CharacterSet - -# Type is the same as Backreference so keeping it here, for now. -# -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#20 -module Regexp::Syntax::Token::SubexpressionCall; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#24 -Regexp::Syntax::Token::SubexpressionCall::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#21 -Regexp::Syntax::Token::SubexpressionCall::Name = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#22 -Regexp::Syntax::Token::SubexpressionCall::Number = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#43 -Regexp::Syntax::Token::Types = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#3 -module Regexp::Syntax::Token::UnicodeProperty; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#64 -Regexp::Syntax::Token::UnicodeProperty::Age = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#40 -Regexp::Syntax::Token::UnicodeProperty::Age_V1_9_3 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#44 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_0_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#46 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_2_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#48 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_3_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#50 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_4_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#52 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_5_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#54 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#56 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_2 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#58 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_3 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#60 -Regexp::Syntax::Token::UnicodeProperty::Age_V3_1_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#62 -Regexp::Syntax::Token::UnicodeProperty::Age_V3_2_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#739 -Regexp::Syntax::Token::UnicodeProperty::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#13 -module Regexp::Syntax::Token::UnicodeProperty::Category; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#36 -Regexp::Syntax::Token::UnicodeProperty::Category::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#33 -Regexp::Syntax::Token::UnicodeProperty::Category::Codepoint = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#14 -Regexp::Syntax::Token::UnicodeProperty::Category::Letter = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#17 -Regexp::Syntax::Token::UnicodeProperty::Category::Mark = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#20 -Regexp::Syntax::Token::UnicodeProperty::Category::Number = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#23 -Regexp::Syntax::Token::UnicodeProperty::Category::Punctuation = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#30 -Regexp::Syntax::Token::UnicodeProperty::Category::Separator = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#27 -Regexp::Syntax::Token::UnicodeProperty::Category::Symbol = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#6 -Regexp::Syntax::Token::UnicodeProperty::CharType_V1_9_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#9 -Regexp::Syntax::Token::UnicodeProperty::CharType_V2_5_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#133 -Regexp::Syntax::Token::UnicodeProperty::Derived = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#66 -Regexp::Syntax::Token::UnicodeProperty::Derived_V1_9_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#120 -Regexp::Syntax::Token::UnicodeProperty::Derived_V2_0_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#125 -Regexp::Syntax::Token::UnicodeProperty::Derived_V2_4_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#129 -Regexp::Syntax::Token::UnicodeProperty::Derived_V2_5_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#724 -Regexp::Syntax::Token::UnicodeProperty::Emoji = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#694 -Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_5_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#702 -Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_6_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#722 -Regexp::Syntax::Token::UnicodeProperty::Enumerated = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#706 -Regexp::Syntax::Token::UnicodeProperty::Enumerated_V2_4_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#742 -Regexp::Syntax::Token::UnicodeProperty::NonType = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#11 -Regexp::Syntax::Token::UnicodeProperty::POSIX = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#332 -Regexp::Syntax::Token::UnicodeProperty::Script = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#135 -Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#231 -Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_3 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#237 -Regexp::Syntax::Token::UnicodeProperty::Script_V2_0_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#247 -Regexp::Syntax::Token::UnicodeProperty::Script_V2_2_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#273 -Regexp::Syntax::Token::UnicodeProperty::Script_V2_3_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#282 -Regexp::Syntax::Token::UnicodeProperty::Script_V2_4_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#291 -Regexp::Syntax::Token::UnicodeProperty::Script_V2_5_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#298 -Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#308 -Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_2 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#315 -Regexp::Syntax::Token::UnicodeProperty::Script_V3_1_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#322 -Regexp::Syntax::Token::UnicodeProperty::Script_V3_2_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#741 -Regexp::Syntax::Token::UnicodeProperty::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#692 -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#334 -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V1_9_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#433 -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_0_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#561 -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_2_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#596 -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_3_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#609 -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_4_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#623 -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_5_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#633 -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#647 -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_2 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#659 -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_1_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#670 -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_2_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#726 -Regexp::Syntax::Token::UnicodeProperty::V1_9_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#727 -Regexp::Syntax::Token::UnicodeProperty::V1_9_3 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#728 -Regexp::Syntax::Token::UnicodeProperty::V2_0_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#729 -Regexp::Syntax::Token::UnicodeProperty::V2_2_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#730 -Regexp::Syntax::Token::UnicodeProperty::V2_3_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#731 -Regexp::Syntax::Token::UnicodeProperty::V2_4_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#732 -Regexp::Syntax::Token::UnicodeProperty::V2_5_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#733 -Regexp::Syntax::Token::UnicodeProperty::V2_6_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#734 -Regexp::Syntax::Token::UnicodeProperty::V2_6_2 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#735 -Regexp::Syntax::Token::UnicodeProperty::V2_6_3 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#736 -Regexp::Syntax::Token::UnicodeProperty::V3_1_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#737 -Regexp::Syntax::Token::UnicodeProperty::V3_2_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#12 -class Regexp::Syntax::UnknownSyntaxNameError < ::Regexp::Syntax::SyntaxError - # @return [UnknownSyntaxNameError] a new instance of UnknownSyntaxNameError - # - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#13 - def initialize(name); end -end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/1.8.6.rb#1 -class Regexp::Syntax::V1_8_6 < ::Regexp::Syntax::Base; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/1.9.1.rb#1 -class Regexp::Syntax::V1_9_1 < ::Regexp::Syntax::V1_8_6; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/1.9.3.rb#1 -class Regexp::Syntax::V1_9_3 < ::Regexp::Syntax::V1_9_1; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.0.0.rb#1 -class Regexp::Syntax::V2_0_0 < ::Regexp::Syntax::V1_9_3; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.2.0.rb#1 -class Regexp::Syntax::V2_2_0 < ::Regexp::Syntax::V2_0_0; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.3.0.rb#1 -class Regexp::Syntax::V2_3_0 < ::Regexp::Syntax::V2_2_0; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.4.0.rb#1 -class Regexp::Syntax::V2_4_0 < ::Regexp::Syntax::V2_3_0; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.4.1.rb#1 -class Regexp::Syntax::V2_4_1 < ::Regexp::Syntax::V2_4_0; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.5.0.rb#1 -class Regexp::Syntax::V2_5_0 < ::Regexp::Syntax::V2_4_1; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.0.rb#1 -class Regexp::Syntax::V2_6_0 < ::Regexp::Syntax::V2_5_0; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.2.rb#1 -class Regexp::Syntax::V2_6_2 < ::Regexp::Syntax::V2_6_0; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.3.rb#1 -class Regexp::Syntax::V2_6_3 < ::Regexp::Syntax::V2_6_2; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/3.1.0.rb#1 -class Regexp::Syntax::V3_1_0 < ::Regexp::Syntax::V2_6_3; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/3.2.0.rb#1 -class Regexp::Syntax::V3_2_0 < ::Regexp::Syntax::V3_1_0; end - -# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#4 -Regexp::Syntax::VERSION_CONST_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#2 -Regexp::Syntax::VERSION_FORMAT = T.let(T.unsafe(nil), String) - -# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#3 -Regexp::Syntax::VERSION_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://regexp_parser//lib/regexp_parser/token.rb#2 -Regexp::TOKEN_KEYS = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/token.rb#13 -class Regexp::Token < ::Struct - def conditional_level; end - def conditional_level=(_); end - - # source://regexp_parser//lib/regexp_parser/token.rb#20 - def length; end - - def level; end - def level=(_); end - - # Returns the value of attribute next. - # - # source://regexp_parser//lib/regexp_parser/token.rb#14 - def next; end - - # Sets the attribute next - # - # @param value the value to set the attribute next to. - # - # source://regexp_parser//lib/regexp_parser/token.rb#14 - def next=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/token.rb#16 - def offset; end - - # Returns the value of attribute previous. - # - # source://regexp_parser//lib/regexp_parser/token.rb#14 - def previous; end - - # Sets the attribute previous - # - # @param value the value to set the attribute previous to. - # - # source://regexp_parser//lib/regexp_parser/token.rb#14 - def previous=(_arg0); end - - def set_level; end - def set_level=(_); end - def te; end - def te=(_); end - def text; end - def text=(_); end - def token; end - def token=(_); end - def ts; end - def ts=(_); end - def type; end - def type=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end diff --git a/sorbet/rbi/gems/reline@0.6.1.rbi b/sorbet/rbi/gems/reline@0.6.1.rbi new file mode 100644 index 000000000..13fa313b6 --- /dev/null +++ b/sorbet/rbi/gems/reline@0.6.1.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `reline` gem. +# Please instead update this file by running `bin/tapioca gem reline`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/require-hooks@0.4.0.rbi b/sorbet/rbi/gems/require-hooks@0.4.0.rbi new file mode 100644 index 000000000..1e536b20a --- /dev/null +++ b/sorbet/rbi/gems/require-hooks@0.4.0.rbi @@ -0,0 +1,152 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `require-hooks` gem. +# Please instead update this file by running `bin/tapioca gem require-hooks`. + + +# pkg:gem/require-hooks#lib/require-hooks/api.rb:3 +module RequireHooks + class << self + # Define a block to wrap the code loading. + # The return value MUST be a result of calling the passed block. + # For example, you can use such hooks for instrumentation, debugging purposes. + # + # RequireHooks.around_load do |path, &block| + # puts "Loading #{path}" + # block.call.tap { puts "Loaded #{path}" } + # end + # + # pkg:gem/require-hooks#lib/require-hooks/api.rb:103 + def around_load(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:139 + def context_for(path); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:168 + def contexts; end + + # This hook should be used to manually compile byte code to be loaded by the VM. + # The arguments are (path, source = nil), where source is only defined if transformations took place. + # Otherwise, you MUST read the source code from the file yourself. + # + # The return value MUST be either nil (continue to the next hook or default behavior) or a platform-specific bytecode object (e.g., RubyVM::InstructionSequence). + # + # RequireHooks.hijack_load do |path, source| + # source ||= File.read(path) + # if defined?(RubyVM::InstructionSequence) + # RubyVM::InstructionSequence.compile(source) + # elsif defined?(JRUBY_VERSION) + # JRuby.compile(source) + # end + # end + # + # pkg:gem/require-hooks#lib/require-hooks/api.rb:135 + def hijack_load(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:93 + def print_warnings; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:93 + def print_warnings=(_arg0); end + + # Hack to enable coverage for hooked files. + # Requires eval coverage to be on. + # See https://bugs.ruby-lang.org/issues/22018 (https://github.com/ruby/ruby/pull/16805) + # + # pkg:gem/require-hooks#lib/require-hooks/api.rb:160 + def setup_path_coverage(path, contents = T.unsafe(nil)); end + + # Define hooks to perform source-to-source transformations. + # The return value MUST be either String (new source code) or nil (indicating that no transformations were performed). + # + # NOTE: The second argument (`source`) MAY be nil, indicating that no transformer tried to transform the source code. + # + # + # RequireHooks.source_transform do |path, source| + # end + # + # pkg:gem/require-hooks#lib/require-hooks/api.rb:117 + def source_transform(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + + private + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:184 + def eval_coverage_enabled?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:174 + def register_hook(type, block, patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + end +end + +# pkg:gem/require-hooks#lib/require-hooks/api.rb:4 +class RequireHooks::Context + # pkg:gem/require-hooks#lib/require-hooks/api.rb:8 + def initialize(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def around_load; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:30 + def empty?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def exclude_patterns; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:45 + def hijack?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def hijack_load; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:24 + def match?(path); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:81 + def merge!(another_ctx); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def patterns; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:59 + def perform_source_transform(path); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:35 + def readonly?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:49 + def run_around_load_callbacks(path); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def source_transform; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:41 + def source_transform?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:20 + def to_key; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:71 + def try_hijack_load(path, source); end +end + +# pkg:gem/require-hooks#lib/require-hooks/mode/load_iseq.rb:6 +RequireHooks::EMPTY_ISEQ = T.let(T.unsafe(nil), RubyVM::InstructionSequence) + +# pkg:gem/require-hooks#lib/require-hooks/iseq.rb:4 +module RequireHooks::Iseq + class << self + # pkg:gem/require-hooks#lib/require-hooks/iseq.rb:6 + def compile_with_coverage(ctx, path); end + end +end + +# pkg:gem/require-hooks#lib/require-hooks/mode/load_iseq.rb:8 +module RequireHooks::LoadIseq + # pkg:gem/require-hooks#lib/require-hooks/mode/load_iseq.rb:9 + def load_iseq(path); end +end + +class RubyVM::InstructionSequence + extend ::RequireHooks::LoadIseq +end diff --git a/sorbet/rbi/gems/rexml@3.3.9.rbi b/sorbet/rbi/gems/rexml@3.4.4.rbi similarity index 75% rename from sorbet/rbi/gems/rexml@3.3.9.rbi rename to sorbet/rbi/gems/rexml@3.4.4.rbi index 4d1a55116..0a38bc4cf 100644 --- a/sorbet/rbi/gems/rexml@3.3.9.rbi +++ b/sorbet/rbi/gems/rexml@3.4.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `rexml` gem. # Please instead update this file by running `bin/tapioca gem rexml`. + # This class needs: # * Documentation # * Work! Not all types of attlists are intelligently parsed, so we just @@ -16,7 +17,7 @@ # AttlistDecls onto an intuitive Ruby interface, let me know. I'm desperate # for anything to make DTDs more palateable. # -# source://rexml//lib/rexml/attlistdecl.rb#18 +# pkg:gem/rexml#lib/rexml/attlistdecl.rb:18 class REXML::AttlistDecl < ::REXML::Child include ::Enumerable @@ -26,42 +27,38 @@ class REXML::AttlistDecl < ::REXML::Child # Sorry, but for the foreseeable future, DTD support in REXML is pretty # weak on convenience. Have I mentioned how much I hate DTDs? # - # @return [AttlistDecl] a new instance of AttlistDecl - # - # source://rexml//lib/rexml/attlistdecl.rb#29 + # pkg:gem/rexml#lib/rexml/attlistdecl.rb:29 def initialize(source); end # Access the attlist attribute/value pairs. # value = attlist_decl[ attribute_name ] # - # source://rexml//lib/rexml/attlistdecl.rb#38 + # pkg:gem/rexml#lib/rexml/attlistdecl.rb:38 def [](key); end # Iterate over the key/value pairs: # attlist_decl.each { |attribute_name, attribute_value| ... } # - # source://rexml//lib/rexml/attlistdecl.rb#50 + # pkg:gem/rexml#lib/rexml/attlistdecl.rb:50 def each(&block); end # What is this? Got me. # - # source://rexml//lib/rexml/attlistdecl.rb#22 + # pkg:gem/rexml#lib/rexml/attlistdecl.rb:22 def element_name; end # Whether an attlist declaration includes the given attribute definition # if attlist_decl.include? "xmlns:foobar" # - # @return [Boolean] - # - # source://rexml//lib/rexml/attlistdecl.rb#44 + # pkg:gem/rexml#lib/rexml/attlistdecl.rb:44 def include?(key); end - # source://rexml//lib/rexml/attlistdecl.rb#59 + # pkg:gem/rexml#lib/rexml/attlistdecl.rb:59 def node_type; end # Write out exactly what we got in. # - # source://rexml//lib/rexml/attlistdecl.rb#55 + # pkg:gem/rexml#lib/rexml/attlistdecl.rb:55 def write(out, indent = T.unsafe(nil)); end end @@ -70,7 +67,7 @@ end # namespaces. General users of REXML will not interact with the # Attribute class much. # -# source://rexml//lib/rexml/attribute.rb#10 +# pkg:gem/rexml#lib/rexml/attribute.rb:10 class REXML::Attribute include ::REXML::Node include ::REXML::XMLTokens @@ -99,28 +96,29 @@ class REXML::Attribute # Attribute.new( "attr", "attr_value" ) # Attribute.new( "attr", "attr_value", parent_element ) # - # @return [Attribute] a new instance of Attribute - # - # source://rexml//lib/rexml/attribute.rb#42 + # pkg:gem/rexml#lib/rexml/attribute.rb:42 def initialize(first, second = T.unsafe(nil), parent = T.unsafe(nil)); end # Returns true if other is an Attribute and has the same name and value, # false otherwise. # - # source://rexml//lib/rexml/attribute.rb#106 + # pkg:gem/rexml#lib/rexml/attribute.rb:106 def ==(other); end # Returns a copy of this attribute # - # source://rexml//lib/rexml/attribute.rb#164 + # pkg:gem/rexml#lib/rexml/attribute.rb:161 def clone; end - # source://rexml//lib/rexml/attribute.rb#132 + # pkg:gem/rexml#lib/rexml/attribute.rb:132 def doctype; end + # pkg:gem/rexml#lib/rexml/attribute.rb:205 + def document; end + # The element to which this attribute belongs # - # source://rexml//lib/rexml/attribute.rb#15 + # pkg:gem/rexml#lib/rexml/attribute.rb:15 def element; end # Sets the element of which this object is an attribute. Normally, this @@ -128,15 +126,15 @@ class REXML::Attribute # # Returns this attribute # - # source://rexml//lib/rexml/attribute.rb#172 + # pkg:gem/rexml#lib/rexml/attribute.rb:169 def element=(element); end # Creates (and returns) a hash from both the name and value # - # source://rexml//lib/rexml/attribute.rb#111 + # pkg:gem/rexml#lib/rexml/attribute.rb:111 def hash; end - # source://rexml//lib/rexml/attribute.rb#198 + # pkg:gem/rexml#lib/rexml/attribute.rb:195 def inspect; end # Returns the namespace URL, if defined, or nil otherwise @@ -161,16 +159,16 @@ class REXML::Attribute # e.add_attribute("a", "b") # e.attribute("a").namespace # => "" # - # source://rexml//lib/rexml/attribute.rb#95 + # pkg:gem/rexml#lib/rexml/attribute.rb:95 def namespace(arg = T.unsafe(nil)); end - # source://rexml//lib/rexml/attribute.rb#194 + # pkg:gem/rexml#lib/rexml/attribute.rb:191 def node_type; end # The normalized value of this attribute. That is, the attribute with # entities intact. # - # source://rexml//lib/rexml/attribute.rb#158 + # pkg:gem/rexml#lib/rexml/attribute.rb:155 def normalized=(new_normalized); end # Returns the namespace of the attribute. @@ -183,19 +181,19 @@ class REXML::Attribute # a = Attribute.new( "x", "y" ) # a.prefix # -> "" # - # source://rexml//lib/rexml/attribute.rb#70 + # pkg:gem/rexml#lib/rexml/attribute.rb:70 def prefix; end # Removes this Attribute from the tree, and returns true if successful # # This method is usually not called directly. # - # source://rexml//lib/rexml/attribute.rb#185 + # pkg:gem/rexml#lib/rexml/attribute.rb:182 def remove; end # Returns the attribute value, with entities replaced # - # source://rexml//lib/rexml/attribute.rb#140 + # pkg:gem/rexml#lib/rexml/attribute.rb:137 def to_s; end # Returns this attribute out as XML source, expanding the name @@ -205,28 +203,28 @@ class REXML::Attribute # b = Attribute.new( "ns:x", "y" ) # b.to_string # -> "ns:x='y'" # - # source://rexml//lib/rexml/attribute.rb#121 + # pkg:gem/rexml#lib/rexml/attribute.rb:121 def to_string; end # Returns the UNNORMALIZED value of this attribute. That is, entities # have been expanded to their values # - # source://rexml//lib/rexml/attribute.rb#149 + # pkg:gem/rexml#lib/rexml/attribute.rb:146 def value; end # Writes this attribute (EG, puts 'key="value"' to the output) # - # source://rexml//lib/rexml/attribute.rb#190 + # pkg:gem/rexml#lib/rexml/attribute.rb:187 def write(output, indent = T.unsafe(nil)); end - # source://rexml//lib/rexml/attribute.rb#204 + # pkg:gem/rexml#lib/rexml/attribute.rb:201 def xpath; end end # A class that defines the set of Attributes of an Element and provides # operations for accessing elements in that set. # -# source://rexml//lib/rexml/element.rb#2137 +# pkg:gem/rexml#lib/rexml/element.rb:2131 class REXML::Attributes < ::Hash # :call-seq: # new(element) @@ -245,32 +243,10 @@ class REXML::Attributes < ::Hash # - +element.prefix+. # - +element.expanded_name+. # - # @return [Attributes] a new instance of Attributes - # - # source://rexml//lib/rexml/element.rb#2156 + # pkg:gem/rexml#lib/rexml/element.rb:2150 def initialize(element); end - # :call-seq: - # add(attribute) -> attribute - # - # Adds attribute +attribute+, replacing the previous - # attribute of the same name if it exists; - # returns +attribute+: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs # => {"att"=>{"foo"=>foo:att='1', "bar"=>bar:att='2', ""=>att='<'}} - # attrs.add(REXML::Attribute.new('foo:att', '2')) # => foo:att='2' - # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' - # attrs.include?('baz') # => true - # - # source://rexml//lib/rexml/element.rb#2522 + # pkg:gem/rexml#lib/rexml/element.rb:2520 def <<(attribute); end # :call-seq: @@ -294,7 +270,7 @@ class REXML::Attributes < ::Hash # # Related: get_attribute (returns an \Attribute object). # - # source://rexml//lib/rexml/element.rb#2181 + # pkg:gem/rexml#lib/rexml/element.rb:2175 def [](name); end # :call-seq: @@ -320,7 +296,7 @@ class REXML::Attributes < ::Hash # attrs['baz:att'] = nil # attrs.include?('baz:att') # => false # - # source://rexml//lib/rexml/element.rb#2365 + # pkg:gem/rexml#lib/rexml/element.rb:2358 def []=(name, value); end # :call-seq: @@ -343,7 +319,7 @@ class REXML::Attributes < ::Hash # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' # attrs.include?('baz') # => true # - # source://rexml//lib/rexml/element.rb#2522 + # pkg:gem/rexml#lib/rexml/element.rb:2516 def add(attribute); end # :call-seq: @@ -374,7 +350,7 @@ class REXML::Attributes < ::Hash # attrs.delete(attr) # => # => # attrs.delete(attr) # => # => # - # source://rexml//lib/rexml/element.rb#2475 + # pkg:gem/rexml#lib/rexml/element.rb:2471 def delete(attribute); end # :call-seq: @@ -393,7 +369,7 @@ class REXML::Attributes < ::Hash # attrs = ele.attributes # attrs.delete_all('att') # => [att='<'] # - # source://rexml//lib/rexml/element.rb#2544 + # pkg:gem/rexml#lib/rexml/element.rb:2538 def delete_all(name); end # :call-seq: @@ -418,7 +394,7 @@ class REXML::Attributes < ::Hash # ["bar:att", "2"] # ["att", "<"] # - # source://rexml//lib/rexml/element.rb#2283 + # pkg:gem/rexml#lib/rexml/element.rb:2276 def each; end # :call-seq: @@ -443,7 +419,7 @@ class REXML::Attributes < ::Hash # [REXML::Attribute, bar:att='2'] # [REXML::Attribute, att='<'] # - # source://rexml//lib/rexml/element.rb#2250 + # pkg:gem/rexml#lib/rexml/element.rb:2243 def each_attribute; end # :call-seq: @@ -465,7 +441,7 @@ class REXML::Attributes < ::Hash # attrs.get_attribute('att') # => att='<' # attrs.get_attribute('nosuch') # => nil # - # source://rexml//lib/rexml/element.rb#2309 + # pkg:gem/rexml#lib/rexml/element.rb:2302 def get_attribute(name); end # :call-seq: @@ -485,7 +461,7 @@ class REXML::Attributes < ::Hash # attrs.get_attribute_ns('http://foo', 'att') # => foo:att='1' # attrs.get_attribute_ns('http://foo', 'nosuch') # => nil # - # source://rexml//lib/rexml/element.rb#2570 + # pkg:gem/rexml#lib/rexml/element.rb:2564 def get_attribute_ns(namespace, name); end # :call-seq: @@ -502,7 +478,7 @@ class REXML::Attributes < ::Hash # ele = d.root.elements['//ele'] # => # ele.attributes.length # => 3 # - # source://rexml//lib/rexml/element.rb#2221 + # pkg:gem/rexml#lib/rexml/element.rb:2214 def length; end # :call-seq: @@ -514,7 +490,7 @@ class REXML::Attributes < ::Hash # d = REXML::Document.new(xml_string) # d.root.attributes.namespaces # => {"xmlns"=>"foo", "x"=>"bar", "y"=>"twee"} # - # source://rexml//lib/rexml/element.rb#2431 + # pkg:gem/rexml#lib/rexml/element.rb:2426 def namespaces; end # :call-seq: @@ -528,24 +504,10 @@ class REXML::Attributes < ::Hash # d = REXML::Document.new(xml_string) # d.root.attributes.prefixes # => ["x", "y"] # - # source://rexml//lib/rexml/element.rb#2406 + # pkg:gem/rexml#lib/rexml/element.rb:2400 def prefixes; end - # :call-seq: - # length - # - # Returns the count of attributes: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # ele.attributes.length # => 3 - # - # source://rexml//lib/rexml/element.rb#2221 + # pkg:gem/rexml#lib/rexml/element.rb:2219 def size; end # :call-seq: @@ -564,22 +526,20 @@ class REXML::Attributes < ::Hash # attrs = ele.attributes.to_a # => [foo:att='1', bar:att='2', att='<'] # attrs.first.class # => REXML::Attribute # - # source://rexml//lib/rexml/element.rb#2203 + # pkg:gem/rexml#lib/rexml/element.rb:2196 def to_a; end end -# source://rexml//lib/rexml/cdata.rb#5 +# pkg:gem/rexml#lib/rexml/cdata.rb:5 class REXML::CData < ::REXML::Text - # Constructor. CData is data between + # Constructor. CData is data between # # _Examples_ # CData.new( source ) # CData.new( "Here is some CDATA" ) # CData.new( "Some unprocessed data", respect_whitespace_TF, parent_element ) # - # @return [CData] a new instance of CData - # - # source://rexml//lib/rexml/cdata.rb#16 + # pkg:gem/rexml#lib/rexml/cdata.rb:16 def initialize(first, whitespace = T.unsafe(nil), parent = T.unsafe(nil)); end # Make a copy of this object @@ -589,7 +549,7 @@ class REXML::CData < ::REXML::Text # d = c.clone # d.to_s # -> "Some text" # - # source://rexml//lib/rexml/cdata.rb#26 + # pkg:gem/rexml#lib/rexml/cdata.rb:26 def clone; end # Returns the content of this CData object @@ -598,10 +558,10 @@ class REXML::CData < ::REXML::Text # c = CData.new( "Some text" ) # c.to_s # -> "Some text" # - # source://rexml//lib/rexml/cdata.rb#35 + # pkg:gem/rexml#lib/rexml/cdata.rb:35 def to_s; end - # source://rexml//lib/rexml/cdata.rb#39 + # pkg:gem/rexml#lib/rexml/cdata.rb:39 def value; end # == DEPRECATED @@ -622,7 +582,7 @@ class REXML::CData < ::REXML::Text # c = CData.new( " Some text " ) # c.write( $stdout ) #-> # - # source://rexml//lib/rexml/cdata.rb#60 + # pkg:gem/rexml#lib/rexml/cdata.rb:60 def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end end @@ -630,7 +590,7 @@ end # contains methods to support that. Most user code will not use this # class directly. # -# source://rexml//lib/rexml/child.rb#9 +# pkg:gem/rexml#lib/rexml/child.rb:9 class REXML::Child include ::REXML::Node @@ -640,23 +600,21 @@ class REXML::Child # if supplied, the parent of this child will be set to the # supplied value, and self will be added to the parent # - # @return [Child] a new instance of Child - # - # source://rexml//lib/rexml/child.rb#18 + # pkg:gem/rexml#lib/rexml/child.rb:18 def initialize(parent = T.unsafe(nil)); end # This doesn't yet handle encodings # - # source://rexml//lib/rexml/child.rb#91 + # pkg:gem/rexml#lib/rexml/child.rb:90 def bytes; end # Returns:: the document this child belongs to, or nil if this child # belongs to no document # - # source://rexml//lib/rexml/child.rb#85 + # pkg:gem/rexml#lib/rexml/child.rb:85 def document; end - # source://rexml//lib/rexml/node.rb#11 + # pkg:gem/rexml#lib/rexml/child.rb:58 def next_sibling; end # Sets the next sibling of this child. This can be used to insert a child @@ -667,12 +625,10 @@ class REXML::Child # b.next_sibling = c # # => # - # source://rexml//lib/rexml/child.rb#68 + # pkg:gem/rexml#lib/rexml/child.rb:68 def next_sibling=(other); end - # The Parent of this object - # - # source://rexml//lib/rexml/child.rb#11 + # pkg:gem/rexml#lib/rexml/child.rb:11 def parent; end # Sets the parent of this child to the supplied argument. @@ -684,10 +640,10 @@ class REXML::Child # to the new parent. # Returns:: The parent added # - # source://rexml//lib/rexml/child.rb#52 + # pkg:gem/rexml#lib/rexml/child.rb:52 def parent=(other); end - # source://rexml//lib/rexml/node.rb#17 + # pkg:gem/rexml#lib/rexml/child.rb:59 def previous_sibling; end # Sets the previous sibling of this child. This can be used to insert a @@ -698,14 +654,14 @@ class REXML::Child # b.previous_sibling = c # # => # - # source://rexml//lib/rexml/child.rb#79 + # pkg:gem/rexml#lib/rexml/child.rb:79 def previous_sibling=(other); end # Removes this child from the parent. # # Returns:: self # - # source://rexml//lib/rexml/child.rb#37 + # pkg:gem/rexml#lib/rexml/child.rb:37 def remove; end # Replaces this object with another object. Basically, calls @@ -713,60 +669,56 @@ class REXML::Child # # Returns:: self # - # source://rexml//lib/rexml/child.rb#29 + # pkg:gem/rexml#lib/rexml/child.rb:29 def replace_with(child); end end # Represents an XML comment; that is, text between \ # -# source://rexml//lib/rexml/comment.rb#7 +# pkg:gem/rexml#lib/rexml/comment.rb:7 class REXML::Comment < ::REXML::Child include ::Comparable # Constructor. The first argument can be one of three types: + # @param first If String, the contents of this comment are set to the # argument. If Comment, the argument is duplicated. If # Source, the argument is scanned for a comment. + # @param second If the first argument is a Source, this argument # should be nil, not supplied, or a Parent to be set as the parent # of this object # - # @param first If String, the contents of this comment are set to the - # @param second If the first argument is a Source, this argument - # @return [Comment] a new instance of Comment - # - # source://rexml//lib/rexml/comment.rb#24 + # pkg:gem/rexml#lib/rexml/comment.rb:24 def initialize(first, second = T.unsafe(nil)); end # Compares this Comment to another; the contents of the comment are used # in the comparison. # - # source://rexml//lib/rexml/comment.rb#63 + # pkg:gem/rexml#lib/rexml/comment.rb:63 def <=>(other); end # Compares this Comment to another; the contents of the comment are used # in the comparison. # - # source://rexml//lib/rexml/comment.rb#70 + # pkg:gem/rexml#lib/rexml/comment.rb:70 def ==(other); end - # source://rexml//lib/rexml/comment.rb#33 + # pkg:gem/rexml#lib/rexml/comment.rb:33 def clone; end - # source://rexml//lib/rexml/comment.rb#75 + # pkg:gem/rexml#lib/rexml/comment.rb:75 def node_type; end # The content text # - # source://rexml//lib/rexml/comment.rb#14 + # pkg:gem/rexml#lib/rexml/comment.rb:14 def string; end # The content text # - # source://rexml//lib/rexml/comment.rb#14 + # pkg:gem/rexml#lib/rexml/comment.rb:14 def string=(_arg0); end - # The content text - # - # source://rexml//lib/rexml/comment.rb#14 + # pkg:gem/rexml#lib/rexml/comment.rb:58 def to_s; end # == DEPRECATED @@ -783,30 +735,28 @@ class REXML::Comment < ::REXML::Child # ie_hack:: # Needed for conformity to the child API, but not used by this class. # - # source://rexml//lib/rexml/comment.rb#50 + # pkg:gem/rexml#lib/rexml/comment.rb:50 def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end end -# source://rexml//lib/rexml/xpath_parser.rb#11 +# pkg:gem/rexml#lib/rexml/xpath_parser.rb:11 module REXML::DClonable; end # This is an abstract class. You never use this directly; it serves as a # parent class for the specific declarations. # -# source://rexml//lib/rexml/doctype.rb#242 +# pkg:gem/rexml#lib/rexml/doctype.rb:238 class REXML::Declaration < ::REXML::Child - # @return [Declaration] a new instance of Declaration - # - # source://rexml//lib/rexml/doctype.rb#243 + # pkg:gem/rexml#lib/rexml/doctype.rb:239 def initialize(src); end - # source://rexml//lib/rexml/doctype.rb#248 + # pkg:gem/rexml#lib/rexml/doctype.rb:244 def to_s; end # == DEPRECATED # See REXML::Formatters # - # source://rexml//lib/rexml/doctype.rb#255 + # pkg:gem/rexml#lib/rexml/doctype.rb:251 def write(output, indent); end end @@ -814,7 +764,7 @@ end # ... >. DOCTYPES can be used to declare the DTD of a document, as well as # being used to declare entities used in the document. # -# source://rexml//lib/rexml/doctype.rb#51 +# pkg:gem/rexml#lib/rexml/doctype.rb:51 class REXML::DocType < ::REXML::Parent include ::REXML::XMLTokens @@ -831,54 +781,52 @@ class REXML::DocType < ::REXML::Parent # # is _deprecated_. Do not use it. It will probably disappear. # - # @return [DocType] a new instance of DocType - # - # source://rexml//lib/rexml/doctype.rb#80 + # pkg:gem/rexml#lib/rexml/doctype.rb:80 def initialize(first, parent = T.unsafe(nil)); end - # source://rexml//lib/rexml/doctype.rb#185 + # pkg:gem/rexml#lib/rexml/doctype.rb:181 def add(child); end - # source://rexml//lib/rexml/doctype.rb#125 + # pkg:gem/rexml#lib/rexml/doctype.rb:125 def attribute_of(element, attribute); end - # source://rexml//lib/rexml/doctype.rb#115 + # pkg:gem/rexml#lib/rexml/doctype.rb:115 def attributes_of(element); end - # source://rexml//lib/rexml/doctype.rb#135 + # pkg:gem/rexml#lib/rexml/doctype.rb:135 def clone; end - # source://rexml//lib/rexml/doctype.rb#173 + # pkg:gem/rexml#lib/rexml/doctype.rb:173 def context; end # name is the name of the doctype # external_id is the referenced DTD, if given # - # source://rexml//lib/rexml/doctype.rb#66 + # pkg:gem/rexml#lib/rexml/doctype.rb:66 def entities; end - # source://rexml//lib/rexml/doctype.rb#181 + # pkg:gem/rexml#lib/rexml/doctype.rb:177 def entity(name); end # name is the name of the doctype # external_id is the referenced DTD, if given # - # source://rexml//lib/rexml/doctype.rb#66 + # pkg:gem/rexml#lib/rexml/doctype.rb:66 def external_id; end # name is the name of the doctype # external_id is the referenced DTD, if given # - # source://rexml//lib/rexml/doctype.rb#66 + # pkg:gem/rexml#lib/rexml/doctype.rb:66 def name; end # name is the name of the doctype # external_id is the referenced DTD, if given # - # source://rexml//lib/rexml/doctype.rb#66 + # pkg:gem/rexml#lib/rexml/doctype.rb:66 def namespaces; end - # source://rexml//lib/rexml/doctype.rb#111 + # pkg:gem/rexml#lib/rexml/doctype.rb:111 def node_type; end # Retrieves a named notation. Only notations declared in the internal @@ -886,7 +834,7 @@ class REXML::DocType < ::REXML::Parent # # Method contributed by Henrik Martensson # - # source://rexml//lib/rexml/doctype.rb#229 + # pkg:gem/rexml#lib/rexml/doctype.rb:225 def notation(name); end # This method returns a list of notations that have been declared in the @@ -895,7 +843,7 @@ class REXML::DocType < ::REXML::Parent # # Method contributed by Henrik Martensson # - # source://rexml//lib/rexml/doctype.rb#221 + # pkg:gem/rexml#lib/rexml/doctype.rb:217 def notations; end # This method retrieves the public identifier identifying the document's @@ -903,14 +851,14 @@ class REXML::DocType < ::REXML::Parent # # Method contributed by Henrik Martensson # - # source://rexml//lib/rexml/doctype.rb#195 + # pkg:gem/rexml#lib/rexml/doctype.rb:191 def public; end # This method retrieves the system identifier identifying the document's DTD # # Method contributed by Henrik Martensson # - # source://rexml//lib/rexml/doctype.rb#207 + # pkg:gem/rexml#lib/rexml/doctype.rb:203 def system; end # output:: @@ -924,7 +872,7 @@ class REXML::DocType < ::REXML::Parent # ie_hack:: # Ignored # - # source://rexml//lib/rexml/doctype.rb#149 + # pkg:gem/rexml#lib/rexml/doctype.rb:149 def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end end @@ -946,7 +894,7 @@ end # and in particular, the # {tasks page for documents}[../doc/rexml/tasks/tocs/document_toc_rdoc.html]. # -# source://rexml//lib/rexml/document.rb#35 +# pkg:gem/rexml#lib/rexml/document.rb:35 class REXML::Document < ::REXML::Element # :call-seq: # new(string = nil, context = {}) -> new_document @@ -998,46 +946,10 @@ class REXML::Document < ::REXML::Element # d = REXML::Document.new(xml_string, context) # d.context # => {:raw=>:all, :compress_whitespace=>:all} # - # @return [Document] a new instance of Document - # - # source://rexml//lib/rexml/document.rb#92 + # pkg:gem/rexml#lib/rexml/document.rb:92 def initialize(source = T.unsafe(nil), context = T.unsafe(nil)); end - # :call-seq: - # add(xml_decl) -> self - # add(doc_type) -> self - # add(object) -> self - # - # Adds an object to the document; returns +self+. - # - # When argument +xml_decl+ is given, - # it must be an REXML::XMLDecl object, - # which becomes the XML declaration for the document, - # replacing the previous XML declaration if any: - # - # d = REXML::Document.new - # d.xml_decl.to_s # => "" - # d.add(REXML::XMLDecl.new('2.0')) - # d.xml_decl.to_s # => "" - # - # When argument +doc_type+ is given, - # it must be an REXML::DocType object, - # which becomes the document type for the document, - # replacing the previous document type, if any: - # - # d = REXML::Document.new - # d.doctype.to_s # => "" - # d.add(REXML::DocType.new('foo')) - # d.doctype.to_s # => "" - # - # When argument +object+ (not an REXML::XMLDecl or REXML::DocType object) - # is given it is added as the last child: - # - # d = REXML::Document.new - # d.add(REXML::Element.new('foo')) - # d.to_s # => "" - # - # source://rexml//lib/rexml/document.rb#172 + # pkg:gem/rexml#lib/rexml/document.rb:205 def <<(child); end # :call-seq: @@ -1074,7 +986,7 @@ class REXML::Document < ::REXML::Element # d.add(REXML::Element.new('foo')) # d.to_s # => "" # - # source://rexml//lib/rexml/document.rb#172 + # pkg:gem/rexml#lib/rexml/document.rb:174 def add(child); end # :call-seq: @@ -1084,7 +996,7 @@ class REXML::Document < ::REXML::Element # # REXML::Element.add_element(name_or_element, attributes) # - # source://rexml//lib/rexml/document.rb#211 + # pkg:gem/rexml#lib/rexml/document.rb:213 def add_element(arg = T.unsafe(nil), arg2 = T.unsafe(nil)); end # :call-seq: @@ -1093,7 +1005,7 @@ class REXML::Document < ::REXML::Element # Returns the new document resulting from executing # Document.new(self). See Document.new. # - # source://rexml//lib/rexml/document.rb#122 + # pkg:gem/rexml#lib/rexml/document.rb:124 def clone; end # :call-seq: @@ -1106,10 +1018,10 @@ class REXML::Document < ::REXML::Element # d = REXML::Document.new('') # d.doctype.class # => nil # - # source://rexml//lib/rexml/document.rb#243 + # pkg:gem/rexml#lib/rexml/document.rb:245 def doctype; end - # source://rexml//lib/rexml/document.rb#446 + # pkg:gem/rexml#lib/rexml/document.rb:448 def document; end # :call-seq: @@ -1122,31 +1034,19 @@ class REXML::Document < ::REXML::Element # d = REXML::Document.new('') # d.encoding # => "UTF-8" # - # source://rexml//lib/rexml/document.rb#292 + # pkg:gem/rexml#lib/rexml/document.rb:294 def encoding; end - # Returns the value of attribute entity_expansion_count. - # - # source://rexml//lib/rexml/document.rb#435 + # pkg:gem/rexml#lib/rexml/document.rb:437 def entity_expansion_count; end - # Sets the attribute entity_expansion_limit - # - # @param value the value to set the attribute entity_expansion_limit to. - # - # source://rexml//lib/rexml/document.rb#436 + # pkg:gem/rexml#lib/rexml/document.rb:438 def entity_expansion_limit=(_arg0); end - # Returns the value of attribute entity_expansion_text_limit. - # - # source://rexml//lib/rexml/document.rb#437 + # pkg:gem/rexml#lib/rexml/document.rb:439 def entity_expansion_text_limit; end - # Sets the attribute entity_expansion_text_limit - # - # @param value the value to set the attribute entity_expansion_text_limit to. - # - # source://rexml//lib/rexml/document.rb#437 + # pkg:gem/rexml#lib/rexml/document.rb:439 def entity_expansion_text_limit=(_arg0); end # :call-seq: @@ -1154,17 +1054,10 @@ class REXML::Document < ::REXML::Element # # Returns an empty string. # - # source://rexml//lib/rexml/document.rb#131 + # pkg:gem/rexml#lib/rexml/document.rb:133 def expanded_name; end - # :call-seq: - # expanded_name -> empty_string - # - # Returns an empty string. - # d = doc_type - # d ? d.name : "UNDEFINED" - # - # source://rexml//lib/rexml/document.rb#131 + # pkg:gem/rexml#lib/rexml/document.rb:138 def name; end # :call-seq: @@ -1172,10 +1065,10 @@ class REXML::Document < ::REXML::Element # # Returns the symbol +:document+. # - # source://rexml//lib/rexml/document.rb#112 + # pkg:gem/rexml#lib/rexml/document.rb:114 def node_type; end - # source://rexml//lib/rexml/document.rb#439 + # pkg:gem/rexml#lib/rexml/document.rb:441 def record_entity_expansion; end # :call-seq: @@ -1188,7 +1081,7 @@ class REXML::Document < ::REXML::Element # d = REXML::Document.new('') # d.root # => nil # - # source://rexml//lib/rexml/document.rb#227 + # pkg:gem/rexml#lib/rexml/document.rb:229 def root; end # :call-seq: @@ -1202,9 +1095,7 @@ class REXML::Document < ::REXML::Element # d = REXML::Document.new('') # d.stand_alone? # => nil # - # @return [Boolean] - # - # source://rexml//lib/rexml/document.rb#307 + # pkg:gem/rexml#lib/rexml/document.rb:309 def stand_alone?; end # :call-seq: @@ -1218,12 +1109,12 @@ class REXML::Document < ::REXML::Element # d = REXML::Document.new('') # d.version # => "1.0" # - # source://rexml//lib/rexml/document.rb#277 + # pkg:gem/rexml#lib/rexml/document.rb:279 def version; end # :call-seq: - # doc.write(output=$stdout, indent=-1, transtive=false, ie_hack=false, encoding=nil) - # doc.write(options={:output => $stdout, :indent => -1, :transtive => false, :ie_hack => false, :encoding => nil}) + # doc.write(output=$stdout, indent=-1, transitive=false, ie_hack=false, encoding=nil) + # doc.write(options={:output => $stdout, :indent => -1, :transitive => false, :ie_hack => false, :encoding => nil}) # # Write the XML tree out, optionally with indent. This writes out the # entire XML document, including XML declarations, doctype declarations, @@ -1277,7 +1168,7 @@ class REXML::Document < ::REXML::Element # instead of encoding in XML declaration. # Defaults to nil. It means encoding in XML declaration is used. # - # source://rexml//lib/rexml/document.rb#367 + # pkg:gem/rexml#lib/rexml/document.rb:369 def write(*arguments); end # :call-seq: @@ -1293,44 +1184,56 @@ class REXML::Document < ::REXML::Element # d.xml_decl.class # => REXML::XMLDecl # d.xml_decl.to_s # => "" # - # source://rexml//lib/rexml/document.rb#260 + # pkg:gem/rexml#lib/rexml/document.rb:262 def xml_decl; end private - # source://rexml//lib/rexml/document.rb#451 + # pkg:gem/rexml#lib/rexml/document.rb:467 def build(source); end + # New document level cache is created and available in this block. + # This API is thread unsafe. Users can't change this document in this block. + # + # pkg:gem/rexml#lib/rexml/document.rb:458 + def enable_cache; end + + # pkg:gem/rexml#lib/rexml/document.rb:454 + def namespaces_cache; end + + # pkg:gem/rexml#lib/rexml/document.rb:454 + def namespaces_cache=(_arg0); end + class << self # Get the entity expansion limit. By default the limit is set to 10000. # # Deprecated. Use REXML::Security.entity_expansion_limit= instead. # - # source://rexml//lib/rexml/document.rb#417 + # pkg:gem/rexml#lib/rexml/document.rb:419 def entity_expansion_limit; end # Set the entity expansion limit. By default the limit is set to 10000. # # Deprecated. Use REXML::Security.entity_expansion_limit= instead. # - # source://rexml//lib/rexml/document.rb#410 + # pkg:gem/rexml#lib/rexml/document.rb:412 def entity_expansion_limit=(val); end # Get the entity expansion limit. By default the limit is set to 10240. # # Deprecated. Use REXML::Security.entity_expansion_text_limit instead. # - # source://rexml//lib/rexml/document.rb#431 + # pkg:gem/rexml#lib/rexml/document.rb:433 def entity_expansion_text_limit; end # Set the entity expansion limit. By default the limit is set to 10240. # # Deprecated. Use REXML::Security.entity_expansion_text_limit= instead. # - # source://rexml//lib/rexml/document.rb#424 + # pkg:gem/rexml#lib/rexml/document.rb:426 def entity_expansion_text_limit=(val); end - # source://rexml//lib/rexml/document.rb#403 + # pkg:gem/rexml#lib/rexml/document.rb:405 def parse_stream(source, listener); end end end @@ -1596,7 +1499,7 @@ end # #attributes:: Returns the REXML::Attributes object for the element. # #context:: Returns or sets the context hash for the element. # -# source://rexml//lib/rexml/element.rb#271 +# pkg:gem/rexml#lib/rexml/element.rb:271 class REXML::Element < ::REXML::Parent include ::REXML::XMLTokens include ::REXML::Namespace @@ -1637,9 +1540,7 @@ class REXML::Element < ::REXML::Parent # e = REXML::Element.new('foo', nil, {raw: :all}) # e.context # => {:raw=>:all} # - # @return [Element] a new instance of Element - # - # source://rexml//lib/rexml/element.rb#319 + # pkg:gem/rexml#lib/rexml/element.rb:319 def initialize(arg = T.unsafe(nil), parent = T.unsafe(nil), context = T.unsafe(nil)); end # :call-seq: @@ -1681,7 +1582,7 @@ class REXML::Element < ::REXML::Parent # root[:attr] # => "value" # root[:nosuch] # => nil # - # source://rexml//lib/rexml/element.rb#1246 + # pkg:gem/rexml#lib/rexml/element.rb:1238 def [](name_or_index); end # :call-seq: @@ -1710,7 +1611,7 @@ class REXML::Element < ::REXML::Parent # e.add_attribute(a) # => attr='VALUE' # e['attr'] # => "VALUE" # - # source://rexml//lib/rexml/element.rb#1345 + # pkg:gem/rexml#lib/rexml/element.rb:1336 def add_attribute(key, value = T.unsafe(nil)); end # :call-seq: @@ -1736,7 +1637,7 @@ class REXML::Element < ::REXML::Parent # a = [['foo' => 'bar'], ['baz' => 'bat']] # e.add_attributes(a) # - # source://rexml//lib/rexml/element.rb#1376 + # pkg:gem/rexml#lib/rexml/element.rb:1367 def add_attributes(hash); end # :call-seq: @@ -1773,7 +1674,7 @@ class REXML::Element < ::REXML::Parent # e0.add_element(e1, {'bat' => '0', 'bam' => '1'}) # e0[1] # => # - # source://rexml//lib/rexml/element.rb#732 + # pkg:gem/rexml#lib/rexml/element.rb:725 def add_element(element, attrs = T.unsafe(nil)); end # :call-seq: @@ -1794,7 +1695,7 @@ class REXML::Element < ::REXML::Parent # e.add_namespace('baz', 'bat') # e.namespaces # => {"xmlns"=>"bar", "baz"=>"bat"} # - # source://rexml//lib/rexml/element.rb#655 + # pkg:gem/rexml#lib/rexml/element.rb:648 def add_namespace(prefix, uri = T.unsafe(nil)); end # :call-seq: @@ -1836,7 +1737,7 @@ class REXML::Element < ::REXML::Parent # a.add_text(REXML::Text.new('baz')) # a.to_a # => ["foo", , "bar", "baz", "baz"] # - # source://rexml//lib/rexml/element.rb#1147 + # pkg:gem/rexml#lib/rexml/element.rb:1139 def add_text(text); end # :call-seq: @@ -1868,13 +1769,13 @@ class REXML::Element < ::REXML::Parent # document.root.attribute("x") # => x='x' # document.root.attribute("x", "a") # => a:x='a:x' # - # source://rexml//lib/rexml/element.rb#1287 + # pkg:gem/rexml#lib/rexml/element.rb:1279 def attribute(name, namespace = T.unsafe(nil)); end # Mechanisms for accessing attributes and child elements of this # element. # - # source://rexml//lib/rexml/element.rb#278 + # pkg:gem/rexml#lib/rexml/element.rb:278 def attributes; end # :call-seq: @@ -1893,7 +1794,7 @@ class REXML::Element < ::REXML::Parent # cds.frozen? # => true # cds.map {|cd| cd.class } # => [REXML::CData, REXML::CData] # - # source://rexml//lib/rexml/element.rb#1420 + # pkg:gem/rexml#lib/rexml/element.rb:1411 def cdatas; end # :call-seq: @@ -1906,7 +1807,7 @@ class REXML::Element < ::REXML::Parent # e.add_attributes({'bar' => 0, 'baz' => 1}) # e.clone # => # - # source://rexml//lib/rexml/element.rb#383 + # pkg:gem/rexml#lib/rexml/element.rb:383 def clone; end # :call-seq: @@ -1926,19 +1827,19 @@ class REXML::Element < ::REXML::Parent # cs.map {|c| c.class } # => [REXML::Comment, REXML::Comment] # cs.map {|c| c.to_s } # => ["foo", "bar"] # - # source://rexml//lib/rexml/element.rb#1441 + # pkg:gem/rexml#lib/rexml/element.rb:1432 def comments; end # The context holds information about the processing environment, such as # whitespace handling. # - # source://rexml//lib/rexml/element.rb#281 + # pkg:gem/rexml#lib/rexml/element.rb:281 def context; end # The context holds information about the processing environment, such as # whitespace handling. # - # source://rexml//lib/rexml/element.rb#281 + # pkg:gem/rexml#lib/rexml/element.rb:281 def context=(_arg0); end # :call-seq: @@ -1952,7 +1853,7 @@ class REXML::Element < ::REXML::Parent # e.delete_attribute('bar') # => # e.delete_attribute('bar') # => nil # - # source://rexml//lib/rexml/element.rb#1395 + # pkg:gem/rexml#lib/rexml/element.rb:1386 def delete_attribute(key); end # :call-seq: @@ -1992,7 +1893,7 @@ class REXML::Element < ::REXML::Parent # a.delete_element('//c') # => # a.delete_element('//c') # => nil # - # source://rexml//lib/rexml/element.rb#778 + # pkg:gem/rexml#lib/rexml/element.rb:771 def delete_element(element); end # :call-seq: @@ -2017,7 +1918,7 @@ class REXML::Element < ::REXML::Parent # d.root.delete_namespace('nosuch') # d.to_s # => "" # - # source://rexml//lib/rexml/element.rb#687 + # pkg:gem/rexml#lib/rexml/element.rb:680 def delete_namespace(namespace = T.unsafe(nil)); end # :call-seq: @@ -2041,7 +1942,7 @@ class REXML::Element < ::REXML::Parent # # Related: #root, #root_node. # - # source://rexml//lib/rexml/element.rb#475 + # pkg:gem/rexml#lib/rexml/element.rb:475 def document; end # :call-seq: @@ -2060,7 +1961,7 @@ class REXML::Element < ::REXML::Parent # ... # # - # source://rexml//lib/rexml/element.rb#930 + # pkg:gem/rexml#lib/rexml/element.rb:923 def each_element(xpath = T.unsafe(nil), &block); end # :call-seq: @@ -2112,7 +2013,7 @@ class REXML::Element < ::REXML::Parent # # # - # source://rexml//lib/rexml/element.rb#847 + # pkg:gem/rexml#lib/rexml/element.rb:840 def each_element_with_attribute(key, value = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end # :call-seq: @@ -2162,13 +2063,13 @@ class REXML::Element < ::REXML::Parent # # ... # - # source://rexml//lib/rexml/element.rb#904 + # pkg:gem/rexml#lib/rexml/element.rb:897 def each_element_with_text(text = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end # Mechanisms for accessing attributes and child elements of this # element. # - # source://rexml//lib/rexml/element.rb#278 + # pkg:gem/rexml#lib/rexml/element.rb:278 def elements; end # :call-seq: @@ -2186,7 +2087,7 @@ class REXML::Element < ::REXML::Parent # d = REXML::Document.new(xml_string) # d.root.get_elements('//a') # => [ ... , ] # - # source://rexml//lib/rexml/element.rb#949 + # pkg:gem/rexml#lib/rexml/element.rb:942 def get_elements(xpath); end # :call-seq: @@ -2206,7 +2107,7 @@ class REXML::Element < ::REXML::Parent # # d.root.get_text(1) # => "this is bold!" # - # source://rexml//lib/rexml/element.rb#1053 + # pkg:gem/rexml#lib/rexml/element.rb:1045 def get_text(path = T.unsafe(nil)); end # :call-seq: @@ -2219,9 +2120,7 @@ class REXML::Element < ::REXML::Parent # a.has_attributes? # => true # b.has_attributes? # => false # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#1315 + # pkg:gem/rexml#lib/rexml/element.rb:1306 def has_attributes?; end # :call-seq: @@ -2236,9 +2135,7 @@ class REXML::Element < ::REXML::Parent # b = a[0] # => # b.has_elements? # => false # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#794 + # pkg:gem/rexml#lib/rexml/element.rb:787 def has_elements?; end # :call-seq: @@ -2253,9 +2150,7 @@ class REXML::Element < ::REXML::Parent # b = a[0] # b.has_text? # => false # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#1002 + # pkg:gem/rexml#lib/rexml/element.rb:995 def has_text?; end # :call-seq: @@ -2265,7 +2160,7 @@ class REXML::Element < ::REXML::Parent # # See {Element Context}[../doc/rexml/context_rdoc.html]. # - # source://rexml//lib/rexml/element.rb#513 + # pkg:gem/rexml#lib/rexml/element.rb:512 def ignore_whitespace_nodes; end # :call-seq: @@ -2289,7 +2184,7 @@ class REXML::Element < ::REXML::Parent # e.add_element(REXML::Element.new('baz')) # e.inspect # => " ... " # - # source://rexml//lib/rexml/element.rb#358 + # pkg:gem/rexml#lib/rexml/element.rb:358 def inspect; end # :call-seq: @@ -2309,7 +2204,7 @@ class REXML::Element < ::REXML::Parent # is.map {|i| i.class } # => [REXML::Instruction, REXML::Instruction] # is.map {|i| i.to_s } # => ["", ""] # - # source://rexml//lib/rexml/element.rb#1462 + # pkg:gem/rexml#lib/rexml/element.rb:1453 def instructions; end # :call-seq: @@ -2332,7 +2227,7 @@ class REXML::Element < ::REXML::Parent # b.namespace('y') # => "2" # b.namespace('nosuch') # => nil # - # source://rexml//lib/rexml/element.rb#618 + # pkg:gem/rexml#lib/rexml/element.rb:619 def namespace(prefix = T.unsafe(nil)); end # :call-seq: @@ -2354,7 +2249,7 @@ class REXML::Element < ::REXML::Parent # d.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"} # d.elements['//c'].namespaces # => {"x"=>"1", "y"=>"2", "z"=>"3"} # - # source://rexml//lib/rexml/element.rb#591 + # pkg:gem/rexml#lib/rexml/element.rb:590 def namespaces; end # :call-seq: @@ -2367,7 +2262,7 @@ class REXML::Element < ::REXML::Parent # d.root.elements['b'].next_element #-> # d.root.elements['c'].next_element #-> nil # - # source://rexml//lib/rexml/element.rb#963 + # pkg:gem/rexml#lib/rexml/element.rb:956 def next_element; end # :call-seq: @@ -2379,7 +2274,7 @@ class REXML::Element < ::REXML::Parent # a = d.root # => # a.node_type # => :element # - # source://rexml//lib/rexml/element.rb#1168 + # pkg:gem/rexml#lib/rexml/element.rb:1160 def node_type; end # :call-seq: @@ -2401,7 +2296,7 @@ class REXML::Element < ::REXML::Parent # d.elements['//b'].prefixes # => ["x", "y"] # d.elements['//c'].prefixes # => ["x", "y", "z"] # - # source://rexml//lib/rexml/element.rb#565 + # pkg:gem/rexml#lib/rexml/element.rb:564 def prefixes; end # :call-seq: @@ -2414,7 +2309,7 @@ class REXML::Element < ::REXML::Parent # d.root.elements['c'].previous_element #-> # d.root.elements['b'].previous_element #-> nil # - # source://rexml//lib/rexml/element.rb#979 + # pkg:gem/rexml#lib/rexml/element.rb:972 def previous_element; end # :call-seq: @@ -2427,7 +2322,7 @@ class REXML::Element < ::REXML::Parent # The evaluation is tested against +expanded_name+, and so is namespace # sensitive. # - # source://rexml//lib/rexml/element.rb#533 + # pkg:gem/rexml#lib/rexml/element.rb:532 def raw; end # :call-seq: @@ -2447,7 +2342,7 @@ class REXML::Element < ::REXML::Parent # # Related: #root_node, #document. # - # source://rexml//lib/rexml/element.rb#443 + # pkg:gem/rexml#lib/rexml/element.rb:443 def root; end # :call-seq: @@ -2485,7 +2380,7 @@ class REXML::Element < ::REXML::Parent # # Related: #root, #document. # - # source://rexml//lib/rexml/element.rb#422 + # pkg:gem/rexml#lib/rexml/element.rb:422 def root_node; end # :call-seq: @@ -2512,7 +2407,7 @@ class REXML::Element < ::REXML::Parent # Note also that the text note is retrieved by method get_text, # and so is always normalized text. # - # source://rexml//lib/rexml/element.rb#1030 + # pkg:gem/rexml#lib/rexml/element.rb:1023 def text(path = T.unsafe(nil)); end # :call-seq: @@ -2540,7 +2435,7 @@ class REXML::Element < ::REXML::Parent # # d.root.text = nil #-> '' # - # source://rexml//lib/rexml/element.rb#1089 + # pkg:gem/rexml#lib/rexml/element.rb:1081 def text=(text); end # :call-seq: @@ -2555,7 +2450,7 @@ class REXML::Element < ::REXML::Parent # ts.map {|t| t.class } # => [REXML::Text, REXML::Text] # ts.map {|t| t.to_s } # => ["text", "more"] # - # source://rexml//lib/rexml/element.rb#1478 + # pkg:gem/rexml#lib/rexml/element.rb:1469 def texts; end # :call-seq: @@ -2569,7 +2464,7 @@ class REXML::Element < ::REXML::Parent # The evaluation is tested against the element's +expanded_name+, # and so is namespace-sensitive. # - # source://rexml//lib/rexml/element.rb#490 + # pkg:gem/rexml#lib/rexml/element.rb:489 def whitespace; end # == DEPRECATED @@ -2595,7 +2490,7 @@ class REXML::Element < ::REXML::Parent # doc.write( out ) #-> doc is written to the string 'out' # doc.write( $stdout ) #-> doc written to the console # - # source://rexml//lib/rexml/element.rb#1504 + # pkg:gem/rexml#lib/rexml/element.rb:1495 def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end # :call-seq: @@ -2618,25 +2513,26 @@ class REXML::Element < ::REXML::Parent # e = REXML::Element.new('foo') # e.xpath # => "foo" # - # source://rexml//lib/rexml/element.rb#1192 + # pkg:gem/rexml#lib/rexml/element.rb:1184 def xpath; end private - # source://rexml//lib/rexml/element.rb#1521 + # pkg:gem/rexml#lib/rexml/element.rb:1519 def __to_xpath_helper(node); end + # pkg:gem/rexml#lib/rexml/element.rb:1511 + def calculate_namespaces; end + # A private helper method # - # source://rexml//lib/rexml/element.rb#1536 + # pkg:gem/rexml#lib/rexml/element.rb:1534 def each_with_something(test, max = T.unsafe(nil), name = T.unsafe(nil)); end end -# source://rexml//lib/rexml/doctype.rb#261 +# pkg:gem/rexml#lib/rexml/doctype.rb:257 class REXML::ElementDecl < ::REXML::Declaration - # @return [ElementDecl] a new instance of ElementDecl - # - # source://rexml//lib/rexml/doctype.rb#262 + # pkg:gem/rexml#lib/rexml/doctype.rb:258 def initialize(src); end end @@ -2682,7 +2578,7 @@ end # elements = d.root.elements # elements # => # ... > # -# source://rexml//lib/rexml/element.rb#1591 +# pkg:gem/rexml#lib/rexml/element.rb:1589 class REXML::Elements include ::Enumerable @@ -2697,74 +2593,10 @@ class REXML::Elements # eles # => # ... > # eles == d.root.elements # => false # - # @return [Elements] a new instance of Elements - # - # source://rexml//lib/rexml/element.rb#1604 + # pkg:gem/rexml#lib/rexml/element.rb:1602 def initialize(parent); end - # :call-seq: - # add -> new_element - # add(name) -> new_element - # add(element) -> element - # - # Adds an element; returns the element added. - # - # With no argument, creates and adds a new element. - # The new element has: - # - # - No name. - # - \Parent from the \Elements object. - # - Context from the that parent. - # - # Example: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # parent = elements.parent # => ... - # parent.context = {raw: :all} - # elements.size # => 4 - # new_element = elements.add # => - # elements.size # => 5 - # new_element.name # => nil - # new_element.parent # => ... - # new_element.context # => {:raw=>:all} - # - # With string argument +name+, creates and adds a new element. - # The new element has: - # - # - Name +name+. - # - \Parent from the \Elements object. - # - Context from the that parent. - # - # Example: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # parent = elements.parent # => ... - # parent.context = {raw: :all} - # elements.size # => 4 - # new_element = elements.add('foo') # => - # elements.size # => 5 - # new_element.name # => "foo" - # new_element.parent # => ... - # new_element.context # => {:raw=>:all} - # - # With argument +element+, - # creates and adds a clone of the given +element+. - # The new element has name, parent, and context from the given +element+. - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.size # => 4 - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new('bar', e0, {raw: :all}) - # element = elements.add(e1) # => - # elements.size # => 5 - # element.name # => "bar" - # element.parent # => ... - # element.context # => {:raw=>:all} - # - # source://rexml//lib/rexml/element.rb#1921 + # pkg:gem/rexml#lib/rexml/element.rb:1927 def <<(element = T.unsafe(nil)); end # :call-seq: @@ -2820,7 +2652,7 @@ class REXML::Elements # eles[4, 'book'] # => ... # eles[5, 'book'] # => nil # - # source://rexml//lib/rexml/element.rb#1676 + # pkg:gem/rexml#lib/rexml/element.rb:1674 def [](index, name = T.unsafe(nil)); end # :call-seq: @@ -2859,7 +2691,7 @@ class REXML::Elements # eles[50] = REXML::Text.new('bar') # => "bar" # eles.size # => 5 # - # source://rexml//lib/rexml/element.rb#1731 + # pkg:gem/rexml#lib/rexml/element.rb:1725 def []=(index, element); end # :call-seq: @@ -2924,7 +2756,7 @@ class REXML::Elements # element.parent # => ... # element.context # => {:raw=>:all} # - # source://rexml//lib/rexml/element.rb#1921 + # pkg:gem/rexml#lib/rexml/element.rb:1915 def add(element = T.unsafe(nil)); end # :call-seq: @@ -2944,7 +2776,7 @@ class REXML::Elements # xpath = '//book [@category="web"]' # elements.collect(xpath) {|element| element.size } # => [17, 9] # - # source://rexml//lib/rexml/element.rb#1984 + # pkg:gem/rexml#lib/rexml/element.rb:1978 def collect(xpath = T.unsafe(nil)); end # :call-seq: @@ -2988,7 +2820,7 @@ class REXML::Elements # elements.delete('//book [@category="children"]') # => ... # elements.delete('//nosuch') # => nil # - # source://rexml//lib/rexml/element.rb#1821 + # pkg:gem/rexml#lib/rexml/element.rb:1815 def delete(element); end # :call-seq: @@ -3008,7 +2840,7 @@ class REXML::Elements # elements.size # => 0 # elements.delete_all('//book') # => [] # - # source://rexml//lib/rexml/element.rb#1847 + # pkg:gem/rexml#lib/rexml/element.rb:1841 def delete_all(xpath); end # :call-seq: @@ -3039,7 +2871,7 @@ class REXML::Elements # ... # ... # - # source://rexml//lib/rexml/element.rb#1963 + # pkg:gem/rexml#lib/rexml/element.rb:1957 def each(xpath = T.unsafe(nil)); end # :call-seq: @@ -3052,9 +2884,7 @@ class REXML::Elements # d = REXML::Document.new(xml_string) # d.elements.empty? # => false # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#1751 + # pkg:gem/rexml#lib/rexml/element.rb:1745 def empty?; end # :call-seq: @@ -3071,7 +2901,7 @@ class REXML::Elements # elements.index(ele_4) # => 3 # elements.index(ele_3) # => -1 # - # source://rexml//lib/rexml/element.rb#1769 + # pkg:gem/rexml#lib/rexml/element.rb:1763 def index(element); end # :call-seq: @@ -3151,7 +2981,7 @@ class REXML::Elements # total += element.size # end # => 26 # - # source://rexml//lib/rexml/element.rb#2069 + # pkg:gem/rexml#lib/rexml/element.rb:2063 def inject(xpath = T.unsafe(nil), initial = T.unsafe(nil)); end # :call-seq: @@ -3165,7 +2995,7 @@ class REXML::Elements # elements = REXML::Elements.new(d.root) # elements.parent == d.root # => true # - # source://rexml//lib/rexml/element.rb#1619 + # pkg:gem/rexml#lib/rexml/element.rb:1617 def parent; end # :call-seq: @@ -3177,7 +3007,7 @@ class REXML::Elements # d.root.elements.size # => 3 # Three elements. # d.root.size # => 6 # Three elements plus three text nodes.. # - # source://rexml//lib/rexml/element.rb#2093 + # pkg:gem/rexml#lib/rexml/element.rb:2087 def size; end # :call-seq: @@ -3198,40 +3028,40 @@ class REXML::Elements # # elements.to_a('//c') # => [] # - # source://rexml//lib/rexml/element.rb#2117 + # pkg:gem/rexml#lib/rexml/element.rb:2111 def to_a(xpath = T.unsafe(nil)); end private # Private helper class. Removes quotes from quoted strings # - # source://rexml//lib/rexml/element.rb#2125 + # pkg:gem/rexml#lib/rexml/element.rb:2119 def literalize(name); end end -# source://rexml//lib/rexml/encoding.rb#4 +# pkg:gem/rexml#lib/rexml/encoding.rb:4 module REXML::Encoding - # source://rexml//lib/rexml/encoding.rb#29 + # pkg:gem/rexml#lib/rexml/encoding.rb:26 def decode(string); end - # source://rexml//lib/rexml/encoding.rb#25 + # pkg:gem/rexml#lib/rexml/encoding.rb:22 def encode(string); end # ID ---> Encoding name # - # source://rexml//lib/rexml/encoding.rb#6 + # pkg:gem/rexml#lib/rexml/encoding.rb:6 def encoding; end - # source://rexml//lib/rexml/encoding.rb#7 + # pkg:gem/rexml#lib/rexml/encoding.rb:7 def encoding=(encoding); end private - # source://rexml//lib/rexml/encoding.rb#34 + # pkg:gem/rexml#lib/rexml/encoding.rb:31 def find_encoding(name); end end -# source://rexml//lib/rexml/entity.rb#7 +# pkg:gem/rexml#lib/rexml/entity.rb:7 class REXML::Entity < ::REXML::Child include ::REXML::XMLTokens @@ -3245,56 +3075,42 @@ class REXML::Entity < ::REXML::Child # # e = Entity.new( 'amp', '&' ) # - # @return [Entity] a new instance of Entity - # - # source://rexml//lib/rexml/entity.rb#34 + # pkg:gem/rexml#lib/rexml/entity.rb:34 def initialize(stream, value = T.unsafe(nil), parent = T.unsafe(nil), reference = T.unsafe(nil)); end - # Returns the value of attribute external. - # - # source://rexml//lib/rexml/entity.rb#23 + # pkg:gem/rexml#lib/rexml/entity.rb:23 def external; end - # Returns the value of attribute name. - # - # source://rexml//lib/rexml/entity.rb#23 + # pkg:gem/rexml#lib/rexml/entity.rb:23 def name; end - # Returns the value of attribute ndata. - # - # source://rexml//lib/rexml/entity.rb#23 + # pkg:gem/rexml#lib/rexml/entity.rb:23 def ndata; end # Returns the value of this entity unprocessed -- raw. This is the # normalized value; that is, with all %ent; and &ent; entities intact # - # source://rexml//lib/rexml/entity.rb#86 + # pkg:gem/rexml#lib/rexml/entity.rb:86 def normalized; end - # Returns the value of attribute pubid. - # - # source://rexml//lib/rexml/entity.rb#23 + # pkg:gem/rexml#lib/rexml/entity.rb:23 def pubid; end - # Returns the value of attribute ref. - # - # source://rexml//lib/rexml/entity.rb#23 + # pkg:gem/rexml#lib/rexml/entity.rb:23 def ref; end # Returns this entity as a string. See write(). # - # source://rexml//lib/rexml/entity.rb#120 + # pkg:gem/rexml#lib/rexml/entity.rb:120 def to_s; end # Evaluates to the unnormalized value of this entity; that is, replacing # &ent; entities. # - # source://rexml//lib/rexml/entity.rb#73 + # pkg:gem/rexml#lib/rexml/entity.rb:73 def unnormalized; end - # Returns the value of attribute value. - # - # source://rexml//lib/rexml/entity.rb#23 + # pkg:gem/rexml#lib/rexml/entity.rb:23 def value; end # Write out a fully formed, correct entity definition (assuming the Entity @@ -3306,35 +3122,31 @@ class REXML::Entity < ::REXML::Child # indent:: # *DEPRECATED* and ignored # - # source://rexml//lib/rexml/entity.rb#98 + # pkg:gem/rexml#lib/rexml/entity.rb:98 def write(out, indent = T.unsafe(nil)); end class << self # Evaluates whether the given string matches an entity definition, # returning true if so, and false otherwise. # - # @return [Boolean] - # - # source://rexml//lib/rexml/entity.rb#67 + # pkg:gem/rexml#lib/rexml/entity.rb:67 def matches?(string); end end end -# source://rexml//lib/rexml/doctype.rb#267 +# pkg:gem/rexml#lib/rexml/doctype.rb:263 class REXML::ExternalEntity < ::REXML::Child - # @return [ExternalEntity] a new instance of ExternalEntity - # - # source://rexml//lib/rexml/doctype.rb#268 + # pkg:gem/rexml#lib/rexml/doctype.rb:264 def initialize(src); end - # source://rexml//lib/rexml/doctype.rb#272 + # pkg:gem/rexml#lib/rexml/doctype.rb:268 def to_s; end - # source://rexml//lib/rexml/doctype.rb#275 + # pkg:gem/rexml#lib/rexml/doctype.rb:271 def write(output, indent); end end -# source://rexml//lib/rexml/formatters/default.rb#5 +# pkg:gem/rexml#lib/rexml/formatters/default.rb:5 class REXML::Formatters::Default # Prints out the XML document with no formatting -- except if ie_hack is # set. @@ -3343,9 +3155,7 @@ class REXML::Formatters::Default # If set to true, then inserts whitespace before the close of an empty # tag, so that IE's bad XML parser doesn't choke. # - # @return [Default] a new instance of Default - # - # source://rexml//lib/rexml/formatters/default.rb#12 + # pkg:gem/rexml#lib/rexml/formatters/default.rb:12 def initialize(ie_hack = T.unsafe(nil)); end # Writes the node to some output. @@ -3356,27 +3166,27 @@ class REXML::Formatters::Default # A class implementing <<. Pass in an Output object to # change the output encoding. # - # source://rexml//lib/rexml/formatters/default.rb#23 + # pkg:gem/rexml#lib/rexml/formatters/default.rb:23 def write(node, output); end protected - # source://rexml//lib/rexml/formatters/default.rb#98 + # pkg:gem/rexml#lib/rexml/formatters/default.rb:98 def write_cdata(node, output); end - # source://rexml//lib/rexml/formatters/default.rb#92 + # pkg:gem/rexml#lib/rexml/formatters/default.rb:92 def write_comment(node, output); end - # source://rexml//lib/rexml/formatters/default.rb#61 + # pkg:gem/rexml#lib/rexml/formatters/default.rb:61 def write_document(node, output); end - # source://rexml//lib/rexml/formatters/default.rb#65 + # pkg:gem/rexml#lib/rexml/formatters/default.rb:65 def write_element(node, output); end - # source://rexml//lib/rexml/formatters/default.rb#104 + # pkg:gem/rexml#lib/rexml/formatters/default.rb:104 def write_instruction(node, output); end - # source://rexml//lib/rexml/formatters/default.rb#88 + # pkg:gem/rexml#lib/rexml/formatters/default.rb:88 def write_text(node, output); end end @@ -3385,7 +3195,7 @@ end # # TODO: Add an option to print attributes on new lines # -# source://rexml//lib/rexml/formatters/pretty.rb#10 +# pkg:gem/rexml#lib/rexml/formatters/pretty.rb:10 class REXML::Formatters::Pretty < ::REXML::Formatters::Default # Create a new pretty printer. # @@ -3400,279 +3210,520 @@ class REXML::Formatters::Pretty < ::REXML::Formatters::Default # tags, thereby allowing Internet Explorer's XML parser to # function. Defaults to false. # - # @return [Pretty] a new instance of Pretty - # - # source://rexml//lib/rexml/formatters/pretty.rb#30 + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:30 def initialize(indentation = T.unsafe(nil), ie_hack = T.unsafe(nil)); end # If compact is set to true, then the formatter will attempt to use as # little space as possible # - # source://rexml//lib/rexml/formatters/pretty.rb#14 + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:14 def compact; end # If compact is set to true, then the formatter will attempt to use as # little space as possible # - # source://rexml//lib/rexml/formatters/pretty.rb#14 + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:14 def compact=(_arg0); end # The width of a page. Used for formatting text # - # source://rexml//lib/rexml/formatters/pretty.rb#16 + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:16 def width; end # The width of a page. Used for formatting text # - # source://rexml//lib/rexml/formatters/pretty.rb#16 + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:16 def width=(_arg0); end protected - # source://rexml//lib/rexml/formatters/pretty.rb#102 + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:102 def write_cdata(node, output); end - # source://rexml//lib/rexml/formatters/pretty.rb#97 + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:97 def write_comment(node, output); end - # source://rexml//lib/rexml/formatters/pretty.rb#107 + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:107 def write_document(node, output); end - # source://rexml//lib/rexml/formatters/pretty.rb#39 + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:39 def write_element(node, output); end - # source://rexml//lib/rexml/formatters/pretty.rb#88 + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:88 def write_text(node, output); end private - # source://rexml//lib/rexml/formatters/pretty.rb#124 + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:124 def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end - # source://rexml//lib/rexml/formatters/pretty.rb#129 + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:129 def wrap(string, width); end end +# If you add a method, keep in mind two things: +# (1) the first argument will always be a list of nodes from which to +# filter. In the case of context methods (such as position), the function +# should return an array with a value for each child in the array. +# (2) all method calls from XML will have "-" replaced with "_". +# Therefore, in XML, "local-name()" is identical (and actually becomes) +# "local_name()" +# +# pkg:gem/rexml#lib/rexml/functions.rb:10 +module REXML::Functions + class << self + # pkg:gem/rexml#lib/rexml/functions.rb:317 + def boolean(object = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/functions.rb:417 + def ceiling(number); end + + # pkg:gem/rexml#lib/rexml/functions.rb:370 + def compare_language(lang1, lang2); end + + # pkg:gem/rexml#lib/rexml/functions.rb:190 + def concat(*objects); end + + # Fixed by Mike Stok + # + # pkg:gem/rexml#lib/rexml/functions.rb:204 + def contains(string, test); end + + # pkg:gem/rexml#lib/rexml/functions.rb:38 + def context=(value); end + + # Returns the size of the given list of nodes. + # + # pkg:gem/rexml#lib/rexml/functions.rb:60 + def count(node_set); end + + # UNTESTED + # + # pkg:gem/rexml#lib/rexml/functions.rb:347 + def false; end + + # pkg:gem/rexml#lib/rexml/functions.rb:413 + def floor(number); end + + # Helper method. + # + # pkg:gem/rexml#lib/rexml/functions.rb:87 + def get_namespace(node_set = T.unsafe(nil)); end + + # Since REXML is non-validating, this method is not implemented as it + # requires a DTD + # + # pkg:gem/rexml#lib/rexml/functions.rb:66 + def id(object); end + + # UNTESTED + # + # pkg:gem/rexml#lib/rexml/functions.rb:352 + def lang(language); end + + # Returns the last node of the given list of nodes. + # + # pkg:gem/rexml#lib/rexml/functions.rb:51 + def last; end + + # pkg:gem/rexml#lib/rexml/functions.rb:69 + def local_name(node_set = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/functions.rb:80 + def name(node_set = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/functions.rb:35 + def namespace_context; end + + # pkg:gem/rexml#lib/rexml/functions.rb:33 + def namespace_context=(x); end + + # pkg:gem/rexml#lib/rexml/functions.rb:76 + def namespace_uri(node_set = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/functions.rb:265 + def normalize_space(string = T.unsafe(nil)); end + + # UNTESTED + # + # pkg:gem/rexml#lib/rexml/functions.rb:337 + def not(object); end + + # a string that consists of optional whitespace followed by an optional + # minus sign followed by a Number followed by whitespace is converted to + # the IEEE 754 number that is nearest (according to the IEEE 754 + # round-to-nearest rule) to the mathematical value represented by the + # string; any other string is converted to NaN + # + # boolean true is converted to 1; boolean false is converted to 0 + # + # a node-set is first converted to a string as if by a call to the string + # function and then converted in the same way as a string argument + # + # an object of a type other than the four basic types is converted to a + # number in a way that is dependent on that type + # + # pkg:gem/rexml#lib/rexml/functions.rb:387 + def number(object = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/functions.rb:55 + def position; end + + # pkg:gem/rexml#lib/rexml/functions.rb:432 + def processing_instruction(node); end + + # pkg:gem/rexml#lib/rexml/functions.rb:421 + def round(number); end + + # pkg:gem/rexml#lib/rexml/functions.rb:436 + def send(name, *args); end + + # pkg:gem/rexml#lib/rexml/functions.rb:26 + def singleton_method_added(name); end + + # Fixed by Mike Stok + # + # pkg:gem/rexml#lib/rexml/functions.rb:199 + def starts_with(string, test); end + + # A node-set is converted to a string by returning the string-value of the + # node in the node-set that is first in document order. If the node-set is + # empty, an empty string is returned. + # + # A number is converted to a string as follows + # + # NaN is converted to the string NaN + # + # positive zero is converted to the string 0 + # + # negative zero is converted to the string 0 + # + # positive infinity is converted to the string Infinity + # + # negative infinity is converted to the string -Infinity + # + # if the number is an integer, the number is represented in decimal form + # as a Number with no decimal point and no leading zeros, preceded by a + # minus sign (-) if the number is negative + # + # otherwise, the number is represented in decimal form as a Number + # including a decimal point with at least one digit before the decimal + # point and at least one digit after the decimal point, preceded by a + # minus sign (-) if the number is negative; there must be no leading zeros + # before the decimal point apart possibly from the one required digit + # immediately before the decimal point; beyond the one required digit + # after the decimal point there must be as many, but only as many, more + # digits as are needed to uniquely distinguish the number from all other + # IEEE 754 numeric values. + # + # The boolean false value is converted to the string false. The boolean + # true value is converted to the string true. + # + # An object of a type other than the four basic types is converted to a + # string in a way that is dependent on that type. + # + # pkg:gem/rexml#lib/rexml/functions.rb:138 + def string(object = T.unsafe(nil)); end + + # UNTESTED + # + # pkg:gem/rexml#lib/rexml/functions.rb:261 + def string_length(string); end + + # A node-set is converted to a string by + # returning the concatenation of the string-value + # of each of the children of the node in the + # node-set that is first in document order. + # If the node-set is empty, an empty string is returned. + # + # pkg:gem/rexml#lib/rexml/functions.rb:178 + def string_value(o); end + + # Take equal portions of Mike Stok and Sean Russell; mix + # vigorously, and pour into a tall, chilled glass. Serves 10,000. + # + # pkg:gem/rexml#lib/rexml/functions.rb:228 + def substring(string, start, length = T.unsafe(nil)); end + + # Kouhei fixed this too + # + # pkg:gem/rexml#lib/rexml/functions.rb:220 + def substring_after(string, test); end + + # Kouhei fixed this + # + # pkg:gem/rexml#lib/rexml/functions.rb:209 + def substring_before(string, test); end + + # pkg:gem/rexml#lib/rexml/functions.rb:408 + def sum(nodes); end + + # pkg:gem/rexml#lib/rexml/functions.rb:40 + def text; end + + # This is entirely Mike Stok's beast + # + # pkg:gem/rexml#lib/rexml/functions.rb:275 + def translate(string, tr1, tr2); end + + # UNTESTED + # + # pkg:gem/rexml#lib/rexml/functions.rb:342 + def true; end + + # pkg:gem/rexml#lib/rexml/functions.rb:36 + def variables; end + + # pkg:gem/rexml#lib/rexml/functions.rb:34 + def variables=(x); end + end +end + # A Source that wraps an IO. See the Source class for method # documentation # -# source://rexml//lib/rexml/source.rb#183 +# pkg:gem/rexml#lib/rexml/source.rb:220 class REXML::IOSource < ::REXML::Source # block_size has been deprecated # - # @return [IOSource] a new instance of IOSource - # - # source://rexml//lib/rexml/source.rb#187 + # pkg:gem/rexml#lib/rexml/source.rb:224 def initialize(arg, block_size = T.unsafe(nil), encoding = T.unsafe(nil)); end # @return the current line in the source # - # source://rexml//lib/rexml/source.rb#275 + # pkg:gem/rexml#lib/rexml/source.rb:329 def current_line; end - # @return [Boolean] - # - # source://rexml//lib/rexml/source.rb#270 + # pkg:gem/rexml#lib/rexml/source.rb:324 def empty?; end - # source://rexml//lib/rexml/source.rb#247 + # pkg:gem/rexml#lib/rexml/source.rb:284 def ensure_buffer; end - # source://rexml//lib/rexml/source.rb#251 + # pkg:gem/rexml#lib/rexml/source.rb:288 def match(pattern, cons = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#208 + # pkg:gem/rexml#lib/rexml/source.rb:307 + def match?(pattern, cons = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/source.rb:245 def read(term = T.unsafe(nil), min_bytes = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#229 + # pkg:gem/rexml#lib/rexml/source.rb:266 def read_until(term); end private - # source://rexml//lib/rexml/source.rb#322 + # pkg:gem/rexml#lib/rexml/source.rb:376 def encoding_updated; end - # source://rexml//lib/rexml/source.rb#297 + # pkg:gem/rexml#lib/rexml/source.rb:351 def readline(term = T.unsafe(nil)); end end # Represents an XML Instruction; IE, # TODO: Add parent arg (3rd arg) to constructor # -# source://rexml//lib/rexml/instruction.rb#9 +# pkg:gem/rexml#lib/rexml/instruction.rb:9 class REXML::Instruction < ::REXML::Child # Constructs a new Instruction + # @param target can be one of a number of things. If String, then # the target of this instruction is set to this. If an Instruction, # then the Instruction is shallowly cloned (target and content are # copied). + # @param content Must be either a String, or a Parent. Can only # be a Parent if the target argument is a Source. Otherwise, this # String is set as the content of this instruction. # - # @param target can be one of a number of things. If String, then - # @param content Must be either a String, or a Parent. Can only - # @return [Instruction] a new instance of Instruction - # - # source://rexml//lib/rexml/instruction.rb#25 + # pkg:gem/rexml#lib/rexml/instruction.rb:25 def initialize(target, content = T.unsafe(nil)); end - # of the other matches the target and content of this object. - # # @return true if other is an Instruction, and the content and target + # of the other matches the target and content of this object. # - # source://rexml//lib/rexml/instruction.rb#65 + # pkg:gem/rexml#lib/rexml/instruction.rb:65 def ==(other); end - # source://rexml//lib/rexml/instruction.rb#44 + # pkg:gem/rexml#lib/rexml/instruction.rb:44 def clone; end # target is the "name" of the Instruction; IE, the "tag" in # content is everything else. # - # source://rexml//lib/rexml/instruction.rb#15 + # pkg:gem/rexml#lib/rexml/instruction.rb:15 def content; end # target is the "name" of the Instruction; IE, the "tag" in # content is everything else. # - # source://rexml//lib/rexml/instruction.rb#15 + # pkg:gem/rexml#lib/rexml/instruction.rb:15 def content=(_arg0); end - # source://rexml//lib/rexml/instruction.rb#75 + # pkg:gem/rexml#lib/rexml/instruction.rb:75 def inspect; end - # source://rexml//lib/rexml/instruction.rb#71 + # pkg:gem/rexml#lib/rexml/instruction.rb:71 def node_type; end # target is the "name" of the Instruction; IE, the "tag" in # content is everything else. # - # source://rexml//lib/rexml/instruction.rb#15 + # pkg:gem/rexml#lib/rexml/instruction.rb:15 def target; end # target is the "name" of the Instruction; IE, the "tag" in # content is everything else. # - # source://rexml//lib/rexml/instruction.rb#15 + # pkg:gem/rexml#lib/rexml/instruction.rb:15 def target=(_arg0); end # == DEPRECATED # See the rexml/formatters package # - # source://rexml//lib/rexml/instruction.rb#51 + # pkg:gem/rexml#lib/rexml/instruction.rb:51 def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end end # Adds named attributes to an object. # -# source://rexml//lib/rexml/namespace.rb#7 +# pkg:gem/rexml#lib/rexml/namespace.rb:7 module REXML::Namespace include ::REXML::XMLTokens # The name of the object, valid if set # - # source://rexml//lib/rexml/namespace.rb#9 + # pkg:gem/rexml#lib/rexml/namespace.rb:9 def expanded_name; end # Fully expand the name, even if the prefix wasn't specified in the # source file. # - # source://rexml//lib/rexml/namespace.rb#57 + # pkg:gem/rexml#lib/rexml/namespace.rb:57 def fully_expanded_name; end # Compares names optionally WITH namespaces # - # @return [Boolean] - # - # source://rexml//lib/rexml/namespace.rb#43 + # pkg:gem/rexml#lib/rexml/namespace.rb:43 def has_name?(other, ns = T.unsafe(nil)); end + # pkg:gem/rexml#lib/rexml/namespace.rb:53 + def local_name; end + # The name of the object, valid if set # - # source://rexml//lib/rexml/namespace.rb#9 + # pkg:gem/rexml#lib/rexml/namespace.rb:9 def name; end # Sets the name and the expanded name # - # source://rexml//lib/rexml/namespace.rb#17 + # pkg:gem/rexml#lib/rexml/namespace.rb:17 def name=(name); end # The expanded name of the object, valid if name is set # - # source://rexml//lib/rexml/namespace.rb#11 + # pkg:gem/rexml#lib/rexml/namespace.rb:11 def prefix; end # The expanded name of the object, valid if name is set # - # source://rexml//lib/rexml/namespace.rb#11 + # pkg:gem/rexml#lib/rexml/namespace.rb:11 def prefix=(_arg0); end end -# source://rexml//lib/rexml/namespace.rb#13 +# pkg:gem/rexml#lib/rexml/namespace.rb:13 REXML::Namespace::NAME_WITHOUT_NAMESPACE = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/doctype.rb#280 -class REXML::NotationDecl < ::REXML::Child - # @return [NotationDecl] a new instance of NotationDecl +# Represents a node in the tree. Nodes are never encountered except as +# superclasses of other objects. Nodes have siblings. +# +# pkg:gem/rexml#lib/rexml/node.rb:9 +module REXML::Node + # Visit all subnodes of +self+ recursively + # + # pkg:gem/rexml#lib/rexml/node.rb:54 + def each_recursive(&block); end + + # Find (and return) first subnode (recursively) for which the block + # evaluates to true. Returns +nil+ if none was found. # - # source://rexml//lib/rexml/doctype.rb#282 + # pkg:gem/rexml#lib/rexml/node.rb:67 + def find_first_recursive(&block); end + + # pkg:gem/rexml#lib/rexml/node.rb:39 + def indent(to, ind); end + + # Returns the position that +self+ holds in its parent's array, indexed + # from 1. + # + # pkg:gem/rexml#lib/rexml/node.rb:76 + def index_in_parent; end + + # @return the next sibling (nil if unset) + # + # pkg:gem/rexml#lib/rexml/node.rb:11 + def next_sibling_node; end + + # pkg:gem/rexml#lib/rexml/node.rb:48 + def parent?; end + + # @return the previous sibling (nil if unset) + # + # pkg:gem/rexml#lib/rexml/node.rb:17 + def previous_sibling_node; end + + # indent:: + # *DEPRECATED* This parameter is now ignored. See the formatters in the + # REXML::Formatters package for changing the output style. + # + # pkg:gem/rexml#lib/rexml/node.rb:27 + def to_s(indent = T.unsafe(nil)); end +end + +# pkg:gem/rexml#lib/rexml/doctype.rb:276 +class REXML::NotationDecl < ::REXML::Child + # pkg:gem/rexml#lib/rexml/doctype.rb:278 def initialize(name, middle, pub, sys); end # This method retrieves the name of the notation. # # Method contributed by Henrik Martensson # - # source://rexml//lib/rexml/doctype.rb#307 + # pkg:gem/rexml#lib/rexml/doctype.rb:302 def name; end - # Returns the value of attribute public. - # - # source://rexml//lib/rexml/doctype.rb#281 + # pkg:gem/rexml#lib/rexml/doctype.rb:277 def public; end - # Sets the attribute public - # - # @param value the value to set the attribute public to. - # - # source://rexml//lib/rexml/doctype.rb#281 + # pkg:gem/rexml#lib/rexml/doctype.rb:277 def public=(_arg0); end - # Returns the value of attribute system. - # - # source://rexml//lib/rexml/doctype.rb#281 + # pkg:gem/rexml#lib/rexml/doctype.rb:277 def system; end - # Sets the attribute system - # - # @param value the value to set the attribute system to. - # - # source://rexml//lib/rexml/doctype.rb#281 + # pkg:gem/rexml#lib/rexml/doctype.rb:277 def system=(_arg0); end - # source://rexml//lib/rexml/doctype.rb#290 + # pkg:gem/rexml#lib/rexml/doctype.rb:286 def to_s; end - # source://rexml//lib/rexml/doctype.rb#300 + # pkg:gem/rexml#lib/rexml/doctype.rb:295 def write(output, indent = T.unsafe(nil)); end end -# source://rexml//lib/rexml/output.rb#5 +# pkg:gem/rexml#lib/rexml/output.rb:5 class REXML::Output include ::REXML::Encoding - # @return [Output] a new instance of Output - # - # source://rexml//lib/rexml/output.rb#10 + # pkg:gem/rexml#lib/rexml/output.rb:10 def initialize(real_IO, encd = T.unsafe(nil)); end - # source://rexml//lib/rexml/output.rb#22 + # pkg:gem/rexml#lib/rexml/output.rb:22 def <<(content); end - # Returns the value of attribute encoding. - # - # source://rexml//lib/rexml/output.rb#8 + # pkg:gem/rexml#lib/rexml/output.rb:8 def encoding; end - # source://rexml//lib/rexml/output.rb#26 + # pkg:gem/rexml#lib/rexml/output.rb:26 def to_s; end end @@ -3680,188 +3731,156 @@ end # class is never encountered except as the superclass for some other # object. # -# source://rexml//lib/rexml/parent.rb#8 +# pkg:gem/rexml#lib/rexml/parent.rb:8 class REXML::Parent < ::REXML::Child include ::Enumerable # Constructor - # # @param parent if supplied, will be set as the parent of this object - # @return [Parent] a new instance of Parent # - # source://rexml//lib/rexml/parent.rb#13 + # pkg:gem/rexml#lib/rexml/parent.rb:13 def initialize(parent = T.unsafe(nil)); end - # source://rexml//lib/rexml/parent.rb#18 + # pkg:gem/rexml#lib/rexml/parent.rb:25 def <<(object); end # Fetches a child at a given index - # # @param index the Integer index of the child to fetch # - # source://rexml//lib/rexml/parent.rb#57 + # pkg:gem/rexml#lib/rexml/parent.rb:57 def [](index); end # Set an index entry. See Array.[]= - # # @param index the index of the element to set # @param opt either the object to set, or an Integer length # @param child if opt is an Integer, this is the child to set # @return the parent (self) # - # source://rexml//lib/rexml/parent.rb#70 + # pkg:gem/rexml#lib/rexml/parent.rb:70 def []=(*args); end - # source://rexml//lib/rexml/parent.rb#18 + # pkg:gem/rexml#lib/rexml/parent.rb:18 def add(object); end - # source://rexml//lib/rexml/parent.rb#115 + # pkg:gem/rexml#lib/rexml/parent.rb:160 def children; end # Deeply clones this object. This creates a complete duplicate of this # Parent, including all descendants. # - # source://rexml//lib/rexml/parent.rb#148 + # pkg:gem/rexml#lib/rexml/parent.rb:148 def deep_clone; end - # source://rexml//lib/rexml/parent.rb#32 + # pkg:gem/rexml#lib/rexml/parent.rb:32 def delete(object); end - # source://rexml//lib/rexml/parent.rb#47 + # pkg:gem/rexml#lib/rexml/parent.rb:47 def delete_at(index); end - # source://rexml//lib/rexml/parent.rb#43 + # pkg:gem/rexml#lib/rexml/parent.rb:43 def delete_if(&block); end - # source://rexml//lib/rexml/parent.rb#39 + # pkg:gem/rexml#lib/rexml/parent.rb:39 def each(&block); end - # source://rexml//lib/rexml/parent.rb#39 + # pkg:gem/rexml#lib/rexml/parent.rb:61 def each_child(&block); end - # source://rexml//lib/rexml/parent.rb#51 + # pkg:gem/rexml#lib/rexml/parent.rb:51 def each_index(&block); end # Fetches the index of a given child - # of this parent. - # # @param child the child to get the index of # @return the index of the child, or nil if the object is not a child + # of this parent. # - # source://rexml//lib/rexml/parent.rb#123 + # pkg:gem/rexml#lib/rexml/parent.rb:123 def index(child); end # Inserts an child after another child + # @param child1 this is either an xpath or an Element. If an Element, # child2 will be inserted after child1 in the child list of the parent. # If an xpath, child2 will be inserted after the first child to match # the xpath. - # - # @param child1 this is either an xpath or an Element. If an Element, # @param child2 the child to insert # @return the parent (self) # - # source://rexml//lib/rexml/parent.rb#102 + # pkg:gem/rexml#lib/rexml/parent.rb:102 def insert_after(child1, child2); end # Inserts an child before another child + # @param child1 this is either an xpath or an Element. If an Element, # child2 will be inserted before child1 in the child list of the parent. # If an xpath, child2 will be inserted before the first child to match # the xpath. - # - # @param child1 this is either an xpath or an Element. If an Element, # @param child2 the child to insert # @return the parent (self) # - # source://rexml//lib/rexml/parent.rb#82 + # pkg:gem/rexml#lib/rexml/parent.rb:82 def insert_before(child1, child2); end - # @return the number of children of this parent - # - # source://rexml//lib/rexml/parent.rb#130 + # pkg:gem/rexml#lib/rexml/parent.rb:134 def length; end - # @return [Boolean] - # - # source://rexml//lib/rexml/parent.rb#162 + # pkg:gem/rexml#lib/rexml/parent.rb:162 def parent?; end - # source://rexml//lib/rexml/parent.rb#18 + # pkg:gem/rexml#lib/rexml/parent.rb:24 def push(object); end # Replaces one child with another, making sure the nodelist is correct - # Child) - # # @param to_replace the child to replace (must be a Child) # @param replacement the child to insert into the nodelist (must be a + # Child) # - # source://rexml//lib/rexml/parent.rb#140 + # pkg:gem/rexml#lib/rexml/parent.rb:140 def replace_child(to_replace, replacement); end # @return the number of children of this parent # - # source://rexml//lib/rexml/parent.rb#130 + # pkg:gem/rexml#lib/rexml/parent.rb:130 def size; end - # source://rexml//lib/rexml/parent.rb#115 + # pkg:gem/rexml#lib/rexml/parent.rb:115 def to_a; end - # source://rexml//lib/rexml/parent.rb#27 + # pkg:gem/rexml#lib/rexml/parent.rb:27 def unshift(object); end end -# source://rexml//lib/rexml/parseexception.rb#3 +# pkg:gem/rexml#lib/rexml/parseexception.rb:3 class REXML::ParseException < ::RuntimeError - # @return [ParseException] a new instance of ParseException - # - # source://rexml//lib/rexml/parseexception.rb#6 + # pkg:gem/rexml#lib/rexml/parseexception.rb:6 def initialize(message, source = T.unsafe(nil), parser = T.unsafe(nil), exception = T.unsafe(nil)); end - # source://rexml//lib/rexml/parseexception.rb#49 + # pkg:gem/rexml#lib/rexml/parseexception.rb:49 def context; end - # Returns the value of attribute continued_exception. - # - # source://rexml//lib/rexml/parseexception.rb#4 + # pkg:gem/rexml#lib/rexml/parseexception.rb:4 def continued_exception; end - # Sets the attribute continued_exception - # - # @param value the value to set the attribute continued_exception to. - # - # source://rexml//lib/rexml/parseexception.rb#4 + # pkg:gem/rexml#lib/rexml/parseexception.rb:4 def continued_exception=(_arg0); end - # source://rexml//lib/rexml/parseexception.rb#44 + # pkg:gem/rexml#lib/rexml/parseexception.rb:44 def line; end - # Returns the value of attribute parser. - # - # source://rexml//lib/rexml/parseexception.rb#4 + # pkg:gem/rexml#lib/rexml/parseexception.rb:4 def parser; end - # Sets the attribute parser - # - # @param value the value to set the attribute parser to. - # - # source://rexml//lib/rexml/parseexception.rb#4 + # pkg:gem/rexml#lib/rexml/parseexception.rb:4 def parser=(_arg0); end - # source://rexml//lib/rexml/parseexception.rb#39 + # pkg:gem/rexml#lib/rexml/parseexception.rb:39 def position; end - # Returns the value of attribute source. - # - # source://rexml//lib/rexml/parseexception.rb#4 + # pkg:gem/rexml#lib/rexml/parseexception.rb:4 def source; end - # Sets the attribute source - # - # @param value the value to set the attribute source to. - # - # source://rexml//lib/rexml/parseexception.rb#4 + # pkg:gem/rexml#lib/rexml/parseexception.rb:4 def source=(_arg0); end - # source://rexml//lib/rexml/parseexception.rb#13 + # pkg:gem/rexml#lib/rexml/parseexception.rb:13 def to_s; end end @@ -3885,55 +3904,39 @@ end # # Nat Price gave me some good ideas for the API. # -# source://rexml//lib/rexml/parsers/baseparser.rb#57 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:57 class REXML::Parsers::BaseParser - # @return [BaseParser] a new instance of BaseParser - # - # source://rexml//lib/rexml/parsers/baseparser.rb#163 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:164 def initialize(source); end - # source://rexml//lib/rexml/parsers/baseparser.rb#173 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:175 def add_listener(listener); end # Returns true if there are no more events # - # @return [Boolean] - # - # source://rexml//lib/rexml/parsers/baseparser.rb#204 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:210 def empty?; end - # source://rexml//lib/rexml/parsers/baseparser.rb#536 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:537 def entity(reference, entities); end - # Returns the value of attribute entity_expansion_count. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#178 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:180 def entity_expansion_count; end - # Sets the attribute entity_expansion_limit - # - # @param value the value to set the attribute entity_expansion_limit to. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#179 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:181 def entity_expansion_limit=(_arg0); end - # Sets the attribute entity_expansion_text_limit - # - # @param value the value to set the attribute entity_expansion_text_limit to. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#180 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:182 def entity_expansion_text_limit=(_arg0); end # Returns true if there are more events. Synonymous with !empty? # - # @return [Boolean] - # - # source://rexml//lib/rexml/parsers/baseparser.rb#209 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:215 def has_next?; end # Escapes all possible entities # - # source://rexml//lib/rexml/parsers/baseparser.rb#547 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:548 def normalize(input, entities = T.unsafe(nil), entity_filter = T.unsafe(nil)); end # Peek at the +depth+ event in the stack. The first element on the stack @@ -3943,165 +3946,175 @@ class REXML::Parsers::BaseParser # event, so you can effectively pre-parse the entire document (pull the # entire thing into memory) using this method. # - # source://rexml//lib/rexml/parsers/baseparser.rb#225 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:231 def peek(depth = T.unsafe(nil)); end - # source://rexml//lib/rexml/parsers/baseparser.rb#194 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:200 def position; end # Returns the next event. This is a +PullEvent+ object. # - # source://rexml//lib/rexml/parsers/baseparser.rb#240 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:246 def pull; end - # Returns the value of attribute source. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#177 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:189 + def reset; end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:179 def source; end - # source://rexml//lib/rexml/parsers/baseparser.rb#182 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:184 def stream=(source); end # Unescapes all possible entities # - # source://rexml//lib/rexml/parsers/baseparser.rb#563 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:564 def unnormalize(string, entities = T.unsafe(nil), filter = T.unsafe(nil)); end # Push an event back on the head of the stream. This method # has (theoretically) infinite depth. # - # source://rexml//lib/rexml/parsers/baseparser.rb#215 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:221 def unshift(token); end private - # source://rexml//lib/rexml/parsers/baseparser.rb#612 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:613 def add_namespace(prefix, uri); end - # @return [Boolean] - # - # source://rexml//lib/rexml/parsers/baseparser.rb#645 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:646 def need_source_encoding_update?(xml_declaration_encoding); end - # source://rexml//lib/rexml/parsers/baseparser.rb#765 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:652 + def normalize_xml_declaration_encoding(xml_declaration_encoding); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:849 + def parse_attribute_value_with_equal(name); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:868 def parse_attributes(prefixes); end - # source://rexml//lib/rexml/parsers/baseparser.rb#664 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:669 def parse_id(base_error_message, accept_external_id:, accept_public_id:); end - # source://rexml//lib/rexml/parsers/baseparser.rb#692 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:697 def parse_id_invalid_details(accept_external_id:, accept_public_id:); end - # source://rexml//lib/rexml/parsers/baseparser.rb#651 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:656 def parse_name(base_error_message); end - # source://rexml//lib/rexml/parsers/baseparser.rb#627 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:628 def pop_namespaces_restore; end - # source://rexml//lib/rexml/parsers/baseparser.rb#730 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:735 + def process_comment; end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:747 def process_instruction; end - # source://rexml//lib/rexml/parsers/baseparser.rb#250 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:256 def pull_event; end - # source://rexml//lib/rexml/parsers/baseparser.rb#621 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:622 def push_namespaces_restore; end - # source://rexml//lib/rexml/parsers/baseparser.rb#638 + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:639 def record_entity_expansion(delta = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:835 + def scan_quote; end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:769 + def xml_declaration; end end -# source://rexml//lib/rexml/parsers/baseparser.rb#130 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:130 REXML::Parsers::BaseParser::EXTERNAL_ID_PUBLIC = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#131 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:131 REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#132 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:132 REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#143 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:143 module REXML::Parsers::BaseParser::Private; end -# source://rexml//lib/rexml/parsers/baseparser.rb#147 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:148 REXML::Parsers::BaseParser::Private::ATTLISTDECL_END = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#152 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:153 REXML::Parsers::BaseParser::Private::CARRIAGE_RETURN_NEWLINE_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#153 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:154 REXML::Parsers::BaseParser::Private::CHARACTER_REFERENCES = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#146 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:146 REXML::Parsers::BaseParser::Private::CLOSE_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#154 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:155 REXML::Parsers::BaseParser::Private::DEFAULT_ENTITIES_PATTERNS = T.let(T.unsafe(nil), Hash) -# source://rexml//lib/rexml/parsers/baseparser.rb#151 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:152 REXML::Parsers::BaseParser::Private::ENTITYDECL_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#149 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:147 +REXML::Parsers::BaseParser::Private::EQUAL_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:150 REXML::Parsers::BaseParser::Private::GEDECL_PATTERN = T.let(T.unsafe(nil), String) -# source://rexml//lib/rexml/parsers/baseparser.rb#148 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:149 REXML::Parsers::BaseParser::Private::NAME_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#150 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:151 REXML::Parsers::BaseParser::Private::PEDECL_PATTERN = T.let(T.unsafe(nil), String) -# source://rexml//lib/rexml/parsers/baseparser.rb#144 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:144 REXML::Parsers::BaseParser::Private::PEREFERENCE_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#145 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:145 REXML::Parsers::BaseParser::Private::TAG_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#159 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:160 REXML::Parsers::BaseParser::Private::XML_PREFIXED_NAMESPACE = T.let(T.unsafe(nil), String) -# source://rexml//lib/rexml/parsers/baseparser.rb#66 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:66 REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#65 +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:65 REXML::Parsers::BaseParser::QNAME_STR = T.let(T.unsafe(nil), String) -# source://rexml//lib/rexml/parsers/streamparser.rb#6 +# pkg:gem/rexml#lib/rexml/parsers/streamparser.rb:6 class REXML::Parsers::StreamParser - # @return [StreamParser] a new instance of StreamParser - # - # source://rexml//lib/rexml/parsers/streamparser.rb#7 + # pkg:gem/rexml#lib/rexml/parsers/streamparser.rb:7 def initialize(source, listener); end - # source://rexml//lib/rexml/parsers/streamparser.rb#13 + # pkg:gem/rexml#lib/rexml/parsers/streamparser.rb:13 def add_listener(listener); end - # source://rexml//lib/rexml/parsers/streamparser.rb#17 + # pkg:gem/rexml#lib/rexml/parsers/streamparser.rb:17 def entity_expansion_count; end - # source://rexml//lib/rexml/parsers/streamparser.rb#21 + # pkg:gem/rexml#lib/rexml/parsers/streamparser.rb:21 def entity_expansion_limit=(limit); end - # source://rexml//lib/rexml/parsers/streamparser.rb#25 + # pkg:gem/rexml#lib/rexml/parsers/streamparser.rb:25 def entity_expansion_text_limit=(limit); end - # source://rexml//lib/rexml/parsers/streamparser.rb#29 + # pkg:gem/rexml#lib/rexml/parsers/streamparser.rb:29 def parse; end end -# source://rexml//lib/rexml/parsers/baseparser.rb#28 -module REXML::Parsers::StringScannerCaptures; end - -# source://rexml//lib/rexml/parsers/treeparser.rb#7 +# pkg:gem/rexml#lib/rexml/parsers/treeparser.rb:7 class REXML::Parsers::TreeParser - # @return [TreeParser] a new instance of TreeParser - # - # source://rexml//lib/rexml/parsers/treeparser.rb#8 + # pkg:gem/rexml#lib/rexml/parsers/treeparser.rb:8 def initialize(source, build_context = T.unsafe(nil)); end - # source://rexml//lib/rexml/parsers/treeparser.rb#13 + # pkg:gem/rexml#lib/rexml/parsers/treeparser.rb:13 def add_listener(listener); end - # source://rexml//lib/rexml/parsers/treeparser.rb#17 + # pkg:gem/rexml#lib/rexml/parsers/treeparser.rb:17 def parse; end end @@ -4110,62 +4123,48 @@ end # There is strange, dark magic at work in this code. Beware. Go back! Go # back while you still can! # -# source://rexml//lib/rexml/parsers/xpathparser.rb#12 +# pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:12 class REXML::Parsers::XPathParser include ::REXML::XMLTokens - # source://rexml//lib/rexml/parsers/xpathparser.rb#42 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:42 def abbreviate(path_or_parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#132 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:132 def expand(path_or_parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#16 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:16 def namespaces=(namespaces); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#21 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:21 def parse(path); end # For backward compatibility # - # source://rexml//lib/rexml/parsers/xpathparser.rb#174 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:221 def preciate_to_string(parsed, &block); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#36 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:36 def predicate(path); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#174 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:174 def predicate_to_path(parsed, &block); end private - # | AdditiveExpr ('+' | '-') MultiplicativeExpr - # | MultiplicativeExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#505 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:505 def AdditiveExpr(path, parsed); end - # | AndExpr S 'and' S EqualityExpr - # | EqualityExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#438 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:438 def AndExpr(path, parsed); end - # | EqualityExpr ('=' | '!=') RelationalExpr - # | RelationalExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#457 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:457 def EqualityExpr(path, parsed); end - # | FilterExpr Predicate - # | PrimaryExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#608 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:608 def FilterExpr(path, parsed); end - # | FUNCTION_NAME '(' ( expr ( ',' expr )* )? ')' - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#663 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:663 def FunctionCall(rest, parsed); end # LocationPath @@ -4173,72 +4172,54 @@ class REXML::Parsers::XPathParser # | '/' RelativeLocationPath? # | '//' RelativeLocationPath # - # source://rexml//lib/rexml/parsers/xpathparser.rb#243 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:243 def LocationPath(path, parsed); end - # | MultiplicativeExpr ('*' | S ('div' | 'mod') S) UnaryExpr - # | UnaryExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#528 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:528 def MultiplicativeExpr(path, parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#343 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:343 def NodeTest(path, parsed); end - # | OrExpr S 'or' S AndExpr - # | AndExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#419 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:419 def OrExpr(path, parsed); end - # | LocationPath - # | FilterExpr ('/' | '//') RelativeLocationPath - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#590 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:590 def PathExpr(path, parsed); end # Filters the supplied nodeset on the predicate(s) # - # source://rexml//lib/rexml/parsers/xpathparser.rb#395 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:395 def Predicate(path, parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#626 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:626 def PrimaryExpr(path, parsed); end - # | RelationalExpr ('<' | '>' | '<=' | '>=') AdditiveExpr - # | AdditiveExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#480 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:480 def RelationalExpr(path, parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#267 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:267 def RelativeLocationPath(path, parsed); end - # | '-' UnaryExpr - # | UnionExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#553 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:553 def UnaryExpr(path, parsed); end - # | UnionExpr '|' PathExpr - # | PathExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#571 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:571 def UnionExpr(path, parsed); end # get_group( '[foo]bar' ) -> ['bar', '[foo]'] # - # source://rexml//lib/rexml/parsers/xpathparser.rb#676 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:676 def get_group(string); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#694 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:694 def parse_args(string); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#224 + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:224 def quote_literal(literal); end end -# source://rexml//lib/rexml/parsers/xpathparser.rb#339 +# pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:339 REXML::Parsers::XPathParser::LOCAL_NAME_WILDCARD = T.let(T.unsafe(nil), Regexp) # Returns a 1-1 map of the nodeset @@ -4252,113 +4233,161 @@ REXML::Parsers::XPathParser::LOCAL_NAME_WILDCARD = T.let(T.unsafe(nil), Regexp) # | PI '(' LITERAL ')' PI # | '[' expr ']' Predicate # -# source://rexml//lib/rexml/parsers/xpathparser.rb#338 +# pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:338 REXML::Parsers::XPathParser::PREFIX_WILDCARD = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/doctype.rb#10 +# pkg:gem/rexml#lib/rexml/doctype.rb:10 class REXML::ReferenceWriter - # @return [ReferenceWriter] a new instance of ReferenceWriter - # - # source://rexml//lib/rexml/doctype.rb#11 + # pkg:gem/rexml#lib/rexml/doctype.rb:11 def initialize(id_type, public_id_literal, system_literal, context = T.unsafe(nil)); end - # source://rexml//lib/rexml/doctype.rb#25 + # pkg:gem/rexml#lib/rexml/doctype.rb:25 def write(output); end end +# pkg:gem/rexml#lib/rexml/security.rb:3 +module REXML::Security + class << self + # Get the entity expansion limit. By default the limit is set to 10000. + # + # pkg:gem/rexml#lib/rexml/security.rb:12 + def entity_expansion_limit; end + + # Set the entity expansion limit. By default the limit is set to 10000. + # + # pkg:gem/rexml#lib/rexml/security.rb:7 + def entity_expansion_limit=(val); end + + # Get the entity expansion limit. By default the limit is set to 10240. + # + # pkg:gem/rexml#lib/rexml/security.rb:24 + def entity_expansion_text_limit; end + + # Set the entity expansion limit. By default the limit is set to 10240. + # + # pkg:gem/rexml#lib/rexml/security.rb:19 + def entity_expansion_text_limit=(val); end + end +end + # A Source can be searched for patterns, and wraps buffers and other # objects and provides consumption of text # -# source://rexml//lib/rexml/source.rb#51 +# pkg:gem/rexml#lib/rexml/source.rb:61 class REXML::Source include ::REXML::Encoding # Constructor - # value, overriding all encoding detection - # # @param arg must be a String, and should be a valid XML document # @param encoding if non-null, sets the encoding of the source to this - # @return [Source] a new instance of Source + # value, overriding all encoding detection # - # source://rexml//lib/rexml/source.rb#71 + # pkg:gem/rexml#lib/rexml/source.rb:88 def initialize(arg, encoding = T.unsafe(nil)); end # The current buffer (what we're going to read next) # - # source://rexml//lib/rexml/source.rb#84 + # pkg:gem/rexml#lib/rexml/source.rb:101 def buffer; end - # source://rexml//lib/rexml/source.rb#94 + # pkg:gem/rexml#lib/rexml/source.rb:111 def buffer_encoding=(encoding); end # @return the current line in the source # - # source://rexml//lib/rexml/source.rb#143 + # pkg:gem/rexml#lib/rexml/source.rb:180 def current_line; end - # source://rexml//lib/rexml/source.rb#88 + # pkg:gem/rexml#lib/rexml/source.rb:105 def drop_parsed_content; end - # @return [Boolean] true if the Source is exhausted + # @return true if the Source is exhausted # - # source://rexml//lib/rexml/source.rb#138 + # pkg:gem/rexml#lib/rexml/source.rb:175 def empty?; end - # Returns the value of attribute encoding. - # - # source://rexml//lib/rexml/source.rb#55 + # pkg:gem/rexml#lib/rexml/source.rb:65 def encoding; end # Inherited from Encoding # Overridden to support optimized en/decoding # - # source://rexml//lib/rexml/source.rb#100 + # pkg:gem/rexml#lib/rexml/source.rb:117 def encoding=(enc); end - # source://rexml//lib/rexml/source.rb#118 + # pkg:gem/rexml#lib/rexml/source.rb:135 def ensure_buffer; end # The line number of the last consumed text # - # source://rexml//lib/rexml/source.rb#54 + # pkg:gem/rexml#lib/rexml/source.rb:64 def line; end - # source://rexml//lib/rexml/source.rb#121 + # pkg:gem/rexml#lib/rexml/source.rb:138 def match(pattern, cons = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#129 + # pkg:gem/rexml#lib/rexml/source.rb:146 + def match?(pattern, cons = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/source.rb:166 + def peek_byte; end + + # pkg:gem/rexml#lib/rexml/source.rb:158 def position; end - # source://rexml//lib/rexml/source.rb#133 + # pkg:gem/rexml#lib/rexml/source.rb:162 def position=(pos); end - # source://rexml//lib/rexml/source.rb#105 + # pkg:gem/rexml#lib/rexml/source.rb:122 def read(term = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#108 + # pkg:gem/rexml#lib/rexml/source.rb:125 def read_until(term); end + # pkg:gem/rexml#lib/rexml/source.rb:170 + def scan_byte; end + + # pkg:gem/rexml#lib/rexml/source.rb:154 + def skip_spaces; end + private - # source://rexml//lib/rexml/source.rb#152 + # pkg:gem/rexml#lib/rexml/source.rb:189 def detect_encoding; end - # source://rexml//lib/rexml/source.rb#170 + # pkg:gem/rexml#lib/rexml/source.rb:207 def encoding_updated; end end -# source://rexml//lib/rexml/source.rb#57 +# pkg:gem/rexml#lib/rexml/source.rb:67 module REXML::Source::Private; end -# source://rexml//lib/rexml/source.rb#59 +# pkg:gem/rexml#lib/rexml/source.rb:70 REXML::Source::Private::PRE_DEFINED_TERM_PATTERNS = T.let(T.unsafe(nil), Hash) -# source://rexml//lib/rexml/source.rb#58 +# pkg:gem/rexml#lib/rexml/source.rb:69 REXML::Source::Private::SCANNER_RESET_SIZE = T.let(T.unsafe(nil), Integer) +# pkg:gem/rexml#lib/rexml/source.rb:68 +REXML::Source::Private::SPACES_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Generates Source-s. USE THIS CLASS. +# +# pkg:gem/rexml#lib/rexml/source.rb:38 +class REXML::SourceFactory + class << self + # Generates a Source object + # @param arg Either a String, or an IO + # @return a Source, or nil if a bad argument was given + # + # pkg:gem/rexml#lib/rexml/source.rb:42 + def create_from(arg); end + end +end + # Represents text nodes in an XML document # -# source://rexml//lib/rexml/text.rb#11 +# pkg:gem/rexml#lib/rexml/text.rb:11 class REXML::Text < ::REXML::Child include ::Comparable @@ -4399,9 +4428,7 @@ class REXML::Text < ::REXML::Child # # +illegal+ INTERNAL USE ONLY # - # @return [Text] a new instance of Text - # - # source://rexml//lib/rexml/text.rb#94 + # pkg:gem/rexml#lib/rexml/text.rb:79 def initialize(arg, respect_whitespace = T.unsafe(nil), parent = T.unsafe(nil), raw = T.unsafe(nil), entity_filter = T.unsafe(nil), illegal = T.unsafe(nil)); end # Appends text to this text node. The text is appended in the +raw+ mode @@ -4410,46 +4437,44 @@ class REXML::Text < ::REXML::Child # +returns+ the text itself to enable method chain like # 'text << "XXX" << "YYY"'. # - # source://rexml//lib/rexml/text.rb#214 + # pkg:gem/rexml#lib/rexml/text.rb:189 def <<(to_append); end # +other+ a String or a Text # +returns+ the result of (to_s <=> arg.to_s) # - # source://rexml//lib/rexml/text.rb#223 + # pkg:gem/rexml#lib/rexml/text.rb:198 def <=>(other); end - # source://rexml//lib/rexml/text.rb#204 + # pkg:gem/rexml#lib/rexml/text.rb:179 def clone; end - # source://rexml//lib/rexml/text.rb#227 + # pkg:gem/rexml#lib/rexml/text.rb:202 def doctype; end - # @return [Boolean] - # - # source://rexml//lib/rexml/text.rb#199 + # pkg:gem/rexml#lib/rexml/text.rb:174 def empty?; end - # source://rexml//lib/rexml/text.rb#299 + # pkg:gem/rexml#lib/rexml/text.rb:271 def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end - # source://rexml//lib/rexml/text.rb#253 + # pkg:gem/rexml#lib/rexml/text.rb:225 def inspect; end - # source://rexml//lib/rexml/text.rb#195 + # pkg:gem/rexml#lib/rexml/text.rb:170 def node_type; end - # source://rexml//lib/rexml/text.rb#125 + # pkg:gem/rexml#lib/rexml/text.rb:110 def parent=(parent); end # If +raw+ is true, then REXML leaves the value alone # - # source://rexml//lib/rexml/text.rb#21 + # pkg:gem/rexml#lib/rexml/text.rb:21 def raw; end # If +raw+ is true, then REXML leaves the value alone # - # source://rexml//lib/rexml/text.rb#21 + # pkg:gem/rexml#lib/rexml/text.rb:21 def raw=(_arg0); end # Returns the string value of this text node. This string is always @@ -4466,7 +4491,7 @@ class REXML::Text < ::REXML::Child # u = Text.new( "sean russell", false, nil, true ) # u.to_s #-> "sean russell" # - # source://rexml//lib/rexml/text.rb#248 + # pkg:gem/rexml#lib/rexml/text.rb:220 def to_s; end # Returns the string value of this text. This is the text without @@ -4483,7 +4508,7 @@ class REXML::Text < ::REXML::Child # u = Text.new( "sean russell", false, nil, true ) # u.value #-> "sean russell" # - # source://rexml//lib/rexml/text.rb#270 + # pkg:gem/rexml#lib/rexml/text.rb:242 def value; end # Sets the contents of this text node. This expects the text to be @@ -4494,16 +4519,16 @@ class REXML::Text < ::REXML::Child # e[0].value = "bar" # bar # e[0].value = "" # <a> # - # source://rexml//lib/rexml/text.rb#282 + # pkg:gem/rexml#lib/rexml/text.rb:254 def value=(val); end - # source://rexml//lib/rexml/text.rb#288 + # pkg:gem/rexml#lib/rexml/text.rb:260 def wrap(string, width, addnewline = T.unsafe(nil)); end # == DEPRECATED # See REXML::Formatters # - # source://rexml//lib/rexml/text.rb#314 + # pkg:gem/rexml#lib/rexml/text.rb:288 def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end # Writes out text, substituting special characters beforehand. @@ -4521,124 +4546,104 @@ class REXML::Text < ::REXML::Child # } # puts ascOut # - # source://rexml//lib/rexml/text.rb#346 + # pkg:gem/rexml#lib/rexml/text.rb:318 def write_with_substitution(out, input); end # FIXME # This probably won't work properly # - # source://rexml//lib/rexml/text.rb#326 + # pkg:gem/rexml#lib/rexml/text.rb:300 def xpath; end private - # source://rexml//lib/rexml/text.rb#359 + # pkg:gem/rexml#lib/rexml/text.rb:331 def clear_cache; end class << self # check for illegal characters # - # source://rexml//lib/rexml/text.rb#131 - def check(string, pattern, doctype); end + # pkg:gem/rexml#lib/rexml/text.rb:116 + def check(string, pattern, doctype = T.unsafe(nil)); end - # source://rexml//lib/rexml/text.rb#429 + # pkg:gem/rexml#lib/rexml/text.rb:401 def expand(ref, doctype, filter); end # Escapes all possible entities # - # source://rexml//lib/rexml/text.rb#391 + # pkg:gem/rexml#lib/rexml/text.rb:363 def normalize(input, doctype = T.unsafe(nil), entity_filter = T.unsafe(nil)); end # Reads text, substituting entities # - # source://rexml//lib/rexml/text.rb#365 + # pkg:gem/rexml#lib/rexml/text.rb:337 def read_with_substitution(input, illegal = T.unsafe(nil)); end # Unescapes all possible entities # - # source://rexml//lib/rexml/text.rb#415 + # pkg:gem/rexml#lib/rexml/text.rb:387 def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil), entity_expansion_text_limit: T.unsafe(nil)); end end end -# source://rexml//lib/rexml/undefinednamespaceexception.rb#4 +# pkg:gem/rexml#lib/rexml/undefinednamespaceexception.rb:4 class REXML::UndefinedNamespaceException < ::REXML::ParseException - # @return [UndefinedNamespaceException] a new instance of UndefinedNamespaceException - # - # source://rexml//lib/rexml/undefinednamespaceexception.rb#5 + # pkg:gem/rexml#lib/rexml/undefinednamespaceexception.rb:5 def initialize(prefix, source, parser); end end -# source://rexml//lib/rexml/validation/validationexception.rb#4 +# pkg:gem/rexml#lib/rexml/validation/validationexception.rb:4 class REXML::Validation::ValidationException < ::RuntimeError - # @return [ValidationException] a new instance of ValidationException - # - # source://rexml//lib/rexml/validation/validationexception.rb#5 + # pkg:gem/rexml#lib/rexml/validation/validationexception.rb:5 def initialize(msg); end end # NEEDS DOCUMENTATION # -# source://rexml//lib/rexml/xmldecl.rb#8 +# pkg:gem/rexml#lib/rexml/xmldecl.rb:8 class REXML::XMLDecl < ::REXML::Child include ::REXML::Encoding - # @return [XMLDecl] a new instance of XMLDecl - # - # source://rexml//lib/rexml/xmldecl.rb#20 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:20 def initialize(version = T.unsafe(nil), encoding = T.unsafe(nil), standalone = T.unsafe(nil)); end - # source://rexml//lib/rexml/xmldecl.rb#56 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:56 def ==(other); end - # source://rexml//lib/rexml/xmldecl.rb#39 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:39 def clone; end - # source://rexml//lib/rexml/xmldecl.rb#102 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:102 def dowrite; end - # source://rexml//lib/rexml/xmldecl.rb#76 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:76 def encoding=(enc); end - # source://rexml//lib/rexml/xmldecl.rb#106 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:106 def inspect; end - # source://rexml//lib/rexml/xmldecl.rb#69 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:69 def node_type; end - # source://rexml//lib/rexml/xmldecl.rb#98 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:98 def nowrite; end - # source://rexml//lib/rexml/encoding.rb#7 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:74 def old_enc=(encoding); end - # Returns the value of attribute standalone. - # - # source://rexml//lib/rexml/xmldecl.rb#17 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:73 def stand_alone?; end - # Returns the value of attribute standalone. - # - # source://rexml//lib/rexml/xmldecl.rb#17 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:17 def standalone; end - # Sets the attribute standalone - # - # @param value the value to set the attribute standalone to. - # - # source://rexml//lib/rexml/xmldecl.rb#17 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:17 def standalone=(_arg0); end - # Returns the value of attribute version. - # - # source://rexml//lib/rexml/xmldecl.rb#17 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:17 def version; end - # Sets the attribute version - # - # @param value the value to set the attribute version to. - # - # source://rexml//lib/rexml/xmldecl.rb#17 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:17 def version=(_arg0); end # indent:: @@ -4648,25 +4653,21 @@ class REXML::XMLDecl < ::REXML::Child # ie_hack:: # Ignored # - # source://rexml//lib/rexml/xmldecl.rb#49 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:49 def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - # Returns the value of attribute writeencoding. - # - # source://rexml//lib/rexml/xmldecl.rb#18 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:18 def writeencoding; end - # Returns the value of attribute writethis. - # - # source://rexml//lib/rexml/xmldecl.rb#18 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:18 def writethis; end - # source://rexml//lib/rexml/xmldecl.rb#63 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:63 def xmldecl(version, encoding, standalone); end private - # source://rexml//lib/rexml/xmldecl.rb#111 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:111 def content(enc); end class << self @@ -4676,31 +4677,82 @@ class REXML::XMLDecl < ::REXML::Child # # Note that XML 1.1 documents *must* include an XML declaration # - # source://rexml//lib/rexml/xmldecl.rb#92 + # pkg:gem/rexml#lib/rexml/xmldecl.rb:92 def default; end end end +# Wrapper class. Use this class to access the XPath functions. +# +# pkg:gem/rexml#lib/rexml/xpath.rb:7 +class REXML::XPath + include ::REXML::Functions + + class << self + # Iterates over nodes that match the given path, calling the supplied + # block with the match. + # element:: + # The context element + # path:: + # The xpath to search for. If not supplied or nil, defaults to '*' + # namespaces:: + # If supplied, a Hash which defines a namespace mapping + # variables:: + # If supplied, a Hash which maps $variables in the query + # to values. This can be used to avoid XPath injection attacks + # or to automatically handle escaping string values. + # + # XPath.each( node ) { |el| ... } + # XPath.each( node, '/*[@attr='v']' ) { |el| ... } + # XPath.each( node, 'ancestor::x' ) { |el| ... } + # XPath.each( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"}) \ + # {|el| ... } + # + # pkg:gem/rexml#lib/rexml/xpath.rb:55 + def each(element, path = T.unsafe(nil), namespaces = T.unsafe(nil), variables = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Finds and returns the first node that matches the supplied xpath. + # element:: + # The context element + # path:: + # The xpath to search for. If not supplied or nil, returns the first + # node matching '*'. + # namespaces:: + # If supplied, a Hash which defines a namespace mapping. + # variables:: + # If supplied, a Hash which maps $variables in the query + # to values. This can be used to avoid XPath injection attacks + # or to automatically handle escaping string values. + # + # XPath.first( node ) + # XPath.first( doc, "//b"} ) + # XPath.first( node, "a/x:b", { "x"=>"http://doofus" } ) + # XPath.first( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"}) + # + # pkg:gem/rexml#lib/rexml/xpath.rb:31 + def first(element, path = T.unsafe(nil), namespaces = T.unsafe(nil), variables = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns an array of nodes matching a given XPath. + # + # pkg:gem/rexml#lib/rexml/xpath.rb:62 + def match(element, path = T.unsafe(nil), namespaces = T.unsafe(nil), variables = T.unsafe(nil), options = T.unsafe(nil)); end + end +end + # @private # -# source://rexml//lib/rexml/xpath_parser.rb#963 +# pkg:gem/rexml#lib/rexml/xpath_parser.rb:965 class REXML::XPathNode - # @return [XPathNode] a new instance of XPathNode - # - # source://rexml//lib/rexml/xpath_parser.rb#965 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:967 def initialize(node, context = T.unsafe(nil)); end - # Returns the value of attribute context. - # - # source://rexml//lib/rexml/xpath_parser.rb#964 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:966 def context; end - # source://rexml//lib/rexml/xpath_parser.rb#974 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:976 def position; end - # Returns the value of attribute raw_node. - # - # source://rexml//lib/rexml/xpath_parser.rb#964 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:966 def raw_node; end end @@ -4709,16 +4761,14 @@ end # There is strange, dark magic at work in this code. Beware. Go back! Go # back while you still can! # -# source://rexml//lib/rexml/xpath_parser.rb#54 +# pkg:gem/rexml#lib/rexml/xpath_parser.rb:54 class REXML::XPathParser include ::REXML::XMLTokens - # @return [XPathParser] a new instance of XPathParser - # - # source://rexml//lib/rexml/xpath_parser.rb#60 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:60 def initialize(strict: T.unsafe(nil)); end - # source://rexml//lib/rexml/xpath_parser.rb#94 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:107 def []=(variable_name, value); end # Performs a depth-first (document order) XPath search, and returns the @@ -4726,66 +4776,66 @@ class REXML::XPathParser # # FIXME: This method is incomplete! # - # source://rexml//lib/rexml/xpath_parser.rb#103 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:116 def first(path_stack, node); end - # source://rexml//lib/rexml/xpath_parser.rb#84 - def get_first(path, nodeset); end + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:97 + def get_first(path, node); end - # source://rexml//lib/rexml/xpath_parser.rb#139 - def match(path_stack, nodeset); end + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:153 + def match(path_stack, node); end - # source://rexml//lib/rexml/xpath_parser.rb#69 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:69 def namespaces=(namespaces = T.unsafe(nil)); end - # source://rexml//lib/rexml/xpath_parser.rb#79 - def parse(path, nodeset); end + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:79 + def parse(path, node); end - # source://rexml//lib/rexml/xpath_parser.rb#89 - def predicate(path, nodeset); end + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:102 + def predicate(path, node); end - # source://rexml//lib/rexml/xpath_parser.rb#74 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:74 def variables=(vars = T.unsafe(nil)); end private - # source://rexml//lib/rexml/xpath_parser.rb#779 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:781 def child(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#920 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:922 def compare(a, operator, b); end - # source://rexml//lib/rexml/xpath_parser.rb#682 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:687 def descendant(nodeset, include_self); end - # source://rexml//lib/rexml/xpath_parser.rb#693 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:698 def descendant_recursive(raw_node, new_nodeset, new_nodes, include_self); end - # source://rexml//lib/rexml/xpath_parser.rb#942 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:944 def each_unnode(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#641 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:646 def enter(tag, *args); end - # source://rexml//lib/rexml/xpath_parser.rb#819 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:821 def equality_relational_compare(set1, op, set2); end - # source://rexml//lib/rexml/xpath_parser.rb#591 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:596 def evaluate_predicate(expression, nodesets); end # Expr takes a stack of path elements and a set of nodes (either a Parent # or an Array and returns an Array of matching nodes # - # source://rexml//lib/rexml/xpath_parser.rb#175 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:186 def expr(path_stack, nodeset, context = T.unsafe(nil)); end - # source://rexml//lib/rexml/xpath_parser.rb#582 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:587 def filter_nodeset(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#749 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:754 def following(node); end - # source://rexml//lib/rexml/xpath_parser.rb#760 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:765 def following_node_of(node); end # Returns a String namespace for a node, given a prefix @@ -4794,22 +4844,22 @@ class REXML::XPathParser # 1. Use the supplied namespace mapping first. # 2. If no mapping was supplied, use the context node to look up the namespace # - # source://rexml//lib/rexml/xpath_parser.rb#163 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:174 def get_namespace(node, prefix); end - # source://rexml//lib/rexml/xpath_parser.rb#646 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:651 def leave(tag, *args); end - # source://rexml//lib/rexml/xpath_parser.rb#767 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:771 def next_sibling_node(node); end - # source://rexml//lib/rexml/xpath_parser.rb#477 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:488 def node_test(path_stack, nodesets, any_type: T.unsafe(nil)); end - # source://rexml//lib/rexml/xpath_parser.rb#806 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:808 def norm(b); end - # source://rexml//lib/rexml/xpath_parser.rb#894 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:896 def normalize_compare_values(a, operator, b); end # Builds a nodeset of all of the preceding nodes of the supplied node, @@ -4817,10 +4867,10 @@ class REXML::XPathParser # preceding:: includes every element in the document that precedes this node, # except for ancestors # - # source://rexml//lib/rexml/xpath_parser.rb#712 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:717 def preceding(node); end - # source://rexml//lib/rexml/xpath_parser.rb#734 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:739 def preceding_node_of(node); end # Reorders an array of nodes so that they are in document order @@ -4832,26 +4882,24 @@ class REXML::XPathParser # I wouldn't have to do this. Maybe add a document IDX for each node? # Problems with mutable documents. Or, rewrite everything. # - # source://rexml//lib/rexml/xpath_parser.rb#659 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:664 def sort(array_of_nodes, order); end - # source://rexml//lib/rexml/xpath_parser.rb#441 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:452 def step(path_stack, any_type: T.unsafe(nil), order: T.unsafe(nil)); end - # @return [Boolean] - # - # source://rexml//lib/rexml/xpath_parser.rb#154 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:165 def strict?; end - # source://rexml//lib/rexml/xpath_parser.rb#634 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:639 def trace(*args); end - # source://rexml//lib/rexml/xpath_parser.rb#954 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:956 def unnode(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#881 + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:883 def value_type(value); end end -# source://rexml//lib/rexml/xpath_parser.rb#58 +# pkg:gem/rexml#lib/rexml/xpath_parser.rb:58 REXML::XPathParser::DEBUG = T.let(T.unsafe(nil), FalseClass) diff --git a/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi b/sorbet/rbi/gems/rubocop-ast@1.49.1.rbi similarity index 50% rename from sorbet/rbi/gems/rubocop-ast@1.31.3.rbi rename to sorbet/rbi/gems/rubocop-ast@1.49.1.rbi index 8f686b473..7666d1fdf 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.49.1.rbi @@ -4,16 +4,17 @@ # This is an autogenerated file for types exported from the `rubocop-ast` gem. # Please instead update this file by running `bin/tapioca gem rubocop-ast`. + class Parser::Source::Range include ::RuboCop::AST::Ext::Range end -# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#3 +# pkg:gem/rubocop-ast#lib/rubocop/ast/ext/range.rb:3 module RuboCop; end # ... # -# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#4 +# pkg:gem/rubocop-ast#lib/rubocop/ast/ext/range.rb:4 module RuboCop::AST extend ::RuboCop::AST::RuboCopCompatibility end @@ -22,20 +23,20 @@ end # node when the builder constructs the AST, making its methods available # to all `alias` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/alias_node.rb:8 class RuboCop::AST::AliasNode < ::RuboCop::AST::Node # Returns the new identifier as specified by the `alias`. # # @return [SymbolNode] the new identifier # - # source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#19 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/alias_node.rb:19 def new_identifier; end # Returns the old identifier as specified by the `alias`. # # @return [SymbolNode] the old identifier # - # source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/alias_node.rb:12 def old_identifier; end end @@ -43,13 +44,13 @@ end # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/and_asgn_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/and_asgn_node.rb:8 class RuboCop::AST::AndAsgnNode < ::RuboCop::AST::OpAsgnNode # The operator being used for assignment as a symbol. # # @return [Symbol] the assignment operator # - # source://rubocop-ast//lib/rubocop/ast/node/and_asgn_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/and_asgn_node.rb:12 def operator; end end @@ -57,7 +58,7 @@ end # node when the builder constructs the AST, making its methods available # to all `until` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/and_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/and_node.rb:8 class RuboCop::AST::AndNode < ::RuboCop::AST::Node include ::RuboCop::AST::BinaryOperatorNode include ::RuboCop::AST::PredicateOperatorNode @@ -67,7 +68,7 @@ class RuboCop::AST::AndNode < ::RuboCop::AST::Node # # @return [String] the alternate of the `and` operator # - # source://rubocop-ast//lib/rubocop/ast/node/and_node.rb#16 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/and_node.rb:16 def alternate_operator; end # Returns the inverse keyword of the `and` node as a string. @@ -75,7 +76,7 @@ class RuboCop::AST::AndNode < ::RuboCop::AST::Node # # @return [String] the inverse of the `and` operator # - # source://rubocop-ast//lib/rubocop/ast/node/and_node.rb#24 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/and_node.rb:24 def inverse_operator; end end @@ -84,27 +85,27 @@ end # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all `arg` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#9 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/arg_node.rb:9 class RuboCop::AST::ArgNode < ::RuboCop::AST::Node # Checks whether the argument has a default value # # @return [Boolean] whether the argument has a default value # - # source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#29 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/arg_node.rb:29 def default?; end # Returns the default value of the argument, if any. # # @return [Node, nil] the default value of the argument # - # source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#20 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/arg_node.rb:20 def default_value; end # Returns the name of an argument. # # @return [Symbol, nil] the name of the argument # - # source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#13 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/arg_node.rb:13 def name; end end @@ -112,7 +113,7 @@ end # node when the builder constructs the AST, making its methods available # to all `args` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/args_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/args_node.rb:8 class RuboCop::AST::ArgsNode < ::RuboCop::AST::Node include ::RuboCop::AST::CollectionNode @@ -123,7 +124,7 @@ class RuboCop::AST::ArgsNode < ::RuboCop::AST::Node # # @return [Array] array of argument nodes. # - # source://rubocop-ast//lib/rubocop/ast/node/args_node.rb#34 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/args_node.rb:34 def argument_list; end # It returns true if arguments are empty and delimiters do not exist. @@ -140,9 +141,7 @@ class RuboCop::AST::ArgsNode < ::RuboCop::AST::Node # -> () {} # -> a {} # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/args_node.rb#24 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/args_node.rb:24 def empty_and_without_delimiters?; end end @@ -150,112 +149,126 @@ end # node when the builder constructs the AST, making its methods available # to all `array` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/array_node.rb:8 class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node # Checks whether the `array` literal is delimited by either percent or # square brackets # - # brackets - # # @return [Boolean] whether the array is enclosed in percent or square + # brackets # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#60 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/array_node.rb:64 def bracketed?; end - # @deprecated Use `values.each` (a.k.a. `children.each`) + # Calls the given block for each `value` node in the `array` literal. + # If no block is given, an `Enumerator` is returned. # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#21 + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/array_node.rb:25 def each_value(&block); end # Checks whether the `array` literal is delimited by percent brackets. # # @overload percent_literal? - # @overload percent_literal? + # Check for any percent literal. + # + # @overload percent_literal?(type) + # Check for percent literal of type `type`. + # + # @param type [Symbol] an optional percent literal type + # # @return [Boolean] whether the array is enclosed in percent brackets # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#47 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/array_node.rb:51 def percent_literal?(type = T.unsafe(nil)); end # Checks whether the `array` literal is delimited by square brackets. # # @return [Boolean] whether the array is enclosed in square brackets # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#32 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/array_node.rb:36 def square_brackets?; end # Returns an array of all value nodes in the `array` literal. # # @return [Array] an array of value nodes # - # source://ast/2.4.2/lib/ast/node.rb#56 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/array_node.rb:18 def values; end end -# source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#9 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/array_node.rb:9 RuboCop::AST::ArrayNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) # A node extension for `lvasgn`, `ivasgn`, `cvasgn`, and `gvasgn` nodes. # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/asgn_node.rb:8 class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node # The expression being assigned to the variable. # # @return [Node] the expression being assigned. # - # source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#19 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/asgn_node.rb:20 def expression; end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/asgn_node.rb:15 + def lhs; end + # The name of the variable being assigned as a symbol. # # @return [Symbol] the name of the variable being assigned # - # source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/asgn_node.rb:12 def name; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/asgn_node.rb:23 + def rhs; end end # Common functionality for primitive literal nodes: `sym`, `str`, -# `int`, `float`, ... +# `int`, `float`, `rational`, `complex`... # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/basic_literal_node.rb#7 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/basic_literal_node.rb:7 module RuboCop::AST::BasicLiteralNode # Returns the value of the literal. # # @return [mixed] the value of the literal # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/basic_literal_node.rb#11 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/basic_literal_node.rb:11 def value; end end # Common functionality for nodes that are binary operations: # `or`, `and` ... # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#7 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/binary_operator_node.rb:7 module RuboCop::AST::BinaryOperatorNode # Returns all of the conditions, including nested conditions, # of the binary operation. # + # @return [Array] the left and right hand side of the binary # operation and the let and right hand side of any nested binary # operators # - # @return [Array] the left and right hand side of the binary - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#28 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/binary_operator_node.rb:28 def conditions; end # Returns the left hand side node of the binary operation. # # @return [Node] the left hand side of the binary operation # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#11 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/binary_operator_node.rb:11 def lhs; end # Returns the right hand side node of the binary operation. # # @return [Node] the right hand side of the binary operation # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#18 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/binary_operator_node.rb:18 def rhs; end end @@ -266,7 +279,7 @@ end # A `block` node is essentially a method send with a block. Parser nests # the `send` node inside the `block` node. # -# source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#11 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:11 class RuboCop::AST::BlockNode < ::RuboCop::AST::Node include ::RuboCop::AST::MethodIdentifierPredicates @@ -275,7 +288,7 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node # # @return [Array] # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#60 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:62 def argument_list; end # The arguments of this block. @@ -285,81 +298,81 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node # # @return [Array] # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#48 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:50 def arguments; end # Checks whether this block takes any arguments. # # @return [Boolean] whether this `block` node takes any arguments # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#85 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:89 def arguments?; end # The body of this block. # # @return [Node, nil] the body of the `block` node or `nil` # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#71 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:75 def body; end # Checks whether the `block` literal is delimited by curly braces. # # @return [Boolean] whether the `block` literal is enclosed in braces # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#92 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:96 def braces?; end # The closing delimiter for this `block` literal. # # @return [String] the closing delimiter for the `block` literal # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#120 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:124 def closing_delimiter; end # The delimiters for this `block` literal. # # @return [Array] the delimiters for the `block` literal # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#106 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:110 def delimiters; end # A shorthand for getting the first argument of this block. # Equivalent to `arguments.first`. # # @return [Node, nil] the first argument of this block, - # or `nil` if there are no arguments + # or `nil` if there are no arguments # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#29 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:31 def first_argument; end # Checks whether the `block` literal is delimited by `do`-`end` keywords. # # @return [Boolean] whether the `block` literal is enclosed in `do`-`end` # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#99 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:103 def keywords?; end # Checks whether this `block` literal belongs to a lambda. # # @return [Boolean] whether the `block` literal belongs to a lambda # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#143 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:147 def lambda?; end # A shorthand for getting the last argument of this block. # Equivalent to `arguments.last`. # # @return [Node, nil] the last argument of this block, - # or `nil` if there are no arguments + # or `nil` if there are no arguments # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#38 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:40 def last_argument; end # The name of the dispatched method as a symbol. # # @return [Symbol] the name of the dispatched method # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#78 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:82 def method_name; end # Checks whether this is a multiline block. This is overridden here @@ -367,21 +380,21 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node # # @return [Boolean] whether the `block` literal is on a several lines # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:140 def multiline?; end # The opening delimiter for this `block` literal. # # @return [String] the opening delimiter for the `block` literal # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#113 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:117 def opening_delimiter; end # The `send` node associated with this block. # # @return [SendNode] the `send` node associated with the `block` node # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#20 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:22 def send_node; end # Checks whether this is a single line block. This is overridden here @@ -389,32 +402,33 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node # # @return [Boolean] whether the `block` literal is on a single line # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#128 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:132 def single_line?; end # Checks whether this node body is a void context. # # @return [Boolean] whether the `block` node body is a void context # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#150 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:154 def void_context?; end private - # Numbered arguments of this `numblock`. - # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#157 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:160 def numbered_arguments; end end -# source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#14 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:14 +RuboCop::AST::BlockNode::IT_BLOCK_ARGUMENT = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:16 RuboCop::AST::BlockNode::VOID_CONTEXT_METHODS = T.let(T.unsafe(nil), Array) # A node extension for `break` nodes. This will be used in place of a # plain node when the builder constructs the AST, making its methods # available to all `break` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/break_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/break_node.rb:8 class RuboCop::AST::BreakNode < ::RuboCop::AST::Node include ::RuboCop::AST::ParameterizedNode include ::RuboCop::AST::ParameterizedNode::WrappedArguments @@ -432,59 +446,79 @@ end # parser = Parser::Ruby25.new(builder) # root_node = parser.parse(buffer) # -# source://rubocop-ast//lib/rubocop/ast/builder.rb#16 +# pkg:gem/rubocop-ast#lib/rubocop/ast/builder.rb:129 class RuboCop::AST::Builder < ::Parser::Builders::Default + include ::RuboCop::AST::BuilderExtensions +end + +# Common functionality between the parser and prism builder +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/builder.rb:7 +module RuboCop::AST::BuilderExtensions # Generates {Node} from the given information. # # @return [Node] the generated node # - # source://rubocop-ast//lib/rubocop/ast/builder.rb#98 + # pkg:gem/rubocop-ast#lib/rubocop/ast/builder.rb:101 def n(type, children, source_map); end - # TODO: Figure out what to do about literal encoding handling... + # Overwrite the base method to allow strings with invalid encoding # More details here https://github.com/whitequark/parser/issues/283 # - # source://rubocop-ast//lib/rubocop/ast/builder.rb#104 + # pkg:gem/rubocop-ast#lib/rubocop/ast/builder.rb:107 def string_value(token); end private - # source://rubocop-ast//lib/rubocop/ast/builder.rb#110 + # pkg:gem/rubocop-ast#lib/rubocop/ast/builder.rb:113 def node_klass(type); end + + class << self + # pkg:gem/rubocop-ast#lib/rubocop/ast/builder.rb:8 + def included(base); end + end end # @api private # -# source://rubocop-ast//lib/rubocop/ast/builder.rb#21 -RuboCop::AST::Builder::NODE_MAP = T.let(T.unsafe(nil), Hash) +# pkg:gem/rubocop-ast#lib/rubocop/ast/builder.rb:14 +RuboCop::AST::BuilderExtensions::NODE_MAP = T.let(T.unsafe(nil), Hash) + +# A parser builder, based on the one provided by prism, +# which is capable of emitting AST for more recent Rubies. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/builder_prism.rb:7 +class RuboCop::AST::BuilderPrism < ::Prism::Translation::Parser::Builder + include ::RuboCop::AST::BuilderExtensions +end # A node extension for `case_match` nodes. This will be used in place of # a plain node when the builder constructs the AST, making its methods # available to all `case_match` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_match_node.rb:8 class RuboCop::AST::CaseMatchNode < ::RuboCop::AST::Node include ::RuboCop::AST::ConditionalNode # Returns an array of all the when branches in the `case` statement. # - # and the `else` (if any). Note that these bodies could be nil. - # # @return [Array] an array of the bodies of the `in` branches + # and the `else` (if any). Note that these bodies could be nil. # - # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#38 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_match_node.rb:38 def branches; end # @deprecated Use `in_pattern_branches.each` # - # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#19 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_match_node.rb:19 def each_in_pattern(&block); end # Checks whether this case statement has an `else` branch. # # @return [Boolean] whether the `case` statement has an `else` branch # - # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#59 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_match_node.rb:59 def else?; end # Returns the else branch of the `case` statement, if any. @@ -493,21 +527,21 @@ class RuboCop::AST::CaseMatchNode < ::RuboCop::AST::Node # @return [EmptyElse] the empty else branch node of the `case` statement # @return [nil] if the case statement does not have an else branch. # - # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#52 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_match_node.rb:52 def else_branch; end # Returns an array of all the `in` pattern branches in the `case` statement. # # @return [Array] an array of `in_pattern` nodes # - # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#30 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_match_node.rb:30 def in_pattern_branches; end # Returns the keyword of the `case` statement as a string. # # @return [String] the keyword of the `case` statement # - # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#14 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_match_node.rb:14 def keyword; end end @@ -515,29 +549,28 @@ end # node when the builder constructs the AST, making its methods available # to all `case` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_node.rb:8 class RuboCop::AST::CaseNode < ::RuboCop::AST::Node include ::RuboCop::AST::ConditionalNode # Returns an array of all the when branches in the `case` statement. # - # and the else (if any). Note that these bodies could be nil. - # # @return [Array] an array of the bodies of the when branches + # and the else (if any). Note that these bodies could be nil. # - # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#38 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_node.rb:38 def branches; end # @deprecated Use `when_branches.each` # - # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#19 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_node.rb:19 def each_when(&block); end # Checks whether this case statement has an `else` branch. # # @return [Boolean] whether the `case` statement has an `else` branch # - # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#55 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_node.rb:55 def else?; end # Returns the else branch of the `case` statement, if any. @@ -545,21 +578,21 @@ class RuboCop::AST::CaseNode < ::RuboCop::AST::Node # @return [Node] the else branch node of the `case` statement # @return [nil] if the case statement does not have an else branch. # - # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#48 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_node.rb:48 def else_branch; end # Returns the keyword of the `case` statement as a string. # # @return [String] the keyword of the `case` statement # - # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#14 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_node.rb:14 def keyword; end # Returns an array of all the when branches in the `case` statement. # # @return [Array] an array of `when` nodes # - # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#30 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_node.rb:30 def when_branches; end end @@ -567,503 +600,511 @@ end # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/casgn_node.rb:8 class RuboCop::AST::CasgnNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConstantNode + # The expression being assigned to the variable. # # @return [Node] the expression being assigned. # - # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#26 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/casgn_node.rb:17 def expression; end - # The name of the variable being assigned as a symbol. - # - # @return [Symbol] the name of the variable being assigned - # - # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#19 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/casgn_node.rb:12 + def lhs; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/casgn_node.rb:11 def name; end - # The namespace of the constant being assigned. - # - # @return [Node, nil] the node associated with the scope (e.g. cbase, const, ...) - # - # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#12 - def namespace; end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/casgn_node.rb:20 + def rhs; end end # A node extension for `class` nodes. This will be used in place of a plain # node when the builder constructs the AST, making its methods available # to all `class` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/class_node.rb:8 class RuboCop::AST::ClassNode < ::RuboCop::AST::Node # The body of this `class` node. # # @return [Node, nil] the body of the class # - # source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#26 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/class_node.rb:26 def body; end # The identifier for this `class` node. # # @return [Node] the identifier of the class # - # source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/class_node.rb:12 def identifier; end # The parent class for this `class` node. # # @return [Node, nil] the parent class of the class # - # source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#19 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/class_node.rb:19 def parent_class; end end # A mixin that helps give collection nodes array polymorphism. # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#6 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:6 module RuboCop::AST::CollectionNode - extend ::Forwardable + extend ::RuboCop::SimpleForwardable - # source://forwardable/1.3.3/forwardable.rb#231 - def &(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def &(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def *(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def *(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def +(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def +(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def -(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def -(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def <<(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def <<(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def [](*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def [](*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def []=(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def []=(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def all?(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def all?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def any?(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def any?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def append(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def append(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def assoc(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def assoc(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def at(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def bsearch(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def bsearch(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def bsearch_index(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def bsearch_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def chain(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def chain(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def chunk(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def chunk(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def chunk_while(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def chunk_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def clear(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def clear(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def collect(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def collect(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def collect!(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def collect!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def collect_concat(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def collect_concat(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def combination(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def combination(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def compact(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def compact(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def compact!(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def compact!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def concat(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def concat(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def count(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def count(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def cycle(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def cycle(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def deconstruct(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def deconstruct(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def delete(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete_at(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def delete_at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete_if(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def delete_if(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def detect(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def detect(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def difference(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def difference(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def dig(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def dig(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def drop(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def drop(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def drop_while(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def drop_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def each(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_cons(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def each_cons(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_entry(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def each_entry(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_index(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def each_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_slice(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def each_slice(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_with_index(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def each_with_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_with_object(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def each_with_object(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def empty?(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def empty?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def entries(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def entries(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def fetch(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def fetch(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def fill(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def fetch_values(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def filter(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def fill(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def filter!(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def filter(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def filter_map(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def filter!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def find(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def filter_map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def find_all(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def find(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def find_index(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def find_all(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def first(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def find_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def flat_map(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def first(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def flatten(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def flat_map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def flatten!(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def flatten(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def grep(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def flatten!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def grep_v(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def grep(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def group_by(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def grep_v(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def include?(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def group_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def index(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def include?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def inject(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def insert(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def inject(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def intersect?(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def insert(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def intersection(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def intersect?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def join(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def intersection(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def keep_if(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def join(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def last(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def keep_if(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def lazy(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def last(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def length(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def lazy(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def map(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def length(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def map!(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def max(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def map!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def max_by(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def max(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def member?(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def max_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def min(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def member?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def min_by(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def min(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def minmax(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def min_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def minmax_by(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def minmax(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def none?(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def minmax_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def one?(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def none?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def pack(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def one?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def partition(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def pack(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def permutation(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def partition(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def place(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def permutation(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def pop(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def pop(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def prepend(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def prepend(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def product(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def product(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def push(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def push(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rassoc(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def rassoc(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reduce(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def reduce(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reject(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def reject(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reject!(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def reject!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def repeated_combination(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def repeated_combination(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def repeated_permutation(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def repeated_permutation(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def replace(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def replace(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reverse(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def reverse(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reverse!(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def reverse!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reverse_each(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def reverse_each(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rindex(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def rfind(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rotate(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def rindex(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rotate!(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def rotate(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sample(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def rotate!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def select(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def sample(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def select!(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def select(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shelljoin(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def select!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shift(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def shelljoin(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shuffle(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def shift(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shuffle!(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def shuffle(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def size(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def shuffle!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def size(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice!(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def slice(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice_after(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def slice!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice_before(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def slice_after(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice_when(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def slice_before(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def slice_when(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort!(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def sort(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort_by(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def sort!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort_by!(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def sort_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sum(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def sort_by!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def take(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def sum(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def take_while(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def take(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def tally(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def take_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_ary(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def tally(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_default_s(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def to_ary(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_formatted_s(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def to_formatted_s(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_fs(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def to_fs(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_h(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def to_h(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_sentence(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def to_sentence(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_set(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def to_set(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_xml(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def to_xml(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def transpose(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def transpose(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def union(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def union(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def uniq(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def uniq(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def uniq!(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def uniq!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def unshift(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def unshift(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def values_at(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def values_at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def zip(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def zip(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def |(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def |(*_arg0, **_arg1, &_arg2); end end -# source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#9 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:9 RuboCop::AST::CollectionNode::ARRAY_METHODS = T.let(T.unsafe(nil), Array) +# A node extension for `complex` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `complex` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/complex_node.rb:8 +class RuboCop::AST::ComplexNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + # Common functionality for nodes that have conditions: # `if`, `while`, `until`, `case`. # This currently doesn't include `when` nodes, because they have multiple # conditions, and need to be checked for that. # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#9 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/conditional_node.rb:9 module RuboCop::AST::ConditionalNode # Returns the body associated with the condition. This works together with # each node's custom destructuring method to select the correct part of # the node. # # @note For `if` nodes, this is the truthy branch. + # # @return [Node, nil] the body of the node # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#40 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/conditional_node.rb:40 def body; end # Returns the condition of the node. This works together with each node's @@ -1071,7 +1112,7 @@ module RuboCop::AST::ConditionalNode # # @return [Node, nil] the condition of the node # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#29 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/conditional_node.rb:29 def condition; end # Checks whether the condition of the node is written on more than @@ -1079,31 +1120,35 @@ module RuboCop::AST::ConditionalNode # # @return [Boolean] whether the condition is on more than one line # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/conditional_node.rb:21 def multiline_condition?; end # Checks whether the condition of the node is written on a single line. # # @return [Boolean] whether the condition is on a single line # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#13 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/conditional_node.rb:13 def single_line_condition?; end end # A node extension for `const` nodes. # -# source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#6 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/const_node.rb:6 class RuboCop::AST::ConstNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConstantNode +end + +# Common functionality for nodes that deal with constants: +# `const`, `casgn`. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:7 +module RuboCop::AST::ConstantNode # @return [Boolean] if the constant starts with `::` (aka s(:cbase)) # - # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#26 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:27 def absolute?; end - # @return [Boolean] if the constant is a Module / Class, according to the standard convention. - # Note: some classes might have uppercase in which case this method - # returns false - # - # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#20 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:24 def class_name?; end # Yield nodes for the namespace @@ -1113,29 +1158,29 @@ class RuboCop::AST::ConstNode < ::RuboCop::AST::Node # s(:const, :Foo), then # s(:const, s(:const, :Foo), :Bar) # - # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#43 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:44 def each_path(&block); end # @return [Boolean] if the constant is a Module / Class, according to the standard convention. - # Note: some classes might have uppercase in which case this method - # returns false + # Note: some classes might have uppercase in which case this method + # returns false # - # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#20 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:21 def module_name?; end # @return [Node, nil] the node associated with the scope (e.g. cbase, const, ...) # - # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#8 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:9 def namespace; end # @return [Boolean] if the constant does not start with `::` (aka s(:cbase)) # - # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#33 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:34 def relative?; end # @return [Symbol] the demodulized name of the constant: "::Foo::Bar" => :Bar # - # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#13 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:14 def short_name; end end @@ -1143,11 +1188,9 @@ end # node when the builder constructs the AST, making its methods available # to all `csend` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/csend_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/csend_node.rb:8 class RuboCop::AST::CsendNode < ::RuboCop::AST::SendNode - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/csend_node.rb#9 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/csend_node.rb:9 def send_type?; end end @@ -1155,7 +1198,7 @@ end # node when the builder constructs the AST, making its methods available # to all `def` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:8 class RuboCop::AST::DefNode < ::RuboCop::AST::Node include ::RuboCop::AST::ParameterizedNode include ::RuboCop::AST::MethodIdentifierPredicates @@ -1164,53 +1207,55 @@ class RuboCop::AST::DefNode < ::RuboCop::AST::Node # as per the feature added in Ruby 2.7. # # @note This is written in a way that may support lead arguments - # which are rumored to be added in a later version of Ruby. + # which are rumored to be added in a later version of Ruby. + # # @return [Boolean] whether the `def` node uses argument forwarding # - # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#26 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:26 def argument_forwarding?; end # An array containing the arguments of the method definition. # # @return [Array] the arguments of the method definition # - # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#40 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:40 def arguments; end # The body of the method definition. # # @note this can be either a `begin` node, if the method body contains - # multiple expressions, or any other node, if it contains a single - # expression. + # multiple expressions, or any other node, if it contains a single + # expression. + # # @return [Node] the body of the method definition # - # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#51 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:51 def body; end # @return [Boolean] if the definition is without an `end` or not. # - # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#63 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:63 def endless?; end # The name of the defined method as a symbol. # # @return [Symbol] the name of the defined method # - # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#33 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:33 def method_name; end # The receiver of the method definition, if any. # # @return [Node, nil] the receiver of the method definition, or `nil`. # - # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#58 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:58 def receiver; end # Checks whether this node body is a void context. # # @return [Boolean] whether the `def` node body is a void context # - # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#15 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:15 def void_context?; end end @@ -1218,30 +1263,30 @@ end # plain node when the builder constructs the AST, making its methods # available to all `send` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/defined_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/defined_node.rb:8 class RuboCop::AST::DefinedNode < ::RuboCop::AST::Node include ::RuboCop::AST::ParameterizedNode include ::RuboCop::AST::MethodIdentifierPredicates include ::RuboCop::AST::MethodDispatchNode - # source://ast/2.4.2/lib/ast/node.rb#56 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/defined_node.rb:16 def arguments; end - # source://rubocop-ast//lib/rubocop/ast/node/defined_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/defined_node.rb:12 def node_parts; end end # Common functionality for primitive literal nodes: `sym`, `str`, # `int`, `float`, ... # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#7 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:7 module RuboCop::AST::Descendence # Returns an array of child nodes. # This is a shorthand for `node.each_child_node.to_a`. # # @return [Array] an array of child nodes # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#38 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:38 def child_nodes; end # Returns an array of descendant nodes. @@ -1249,7 +1294,7 @@ module RuboCop::AST::Descendence # # @return [Array] an array of descendant nodes # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#72 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:72 def descendants; end # Calls the given block for each child node. @@ -1259,25 +1304,34 @@ module RuboCop::AST::Descendence # which yields all children including non-node elements. # # @overload each_child_node - # @overload each_child_node + # Yield all nodes. + # @overload each_child_node(type, ...) + # Yield only nodes matching any of the types. + # @param [Symbol] type a node type + # @yieldparam [Node] node each child node # @return [self] if a block is given # @return [Enumerator] if no block is given - # @yieldparam node [Node] each child node # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#22 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:22 def each_child_node(*types); end # Calls the given block for each descendant node with depth first order. # If no block is given, an `Enumerator` is returned. # # @overload each_descendant - # @overload each_descendant - # @overload each_descendant + # Yield all nodes. + # @overload each_descendant(type) + # Yield only nodes matching the type. + # @param [Symbol] type a node type + # @overload each_descendant(type_a, type_b, ...) + # Yield only nodes matching any of the types. + # @param [Symbol] type_a a node type + # @param [Symbol] type_b a node type + # @yieldparam [Node] node each descendant node # @return [self] if a block is given # @return [Enumerator] if no block is given - # @yieldparam node [Node] each descendant node # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#60 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:60 def each_descendant(*types, &block); end # Calls the given block for the receiver and each descendant node in @@ -1288,18 +1342,24 @@ module RuboCop::AST::Descendence # of a tree and want to iterate over all nodes in the tree. # # @overload each_node - # @overload each_node - # @overload each_node + # Yield all nodes. + # @overload each_node(type) + # Yield only nodes matching the type. + # @param [Symbol] type a node type + # @overload each_node(type_a, type_b, ...) + # Yield only nodes matching any of the types. + # @param [Symbol] type_a a node type + # @param [Symbol] type_b a node type + # @yieldparam [Node] node each node # @return [self] if a block is given # @return [Enumerator] if no block is given - # @yieldparam node [Node] each node # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#95 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:95 def each_node(*types, &block); end protected - # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#107 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:107 def visit_descendants(types, &block); end end @@ -1307,9 +1367,9 @@ end # in place of a plain node when the builder constructs the AST, making # its methods available to all `dstr` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/dstr_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/dstr_node.rb:8 class RuboCop::AST::DstrNode < ::RuboCop::AST::StrNode - # source://rubocop-ast//lib/rubocop/ast/node/dstr_node.rb#9 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/dstr_node.rb:9 def value; end end @@ -1317,23 +1377,50 @@ end # node when the builder constructs the AST, making its methods available # to all `ensure` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/ensure_node.rb:8 class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node # Returns the body of the `ensure` clause. # # @return [Node, nil] The body of the `ensure`. + # @deprecated Use `EnsureNode#branch` # - # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/ensure_node.rb:16 def body; end + + # Returns an the ensure branch in the exception handling statement. + # + # @return [Node, nil] the body of the ensure branch. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/ensure_node.rb:33 + def branch; end + + # Returns the `rescue` node of the `ensure`, if present. + # + # @return [Node, nil] The `rescue` node. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/ensure_node.rb:40 + def rescue_node; end + + # Checks whether this node body is a void context. + # Always `true` for `ensure`. + # + # @return [true] whether the `ensure` node body is a void context + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/ensure_node.rb:48 + def void_context?; end end -# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#5 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/ensure_node.rb:9 +RuboCop::AST::EnsureNode::DEPRECATION_WARNING_LOCATION_CACHE = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/ext/range.rb:5 module RuboCop::AST::Ext; end # Extensions to Parser::AST::Range # -# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#7 +# pkg:gem/rubocop-ast#lib/rubocop/ast/ext/range.rb:7 module RuboCop::AST::Ext::Range + # @return [Range] the range of line numbers for the node # If `exclude_end` is `true`, then the range will be exclusive. # # Assume that `node` corresponds to the following array literal: @@ -1346,22 +1433,15 @@ module RuboCop::AST::Ext::Range # node.loc.begin.line_span # => 1..1 # node.source_range.line_span(exclude_end: true) # => 1...4 # - # @return [Range] the range of line numbers for the node - # - # source://rubocop-ast//lib/rubocop/ast/ext/range.rb#20 + # pkg:gem/rubocop-ast#lib/rubocop/ast/ext/range.rb:20 def line_span(exclude_end: T.unsafe(nil)); end end -# Refinement to circumvent broken `Range#minmax` for infinity ranges in 2.6- -# -# source://rubocop-ast//lib/rubocop/ast/ext/range_min_max.rb#7 -module RuboCop::AST::Ext::RangeMinMax; end - # A node extension for `float` nodes. This will be used in place of a plain # node when the builder constructs the AST, making its methods available to # all `float` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/float_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/float_node.rb:8 class RuboCop::AST::FloatNode < ::RuboCop::AST::Node include ::RuboCop::AST::BasicLiteralNode include ::RuboCop::AST::NumericNode @@ -1371,41 +1451,41 @@ end # node when the builder constructs the AST, making its methods available # to all `for` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/for_node.rb:8 class RuboCop::AST::ForNode < ::RuboCop::AST::Node # Returns the body of the `for` loop. # # @return [Node, nil] The body of the `for` loop. # - # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#48 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/for_node.rb:48 def body; end # Returns the collection the `for` loop is iterating over. # # @return [Node] The collection the `for` loop is iterating over # - # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#41 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/for_node.rb:41 def collection; end # Checks whether the `for` node has a `do` keyword. # # @return [Boolean] whether the `for` node has a `do` keyword # - # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#19 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/for_node.rb:19 def do?; end # Returns the keyword of the `for` statement as a string. # # @return [String] the keyword of the `until` statement # - # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/for_node.rb:12 def keyword; end # Returns the iteration variable of the `for` loop. # # @return [Node] The iteration variable of the `for` loop # - # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#34 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/for_node.rb:34 def variable; end # Checks whether this node body is a void context. @@ -1413,7 +1493,7 @@ class RuboCop::AST::ForNode < ::RuboCop::AST::Node # # @return [true] whether the `for` node body is a void context # - # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#27 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/for_node.rb:27 def void_context?; end end @@ -1436,117 +1516,112 @@ end # The main RuboCop runs in legacy mode; this node is only used # if user `AST::Builder.modernize` or `AST::Builder.emit_lambda=true` # -# source://rubocop-ast//lib/rubocop/ast/node/forward_args_node.rb#23 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/forward_args_node.rb:23 class RuboCop::AST::ForwardArgsNode < ::RuboCop::AST::Node include ::RuboCop::AST::CollectionNode # Node wraps itself in an array to be compatible with other # enumerable argument types. # - # source://rubocop-ast//lib/rubocop/ast/node/forward_args_node.rb#28 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/forward_args_node.rb:28 def to_a; end end # Common functionality for nodes that can be used as hash elements: # `pair`, `kwsplat` # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#7 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:7 module RuboCop::AST::HashElementNode # Returns the delta between this element's delimiter and the argument's. # # @note Pairs with different delimiter styles return a delta of 0 + # # @return [Integer] the delta between the two delimiters # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#61 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:61 def delimiter_delta(other); end # Returns the key of this `hash` element. # # @note For keyword splats, this returns the whole node + # # @return [Node] the key of the hash element # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#13 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:13 def key; end # Returns the delta between this pair's key and the argument pair's. # # @note Keys on the same line always return a delta of 0 # @note Keyword splats always return a delta of 0 for right alignment - # @param alignment [Symbol] whether to check the left or right side + # + # @param [Symbol] alignment whether to check the left or right side # @return [Integer] the delta between the two keys # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#43 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:43 def key_delta(other, alignment = T.unsafe(nil)); end # Checks whether this `hash` element is on the same line as `other`. # # @note A multiline element is considered to be on the same line if it - # shares any of its lines with `other` + # shares any of its lines with `other` + # # @return [Boolean] whether this element is on the same line as `other` # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#32 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:32 def same_line?(other); end # Returns the value of this `hash` element. # # @note For keyword splats, this returns the whole node + # # @return [Node] the value of the hash element # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#22 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:22 def value; end # Returns the delta between this element's value and the argument's. # # @note Keyword splats always return a delta of 0 + # # @return [Integer] the delta between the two values # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#52 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:52 def value_delta(other); end end # A helper class for comparing the positions of different parts of a # `pair` node. # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#67 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:67 class RuboCop::AST::HashElementNode::HashElementDelta - # @raise [ArgumentError] - # @return [HashElementDelta] a new instance of HashElementDelta - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#68 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:68 def initialize(first, second); end - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#89 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:89 def delimiter_delta; end - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#75 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:75 def key_delta(alignment = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#82 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:82 def value_delta; end private - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#106 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:108 def delta(first, second, alignment = T.unsafe(nil)); end - # Returns the value of attribute first. - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#98 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:98 def first; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#117 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:119 def keyword_splat?; end - # Returns the value of attribute second. - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#98 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:98 def second; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#100 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:100 def valid_argument_types?; end end @@ -1554,98 +1629,104 @@ end # node when the builder constructs the AST, making its methods available # to all `hash` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:8 class RuboCop::AST::HashNode < ::RuboCop::AST::Node # Checks whether the `hash` literal is delimited by curly braces. # # @return [Boolean] whether the `hash` literal is enclosed in braces # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#117 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:117 def braces?; end # Calls the given block for each `key` node in the `hash` literal. # If no block is given, an `Enumerator` is returned. # # @note `kwsplat` nodes are ignored. + # # @return [self] if a block is given # @return [Enumerator] if no block is given # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#59 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:59 def each_key(&block); end # Calls the given block for each `pair` node in the `hash` literal. # If no block is given, an `Enumerator` is returned. # # @note `kwsplat` nodes are ignored. + # # @return [self] if a block is given # @return [Enumerator] if no block is given # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#33 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:33 def each_pair; end # Calls the given block for each `value` node in the `hash` literal. # If no block is given, an `Enumerator` is returned. # # @note `kwsplat` nodes are ignored. + # # @return [self] if a block is given # @return [Enumerator] if no block is given # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#83 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:83 def each_value(&block); end # Checks whether the `hash` node contains any `pair`- or `kwsplat` nodes. # # @return[Boolean] whether the `hash` is empty # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#22 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:22 def empty?; end # Returns an array of all the keys in the `hash` literal. # # @note `kwsplat` nodes are ignored. + # # @return [Array] an array of keys in the `hash` literal # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#48 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:48 def keys; end # Checks whether this `hash` uses a mix of hash rocket and colon # delimiters for its pairs. # # @note `kwsplat` nodes are ignored. + # # @return [Boolean] whether the `hash` uses mixed delimiters # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#110 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:110 def mixed_delimiters?; end # Returns an array of all the key value pairs in the `hash` literal. # + # @note this may be different from children as `kwsplat` nodes are # ignored. # - # @note this may be different from children as `kwsplat` nodes are # @return [Array] an array of `pair` nodes # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#15 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:15 def pairs; end # Checks whether any of the key value pairs in the `hash` literal are on # the same line. # # @note A multiline `pair` is considered to be on the same line if it - # shares any of its lines with another `pair` + # shares any of its lines with another `pair` + # # @note `kwsplat` nodes are ignored. + # # @return [Boolean] whether any `pair` nodes are on the same line # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#100 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:100 def pairs_on_same_line?; end # Returns an array of all the values in the `hash` literal. # # @note `kwsplat` nodes are ignored. + # # @return [Array] an array of values in the `hash` literal # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#72 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:72 def values; end end @@ -1653,7 +1734,7 @@ end # node when the builder constructs the AST, making its methods available # to all `if` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:8 class RuboCop::AST::IfNode < ::RuboCop::AST::Node include ::RuboCop::AST::ConditionalNode include ::RuboCop::AST::ModifierNode @@ -1662,31 +1743,33 @@ class RuboCop::AST::IfNode < ::RuboCop::AST::Node # # @return [Array] an array of branch nodes # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#147 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:154 def branches; end # @deprecated Use `branches.each` # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#164 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:171 def each_branch(&block); end # Checks whether the `if` node has an `else` clause. # # @note This returns `true` for nodes containing an `elsif` clause. - # This is legacy behavior, and many cops rely on it. + # This is legacy behavior, and many cops rely on it. + # # @return [Boolean] whether the node has an `else` clause # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#42 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:49 def else?; end # Returns the branch of the `if` node that gets evaluated when its # condition is falsey. # # @note This is normalized for `unless` nodes. + # # @return [Node] the falsey branch node of the `if` node # @return [nil] when there is no else branch # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#126 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:133 def else_branch; end # Checks whether the `if` is an `elsif`. Parser handles these by nesting @@ -1694,7 +1777,7 @@ class RuboCop::AST::IfNode < ::RuboCop::AST::Node # # @return [Boolean] whether the node is an `elsif` # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#32 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:39 def elsif?; end # Checks whether the `if` node has at least one `elsif` branch. Returns @@ -1702,7 +1785,7 @@ class RuboCop::AST::IfNode < ::RuboCop::AST::Node # # @return [Boolean] whether the `if` node has at least one `elsif` branch # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#104 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:111 def elsif_conditional?; end # Checks whether this node is an `if` statement. (This is not true of @@ -1710,17 +1793,18 @@ class RuboCop::AST::IfNode < ::RuboCop::AST::Node # # @return [Boolean] whether the node is an `if` statement # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#16 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:16 def if?; end # Returns the branch of the `if` node that gets evaluated when its # condition is truthy. # # @note This is normalized for `unless` nodes. + # # @return [Node] the truthy branch node of the `if` node # @return [nil] if the truthy branch is empty # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#115 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:122 def if_branch; end # Returns the inverse keyword of the `if` node as a string. Returns `if` @@ -1729,7 +1813,7 @@ class RuboCop::AST::IfNode < ::RuboCop::AST::Node # # @return [String] the inverse keyword of the `if` statement # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#66 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:73 def inverse_keyword; end # Returns the keyword of the `if` statement as a string. Returns an empty @@ -1737,7 +1821,7 @@ class RuboCop::AST::IfNode < ::RuboCop::AST::Node # # @return [String] the keyword of the `if` statement # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#57 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:64 def keyword; end # Checks whether the `if` node is in a modifier form, i.e. a condition @@ -1746,16 +1830,17 @@ class RuboCop::AST::IfNode < ::RuboCop::AST::Node # # @return [Boolean] whether the `if` node is a modifier # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#80 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:87 def modifier_form?; end # Checks whether the `if` node has nested `if` nodes in any of its # branches. # # @note This performs a shallow search. + # # @return [Boolean] whether the `if` node contains nested conditionals # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#90 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:97 def nested_conditional?; end # Custom destructuring method. This is used to normalize the branches @@ -1763,22 +1848,29 @@ class RuboCop::AST::IfNode < ::RuboCop::AST::Node # # @return [Array] the different parts of the `if` statement # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#134 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:141 def node_parts; end # Checks whether the `if` node is a ternary operator. # # @return [Boolean] whether the `if` node is a ternary operator # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#49 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:56 def ternary?; end + # Checks whether the `if` node has an `then` clause. + # + # @return [Boolean] whether the node has an `then` clause + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:31 + def then?; end + # Checks whether this node is an `unless` statement. (This is not true # of ternary operators and `if` statements.) # # @return [Boolean] whether the node is an `unless` statement # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#24 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:24 def unless?; end end @@ -1786,34 +1878,34 @@ end # node when the builder constructs the AST, making its methods available # to all `in` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/in_pattern_node.rb:8 class RuboCop::AST::InPatternNode < ::RuboCop::AST::Node # Returns the body of the `in` node. # # @return [Node, nil] the body of the `in` node # - # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#33 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/in_pattern_node.rb:33 def body; end # Returns the index of the `in` branch within the `case` statement. # # @return [Integer] the index of the `in` branch # - # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#19 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/in_pattern_node.rb:19 def branch_index; end # Returns a node of the pattern in the `in` branch. # # @return [Node] a pattern node # - # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/in_pattern_node.rb:12 def pattern; end # Checks whether the `in` node has a `then` keyword. # # @return [Boolean] whether the `in` node has a `then` keyword # - # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#26 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/in_pattern_node.rb:26 def then?; end end @@ -1832,7 +1924,7 @@ end # The main RuboCop runs in legacy mode; this node is only used # if user `AST::Builder.modernize` or `AST::Builder.emit_index=true` # -# source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#19 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/index_node.rb:19 class RuboCop::AST::IndexNode < ::RuboCop::AST::Node include ::RuboCop::AST::ParameterizedNode include ::RuboCop::AST::ParameterizedNode::RestArguments @@ -1841,21 +1933,17 @@ class RuboCop::AST::IndexNode < ::RuboCop::AST::Node # For similarity with legacy mode # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#29 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/index_node.rb:29 def assignment_method?; end # For similarity with legacy mode # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#24 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/index_node.rb:24 def attribute_accessor?; end # For similarity with legacy mode # - # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#34 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/index_node.rb:34 def method_name; end private @@ -1864,7 +1952,7 @@ class RuboCop::AST::IndexNode < ::RuboCop::AST::Node # # @return [Array] the arguments of the dispatched method # - # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#43 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/index_node.rb:43 def first_argument_index; end end @@ -1885,7 +1973,7 @@ end # The main RuboCop runs in legacy mode; this node is only used # if user `AST::Builder.modernize` or `AST::Builder.emit_index=true` # -# source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#21 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/indexasgn_node.rb:21 class RuboCop::AST::IndexasgnNode < ::RuboCop::AST::Node include ::RuboCop::AST::ParameterizedNode include ::RuboCop::AST::ParameterizedNode::RestArguments @@ -1894,21 +1982,17 @@ class RuboCop::AST::IndexasgnNode < ::RuboCop::AST::Node # For similarity with legacy mode # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#31 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/indexasgn_node.rb:31 def assignment_method?; end # For similarity with legacy mode # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#26 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/indexasgn_node.rb:26 def attribute_accessor?; end # For similarity with legacy mode # - # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#36 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/indexasgn_node.rb:36 def method_name; end private @@ -1917,7 +2001,7 @@ class RuboCop::AST::IndexasgnNode < ::RuboCop::AST::Node # # @return [Array] the arguments of the dispatched method # - # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#45 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/indexasgn_node.rb:45 def first_argument_index; end end @@ -1925,17 +2009,46 @@ end # node when the builder constructs the AST, making its methods available to # all `int` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/int_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/int_node.rb:8 class RuboCop::AST::IntNode < ::RuboCop::AST::Node include ::RuboCop::AST::BasicLiteralNode include ::RuboCop::AST::NumericNode end +# A node extension for `kwbegin` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `kwbegin` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_begin_node.rb:8 +class RuboCop::AST::KeywordBeginNode < ::RuboCop::AST::Node + # Returns the body of the `kwbegin` block. Returns `self` if the `kwbegin` contains + # multiple nodes. + # + # @return [Node, nil] The body of the `kwbegin`. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_begin_node.rb:13 + def body; end + + # Returns the `rescue` node of the `kwbegin` block, if one is present. + # + # @return [Node, nil] The `rescue` node within `kwbegin`. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_begin_node.rb:30 + def ensure_node; end + + # Returns the `rescue` node of the `kwbegin` block, if one is present. + # + # @return [Node, nil] The `rescue` node within `kwbegin`. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_begin_node.rb:37 + def rescue_node; end +end + # A node extension for `kwsplat` and `forwarded_kwrestarg` nodes. This will be used in # place of a plain node when the builder constructs the AST, making its methods available to # all `kwsplat` and `forwarded_kwrestarg` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_splat_node.rb:8 class RuboCop::AST::KeywordSplatNode < ::RuboCop::AST::Node include ::RuboCop::AST::HashElementNode @@ -1944,7 +2057,7 @@ class RuboCop::AST::KeywordSplatNode < ::RuboCop::AST::Node # # @return [false] # - # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#26 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_splat_node.rb:26 def colon?; end # This is used for duck typing with `pair` nodes which also appear as @@ -1952,14 +2065,14 @@ class RuboCop::AST::KeywordSplatNode < ::RuboCop::AST::Node # # @return [false] # - # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#18 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_splat_node.rb:18 def hash_rocket?; end # This provides `forwarded_kwrestarg` node to return true to be compatible with `kwsplat` node. # # @return [true] # - # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#48 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_splat_node.rb:48 def kwsplat_type?; end # Custom destructuring method. This is used to normalize the branches @@ -1967,18 +2080,18 @@ class RuboCop::AST::KeywordSplatNode < ::RuboCop::AST::Node # # @return [Array] the different parts of the `kwsplat` # - # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#41 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_splat_node.rb:41 def node_parts; end # Returns the operator for the `kwsplat` as a string. # # @return [String] the double splat operator # - # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#33 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_splat_node.rb:33 def operator; end end -# source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#11 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_splat_node.rb:11 RuboCop::AST::KeywordSplatNode::DOUBLE_SPLAT = T.let(T.unsafe(nil), String) # Used for modern support only: @@ -2000,7 +2113,7 @@ RuboCop::AST::KeywordSplatNode::DOUBLE_SPLAT = T.let(T.unsafe(nil), String) # The main RuboCop runs in legacy mode; this node is only used # if user `AST::Builder.modernize` or `AST::Builder.emit_lambda=true` # -# source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#23 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:23 class RuboCop::AST::LambdaNode < ::RuboCop::AST::Node include ::RuboCop::AST::ParameterizedNode include ::RuboCop::AST::ParameterizedNode::RestArguments @@ -2009,55 +2122,101 @@ class RuboCop::AST::LambdaNode < ::RuboCop::AST::Node # For similarity with legacy mode # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#43 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:43 def assignment_method?; end # For similarity with legacy mode # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#38 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:38 def attribute_accessor?; end # For similarity with legacy mode # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#28 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:28 def lambda?; end # For similarity with legacy mode # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#33 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:33 def lambda_literal?; end # For similarity with legacy mode # - # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#53 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:53 def method_name; end # For similarity with legacy mode # - # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#48 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:48 def receiver; end private # For similarity with legacy mode # - # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#60 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:60 def first_argument_index; end end +# A node extension for `masgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:8 +class RuboCop::AST::MasgnNode < ::RuboCop::AST::Node + # @return [Array] the assignment nodes of the multiple assignment + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:16 + def assignments; end + + # The RHS (right hand side) of the multiple assignment. This returns + # the nodes as parsed: either a single node if the RHS has a single value, + # or an `array` node containing multiple nodes. + # + # NOTE: Due to how parsing works, `expression` will return the same for + # `a, b = x, y` and `a, b = [x, y]`. + # + # @return [Node] the right hand side of a multiple assignment. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:39 + def expression; end + + # @return [MlhsNode] the `mlhs` node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:10 + def lhs; end + + # @return [Array] names of all the variables being assigned + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:21 + def names; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:42 + def rhs; end + + # In contrast to `expression`, `values` always returns a Ruby array + # containing all the nodes being assigned on the RHS. + # + # Literal arrays are considered a singular value; but unlike `expression`, + # implied `array` nodes from assigning multiple values on the RHS are treated + # as separate. + # + # @return [Array] individual values being assigned on the RHS of the multiple assignment + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:52 + def values; end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:58 + def multiple_rhs?; end +end + # Common functionality for nodes that are a kind of method dispatch: # `send`, `csend`, `super`, `zsuper`, `yield`, `defined?`, # and (modern only): `index`, `indexasgn`, `lambda` # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:8 module RuboCop::AST::MethodDispatchNode include ::RuboCop::AST::MethodIdentifierPredicates extend ::RuboCop::AST::NodePattern::Macros @@ -2066,37 +2225,33 @@ module RuboCop::AST::MethodDispatchNode # # @return [Boolean] whether the dispatched method is an access modifier # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#64 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:64 def access_modifier?; end - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#273 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:272 def adjacent_def_modifier?(param0 = T.unsafe(nil)); end # Checks whether this node is an arithmetic operation # # @return [Boolean] whether the dispatched method is an arithmetic - # operation + # operation # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#175 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:175 def arithmetic_operation?; end - # Checks whether the dispatched method is a setter method. - # - # @return [Boolean] whether the dispatched method is a setter - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#107 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:110 def assignment?; end # Checks whether the dispatched method is a bare access modifier that # affects all methods defined after the macro. # # @return [Boolean] whether the dispatched method is a bare - # access modifier + # access modifier # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#73 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:73 def bare_access_modifier?; end - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#278 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:277 def bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end # Checks whether this is a binary operation. @@ -2104,66 +2259,67 @@ module RuboCop::AST::MethodDispatchNode # @example # # foo + bar + # # @return [Boolean] whether this method is a binary operation # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#248 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:247 def binary_operation?; end # Whether this method dispatch has an explicit block. # # @return [Boolean] whether the dispatched method has a block # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#167 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:167 def block_literal?; end - # The `block` or `numblock` node associated with this method dispatch, if any. + # The `block`, `numblock`, or `itblock` node associated with this method dispatch, if any. # - # @return [BlockNode, nil] the `block` or `numblock` node associated with this method - # call or `nil` + # @return [BlockNode, nil] the `block`, `numblock`, or `itblock` node associated with this + # method call or `nil` # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#46 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:46 def block_node; end # Checks whether the name of the dispatched method matches the argument # and has an implicit receiver. # - # @param name [Symbol, String] the method name to check for + # @param [Symbol, String] name the method name to check for # @return [Boolean] whether the method name matches the argument # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#100 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:100 def command?(name); end # Checks whether the *explicit* receiver of this method dispatch is a # `const` node. # # @return [Boolean] whether the receiver of this method dispatch - # is a `const` node + # is a `const` node # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#152 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:152 def const_receiver?; end # Checks if this node is part of a chain of `def` or `defs` modifiers. # - # or `nil` if it isn't a def modifier - # # @example # # private def foo; end + # # @return [Node | nil] returns the `def|defs` node this is a modifier for, + # or `nil` if it isn't a def modifier # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#199 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:199 def def_modifier(node = T.unsafe(nil)); end # Checks if this node is part of a chain of `def` or `defs` modifiers. # - # See also `def_modifier` that returns the node or `nil` - # # @example # # private def foo; end - # @return [Boolean] whether the `def|defs` node is a modifier or not. # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#187 + # @return whether the `def|defs` node is a modifier or not. + # See also `def_modifier` that returns the node or `nil` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:187 def def_modifier?(node = T.unsafe(nil)); end # Checks whether the dispatched method uses a dot to connect the @@ -2174,7 +2330,7 @@ module RuboCop::AST::MethodDispatchNode # # @return [Boolean] whether the method was called with a connecting dot # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#119 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:119 def dot?; end # Checks whether the dispatched method uses a double colon to connect the @@ -2182,7 +2338,7 @@ module RuboCop::AST::MethodDispatchNode # # @return [Boolean] whether the method was called with a connecting dot # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:127 def double_colon?; end # Checks whether the method dispatch is the implicit form of `#call`, @@ -2190,10 +2346,10 @@ module RuboCop::AST::MethodDispatchNode # # @return [Boolean] whether the method is the implicit form of `#call` # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#160 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:160 def implicit_call?; end - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#257 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:256 def in_macro_scope?(param0 = T.unsafe(nil)); end # Checks whether this is a lambda. Some versions of parser parses @@ -2201,7 +2357,7 @@ module RuboCop::AST::MethodDispatchNode # # @return [Boolean] whether this method is a lambda # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#213 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:212 def lambda?; end # Checks whether this is a lambda literal (stabby lambda.) @@ -2209,9 +2365,10 @@ module RuboCop::AST::MethodDispatchNode # @example # # -> (foo) { bar } + # # @return [Boolean] whether this method is a lambda literal # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#224 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:223 def lambda_literal?; end # Checks whether the dispatched method is a macro method. A macro method @@ -2219,35 +2376,36 @@ module RuboCop::AST::MethodDispatchNode # has an implicit receiver. # # @note This does not include DSLs that use nested blocks, like RSpec + # # @return [Boolean] whether the dispatched method is a macro method # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#57 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:57 def macro?; end # The name of the dispatched method as a symbol. # # @return [Symbol] the name of the dispatched method # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#27 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:27 def method_name; end # Checks whether the dispatched method is a non-bare access modifier that # affects only the method it receives. # # @return [Boolean] whether the dispatched method is a non-bare - # access modifier + # access modifier # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#82 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:82 def non_bare_access_modifier?; end - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#283 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:282 def non_bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end # The receiving node of the method dispatch. # # @return [Node, nil] the receiver of the dispatched method or `nil` # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#20 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:20 def receiver; end # Checks whether the dispatched method uses a safe navigation operator to @@ -2255,14 +2413,14 @@ module RuboCop::AST::MethodDispatchNode # # @return [Boolean] whether the method was called with a connecting dot # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#135 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:135 def safe_navigation?; end # The source range for the method name or keyword that dispatches this call. # # @return [Parser::Source::Range] the source range for the method name or keyword # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#34 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:34 def selector; end # Checks whether the *explicit* receiver of this method dispatch is @@ -2270,23 +2428,23 @@ module RuboCop::AST::MethodDispatchNode # # @return [Boolean] whether the receiver of this method dispatch is `self` # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#143 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:143 def self_receiver?; end # Checks whether the dispatched method is a setter method. # # @return [Boolean] whether the dispatched method is a setter # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#107 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:107 def setter_method?; end # Checks whether the dispatched method is a bare `private` or `protected` # access modifier that affects all methods defined after the macro. # # @return [Boolean] whether the dispatched method is a bare - # `private` or `protected` access modifier + # `private` or `protected` access modifier # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#91 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:91 def special_modifier?; end # Checks whether this is a unary operation. @@ -2294,16 +2452,17 @@ module RuboCop::AST::MethodDispatchNode # @example # # -foo + # # @return [Boolean] whether this method is a unary operation # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#235 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:234 def unary_operation?; end end -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#12 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:12 RuboCop::AST::MethodDispatchNode::ARITHMETIC_OPERATORS = T.let(T.unsafe(nil), Array) -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#14 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:14 RuboCop::AST::MethodDispatchNode::SPECIAL_MODIFIERS = T.let(T.unsafe(nil), Array) # Common predicates for nodes that reference method identifiers: @@ -2311,20 +2470,20 @@ RuboCop::AST::MethodDispatchNode::SPECIAL_MODIFIERS = T.let(T.unsafe(nil), Array # # @note this mixin expects `#method_name` and `#receiver` to be implemented # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#9 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:9 module RuboCop::AST::MethodIdentifierPredicates # Checks whether the method is an assignment method. # # @return [Boolean] whether the method is an assignment # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#142 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:142 def assignment_method?; end # Checks whether the method is a bang method. # # @return [Boolean] whether the method is a bang method # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#171 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:171 def bang_method?; end # Checks whether the method is a camel case method, @@ -2332,170 +2491,187 @@ module RuboCop::AST::MethodIdentifierPredicates # # @return [Boolean] whether the method is a camel case method # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#179 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:179 def camel_case_method?; end # Checks whether the method is a comparison method. # # @return [Boolean] whether the method is a comparison # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#135 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:135 def comparison_method?; end # Checks whether the *explicit* receiver of node is a `const` node. # # @return [Boolean] whether the receiver of this node is a `const` node # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#193 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:193 def const_receiver?; end # Checks whether the method is an Enumerable method. # # @return [Boolean] whether the method is an Enumerable method # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#157 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:157 def enumerable_method?; end # Checks whether the method is an enumerator method. # # @return [Boolean] whether the method is an enumerator # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#149 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:149 def enumerator_method?; end # Checks whether the method name matches the argument. # - # @param name [Symbol, String] the method name to check for + # @param [Symbol, String] name the method name to check for # @return [Boolean] whether the method name matches the argument # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#79 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:79 def method?(name); end # Checks whether this is a negation method, i.e. `!` or keyword `not`. # # @return [Boolean] whether this method is a negation method # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#200 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:200 def negation_method?; end # Checks whether the method is a nonmutating Array method. # # @return [Boolean] whether the method is a nonmutating Array method # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#114 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:114 def nonmutating_array_method?; end # Checks whether the method is a nonmutating binary operator method. # # @return [Boolean] whether the method is a nonmutating binary operator method # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#93 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:93 def nonmutating_binary_operator_method?; end # Checks whether the method is a nonmutating Hash method. # # @return [Boolean] whether the method is a nonmutating Hash method # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#121 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:121 def nonmutating_hash_method?; end # Checks whether the method is a nonmutating operator method. # # @return [Boolean] whether the method is a nonmutating operator method # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#107 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:107 def nonmutating_operator_method?; end # Checks whether the method is a nonmutating String method. # # @return [Boolean] whether the method is a nonmutating String method # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#128 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:128 def nonmutating_string_method?; end # Checks whether the method is a nonmutating unary operator method. # # @return [Boolean] whether the method is a nonmutating unary operator method # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#100 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:100 def nonmutating_unary_operator_method?; end # Checks whether the method is an operator method. # # @return [Boolean] whether the method is an operator # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#86 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:86 def operator_method?; end # Checks whether the method is a predicate method. # # @return [Boolean] whether the method is a predicate method # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#164 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:164 def predicate_method?; end # Checks whether this is a prefix bang method, e.g. `!foo`. # # @return [Boolean] whether this method is a prefix bang # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#214 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:214 def prefix_bang?; end # Checks whether this is a prefix not method, e.g. `not foo`. # # @return [Boolean] whether this method is a prefix not # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#207 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:207 def prefix_not?; end # Checks whether the *explicit* receiver of this node is `self`. # # @return [Boolean] whether the receiver of this node is `self` # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#186 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:186 def self_receiver?; end end -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#16 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:16 RuboCop::AST::MethodIdentifierPredicates::ENUMERABLE_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:10 RuboCop::AST::MethodIdentifierPredicates::ENUMERATOR_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#32 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:32 RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#24 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:24 RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_BINARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#48 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:48 RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#28 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:28 RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#59 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:59 RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_STRING_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#26 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:26 RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_UNARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) # http://phrogz.net/programmingruby/language.html#table_18.4 # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#20 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:20 RuboCop::AST::MethodIdentifierPredicates::OPERATOR_METHODS = T.let(T.unsafe(nil), Set) +# A node extension for `mlhs` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mlhs_node.rb:8 +class RuboCop::AST::MlhsNode < ::RuboCop::AST::Node + # Returns all the assignment nodes on the left hand side (LHS) of a multiple assignment. + # These are generally assignment nodes (`lvasgn`, `ivasgn`, `cvasgn`, `gvasgn`, `casgn`) + # but can also be `send` nodes in case of `foo.bar, ... =` or `foo[:bar], ... =`, + # or a `splat` node for `*, ... =`. + # + # @return [Array] the assignment nodes of the multiple assignment LHS + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mlhs_node.rb:15 + def assignments; end +end + # Common functionality for nodes that can be used as modifiers: # `if`, `while`, `until` # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/modifier_node.rb#7 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/modifier_node.rb:7 module RuboCop::AST::ModifierNode # Checks whether the node is in a modifier form, i.e. a condition # trailing behind an expression. # # @return [Boolean] whether the node is a modifier # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/modifier_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/modifier_node.rb:12 def modifier_form?; end end @@ -2503,20 +2679,20 @@ end # plain node when the builder constructs the AST, making its methods # available to all `module` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/module_node.rb:8 class RuboCop::AST::ModuleNode < ::RuboCop::AST::Node # The body of this `module` node. # # @return [Node, nil] the body of the module # - # source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#19 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/module_node.rb:19 def body; end # The identifier for this `module` node. # # @return [Node] the identifier of the module # - # source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/module_node.rb:12 def identifier; end end @@ -2524,7 +2700,7 @@ end # plain node when the builder constructs the AST, making its methods # available to all `next` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/next_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/next_node.rb:8 class RuboCop::AST::NextNode < ::RuboCop::AST::Node include ::RuboCop::AST::ParameterizedNode include ::RuboCop::AST::ParameterizedNode::WrappedArguments @@ -2546,28 +2722,27 @@ end # # Find the first lvar node under the receiver node. # lvar_node = node.each_descendant.find(&:lvar_type?) # -# source://rubocop-ast//lib/rubocop/ast/node.rb#21 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:21 class RuboCop::AST::Node < ::Parser::AST::Node include ::RuboCop::AST::Sexp include ::RuboCop::AST::Descendence extend ::RuboCop::AST::NodePattern::Macros - # @return [Node] a new instance of Node # @see https://www.rubydoc.info/gems/ast/AST/Node:initialize # - # source://rubocop-ast//lib/rubocop/ast/node.rb#92 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:155 def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def __ENCODING___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def __FILE___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def __LINE___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def alias_type?; end # Returns an array of ancestor nodes. @@ -2575,445 +2750,443 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Array] an array of ancestor nodes # - # source://rubocop-ast//lib/rubocop/ast/node.rb#247 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:320 def ancestors; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def and_asgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def and_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:549 + def any_block_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:529 + def any_def_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:553 + def any_match_pattern_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:557 + def any_str_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:561 + def any_sym_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def arg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def arg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def args_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#464 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:525 def argument?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#468 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:533 def argument_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def array_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def array_pattern_with_tail_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def array_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#416 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:477 def assignment?; end - # Some cops treat the shovel operator as a kind of assignment. - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#355 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:427 def assignment_or_similar?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def back_ref_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#420 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:481 def basic_conditional?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#363 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:435 def basic_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def begin_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def block_pass_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def block_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def blockarg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def blockarg_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#472 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 + def blocknilarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:537 def boolean_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def break_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#456 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:517 def call_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def case_match_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def case_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def casgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def cbase_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#460 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:521 def chained?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#512 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:609 def class_constructor?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#530 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:627 def class_definition?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def class_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#144 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:217 def complete!; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#149 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:222 def complete?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def complex_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#424 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:485 def conditional?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#293 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:366 def const_name; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def const_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def const_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def csend_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def cvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def cvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def def_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#314 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:386 def defined_module; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#319 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:391 def defined_module_name; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def defined_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def defs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def dstr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def dsym_type?; end # Calls the given block for each ancestor node from parent to root. # If no block is given, an `Enumerator` is returned. # # @overload each_ancestor - # @overload each_ancestor - # @overload each_ancestor + # Yield all nodes. + # @overload each_ancestor(type) + # Yield only nodes matching the type. + # @param [Symbol] type a node type + # @overload each_ancestor(type_a, type_b, ...) + # Yield only nodes matching any of the types. + # @param [Symbol] type_a a node type + # @param [Symbol] type_b a node type + # @yieldparam [Node] node each ancestor node # @return [self] if a block is given # @return [Enumerator] if no block is given - # @yieldparam node [Node] each ancestor node # - # source://rubocop-ast//lib/rubocop/ast/node.rb#235 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:308 def each_ancestor(*types, &block); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def eflipflop_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def empty_else_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#349 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:421 def empty_source?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def ensure_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#408 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:469 def equals_asgn?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def erange_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def false_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#371 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:443 def falsey_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def find_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#261 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:334 def first_line; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def float_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def for_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def forward_arg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def forward_args_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def forwarded_args_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def forwarded_kwrestarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def forwarded_restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#509 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:606 def global_const?(param0 = T.unsafe(nil), param1); end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#484 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:565 def guard_clause?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def gvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def gvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def hash_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def hash_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def ident_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def if_guard_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def if_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def iflipflop_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#379 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:451 def immutable_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def in_match_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def in_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def index_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def indexasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def int_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def irange_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 + def itarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 + def itblock_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def ivar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def ivasgn_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#437 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:498 def keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def kwarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def kwargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def kwbegin_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def kwnilarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def kwoptarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def kwrestarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def kwsplat_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#503 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:600 def lambda?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#506 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:603 def lambda_or_proc?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def lambda_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#265 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:338 def last_line; end # Use is discouraged, this is a potentially slow method and can lead # to even slower algorithms - # # @return [Node, nil] the left (aka previous) sibling # - # source://rubocop-ast//lib/rubocop/ast/node.rb#187 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:260 def left_sibling; end # Use is discouraged, this is a potentially slow method and can lead # to even slower algorithms - # # @return [Array] the left (aka previous) siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#197 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:270 def left_siblings; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#269 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:342 def line_count; end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:431 + def literal?; end + + # Shortcut to safely check if a location is present # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#359 - def literal?; end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:573 + def loc?(which_loc); end - # NOTE: `loop { }` is a normal method call and thus not a loop keyword. + # Shortcut to safely test a particular location, even if + # this location does not exist or is `nil` # - # @return [Boolean] + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:581 + def loc_is?(which_loc, str); end + + # NOTE: `loop { }` is a normal method call and thus not a loop keyword. # - # source://rubocop-ast//lib/rubocop/ast/node.rb#433 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:494 def loop_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def lvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def lvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def masgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def match_alt_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def match_as_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def match_current_line_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#491 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:588 def match_guard_clause?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def match_nil_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def match_pattern_p_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def match_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def match_rest_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def match_var_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def match_with_lvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def match_with_trailing_comma_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def mlhs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#537 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:634 def module_definition?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def module_type?; end # Predicates # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#341 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:413 def multiline?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#375 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:447 def mutable_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#671 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:765 def new_class_or_module_block?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def next_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def nil_type?; end # Common destructuring method. This can be used to normalize @@ -3023,98 +3196,90 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Array] the different parts of the ndde # - # source://ast/2.4.2/lib/ast/node.rb#56 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:291 def node_parts; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#275 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:348 def nonempty_line_count; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def not_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def nth_ref_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def numargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def numblock_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#476 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:541 def numeric_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def objc_kwarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def objc_restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def objc_varargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def op_asgn_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#448 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:509 def operator_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def optarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def or_asgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def or_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def pair_type?; end # Returns the parent node, or `nil` if the receiver is a root node. # # @return [Node, nil] the parent node or `nil` # - # source://rubocop-ast//lib/rubocop/ast/node.rb#126 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:199 def parent; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#135 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:208 def parent?; end # Searching the AST # - # source://rubocop-ast//lib/rubocop/ast/node.rb#325 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:397 def parent_module_name; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#452 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:513 def parenthesized_call?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def pin_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#428 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:489 def post_condition_loop?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def postexe_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def preexe_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#496 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:593 def proc?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def procarg0_type?; end # Some expressions are evaluated for their value, some for their side @@ -3125,101 +3290,89 @@ class RuboCop::AST::Node < ::Parser::AST::Node # expressions which are equivalent in value. # So, is evaluation of this node free of side effects? # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#582 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:677 def pure?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#480 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:545 def range_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def rational_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#286 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:359 def receiver(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#386 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:138 def recursive_basic_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#386 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:138 def recursive_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def redo_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#404 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:465 def reference?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def regexp_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def regopt_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def resbody_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def rescue_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def restarg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def retry_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def return_type?; end # Use is discouraged, this is a potentially slow method and can lead # to even slower algorithms - # # @return [Node, nil] the right (aka next) sibling # - # source://rubocop-ast//lib/rubocop/ast/node.rb#178 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:251 def right_sibling; end # Use is discouraged, this is a potentially slow method and can lead # to even slower algorithms - # # @return [Array] the right (aka next) siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#206 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:279 def right_siblings; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#140 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:213 def root?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def sclass_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def self_type?; end # Most nodes are of 'send' type, so this method is defined # separately to make this check as fast as possible. # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#119 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:192 def send_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def shadowarg_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#412 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:473 def shorthand_asgn?; end # Returns the index of the receiver node in its siblings. (Sibling index @@ -3228,70 +3381,68 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Integer, nil] the index of the receiver node in its siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:244 def sibling_index; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#345 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:417 def single_line?; end # NOTE: Some rare nodes may have no source, like `s(:args)` in `foo {}` - # # @return [String, nil] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#253 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:326 def source; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#279 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:352 def source_length; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#257 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:330 def source_range; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#444 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:505 def special_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def splat_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#291 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:364 def str_content(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def str_type?; end - # @deprecated Use `:class_constructor?` - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#525 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:622 def struct_constructor?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def super_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def sym_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def true_type?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#367 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:439 def truthy_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # Determine if the node is one of several node types in a single query + # Allows specific single node types, as well as "grouped" types + # (e.g. `:boolean` for `:true` or `:false`) + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:174 + def type?(*types); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def undef_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def unless_guard_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def until_post_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def until_type?; end # Override `AST::Node#updated` so that `AST::Processor` does not try to @@ -3300,7 +3451,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # identical subtrees. Rather, the entire AST must be copied any time any # part of it is changed. # - # source://rubocop-ast//lib/rubocop/ast/node.rb#160 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:233 def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end # Some expressions are evaluated for their value, some for their side @@ -3311,195 +3462,188 @@ class RuboCop::AST::Node < ::Parser::AST::Node # So, does the return value of this node matter? If we changed it to # `(...; nil)`, might that affect anything? # - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#551 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:647 def value_used?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#400 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:461 def variable?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def when_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def while_post_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def while_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def xstr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def yield_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:183 def zsuper_type?; end protected - # source://rubocop-ast//lib/rubocop/ast/node.rb#130 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:203 def parent=(node); end private - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#610 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:704 def begin_value_used?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#621 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:715 def case_if_value_used?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#305 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:377 def defined_module0(param0 = T.unsafe(nil)); end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#615 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:709 def for_value_used?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#657 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:751 def parent_module_name_for_block(ancestor); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#645 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:739 def parent_module_name_for_sclass(sclass_node); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#632 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:726 def parent_module_name_part(node); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#600 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:695 def visit_ancestors(types); end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#627 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:721 def while_until_value_used?; end -end -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#80 -RuboCop::AST::Node::ARGUMENT_TYPES = T.let(T.unsafe(nil), Set) + class << self + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:134 + def def_recursive_literal_predicate(kind); end + end +end # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#55 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:55 RuboCop::AST::Node::ASSIGNMENTS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#58 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:58 RuboCop::AST::Node::BASIC_CONDITIONALS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#42 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:42 RuboCop::AST::Node::BASIC_LITERALS = T.let(T.unsafe(nil), Set) -# <=> isn't included here, because it doesn't return a boolean. -# # @api private +# <=> isn't included here, because it doesn't return a boolean. # -# source://rubocop-ast//lib/rubocop/ast/node.rb#28 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:28 RuboCop::AST::Node::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#39 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:39 RuboCop::AST::Node::COMPOSITE_LITERALS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#60 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:60 RuboCop::AST::Node::CONDITIONALS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node.rb#87 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:84 RuboCop::AST::Node::EMPTY_CHILDREN = T.let(T.unsafe(nil), Array) -# source://rubocop-ast//lib/rubocop/ast/node.rb#88 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:85 RuboCop::AST::Node::EMPTY_PROPERTIES = T.let(T.unsafe(nil), Hash) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#50 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:50 RuboCop::AST::Node::EQUALS_ASSIGNMENTS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#35 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:35 RuboCop::AST::Node::FALSEY_LITERALS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#47 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:89 +RuboCop::AST::Node::GROUP_FOR_TYPE = T.let(T.unsafe(nil), Hash) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:47 RuboCop::AST::Node::IMMUTABLE_LITERALS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#70 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:70 RuboCop::AST::Node::KEYWORDS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#37 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:37 RuboCop::AST::Node::LITERALS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node.rb#83 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:80 RuboCop::AST::Node::LITERAL_RECURSIVE_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node.rb#84 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:81 RuboCop::AST::Node::LITERAL_RECURSIVE_TYPES = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#64 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:64 RuboCop::AST::Node::LOOP_TYPES = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#44 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:44 RuboCop::AST::Node::MUTABLE_LITERALS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#76 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:76 RuboCop::AST::Node::OPERATOR_KEYWORDS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#62 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:62 RuboCop::AST::Node::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#68 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:68 RuboCop::AST::Node::REFERENCES = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#53 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:53 RuboCop::AST::Node::SHORTHAND_ASSIGNMENTS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#78 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:78 RuboCop::AST::Node::SPECIAL_KEYWORDS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#31 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:31 RuboCop::AST::Node::TRUTHY_LITERALS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#66 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:66 RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set) # This class performs a pattern-matching operation on an AST node. @@ -3521,76 +3665,66 @@ RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set) # - With no block, but multiple captures: captures are returned as an array. # - With no block and no captures: #match returns `true`. # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#5 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:5 class RuboCop::AST::NodePattern include ::RuboCop::AST::NodePattern::MethodDefiner - extend ::Forwardable + extend ::RuboCop::SimpleForwardable - # @return [NodePattern] a new instance of NodePattern - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#77 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:78 def initialize(str, compiler: T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#90 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:91 def ==(other); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#107 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:108 def as_json(_options = T.unsafe(nil)); end - # Returns the value of attribute ast. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:74 def ast; end - # source://forwardable/1.3.3/forwardable.rb#231 - def captures(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:76 + def captures(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:112 def encode_with(coder); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#90 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:94 def eql?(other); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#119 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:120 def freeze; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#115 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:116 def init_with(coder); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#103 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:104 def marshal_dump; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#99 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:100 def marshal_load(pattern); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#85 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:86 def match(*args, **rest, &block); end - # Returns the value of attribute match_code. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:74 def match_code; end - # source://forwardable/1.3.3/forwardable.rb#231 - def named_parameters(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:76 + def named_parameters(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute pattern. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:74 def pattern; end - # source://forwardable/1.3.3/forwardable.rb#231 - def positional_parameters(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:76 + def positional_parameters(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#95 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:96 def to_s; end class << self # Yields its argument and any descendants, depth-first. # - # @yield [element] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#59 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:60 def descend(element, &block); end end end @@ -3600,80 +3734,73 @@ end # Doc on how this fits in the compiling process: # /docs/modules/ROOT/pages/node_pattern.adoc # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:10 class RuboCop::AST::NodePattern::Builder - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#17 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:17 def emit_atom(type, value); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#29 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:29 def emit_call(type, selector, args = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#11 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:11 def emit_capture(capture_token, node); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#25 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:25 def emit_list(type, _begin, children, _end); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#41 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:41 def emit_subsequence(node_list); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:21 def emit_unary_op(type, _operator = T.unsafe(nil), *children); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#34 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:34 def emit_union(begin_t, pattern_lists, end_t); end private - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#53 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:53 def n(type, *args); end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#49 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:49 def optimizable_as_set?(children); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#57 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:57 def union_children(pattern_lists); end end # A NodePattern comment, simplified version of ::Parser::Source::Comment # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#7 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/comment.rb:7 class RuboCop::AST::NodePattern::Comment - # @param range [Parser::Source::Range] - # @return [Comment] a new instance of Comment + # @param [Parser::Source::Range] range # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#14 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/comment.rb:14 def initialize(range); end # Compares comments. Two comments are equal if they # correspond to the same source range. # - # @param other [Object] + # @param [Object] other # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#31 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/comment.rb:31 def ==(other); end # @return [String] a human-readable representation of this comment # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#39 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/comment.rb:39 def inspect; end - # Returns the value of attribute location. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#8 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/comment.rb:9 def loc; end - # Returns the value of attribute location. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#8 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/comment.rb:8 def location; end # @return [String] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#20 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/comment.rb:20 def text; end end @@ -3683,79 +3810,69 @@ end # Doc on how this fits in the compiling process: # /docs/modules/ROOT/pages/node_pattern.adoc # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#11 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:11 class RuboCop::AST::NodePattern::Compiler - extend ::Forwardable + extend ::RuboCop::SimpleForwardable - # @return [Compiler] a new instance of Compiler - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#15 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:16 def initialize; end - # source://forwardable/1.3.3/forwardable.rb#231 - def bind(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:25 + def bind(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute binding. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:14 def binding; end - # Returns the value of attribute captures. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:14 def captures; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#42 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:43 def compile_as_atom(node); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#46 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:47 def compile_as_node_pattern(node, **options); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#50 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:51 def compile_sequence(sequence, var:); end # Enumerates `enum` while keeping track of state across # union branches (captures and unification). # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#38 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:39 def each_union(enum, &block); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#74 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:75 def freeze; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#31 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:32 def named_parameter(name); end - # Returns the value of attribute named_parameters. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:14 def named_parameters; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#70 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:71 def next_capture; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#54 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:55 def parser; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#26 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:27 def positional_parameter(number); end - # Returns the value of attribute positional_parameters. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:14 def positional_parameters; end # Utilities # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#60 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:61 def with_temp_variables(*names, &block); end private - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#81 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:82 def enforce_same_captures(enum); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#96 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:97 def new_capture; end end @@ -3765,277 +3882,224 @@ end # Doc on how this fits in the compiling process: # /docs/modules/ROOT/pages/node_pattern.adoc # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#12 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:12 class RuboCop::AST::NodePattern::Compiler::AtomSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler private - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#28 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:28 def visit_const; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#32 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:32 def visit_named_parameter; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:24 def visit_number; end # Assumes other types are node patterns. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#46 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:46 def visit_other_type; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#36 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:36 def visit_positional_parameter; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:26 def visit_regexp; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#40 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:40 def visit_set; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:25 def visit_string; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:21 def visit_symbol; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#15 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:15 def visit_unify; end end # Holds the list of bound variable names # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:8 class RuboCop::AST::NodePattern::Compiler::Binding - # @return [Binding] a new instance of Binding - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#9 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:9 def initialize; end # Yields the first time a given name is bound # # @return [String] bound variable name # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#16 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:16 def bind(name); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#30 + # Returns currently bound variable names + # @return [Array] variable names that are currently bound + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:31 + def bound_variables; end + + # Yields for each branch of the given union, forbidding unification of + # bindings which only appear in a subset of the union. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:37 def union_bind(enum); end private - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#69 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:75 def forbid(names); end end # Variant of the Compiler with tracing information for nodes # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:10 class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern::Compiler - # @return [Debug] a new instance of Debug - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:118 def initialize; end - # source://forwardable/1.3.3/forwardable.rb#231 - def comments(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:131 + def comments(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#128 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:123 def named_parameters; end - # Returns the value of attribute node_ids. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#33 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:35 def node_ids; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#132 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:127 def parser; end - # source://forwardable/1.3.3/forwardable.rb#231 - def tokens(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:131 + def tokens(*_arg0, **_arg1, &_arg2); end end # @api private # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#36 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:38 class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer - # @api private - # @return [Colorizer] a new instance of Colorizer - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#96 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:98 def initialize(pattern, compiler: T.unsafe(nil)); end - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#94 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:96 def compiler; end - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#94 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:96 def node_pattern; end - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#94 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:96 def pattern; end - # @api private # @return [Node] the Ruby AST # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#103 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:105 def test(ruby, trace: T.unsafe(nil)); end private - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#111 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:113 def ruby_ast(ruby); end - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#116 - def ruby_parser; end end -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#37 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:39 RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::COLOR_SCHEME = T.let(T.unsafe(nil), Hash) -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#92 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:94 RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Compiler = RuboCop::AST::NodePattern::Compiler::Debug # Result of a NodePattern run against a particular AST # Consider constructor is private # -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#46 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Result < ::Struct - # @api private - # @return [Hash] a map for {character_position => color} - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#56 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:58 def color_map(color_scheme = T.unsafe(nil)); end - # @api private - # @return [String] a Rainbow colorized version of ruby - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:50 def colorize(color_scheme = T.unsafe(nil)); end - # Returns the value of attribute colorizer - # - # @return [Object] the current value of colorizer + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 def colorizer; end - # Sets the attribute colorizer - # - # @param value [Object] the value to set the attribute colorizer to. - # @return [Object] the newly set value + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 def colorizer=(_); end - # @api private - # @return [Hash] a map for {node => matched?}, depth-first - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#66 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:68 def match_map; end - # @api private - # @return [Boolean] a value of `Trace#matched?` or `:not_visitable` - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#74 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:76 def matched?(node); end - # Returns the value of attribute returned - # - # @return [Object] the current value of returned + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 def returned; end - # Sets the attribute returned - # - # @param value [Object] the value to set the attribute returned to. - # @return [Object] the newly set value + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 def returned=(_); end - # Returns the value of attribute ruby_ast - # - # @return [Object] the current value of ruby_ast + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 def ruby_ast; end - # Sets the attribute ruby_ast - # - # @param value [Object] the value to set the attribute ruby_ast to. - # @return [Object] the newly set value + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 def ruby_ast=(_); end - # Returns the value of attribute trace - # - # @return [Object] the current value of trace + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 def trace; end - # Sets the attribute trace - # - # @param value [Object] the value to set the attribute trace to. - # @return [Object] the newly set value + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 def trace=(_); end private - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#87 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:89 def ast; end - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#81 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:83 def color_map_for(node, color); end class << self + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 def [](*_arg0); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 def inspect; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 def keyword_init?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 def members; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 def new(*_arg0); end end end # @api private # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#139 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:134 module RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#140 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:135 def do_compile; end private - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#150 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:145 def node_id; end - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#146 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:141 def tracer(kind); end end # @api private # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#156 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:151 class RuboCop::AST::NodePattern::Compiler::Debug::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler end # @api private # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#161 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:156 class RuboCop::AST::NodePattern::Compiler::Debug::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler end @@ -4043,24 +4107,20 @@ end # Compiled node pattern requires a named parameter `trace`, # which should be an instance of this class # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#13 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:13 class RuboCop::AST::NodePattern::Compiler::Debug::Trace - # @return [Trace] a new instance of Trace - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#14 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:14 def initialize; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#18 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:19 def enter(node_id); end # return nil (not visited), false (not matched) or true (matched) # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#28 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:30 def matched?(node_id); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#23 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:25 def success(node_id); end end @@ -4071,89 +4131,83 @@ end # Doc on how this fits in the compiling process: # /docs/modules/ROOT/pages/node_pattern.adoc # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#13 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:13 class RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler - # @return [NodePatternSubcompiler] a new instance of NodePatternSubcompiler - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#16 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:16 def initialize(compiler, var: T.unsafe(nil), access: T.unsafe(nil), seq_head: T.unsafe(nil)); end - # Returns the value of attribute access. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#14 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:14 def access; end - # Returns the value of attribute seq_head. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#14 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:14 def seq_head; end private - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#119 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:119 def access_element; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:123 def access_node; end # @param [Array, nil] # @return [String, nil] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#113 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:113 def compile_args(arg_list, first: T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#129 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:129 def compile_guard_clause; end # Compiling helpers # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#107 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:107 def compile_value_match(value); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#133 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:133 def multiple_access(kind); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#30 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:30 def visit_ascend; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#58 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:58 def visit_capture; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#37 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:37 def visit_descend; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#84 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:84 def visit_function_call; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#73 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:73 def visit_intersection; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#25 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:25 def visit_negation; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#88 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:88 def visit_node_type; end # Assumes other types are atoms. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#100 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:100 def visit_other_type; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#80 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:80 def visit_predicate; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#92 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:92 def visit_sequence; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#49 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:49 def visit_unify; end # Lists # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#64 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:64 def visit_union; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#45 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:45 def visit_wildcard; end end @@ -4166,164 +4220,167 @@ end # Doc on how this fits in the compiling process: # /docs/modules/ROOT/pages/node_pattern.adoc # -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#17 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:17 class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler # Calls `compile_sequence`; the actual `compile` method # will be used for the different terms of the sequence. # The only case of re-entrant call to `compile` is `visit_capture` # - # @return [SequenceSubcompiler] a new instance of SequenceSubcompiler - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#25 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:25 def initialize(compiler, sequence:, var:); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#31 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:31 def compile_sequence; end # @api private # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#251 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:256 def in_sync; end protected - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#226 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:231 def compile_terms(children = T.unsafe(nil), last_arity = T.unsafe(nil)); end # @api private # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#251 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:256 def cur_index; end # yield `sync_code` iff not already in sync # - # @yield [code] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#242 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:247 def sync; end private - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#20 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:59 def compile(node); end # Compilation helpers # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#165 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:170 def compile_and_advance(term); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#128 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:133 def compile_any_order_branches(matched_var); end # @return [Array] Else code, and init code (if any) # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#137 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:142 def compile_any_order_else; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#180 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:185 def compile_captured_repetition(child_code, child_captures); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#119 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:124 def compile_case(when_branches, else_code); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#361 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:366 def compile_child_nb_guard(arity_range); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#319 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:324 def compile_cur_index; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#325 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:330 def compile_index(cur = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#353 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:358 def compile_loop(term); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#347 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:352 def compile_loop_advance(to = T.unsafe(nil)); end # Assumes `@cur_index` is already updated # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#198 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:203 def compile_matched(kind); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#304 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:309 def compile_max_matched; end # @return [String] code that evaluates to `false` if the matched arity is too small # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#270 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:275 def compile_min_check; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#285 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:290 def compile_remaining; end + # Generate initialization code for unification variables + # @param newly_bound [Array] variable names that were newly bound + # @return [String] initialization code + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:424 + def compile_unify_init(newly_bound); end + # @return [Hash] of {subcompiler => code} # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#373 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:378 def compile_union_forks; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#313 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:318 def empty_loop; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#214 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:219 def handle_prev; end # Modifies in place `forks` # Syncs our state # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#400 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:405 def merge_forks!(forks); end # Modifies in place `forks` to insure that `cur_{child|index}_var` are ok # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#384 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:389 def preserve_union_start(forks); end + # @return [Array] total arities (as Ranges) of remaining children nodes # E.g. For sequence `(_ _? <_ _>)`, arities are: 1, 0..1, 2 # and remaining arities are: 3..4, 2..3, 2..2, 0..0 # - # @return [Array] total arities (as Ranges) of remaining children nodes - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#259 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:264 def remaining_arities(children, last_arity); end # returns truthy iff `@cur_index` switched to relative from end mode (i.e. < 0) # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#341 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:346 def use_index_from_end; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#88 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:88 def visit_any_order; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#150 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:155 def visit_capture; end # Single node patterns are all handled here # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#62 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:62 def visit_other_type; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#78 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:78 def visit_repetition; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#159 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:164 def visit_rest; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#104 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:109 def visit_union; end # NOTE: assumes `@cur_index != :seq_head`. Node types using `within_loop` must # have `def in_sequence_head; :raise; end` # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#333 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:338 def within_loop; end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#18 +# Shift of 1 from standard Ruby indices +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:18 RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::DELTA = T.let(T.unsafe(nil), Integer) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#19 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:19 RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::POSITIVE = T.let(T.unsafe(nil), Proc) # Base class for subcompilers @@ -4332,50 +4389,38 @@ RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::POSITIVE = T.let(T.uns # Doc on how this fits in the compiling process: # /docs/modules/ROOT/pages/node_pattern.adoc # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#12 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:12 class RuboCop::AST::NodePattern::Compiler::Subcompiler - # @return [Subcompiler] a new instance of Subcompiler - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#15 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:15 def initialize(compiler); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#20 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:20 def compile(node); end - # Returns the value of attribute compiler. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#13 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:13 def compiler; end private - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#34 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:34 def do_compile; end - # Returns the value of attribute node. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#32 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:32 def node; end class << self - # @private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#47 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:47 def inherited(base); end - # @private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#42 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:42 def method_added(method); end - # Returns the value of attribute registry. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#40 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:40 def registry; end end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#53 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:27 class RuboCop::AST::NodePattern::Invalid < ::StandardError; end # Lexer class for `NodePattern` @@ -4383,164 +4428,154 @@ class RuboCop::AST::NodePattern::Invalid < ::StandardError; end # Doc on how this fits in the compiling process: # /docs/modules/ROOT/pages/node_pattern.adoc # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#18 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:18 class RuboCop::AST::NodePattern::Lexer < ::RuboCop::AST::NodePattern::LexerRex - # @return [Lexer] a new instance of Lexer - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#31 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:31 def initialize(source); end - # Returns the value of attribute comments. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:29 def comments; end - # Returns the value of attribute source_buffer. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:29 def source_buffer; end - # Returns the value of attribute tokens. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:29 def tokens; end private - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#60 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:60 def do_parse; end # @return [token] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#40 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:40 def emit(type); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#48 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:48 def emit_comment; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#52 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:52 def emit_regexp; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#64 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:64 def token(type, value); end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#19 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:19 RuboCop::AST::NodePattern::Lexer::Error = RuboCop::AST::NodePattern::LexerRex::ScanError -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#21 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:21 RuboCop::AST::NodePattern::Lexer::REGEXP_OPTIONS = T.let(T.unsafe(nil), Hash) # The generated lexer RuboCop::AST::NodePattern::LexerRex # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#23 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:23 class RuboCop::AST::NodePattern::LexerRex # Yields on the current action. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#69 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:69 def action; end # The file name / path # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#43 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:43 def filename; end # The file name / path # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#43 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:43 def filename=(_arg0); end # The current location in the parse. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#104 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:103 def location; end - # The StringScanner for this lexer. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#48 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:55 def match; end # The match groups for the current scan. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#60 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:60 def matches; end # Lex the next token. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#113 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:112 def next_token; end # Parse the given string. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#84 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:83 def parse(str); end # Read in and parse the file at +path+. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#94 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:93 def parse_file(path); end # The current scanner class. Must be overridden in subclasses. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#77 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:76 def scanner_class; end # The StringScanner for this lexer. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#48 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:48 def ss; end # The StringScanner for this lexer. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#48 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:48 def ss=(_arg0); end # The current lexical state. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#53 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:53 def state; end # The current lexical state. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#53 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:53 def state=(_arg0); end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#31 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:31 RuboCop::AST::NodePattern::LexerRex::CALL = T.let(T.unsafe(nil), Regexp) # :stopdoc: # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#27 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:27 RuboCop::AST::NodePattern::LexerRex::CONST_NAME = T.let(T.unsafe(nil), Regexp) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#29 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:29 RuboCop::AST::NodePattern::LexerRex::IDENTIFIER = T.let(T.unsafe(nil), Regexp) # :startdoc: # :stopdoc: # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#36 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:36 class RuboCop::AST::NodePattern::LexerRex::LexerError < ::StandardError; end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#30 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:30 RuboCop::AST::NodePattern::LexerRex::NODE_TYPE = T.let(T.unsafe(nil), Regexp) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#33 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:33 RuboCop::AST::NodePattern::LexerRex::REGEXP = T.let(T.unsafe(nil), Regexp) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#32 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:32 RuboCop::AST::NodePattern::LexerRex::REGEXP_BODY = T.let(T.unsafe(nil), Regexp) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#28 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:28 RuboCop::AST::NodePattern::LexerRex::SYMBOL_NAME = T.let(T.unsafe(nil), Regexp) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#37 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:37 class RuboCop::AST::NodePattern::LexerRex::ScanError < ::RuboCop::AST::NodePattern::LexerRex::LexerError; end # Helpers for defining methods based on a pattern string # -# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#28 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:30 module RuboCop::AST::NodePattern::Macros # Define a method which applies a pattern to an AST node # @@ -4550,7 +4585,7 @@ module RuboCop::AST::NodePattern::Macros # If the node matches, and no block is provided, the new method will # return the captures, or `true` if there were none. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#36 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:38 def def_node_matcher(method_name, pattern_str, **keyword_defaults); end # Define a method which recurses over the descendants of an AST node, @@ -4560,285 +4595,275 @@ module RuboCop::AST::NodePattern::Macros # as soon as it finds a descendant which matches. Otherwise, it will # yield all descendants which match. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#46 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:48 def def_node_search(method_name, pattern_str, **keyword_defaults); end end # Functionality to turn `match_code` into methods/lambda # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#7 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:7 module RuboCop::AST::NodePattern::MethodDefiner - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#37 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:37 def as_lambda; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#27 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:27 def compile_as_lambda; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#8 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:8 def def_node_matcher(base, method_name, **defaults); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:21 def def_node_search(base, method_name, **defaults); end private - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:139 def compile_init; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#50 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:50 def def_helper(base, method_name, **defaults); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#114 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:114 def emit_keyword_list(forwarding: T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#132 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:132 def emit_lambda_code; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#125 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:125 def emit_method_code; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#63 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:63 def emit_node_search(method_name); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#74 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:74 def emit_node_search_body(method_name, prelude:, on_match:); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#110 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:110 def emit_param_list; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#119 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:119 def emit_params(*first, forwarding: T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#100 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:100 def emit_retval; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#89 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:89 def emit_yield_capture(when_no_capture = T.unsafe(nil), yield_with: T.unsafe(nil)); end # This method minimizes the closure for our method # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#44 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:44 def wrapping_block(method_name, **defaults); end end # Base class for AST Nodes of a `NodePattern` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#7 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:7 class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node include ::RuboCop::AST::Descendence - extend ::Forwardable + extend ::RuboCop::SimpleForwardable - # Note: `arity.end` may be `Float::INFINITY` - # # @return [Integer, Range] An Integer for fixed length terms, otherwise a Range. + # Note: `arity.end` may be `Float::INFINITY` # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#29 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:28 def arity; end # @return [Range] arity as a Range # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#69 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:68 def arity_range; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#23 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:22 def capture?; end # @return [Node] most nodes have only one child # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#48 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:47 def child; end # @return [Array] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#43 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:42 def children_nodes; end # @return [Array, nil] replace node with result, or `nil` if no change requested. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#34 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:33 def in_sequence_head; end - # that matches within a Set (e.g. `42`, `:sym` but not `/regexp/`) - # # @return [Boolean] returns true for nodes having a Ruby literal equivalent + # that matches within a Set (e.g. `42`, `:sym` but not `/regexp/`) # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#64 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:63 def matches_within_set?; end - # @return [Integer] nb of captures of that node and its descendants + # @return [Integer] nb of captures that this node will emit # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#53 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:52 def nb_captures; end # To be overridden by subclasses # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#19 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:18 def rest?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#78 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:77 def source_range; end # @return [Boolean] returns whether it matches a variable number of elements # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#58 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:57 def variadic?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#74 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:73 def with(type: T.unsafe(nil), children: T.unsafe(nil), location: T.unsafe(nil)); end end # Node class for `` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#180 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:179 class RuboCop::AST::NodePattern::Node::AnyOrder < ::RuboCop::AST::NodePattern::Node include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#198 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:197 def arity; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#190 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:189 def ends_with_rest?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#194 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:193 def rest_node; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#186 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:185 def term_nodes; end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#183 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:182 RuboCop::AST::NodePattern::Node::AnyOrder::ARITIES = T.let(T.unsafe(nil), Hash) # Node class for `$something` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#97 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:96 class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node - # source://forwardable/1.3.3/forwardable.rb#231 - def arity(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:98 + def arity(*_arg0, **_arg1, &_arg2); end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#101 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:100 def capture?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#109 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:108 def in_sequence_head; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#105 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:104 def nb_captures; end - # source://forwardable/1.3.3/forwardable.rb#231 - def rest?(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:98 + def rest?(*_arg0, **_arg1, &_arg2); end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#86 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:85 module RuboCop::AST::NodePattern::Node::ForbidInSeqHead - # @raise [NodePattern::Invalid] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#87 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:86 def in_sequence_head; end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#140 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:139 RuboCop::AST::NodePattern::Node::FunctionCall = RuboCop::AST::NodePattern::Node::Predicate -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#82 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:81 RuboCop::AST::NodePattern::Node::INT_TO_RANGE = T.let(T.unsafe(nil), Hash) # Registry # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#250 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:255 RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#12 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:11 RuboCop::AST::NodePattern::Node::MATCHES_WITHIN_SET = T.let(T.unsafe(nil), Set) # Node class for `predicate?(:arg, :list)` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#131 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:130 class RuboCop::AST::NodePattern::Node::Predicate < ::RuboCop::AST::NodePattern::Node - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:135 def arg_list; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#132 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:131 def method_name; end end # Node class for `int+` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#143 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:142 class RuboCop::AST::NodePattern::Node::Repetition < ::RuboCop::AST::NodePattern::Node include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#156 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:155 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#146 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:145 def operator; end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#150 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:149 RuboCop::AST::NodePattern::Node::Repetition::ARITIES = T.let(T.unsafe(nil), Hash) # Node class for `...` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#162 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:161 class RuboCop::AST::NodePattern::Node::Rest < ::RuboCop::AST::NodePattern::Node - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#170 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:169 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#174 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:173 def in_sequence_head; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#166 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:165 def rest?; end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#163 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:162 RuboCop::AST::NodePattern::Node::Rest::ARITY = T.let(T.unsafe(nil), Range) # Node class for `(type first second ...)` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#118 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:117 class RuboCop::AST::NodePattern::Node::Sequence < ::RuboCop::AST::NodePattern::Node include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - # @return [Sequence] a new instance of Sequence - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#121 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:120 def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end end # A list (potentially empty) of nodes; part of a Union # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#206 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:205 class RuboCop::AST::NodePattern::Node::Subsequence < ::RuboCop::AST::NodePattern::Node include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#209 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:208 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#214 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:213 def in_sequence_head; end end # Node class for `{ ... }` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#224 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:223 class RuboCop::AST::NodePattern::Node::Union < ::RuboCop::AST::NodePattern::Node - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#225 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:224 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#232 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:231 def in_sequence_head; end + + # Each child in a union must contain the same number + # of captures. Only one branch ends up capturing. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:249 + def nb_captures; end end # Parser for NodePattern @@ -4847,697 +4872,723 @@ end # Doc on how this fits in the compiling process: # /docs/modules/ROOT/pages/node_pattern.adoc # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#12 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:12 class RuboCop::AST::NodePattern::Parser < ::Racc::Parser - extend ::Forwardable + extend ::RuboCop::SimpleForwardable - # @return [Parser] a new instance of Parser - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#19 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:19 def initialize(builder = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#335 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:335 def _reduce_10(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#339 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:339 def _reduce_11(val, _values); end # reduce 12 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#345 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:345 def _reduce_13(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#349 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:349 def _reduce_14(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#353 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:353 def _reduce_15(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#357 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:357 def _reduce_16(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#361 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:361 def _reduce_17(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#365 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:365 def _reduce_18(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#369 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:369 def _reduce_19(val, _values); end # reduce 1 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#303 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:303 def _reduce_2(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#373 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:373 def _reduce_20(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#377 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:377 def _reduce_21(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#381 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:381 def _reduce_22(val, _values); end # reduce 24 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#389 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:389 def _reduce_25(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#395 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:395 def _reduce_26(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#307 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:307 def _reduce_3(val, _values); end # reduce 32 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#415 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:415 def _reduce_33(val, _values); end # reduce 36 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#425 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:425 def _reduce_37(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#429 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:429 def _reduce_38(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#433 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:433 def _reduce_39(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#311 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:311 def _reduce_4(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#437 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:437 def _reduce_40(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#441 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:441 def _reduce_41(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#445 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:445 def _reduce_42(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#449 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:449 def _reduce_43(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#453 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:453 def _reduce_44(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#457 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:457 def _reduce_45(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#461 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:461 def _reduce_46(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#315 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:315 def _reduce_5(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#319 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:319 def _reduce_6(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#323 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:323 def _reduce_7(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#327 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:327 def _reduce_8(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#331 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:331 def _reduce_9(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#465 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:465 def _reduce_none(val, _values); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_atom(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:46 + def emit_atom(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_call(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:46 + def emit_call(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_capture(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:46 + def emit_capture(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_list(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:46 + def emit_list(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_unary_op(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:46 + def emit_unary_op(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_union(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:46 + def emit_union(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#40 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:40 def inspect; end - # source://forwardable/1.3.3/forwardable.rb#231 - def next_token(*args, **_arg1, &block); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:48 + def next_token(*_arg0, **_arg1, &_arg2); end # (Similar API to `parser` gem) # Parses a source and returns the AST. # - # @param source_buffer [Parser::Source::Buffer, String] The source buffer to parse. + # @param [Parser::Source::Buffer, String] source_buffer The source buffer to parse. # @return [NodePattern::Node] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#31 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:31 def parse(source); end private - # @raise [NodePattern::Invalid] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#50 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:50 def enforce_unary(node); end # Overrides Racc::Parser's method: # - # @raise [NodePattern::Invalid] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#59 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:59 def on_error(token, val, _vstack); end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#16 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:16 RuboCop::AST::NodePattern::Parser::Builder = RuboCop::AST::NodePattern::Builder -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#17 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:17 RuboCop::AST::NodePattern::Parser::Lexer = RuboCop::AST::NodePattern::Lexer -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#227 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:227 RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#295 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:295 RuboCop::AST::NodePattern::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#244 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:244 RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) # Overrides Parser to use `WithMeta` variants and provide additional methods # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:8 class RuboCop::AST::NodePattern::Parser::WithMeta < ::RuboCop::AST::NodePattern::Parser - # Returns the value of attribute comments. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#98 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:98 def comments; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#100 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:100 def do_parse; end - # Returns the value of attribute tokens. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#98 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:98 def tokens; end end # Overrides Builder to emit nodes with locations # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#39 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:39 class RuboCop::AST::NodePattern::Parser::WithMeta::Builder < ::RuboCop::AST::NodePattern::Builder - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#40 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:40 def emit_atom(type, token); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#61 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:61 def emit_call(type, selector_t, args = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#55 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:55 def emit_list(type, begin_t, children, end_t); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#49 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:49 def emit_unary_op(type, operator_t = T.unsafe(nil), *children); end private - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#81 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:81 def join_exprs(left_expr, right_expr); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#75 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:75 def loc(token_or_range); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#71 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:71 def n(type, children, source_map); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#85 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:85 def source_map(token_or_range, begin_t: T.unsafe(nil), end_t: T.unsafe(nil), operator_t: T.unsafe(nil), selector_t: T.unsafe(nil)); end end # Overrides Lexer to token locations and comments # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:10 class RuboCop::AST::NodePattern::Parser::WithMeta::Lexer < ::RuboCop::AST::NodePattern::Lexer - # @return [Lexer] a new instance of Lexer - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#13 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:13 def initialize(str_or_buffer); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#27 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:27 def emit_comment; end # @return [::Parser::Source::Range] last match's position # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#33 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:33 def pos; end - # Returns the value of attribute source_buffer. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#11 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:11 def source_buffer; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#23 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:23 def token(type, value); end end # Utility to assign a set of values to a constant # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#7 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:7 module RuboCop::AST::NodePattern::Sets class << self - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#31 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:31 def [](set); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#15 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:15 def name(set); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#22 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:22 def uniq(name); end end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#14 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:14 RuboCop::AST::NodePattern::Sets::MAX = T.let(T.unsafe(nil), Integer) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:8 RuboCop::AST::NodePattern::Sets::REGISTRY = T.let(T.unsafe(nil), Hash) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_0_1 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_0_1_2 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_10_10 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_1_1 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_ABSTRACT_OVERRIDE_OVERRIDABLE_ETC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_ANY_ALL_NORETURN_ETC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY_NONE_ETC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_ANY_NONE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_ARRAY_HASH = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_BRANCH_REF_TAG = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_CALLER_CALLER_LOCATIONS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_CAPTURE2_CAPTURE2E_CAPTURE3_ETC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_CIPHER_DIGEST = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_INSTANCE_EVAL = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE_STRUCT = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_CLONE_DUP_FREEZE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_CONSTANTIZE_CONSTANTS_CONST_GET = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_COUNT_LENGTH_SIZE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_COVER_INCLUDE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_DEF_DELEGATORS_DEF_INSTANCE_DELEGATORS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_DEF_DELEGATOR_DEF_INSTANCE_DELEGATOR = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_DOWNCASE_UPCASE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_OBJECT_WITH_OBJECT = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_ESCAPE_ENCODE_UNESCAPE_DECODE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_EXIST_EXISTS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_FILETEST_FILE_DIR_SHELL = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_FILE_DIR = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_FILE_FILETEST = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_FILE_TEMPFILE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_FILE_TEMPFILE_STRINGIO = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_FIND_DETECT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST__ETC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_FIXNUM_BIGNUM = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_FLATTEN_FLATTEN = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_FORMAT_SPRINTF_PRINTF = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_GETHOSTBYADDR_GETHOSTBYNAME = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_GROUP_BY_TO_H_TALLY_ETC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB_SUB_SUB = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_INCLUDE_EXTEND_PREPEND = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_INCLUDE_MEMBER = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EVAL_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EXEC_CLASS_EXEC_MODULE_EXEC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_INTEGER_BIGDECIMAL_COMPLEX_RATIONAL = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_IO_FILE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_KEYS_VALUES = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_KEY_HAS_KEY_FETCH_ETC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_LAST_FIRST = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_LENGTH_SIZE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_LOAD_RESTORE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_MAP_FILTER_MAP = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_MATCH_MATCH = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_MATCH__MATCH = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_MAX_BY_MIN_BY_MINMAX_BY = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_MODULE_FUNCTION_RUBY2_KEYWORDS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_NEW_ = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_NEW_COMPILE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_NEW_OPEN = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_NIL_ = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_PRESENT_ANY_BLANK_EMPTY = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PRIVATE_CLASS_METHOD = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PUBLIC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_PROP_CONST = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_PUBLIC_CONSTANT_PRIVATE_CONSTANT = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_PUBLIC_PROTECTED_PRIVATE_MODULE_FUNCTION = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL_THROW_ETC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_READ_BINREAD = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_REJECT_DELETE_IF_REJECT = T.let(T.unsafe(nil), Set) +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_REJECT_REJECT = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_REVERSE_REVERSE_EACH = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL_REJECT = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT = T.let(T.unsafe(nil), Set) +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT_FILTER_FILTER = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SET_SORTEDSET = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_SORT_BY_SORT = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_SORT_MIN_MAX = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_SPAWN_SYSTEM = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_SPRINTF_FORMAT = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SQUISH_SQUISH = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_START_WITH_END_WITH = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_START_WITH_STARTS_WITH_END_WITH_ENDS_WITH = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_SUCC_PRED_NEXT = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_TO_H_TO_HASH = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_TO_H_TO_HASH_MERGE_ETC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_TO_I_TO_F_TO_C_TO_R = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_TYPE_TEMPLATE_TYPE_MEMBER = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_ZERO_POSITIVE_NEGATIVE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET__ = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET__AT_SLICE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET__DUP = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET__EQL_ = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET__EQUAL_EQL = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET__FETCH = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET__GLOB = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET__PUSH_APPEND = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET___ = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET___2 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET___3 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET___4 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET___5 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET___6 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET___7 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET___8 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET___9 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET___EQL_ETC = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET___EQL_INCLUDE = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET___METHOD_____CALLEE__ = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET____ = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET____2 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET____ETC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET____ETC_2 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET____ETC_3 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET____ETC_4 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_____2 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#55 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:56 RuboCop::AST::NodePattern::VAR = T.let(T.unsafe(nil), String) -# Common functionality for primitive numeric nodes: `int`, `float`, ... +# Common functionality for primitive numeric nodes: `int`, `float`, `rational`, `complex`... # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#6 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/numeric_node.rb:6 module RuboCop::AST::NumericNode # Checks whether this is literal has a sign. # # @example # # +42 + # # @return [Boolean] whether this literal has a sign. # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#17 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/numeric_node.rb:17 def sign?; end end -# source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#7 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/numeric_node.rb:7 RuboCop::AST::NumericNode::SIGN_REGEX = T.let(T.unsafe(nil), Regexp) # A node extension for `op_asgn` nodes. # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/op_asgn_node.rb:8 class RuboCop::AST::OpAsgnNode < ::RuboCop::AST::Node # @return [AsgnNode] the assignment node # - # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#10 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/op_asgn_node.rb:10 def assignment_node; end # The expression being assigned to the variable. # # @return [Node] the expression being assigned. # - # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#31 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/op_asgn_node.rb:32 def expression; end + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/op_asgn_node.rb:13 + def lhs; end + # The name of the variable being assigned as a symbol. # # @return [Symbol] the name of the variable being assigned # - # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#17 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/op_asgn_node.rb:18 def name; end # The operator being used for assignment as a symbol. # # @return [Symbol] the assignment operator # - # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#24 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/op_asgn_node.rb:25 def operator; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/op_asgn_node.rb:35 + def rhs; end end # A node extension for `op_asgn` nodes. # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/or_asgn_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/or_asgn_node.rb:8 class RuboCop::AST::OrAsgnNode < ::RuboCop::AST::OpAsgnNode # The operator being used for assignment as a symbol. # # @return [Symbol] the assignment operator # - # source://rubocop-ast//lib/rubocop/ast/node/or_asgn_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/or_asgn_node.rb:12 def operator; end end @@ -5545,7 +5596,7 @@ end # node when the builder constructs the AST, making its methods available # to all `or` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/or_node.rb:8 class RuboCop::AST::OrNode < ::RuboCop::AST::Node include ::RuboCop::AST::BinaryOperatorNode include ::RuboCop::AST::PredicateOperatorNode @@ -5555,7 +5606,7 @@ class RuboCop::AST::OrNode < ::RuboCop::AST::Node # # @return [String] the alternate of the `or` operator # - # source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#16 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/or_node.rb:16 def alternate_operator; end # Returns the inverse keyword of the `or` node as a string. @@ -5563,7 +5614,7 @@ class RuboCop::AST::OrNode < ::RuboCop::AST::Node # # @return [String] the inverse of the `or` operator # - # source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#24 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/or_node.rb:24 def inverse_operator; end end @@ -5571,7 +5622,7 @@ end # node when the builder constructs the AST, making its methods available # to all `pair` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:8 class RuboCop::AST::PairNode < ::RuboCop::AST::Node include ::RuboCop::AST::HashElementNode @@ -5579,58 +5630,58 @@ class RuboCop::AST::PairNode < ::RuboCop::AST::Node # # @return [Boolean] whether this `pair` uses a colon delimiter # - # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#30 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:30 def colon?; end # Returns the delimiter of the `pair` as a string. Returns `=>` for a # colon delimited `pair` and `:` for a hash rocket delimited `pair`. # - # @param with_spacing [Boolean] whether to include spacing + # @param [Boolean] with_spacing whether to include spacing # @return [String] the delimiter of the `pair` # - # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#39 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:39 def delimiter(*deprecated, with_spacing: T.unsafe(nil)); end # Checks whether the `pair` uses a hash rocket delimiter. # # @return [Boolean] whether this `pair` uses a hash rocket delimiter # - # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#23 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:23 def hash_rocket?; end # Returns the inverse delimiter of the `pair` as a string. # - # @param with_spacing [Boolean] whether to include spacing + # @param [Boolean] with_spacing whether to include spacing # @return [String] the inverse delimiter of the `pair` # - # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#51 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:51 def inverse_delimiter(*deprecated, with_spacing: T.unsafe(nil)); end # Checks whether the `pair` uses hash value omission. # # @return [Boolean] whether this `pair` uses hash value omission # - # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#69 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:69 def value_omission?; end # Checks whether the value starts on its own line. # # @return [Boolean] whether the value in the `pair` starts its own line # - # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#62 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:62 def value_on_new_line?; end end -# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#15 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:15 RuboCop::AST::PairNode::COLON = T.let(T.unsafe(nil), String) -# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#11 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:11 RuboCop::AST::PairNode::HASH_ROCKET = T.let(T.unsafe(nil), String) -# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#17 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:17 RuboCop::AST::PairNode::SPACED_COLON = T.let(T.unsafe(nil), String) -# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#13 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:13 RuboCop::AST::PairNode::SPACED_HASH_ROCKET = T.let(T.unsafe(nil), String) # Requires implementing `arguments`. @@ -5639,13 +5690,13 @@ RuboCop::AST::PairNode::SPACED_HASH_ROCKET = T.let(T.unsafe(nil), String) # `send`, `super`, `zsuper`, `def`, `defs` # and (modern only): `index`, `indexasgn`, `lambda` # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:10 module RuboCop::AST::ParameterizedNode # Checks whether this node has any arguments. # # @return [Boolean] whether this node has any arguments # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#40 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:40 def arguments?; end # Whether the last argument of the node is a block pass, @@ -5653,41 +5704,36 @@ module RuboCop::AST::ParameterizedNode # # @return [Boolean] whether the last argument of the node is a block pass # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#58 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:58 def block_argument?; end # A shorthand for getting the first argument of the node. # Equivalent to `arguments.first`. # # @return [Node, nil] the first argument of the node, - # or `nil` if there are no arguments + # or `nil` if there are no arguments # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#24 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:24 def first_argument; end # A shorthand for getting the last argument of the node. # Equivalent to `arguments.last`. # # @return [Node, nil] the last argument of the node, - # or `nil` if there are no arguments + # or `nil` if there are no arguments # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#33 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:33 def last_argument; end # Checks whether this node's arguments are wrapped in parentheses. # # @return [Boolean] whether this node's arguments are - # wrapped in parentheses + # wrapped in parentheses # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#15 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:15 def parenthesized?; end - # Checks whether any argument of the node is a splat - # argument, i.e. `*splat`. - # - # @return [Boolean] whether the node is a splat argument - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#48 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:52 def rest_argument?; end # Checks whether any argument of the node is a splat @@ -5695,7 +5741,7 @@ module RuboCop::AST::ParameterizedNode # # @return [Boolean] whether the node is a splat argument # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#48 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:48 def splat_argument?; end end @@ -5704,108 +5750,129 @@ end # Implements `arguments` as `children[first_argument_index..-1]` # and optimizes other calls # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#83 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:84 module RuboCop::AST::ParameterizedNode::RestArguments include ::RuboCop::AST::ParameterizedNode # @return [Array] arguments, if any # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#89 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:90 def arguments; end # Checks whether this node has any arguments. # # @return [Boolean] whether this node has any arguments # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#119 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:120 def arguments?; end # A shorthand for getting the first argument of the node. # Equivalent to `arguments.first`. # # @return [Node, nil] the first argument of the node, - # or `nil` if there are no arguments + # or `nil` if there are no arguments # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#103 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:104 def first_argument; end # A shorthand for getting the last argument of the node. # Equivalent to `arguments.last`. # # @return [Node, nil] the last argument of the node, - # or `nil` if there are no arguments + # or `nil` if there are no arguments # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#112 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:113 def last_argument; end end -# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#86 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:87 RuboCop::AST::ParameterizedNode::RestArguments::EMPTY_ARGUMENTS = T.let(T.unsafe(nil), Array) # A specialized `ParameterizedNode` for node that have a single child # containing either `nil`, an argument, or a `begin` node with all the # arguments # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#66 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:66 module RuboCop::AST::ParameterizedNode::WrappedArguments include ::RuboCop::AST::ParameterizedNode # @return [Array] The arguments of the node. # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#69 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:70 def arguments; end end # Common functionality for nodes that are predicates: # `or`, `and` ... # -# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#7 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:7 module RuboCop::AST::PredicateOperatorNode # Checks whether this is a logical operator. # # @return [Boolean] whether this is a logical operator # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#27 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:32 def logical_operator?; end # Returns the operator as a string. # # @return [String] the operator # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#20 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:25 def operator; end # Checks whether this is a semantic operator. # # @return [Boolean] whether this is a semantic operator # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#34 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:39 def semantic_operator?; end end -# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:8 RuboCop::AST::PredicateOperatorNode::LOGICAL_AND = T.let(T.unsafe(nil), String) -# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#12 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:17 +RuboCop::AST::PredicateOperatorNode::LOGICAL_OPERATORS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:12 RuboCop::AST::PredicateOperatorNode::LOGICAL_OR = T.let(T.unsafe(nil), String) -# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#10 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:10 RuboCop::AST::PredicateOperatorNode::SEMANTIC_AND = T.let(T.unsafe(nil), String) -# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#14 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:19 +RuboCop::AST::PredicateOperatorNode::SEMANTIC_OPERATORS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:14 RuboCop::AST::PredicateOperatorNode::SEMANTIC_OR = T.let(T.unsafe(nil), String) +# A `Prism` interface's class that provides a fixed `Prism::ParseLexResult` instead of parsing. +# +# This class implements the `parse_lex` method to return a preparsed `Prism::ParseLexResult` +# rather than parsing the source code. When the parse result is already available externally, +# such as in Ruby LSP, the Prism parsing process can be bypassed. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:12 +class RuboCop::AST::PrismPreparsed + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:13 + def initialize(prism_result); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:23 + def parse_lex(_source, **_prism_options); end +end + # A node extension for `procarg0` nodes. # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all `arg` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/procarg0_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/procarg0_node.rb:8 class RuboCop::AST::Procarg0Node < ::RuboCop::AST::ArgNode # Returns the name of an argument. # # @return [Symbol, nil] the name of the argument # - # source://rubocop-ast//lib/rubocop/ast/node/procarg0_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/procarg0_node.rb:12 def name; end end @@ -5813,365 +5880,353 @@ end # and other information such as disabled lines for cops. # It also provides a convenient way to access source lines. # -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#11 +# pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:31 class RuboCop::AST::ProcessedSource - # @return [ProcessedSource] a new instance of ProcessedSource - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#29 - def initialize(source, ruby_version, path = T.unsafe(nil), parser_engine: T.unsafe(nil)); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:49 + def initialize(source, ruby_version, path = T.unsafe(nil), parser_engine: T.unsafe(nil), prism_result: T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#73 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:91 def [](*args); end - # Returns the value of attribute ast. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:41 def ast; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#51 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:69 def ast_with_comments; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#112 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:130 def blank?; end - # Returns the value of attribute buffer. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:41 def buffer; end # Raw source checksum for tracking infinite loops. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#84 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:102 def checksum; end # @return [Comment, nil] the comment at that line, if any. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#117 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:135 def comment_at_line(line); end - # Consider using `each_comment_in_lines` instead - # # @deprecated use contains_comment? - # @return [Boolean] if any of the lines in the given `source_range` has a comment. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:161 def commented?(source_range); end - # Returns the value of attribute comments. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:41 def comments; end - # Should have been called `comments_before_or_at_line`. Doubtful it has of any valid use. - # # @deprecated Use `each_comment_in_lines` + # Should have been called `comments_before_or_at_line`. Doubtful it has of any valid use. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#147 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:165 def comments_before_line(line); end - # Consider using `each_comment_in_lines` instead - # # @return [Boolean] if any of the lines in the given `source_range` has a comment. + # Consider using `each_comment_in_lines` instead # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:157 def contains_comment?(source_range); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#161 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:179 def current_line(token); end - # Returns the value of attribute diagnostics. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:41 def diagnostics; end # @deprecated Use `comments.each` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#89 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:107 def each_comment(&block); end # Enumerates on the comments contained with the given `line_range` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:145 def each_comment_in_lines(line_range); end # @deprecated Use `tokens.each` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#99 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:117 def each_token(&block); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#108 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:126 def file_path; end # @deprecated Use `comment_at_line`, `each_comment_in_lines`, or `comments.find` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#94 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:112 def find_comment(&block); end # @deprecated Use `tokens.find` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#104 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:122 def find_token(&block); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#182 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:200 def first_token_of(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#165 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:183 def following_line(token); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#186 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:204 def last_token_of(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#169 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:187 def line_indentation(line_number); end # @return [Boolean] if the given line number has a comment. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#122 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:140 def line_with_comment?(line); end # Returns the source lines, line break characters removed, excluding a # possible __END__ and everything that comes after. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#59 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:77 def lines; end - # Returns the value of attribute parser_engine. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:41 def parser_engine; end - # Returns the value of attribute parser_error. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:41 def parser_error; end - # Returns the value of attribute path. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:41 def path; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#157 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:175 def preceding_line(token); end - # Returns the value of attribute raw_source. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:41 def raw_source; end - # Returns the value of attribute ruby_version. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:41 def ruby_version; end # The tokens list is always sorted by token position, except for cases when heredoc # is passed as a method argument. In this case tokens are interleaved by # heredoc contents' tokens. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#193 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:211 def sorted_tokens; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#151 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:169 def start_with?(string); end - # Returns the value of attribute tokens. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:41 def tokens; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#176 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:194 def tokens_within(range_or_node); end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#77 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:95 def valid_syntax?; end private - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#200 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:328 + def builder_class(parser_engine); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:218 def comment_index; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#312 - def create_parser(ruby_version, parser_engine); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:338 + def create_parser(ruby_version, parser_engine, prism_result); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#328 + # The Parser gem does not support Ruby 3.5 or later. + # It is also not fully compatible with Ruby 3.4 but for + # now respects using parser for backwards compatibility. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:384 + def default_parser_engine(ruby_version); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:392 def first_token_index(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#333 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:397 def last_token_index(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#206 - def parse(source, ruby_version, parser_engine); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:367 + def normalize_parser_engine(parser_engine, ruby_version); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#240 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:224 + def parse(source, ruby_version, parser_engine, prism_result); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:260 def parser_class(ruby_version, parser_engine); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#338 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:402 def source_range(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#223 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:243 def tokenize(parser); end class << self - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#24 + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:44 def from_file(path, ruby_version, parser_engine: T.unsafe(nil)); end end end -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#15 +# pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:35 RuboCop::AST::ProcessedSource::INVALID_LEVELS = T.let(T.unsafe(nil), Array) -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 +# pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:38 RuboCop::AST::ProcessedSource::PARSER_ENGINES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#13 +# pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:33 RuboCop::AST::ProcessedSource::STRING_SOURCE_NAME = T.let(T.unsafe(nil), String) # A node extension for `irange` and `erange` nodes. This will be used in # place of a plain node when the builder constructs the AST, making its # methods available to all `irange` and `erange` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/range_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/range_node.rb:8 class RuboCop::AST::RangeNode < ::RuboCop::AST::Node - # source://rubocop-ast//lib/rubocop/ast/node/range_node.rb#9 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/range_node.rb:9 def begin; end - # source://rubocop-ast//lib/rubocop/ast/node/range_node.rb#13 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/range_node.rb:13 def end; end end +# A node extension for `rational` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `rational` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/rational_node.rb:8 +class RuboCop::AST::RationalNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + # A node extension for `regexp` nodes. This will be used in place of a plain # node when the builder constructs the AST, making its methods available # to all `regexp` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:8 class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node # @return [String] a string of regexp content # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#37 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:37 def content; end # @return [Bool] if char is one of the delimiters # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#57 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:57 def delimiter?(char); end # @return [String] the regexp delimiters (without %r) # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#52 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:52 def delimiters; end # @return [Bool] if regexp uses the extended regopt # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#72 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:72 def extended?; end # @return [Bool] if regexp uses the fixed-encoding regopt # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#92 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:92 def fixed_encoding?; end # @return [Bool] if regexp uses the ignore-case regopt # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#77 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:77 def ignore_case?; end # @return [Bool] if regexp contains interpolation # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#62 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:62 def interpolation?; end # @return [Bool] if regexp uses the multiline regopt # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#67 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:67 def multiline_mode?; end # @return [Bool] if regexp uses the no-encoding regopt # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#87 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:87 def no_encoding?; end # NOTE: The 'o' option is ignored. # # @return [Integer] the Regexp option bits as returned by Regexp#options # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#32 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:32 def options; end # @return [Bool] if the regexp is a %r{...} literal (using any delimiters) # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#47 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:47 def percent_r_literal?; end # @return [RuboCop::AST::Node] a regopt node # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#25 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:25 def regopt; end # @return [Bool] if regexp uses the single-interpolation regopt # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#82 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:82 def single_interpolation?; end # @return [Bool] if the regexp is a /.../ literal # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#42 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:42 def slash_literal?; end # @return [Regexp] a regexp of this node # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#20 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:20 def to_regexp; end private - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#98 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:98 def regopt_include?(option); end end -# source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#9 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:9 RuboCop::AST::RegexpNode::OPTIONS = T.let(T.unsafe(nil), Hash) # A node extension for `resbody` nodes. This will be used in place of a # plain node when the builder constructs the AST, making its methods # available to all `resbody` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/resbody_node.rb:8 class RuboCop::AST::ResbodyNode < ::RuboCop::AST::Node # Returns the body of the `rescue` clause. # # @return [Node, nil] The body of the `resbody`. # - # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/resbody_node.rb:12 def body; end # Returns the index of the `resbody` branch within the exception handling statement. # # @return [Integer] the index of the `resbody` branch # - # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#40 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/resbody_node.rb:40 def branch_index; end # Returns the exception variable of the `rescue` clause. # # @return [Node, nil] The exception variable of the `resbody`. # - # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#33 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/resbody_node.rb:33 def exception_variable; end # Returns an array of all the exceptions in the `rescue` clause. # # @return [Array] an array of exception nodes # - # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#19 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/resbody_node.rb:19 def exceptions; end end @@ -6179,29 +6234,28 @@ end # plain node when the builder constructs the AST, making its methods # available to all `rescue` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/rescue_node.rb:8 class RuboCop::AST::RescueNode < ::RuboCop::AST::Node # Returns the body of the rescue node. # # @return [Node, nil] The body of the rescue node. # - # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/rescue_node.rb:12 def body; end # Returns an array of all the rescue branches in the exception handling statement. # - # and the else (if any). Note that these bodies could be nil. - # # @return [Array] an array of the bodies of the rescue branches + # and the else (if any). Note that these bodies could be nil. # - # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#27 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/rescue_node.rb:27 def branches; end # Checks whether this exception handling statement has an `else` branch. # # @return [Boolean] whether the exception handling statement has an `else` branch # - # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#44 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/rescue_node.rb:44 def else?; end # Returns the else branch of the exception handling statement, if any. @@ -6209,14 +6263,14 @@ class RuboCop::AST::RescueNode < ::RuboCop::AST::Node # @return [Node] the else branch node of the exception handling statement # @return [nil] if the exception handling statement does not have an else branch. # - # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#37 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/rescue_node.rb:37 def else_branch; end # Returns an array of all the rescue branches in the exception handling statement. # # @return [Array] an array of `resbody` nodes # - # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#19 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/rescue_node.rb:19 def resbody_branches; end end @@ -6224,47 +6278,42 @@ end # plain node when the builder constructs the AST, making its methods # available to all `return` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/return_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/return_node.rb:8 class RuboCop::AST::ReturnNode < ::RuboCop::AST::Node include ::RuboCop::AST::ParameterizedNode include ::RuboCop::AST::ParameterizedNode::WrappedArguments end # Responsible for compatibility with main gem -# # @api private # -# source://rubocop-ast//lib/rubocop/ast/rubocop_compatibility.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/rubocop_compatibility.rb:8 module RuboCop::AST::RuboCopCompatibility - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/rubocop_compatibility.rb#13 + # pkg:gem/rubocop-ast#lib/rubocop/ast/rubocop_compatibility.rb:13 def rubocop_loaded; end end -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/rubocop_compatibility.rb#9 +# pkg:gem/rubocop-ast#lib/rubocop/ast/rubocop_compatibility.rb:9 RuboCop::AST::RuboCopCompatibility::INCOMPATIBLE_COPS = T.let(T.unsafe(nil), Hash) # A node extension for `sclass` nodes. This will be used in place of a # plain node when the builder constructs the AST, making its methods # available to all `sclass` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/self_class_node.rb:8 class RuboCop::AST::SelfClassNode < ::RuboCop::AST::Node # The body of this `sclass` node. # # @return [Node, nil] the body of the class # - # source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#19 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/self_class_node.rb:19 def body; end # The identifier for this `sclass` node. (Always `self`.) # # @return [Node] the identifier of the class # - # source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/self_class_node.rb:12 def identifier; end end @@ -6272,24 +6321,22 @@ end # node when the builder constructs the AST, making its methods available # to all `send` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/send_node.rb:8 class RuboCop::AST::SendNode < ::RuboCop::AST::Node include ::RuboCop::AST::ParameterizedNode include ::RuboCop::AST::ParameterizedNode::RestArguments include ::RuboCop::AST::MethodIdentifierPredicates include ::RuboCop::AST::MethodDispatchNode - # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#13 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/send_node.rb:13 def attribute_accessor?(param0 = T.unsafe(nil)); end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#18 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/send_node.rb:18 def send_type?; end private - # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#24 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/send_node.rb:24 def first_argument_index; end end @@ -6298,11 +6345,11 @@ end # # @see https://www.rubydoc.info/gems/ast/AST/Sexp # -# source://rubocop-ast//lib/rubocop/ast/sexp.rb#9 +# pkg:gem/rubocop-ast#lib/rubocop/ast/sexp.rb:9 module RuboCop::AST::Sexp # Creates a {Node} with type `type` and children `children`. # - # source://rubocop-ast//lib/rubocop/ast/sexp.rb#11 + # pkg:gem/rubocop-ast#lib/rubocop/ast/sexp.rb:11 def s(type, *children); end end @@ -6310,32 +6357,52 @@ end # in place of a plain node when the builder constructs the AST, making # its methods available to all `str` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/str_node.rb:8 class RuboCop::AST::StrNode < ::RuboCop::AST::Node include ::RuboCop::AST::BasicLiteralNode - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#11 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/str_node.rb:26 def character_literal?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#15 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/str_node.rb:22 + def double_quoted?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/str_node.rb:30 def heredoc?; end + + # Checks whether the string literal is delimited by percent brackets. + # + # @overload percent_literal? + # Check for any string percent literal. + # + # @overload percent_literal?(type) + # Check for a string percent literal of type `type`. + # + # @param type [Symbol] an optional percent literal type + # + # @return [Boolean] whether the string is enclosed in percent brackets + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/str_node.rb:45 + def percent_literal?(type = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/str_node.rb:18 + def single_quoted?; end end +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/str_node.rb:11 +RuboCop::AST::StrNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) + # A node extension for `super`- and `zsuper` nodes. This will be used in # place of a plain node when the builder constructs the AST, making its # methods available to all `super`- and `zsuper` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/super_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/super_node.rb:8 class RuboCop::AST::SuperNode < ::RuboCop::AST::Node include ::RuboCop::AST::ParameterizedNode include ::RuboCop::AST::MethodIdentifierPredicates include ::RuboCop::AST::MethodDispatchNode - # source://ast/2.4.2/lib/ast/node.rb#56 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/super_node.rb:20 def arguments; end # Custom destructuring method. This can be used to normalize @@ -6343,7 +6410,7 @@ class RuboCop::AST::SuperNode < ::RuboCop::AST::Node # # @return [Array] the different parts of the `super` node # - # source://rubocop-ast//lib/rubocop/ast/node/super_node.rb#16 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/super_node.rb:16 def node_parts; end end @@ -6351,163 +6418,118 @@ end # plain node when the builder constructs the AST, making its methods # available to all `sym` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/symbol_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/symbol_node.rb:8 class RuboCop::AST::SymbolNode < ::RuboCop::AST::Node include ::RuboCop::AST::BasicLiteralNode end # A basic wrapper around Parser's tokens. # -# source://rubocop-ast//lib/rubocop/ast/token.rb#6 +# pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:6 class RuboCop::AST::Token - # @return [Token] a new instance of Token - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#17 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:18 def initialize(pos, type, text); end - # source://rubocop-ast//lib/rubocop/ast/token.rb#32 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:33 def begin_pos; end - # source://rubocop-ast//lib/rubocop/ast/token.rb#28 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:29 def column; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#101 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:102 def comma?; end # Type Predicates # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#57 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:58 def comment?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#105 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:106 def dot?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#117 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:118 def end?; end - # source://rubocop-ast//lib/rubocop/ast/token.rb#36 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:37 def end_pos; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#121 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:122 def equal_sign?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#65 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:66 def left_array_bracket?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#81 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:82 def left_brace?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#73 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:74 def left_bracket?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#85 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:86 def left_curly_brace?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#93 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:94 def left_parens?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#69 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:70 def left_ref_bracket?; end - # source://rubocop-ast//lib/rubocop/ast/token.rb#24 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:25 def line; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#125 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:126 def new_line?; end - # Returns the value of attribute pos. - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#9 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:10 def pos; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#109 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:110 def regexp_dots?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#113 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:114 def rescue_modifier?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#77 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:78 def right_bracket?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#89 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:90 def right_curly_brace?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#97 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:98 def right_parens?; end - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#61 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:62 def semicolon?; end # Checks if there is whitespace after token # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#45 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:46 def space_after?; end # Checks if there is whitespace before token # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#50 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:51 def space_before?; end - # Returns the value of attribute text. - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#9 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:10 def text; end - # source://rubocop-ast//lib/rubocop/ast/token.rb#40 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:41 def to_s; end - # Returns the value of attribute type. - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#9 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:10 def type; end class << self - # source://rubocop-ast//lib/rubocop/ast/token.rb#11 + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:12 def from_parser_token(parser_token); end end end -# source://rubocop-ast//lib/rubocop/ast/token.rb#7 +# pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:8 +RuboCop::AST::Token::LEFT_CURLY_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:7 RuboCop::AST::Token::LEFT_PAREN_TYPES = T.let(T.unsafe(nil), Array) # Provides methods for traversing an AST. @@ -6515,452 +6537,451 @@ RuboCop::AST::Token::LEFT_PAREN_TYPES = T.let(T.unsafe(nil), Array) # Override methods to perform custom processing. Remember to call `super` # if you want to recursively process descendant nodes. # -# source://rubocop-ast//lib/rubocop/ast/traversal.rb#9 +# pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:9 module RuboCop::AST::Traversal extend ::RuboCop::AST::Traversal::CallbackCompiler - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#173 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on___ENCODING__(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on___FILE__(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on___LINE__(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_alias(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_and(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_and_asgn(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_arg(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_arg_expr(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_args(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_array(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_array_pattern(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_array_pattern_with_tail(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_back_ref(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_begin(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#151 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_block(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#129 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_block_pass(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_blockarg(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_blocknilarg(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_break(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_case(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_case_match(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#146 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_casgn(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_cbase(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#147 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_class(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_complex(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_const(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_const_pattern(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#155 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_csend(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_cvar(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#131 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_cvasgn(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_def(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_defined?(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#153 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_defs(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_dstr(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_dsym(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_eflipflop(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_empty_else(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_ensure(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_erange(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_false(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_find_pattern(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_float(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_for(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_forward_arg(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_forward_args(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_forwarded_args(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_forwarded_kwrestarg(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_forwarded_restarg(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_gvar(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#131 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_gvasgn(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_hash(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_hash_pattern(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#150 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_if(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_if_guard(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_iflipflop(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_in_match(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_in_pattern(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_index(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_indexasgn(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_int(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_irange(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_itblock(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_ivar(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#131 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_ivasgn(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_kwarg(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_kwargs(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_kwbegin(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_kwnilarg(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_kwoptarg(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#124 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_kwrestarg(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#125 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_kwsplat(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_lambda(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_lvar(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#131 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_lvasgn(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_masgn(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_match_alt(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_match_as(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_match_current_line(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_match_nil_pattern(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_match_pattern(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_match_pattern_p(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#125 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_match_rest(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_match_var(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_match_with_lvasgn(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_match_with_trailing_comma(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_mlhs(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#133 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_module(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_mrasgn(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_next(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_nil(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_not(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_nth_ref(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#152 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_numblock(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#149 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_op_asgn(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_optarg(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_or(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_or_asgn(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_pair(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_pin(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#129 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_postexe(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#129 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_preexe(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_procarg0(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_rasgn(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_rational(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_redo(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_regexp(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#135 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_regopt(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_resbody(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_rescue(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#124 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_restarg(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_retry(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_return(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#133 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_sclass(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_self(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#155 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_send(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_shadowarg(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#125 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_splat(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_str(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_super(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_sym(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_true(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_undef(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_unless_guard(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#133 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_until(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_until_post(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_when(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#133 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 def on_while(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_while_post(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_xstr(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_yield(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_zsuper(node); end - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#17 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:17 def walk(node); end end # @api private # -# source://rubocop-ast//lib/rubocop/ast/traversal.rb#25 +# pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:25 module RuboCop::AST::Traversal::CallbackCompiler - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#61 - def arity_check(range); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:54 + def body(child_node_types, expected_children_count); end - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#52 - def body(signature, prelude); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:68 + def children_count_check_code(range); end - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#35 - def def_callback(type, *signature, arity: T.unsafe(nil), arity_check: T.unsafe(nil), body: T.unsafe(nil)); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:38 + def def_callback(type, *child_node_types, expected_children_count: T.unsafe(nil), body: T.unsafe(nil)); end end -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/traversal.rb#26 +# pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:26 RuboCop::AST::Traversal::CallbackCompiler::SEND = T.let(T.unsafe(nil), String) -# @api private +# How a particular child node should be visited. For example, if a child node +# can be nil it should be guarded behind a nil check. Or, if a child node is a literal +# (like a symbol) then the literal itself should not be visited. # -# source://rubocop-ast//lib/rubocop/ast/traversal.rb#29 +# pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:32 RuboCop::AST::Traversal::CallbackCompiler::TEMPLATE = T.let(T.unsafe(nil), Hash) # Only for debugging. -# # @api private # -# source://rubocop-ast//lib/rubocop/ast/traversal.rb#12 +# pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:12 class RuboCop::AST::Traversal::DebugError < ::RuntimeError; end -# source://rubocop-ast//lib/rubocop/ast/traversal.rb#100 +# pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:110 RuboCop::AST::Traversal::NO_CHILD_NODES = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/traversal.rb#15 +# pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:15 RuboCop::AST::Traversal::TYPE_TO_METHOD = T.let(T.unsafe(nil), Hash) # A node extension for `until` nodes. This will be used in place of a plain # node when the builder constructs the AST, making its methods available # to all `until` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/until_node.rb:8 class RuboCop::AST::UntilNode < ::RuboCop::AST::Node include ::RuboCop::AST::ConditionalNode include ::RuboCop::AST::ModifierNode @@ -6969,7 +6990,7 @@ class RuboCop::AST::UntilNode < ::RuboCop::AST::Node # # @return [Boolean] whether the `until` node has a `do` keyword # - # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#30 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/until_node.rb:30 def do?; end # Returns the inverse keyword of the `until` node as a string. @@ -6977,60 +6998,72 @@ class RuboCop::AST::UntilNode < ::RuboCop::AST::Node # # @return [String] the inverse keyword of the `until` statement # - # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#23 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/until_node.rb:23 def inverse_keyword; end # Returns the keyword of the `until` statement as a string. # # @return [String] the keyword of the `until` statement # - # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#15 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/until_node.rb:15 def keyword; end end -# source://rubocop-ast//lib/rubocop/ast/version.rb#5 +# A node extension for `lvar`, `ivar`, `cvar` and `gvar` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/var_node.rb:8 +class RuboCop::AST::VarNode < ::RuboCop::AST::Node + # @return [Symbol] The name of the variable. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/var_node.rb:10 + def name; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/version.rb:5 module RuboCop::AST::Version; end -# source://rubocop-ast//lib/rubocop/ast/version.rb#6 +# pkg:gem/rubocop-ast#lib/rubocop/ast/version.rb:6 RuboCop::AST::Version::STRING = T.let(T.unsafe(nil), String) # A node extension for `when` nodes. This will be used in place of a plain # node when the builder constructs the AST, making its methods available # to all `when` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/when_node.rb:8 class RuboCop::AST::WhenNode < ::RuboCop::AST::Node # Returns the body of the `when` node. # # @return [Node, nil] the body of the `when` node # - # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#42 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/when_node.rb:42 def body; end # Returns the index of the `when` branch within the `case` statement. # # @return [Integer] the index of the `when` branch # - # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#28 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/when_node.rb:28 def branch_index; end # Returns an array of all the conditions in the `when` branch. # # @return [Array] an array of condition nodes # - # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#12 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/when_node.rb:12 def conditions; end # @deprecated Use `conditions.each` # - # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#17 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/when_node.rb:17 def each_condition(&block); end # Checks whether the `when` node has a `then` keyword. # # @return [Boolean] whether the `when` node has a `then` keyword # - # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#35 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/when_node.rb:35 def then?; end end @@ -7038,7 +7071,7 @@ end # node when the builder constructs the AST, making its methods available # to all `while` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/while_node.rb:8 class RuboCop::AST::WhileNode < ::RuboCop::AST::Node include ::RuboCop::AST::ConditionalNode include ::RuboCop::AST::ModifierNode @@ -7047,7 +7080,7 @@ class RuboCop::AST::WhileNode < ::RuboCop::AST::Node # # @return [Boolean] whether the `until` node has a `do` keyword # - # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#30 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/while_node.rb:30 def do?; end # Returns the inverse keyword of the `while` node as a string. @@ -7055,14 +7088,14 @@ class RuboCop::AST::WhileNode < ::RuboCop::AST::Node # # @return [String] the inverse keyword of the `while` statement # - # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#23 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/while_node.rb:23 def inverse_keyword; end # Returns the keyword of the `while` statement as a string. # # @return [String] the keyword of the `while` statement # - # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#15 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/while_node.rb:15 def keyword; end end @@ -7070,13 +7103,13 @@ end # node when the builder constructs the AST, making its methods available # to all `yield` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#8 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/yield_node.rb:8 class RuboCop::AST::YieldNode < ::RuboCop::AST::Node include ::RuboCop::AST::ParameterizedNode include ::RuboCop::AST::MethodIdentifierPredicates include ::RuboCop::AST::MethodDispatchNode - # source://ast/2.4.2/lib/ast/node.rb#56 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/yield_node.rb:20 def arguments; end # Custom destructuring method. This can be used to normalize @@ -7084,6 +7117,18 @@ class RuboCop::AST::YieldNode < ::RuboCop::AST::Node # # @return [Array] the different parts of the `send` node # - # source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#16 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/yield_node.rb:16 def node_parts; end end + +class RuboCop::CommentConfig; end +class RuboCop::Config; end +class RuboCop::ConfigValidator; end + +# Similar to `Forwardable#def_delegators`, but simpler & faster +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/utilities/simple_forwardable.rb:5 +module RuboCop::SimpleForwardable + # pkg:gem/rubocop-ast#lib/rubocop/ast/utilities/simple_forwardable.rb:6 + def def_delegators(accessor, *methods); end +end diff --git a/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi b/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi index f13839332..247d72558 100644 --- a/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +++ b/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi @@ -4,17 +4,22 @@ # This is an autogenerated file for types exported from the `rubocop-performance` gem. # Please instead update this file by running `bin/tapioca gem rubocop-performance`. -# source://rubocop-performance//lib/rubocop/performance.rb#3 + +# pkg:gem/rubocop-performance#lib/rubocop/performance.rb:3 module RuboCop; end -# source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#4 +# pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/regexp_metacharacter.rb:4 module RuboCop::Cop; end -# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#5 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/ancestors_include.rb:5 module RuboCop::Cop::Performance; end # Identifies usages of `ancestors.include?` and change them to use `<=` instead. # +# @safety +# This cop is unsafe because it can't tell whether the receiver is a class or an object. +# e.g. the false positive was for `Nokogiri::XML::Node#ancestors`. +# # @example # # bad # A.ancestors.include?(B) @@ -22,27 +27,27 @@ module RuboCop::Cop::Performance; end # # good # A <= B # -# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#19 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/ancestors_include.rb:19 class RuboCop::Cop::Performance::AncestorsInclude < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#26 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/ancestors_include.rb:26 def ancestors_include_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#30 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/ancestors_include.rb:30 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#43 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/ancestors_include.rb:43 def range(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#23 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/ancestors_include.rb:23 RuboCop::Cop::Performance::AncestorsInclude::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#24 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/ancestors_include.rb:24 RuboCop::Cop::Performance::AncestorsInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where slicing arrays with semi-infinite ranges @@ -50,6 +55,9 @@ RuboCop::Cop::Performance::AncestorsInclude::RESTRICT_ON_SEND = T.let(T.unsafe(n # This cop was created due to a mistake in microbenchmark and hence is disabled by default. # Refer https://github.com/rubocop/rubocop-performance/pull/175#issuecomment-731892717 # +# @safety +# This cop is unsafe for string slices because strings do not have `#take` and `#drop` methods. +# # @example # # bad # array[..2] @@ -65,34 +73,34 @@ RuboCop::Cop::Performance::AncestorsInclude::RESTRICT_ON_SEND = T.let(T.unsafe(n # array.drop(2) # array.take(3) # -# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#29 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb:29 class RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#45 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb:45 def endless_range?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#41 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb:41 def endless_range_slice?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#52 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb:52 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#65 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb:65 def correction(receiver, range_node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#36 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb:36 RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#39 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb:39 RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) -# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#38 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb:38 RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::SLICE_METHODS = T.let(T.unsafe(nil), Set) # Identifies places where numeric argument to BigDecimal should be @@ -112,24 +120,24 @@ RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::SLICE_METHODS = T.let(T. # BigDecimal('1.2', 3, exception: true) # BigDecimal('4.5', 6, exception: true) # -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#23 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb:23 class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#29 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb:29 def big_decimal_with_numeric_argument?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#37 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb:37 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#33 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb:33 def to_d?(param0 = T.unsafe(nil)); end end -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#26 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb:26 RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#27 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb:27 RuboCop::Cop::Performance::BigDecimalWithNumericArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # In Ruby 2.7, `UnboundMethod#bind_call` has been added. @@ -148,34 +156,34 @@ RuboCop::Cop::Performance::BigDecimalWithNumericArgument::RESTRICT_ON_SEND = T.l # # good # umethod.bind_call(obj, foo, bar) # -# source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#22 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/bind_call.rb:22 class RuboCop::Cop::Performance::BindCall < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#33 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/bind_call.rb:33 def bind_with_call_method?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#41 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/bind_call.rb:41 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#72 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/bind_call.rb:72 def build_call_args(call_args_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#65 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/bind_call.rb:65 def correction_range(receiver, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#59 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/bind_call.rb:59 def message(bind_arg, call_args); end end -# source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#29 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/bind_call.rb:29 RuboCop::Cop::Performance::BindCall::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#31 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/bind_call.rb:31 RuboCop::Cop::Performance::BindCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies unnecessary use of a `block_given?` where explicit check @@ -184,36 +192,36 @@ RuboCop::Cop::Performance::BindCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # @example # # bad # def method(&block) -# do_something if block_given? +# do_something if block_given? # end # # # good # def method(&block) -# do_something if block +# do_something if block # end # # # good - block is reassigned # def method(&block) -# block ||= -> { do_something } -# warn "Using default ..." unless block_given? -# # ... +# block ||= -> { do_something } +# warn "Using default ..." unless block_given? +# # ... # end # -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#27 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/block_given_with_explicit_block.rb:27 class RuboCop::Cop::Performance::BlockGivenWithExplicitBlock < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#35 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/block_given_with_explicit_block.rb:35 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#33 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/block_given_with_explicit_block.rb:33 def reassigns_block_arg?(param0 = T.unsafe(nil), param1); end end -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#31 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/block_given_with_explicit_block.rb:31 RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#30 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/block_given_with_explicit_block.rb:30 RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where `caller[n]` can be replaced by `caller(n..n).first`. @@ -231,29 +239,29 @@ RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::RESTRICT_ON_SEND = T.let # caller_locations(2..2).first # caller_locations(1..1).first # -# source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#20 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/caller.rb:20 class RuboCop::Cop::Performance::Caller < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#33 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/caller.rb:33 def caller_with_scope_method?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#40 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/caller.rb:40 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#26 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/caller.rb:26 def slow_caller?(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#61 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/caller.rb:61 def int_value(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#23 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/caller.rb:23 RuboCop::Cop::Performance::Caller::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#24 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/caller.rb:24 RuboCop::Cop::Performance::Caller::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Reordering `when` conditions with a splat to the end @@ -270,101 +278,109 @@ RuboCop::Cop::Performance::Caller::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # this defining a higher level when condition to override a condition # that is inside of the splat expansion. # +# @safety +# This cop is not unsafe autocorrection because it is not a guaranteed +# performance improvement. If the data being processed by the `case` condition is +# normalized in a manner that favors hitting a condition in the splat expansion, +# it is possible that moving the splat condition to the end will use more memory, +# and run slightly slower. +# See for more details: https://github.com/rubocop/rubocop/pull/6163 +# # @example # # bad # case foo # when *condition -# bar +# bar # when baz -# foobar +# foobar # end # # case foo # when *[1, 2, 3, 4] -# bar +# bar # when 5 -# baz +# baz # end # # # good # case foo # when baz -# foobar +# foobar # when *condition -# bar +# bar # end # # case foo # when 1, 2, 3, 4 -# bar +# bar # when 5 -# baz +# baz # end # -# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#58 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:58 class RuboCop::Cop::Performance::CaseWhenSplat < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#66 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:66 def on_case(case_node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#83 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:83 def autocorrect(corrector, when_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#144 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:144 def indent_for(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#100 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:100 def inline_fix_branch(corrector, when_node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#169 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:169 def needs_reorder?(when_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#140 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:140 def new_branch_without_then(node, new_condition); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#136 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:136 def new_condition_with_then(node, new_condition); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#162 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:162 def non_splat?(condition); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#91 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:91 def range(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#108 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:108 def reorder_condition(corrector, when_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#118 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:118 def reordering_correction(when_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#95 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:95 def replacement(conditions); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#148 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:148 def splat_offenses(when_conditions); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#128 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:128 def when_branch_range(when_node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#64 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:64 RuboCop::Cop::Performance::CaseWhenSplat::ARRAY_MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#63 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:63 RuboCop::Cop::Performance::CaseWhenSplat::MSG = T.let(T.unsafe(nil), String) # Identifies places where a case-insensitive string comparison # can better be implemented using `casecmp`. # +# @safety +# This cop is unsafe because `String#casecmp` and `String#casecmp?` behave +# differently when using Non-ASCII characters. +# # @example # # bad # str.downcase == 'abc' @@ -377,41 +393,41 @@ RuboCop::Cop::Performance::CaseWhenSplat::MSG = T.let(T.unsafe(nil), String) # str.casecmp('ABC').zero? # 'abc'.casecmp(str).zero? # -# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#24 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:24 class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#45 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:45 def downcase_downcase(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#31 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:31 def downcase_eq(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#38 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:38 def eq_downcase(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#52 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:52 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#84 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:84 def autocorrect(corrector, node, replacement); end - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#88 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:88 def build_good_method(method, arg, variable); end - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#67 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:67 def take_method_apart(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#29 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:29 RuboCop::Cop::Performance::Casecmp::CASE_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#27 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:27 RuboCop::Cop::Performance::Casecmp::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#28 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:28 RuboCop::Cop::Performance::Casecmp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies usages of `array.compact.flatten.map { |x| x.downcase }`. @@ -430,38 +446,38 @@ RuboCop::Cop::Performance::Casecmp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # array.map! { |x| x.downcase } # array # -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#21 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:21 class RuboCop::Cop::Performance::ChainArrayAllocation < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp - # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#54 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:54 def chain_array_allocation?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#62 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:62 def on_send(node); end end # These methods ALWAYS return a new array # after they're called it's safe to mutate the the resulting array # -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#37 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:37 RuboCop::Cop::Performance::ChainArrayAllocation::ALWAYS_RETURNS_NEW_ARRAY = T.let(T.unsafe(nil), Set) # These methods have a mutation alternative. For example :collect # can be called as :collect! # -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#45 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:45 RuboCop::Cop::Performance::ChainArrayAllocation::HAS_MUTATION_ALTERNATIVE = T.let(T.unsafe(nil), Set) -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#50 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:50 RuboCop::Cop::Performance::ChainArrayAllocation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#48 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:48 RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY = T.let(T.unsafe(nil), Set) # These methods return a new array only when called without a block. # -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#33 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:33 RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY_WHEN_NO_BLOCK = T.let(T.unsafe(nil), Set) # These methods return a new array but only sometimes. They must be @@ -470,7 +486,7 @@ RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY_WHEN_NO_BLOCK # [1,2].first # => 1 # [1,2].first(1) # => [1] # -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#30 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:30 RuboCop::Cop::Performance::ChainArrayAllocation::RETURN_NEW_ARRAY_WHEN_ARGS = T.let(T.unsafe(nil), Set) # Identifies places where Array and Hash literals are used within loops. @@ -483,99 +499,85 @@ RuboCop::Cop::Performance::ChainArrayAllocation::RETURN_NEW_ARRAY_WHEN_ARGS = T. # @example # # bad # users.select do |user| -# %i[superadmin admin].include?(user.role) +# %i[superadmin admin].include?(user.role) # end # # # good # admin_roles = %i[superadmin admin] # users.select do |user| -# admin_roles.include?(user.role) +# admin_roles.include?(user.role) # end # # # good # ADMIN_ROLES = %i[superadmin admin] # ... # users.select do |user| -# ADMIN_ROLES.include?(user.role) +# ADMIN_ROLES.include?(user.role) # end # -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#34 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:34 class RuboCop::Cop::Performance::CollectionLiteralInLoop < ::RuboCop::Cop::Base - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#74 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:74 def enumerable_loop?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#68 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:68 def kernel_loop?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#80 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:80 def on_send(node); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#90 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:90 def check_literal?(node, method); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#130 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:130 def enumerable_method?(method_name); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#112 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:112 def keyword_loop?(type); end - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#122 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:122 def literal_class(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#106 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:106 def loop?(ancestor, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#134 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:134 def min_size; end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#116 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:116 def node_within_enumerable_loop?(node, ancestor); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#97 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:97 def nonmutable_method_of_array_or_hash?(node, method); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#102 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:102 def parent_is_loop?(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#56 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:56 RuboCop::Cop::Performance::CollectionLiteralInLoop::ARRAY_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#41 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:41 RuboCop::Cop::Performance::CollectionLiteralInLoop::ENUMERABLE_METHOD_NAMES = T.let(T.unsafe(nil), Set) -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#66 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:66 RuboCop::Cop::Performance::CollectionLiteralInLoop::HASH_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#39 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:39 RuboCop::Cop::Performance::CollectionLiteralInLoop::LOOP_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#35 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:35 RuboCop::Cop::Performance::CollectionLiteralInLoop::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#42 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:42 RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#58 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:58 RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#38 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:38 RuboCop::Cop::Performance::CollectionLiteralInLoop::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) # Identifies places where `sort { |a, b| a.foo <=> b.foo }` @@ -593,41 +595,39 @@ RuboCop::Cop::Performance::CollectionLiteralInLoop::POST_CONDITION_LOOP_TYPES = # array.sort_by(&:foo) # array.sort_by { |v| v.foo } # array.sort_by do |var| -# var.foo +# var.foo # end # array.max_by(&:foo) # array.min_by(&:foo) # array.sort_by { |a| a[:foo] } # -# source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#26 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:26 class RuboCop::Cop::Performance::CompareWithBlock < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#34 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:34 def compare?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#48 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:48 def on_block(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#41 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:41 def replaceable_body?(param0 = T.unsafe(nil), param1, param2); end private - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#105 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:105 def compare_range(send, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#84 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:84 def message(send, method, var_a, var_b, args); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#69 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:69 def slow_compare?(method, args_a, args_b); end end -# source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#30 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:30 RuboCop::Cop::Performance::CompareWithBlock::MSG = T.let(T.unsafe(nil), String) # Identifies places where `Concurrent.monotonic_time` @@ -641,21 +641,21 @@ RuboCop::Cop::Performance::CompareWithBlock::MSG = T.let(T.unsafe(nil), String) # # good # Process.clock_gettime(Process::CLOCK_MONOTONIC) # -# source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#17 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/concurrent_monotonic_time.rb:17 class RuboCop::Cop::Performance::ConcurrentMonotonicTime < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#23 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/concurrent_monotonic_time.rb:23 def concurrent_monotonic_time?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#28 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/concurrent_monotonic_time.rb:28 def on_send(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#20 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/concurrent_monotonic_time.rb:20 RuboCop::Cop::Performance::ConcurrentMonotonicTime::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#21 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/concurrent_monotonic_time.rb:21 RuboCop::Cop::Performance::ConcurrentMonotonicTime::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Finds regular expressions with dynamic components that are all constants. @@ -669,55 +669,73 @@ RuboCop::Cop::Performance::ConcurrentMonotonicTime::RESTRICT_ON_SEND = T.let(T.u # # # bad # def tokens(pattern) -# pattern.scan(TOKEN).reject { |token| token.match?(/\A#{SEPARATORS}\Z/) } +# pattern.scan(TOKEN).reject { |token| token.match?(/\A#{SEPARATORS}\Z/) } # end # # # good # ALL_SEPARATORS = /\A#{SEPARATORS}\Z/ # def tokens(pattern) -# pattern.scan(TOKEN).reject { |token| token.match?(ALL_SEPARATORS) } +# pattern.scan(TOKEN).reject { |token| token.match?(ALL_SEPARATORS) } # end # # # good # def tokens(pattern) -# pattern.scan(TOKEN).reject { |token| token.match?(/\A#{SEPARATORS}\Z/o) } +# pattern.scan(TOKEN).reject { |token| token.match?(/\A#{SEPARATORS}\Z/o) } # end # # # good # def separators -# @separators ||= /\A#{SEPARATORS}\Z/ +# @separators ||= /\A#{SEPARATORS}\Z/ # end # -# source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#36 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/constant_regexp.rb:36 class RuboCop::Cop::Performance::ConstantRegexp < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#41 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/constant_regexp.rb:41 def on_regexp(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#57 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/constant_regexp.rb:57 def regexp_escape?(param0 = T.unsafe(nil)); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#62 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/constant_regexp.rb:62 def include_interpolated_const?(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#53 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/constant_regexp.rb:53 def within_allowed_assignment?(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#39 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/constant_regexp.rb:39 RuboCop::Cop::Performance::ConstantRegexp::MSG = T.let(T.unsafe(nil), String) # Identifies usages of `count` on an `Enumerable` that # follow calls to `select`, `find_all`, `filter` or `reject`. Querying logic can instead be # passed to the `count` call. # +# @safety +# This cop is unsafe because it has known compatibility issues with `ActiveRecord` and other +# frameworks. ActiveRecord's `count` ignores the block that is passed to it. +# `ActiveRecord` will ignore the block that is passed to `count`. +# Other methods, such as `select`, will convert the association to an +# array and then run the block on the array. A simple work around to +# make `count` work with a block is to call `to_a.count {...}`. +# +# For example: +# +# [source,ruby] +# ---- +# `Model.where(id: [1, 2, 3]).select { |m| m.method == true }.size` +# ---- +# +# becomes: +# +# [source,ruby] +# ---- +# `Model.where(id: [1, 2, 3]).to_a.count { |m| m.method == true }` +# ---- +# # @example # # bad # [1, 2, 3].select { |e| e > 2 }.size @@ -736,35 +754,33 @@ RuboCop::Cop::Performance::ConstantRegexp::MSG = T.let(T.unsafe(nil), String) # Model.select('field AS field_one').count # Model.select(:value).count # -# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#49 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:49 class RuboCop::Cop::Performance::Count < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#56 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:56 def count_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:63 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#79 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:79 def autocorrect(corrector, node, selector_node, selector); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#90 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:90 def eligible_node?(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#94 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:94 def source_starting_at(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#53 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:53 RuboCop::Cop::Performance::Count::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#54 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:54 RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # In Ruby 2.5, `String#delete_prefix` has been added. @@ -778,6 +794,9 @@ RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # The `delete_prefix('prefix')` method is faster than `gsub(/\Aprefix/, '')`. # +# @safety +# This cop is unsafe because `Pathname` has `sub` but not `delete_prefix`. +# # @example # # # bad @@ -790,6 +809,7 @@ RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # good # str.delete_prefix('prefix') # str.delete_prefix!('prefix') +# # @example SafeMultiline: true (default) # # # good @@ -797,6 +817,7 @@ RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # str.gsub!(/^prefix/, '') # str.sub(/^prefix/, '') # str.sub!(/^prefix/, '') +# # @example SafeMultiline: false # # # bad @@ -805,26 +826,26 @@ RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # str.sub(/^prefix/, '') # str.sub!(/^prefix/, '') # -# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#49 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_prefix.rb:49 class RuboCop::Cop::Performance::DeletePrefix < ::RuboCop::Cop::Base include ::RuboCop::Cop::RegexpMetacharacter extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#66 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_prefix.rb:66 def delete_prefix_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#70 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_prefix.rb:70 def on_send(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#56 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_prefix.rb:56 RuboCop::Cop::Performance::DeletePrefix::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#59 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_prefix.rb:59 RuboCop::Cop::Performance::DeletePrefix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) -# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#57 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_prefix.rb:57 RuboCop::Cop::Performance::DeletePrefix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # In Ruby 2.5, `String#delete_suffix` has been added. @@ -838,6 +859,9 @@ RuboCop::Cop::Performance::DeletePrefix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # # The `delete_suffix('suffix')` method is faster than `gsub(/suffix\z/, '')`. # +# @safety +# This cop is unsafe because `Pathname` has `sub` but not `delete_suffix`. +# # @example # # # bad @@ -850,6 +874,7 @@ RuboCop::Cop::Performance::DeletePrefix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # # good # str.delete_suffix('suffix') # str.delete_suffix!('suffix') +# # @example SafeMultiline: true (default) # # # good @@ -857,6 +882,7 @@ RuboCop::Cop::Performance::DeletePrefix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # str.gsub!(/suffix$/, '') # str.sub(/suffix$/, '') # str.sub!(/suffix$/, '') +# # @example SafeMultiline: false # # # bad @@ -865,32 +891,37 @@ RuboCop::Cop::Performance::DeletePrefix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # str.sub(/suffix$/, '') # str.sub!(/suffix$/, '') # -# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#49 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_suffix.rb:49 class RuboCop::Cop::Performance::DeleteSuffix < ::RuboCop::Cop::Base include ::RuboCop::Cop::RegexpMetacharacter extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#66 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_suffix.rb:66 def delete_suffix_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#70 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_suffix.rb:70 def on_send(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#56 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_suffix.rb:56 RuboCop::Cop::Performance::DeleteSuffix::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#59 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_suffix.rb:59 RuboCop::Cop::Performance::DeleteSuffix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) -# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#57 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_suffix.rb:57 RuboCop::Cop::Performance::DeleteSuffix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies usages of `first`, `last`, `[0]` or `[-1]` # chained to `select`, `find_all` or `filter` and change them to use # `detect` instead. # +# @safety +# This cop is unsafe because is has known compatibility issues with `ActiveRecord` and other +# frameworks. `ActiveRecord` does not implement a `detect` method and `find` has its own +# meaning. Correcting `ActiveRecord` methods with this cop should be considered unsafe. +# # @example # # bad # [].select { |item| true }.first @@ -906,60 +937,56 @@ RuboCop::Cop::Performance::DeleteSuffix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # [].detect { |item| true } # [].reverse.detect { |item| true } # -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#30 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:30 class RuboCop::Cop::Performance::Detect < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#41 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:41 def detect_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#50 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:50 def on_send(node); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#69 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:69 def accept_first_call?(receiver, body); end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#101 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:101 def autocorrect(corrector, node, replacement); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#127 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:127 def lazy?(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#112 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:112 def message_for_method(method, index); end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#123 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:123 def preferred_method; end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#78 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:78 def register_offense(node, receiver, second_method, index); end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#93 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:93 def replacement(method, index); end end -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#33 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:33 RuboCop::Cop::Performance::Detect::CANDIDATE_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#37 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:37 RuboCop::Cop::Performance::Detect::INDEX_MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#38 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:38 RuboCop::Cop::Performance::Detect::INDEX_REVERSE_MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#35 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:35 RuboCop::Cop::Performance::Detect::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#39 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:39 RuboCop::Cop::Performance::Detect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#36 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:36 RuboCop::Cop::Performance::Detect::REVERSE_MSG = T.let(T.unsafe(nil), String) # Checks for double `#start_with?` or `#end_with?` calls @@ -979,6 +1006,7 @@ RuboCop::Cop::Performance::Detect::REVERSE_MSG = T.let(T.unsafe(nil), String) # str.start_with?("a", Some::CONST) # str.start_with?("a", "b", "c") # str.end_with?(var1, var2) +# # @example IncludeActiveSupportAliases: false (default) # # good # str.starts_with?("a", "b") || str.starts_with?("c") @@ -986,6 +1014,7 @@ RuboCop::Cop::Performance::Detect::REVERSE_MSG = T.let(T.unsafe(nil), String) # # str.starts_with?("a", "b", "c") # str.ends_with?(var1, var2) +# # @example IncludeActiveSupportAliases: true # # bad # str.starts_with?("a", "b") || str.starts_with?("c") @@ -995,40 +1024,38 @@ RuboCop::Cop::Performance::Detect::REVERSE_MSG = T.let(T.unsafe(nil), String) # str.starts_with?("a", "b", "c") # str.ends_with?(var1, var2) # -# source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#41 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:41 class RuboCop::Cop::Performance::DoubleStartEndWith < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#97 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:97 def check_with_active_support_aliases(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#47 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:47 def on_or(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#91 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:91 def two_start_end_with_calls(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#61 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:61 def autocorrect(corrector, first_call_args, second_call_args, combined_args); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#87 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:87 def check_for_active_support_aliases?; end - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#83 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:83 def combine_args(first_call_args, second_call_args); end - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#77 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:77 def message(node, receiver, method, combined_args); end - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#69 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:69 def process_source(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#44 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:44 RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String) # Identifies unnecessary use of a regex where `String#end_with?` would suffice. @@ -1037,6 +1064,11 @@ RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String # `end$` is unsafe as it will behave incompatible with `end_with?` # for receiver is multiline string. # +# @safety +# This will change to a new method call which isn't guaranteed to be on the +# object. Switching these methods has to be done with knowledge of the types +# of the variables which rubocop doesn't have. +# # @example # # bad # 'abc'.match?(/bc\Z/) @@ -1048,6 +1080,7 @@ RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String # # # good # 'abc'.end_with?('bc') +# # @example SafeMultiline: true (default) # # # good @@ -1057,6 +1090,7 @@ RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String # /bc$/ =~ 'abc' # 'abc'.match(/bc$/) # /bc$/.match('abc') +# # @example SafeMultiline: false # # # bad @@ -1067,25 +1101,25 @@ RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String # 'abc'.match(/bc$/) # /bc$/.match('abc') # -# source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#49 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/end_with.rb:49 class RuboCop::Cop::Performance::EndWith < ::RuboCop::Cop::Base include ::RuboCop::Cop::RegexpMetacharacter extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/end_with.rb:76 def on_match_with_lvasgn(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/end_with.rb:63 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#57 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/end_with.rb:57 def redundant_regex?(param0 = T.unsafe(nil)); end end -# source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#53 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/end_with.rb:53 RuboCop::Cop::Performance::EndWith::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#55 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/end_with.rb:55 RuboCop::Cop::Performance::EndWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Do not compute the size of statically sized objects. @@ -1130,51 +1164,39 @@ RuboCop::Cop::Performance::EndWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # waldo = { a: corge, b: grault } # waldo.size # -# source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#48 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:48 class RuboCop::Cop::Performance::FixedSize < ::RuboCop::Cop::Base - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#52 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:52 def counter(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#56 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:56 def on_send(node); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#72 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:72 def allowed_argument?(arg); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#76 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:76 def allowed_parent?(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#68 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:68 def allowed_variable?(var); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#86 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:86 def contains_double_splat?(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#80 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:80 def contains_splat?(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#92 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:92 def non_string_argument?(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#49 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:49 RuboCop::Cop::Performance::FixedSize::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#50 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:50 RuboCop::Cop::Performance::FixedSize::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies usages of `map { ... }.flatten` and @@ -1190,39 +1212,39 @@ RuboCop::Cop::Performance::FixedSize::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # [1, 2, 3, 4].map { |e| [e, e] }.flatten # [1, 2, 3, 4].collect { |e| [e, e] }.flatten # -# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#18 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:18 class RuboCop::Cop::Performance::FlatMap < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#28 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:28 def flat_map_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#39 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:39 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#71 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:71 def autocorrect(corrector, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#52 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:52 def offense_for_levels(node, map_node, first_method, flatten); end - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#58 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:58 def offense_for_method(node, map_node, first_method, flatten); end - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#62 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:62 def register_offense(node, map_node, first_method, flatten, message); end end -# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#24 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:24 RuboCop::Cop::Performance::FlatMap::FLATTEN_MULTIPLE_LEVELS = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#22 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:22 RuboCop::Cop::Performance::FlatMap::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#23 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:23 RuboCop::Cop::Performance::FlatMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for inefficient searching of keys and values within @@ -1237,6 +1259,9 @@ RuboCop::Cop::Performance::FlatMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # both perform an O(n) search through all of the values, calling `values` # allocates a new array while using `value?` does not. # +# @safety +# This cop is unsafe because it can't tell whether the receiver is a hash object. +# # @example # # bad # { a: 1, b: 2 }.keys.include?(:a) @@ -1258,38 +1283,38 @@ RuboCop::Cop::Performance::FlatMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # { a: 1, b: 2 }.has_value?('garbage') # h = { a: 1, b: 2 }; h.value?(nil) # -# source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#42 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:42 class RuboCop::Cop::Performance::InefficientHashSearch < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#47 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:47 def inefficient_include?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#51 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:51 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#91 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:91 def autocorrect_argument(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#95 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:95 def autocorrect_hash_expression(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#73 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:73 def autocorrect_method(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#80 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:80 def current_method(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#69 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:69 def message(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#84 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:84 def use_long_method; end end -# source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#45 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:45 RuboCop::Cop::Performance::InefficientHashSearch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where inefficient `readlines` method @@ -1313,51 +1338,55 @@ RuboCop::Cop::Performance::InefficientHashSearch::RESTRICT_ON_SEND = T.let(T.uns # file.each_line.find { |l| l.start_with?('#') } # file.each_line { |l| puts l } # -# source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#27 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/io_readlines.rb:27 class RuboCop::Cop::Performance::IoReadlines < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#42 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/io_readlines.rb:42 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#34 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/io_readlines.rb:34 def readlines_on_class?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#38 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/io_readlines.rb:38 def readlines_on_instance?(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#58 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/io_readlines.rb:58 def autocorrect(corrector, enumerable_call, readlines_call, receiver); end - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#90 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/io_readlines.rb:90 def build_bad_method(enumerable_call); end - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#106 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/io_readlines.rb:106 def build_call_args(call_args_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#82 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/io_readlines.rb:82 def build_good_method(enumerable_call); end - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#94 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/io_readlines.rb:94 def correction_range(enumerable_call, readlines_call); end - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#76 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/io_readlines.rb:76 def offense_range(enumerable_call, readlines_call); end end -# source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#31 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/io_readlines.rb:31 RuboCop::Cop::Performance::IoReadlines::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#32 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/io_readlines.rb:32 RuboCop::Cop::Performance::IoReadlines::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # In Ruby 2.7, `Enumerable#filter_map` has been added. # # This cop identifies places where `map { ... }.compact` can be replaced by `filter_map`. # +# @safety +# This cop's autocorrection is unsafe because `map { ... }.compact` that is not +# compatible with `filter_map`. +# # [source,ruby] # ---- # [true, false, nil].compact #=> [true, false] @@ -1374,41 +1403,37 @@ RuboCop::Cop::Performance::IoReadlines::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # ary.map(&:foo).compact! # ary.compact.map(&:foo) # -# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#30 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:30 class RuboCop::Cop::Performance::MapCompact < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#40 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:40 def map_compact(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#53 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:53 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#89 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:89 def compact_method_with_final_newline_range(compact_method_range); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#85 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:85 def invoke_method_after_map_compact_on_same_line?(compact_node, chained_method); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#81 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:81 def map_method_and_compact_method_on_same_line?(map_node, compact_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#67 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:67 def remove_compact_method(corrector, map_node, compact_node, chained_method); end end -# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#35 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:35 RuboCop::Cop::Performance::MapCompact::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#36 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:36 RuboCop::Cop::Performance::MapCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where methods are converted to blocks, with the @@ -1424,16 +1449,16 @@ RuboCop::Cop::Performance::MapCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A # array.map { |x| do_something(x) } # [1, 2, 3].each { |x| out.puts(x) } # -# source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#19 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/method_object_as_block.rb:19 class RuboCop::Cop::Performance::MethodObjectAsBlock < ::RuboCop::Cop::Base - # source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#22 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/method_object_as_block.rb:22 def method_object_as_argument?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#26 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/method_object_as_block.rb:26 def on_block_pass(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#20 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/method_object_as_block.rb:20 RuboCop::Cop::Performance::MethodObjectAsBlock::MSG = T.let(T.unsafe(nil), String) # Checks for `OpenStruct.new` calls. @@ -1444,35 +1469,39 @@ RuboCop::Cop::Performance::MethodObjectAsBlock::MSG = T.let(T.unsafe(nil), Strin # especially in case of single-threaded # applications with multiple `OpenStruct` instantiations. # +# @safety +# This cop is unsafe because `OpenStruct.new` and `Struct.new` +# are not equivalent. +# # @example # # bad # class MyClass -# def my_method -# OpenStruct.new(my_key1: 'my_value1', my_key2: 'my_value2') -# end +# def my_method +# OpenStruct.new(my_key1: 'my_value1', my_key2: 'my_value2') +# end # end # # # good # class MyClass -# MyStruct = Struct.new(:my_key1, :my_key2) -# def my_method -# MyStruct.new('my_value1', 'my_value2') -# end +# MyStruct = Struct.new(:my_key1, :my_key2) +# def my_method +# MyStruct.new('my_value1', 'my_value2') +# end # end # -# source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#34 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/open_struct.rb:34 class RuboCop::Cop::Performance::OpenStruct < ::RuboCop::Cop::Base - # source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#43 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/open_struct.rb:43 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#39 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/open_struct.rb:39 def open_struct(param0 = T.unsafe(nil)); end end -# source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#35 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/open_struct.rb:35 RuboCop::Cop::Performance::OpenStruct::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#37 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/open_struct.rb:37 RuboCop::Cop::Performance::OpenStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies uses of `Range#include?` and `Range#member?`, which iterates over each @@ -1481,6 +1510,10 @@ RuboCop::Cop::Performance::OpenStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A # end points of the `Range`. In a great majority of cases, this is what # is wanted. # +# @safety +# This cop is unsafe because `Range#include?` (or `Range#member?`) and `Range#cover?` +# are not equivalent behavior. +# # @example # # bad # ('a'..'z').include?('b') # => true @@ -1494,21 +1527,21 @@ RuboCop::Cop::Performance::OpenStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A # # ('a'..'z').cover?('yellow') # => true # -# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#28 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/range_include.rb:28 class RuboCop::Cop::Performance::RangeInclude < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#43 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/range_include.rb:43 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#39 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/range_include.rb:39 def range_include(param0 = T.unsafe(nil)); end end -# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#31 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/range_include.rb:31 RuboCop::Cop::Performance::RangeInclude::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#32 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/range_include.rb:32 RuboCop::Cop::Performance::RangeInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies the use of a `&block` parameter and `block.call` @@ -1517,73 +1550,69 @@ RuboCop::Cop::Performance::RangeInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # @example # # bad # def method(&block) -# block.call +# block.call # end # def another(&func) -# func.call 1, 2, 3 +# func.call 1, 2, 3 # end # # # good # def method -# yield +# yield # end # def another -# yield 1, 2, 3 +# yield 1, 2, 3 # end # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#25 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:25 class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#43 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:43 def blockarg_assigned?(param0, param1); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#39 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:39 def blockarg_calls(param0, param1); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#34 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:34 def blockarg_def(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#47 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:47 def on_def(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#47 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:58 def on_defs(node); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#97 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:97 def args_include_block_pass?(blockcall); end # offenses are registered on the `block.call` nodes # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:63 def autocorrect(corrector, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#81 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:81 def calls_to_report(argname, body); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#91 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:91 def shadowed_block_argument?(body, block_argument_of_method_signature); end end -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#31 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:31 RuboCop::Cop::Performance::RedundantBlockCall::CLOSE_PAREN = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#28 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:28 RuboCop::Cop::Performance::RedundantBlockCall::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#30 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:30 RuboCop::Cop::Performance::RedundantBlockCall::OPEN_PAREN = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#32 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:32 RuboCop::Cop::Performance::RedundantBlockCall::SPACE = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#29 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:29 RuboCop::Cop::Performance::RedundantBlockCall::YIELD = T.let(T.unsafe(nil), String) # Checks for uses `Enumerable#all?`, `Enumerable#any?`, `Enumerable#one?`, @@ -1593,6 +1622,9 @@ RuboCop::Cop::Performance::RedundantBlockCall::YIELD = T.let(T.unsafe(nil), Stri # behavior is appropriately overridden in subclass. For example, # `Range#===` returns `true` when argument is within the range. # +# @safety +# This cop is unsafe because `===` and `==` do not always behave the same. +# # @example # # bad # items.all? { |item| pattern === item } @@ -1603,53 +1635,45 @@ RuboCop::Cop::Performance::RedundantBlockCall::YIELD = T.let(T.unsafe(nil), Stri # # good # items.all?(pattern) # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#26 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_equality_comparison_block.rb:26 class RuboCop::Cop::Performance::RedundantEqualityComparisonBlock < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#38 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_equality_comparison_block.rb:38 def on_block(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#76 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_equality_comparison_block.rb:76 def new_argument(block_argument, block_body); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#99 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_equality_comparison_block.rb:99 def offense_range(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#58 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_equality_comparison_block.rb:58 def one_block_argument?(block_arguments); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#66 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_equality_comparison_block.rb:66 def same_block_argument_and_is_a_argument?(block_body, block_argument); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#90 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_equality_comparison_block.rb:90 def use_block_argument_in_method_argument_of_operand?(block_argument, operand); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#62 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_equality_comparison_block.rb:62 def use_equality_comparison_block?(block_body); end end -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#35 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_equality_comparison_block.rb:35 RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::COMPARISON_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#36 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_equality_comparison_block.rb:36 RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::IS_A_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#32 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_equality_comparison_block.rb:32 RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#34 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_equality_comparison_block.rb:34 RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::TARGET_METHODS = T.let(T.unsafe(nil), Array) # Identifies the use of `Regexp#match` or `String#match`, which @@ -1660,42 +1684,46 @@ RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::TARGET_METHODS = T. # # bad # do_something if str.match(/regex/) # while regex.match('str') -# do_something +# do_something # end # # # good # method(str =~ /regex/) # return value unless regex =~ 'str' # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#20 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:20 class RuboCop::Cop::Performance::RedundantMatch < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#29 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:29 def match_call?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#38 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:38 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#34 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:34 def only_truthiness_matters?(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#50 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:50 def autocorrect(corrector, node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#23 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:23 RuboCop::Cop::Performance::RedundantMatch::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#25 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:25 RuboCop::Cop::Performance::RedundantMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where `Hash#merge!` can be replaced by `Hash#[]=`. # You can set the maximum number of key-value pairs to consider # an offense with `MaxKeyValuePairs`. # +# @safety +# This cop is unsafe because RuboCop cannot determine if the +# receiver of `merge!` is actually a hash or not. +# # @example # # bad # hash.merge!(a: 1) @@ -1704,6 +1732,7 @@ RuboCop::Cop::Performance::RedundantMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil # # good # hash[:a] = 1 # hash['key'] = 'value' +# # @example MaxKeyValuePairs: 2 (default) # # bad # hash.merge!(a: 1, b: 2) @@ -1712,123 +1741,105 @@ RuboCop::Cop::Performance::RedundantMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil # hash[:a] = 1 # hash[:b] = 2 # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#30 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:30 class RuboCop::Cop::Performance::RedundantMerge < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#47 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:47 def modifier_flow_control?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#51 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:51 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#43 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:43 def redundant_merge_candidate(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#106 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:106 def correct_multiple_elements(corrector, node, parent, new_source); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#118 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:118 def correct_single_element(corrector, node, new_source); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#78 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:78 def each_redundant_merge(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#150 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:150 def indent_width; end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#97 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:97 def kwsplat_used?(pairs); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#146 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:146 def leading_spaces(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#154 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:154 def max_key_value_pairs; end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#70 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:70 def message(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#86 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:86 def non_redundant_merge?(node, receiver, pairs); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#93 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:93 def non_redundant_pairs?(receiver, pairs); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#101 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:101 def non_redundant_value_used?(receiver, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#134 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:134 def rewrite_with_modifier(node, parent, new_source); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#122 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:122 def to_assignments(receiver, pairs); end end -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#33 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:33 RuboCop::Cop::Performance::RedundantMerge::AREF_ASGN = T.let(T.unsafe(nil), String) # A utility class for checking the use of values within an # `each_with_object` call. # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#160 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:160 class RuboCop::Cop::Performance::RedundantMerge::EachWithObjectInspector extend ::RuboCop::AST::NodePattern::Macros - # @return [EachWithObjectInspector] a new instance of EachWithObjectInspector - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#163 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:163 def initialize(node, receiver); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#194 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:194 def each_with_object_node(param0 = T.unsafe(nil)); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#168 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:168 def value_used?; end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#178 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:178 def eligible_receiver?; end - # Returns the value of attribute node. - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#176 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:176 def node; end - # Returns the value of attribute receiver. - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#176 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:176 def receiver; end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#182 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:182 def second_argument; end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#189 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:189 def unwind(receiver); end end -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#34 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:34 RuboCop::Cop::Performance::RedundantMerge::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#35 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:35 RuboCop::Cop::Performance::RedundantMerge::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#37 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:37 RuboCop::Cop::Performance::RedundantMerge::WITH_MODIFIER_CORRECTION = T.let(T.unsafe(nil), String) # Identifies places where `sort { |a, b| a <=> b }` can be replaced with `sort`. @@ -1840,22 +1851,22 @@ RuboCop::Cop::Performance::RedundantMerge::WITH_MODIFIER_CORRECTION = T.let(T.un # # good # array.sort # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#15 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_sort_block.rb:15 class RuboCop::Cop::Performance::RedundantSortBlock < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::SortBlock extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#21 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_sort_block.rb:21 def on_block(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#35 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_sort_block.rb:35 def message(var_a, var_b); end end -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#19 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_sort_block.rb:19 RuboCop::Cop::Performance::RedundantSortBlock::MSG = T.let(T.unsafe(nil), String) # Identifies places where `split` argument can be replaced from @@ -1868,37 +1879,35 @@ RuboCop::Cop::Performance::RedundantSortBlock::MSG = T.let(T.unsafe(nil), String # # good # 'a,b,c'.split(',') # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#15 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_split_regexp_argument.rb:15 class RuboCop::Cop::Performance::RedundantSplitRegexpArgument < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#27 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_split_regexp_argument.rb:27 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#23 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_split_regexp_argument.rb:23 def split_call_with_regexp?(param0 = T.unsafe(nil)); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#41 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_split_regexp_argument.rb:41 def determinist_regexp?(regexp_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#45 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_split_regexp_argument.rb:45 def replacement(regexp_node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#20 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_split_regexp_argument.rb:20 RuboCop::Cop::Performance::RedundantSplitRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#18 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_split_regexp_argument.rb:18 RuboCop::Cop::Performance::RedundantSplitRegexpArgument::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#19 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_split_regexp_argument.rb:19 RuboCop::Cop::Performance::RedundantSplitRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#21 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_split_regexp_argument.rb:21 RuboCop::Cop::Performance::RedundantSplitRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) # Checks for redundant `String#chars`. @@ -1937,45 +1946,45 @@ RuboCop::Cop::Performance::RedundantSplitRegexpArgument::STR_SPECIAL_CHARS = T.l # str.chars.last(2) # Incompatible with `str[-2..-1].chars`. # str.chars.drop(2) # Incompatible with `str[2..-1].chars`. # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#42 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:42 class RuboCop::Cop::Performance::RedundantStringChars < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#53 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:53 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#49 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:49 def redundant_chars_call?(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#108 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:108 def build_bad_method(method, args); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#121 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:121 def build_call_args(call_args_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#83 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:83 def build_good_method(method, args); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#96 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:96 def build_good_method_for_brackets_or_first_method(method, args); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#77 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:77 def build_message(method, args); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#73 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:73 def correction_range(receiver, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#69 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:69 def offense_range(receiver, node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#46 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:46 RuboCop::Cop::Performance::RedundantStringChars::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#47 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:47 RuboCop::Cop::Performance::RedundantStringChars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # In Ruby 2.4, `String#match?`, `Regexp#match?`, and `Symbol#match?` @@ -1987,168 +1996,160 @@ RuboCop::Cop::Performance::RedundantStringChars::RESTRICT_ON_SEND = T.let(T.unsa # @example # # bad # def foo -# if x =~ /re/ -# do_something -# end +# if x =~ /re/ +# do_something +# end # end # # # bad # def foo -# if x !~ /re/ -# do_something -# end +# if x !~ /re/ +# do_something +# end # end # # # bad # def foo -# if x.match(/re/) -# do_something -# end +# if x.match(/re/) +# do_something +# end # end # # # bad # def foo -# if /re/ === x -# do_something -# end +# if /re/ === x +# do_something +# end # end # # # good # def foo -# if x.match?(/re/) -# do_something -# end +# if x.match?(/re/) +# do_something +# end # end # # # good # def foo -# if !x.match?(/re/) -# do_something -# end +# if !x.match?(/re/) +# do_something +# end # end # # # good # def foo -# if x =~ /re/ -# do_something(Regexp.last_match) -# end +# if x =~ /re/ +# do_something(Regexp.last_match) +# end # end # # # good # def foo -# if x.match(/re/) -# do_something($~) -# end +# if x.match(/re/) +# do_something($~) +# end # end # # # good # def foo -# if /re/ === x -# do_something($~) -# end +# if /re/ === x +# do_something($~) +# end # end # -# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#75 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:75 class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#125 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:125 def last_matches(param0); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#86 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:86 def match_method?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#122 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:122 def match_node?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#97 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:97 def match_operator?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#101 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:101 def match_threequals?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#93 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:93 def match_with_int_arg_method?(param0 = T.unsafe(nil)); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#105 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:105 def match_with_lvasgn?(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#138 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:138 def on_case(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#134 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:134 def on_if(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#123 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:123 def search_match_nodes(param0); end private - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#161 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:161 def autocorrect(corrector, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#150 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:150 def check_condition(cond); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#254 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:254 def correct_operator(corrector, recv, arg, oper = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#279 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:279 def correction_range(recv, arg); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#217 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:217 def find_last_match(body, range, scope_root); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#177 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:177 def last_match_used?(match_node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#243 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:243 def match_gvar?(sym); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#173 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:173 def message(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#213 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:213 def modifier_form?(match_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#199 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:199 def next_match_pos(body, match_node_pos, scope_root); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#186 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:186 def range_to_search_for_last_matches(match_node, body, scope_root); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#263 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:263 def replace_with_match_predicate_method(corrector, recv, arg, op_range); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#225 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:225 def scope_body(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#237 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:237 def scope_root(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#274 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:274 def swap_receiver_and_arg(corrector, recv, arg); end end -# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#112 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:112 RuboCop::Cop::Performance::RegexpMatch::MATCH_NODE_PATTERN = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#84 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:84 RuboCop::Cop::Performance::RegexpMatch::MSG = T.let(T.unsafe(nil), String) # Constants are included in this list because it is unlikely that # someone will store `nil` as a constant and then use it for comparison # -# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#83 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:83 RuboCop::Cop::Performance::RegexpMatch::TYPES_IMPLEMENTING_MATCH = T.let(T.unsafe(nil), Array) # Identifies usages of `reverse.each` and change them to use `reverse_each` instead. @@ -2168,32 +2169,30 @@ RuboCop::Cop::Performance::RegexpMatch::TYPES_IMPLEMENTING_MATCH = T.let(T.unsaf # # good # items.reverse_each # -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#22 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_each.rb:22 class RuboCop::Cop::Performance::ReverseEach < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#33 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_each.rb:33 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#29 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_each.rb:29 def reverse_each?(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#53 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_each.rb:53 def offense_range(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#47 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_each.rb:47 def use_return_value?(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#26 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_each.rb:26 RuboCop::Cop::Performance::ReverseEach::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#27 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_each.rb:27 RuboCop::Cop::Performance::ReverseEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where `reverse.first(n)` and `reverse.first` @@ -2209,36 +2208,36 @@ RuboCop::Cop::Performance::ReverseEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # array.last(5).reverse # array.last # -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#19 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_first.rb:19 class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#30 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_first.rb:30 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#26 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_first.rb:26 def reverse_first_candidate?(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_first.rb:63 def build_bad_method(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#55 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_first.rb:55 def build_good_method(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#49 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_first.rb:49 def build_message(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#45 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_first.rb:45 def correction_range(receiver, node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#23 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_first.rb:23 RuboCop::Cop::Performance::ReverseFirst::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#24 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_first.rb:24 RuboCop::Cop::Performance::ReverseFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # In Ruby 2.7, `Enumerable#filter_map` has been added. @@ -2253,37 +2252,34 @@ RuboCop::Cop::Performance::ReverseFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # # good # ary.filter_map { |o| o.bar if o.foo } # -# source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#18 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/select_map.rb:18 class RuboCop::Cop::Performance::SelectMap < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#27 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/select_map.rb:27 def bad_method?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#31 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/select_map.rb:31 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#44 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/select_map.rb:44 def map_method_candidate(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#54 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/select_map.rb:54 def offense_range(node, map_method); end end -# source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#24 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/select_map.rb:24 RuboCop::Cop::Performance::SelectMap::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#25 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/select_map.rb:25 RuboCop::Cop::Performance::SelectMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies usages of `count` on an `Array` and `Hash` and change them to `size`. # -# TODO: Add advanced detection of variables that could -# have been assigned to an array or a hash. -# # @example # # bad # [1, 2, 3].count @@ -2311,28 +2307,30 @@ RuboCop::Cop::Performance::SelectMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # # # good # [1, 2, 3].count { |e| e > 2 } +# TODO: Add advanced detection of variables that could +# have been assigned to an array or a hash. # -# source://rubocop-performance//lib/rubocop/cop/performance/size.rb#37 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/size.rb:37 class RuboCop::Cop::Performance::Size < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#43 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/size.rb:43 def array?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#61 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/size.rb:61 def count?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#52 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/size.rb:52 def hash?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#65 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/size.rb:65 def on_send(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/size.rb#40 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/size.rb:40 RuboCop::Cop::Performance::Size::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/size.rb#41 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/size.rb:41 RuboCop::Cop::Performance::Size::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where `sort { |a, b| b <=> a }` @@ -2345,22 +2343,22 @@ RuboCop::Cop::Performance::Size::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # good # array.sort.reverse # -# source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#16 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sort_reverse.rb:16 class RuboCop::Cop::Performance::SortReverse < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::SortBlock extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#22 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sort_reverse.rb:22 def on_block(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#38 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sort_reverse.rb:38 def message(var_a, var_b); end end -# source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#20 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sort_reverse.rb:20 RuboCop::Cop::Performance::SortReverse::MSG = T.let(T.unsafe(nil), String) # Identifies places where `gsub(/a+/, 'a')` and `gsub!(/a+/, 'a')` @@ -2378,31 +2376,29 @@ RuboCop::Cop::Performance::SortReverse::MSG = T.let(T.unsafe(nil), String) # str.squeeze('a') # str.squeeze!('a') # -# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#21 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/squeeze.rb:21 class RuboCop::Cop::Performance::Squeeze < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#41 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/squeeze.rb:41 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#32 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/squeeze.rb:32 def squeeze_candidate?(param0 = T.unsafe(nil)); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#61 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/squeeze.rb:61 def repeating_literal?(regex_str); end end -# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#24 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/squeeze.rb:24 RuboCop::Cop::Performance::Squeeze::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#27 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/squeeze.rb:27 RuboCop::Cop::Performance::Squeeze::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) -# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#25 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/squeeze.rb:25 RuboCop::Cop::Performance::Squeeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies unnecessary use of a regex where `String#start_with?` would suffice. @@ -2411,6 +2407,11 @@ RuboCop::Cop::Performance::Squeeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # `^start` is unsafe as it will behave incompatible with `start_with?` # for receiver is multiline string. # +# @safety +# This will change to a new method call which isn't guaranteed to be on the +# object. Switching these methods has to be done with knowledge of the types +# of the variables which rubocop doesn't have. +# # @example # # bad # 'abc'.match?(/\Aab/) @@ -2422,6 +2423,7 @@ RuboCop::Cop::Performance::Squeeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # # # good # 'abc'.start_with?('ab') +# # @example SafeMultiline: true (default) # # # good @@ -2431,6 +2433,7 @@ RuboCop::Cop::Performance::Squeeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # /^ab/ =~ 'abc' # 'abc'.match(/^ab/) # /^ab/.match('abc') +# # @example SafeMultiline: false # # # bad @@ -2441,25 +2444,25 @@ RuboCop::Cop::Performance::Squeeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # 'abc'.match(/^ab/) # /^ab/.match('abc') # -# source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#49 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/start_with.rb:49 class RuboCop::Cop::Performance::StartWith < ::RuboCop::Cop::Base include ::RuboCop::Cop::RegexpMetacharacter extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/start_with.rb:76 def on_match_with_lvasgn(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/start_with.rb:63 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#57 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/start_with.rb:57 def redundant_regex?(param0 = T.unsafe(nil)); end end -# source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#53 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/start_with.rb:53 RuboCop::Cop::Performance::StartWith::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#55 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/start_with.rb:55 RuboCop::Cop::Performance::StartWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where string identifier argument can be replaced @@ -2481,26 +2484,29 @@ RuboCop::Cop::Performance::StartWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # attr_accessor :do_something # instance_variable_get(:@ivar) # -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#25 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_identifier_argument.rb:25 class RuboCop::Cop::Performance::StringIdentifierArgument < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#46 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_identifier_argument.rb:46 def on_send(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#28 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_identifier_argument.rb:28 RuboCop::Cop::Performance::StringIdentifierArgument::MSG = T.let(T.unsafe(nil), String) # NOTE: `attr` method is not included in this list as it can cause false positives in Nokogiri API. # And `attr` may not be used because `Style/Attr` registers an offense. # https://github.com/rubocop/rubocop-performance/issues/278 # -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#33 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_identifier_argument.rb:33 RuboCop::Cop::Performance::StringIdentifierArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies unnecessary use of a regex where `String#include?` would suffice. # +# @safety +# This cop's offenses are not safe to autocorrect if a receiver is nil. +# # @example # # bad # 'abc'.match?(/ab/) @@ -2513,31 +2519,29 @@ RuboCop::Cop::Performance::StringIdentifierArgument::RESTRICT_ON_SEND = T.let(T. # # good # 'abc'.include?('ab') # -# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#22 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:22 class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#34 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:46 def on_match_with_lvasgn(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#34 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:34 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#28 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:28 def redundant_regex?(param0 = T.unsafe(nil)); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#50 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:50 def literal?(regex_str); end end -# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#25 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:25 RuboCop::Cop::Performance::StringInclude::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#26 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:26 RuboCop::Cop::Performance::StringInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where `gsub` can be replaced by `tr` or `delete`. @@ -2555,84 +2559,115 @@ RuboCop::Cop::Performance::StringInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # 'abc'.tr('b', 'd') # 'a b c'.delete(' ') # -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#20 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:20 class RuboCop::Cop::Performance::StringReplacement < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#37 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:37 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#31 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:31 def string_replacement?(param0 = T.unsafe(nil)); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#83 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:83 def accept_first_param?(first_param); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#78 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:78 def accept_second_param?(second_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#59 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:59 def autocorrect(corrector, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#100 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:100 def first_source(first_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#143 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:143 def message(node, first_source, second_source); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#150 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:150 def method_suffix(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#48 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:48 def offense(node, first_param, second_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#129 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:129 def range(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#154 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:154 def remove_second_param(corrector, node, first_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#69 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:69 def replace_method(corrector, node, first_source, second_source, first_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#133 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:133 def replacement_method(node, first_source, second_source); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#118 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:118 def source_from_regex_constructor(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#111 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:111 def source_from_regex_literal(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#29 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:29 RuboCop::Cop::Performance::StringReplacement::BANG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#27 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:27 RuboCop::Cop::Performance::StringReplacement::DELETE = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#26 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:26 RuboCop::Cop::Performance::StringReplacement::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#24 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:24 RuboCop::Cop::Performance::StringReplacement::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#25 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:25 RuboCop::Cop::Performance::StringReplacement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#28 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:28 RuboCop::Cop::Performance::StringReplacement::TR = T.let(T.unsafe(nil), String) # Identifies places where custom code finding the sum of elements # in some Enumerable object can be replaced by `Enumerable#sum` method. # +# @safety +# Autocorrections are unproblematic wherever an initial value is provided explicitly: +# +# [source,ruby] +# ---- +# [1, 2, 3].reduce(4, :+) # => 10 +# [1, 2, 3].sum(4) # => 10 +# +# [].reduce(4, :+) # => 4 +# [].sum(4) # => 4 +# ---- +# +# This also holds true for non-numeric types which implement a `:+` method: +# +# [source,ruby] +# ---- +# ['l', 'o'].reduce('Hel', :+) # => "Hello" +# ['l', 'o'].sum('Hel') # => "Hello" +# ---- +# +# When no initial value is provided though, `Enumerable#reduce` will pick the first enumerated value +# as initial value and successively add all following values to it, whereas +# `Enumerable#sum` will set an initial value of `0` (`Integer`) which can lead to a `TypeError`: +# +# [source,ruby] +# ---- +# [].reduce(:+) # => nil +# [1, 2, 3].reduce(:+) # => 6 +# ['H', 'e', 'l', 'l', 'o'].reduce(:+) # => "Hello" +# +# [].sum # => 0 +# [1, 2, 3].sum # => 6 +# ['H', 'e', 'l', 'l', 'o'].sum # => in `+': String can't be coerced into Integer (TypeError) +# ---- +# # @example OnlySumOrWithInitialValue: false (default) # # bad # [1, 2, 3].inject(:+) # Autocorrections for cases without initial value are unsafe @@ -2647,6 +2682,7 @@ RuboCop::Cop::Performance::StringReplacement::TR = T.let(T.unsafe(nil), String) # [1, 2, 3].sum(10) # [1, 2, 3].sum { |elem| elem ** 2 } # [1, 2, 3].sum(10, &:count) +# # @example OnlySumOrWithInitialValue: true # # bad # [1, 2, 3].reduce(10, :+) @@ -2658,146 +2694,160 @@ RuboCop::Cop::Performance::StringReplacement::TR = T.let(T.unsafe(nil), String) # [1, 2, 3].sum { |elem| elem ** 2 } # [1, 2, 3].sum(10, &:count) # -# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#70 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:70 class RuboCop::Cop::Performance::Sum < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#99 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:99 def acc_plus_elem?(param0 = T.unsafe(nil), param1, param2); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#99 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:102 def elem_plus_acc?(param0 = T.unsafe(nil), param1, param2); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#111 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:111 def on_block(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#104 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:104 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#79 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:79 def sum_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#83 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:83 def sum_map_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#92 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:92 def sum_with_block_candidate?(param0 = T.unsafe(nil)); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#156 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:156 def array_literal?(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#161 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:161 def autocorrect(corrector, init, range); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#169 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:169 def autocorrect_sum_map(corrector, sum, map, init); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#245 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:245 def build_block_bad_method(method, init, var_acc, var_elem, body); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#212 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:212 def build_block_message(send, init, var_acc, var_elem, body); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#218 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:218 def build_good_method(init, block_pass = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#231 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:231 def build_method_bad_method(init, method, operation); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#194 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:194 def build_method_message(node, method, init, operation); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#205 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:205 def build_sum_map_message(method, init); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#151 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:151 def empty_array_literal?(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#126 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:126 def handle_sum_candidate(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#139 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:139 def handle_sum_map_candidate(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#256 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:256 def method_call_with_args_range(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#190 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:190 def sum_block_range(send, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#186 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:186 def sum_map_range(map, sum); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#182 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:182 def sum_method_range(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#74 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:74 RuboCop::Cop::Performance::Sum::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#75 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:75 RuboCop::Cop::Performance::Sum::MSG_IF_NO_INIT_VALUE = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#77 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:77 RuboCop::Cop::Performance::Sum::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for .times.map calls. # In most cases such calls can be replaced # with an explicit array creation. # +# @safety +# This cop's autocorrection is unsafe because `Integer#times` does nothing if receiver is 0 +# or less. However, `Array.new` raises an error if argument is less than 0. +# +# For example: +# +# [source,ruby] +# ---- +# -1.times{} # does nothing +# Array.new(-1) # ArgumentError: negative array size +# ---- +# # @example # # bad # 9.times.map do |i| -# i.to_s +# i.to_s # end # # # good # Array.new(9) do |i| -# i.to_s +# i.to_s # end # -# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#32 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:32 class RuboCop::Cop::Performance::TimesMap < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#44 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:44 def on_block(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#40 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:40 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#70 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:70 def times_map_call(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#50 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:50 def check(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#61 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:61 def message(map_or_collect, count); end end -# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#35 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:35 RuboCop::Cop::Performance::TimesMap::MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#37 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:37 RuboCop::Cop::Performance::TimesMap::MESSAGE_ONLY_IF = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#38 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:38 RuboCop::Cop::Performance::TimesMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # In Ruby 2.3 or later, use unary plus operator to unfreeze a string # literal instead of `String#dup` and `String.new`. # Unary plus operator is faster than `String#dup`. # +# @safety +# This cop's autocorrection is unsafe because `String.new` (without operator) is not +# exactly the same as `+''`. These differ in encoding. `String.new.encoding` is always +# `ASCII-8BIT`. However, `(+'').encoding` is the same as script encoding(e.g. `UTF-8`). +# if you expect `ASCII-8BIT` encoding, disable this cop. +# # @example # # bad # ''.dup @@ -2810,29 +2860,29 @@ RuboCop::Cop::Performance::TimesMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # +'something' # +'' # -# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#27 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/unfreeze_string.rb:27 class RuboCop::Cop::Performance::UnfreezeString < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#33 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/unfreeze_string.rb:33 def dup_string?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#44 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/unfreeze_string.rb:44 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#37 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/unfreeze_string.rb:37 def string_new?(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#57 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/unfreeze_string.rb:57 def string_value(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#30 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/unfreeze_string.rb:30 RuboCop::Cop::Performance::UnfreezeString::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#31 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/unfreeze_string.rb:31 RuboCop::Cop::Performance::UnfreezeString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where `URI::Parser.new` can be replaced by `URI::DEFAULT_PARSER`. @@ -2844,124 +2894,110 @@ RuboCop::Cop::Performance::UnfreezeString::RESTRICT_ON_SEND = T.let(T.unsafe(nil # # good # URI::DEFAULT_PARSER # -# source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#15 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/uri_default_parser.rb:15 class RuboCop::Cop::Performance::UriDefaultParser < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#28 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/uri_default_parser.rb:28 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#22 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/uri_default_parser.rb:22 def uri_parser_new?(param0 = T.unsafe(nil)); end end -# source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#18 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/uri_default_parser.rb:18 RuboCop::Cop::Performance::UriDefaultParser::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#20 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/uri_default_parser.rb:20 RuboCop::Cop::Performance::UriDefaultParser::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Common functionality for handling regexp metacharacters. # -# source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#6 +# pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/regexp_metacharacter.rb:6 module RuboCop::Cop::RegexpMetacharacter private - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/regexp_metacharacter.rb:63 def drop_end_metacharacter(regexp_string); end - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#55 + # pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/regexp_metacharacter.rb:55 def drop_start_metacharacter(regexp_string); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#15 + # pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/regexp_metacharacter.rb:15 def literal_at_end?(regexp); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#41 + # pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/regexp_metacharacter.rb:41 def literal_at_end_with_backslash_z?(regex_str); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#48 + # pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/regexp_metacharacter.rb:48 def literal_at_end_with_dollar?(regex_str); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#9 + # pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/regexp_metacharacter.rb:9 def literal_at_start?(regexp); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#21 + # pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/regexp_metacharacter.rb:21 def literal_at_start_with_backslash_a?(regex_str); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#31 + # pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/regexp_metacharacter.rb:31 def literal_at_start_with_caret?(regex_str); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#71 + # pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/regexp_metacharacter.rb:71 def safe_multiline?; end end # Common functionality for cops checking `Enumerable#sort` blocks. # -# source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#6 +# pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/sort_block.rb:6 module RuboCop::Cop::SortBlock include ::RuboCop::Cop::RangeHelp extend ::RuboCop::AST::NodePattern::Macros - # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#17 + # pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/sort_block.rb:17 def replaceable_body?(param0 = T.unsafe(nil), param1, param2); end - # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#10 + # pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/sort_block.rb:10 def sort_with_block?(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#23 + # pkg:gem/rubocop-performance#lib/rubocop/cop/mixin/sort_block.rb:23 def sort_range(send, node); end end # RuboCop Performance project namespace # -# source://rubocop-performance//lib/rubocop/performance.rb#5 +# pkg:gem/rubocop-performance#lib/rubocop/performance.rb:5 module RuboCop::Performance; end -# source://rubocop-performance//lib/rubocop/performance.rb#8 +# pkg:gem/rubocop-performance#lib/rubocop/performance.rb:8 RuboCop::Performance::CONFIG = T.let(T.unsafe(nil), Hash) -# source://rubocop-performance//lib/rubocop/performance.rb#7 +# pkg:gem/rubocop-performance#lib/rubocop/performance.rb:7 RuboCop::Performance::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) # Because RuboCop doesn't yet support plugins, we have to monkey patch in a # bit of our configuration. # -# source://rubocop-performance//lib/rubocop/performance/inject.rb#7 +# pkg:gem/rubocop-performance#lib/rubocop/performance/inject.rb:7 module RuboCop::Performance::Inject class << self - # source://rubocop-performance//lib/rubocop/performance/inject.rb#8 + # pkg:gem/rubocop-performance#lib/rubocop/performance/inject.rb:8 def defaults!; end end end -# source://rubocop-performance//lib/rubocop/performance.rb#6 +# pkg:gem/rubocop-performance#lib/rubocop/performance.rb:6 RuboCop::Performance::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) # This module holds the RuboCop Performance version information. # -# source://rubocop-performance//lib/rubocop/performance/version.rb#6 +# pkg:gem/rubocop-performance#lib/rubocop/performance/version.rb:6 module RuboCop::Performance::Version class << self - # source://rubocop-performance//lib/rubocop/performance/version.rb#9 + # pkg:gem/rubocop-performance#lib/rubocop/performance/version.rb:9 def document_version; end end end -# source://rubocop-performance//lib/rubocop/performance/version.rb#7 +# pkg:gem/rubocop-performance#lib/rubocop/performance/version.rb:7 RuboCop::Performance::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop-shopify@2.9.0.rbi b/sorbet/rbi/gems/rubocop-shopify@2.9.0.rbi index 89397ad6a..85953819d 100644 --- a/sorbet/rbi/gems/rubocop-shopify@2.9.0.rbi +++ b/sorbet/rbi/gems/rubocop-shopify@2.9.0.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `rubocop-shopify` gem. # Please instead update this file by running `bin/tapioca gem rubocop-shopify`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi index f7a2eb20c..69979db4f 100644 --- a/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +++ b/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi @@ -4,13 +4,55 @@ # This is an autogenerated file for types exported from the `rubocop-sorbet` gem. # Please instead update this file by running `bin/tapioca gem rubocop-sorbet`. -# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#2 + +# Correct `send` expressions in include statements by constant literals. +# +# Sorbet, the static checker, is not (yet) able to support constructs on the +# following form: +# +# ```ruby +# class MyClass +# include send_expr +# end +# ``` +# +# Multiple occurences of this can be found in Shopify's code base like: +# +# ```ruby +# include Rails.application.routes.url_helpers +# ``` +# or +# ```ruby +# include Polaris::Engine.helpers +# ``` +# Correct superclass `send` expressions by constant literals. +# +# Sorbet, the static checker, is not (yet) able to support constructs on the +# following form: +# +# ```ruby +# class Foo < send_expr; end +# ``` +# +# Multiple occurences of this can be found in Shopify's code base like: +# +# ```ruby +# class ShopScope < Component::TrustedIdScope[ShopIdentity::ShopId] +# ``` +# or +# ```ruby +# class ApiClientEligibility < Struct.new(:api_client, :match_results, :shop) +# ``` +# The original code is from https://github.com/rubocop-hq/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb +# See https://github.com/rubocop-hq/rubocop-rspec/blob/master/MIT-LICENSE.md +# +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/version.rb:2 module RuboCop; end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#6 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:6 module RuboCop::Cop; end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#7 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:7 module RuboCop::Cop::Sorbet; end # This cop disallows using `.override(allow_incompatible: true)`. @@ -27,23 +69,21 @@ module RuboCop::Cop::Sorbet; end # # good # sig.override # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#21 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:21 class RuboCop::Cop::Sorbet::AllowIncompatibleOverride < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#35 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:35 def allow_incompatible?(param0); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#39 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:39 def allow_incompatible_override?(param0 = T.unsafe(nil)); end - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#31 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:31 def not_nil?(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#48 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:48 def on_send(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#22 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:22 def sig?(param0); end end @@ -58,56 +98,48 @@ end # # good # FooOrBar = T.type_alias { T.any(Foo, Bar) } # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#18 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:18 class RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#116 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:116 def autocorrect(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#19 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:19 def binding_unaliased_type?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#51 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:51 def dynamic_type_creation_with_block?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#66 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:66 def generic_parameter_decl_block_call?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#60 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:60 def generic_parameter_decl_call?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#72 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:72 def method_needing_aliasing_on_t?(param0); end - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#85 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:85 def not_dynamic_type_creation_with_block?(node); end - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#89 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:89 def not_generic_parameter_decl?(node); end - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#93 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:93 def not_nil?(node); end - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#81 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:81 def not_t_let?(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#97 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:97 def on_casgn(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#41 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:41 def t_let?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#32 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:32 def using_deprecated_type_alias_syntax?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#23 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:23 def using_type_alias?(param0 = T.unsafe(nil)); end end @@ -122,35 +154,35 @@ end # # # bad # class Post < ApplicationRecord -# before_create :do_it, if: -> { should_do_it? } +# before_create :do_it, if: -> { should_do_it? } # -# def should_do_it? -# true -# end +# def should_do_it? +# true +# end # end # # # good # class Post < ApplicationRecord -# before_create :do_it, if: -> { -# T.bind(self, Post) -# should_do_it? -# } -# -# def should_do_it? -# true -# end +# before_create :do_it, if: -> { +# T.bind(self, Post) +# should_do_it? +# } +# +# def should_do_it? +# true +# end # end # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#35 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:35 class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#47 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:47 def autocorrect(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#99 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:99 def on_send(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#36 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:36 RuboCop::Cop::Sorbet::CallbackConditionalsBinding::CALLBACKS = T.let(T.unsafe(nil), Array) # This cop disallows the usage of `checked(true)`. This usage could cause @@ -167,18 +199,18 @@ RuboCop::Cop::Sorbet::CallbackConditionalsBinding::CALLBACKS = T.let(T.unsafe(ni # # good # sig { void } # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#22 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:22 class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Sorbet::SignatureCop include ::RuboCop::Cop::RangeHelp - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#25 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:25 def offending_node(param0); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#36 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:36 def on_signature(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#29 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:29 RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), String) # This cop disallows the calls that are used to get constants fom Strings @@ -202,20 +234,20 @@ RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), Str # # good # case class_name # when "User" -# User +# User # else -# raise ArgumentError +# raise ArgumentError # end # # # good # { "User" => User }.fetch(class_name) # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#36 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:36 class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#37 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:37 def constant_from_string?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#41 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:41 def on_send(node); end end @@ -238,42 +270,42 @@ end # Only `typed`, `(en)?coding`, `warn_indent` and `frozen_string_literal` magic comments are considered, # other comments or magic comments are left in the same place. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#30 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:30 class RuboCop::Cop::Sorbet::EnforceSigilOrder < ::RuboCop::Cop::Sorbet::ValidSigil include ::RuboCop::Cop::RangeHelp - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#42 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:42 def autocorrect(_node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#33 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:33 def investigate(processed_source); end protected # checks # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#91 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:91 def check_magic_comments_order(tokens); end # Get all the tokens in `processed_source` that match `MAGIC_REGEX` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#83 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:83 def extract_magic_comments(processed_source); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#67 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:67 RuboCop::Cop::Sorbet::EnforceSigilOrder::CODING_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#69 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:69 RuboCop::Cop::Sorbet::EnforceSigilOrder::FROZEN_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#68 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:68 RuboCop::Cop::Sorbet::EnforceSigilOrder::INDENT_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#78 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:78 RuboCop::Cop::Sorbet::EnforceSigilOrder::MAGIC_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#71 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:71 RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), Hash) # This cop checks that every method definition and attribute accessor has a Sorbet signature. @@ -296,86 +328,70 @@ RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), # * `ParameterTypePlaceholder`: placeholders used for parameter types (default: 'T.untyped') # * `ReturnTypePlaceholder`: placeholders used for return types (default: 'T.untyped') # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#29 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:29 class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Sorbet::SignatureCop - # @return [EnforceSignatures] a new instance of EnforceSignatures - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#30 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:30 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#35 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:35 def accessor?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#55 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:55 def autocorrect(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#39 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:39 def on_def(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#43 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:43 def on_defs(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#47 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:47 def on_send(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#51 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:51 def on_signature(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#74 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:74 def scope(node); end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#82 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:82 def check_node(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#93 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:93 def param_type_placeholder; end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#97 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:97 def return_type_placeholder; end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#101 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:101 class RuboCop::Cop::Sorbet::EnforceSignatures::SigSuggestion - # @return [SigSuggestion] a new instance of SigSuggestion - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:104 def initialize(indent, param_placeholder, return_placeholder); end - # Returns the value of attribute params. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#102 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:102 def params; end - # Sets the attribute params - # - # @param value the value to set the attribute params to. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#102 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:102 def params=(_arg0); end - # Returns the value of attribute returns. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#102 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:102 def returns; end - # Sets the attribute returns - # - # @param value the value to set the attribute returns to. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#102 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:102 def returns=(_arg0); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#112 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:112 def to_autocorrect; end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#124 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:124 def generate_params; end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#135 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:135 def generate_return; end end @@ -395,27 +411,27 @@ end # # Other comments or magic comments are left in place. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#26 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:26 class RuboCop::Cop::Sorbet::EnforceSingleSigil < ::RuboCop::Cop::Sorbet::ValidSigil include ::RuboCop::Cop::RangeHelp - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#39 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:39 def autocorrect(_node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#29 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:29 def investigate(processed_source); end protected - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#55 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:55 def extract_all_sigils(processed_source); end end # This cop makes the Sorbet `false` sigil mandatory in all files. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/false_sigil.rb#10 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/false_sigil.rb:10 class RuboCop::Cop::Sorbet::FalseSigil < ::RuboCop::Cop::Sorbet::HasSigil - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/false_sigil.rb#11 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/false_sigil.rb:11 def minimum_strictness; end end @@ -426,72 +442,64 @@ end # # # bad # module SomeModule -# extend T::Sig -# extend T::Helpers +# extend T::Sig +# extend T::Helpers # -# sig { returns(String) } -# def foo; end +# sig { returns(String) } +# def foo; end # end # # # good # module SomeModule -# sig { returns(String) } -# def foo; end +# sig { returns(String) } +# def foo; end # end # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#25 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:25 class RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims < ::RuboCop::Cop::Cop include ::RuboCop::Cop::RangeHelp - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#39 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:39 def autocorrect(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#35 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:35 def extend_t_helpers?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#31 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:31 def extend_t_sig?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#47 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:47 def on_send(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#28 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:28 RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#29 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:29 RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#29 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:29 class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Cop - # @return [ForbidIncludeConstLiteral] a new instance of ForbidIncludeConstLiteral - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#40 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:40 def initialize(*_arg0); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#56 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:56 def autocorrect(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#34 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:34 def not_lit_const_include?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#45 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:45 def on_send(node); end - # Returns the value of attribute used_names. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#32 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:32 def used_names; end - # Sets the attribute used_names - # - # @param value the value to set the attribute used_names to. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#32 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:32 def used_names=(_arg0); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#30 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:30 RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), String) # This cop makes sure that RBI files are always located under the defined allowed paths. @@ -509,29 +517,29 @@ RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), Stri # # sorbet/rbi/some_file.rbi # # sorbet/rbi/any/path/for/file.rbi # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#22 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:22 class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Cop include ::RuboCop::Cop::RangeHelp - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#25 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:25 def investigate(processed_source); end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#57 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:57 def allowed_paths; end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#27 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:27 class RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#30 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:30 def not_lit_const_superclass?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#38 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:38 def on_class(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#28 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:28 RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String) # This cop disallows using `T.unsafe` anywhere. @@ -544,12 +552,12 @@ RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), S # # good # foo # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#17 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:17 class RuboCop::Cop::Sorbet::ForbidTUnsafe < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#20 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:20 def on_send(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#18 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:18 def t_unsafe?(param0 = T.unsafe(nil)); end end @@ -565,12 +573,12 @@ end # sig { params(my_argument: String).void } # def foo(my_argument); end # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#20 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:20 class RuboCop::Cop::Sorbet::ForbidTUntyped < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#23 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:23 def on_send(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#21 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:21 def t_untyped?(param0 = T.unsafe(nil)); end end @@ -581,38 +589,38 @@ end # # # bad # class SomeClass -# const :foo, T.untyped -# prop :bar, T.nilable(T.untyped) +# const :foo, T.untyped +# prop :bar, T.nilable(T.untyped) # end # # # good # class SomeClass -# const :foo, Integer -# prop :bar, T.nilable(String) +# const :foo, Integer +# prop :bar, T.nilable(String) # end # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#25 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:25 class RuboCop::Cop::Sorbet::ForbidUntypedStructProps < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#48 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:48 def on_class(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#40 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:40 def subclass_of_t_struct?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#36 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:36 def t_nilable_untyped(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#28 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:28 def t_struct(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#32 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:32 def t_untyped(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#44 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:44 def untyped_props(param0); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#26 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:26 RuboCop::Cop::Sorbet::ForbidUntypedStructProps::MSG = T.let(T.unsafe(nil), String) # This cop makes the Sorbet typed sigil mandatory in all files. @@ -624,19 +632,19 @@ RuboCop::Cop::Sorbet::ForbidUntypedStructProps::MSG = T.let(T.unsafe(nil), Strin # # If a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#17 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/has_sigil.rb:17 class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil - # @return [Boolean] + # So we can properly subclass this cop # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#20 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/has_sigil.rb:20 def require_sigil_on_all_files?; end end # This cop makes the Sorbet `ignore` sigil mandatory in all files. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb#10 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb:10 class RuboCop::Cop::Sorbet::IgnoreSigil < ::RuboCop::Cop::Sorbet::HasSigil - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb#11 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb:11 def minimum_strictness; end end @@ -655,24 +663,24 @@ end # sig { params(b: String, a: Integer).void } # def foo(b:, a: 1); end # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#23 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:23 class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Sorbet::SignatureCop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#24 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:24 def on_signature(node); end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#34 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:34 def check_order_for_kwoptargs(parameters); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#8 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:8 module RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#15 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:15 def on_assignment(value); end class << self - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#9 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:9 def prepended(base); end end end @@ -684,66 +692,64 @@ end # # # bad # module SomeModule -# requires_ancestor Kernel, Minitest::Assertions +# requires_ancestor Kernel, Minitest::Assertions # end # # # good # module SomeModule -# requires_ancestor Kernel -# requires_ancestor Minitest::Assertions +# requires_ancestor Kernel +# requires_ancestor Minitest::Assertions # end # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#24 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:24 class RuboCop::Cop::Sorbet::OneAncestorPerLine < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#35 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:35 def abstract?(param0); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#51 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:51 def autocorrect(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#31 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:31 def more_than_one_ancestor(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#45 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:45 def on_class(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#39 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:39 def on_module(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#27 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:27 def requires_ancestors(param0); end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#67 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:67 def new_ra_line(indent_count); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#61 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:61 def process_node(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#25 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:25 RuboCop::Cop::Sorbet::OneAncestorPerLine::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#15 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:15 class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Sorbet::SignatureCop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#54 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:54 def autocorrect(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#34 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:34 def on_signature(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#30 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:30 def root_call(param0); end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#96 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:96 def call_chain(sig_child_node); end - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#92 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:92 def can_autocorrect?; end # This method exists to reparse the current node with modern features enabled. @@ -751,40 +757,40 @@ class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Sorbet::Signat # "index sends" (i.e. `[]` calls) back to index accessors (i.e. as `foo[bar]``). # Otherwise, we would get the unparsed node as `foo.[](bar)`. # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#83 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:83 def node_reparsed_with_modern_features(node); end end # Create a subclass of AST Builder that has modern features turned on # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#72 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:72 class RuboCop::Cop::Sorbet::SignatureBuildOrder::ModernBuilder < ::RuboCop::AST::Builder; end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#16 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:16 RuboCop::Cop::Sorbet::SignatureBuildOrder::ORDER = T.let(T.unsafe(nil), Hash) # Abstract cop specific to Sorbet signatures # # You can subclass it to use the `on_signature` trigger and the `signature?` node matcher. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#11 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_cop.rb:11 class RuboCop::Cop::Sorbet::SignatureCop < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#26 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_cop.rb:26 def allowed_recv(recv); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#33 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_cop.rb:33 def on_block(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#37 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_cop.rb:37 def on_signature(_); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#14 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_cop.rb:14 def signature?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#18 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_cop.rb:18 def with_runtime?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#22 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_cop.rb:22 def without_runtime?(param0 = T.unsafe(nil)); end end @@ -800,50 +806,50 @@ end # # good # module SomeModule; end # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#17 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:17 class RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#28 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:28 def autocorrect(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#24 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:24 def on_class(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#20 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:20 def on_module(node); end protected - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#34 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:34 def convert_newlines(source); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#38 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:38 def process_node(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#18 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:18 RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions::MSG = T.let(T.unsafe(nil), String) # This cop makes the Sorbet `strict` sigil mandatory in all files. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#10 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strict_sigil.rb:10 class RuboCop::Cop::Sorbet::StrictSigil < ::RuboCop::Cop::Sorbet::HasSigil - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#11 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strict_sigil.rb:11 def minimum_strictness; end end # This cop makes the Sorbet `strong` sigil mandatory in all files. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strong_sigil.rb#10 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strong_sigil.rb:10 class RuboCop::Cop::Sorbet::StrongSigil < ::RuboCop::Cop::Sorbet::HasSigil - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strong_sigil.rb#11 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strong_sigil.rb:11 def minimum_strictness; end end # This cop makes the Sorbet `true` sigil mandatory in all files. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/true_sigil.rb#10 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/true_sigil.rb:10 class RuboCop::Cop::Sorbet::TrueSigil < ::RuboCop::Cop::Sorbet::HasSigil - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/true_sigil.rb#11 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/true_sigil.rb:11 def minimum_strictness; end end @@ -857,16 +863,16 @@ end # # good # FooOrBar = T.type_alias { T.any(Foo, Bar) } # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#17 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:17 class RuboCop::Cop::Sorbet::TypeAliasName < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#20 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:20 def casgn_type_alias?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#32 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:32 def on_casgn(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#18 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:18 RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String) # This cop checks that every Ruby file contains a valid Sorbet sigil. @@ -880,63 +886,63 @@ RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String) # # If a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#18 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:18 class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#33 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:33 def autocorrect(_node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#21 + # So we can properly subclass this cop + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:21 def investigate(processed_source); end protected # checks # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#68 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:68 def check_sigil_present(sigil); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#125 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:125 def check_strictness_level(sigil, strictness); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#103 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:103 def check_strictness_not_empty(sigil, strictness); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#114 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:114 def check_strictness_valid(sigil, strictness); end # extraction # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#56 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:56 def extract_sigil(processed_source); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#62 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:62 def extract_strictness(sigil); end # Default is `nil` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#155 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:155 def minimum_strictness; end # Default is `false` # - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#144 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:144 def require_sigil_on_all_files?; end # Default is `'false'` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#149 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:149 def suggested_strictness; end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#84 + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:84 def suggested_strictness_level(minimum_strictness, suggested_strictness); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#52 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:52 RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#51 +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:51 RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) module RuboCop::Cop::Style; end @@ -945,31 +951,31 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour end -# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#3 +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/version.rb:3 module RuboCop::Sorbet; end -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#11 +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet.rb:11 RuboCop::Sorbet::CONFIG = T.let(T.unsafe(nil), Hash) -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#10 +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet.rb:10 RuboCop::Sorbet::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#7 +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet.rb:7 class RuboCop::Sorbet::Error < ::StandardError; end # Because RuboCop doesn't yet support plugins, we have to monkey patch in a # bit of our configuration. # -# source://rubocop-sorbet//lib/rubocop/sorbet/inject.rb#9 +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/inject.rb:9 module RuboCop::Sorbet::Inject class << self - # source://rubocop-sorbet//lib/rubocop/sorbet/inject.rb#10 + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/inject.rb:10 def defaults!; end end end -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#9 +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet.rb:9 RuboCop::Sorbet::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) -# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#4 +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/version.rb:4 RuboCop::Sorbet::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop@1.64.1.rbi b/sorbet/rbi/gems/rubocop@1.64.1.rbi deleted file mode 100644 index bc3c33a18..000000000 --- a/sorbet/rbi/gems/rubocop@1.64.1.rbi +++ /dev/null @@ -1,58089 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop` gem. -# Please instead update this file by running `bin/tapioca gem rubocop`. - -class Parser::Source::Comment - include ::RuboCop::Ext::Comment -end - -class Parser::Source::Range - include ::RuboCop::Ext::Range -end - -class Regexp::Expression::Base - include ::RuboCop::Ext::RegexpParser::Expression::Base -end - -class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression - include ::RuboCop::Ext::RegexpParser::Expression::CharacterSet -end - -class Regexp::Expression::Quantifier - include ::RuboCop::Ext::RegexpParser::Expression::Base -end - -# source://rubocop//lib/rubocop/version.rb#3 -module RuboCop; end - -class RuboCop::AST::ProcessedSource - include ::RuboCop::Ext::ProcessedSource -end - -class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node - include ::RuboCop::Ext::RegexpNode -end - -# This is a class that reads optional command line arguments to rubocop from environment variable. -# -# @api private -# -# source://rubocop//lib/rubocop/arguments_env.rb#6 -class RuboCop::ArgumentsEnv - class << self - # @api private - # - # source://rubocop//lib/rubocop/arguments_env.rb#7 - def read_as_arguments; end - end -end - -# This is a class that reads optional command line arguments to rubocop from .rubocop file. -# -# @api private -# -# source://rubocop//lib/rubocop/arguments_file.rb#6 -class RuboCop::ArgumentsFile - class << self - # @api private - # - # source://rubocop//lib/rubocop/arguments_file.rb#7 - def read_as_arguments; end - end -end - -# The CLI is a class responsible of handling all the command line interface -# logic. -# -# source://rubocop//lib/rubocop/cli.rb#8 -class RuboCop::CLI - # @return [CLI] a new instance of CLI - # - # source://rubocop//lib/rubocop/cli.rb#24 - def initialize; end - - # Returns the value of attribute config_store. - # - # source://rubocop//lib/rubocop/cli.rb#22 - def config_store; end - - # Returns the value of attribute options. - # - # source://rubocop//lib/rubocop/cli.rb#22 - def options; end - - # Entry point for the application logic. Here we - # do the command line arguments processing and inspect - # the target files. - # - # - # @api public - # @param args [Array] command line arguments - # @return [Integer] UNIX exit code - # - # source://rubocop//lib/rubocop/cli.rb#39 - def run(args = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cli.rb#156 - def act_on_options; end - - # source://rubocop//lib/rubocop/cli.rb#198 - def apply_default_formatter; end - - # source://rubocop//lib/rubocop/cli.rb#125 - def execute_runners; end - - # source://rubocop//lib/rubocop/cli.rb#182 - def handle_editor_mode; end - - # @raise [Finished] - # - # source://rubocop//lib/rubocop/cli.rb#187 - def handle_exiting_options; end - - # source://rubocop//lib/rubocop/cli.rb#144 - def parallel_by_default!; end - - # source://rubocop//lib/rubocop/cli.rb#80 - def profile_if_needed; end - - # source://rubocop//lib/rubocop/cli.rb#113 - def require_gem(name); end - - # source://rubocop//lib/rubocop/cli.rb#121 - def run_command(name); end - - # source://rubocop//lib/rubocop/cli.rb#174 - def set_options_to_config_loader; end - - # source://rubocop//lib/rubocop/cli.rb#133 - def suggest_extensions; end - - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/cli.rb#137 - def validate_options_vs_config; end -end - -# Home of subcommands in the CLI. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command.rb#7 -module RuboCop::CLI::Command - class << self - # Find the command with a given name and run it in an environment. - # - # @api private - # - # source://rubocop//lib/rubocop/cli/command.rb#10 - def run(env, name); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cli/command.rb#16 - def class_for(name); end - end -end - -# Generate a configuration file acting as a TODO list. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#8 -class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#25 - def run; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#107 - def add_formatter; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#115 - def add_inheritance_from_auto_generated_file(config_file); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#111 - def execute_runner; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#136 - def existing_configuration(config_file); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#65 - def line_length_cop(config); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#53 - def line_length_enabled?(config); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#61 - def max_line_length(config); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#34 - def maybe_run_line_length_cop; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#73 - def only_exclude?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#162 - def options_config_in_root?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#69 - def options_has_only_flag?; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#153 - def relative_path_to_todo_from_options_config; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#100 - def reset_config_and_auto_gen_file; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#91 - def run_all_cops(line_length_contents); end - - # Do an initial run with only Layout/LineLength so that cops that - # depend on Layout/LineLength:Max get the correct value for that - # parameter. - # - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#80 - def run_line_length_cop; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#57 - def same_max_line_length?(config1, config2); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#48 - def skip_line_length_cop(reason); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#142 - def write_config_file(file_name, file_string, rubocop_yml_contents); end -end - -# @api private -# -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#11 -RuboCop::CLI::Command::AutoGenerateConfig::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#15 -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1 = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#19 -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_DISABLED = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#18 -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#20 -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_COPS = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#22 -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_EXCLUDE = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#16 -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_2 = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#13 -RuboCop::CLI::Command::AutoGenerateConfig::PLACEHOLDER = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#12 -RuboCop::CLI::Command::AutoGenerateConfig::YAML_OPTIONAL_DOC_START = T.let(T.unsafe(nil), Regexp) - -# A subcommand in the CLI. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/base.rb#8 -class RuboCop::CLI::Command::Base - # @api private - # @return [Base] a new instance of Base - # - # source://rubocop//lib/rubocop/cli/command/base.rb#26 - def initialize(env); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/base.rb#9 - def env; end - - class << self - # @api private - # - # source://rubocop//lib/rubocop/cli/command/base.rb#21 - def by_command_name(name); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/base.rb#14 - def command_name; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/base.rb#14 - def command_name=(_arg0); end - - # @api private - # @private - # - # source://rubocop//lib/rubocop/cli/command/base.rb#16 - def inherited(subclass); end - end -end - -# Run all the selected cops and report the result. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/execute_runner.rb#8 -class RuboCop::CLI::Command::ExecuteRunner < ::RuboCop::CLI::Command::Base - include ::RuboCop::Formatter::TextUtil - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#16 - def run; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#85 - def bug_tracker_uri; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#69 - def display_error_summary(errors); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#56 - def display_summary(runner); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#61 - def display_warning_summary(warnings); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#22 - def execute_runner(paths); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#91 - def maybe_print_corrected_source; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#42 - def with_redirect; end -end - -# Combination of short and long formatter names. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/execute_runner.rb#12 -RuboCop::CLI::Command::ExecuteRunner::INTEGRATION_FORMATTERS = T.let(T.unsafe(nil), Array) - -# Generate a .rubocop.yml file in the current directory. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#8 -class RuboCop::CLI::Command::InitDotfile < ::RuboCop::CLI::Command::Base - # @api private - # - # source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#13 - def run; end -end - -# @api private -# -# source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#9 -RuboCop::CLI::Command::InitDotfile::DOTFILE = T.let(T.unsafe(nil), String) - -# Start Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/lsp.rb#10 -class RuboCop::CLI::Command::LSP < ::RuboCop::CLI::Command::Base - # @api private - # - # source://rubocop//lib/rubocop/cli/command/lsp.rb#13 - def run; end -end - -# Shows the given cops, or all cops by default, and their configurations -# for the current directory. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/show_cops.rb#9 -class RuboCop::CLI::Command::ShowCops < ::RuboCop::CLI::Command::Base - # @api private - # @return [ShowCops] a new instance of ShowCops - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#12 - def initialize(env); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#19 - def run; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#67 - def config_lines(cop); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#63 - def cops_of_department(cops, department); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#25 - def print_available_cops; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#48 - def print_cop_details(cops); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#36 - def print_cops_of_department(registry, department, show_all); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#57 - def selected_cops_of_department(cops, department); end -end - -# Prints out url to documentation of provided cops -# or documentation base url by default. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#9 -class RuboCop::CLI::Command::ShowDocsUrl < ::RuboCop::CLI::Command::Base - # @api private - # @return [ShowDocsUrl] a new instance of ShowDocsUrl - # - # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#12 - def initialize(env); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#18 - def run; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#38 - def cops_array; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#24 - def print_documentation_url; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#42 - def registry_hash; end -end - -# Suggest RuboCop extensions to install based on Gemfile dependencies. -# Only primary dependencies are evaluated, so if a dependency depends on a -# gem with an extension, it is not suggested. However, if an extension is -# a transitive dependency, it will not be suggested. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#11 -class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#17 - def run; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#73 - def all_extensions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#69 - def current_formatter; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#111 - def dependent_gems; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#87 - def extensions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#103 - def installed_and_not_loaded_extensions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#91 - def installed_extensions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#115 - def installed_gems; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#99 - def loaded_extensions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#107 - def lockfile; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#95 - def not_installed_extensions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#41 - def print_install_suggestions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#51 - def print_load_suggestions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#60 - def print_opt_out_instruction; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#119 - def puts(*args); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#30 - def skip?; end -end - -# Combination of short and long formatter names. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#13 -RuboCop::CLI::Command::SuggestExtensions::INCLUDED_FORMATTERS = T.let(T.unsafe(nil), Array) - -# Display version. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/version.rb#8 -class RuboCop::CLI::Command::Version < ::RuboCop::CLI::Command::Base - # @api private - # - # source://rubocop//lib/rubocop/cli/command/version.rb#11 - def run; end -end - -# source://rubocop//lib/rubocop/cli.rb#13 -RuboCop::CLI::DEFAULT_PARALLEL_OPTIONS = T.let(T.unsafe(nil), Array) - -# Execution environment for a CLI command. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/environment.rb#7 -class RuboCop::CLI::Environment - # @api private - # @return [Environment] a new instance of Environment - # - # source://rubocop//lib/rubocop/cli/environment.rb#10 - def initialize(options, config_store, paths); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/environment.rb#8 - def config_store; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/environment.rb#8 - def options; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/environment.rb#8 - def paths; end - - # Run a command in this environment. - # - # @api private - # - # source://rubocop//lib/rubocop/cli/environment.rb#17 - def run(name); end -end - -# source://rubocop//lib/rubocop/cli.rb#20 -class RuboCop::CLI::Finished < ::StandardError; end - -# source://rubocop//lib/rubocop/cli.rb#11 -RuboCop::CLI::STATUS_ERROR = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cli.rb#12 -RuboCop::CLI::STATUS_INTERRUPTED = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cli.rb#10 -RuboCop::CLI::STATUS_OFFENSES = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cli.rb#9 -RuboCop::CLI::STATUS_SUCCESS = T.let(T.unsafe(nil), Integer) - -# This class represents the cache config of the caching RuboCop runs. -# -# @api private -# -# source://rubocop//lib/rubocop/cache_config.rb#6 -class RuboCop::CacheConfig - class << self - # @api private - # - # source://rubocop//lib/rubocop/cache_config.rb#7 - def root_dir; end - end -end - -# Converts RuboCop objects to and from the serialization format JSON. -# -# @api private -# -# source://rubocop//lib/rubocop/cached_data.rb#8 -class RuboCop::CachedData - # @api private - # @return [CachedData] a new instance of CachedData - # - # source://rubocop//lib/rubocop/cached_data.rb#9 - def initialize(filename); end - - # @api private - # - # source://rubocop//lib/rubocop/cached_data.rb#13 - def from_json(text); end - - # @api private - # - # source://rubocop//lib/rubocop/cached_data.rb#17 - def to_json(offenses); end - - private - - # Restore an offense object loaded from a JSON file. - # - # @api private - # - # source://rubocop//lib/rubocop/cached_data.rb#47 - def deserialize_offenses(offenses); end - - # @api private - # - # source://rubocop//lib/rubocop/cached_data.rb#56 - def location_from_source_buffer(offense, source_buffer); end - - # @api private - # - # source://rubocop//lib/rubocop/cached_data.rb#40 - def message(offense); end - - # @api private - # - # source://rubocop//lib/rubocop/cached_data.rb#23 - def serialize_offense(offense); end -end - -# and provides a way to check if each cop is enabled at arbitrary line. -# -# source://rubocop//lib/rubocop/comment_config.rb#6 -class RuboCop::CommentConfig - extend ::Forwardable - - # @return [CommentConfig] a new instance of CommentConfig - # - # source://rubocop//lib/rubocop/comment_config.rb#34 - def initialize(processed_source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/comment_config.rb#63 - def comment_only_line?(line_number); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def config(*args, **_arg1, &block); end - - # source://rubocop//lib/rubocop/comment_config.rb#51 - def cop_disabled_line_ranges; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/comment_config.rb#39 - def cop_enabled_at_line?(cop, line_number); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/comment_config.rb#47 - def cop_opted_in?(cop); end - - # source://rubocop//lib/rubocop/comment_config.rb#55 - def extra_enabled_comments; end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/comment_config.rb#30 - def processed_source; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def registry(*args, **_arg1, &block); end - - private - - # source://rubocop//lib/rubocop/comment_config.rb#96 - def analyze; end - - # source://rubocop//lib/rubocop/comment_config.rb#124 - def analyze_cop(analysis, directive); end - - # source://rubocop//lib/rubocop/comment_config.rb#144 - def analyze_disabled(analysis, directive); end - - # source://rubocop//lib/rubocop/comment_config.rb#155 - def analyze_rest(analysis, directive); end - - # source://rubocop//lib/rubocop/comment_config.rb#135 - def analyze_single_line(analysis, directive); end - - # source://rubocop//lib/rubocop/comment_config.rb#164 - def cop_line_ranges(analysis); end - - # source://rubocop//lib/rubocop/comment_config.rb#170 - def each_directive; end - - # source://rubocop//lib/rubocop/comment_config.rb#69 - def extra_enabled_comments_with_names(extras:, names:); end - - # source://rubocop//lib/rubocop/comment_config.rb#190 - def handle_enable_all(directive, names, extras); end - - # Collect cops that have been disabled or enabled by name in a directive comment - # so that `Lint/RedundantCopEnableDirective` can register offenses correctly. - # - # source://rubocop//lib/rubocop/comment_config.rb#204 - def handle_switch(directive, names, extras); end - - # source://rubocop//lib/rubocop/comment_config.rb#115 - def inject_disabled_cops_directives(analyses); end - - # source://rubocop//lib/rubocop/comment_config.rb#183 - def non_comment_token_line_numbers; end - - # source://rubocop//lib/rubocop/comment_config.rb#83 - def opt_in_cops; end - - # source://rubocop//lib/rubocop/comment_config.rb#179 - def qualified_cop_name(cop_name); end -end - -# source://rubocop//lib/rubocop/comment_config.rb#9 -RuboCop::CommentConfig::CONFIG_DISABLED_LINE_RANGE_MIN = T.let(T.unsafe(nil), Float) - -# This class provides an API compatible with RuboCop::DirectiveComment -# to be used for cops that are disabled in the config file -# -# source://rubocop//lib/rubocop/comment_config.rb#13 -class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment - include ::RuboCop::Ext::Comment - - # @return [ConfigDisabledCopDirectiveComment] a new instance of ConfigDisabledCopDirectiveComment - # - # source://rubocop//lib/rubocop/comment_config.rb#21 - def initialize(cop_name); end - - # Returns the value of attribute line_number. - # - # source://rubocop//lib/rubocop/comment_config.rb#16 - def line_number; end - - # Returns the value of attribute loc. - # - # source://rubocop//lib/rubocop/comment_config.rb#16 - def loc; end - - # Returns the value of attribute text. - # - # source://rubocop//lib/rubocop/comment_config.rb#16 - def text; end -end - -# source://rubocop//lib/rubocop/comment_config.rb#19 -class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Expression < ::Struct - # Returns the value of attribute line - # - # @return [Object] the current value of line - def line; end - - # Sets the attribute line - # - # @param value [Object] the value to set the attribute line to. - # @return [Object] the newly set value - def line=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/comment_config.rb#18 -class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Loc < ::Struct - # Returns the value of attribute expression - # - # @return [Object] the current value of expression - def expression; end - - # Sets the attribute expression - # - # @param value [Object] the value to set the attribute expression to. - # @return [Object] the newly set value - def expression=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/comment_config.rb#28 -class RuboCop::CommentConfig::CopAnalysis < ::Struct - # Returns the value of attribute line_ranges - # - # @return [Object] the current value of line_ranges - def line_ranges; end - - # Sets the attribute line_ranges - # - # @param value [Object] the value to set the attribute line_ranges to. - # @return [Object] the newly set value - def line_ranges=(_); end - - # Returns the value of attribute start_line_number - # - # @return [Object] the current value of start_line_number - def start_line_number; end - - # Sets the attribute start_line_number - # - # @param value [Object] the value to set the attribute start_line_number to. - # @return [Object] the newly set value - def start_line_number=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# This class represents the configuration of the RuboCop application -# and all its cops. A Config is associated with a YAML configuration -# file from which it was read. Several different Configs can be used -# during a run of the rubocop program, if files in several -# directories are inspected. -# -# source://rubocop//lib/rubocop/config.rb#12 -class RuboCop::Config - include ::RuboCop::PathUtil - include ::RuboCop::FileFinder - extend ::Forwardable - - # @return [Config] a new instance of Config - # - # source://rubocop//lib/rubocop/config.rb#30 - def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def [](*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def []=(*args, **_arg1, &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#170 - def active_support_extensions_enabled?; end - - # source://rubocop//lib/rubocop/config.rb#96 - def add_excludes_from_higher_level(highest_config); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#193 - def allowed_camel_case_file?(file); end - - # Paths specified in configuration files starting with .rubocop are - # relative to the directory where that file is. Paths in other config files - # are relative to the current directory. This is so that paths in - # config/default.yml, for example, are not relative to RuboCop's config - # directory since that wouldn't work. - # - # source://rubocop//lib/rubocop/config.rb#237 - def base_dir_for_path_parameters; end - - # @return [String, nil] - # - # source://rubocop//lib/rubocop/config.rb#267 - def bundler_lock_file_path; end - - # source://rubocop//lib/rubocop/config.rb#51 - def check; end - - # @api private - # @return [Boolean] whether config for this badge has 'Include' or 'Exclude' keys - # - # source://rubocop//lib/rubocop/config.rb#142 - def clusivity_config_for_badge?(badge); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def delete(*args, **_arg1, &block); end - - # source://rubocop//lib/rubocop/config.rb#108 - def deprecation_check; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def dig(*args, **_arg1, &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#162 - def disabled_new_cops?; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def each(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def each_key(*args, **_arg1, &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#166 - def enabled_new_cops?; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def fetch(*args, **_arg1, &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#215 - def file_to_exclude?(file); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#174 - def file_to_include?(file); end - - # source://rubocop//lib/rubocop/config.rb#158 - def for_all_cops; end - - # Note: the 'Enabled' attribute is same as that returned by `for_cop` - # - # @return [Config] for the given cop merged with that of its department (if any) - # - # source://rubocop//lib/rubocop/config.rb#128 - def for_badge(badge); end - - # Note: the 'Enabled' attribute is calculated according to the department's - # and 'AllCops' configuration; other attributes are not inherited. - # - # @return [Config] for the given cop / cop name. - # - # source://rubocop//lib/rubocop/config.rb#122 - def for_cop(cop); end - - # Note: the 'Enabled' attribute will be present only if specified - # at the department's level - # - # @return [Config] for the given department name. - # - # source://rubocop//lib/rubocop/config.rb#153 - def for_department(department_name); end - - # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) - # - # source://rubocop//lib/rubocop/config.rb#292 - def gem_versions_in_target; end - - # source://rubocop//lib/rubocop/config.rb#296 - def inspect; end - - # True if this is a config file that is shipped with RuboCop - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#76 - def internal?; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def key?(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def keys(*args, **_arg1, &block); end - - # source://rubocop//lib/rubocop/config.rb#47 - def loaded_features; end - - # Returns the value of attribute loaded_path. - # - # source://rubocop//lib/rubocop/config.rb#20 - def loaded_path; end - - # source://rubocop//lib/rubocop/config.rb#81 - def make_excludes_absolute; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def map(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def merge(*args, **_arg1, &block); end - - # source://rubocop//lib/rubocop/config.rb#247 - def parser_engine; end - - # source://rubocop//lib/rubocop/config.rb#228 - def path_relative_to_config(path); end - - # source://rubocop//lib/rubocop/config.rb#224 - def patterns_to_exclude; end - - # source://rubocop//lib/rubocop/config.rb#220 - def patterns_to_include; end - - # source://rubocop//lib/rubocop/config.rb#278 - def pending_cops; end - - # Returns true if there's a chance that an Include pattern matches hidden - # files, false if that's definitely not possible. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#207 - def possibly_include_hidden?; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def replace(*args, **_arg1, &block); end - - # source://rubocop//lib/rubocop/config.rb#71 - def signature; end - - # source://rubocop//lib/rubocop/config.rb#262 - def smart_loaded_path; end - - # source://rubocop//lib/rubocop/config.rb#251 - def target_rails_version; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def target_ruby_version(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def to_h(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def to_hash(*args, **_arg1, &block); end - - # source://rubocop//lib/rubocop/config.rb#67 - def to_s; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def transform_values(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def validate(*args, **_arg1, &block); end - - # source://rubocop//lib/rubocop/config.rb#58 - def validate_after_resolution; end - - private - - # source://rubocop//lib/rubocop/config.rb#346 - def department_of(qualified_cop_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#334 - def enable_cop?(qualified_cop_name, cop_options); end - - # @param gem_version [Gem::Version] an object like `Gem::Version.new("7.1.2.3")` - # @return [Float] The major and minor version, like `7.1` - # - # source://rubocop//lib/rubocop/config.rb#321 - def gem_version_to_major_minor_float(gem_version); end - - # source://rubocop//lib/rubocop/config.rb#327 - def read_gem_versions_from_target_lockfile; end - - # @return [Float, nil] The Rails version as a `major.minor` Float. - # - # source://rubocop//lib/rubocop/config.rb#308 - def read_rails_version_from_bundler_lock_file; end - - # @return [Float, nil] The Rails version as a `major.minor` Float. - # - # source://rubocop//lib/rubocop/config.rb#303 - def target_rails_version_from_bundler_lock_file; end - - class << self - # source://rubocop//lib/rubocop/config.rb#22 - def create(hash, path, check: T.unsafe(nil)); end - end -end - -# source://rubocop//lib/rubocop/config.rb#17 -class RuboCop::Config::CopConfig < ::Struct - # Returns the value of attribute metadata - # - # @return [Object] the current value of metadata - def metadata; end - - # Sets the attribute metadata - # - # @param value [Object] the value to set the attribute metadata to. - # @return [Object] the newly set value - def metadata=(_); end - - # Returns the value of attribute name - # - # @return [Object] the current value of name - def name; end - - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/config.rb#19 -RuboCop::Config::DEFAULT_RAILS_VERSION = T.let(T.unsafe(nil), Float) - -# This class has methods related to finding configuration path. -# -# @api private -# -# source://rubocop//lib/rubocop/config_finder.rb#8 -class RuboCop::ConfigFinder - extend ::RuboCop::FileFinder - - class << self - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#19 - def find_config_path(target_dir); end - - # Returns the path RuboCop inferred as the root of the project. No file - # searches will go past this directory. - # - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#26 - def project_root; end - - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#17 - def project_root=(_arg0); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#69 - def expand_path(path); end - - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#40 - def find_project_dotfile(target_dir); end - - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#32 - def find_project_root; end - - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#44 - def find_project_root_dot_config; end - - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#54 - def find_user_dotfile; end - - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#62 - def find_user_xdg_config; end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_finder.rb#12 -RuboCop::ConfigFinder::DEFAULT_FILE = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/config_finder.rb#9 -RuboCop::ConfigFinder::DOTFILE = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/config_finder.rb#11 -RuboCop::ConfigFinder::RUBOCOP_HOME = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/config_finder.rb#10 -RuboCop::ConfigFinder::XDG_CONFIG = T.let(T.unsafe(nil), String) - -# This class represents the configuration of the RuboCop application -# and all its cops. A Config is associated with a YAML configuration -# file from which it was read. Several different Configs can be used -# during a run of the rubocop program, if files in several -# directories are inspected. -# -# source://rubocop//lib/rubocop/config_loader.rb#17 -class RuboCop::ConfigLoader - extend ::RuboCop::FileFinder - - class << self - # source://rubocop//lib/rubocop/config_loader.rb#137 - def add_excludes_from_files(config, config_file); end - - # Used to add features that were required inside a config or from - # the CLI using `--require`. - # - # @api private - # - # source://rubocop//lib/rubocop/config_loader.rb#198 - def add_loaded_features(loaded_features); end - - # source://rubocop//lib/rubocop/config_loader.rb#80 - def add_missing_namespaces(path, hash); end - - # source://rubocop//lib/rubocop/config_loader.rb#41 - def clear_options; end - - # Returns the path of .rubocop.yml searching upwards in the - # directory structure starting at the given directory where the - # inspected file is. If no .rubocop.yml is found there, the - # user's home directory is checked. If there's no .rubocop.yml - # there either, the path to the default file is returned. - # - # source://rubocop//lib/rubocop/config_loader.rb#104 - def configuration_file_for(target_dir); end - - # source://rubocop//lib/rubocop/config_loader.rb#108 - def configuration_from_file(config_file, check: T.unsafe(nil)); end - - # Returns the value of attribute debug. - # - # source://rubocop//lib/rubocop/config_loader.rb#33 - def debug; end - - # Sets the attribute debug - # - # @param value the value to set the attribute debug to. - # - # source://rubocop//lib/rubocop/config_loader.rb#33 - def debug=(_arg0); end - - # Returns the value of attribute debug. - # - # source://rubocop//lib/rubocop/config_loader.rb#33 - def debug?; end - - # source://rubocop//lib/rubocop/config_loader.rb#147 - def default_configuration; end - - # Sets the attribute default_configuration - # - # @param value the value to set the attribute default_configuration to. - # - # source://rubocop//lib/rubocop/config_loader.rb#35 - def default_configuration=(_arg0); end - - # Returns the value of attribute disable_pending_cops. - # - # source://rubocop//lib/rubocop/config_loader.rb#33 - def disable_pending_cops; end - - # Sets the attribute disable_pending_cops - # - # @param value the value to set the attribute disable_pending_cops to. - # - # source://rubocop//lib/rubocop/config_loader.rb#33 - def disable_pending_cops=(_arg0); end - - # Returns the value of attribute enable_pending_cops. - # - # source://rubocop//lib/rubocop/config_loader.rb#33 - def enable_pending_cops; end - - # Sets the attribute enable_pending_cops - # - # @param value the value to set the attribute enable_pending_cops to. - # - # source://rubocop//lib/rubocop/config_loader.rb#33 - def enable_pending_cops=(_arg0); end - - # Returns the value of attribute ignore_parent_exclusion. - # - # source://rubocop//lib/rubocop/config_loader.rb#33 - def ignore_parent_exclusion; end - - # Sets the attribute ignore_parent_exclusion - # - # @param value the value to set the attribute ignore_parent_exclusion to. - # - # source://rubocop//lib/rubocop/config_loader.rb#33 - def ignore_parent_exclusion=(_arg0); end - - # Returns the value of attribute ignore_parent_exclusion. - # - # source://rubocop//lib/rubocop/config_loader.rb#33 - def ignore_parent_exclusion?; end - - # Returns the value of attribute ignore_unrecognized_cops. - # - # source://rubocop//lib/rubocop/config_loader.rb#33 - def ignore_unrecognized_cops; end - - # Sets the attribute ignore_unrecognized_cops - # - # @param value the value to set the attribute ignore_unrecognized_cops to. - # - # source://rubocop//lib/rubocop/config_loader.rb#33 - def ignore_unrecognized_cops=(_arg0); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader.rb#155 - def inject_defaults!(project_root); end - - # source://rubocop//lib/rubocop/config_loader.rb#47 - def load_file(file, check: T.unsafe(nil)); end - - # @raise [TypeError] - # - # source://rubocop//lib/rubocop/config_loader.rb#67 - def load_yaml_configuration(absolute_path); end - - # Returns the value of attribute loaded_features. - # - # source://rubocop//lib/rubocop/config_loader.rb#36 - def loaded_features; end - - # Return a recursive merge of two hashes. That is, a normal hash merge, - # with the addition that any value that is a hash, and occurs in both - # arguments, will also be merged. And so on. - # - # source://rubocop//lib/rubocop/config_loader.rb#95 - def merge(base_hash, derived_hash); end - - # Merges the given configuration with the default one. - # - # source://rubocop//lib/rubocop/config_loader.rb#191 - def merge_with_default(config, config_file, unset_nil: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/config_loader.rb#128 - def pending_cops_only_qualified(pending_cops); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader.rb#132 - def possible_new_cops?(config); end - - # Returns the path RuboCop inferred as the root of the project. No file - # searches will go past this directory. - # - # @deprecated Use `RuboCop::ConfigFinder.project_root` instead. - # - # source://rubocop//lib/rubocop/config_loader.rb#166 - def project_root; end - - # source://rubocop//lib/rubocop/config_loader.rb#175 - def warn_on_pending_cops(pending_cops); end - - # source://rubocop//lib/rubocop/config_loader.rb#183 - def warn_pending_cop(cop); end - - private - - # source://rubocop//lib/rubocop/config_loader.rb#212 - def check_duplication(yaml_code, absolute_path); end - - # source://rubocop//lib/rubocop/config_loader.rb#204 - def file_path(file); end - - # Read the specified file, or exit with a friendly, concise message on - # stderr. Care is taken to use the standard OS exit code for a "file not - # found" error. - # - # source://rubocop//lib/rubocop/config_loader.rb#232 - def read_file(absolute_path); end - - # source://rubocop//lib/rubocop/config_loader.rb#208 - def resolver; end - - # source://rubocop//lib/rubocop/config_loader.rb#238 - def yaml_safe_load(yaml_code, filename); end - - # source://rubocop//lib/rubocop/config_loader.rb#248 - def yaml_safe_load!(yaml_code, filename); end - end -end - -# source://rubocop//lib/rubocop/config_loader.rb#20 -RuboCop::ConfigLoader::DEFAULT_FILE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/config_loader.rb#18 -RuboCop::ConfigLoader::DOTFILE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/config_loader.rb#19 -RuboCop::ConfigLoader::RUBOCOP_HOME = T.let(T.unsafe(nil), String) - -# A help class for ConfigLoader that handles configuration resolution. -# -# @api private -# -# source://rubocop//lib/rubocop/config_loader_resolver.rb#9 -class RuboCop::ConfigLoaderResolver - # When one .rubocop.yml file inherits from another .rubocop.yml file, the Include paths in the - # base configuration are relative to the directory where the base configuration file is. For the - # derived configuration, we need to make those paths relative to where the derived configuration - # file is. - # - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#45 - def fix_include_paths(base_config_path, hash, path, key, value); end - - # Return a recursive merge of two hashes. That is, a normal hash merge, - # with the addition that any value that is a hash, and occurs in both - # arguments, will also be merged. And so on. - # - # - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#99 - def merge(base_hash, derived_hash, **opts); end - - # Merges the given configuration with the default one. If - # AllCops:DisabledByDefault is true, it changes the Enabled params so that - # only cops from user configuration are enabled. If - # AllCops:EnabledByDefault is true, it changes the Enabled params so that - # only cops explicitly disabled in user configuration are disabled. - # - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#75 - def merge_with_default(config, config_file, unset_nil:); end - - # An `Enabled: true` setting in user configuration for a cop overrides an - # `Enabled: false` setting for its department. - # - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#119 - def override_department_setting_for_cops(base_hash, derived_hash); end - - # If a cop was previously explicitly enabled, but then superseded by the - # department being disabled, disable it. - # - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#136 - def override_enabled_for_disabled_departments(base_hash, derived_hash); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#19 - def resolve_inheritance(path, hash, file, debug); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#55 - def resolve_inheritance_from_gems(hash); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#10 - def resolve_requires(path, hash); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#208 - def base_configs(path, inherit_from, file); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#176 - def determine_inherit_mode(hash, key); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#152 - def disabled?(hash, department); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#156 - def duplicate_setting?(base_hash, derived_hash, key, inherited_file); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#268 - def gem_config_path(gem_name, relative_config_path); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#246 - def handle_disabled_by_default(config, new_default_configuration); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#220 - def inherited_file(path, inherit_from, file); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#204 - def merge_hashes?(base_hash, derived_hash, key); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#241 - def remote_file?(uri); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#196 - def should_merge?(mode, key); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#200 - def should_override?(mode, key); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#182 - def should_union?(derived_hash, base_hash, root_mode, key); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#264 - def transform(config, &block); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#165 - def warn_on_duplicate_setting(base_hash, derived_hash, key, **opts); end -end - -# Raised when a RuboCop configuration file is not found. -# -# source://rubocop//lib/rubocop/config_loader.rb#9 -class RuboCop::ConfigNotFoundError < ::RuboCop::Error; end - -# This class handles obsolete configuration. -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/rule.rb#4 -class RuboCop::ConfigObsoletion - # @api private - # @return [ConfigObsoletion] a new instance of ConfigObsoletion - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#35 - def initialize(config); end - - # @api private - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#41 - def reject_obsolete!; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#21 - def rules; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#21 - def warnings; end - - private - - # Cop rules are keyed by the name of the original cop - # - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#72 - def load_cop_rules(rules); end - - # Parameter rules may apply to multiple cops and multiple parameters - # and are given as an array. Each combination is turned into a separate - # rule object. - # - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#85 - def load_parameter_rules(rules); end - - # Default rules for obsoletions are in config/obsoletion.yml - # Additional rules files can be added with `RuboCop::ConfigObsoletion.files << filename` - # - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#52 - def load_rules; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#98 - def obsoletions; end - - class << self - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#24 - def files; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#24 - def files=(_arg0); end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#26 - def legacy_cop_names; end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion.rb#8 -RuboCop::ConfigObsoletion::COP_RULE_CLASSES = T.let(T.unsafe(nil), Hash) - -# Encapsulation of a ConfigObsoletion rule for changing a parameter -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#7 -class RuboCop::ConfigObsoletion::ChangedEnforcedStyles < ::RuboCop::ConfigObsoletion::ParameterRule - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#14 - def message; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#10 - def violated?; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#28 - def value; end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#8 -RuboCop::ConfigObsoletion::ChangedEnforcedStyles::BASE_MESSAGE = T.let(T.unsafe(nil), String) - -# Encapsulation of a ConfigObsoletion rule for changing a parameter -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#7 -class RuboCop::ConfigObsoletion::ChangedParameter < ::RuboCop::ConfigObsoletion::ParameterRule - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#10 - def message; end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#8 -RuboCop::ConfigObsoletion::ChangedParameter::BASE_MESSAGE = T.let(T.unsafe(nil), String) - -# Base class for ConfigObsoletion rules relating to cops -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#7 -class RuboCop::ConfigObsoletion::CopRule < ::RuboCop::ConfigObsoletion::Rule - # @api private - # @return [CopRule] a new instance of CopRule - # - # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#10 - def initialize(config, old_name); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#15 - def cop_rule?; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#19 - def message; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#8 - def old_name; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#28 - def violated?; end - - # Cop rules currently can only be failures, not warnings - # - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#24 - def warning?; end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion.rb#7 -RuboCop::ConfigObsoletion::DEFAULT_RULES_FILE = T.let(T.unsafe(nil), String) - -# Encapsulation of a ConfigObsoletion rule for splitting a cop's -# functionality into multiple new cops. -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#8 -class RuboCop::ConfigObsoletion::ExtractedCop < ::RuboCop::ConfigObsoletion::CopRule - # @api private - # @return [ExtractedCop] a new instance of ExtractedCop - # - # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#11 - def initialize(config, old_name, gem); end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#9 - def department; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#9 - def gem; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#23 - def rule_message; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#17 - def violated?; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#32 - def affected_cops; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#41 - def feature_loaded?; end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion.rb#18 -RuboCop::ConfigObsoletion::LOAD_RULES_CACHE = T.let(T.unsafe(nil), Hash) - -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion.rb#14 -RuboCop::ConfigObsoletion::PARAMETER_RULE_CLASSES = T.let(T.unsafe(nil), Hash) - -# Base class for ConfigObsoletion rules relating to parameters -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#7 -class RuboCop::ConfigObsoletion::ParameterRule < ::RuboCop::ConfigObsoletion::Rule - # @api private - # @return [ParameterRule] a new instance of ParameterRule - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#10 - def initialize(config, cop, parameter, metadata); end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 - def cop; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 - def metadata; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 - def parameter; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#17 - def parameter_rule?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#21 - def violated?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#25 - def warning?; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#39 - def alternative; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#43 - def alternatives; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#31 - def applies_to_current_ruby_version?; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#47 - def reason; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#51 - def severity; end -end - -# Encapsulation of a ConfigObsoletion rule for removing -# a previously defined cop. -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#8 -class RuboCop::ConfigObsoletion::RemovedCop < ::RuboCop::ConfigObsoletion::CopRule - # @api private - # @return [RemovedCop] a new instance of RemovedCop - # - # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#13 - def initialize(config, old_name, metadata); end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#9 - def metadata; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#9 - def old_name; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#18 - def rule_message; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#36 - def alternatives; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#32 - def reason; end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#11 -RuboCop::ConfigObsoletion::RemovedCop::BASE_MESSAGE = T.let(T.unsafe(nil), String) - -# Encapsulation of a ConfigObsoletion rule for renaming -# a cop or moving it to a new department. -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#8 -class RuboCop::ConfigObsoletion::RenamedCop < ::RuboCop::ConfigObsoletion::CopRule - # @api private - # @return [RenamedCop] a new instance of RenamedCop - # - # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#11 - def initialize(config, old_name, new_name); end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#9 - def new_name; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#16 - def rule_message; end - - private - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#22 - def moved?; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#29 - def verb; end -end - -# Abstract base class for ConfigObsoletion rules -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/rule.rb#7 -class RuboCop::ConfigObsoletion::Rule - # @api private - # @return [Rule] a new instance of Rule - # - # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#8 - def initialize(config); end - - # Does this rule relate to cops? - # - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#13 - def cop_rule?; end - - # Does this rule relate to parameters? - # - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#18 - def parameter_rule?; end - - # @api private - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#22 - def violated?; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#28 - def config; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#36 - def smart_loaded_path; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#30 - def to_sentence(collection, connector: T.unsafe(nil)); end -end - -# Encapsulation of a ConfigObsoletion rule for splitting a cop's -# functionality into multiple new cops. -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#8 -class RuboCop::ConfigObsoletion::SplitCop < ::RuboCop::ConfigObsoletion::CopRule - # @api private - # @return [SplitCop] a new instance of SplitCop - # - # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#11 - def initialize(config, old_name, metadata); end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#9 - def metadata; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#16 - def rule_message; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#22 - def alternatives; end -end - -# This class handles collecting the options for regenerating a TODO file. -# -# @api private -# -# source://rubocop//lib/rubocop/config_regeneration.rb#6 -class RuboCop::ConfigRegeneration - # Get options from the comment in the TODO file, and parse them as options - # - # @api private - # - # source://rubocop//lib/rubocop/config_regeneration.rb#12 - def options; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_regeneration.rb#29 - def generation_command; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_regeneration.rb#25 - def todo_exists?; end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_regeneration.rb#7 -RuboCop::ConfigRegeneration::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/config_regeneration.rb#8 -RuboCop::ConfigRegeneration::COMMAND_REGEX = T.let(T.unsafe(nil), Regexp) - -# @api private -# -# source://rubocop//lib/rubocop/config_regeneration.rb#9 -RuboCop::ConfigRegeneration::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# Handles caching of configurations and association of inspected -# ruby files to configurations. -# -# source://rubocop//lib/rubocop/config_store.rb#6 -class RuboCop::ConfigStore - # @return [ConfigStore] a new instance of ConfigStore - # - # source://rubocop//lib/rubocop/config_store.rb#10 - def initialize; end - - # If type (file/dir) is known beforehand, - # prefer using #for_file or #for_dir for improved performance - # - # source://rubocop//lib/rubocop/config_store.rb#52 - def for(file_or_dir); end - - # source://rubocop//lib/rubocop/config_store.rb#61 - def for_dir(dir); end - - # source://rubocop//lib/rubocop/config_store.rb#42 - def for_file(file); end - - # source://rubocop//lib/rubocop/config_store.rb#46 - def for_pwd; end - - # source://rubocop//lib/rubocop/config_store.rb#33 - def force_default_config!; end - - # source://rubocop//lib/rubocop/config_store.rb#28 - def options_config=(options_config); end - - # source://rubocop//lib/rubocop/config_store.rb#37 - def unvalidated; end - - # Returns the value of attribute validated. - # - # source://rubocop//lib/rubocop/config_store.rb#7 - def validated; end - - # Returns the value of attribute validated. - # - # source://rubocop//lib/rubocop/config_store.rb#7 - def validated?; end -end - -# Handles validation of configuration, for example cop names, parameter -# names, and Ruby versions. -# -# source://rubocop//lib/rubocop/config_validator.rb#6 -class RuboCop::ConfigValidator - extend ::Forwardable - - # @return [ConfigValidator] a new instance of ConfigValidator - # - # source://rubocop//lib/rubocop/config_validator.rb#26 - def initialize(config); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def for_all_cops(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def smart_loaded_path(*args, **_arg1, &block); end - - # source://rubocop//lib/rubocop/config_validator.rb#62 - def target_ruby_version; end - - # source://rubocop//lib/rubocop/config_validator.rb#32 - def validate; end - - # Validations that should only be run after all config resolving has - # taken place: - # * The target ruby version is only checked once the entire inheritance - # chain has been loaded so that only the final value is validated, and - # any obsolete but overridden values are ignored. - # - # source://rubocop//lib/rubocop/config_validator.rb#58 - def validate_after_resolution; end - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/config_validator.rb#66 - def validate_section_presence(name); end - - private - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/config_validator.rb#103 - def alert_about_unrecognized_cops(invalid_cop_names); end - - # source://rubocop//lib/rubocop/config_validator.rb#253 - def check_cop_config_value(hash, parent = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/config_validator.rb#76 - def check_obsoletions; end - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/config_validator.rb#83 - def check_target_ruby; end - - # source://rubocop//lib/rubocop/config_validator.rb#194 - def each_invalid_parameter(cop_name); end - - # source://rubocop//lib/rubocop/config_validator.rb#119 - def list_unknown_cops(invalid_cop_names); end - - # FIXME: Handling colors in exception messages like this is ugly. - # - # source://rubocop//lib/rubocop/config_validator.rb#273 - def param_error_message(parent, key, value, supposed_values); end - - # source://rubocop//lib/rubocop/config_validator.rb#241 - def reject_conflicting_safe_settings; end - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/config_validator.rb#232 - def reject_mutually_exclusive_defaults; end - - # source://rubocop//lib/rubocop/config_validator.rb#141 - def suggestion(name); end - - # Returns the value of attribute target_ruby. - # - # source://rubocop//lib/rubocop/config_validator.rb#74 - def target_ruby; end - - # source://rubocop//lib/rubocop/config_validator.rb#206 - def validate_enforced_styles(valid_cop_names); end - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/config_validator.rb#168 - def validate_new_cops_parameter; end - - # source://rubocop//lib/rubocop/config_validator.rb#179 - def validate_parameter_names(valid_cop_names); end - - # source://rubocop//lib/rubocop/config_validator.rb#226 - def validate_support_and_has_list(name, formats, valid); end - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/config_validator.rb#157 - def validate_syntax_cop; end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_validator.rb#10 -RuboCop::ConfigValidator::COMMON_PARAMS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/config_validator.rb#21 -RuboCop::ConfigValidator::CONFIG_CHECK_AUTOCORRECTS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/config_validator.rb#20 -RuboCop::ConfigValidator::CONFIG_CHECK_DEPARTMENTS = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/config_validator.rb#19 -RuboCop::ConfigValidator::CONFIG_CHECK_KEYS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop//lib/rubocop/config_validator.rb#12 -RuboCop::ConfigValidator::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/config_validator.rb#16 -RuboCop::ConfigValidator::NEW_COPS_VALUES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/util.rb#4 -module RuboCop::Cop; end - -# This module checks for nodes that should be aligned to the left or right. -# This amount is determined by the instance variable @column_delta. -# -# source://rubocop//lib/rubocop/cop/mixin/alignment.rb#7 -module RuboCop::Cop::Alignment - private - - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#26 - def check_alignment(items, base_column = T.unsafe(nil)); end - - # Returns the value of attribute column_delta. - # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#12 - def column_delta; end - - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#14 - def configured_indentation_width; end - - # @api public - # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#58 - def display_column(range); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#45 - def each_bad_alignment(items, base_column); end - - # @deprecated Use processed_source.comment_at_line(line) - # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#69 - def end_of_line_comment(line); end - - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#18 - def indentation(node); end - - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#22 - def offset(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#74 - def register_offense(offense_node, message_node); end - - # @api public - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#64 - def within?(inner, outer); end -end - -# source://rubocop//lib/rubocop/cop/mixin/alignment.rb#10 -RuboCop::Cop::Alignment::SPACE = T.let(T.unsafe(nil), String) - -# This class does autocorrection of nodes that should just be moved to -# the left or to the right, amount being determined by the instance -# variable column_delta. -# -# source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#8 -class RuboCop::Cop::AlignmentCorrector - extend ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::Alignment - - class << self - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#29 - def align_end(corrector, processed_source, node, align_to); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#15 - def correct(corrector, processed_source, node, column_delta); end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#13 - def processed_source; end - - private - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#124 - def alignment_column(align_to); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#40 - def autocorrect_line(corrector, line_begin_pos, expr, column_delta, taboo_ranges); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#81 - def block_comment_within?(expr); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#87 - def calculate_range(expr, line_begin_pos, column_delta); end - - # Some special kinds of string literals are not composed of literal - # characters between two delimiters: - # - The source map of `?a` responds to :begin and :end but its end is - # nil. - # - The source map of `__FILE__` responds to neither :begin nor :end. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#75 - def delimited_string_literal?(node); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#110 - def each_line(expr); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#60 - def inside_string_range(node); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#54 - def inside_string_ranges(node); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#99 - def remove(range, corrector); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#118 - def whitespace_range(node); end - end -end - -# This module encapsulates the ability to allow certain identifiers in a cop. -# -# source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#6 -module RuboCop::Cop::AllowedIdentifiers - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#9 - def allowed_identifier?(name); end - - # source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#13 - def allowed_identifiers; end -end - -# if a variable starts with a sigil it will be removed -# -# source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#7 -RuboCop::Cop::AllowedIdentifiers::SIGILS = T.let(T.unsafe(nil), String) - -# This module encapsulates the ability to allow certain methods when -# parsing. Even if the code is in offense, if it contains methods -# that are allowed. This module is equivalent to the IgnoredMethods module, -# which will be deprecated in RuboCop 2.0. -# -# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#9 -module RuboCop::Cop::AllowedMethods - private - - # @api public - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#13 - def allowed_method?(name); end - - # @api public - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#21 - def allowed_methods; end - - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#29 - def cop_config_allowed_methods; end - - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#33 - def cop_config_deprecated_values; end - - # @api public - # @deprecated Use allowed_method? instead - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#13 - def ignored_method?(name); end -end - -# This module encapsulates the ability to ignore certain lines when -# parsing. -# -# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#7 -module RuboCop::Cop::AllowedPattern - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#10 - def allowed_line?(line); end - - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#30 - def allowed_patterns; end - - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#46 - def cop_config_deprecated_methods_values; end - - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#40 - def cop_config_patterns_values; end - - # @deprecated Use allowed_line? instead - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#10 - def ignored_line?(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#23 - def matches_allowed_pattern?(line); end - - # @deprecated Use matches_allowed_pattern?? instead - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#23 - def matches_ignored_pattern?(line); end -end - -# This module encapsulates the ability to allow certain receivers in a cop. -# -# source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#6 -module RuboCop::Cop::AllowedReceivers - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#7 - def allowed_receiver?(receiver); end - - # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#29 - def allowed_receivers; end - - # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#13 - def receiver_name(receiver); end -end - -# Error raised when an unqualified cop name is used that could -# refer to two or more cops under different departments -# -# source://rubocop//lib/rubocop/cop/registry.rb#7 -class RuboCop::Cop::AmbiguousCopName < ::RuboCop::Error - # @return [AmbiguousCopName] a new instance of AmbiguousCopName - # - # source://rubocop//lib/rubocop/cop/registry.rb#11 - def initialize(name, origin, badges); end -end - -# source://rubocop//lib/rubocop/cop/registry.rb#8 -RuboCop::Cop::AmbiguousCopName::MSG = T.let(T.unsafe(nil), String) - -# Representation of an annotation comment in source code (eg. `# TODO: blah blah blah`). -# -# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#6 -class RuboCop::Cop::AnnotationComment - extend ::Forwardable - - # @param comment [Parser::Source::Comment] - # @param keywords [Array] - # @return [AnnotationComment] a new instance of AnnotationComment - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#13 - def initialize(comment, keywords); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#19 - def annotation?; end - - # Returns the range bounds for just the annotation - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#31 - def bounds; end - - # Returns the value of attribute colon. - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 - def colon; end - - # Returns the value of attribute comment. - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 - def comment; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#23 - def correct?(colon:); end - - # Returns the value of attribute keyword. - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 - def keyword; end - - # Returns the value of attribute margin. - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 - def margin; end - - # Returns the value of attribute note. - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 - def note; end - - # Returns the value of attribute space. - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 - def space; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#67 - def just_keyword_of_sentence?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#63 - def keyword_appearance?; end - - # Returns the value of attribute keywords. - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#39 - def keywords; end - - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#53 - def regex; end - - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#41 - def split_comment(comment); end -end - -# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#50 -RuboCop::Cop::AnnotationComment::KEYWORDS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) - -# Handles the `MinSize` configuration option for array-based cops -# `Style/SymbolArray` and `Style/WordArray`, which check for use of the -# relevant percent literal syntax such as `%i[...]` and `%w[...]` -# -# source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#8 -module RuboCop::Cop::ArrayMinSize - private - - # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#19 - def array_style_detected(style, ary_size); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#11 - def below_array_length?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#38 - def largest_brackets_size(style, ary_size); end - - # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#15 - def min_size_config; end - - # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#48 - def smallest_percent_size(style, ary_size); end -end - -# Common code for ordinary arrays with [] that can be written with % -# syntax. -# -# source://rubocop//lib/rubocop/cop/mixin/array_syntax.rb#7 -module RuboCop::Cop::ArraySyntax - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/array_syntax.rb#10 - def bracketed_array_of?(element_type, node); end -end - -# extend this module to signal autocorrection support -# -# source://rubocop//lib/rubocop/cop/mixin/auto_corrector.rb#6 -module RuboCop::Cop::AutoCorrector - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/auto_corrector.rb#7 - def support_autocorrect?; end -end - -# This module encapsulates the logic for autocorrect behavior for a cop. -# -# source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#6 -module RuboCop::Cop::AutocorrectLogic - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#7 - def autocorrect?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#31 - def autocorrect_enabled?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#15 - def autocorrect_requested?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#11 - def autocorrect_with_disable_uncorrectable?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#19 - def correctable?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#23 - def disable_uncorrectable?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#27 - def safe_autocorrect?; end - - private - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#51 - def disable_offense(offense_range); end - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#118 - def disable_offense_at_end_of_line(range, eol_comment); end - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#122 - def disable_offense_before_and_after(range_by_lines); end - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#61 - def disable_offense_with_eol_or_surround_comment(range); end - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#114 - def max_line_length; end - - # Expand the given range to include all of any lines it covers. Does not - # include newline at end of the last line. - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#104 - def range_by_lines(range); end - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#95 - def range_of_first_line(range); end - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#72 - def surrounding_heredoc(offense_range); end - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#83 - def surrounding_percent_array(offense_range); end -end - -# Identifier of all cops containing a department and cop name. -# -# All cops are identified by their badge. For example, the badge for -# `RuboCop::Cop::Layout::IndentationStyle` is `Layout/IndentationStyle`. -# Badges can be parsed as either `Department/CopName` or just `CopName` to -# allow for badge references in source files that omit the department for -# RuboCop to infer. -# -# source://rubocop//lib/rubocop/cop/badge.rb#12 -class RuboCop::Cop::Badge - # @return [Badge] a new instance of Badge - # - # source://rubocop//lib/rubocop/cop/badge.rb#34 - def initialize(class_name_parts); end - - # source://rubocop//lib/rubocop/cop/badge.rb#41 - def ==(other); end - - # Returns the value of attribute cop_name. - # - # source://rubocop//lib/rubocop/cop/badge.rb#13 - def cop_name; end - - # Returns the value of attribute department. - # - # source://rubocop//lib/rubocop/cop/badge.rb#13 - def department; end - - # Returns the value of attribute department_name. - # - # source://rubocop//lib/rubocop/cop/badge.rb#13 - def department_name; end - - # source://rubocop//lib/rubocop/cop/badge.rb#41 - def eql?(other); end - - # source://rubocop//lib/rubocop/cop/badge.rb#46 - def hash; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/badge.rb#51 - def match?(other); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/badge.rb#59 - def qualified?; end - - # source://rubocop//lib/rubocop/cop/badge.rb#55 - def to_s; end - - # source://rubocop//lib/rubocop/cop/badge.rb#63 - def with_department(department); end - - class << self - # source://rubocop//lib/rubocop/cop/badge.rb#27 - def camel_case(name_part); end - - # source://rubocop//lib/rubocop/cop/badge.rb#15 - def for(class_name); end - - # source://rubocop//lib/rubocop/cop/badge.rb#23 - def parse(identifier); end - end -end - -# A scaffold for concrete cops. -# -# The Cop::Base class is meant to be extended. -# -# Cops track offenses and can autocorrect them on the fly. -# -# A commissioner object is responsible for traversing the AST and invoking -# the specific callbacks on each cop. -# -# First the callback `on_new_investigation` is called; -# if a cop needs to do its own processing of the AST or depends on -# something else. -# -# Then callbacks like `on_def`, `on_send` (see AST::Traversal) are called -# with their respective nodes. -# -# Finally the callback `on_investigation_end` is called. -# -# Within these callbacks, cops are meant to call `add_offense` or -# `add_global_offense`. Use the `processed_source` method to -# get the currently processed source being investigated. -# -# In case of invalid syntax / unparsable content, -# the callback `on_other_file` is called instead of all the other -# `on_...` callbacks. -# -# Private methods are not meant for custom cops consumption, -# nor are any instance variables. -# -# source://rubocop//lib/rubocop/cop/base.rb#34 -class RuboCop::Cop::Base - include ::RuboCop::AST::Sexp - include ::RuboCop::PathUtil - include ::RuboCop::Cop::Util - include ::RuboCop::Cop::IgnoredNode - include ::RuboCop::Cop::AutocorrectLogic - extend ::RuboCop::AST::Sexp - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::ExcludeLimit - - # @return [Base] a new instance of Base - # - # source://rubocop//lib/rubocop/cop/base.rb#156 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#272 - def active_support_extensions_enabled?; end - - # Adds an offense that has no particular location. - # No correction can be applied to global offenses - # - # source://rubocop//lib/rubocop/cop/base.rb#189 - def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end - - # Adds an offense on the specified range (or node with an expression) - # Unless that offense is disabled for this range, a corrector will be yielded - # to provide the cop the opportunity to autocorrect the offense. - # If message is not specified, the method `message` will be called. - # - # source://rubocop//lib/rubocop/cop/base.rb#201 - def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#343 - def always_autocorrect?; end - - # Called before any investigation - # - # @api private - # - # source://rubocop//lib/rubocop/cop/base.rb#329 - def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/base.rb#314 - def callbacks_needed; end - - # Returns the value of attribute config. - # - # source://rubocop//lib/rubocop/cop/base.rb#43 - def config; end - - # source://rubocop//lib/rubocop/cop/base.rb#252 - def config_to_allow_offenses; end - - # source://rubocop//lib/rubocop/cop/base.rb#256 - def config_to_allow_offenses=(hash); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#349 - def contextual_autocorrect?; end - - # Configuration Helpers - # - # source://rubocop//lib/rubocop/cop/base.rb#246 - def cop_config; end - - # source://rubocop//lib/rubocop/cop/base.rb#238 - def cop_name; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#285 - def excluded_file?(file); end - - # This method should be overridden when a cop's behavior depends - # on state that lives outside of these locations: - # - # (1) the file under inspection - # (2) the cop's source code - # (3) the config (eg a .rubocop.yml file) - # - # For example, some cops may want to look at other parts of - # the codebase being inspected to find violations. A cop may - # use the presence or absence of file `foo.rb` to determine - # whether a certain violation exists in `bar.rb`. - # - # Overriding this method allows the cop to indicate to RuboCop's - # ResultCache system when those external dependencies change, - # ie when the ResultCache should be invalidated. - # - # source://rubocop//lib/rubocop/cop/base.rb#234 - def external_dependency_checksum; end - - # source://rubocop//lib/rubocop/cop/base.rb#353 - def inspect; end - - # Gets called if no message is specified when calling `add_offense` or - # `add_global_offense` - # Cops are discouraged to override this; instead pass your message directly - # - # source://rubocop//lib/rubocop/cop/base.rb#183 - def message(_range = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/base.rb#238 - def name; end - - # @deprecated Make potential errors with previous API more obvious - # - # source://rubocop//lib/rubocop/cop/base.rb#305 - def offenses; end - - # Called after all on_... have been called - # When refining this method, always call `super` - # - # source://rubocop//lib/rubocop/cop/base.rb#170 - def on_investigation_end; end - - # Called before all on_... have been called - # When refining this method, always call `super` - # - # source://rubocop//lib/rubocop/cop/base.rb#164 - def on_new_investigation; end - - # Called instead of all on_... callbacks for unrecognized files / syntax errors - # When refining this method, always call `super` - # - # source://rubocop//lib/rubocop/cop/base.rb#176 - def on_other_file; end - - # There should be very limited reasons for a Cop to do it's own parsing - # - # source://rubocop//lib/rubocop/cop/base.rb#290 - def parse(source, path = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/base.rb#264 - def parser_engine; end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/cop/base.rb#43 - def processed_source; end - - # Called between investigations - # - # @api private - # - # source://rubocop//lib/rubocop/cop/base.rb#296 - def ready; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#276 - def relevant_file?(file); end - - # source://rubocop//lib/rubocop/cop/base.rb#268 - def target_rails_version; end - - # source://rubocop//lib/rubocop/cop/base.rb#260 - def target_ruby_version; end - - private - - # source://rubocop//lib/rubocop/cop/base.rb#471 - def annotate(message); end - - # source://rubocop//lib/rubocop/cop/base.rb#365 - def apply_correction(corrector); end - - # @return [Symbol] offense status - # - # source://rubocop//lib/rubocop/cop/base.rb#435 - def attempt_correction(range, corrector); end - - # Reserved for Cop::Cop - # - # source://rubocop//lib/rubocop/cop/base.rb#361 - def callback_argument(range); end - - # Called to complete an investigation - # - # source://rubocop//lib/rubocop/cop/base.rb#394 - def complete_investigation; end - - # @return [Symbol, Corrector] offense status - # - # source://rubocop//lib/rubocop/cop/base.rb#409 - def correct(range); end - - # source://rubocop//lib/rubocop/cop/base.rb#379 - def current_corrector; end - - # Reserved for Commissioner: - # - # source://rubocop//lib/rubocop/cop/base.rb#371 - def current_offense_locations; end - - # source://rubocop//lib/rubocop/cop/base.rb#383 - def current_offenses; end - - # source://rubocop//lib/rubocop/cop/base.rb#375 - def currently_disabled_lines; end - - # source://rubocop//lib/rubocop/cop/base.rb#499 - def custom_severity; end - - # source://rubocop//lib/rubocop/cop/base.rb#495 - def default_severity; end - - # source://rubocop//lib/rubocop/cop/base.rb#449 - def disable_uncorrectable(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#485 - def enabled_line?(line_number); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#477 - def file_name_matches_any?(file, parameter, default_result); end - - # source://rubocop//lib/rubocop/cop/base.rb#467 - def find_message(range, message); end - - # source://rubocop//lib/rubocop/cop/base.rb#491 - def find_severity(_range, severity); end - - # source://rubocop//lib/rubocop/cop/base.rb#512 - def range_for_original(range); end - - # source://rubocop//lib/rubocop/cop/base.rb#456 - def range_from_node_or_range(node_or_range); end - - # Actually private methods - # - # source://rubocop//lib/rubocop/cop/base.rb#404 - def reset_investigation; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#520 - def target_satisfies_all_gem_version_requirements?; end - - # @return [Symbol] offense status - # - # source://rubocop//lib/rubocop/cop/base.rb#424 - def use_corrector(range, corrector); end - - class << self - # List of cops that should not try to autocorrect at the same - # time as this cop - # - # @api public - # @return [Array] - # - # source://rubocop//lib/rubocop/cop/base.rb#59 - def autocorrect_incompatible_with; end - - # Naming - # - # source://rubocop//lib/rubocop/cop/base.rb#93 - def badge; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/base.rb#319 - def callbacks_needed; end - - # source://rubocop//lib/rubocop/cop/base.rb#97 - def cop_name; end - - # source://rubocop//lib/rubocop/cop/base.rb#101 - def department; end - - # Returns an url to view this cops documentation online. - # Requires 'DocumentationBaseURL' to be set for your department. - # Will follow the convention of RuboCops own documentation structure, - # overwrite this method to accommodate your custom layout. - # - # @api public - # @return [String, nil] - # - # source://rubocop//lib/rubocop/cop/base.rb#70 - def documentation_url(config = T.unsafe(nil)); end - - # Call for abstract Cop classes - # - # source://rubocop//lib/rubocop/cop/base.rb#81 - def exclude_from_registry; end - - # Returns the value of attribute gem_requirements. - # - # source://rubocop//lib/rubocop/cop/base.rb#138 - def gem_requirements; end - - # @private - # - # source://rubocop//lib/rubocop/cop/base.rb#74 - def inherited(subclass); end - - # Override and return the Force class(es) you need to join - # - # source://rubocop//lib/rubocop/cop/base.rb#118 - def joining_forces; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#105 - def lint?; end - - # Returns true if the cop name or the cop namespace matches any of the - # given names. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#111 - def match?(given_names); end - - # Register a version requirement for the given gem name. - # This cop will be skipped unless the target satisfies *all* requirements. - # - # @api public - # @param gem_name [String] - # @param version_requirements [Array] The version requirements, - # using the same syntax as a Gemfile, e.g. ">= 1.2.3" - # - # If omitted, any version of the gem will be accepted. - # - # https://guides.rubygems.org/patterns/#declaring-dependencies - # - # source://rubocop//lib/rubocop/cop/base.rb#151 - def requires_gem(gem_name, *version_requirements); end - - # Returns if class supports autocorrect. - # It is recommended to extend AutoCorrector instead of overriding - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#87 - def support_autocorrect?; end - - # Override if your cop should be called repeatedly for multiple investigations - # Between calls to `on_new_investigation` and `on_investigation_end`, - # the result of `processed_source` will remain constant. - # You should invalidate any caches that depend on the current `processed_source` - # in the `on_new_investigation` callback. - # If your cop does autocorrections, be aware that your instance may be called - # multiple times with the same `processed_source.path` but different content. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#129 - def support_multiple_source?; end - - private - - # source://rubocop//lib/rubocop/cop/base.rb#387 - def restrict_on_send; end - end -end - -# source://rubocop//lib/rubocop/cop/base.rb#391 -RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) - -# Reports of an investigation. -# Immutable -# Consider creation API private -# -# source://rubocop//lib/rubocop/cop/base.rb#48 -class RuboCop::Cop::Base::InvestigationReport < ::Struct - # Returns the value of attribute cop - # - # @return [Object] the current value of cop - def cop; end - - # Sets the attribute cop - # - # @param value [Object] the value to set the attribute cop to. - # @return [Object] the newly set value - def cop=(_); end - - # Returns the value of attribute corrector - # - # @return [Object] the current value of corrector - def corrector; end - - # Sets the attribute corrector - # - # @param value [Object] the value to set the attribute corrector to. - # @return [Object] the newly set value - def corrector=(_); end - - # Returns the value of attribute offenses - # - # @return [Object] the current value of offenses - def offenses; end - - # Sets the attribute offenses - # - # @param value [Object] the value to set the attribute offenses to. - # @return [Object] the newly set value - def offenses=(_); end - - # Returns the value of attribute processed_source - # - # @return [Object] the current value of processed_source - def processed_source; end - - # Sets the attribute processed_source - # - # @param value [Object] the value to set the attribute processed_source to. - # @return [Object] the newly set value - def processed_source=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# List of methods names to restrict calls for `on_send` / `on_csend` -# -# source://rubocop//lib/rubocop/cop/base.rb#51 -RuboCop::Cop::Base::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#5 -module RuboCop::Cop::Bundler; end - -# A Gem's requirements should be listed only once in a Gemfile. -# -# @example -# # bad -# gem 'rubocop' -# gem 'rubocop' -# -# # bad -# group :development do -# gem 'rubocop' -# end -# -# group :test do -# gem 'rubocop' -# end -# -# # good -# group :development, :test do -# gem 'rubocop' -# end -# -# # good -# gem 'rubocop', groups: [:development, :test] -# -# # good - conditional declaration -# if Dir.exist?(local) -# gem 'rubocop', path: local -# elsif ENV['RUBOCOP_VERSION'] == 'master' -# gem 'rubocop', git: 'https://github.com/rubocop/rubocop.git' -# else -# gem 'rubocop', '~> 0.90.0' -# end -# -# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#39 -class RuboCop::Cop::Bundler::DuplicatedGem < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#58 - def gem_declarations(param0); end - - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#45 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#67 - def conditional_declaration?(nodes); end - - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#60 - def duplicated_gem_nodes; end - - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#81 - def register_offense(node, gem_name, line_of_first_occurrence); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#75 - def within_conditional?(node, conditional_node); end -end - -# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#42 -RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String) - -# A Gem group, or a set of groups, should be listed only once in a Gemfile. -# -# For example, if the values of `source`, `git`, `platforms`, or `path` -# surrounding `group` are different, no offense will be registered: -# -# [source,ruby] -# ----- -# platforms :ruby do -# group :default do -# gem 'openssl' -# end -# end -# -# platforms :jruby do -# group :default do -# gem 'jruby-openssl' -# end -# end -# ----- -# -# @example -# # bad -# group :development do -# gem 'rubocop' -# end -# -# group :development do -# gem 'rubocop-rails' -# end -# -# # bad (same set of groups declared twice) -# group :development, :test do -# gem 'rubocop' -# end -# -# group :test, :development do -# gem 'rspec' -# end -# -# # good -# group :development do -# gem 'rubocop' -# end -# -# group :development, :test do -# gem 'rspec' -# end -# -# # good -# gem 'rubocop', groups: [:development, :test] -# gem 'rspec', groups: [:development, :test] -# -# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#58 -class RuboCop::Cop::Bundler::DuplicatedGroup < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#66 - def group_declarations(param0); end - - # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#68 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#82 - def duplicated_group_nodes; end - - # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#105 - def find_source_key(node); end - - # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#115 - def group_attributes(node); end - - # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#94 - def register_offense(node, group_name, line_of_first_occurrence); end -end - -# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#61 -RuboCop::Cop::Bundler::DuplicatedGroup::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#63 -RuboCop::Cop::Bundler::DuplicatedGroup::SOURCE_BLOCK_NAMES = T.let(T.unsafe(nil), Array) - -# Each gem in the Gemfile should have a comment explaining -# its purpose in the project, or the reason for its version -# or source. -# -# The optional "OnlyFor" configuration array -# can be used to only register offenses when the gems -# use certain options or have version specifiers. -# -# When "version_specifiers" is included, a comment -# will be enforced if the gem has any version specifier. -# -# When "restrictive_version_specifiers" is included, a comment -# will be enforced if the gem has a version specifier that -# holds back the version of the gem. -# -# For any other value in the array, a comment will be enforced for -# a gem if an option by the same name is present. -# A useful use case is to enforce a comment when using -# options that change the source of a gem: -# -# - `bitbucket` -# - `gist` -# - `git` -# - `github` -# - `source` -# -# For a full list of options supported by bundler, -# see https://bundler.io/man/gemfile.5.html -# . -# -# @example OnlyFor: [] (default) -# # bad -# -# gem 'foo' -# -# # good -# -# # Helpers for the foo things. -# gem 'foo' -# @example OnlyFor: ['version_specifiers'] -# # bad -# -# gem 'foo', '< 2.1' -# -# # good -# -# # Version 2.1 introduces breaking change baz -# gem 'foo', '< 2.1' -# @example OnlyFor: ['restrictive_version_specifiers'] -# # bad -# -# gem 'foo', '< 2.1' -# -# # good -# -# gem 'foo', '>= 1.0' -# -# # Version 2.1 introduces breaking change baz -# gem 'foo', '< 2.1' -# @example OnlyFor: ['version_specifiers', 'github'] -# # bad -# -# gem 'foo', github: 'some_account/some_fork_of_foo' -# -# gem 'bar', '< 2.1' -# -# # good -# -# # Using this fork because baz -# gem 'foo', github: 'some_account/some_fork_of_foo' -# -# # Version 2.1 introduces breaking change baz -# gem 'bar', '< 2.1' -# -# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#83 -class RuboCop::Cop::Bundler::GemComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::VisibilityHelp - include ::RuboCop::Cop::DefNode - include ::RuboCop::Cop::GemDeclaration - - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#94 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#135 - def checked_options_present?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#109 - def commented?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#105 - def commented_any_descendant?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#159 - def contains_checked_options?(node); end - - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#163 - def gem_options(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#130 - def ignored_gem?(node); end - - # The args node1 & node2 may represent a RuboCop::AST::Node - # or a Parser::Source::Comment. Both respond to #loc. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#116 - def precede?(node1, node2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#126 - def preceding_comment?(node1, node2); end - - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#120 - def preceding_lines(node); end - - # Version specifications that restrict all updates going forward. This excludes versions - # like ">= 1.0" or "!= 2.0.3". - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#152 - def restrictive_version_specified_gem?(node); end - - # Besides the gem name, all other *positional* arguments to `gem` are version specifiers, - # as long as it has one we know there's at least one version specifier. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#145 - def version_specified_gem?(node); end -end - -# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#88 -RuboCop::Cop::Bundler::GemComment::CHECKED_OPTIONS_CONFIG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#87 -RuboCop::Cop::Bundler::GemComment::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#91 -RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#90 -RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#92 -RuboCop::Cop::Bundler::GemComment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#89 -RuboCop::Cop::Bundler::GemComment::VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) - -# Verifies that a project contains Gemfile or gems.rb file and correct -# associated lock file based on the configuration. -# -# @example EnforcedStyle: Gemfile (default) -# # bad -# Project contains gems.rb and gems.locked files -# -# # bad -# Project contains Gemfile and gems.locked file -# -# # good -# Project contains Gemfile and Gemfile.lock -# @example EnforcedStyle: gems.rb -# # bad -# Project contains Gemfile and Gemfile.lock files -# -# # bad -# Project contains gems.rb and Gemfile.lock file -# -# # good -# Project contains gems.rb and gems.locked files -# -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#28 -class RuboCop::Cop::Bundler::GemFilename < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#43 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#88 - def expected_gemfile?(basename); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#80 - def gemfile_offense?(basename); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#93 - def gemfile_required?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#84 - def gems_rb_offense?(basename); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#97 - def gems_rb_required?; end - - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#58 - def register_gemfile_offense(file_path, basename); end - - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#69 - def register_gems_rb_offense(file_path, basename); end - - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#53 - def register_offense(file_path, basename); end -end - -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#40 -RuboCop::Cop::Bundler::GemFilename::GEMFILE_FILES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#41 -RuboCop::Cop::Bundler::GemFilename::GEMS_RB_FILES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#36 -RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_MISMATCHED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#32 -RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_REQUIRED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#38 -RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_MISMATCHED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#34 -RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_REQUIRED = T.let(T.unsafe(nil), String) - -# Enforce that Gem version specifications or a commit reference (branch, -# ref, or tag) are either required or forbidden. -# -# @example EnforcedStyle: required (default) -# # bad -# gem 'rubocop' -# -# # good -# gem 'rubocop', '~> 1.12' -# -# # good -# gem 'rubocop', '>= 1.10.0' -# -# # good -# gem 'rubocop', '>= 1.5.0', '< 1.10.0' -# -# # good -# gem 'rubocop', branch: 'feature-branch' -# -# # good -# gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' -# -# # good -# gem 'rubocop', tag: 'v1.17.0' -# @example EnforcedStyle: forbidden -# # good -# gem 'rubocop' -# -# # bad -# gem 'rubocop', '~> 1.12' -# -# # bad -# gem 'rubocop', '>= 1.10.0' -# -# # bad -# gem 'rubocop', '>= 1.5.0', '< 1.10.0' -# -# # bad -# gem 'rubocop', branch: 'feature-branch' -# -# # bad -# gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' -# -# # bad -# gem 'rubocop', tag: 'v1.17.0' -# -# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#53 -class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::GemDeclaration - - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#67 - def includes_commit_reference?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#62 - def includes_version_specification?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#71 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#85 - def allowed_gem?(node); end - - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#89 - def allowed_gems; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#111 - def forbidden_offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#117 - def forbidden_style?; end - - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#93 - def message(_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#101 - def offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#105 - def required_offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#121 - def required_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#125 - def version_specification?(expression); end -end - -# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#58 -RuboCop::Cop::Bundler::GemVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#57 -RuboCop::Cop::Bundler::GemVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#59 -RuboCop::Cop::Bundler::GemVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) - -# Passing symbol arguments to `source` (e.g. `source :rubygems`) is -# deprecated because they default to using HTTP requests. Instead, specify -# `'https://rubygems.org'` if possible, or `'http://rubygems.org'` if not. -# -# When autocorrecting, this cop will replace symbol arguments with -# `'https://rubygems.org'`. -# -# This cop will not replace existing sources that use `http://`. This may -# be necessary where HTTPS is not available. For example, where using an -# internal gem server via an intranet, or where HTTPS is prohibited. -# However, you should strongly prefer `https://` where possible, as it is -# more secure. -# -# If you don't allow `http://`, please set `false` to `AllowHttpProtocol`. -# This option is `true` by default for safe autocorrection. -# -# @example -# # bad -# source :gemcutter -# source :rubygems -# source :rubyforge -# -# # good -# source 'https://rubygems.org' # strongly recommended -# @example AllowHttpProtocol: true (default) -# -# # good -# source 'http://rubygems.org' # use only if HTTPS is unavailable -# @example AllowHttpProtocol: false -# -# # bad -# source 'http://rubygems.org' -# -# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#41 -class RuboCop::Cop::Bundler::InsecureProtocolSource < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#54 - def insecure_protocol_source?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#59 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#80 - def allow_http_protocol?; end -end - -# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#45 -RuboCop::Cop::Bundler::InsecureProtocolSource::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#49 -RuboCop::Cop::Bundler::InsecureProtocolSource::MSG_HTTP_PROTOCOL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#51 -RuboCop::Cop::Bundler::InsecureProtocolSource::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Gems should be alphabetically sorted within groups. -# -# @example -# # bad -# gem 'rubocop' -# gem 'rspec' -# -# # good -# gem 'rspec' -# gem 'rubocop' -# -# # good -# gem 'rubocop' -# -# gem 'rspec' -# @example TreatCommentsAsGroupSeparators: true (default) -# # good -# # For code quality -# gem 'rubocop' -# # For tests -# gem 'rspec' -# @example TreatCommentsAsGroupSeparators: false -# # bad -# # For code quality -# gem 'rubocop' -# # For tests -# gem 'rspec' -# -# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#35 -class RuboCop::Cop::Bundler::OrderedGems < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OrderedGemNode - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#64 - def gem_declarations(param0); end - - # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#43 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#57 - def previous_declaration(node); end -end - -# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#39 -RuboCop::Cop::Bundler::OrderedGems::MSG = T.let(T.unsafe(nil), String) - -# Common functionality for checking assignment nodes. -# -# source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#6 -module RuboCop::Cop::CheckAssignment - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_and_asgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_masgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_op_asgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_or_asgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#19 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#29 - def extract_rhs(node); end - - class << self - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#29 - def extract_rhs(node); end - end -end - -# This mixin detects collections that are safe to "break" -# by inserting new lines. This is useful for breaking -# up long lines. -# -# Let's look at hashes as an example: -# -# We know hash keys are safe to break across lines. We can add -# linebreaks into hashes on lines longer than the specified maximum. -# Then in further passes cops can clean up the multi-line hash. -# For example, say the maximum line length is as indicated below: -# -# | -# v -# {foo: "0000000000", bar: "0000000000", baz: "0000000000"} -# -# In a LineLength autocorrection pass, a line is added before -# the first key that exceeds the column limit: -# -# {foo: "0000000000", bar: "0000000000", -# baz: "0000000000"} -# -# In a MultilineHashKeyLineBreaks pass, lines are inserted -# before all keys: -# -# {foo: "0000000000", -# bar: "0000000000", -# baz: "0000000000"} -# -# Then in future passes FirstHashElementLineBreak, -# MultilineHashBraceLayout, and TrailingCommaInHashLiteral will -# manipulate as well until we get: -# -# { -# foo: "0000000000", -# bar: "0000000000", -# baz: "0000000000", -# } -# -# (Note: Passes may not happen exactly in this sequence.) -# -# source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#44 -module RuboCop::Cop::CheckLineBreakable - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#45 - def extract_breakable_node(node, max); end - - private - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#200 - def all_on_same_line?(nodes); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#220 - def already_on_multiple_lines?(node); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#133 - def breakable_collection?(node, elements); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#187 - def children_could_be_broken_up?(children); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#150 - def contained_by_breakable_collection_on_same_line?(node); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#170 - def contained_by_multiline_collection_that_could_be_broken_up?(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#60 - def extract_breakable_node_from_elements(node, elements, max); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#72 - def extract_first_element_over_column_limit(node, elements, max); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#92 - def first_argument_is_heredoc?(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#207 - def process_args(args); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#117 - def safe_to_ignore?(node); end - - # If a send node contains a heredoc argument, splitting cannot happen - # after the heredoc or else it will cause a syntax error. - # - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#101 - def shift_elements_for_heredoc_arg(node, elements, index); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#112 - def within_column_limit?(element, max, line); end -end - -# Common functionality for checking length of code segments. -# -# source://rubocop//lib/rubocop/cop/mixin/code_length.rb#6 -module RuboCop::Cop::CodeLength - extend ::RuboCop::ExcludeLimit - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def max=(value); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#49 - def build_code_length_calculator(node); end - - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#31 - def check_code_length(node); end - - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#27 - def count_as_one; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#23 - def count_comments?; end - - # Returns true for lines that shall not be included in the count. - # - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#45 - def irrelevant_line(source_line); end - - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#58 - def location(node); end - - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#19 - def max_length; end - - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#15 - def message(length, max_length); end -end - -# source://rubocop//lib/rubocop/cop/mixin/code_length.rb#9 -RuboCop::Cop::CodeLength::MSG = T.let(T.unsafe(nil), String) - -# Help methods for working with nodes containing comments. -# -# source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#6 -module RuboCop::Cop::CommentsHelp - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#25 - def comments_contain_disables?(node, cop_name); end - - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#18 - def comments_in_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#14 - def contains_comments?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#7 - def source_range_with_comment(node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#44 - def begin_pos_with_comment(node); end - - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#58 - def buffer; end - - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#39 - def end_position_for(node); end - - # Returns the end line of a node, which might be a comment and not part of the AST - # End line is considered either the line at which another node starts, or - # the line at which the parent node ends. - # - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#66 - def find_end_line(node); end - - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#54 - def start_line_position(node); end -end - -# Commissioner class is responsible for processing the AST and delegating -# work to the specified cops. -# -# source://rubocop//lib/rubocop/cop/commissioner.rb#7 -class RuboCop::Cop::Commissioner - include ::RuboCop::AST::Traversal - - # @return [Commissioner] a new instance of Commissioner - # - # source://rubocop//lib/rubocop/cop/commissioner.rb#44 - def initialize(cops, forces = T.unsafe(nil), options = T.unsafe(nil)); end - - # Returns the value of attribute errors. - # - # source://rubocop//lib/rubocop/cop/commissioner.rb#42 - def errors; end - - # @return [InvestigationReport] - # - # source://rubocop//lib/rubocop/cop/commissioner.rb#79 - def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on___ENCODING__(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on___FILE__(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on___LINE__(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_alias(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_and_asgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_arg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_arg_expr(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_args(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_array_pattern(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_array_pattern_with_tail(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_back_ref(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_begin(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_block_pass(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_blockarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_break(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_case_match(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_cbase(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_complex(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_const(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_const_pattern(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_cvar(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_defined?(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_dstr(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_dsym(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_eflipflop(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_empty_else(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_ensure(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_erange(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_false(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_find_pattern(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_float(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_for(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_forward_arg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_forward_args(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_forwarded_args(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_forwarded_kwrestarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_forwarded_restarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_gvar(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_hash(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_hash_pattern(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_if_guard(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_iflipflop(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_in_match(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_in_pattern(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_index(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_indexasgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_int(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_irange(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_ivar(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_kwarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_kwargs(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_kwbegin(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_kwnilarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_kwoptarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_kwrestarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_kwsplat(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_lambda(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_lvar(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_masgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_alt(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_as(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_current_line(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_nil_pattern(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_pattern(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_pattern_p(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_rest(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_var(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_with_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_with_trailing_comma(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_mlhs(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_next(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_nil(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_not(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_nth_ref(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_op_asgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_optarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_or(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_or_asgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_pair(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_pin(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_postexe(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_preexe(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_procarg0(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_rational(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_redo(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_regexp(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_regopt(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_resbody(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_rescue(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_restarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_retry(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_return(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_sclass(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_self(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_shadowarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_splat(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_str(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_super(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_sym(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_true(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_undef(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_unless_guard(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_until_post(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_when(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_while(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_while_post(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_xstr(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_yield(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_zsuper(node); end - - private - - # source://rubocop//lib/rubocop/cop/commissioner.rb#98 - def begin_investigation(processed_source, offset:, original:); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#121 - def build_callbacks(cops); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#116 - def initialize_callbacks; end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#159 - def invoke(callback, cops); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#163 - def invoke_with_argument(callback, cops, arg); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#112 - def reset; end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#131 - def restrict_callbacks(callbacks); end - - # NOTE: mutates `callbacks` in place - # - # source://rubocop//lib/rubocop/cop/commissioner.rb#149 - def restricted_map(callbacks); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#104 - def trigger_responding_cops(callback, node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#139 - def trigger_restricted_cops(event, node); end - - # Allow blind rescues here, since we're absorbing and packaging or - # re-raising exceptions that can be raised from within the individual - # cops' `#investigate` methods. - # - # source://rubocop//lib/rubocop/cop/commissioner.rb#170 - def with_cop_error_handling(cop, node = T.unsafe(nil)); end -end - -# How a Commissioner returns the results of the investigation -# as a list of Cop::InvestigationReport and any errors caught -# during the investigation. -# Immutable -# Consider creation API private -# -# source://rubocop//lib/rubocop/cop/commissioner.rb#18 -class RuboCop::Cop::Commissioner::InvestigationReport < ::Struct - # Returns the value of attribute cop_reports - # - # @return [Object] the current value of cop_reports - def cop_reports; end - - # Sets the attribute cop_reports - # - # @param value [Object] the value to set the attribute cop_reports to. - # @return [Object] the newly set value - def cop_reports=(_); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#19 - def cops; end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#27 - def correctors; end - - # Returns the value of attribute errors - # - # @return [Object] the current value of errors - def errors; end - - # Sets the attribute errors - # - # @param value [Object] the value to set the attribute errors to. - # @return [Object] the newly set value - def errors=(_); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#35 - def merge(investigation); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#31 - def offenses; end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#23 - def offenses_per_cop; end - - # Returns the value of attribute processed_source - # - # @return [Object] the current value of processed_source - def processed_source; end - - # Sets the attribute processed_source - # - # @param value [Object] the value to set the attribute processed_source to. - # @return [Object] the newly set value - def processed_source=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/cop/commissioner.rb#10 -RuboCop::Cop::Commissioner::RESTRICTED_CALLBACKS = T.let(T.unsafe(nil), Array) - -# This class does condition autocorrection -# -# source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#6 -class RuboCop::Cop::ConditionCorrector - class << self - # source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#8 - def correct_negative_condition(corrector, node); end - - private - - # source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#17 - def negated_condition(node); end - end -end - -# Handles `EnforcedStyle` configuration parameters. -# -# source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#6 -module RuboCop::Cop::ConfigurableEnforcedStyle - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#88 - def alternative_style; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#96 - def alternative_styles; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#19 - def ambiguous_style_detected(*possibilities); end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#60 - def conflicting_styles_detected; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#11 - def correct_style_detected; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#64 - def detected_style; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#68 - def detected_style=(style); end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#60 - def no_acceptable_style!; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#56 - def no_acceptable_style?; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#7 - def opposite_style_detected; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#79 - def style; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#75 - def style_configured?; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#29 - def style_detected(detected); end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#107 - def style_parameter_name; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#100 - def supported_styles; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#15 - def unexpected_style_detected(unexpected); end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#60 - def unrecognized_style_detected; end -end - -# source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#23 -RuboCop::Cop::ConfigurableEnforcedStyle::SYMBOL_TO_STRING_CACHE = T.let(T.unsafe(nil), Hash) - -# Shared functionality between mixins that enforce naming conventions -# -# source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#6 -module RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#9 - def check_name(node, name, name_range); end - - # A class emitter method is a singleton method in a class/module, where - # the method has the same name as a class defined in the class/module. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#30 - def class_emitter_method?(node, name); end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#17 - def report_opposing_styles(node, name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#24 - def valid_name?(node, name, given_style = T.unsafe(nil)); end -end - -# Handles `Max` configuration parameters, especially setting them to an -# appropriate value with --auto-gen-config. -# -# @deprecated Use `exclude_limit ParameterName` instead. -# -# source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#8 -module RuboCop::Cop::ConfigurableMax - private - - # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#11 - def max=(value); end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#19 - def max_parameter_name; end -end - -# This module provides functionality for checking if names match the -# configured EnforcedStyle. -# -# source://rubocop//lib/rubocop/cop/mixin/configurable_naming.rb#7 -module RuboCop::Cop::ConfigurableNaming - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting -end - -# source://rubocop//lib/rubocop/cop/mixin/configurable_naming.rb#10 -RuboCop::Cop::ConfigurableNaming::FORMATS = T.let(T.unsafe(nil), Hash) - -# This module provides functionality for checking if numbering match the -# configured EnforcedStyle. -# -# source://rubocop//lib/rubocop/cop/mixin/configurable_numbering.rb#7 -module RuboCop::Cop::ConfigurableNumbering - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting -end - -# source://rubocop//lib/rubocop/cop/mixin/configurable_numbering.rb#11 -RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash) - -# Monkey-patch Cop for tests to provide easy access to messages and -# highlights. -# -# source://rubocop//lib/rubocop/cop/cop.rb#11 -class RuboCop::Cop::Cop < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/cop.rb#53 - def add_offense(node_or_range, location: T.unsafe(nil), message: T.unsafe(nil), severity: T.unsafe(nil), &block); end - - # Called before any investigation - # - # @api private - # - # source://rubocop//lib/rubocop/cop/cop.rb#103 - def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end - - # @deprecated - # - # source://rubocop//lib/rubocop/cop/cop.rb#82 - def corrections; end - - # source://rubocop//lib/rubocop/cop/cop.rb#70 - def find_location(node, loc); end - - # Returns the value of attribute offenses. - # - # source://rubocop//lib/rubocop/cop/cop.rb#12 - def offenses; end - - # Called after all on_... have been called - # - # source://rubocop//lib/rubocop/cop/cop.rb#96 - def on_investigation_end; end - - # Called before all on_... have been called - # - # source://rubocop//lib/rubocop/cop/cop.rb#90 - def on_new_investigation; end - - # @deprecated Use class method - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/cop.rb#76 - def support_autocorrect?; end - - private - - # source://rubocop//lib/rubocop/cop/cop.rb#121 - def apply_correction(corrector); end - - # Override Base - # - # source://rubocop//lib/rubocop/cop/cop.rb#117 - def callback_argument(_range); end - - # source://rubocop//lib/rubocop/cop/cop.rb#138 - def correction_lambda; end - - # source://rubocop//lib/rubocop/cop/cop.rb#144 - def dedupe_on_node(node); end - - # Just for legacy - # - # @yield [corrector] - # - # source://rubocop//lib/rubocop/cop/cop.rb#126 - def emulate_v0_callsequence(corrector); end - - # source://rubocop//lib/rubocop/cop/cop.rb#157 - def range_for_original(range); end - - # source://rubocop//lib/rubocop/cop/cop.rb#151 - def suppress_clobbering; end - - class << self - # @deprecated Use Registry.all - # - # source://rubocop//lib/rubocop/cop/cop.rb#44 - def all; end - - # source://rubocop//lib/rubocop/cop/cop.rb#29 - def joining_forces; end - - # @deprecated Use Registry.qualified_cop_name - # - # source://rubocop//lib/rubocop/cop/cop.rb#49 - def qualified_cop_name(name, origin); end - - # @deprecated Use Registry.global - # - # source://rubocop//lib/rubocop/cop/cop.rb#39 - def registry; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/cop.rb#25 - def support_autocorrect?; end - end -end - -# @deprecated -# -# source://rubocop//lib/rubocop/cop/cop.rb#17 -class RuboCop::Cop::Cop::Correction < ::Struct - # source://rubocop//lib/rubocop/cop/cop.rb#18 - def call(corrector); end - - # Returns the value of attribute cop - # - # @return [Object] the current value of cop - def cop; end - - # Sets the attribute cop - # - # @param value [Object] the value to set the attribute cop to. - # @return [Object] the newly set value - def cop=(_); end - - # Returns the value of attribute lambda - # - # @return [Object] the current value of lambda - def lambda; end - - # Sets the attribute lambda - # - # @param value [Object] the value to set the attribute lambda to. - # @return [Object] the newly set value - def lambda=(_); end - - # Returns the value of attribute node - # - # @return [Object] the current value of node - def node; end - - # Sets the attribute node - # - # @param value [Object] the value to set the attribute node to. - # @return [Object] the newly set value - def node=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# This class takes a source buffer and rewrite its source -# based on the different correction rules supplied. -# -# Important! -# The nodes modified by the corrections should be part of the -# AST of the source_buffer. -# -# source://rubocop//lib/rubocop/cop/corrector.rb#11 -class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter - # corrector = Corrector.new(cop) - # - # @param source [Parser::Source::Buffer, or anything - # leading to one via `(processed_source.)buffer`] - # @return [Corrector] a new instance of Corrector - # - # source://rubocop//lib/rubocop/cop/corrector.rb#32 - def initialize(source); end - - # Removes `size` characters from the beginning of the given range. - # If `size` is greater than the size of `range`, the removed region can - # overrun the end of `range`. - # - # @param range [Parser::Source::Range, RuboCop::AST::Node] or node - # @param size [Integer] - # - # source://rubocop//lib/rubocop/cop/corrector.rb#63 - def remove_leading(node_or_range, size); end - - # Removes `size` characters prior to the source range. - # - # @param range [Parser::Source::Range, RuboCop::AST::Node] or node - # @param size [Integer] - # - # source://rubocop//lib/rubocop/cop/corrector.rb#51 - def remove_preceding(node_or_range, size); end - - # Removes `size` characters from the end of the given range. - # If `size` is greater than the size of `range`, the removed region can - # overrun the beginning of `range`. - # - # @param range [Parser::Source::Range, RuboCop::AST::Node] or node - # @param size [Integer] - # - # source://rubocop//lib/rubocop/cop/corrector.rb#75 - def remove_trailing(node_or_range, size); end - - # Legacy - # - # source://parser/3.3.3.0/lib/parser/source/tree_rewriter.rb#252 - def rewrite; end - - # Swaps sources at the given ranges. - # - # @param node_or_range1 [Parser::Source::Range, RuboCop::AST::Node] - # @param node_or_range2 [Parser::Source::Range, RuboCop::AST::Node] - # - # source://rubocop//lib/rubocop/cop/corrector.rb#85 - def swap(node_or_range1, node_or_range2); end - - private - - # source://rubocop//lib/rubocop/cop/corrector.rb#119 - def check_range_validity(node_or_range); end - - # source://rubocop//lib/rubocop/cop/corrector.rb#104 - def to_range(node_or_range); end - - # source://rubocop//lib/rubocop/cop/corrector.rb#123 - def validate_buffer(buffer); end - - class << self - # Duck typing for get to a ::Parser::Source::Buffer - # - # source://rubocop//lib/rubocop/cop/corrector.rb#15 - def source_buffer(source); end - end -end - -# noop -# -# source://rubocop//lib/rubocop/cop/corrector.rb#12 -RuboCop::Cop::Corrector::NOOP_CONSUMER = T.let(T.unsafe(nil), Proc) - -# Common functionality for checking def nodes. -# -# source://rubocop//lib/rubocop/cop/mixin/def_node.rb#6 -module RuboCop::Cop::DefNode - include ::RuboCop::Cop::VisibilityHelp - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#21 - def non_public_modifier?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#12 - def non_public?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#16 - def preceding_non_public_modifier?(node); end -end - -# Helpers for builtin documentation -# -# source://rubocop//lib/rubocop/cop/documentation.rb#6 -module RuboCop::Cop::Documentation - private - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#24 - def base_url_for(cop_class, config); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#40 - def builtin?(cop_class); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#35 - def default_base_url; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#10 - def department_to_basename(department); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#15 - def url_for(cop_class, config = T.unsafe(nil)); end - - class << self - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#24 - def base_url_for(cop_class, config); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/documentation.rb#40 - def builtin?(cop_class); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#35 - def default_base_url; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#10 - def department_to_basename(department); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#15 - def url_for(cop_class, config = T.unsafe(nil)); end - end -end - -# Common functionality for checking documentation. -# -# source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#6 -module RuboCop::Cop::DocumentationComment - extend ::RuboCop::AST::NodePattern::Macros - - private - - # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#47 - def annotation_keywords; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#11 - def documentation_comment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#39 - def interpreter_directive_comment?(comment); end - - # The args node1 & node2 may represent a RuboCop::AST::Node - # or a Parser::Source::Comment. Both respond to #loc. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#31 - def precede?(node1, node2); end - - # The args node1 & node2 may represent a RuboCop::AST::Node - # or a Parser::Source::Comment. Both respond to #loc. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#25 - def preceding_comment?(node1, node2); end - - # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#35 - def preceding_lines(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#43 - def rubocop_directive_comment?(comment); end -end - -# Common functionality for dealing with duplication. -# -# source://rubocop//lib/rubocop/cop/mixin/duplication.rb#6 -module RuboCop::Cop::Duplication - private - - # Returns the consecutive duplicates, leaving out the first instance of - # the duplicated elements. - # - # @param collection [Array] an array to return consecutive duplicates for - # @return [Array] the consecutive duplicates - # - # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#31 - def consecutive_duplicates(collection); end - - # Returns all duplicates, including the first instance of the duplicated - # elements. - # - # @param collection [Array] an array to return duplicates for - # @return [Array] all the duplicates - # - # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#22 - def duplicates(collection); end - - # Whether the `collection` contains any duplicates. - # - # @param collection [Array] an array to check for duplicates - # @return [Boolean] whether the array contains any duplicates - # - # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#13 - def duplicates?(collection); end - - # Returns a hash of grouped duplicates. The key will be the first - # instance of the element, and the value an `array` of the initial - # element and all duplicate instances. - # - # @param collection [Array] an array to group duplicates for - # @return [Array] the grouped duplicates - # - # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#41 - def grouped_duplicates(collection); end -end - -# This class autocorrects `#each` enumeration to `for` iteration. -# -# source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#6 -class RuboCop::Cop::EachToForCorrector - extend ::RuboCop::AST::NodePattern::Macros - - # @return [EachToForCorrector] a new instance of EachToForCorrector - # - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#12 - def initialize(block_node); end - - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#18 - def call(corrector); end - - private - - # Returns the value of attribute argument_node. - # - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#24 - def argument_node; end - - # Returns the value of attribute block_node. - # - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#24 - def block_node; end - - # Returns the value of attribute collection_node. - # - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#24 - def collection_node; end - - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#26 - def correction; end - - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#36 - def offending_range; end -end - -# source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#10 -RuboCop::Cop::EachToForCorrector::CORRECTION_WITHOUT_ARGUMENTS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#9 -RuboCop::Cop::EachToForCorrector::CORRECTION_WITH_ARGUMENTS = T.let(T.unsafe(nil), String) - -# This class does empty line autocorrection -# -# source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#6 -class RuboCop::Cop::EmptyLineCorrector - class << self - # source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#8 - def correct(corrector, node); end - - # source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#19 - def insert_before(corrector, node); end - end -end - -# Common code for empty parameter cops. -# -# source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#6 -module RuboCop::Cop::EmptyParameter - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#12 - def empty_arguments?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#16 - def check(node); end -end - -# Functions for checking the alignment of the `end` keyword. -# -# source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#6 -module RuboCop::Cop::EndKeywordAlignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#60 - def accept_end_kw_alignment?(end_loc); end - - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#50 - def add_offense_for_misalignment(node, align_with); end - - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#19 - def check_end_kw_alignment(node, align_ranges); end - - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#15 - def check_end_kw_in_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#75 - def line_break_before_keyword?(whole_expression, rhs); end - - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#35 - def matching_ranges(end_loc, align_ranges); end - - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#41 - def start_line_range(node); end - - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#65 - def style_parameter_name; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#69 - def variable_alignment?(whole_expression, rhs, end_alignment_style); end -end - -# source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#10 -RuboCop::Cop::EndKeywordAlignment::MSG = T.let(T.unsafe(nil), String) - -# Common functionality for enforcing a specific superclass. -# -# IMPORTANT: RuboCop core depended on this module when it supported Rails department. -# Rails department has been extracted to RuboCop Rails gem. -# -# It will not be updated to `RuboCop::Cop::Base` v1 API to maintain compatibility -# with existing RuboCop Rails 2.8 or lower. -# -# @api private -# @deprecated This module is deprecated and will be removed by RuboCop 2.0. -# -# source://rubocop//lib/rubocop/cop/mixin/enforce_superclass.rb#15 -module RuboCop::Cop::EnforceSuperclass - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/enforce_superclass.rb#35 - def on_class(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/enforce_superclass.rb#39 - def on_send(node); end - - class << self - # @api private - # @private - # - # source://rubocop//lib/rubocop/cop/mixin/enforce_superclass.rb#16 - def included(base); end - end -end - -# Common functionality for checking for a line break before the first -# element in a multi-line collection. -# -# source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#7 -module RuboCop::Cop::FirstElementLineBreak - private - - # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#23 - def check_children_line_break(node, children, start = T.unsafe(nil), ignore_last: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#10 - def check_method_line_break(node, children, ignore_last: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#37 - def first_by_line(nodes); end - - # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#41 - def last_line(nodes, ignore_last:); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#18 - def method_uses_parens?(node, limit); end -end - -# This class autocorrects `for` iteration to `#each` enumeration. -# -# source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#6 -class RuboCop::Cop::ForToEachCorrector - extend ::RuboCop::AST::NodePattern::Macros - - # @return [ForToEachCorrector] a new instance of ForToEachCorrector - # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#11 - def initialize(for_node); end - - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#17 - def call(corrector); end - - private - - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#57 - def collection_end; end - - # Returns the value of attribute collection_node. - # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 - def collection_node; end - - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#31 - def collection_source; end - - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#27 - def correction; end - - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#45 - def end_range; end - - # Returns the value of attribute for_node. - # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 - def for_node; end - - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#53 - def keyword_begin; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#39 - def requires_parentheses?; end - - # Returns the value of attribute variable_node. - # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 - def variable_node; end -end - -# source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#9 -RuboCop::Cop::ForToEachCorrector::CORRECTION = T.let(T.unsafe(nil), String) - -# A scaffold for concrete forces. -# -# source://rubocop//lib/rubocop/cop/force.rb#6 -class RuboCop::Cop::Force - # @return [Force] a new instance of Force - # - # source://rubocop//lib/rubocop/cop/force.rb#32 - def initialize(cops); end - - # Returns the value of attribute cops. - # - # source://rubocop//lib/rubocop/cop/force.rb#17 - def cops; end - - # source://rubocop//lib/rubocop/cop/force.rb#50 - def investigate(_processed_source); end - - # source://rubocop//lib/rubocop/cop/force.rb#36 - def name; end - - # source://rubocop//lib/rubocop/cop/force.rb#40 - def run_hook(method_name, *args); end - - class << self - # source://rubocop//lib/rubocop/cop/force.rb#19 - def all; end - - # source://rubocop//lib/rubocop/cop/force.rb#28 - def force_name; end - - # @private - # - # source://rubocop//lib/rubocop/cop/force.rb#23 - def inherited(subclass); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/force.rb#8 -class RuboCop::Cop::Force::HookError < ::StandardError - # @api private - # @return [HookError] a new instance of HookError - # - # source://rubocop//lib/rubocop/cop/force.rb#11 - def initialize(joining_cop); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/force.rb#9 - def joining_cop; end -end - -# Common functionality for dealing with frozen string literals. -# -# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#6 -module RuboCop::Cop::FrozenStringLiteral - private - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#35 - def frozen_heredoc?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#21 - def frozen_string_literal?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#15 - def frozen_string_literal_comment_exists?; end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#66 - def frozen_string_literal_specified?; end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#60 - def frozen_string_literals_disabled?; end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#41 - def frozen_string_literals_enabled?; end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#76 - def leading_comment_lines; end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#72 - def leading_magic_comments; end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#31 - def uninterpolated_string?(node); end - - class << self - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#15 - def frozen_string_literal_comment_exists?; end - end -end - -# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#9 -RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#10 -RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_ENABLED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#11 -RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_TYPES_RUBY27 = T.let(T.unsafe(nil), Array) - -# Common functionality for checking gem declarations. -# -# source://rubocop//lib/rubocop/cop/mixin/gem_declaration.rb#6 -module RuboCop::Cop::GemDeclaration - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/gem_declaration.rb#10 - def gem_declaration?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#5 -module RuboCop::Cop::Gemspec; end - -# Enforce that gem dependency version specifications or a commit reference (branch, -# ref, or tag) are either required or forbidden. -# -# @example EnforcedStyle: required (default) -# -# # bad -# Gem::Specification.new do |spec| -# spec.add_dependency 'parser' -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.add_development_dependency 'parser' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' -# end -# @example EnforcedStyle: forbidden -# -# # bad -# Gem::Specification.new do |spec| -# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.add_dependency 'parser' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.add_development_dependency 'parser' -# end -# -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#53 -class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::GemspecHelp - - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#67 - def add_dependency_method_declaration?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#78 - def includes_commit_reference?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#73 - def includes_version_specification?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#82 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#118 - def add_dependency_method?(method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#96 - def allowed_gem?(node); end - - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#100 - def allowed_gems; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#132 - def forbidden_offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#138 - def forbidden_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#112 - def match_block_variable_name?(receiver_name); end - - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#104 - def message(_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#122 - def offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#126 - def required_offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#142 - def required_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#146 - def version_specification?(expression); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#61 -RuboCop::Cop::Gemspec::DependencyVersion::ADD_DEPENDENCY_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#58 -RuboCop::Cop::Gemspec::DependencyVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#57 -RuboCop::Cop::Gemspec::DependencyVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#64 -RuboCop::Cop::Gemspec::DependencyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#59 -RuboCop::Cop::Gemspec::DependencyVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) - -# Checks that deprecated attributes are not set in a gemspec file. -# Removing deprecated attributes allows the user to receive smaller packed gems. -# -# @example -# -# # bad -# Gem::Specification.new do |spec| -# spec.name = 'your_cool_gem_name' -# spec.test_files = Dir.glob('test/**/*') -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.name = 'your_cool_gem_name' -# spec.test_files += Dir.glob('test/**/*') -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.name = 'your_cool_gem_name' -# end -# -# source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#28 -class RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#35 - def gem_specification(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#43 - def on_block(block_node); end - - private - - # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#86 - def format_message_from; end - - # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#63 - def node_and_method_name(node, attribute); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#72 - def use_deprecated_attributes?(node, block_parameter); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#32 -RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment::MSG = T.let(T.unsafe(nil), String) - -# Enforce that development dependencies for a gem are specified in -# `Gemfile`, rather than in the `gemspec` using -# `add_development_dependency`. Alternatively, using `EnforcedStyle: -# gemspec`, enforce that all dependencies are specified in `gemspec`, -# rather than in `Gemfile`. -# -# @example EnforcedStyle: Gemfile (default) -# # Specify runtime dependencies in your gemspec, -# # but all other dependencies in your Gemfile. -# -# # bad -# # example.gemspec -# s.add_development_dependency "foo" -# -# # good -# # Gemfile -# gem "foo" -# -# # good -# # gems.rb -# gem "foo" -# -# # good (with AllowedGems: ["bar"]) -# # example.gemspec -# s.add_development_dependency "bar" -# @example EnforcedStyle: gems.rb -# # Specify runtime dependencies in your gemspec, -# # but all other dependencies in your Gemfile. -# # -# # Identical to `EnforcedStyle: Gemfile`, but with a different error message. -# # Rely on Bundler/GemFilename to enforce the use of `Gemfile` vs `gems.rb`. -# -# # bad -# # example.gemspec -# s.add_development_dependency "foo" -# -# # good -# # Gemfile -# gem "foo" -# -# # good -# # gems.rb -# gem "foo" -# -# # good (with AllowedGems: ["bar"]) -# # example.gemspec -# s.add_development_dependency "bar" -# @example EnforcedStyle: gemspec -# # Specify all dependencies in your gemspec. -# -# # bad -# # Gemfile -# gem "foo" -# -# # good -# # example.gemspec -# s.add_development_dependency "foo" -# -# # good (with AllowedGems: ["bar"]) -# # Gemfile -# gem "bar" -# -# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#70 -class RuboCop::Cop::Gemspec::DevelopmentDependencies < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#77 - def add_development_dependency?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#82 - def gem?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#86 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#97 - def forbidden_gem?(gem_name); end - - # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#101 - def message(_range); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#73 -RuboCop::Cop::Gemspec::DevelopmentDependencies::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#74 -RuboCop::Cop::Gemspec::DevelopmentDependencies::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# An attribute assignment method calls should be listed only once -# in a gemspec. -# -# Assigning to an attribute with the same name using `spec.foo =` will be -# an unintended usage. On the other hand, duplication of methods such -# as `spec.requirements`, `spec.add_runtime_dependency`, and others are -# permitted because it is the intended use of appending values. -# -# @example -# # bad -# Gem::Specification.new do |spec| -# spec.name = 'rubocop' -# spec.name = 'rubocop2' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.name = 'rubocop' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.requirements << 'libmagick, v6.0' -# spec.requirements << 'A good graphics card' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.add_runtime_dependency('parallel', '~> 1.10') -# spec.add_runtime_dependency('parser', '>= 2.3.3.1', '< 3.0') -# end -# -# source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#37 -class RuboCop::Cop::Gemspec::DuplicatedAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::GemspecHelp - - # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#45 - def assignment_method_declarations(param0); end - - # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#50 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#68 - def duplicated_assignment_method_nodes; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#62 - def match_block_variable_name?(receiver_name); end - - # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#76 - def register_offense(node, assignment, line_of_first_occurrence); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#41 -RuboCop::Cop::Gemspec::DuplicatedAssignment::MSG = T.let(T.unsafe(nil), String) - -# Dependencies in the gemspec should be alphabetically sorted. -# -# @example -# # bad -# spec.add_dependency 'rubocop' -# spec.add_dependency 'rspec' -# -# # good -# spec.add_dependency 'rspec' -# spec.add_dependency 'rubocop' -# -# # good -# spec.add_dependency 'rubocop' -# -# spec.add_dependency 'rspec' -# -# # bad -# spec.add_development_dependency 'rubocop' -# spec.add_development_dependency 'rspec' -# -# # good -# spec.add_development_dependency 'rspec' -# spec.add_development_dependency 'rubocop' -# -# # good -# spec.add_development_dependency 'rubocop' -# -# spec.add_development_dependency 'rspec' -# -# # bad -# spec.add_runtime_dependency 'rubocop' -# spec.add_runtime_dependency 'rspec' -# -# # good -# spec.add_runtime_dependency 'rspec' -# spec.add_runtime_dependency 'rubocop' -# -# # good -# spec.add_runtime_dependency 'rubocop' -# -# spec.add_runtime_dependency 'rspec' -# @example TreatCommentsAsGroupSeparators: true (default) -# # good -# # For code quality -# spec.add_dependency 'rubocop' -# # For tests -# spec.add_dependency 'rspec' -# @example TreatCommentsAsGroupSeparators: false -# # bad -# # For code quality -# spec.add_dependency 'rubocop' -# # For tests -# spec.add_dependency 'rspec' -# -# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#61 -class RuboCop::Cop::Gemspec::OrderedDependencies < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OrderedGemNode - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#95 - def dependency_declarations(param0); end - - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#69 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#90 - def get_dependency_name(node); end - - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#84 - def previous_declaration(node); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#65 -RuboCop::Cop::Gemspec::OrderedDependencies::MSG = T.let(T.unsafe(nil), String) - -# Requires a gemspec to have `rubygems_mfa_required` metadata set. -# -# This setting tells RubyGems that MFA (Multi-Factor Authentication) is -# required for accounts to be able perform privileged operations, such as -# (see RubyGems' documentation for the full list of privileged -# operations): -# -# * `gem push` -# * `gem yank` -# * `gem owner --add/remove` -# * adding or removing owners using gem ownership page -# -# This helps make your gem more secure, as users can be more -# confident that gem updates were pushed by maintainers. -# -# @example -# # bad -# Gem::Specification.new do |spec| -# # no `rubygems_mfa_required` metadata specified -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.metadata = { -# 'rubygems_mfa_required' => 'true' -# } -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.metadata['rubygems_mfa_required'] = 'true' -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.metadata = { -# 'rubygems_mfa_required' => 'false' -# } -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.metadata = { -# 'rubygems_mfa_required' => 'true' -# } -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.metadata['rubygems_mfa_required'] = 'false' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.metadata['rubygems_mfa_required'] = 'true' -# end -# -# source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#63 -class RuboCop::Cop::Gemspec::RequireMFA < ::RuboCop::Cop::Base - include ::RuboCop::Cop::GemspecHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#70 - def metadata(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#87 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#78 - def rubygems_mfa_required(param0); end - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#83 - def true_string?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#115 - def autocorrect(corrector, node, block_var, metadata); end - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#139 - def change_value(corrector, value); end - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#125 - def correct_metadata(corrector, metadata); end - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#133 - def insert_mfa_required(corrector, node, block_var); end - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#108 - def mfa_value(metadata_value); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#67 -RuboCop::Cop::Gemspec::RequireMFA::MSG = T.let(T.unsafe(nil), String) - -# Checks that `required_ruby_version` in a gemspec file is set to a valid -# value (non-blank) and matches `TargetRubyVersion` as set in RuboCop's -# configuration for the gem. -# -# This ensures that RuboCop is using the same Ruby version as the gem. -# -# @example -# # When `TargetRubyVersion` of .rubocop.yml is `2.5`. -# -# # bad -# Gem::Specification.new do |spec| -# # no `required_ruby_version` specified -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.required_ruby_version = '>= 2.4.0' -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.required_ruby_version = '>= 2.6.0' -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.required_ruby_version = '' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.required_ruby_version = '>= 2.5.0' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.required_ruby_version = '>= 2.5' -# end -# -# # accepted but not recommended -# Gem::Specification.new do |spec| -# spec.required_ruby_version = ['>= 2.5.0', '< 2.7.0'] -# end -# -# # accepted but not recommended, since -# # Ruby does not really follow semantic versioning -# Gem::Specification.new do |spec| -# spec.required_ruby_version = '~> 2.5' -# end -# -# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#55 -class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#70 - def defined_ruby_version(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#78 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#84 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#65 - def required_ruby_version?(param0); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#96 - def dynamic_version?(node); end - - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#102 - def extract_ruby_version(required_ruby_version); end - - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#120 - def not_equal_message(required_ruby_version, target_ruby_version); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#62 -RuboCop::Cop::Gemspec::RequiredRubyVersion::MISSING_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#59 -RuboCop::Cop::Gemspec::RequiredRubyVersion::NOT_EQUAL_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#58 -RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks that `RUBY_VERSION` constant is not used in gemspec. -# Using `RUBY_VERSION` is dangerous because value of the -# constant is determined by `rake release`. -# It's possible to have dependency based on ruby version used -# to execute `rake release` and not user's ruby version. -# -# @example -# -# # bad -# Gem::Specification.new do |spec| -# if RUBY_VERSION >= '3.0' -# spec.add_runtime_dependency 'gem_a' -# else -# spec.add_runtime_dependency 'gem_b' -# end -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.add_runtime_dependency 'gem_a' -# end -# -# source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#28 -class RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage < ::RuboCop::Cop::Base - include ::RuboCop::Cop::GemspecHelp - - # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#36 - def on_const(node); end - - # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#34 - def ruby_version?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#44 - def gem_spec_with_ruby_version?(node); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#31 -RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage::MSG = T.let(T.unsafe(nil), String) - -# Common functionality for checking gem declarations. -# -# source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#6 -module RuboCop::Cop::GemspecHelp - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#20 - def gem_specification(param0); end - - # source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#10 - def gem_specification?(param0 = T.unsafe(nil)); end -end - -# Source and spec generator for new cops -# -# This generator will take a cop name and generate a source file -# and spec file when given a valid qualified cop name. -# -# @api private -# -# source://rubocop//lib/rubocop/cop/generator.rb#10 -class RuboCop::Cop::Generator - # @api private - # @raise [ArgumentError] - # @return [Generator] a new instance of Generator - # - # source://rubocop//lib/rubocop/cop/generator.rb#113 - def initialize(name, output: T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#133 - def inject_config(config_file_path: T.unsafe(nil), version_added: T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#129 - def inject_require(root_file_path: T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#146 - def todo; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#121 - def write_source; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#125 - def write_spec; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#160 - def badge; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#183 - def generate(template); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#175 - def generated_source; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#179 - def generated_spec; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#160 - def output; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#208 - def snake_case(camel_case_string); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#198 - def source_path; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#188 - def spec_path; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#162 - def write_unless_file_exists(path, contents); end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/generator.rb#109 -RuboCop::Cop::Generator::CONFIGURATION_ADDED_MESSAGE = T.let(T.unsafe(nil), String) - -# A class that injects a require directive into the root RuboCop file. -# It looks for other directives that require files in the same (cop) -# namespace and injects the provided one in alpha -# -# source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#9 -class RuboCop::Cop::Generator::ConfigurationInjector - # @return [ConfigurationInjector] a new instance of ConfigurationInjector - # - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#17 - def initialize(configuration_file_path:, badge:, version_added: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#24 - def inject; end - - private - - # Returns the value of attribute badge. - # - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 - def badge; end - - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#41 - def configuration_entries; end - - # Returns the value of attribute configuration_file_path. - # - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 - def configuration_file_path; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#59 - def cop_name_line?(yaml); end - - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#49 - def find_target_line; end - - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#45 - def new_configuration_entry; end - - # Returns the value of attribute output. - # - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 - def output; end - - # Returns the value of attribute version_added. - # - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 - def version_added; end -end - -# source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#10 -RuboCop::Cop::Generator::ConfigurationInjector::TEMPLATE = T.let(T.unsafe(nil), String) - -# A class that injects a require directive into the root RuboCop file. -# It looks for other directives that require files in the same (cop) -# namespace and injects the provided one in alpha -# -# source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#9 -class RuboCop::Cop::Generator::RequireFileInjector - # @return [RequireFileInjector] a new instance of RequireFileInjector - # - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#12 - def initialize(source_path:, root_file_path:, output: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#19 - def inject; end - - private - - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#64 - def injectable_require_directive; end - - # Returns the value of attribute output. - # - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 - def output; end - - # Returns the value of attribute require_entries. - # - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 - def require_entries; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#31 - def require_exists?; end - - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#68 - def require_path; end - - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#58 - def require_path_fragments(require_directive); end - - # Returns the value of attribute root_file_path. - # - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 - def root_file_path; end - - # Returns the value of attribute source_path. - # - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 - def source_path; end - - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#39 - def target_line; end - - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#35 - def updated_directives; end -end - -# source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#10 -RuboCop::Cop::Generator::RequireFileInjector::REQUIRE_PATH = T.let(T.unsafe(nil), Regexp) - -# @api private -# -# source://rubocop//lib/rubocop/cop/generator.rb#11 -RuboCop::Cop::Generator::SOURCE_TEMPLATE = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/cop/generator.rb#85 -RuboCop::Cop::Generator::SPEC_TEMPLATE = T.let(T.unsafe(nil), String) - -# Common functionality for checking hash alignment. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#6 -module RuboCop::Cop::HashAlignmentStyles; end - -# Handles calculation of deltas when the enforced style is 'key'. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#8 -class RuboCop::Cop::HashAlignmentStyles::KeyAlignment - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#9 - def checkable_layout?(_node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#20 - def deltas(first_pair, current_pair); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#13 - def deltas_for_first_pair(first_pair, _node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#34 - def separator_delta(pair); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#45 - def value_delta(pair); end -end - -# Handles calculation of deltas for `kwsplat` nodes. -# This is a special case that just ensures the kwsplat is aligned with the rest of the hash -# since a `kwsplat` does not have a key, separator or value. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#145 -class RuboCop::Cop::HashAlignmentStyles::KeywordSplatAlignment - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#146 - def deltas(first_pair, current_pair); end -end - -# Handles calculation of deltas when the enforced style is 'separator'. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#120 -class RuboCop::Cop::HashAlignmentStyles::SeparatorAlignment - include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#123 - def deltas_for_first_pair(*_nodes); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#133 - def hash_rocket_delta(first_pair, current_pair); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#129 - def key_delta(first_pair, current_pair); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#137 - def value_delta(first_pair, current_pair); end -end - -# Handles calculation of deltas when the enforced style is 'table'. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#81 -class RuboCop::Cop::HashAlignmentStyles::TableAlignment - include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment - - # @return [TableAlignment] a new instance of TableAlignment - # - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#84 - def initialize; end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#88 - def deltas_for_first_pair(first_pair, node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#106 - def hash_rocket_delta(first_pair, current_pair); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#102 - def key_delta(first_pair, current_pair); end - - # Returns the value of attribute max_key_width. - # - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#100 - def max_key_width; end - - # Sets the attribute max_key_width - # - # @param value the value to set the attribute max_key_width to. - # - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#100 - def max_key_width=(_arg0); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#110 - def value_delta(first_pair, current_pair); end -end - -# Common functionality for checking alignment of hash values. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#56 -module RuboCop::Cop::HashAlignmentStyles::ValueAlignment - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#57 - def checkable_layout?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#61 - def deltas(first_pair, current_pair); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#71 - def separator_delta(first_pair, current_pair, key_delta); end -end - -# This module checks for Ruby 3.1's hash value omission syntax. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#7 -module RuboCop::Cop::HashShorthandSyntax - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#14 - def on_hash_for_mixed_shorthand(hash_node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#26 - def on_pair(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#126 - def brackets?(method_dispatch_node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#156 - def breakdown_value_types_of_hash(hash_node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#103 - def def_node_that_require_parentheses(node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#185 - def each_omittable_value_pair(hash_value_type_breakdown, &block); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#181 - def each_omitted_value_pair(hash_value_type_breakdown, &block); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#81 - def enforced_shorthand_syntax; end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#118 - def find_ancestor_method_dispatch_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#168 - def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#172 - def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#176 - def ignore_explicit_omissible_hash_shorthand_syntax?(hash_value_type_breakdown); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#75 - def ignore_hash_shorthand_syntax?(pair_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#69 - def ignore_mixed_hash_shorthand_syntax?(hash_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#141 - def last_expression?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#149 - def method_dispatch_as_argument?(method_dispatch_node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#189 - def mixed_shorthand_syntax_check(hash_value_type_breakdown); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#205 - def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#49 - def register_offense(node, message, replacement); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#85 - def require_hash_value?(hash_key_source, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#94 - def require_hash_value_for_around_hash_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#130 - def use_element_of_hash_literal_as_receiver?(ancestor, parent); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#135 - def use_modifier_form_without_parenthesized_method_call?(ancestor); end -end - -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#12 -RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_EXPLICIT_VALUE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#10 -RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_MSG_PREFIX = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#11 -RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_OMIT_VALUE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#216 -class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#225 - def first_argument; end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#229 - def last_argument; end - - # Returns the value of attribute node - # - # @return [Object] the current value of node - def node; end - - # Sets the attribute node - # - # @param value [Object] the value to set the attribute node to. - # @return [Object] the newly set value - def node=(_); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#217 - def selector; end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#9 -RuboCop::Cop::HashShorthandSyntax::EXPLICIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#8 -RuboCop::Cop::HashShorthandSyntax::OMIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) - -# Common functionality for Style/HashTransformKeys and -# Style/HashTransformValues -# -# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#7 -module RuboCop::Cop::HashTransformMethod - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#13 - def array_receiver?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#17 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#34 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#27 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#108 - def execute_correction(corrector, node, correction); end - - # @abstract - # @raise [NotImplementedError] - # @return [Captures] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#83 - def extract_captures(_match); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#60 - def handle_possible_offense(node, match, match_desc); end - - # @abstract - # @raise [NotImplementedError] - # @return [String] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#90 - def new_method_name; end - - # @abstract Implemented with `def_node_matcher` - # @raise [NotImplementedError] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#41 - def on_bad_each_with_object(_node); end - - # @abstract Implemented with `def_node_matcher` - # @raise [NotImplementedError] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#46 - def on_bad_hash_brackets_map(_node); end - - # @abstract Implemented with `def_node_matcher` - # @raise [NotImplementedError] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#51 - def on_bad_map_to_h(_node); end - - # @abstract Implemented with `def_node_matcher` - # @raise [NotImplementedError] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#56 - def on_bad_to_h(_node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#94 - def prepare_correction(node); end -end - -# Internal helper class to hold autocorrect data -# -# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#136 -class RuboCop::Cop::HashTransformMethod::Autocorrection < ::Struct - # Returns the value of attribute block_node - # - # @return [Object] the current value of block_node - def block_node; end - - # Sets the attribute block_node - # - # @param value [Object] the value to set the attribute block_node to. - # @return [Object] the newly set value - def block_node=(_); end - - # Returns the value of attribute leading - # - # @return [Object] the current value of leading - def leading; end - - # Sets the attribute leading - # - # @param value [Object] the value to set the attribute leading to. - # @return [Object] the newly set value - def leading=(_); end - - # Returns the value of attribute match - # - # @return [Object] the current value of match - def match; end - - # Sets the attribute match - # - # @param value [Object] the value to set the attribute match to. - # @return [Object] the newly set value - def match=(_); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#177 - def set_new_arg_name(transformed_argname, corrector); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#181 - def set_new_body_expression(transforming_body_expr, corrector); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#167 - def set_new_method_name(new_method_name, corrector); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#161 - def strip_prefix_and_suffix(node, corrector); end - - # Returns the value of attribute trailing - # - # @return [Object] the current value of trailing - def trailing; end - - # Sets the attribute trailing - # - # @param value [Object] the value to set the attribute trailing to. - # @return [Object] the newly set value - def trailing=(_); end - - class << self - def [](*_arg0); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#137 - def from_each_with_object(node, match); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#141 - def from_hash_brackets_map(node, match); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#145 - def from_map_to_h(node, match); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#157 - def from_to_h(node, match); end - - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Internal helper class to hold match data -# -# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#118 -class RuboCop::Cop::HashTransformMethod::Captures < ::Struct - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#119 - def noop_transformation?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#124 - def transformation_uses_both_args?; end - - # Returns the value of attribute transformed_argname - # - # @return [Object] the current value of transformed_argname - def transformed_argname; end - - # Sets the attribute transformed_argname - # - # @param value [Object] the value to set the attribute transformed_argname to. - # @return [Object] the newly set value - def transformed_argname=(_); end - - # Returns the value of attribute transforming_body_expr - # - # @return [Object] the current value of transforming_body_expr - def transforming_body_expr; end - - # Sets the attribute transforming_body_expr - # - # @param value [Object] the value to set the attribute transforming_body_expr to. - # @return [Object] the newly set value - def transforming_body_expr=(_); end - - # Returns the value of attribute unchanged_body_expr - # - # @return [Object] the current value of unchanged_body_expr - def unchanged_body_expr; end - - # Sets the attribute unchanged_body_expr - # - # @param value [Object] the value to set the attribute unchanged_body_expr to. - # @return [Object] the newly set value - def unchanged_body_expr=(_); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#128 - def use_transformed_argname?; end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#10 -RuboCop::Cop::HashTransformMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Common functionality for working with heredoc strings. -# -# source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#6 -module RuboCop::Cop::Heredoc - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#9 - def on_dstr(node); end - - # @raise [NotImplementedError] - # - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#17 - def on_heredoc(_node); end - - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#9 - def on_str(node); end - - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#9 - def on_xstr(node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#28 - def delimiter_string(node); end - - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#34 - def heredoc_type(node); end - - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#23 - def indent_level(str); end -end - -# source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#7 -RuboCop::Cop::Heredoc::OPENING_DELIMITER = T.let(T.unsafe(nil), Regexp) - -# This class autocorrects `if...then` structures to a multiline `if` statement -# -# source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#6 -class RuboCop::Cop::IfThenCorrector - # @return [IfThenCorrector] a new instance of IfThenCorrector - # - # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#9 - def initialize(if_node, indentation: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#14 - def call(corrector); end - - private - - # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#50 - def branch_body_indentation; end - - # Returns the value of attribute if_node. - # - # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#20 - def if_node; end - - # Returns the value of attribute indentation. - # - # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#20 - def indentation; end - - # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#22 - def replacement(node = T.unsafe(nil), indentation = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#36 - def rewrite_else_branch(else_branch, indentation); end -end - -# source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#7 -RuboCop::Cop::IfThenCorrector::DEFAULT_INDENTATION_WIDTH = T.let(T.unsafe(nil), Integer) - -# @deprecated IgnoredMethods class has been replaced with AllowedMethods. -# -# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#40 -RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods - -# Handles adding and checking ignored nodes. -# -# source://rubocop//lib/rubocop/cop/ignored_node.rb#6 -module RuboCop::Cop::IgnoredNode - # source://rubocop//lib/rubocop/cop/ignored_node.rb#7 - def ignore_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/ignored_node.rb#24 - def ignored_node?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/ignored_node.rb#11 - def part_of_ignored_node?(node); end - - private - - # source://rubocop//lib/rubocop/cop/ignored_node.rb#31 - def ignored_nodes; end -end - -# @deprecated IgnoredPattern class has been replaced with AllowedPattern. -# -# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#54 -RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern - -# Common functionality for checking integer nodes. -# -# source://rubocop//lib/rubocop/cop/mixin/integer_node.rb#6 -module RuboCop::Cop::IntegerNode - private - - # source://rubocop//lib/rubocop/cop/mixin/integer_node.rb#9 - def integer_part(node); end -end - -# Common functionality for working with string interpolations. -# -# @abstract Subclasses are expected to implement {#on_interpolation}. -# -# source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#8 -module RuboCop::Cop::Interpolation - # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 - def on_dstr(node); end - - # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 - def on_dsym(node); end - - # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#17 - def on_node_with_interpolations(node); end - - # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 - def on_regexp(node); end - - # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 - def on_xstr(node); end -end - -# This class autocorrects lambda literal to method notation. -# -# source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#6 -class RuboCop::Cop::LambdaLiteralToMethodCorrector - # @return [LambdaLiteralToMethodCorrector] a new instance of LambdaLiteralToMethodCorrector - # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#7 - def initialize(block_node); end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#13 - def call(corrector); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#118 - def arg_to_unparenthesized_call?; end - - # Returns the value of attribute arguments. - # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 - def arguments; end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#102 - def arguments_begin_pos; end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#98 - def arguments_end_pos; end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#110 - def block_begin; end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#106 - def block_end; end - - # Returns the value of attribute block_node. - # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 - def block_node; end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#59 - def insert_arguments(corrector); end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#43 - def insert_separating_space(corrector); end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#88 - def lambda_arg_string; end - - # Returns the value of attribute method. - # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 - def method; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#92 - def needs_separating_space?; end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#53 - def remove_arguments(corrector); end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#66 - def remove_leading_whitespace(corrector); end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#74 - def remove_trailing_whitespace(corrector); end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#36 - def remove_unparenthesized_whitespace(corrector); end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#79 - def replace_delimiters(corrector); end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#49 - def replace_selector(corrector); end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#114 - def selector_end; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#134 - def separating_space?; end -end - -# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#5 -module RuboCop::Cop::Layout; end - -# Bare access modifiers (those not applying to specific methods) should be -# indented as deep as method definitions, or as deep as the class/module -# keyword, depending on configuration. -# -# @example EnforcedStyle: indent (default) -# # bad -# class Plumbus -# private -# def smooth; end -# end -# -# # good -# class Plumbus -# private -# def smooth; end -# end -# @example EnforcedStyle: outdent -# # bad -# class Plumbus -# private -# def smooth; end -# end -# -# # good -# class Plumbus -# private -# def smooth; end -# end -# -# source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#35 -class RuboCop::Cop::Layout::AccessModifierIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 - def on_sclass(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#54 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#58 - def check_body(body, node); end - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#65 - def check_modifier(send_node, end_range); end - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#88 - def expected_indent_offset; end - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#84 - def message(range); end - - # An offset that is not expected, but correct if the configuration is - # changed. - # - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#94 - def unexpected_indent_offset; end -end - -# source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#41 -RuboCop::Cop::Layout::AccessModifierIndentation::MSG = T.let(T.unsafe(nil), String) - -# Here we check if the arguments on a multi-line method -# definition are aligned. -# -# @example EnforcedStyle: with_first_argument (default) -# # good -# -# foo :bar, -# :baz, -# key: value -# -# foo( -# :bar, -# :baz, -# key: value -# ) -# -# # bad -# -# foo :bar, -# :baz, -# key: value -# -# foo( -# :bar, -# :baz, -# key: value -# ) -# @example EnforcedStyle: with_fixed_indentation -# # good -# -# foo :bar, -# :baz, -# key: value -# -# # bad -# -# foo :bar, -# :baz, -# key: value -# -# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#46 -class RuboCop::Cop::Layout::ArgumentAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#55 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#55 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#92 - def arguments_or_first_arg_pairs(node); end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#80 - def arguments_with_last_arg_pairs(node); end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#108 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#68 - def autocorrect_incompatible_with_other_cops?; end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#124 - def base_column(node, first_argument); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#144 - def enforce_hash_argument_with_separator?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#116 - def fixed_indentation?; end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#72 - def flattened_arguments(node); end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#152 - def hash_argument_config; end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#112 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#101 - def multiple_arguments?(node); end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#135 - def target_method_lineno(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#120 - def with_first_argument_style?; end -end - -# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#50 -RuboCop::Cop::Layout::ArgumentAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#52 -RuboCop::Cop::Layout::ArgumentAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) - -# Here we check if the elements of a multi-line array literal are -# aligned. -# -# @example EnforcedStyle: with_first_element (default) -# # good -# -# array = [1, 2, 3, -# 4, 5, 6] -# array = ['run', -# 'forrest', -# 'run'] -# -# # bad -# -# array = [1, 2, 3, -# 4, 5, 6] -# array = ['run', -# 'forrest', -# 'run'] -# @example EnforcedStyle: with_fixed_indentation -# # good -# -# array = [1, 2, 3, -# 4, 5, 6] -# -# # bad -# -# array = [1, 2, 3, -# 4, 5, 6] -# -# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#36 -class RuboCop::Cop::Layout::ArrayAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#46 - def on_array(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#55 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#67 - def base_column(node, args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#63 - def fixed_indentation?; end - - # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#59 - def message(_range); end - - # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#78 - def target_method_lineno(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#40 -RuboCop::Cop::Layout::ArrayAlignment::ALIGN_ELEMENTS_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#43 -RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) - -# Checks the indentation of the first line of the -# right-hand-side of a multi-line assignment. -# -# The indentation of the remaining lines can be corrected with -# other cops such as `IndentationConsistency` and `EndAlignment`. -# -# @example -# # bad -# value = -# if foo -# 'bar' -# end -# -# # good -# value = -# if foo -# 'bar' -# end -# -# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#24 -class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - private - - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#42 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#33 - def check_assignment(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#46 - def leftmost_multiple_assignment(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#29 -RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String) - -# Checks whether the end keyword of `begin` is aligned properly. -# -# Two modes are supported through the `EnforcedStyleAlignWith` configuration -# parameter. If it's set to `start_of_line` (which is the default), the -# `end` shall be aligned with the start of the line where the `begin` -# keyword is. If it's set to `begin`, the `end` shall be aligned with the -# `begin` keyword. -# -# `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) -# by default. On the other hand, `||= begin` that this cop targets tends to -# align with the start of the line, it defaults to `EnforcedStyleAlignWith: start_of_line`. -# These style can be configured by each cop. -# -# @example EnforcedStyleAlignWith: start_of_line (default) -# # bad -# foo ||= begin -# do_something -# end -# -# # good -# foo ||= begin -# do_something -# end -# @example EnforcedStyleAlignWith: begin -# # bad -# foo ||= begin -# do_something -# end -# -# # good -# foo ||= begin -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#41 -class RuboCop::Cop::Layout::BeginEndAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#48 - def on_kwbegin(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#63 - def alignment_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#59 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#54 - def check_begin_alignment(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#46 -RuboCop::Cop::Layout::BeginEndAlignment::MSG = T.let(T.unsafe(nil), String) - -# Checks whether the end keywords are aligned properly for do -# end blocks. -# -# Three modes are supported through the `EnforcedStyleAlignWith` -# configuration parameter: -# -# `start_of_block` : the `end` shall be aligned with the -# start of the line where the `do` appeared. -# -# `start_of_line` : the `end` shall be aligned with the -# start of the line where the expression started. -# -# `either` (which is the default) : the `end` is allowed to be in either -# location. The autofixer will default to `start_of_line`. -# -# @example EnforcedStyleAlignWith: either (default) -# # bad -# -# foo.bar -# .each do -# baz -# end -# -# # good -# -# foo.bar -# .each do -# baz -# end -# @example EnforcedStyleAlignWith: start_of_block -# # bad -# -# foo.bar -# .each do -# baz -# end -# -# # good -# -# foo.bar -# .each do -# baz -# end -# @example EnforcedStyleAlignWith: start_of_line -# # bad -# -# foo.bar -# .each do -# baz -# end -# -# # good -# -# foo.bar -# .each do -# baz -# end -# -# source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#66 -class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#74 - def block_end_align_target?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#83 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#83 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#89 - def style_parameter_name; end - - private - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#228 - def add_space_before(corrector, loc, delta); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#205 - def alt_start_msg(start_loc, source_line_column); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#155 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#105 - def block_end_align_target(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#123 - def check_block_alignment(start_node, block_node); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#178 - def compute_do_source_line_column(node, end_loc); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#220 - def compute_start_col(ancestor_node, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#119 - def disqualified_parent?(parent, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#115 - def end_align_target?(node, parent); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#168 - def format_message(start_loc, end_loc, do_source_line_column, error_source_line_column); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#215 - def format_source_line_column(source_line_column); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#197 - def loc_to_source_line_column(loc); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#136 - def register_offense(block_node, start_loc, end_loc, do_source_line_column); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#232 - def remove_space_before(corrector, end_pos, delta); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#95 - def start_for_block_node(block_node); end -end - -# source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#71 -RuboCop::Cop::Layout::BlockAlignment::MSG = T.let(T.unsafe(nil), String) - -# Checks whether the end statement of a do..end block -# is on its own line. -# -# @example -# # bad -# blah do |i| -# foo(i) end -# -# # good -# blah do |i| -# foo(i) -# end -# -# # bad -# blah { |i| -# foo(i) } -# -# # good -# blah { |i| -# foo(i) -# } -# -# source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#27 -class RuboCop::Cop::Layout::BlockEndNewline < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#33 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#33 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#66 - def last_heredoc_argument(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#62 - def message(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#76 - def offense_range(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#49 - def register_offense(node, offense_range); end -end - -# source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#31 -RuboCop::Cop::Layout::BlockEndNewline::MSG = T.let(T.unsafe(nil), String) - -# Checks how the `when` and ``in``s of a `case` expression -# are indented in relation to its `case` or `end` keyword. -# -# It will register a separate offense for each misaligned `when` and `in`. -# -# @example -# # If Layout/EndAlignment is set to keyword style (default) -# # *case* and *end* should always be aligned to same depth, -# # and therefore *when* should always be aligned to both - -# # regardless of configuration. -# -# # bad for all styles -# case n -# when 0 -# x * 2 -# else -# y / 3 -# end -# -# case n -# in pattern -# x * 2 -# else -# y / 3 -# end -# -# # good for all styles -# case n -# when 0 -# x * 2 -# else -# y / 3 -# end -# -# case n -# in pattern -# x * 2 -# else -# y / 3 -# end -# @example EnforcedStyle: case (default) -# # if EndAlignment is set to other style such as -# # start_of_line (as shown below), then *when* alignment -# # configuration does have an effect. -# -# # bad -# a = case n -# when 0 -# x * 2 -# else -# y / 3 -# end -# -# a = case n -# in pattern -# x * 2 -# else -# y / 3 -# end -# -# # good -# a = case n -# when 0 -# x * 2 -# else -# y / 3 -# end -# -# a = case n -# in pattern -# x * 2 -# else -# y / 3 -# end -# @example EnforcedStyle: end -# # bad -# a = case n -# when 0 -# x * 2 -# else -# y / 3 -# end -# -# a = case n -# in pattern -# x * 2 -# else -# y / 3 -# end -# -# # good -# a = case n -# when 0 -# x * 2 -# else -# y / 3 -# end -# -# a = case n -# in pattern -# x * 2 -# else -# y / 3 -# end -# -# source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#112 -class RuboCop::Cop::Layout::CaseIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#120 - def on_case(case_node); end - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#127 - def on_case_match(case_match_node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#193 - def base_column(case_node, base); end - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#150 - def check_when(when_node, branch_type); end - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#182 - def detect_incorrect_style(when_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#136 - def end_and_last_conditional_same_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#146 - def enforced_style_end?; end - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#169 - def incorrect_style(when_node, branch_type); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#161 - def indent_one_step?; end - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#165 - def indentation_width; end - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#207 - def replacement(node); end - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#200 - def whitespace_range(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#118 -RuboCop::Cop::Layout::CaseIndentation::MSG = T.let(T.unsafe(nil), String) - -# Checks if the code style follows the ExpectedOrder configuration: -# -# `Categories` allows us to map macro names into a category. -# -# Consider an example of code style that covers the following order: -# -# * Module inclusion (include, prepend, extend) -# * Constants -# * Associations (has_one, has_many) -# * Public attribute macros (attr_accessor, attr_writer, attr_reader) -# * Other macros (validates, validate) -# * Public class methods -# * Initializer -# * Public instance methods -# * Protected attribute macros (attr_accessor, attr_writer, attr_reader) -# * Protected instance methods -# * Private attribute macros (attr_accessor, attr_writer, attr_reader) -# * Private instance methods -# -# You can configure the following order: -# -# [source,yaml] -# ---- -# Layout/ClassStructure: -# ExpectedOrder: -# - module_inclusion -# - constants -# - association -# - public_attribute_macros -# - public_delegate -# - macros -# - public_class_methods -# - initializer -# - public_methods -# - protected_attribute_macros -# - protected_methods -# - private_attribute_macros -# - private_delegate -# - private_methods -# ---- -# -# Instead of putting all literals in the expected order, is also -# possible to group categories of macros. Visibility levels are handled -# automatically. -# -# [source,yaml] -# ---- -# Layout/ClassStructure: -# Categories: -# association: -# - has_many -# - has_one -# attribute_macros: -# - attr_accessor -# - attr_reader -# - attr_writer -# macros: -# - validates -# - validate -# module_inclusion: -# - include -# - prepend -# - extend -# ---- -# -# @example -# # bad -# # Expect extend be before constant -# class Person < ApplicationRecord -# has_many :orders -# ANSWER = 42 -# -# extend SomeModule -# include AnotherModule -# end -# -# # good -# class Person -# # extend and include go first -# extend SomeModule -# include AnotherModule -# -# # inner classes -# CustomError = Class.new(StandardError) -# -# # constants are next -# SOME_CONSTANT = 20 -# -# # afterwards we have public attribute macros -# attr_reader :name -# -# # followed by other macros (if any) -# validates :name -# -# # then we have public delegate macros -# delegate :to_s, to: :name -# -# # public class methods are next in line -# def self.some_method -# end -# -# # initialization goes between class methods and instance methods -# def initialize -# end -# -# # followed by other public instance methods -# def some_method -# end -# -# # protected attribute macros and methods go next -# protected -# -# attr_reader :protected_name -# -# def some_protected_method -# end -# -# # private attribute macros, delegate macros and methods -# # are grouped near the end -# private -# -# attr_reader :private_name -# -# delegate :some_private_delegate, to: :name -# -# def some_private_method -# end -# end -# -# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#142 -class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base - include ::RuboCop::Cop::VisibilityHelp - include ::RuboCop::Cop::CommentsHelp - extend ::RuboCop::Cop::AutoCorrector - - # Validates code style on class declaration. - # Add offense when find a node out of expected order. - # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#158 - def on_class(class_node); end - - # Validates code style on class declaration. - # Add offense when find a node out of expected order. - # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#158 - def on_sclass(class_node); end - - private - - # Autocorrect by swapping between two nodes autocorrecting them - # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#174 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#305 - def begin_pos_with_comment(node); end - - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#328 - def buffer; end - - # Setting categories hash allow you to group methods in group to match - # in the {expected_order}. - # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#340 - def categories; end - - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#234 - def class_elements(class_node); end - - # Classifies a node to match with something in the {expected_order} - # - # @param node to be analysed - # @return String when the node type is a `:block` then - # {classify} recursively with the first children - # @return String when the node type is a `:send` then {find_category} - # by method name - # @return String otherwise trying to {humanize_node} of the current node - # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#194 - def classify(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#271 - def dynamic_constant?(node); end - - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#295 - def end_position_for(node); end - - # Load expected order from `ExpectedOrder` config. - # Define new terms in the expected order by adding new {categories}. - # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#334 - def expected_order; end - - # Categorize a node according to the {expected_order} - # Try to match {categories} values against the node's method_name given - # also its visibility. - # - # @param node to be analysed. - # @return [String] with the key category or the `method_name` as string - # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#212 - def find_category(node); end - - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#324 - def find_heredoc(node); end - - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#262 - def humanize_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#246 - def ignore?(node, classification); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#253 - def ignore_for_autocorrect?(node, sibling); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#289 - def marked_as_private_constant?(node, name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#279 - def private_constant?(node); end - - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#320 - def start_line_position(node); end - - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#225 - def walk_over_nested_class_definition(class_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#316 - def whole_line_comment_at_line?(line); end -end - -# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#147 -RuboCop::Cop::Layout::ClassStructure::HUMANIZED_NODE_TYPE = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#154 -RuboCop::Cop::Layout::ClassStructure::MSG = T.let(T.unsafe(nil), String) - -# Checks the indentation of here document closings. -# -# @example -# -# # bad -# class Foo -# def bar -# <<~SQL -# 'Hi' -# SQL -# end -# end -# -# # good -# class Foo -# def bar -# <<~SQL -# 'Hi' -# SQL -# end -# end -# -# # bad -# -# # heredoc contents is before closing heredoc. -# foo arg, -# <<~EOS -# Hi -# EOS -# -# # good -# foo arg, -# <<~EOS -# Hi -# EOS -# -# # good -# foo arg, -# <<~EOS -# Hi -# EOS -# -# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#48 -class RuboCop::Cop::Layout::ClosingHeredocIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#57 - def on_heredoc(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#74 - def argument_indentation_correct?(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#82 - def closing_indentation(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#101 - def find_node_used_heredoc_argument(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#90 - def heredoc_closing(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#86 - def heredoc_opening(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#117 - def indent_level(source_line); end - - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#94 - def indented_end(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#109 - def message(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#70 - def opening_indentation(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#53 -RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#54 -RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG_ARG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#52 -RuboCop::Cop::Layout::ClosingHeredocIndentation::SIMPLE_HEREDOC = T.let(T.unsafe(nil), String) - -# Checks the indentation of hanging closing parentheses in -# method calls, method definitions, and grouped expressions. A hanging -# closing parenthesis means `)` preceded by a line break. -# -# @example -# -# # bad -# some_method( -# a, -# b -# ) -# -# some_method( -# a, b -# ) -# -# some_method(a, b, c -# ) -# -# some_method(a, -# b, -# c -# ) -# -# some_method(a, -# x: 1, -# y: 2 -# ) -# -# # Scenario 1: When First Parameter Is On Its Own Line -# -# # good: when first param is on a new line, right paren is *always* -# # outdented by IndentationWidth -# some_method( -# a, -# b -# ) -# -# # good -# some_method( -# a, b -# ) -# -# # Scenario 2: When First Parameter Is On The Same Line -# -# # good: when all other params are also on the same line, outdent -# # right paren by IndentationWidth -# some_method(a, b, c -# ) -# -# # good: when all other params are on multiple lines, but are lined -# # up, align right paren with left paren -# some_method(a, -# b, -# c -# ) -# -# # good: when other params are not lined up on multiple lines, outdent -# # right paren by IndentationWidth -# some_method(a, -# x: 1, -# y: 2 -# ) -# -# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#71 -class RuboCop::Cop::Layout::ClosingParenthesisIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#84 - def on_begin(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#79 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#88 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#88 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#79 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#157 - def all_elements_aligned?(elements); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#95 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#99 - def check(node, elements); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#107 - def check_for_elements(node, elements); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#125 - def check_for_no_elements(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#171 - def correct_column_candidates(node, left_paren); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#144 - def expected_column(left_paren, elements); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#167 - def first_argument_line(elements); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#187 - def line_break_after_left_paren?(left_paren, elements); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#179 - def message(correct_column, left_paren, right_paren); end -end - -# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#77 -RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#75 -RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) - -# Checks the indentation of comments. -# -# @example -# # bad -# # comment here -# def method_name -# end -# -# # comment here -# a = 'hello' -# -# # yet another comment -# if true -# true -# end -# -# # good -# # comment here -# def method_name -# end -# -# # comment here -# a = 'hello' -# -# # yet another comment -# if true -# true -# end -# @example AllowForAlignment: false (default) -# # bad -# a = 1 # A really long comment -# # spanning two lines. -# -# # good -# # A really long comment spanning one line. -# a = 1 -# @example AllowForAlignment: true -# # good -# a = 1 # A really long comment -# # spanning two lines. -# -# source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#48 -class RuboCop::Cop::Layout::CommentIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#55 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#61 - def autocorrect(corrector, comment); end - - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#88 - def autocorrect_one(corrector, comment); end - - # Corrects all comment lines that occur immediately before the given - # comment and have the same indentation. This is to avoid a long chain - # of correcting, saving the file, parsing and inspecting again, and - # then correcting one more line, and so on. - # - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#71 - def autocorrect_preceding_comments(corrector, comment); end - - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#92 - def check(comment, comment_index); end - - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#145 - def correct_indentation(next_line); end - - # Returns true if: - # a) the cop is configured to allow extra indentation for alignment, and - # b) the currently inspected comment is aligned with the nearest preceding end-of-line - # comment. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#121 - def correctly_aligned_with_preceding_comment?(comment_index, column); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#156 - def less_indented?(line); end - - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#140 - def line_after_comment(comment); end - - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#131 - def message(column, correct_comment_indentation); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#135 - def own_line_comment?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#82 - def should_correct?(preceding_comment, reference_comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#162 - def two_alternatives?(line); end -end - -# source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#52 -RuboCop::Cop::Layout::CommentIndentation::MSG = T.let(T.unsafe(nil), String) - -# Checks for conditions that are not on the same line as -# if/while/until. -# -# @example -# -# # bad -# -# if -# some_condition -# do_something -# end -# @example -# -# # good -# -# if some_condition -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#25 -class RuboCop::Cop::Layout::ConditionPosition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#31 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#37 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#37 - def on_while(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#44 - def check(node); end - - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#58 - def message(condition); end -end - -# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#29 -RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String) - -# Checks whether the end keywords of method definitions are -# aligned properly. -# -# Two modes are supported through the EnforcedStyleAlignWith configuration -# parameter. If it's set to `start_of_line` (which is the default), the -# `end` shall be aligned with the start of the line where the `def` -# keyword is. If it's set to `def`, the `end` shall be aligned with the -# `def` keyword. -# -# @example EnforcedStyleAlignWith: start_of_line (default) -# # bad -# -# private def foo -# end -# -# # good -# -# private def foo -# end -# @example EnforcedStyleAlignWith: def -# # bad -# -# private def foo -# end -# -# # good -# -# private def foo -# end -# -# source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#36 -class RuboCop::Cop::Layout::DefEndAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#43 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#43 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#48 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#63 - def autocorrect(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#41 -RuboCop::Cop::Layout::DefEndAlignment::MSG = T.let(T.unsafe(nil), String) - -# Checks the . position in multi-line method calls. -# -# @example EnforcedStyle: leading (default) -# # bad -# something. -# method -# -# # good -# something -# .method -# @example EnforcedStyle: trailing -# # bad -# something -# .method -# -# # good -# something. -# method -# -# source://rubocop//lib/rubocop/cop/layout/dot_position.rb#25 -class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#34 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#34 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#49 - def autocorrect(corrector, dot, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#99 - def correct_dot_position_style?(dot_line, selector_line); end - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#126 - def end_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#122 - def heredoc?(node); end - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#114 - def last_heredoc_line(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#95 - def line_between?(first_line, second_line); end - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#64 - def message(dot); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#74 - def proper_dot_position?(node); end - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#106 - def receiver_end_line(node); end - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#130 - def selector_range(node); end - - class << self - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#30 - def autocorrect_incompatible_with; end - end -end - -# Checks the alignment of else keywords. Normally they should -# be aligned with an if/unless/while/until/begin/def/rescue keyword, but there -# are special cases when they should follow the same rules as the -# alignment of end. -# -# @example -# # bad -# if something -# code -# else -# code -# end -# -# # bad -# if something -# code -# elsif something -# code -# end -# -# # good -# if something -# code -# else -# code -# end -# -# source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#32 -class RuboCop::Cop::Layout::ElseAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::CheckAssignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#57 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#63 - def on_case_match(node); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#40 - def on_if(node, base = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#51 - def on_rescue(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#147 - def assignment_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#71 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#106 - def base_for_method_definition(node); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#80 - def base_range_of_if(node, base); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#89 - def base_range_of_rescue(node); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#131 - def check_alignment(base_range, else_range); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#115 - def check_assignment(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#75 - def check_nested(node, base); end -end - -# source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#38 -RuboCop::Cop::Layout::ElseAlignment::MSG = T.let(T.unsafe(nil), String) - -# Checks empty comment. -# -# @example -# # bad -# -# # -# class Foo -# end -# -# # good -# -# # -# # Description of `Foo` class. -# # -# class Foo -# end -# @example AllowBorderComment: true (default) -# # good -# -# def foo -# end -# -# ################# -# -# def bar -# end -# @example AllowBorderComment: false -# # bad -# -# def foo -# end -# -# ################# -# -# def bar -# end -# @example AllowMarginComment: true (default) -# # good -# -# # -# # Description of `Foo` class. -# # -# class Foo -# end -# @example AllowMarginComment: false -# # bad -# -# # -# # Description of `Foo` class. -# # -# class Foo -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#63 -class RuboCop::Cop::Layout::EmptyComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#69 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#133 - def allow_border_comment?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#137 - def allow_margin_comment?; end - - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#97 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#129 - def comment_text(comment); end - - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#108 - def concat_consecutive_comments(comments); end - - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#141 - def current_token(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#119 - def empty_comment_only?(comment_text); end - - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#85 - def investigate(comments); end - - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#145 - def previous_token(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#67 -RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String) - -# Enforces empty line after guard clause. -# -# This cop allows `# :nocov:` directive after guard clause because -# SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: -# -# [source,ruby] -# ---- -# def foo -# # :nocov: -# return if condition -# # :nocov: -# bar -# end -# ---- -# -# Refer to SimpleCov's documentation for more details: -# https://github.com/simplecov-ruby/simplecov#ignoringskipping-code -# -# @example -# -# # bad -# def foo -# return if need_return? -# bar -# end -# -# # good -# def foo -# return if need_return? -# -# bar -# end -# -# # good -# def foo -# return if something? -# return if something_different? -# -# bar -# end -# -# # also good -# def foo -# if something? -# do_something -# return if need_return? -# end -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#54 -class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::PathUtil - extend ::RuboCop::Cop::Util - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#63 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#84 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#106 - def contains_guard_clause?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#99 - def correct_style?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#181 - def heredoc?(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#174 - def heredoc_line(node, heredoc_node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#148 - def last_heredoc_argument(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#162 - def last_heredoc_argument_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#199 - def multiple_statements_on_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#121 - def next_line_allowed_directive_comment?(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#117 - def next_line_empty?(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#110 - def next_line_empty_or_allowed_directive_comment?(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#127 - def next_line_rescue_or_ensure?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#141 - def next_sibling_empty_or_guard_clause?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#132 - def next_sibling_parent_empty_or_else?(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#191 - def offense_location(node); end - - # SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: - # https://github.com/simplecov-ruby/simplecov#ignoringskipping-code - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#208 - def simplecov_directive_comment?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#185 - def use_heredoc_in_condition?(condition); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#60 -RuboCop::Cop::Layout::EmptyLineAfterGuardClause::END_OF_HEREDOC_LINE = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#59 -RuboCop::Cop::Layout::EmptyLineAfterGuardClause::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#61 -RuboCop::Cop::Layout::EmptyLineAfterGuardClause::SIMPLE_DIRECTIVE_COMMENT_PATTERN = T.let(T.unsafe(nil), Regexp) - -# Checks for a newline after the final magic comment. -# -# @example -# # good -# # frozen_string_literal: true -# -# # Some documentation for Person -# class Person -# # Some code -# end -# -# # bad -# # frozen_string_literal: true -# # Some documentation for Person -# class Person -# # Some code -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#23 -class RuboCop::Cop::Layout::EmptyLineAfterMagicComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#29 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#61 - def comments_before_code(source); end - - # Find the last magic comment in the source file. - # - # Take all comments that precede the first line of code (or just take - # them all in the case when there is no code), select the - # magic comments, and return the last magic comment in the file. - # - # @return [Parser::Source::Comment] if magic comments exist before code - # @return [nil] otherwise - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#55 - def last_magic_comment(source); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#43 - def offending_range(last_magic_comment); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#27 -RuboCop::Cop::Layout::EmptyLineAfterMagicComment::MSG = T.let(T.unsafe(nil), String) - -# Enforces empty line after multiline condition. -# -# @example -# # bad -# if multiline && -# condition -# do_something -# end -# -# # good -# if multiline && -# condition -# -# do_something -# end -# -# # bad -# case x -# when foo, -# bar -# do_something -# end -# -# # good -# case x -# when foo, -# bar -# -# do_something -# end -# -# # bad -# begin -# do_something -# rescue FooError, -# BarError -# handle_error -# end -# -# # good -# begin -# do_something -# rescue FooError, -# BarError -# -# handle_error -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#54 -class RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#82 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#60 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#93 - def on_rescue(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#70 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#75 - def on_until_post(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#70 - def on_while(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#75 - def on_while_post(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#127 - def autocorrect(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#105 - def check_condition(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#120 - def multiline_rescue_exceptions?(exception_nodes); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#116 - def multiline_when_condition?(when_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#112 - def next_line_empty?(line); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#58 -RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil), String) - -# Checks whether class/module/method definitions are -# separated by one or more empty lines. -# -# `NumberOfEmptyLines` can be an integer (default is 1) or -# an array (e.g. [1, 2]) to specify a minimum and maximum -# number of empty lines permitted. -# -# `AllowAdjacentOneLineDefs` configures whether adjacent -# one-line definitions are considered an offense. -# -# @example AllowAdjacentOneLineDefs: false -# -# # bad -# class ErrorA < BaseError; end -# class ErrorB < BaseError; end -# class ErrorC < BaseError; end -# -# # good -# class ErrorA < BaseError; end -# -# class ErrorB < BaseError; end -# -# class ErrorC < BaseError; end -# @example -# -# # good -# def a -# end -# -# def b -# end -# @example EmptyLineBetweenClassDefs: true (default) -# # checks for empty lines between class definitions. -# -# # bad -# class A -# end -# class B -# end -# def b -# end -# @example -# -# # good -# class A -# end -# -# class B -# end -# -# def b -# end -# @example EmptyLineBetweenModuleDefs: true (default) -# # checks for empty lines between module definitions. -# -# # bad -# module A -# end -# module B -# end -# def b -# end -# @example -# -# # good -# module A -# end -# -# module B -# end -# -# def b -# end -# @example AllowAdjacentOneLineDefs: true (default) -# -# # good -# class ErrorA < BaseError; end -# class ErrorB < BaseError; end -# class ErrorC < BaseError; end -# -# # good -# class ErrorA < BaseError; end -# -# class ErrorB < BaseError; end -# -# class ErrorC < BaseError; end -# @example EmptyLineBetweenMethodDefs: true (default) -# # checks for empty lines between method definitions. -# -# # bad -# def a -# end -# def b -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#108 -class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#145 - def autocorrect(corrector, prev_def, node, count); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#130 - def check_defs(nodes); end - - # We operate on `begin` nodes, instead of using `OnMethodDef`, - # so that we can walk over pairs of consecutive nodes and - # efficiently access a node's predecessor; #prev_node ends up - # doing a linear scan over siblings, so we don't want to call - # it on each def. - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#123 - def on_begin(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#290 - def allowance_range?; end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#274 - def autocorrect_insert_lines(corrector, newline_pos, count); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#267 - def autocorrect_remove_lines(corrector, newline_pos, count); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#227 - def blank_lines_count_between(first_def_node, second_def_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#171 - def candidate?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#191 - def class_candidate?(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#255 - def def_end(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#163 - def def_location(correction_node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#247 - def def_start(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#178 - def empty_line_between_macros; end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#259 - def end_loc(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#205 - def expected_lines; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#223 - def line_count_allowed?(count); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#239 - def lines_between_defs(first_def_node, second_def_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#182 - def macro_candidate?(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#235 - def maximum_empty_lines; end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#199 - def message(node, count: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#187 - def method_candidate?(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#231 - def minimum_empty_lines; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#195 - def module_candidate?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#214 - def multiple_blank_lines_groups?(first_def_node, second_def_node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#281 - def node_type(node); end - - class << self - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#114 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#112 -RuboCop::Cop::Layout::EmptyLineBetweenDefs::MSG = T.let(T.unsafe(nil), String) - -# Checks for two or more consecutive blank lines. -# -# @example -# -# # bad - It has two empty lines. -# some_method -# # one empty line -# # two empty lines -# some_method -# -# # good -# some_method -# # one empty line -# some_method -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#21 -class RuboCop::Cop::Layout::EmptyLines < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#28 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#45 - def each_extra_empty_line(lines); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#63 - def exceeds_line_offset?(line_diff); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#67 - def previous_and_current_lines_empty?(line); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#26 -RuboCop::Cop::Layout::EmptyLines::LINE_OFFSET = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#25 -RuboCop::Cop::Layout::EmptyLines::MSG = T.let(T.unsafe(nil), String) - -# Access modifiers should be surrounded by blank lines. -# -# @example EnforcedStyle: around (default) -# -# # bad -# class Foo -# def bar; end -# private -# def baz; end -# end -# -# # good -# class Foo -# def bar; end -# -# private -# -# def baz; end -# end -# @example EnforcedStyle: only_before -# -# # bad -# class Foo -# def bar; end -# private -# def baz; end -# end -# -# # good -# class Foo -# def bar; end -# -# private -# def baz; end -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#43 -class RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # @return [EmptyLinesAroundAccessModifier] a new instance of EmptyLinesAroundAccessModifier - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#56 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#81 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#62 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#71 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#81 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#76 - def on_sclass(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#87 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#115 - def allowed_only_before_style?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#164 - def block_start?(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#170 - def body_end?(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#158 - def class_def?(line); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#124 - def correct_next_line_if_denied_style(corrector, node, line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#154 - def empty_lines_around?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#104 - def expected_empty_lines?(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#180 - def message(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#189 - def message_for_around_style(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#199 - def message_for_only_before_style(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#176 - def next_empty_line_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#148 - def next_line_empty?(last_send_line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#141 - def previous_line_empty?(send_line); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#137 - def previous_line_ignoring_comments(processed_source, send_line); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#48 -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#52 -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#49 -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_AND_AFTER = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#51 -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#54 -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks if empty lines exist around the arguments -# of a method invocation. -# -# @example -# # bad -# do_something( -# foo -# -# ) -# -# process(bar, -# -# baz: qux, -# thud: fred) -# -# some_method( -# -# [1,2,3], -# x: y -# ) -# -# # good -# do_something( -# foo -# ) -# -# process(bar, -# baz: qux, -# thud: fred) -# -# some_method( -# [1,2,3], -# x: y -# ) -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#41 -class RuboCop::Cop::Layout::EmptyLinesAroundArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#47 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#47 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#65 - def empty_lines(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#71 - def extra_lines(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#93 - def inner_lines(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#84 - def line_numbers(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#97 - def outer_lines(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#78 - def processed_lines(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#61 - def receiver_and_method_call_on_different_lines?(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#45 -RuboCop::Cop::Layout::EmptyLinesAroundArguments::MSG = T.let(T.unsafe(nil), String) - -# Checks for a newline after an attribute accessor or a group of them. -# `alias` syntax and `alias_method`, `public`, `protected`, and `private` methods are allowed -# by default. These are customizable with `AllowAliasSyntax` and `AllowedMethods` options. -# -# @example -# # bad -# attr_accessor :foo -# def do_something -# end -# -# # good -# attr_accessor :foo -# -# def do_something -# end -# -# # good -# attr_accessor :foo -# attr_reader :bar -# attr_writer :baz -# attr :qux -# -# def do_something -# end -# @example AllowAliasSyntax: true (default) -# # good -# attr_accessor :foo -# alias :foo? :foo -# -# def do_something -# end -# @example AllowAliasSyntax: false -# # bad -# attr_accessor :foo -# alias :foo? :foo -# -# def do_something -# end -# -# # good -# attr_accessor :foo -# -# alias :foo? :foo -# -# def do_something -# end -# @example AllowedMethods: ['private'] -# # good -# attr_accessor :foo -# private :foo -# -# def do_something -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#63 -class RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#70 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#123 - def allow_alias?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#133 - def allow_alias_syntax?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#127 - def attribute_or_allowed_method?(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#83 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#107 - def next_line_empty?(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#94 - def next_line_empty_or_enable_directive_comment?(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#101 - def next_line_enable_directive_comment?(line); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#117 - def next_line_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#111 - def require_empty_line?(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#68 -RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor::MSG = T.let(T.unsafe(nil), String) - -# Checks if empty lines exist around the bodies of begin-end -# blocks. -# -# @example -# -# # good -# -# begin -# # ... -# end -# -# # bad -# -# begin -# -# # ... -# -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#24 -class RuboCop::Cop::Layout::EmptyLinesAroundBeginBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#30 - def on_kwbegin(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#36 - def style; end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#28 -RuboCop::Cop::Layout::EmptyLinesAroundBeginBody::KIND = T.let(T.unsafe(nil), String) - -# Checks if empty lines around the bodies of blocks match -# the configuration. -# -# @example EnforcedStyle: no_empty_lines (default) -# # good -# -# foo do |bar| -# # ... -# end -# @example EnforcedStyle: empty_lines -# # good -# -# foo do |bar| -# -# # ... -# -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#24 -class RuboCop::Cop::Layout::EmptyLinesAroundBlockBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#30 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#30 - def on_numblock(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#28 -RuboCop::Cop::Layout::EmptyLinesAroundBlockBody::KIND = T.let(T.unsafe(nil), String) - -# Common functionality for checking if presence/absence of empty lines -# around some kind of body matches the configuration. -# -# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#8 -module RuboCop::Cop::Layout::EmptyLinesAroundBody - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#20 - def constant_definition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#23 - def empty_line_required?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#26 - def check(node, body, adjusted_first_line: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#81 - def check_beginning(style, first_line); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#67 - def check_both(style, first_line, last_line); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#108 - def check_deferred_empty_line(body); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#43 - def check_empty_lines_except_namespace(body, first_line, last_line); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#51 - def check_empty_lines_special(body, first_line, last_line); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#85 - def check_ending(style, last_line); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#98 - def check_line(style, line, msg); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#89 - def check_source(style, line_no, desc); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#159 - def deferred_message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#132 - def first_child_requires_empty_line?(body); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#140 - def first_empty_line_required_child(body); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#155 - def message(type, desc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#122 - def namespace?(body, with_one_child: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#148 - def previous_line_ignoring_comments(send_line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#163 - def valid_body_style?(body); end -end - -# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#15 -RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_DEFERRED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#13 -RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_EXTRA = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#14 -RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_MISSING = T.let(T.unsafe(nil), String) - -# Checks if empty lines around the bodies of classes match -# the configuration. -# -# @example EnforcedStyle: no_empty_lines (default) -# # good -# -# class Foo -# def bar -# # ... -# end -# end -# @example EnforcedStyle: empty_lines -# # good -# -# class Foo -# -# def bar -# # ... -# end -# -# end -# @example EnforcedStyle: empty_lines_except_namespace -# # good -# -# class Foo -# class Bar -# -# # ... -# -# end -# end -# @example EnforcedStyle: empty_lines_special -# # good -# class Foo -# -# def bar; end -# -# end -# @example EnforcedStyle: beginning_only -# # good -# -# class Foo -# -# def bar -# # ... -# end -# end -# @example EnforcedStyle: ending_only -# # good -# -# class Foo -# def bar -# # ... -# end -# -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#67 -class RuboCop::Cop::Layout::EmptyLinesAroundClassBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#73 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#79 - def on_sclass(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#71 -RuboCop::Cop::Layout::EmptyLinesAroundClassBody::KIND = T.let(T.unsafe(nil), String) - -# Checks if empty lines exist around the bodies of `begin` -# sections. This cop doesn't check empty lines at `begin` body -# beginning/end and around method definition body. -# `Style/EmptyLinesAroundBeginBody` or `Style/EmptyLinesAroundMethodBody` -# can be used for this purpose. -# -# @example -# -# # good -# -# begin -# do_something -# rescue -# do_something2 -# else -# do_something3 -# ensure -# do_something4 -# end -# -# # good -# -# def foo -# do_something -# rescue -# do_something2 -# end -# -# # bad -# -# begin -# do_something -# -# rescue -# -# do_something2 -# -# else -# -# do_something3 -# -# ensure -# -# do_something4 -# end -# -# # bad -# -# def foo -# do_something -# -# rescue -# -# do_something2 -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#61 -class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#74 - def on_kwbegin(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#81 - def check_body(body, line_of_def_or_kwbegin); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#108 - def keyword_locations(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#125 - def keyword_locations_in_ensure(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#121 - def keyword_locations_in_rescue(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#96 - def last_rescue_and_end_on_same_line(body); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#100 - def message(location, keyword); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#104 - def style; end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#65 -RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords::MSG = T.let(T.unsafe(nil), String) - -# Checks if empty lines exist around the bodies of methods. -# -# @example -# -# # good -# -# def foo -# # ... -# end -# -# # bad -# -# def bar -# -# # ... -# -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#23 -class RuboCop::Cop::Layout::EmptyLinesAroundMethodBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#29 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#29 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#36 - def style; end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#27 -RuboCop::Cop::Layout::EmptyLinesAroundMethodBody::KIND = T.let(T.unsafe(nil), String) - -# Checks if empty lines around the bodies of modules match -# the configuration. -# -# @example EnforcedStyle: no_empty_lines (default) -# # good -# -# module Foo -# def bar -# # ... -# end -# end -# @example EnforcedStyle: empty_lines -# # good -# -# module Foo -# -# def bar -# # ... -# end -# -# end -# @example EnforcedStyle: empty_lines_except_namespace -# # good -# -# module Foo -# module Bar -# -# # ... -# -# end -# end -# @example EnforcedStyle: empty_lines_special -# # good -# module Foo -# -# def bar; end -# -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#47 -class RuboCop::Cop::Layout::EmptyLinesAroundModuleBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#53 - def on_module(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#51 -RuboCop::Cop::Layout::EmptyLinesAroundModuleBody::KIND = T.let(T.unsafe(nil), String) - -# Checks whether the end keywords are aligned properly. -# -# Three modes are supported through the `EnforcedStyleAlignWith` -# configuration parameter: -# -# If it's set to `keyword` (which is the default), the `end` -# shall be aligned with the start of the keyword (if, class, etc.). -# -# If it's set to `variable` the `end` shall be aligned with the -# left-hand-side of the variable assignment, if there is one. -# -# If it's set to `start_of_line`, the `end` shall be aligned with the -# start of the line where the matching keyword appears. -# -# This `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) -# by default. On the other hand, `Layout/BeginEndAlignment` cop aligns with -# `EnforcedStyleAlignWith: start_of_line` by default due to `||= begin` tends -# to align with the start of the line. `Layout/DefEndAlignment` cop also aligns with -# `EnforcedStyleAlignWith: start_of_line` by default. -# These style can be configured by each cop. -# -# @example EnforcedStyleAlignWith: keyword (default) -# # bad -# -# variable = if true -# end -# -# # good -# -# variable = if true -# end -# -# variable = -# if true -# end -# @example EnforcedStyleAlignWith: variable -# # bad -# -# variable = if true -# end -# -# # good -# -# variable = if true -# end -# -# variable = -# if true -# end -# @example EnforcedStyleAlignWith: start_of_line -# # bad -# -# variable = if true -# end -# -# puts(if true -# end) -# -# # good -# -# variable = if true -# end -# -# puts(if true -# end) -# -# variable = -# if true -# end -# -# source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#77 -class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#111 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#111 - def on_case_match(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#83 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#99 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#95 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#87 - def on_sclass(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#107 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#103 - def on_while(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#167 - def alignment_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#184 - def alignment_node_for_variable_style(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#148 - def asgn_variable_align_with(outer_node, inner_node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#202 - def assignment_or_operator_method(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#122 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#137 - def check_asgn_alignment(outer_node, inner_node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#126 - def check_assignment(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#158 - def check_other_alignment(node); end -end - -# Checks for Windows-style line endings in the source code. -# -# @example EnforcedStyle: native (default) -# # The `native` style means that CR+LF (Carriage Return + Line Feed) is -# # enforced on Windows, and LF is enforced on other platforms. -# -# # bad -# puts 'Hello' # Return character is LF on Windows. -# puts 'Hello' # Return character is CR+LF on other than Windows. -# -# # good -# puts 'Hello' # Return character is CR+LF on Windows. -# puts 'Hello' # Return character is LF on other than Windows. -# @example EnforcedStyle: lf -# # The `lf` style means that LF (Line Feed) is enforced on -# # all platforms. -# -# # bad -# puts 'Hello' # Return character is CR+LF on all platforms. -# -# # good -# puts 'Hello' # Return character is LF on all platforms. -# @example EnforcedStyle: crlf -# # The `crlf` style means that CR+LF (Carriage Return + Line Feed) is -# # enforced on all platforms. -# -# # bad -# puts 'Hello' # Return character is LF on all platforms. -# -# # good -# puts 'Hello' # Return character is CR+LF on all platforms. -# -# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#40 -class RuboCop::Cop::Layout::EndOfLine < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#71 - def offense_message(line); end - - # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#47 - def on_new_investigation; end - - # If there is no LF on the last line, we don't care if there's no CR. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#67 - def unimportant_missing_cr?(index, last_line, line); end - - private - - # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#85 - def last_line(processed_source); end -end - -# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#44 -RuboCop::Cop::Layout::EndOfLine::MSG_DETECTED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#45 -RuboCop::Cop::Layout::EndOfLine::MSG_MISSING = T.let(T.unsafe(nil), String) - -# Checks for extra/unnecessary whitespace. -# -# @example -# -# # good if AllowForAlignment is true -# name = "RuboCop" -# # Some comment and an empty line -# -# website += "/rubocop/rubocop" unless cond -# puts "rubocop" if debug -# -# # bad for any configuration -# set_app("RuboCop") -# website = "https://github.com/rubocop/rubocop" -# -# # good only if AllowBeforeTrailingComments is true -# object.method(arg) # this is a comment -# -# # good even if AllowBeforeTrailingComments is false or not set -# object.method(arg) # this is a comment -# -# # good with either AllowBeforeTrailingComments or AllowForAlignment -# object.method(arg) # this is a comment -# another_object.method(arg) # this is another comment -# some_object.method(arg) # this is some comment -# -# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#31 -class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base - include ::RuboCop::Cop::PrecedingFollowingAlignment - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#39 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#170 - def align_column(asgn_token); end - - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#147 - def align_equal_sign(corrector, token, align_to); end - - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#137 - def align_equal_signs(range, corrector); end - - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#52 - def aligned_locations(locs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#103 - def aligned_tok?(token); end - - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#159 - def all_relevant_assignment_lines(line_number); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#179 - def allow_for_trailing_comments?; end - - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#72 - def check_assignment(token); end - - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#81 - def check_other(token1, token2, ast); end - - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#62 - def check_tokens(ast, token1, token2); end - - # @yield [range_between(start_pos, end_pos)] - # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#91 - def extra_space_range(token1, token2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#133 - def force_equal_sign_alignment?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#111 - def ignored_range?(ast, start_pos); end - - # Returns an array of ranges that should not be reported. It's the - # extra spaces between the keys and values in a multiline hash, - # since those are handled by the Layout/HashAlignment cop. - # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#118 - def ignored_ranges(ast); end -end - -# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#37 -RuboCop::Cop::Layout::ExtraSpacing::MSG_UNALIGNED_ASGN = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#36 -RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) - -# Checks the indentation of the first argument in a method call. -# Arguments after the first one are checked by `Layout/ArgumentAlignment`, -# not by this cop. -# -# For indenting the first parameter of method _definitions_, check out -# `Layout/FirstParameterIndentation`. -# -# This cop will respect `Layout/ArgumentAlignment` and will not work when -# `EnforcedStyle: with_fixed_indentation` is specified for `Layout/ArgumentAlignment`. -# -# @example -# -# # bad -# some_method( -# first_param, -# second_param) -# -# foo = some_method( -# first_param, -# second_param) -# -# foo = some_method(nested_call( -# nested_first_param), -# second_param) -# -# foo = some_method( -# nested_call( -# nested_first_param), -# second_param) -# -# some_method nested_call( -# nested_first_param), -# second_param -# @example EnforcedStyle: special_for_inner_method_call_in_parentheses (default) -# # Same as `special_for_inner_method_call` except that the special rule -# # only applies if the outer method call encloses its arguments in -# # parentheses. -# -# # good -# some_method( -# first_param, -# second_param) -# -# foo = some_method( -# first_param, -# second_param) -# -# foo = some_method(nested_call( -# nested_first_param), -# second_param) -# -# foo = some_method( -# nested_call( -# nested_first_param), -# second_param) -# -# some_method nested_call( -# nested_first_param), -# second_param -# @example EnforcedStyle: consistent -# # The first argument should always be indented one step more than the -# # preceding line. -# -# # good -# some_method( -# first_param, -# second_param) -# -# foo = some_method( -# first_param, -# second_param) -# -# foo = some_method(nested_call( -# nested_first_param), -# second_param) -# -# foo = some_method( -# nested_call( -# nested_first_param), -# second_param) -# -# some_method nested_call( -# nested_first_param), -# second_param -# @example EnforcedStyle: consistent_relative_to_receiver -# # The first argument should always be indented one level relative to -# # the parent that is receiving the argument -# -# # good -# some_method( -# first_param, -# second_param) -# -# foo = some_method( -# first_param, -# second_param) -# -# foo = some_method(nested_call( -# nested_first_param), -# second_param) -# -# foo = some_method( -# nested_call( -# nested_first_param), -# second_param) -# -# some_method nested_call( -# nested_first_param), -# second_params -# @example EnforcedStyle: special_for_inner_method_call -# # The first argument should normally be indented one step more than -# # the preceding line, but if it's a argument for a method call that -# # is itself a argument in a method call, then the inner argument -# # should be indented relative to the inner method. -# -# # good -# some_method( -# first_param, -# second_param) -# -# foo = some_method( -# first_param, -# second_param) -# -# foo = some_method(nested_call( -# nested_first_param), -# second_param) -# -# foo = some_method( -# nested_call( -# nested_first_param), -# second_param) -# -# some_method nested_call( -# nested_first_param), -# second_param -# -# source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#147 -class RuboCop::Cop::Layout::FirstArgumentIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#222 - def eligible_method_call?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#155 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#155 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#155 - def on_super(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#281 - def argument_alignment_config; end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#174 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#178 - def bare_operator?(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#198 - def base_indentation(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#226 - def base_range(send_node, arg_node); end - - # Returns the column of the given range. For single line ranges, this - # is simple. For ranges with line breaks, we look a the last code line. - # - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#238 - def column_of(range); end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#259 - def comment_lines; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#277 - def enable_layout_first_method_argument_line_break?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#271 - def enforce_first_argument_with_fixed_indentation?; end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#182 - def message(arg_node); end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#267 - def on_new_investigation; end - - # Takes the line number of a given code line and returns a string - # containing the previous line that's not a comment line or a blank - # line. - # - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#250 - def previous_code_line(line_number); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#170 - def should_check?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#206 - def special_inner_call_indentation?(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#153 -RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), String) - -# Checks the indentation of the first element in an array literal -# where the opening bracket and the first element are on separate lines. -# The other elements' indentations are handled by `Layout/ArrayAlignment` cop. -# -# This cop will respect `Layout/ArrayAlignment` and will not work when -# `EnforcedStyle: with_fixed_indentation` is specified for `Layout/ArrayAlignment`. -# -# By default, array literals that are arguments in a method call with -# parentheses, and where the opening square bracket of the array is on the -# same line as the opening parenthesis of the method call, shall have -# their first element indented one step (two spaces) more than the -# position inside the opening parenthesis. -# -# Other array literals shall have their first element indented one step -# more than the start of the line where the opening square bracket is. -# -# This default style is called 'special_inside_parentheses'. Alternative -# styles are 'consistent' and 'align_brackets'. Here are examples: -# -# @example EnforcedStyle: special_inside_parentheses (default) -# # The `special_inside_parentheses` style enforces that the first -# # element in an array literal where the opening bracket and first -# # element are on separate lines is indented one step (two spaces) more -# # than the position inside the opening parenthesis. -# -# # bad -# array = [ -# :value -# ] -# and_in_a_method_call([ -# :no_difference -# ]) -# -# # good -# array = [ -# :value -# ] -# but_in_a_method_call([ -# :its_like_this -# ]) -# @example EnforcedStyle: consistent -# # The `consistent` style enforces that the first element in an array -# # literal where the opening bracket and the first element are on -# # separate lines is indented the same as an array literal which is not -# # defined inside a method call. -# -# # bad -# # consistent -# array = [ -# :value -# ] -# but_in_a_method_call([ -# :its_like_this -# ]) -# -# # good -# array = [ -# :value -# ] -# and_in_a_method_call([ -# :no_difference -# ]) -# @example EnforcedStyle: align_brackets -# # The `align_brackets` style enforces that the opening and closing -# # brackets are indented to the same position. -# -# # bad -# # align_brackets -# and_now_for_something = [ -# :completely_different -# ] -# -# # good -# # align_brackets -# and_now_for_something = [ -# :completely_different -# ] -# -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#85 -class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineElementIndentation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#94 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#100 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#100 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#191 - def array_alignment_config; end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#111 - def autocorrect(corrector, node); end - - # Returns the description of what the correct indentation is based on. - # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#149 - def base_description(indent_base_type); end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#115 - def brace_alignment_style; end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#119 - def check(array_node, left_parenthesis); end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#133 - def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#185 - def enforce_first_argument_with_fixed_indentation?; end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#162 - def message(base_description); end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#170 - def message_for_right_bracket(indent_base_type); end -end - -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 -RuboCop::Cop::Layout::FirstArrayElementIndentation::MSG = T.let(T.unsafe(nil), String) - -# Checks for a line break before the first element in a -# multi-line array. -# -# @example -# -# # bad -# [ :a, -# :b] -# -# # good -# [ -# :a, -# :b] -# -# # good -# [:a, :b] -# @example AllowMultilineFinalElement: false (default) -# -# # bad -# [ :a, { -# :b => :c -# }] -# -# # good -# [ -# :a, { -# :b => :c -# }] -# @example AllowMultilineFinalElement: true -# -# # good -# [:a, { -# :b => :c -# }] -# -# source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#43 -class RuboCop::Cop::Layout::FirstArrayElementLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FirstElementLineBreak - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#49 - def on_array(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#57 - def assignment_on_same_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#62 - def ignore_last_element?; end -end - -# source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#47 -RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), String) - -# Checks the indentation of the first key in a hash literal -# where the opening brace and the first key are on separate lines. The -# other keys' indentations are handled by the HashAlignment cop. -# -# By default, Hash literals that are arguments in a method call with -# parentheses, and where the opening curly brace of the hash is on the -# same line as the opening parenthesis of the method call, shall have -# their first key indented one step (two spaces) more than the position -# inside the opening parenthesis. -# -# Other hash literals shall have their first key indented one step more -# than the start of the line where the opening curly brace is. -# -# This default style is called 'special_inside_parentheses'. Alternative -# styles are 'consistent' and 'align_braces'. Here are examples: -# -# @example EnforcedStyle: special_inside_parentheses (default) -# # The `special_inside_parentheses` style enforces that the first key -# # in a hash literal where the opening brace and the first key are on -# # separate lines is indented one step (two spaces) more than the -# # position inside the opening parentheses. -# -# # bad -# hash = { -# key: :value -# } -# and_in_a_method_call({ -# no: :difference -# }) -# takes_multi_pairs_hash(x: { -# a: 1, -# b: 2 -# }, -# y: { -# c: 1, -# d: 2 -# }) -# -# # good -# special_inside_parentheses -# hash = { -# key: :value -# } -# but_in_a_method_call({ -# its_like: :this -# }) -# takes_multi_pairs_hash(x: { -# a: 1, -# b: 2 -# }, -# y: { -# c: 1, -# d: 2 -# }) -# @example EnforcedStyle: consistent -# # The `consistent` style enforces that the first key in a hash -# # literal where the opening brace and the first key are on -# # separate lines is indented the same as a hash literal which is not -# # defined inside a method call. -# -# # bad -# hash = { -# key: :value -# } -# but_in_a_method_call({ -# its_like: :this -# }) -# -# # good -# hash = { -# key: :value -# } -# and_in_a_method_call({ -# no: :difference -# }) -# @example EnforcedStyle: align_braces -# # The `align_brackets` style enforces that the opening and closing -# # braces are indented to the same position. -# -# # bad -# and_now_for_something = { -# completely: :different -# } -# takes_multi_pairs_hash(x: { -# a: 1, -# b: 2 -# }, -# y: { -# c: 1, -# d: 2 -# }) -# -# # good -# and_now_for_something = { -# completely: :different -# } -# takes_multi_pairs_hash(x: { -# a: 1, -# b: 2 -# }, -# y: { -# c: 1, -# d: 2 -# }) -# -# source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#113 -class RuboCop::Cop::Layout::FirstHashElementIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineElementIndentation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#126 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#122 - def on_hash(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#126 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#233 - def argument_alignment_config; end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#137 - def autocorrect(corrector, node); end - - # Returns the description of what the correct indentation is based on. - # - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#191 - def base_description(indent_base_type); end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#141 - def brace_alignment_style; end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#145 - def check(hash_node, left_parenthesis); end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#184 - def check_based_on_longest_key(hash_node, left_brace, left_parenthesis); end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#164 - def check_right_brace(right_brace, first_pair, left_brace, left_parenthesis); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#227 - def enforce_first_argument_with_fixed_indentation?; end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#204 - def message(base_description); end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#212 - def message_for_right_brace(indent_base_type); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#178 - def separator_style?(first_pair); end -end - -# source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#119 -RuboCop::Cop::Layout::FirstHashElementIndentation::MSG = T.let(T.unsafe(nil), String) - -# Checks for a line break before the first element in a -# multi-line hash. -# -# @example -# -# # bad -# { a: 1, -# b: 2} -# -# # good -# { -# a: 1, -# b: 2 } -# -# # good -# { -# a: 1, b: { -# c: 3 -# }} -# @example AllowMultilineFinalElement: false (default) -# -# # bad -# { a: 1, b: { -# c: 3 -# }} -# @example AllowMultilineFinalElement: true -# -# # bad -# { a: 1, -# b: { -# c: 3 -# }} -# -# # good -# { a: 1, b: { -# c: 3 -# }} -# -# source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#46 -class RuboCop::Cop::Layout::FirstHashElementLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FirstElementLineBreak - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#52 - def on_hash(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#62 - def ignore_last_element?; end -end - -# source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#50 -RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), String) - -# Checks for a line break before the first argument in a -# multi-line method call. -# -# @example -# -# # bad -# method(foo, bar, -# baz) -# -# # good -# method( -# foo, bar, -# baz) -# -# # ignored -# method foo, bar, -# baz -# @example AllowMultilineFinalElement: false (default) -# -# # bad -# method(foo, bar, { -# baz: "a", -# qux: "b", -# }) -# -# # good -# method( -# foo, bar, { -# baz: "a", -# qux: "b", -# }) -# @example AllowMultilineFinalElement: true -# -# # bad -# method(foo, -# bar, -# { -# baz: "a", -# qux: "b", -# } -# ) -# -# # good -# method(foo, bar, { -# baz: "a", -# qux: "b", -# }) -# -# # good -# method( -# foo, -# bar, -# { -# baz: "a", -# qux: "b", -# } -# ) -# -# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#66 -class RuboCop::Cop::Layout::FirstMethodArgumentLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FirstElementLineBreak - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 - def on_super(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#91 - def ignore_last_element?; end -end - -# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#70 -RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), String) - -# Checks for a line break before the first parameter in a -# multi-line method parameter definition. -# -# @example -# -# # bad -# def method(foo, bar, -# baz) -# do_something -# end -# -# # good -# def method( -# foo, bar, -# baz) -# do_something -# end -# -# # ignored -# def method foo, -# bar -# do_something -# end -# @example AllowMultilineFinalElement: false (default) -# -# # bad -# def method(foo, bar, baz = { -# :a => "b", -# }) -# do_something -# end -# -# # good -# def method( -# foo, bar, baz = { -# :a => "b", -# }) -# do_something -# end -# @example AllowMultilineFinalElement: true -# -# # good -# def method(foo, bar, baz = { -# :a => "b", -# }) -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#56 -class RuboCop::Cop::Layout::FirstMethodParameterLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FirstElementLineBreak - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#62 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#62 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#69 - def ignore_last_element?; end -end - -# source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#60 -RuboCop::Cop::Layout::FirstMethodParameterLineBreak::MSG = T.let(T.unsafe(nil), String) - -# Checks the indentation of the first parameter in a method -# definition. Parameters after the first one are checked by -# Layout/ParameterAlignment, not by this cop. -# -# For indenting the first argument of method _calls_, check out -# Layout/FirstArgumentIndentation, which supports options related to -# nesting that are irrelevant for method _definitions_. -# -# @example -# -# # bad -# def some_method( -# first_param, -# second_param) -# 123 -# end -# @example EnforcedStyle: consistent (default) -# # The first parameter should always be indented one step more than the -# # preceding line. -# -# # good -# def some_method( -# first_param, -# second_param) -# 123 -# end -# @example EnforcedStyle: align_parentheses -# # The first parameter should always be indented one step more than the -# # opening parenthesis. -# -# # good -# def some_method( -# first_param, -# second_param) -# 123 -# end -# -# source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#44 -class RuboCop::Cop::Layout::FirstParameterIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineElementIndentation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#53 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#53 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#63 - def autocorrect(corrector, node); end - - # Returns the description of what the correct indentation is based on. - # - # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#83 - def base_description(_); end - - # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#67 - def brace_alignment_style; end - - # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#71 - def check(def_node); end - - # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#91 - def message(base_description); end -end - -# source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#50 -RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), String) - -# Check that the keys, separators, and values of a multi-line hash -# literal are aligned according to configuration. The configuration -# options are: -# -# * key (left align keys, one space before hash rockets and values) -# * separator (align hash rockets and colons, right align keys) -# * table (left align keys, hash rockets, and values) -# -# The treatment of hashes passed as the last argument to a method call -# can also be configured. The options are: -# -# * always_inspect -# * always_ignore -# * ignore_implicit (without curly braces) -# -# Alternatively you can specify multiple allowed styles. That's done by -# passing a list of styles to EnforcedStyles. -# -# @example EnforcedLastArgumentHashStyle: ignore_explicit -# # Ignore only explicit hashes. -# -# # bad -# do_something(foo: 1, -# bar: 2) -# -# # good -# do_something({foo: 1, -# bar: 2}) -# @example EnforcedHashRocketStyle: separator -# # bad -# { -# :foo => bar, -# :ba => baz -# } -# { -# :foo => bar, -# :ba => baz -# } -# -# # good -# { -# :foo => bar, -# :ba => baz -# } -# @example EnforcedHashRocketStyle: table -# # bad -# { -# :foo => bar, -# :ba => baz -# } -# -# # good -# { -# :foo => bar, -# :ba => baz -# } -# @example EnforcedColonStyle: key (default) -# # bad -# { -# foo: bar, -# ba: baz -# } -# { -# foo: bar, -# ba: baz -# } -# -# # good -# { -# foo: bar, -# ba: baz -# } -# @example EnforcedColonStyle: separator -# # bad -# { -# foo: bar, -# ba: baz -# } -# -# # good -# { -# foo: bar, -# ba: baz -# } -# @example EnforcedColonStyle: table -# # bad -# { -# foo: bar, -# ba: baz -# } -# -# # good -# { -# foo: bar, -# ba: baz -# } -# @example EnforcedLastArgumentHashStyle: always_inspect (default) -# # Inspect both implicit and explicit hashes. -# -# # bad -# do_something(foo: 1, -# bar: 2) -# -# # bad -# do_something({foo: 1, -# bar: 2}) -# -# # good -# do_something(foo: 1, -# bar: 2) -# -# # good -# do_something( -# foo: 1, -# bar: 2 -# ) -# -# # good -# do_something({foo: 1, -# bar: 2}) -# -# # good -# do_something({ -# foo: 1, -# bar: 2 -# }) -# @example EnforcedLastArgumentHashStyle: always_ignore -# # Ignore both implicit and explicit hashes. -# -# # good -# do_something(foo: 1, -# bar: 2) -# -# # good -# do_something({foo: 1, -# bar: 2}) -# @example EnforcedLastArgumentHashStyle: ignore_implicit -# # Ignore only implicit hashes. -# -# # bad -# do_something({foo: 1, -# bar: 2}) -# -# # good -# do_something(foo: 1, -# bar: 2) -# @example EnforcedHashRocketStyle: key (default) -# # bad -# { -# :foo => bar, -# :ba => baz -# } -# { -# :foo => bar, -# :ba => baz -# } -# -# # good -# { -# :foo => bar, -# :ba => baz -# } -# -# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#178 -class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::HashAlignmentStyles - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # Returns the value of attribute column_deltas. - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#218 - def column_deltas; end - - # Sets the attribute column_deltas - # - # @param value the value to set the attribute column_deltas to. - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#218 - def column_deltas=(_arg0); end - - # Returns the value of attribute offenses_by. - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#218 - def offenses_by; end - - # Sets the attribute offenses_by - # - # @param value the value to set the attribute offenses_by to. - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#218 - def offenses_by=(_arg0); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#208 - def on_hash(node); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#195 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#195 - def on_super(node); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#195 - def on_yield(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#265 - def add_offenses; end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#371 - def adjust(corrector, delta, range); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#300 - def alignment_for(pair); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#314 - def alignment_for_colons; end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#310 - def alignment_for_hash_rockets; end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#390 - def argument_alignment_config; end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#233 - def argument_before_hash(hash_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#222 - def autocorrect_incompatible_with_other_cops?(node); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#283 - def check_delta(delta, node:, alignment:); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#246 - def check_pairs(node); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#337 - def correct_key_value(corrector, delta, key, value, separator); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#333 - def correct_no_value(corrector, key_delta, key); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#318 - def correct_node(corrector, node, delta); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#242 - def double_splat?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#384 - def enforce_first_argument_with_fixed_indentation?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#380 - def good_alignment?(column_deltas); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#291 - def ignore_hash_argument?(node); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#353 - def new_alignment(key); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#273 - def register_offenses_with_format(offenses, format); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#237 - def reset!; end -end - -# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#183 -RuboCop::Cop::Layout::HashAlignment::MESSAGES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#193 -RuboCop::Cop::Layout::HashAlignment::SEPARATOR_ALIGNMENT_STYLES = T.let(T.unsafe(nil), Array) - -# Checks for the placement of the closing parenthesis -# in a method call that passes a HEREDOC string as an argument. -# It should be placed at the end of the line containing the -# opening HEREDOC tag. -# -# @example -# # bad -# -# foo(<<-SQL -# bar -# SQL -# ) -# -# foo(<<-SQL, 123, <<-NOSQL, -# bar -# SQL -# baz -# NOSQL -# ) -# -# foo( -# bar(<<-SQL -# baz -# SQL -# ), -# 123, -# ) -# -# # good -# -# foo(<<-SQL) -# bar -# SQL -# -# foo(<<-SQL, 123, <<-NOSQL) -# bar -# SQL -# baz -# NOSQL -# -# foo( -# bar(<<-SQL), -# baz -# SQL -# 123, -# ) -# -# source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#53 -class RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#64 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#184 - def add_correct_closing_paren(node, corrector); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#271 - def add_correct_external_trailing_comma(node, corrector); end - - # Autocorrection note: - # - # Commas are a bit tricky to handle when the method call is - # embedded in another expression. Here's an example: - # - # [ - # first_array_value, - # foo(<<-SQL, 123, 456, - # SELECT * FROM db - # SQL - # ), - # third_array_value, - # ] - # - # The "internal" trailing comma is after `456`. - # The "external" trailing comma is after `)`. - # - # To autocorrect, we remove the latter, and move the former up: - # - # [ - # first_array_value, - # foo(<<-SQL, 123, 456), - # SELECT * FROM db - # SQL - # third_array_value, - # ] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#107 - def autocorrect(corrector, node); end - - # Closing parenthesis helpers. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#162 - def end_keyword_before_closing_parenthesis?(parenthesized_send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#222 - def exist_argument_between_heredoc_end_and_closing_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#289 - def external_trailing_comma?(node); end - - # Returns nil if no trailing external comma. - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#294 - def external_trailing_comma_offset_from_loc_end(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#137 - def extract_heredoc(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#133 - def extract_heredoc_argument(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#230 - def find_most_bottom_of_heredoc_end(arguments); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#179 - def fix_closing_parenthesis(node, corrector); end - - # External trailing comma helpers. - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#266 - def fix_external_trailing_comma(node, corrector); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#149 - def heredoc_node?(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#197 - def incorrect_parenthesis_removal_begin(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#213 - def incorrect_parenthesis_removal_end(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#244 - def internal_trailing_comma?(node); end - - # Returns nil if no trailing internal comma. - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#249 - def internal_trailing_comma_offset_from_last_arg(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#115 - def outermost_send_on_same_line(heredoc); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#188 - def remove_incorrect_closing_paren(node, corrector); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#277 - def remove_incorrect_external_trailing_comma(node, corrector); end - - # Internal trailing comma helpers. - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#238 - def remove_internal_trailing_comma(node, corrector); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#207 - def safe_to_remove_line_containing_closing_paren?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#126 - def send_missing_closing_parens?(parent, child, heredoc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#153 - def single_line_send_with_heredoc_receiver?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#305 - def space?(pos); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#168 - def subsequent_closing_parentheses_in_same_line?(outermost_send); end - - class << self - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#60 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#57 -RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(nil), String) - -# Checks the indentation of the here document bodies. The bodies -# are indented one step. -# -# Note: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default), -# this cop does not add any offenses for long here documents to -# avoid ``Layout/LineLength``'s offenses. -# -# @example -# # bad -# <<-RUBY -# something -# RUBY -# -# # good -# <<~RUBY -# something -# RUBY -# -# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#24 -class RuboCop::Cop::Layout::HeredocIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::Heredoc - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#36 - def on_heredoc(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#120 - def adjust_minus(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#115 - def adjust_squiggly(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#144 - def base_indent_level(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#155 - def heredoc_body(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#159 - def heredoc_end(node); end - - # Returns '~', '-' or nil - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#151 - def heredoc_indent_type(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#126 - def indented_body(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#133 - def indented_end(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#91 - def line_too_long?(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#103 - def longest_line(lines); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#111 - def max_line_length; end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#69 - def message(heredoc_indent_type); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#57 - def register_offense(node, heredoc_indent_type); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#79 - def type_message(indentation_width, current_indent_type); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#107 - def unlimited_heredoc_length?; end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#87 - def width_message(indentation_width); end -end - -# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#32 -RuboCop::Cop::Layout::HeredocIndentation::TYPE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#34 -RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), String) - -# Checks for inconsistent indentation. -# -# The difference between `indented_internal_methods` and `normal` is -# that the `indented_internal_methods` style prescribes that in -# classes and modules the `protected` and `private` modifier keywords -# shall be indented the same as public methods and that protected and -# private members shall be indented one step more than the modifiers. -# Other than that, both styles mean that entities on the same logical -# depth shall have the same indentation. -# -# @example EnforcedStyle: normal (default) -# # bad -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# end -# -# # bad -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# -# protected -# -# def foo -# end -# -# private -# -# def bar -# end -# end -# -# # good -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# end -# -# # good -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# -# protected -# -# def foo -# end -# -# private -# -# def bar -# end -# end -# @example EnforcedStyle: indented_internal_methods -# # bad -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# end -# -# # bad -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# -# protected -# -# def foo -# end -# -# private -# -# def bar -# end -# end -# -# # good -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# end -# -# # good -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# -# protected -# -# def foo -# end -# -# private -# -# def bar -# end -# end -# -# source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#121 -class RuboCop::Cop::Layout::IndentationConsistency < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#128 - def on_begin(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#132 - def on_kwbegin(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#138 - def autocorrect(corrector, node); end - - # Not all nodes define `bare_access_modifier?` (for example, - # `RuboCop::AST::DefNode` does not), so we must check `send_type?` first - # to avoid a NoMethodError. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#145 - def bare_access_modifier?(node); end - - # Returns an integer representing the correct indentation, or nil to - # indicate that the correct indentation is that of the first child that - # is not an access modifier. - # - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#152 - def base_column_for_normal_style(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#172 - def check(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#187 - def check_indented_internal_methods_style(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#180 - def check_normal_style(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#126 -RuboCop::Cop::Layout::IndentationConsistency::MSG = T.let(T.unsafe(nil), String) - -# Checks that the indentation method is consistent. -# Either tabs only or spaces only are used for indentation. -# -# @example EnforcedStyle: spaces (default) -# # bad -# # This example uses a tab to indent bar. -# def foo -# bar -# end -# -# # good -# # This example uses spaces to indent bar. -# def foo -# bar -# end -# @example EnforcedStyle: tabs -# # bad -# # This example uses spaces to indent bar. -# def foo -# bar -# end -# -# # good -# # This example uses a tab to indent bar. -# def foo -# bar -# end -# -# source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#34 -class RuboCop::Cop::Layout::IndentationStyle < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#42 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#58 - def autocorrect(corrector, range); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#82 - def autocorrect_lambda_for_spaces(corrector, range); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#77 - def autocorrect_lambda_for_tabs(corrector, range); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#66 - def find_offense(line, lineno); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#88 - def in_string_literal?(ranges, tabs_range); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#109 - def message(_node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#92 - def string_literal_ranges(ast); end -end - -# source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#40 -RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) - -# Checks for indentation that doesn't use the specified number -# of spaces. -# -# See also the IndentationConsistency cop which is the companion to this -# one. -# -# @example -# # bad -# class A -# def test -# puts 'hello' -# end -# end -# -# # good -# class A -# def test -# puts 'hello' -# end -# end -# @example AllowedPatterns: ['^\s*module'] -# # bad -# module A -# class B -# def test -# puts 'hello' -# end -# end -# end -# -# # good -# module A -# class B -# def test -# puts 'hello' -# end -# end -# end -# -# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#45 -class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#57 - def access_modifier?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#138 - def on_case(case_node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#146 - def on_case_match(case_match); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 - def on_ensure(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 - def on_for(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#156 - def on_if(node, base = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#73 - def on_kwbegin(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 - def on_resbody(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#61 - def on_rescue(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 - def on_sclass(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 - def on_until(node, base = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 - def on_while(node, base = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#227 - def access_modifier_indentation_style; end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#165 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#235 - def check_assignment(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#255 - def check_if(node, body, else_clause, base_loc); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#268 - def check_indentation(base_loc, body_node, style = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#169 - def check_members(base, members); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#193 - def check_members_for_indented_internal_methods_style(members); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#199 - def check_members_for_normal_style(base, members); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#341 - def check_rescue?(rescue_node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#377 - def configured_indentation_width; end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#207 - def each_member(members); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#231 - def indentation_consistency_style; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#323 - def indentation_to_check?(base_loc, body_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#219 - def indented_internal_methods_style?; end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#381 - def leftmost_modifier_of(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#302 - def message(configured_indentation_width, indentation, name); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#360 - def offending_range(body_node, indentation); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#278 - def offense(body_node, indentation, style); end - - # Returns true if the given node is within another node that has - # already been marked for autocorrection by this cop. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#313 - def other_offense_in_same_range?(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#181 - def select_check_member(member); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#345 - def skip_check?(base_loc, body_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#223 - def special_modifier?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#368 - def starts_with_access_modifier?(body_node); end -end - -# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#53 -RuboCop::Cop::Layout::IndentationWidth::MSG = T.let(T.unsafe(nil), String) - -# Checks for indentation of the first non-blank non-comment -# line in a file. -# -# @example -# # bad -# class A -# def foo; end -# end -# -# # good -# class A -# def foo; end -# end -# -# source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#20 -class RuboCop::Cop::Layout::InitialIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#26 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#36 - def first_token; end - - # @yield [range_between(space_range.begin_pos, token.begin_pos)] - # - # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#40 - def space_before(token); end -end - -# source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#24 -RuboCop::Cop::Layout::InitialIndentation::MSG = T.let(T.unsafe(nil), String) - -# Checks whether comments have a leading space after the -# `#` denoting the start of the comment. The leading space is not -# required for some RDoc special syntax, like `#++`, `#--`, -# `#:nodoc`, `=begin`- and `=end` comments, "shebang" directives, -# or rackup options. -# -# @example -# -# # bad -# #Some comment -# -# # good -# # Some comment -# @example AllowDoxygenCommentStyle: false (default) -# -# # bad -# -# #** -# # Some comment -# # Another line of comment -# #* -# @example AllowDoxygenCommentStyle: true -# -# # good -# -# #** -# # Some comment -# # Another line of comment -# #* -# @example AllowGemfileRubyComment: false (default) -# -# # bad -# -# #ruby=2.7.0 -# #ruby-gemset=myproject -# @example AllowGemfileRubyComment: true -# -# # good -# -# #ruby=2.7.0 -# #ruby-gemset=myproject -# -# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#52 -class RuboCop::Cop::Layout::LeadingCommentSpace < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#58 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#95 - def allow_doxygen_comment?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#103 - def allow_gemfile_ruby_comment?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#79 - def allowed_on_first_line?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#99 - def doxygen_comment_style?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#107 - def gemfile?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#115 - def gemfile_ruby_comment?(comment); end - - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#75 - def hash_mark(expr); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#91 - def rackup_config_file?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#87 - def rackup_options?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#111 - def ruby_comment_in_gemfile?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#83 - def shebang?(comment); end -end - -# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#56 -RuboCop::Cop::Layout::LeadingCommentSpace::MSG = T.let(T.unsafe(nil), String) - -# Checks for unnecessary leading blank lines at the beginning -# of a file. -# -# @example -# -# # bad -# # (start of file) -# -# class Foo -# end -# -# # bad -# # (start of file) -# -# # a comment -# -# # good -# # (start of file) -# class Foo -# end -# -# # good -# # (start of file) -# # a comment -# -# source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#30 -class RuboCop::Cop::Layout::LeadingEmptyLines < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#35 - def on_new_investigation; end -end - -# source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#33 -RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String) - -# Checks that strings broken over multiple lines (by a backslash) contain -# trailing spaces instead of leading spaces (default) or leading spaces -# instead of trailing spaces. -# -# @example EnforcedStyle: trailing (default) -# # bad -# 'this text contains a lot of' \ -# ' spaces' -# -# # good -# 'this text contains a lot of ' \ -# 'spaces' -# -# # bad -# 'this text is too' \ -# ' long' -# -# # good -# 'this text is too ' \ -# 'long' -# @example EnforcedStyle: leading -# # bad -# 'this text contains a lot of ' \ -# 'spaces' -# -# # good -# 'this text contains a lot of' \ -# ' spaces' -# -# # bad -# 'this text is too ' \ -# 'long' -# -# # good -# 'this text is too' \ -# ' long' -# -# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#43 -class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#54 - def on_dstr(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#113 - def autocorrect(corrector, offense_range, insert_pos, spaces); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#106 - def continuation?(line, line_num, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#138 - def enforced_style_leading?; end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#76 - def investigate(first_line, second_line, end_of_first_line); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#84 - def investigate_leading_style(first_line, second_line, end_of_first_line); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#95 - def investigate_trailing_style(first_line, second_line, end_of_first_line); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#118 - def leading_offense_range(end_of_first_line, matches); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#130 - def message(_range); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#72 - def raw_lines(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#124 - def trailing_offense_range(end_of_first_line, matches); end -end - -# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#49 -RuboCop::Cop::Layout::LineContinuationLeadingSpace::LEADING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#47 -RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_1_ENDING = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#48 -RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_2_BEGINNING = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#50 -RuboCop::Cop::Layout::LineContinuationLeadingSpace::TRAILING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp) - -# Checks that the backslash of a line continuation is separated from -# preceding text by exactly one space (default) or zero spaces. -# -# @example EnforcedStyle: space (default) -# # bad -# 'a'\ -# 'b' \ -# 'c' -# -# # good -# 'a' \ -# 'b' \ -# 'c' -# @example EnforcedStyle: no_space -# # bad -# 'a' \ -# 'b' \ -# 'c' -# -# # good -# 'a'\ -# 'b'\ -# 'c' -# -# source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#30 -class RuboCop::Cop::Layout::LineContinuationSpacing < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#34 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#81 - def autocorrect(corrector, range); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#111 - def comment_ranges(comments); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#65 - def find_offensive_spacing(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#121 - def ignore_range?(backtick_range); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#91 - def ignored_literal_ranges(ast); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#125 - def ignored_ranges; end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#49 - def investigate(line, line_number); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#115 - def last_line(processed_source); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#73 - def message(_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#130 - def no_space_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#134 - def space_style?; end -end - -# Checks the indentation of the next line after a line that ends with a string -# literal and a backslash. -# -# If `EnforcedStyle: aligned` is set, the concatenated string parts shall be aligned with the -# first part. There are some exceptions, such as implicit return values, where the -# concatenated string parts shall be indented regardless of `EnforcedStyle` configuration. -# -# If `EnforcedStyle: indented` is set, it's the second line that shall be indented one step -# more than the first line. Lines 3 and forward shall be aligned with line 2. -# -# @example -# # bad -# def some_method -# 'x' \ -# 'y' \ -# 'z' -# end -# -# my_hash = { -# first: 'a message' \ -# 'in two parts' -# } -# -# # good -# def some_method -# 'x' \ -# 'y' \ -# 'z' -# end -# @example EnforcedStyle: aligned (default) -# # bad -# puts 'x' \ -# 'y' -# -# my_hash = { -# first: 'a message' \ -# 'in two parts' -# } -# -# # good -# puts 'x' \ -# 'y' -# -# my_hash = { -# first: 'a message' \ -# 'in two parts' -# } -# @example EnforcedStyle: indented -# # bad -# result = 'x' \ -# 'y' -# -# my_hash = { -# first: 'a message' \ -# 'in two parts' -# } -# -# # good -# result = 'x' \ -# 'y' -# -# my_hash = { -# first: 'a message' \ -# 'in two parts' -# } -# -# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#74 -class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#97 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#83 - def on_dstr(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#137 - def add_offense_and_correction(node, message); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#109 - def always_indented?(dstr_node); end - - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#128 - def base_column(child); end - - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#113 - def check_aligned(children, start_index); end - - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#122 - def check_indented(children); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#103 - def strings_concatenated_with_backslash?(dstr_node); end -end - -# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#79 -RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#80 -RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#81 -RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_INDENTED = T.let(T.unsafe(nil), Array) - -# Checks the length of lines in the source code. -# The maximum length is configurable. -# The tab size is configured in the `IndentationWidth` -# of the `Layout/IndentationStyle` cop. -# It also ignores a shebang line by default. -# -# This cop has some autocorrection capabilities. -# It can programmatically shorten certain long lines by -# inserting line breaks into expressions that can be safely -# split across lines. These include arrays, hashes, and -# method calls with argument lists. -# -# If autocorrection is enabled, the following Layout cops -# are recommended to further format the broken lines. -# (Many of these are enabled by default.) -# -# * ArgumentAlignment -# * ArrayAlignment -# * BlockAlignment -# * BlockDelimiters -# * BlockEndNewline -# * ClosingParenthesisIndentation -# * FirstArgumentIndentation -# * FirstArrayElementIndentation -# * FirstHashElementIndentation -# * FirstParameterIndentation -# * HashAlignment -# * IndentationWidth -# * MultilineArrayLineBreaks -# * MultilineBlockLayout -# * MultilineHashBraceLayout -# * MultilineHashKeyLineBreaks -# * MultilineMethodArgumentLineBreaks -# * MultilineMethodParameterLineBreaks -# * ParameterAlignment -# -# Together, these cops will pretty print hashes, arrays, -# method calls, etc. For example, let's say the max columns -# is 25: -# -# @example -# -# # bad -# {foo: "0000000000", bar: "0000000000", baz: "0000000000"} -# -# # good -# {foo: "0000000000", -# bar: "0000000000", baz: "0000000000"} -# -# # good (with recommended cops enabled) -# { -# foo: "0000000000", -# bar: "0000000000", -# baz: "0000000000", -# } -# -# source://rubocop//lib/rubocop/cop/layout/line_length.rb#63 -class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckLineBreakable - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def max=(value); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#74 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 - def on_hash(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#94 - def on_investigation_end; end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#88 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#74 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 - def on_potential_breakable_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#219 - def allow_heredoc?; end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#223 - def allowed_heredoc; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#183 - def allowed_line?(line, line_index); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#135 - def breakable_block_range(block_node); end - - # Returns the value of attribute breakable_range. - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#102 - def breakable_range; end - - # Sets the attribute breakable_range - # - # @param value the value to set the attribute breakable_range to. - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#102 - def breakable_range=(_arg0); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#143 - def breakable_range_after_semicolon(semicolon_token); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#156 - def breakable_range_by_line_index; end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#250 - def check_directive_line(line, line_index); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#125 - def check_for_breakable_block(block_node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#104 - def check_for_breakable_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#117 - def check_for_breakable_semicolons(processed_source); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#171 - def check_line(line, line_index); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#267 - def check_uri_line(line, line_index); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#204 - def excess_range(uri_range, line, line_index); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#227 - def extract_heredocs(ast); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#160 - def heredocs; end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#164 - def highlight_start(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#246 - def line_in_heredoc?(line_number); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#237 - def line_in_permitted_heredoc?(line_number); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#215 - def max; end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#193 - def register_offense(loc, line, line_index, length: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#189 - def shebang?(line, line_index); end -end - -# source://rubocop//lib/rubocop/cop/layout/line_length.rb#72 -RuboCop::Cop::Layout::LineLength::MSG = T.let(T.unsafe(nil), String) - -# Checks that the closing brace in an array literal is either -# on the same line as the last array element or on a new line. -# -# When using the `symmetrical` (default) style: -# -# If an array's opening brace is on the same line as the first element -# of the array, then the closing brace should be on the same line as -# the last element of the array. -# -# If an array's opening brace is on the line above the first element -# of the array, then the closing brace should be on the line below -# the last element of the array. -# -# When using the `new_line` style: -# -# The closing brace of a multi-line array literal must be on the line -# after the last element of the array. -# -# When using the `same_line` style: -# -# The closing brace of a multi-line array literal must be on the same -# line as the last element of the array. -# -# @example EnforcedStyle: symmetrical (default) -# # bad -# [ :a, -# :b -# ] -# -# # bad -# [ -# :a, -# :b ] -# -# # good -# [ :a, -# :b ] -# -# # good -# [ -# :a, -# :b -# ] -# @example EnforcedStyle: new_line -# # bad -# [ -# :a, -# :b ] -# -# # bad -# [ :a, -# :b ] -# -# # good -# [ :a, -# :b -# ] -# -# # good -# [ -# :a, -# :b -# ] -# @example EnforcedStyle: same_line -# # bad -# [ :a, -# :b -# ] -# -# # bad -# [ -# :a, -# :b -# ] -# -# # good -# [ -# :a, -# :b ] -# -# # good -# [ :a, -# :b ] -# -# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#91 -class RuboCop::Cop::Layout::MultilineArrayBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#109 - def on_array(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#103 -RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#106 -RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#99 -RuboCop::Cop::Layout::MultilineArrayBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#95 -RuboCop::Cop::Layout::MultilineArrayBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# Ensures that each item in a multi-line array -# starts on a separate line. -# -# @example -# -# # bad -# [ -# a, b, -# c -# ] -# -# # good -# [ -# a, -# b, -# c -# ] -# -# # good -# [ -# a, -# b, -# foo( -# bar -# ) -# ] -# @example AllowMultilineFinalElement: false (default) -# -# # bad -# [a, b, foo( -# bar -# )] -# @example AllowMultilineFinalElement: true -# -# # good -# [a, b, foo( -# bar -# )] -# -# source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#47 -class RuboCop::Cop::Layout::MultilineArrayLineBreaks < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MultilineElementLineBreaks - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#53 - def on_array(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#59 - def ignore_last_element?; end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#51 -RuboCop::Cop::Layout::MultilineArrayLineBreaks::MSG = T.let(T.unsafe(nil), String) - -# Checks whether the multiline assignments have a newline -# after the assignment operator. -# -# @example EnforcedStyle: new_line (default) -# # bad -# foo = if expression -# 'bar' -# end -# -# # good -# foo = -# if expression -# 'bar' -# end -# -# # good -# foo = -# begin -# compute -# rescue => e -# nil -# end -# @example EnforcedStyle: same_line -# # good -# foo = if expression -# 'bar' -# end -# @example SupportedTypes: ['block', 'case', 'class', 'if', 'kwbegin', 'module'] (default) -# # good -# foo = -# if expression -# 'bar' -# end -# -# # good -# foo = -# [1].map do |i| -# i + 1 -# end -# @example SupportedTypes: ['block'] -# # good -# foo = if expression -# 'bar' -# end -# -# # good -# foo = -# [1].map do |i| -# 'bar' * i -# end -# -# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#60 -class RuboCop::Cop::Layout::MultilineAssignmentLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#72 - def check_assignment(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#81 - def check_by_enforced_style(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#90 - def check_new_line_offense(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#98 - def check_same_line_offense(node, rhs); end - - private - - # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#111 - def supported_types; end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#66 -RuboCop::Cop::Layout::MultilineAssignmentLayout::NEW_LINE_OFFENSE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#69 -RuboCop::Cop::Layout::MultilineAssignmentLayout::SAME_LINE_OFFENSE = T.let(T.unsafe(nil), String) - -# Checks whether the multiline do end blocks have a newline -# after the start of the block. Additionally, it checks whether the block -# arguments, if any, are on the same line as the start of the -# block. Putting block arguments on separate lines, because the whole -# line would otherwise be too long, is accepted. -# -# @example -# # bad -# blah do |i| foo(i) -# bar(i) -# end -# -# # bad -# blah do -# |i| foo(i) -# bar(i) -# end -# -# # good -# blah do |i| -# foo(i) -# bar(i) -# end -# -# # bad -# blah { |i| foo(i) -# bar(i) -# } -# -# # good -# blah { |i| -# foo(i) -# bar(i) -# } -# -# # good -# blah { | -# long_list, -# of_parameters, -# that_would_not, -# fit_on_one_line -# | -# foo(i) -# bar(i) -# } -# -# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#51 -class RuboCop::Cop::Layout::MultilineBlockLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#59 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#59 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#98 - def add_offense_for_expression(node, expr, msg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#75 - def args_on_beginning_line?(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#105 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#120 - def autocorrect_arguments(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#130 - def autocorrect_body(corrector, node, block_body); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#142 - def block_arg_string(node, args); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#90 - def characters_needed_for_space_and_pipes(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#154 - def include_trailing_comma?(args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#79 - def line_break_necessary_in_args?(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#83 - def needed_length_for_args(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#56 -RuboCop::Cop::Layout::MultilineBlockLayout::ARG_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#55 -RuboCop::Cop::Layout::MultilineBlockLayout::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#57 -RuboCop::Cop::Layout::MultilineBlockLayout::PIPE_SIZE = T.let(T.unsafe(nil), Integer) - -# Checks that the closing brace in a hash literal is either -# on the same line as the last hash element, or a new line. -# -# When using the `symmetrical` (default) style: -# -# If a hash's opening brace is on the same line as the first element -# of the hash, then the closing brace should be on the same line as -# the last element of the hash. -# -# If a hash's opening brace is on the line above the first element -# of the hash, then the closing brace should be on the line below -# the last element of the hash. -# -# When using the `new_line` style: -# -# The closing brace of a multi-line hash literal must be on the line -# after the last element of the hash. -# -# When using the `same_line` style: -# -# The closing brace of a multi-line hash literal must be on the same -# line as the last element of the hash. -# -# @example EnforcedStyle: symmetrical (default) -# -# # bad -# { a: 1, -# b: 2 -# } -# # bad -# { -# a: 1, -# b: 2 } -# -# # good -# { a: 1, -# b: 2 } -# -# # good -# { -# a: 1, -# b: 2 -# } -# @example EnforcedStyle: new_line -# # bad -# { -# a: 1, -# b: 2 } -# -# # bad -# { a: 1, -# b: 2 } -# -# # good -# { a: 1, -# b: 2 -# } -# -# # good -# { -# a: 1, -# b: 2 -# } -# @example EnforcedStyle: same_line -# # bad -# { a: 1, -# b: 2 -# } -# -# # bad -# { -# a: 1, -# b: 2 -# } -# -# # good -# { -# a: 1, -# b: 2 } -# -# # good -# { a: 1, -# b: 2 } -# -# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#91 -class RuboCop::Cop::Layout::MultilineHashBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#109 - def on_hash(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#103 -RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#106 -RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#99 -RuboCop::Cop::Layout::MultilineHashBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#95 -RuboCop::Cop::Layout::MultilineHashBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# Ensures that each key in a multi-line hash -# starts on a separate line. -# -# @example -# -# # bad -# { -# a: 1, b: 2, -# c: 3 -# } -# -# # good -# { -# a: 1, -# b: 2, -# c: 3 -# } -# -# # good -# { -# a: 1, -# b: { -# c: 3, -# } -# } -# @example AllowMultilineFinalElement: false (default) -# -# # bad -# { a: 1, b: { -# c: 3, -# }} -# @example AllowMultilineFinalElement: true -# -# # good -# { a: 1, b: { -# c: 3, -# }} -# -# source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#46 -class RuboCop::Cop::Layout::MultilineHashKeyLineBreaks < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MultilineElementLineBreaks - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#52 - def on_hash(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#68 - def ignore_last_element?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#64 - def starts_with_curly_brace?(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#50 -RuboCop::Cop::Layout::MultilineHashKeyLineBreaks::MSG = T.let(T.unsafe(nil), String) - -# Ensures that each argument in a multi-line method call -# starts on a separate line. -# -# NOTE: This cop does not move the first argument, if you want that to -# be on a separate line, see `Layout/FirstMethodArgumentLineBreak`. -# -# @example -# -# # bad -# foo(a, b, -# c -# ) -# -# # bad -# foo(a, b, { -# foo: "bar", -# }) -# -# # good -# foo( -# a, -# b, -# c -# ) -# -# # good -# foo(a, b, c) -# @example AllowMultilineFinalElement: false (default) -# -# # good -# foo( -# a, -# b, -# { -# foo: "bar", -# } -# ) -# @example AllowMultilineFinalElement: true -# -# # good -# foo( -# a, -# b, -# { -# foo: "bar", -# } -# ) -# -# source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#56 -class RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MultilineElementLineBreaks - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#62 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#81 - def ignore_last_element?; end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#60 -RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks::MSG = T.let(T.unsafe(nil), String) - -# Checks that the closing brace in a method call is either -# on the same line as the last method argument, or a new line. -# -# When using the `symmetrical` (default) style: -# -# If a method call's opening brace is on the same line as the first -# argument of the call, then the closing brace should be on the same -# line as the last argument of the call. -# -# If an method call's opening brace is on the line above the first -# argument of the call, then the closing brace should be on the line -# below the last argument of the call. -# -# When using the `new_line` style: -# -# The closing brace of a multi-line method call must be on the line -# after the last argument of the call. -# -# When using the `same_line` style: -# -# The closing brace of a multi-line method call must be on the same -# line as the last argument of the call. -# -# @example EnforcedStyle: symmetrical (default) -# # bad -# foo(a, -# b -# ) -# -# # bad -# foo( -# a, -# b) -# -# # good -# foo(a, -# b) -# -# # good -# foo( -# a, -# b -# ) -# @example EnforcedStyle: new_line -# # bad -# foo( -# a, -# b) -# -# # bad -# foo(a, -# b) -# -# # good -# foo(a, -# b -# ) -# -# # good -# foo( -# a, -# b -# ) -# @example EnforcedStyle: same_line -# # bad -# foo(a, -# b -# ) -# -# # bad -# foo( -# a, -# b -# ) -# -# # good -# foo( -# a, -# b) -# -# # good -# foo(a, -# b) -# -# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#91 -class RuboCop::Cop::Layout::MultilineMethodCallBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#109 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#115 - def children(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#119 - def ignored_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#123 - def single_line_ignoring_receiver?(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#103 -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#106 -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#99 -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#95 -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# Checks the indentation of the method name part in method calls -# that span more than one line. -# -# @example EnforcedStyle: aligned (default) -# # bad -# while myvariable -# .b -# # do something -# end -# -# # good -# while myvariable -# .b -# # do something -# end -# -# # good -# Thing.a -# .b -# .c -# @example EnforcedStyle: indented -# # good -# while myvariable -# .b -# -# # do something -# end -# @example EnforcedStyle: indented_relative_to_receiver -# # good -# while myvariable -# .a -# .b -# -# # do something -# end -# -# # good -# myvariable = Thing -# .a -# .b -# .c -# -# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#49 -class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::MultilineExpressionIndentation - extend ::RuboCop::Cop::AutoCorrector - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#55 - def validate_config; end - - private - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#136 - def align_with_base_message(rhs); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#152 - def alignment_base(node, rhs, given_style); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#67 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#140 - def base_source; end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#101 - def extra_indentation(given_style, parent); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#226 - def find_multiline_block_chain_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#237 - def first_call_has_a_dot(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#217 - def get_dot_right_above(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#113 - def message(node, lhs, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#144 - def no_base_message(lhs, rhs, node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#87 - def offending_range(node, lhs, rhs, given_style); end - - # @yield [operation_rhs.first_argument] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#247 - def operation_rhs(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#257 - def operator_rhs?(node, receiver); end - - # a - # .b - # .c - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#193 - def receiver_alignment_base(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#131 - def relative_to_receiver_message(rhs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#71 - def relevant_node?(send_node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#75 - def right_hand_side(send_node); end - - # a.b - # .c - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#181 - def semantic_alignment_base(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#201 - def semantic_alignment_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#127 - def should_align_with_base?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#123 - def should_indent_relative_to_receiver?; end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#163 - def syntactic_alignment_base(lhs, rhs); end -end - -# Checks that the closing brace in a method definition is either -# on the same line as the last method parameter, or a new line. -# -# When using the `symmetrical` (default) style: -# -# If a method definition's opening brace is on the same line as the -# first parameter of the definition, then the closing brace should be -# on the same line as the last parameter of the definition. -# -# If an method definition's opening brace is on the line above the first -# parameter of the definition, then the closing brace should be on the -# line below the last parameter of the definition. -# -# When using the `new_line` style: -# -# The closing brace of a multi-line method definition must be on the line -# after the last parameter of the definition. -# -# When using the `same_line` style: -# -# The closing brace of a multi-line method definition must be on the same -# line as the last parameter of the definition. -# -# @example EnforcedStyle: symmetrical (default) -# # bad -# def foo(a, -# b -# ) -# end -# -# # bad -# def foo( -# a, -# b) -# end -# -# # good -# def foo(a, -# b) -# end -# -# # good -# def foo( -# a, -# b -# ) -# end -# @example EnforcedStyle: new_line -# # bad -# def foo( -# a, -# b) -# end -# -# # bad -# def foo(a, -# b) -# end -# -# # good -# def foo(a, -# b -# ) -# end -# -# # good -# def foo( -# a, -# b -# ) -# end -# @example EnforcedStyle: same_line -# # bad -# def foo(a, -# b -# ) -# end -# -# # bad -# def foo( -# a, -# b -# ) -# end -# -# # good -# def foo( -# a, -# b) -# end -# -# # good -# def foo(a, -# b) -# end -# -# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#103 -class RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#121 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#121 - def on_defs(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#115 -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#118 -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#111 -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#107 -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# Ensures that each parameter in a multi-line method definition -# starts on a separate line. -# -# NOTE: This cop does not move the first argument, if you want that to -# be on a separate line, see `Layout/FirstMethodParameterLineBreak`. -# -# @example -# -# # bad -# def foo(a, b, -# c -# ) -# end -# -# # good -# def foo( -# a, -# b, -# c -# ) -# end -# -# # good -# def foo( -# a, -# b = { -# foo: "bar", -# } -# ) -# end -# -# # good -# def foo(a, b, c) -# end -# @example AllowMultilineFinalElement: false (default) -# -# # bad -# def foo(a, b = { -# foo: "bar", -# }) -# end -# @example AllowMultilineFinalElement: true -# -# # good -# def foo(a, b = { -# foo: "bar", -# }) -# end -# -# source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#57 -class RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MultilineElementLineBreaks - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#63 - def on_def(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#71 - def ignore_last_element?; end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#61 -RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks::MSG = T.let(T.unsafe(nil), String) - -# Checks the indentation of the right hand side operand in binary operations that -# span more than one line. -# -# The `aligned` style checks that operators are aligned if they are part of an `if` or `while` -# condition, an explicit `return` statement, etc. In other contexts, the second operand should -# be indented regardless of enforced style. -# -# @example EnforcedStyle: aligned (default) -# # bad -# if a + -# b -# something && -# something_else -# end -# -# # good -# if a + -# b -# something && -# something_else -# end -# @example EnforcedStyle: indented -# # bad -# if a + -# b -# something && -# something_else -# end -# -# # good -# if a + -# b -# something && -# something_else -# end -# -# source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#43 -class RuboCop::Cop::Layout::MultilineOperationIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::MultilineExpressionIndentation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#49 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#53 - def on_or(node); end - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#57 - def validate_config; end - - private - - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#68 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#78 - def check_and_or(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#110 - def message(node, lhs, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#84 - def offending_range(node, lhs, rhs, given_style); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#72 - def relevant_node?(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#121 - def right_hand_side(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#97 - def should_align?(node, rhs, given_style); end -end - -# Here we check if the parameters on a multi-line method call or -# definition are aligned. -# -# To set the alignment of the first argument, use the cop -# FirstParameterIndentation. -# -# @example EnforcedStyle: with_first_parameter (default) -# # good -# -# def foo(bar, -# baz) -# 123 -# end -# -# def foo( -# bar, -# baz -# ) -# 123 -# end -# -# # bad -# -# def foo(bar, -# baz) -# 123 -# end -# -# # bad -# -# def foo( -# bar, -# baz) -# 123 -# end -# @example EnforcedStyle: with_fixed_indentation -# # good -# -# def foo(bar, -# baz) -# 123 -# end -# -# def foo( -# bar, -# baz -# ) -# 123 -# end -# -# # bad -# -# def foo(bar, -# baz) -# 123 -# end -# -# # bad -# -# def foo( -# bar, -# baz) -# 123 -# end -# -# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#71 -class RuboCop::Cop::Layout::ParameterAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#81 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#81 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#90 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#102 - def base_column(node, args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#98 - def fixed_indentation?; end - - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#94 - def message(_node); end - - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#113 - def target_method_lineno(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#75 -RuboCop::Cop::Layout::ParameterAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#78 -RuboCop::Cop::Layout::ParameterAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) - -# Checks whether certain expressions, e.g. method calls, that could fit -# completely on a single line, are broken up into multiple lines unnecessarily. -# -# @example any configuration -# # bad -# foo( -# a, -# b -# ) -# -# puts 'string that fits on ' \ -# 'a single line' -# -# things -# .select { |thing| thing.cond? } -# .join('-') -# -# # good -# foo(a, b) -# -# puts 'string that fits on a single line' -# -# things.select { |thing| thing.cond? }.join('-') -# @example InspectBlocks: false (default) -# # good -# foo(a) do |x| -# puts x -# end -# @example InspectBlocks: true -# # bad -# foo(a) do |x| -# puts x -# end -# -# # good -# foo(a) { |x| puts x } -# -# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#45 -class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#55 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#51 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#55 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#73 - def check_assignment(node, _rhs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#133 - def comment_within?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#103 - def configured_to_not_be_inspected?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#127 - def convertible_block?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#69 - def end_with_percent_blank_string?(processed_source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#97 - def index_access_call_chained?(node); end - - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#155 - def max_line_length; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#86 - def offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#110 - def other_cop_takes_precedence?(node); end - - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#79 - def register_offense(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#93 - def require_backslash?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#116 - def single_line_block_chain_enabled?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#120 - def suitable_as_single_line?(node); end - - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#146 - def to_single_line(source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#141 - def too_long?(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#49 -RuboCop::Cop::Layout::RedundantLineBreak::MSG = T.let(T.unsafe(nil), String) - -# Checks whether the rescue and ensure keywords are aligned -# properly. -# -# @example -# -# # bad -# begin -# something -# rescue -# puts 'error' -# end -# -# # good -# begin -# something -# rescue -# puts 'error' -# end -# -# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#24 -class RuboCop::Cop::Layout::RescueEnsureAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#40 - def on_ensure(node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#44 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#36 - def on_resbody(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#186 - def access_modifier?(node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#163 - def access_modifier_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#149 - def aligned_with_leading_dot?(do_keyword_line, send_node_loc, rescue_keyword_column); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#136 - def aligned_with_line_break_method?(ancestor_node, node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#195 - def alignment_location(alignment_node); end - - # We will use ancestor or wrapper with access modifier. - # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#116 - def alignment_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#95 - def alignment_source(node, starting_loc); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#132 - def ancestor_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#155 - def assignment_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#73 - def autocorrect(corrector, node, alignment_location); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#203 - def begin_end_alignment_style; end - - # Check alignment of node with rescue or ensure modifiers. - # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#57 - def check(node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#83 - def format_message(alignment_node, alignment_loc, kw_loc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#173 - def modifier?(node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#179 - def whitespace_range(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#34 -RuboCop::Cop::Layout::RescueEnsureAlignment::ALTERNATIVE_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#32 -RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#33 -RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES_WITH_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#29 -RuboCop::Cop::Layout::RescueEnsureAlignment::MSG = T.let(T.unsafe(nil), String) - -# Checks if method calls are chained onto single line blocks. It considers that a -# line break before the dot improves the readability of the code. -# -# @example -# # bad -# example.select { |item| item.cond? }.join('-') -# -# # good -# example.select { |item| item.cond? } -# .join('-') -# -# # good (not a concern for this cop) -# example.select do |item| -# item.cond? -# end.join('-') -# -# source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#22 -class RuboCop::Cop::Layout::SingleLineBlockChain < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#32 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#32 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#56 - def call_method_after_block?(node, dot_range, closing_block_delimiter_line_num); end - - # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#40 - def offending_range(node); end - - # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#62 - def selector_range(node); end - - class << self - # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#28 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#26 -RuboCop::Cop::Layout::SingleLineBlockChain::MSG = T.let(T.unsafe(nil), String) - -# Checks for colon (:) not followed by some kind of space. -# N.B. this cop does not handle spaces after a ternary operator, which are -# instead handled by Layout/SpaceAroundOperators. -# -# @example -# # bad -# def f(a:, b:2); {a:3}; end -# -# # good -# def f(a:, b: 2); {a: 3}; end -# -# source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#16 -class RuboCop::Cop::Layout::SpaceAfterColon < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#29 - def on_kwoptarg(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#21 - def on_pair(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#43 - def followed_by_space?(colon); end - - # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#39 - def register_offense(colon); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#19 -RuboCop::Cop::Layout::SpaceAfterColon::MSG = T.let(T.unsafe(nil), String) - -# Checks for comma (,) not followed by some kind of space. -# -# @example -# -# # bad -# [1,2] -# { foo:bar,} -# -# # good -# [1, 2] -# { foo:bar, } -# -# source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#17 -class RuboCop::Cop::Layout::SpaceAfterComma < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SpaceAfterPunctuation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#26 - def kind(token); end - - # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#21 - def space_style_before_rcurly; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#32 - def before_semicolon?(token); end -end - -# Checks for space between a method name and a left parenthesis in defs. -# -# @example -# -# # bad -# def func (x) end -# def method= (y) end -# -# # good -# def func(x) end -# def method=(y) end -# -# source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#17 -class RuboCop::Cop::Layout::SpaceAfterMethodName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#23 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#23 - def on_defs(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#21 -RuboCop::Cop::Layout::SpaceAfterMethodName::MSG = T.let(T.unsafe(nil), String) - -# Checks for space after `!`. -# -# @example -# # bad -# ! something -# -# # good -# !something -# -# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#14 -class RuboCop::Cop::Layout::SpaceAfterNot < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#21 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#33 - def whitespace_after_operator?(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#18 -RuboCop::Cop::Layout::SpaceAfterNot::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#19 -RuboCop::Cop::Layout::SpaceAfterNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for semicolon (;) not followed by some kind of space. -# -# @example -# # bad -# x = 1;y = 2 -# -# # good -# x = 1; y = 2 -# -# source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#14 -class RuboCop::Cop::Layout::SpaceAfterSemicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SpaceAfterPunctuation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#23 - def kind(token); end - - # source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#18 - def space_style_before_rcurly; end -end - -# Checks the spacing inside and after block parameters pipes. Line breaks -# inside parameter pipes are checked by `Layout/MultilineBlockLayout` and -# not by this cop. -# -# @example EnforcedStyleInsidePipes: no_space (default) -# # bad -# {}.each { | x, y |puts x } -# ->( x, y ) { puts x } -# -# # good -# {}.each { |x, y| puts x } -# ->(x, y) { puts x } -# @example EnforcedStyleInsidePipes: space -# # bad -# {}.each { |x, y| puts x } -# ->(x, y) { puts x } -# -# # good -# {}.each { | x, y | puts x } -# ->( x, y ) { puts x } -# -# source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#27 -class RuboCop::Cop::Layout::SpaceAroundBlockParameters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#32 - def on_block(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#65 - def check_after_closing_pipe(arguments); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#125 - def check_arg(arg); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#103 - def check_closing_pipe_space(arguments, closing_pipe); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#121 - def check_each_arg(args); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#56 - def check_inside_pipes(arguments); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#150 - def check_no_space(space_begin_pos, space_end_pos, msg); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#73 - def check_no_space_style_inside_pipes(arguments); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#92 - def check_opening_pipe_space(arguments, opening_pipe); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#136 - def check_space(space_begin_pos, space_end_pos, range, msg, node = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#85 - def check_space_style_inside_pipes(arguments); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#113 - def last_end_pos_inside_pipes(arguments, range); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#44 - def pipes(arguments); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#48 - def pipes?(arguments); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#52 - def style_parameter_name; end -end - -# Checks that the equals signs in parameter default assignments -# have or don't have surrounding space depending on configuration. -# -# @example EnforcedStyle: space (default) -# # bad -# def some_method(arg1=:default, arg2=nil, arg3=[]) -# # do something... -# end -# -# # good -# def some_method(arg1 = :default, arg2 = nil, arg3 = []) -# # do something... -# end -# @example EnforcedStyle: no_space -# # bad -# def some_method(arg1 = :default, arg2 = nil, arg3 = []) -# # do something... -# end -# -# # good -# def some_method(arg1=:default, arg2=nil, arg3=[]) -# # do something... -# end -# -# source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#30 -class RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#38 - def on_optarg(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#67 - def autocorrect(corrector, range); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#46 - def check_optarg(arg, equals, value); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#58 - def incorrect_style_detected(arg, value); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#83 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#79 - def no_surrounding_space?(arg, equals); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#75 - def space_on_both_sides?(arg, equals); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#36 -RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault::MSG = T.let(T.unsafe(nil), String) - -# Checks the spacing around the keywords. -# -# @example -# -# # bad -# something 'test'do|x| -# end -# -# while(something) -# end -# -# something = 123if test -# -# # good -# something 'test' do |x| -# end -# -# while (something) -# end -# -# something = 123 if test -# -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#27 -class RuboCop::Cop::Layout::SpaceAroundKeyword < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#40 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#44 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#48 - def on_break(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#52 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#56 - def on_case_match(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#156 - def on_defined?(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#60 - def on_ensure(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#64 - def on_for(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#68 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#72 - def on_if_guard(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#76 - def on_in_pattern(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#80 - def on_kwbegin(node); end - - # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby27`. - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#85 - def on_match_pattern(node); end - - # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby30`. - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#92 - def on_match_pattern_p(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#96 - def on_next(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#100 - def on_or(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#104 - def on_postexe(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#108 - def on_preexe(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#112 - def on_resbody(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#116 - def on_rescue(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#120 - def on_return(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#124 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#128 - def on_super(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#136 - def on_unless_guard(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#140 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#144 - def on_when(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#148 - def on_while(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#152 - def on_yield(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#132 - def on_zsuper(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#235 - def accept_left_parenthesis?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#239 - def accept_left_square_bracket?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#243 - def accept_namespace_operator?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#228 - def accepted_opening_delimiter?(range, char); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#162 - def check(node, locations, begin_keyword = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#177 - def check_begin(node, range, begin_keyword); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#183 - def check_end(node, range, begin_keyword); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#196 - def check_keyword(node, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#192 - def do?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#251 - def namespace_operator?(range, pos); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#255 - def preceded_by_operator?(node, _range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#247 - def safe_navigation_call?(range, pos); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#217 - def space_after_missing?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#210 - def space_before_missing?(range); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#36 -RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_PAREN = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#37 -RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_SQUARE_BRACKET = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#38 -RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#33 -RuboCop::Cop::Layout::SpaceAroundKeyword::DO = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#31 -RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_AFTER = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#30 -RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_BEFORE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#35 -RuboCop::Cop::Layout::SpaceAroundKeyword::NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#34 -RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), String) - -# Checks method call operators to not have spaces around them. -# -# @example -# # bad -# foo. bar -# foo .bar -# foo . bar -# foo. bar .buzz -# foo -# . bar -# . buzz -# foo&. bar -# foo &.bar -# foo &. bar -# foo &. bar&. buzz -# RuboCop:: Cop -# RuboCop:: Cop:: Base -# :: RuboCop::Cop -# -# # good -# foo.bar -# foo.bar.buzz -# foo -# .bar -# .buzz -# foo&.bar -# foo&.bar&.buzz -# RuboCop::Cop -# RuboCop::Cop::Base -# ::RuboCop::Cop -# -# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#37 -class RuboCop::Cop::Layout::SpaceAroundMethodCallOperator < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#53 - def on_const(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#45 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#45 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#87 - def check_space(begin_pos, end_pos); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#67 - def check_space_after_dot(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#81 - def check_space_after_double_colon(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#61 - def check_space_before_dot(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#43 -RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#41 -RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) - -# Checks that operators have space around them, except for ** which -# should or shouldn't have surrounding space depending on configuration. -# It allows vertical alignment consisting of one or more whitespace -# around operators. -# -# This cop has `AllowForAlignment` option. When `true`, allows most -# uses of extra spacing if the intent is to align with an operator on -# the previous or next line, not counting empty lines or comment lines. -# -# @example -# # bad -# total = 3*4 -# "apple"+"juice" -# my_number = 38/4 -# -# # good -# total = 3 * 4 -# "apple" + "juice" -# my_number = 38 / 4 -# @example AllowForAlignment: true (default) -# # good -# { -# 1 => 2, -# 11 => 3 -# } -# @example AllowForAlignment: false -# # bad -# { -# 1 => 2, -# 11 => 3 -# } -# @example EnforcedStyleForExponentOperator: no_space (default) -# # bad -# a ** b -# -# # good -# a**b -# @example EnforcedStyleForExponentOperator: space -# # bad -# a**b -# -# # good -# a ** b -# @example EnforcedStyleForRationalLiterals: no_space (default) -# # bad -# 1 / 48r -# -# # good -# 1/48r -# @example EnforcedStyleForRationalLiterals: space -# # bad -# 1/48r -# -# # good -# 1 / 48r -# -# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#67 -class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base - include ::RuboCop::Cop::PrecedingFollowingAlignment - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RationalLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 - def on_and_asgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 - def on_assignment(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 - def on_binary(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#125 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#92 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 - def on_masgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#149 - def on_match_pattern(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#141 - def on_op_asgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 - def on_or(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 - def on_or_asgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#84 - def on_pair(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#99 - def on_resbody(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#80 - def on_sclass(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#107 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#141 - def on_special_asgn(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#256 - def align_hash_cop_config; end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#195 - def autocorrect(corrector, range, right_operand); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#179 - def check_operator(type, operator, right_operand); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#209 - def enclose_operator_with_space(corrector, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#236 - def excess_leading_space?(type, operator, with_space); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#251 - def excess_trailing_space?(right_operand, with_space); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#274 - def force_equal_sign_alignment?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#260 - def hash_table_style?; end - - # @yield [msg] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#190 - def offense(type, operator, with_space, right_operand); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#222 - def offense_message(type, operator, with_space, right_operand); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#175 - def operator_with_regular_syntax?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#169 - def regular_operator?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#278 - def should_not_have_surrounding_space?(operator, right_operand); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#264 - def space_around_exponent_operator?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#268 - def space_around_slash_operator?(right_operand); end - - class << self - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#76 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#74 -RuboCop::Cop::Layout::SpaceAroundOperators::EXCESSIVE_SPACE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#73 -RuboCop::Cop::Layout::SpaceAroundOperators::IRREGULAR_METHODS = T.let(T.unsafe(nil), Array) - -# Checks that block braces have or don't have a space before the opening -# brace depending on configuration. -# -# @example EnforcedStyle: space (default) -# # bad -# foo.map{ |a| -# a.bar.to_s -# } -# -# # good -# foo.map { |a| -# a.bar.to_s -# } -# @example EnforcedStyle: no_space -# # bad -# foo.map { |a| -# a.bar.to_s -# } -# -# # good -# foo.map{ |a| -# a.bar.to_s -# } -# @example EnforcedStyleForEmptyBraces: space (default) -# # bad -# 7.times{} -# -# # good -# 7.times {} -# @example EnforcedStyleForEmptyBraces: no_space -# # bad -# 7.times {} -# -# # good -# 7.times{} -# -# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#44 -class RuboCop::Cop::Layout::SpaceBeforeBlockBraces < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#56 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#56 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#133 - def autocorrect(corrector, range); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#153 - def block_delimiters_style; end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#83 - def check_empty(left_brace, space_plus_brace, used_style); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#109 - def check_non_empty(left_brace, space_plus_brace, used_style); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#149 - def conflict_with_block_delimiters?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#157 - def empty_braces?(loc); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#101 - def handle_different_styles_for_empty_braces(used_style); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#124 - def space_detected(left_brace, space_plus_brace); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#117 - def space_missing(left_brace); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#140 - def style_for_empty_braces; end - - class << self - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#52 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#50 -RuboCop::Cop::Layout::SpaceBeforeBlockBraces::DETECTED_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#49 -RuboCop::Cop::Layout::SpaceBeforeBlockBraces::MISSING_MSG = T.let(T.unsafe(nil), String) - -# Checks for space between the name of a receiver and a left -# brackets. -# -# @example -# -# # bad -# collection [index_or_key] -# -# # good -# collection[index_or_key] -# -# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#17 -class RuboCop::Cop::Layout::SpaceBeforeBrackets < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#24 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#48 - def dot_before_brackets?(node, receiver_end_pos, selector_begin_pos); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#35 - def offense_range(node, begin_pos); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#54 - def offense_range_for_assignment(node, begin_pos); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#67 - def reference_variable_with_brackets?(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#63 - def register_offense(range); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#21 -RuboCop::Cop::Layout::SpaceBeforeBrackets::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#22 -RuboCop::Cop::Layout::SpaceBeforeBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for comma (,) preceded by space. -# -# @example -# # bad -# [1 , 2 , 3] -# a(1 , 2) -# each { |a , b| } -# -# # good -# [1, 2, 3] -# a(1, 2) -# each { |a, b| } -# -# source://rubocop//lib/rubocop/cop/layout/space_before_comma.rb#19 -class RuboCop::Cop::Layout::SpaceBeforeComma < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SpaceBeforePunctuation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_before_comma.rb#23 - def kind(token); end -end - -# Checks for missing space between a token and a comment on the -# same line. -# -# @example -# # bad -# 1 + 1# this operation does ... -# -# # good -# 1 + 1 # this operation does ... -# -# source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#15 -class RuboCop::Cop::Layout::SpaceBeforeComment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#20 - def on_new_investigation; end -end - -# source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#18 -RuboCop::Cop::Layout::SpaceBeforeComment::MSG = T.let(T.unsafe(nil), String) - -# Checks that exactly one space is used between a method name and the -# first argument for method calls without parentheses. -# -# Alternatively, extra spaces can be added to align the argument with -# something on a preceding or following line, if the AllowForAlignment -# config parameter is true. -# -# @example -# # bad -# something x -# something y, z -# something'hello' -# -# # good -# something x -# something y, z -# something 'hello' -# -# source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#24 -class RuboCop::Cop::Layout::SpaceBeforeFirstArg < ::RuboCop::Cop::Base - include ::RuboCop::Cop::PrecedingFollowingAlignment - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#35 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#35 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#55 - def expect_params_after_method_name?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#64 - def no_space_between_method_name_and_first_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#51 - def regular_method_call_with_arguments?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#31 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#29 -RuboCop::Cop::Layout::SpaceBeforeFirstArg::MSG = T.let(T.unsafe(nil), String) - -# Checks for semicolon (;) preceded by space. -# -# @example -# # bad -# x = 1 ; y = 2 -# -# # good -# x = 1; y = 2 -# -# source://rubocop//lib/rubocop/cop/layout/space_before_semicolon.rb#14 -class RuboCop::Cop::Layout::SpaceBeforeSemicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SpaceBeforePunctuation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_before_semicolon.rb#18 - def kind(token); end -end - -# Checks for spaces between `->` and opening parameter -# parenthesis (`(`) in lambda literals. -# -# @example EnforcedStyle: require_no_space (default) -# # bad -# a = -> (x, y) { x + y } -# -# # good -# a = ->(x, y) { x + y } -# @example EnforcedStyle: require_space -# # bad -# a = ->(x, y) { x + y } -# -# # good -# a = -> (x, y) { x + y } -# -# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#22 -class RuboCop::Cop::Layout::SpaceInLambdaLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#30 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#50 - def arrow_lambda_with_args?(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#72 - def lambda_arguments(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#65 - def range_of_offense(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#58 - def space_after_arrow(lambda_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#54 - def space_after_arrow?(lambda_node); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#28 -RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_NO_SPACE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#27 -RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(nil), String) - -# Checks that brackets used for array literals have or don't have -# surrounding space depending on configuration. -# -# @example EnforcedStyle: no_space (default) -# # The `no_space` style enforces that array literals have -# # no surrounding space. -# -# # bad -# array = [ a, b, c, d ] -# -# # good -# array = [a, b, c, d] -# @example EnforcedStyle: space -# # The `space` style enforces that array literals have -# # surrounding space. -# -# # bad -# array = [a, b, c, d] -# -# # good -# array = [ a, b, c, d ] -# @example EnforcedStyle: compact -# # The `compact` style normally requires a space inside -# # array brackets, with the exception that successive left -# # or right brackets are collapsed together in nested arrays. -# -# # bad -# array = [ a, [ b, c ] ] -# array = [ -# [ a ], -# [ b, c ] -# ] -# -# # good -# array = [ a, [ b, c ]] -# array = [[ a ], -# [ b, c ]] -# @example EnforcedStyleForEmptyBrackets: no_space (default) -# # The `no_space` EnforcedStyleForEmptyBrackets style enforces that -# # empty array brackets do not contain spaces. -# -# # bad -# foo = [ ] -# bar = [ ] -# -# # good -# foo = [] -# bar = [] -# @example EnforcedStyleForEmptyBrackets: space -# # The `space` EnforcedStyleForEmptyBrackets style enforces that -# # empty array brackets contain exactly one space. -# -# # bad -# foo = [] -# bar = [ ] -# -# # good -# foo = [ ] -# bar = [ ] -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#70 -class RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#78 - def on_array(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#109 - def array_brackets(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#95 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#217 - def compact(corrector, bracket, side); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#203 - def compact_corrections(corrector, node, left, right); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#195 - def compact_offense(node, token, side: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#157 - def compact_offenses(node, left, right, start_ok, end_ok); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#118 - def empty_config; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#126 - def end_has_own_line?(token); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#133 - def index_for(node, token); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#141 - def issue_offenses(node, left, right, start_ok, end_ok); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#137 - def line_and_column_for(token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#178 - def multi_dimensional_array?(node, token, side: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#189 - def next_to_bracket?(token, side: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#153 - def next_to_comment?(node, token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#122 - def next_to_newline?(node, token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#170 - def qualifies_for_compact?(node, token, side: T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#76 -RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#75 -RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::MSG = T.let(T.unsafe(nil), String) - -# Checks for unnecessary additional spaces inside array percent literals -# (i.e. %i/%w). -# -# Note that blank percent literals (e.g. `%i( )`) are checked by -# `Layout/SpaceInsidePercentLiteralDelimiters`. -# -# @example -# -# # bad -# %w(foo bar baz) -# # good -# %i(foo bar baz) -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#18 -class RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#26 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#30 - def on_percent_literal(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#40 - def each_unnecessary_space_match(node, &blk); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#23 -RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#24 -RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MULTIPLE_SPACES_BETWEEN_ITEMS_REGEX = T.let(T.unsafe(nil), Regexp) - -# Checks that block braces have or don't have surrounding space inside -# them on configuration. For blocks taking parameters, it checks that the -# left brace has or doesn't have trailing space depending on -# configuration. -# -# @example EnforcedStyle: space (default) -# # The `space` style enforces that block braces have -# # surrounding space. -# -# # bad -# some_array.each {puts e} -# -# # good -# some_array.each { puts e } -# @example EnforcedStyle: no_space -# # The `no_space` style enforces that block braces don't -# # have surrounding space. -# -# # bad -# some_array.each { puts e } -# -# # good -# some_array.each {puts e} -# @example EnforcedStyleForEmptyBraces: no_space (default) -# # The `no_space` EnforcedStyleForEmptyBraces style enforces that -# # block braces don't have a space in between when empty. -# -# # bad -# some_array.each { } -# some_array.each { } -# some_array.each { } -# -# # good -# some_array.each {} -# @example EnforcedStyleForEmptyBraces: space -# # The `space` EnforcedStyleForEmptyBraces style enforces that -# # block braces have at least a space in between when empty. -# -# # bad -# some_array.each {} -# -# # good -# some_array.each { } -# some_array.each { } -# some_array.each { } -# @example SpaceBeforeBlockParameters: true (default) -# # The SpaceBeforeBlockParameters style set to `true` enforces that -# # there is a space between `{` and `|`. Overrides `EnforcedStyle` -# # if there is a conflict. -# -# # bad -# [1, 2, 3].each {|n| n * 2 } -# -# # good -# [1, 2, 3].each { |n| n * 2 } -# @example SpaceBeforeBlockParameters: false -# # The SpaceBeforeBlockParameters style set to `false` enforces that -# # there is no space between `{` and `|`. Overrides `EnforcedStyle` -# # if there is a conflict. -# -# # bad -# [1, 2, 3].each { |n| n * 2 } -# -# # good -# [1, 2, 3].each {|n| n * 2 } -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#79 -class RuboCop::Cop::Layout::SpaceInsideBlockBraces < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#85 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#85 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#122 - def adjacent_braces(left_brace, right_brace); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#161 - def aligned_braces?(inner, right_brace, column); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#130 - def braces_with_contents_inside(node, inner); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#105 - def check_inside(node, left_brace, right_brace); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#137 - def check_left_brace(inner, left_brace, args_delimiter); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#145 - def check_right_brace(node, inner, left_brace, right_brace, single_line); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#165 - def inner_last_space_count(inner); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#157 - def multiline_block?(left_brace, right_brace); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#222 - def no_space(begin_pos, end_pos, msg); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#169 - def no_space_inside_left_brace(left_brace, args_delimiter); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#238 - def offense(begin_pos, end_pos, msg, style_param = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#201 - def pipe?(args_delimiter); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#230 - def space(begin_pos, end_pos, msg); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#186 - def space_inside_left_brace(left_brace, args_delimiter); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#205 - def space_inside_right_brace(inner, right_brace, column); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#253 - def style_for_empty_braces; end -end - -# Checks that braces used for hash literals have or don't have -# surrounding space depending on configuration. -# -# @example EnforcedStyle: space (default) -# # The `space` style enforces that hash literals have -# # surrounding space. -# -# # bad -# h = {a: 1, b: 2} -# -# # good -# h = { a: 1, b: 2 } -# @example EnforcedStyle: no_space -# # The `no_space` style enforces that hash literals have -# # no surrounding space. -# -# # bad -# h = { a: 1, b: 2 } -# -# # good -# h = {a: 1, b: 2} -# @example EnforcedStyle: compact -# # The `compact` style normally requires a space inside -# # hash braces, with the exception that successive left -# # braces or right braces are collapsed together in nested hashes. -# -# # bad -# h = { a: { b: 2 } } -# foo = { { a: 1 } => { b: { c: 2 } } } -# -# # good -# h = { a: { b: 2 }} -# foo = {{ a: 1 } => { b: { c: 2 }}} -# @example EnforcedStyleForEmptyBraces: no_space (default) -# # The `no_space` EnforcedStyleForEmptyBraces style enforces that -# # empty hash braces do not contain spaces. -# -# # bad -# foo = { } -# bar = { } -# baz = { -# } -# -# # good -# foo = {} -# bar = {} -# baz = {} -# @example EnforcedStyleForEmptyBraces: space -# # The `space` EnforcedStyleForEmptyBraces style enforces that -# # empty hash braces contain space. -# -# # bad -# foo = {} -# -# # good -# foo = { } -# foo = { } -# foo = { -# } -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#70 -class RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#78 - def on_hash(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#137 - def ambiguous_or_unexpected_style_detected(style, is_match); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#129 - def autocorrect(corrector, range); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#89 - def check(token1, token2); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#184 - def check_whitespace_only_hash(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#202 - def enforce_no_space_style_for_empty_braces?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#104 - def expect_space?(token1, token2); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#117 - def incorrect_style_detected(token1, token2, expect_space, is_empty_braces); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#150 - def message(brace, is_empty_braces, expect_space); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#145 - def offense?(token1, expect_space); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#196 - def range_inside_hash(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#176 - def range_of_space_to_the_left(range); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#168 - def range_of_space_to_the_right(range); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#160 - def space_range(token_range); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#76 -RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces::MSG = T.let(T.unsafe(nil), String) - -# Checks for spaces inside ordinary round parentheses. -# -# @example EnforcedStyle: no_space (default) -# # The `no_space` style enforces that parentheses do not have spaces. -# -# # bad -# f( 3) -# g = (a + 3 ) -# f( ) -# -# # good -# f(3) -# g = (a + 3) -# f() -# @example EnforcedStyle: space -# # The `space` style enforces that parentheses have a space at the -# # beginning and end. -# # Note: Empty parentheses should not have spaces. -# -# # bad -# f(3) -# g = (a + 3) -# y( ) -# -# # good -# f( 3 ) -# g = ( a + 3 ) -# y() -# @example EnforcedStyle: compact -# # The `compact` style enforces that parentheses have a space at the -# # beginning with the exception that successive parentheses are allowed. -# # Note: Empty parentheses should not have spaces. -# -# # bad -# f(3) -# g = (a + 3) -# y( ) -# g( f( x ) ) -# g( f( x( 3 ) ), 5 ) -# g( ( ( 3 + 5 ) * f) ** x, 5 ) -# -# # good -# f( 3 ) -# g = ( a + 3 ) -# y() -# g( f( x )) -# g( f( x( 3 )), 5 ) -# g((( 3 + 5 ) * f ) ** x, 5 ) -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#57 -class RuboCop::Cop::Layout::SpaceInsideParens < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#66 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#161 - def can_be_ignored?(token1, token2); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#99 - def correct_extraneous_space(tokens); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#115 - def correct_extraneous_space_between_consecutive_parens(token1, token2); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#124 - def correct_extraneous_space_in_empty_parens(token1, token2); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#135 - def correct_missing_space(token1, token2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#153 - def left_parens?(token1, token2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#149 - def parens?(token1, token2); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#88 - def process_with_compact_style(tokens); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#81 - def process_with_space_style(tokens); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#157 - def right_parens?(token1, token2); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#63 -RuboCop::Cop::Layout::SpaceInsideParens::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#64 -RuboCop::Cop::Layout::SpaceInsideParens::MSG_SPACE = T.let(T.unsafe(nil), String) - -# Checks for unnecessary additional spaces inside the delimiters of -# %i/%w/%x literals. -# -# @example -# -# # bad -# %i( foo bar baz ) -# -# # good -# %i(foo bar baz) -# -# # bad -# %w( foo bar baz ) -# -# # good -# %w(foo bar baz) -# -# # bad -# %x( ls -l ) -# -# # good -# %x(ls -l) -# -# # bad -# %w( ) -# %w( -# ) -# -# # good -# %w() -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#36 -class RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#45 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#53 - def on_percent_literal(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#49 - def on_xstr(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#60 - def add_offenses_for_blank_spaces(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#69 - def add_offenses_for_unnecessary_spaces(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#85 - def body_range(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#79 - def regex_matches(node, &blk); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#42 -RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::BEGIN_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#43 -RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::END_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#41 -RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::MSG = T.let(T.unsafe(nil), String) - -# Checks for spaces inside range literals. -# -# @example -# # bad -# 1 .. 3 -# -# # good -# 1..3 -# -# # bad -# 'a' .. 'z' -# -# # good -# 'a'..'z' -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#20 -class RuboCop::Cop::Layout::SpaceInsideRangeLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#29 - def on_erange(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#25 - def on_irange(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#35 - def check(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#23 -RuboCop::Cop::Layout::SpaceInsideRangeLiteral::MSG = T.let(T.unsafe(nil), String) - -# Checks that reference brackets have or don't have -# surrounding space depending on configuration. -# -# @example EnforcedStyle: no_space (default) -# # The `no_space` style enforces that reference brackets have -# # no surrounding space. -# -# # bad -# hash[ :key ] -# array[ index ] -# -# # good -# hash[:key] -# array[index] -# @example EnforcedStyle: space -# # The `space` style enforces that reference brackets have -# # surrounding space. -# -# # bad -# hash[:key] -# array[index] -# -# # good -# hash[ :key ] -# array[ index ] -# @example EnforcedStyleForEmptyBrackets: no_space (default) -# # The `no_space` EnforcedStyleForEmptyBrackets style enforces that -# # empty reference brackets do not contain spaces. -# -# # bad -# foo[ ] -# foo[ ] -# foo[ -# ] -# -# # good -# foo[] -# @example EnforcedStyleForEmptyBrackets: space -# # The `space` EnforcedStyleForEmptyBrackets style enforces that -# # empty reference brackets contain exactly one space. -# -# # bad -# foo[] -# foo[ ] -# foo[ -# ] -# -# # good -# foo[ ] -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#60 -class RuboCop::Cop::Layout::SpaceInsideReferenceBrackets < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#70 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#92 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#121 - def closing_bracket(tokens, opening_bracket); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#137 - def empty_config; end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#110 - def left_ref_bracket(node, tokens); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#132 - def previous_token(current_token); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#104 - def reference_brackets(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#66 -RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#65 -RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#68 -RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for whitespace within string interpolations. -# -# @example EnforcedStyle: no_space (default) -# # bad -# var = "This is the #{ space } example" -# -# # good -# var = "This is the #{no_space} example" -# @example EnforcedStyle: space -# # bad -# var = "This is the #{no_space} example" -# -# # good -# var = "This is the #{ space } example" -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#21 -class RuboCop::Cop::Layout::SpaceInsideStringInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#30 - def on_interpolation(begin_node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#46 - def autocorrect(corrector, begin_node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#56 - def delimiters(begin_node); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#28 -RuboCop::Cop::Layout::SpaceInsideStringInterpolation::MSG = T.let(T.unsafe(nil), String) - -# Looks for trailing blank lines and a final newline in the -# source code. -# -# @example EnforcedStyle: final_newline (default) -# # `final_newline` looks for one newline at the end of files. -# -# # bad -# class Foo; end -# -# # EOF -# -# # bad -# class Foo; end # EOF -# -# # good -# class Foo; end -# # EOF -# @example EnforcedStyle: final_blank_line -# # `final_blank_line` looks for one blank line followed by a new line -# # at the end of files. -# -# # bad -# class Foo; end -# # EOF -# -# # bad -# class Foo; end # EOF -# -# # good -# class Foo; end -# -# # EOF -# -# source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#40 -class RuboCop::Cop::Layout::TrailingEmptyLines < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#45 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#90 - def end_with_percent_blank_string?(processed_source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#80 - def ends_in_end?(processed_source); end - - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#94 - def message(wanted_blank_lines, blank_lines); end - - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#67 - def offense_detected(buffer, wanted_blank_lines, blank_lines, whitespace_at_end); end -end - -# Looks for trailing whitespace in the source code. -# -# @example -# # The line in this example contains spaces after the 0. -# # bad -# x = 0 -# -# # The line in this example ends directly after the 0. -# # good -# x = 0 -# @example AllowInHeredoc: false (default) -# # The line in this example contains spaces after the 0. -# # bad -# code = <<~RUBY -# x = 0 -# RUBY -# -# # ok -# code = <<~RUBY -# x = 0 #{} -# RUBY -# -# # good -# trailing_whitespace = ' ' -# code = <<~RUBY -# x = 0#{trailing_whitespace} -# RUBY -# @example AllowInHeredoc: true -# # The line in this example contains spaces after the 0. -# # good -# code = <<~RUBY -# x = 0 -# RUBY -# -# source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#42 -class RuboCop::Cop::Layout::TrailingWhitespace < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Heredoc - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#57 - def on_heredoc(_node); end - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#49 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#112 - def extract_heredocs(ast); end - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#103 - def find_heredoc(line_number); end - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#108 - def heredocs; end - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#125 - def offense_range(lineno, line); end - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#61 - def process_line(line, lineno); end - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#75 - def process_line_in_heredoc(corrector, range, heredoc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#99 - def skip_heredoc?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#95 - def static?(heredoc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#86 - def whitespace_is_indentation?(range, level); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#90 - def whitespace_only?(range); end -end - -# source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#47 -RuboCop::Cop::Layout::TrailingWhitespace::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#5 -module RuboCop::Cop::Legacy; end - -# Legacy support for Corrector#corrections -# See https://docs.rubocop.org/rubocop/v1_upgrade_notes.html -# -# source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#8 -class RuboCop::Cop::Legacy::CorrectionsProxy - # @return [CorrectionsProxy] a new instance of CorrectionsProxy - # - # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#9 - def initialize(corrector); end - - # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#13 - def <<(callable); end - - # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#21 - def concat(corrections); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#17 - def empty?; end - - protected - - # Returns the value of attribute corrector. - # - # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#31 - def corrector; end - - private - - # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#35 - def suppress_clobbering; end -end - -# This class handles autocorrection for code that needs to be moved -# to new lines. -# -# source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#7 -class RuboCop::Cop::LineBreakCorrector - extend ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::TrailingBody - extend ::RuboCop::PathUtil - extend ::RuboCop::Cop::Util - - class << self - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#27 - def break_line_before(range:, node:, corrector:, configured_width:, indent_steps: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#15 - def correct_trailing_body(configured_width:, corrector:, node:, processed_source:); end - - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#35 - def move_comment(eol_comment:, node:, corrector:); end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#13 - def processed_source; end - - private - - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#45 - def remove_semicolon(node, corrector); end - - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#51 - def semicolon(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#58 - def trailing_class_definition?(token, body); end - end -end - -# Help methods for determining if a line is too long. -# -# source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#6 -module RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::Alignment - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#24 - def allow_uri?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#28 - def allowed_uri_position?(line, uri_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#15 - def directive_on_source_line?(line_index); end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#72 - def extend_uri_end_position(line, end_position); end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#36 - def find_excessive_uri_range(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#11 - def ignore_cop_directives?; end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#59 - def indentation_difference(line); end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#32 - def line_length(line); end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#105 - def line_length_without_directive(line); end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#51 - def match_uris(string); end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#88 - def tab_indentation_width; end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#93 - def uri_regexp; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#98 - def valid_uri?(uri_ish_string); end -end - -# source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#5 -module RuboCop::Cop::Lint; end - -# Checks for mistyped shorthand assignments. -# -# @example -# # bad -# x =- y -# x =+ y -# x =* y -# x =! y -# -# # good -# x -= y # or x = -y -# x += y # or x = +y -# x *= y # or x = *y -# x != y # or x = !y -# -# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#21 -class RuboCop::Cop::Lint::AmbiguousAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 - def on_asgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 - def on_lvasgn(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#44 - def rhs(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#28 -RuboCop::Cop::Lint::AmbiguousAssignment::MISTAKES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#24 -RuboCop::Cop::Lint::AmbiguousAssignment::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#26 -RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# Checks for ambiguous block association with method -# when param passed without parentheses. -# -# This cop can customize allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. -# -# @example -# -# # bad -# some_method a { |val| puts val } -# @example -# -# # good -# # With parentheses, there's no ambiguity. -# some_method(a { |val| puts val }) -# # or (different meaning) -# some_method(a) { |val| puts val } -# -# # good -# # Operator methods require no disambiguation -# foo == bar { |b| b.baz } -# -# # good -# # Lambda arguments require no disambiguation -# foo = ->(bar) { bar.baz } -# @example AllowedMethods: [] (default) -# -# # bad -# expect { do_something }.to change { object.attribute } -# @example AllowedMethods: [change] -# -# # good -# expect { do_something }.to change { object.attribute } -# @example AllowedPatterns: [] (default) -# -# # bad -# expect { do_something }.to change { object.attribute } -# @example AllowedPatterns: ['change'] -# -# # good -# expect { do_something }.to change { object.attribute } -# expect { do_something }.to not_change { object.attribute } -# -# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#54 -class RuboCop::Cop::Lint::AmbiguousBlockAssociation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#85 - def allowed_method_pattern?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#81 - def ambiguous_block_association?(send_node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#91 - def message(send_node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#97 - def wrap_in_parentheses(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#60 -RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String) - -# Checks for ambiguous operators in the first argument of a -# method invocation without parentheses. -# -# @example -# -# # bad -# -# # The `*` is interpreted as a splat operator but it could possibly be -# # a `*` method invocation (i.e. `do_something.*(some_array)`). -# do_something *some_array -# @example -# -# # good -# -# # With parentheses, there's no ambiguity. -# do_something(*some_array) -# -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#23 -class RuboCop::Cop::Lint::AmbiguousOperator < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#45 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#64 - def find_offense_node_by(diagnostic); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#82 - def message(diagnostic); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#92 - def offense_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#88 - def offense_position?(node, diagnostic); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#101 - def unary_operator?(node, diagnostic); end - - class << self - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#41 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#26 -RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#36 -RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String) - -# Looks for expressions containing multiple binary operators -# where precedence is ambiguous due to lack of parentheses. For example, -# in `1 + 2 * 3`, the multiplication will happen before the addition, but -# lexically it appears that the addition will happen first. -# -# The cop does not consider unary operators (ie. `!a` or `-b`) or comparison -# operators (ie. `a =~ b`) because those are not ambiguous. -# -# NOTE: Ranges are handled by `Lint/AmbiguousRange`. -# -# @example -# # bad -# a + b * c -# a || b && c -# a ** b + c -# -# # good (different precedence) -# a + (b * c) -# a || (b && c) -# (a ** b) + c -# -# # good (same precedence) -# a + b + c -# a * b / c % d -# -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#30 -class RuboCop::Cop::Lint::AmbiguousOperatorPrecedence < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#54 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#47 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#65 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#105 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#89 - def greater_precedence?(node1, node2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#85 - def operator?(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#97 - def operator_name(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#79 - def precedence(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#45 -RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::MSG = T.let(T.unsafe(nil), String) - -# See https://ruby-doc.org/core-3.0.2/doc/syntax/precedence_rdoc.html -# -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#34 -RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::PRECEDENCE = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#44 -RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for ambiguous ranges. -# -# Ranges have quite low precedence, which leads to unexpected behavior when -# using a range with other operators. This cop avoids that by making ranges -# explicit by requiring parenthesis around complex range boundaries (anything -# that is not a literal: numerics, strings, symbols, etc.). -# -# This cop can be configured with `RequireParenthesesForMethodChains` in order to -# specify whether method chains (including `self.foo`) should be wrapped in parens -# by this cop. -# -# NOTE: Regardless of this configuration, if a method receiver is a basic literal -# value, it will be wrapped in order to prevent the ambiguity of `1..2.to_a`. -# -# @example -# # bad -# x || 1..2 -# (x || 1..2) -# 1..2.to_a -# -# # good, unambiguous -# 1..2 -# 'a'..'z' -# :bar..:baz -# MyClass::MIN..MyClass::MAX -# @min..@max -# a..b -# -a..b -# -# # good, ambiguity removed -# x || (1..2) -# (x || 1)..2 -# (x || 1)..(y || 2) -# (1..2).to_a -# @example RequireParenthesesForMethodChains: false (default) -# # good -# a.foo..b.bar -# (a.foo)..(b.bar) -# @example RequireParenthesesForMethodChains: true -# # bad -# a.foo..b.bar -# -# # good -# (a.foo)..(b.bar) -# -# source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#59 -class RuboCop::Cop::Lint::AmbiguousRange < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#64 - def on_erange(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#64 - def on_irange(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#82 - def acceptable?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#89 - def acceptable_call?(node); end - - # @yield [range.begin] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#77 - def each_boundary(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#99 - def require_parentheses_for_method_chain?; end -end - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#62 -RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) - -# Checks for ambiguous regexp literals in the first argument of -# a method invocation without parentheses. -# -# @example -# -# # bad -# -# # This is interpreted as a method invocation with a regexp literal, -# # but it could possibly be `/` method invocations. -# # (i.e. `do_something./(pattern)./(i)`) -# do_something /pattern/i -# @example -# -# # good -# -# # With parentheses, there's no ambiguity. -# do_something(/pattern/i) -# -# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#24 -class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#31 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#56 - def find_offense_node(node, regexp_receiver); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#49 - def find_offense_node_by(diagnostic); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#67 - def first_argument_is_regexp?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#71 - def method_chain_to_regexp_receiver?(node, regexp_receiver); end -end - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#27 -RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) - -# Checks for assignments in the conditions of -# if/while/until. -# -# `AllowSafeAssignment` option for safe assignment. -# By safe assignment we mean putting parentheses around -# an assignment to indicate "I know I'm using an assignment -# as a condition. It's not a mistake." -# -# @example -# # bad -# if some_var = value -# do_something -# end -# -# # good -# if some_var == value -# do_something -# end -# @example AllowSafeAssignment: true (default) -# # good -# if (some_var = value) -# do_something -# end -# @example AllowSafeAssignment: false -# # bad -# if (some_var = value) -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#41 -class RuboCop::Cop::Lint::AssignmentInCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SafeAssignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#55 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#55 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#55 - def on_while(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#82 - def allowed_construct?(asgn_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#86 - def conditional_assignment?(asgn_node); end - - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#74 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#90 - def skip_children?(asgn_node); end - - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#96 - def traverse_node(node, &block); end -end - -# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#53 -RuboCop::Cop::Lint::AssignmentInCondition::ASGN_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#50 -RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITHOUT_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#46 -RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITH_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) - -# `BigDecimal.new()` is deprecated since BigDecimal 1.3.3. -# This cop identifies places where `BigDecimal.new()` -# can be replaced by `BigDecimal()`. -# -# @example -# # bad -# BigDecimal.new(123.456, 3) -# -# # good -# BigDecimal(123.456, 3) -# -# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#17 -class RuboCop::Cop::Lint::BigDecimalNew < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#25 - def big_decimal_new(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#30 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#20 -RuboCop::Cop::Lint::BigDecimalNew::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#22 -RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for places where binary operator has identical operands. -# -# It covers arithmetic operators: `-`, `/`, `%`; -# comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, ``<=``; -# bitwise operators: `|`, `^`, `&`; -# boolean operators: `&&`, `||` -# and "spaceship" operator - ``<=>``. -# -# Simple arithmetic operations are allowed by this cop: `+`, `*`, `**`, `<<` and `>>`. -# Although these can be rewritten in a different way, it should not be necessary to -# do so. This does not include operations such as `-` or `/` where the result will -# always be the same (`x - x` will always be 0; `x / x` will always be 1), and -# thus are legitimate offenses. -# -# @example -# # bad -# x / x -# x.top >= x.top -# -# if a.x != 0 && a.x != 0 -# do_something -# end -# -# def child? -# left_child || left_child -# end -# -# # good -# x + x -# 1 << 1 -# -# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#48 -class RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#61 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#61 - def on_or(node); end - - # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#52 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#50 -RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::ALLOWED_MATH_OPERATORS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#49 -RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(nil), String) - -# Checks for `:true` and `:false` symbols. -# In most cases it would be a typo. -# -# @example -# -# # bad -# :true -# -# # good -# true -# @example -# -# # bad -# :false -# -# # good -# false -# -# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#29 -class RuboCop::Cop::Lint::BooleanSymbol < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#35 - def boolean_symbol?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#37 - def on_sym(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#50 - def autocorrect(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#32 -RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) - -# Checks for circular argument references in optional keyword -# arguments and optional ordinal arguments. -# -# This cop mirrors a warning produced by MRI since 2.2. -# -# @example -# -# # bad -# -# def bake(pie: pie) -# pie.heat_up -# end -# @example -# -# # good -# -# def bake(pie:) -# pie.refrigerate -# end -# @example -# -# # good -# -# def bake(pie: self.pie) -# pie.feed_to(user) -# end -# @example -# -# # bad -# -# def cook(dry_ingredients = dry_ingredients) -# dry_ingredients.reduce(&:+) -# end -# @example -# -# # good -# -# def cook(dry_ingredients = self.dry_ingredients) -# dry_ingredients.combine -# end -# -# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#50 -class RuboCop::Cop::Lint::CircularArgumentReference < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#53 - def on_kwoptarg(node); end - - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#57 - def on_optarg(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#63 - def check_for_circular_argument_references(arg_name, arg_value); end -end - -# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#51 -RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String) - -# Do not define constants within a block, since the block's scope does not -# isolate or namespace the constant in any way. -# -# If you are trying to define that constant once, define it outside of -# the block instead, or use a variable or method if defining the constant -# in the outer scope would be problematic. -# -# For meta-programming, use `const_set`. -# -# @example -# # bad -# task :lint do -# FILES_TO_LINT = Dir['lib/*.rb'] -# end -# -# # bad -# describe 'making a request' do -# class TestRequest; end -# end -# -# # bad -# module M -# extend ActiveSupport::Concern -# included do -# LIST = [] -# end -# end -# -# # good -# task :lint do -# files_to_lint = Dir['lib/*.rb'] -# end -# -# # good -# describe 'making a request' do -# let(:test_request) { Class.new } -# # see also `stub_const` for RSpec -# end -# -# # good -# module M -# extend ActiveSupport::Concern -# included do -# const_set(:LIST, []) -# end -# end -# @example AllowedMethods: ['enums'] (default) -# # good -# -# # `enums` for Typed Enums via `T::Enum` in Sorbet. -# # https://sorbet.org/docs/tenum -# class TestEnum < T::Enum -# enums do -# Foo = new("foo") -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#64 -class RuboCop::Cop::Lint::ConstantDefinitionInBlock < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - - # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#70 - def constant_assigned_in_block?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#75 - def module_defined_in_block?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#79 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#85 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#85 - def on_module(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#94 - def method_name(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#67 -RuboCop::Cop::Lint::ConstantDefinitionInBlock::MSG = T.let(T.unsafe(nil), String) - -# Checks for overwriting an exception with an exception result by use ``rescue =>``. -# -# You intended to write as `rescue StandardError`. -# However, you have written `rescue => StandardError`. -# In that case, the result of `rescue` will overwrite `StandardError`. -# -# @example -# -# # bad -# begin -# something -# rescue => StandardError -# end -# -# # good -# begin -# something -# rescue StandardError -# end -# -# source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#26 -class RuboCop::Cop::Lint::ConstantOverwrittenInRescue < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#41 - def on_resbody(node); end - - # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#33 - def overwritten_constant(param0 = T.unsafe(nil)); end - - class << self - # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#37 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#30 -RuboCop::Cop::Lint::ConstantOverwrittenInRescue::MSG = T.let(T.unsafe(nil), String) - -# Check that certain constants are fully qualified. -# -# This is not enabled by default because it would mark a lot of offenses -# unnecessarily. -# -# Generally, gems should fully qualify all constants to avoid conflicts with -# the code that uses the gem. Enable this cop without using `Only`/`Ignore` -# -# Large projects will over time end up with one or two constant names that -# are problematic because of a conflict with a library or just internally -# using the same name a namespace and a class. To avoid too many unnecessary -# offenses, Enable this cop with `Only: [The, Constant, Names, Causing, Issues]` -# -# NOTE: `Style/RedundantConstantBase` cop is disabled if this cop is enabled to prevent -# conflicting rules. Because it respects user configurations that want to enable -# this cop which is disabled by default. -# -# @example -# # By default checks every constant -# -# # bad -# User -# -# # bad -# User::Login -# -# # good -# ::User -# -# # good -# ::User::Login -# @example Only: ['Login'] -# # Restrict this cop to only being concerned about certain constants -# -# # bad -# Login -# -# # good -# ::Login -# -# # good -# User::Login -# @example Ignore: ['Login'] -# # Restrict this cop not being concerned about certain constants -# -# # bad -# User -# -# # good -# ::User::Login -# -# # good -# Login -# -# source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#62 -class RuboCop::Cop::Lint::ConstantResolution < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#70 - def on_const(node); end - - # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#66 - def unqualified_const?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#83 - def allowed_names; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#78 - def const_name?(name); end - - # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#87 - def ignored_names; end -end - -# source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#63 -RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) - -# Checks for debug calls (such as `debugger` or `binding.pry`) that should -# not be kept for production code. -# -# The cop can be configured using `DebuggerMethods`. By default, a number of gems -# debug entrypoints are configured (`Kernel`, `Byebug`, `Capybara`, `debug.rb`, -# `Pry`, `Rails`, `RubyJard`, and `WebConsole`). Additional methods can be added. -# -# Specific default groups can be disabled if necessary: -# -# [source,yaml] -# ---- -# Lint/Debugger: -# DebuggerMethods: -# WebConsole: ~ -# ---- -# -# You can also add your own methods by adding a new category: -# -# [source,yaml] -# ---- -# Lint/Debugger: -# DebuggerMethods: -# MyDebugger: -# MyDebugger.debug_this -# ---- -# -# Some gems also ship files that will start a debugging session when required, -# for example `require 'debug/start'` from `ruby/debug`. These requires can -# be configured through `DebuggerRequires`. It has the same structure as -# `DebuggerMethods`, which you can read about above. -# -# @example -# -# # bad (ok during development) -# -# # using pry -# def some_method -# binding.pry -# do_something -# end -# @example -# -# # bad (ok during development) -# -# # using byebug -# def some_method -# byebug -# do_something -# end -# @example -# -# # good -# -# def some_method -# do_something -# end -# @example DebuggerMethods: [my_debugger] -# -# # bad (ok during development) -# -# def some_method -# my_debugger -# end -# @example DebuggerRequires: [my_debugger/start] -# -# # bad (ok during development) -# -# require 'my_debugger/start' -# -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 -class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#82 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#142 - def assumed_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#121 - def assumed_usage_context?(node); end - - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#131 - def chained_method_name(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#108 - def debugger_method?(send_node); end - - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#94 - def debugger_methods; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#114 - def debugger_require?(send_node); end - - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#101 - def debugger_requires; end - - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 - def message(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#80 -RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#79 -RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of the deprecated class method usages. -# -# @example -# -# # bad -# File.exists?(some_path) -# Dir.exists?(some_path) -# iterator? -# attr :name, true -# attr :name, false -# ENV.freeze # Calling `Env.freeze` raises `TypeError` since Ruby 2.7. -# ENV.clone -# ENV.dup # Calling `Env.dup` raises `TypeError` since Ruby 3.1. -# Socket.gethostbyname(host) -# Socket.gethostbyaddr(host) -# -# # good -# File.exist?(some_path) -# Dir.exist?(some_path) -# block_given? -# attr_accessor :name -# attr_reader :name -# ENV # `ENV.freeze` cannot prohibit changes to environment variables. -# ENV.to_h -# ENV.to_h # `ENV.dup` cannot dup `ENV`, use `ENV.to_h` to get a copy of `ENV` as a hash. -# Addrinfo.getaddrinfo(nodename, service) -# Addrinfo.tcp(host, port).getnameinfo -# -# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#33 -class RuboCop::Cop::Lint::DeprecatedClassMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#53 - def deprecated_class_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#63 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#112 - def dir_env_file_const?(node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#83 - def offense_range(node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#93 - def preferred_method(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#108 - def socket_const?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#50 -RuboCop::Cop::Lint::DeprecatedClassMethods::DIR_ENV_FILE_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#36 -RuboCop::Cop::Lint::DeprecatedClassMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#41 -RuboCop::Cop::Lint::DeprecatedClassMethods::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#37 -RuboCop::Cop::Lint::DeprecatedClassMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for deprecated constants. -# -# It has `DeprecatedConstants` config. If there is an alternative method, you can set -# alternative value as `Alternative`. And you can set the deprecated version as -# `DeprecatedVersion`. These options can be omitted if they are not needed. -# -# DeprecatedConstants: -# 'DEPRECATED_CONSTANT': -# Alternative: 'alternative_value' -# DeprecatedVersion: 'deprecated_version' -# -# By default, `NIL`, `TRUE`, `FALSE`, `Net::HTTPServerException, `Random::DEFAULT`, -# `Struct::Group`, and `Struct::Passwd` are configured. -# -# @example -# -# # bad -# NIL -# TRUE -# FALSE -# Net::HTTPServerException -# Random::DEFAULT # Return value of Ruby 2 is `Random` instance, Ruby 3.0 is `Random` class. -# Struct::Group -# Struct::Passwd -# -# # good -# nil -# true -# false -# Net::HTTPClientException -# Random.new # `::DEFAULT` has been deprecated in Ruby 3, `.new` is compatible with Ruby 2. -# Etc::Group -# Etc::Passwd -# -# source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#40 -class RuboCop::Cop::Lint::DeprecatedConstants < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#46 - def on_const(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#66 - def constant_name(node, nested_constant_name); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#82 - def deprecated_constants; end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#72 - def message(good, bad, deprecated_version); end -end - -# source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#44 -RuboCop::Cop::Lint::DeprecatedConstants::DO_NOT_USE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#43 -RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil), String) - -# Algorithmic constants for `OpenSSL::Cipher` and `OpenSSL::Digest` -# deprecated since OpenSSL version 2.2.0. Prefer passing a string -# instead. -# -# @example -# -# # Example for OpenSSL::Cipher instantiation. -# -# # bad -# OpenSSL::Cipher::AES.new(128, :GCM) -# -# # good -# OpenSSL::Cipher.new('aes-128-gcm') -# @example -# -# # Example for OpenSSL::Digest instantiation. -# -# # bad -# OpenSSL::Digest::SHA256.new -# -# # good -# OpenSSL::Digest.new('SHA256') -# @example -# -# # Example for ::Digest inherited class methods. -# -# # bad -# OpenSSL::Digest::SHA256.digest('foo') -# -# # good -# OpenSSL::Digest.digest('SHA256', 'foo') -# -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#40 -class RuboCop::Cop::Lint::DeprecatedOpenSSLConstant < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#49 - def algorithm_const(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#59 - def digest_const?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#63 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#110 - def algorithm_name(node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#75 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#139 - def build_cipher_arguments(node, algorithm_name, no_arguments); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#102 - def correction_range(node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#87 - def message(node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#106 - def openssl_class(node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#128 - def replacement_args(node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#120 - def sanitize_arguments(arguments); end -end - -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#44 -RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#46 -RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::NO_ARG_ALGORITHM = T.let(T.unsafe(nil), Array) - -# Checks constructors for disjunctive assignments (`||=`) that should -# be plain assignments. -# -# So far, this cop is only concerned with disjunctive assignment of -# instance variables. -# -# In ruby, an instance variable is nil until a value is assigned, so the -# disjunction is unnecessary. A plain assignment has the same effect. -# -# @example -# # bad -# def initialize -# @x ||= 1 -# end -# -# # good -# def initialize -# @x = 1 -# end -# -# source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#48 -class RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#53 - def on_def(node); end - - private - - # @param node [DefNode] a constructor definition - # - # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#60 - def check(node); end - - # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#66 - def check_body(body); end - - # @param lines [Array] the logical lines of the constructor - # - # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#78 - def check_body_lines(lines); end - - # Add an offense if the LHS of the given disjunctive assignment is - # an instance variable. - # - # For now, we only care about assignments to instance variables. - # - # @param node [Node] a disjunctive assignment - # - # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#99 - def check_disjunctive_assignment(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#51 -RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor::MSG = T.let(T.unsafe(nil), String) - -# Checks that there are no repeated bodies -# within `if/unless`, `case-when`, `case-in` and `rescue` constructs. -# -# With `IgnoreLiteralBranches: true`, branches are not registered -# as offenses if they return a basic literal value (string, symbol, -# integer, float, rational, complex, `true`, `false`, or `nil`), or -# return an array, hash, regexp or range that only contains one of -# the above basic literal values. -# -# With `IgnoreConstantBranches: true`, branches are not registered -# as offenses if they return a constant value. -# -# @example -# # bad -# if foo -# do_foo -# do_something_else -# elsif bar -# do_foo -# do_something_else -# end -# -# # good -# if foo || bar -# do_foo -# do_something_else -# end -# -# # bad -# case x -# when foo -# do_foo -# when bar -# do_foo -# else -# do_something_else -# end -# -# # good -# case x -# when foo, bar -# do_foo -# else -# do_something_else -# end -# -# # bad -# begin -# do_something -# rescue FooError -# handle_error -# rescue BarError -# handle_error -# end -# -# # good -# begin -# do_something -# rescue FooError, BarError -# handle_error -# end -# @example IgnoreLiteralBranches: true -# # good -# case size -# when "small" then 100 -# when "medium" then 250 -# when "large" then 1000 -# else 250 -# end -# @example IgnoreConstantBranches: true -# # good -# case size -# when "small" then SMALL_SIZE -# when "medium" then MEDIUM_SIZE -# when "large" then LARGE_SIZE -# else MEDIUM_SIZE -# end -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#86 -class RuboCop::Cop::Lint::DuplicateBranch < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 - def on_branching_statement(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 - def on_case_match(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 - def on_rescue(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#117 - def branches(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#121 - def consider_branch?(branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#147 - def const_branch?(branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#132 - def ignore_constant_branches?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#128 - def ignore_literal_branches?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#136 - def literal_branch?(branch); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#103 - def offense_range(duplicate_branch); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#87 -RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) - -# Checks that there are no repeated conditions -# used in case 'when' expressions. -# -# @example -# -# # bad -# -# case x -# when 'first' -# do_something -# when 'first' -# do_something_else -# end -# @example -# -# # good -# -# case x -# when 'first' -# do_something -# when 'second' -# do_something_else -# end -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#30 -class RuboCop::Cop::Lint::DuplicateCaseCondition < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#33 - def on_case(case_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#31 -RuboCop::Cop::Lint::DuplicateCaseCondition::MSG = T.let(T.unsafe(nil), String) - -# Checks that there are no repeated conditions used in if 'elsif'. -# -# @example -# # bad -# if x == 1 -# do_something -# elsif x == 1 -# do_something_else -# end -# -# # good -# if x == 1 -# do_something -# elsif x == 2 -# do_something_else -# end -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_elsif_condition.rb#23 -class RuboCop::Cop::Lint::DuplicateElsifCondition < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/duplicate_elsif_condition.rb#26 - def on_if(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_elsif_condition.rb#24 -RuboCop::Cop::Lint::DuplicateElsifCondition::MSG = T.let(T.unsafe(nil), String) - -# Checks for duplicated keys in hash literals. -# This cop considers both primitive types and constants for the hash keys. -# -# This cop mirrors a warning in Ruby 2.2. -# -# @example -# -# # bad -# -# hash = { food: 'apple', food: 'orange' } -# @example -# -# # good -# -# hash = { food: 'apple', other_food: 'orange' } -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#22 -class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Duplication - - # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#27 - def on_hash(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#25 -RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String) - -# Checks for duplicated magic comments. -# -# @example -# -# # bad -# -# # encoding: ascii -# # encoding: ascii -# -# # good -# -# # encoding: ascii -# -# # bad -# -# # frozen_string_literal: true -# # frozen_string_literal: true -# -# # good -# -# # frozen_string_literal: true -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#28 -class RuboCop::Cop::Lint::DuplicateMagicComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#35 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#51 - def magic_comment_lines; end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#65 - def register_offense(range); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#33 -RuboCop::Cop::Lint::DuplicateMagicComment::MSG = T.let(T.unsafe(nil), String) - -# Checks that there are no repeated patterns used in `in` keywords. -# -# @example -# -# # bad -# case x -# in 'first' -# do_something -# in 'first' -# do_something_else -# end -# -# # good -# case x -# in 'first' -# do_something -# in 'second' -# do_something_else -# end -# -# # bad - repeated alternate patterns with the same conditions don't depend on the order -# case x -# in foo | bar -# first_method -# in bar | foo -# second_method -# end -# -# # good -# case x -# in foo | bar -# first_method -# in bar | baz -# second_method -# end -# -# # bad - repeated hash patterns with the same conditions don't depend on the order -# case x -# in foo: a, bar: b -# first_method -# in bar: b, foo: a -# second_method -# end -# -# # good -# case x -# in foo: a, bar: b -# first_method -# in bar: b, baz: c -# second_method -# end -# -# # bad - repeated array patterns with elements in the same order -# case x -# in [foo, bar] -# first_method -# in [foo, bar] -# second_method -# end -# -# # good -# case x -# in [foo, bar] -# first_method -# in [bar, foo] -# second_method -# end -# -# # bad - repeated the same patterns and guard conditions -# case x -# in foo if bar -# first_method -# in foo if bar -# second_method -# end -# -# # good -# case x -# in foo if bar -# first_method -# in foo if baz -# second_method -# end -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#90 -class RuboCop::Cop::Lint::DuplicateMatchPattern < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#97 - def on_case_match(case_node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#108 - def pattern_identity(pattern); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#93 -RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) - -# Checks for duplicated instance (or singleton) method -# definitions. -# -# @example -# -# # bad -# -# def foo -# 1 -# end -# -# def foo -# 2 -# end -# @example -# -# # bad -# -# def foo -# 1 -# end -# -# alias foo bar -# @example -# -# # good -# -# def foo -# 1 -# end -# -# def bar -# 2 -# end -# @example -# -# # good -# -# def foo -# 1 -# end -# -# alias bar foo -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#52 -class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base - # @return [DuplicateMethods] a new instance of DuplicateMethods - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#57 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#98 - def alias_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#85 - def method_alias?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#89 - def on_alias(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#63 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#72 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#104 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#103 - def sym_name(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#117 - def check_const_receiver(node, name, const_name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#124 - def check_self_receiver(node, name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#208 - def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#136 - def found_instance_method(node, name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#159 - def found_method(node, method_name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#149 - def found_sclass_method(node, name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#186 - def location(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#218 - def lookup_constant(node, const_name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#131 - def message_for_dup(node, method_name, key); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#178 - def method_key(node, method_name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#194 - def on_attr(node, attr_name, args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#250 - def possible_dsl?(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#236 - def qualified_name(enclosing, namespace, mod_name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#260 - def source_location(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#55 -RuboCop::Cop::Lint::DuplicateMethods::DEF_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#53 -RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#54 -RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for duplicate elements in Regexp character classes. -# -# @example -# -# # bad -# r = /[xyx]/ -# -# # bad -# r = /[0-9x0-9]/ -# -# # good -# r = /[xy]/ -# -# # good -# r = /[0-9x]/ -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#21 -class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#37 - def each_repeated_character_class_element_loc(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#29 - def on_regexp(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#102 - def escaped_octal?(string); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#54 - def group_expressions(node, expressions); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#110 - def interpolation_locs(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#106 - def octal?(char); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#71 - def pop_octal_digits(current_child, expressions); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#89 - def skip_expression?(expr); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#80 - def source_range(children); end - - # Since we blank interpolations with a space for every char of the interpolation, we would - # mark every space (except the first) as duplicate if we do not skip regexp_parser nodes - # that are within an interpolation. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#96 - def within_interpolation?(node, child); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#25 -RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::MSG_REPEATED_ELEMENT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#27 -RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::OCTAL_DIGITS_AFTER_ESCAPE = T.let(T.unsafe(nil), Integer) - -# Checks for duplicate ``require``s and ``require_relative``s. -# -# @example -# # bad -# require 'foo' -# require 'bar' -# require 'foo' -# -# # good -# require 'foo' -# require 'bar' -# -# # good -# require 'foo' -# require_relative 'foo' -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#26 -class RuboCop::Cop::Lint::DuplicateRequire < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#39 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#45 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#35 - def require_call?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#30 -RuboCop::Cop::Lint::DuplicateRequire::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#31 -RuboCop::Cop::Lint::DuplicateRequire::REQUIRE_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#32 -RuboCop::Cop::Lint::DuplicateRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# Checks that there are no repeated exceptions -# used in 'rescue' expressions. -# -# @example -# # bad -# begin -# something -# rescue FirstException -# handle_exception -# rescue FirstException -# handle_other_exception -# end -# -# # good -# begin -# something -# rescue FirstException -# handle_exception -# rescue SecondException -# handle_other_exception -# end -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#28 -class RuboCop::Cop::Lint::DuplicateRescueException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - - # source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#33 - def on_rescue(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#31 -RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) - -# Checks if each_with_object is called with an immutable -# argument. Since the argument is the object that the given block shall -# make calls on to build something based on the enumerable that -# each_with_object iterates over, an immutable argument makes no sense. -# It's definitely a bug. -# -# @example -# -# # bad -# -# sum = numbers.each_with_object(0) { |e, a| a += e } -# @example -# -# # good -# -# num = 0 -# sum = numbers.each_with_object(num) { |e, a| a += e } -# -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#24 -class RuboCop::Cop::Lint::EachWithObjectArgument < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 - def each_with_object?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#33 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#33 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#25 -RuboCop::Cop::Lint::EachWithObjectArgument::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#26 -RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for odd `else` block layout - like -# having an expression on the same line as the `else` keyword, -# which is usually a mistake. -# -# Its autocorrection tweaks layout to keep the syntax. So, this autocorrection -# is compatible correction for bad case syntax, but if your code makes a mistake -# with `elsif` and `else`, you will have to correct it manually. -# -# @example -# -# # bad -# -# if something -# # ... -# else do_this -# do_that -# end -# @example -# -# # good -# -# # This code is compatible with the bad case. It will be autocorrected like this. -# if something -# # ... -# else -# do_this -# do_that -# end -# -# # This code is incompatible with the bad case. -# # If `do_this` is a condition, `elsif` should be used instead of `else`. -# if something -# # ... -# elsif do_this -# do_that -# end -# -# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#43 -class RuboCop::Cop::Lint::ElseLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#50 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#81 - def autocorrect(corrector, node, first_else); end - - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#61 - def check(node); end - - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#71 - def check_else(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#48 -RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String) - -# Checks for blocks without a body. -# Such empty blocks are typically an oversight or we should provide a comment -# to clarify what we're aiming for. -# -# Empty lambdas and procs are ignored by default. -# -# NOTE: For backwards compatibility, the configuration that allows/disallows -# empty lambdas and procs is called `AllowEmptyLambdas`, even though it also -# applies to procs. -# -# @example -# # bad -# items.each { |item| } -# -# # good -# items.each { |item| puts item } -# @example AllowComments: true (default) -# # good -# items.each do |item| -# # TODO: implement later (inner comment) -# end -# -# items.each { |item| } # TODO: implement later (inline comment) -# @example AllowComments: false -# # bad -# items.each do |item| -# # TODO: implement later (inner comment) -# end -# -# items.each { |item| } # TODO: implement later (inline comment) -# @example AllowEmptyLambdas: true (default) -# # good -# allow(subject).to receive(:callable).and_return(-> {}) -# -# placeholder = lambda do -# end -# (callable || placeholder).call -# -# proc { } -# -# Proc.new { } -# @example AllowEmptyLambdas: false -# # bad -# allow(subject).to receive(:callable).and_return(-> {}) -# -# placeholder = lambda do -# end -# (callable || placeholder).call -# -# proc { } -# -# Proc.new { } -# -# source://rubocop//lib/rubocop/cop/lint/empty_block.rb#63 -class RuboCop::Cop::Lint::EmptyBlock < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#66 - def on_block(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#76 - def allow_comment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#83 - def allow_empty_lambdas?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#87 - def comment_disables_cop?(comment); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_block.rb#64 -RuboCop::Cop::Lint::EmptyBlock::MSG = T.let(T.unsafe(nil), String) - -# Checks for classes and metaclasses without a body. -# Such empty classes and metaclasses are typically an oversight or we should provide a comment -# to be clearer what we're aiming for. -# -# @example -# # bad -# class Foo -# end -# -# class Bar -# class << self -# end -# end -# -# class << obj -# end -# -# # good -# class Foo -# def do_something -# # ... code -# end -# end -# -# class Bar -# class << self -# attr_reader :bar -# end -# end -# -# class << obj -# attr_reader :bar -# end -# @example AllowComments: false (default) -# # bad -# class Foo -# # TODO: implement later -# end -# -# class Bar -# class << self -# # TODO: implement later -# end -# end -# -# class << obj -# # TODO: implement later -# end -# @example AllowComments: true -# # good -# class Foo -# # TODO: implement later -# end -# -# class Bar -# class << self -# # TODO: implement later -# end -# end -# -# class << obj -# # TODO: implement later -# end -# -# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#72 -class RuboCop::Cop::Lint::EmptyClass < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#76 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#81 - def on_sclass(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#87 - def body_or_allowed_comment_lines?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#73 -RuboCop::Cop::Lint::EmptyClass::CLASS_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#74 -RuboCop::Cop::Lint::EmptyClass::METACLASS_MSG = T.let(T.unsafe(nil), String) - -# Checks for the presence of `if`, `elsif` and `unless` branches without a body. -# -# NOTE: empty `else` branches are handled by `Style/EmptyElse`. -# -# @example -# # bad -# if condition -# end -# -# # bad -# unless condition -# end -# -# # bad -# if condition -# do_something -# elsif other_condition -# end -# -# # good -# if condition -# do_something -# end -# -# # good -# unless condition -# do_something -# end -# -# # good -# if condition -# do_something -# elsif other_condition -# do_something_else -# end -# @example AllowComments: true (default) -# # good -# if condition -# do_something -# elsif other_condition -# # noop -# end -# @example AllowComments: false -# # bad -# if condition -# do_something -# elsif other_condition -# # noop -# end -# -# source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#63 -class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#70 - def on_if(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#156 - def all_branches_body_missing?(node); end - - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#83 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#142 - def branch_range(node); end - - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#104 - def correct_other_branches(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#162 - def deletion_range(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#137 - def else_branch?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#131 - def empty_elsif_branch?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#123 - def empty_if_branch?(node); end - - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#89 - def remove_comments(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#96 - def remove_empty_branch(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#116 - def require_other_branches_correction?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#68 -RuboCop::Cop::Lint::EmptyConditionalBody::MSG = T.let(T.unsafe(nil), String) - -# Checks for empty `ensure` blocks -# -# @example -# -# # bad -# -# def some_method -# do_something -# ensure -# end -# @example -# -# # bad -# -# begin -# do_something -# ensure -# end -# @example -# -# # good -# -# def some_method -# do_something -# ensure -# do_something_else -# end -# @example -# -# # good -# -# begin -# do_something -# ensure -# do_something_else -# end -# -# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#45 -class RuboCop::Cop::Lint::EmptyEnsure < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#50 - def on_ensure(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#48 -RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String) - -# Checks for the presence of empty expressions. -# -# @example -# -# # bad -# -# foo = () -# if () -# bar -# end -# @example -# -# # good -# -# foo = (some_expression) -# if (some_expression) -# bar -# end -# -# source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#25 -class RuboCop::Cop::Lint::EmptyExpression < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#28 - def on_begin(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#36 - def empty_expression?(begin_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#26 -RuboCop::Cop::Lint::EmptyExpression::MSG = T.let(T.unsafe(nil), String) - -# Enforces that Ruby source files are not empty. -# -# @example -# # bad -# # Empty file -# -# # good -# # File containing non commented source lines -# @example AllowComments: true (default) -# # good -# # File consisting only of comments -# @example AllowComments: false -# # bad -# # File consisting only of comments -# -# source://rubocop//lib/rubocop/cop/lint/empty_file.rb#23 -class RuboCop::Cop::Lint::EmptyFile < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#28 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#42 - def contains_only_comments?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#38 - def empty_file?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#34 - def offending?; end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_file.rb#26 -RuboCop::Cop::Lint::EmptyFile::MSG = T.let(T.unsafe(nil), String) - -# Checks for the presence of `in` pattern branches without a body. -# -# @example -# -# # bad -# case condition -# in [a] -# do_something -# in [a, b] -# end -# -# # good -# case condition -# in [a] -# do_something -# in [a, b] -# nil -# end -# @example AllowComments: true (default) -# -# # good -# case condition -# in [a] -# do_something -# in [a, b] -# # noop -# end -# @example AllowComments: false -# -# # bad -# case condition -# in [a] -# do_something -# in [a, b] -# # noop -# end -# -# source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#45 -class RuboCop::Cop::Lint::EmptyInPattern < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#53 - def on_case_match(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#49 -RuboCop::Cop::Lint::EmptyInPattern::MSG = T.let(T.unsafe(nil), String) - -# Checks for empty interpolation. -# -# @example -# -# # bad -# -# "result is #{}" -# @example -# -# # good -# -# "result is #{some_result}" -# -# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#19 -class RuboCop::Cop::Lint::EmptyInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#25 - def on_interpolation(begin_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#23 -RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) - -# Checks for the presence of `when` branches without a body. -# -# @example -# -# # bad -# case foo -# when bar -# do_something -# when baz -# end -# @example -# -# # good -# case condition -# when foo -# do_something -# when bar -# nil -# end -# @example AllowComments: true (default) -# -# # good -# case condition -# when foo -# do_something -# when bar -# # noop -# end -# @example AllowComments: false -# -# # bad -# case condition -# when foo -# do_something -# when bar -# # do nothing -# end -# -# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#47 -class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - - # source://rubocop//lib/rubocop/cop/lint/empty_when.rb#52 - def on_case(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#50 -RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) - -# Checks for `return` from an `ensure` block. -# `return` from an ensure block is a dangerous code smell as it -# will take precedence over any exception being raised, -# and the exception will be silently thrown away as if it were rescued. -# -# If you want to rescue some (or all) exceptions, best to do it explicitly -# -# @example -# -# # bad -# -# def foo -# do_something -# ensure -# cleanup -# return self -# end -# @example -# -# # good -# -# def foo -# do_something -# self -# ensure -# cleanup -# end -# -# # also good -# -# def foo -# begin -# do_something -# rescue SomeException -# # Let's ignore this exception -# end -# self -# ensure -# cleanup -# end -# -# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#47 -class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#53 - def on_ensure(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#51 -RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) - -# Emulates the following Ruby warnings in Ruby 2.6. -# -# [source,console] -# ---- -# $ cat example.rb -# ERB.new('hi', nil, '-', '@output_buffer') -# $ ruby -rerb example.rb -# example.rb:1: warning: Passing safe_level with the 2nd argument of ERB.new is -# deprecated. Do not use it, and specify other arguments as keyword arguments. -# example.rb:1: warning: Passing trim_mode with the 3rd argument of ERB.new is -# deprecated. Use keyword argument like ERB.new(str, trim_mode:...) instead. -# example.rb:1: warning: Passing eoutvar with the 4th argument of ERB.new is -# deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead. -# ---- -# -# Now non-keyword arguments other than first one are softly deprecated -# and will be removed when Ruby 2.5 becomes EOL. -# `ERB.new` with non-keyword arguments is deprecated since ERB 2.2.0. -# Use `:trim_mode` and `:eoutvar` keyword arguments to `ERB.new`. -# This cop identifies places where `ERB.new(str, trim_mode, eoutvar)` can -# be replaced by `ERB.new(str, :trim_mode: trim_mode, eoutvar: eoutvar)`. -# -# @example -# # Target codes supports Ruby 2.6 and higher only -# # bad -# ERB.new(str, nil, '-', '@output_buffer') -# -# # good -# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') -# -# # Target codes supports Ruby 2.5 and lower only -# # good -# ERB.new(str, nil, '-', '@output_buffer') -# -# # Target codes supports Ruby 2.6, 2.5 and lower -# # bad -# ERB.new(str, nil, '-', '@output_buffer') -# -# # good -# # Ruby standard library style -# # https://github.com/ruby/ruby/commit/3406c5d -# if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+ -# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') -# else -# ERB.new(str, nil, '-', '@output_buffer') -# end -# -# # good -# # Use `RUBY_VERSION` style -# if RUBY_VERSION >= '2.6' -# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') -# else -# ERB.new(str, nil, '-', '@output_buffer') -# end -# -# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#61 -class RuboCop::Cop::Lint::ErbNewArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#81 - def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#86 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#160 - def arguments_range(node); end - - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#115 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#130 - def build_kwargs(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#126 - def correct_arguments?(arguments); end - - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#104 - def message(positional_argument_index, arg_value); end - - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#147 - def override_by_legacy_args(kwargs, node); end -end - -# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#74 -RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_EOUTVAR = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#68 -RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_SAFE_LEVEL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#71 -RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_TRIM_MODE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#78 -RuboCop::Cop::Lint::ErbNewArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Looks for uses of flip-flop operator -# based on the Ruby Style Guide. -# -# Here is the history of flip-flops in Ruby. -# flip-flop operator is deprecated in Ruby 2.6.0 and -# the deprecation has been reverted by Ruby 2.7.0 and -# backported to Ruby 2.6. -# See: https://bugs.ruby-lang.org/issues/5400 -# -# @example -# # bad -# (1..20).each do |x| -# puts x if (x == 5) .. (x == 10) -# end -# -# # good -# (1..20).each do |x| -# puts x if (x >= 5) && (x <= 10) -# end -# -# source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#25 -class RuboCop::Cop::Lint::FlipFlop < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#32 - def on_eflipflop(node); end - - # source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#28 - def on_iflipflop(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#26 -RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) - -# Checks for the presence of precise comparison of floating point numbers. -# -# Floating point values are inherently inaccurate, and comparing them for exact equality -# is almost never the desired semantics. Comparison via the `==/!=` operators checks -# floating-point value representation to be exactly the same, which is very unlikely -# if you perform any arithmetic operations involving precision loss. -# -# # good - comparing against zero -# x == 0.0 -# x != 0.0 -# -# # good -# (x - 0.1).abs < Float::EPSILON -# -# # good -# tolerance = 0.0001 -# (x - 0.1).abs < tolerance -# -# # Or some other epsilon based type of comparison: -# # https://www.embeddeduse.com/2019/08/26/qt-compare-two-floats/ -# -# @example -# # bad -# x == 0.1 -# x != 0.1 -# -# # good - using BigDecimal -# x.to_d == 0.1.to_d -# -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#35 -class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#44 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#89 - def check_numeric_returning_method(node); end - - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#73 - def check_send(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#53 - def float?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#68 - def literal_zero?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#38 -RuboCop::Cop::Lint::FloatComparison::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#40 -RuboCop::Cop::Lint::FloatComparison::FLOAT_INSTANCE_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#39 -RuboCop::Cop::Lint::FloatComparison::FLOAT_RETURNING_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#36 -RuboCop::Cop::Lint::FloatComparison::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#42 -RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies Float literals which are, like, really really really -# really really really really really big. Too big. No-one needs Floats -# that big. If you need a float that big, something is wrong with you. -# -# @example -# -# # bad -# -# float = 3.0e400 -# @example -# -# # good -# -# float = 42.9 -# -# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#21 -class RuboCop::Cop::Lint::FloatOutOfRange < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#24 - def on_float(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#22 -RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) - -# This lint sees if there is a mismatch between the number of -# expected fields for format/sprintf/#% and what is actually -# passed as arguments. -# -# In addition it checks whether different formats are used in the same -# format string. Do not mix numbered, unnumbered, and named formats in -# the same format string. -# -# @example -# -# # bad -# -# format('A value: %s and another: %i', a_value) -# @example -# -# # good -# -# format('A value: %s and another: %i', a_value, another) -# @example -# -# # bad -# -# format('Unnumbered format: %s and numbered: %2$s', a_value, another) -# @example -# -# # good -# -# format('Numbered format: %1$s and numbered %2$s', a_value, another) -# -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37 -class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#100 - def called_on_string?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#49 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#137 - def count_format_matches(node); end - - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#119 - def count_matches(node); end - - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#141 - def count_percent_matches(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#129 - def countable_format?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#133 - def countable_percent?(node); end - - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#153 - def expected_fields_count(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#168 - def format?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#146 - def format_method?(name, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#64 - def format_string?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#115 - def heredoc?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#68 - def invalid_format_string?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#91 - def matched_arguments_count?(expected, passed); end - - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#186 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#105 - def method_with_format_args?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#77 - def offending_node?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#176 - def percent?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#109 - def splat_args?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#172 - def sprintf?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#195 - def string_type?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#44 -RuboCop::Cop::Lint::FormatParameterMismatch::KERNEL = T.let(T.unsafe(nil), String) - -# http://rubular.com/r/CvpbxkcTzy -# -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#39 -RuboCop::Cop::Lint::FormatParameterMismatch::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#41 -RuboCop::Cop::Lint::FormatParameterMismatch::MSG_INVALID = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#47 -RuboCop::Cop::Lint::FormatParameterMismatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#45 -RuboCop::Cop::Lint::FormatParameterMismatch::SHOVEL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#46 -RuboCop::Cop::Lint::FormatParameterMismatch::STRING_TYPES = T.let(T.unsafe(nil), Array) - -# Prefer using `Hash#compare_by_identity` rather than using `object_id` -# for hash keys. -# -# This cop looks for hashes being keyed by objects' `object_id`, using -# one of these methods: `key?`, `has_key?`, `fetch`, `[]` and `[]=`. -# -# @example -# # bad -# hash = {} -# hash[foo.object_id] = :bar -# hash.key?(baz.object_id) -# -# # good -# hash = {}.compare_by_identity -# hash[foo] = :bar -# hash.key?(baz) -# -# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#31 -class RuboCop::Cop::Lint::HashCompareByIdentity < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#37 - def id_as_hash_key?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#41 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#41 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#34 -RuboCop::Cop::Lint::HashCompareByIdentity::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#32 -RuboCop::Cop::Lint::HashCompareByIdentity::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the ordering of a method call where -# the receiver of the call is a HEREDOC. -# -# @example -# # bad -# <<-SQL -# bar -# SQL -# .strip_indent -# -# <<-SQL -# bar -# SQL -# .strip_indent -# .trim -# -# # good -# <<~SQL -# bar -# SQL -# -# <<~SQL.trim -# bar -# SQL -# -# source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#31 -class RuboCop::Cop::Lint::HeredocMethodCallPosition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#37 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#37 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#97 - def all_on_same_line?(nodes); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#50 - def autocorrect(corrector, node, heredoc); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#77 - def call_after_heredoc_range(heredoc); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#107 - def call_end_pos(node); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#116 - def call_line_range(node); end - - # Returns nil if no range can be safely repositioned. - # - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#122 - def call_range_to_safely_reposition(node, heredoc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#86 - def calls_on_multiple_lines?(node, _heredoc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#82 - def correctly_positioned?(node, heredoc); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#111 - def heredoc_begin_line_range(heredoc); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#103 - def heredoc_end_pos(heredoc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#73 - def heredoc_node?(node); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#59 - def heredoc_node_descendent_receiver(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#67 - def send_node?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#146 - def trailing_comma?(call_source, call_line_source); end -end - -# source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#35 -RuboCop::Cop::Lint::HeredocMethodCallPosition::MSG = T.let(T.unsafe(nil), String) - -# Prefer `equal?` over `==` when comparing `object_id`. -# -# `Object#equal?` is provided to compare objects for identity, and in contrast -# `Object#==` is provided for the purpose of doing value comparison. -# -# @example -# # bad -# foo.object_id == bar.object_id -# -# # good -# foo.equal?(bar) -# -# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#18 -class RuboCop::Cop::Lint::IdentityComparison < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#24 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#40 - def compare_between_object_id_by_double_equal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#44 - def object_id_method?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#21 -RuboCop::Cop::Lint::IdentityComparison::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#22 -RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for implicit string concatenation of string literals -# which are on the same line. -# -# @example -# -# # bad -# -# array = ['Item 1' 'Item 2'] -# @example -# -# # good -# -# array = ['Item 1Item 2'] -# array = ['Item 1' + 'Item 2'] -# array = [ -# 'Item 1' \ -# 'Item 2' -# ] -# -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#25 -class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#33 - def on_dstr(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#83 - def display_str(node); end - - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#50 - def each_bad_cons(node); end - - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#65 - def ending_delimiter(str); end - - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#91 - def str_content(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#75 - def string_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#79 - def string_literals?(node1, node2); end -end - -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 -RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#30 -RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26 -RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String) - -# Checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0. -# -# When an array of IO objects waiting for an exception (the third argument of `IO.select`) -# is used as an argument, there is no alternative API, so offenses are not registered. -# -# NOTE: When the method is successful the return value of `IO.select` is `[[IO]]`, -# and the return value of `io.wait_readable` and `io.wait_writable` are `self`. -# They are not autocorrected when assigning a return value because these types are different. -# It's up to user how to handle the return value. -# -# @example -# -# # bad -# IO.select([io], [], [], timeout) -# -# # good -# io.wait_readable(timeout) -# -# # bad -# IO.select([], [io], [], timeout) -# -# # good -# io.wait_writable(timeout) -# -# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#34 -class RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#41 - def io_select(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#46 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#69 - def preferred_method(read, write, timeout); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#63 - def scheduler_compatible?(io1, io2); end -end - -# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#37 -RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#38 -RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for `private` or `protected` access modifiers which are -# applied to a singleton method. These access modifiers do not make -# singleton methods private/protected. `private_class_method` can be -# used for that. -# -# @example -# -# # bad -# -# class C -# private -# -# def self.method -# puts 'hi' -# end -# end -# @example -# -# # good -# -# class C -# def self.method -# puts 'hi' -# end -# -# private_class_method :method -# end -# @example -# -# # good -# -# class C -# class << self -# private -# -# def method -# puts 'hi' -# end -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#48 -class RuboCop::Cop::Lint::IneffectiveAccessModifier < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#55 - def private_class_methods(param0); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#109 - def access_modifier?(node); end - - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#66 - def check_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#113 - def correct_visibility?(node, modifier, ignored_methods); end - - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#78 - def format_message(modifier); end - - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#91 - def ineffective_modifier(node, ignored_methods = T.unsafe(nil), modifier = T.unsafe(nil), &block); end - - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#74 - def private_class_method_names(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#51 -RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PRIVATE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 -RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PROTECTED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#49 -RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String) - -# Looks for error classes inheriting from `Exception`. -# It is configurable to suggest using either `StandardError` (default) or -# `RuntimeError` instead. -# -# @example EnforcedStyle: standard_error (default) -# # bad -# -# class C < Exception; end -# -# C = Class.new(Exception) -# -# # good -# -# class C < StandardError; end -# -# C = Class.new(StandardError) -# @example EnforcedStyle: runtime_error -# # bad -# -# class C < Exception; end -# -# C = Class.new(Exception) -# -# # good -# -# class C < RuntimeError; end -# -# C = Class.new(RuntimeError) -# -# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#40 -class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#53 - def class_new_call?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#59 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#70 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#87 - def exception_class?(class_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#91 - def inherit_exception_class_with_omitted_namespace?(class_node); end - - # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#83 - def message(node); end - - # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#99 - def preferred_base_class; end -end - -# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#44 -RuboCop::Cop::Lint::InheritException::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#45 -RuboCop::Cop::Lint::InheritException::PREFERRED_BASE_CLASS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#50 -RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for interpolation in a single quoted string. -# -# @example -# -# # bad -# -# foo = 'something with #{interpolation} inside' -# @example -# -# # good -# -# foo = "something with #{interpolation} inside" -# -# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#25 -class RuboCop::Cop::Lint::InterpolationCheck < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#31 - def on_str(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#42 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#53 - def heredoc?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#28 -RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String) - -# Emulates the following Ruby warning in Ruby 3.3. -# -# [source,ruby] -# ---- -# $ ruby -e '0.times { it }' -# -e:1: warning: `it` calls without arguments will refer to the first block param in Ruby 3.4; -# use it() or self.it -# ---- -# -# `it` calls without arguments will refer to the first block param in Ruby 3.4. -# So use `it()` or `self.it` to ensure compatibility. -# -# @example -# -# # bad -# do_something { it } -# -# # good -# do_something { it() } -# do_something { self.it } -# -# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#27 -class RuboCop::Cop::Lint::ItWithoutArgumentsInBlock < ::RuboCop::Cop::Base - include ::RuboCop::AST::NodePattern::Macros - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#48 - def deprecated_it_method?(node); end - - # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#33 - def on_block(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#30 -RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::MSG = T.let(T.unsafe(nil), String) - -# Checks uses of lambda without a literal block. -# It emulates the following warning in Ruby 3.0: -# -# $ ruby -vwe 'lambda(&proc {})' -# ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19] -# -e:1: warning: lambda without a literal block is deprecated; use the proc without -# lambda instead -# -# This way, proc object is never converted to lambda. -# Autocorrection replaces with compatible proc argument. -# -# @example -# -# # bad -# lambda(&proc { do_something }) -# lambda(&Proc.new { do_something }) -# -# # good -# proc { do_something } -# Proc.new { do_something } -# lambda { do_something } # If you use lambda. -# -# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#28 -class RuboCop::Cop::Lint::LambdaWithoutLiteralBlock < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#35 - def lambda_with_symbol_proc?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#39 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#31 -RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#32 -RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for literals used as the conditions or as -# operands in and/or expressions serving as the conditions of -# if/while/until/case-when/case-in. -# -# NOTE: Literals in `case-in` condition where the match variable is used in -# `in` are accepted as a pattern matching. -# -# @example -# -# # bad -# if 20 -# do_something -# end -# -# # bad -# if some_var && true -# do_something -# end -# -# # good -# if some_var && some_condition -# do_something -# end -# -# # good -# # When using a boolean value for an infinite loop. -# while true -# break if condition -# end -# -# source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#35 -class RuboCop::Cop::Lint::LiteralAsCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#93 - def message(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#58 - def on_case(case_node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#73 - def on_case_match(case_match_node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#40 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#87 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#51 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#51 - def on_until_post(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#44 - def on_while(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#44 - def on_while_post(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#108 - def basic_literal?(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#138 - def check_case(case_node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#99 - def check_for_literal(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#120 - def check_node(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#147 - def condition(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#130 - def handle_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#116 - def primitive_array?(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#155 - def when_conditions_range(when_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#38 -RuboCop::Cop::Lint::LiteralAsCondition::MSG = T.let(T.unsafe(nil), String) - -# Checks for literal assignments in the conditions of `if`, `while`, and `until`. -# It emulates the following Ruby warning: -# -# [source,console] -# ---- -# $ ruby -we 'if x = true; end' -# -e:1: warning: found `= literal' in conditional, should be == -# ---- -# -# As a lint cop, it cannot be determined if `==` is appropriate as intended, -# therefore this cop does not provide autocorrection. -# -# @example -# -# # bad -# if x = 42 -# do_something -# end -# -# # good -# if x == 42 -# do_something -# end -# -# # good -# if x = y -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#35 -class RuboCop::Cop::Lint::LiteralAssignmentInCondition < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39 - def on_while(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#62 - def all_literals?(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#79 - def offense_range(asgn_node, rhs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#75 - def parallel_assignment_with_splat_operator?(node); end - - # @yield [node] - # - # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#56 - def traverse_node(node, &block); end -end - -# source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#36 -RuboCop::Cop::Lint::LiteralAssignmentInCondition::MSG = T.let(T.unsafe(nil), String) - -# Checks for interpolated literals. -# -# @example -# -# # bad -# -# "result is #{10}" -# @example -# -# # good -# -# "result is 10" -# -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#19 -class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#28 - def on_interpolation(begin_node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#62 - def autocorrected_value(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#108 - def autocorrected_value_for_array(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#114 - def autocorrected_value_for_hash(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#84 - def autocorrected_value_for_string(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#92 - def autocorrected_value_for_symbol(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#125 - def autocorrected_value_in_hash(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#99 - def autocorrected_value_in_hash_for_symbol(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#155 - def ends_heredoc_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#163 - def in_array_percent_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#48 - def offending?(node); end - - # Does node print its own source when converted to a string? - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#146 - def prints_as_self?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151 - def space_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#56 - def special_keyword?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#26 -RuboCop::Cop::Lint::LiteralInInterpolation::COMPOSITE = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#25 -RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of `begin...end while/until something`. -# -# @example -# -# # bad -# -# # using while -# begin -# do_something -# end while some_condition -# @example -# -# # bad -# -# # using until -# begin -# do_something -# end until some_condition -# @example -# -# # good -# -# # while replacement -# loop do -# do_something -# break unless some_condition -# end -# @example -# -# # good -# -# # until replacement -# loop do -# do_something -# break if some_condition -# end -# -# source://rubocop//lib/rubocop/cop/lint/loop.rb#50 -class RuboCop::Cop::Lint::Loop < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/loop.rb#59 - def on_until_post(node); end - - # source://rubocop//lib/rubocop/cop/lint/loop.rb#55 - def on_while_post(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/loop.rb#79 - def build_break_line(node); end - - # source://rubocop//lib/rubocop/cop/lint/loop.rb#75 - def keyword_and_condition_range(node); end - - # source://rubocop//lib/rubocop/cop/lint/loop.rb#65 - def register_offense(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/loop.rb#53 -RuboCop::Cop::Lint::Loop::MSG = T.let(T.unsafe(nil), String) - -# cop disables on wide ranges of code, that latter contributors to -# a file wouldn't be aware of. -# -# @example -# # Lint/MissingCopEnableDirective: -# # MaximumRangeSize: .inf -# -# # good -# # rubocop:disable Layout/SpaceAroundOperators -# x= 0 -# # rubocop:enable Layout/SpaceAroundOperators -# # y = 1 -# # EOF -# -# # bad -# # rubocop:disable Layout/SpaceAroundOperators -# x= 0 -# # EOF -# @example -# # Lint/MissingCopEnableDirective: -# # MaximumRangeSize: 2 -# -# # good -# # rubocop:disable Layout/SpaceAroundOperators -# x= 0 -# # With the previous, there are 2 lines on which cop is disabled. -# # rubocop:enable Layout/SpaceAroundOperators -# -# # bad -# # rubocop:disable Layout/SpaceAroundOperators -# x= 0 -# x += 1 -# # Including this, that's 3 lines on which the cop is disabled. -# # rubocop:enable Layout/SpaceAroundOperators -# -# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#45 -class RuboCop::Cop::Lint::MissingCopEnableDirective < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#51 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#70 - def acceptable_range?(cop, line_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#104 - def department_enabled?(cop, comment); end - - # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#64 - def each_missing_enable; end - - # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#87 - def max_range; end - - # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#91 - def message(cop, comment, type = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#48 -RuboCop::Cop::Lint::MissingCopEnableDirective::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#49 -RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil), String) - -# Checks for the presence of constructors and lifecycle callbacks -# without calls to `super`. -# -# This cop does not consider `method_missing` (and `respond_to_missing?`) -# because in some cases it makes sense to overtake what is considered a -# missing method. In other cases, the theoretical ideal handling could be -# challenging or verbose for no actual gain. -# -# Autocorrection is not supported because the position of `super` cannot be -# determined automatically. -# -# `Object` and `BasicObject` are allowed by this cop because of their -# stateless nature. However, sometimes you might want to allow other parent -# classes from this cop, for example in the case of an abstract class that is -# not meant to be called with `super`. In those cases, you can use the -# `AllowedParentClasses` option to specify which classes should be allowed -# *in addition to* `Object` and `BasicObject`. -# -# @example -# # bad -# class Employee < Person -# def initialize(name, salary) -# @salary = salary -# end -# end -# -# # good -# class Employee < Person -# def initialize(name, salary) -# super(name) -# @salary = salary -# end -# end -# -# # bad -# Employee = Class.new(Person) do -# def initialize(name, salary) -# @salary = salary -# end -# end -# -# # good -# Employee = Class.new(Person) do -# def initialize(name, salary) -# super(name) -# @salary = salary -# end -# end -# -# # bad -# class Parent -# def self.inherited(base) -# do_something -# end -# end -# -# # good -# class Parent -# def self.inherited(base) -# super -# do_something -# end -# end -# -# # good -# class ClassWithNoParent -# def initialize -# do_something -# end -# end -# @example AllowedParentClasses: [MyAbstractClass] -# # good -# class MyConcreteClass < MyAbstractClass -# def initialize -# do_something -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#85 -class RuboCop::Cop::Lint::MissingSuper < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#99 - def class_new_block(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#105 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#115 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#149 - def allowed_class?(node); end - - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#153 - def allowed_classes; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#127 - def callback_method_def?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#133 - def contains_super?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#137 - def inside_class_with_stateful_parent?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#123 - def offender?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#96 -RuboCop::Cop::Lint::MissingSuper::CALLBACKS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#87 -RuboCop::Cop::Lint::MissingSuper::CALLBACK_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#91 -RuboCop::Cop::Lint::MissingSuper::CLASS_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#86 -RuboCop::Cop::Lint::MissingSuper::CONSTRUCTOR_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#92 -RuboCop::Cop::Lint::MissingSuper::METHOD_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#89 -RuboCop::Cop::Lint::MissingSuper::STATELESS_CLASSES = T.let(T.unsafe(nil), Array) - -# Checks for mixed-case character ranges since they include likely unintended characters. -# -# Offenses are registered for regexp character classes like `/[A-z]/` -# as well as range objects like `('A'..'z')`. -# -# NOTE: Range objects cannot be autocorrected. -# -# @example -# -# # bad -# r = /[A-z]/ -# -# # good -# r = /[A-Za-z]/ -# -# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#28 -class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#58 - def each_unsafe_regexp_range(node); end - - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 - def on_erange(node); end - - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 - def on_irange(node); end - - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#48 - def on_regexp(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#74 - def build_source_range(range_start, range_end); end - - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#78 - def range_for(char); end - - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#84 - def range_pairs(expr); end - - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#104 - def regexp_range(source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#94 - def skip_expression?(expr); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#98 - def skip_range?(range_start, range_end); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#88 - def unsafe_range?(range_start, range_end); end -end - -# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#32 -RuboCop::Cop::Lint::MixedCaseRange::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#35 -RuboCop::Cop::Lint::MixedCaseRange::RANGES = T.let(T.unsafe(nil), Array) - -# Do not mix named captures and numbered captures in a Regexp literal -# because numbered capture is ignored if they're mixed. -# Replace numbered captures with non-capturing groupings or -# named captures. -# -# @example -# # bad -# /(?FOO)(BAR)/ -# -# # good -# /(?FOO)(?BAR)/ -# -# # good -# /(?FOO)(?:BAR)/ -# -# # good -# /(FOO)(BAR)/ -# -# source://rubocop//lib/rubocop/cop/lint/mixed_regexp_capture_types.rb#24 -class RuboCop::Cop::Lint::MixedRegexpCaptureTypes < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/mixed_regexp_capture_types.rb#27 - def on_regexp(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/mixed_regexp_capture_types.rb#25 -RuboCop::Cop::Lint::MixedRegexpCaptureTypes::MSG = T.let(T.unsafe(nil), String) - -# In math and Python, we can use `x < y < z` style comparison to compare -# multiple value. However, we can't use the comparison in Ruby. However, -# the comparison is not syntax error. This cop checks the bad usage of -# comparison operators. -# -# @example -# -# # bad -# x < y < z -# 10 <= x <= 20 -# -# # good -# x < y && y < z -# 10 <= x && x <= 20 -# -# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#20 -class RuboCop::Cop::Lint::MultipleComparison < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#29 - def multiple_compare?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#33 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#24 -RuboCop::Cop::Lint::MultipleComparison::COMPARISON_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#23 -RuboCop::Cop::Lint::MultipleComparison::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#26 -RuboCop::Cop::Lint::MultipleComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#25 -RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe(nil), Array) - -# Checks for nested method definitions. -# -# @example AllowedPatterns: ['baz'] -# # good -# def foo(obj) -# obj.do_baz do -# def bar -# end -# end -# end -# @example -# -# # good -# -# def foo -# bar = -> { puts 'hello' } -# bar.call -# end -# @example -# -# # good -# -# # `class_eval`, `instance_eval`, `module_eval`, `class_exec`, `instance_exec`, and -# # `module_exec` blocks are allowed by default. -# -# def foo -# self.class.class_eval do -# def bar -# end -# end -# end -# -# def foo -# self.class.module_exec do -# def bar -# end -# end -# end -# @example -# -# # good -# -# def foo -# class << self -# def bar -# end -# end -# end -# @example AllowedMethods: [] (default) -# # bad -# def do_something -# has_many :articles do -# def find_or_create_by_name(name) -# end -# end -# end -# @example AllowedMethods: ['has_many'] -# # bad -# def do_something -# has_many :articles do -# def find_or_create_by_name(name) -# end -# end -# end -# @example AllowedPatterns: [] (default) -# # bad -# def foo(obj) -# obj.do_baz do -# def bar -# end -# end -# end -# @example -# -# # bad -# -# # `bar` definition actually produces methods in the same scope -# # as the outer `foo` method. Furthermore, the `bar` method -# # will be redefined every time `foo` is invoked. -# def foo -# def bar -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 -class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#133 - def eval_call?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#138 - def exec_call?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#103 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#103 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#126 - def allowed_method_name?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#121 - def scoping_method_call?(child); end -end - -# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#101 -RuboCop::Cop::Lint::NestedMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -# Checks for nested percent literals. -# -# @example -# -# # bad -# -# # The percent literal for nested_attributes is parsed as four tokens, -# # yielding the array [:name, :content, :"%i[incorrectly", :"nested]"]. -# attributes = { -# valid_attributes: %i[name content], -# nested_attributes: %i[name content %i[incorrectly nested]] -# } -# -# # good -# -# # Neither is incompatible with the bad case, but probably the intended code. -# attributes = { -# valid_attributes: %i[name content], -# nested_attributes: [:name, :content, %i[incorrectly nested]] -# } -# -# attributes = { -# valid_attributes: %i[name content], -# nested_attributes: [:name, :content, [:incorrectly, :nested]] -# } -# -# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#32 -class RuboCop::Cop::Lint::NestedPercentLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - - # source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#44 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#48 - def on_percent_literal(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#54 - def contains_percent_literals?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#35 -RuboCop::Cop::Lint::NestedPercentLiteral::MSG = T.let(T.unsafe(nil), String) - -# The array of regular expressions representing percent literals that, -# if found within a percent literal expression, will cause a -# NestedPercentLiteral violation to be emitted. -# -# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#41 -RuboCop::Cop::Lint::NestedPercentLiteral::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#42 -RuboCop::Cop::Lint::NestedPercentLiteral::REGEXES = T.let(T.unsafe(nil), Array) - -# Don't omit the accumulator when calling `next` in a `reduce` block. -# -# @example -# -# # bad -# -# result = (1..4).reduce(0) do |acc, i| -# next if i.odd? -# acc + i -# end -# @example -# -# # good -# -# result = (1..4).reduce(0) do |acc, i| -# next acc if i.odd? -# acc + i -# end -# -# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#25 -class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#42 - def on_block_body_of_reduce(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#49 - def parent_block_node(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#26 -RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) - -# Checks for the presence of a `return` inside a `begin..end` block -# in assignment contexts. -# In this situation, the `return` will result in an exit from the current -# method, possibly leading to unexpected behavior. -# -# @example -# -# # bad -# -# @some_variable ||= begin -# return some_value if some_condition_is_met -# -# do_something -# end -# @example -# -# # good -# -# @some_variable ||= begin -# if some_condition_is_met -# some_value -# else -# do_something -# end -# end -# -# # good -# -# some_variable = if some_condition_is_met -# return if another_condition_is_met -# -# some_value -# else -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#43 -class RuboCop::Cop::Lint::NoReturnInBeginEndBlocks < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 - def on_op_asgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 - def on_or_asgn(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#44 -RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String) - -# Checks for non-atomic file operation. -# And then replace it with a nearly equivalent and atomic method. -# -# These can cause problems that are difficult to reproduce, -# especially in cases of frequent file operations in parallel, -# such as test runs with parallel_rspec. -# -# For examples: creating a directory if there is none, has the following problems -# -# An exception occurs when the directory didn't exist at the time of `exist?`, -# but someone else created it before `mkdir` was executed. -# -# Subsequent processes are executed without the directory that should be there -# when the directory existed at the time of `exist?`, -# but someone else deleted it shortly afterwards. -# -# @example -# # bad - race condition with another process may result in an error in `mkdir` -# unless Dir.exist?(path) -# FileUtils.mkdir(path) -# end -# -# # good - atomic and idempotent creation -# FileUtils.mkdir_p(path) -# -# # bad - race condition with another process may result in an error in `remove` -# if File.exist?(path) -# FileUtils.remove(path) -# end -# -# # good - atomic and idempotent removal -# FileUtils.rm_f(path) -# -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#44 -class RuboCop::Cop::Lint::NonAtomicFileOperation < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#76 - def explicit_not_force?(param0); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#71 - def force?(param0); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#80 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#66 - def receiver_and_method_name(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#61 - def send_exist_node(param0); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#97 - def allowable_use_with_if?(if_node); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#121 - def autocorrect(corrector, node, range); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#132 - def autocorrect_replace_method(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#151 - def force_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#159 - def force_method_name?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#155 - def force_option?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#91 - def if_node_child?(node); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#112 - def message_change_force_method(node); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#116 - def message_remove_file_exist_check(node); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#101 - def register_offense(node, exist_node); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#139 - def replacement_method(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#50 -RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_FORCE_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#51 -RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#49 -RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_CHANGE_FORCE_METHOD = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#47 -RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_REMOVE_FILE_EXIST_CHECK = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#54 -RuboCop::Cop::Lint::NonAtomicFileOperation::RECURSIVE_REMOVE_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#52 -RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_FORCE_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#53 -RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#55 -RuboCop::Cop::Lint::NonAtomicFileOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# `Dir[...]` and `Dir.glob(...)` do not make any guarantees about -# the order in which files are returned. The final order is -# determined by the operating system and file system. -# This means that using them in cases where the order matters, -# such as requiring files, can lead to intermittent failures -# that are hard to debug. To ensure this doesn't happen, -# always sort the list. -# -# `Dir.glob` and `Dir[]` sort globbed results by default in Ruby 3.0. -# So all bad cases are acceptable when Ruby 3.0 or higher are used. -# -# NOTE: This cop will be deprecated and removed when supporting only Ruby 3.0 and higher. -# -# @example -# -# # bad -# Dir["./lib/**/*.rb"].each do |file| -# require file -# end -# -# # good -# Dir["./lib/**/*.rb"].sort.each do |file| -# require file -# end -# -# # bad -# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb')) do |file| -# require file -# end -# -# # good -# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb')).sort.each do |file| -# require file -# end -# -# # bad -# Dir['./lib/**/*.rb'].each(&method(:require)) -# -# # good -# Dir['./lib/**/*.rb'].sort.each(&method(:require)) -# -# # bad -# Dir.glob(Rails.root.join('test', '*.rb'), &method(:require)) -# -# # good -# Dir.glob(Rails.root.join('test', '*.rb')).sort.each(&method(:require)) -# -# # good - Respect intent if `sort` keyword option is specified in Ruby 3.0 or higher. -# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb'), sort: false).each(&method(:require)) -# -# source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#60 -class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#172 - def loop_variable(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#155 - def method_require?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#65 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#89 - def on_block_pass(node); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#77 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#145 - def unsorted_dir_block?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#150 - def unsorted_dir_each?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#166 - def unsorted_dir_each_pass?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#160 - def unsorted_dir_glob_pass?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#177 - def var_is_required?(param0, param1); end - - private - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#107 - def correct_block(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#117 - def correct_block_pass(corrector, node); end - - # Returns range of last argument including comma and whitespace. - # - # @return [Parser::Source::Range] - # - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#132 - def last_arg_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#136 - def unsorted_dir_loop?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#140 - def unsorted_dir_pass?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#63 -RuboCop::Cop::Lint::NonDeterministicRequireOrder::MSG = T.let(T.unsafe(nil), String) - -# Checks for non-local exits from iterators without a return -# value. It registers an offense under these conditions: -# -# * No value is returned, -# * the block is preceded by a method chain, -# * the block has arguments, -# * the method which receives the block is not `define_method` -# or `define_singleton_method`, -# * the return is not contained in an inner scope, e.g. a lambda or a -# method definition. -# -# @example -# -# class ItemApi -# rescue_from ValidationError do |e| # non-iteration block with arg -# return { message: 'validation error' } unless e.errors # allowed -# error_array = e.errors.map do |error| # block with method chain -# return if error.suppress? # warned -# return "#{error.param}: invalid" unless error.message # allowed -# "#{error.param}: #{error.message}" -# end -# { message: 'validation error', errors: error_array } -# end -# -# def update_items -# transaction do # block without arguments -# return unless update_necessary? # allowed -# find_each do |item| # block without method chain -# return if item.stock == 0 # false-negative... -# item.update!(foobar: true) -# end -# end -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#41 -class RuboCop::Cop::Lint::NonLocalExitFromIterator < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#77 - def chained_send?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#80 - def define_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#46 - def on_return(return_node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#72 - def return_value?(return_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#68 - def scoped_node?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#42 -RuboCop::Cop::Lint::NonLocalExitFromIterator::MSG = T.let(T.unsafe(nil), String) - -# Warns the usage of unsafe number conversions. Unsafe -# number conversion can cause unexpected error if auto type conversion -# fails. Cop prefer parsing with number class instead. -# -# Conversion with `Integer`, `Float`, etc. will raise an `ArgumentError` -# if given input that is not numeric (eg. an empty string), whereas -# `to_i`, etc. will try to convert regardless of input (``''.to_i => 0``). -# As such, this cop is disabled by default because it's not necessarily -# always correct to raise if a value is not numeric. -# -# NOTE: Some values cannot be converted properly using one of the `Kernel` -# method (for instance, `Time` and `DateTime` values are allowed by this -# cop by default). Similarly, Rails' duration methods do not work well -# with `Integer()` and can be allowed with `AllowedMethods`. By default, -# there are no methods to allowed. -# -# @example -# -# # bad -# -# '10'.to_i -# '10.2'.to_f -# '10'.to_c -# '1/3'.to_r -# ['1', '2', '3'].map(&:to_i) -# foo.try(:to_f) -# bar.send(:to_c) -# -# # good -# -# Integer('10', 10) -# Float('10.2') -# Complex('10') -# Rational('1/3') -# ['1', '2', '3'].map { |i| Integer(i, 10) } -# foo.try { |i| Float(i) } -# bar.send { |i| Complex(i) } -# @example AllowedMethods: [] (default) -# -# # bad -# 10.minutes.to_i -# @example AllowedMethods: [minutes] -# -# # good -# 10.minutes.to_i -# @example AllowedPatterns: [] (default) -# -# # bad -# 10.minutes.to_i -# @example AllowedPatterns: ['min*'] -# -# # good -# 10.minutes.to_i -# @example IgnoredClasses: [Time, DateTime] (default) -# -# # good -# Time.now.to_datetime.to_i -# -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#73 -class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#107 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#107 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#93 - def to_method(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#98 - def to_method_symbol(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#165 - def allow_receiver?(receiver); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#177 - def allowed_method_name?(name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#187 - def conversion_method?(method_name); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#151 - def correct_method(node, receiver); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#155 - def correct_sym_method(to_method); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#134 - def handle_as_symbol(node); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#115 - def handle_conversion_method(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#195 - def ignored_class?(name); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#191 - def ignored_classes; end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#160 - def remove_parentheses(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#181 - def top_receiver(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#89 -RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#79 -RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHOD_CLASS_MAPPING = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#90 -RuboCop::Cop::Lint::NumberConversion::METHODS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#85 -RuboCop::Cop::Lint::NumberConversion::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of numbered parameter assignment. -# It emulates the following warning in Ruby 2.7: -# -# $ ruby -ve '_1 = :value' -# ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin19] -# -e:1: warning: `_1' is reserved for numbered parameter; consider another name -# -# Assigning to a numbered parameter (from `_1` to `_9`) causes an error in Ruby 3.0. -# -# $ ruby -ve '_1 = :value' -# ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19] -# -e:1: _1 is reserved for numbered parameter -# -# NOTE: The parametered parameters are from `_1` to `_9`. This cop checks `_0`, and over `_10` -# as well to prevent confusion. -# -# @example -# -# # bad -# _1 = :value -# -# # good -# non_numbered_parameter_name = :value -# -# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#30 -class RuboCop::Cop::Lint::NumberedParameterAssignment < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#35 - def on_lvasgn(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#32 -RuboCop::Cop::Lint::NumberedParameterAssignment::LVAR_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#33 -RuboCop::Cop::Lint::NumberedParameterAssignment::NUMBERED_PARAMETER_RANGE = T.let(T.unsafe(nil), Range) - -# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#31 -RuboCop::Cop::Lint::NumberedParameterAssignment::NUM_PARAM_MSG = T.let(T.unsafe(nil), String) - -# Checks for unintended or-assignment to a constant. -# -# Constants should always be assigned in the same location. And its value -# should always be the same. If constants are assigned in multiple -# locations, the result may vary depending on the order of `require`. -# -# @example -# -# # bad -# CONST ||= 1 -# -# # good -# CONST = 1 -# -# source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#24 -class RuboCop::Cop::Lint::OrAssignmentToConstant < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#29 - def on_or_asgn(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#27 -RuboCop::Cop::Lint::OrAssignmentToConstant::MSG = T.let(T.unsafe(nil), String) - -# Checks the proper ordering of magic comments and whether -# a magic comment is not placed before a shebang. -# -# @example -# # bad -# -# # frozen_string_literal: true -# # encoding: ascii -# p [''.frozen?, ''.encoding] #=> [true, #] -# -# # good -# -# # encoding: ascii -# # frozen_string_literal: true -# p [''.frozen?, ''.encoding] #=> [true, #] -# -# # good -# -# #!/usr/bin/env ruby -# # encoding: ascii -# # frozen_string_literal: true -# p [''.frozen?, ''.encoding] #=> [true, #] -# -# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#32 -class RuboCop::Cop::Lint::OrderedMagicComments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#38 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#55 - def autocorrect(corrector, encoding_line, frozen_string_literal_line); end - - # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#63 - def magic_comment_lines; end -end - -# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#36 -RuboCop::Cop::Lint::OrderedMagicComments::MSG = T.let(T.unsafe(nil), String) - -# Looks for references of Regexp captures that are out of range -# and thus always returns nil. -# -# @example -# -# /(foo)bar/ =~ 'foobar' -# -# # bad - always returns nil -# -# puts $2 # => nil -# -# # good -# -# puts $1 # => foo -# -# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#38 -class RuboCop::Cop::Lint::OutOfRangeRegexpRef < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#55 - def after_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#71 - def on_in_pattern(node); end - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#51 - def on_match_with_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#47 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#77 - def on_nth_ref(node); end - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#65 - def on_when(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#102 - def check_regexp(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#122 - def nth_ref_receiver?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#113 - def regexp_first_argument?(send_node); end - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#93 - def regexp_patterns(in_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#118 - def regexp_receiver?(send_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#39 -RuboCop::Cop::Lint::OutOfRangeRegexpRef::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#42 -RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_ARGUMENT_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#44 -RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_CAPTURE_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#41 -RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_RECEIVER_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#45 -RuboCop::Cop::Lint::OutOfRangeRegexpRef::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# Checks for space between the name of a called method and a left -# parenthesis. -# -# @example -# -# # bad -# do_something (foo) -# -# # good -# do_something(foo) -# do_something (2 + 3) * 4 -# do_something (foo * bar).baz -# -# source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#18 -class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#24 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#24 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#61 - def chained_calls?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#49 - def first_argument_block_type?(first_arg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#57 - def first_argument_starts_with_left_parenthesis?(node); end - - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#86 - def space_range(expr, space_length); end - - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#70 - def spaces_before_left_parenthesis(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#66 - def ternary_expression?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#39 - def valid_context?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#53 - def valid_first_argument?(first_arg); end -end - -# source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#22 -RuboCop::Cop::Lint::ParenthesesAsGroupedExpression::MSG = T.let(T.unsafe(nil), String) - -# Checks for quotes and commas in %w, e.g. `%w('foo', "bar")` -# -# It is more likely that the additional characters are unintended (for -# example, mistranslating an array of literals to percent string notation) -# rather than meant to be part of the resulting strings. -# -# @example -# -# # bad -# -# %w('foo', "bar") -# @example -# -# # good -# -# %w(foo bar) -# -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#33 -class RuboCop::Cop::Lint::PercentStringArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#44 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#48 - def on_percent_literal(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#65 - def contains_quotes_or_commas?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#38 -RuboCop::Cop::Lint::PercentStringArray::LEADING_QUOTE = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#41 -RuboCop::Cop::Lint::PercentStringArray::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#37 -RuboCop::Cop::Lint::PercentStringArray::QUOTES_AND_COMMAS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#39 -RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Regexp) - -# Checks for colons and commas in %i, e.g. `%i(:foo, :bar)` -# -# It is more likely that the additional characters are unintended (for -# example, mistranslating an array of literals to percent string notation) -# rather than meant to be part of the resulting symbols. -# -# @example -# -# # bad -# -# %i(:foo, :bar) -# @example -# -# # good -# -# %i(foo bar) -# -# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#23 -class RuboCop::Cop::Lint::PercentSymbolArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#30 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#34 - def on_percent_literal(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#42 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#52 - def contains_colons_or_commas?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#62 - def non_alphanumeric_literal?(literal); end -end - -# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#27 -RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String) - -# Checks for `raise` or `fail` statements which are -# raising `Exception` class. -# -# You can specify a module name that will be an implicit namespace -# using `AllowedImplicitNamespaces` option. The cop cause a false positive -# for namespaced `Exception` when a namespace is omitted. This option can -# prevent the false positive by specifying a namespace to be omitted for -# `Exception`. Alternatively, make `Exception` a fully qualified class -# name with an explicit namespace. -# -# @example -# # bad -# raise Exception, 'Error message here' -# -# # good -# raise StandardError, 'Error message here' -# @example AllowedImplicitNamespaces: ['Gem'] -# # good -# module Gem -# def self.foo -# raise Exception # This exception means `Gem::Exception`. -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#34 -class RuboCop::Cop::Lint::RaiseException < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#41 - def exception?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#46 - def exception_new_with_message?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#51 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#85 - def allow_implicit_namespaces; end - - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#57 - def check(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#73 - def implicit_namespace?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#37 -RuboCop::Cop::Lint::RaiseException::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#38 -RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for `rand(1)` calls. -# Such calls always return `0`. -# -# @example -# -# # bad -# -# rand 1 -# Kernel.rand(-1) -# rand 1.0 -# rand(-1.0) -# @example -# -# # good -# -# 0 # just use 0 instead -# -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#23 -class RuboCop::Cop::Lint::RandOne < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#32 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#28 - def rand_one?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#40 - def message(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#24 -RuboCop::Cop::Lint::RandOne::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#25 -RuboCop::Cop::Lint::RandOne::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# removed without causing any offenses to be reported. It's implemented -# as a cop in that it inherits from the Cop base class and calls -# add_offense. The unusual part of its implementation is that it doesn't -# have any on_* methods or an investigate method. This means that it -# doesn't take part in the investigation phase when the other cops do -# their work. Instead, it waits until it's called in a later stage of the -# execution. The reason it can't be implemented as a normal cop is that -# it depends on the results of all other cops to do its work. -# -# @example -# # bad -# # rubocop:disable Layout/LineLength -# x += 1 -# # rubocop:enable Layout/LineLength -# -# # good -# x += 1 -# -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#28 -class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # @return [RedundantCopDisableDirective] a new instance of RedundantCopDisableDirective - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#37 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil), offenses = T.unsafe(nil)); end - - # Returns the value of attribute offenses_to_check. - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#35 - def offenses_to_check; end - - # Sets the attribute offenses_to_check - # - # @param value the value to set the attribute offenses_to_check to. - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#35 - def offenses_to_check=(_arg0); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#42 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#323 - def add_department_marker(department); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#229 - def add_offense_for_entire_comment(comment, cops); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#244 - def add_offense_for_some_cops(comment, cops); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#219 - def add_offenses(redundant_cops); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#306 - def all_cop_names; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#190 - def all_disabled?(comment); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#69 - def comment_range_with_surrounding_space(directive_comment_range, line_comment_range); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#57 - def cop_disabled_line_ranges; end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#264 - def cop_range(comment, cop); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#210 - def department_disabled?(cop, comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#315 - def department_marker?(department); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#293 - def describe(cop); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#215 - def directive_count(comment); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#92 - def directive_range_in_list(range, ranges); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#61 - def disabled_ranges; end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#132 - def each_already_disabled(cop, line_ranges); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#113 - def each_line_range(cop, line_ranges); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#106 - def each_redundant_disable(&block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#310 - def ends_its_line?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#202 - def expected_final_disable?(cop, line_range); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#166 - def find_redundant_all(range, next_range); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#161 - def find_redundant_cop(cop, range); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#176 - def find_redundant_department(cop, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#182 - def followed_ranges?(range, next_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#194 - def ignore_offense?(line_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#258 - def leave_free_comment?(comment, range); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#271 - def matching_range(haystack, needle); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#302 - def message(cop_names); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#65 - def previous_line_blank?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#186 - def range_with_offense?(range, offenses = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#319 - def remove_department_marker(department); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#279 - def trailing_range?(ranges, range); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#32 -RuboCop::Cop::Lint::RedundantCopDisableDirective::COP_NAME = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#33 -RuboCop::Cop::Lint::RedundantCopDisableDirective::DEPARTMENT_MARKER = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#287 -RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.let(T.unsafe(nil), Hash) - -# removed. -# -# that cop checks whether any cop was actually enabled. -# -# @example -# # bad -# foo = 1 -# # rubocop:enable Layout/LineLength -# -# # good -# foo = 1 -# @example -# # bad -# # rubocop:disable Style/StringLiterals -# foo = "1" -# # rubocop:enable Style/StringLiterals -# baz -# # rubocop:enable all -# -# # good -# # rubocop:disable Style/StringLiterals -# foo = "1" -# # rubocop:enable all -# baz -# -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#37 -class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#44 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#120 - def all_or_name(name); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#76 - def comment_start(comment); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#80 - def cop_name_indention(comment, name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#124 - def department?(directive, name); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#71 - def range_of_offense(comment, name); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#95 - def range_to_remove(begin_pos, end_pos, comment); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#84 - def range_with_comma(comment, name); end - - # If the list of cops is comma-separated, but without a empty space after the comma, - # we should **not** remove the prepending empty space, thus begin_pos += 1 - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#114 - def range_with_comma_after(comment, start, begin_pos, end_pos); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#108 - def range_with_comma_before(start, begin_pos, end_pos); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#53 - def register_offense(comment, cop_names); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#42 -RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG = T.let(T.unsafe(nil), String) - -# Sort globbed results by default in Ruby 3.0. -# This cop checks for redundant `sort` method to `Dir.glob` and `Dir[]`. -# -# @example -# -# # bad -# Dir.glob('./lib/**/*.rb').sort.each do |file| -# end -# -# Dir['./lib/**/*.rb'].sort.each do |file| -# end -# -# # good -# Dir.glob('./lib/**/*.rb').each do |file| -# end -# -# Dir['./lib/**/*.rb'].each do |file| -# end -# -# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#30 -class RuboCop::Cop::Lint::RedundantDirGlobSort < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#40 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#56 - def multiple_argument?(glob_method); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#38 -RuboCop::Cop::Lint::RedundantDirGlobSort::GLOB_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#36 -RuboCop::Cop::Lint::RedundantDirGlobSort::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#37 -RuboCop::Cop::Lint::RedundantDirGlobSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for redundant quantifiers inside Regexp literals. -# -# It is always allowed when interpolation is used in a regexp literal, -# because it's unknown what kind of string will be expanded as a result: -# -# [source,ruby] -# ---- -# /(?:a*#{interpolation})?/x -# ---- -# -# @example -# # bad -# /(?:x+)+/ -# -# # good -# /(?:x)+/ -# -# # good -# /(?:x+)/ -# -# # bad -# /(?:x+)?/ -# -# # good -# /(?:x)*/ -# -# # good -# /(?:x*)/ -# -# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#34 -class RuboCop::Cop::Lint::RedundantRegexpQuantifiers < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#42 - def on_regexp(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#83 - def character_set?(expr); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#61 - def each_redundantly_quantified_pair(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#87 - def mergeable_quantifier(expr); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#103 - def merged_quantifier(exp1, exp2); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#119 - def message(group, child, replacement); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#115 - def quantifier_range(group, child); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#75 - def redundant_group?(expr); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#79 - def redundantly_quantifiable?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#38 -RuboCop::Cop::Lint::RedundantRegexpQuantifiers::MSG_REDUNDANT_QUANTIFIER = T.let(T.unsafe(nil), String) - -# Checks for unnecessary `require` statement. -# -# The following features are unnecessary `require` statement because -# they are already loaded. e.g. Ruby 2.2: -# -# ruby -ve 'p $LOADED_FEATURES.reject { |feature| %r|/| =~ feature }' -# ruby 2.2.8p477 (2017-09-14 revision 59906) [x86_64-darwin13] -# ["enumerator.so", "rational.so", "complex.so", "thread.rb"] -# -# Below are the features that each `TargetRubyVersion` targets. -# -# * 2.0+ ... `enumerator` -# * 2.1+ ... `thread` -# * 2.2+ ... Add `rational` and `complex` above -# * 2.5+ ... Add `pp` above -# * 2.7+ ... Add `ruby2_keywords` above -# * 3.1+ ... Add `fiber` above -# * 3.2+ ... `set` -# -# This cop target those features. -# -# @example -# # bad -# require 'unloaded_feature' -# require 'thread' -# -# # good -# require 'unloaded_feature' -# -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#38 -class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#61 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#57 - def pp_const?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#51 - def redundant_require_statement?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#91 - def need_to_require_pp?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#80 - def redundant_feature?(feature_name); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#42 -RuboCop::Cop::Lint::RedundantRequireStatement::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#45 -RuboCop::Cop::Lint::RedundantRequireStatement::PRETTY_PRINT_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#43 -RuboCop::Cop::Lint::RedundantRequireStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#44 -RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T.unsafe(nil), Array) - -# Checks for redundant safe navigation calls. -# Use cases where a constant, named in camel case for classes and modules is `nil` are rare, -# and an offense is not detected when the receiver is a constant. The detection also applies -# to literal receivers, except for `nil`. -# -# For all receivers, the `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, -# and `equal?` methods are checked by default. -# These are customizable with `AllowedMethods` option. -# -# The `AllowedMethods` option specifies nil-safe methods, -# in other words, it is a method that is allowed to skip safe navigation. -# Note that the `AllowedMethod` option is not an option that specifies methods -# for which to suppress (allow) this cop's check. -# -# In the example below, the safe navigation operator (`&.`) is unnecessary -# because `NilClass` has methods like `respond_to?` and `is_a?`. -# -# @example -# # bad -# CamelCaseConst&.do_something -# -# # bad -# do_something if attrs&.respond_to?(:[]) -# -# # good -# do_something if attrs.respond_to?(:[]) -# -# # bad -# while node&.is_a?(BeginNode) -# node = node.parent -# end -# -# # good -# CamelCaseConst.do_something -# -# # good -# while node.is_a?(BeginNode) -# node = node.parent -# end -# -# # good - without `&.` this will always return `true` -# foo&.respond_to?(:to_a) -# -# # bad - for `nil`s conversion methods return default values for the type -# foo&.to_h || {} -# foo&.to_h { |k, v| [k, v] } || {} -# foo&.to_a || [] -# foo&.to_i || 0 -# foo&.to_f || 0.0 -# foo&.to_s || '' -# -# # good -# foo.to_h -# foo.to_h { |k, v| [k, v] } -# foo.to_a -# foo.to_i -# foo.to_f -# foo.to_s -# @example AllowedMethods: [nil_safe_method] -# # bad -# do_something if attrs&.nil_safe_method(:[]) -# -# # good -# do_something if attrs.nil_safe_method(:[]) -# do_something if attrs&.not_nil_safe_method(:[]) -# -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#78 -class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#95 - def conversion_with_default?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#107 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#117 - def on_or(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#90 - def respond_to_nil_specific_method?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#133 - def assume_receiver_instance_exists?(receiver); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#139 - def check?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#149 - def condition?(parent, node); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#82 -RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#83 -RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_LITERAL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#85 -RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#87 -RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) - -# Checks for unneeded usages of splat expansion -# -# @example -# -# # bad -# a = *[1, 2, 3] -# a = *'a' -# a = *1 -# ['a', 'b', *%w(c d e), 'f', 'g'] -# -# # good -# c = [1, 2, 3] -# a = *c -# a, b = *c -# a, *b = *c -# a = *1..10 -# a = ['a'] -# ['a', 'b', 'c', 'd', 'e', 'f', 'g'] -# -# # bad -# do_something(*['foo', 'bar', 'baz']) -# -# # good -# do_something('foo', 'bar', 'baz') -# -# # bad -# begin -# foo -# rescue *[StandardError, ApplicationError] -# bar -# end -# -# # good -# begin -# foo -# rescue StandardError, ApplicationError -# bar -# end -# -# # bad -# case foo -# when *[1, 2, 3] -# bar -# else -# baz -# end -# -# # good -# case foo -# when 1, 2, 3 -# bar -# else -# baz -# end -# @example AllowPercentLiteralArrayArgument: true (default) -# -# # good -# do_something(*%w[foo bar baz]) -# @example AllowPercentLiteralArrayArgument: false -# -# # bad -# do_something(*%w[foo bar baz]) -# -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#71 -class RuboCop::Cop::Lint::RedundantSplatExpansion < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#83 - def array_new?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#91 - def literal_expansion(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#95 - def on_splat(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#203 - def allow_percent_literal_array_argument?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#131 - def array_new_inside_array_literal?(array_new_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#155 - def array_splat?(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#112 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#159 - def method_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#163 - def part_of_an_array?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#170 - def redundant_brackets?(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#118 - def redundant_splat_expansion(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#178 - def remove_brackets(array); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#138 - def replacement_range_and_content(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#196 - def use_percent_literal_array_argument?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#75 -RuboCop::Cop::Lint::RedundantSplatExpansion::ARRAY_PARAM_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#80 -RuboCop::Cop::Lint::RedundantSplatExpansion::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#74 -RuboCop::Cop::Lint::RedundantSplatExpansion::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#79 -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_I = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#77 -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_W = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#78 -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_I = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#76 -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_W = T.let(T.unsafe(nil), String) - -# Checks for string conversion in string interpolation, `print`, `puts`, and `warn` arguments, -# which is redundant. -# -# @example -# -# # bad -# -# "result is #{something.to_s}" -# print something.to_s -# puts something.to_s -# warn something.to_s -# @example -# -# # good -# -# "result is #{something}" -# print something -# puts something -# warn something -# -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#27 -class RuboCop::Cop::Lint::RedundantStringCoercion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#38 - def on_interpolation(begin_node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#46 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#36 - def to_s_without_args?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#58 - def register_offense(node, context); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#31 -RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#32 -RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#33 -RuboCop::Cop::Lint::RedundantStringCoercion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for redundant `with_index`. -# -# @example -# # bad -# ary.each_with_index do |v| -# v -# end -# -# # good -# ary.each do |v| -# v -# end -# -# # bad -# ary.each.with_index do |v| -# v -# end -# -# # good -# ary.each do |v| -# v -# end -# -# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#29 -class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#60 - def redundant_with_index?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#70 - def message(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#78 - def with_index_range(send); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#33 -RuboCop::Cop::Lint::RedundantWithIndex::MSG_EACH_WITH_INDEX = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#34 -RuboCop::Cop::Lint::RedundantWithIndex::MSG_WITH_INDEX = T.let(T.unsafe(nil), String) - -# Checks for redundant `with_object`. -# -# @example -# # bad -# ary.each_with_object([]) do |v| -# v -# end -# -# # good -# ary.each do |v| -# v -# end -# -# # bad -# ary.each.with_object([]) do |v| -# v -# end -# -# # good -# ary.each do |v| -# v -# end -# -# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#29 -class RuboCop::Cop::Lint::RedundantWithObject < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#36 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#36 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#56 - def redundant_with_object?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#65 - def message(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#73 - def with_object_range(send); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#33 -RuboCop::Cop::Lint::RedundantWithObject::MSG_EACH_WITH_OBJECT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#34 -RuboCop::Cop::Lint::RedundantWithObject::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String) - -# Checks if `include` or `prepend` is called in `refine` block. -# These methods are deprecated and should be replaced with `Refinement#import_methods`. -# -# It emulates deprecation warnings in Ruby 3.1. -# -# @example -# -# # bad -# refine Foo do -# include Bar -# end -# -# # bad -# refine Foo do -# prepend Bar -# end -# -# # good -# refine Foo do -# import_methods Bar -# end -# -# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#34 -class RuboCop::Cop::Lint::RefinementImportMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#42 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#37 -RuboCop::Cop::Lint::RefinementImportMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#38 -RuboCop::Cop::Lint::RefinementImportMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for regexp literals used as `match-current-line`. -# If a regexp literal is in condition, the regexp matches `$_` implicitly. -# -# @example -# # bad -# if /foo/ -# do_something -# end -# -# # good -# if /foo/ =~ $_ -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#19 -class RuboCop::Cop::Lint::RegexpAsCondition < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#26 - def on_match_current_line(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#23 -RuboCop::Cop::Lint::RegexpAsCondition::MSG = T.let(T.unsafe(nil), String) - -# Checks for expressions where there is a call to a predicate -# method with at least one argument, where no parentheses are used around -# the parameter list, and a boolean operator, && or ||, is used in the -# last argument. -# -# The idea behind warning for these constructs is that the user might -# be under the impression that the return value from the method call is -# an operand of &&/||. -# -# @example -# -# # bad -# -# if day.is? :tuesday && month == :jan -# # ... -# end -# @example -# -# # good -# -# if day.is?(:tuesday) && month == :jan -# # ... -# end -# -# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#30 -class RuboCop::Cop::Lint::RequireParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#35 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#35 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#58 - def check_predicate(predicate, node); end - - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#48 - def check_ternary(ternary, node); end -end - -# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#33 -RuboCop::Cop::Lint::RequireParentheses::MSG = T.let(T.unsafe(nil), String) - -# Checks that a range literal is enclosed in parentheses when the end of the range is -# at a line break. -# -# NOTE: The following is maybe intended for `(42..)`. But, compatible is `42..do_something`. -# So, this cop does not provide autocorrection because it is left to user. -# -# [source,ruby] -# ---- -# case condition -# when 42.. -# do_something -# end -# ---- -# -# @example -# -# # bad - Represents `(1..42)`, not endless range. -# 1.. -# 42 -# -# # good - It's incompatible, but your intentions when using endless range may be: -# (1..) -# 42 -# -# # good -# 1..42 -# -# # good -# (1..42) -# -# # good -# (1.. -# 42) -# -# source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#40 -class RuboCop::Cop::Lint::RequireRangeParentheses < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#43 - def on_erange(node); end - - # source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#43 - def on_irange(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#41 -RuboCop::Cop::Lint::RequireRangeParentheses::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses a file requiring itself with `require_relative`. -# -# @example -# -# # bad -# -# # foo.rb -# require_relative 'foo' -# require_relative 'bar' -# -# # good -# -# # foo.rb -# require_relative 'bar' -# -# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#21 -class RuboCop::Cop::Lint::RequireRelativeSelfPath < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#28 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#44 - def remove_ext(file_path); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#40 - def same_file?(file_path, required_feature); end -end - -# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#25 -RuboCop::Cop::Lint::RequireRelativeSelfPath::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#26 -RuboCop::Cop::Lint::RequireRelativeSelfPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for `rescue` blocks targeting the Exception class. -# -# @example -# -# # bad -# -# begin -# do_something -# rescue Exception -# handle_exception -# end -# @example -# -# # good -# -# begin -# do_something -# rescue ArgumentError -# handle_exception -# end -# -# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#27 -class RuboCop::Cop::Lint::RescueException < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#30 - def on_resbody(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#39 - def targets_exception?(rescue_arg_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#28 -RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String) - -# Check for arguments to `rescue` that will result in a `TypeError` -# if an exception is raised. -# -# @example -# # bad -# begin -# bar -# rescue nil -# baz -# end -# -# # bad -# def foo -# bar -# rescue 1, 'a', "#{b}", 0.0, [], {} -# baz -# end -# -# # good -# begin -# bar -# rescue -# baz -# end -# -# # good -# def foo -# bar -# rescue NameError -# baz -# end -# -# source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#37 -class RuboCop::Cop::Lint::RescueType < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#60 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#44 - def on_resbody(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#69 - def correction(*exceptions); end - - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#80 - def invalid_exceptions(exceptions); end - - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#76 - def valid_exceptions(exceptions); end -end - -# source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#42 -RuboCop::Cop::Lint::RescueType::INVALID_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#40 -RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) - -# Checks for the use of a return with a value in a context -# where the value will be ignored. (initialize and setter methods) -# -# @example -# -# # bad -# def initialize -# foo -# return :qux if bar? -# baz -# end -# -# def foo=(bar) -# return 42 -# end -# @example -# -# # good -# def initialize -# foo -# return if bar? -# baz -# end -# -# def foo=(bar) -# return -# end -# -# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#34 -class RuboCop::Cop::Lint::ReturnInVoidContext < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#37 - def on_return(return_node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#53 - def non_void_context(return_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#35 -RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) - -# The safe navigation operator returns nil if the receiver is -# nil. If you chain an ordinary method call after a safe -# navigation operator, it raises NoMethodError. We should use a -# safe navigation operator after a safe navigation operator. -# This cop checks for the problem outlined above. -# -# @example -# -# # bad -# -# x&.foo.bar -# x&.foo + bar -# x&.foo[bar] -# @example -# -# # good -# -# x&.foo&.bar -# x&.foo || bar -# -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#26 -class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::NilMethods - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#37 - def bad_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#44 - def on_send(node); end - - private - - # @param offense_range [Parser::Source::Range] - # @param send_node [RuboCop::AST::SendNode] - # @return [String] - # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#62 - def add_safe_navigation_operator(offense_range:, send_node:); end - - # @param corrector [RuboCop::Cop::Corrector] - # @param offense_range [Parser::Source::Range] - # @param send_node [RuboCop::AST::SendNode] - # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#81 - def autocorrect(corrector, offense_range:, send_node:); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#90 - def brackets?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#94 - def require_parentheses?(send_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33 -RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#34 -RuboCop::Cop::Lint::SafeNavigationChain::PLUS_MINUS_METHODS = T.let(T.unsafe(nil), Array) - -# Check to make sure that if safe navigation is used for a method -# call in an `&&` or `||` condition that safe navigation is used for all -# method calls on that same object. -# -# @example -# # bad -# foo&.bar && foo.baz -# -# # bad -# foo.bar || foo&.baz -# -# # bad -# foo&.bar && (foobar.baz || foo.baz) -# -# # good -# foo.bar && foo.baz -# -# # good -# foo&.bar || foo&.baz -# -# # good -# foo&.bar && (foobar.baz || foo&.baz) -# -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#29 -class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::NilMethods - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#42 - def check(node); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#36 - def on_csend(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#61 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#67 - def location(node, unsafe_method_call); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#71 - def top_conditional_ancestor(node); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#82 - def unsafe_method_calls(method_calls, safe_nav_receiver); end -end - -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#34 -RuboCop::Cop::Lint::SafeNavigationConsistency::MSG = T.let(T.unsafe(nil), String) - -# Checks to make sure safe navigation isn't used with `empty?` in -# a conditional. -# -# While the safe navigation operator is generally a good idea, when -# checking `foo&.empty?` in a conditional, `foo` being `nil` will actually -# do the opposite of what the author intends. -# -# @example -# # bad -# return if foo&.empty? -# return unless foo&.empty? -# -# # good -# return if foo && foo.empty? -# return unless foo && foo.empty? -# -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#22 -class RuboCop::Cop::Lint::SafeNavigationWithEmpty < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#32 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#28 - def safe_navigation_empty_in_conditional?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#25 -RuboCop::Cop::Lint::SafeNavigationWithEmpty::MSG = T.let(T.unsafe(nil), String) - -# Checks if a file which has a shebang line as -# its first line is granted execute permission. -# -# @example -# # bad -# -# # A file which has a shebang line as its first line is not -# # granted execute permission. -# -# #!/usr/bin/env ruby -# puts 'hello, world' -# -# # good -# -# # A file which has a shebang line as its first line is -# # granted execute permission. -# -# #!/usr/bin/env ruby -# puts 'hello, world' -# -# # good -# -# # A file which has not a shebang line as its first line is not -# # granted execute permission. -# -# puts 'hello, world' -# -# source://rubocop//lib/rubocop/cop/lint/script_permission.rb#33 -class RuboCop::Cop::Lint::ScriptPermission < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#39 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#55 - def autocorrect; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#59 - def executable?(processed_source); end - - # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#66 - def format_message_from(processed_source); end -end - -# source://rubocop//lib/rubocop/cop/lint/script_permission.rb#36 -RuboCop::Cop::Lint::ScriptPermission::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/script_permission.rb#37 -RuboCop::Cop::Lint::ScriptPermission::SHEBANG = T.let(T.unsafe(nil), String) - -# Checks for self-assignments. -# -# @example -# # bad -# foo = foo -# foo, bar = foo, bar -# Foo = Foo -# hash['foo'] = hash['foo'] -# obj.attr = obj.attr -# -# # good -# foo = bar -# foo, bar = bar, foo -# Foo = Bar -# hash['foo'] = hash['bar'] -# obj.attr = obj.attr2 -# -# # good (method calls possibly can return different results) -# hash[foo] = hash[foo] -# -# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#26 -class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#69 - def on_and_asgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#57 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#36 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#65 - def on_masgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#69 - def on_or_asgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#36 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#103 - def handle_attribute_assignment(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#92 - def handle_key_assignment(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#77 - def multiple_self_assignment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#87 - def rhs_matches_lhs?(rhs, lhs); end -end - -# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 -RuboCop::Cop::Lint::SelfAssignment::ASSIGNMENT_TYPE_TO_RHS_TYPE = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#27 -RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String) - -# Checks for `send`, `public_send`, and `__send__` methods -# when using mix-in. -# -# `include` and `prepend` methods were private methods until Ruby 2.0, -# they were mixed-in via `send` method. This cop uses Ruby 2.1 or -# higher style that can be called by public methods. -# And `extend` method that was originally a public method is also targeted -# for style unification. -# -# @example -# # bad -# Foo.send(:include, Bar) -# Foo.send(:prepend, Bar) -# Foo.send(:extend, Bar) -# -# # bad -# Foo.public_send(:include, Bar) -# Foo.public_send(:prepend, Bar) -# Foo.public_send(:extend, Bar) -# -# # bad -# Foo.__send__(:include, Bar) -# Foo.__send__(:prepend, Bar) -# Foo.__send__(:extend, Bar) -# -# # good -# Foo.include Bar -# Foo.prepend Bar -# Foo.extend Bar -# -# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#36 -class RuboCop::Cop::Lint::SendWithMixinArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#53 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#46 - def send_with_mixin_argument?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#67 - def bad_location(node); end - - # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#73 - def message(method, module_name, bad_method); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#77 - def mixin_method?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#41 -RuboCop::Cop::Lint::SendWithMixinArgument::MIXIN_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#40 -RuboCop::Cop::Lint::SendWithMixinArgument::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#43 -RuboCop::Cop::Lint::SendWithMixinArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#42 -RuboCop::Cop::Lint::SendWithMixinArgument::SEND_METHODS = T.let(T.unsafe(nil), Array) - -# Checks for shadowed arguments. -# -# This cop has `IgnoreImplicitReferences` configuration option. -# It means argument shadowing is used in order to pass parameters -# to zero arity `super` when `IgnoreImplicitReferences` is `true`. -# -# @example -# -# # bad -# do_something do |foo| -# foo = 42 -# puts foo -# end -# -# def do_something(foo) -# foo = 42 -# puts foo -# end -# -# # good -# do_something do |foo| -# foo = foo + 42 -# puts foo -# end -# -# def do_something(foo) -# foo = foo + 42 -# puts foo -# end -# -# def do_something(foo) -# puts foo -# end -# @example IgnoreImplicitReferences: false (default) -# -# # bad -# def do_something(foo) -# foo = 42 -# super -# end -# -# def do_something(foo) -# foo = super -# bar -# end -# @example IgnoreImplicitReferences: true -# -# # good -# def do_something(foo) -# foo = 42 -# super -# end -# -# def do_something(foo) -# foo = super -# bar -# end -# -# source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#66 -class RuboCop::Cop::Lint::ShadowedArgument < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#76 - def after_leaving_scope(scope, _variable_table); end - - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#70 - def uses_var?(param0, param1); end - - private - - # Get argument references without assignments' references - # - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#161 - def argument_references(argument); end - - # Find the first argument assignment, which doesn't reference the - # argument at the rhs. If the assignment occurs inside a branch or - # block, it is impossible to tell whether it's executed, so precise - # shadowing location is not known. - # - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#120 - def assignment_without_argument_usage(argument); end - - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#82 - def check_argument(argument); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#171 - def ignore_implicit_references?; end - - # Check whether the given node is nested into block or conditional. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#152 - def node_within_block_or_conditional?(node, stop_search_node); end - - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#144 - def reference_pos(node); end - - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#95 - def shadowing_assignment(argument); end - - class << self - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#72 - def joining_forces; end - end -end - -# source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#67 -RuboCop::Cop::Lint::ShadowedArgument::MSG = T.let(T.unsafe(nil), String) - -# Checks for a rescued exception that get shadowed by a -# less specific exception being rescued before a more specific -# exception is rescued. -# -# An exception is considered shadowed if it is rescued after its -# ancestor is, or if it and its ancestor are both rescued in the -# same `rescue` statement. In both cases, the more specific rescue is -# unnecessary because it is covered by rescuing the less specific -# exception. (ie. `rescue Exception, StandardError` has the same behavior -# whether `StandardError` is included or not, because all ``StandardError``s -# are rescued by `rescue Exception`). -# -# @example -# -# # bad -# -# begin -# something -# rescue Exception -# handle_exception -# rescue StandardError -# handle_standard_error -# end -# -# # bad -# begin -# something -# rescue Exception, StandardError -# handle_error -# end -# -# # good -# -# begin -# something -# rescue StandardError -# handle_standard_error -# rescue Exception -# handle_exception -# end -# -# # good, however depending on runtime environment. -# # -# # This is a special case for system call errors. -# # System dependent error code depends on runtime environment. -# # For example, whether `Errno::EAGAIN` and `Errno::EWOULDBLOCK` are -# # the same error code or different error code depends on environment. -# # This good case is for `Errno::EAGAIN` and `Errno::EWOULDBLOCK` with -# # the same error code. -# begin -# something -# rescue Errno::EAGAIN, Errno::EWOULDBLOCK -# handle_standard_error -# end -# -# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#61 -class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#67 - def on_rescue(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#101 - def compare_exceptions(exception, other_exception); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#94 - def contains_multiple_levels_of_exceptions?(group); end - - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#119 - def evaluate_exceptions(group); end - - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#152 - def find_shadowing_rescue(rescues); end - - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#84 - def offense_range(rescues); end - - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#90 - def rescued_groups_for(rescues); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#137 - def sorted?(rescued_groups); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#115 - def system_call_err?(error); end -end - -# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#65 -RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) - -# Checks for the use of local variable names from an outer scope -# in block arguments or block-local variables. This mirrors the warning -# given by `ruby -cw` prior to Ruby 2.6: -# "shadowing outer local variable - foo". -# -# NOTE: Shadowing of variables in block passed to `Ractor.new` is allowed -# because `Ractor` should not access outer variables. -# eg. following style is encouraged: -# -# [source,ruby] -# ---- -# worker_id, pipe = env -# Ractor.new(worker_id, pipe) do |worker_id, pipe| -# end -# ---- -# -# @example -# -# # bad -# -# def some_method -# foo = 1 -# -# 2.times do |foo| # shadowing outer `foo` -# do_something(foo) -# end -# end -# @example -# -# # good -# -# def some_method -# foo = 1 -# -# 2.times do |bar| -# do_something(bar) -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#45 -class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#57 - def before_declaring_variable(variable, variable_table); end - - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#93 - def find_conditional_node_from_ascendant(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#100 - def node_or_its_ascendant_conditional?(node); end - - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49 - def ractor_block?(param0 = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#69 - def same_conditions_node_different_branch?(variable, outer_local_variable); end - - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#83 - def variable_node(variable); end - - class << self - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#53 - def joining_forces; end - end -end - -# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#46 -RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), String) - -# Checks unexpected overrides of the `Struct` built-in methods -# via `Struct.new`. -# -# @example -# # bad -# Bad = Struct.new(:members, :clone, :count) -# b = Bad.new([], true, 1) -# b.members #=> [] (overriding `Struct#members`) -# b.clone #=> true (overriding `Object#clone`) -# b.count #=> 1 (overriding `Enumerable#count`) -# -# # good -# Good = Struct.new(:id, :name) -# g = Good.new(1, "foo") -# g.members #=> [:id, :name] -# g.clone #=> # -# g.count #=> 2 -# -# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#24 -class RuboCop::Cop::Lint::StructNewOverride < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#38 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#33 - def struct_new(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#25 -RuboCop::Cop::Lint::StructNewOverride::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#27 -RuboCop::Cop::Lint::StructNewOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#30 -RuboCop::Cop::Lint::StructNewOverride::STRUCT_MEMBER_NAME_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#29 -RuboCop::Cop::Lint::StructNewOverride::STRUCT_METHOD_NAMES = T.let(T.unsafe(nil), Array) - -# Checks for `rescue` blocks with no body. -# -# @example -# -# # bad -# def some_method -# do_something -# rescue -# end -# -# # bad -# begin -# do_something -# rescue -# end -# -# # good -# def some_method -# do_something -# rescue -# handle_exception -# end -# -# # good -# begin -# do_something -# rescue -# handle_exception -# end -# @example AllowComments: true (default) -# -# # good -# def some_method -# do_something -# rescue -# # do nothing -# end -# -# # good -# begin -# do_something -# rescue -# # do nothing -# end -# @example AllowComments: false -# -# # bad -# def some_method -# do_something -# rescue -# # do nothing -# end -# -# # bad -# begin -# do_something -# rescue -# # do nothing -# end -# @example AllowNil: true (default) -# -# # good -# def some_method -# do_something -# rescue -# nil -# end -# -# # good -# begin -# do_something -# rescue -# # do nothing -# end -# -# # good -# do_something rescue nil -# @example AllowNil: false -# -# # bad -# def some_method -# do_something -# rescue -# nil -# end -# -# # bad -# begin -# do_something -# rescue -# nil -# end -# -# # bad -# do_something rescue nil -# -# source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#105 -class RuboCop::Cop::Lint::SuppressedException < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#108 - def on_resbody(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#118 - def comment_between_rescue_and_end?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#126 - def nil_body?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#106 -RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of literal strings converted to -# a symbol where a literal symbol could be used instead. -# -# There are two possible styles for this cop. -# `strict` (default) will register an offense for any incorrect usage. -# `consistent` additionally requires hashes to use the same style for -# every symbol key (ie. if any symbol key needs to be quoted it requires -# all keys to be quoted). -# -# @example -# # bad -# 'string'.to_sym -# :symbol.to_sym -# 'underscored_string'.to_sym -# :'underscored_symbol' -# 'hyphenated-string'.to_sym -# "string_#{interpolation}".to_sym -# -# # good -# :string -# :symbol -# :underscored_string -# :underscored_symbol -# :'hyphenated-string' -# :"string_#{interpolation}" -# @example EnforcedStyle: strict (default) -# -# # bad -# { -# 'a': 1, -# "b": 2, -# 'c-d': 3 -# } -# -# # good (don't quote keys that don't require quoting) -# { -# a: 1, -# b: 2, -# 'c-d': 3 -# } -# @example EnforcedStyle: consistent -# -# # bad -# { -# a: 1, -# 'b-c': 2 -# } -# -# # good (quote all keys if any need quoting) -# { -# 'a': 1, -# 'b-c': 2 -# } -# -# # good (no quoting required) -# { -# a: 1, -# b: 2 -# } -# -# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#68 -class RuboCop::Cop::Lint::SymbolConversion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::SymbolHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#105 - def on_hash(node); end - - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#78 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#88 - def on_sym(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#147 - def correct_hash_key(node); end - - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#166 - def correct_inconsistent_hash_keys(keys); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#139 - def in_alias?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#143 - def in_percent_literal_array?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#126 - def properly_quoted?(source, value); end - - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#122 - def register_offense(node, correction:, message: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#135 - def requires_quotes?(sym_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#73 -RuboCop::Cop::Lint::SymbolConversion::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#74 -RuboCop::Cop::Lint::SymbolConversion::MSG_CONSISTENCY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#76 -RuboCop::Cop::Lint::SymbolConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Repacks Parser's diagnostics/errors -# into RuboCop's offenses. -# -# source://rubocop//lib/rubocop/cop/lint/syntax.rb#8 -class RuboCop::Cop::Lint::Syntax < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#9 - def on_other_file; end - - private - - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#19 - def add_offense_from_diagnostic(diagnostic, ruby_version); end - - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#29 - def add_offense_from_error(error); end - - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#34 - def beautify_message(message); end - - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#40 - def find_severity(_range, _severity); end -end - -# Ensures that `to_enum`/`enum_for`, called for the current method, -# has correct arguments. -# -# @example -# # bad -# def foo(x, y = 1) -# return to_enum(__callee__, x) # `y` is missing -# end -# -# # good -# def foo(x, y = 1) -# # Alternatives to `__callee__` are `__method__` and `:foo`. -# return to_enum(__callee__, x, y) -# end -# -# # good -# def foo(x, y = 1) -# # It is also allowed if it is wrapped in some method like Sorbet. -# return to_enum(T.must(__callee__), x, y) -# end -# -# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#27 -class RuboCop::Cop::Lint::ToEnumArguments < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#33 - def enum_conversion_call?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#38 - def method_name?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#47 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#43 - def passing_keyword_arg?(param0 = T.unsafe(nil), param1); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#83 - def argument_match?(send_arg, def_arg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#68 - def arguments_match?(arguments, def_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#28 -RuboCop::Cop::Lint::ToEnumArguments::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#30 -RuboCop::Cop::Lint::ToEnumArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks to make sure `#to_json` includes an optional argument. -# When overriding `#to_json`, callers may invoke JSON -# generation via `JSON.generate(your_obj)`. Since `JSON#generate` allows -# for an optional argument, your method should too. -# -# @example -# class Point -# attr_reader :x, :y -# -# # bad, incorrect arity -# def to_json -# JSON.generate([x, y]) -# end -# -# # good, preserving args -# def to_json(*args) -# JSON.generate([x, y], *args) -# end -# -# # good, discarding args -# def to_json(*_args) -# JSON.generate([x, y]) -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/to_json.rb#31 -class RuboCop::Cop::Lint::ToJSON < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/to_json.rb#36 - def on_def(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/to_json.rb#34 -RuboCop::Cop::Lint::ToJSON::MSG = T.let(T.unsafe(nil), String) - -# Checks for top level return with arguments. If there is a -# top-level return statement with an argument, then the argument is -# always ignored. This is detected automatically since Ruby 2.7. -# -# @example -# # bad -# return 1 -# -# # good -# return -# -# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#16 -class RuboCop::Cop::Lint::TopLevelReturnWithArgument < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#21 - def on_return(return_node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#35 - def remove_arguments(corrector, return_node); end - - # This cop works by validating the ancestors of the return node. A - # top-level return node's ancestors should not be of block, def, or - # defs type. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#42 - def top_level_return?(return_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#31 - def top_level_return_with_any_argument?(return_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#19 -RuboCop::Cop::Lint::TopLevelReturnWithArgument::MSG = T.let(T.unsafe(nil), String) - -# Checks for trailing commas in attribute declarations, such as -# `#attr_reader`. Leaving a trailing comma will nullify the next method -# definition by overriding it with a getter method. -# -# @example -# -# # bad -# class Foo -# attr_reader :foo, -# -# def bar -# puts "Unreachable." -# end -# end -# -# # good -# class Foo -# attr_reader :foo -# -# def bar -# puts "No problem!" -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#30 -class RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#36 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#46 - def trailing_comma_range(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#34 -RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration::MSG = T.let(T.unsafe(nil), String) - -# Checks for "triple quotes" (strings delimited by any odd number -# of quotes greater than 1). -# -# Ruby allows multiple strings to be implicitly concatenated by just -# being adjacent in a statement (ie. `"foo""bar" == "foobar"`). This sometimes -# gives the impression that there is something special about triple quotes, but -# in fact it is just extra unnecessary quotes and produces the same string. Each -# pair of quotes produces an additional concatenated empty string, so the result -# is still only the "actual" string within the delimiters. -# -# NOTE: Although this cop is called triple quotes, the same behavior is present -# for strings delimited by 5, 7, etc. quotation marks. -# -# @example -# # bad -# """ -# A string -# """ -# -# # bad -# ''' -# A string -# ''' -# -# # good -# " -# A string -# " -# -# # good -# < b } -# values.sort { |*x| x[0] <=> x[1] } -# -# source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#41 -class RuboCop::Cop::Lint::UnexpectedBlockArity < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#44 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#44 - def on_numblock(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#63 - def acceptable?(node); end - - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#75 - def arg_count(node); end - - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#71 - def expected_arity(method); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#67 - def included_method?(name); end - - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#59 - def methods; end -end - -# source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#42 -RuboCop::Cop::Lint::UnexpectedBlockArity::MSG = T.let(T.unsafe(nil), String) - -# Checks for using Fixnum or Bignum constant. -# -# @example -# -# # bad -# -# 1.is_a?(Fixnum) -# 1.is_a?(Bignum) -# @example -# -# # good -# -# 1.is_a?(Integer) -# -# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#20 -class RuboCop::Cop::Lint::UnifiedInteger < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#26 - def fixnum_or_bignum_const(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#30 - def on_const(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#23 -RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String) - -# Looks for `reduce` or `inject` blocks where the value returned (implicitly or -# explicitly) does not include the accumulator. A block is considered valid as -# long as at least one return value includes the accumulator. -# -# If the accumulator is not included in the return value, then the entire -# block will just return a transformation of the last element value, and -# could be rewritten as such without a loop. -# -# Also catches instances where an index of the accumulator is returned, as -# this may change the type of object being retained. -# -# NOTE: For the purpose of reducing false positives, this cop only flags -# returns in `reduce` blocks where the element is the only variable in -# the expression (since we will not be able to tell what other variables -# relate to via static analysis). -# -# @example -# -# # bad -# (1..4).reduce(0) do |acc, el| -# el * 2 -# end -# -# # bad, may raise a NoMethodError after the first iteration -# %w(a b c).reduce({}) do |acc, letter| -# acc[letter] = true -# end -# -# # good -# (1..4).reduce(0) do |acc, el| -# acc + el * 2 -# end -# -# # good, element is returned but modified using the accumulator -# values.reduce do |acc, el| -# el << acc -# el -# end -# -# # good, returns the accumulator instead of the index -# %w(a b c).reduce({}) do |acc, letter| -# acc[letter] = true -# acc -# end -# -# # good, at least one branch returns the accumulator -# values.reduce(nil) do |result, value| -# break result if something? -# value -# end -# -# # good, recursive -# keys.reduce(self) { |result, key| result[key] } -# -# # ignored as the return value cannot be determined -# enum.reduce do |acc, el| -# x = foo(acc, el) -# bar(x) -# end -# -# source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#65 -class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#78 - def accumulator_index?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#83 - def element_modified?(param0, param1); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#104 - def expression_values(param0); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#93 - def lvar_used?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#115 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#115 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#70 - def reduce_with_block?(param0 = T.unsafe(nil)); end - - private - - # Determine if a return value is acceptable for the purposes of this cop - # If it is an expression containing the accumulator, it is acceptable - # Otherwise, it is only unacceptable if it contains the iterated element, since we - # otherwise do not have enough information to prevent false positives. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#190 - def acceptable_return?(return_val, element_name); end - - # Exclude `begin` nodes inside a `dstr` from being collected by `return_values` - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#198 - def allowed_type?(parent_node); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#158 - def block_arg_name(node, index); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#141 - def check_return_values(block_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#175 - def potential_offense?(return_values, block_body, element_name, accumulator_name); end - - # Return values in a block are either the value given to next, - # the last line of a multiline block, or the only line of the block - # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#127 - def return_values(block_body_node); end - - # Look for an index of the accumulator being returned, except where the index - # is the element. - # This is always an offense, in order to try to catch potential exceptions - # due to type mismatches - # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#166 - def returned_accumulator_index(return_values, accumulator_name, element_name); end - - # If the accumulator is used in any return value, the node is acceptable since - # the accumulator has a chance to change each iteration - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#182 - def returns_accumulator_anywhere?(return_values, accumulator_name); end -end - -# source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#66 -RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#67 -RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil), String) - -# Checks for unreachable code. -# The check are based on the presence of flow of control -# statement in non-final position in `begin` (implicit) blocks. -# -# @example -# -# # bad -# -# def some_method -# return -# do_something -# end -# -# # bad -# -# def some_method -# if cond -# return -# else -# return -# end -# do_something -# end -# @example -# -# # good -# -# def some_method -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#37 -class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#55 - def flow_command?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#40 - def on_begin(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#40 - def on_kwbegin(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#87 - def check_case(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#81 - def check_if(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#65 - def flow_expression?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#38 -RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String) - -# Checks for loops that will have at most one iteration. -# -# A loop that can never reach the second iteration is a possible error in the code. -# In rare cases where only one iteration (or at most one iteration) is intended behavior, -# the code should be refactored to use `if` conditionals. -# -# NOTE: Block methods that are used with ``Enumerable``s are considered to be loops. -# -# `AllowedPatterns` can be used to match against the block receiver in order to allow -# code that would otherwise be registered as an offense (eg. `times` used not in an -# `Enumerable` context). -# -# @example -# # bad -# while node -# do_something(node) -# node = node.parent -# break -# end -# -# # good -# while node -# do_something(node) -# node = node.parent -# end -# -# # bad -# def verify_list(head) -# item = head -# begin -# if verify(item) -# return true -# else -# return false -# end -# end while(item) -# end -# -# # good -# def verify_list(head) -# item = head -# begin -# if verify(item) -# item = item.next -# else -# return false -# end -# end while(item) -# -# true -# end -# -# # bad -# def find_something(items) -# items.each do |item| -# if something?(item) -# return item -# else -# raise NotFoundError -# end -# end -# end -# -# # good -# def find_something(items) -# items.each do |item| -# if something?(item) -# return item -# end -# end -# raise NotFoundError -# end -# -# # bad -# 2.times { raise ArgumentError } -# @example AllowedPatterns: ['(exactly|at_least|at_most)\(\d+\)\.times'] (default) -# -# # good -# exactly(2).times { raise StandardError } -# -# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#86 -class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedPattern - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#143 - def break_command?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#100 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 - def on_for(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#104 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 - def on_until_post(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 - def on_while(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 - def on_while_post(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#153 - def break_statement?(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#119 - def check(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#176 - def check_case(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#170 - def check_if(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#200 - def conditional_continue_keyword?(break_statement); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#110 - def loop_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#190 - def preceded_by_continue_statement?(break_statement); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#130 - def statements(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#90 -RuboCop::Cop::Lint::UnreachableLoop::CONTINUE_KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#89 -RuboCop::Cop::Lint::UnreachableLoop::MSG = T.let(T.unsafe(nil), String) - -# Common functionality for cops handling unused arguments. -# -# source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#7 -module RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#10 - def after_leaving_scope(scope, _variable_table); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#16 - def check_argument(variable); end -end - -# Checks for unused block arguments. -# -# @example -# # bad -# do_something do |used, unused| -# puts used -# end -# -# do_something do |bar| -# puts :foo -# end -# -# define_method(:foo) do |bar| -# puts :baz -# end -# -# # good -# do_something do |used, _unused| -# puts used -# end -# -# do_something do -# puts :foo -# end -# -# define_method(:foo) do |_bar| -# puts :baz -# end -# @example IgnoreEmptyBlocks: true (default) -# # good -# do_something { |unused| } -# @example IgnoreEmptyBlocks: false -# # bad -# do_something { |unused| } -# @example AllowUnusedKeywordArguments: false (default) -# # bad -# do_something do |unused: 42| -# foo -# end -# @example AllowUnusedKeywordArguments: true -# # good -# do_something do |unused: 42| -# foo -# end -# -# source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#55 -class RuboCop::Cop::Lint::UnusedBlockArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::Cop::AutoCorrector - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#162 - def allow_unused_keyword_arguments?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#81 - def allowed_block?(variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#85 - def allowed_keyword_argument?(variable); end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#99 - def augment_message(message, variable); end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#65 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#69 - def check_argument(variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#149 - def define_method_call?(variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#156 - def empty_block?(variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#166 - def ignore_empty_blocks?; end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#89 - def message(variable); end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#132 - def message_for_lambda(variable, all_arguments); end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#120 - def message_for_normal_block(variable, all_arguments); end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#144 - def message_for_underscore_prefix(variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#77 - def used_block_local?(variable); end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#112 - def variable_type(variable); end - - class << self - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#59 - def joining_forces; end - end -end - -# Checks for unused method arguments. -# -# @example -# # bad -# def some_method(used, unused, _unused_but_allowed) -# puts used -# end -# -# # good -# def some_method(used, _unused, _unused_but_allowed) -# puts used -# end -# @example AllowUnusedKeywordArguments: false (default) -# # bad -# def do_something(used, unused: 42) -# used -# end -# @example AllowUnusedKeywordArguments: true -# # good -# def do_something(used, unused: 42) -# used -# end -# @example IgnoreEmptyMethods: true (default) -# # good -# def do_something(unused) -# end -# @example IgnoreEmptyMethods: false -# # bad -# def do_something(unused) -# end -# @example IgnoreNotImplementedMethods: true (default) -# # good -# def do_something(unused) -# raise NotImplementedError -# end -# -# def do_something_else(unused) -# fail "TODO" -# end -# @example IgnoreNotImplementedMethods: false -# # bad -# def do_something(unused) -# raise NotImplementedError -# end -# -# def do_something_else(unused) -# fail "TODO" -# end -# -# source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#61 -class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#66 - def not_implemented?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#81 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#85 - def check_argument(variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#93 - def ignored_method?(body); end - - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#98 - def message(variable); end - - class << self - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#71 - def autocorrect_incompatible_with; end - - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#75 - def joining_forces; end - end -end - -# Identifies places where `URI.escape` can be replaced by -# `CGI.escape`, `URI.encode_www_form`, or `URI.encode_www_form_component` -# depending on your specific use case. -# Also this cop identifies places where `URI.unescape` can be replaced by -# `CGI.unescape`, `URI.decode_www_form`, -# or `URI.decode_www_form_component` depending on your specific use case. -# -# @example -# # bad -# URI.escape('http://example.com') -# URI.encode('http://example.com') -# -# # good -# CGI.escape('http://example.com') -# URI.encode_www_form([['example', 'param'], ['lang', 'en']]) -# URI.encode_www_form(page: 10, locale: 'en') -# URI.encode_www_form_component('http://example.com') -# -# # bad -# URI.unescape(enc_uri) -# URI.decode(enc_uri) -# -# # good -# CGI.unescape(enc_uri) -# URI.decode_www_form(enc_uri) -# URI.decode_www_form_component(enc_uri) -# -# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#32 -class RuboCop::Cop::Lint::UriEscapeUnescape < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#57 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#51 - def uri_escape_unescape?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#33 -RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_ESCAPE = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#38 -RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_UNESCAPE = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#47 -RuboCop::Cop::Lint::UriEscapeUnescape::METHOD_NAMES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#44 -RuboCop::Cop::Lint::UriEscapeUnescape::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#48 -RuboCop::Cop::Lint::UriEscapeUnescape::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where `URI.regexp` is obsolete and should -# not be used. Instead, use `URI::DEFAULT_PARSER.make_regexp`. -# -# @example -# # bad -# URI.regexp('http://example.com') -# -# # good -# URI::DEFAULT_PARSER.make_regexp('http://example.com') -# -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#16 -class RuboCop::Cop::Lint::UriRegexp < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#23 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#19 -RuboCop::Cop::Lint::UriRegexp::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#21 -RuboCop::Cop::Lint::UriRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#20 -RuboCop::Cop::Lint::UriRegexp::URI_CONSTANTS = T.let(T.unsafe(nil), Array) - -# Checks for redundant access modifiers, including those with no -# code, those which are repeated, and leading `public` modifiers in a -# class or module body. Conditionally-defined methods are considered as -# always being defined, and thus access modifiers guarding such methods -# are not redundant. -# -# This cop has `ContextCreatingMethods` option. The default setting value -# is an empty array that means no method is specified. -# This setting is an array of methods which, when called, are known to -# create its own context in the module's current access context. -# -# It also has `MethodCreatingMethods` option. The default setting value -# is an empty array that means no method is specified. -# This setting is an array of methods which, when called, are known to -# create other methods in the module's current access context. -# -# @example -# # bad -# class Foo -# public # this is redundant (default access is public) -# -# def method -# end -# end -# -# # bad -# class Foo -# # The following is redundant (methods defined on the class' -# # singleton class are not affected by the private modifier) -# private -# -# def self.method3 -# end -# end -# -# # bad -# class Foo -# protected -# -# define_method(:method2) do -# end -# -# protected # this is redundant (repeated from previous modifier) -# -# [1,2,3].each do |i| -# define_method("foo#{i}") do -# end -# end -# end -# -# # bad -# class Foo -# private # this is redundant (no following methods are defined) -# end -# -# # good -# class Foo -# private # this is not redundant (a method is defined) -# -# def method2 -# end -# end -# -# # good -# class Foo -# # The following is not redundant (conditionally defined methods are -# # considered as always defining a method) -# private -# -# if condition? -# def method -# end -# end -# end -# -# # good -# class Foo -# protected # this is not redundant (a method is defined) -# -# define_method(:method2) do -# end -# end -# @example ContextCreatingMethods: concerning -# # Lint/UselessAccessModifier: -# # ContextCreatingMethods: -# # - concerning -# -# # good -# require 'active_support/concern' -# class Foo -# concerning :Bar do -# def some_public_method -# end -# -# private -# -# def some_private_method -# end -# end -# -# # this is not redundant because `concerning` created its own context -# private -# -# def some_other_private_method -# end -# end -# @example MethodCreatingMethods: delegate -# # Lint/UselessAccessModifier: -# # MethodCreatingMethods: -# # - delegate -# -# # good -# require 'active_support/core_ext/module/delegation' -# class Foo -# # this is not redundant because `delegate` creates methods -# private -# -# delegate :method_a, to: :method_b -# end -# -# source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#127 -class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#166 - def class_or_instance_eval?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#161 - def dynamic_method_definition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#139 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#139 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 - def on_sclass(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#156 - def static_method_definition?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#182 - def access_modifier?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#280 - def any_context_creating_methods?(child); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#257 - def any_method_definition?(child); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#149 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#196 - def check_child_nodes(node, unused, cur_vis); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#226 - def check_new_visibility(node, unused, new_vis, cur_vis); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#170 - def check_node(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#186 - def check_scope(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#215 - def check_send_node(node, cur_vis, unused); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#274 - def eval_call?(child); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#247 - def included_block?(block_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#251 - def method_definition?(child); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#270 - def start_of_new_scope?(child); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#131 -RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) - -# Checks for every useless assignment to local variable in every -# scope. -# The basic idea for this cop was from the warning of `ruby -cw`: -# -# [source,console] -# ---- -# assigned but unused variable - foo -# ---- -# -# Currently this cop has advanced logic that detects unreferenced -# reassignments and properly handles varied cases such as branch, loop, -# rescue, ensure, etc. -# -# NOTE: Given the assignment `foo = 1, bar = 2`, removing unused variables -# can lead to a syntax error, so this case is not autocorrected. -# -# @example -# -# # bad -# -# def some_method -# some_var = 1 -# do_something -# end -# @example -# -# # good -# -# def some_method -# some_var = 1 -# do_something(some_var) -# end -# -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 -class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56 - def after_leaving_scope(scope, _variable_table); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162 - def autocorrect(corrector, assignment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103 - def chained_assignment?(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#61 - def check_for_unused_assignments(variable); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#146 - def collect_variable_like_names(scope); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#79 - def message_for_useless_assignment(assignment); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#107 - def message_specification(assignment, variable); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#117 - def multiple_assignment_message(variable_name); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#85 - def offense_range(assignment); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#122 - def operator_assignment_message(scope, assignment); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#179 - def remove_exception_assignment_part(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#203 - def remove_local_variable_assignment_part(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#192 - def remove_trailing_character_from_operator(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#188 - def rename_variable_with_underscore(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#196 - def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end - - # TODO: More precise handling (rescue, ensure, nested begin, etc.) - # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136 - def return_value_node_of_scope(scope); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#93 - def sequential_assignment?(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129 - def similar_name_message(variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#155 - def variable_like_method_invocation?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#52 - def joining_forces; end - end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50 -RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) - -# Checks for useless `else` in `begin..end` without `rescue`. -# -# NOTE: This syntax is no longer valid on Ruby 2.6 or higher. -# -# @example -# -# # bad -# -# begin -# do_something -# else -# do_something_else # This will never be run. -# end -# @example -# -# # good -# -# begin -# do_something -# rescue -# handle_errors -# else -# do_something_else -# end -# -# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#31 -class RuboCop::Cop::Lint::UselessElseWithoutRescue < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#34 - def on_new_investigation; end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#32 -RuboCop::Cop::Lint::UselessElseWithoutRescue::MSG = T.let(T.unsafe(nil), String) - -# Checks for useless method definitions, specifically: empty constructors -# and methods just delegating to `super`. -# -# @example -# # bad -# def initialize -# super -# end -# -# def method -# super -# end -# -# # good - with default arguments -# def initialize(x = Object.new) -# super -# end -# -# # good -# def initialize -# super -# initialize_internals -# end -# -# def method(*args) -# super(:extra_arg, *args) -# end -# -# source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#38 -class RuboCop::Cop::Lint::UselessMethodDefinition < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#43 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#43 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#65 - def delegating?(node, def_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#57 - def method_definition_with_modifier?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#61 - def use_rest_or_optional_args?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#41 -RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -# Checks for useless `rescue`s, which only reraise rescued exceptions. -# -# @example -# # bad -# def foo -# do_something -# rescue -# raise -# end -# -# # bad -# def foo -# do_something -# rescue => e -# raise # or 'raise e', or 'raise $!', or 'raise $ERROR_INFO' -# end -# -# # good -# def foo -# do_something -# rescue -# do_cleanup -# raise -# end -# -# # bad (latest rescue) -# def foo -# do_something -# rescue ArgumentError -# # noop -# rescue -# raise -# end -# -# # good (not the latest rescue) -# def foo -# do_something -# rescue ArgumentError -# raise -# rescue -# # noop -# end -# -# source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#49 -class RuboCop::Cop::Lint::UselessRescue < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#52 - def on_rescue(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#83 - def exception_objects(resbody_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#60 - def only_reraising?(resbody_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#75 - def use_exception_variable_in_ensure?(resbody_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#50 -RuboCop::Cop::Lint::UselessRescue::MSG = T.let(T.unsafe(nil), String) - -# Looks for `ruby2_keywords` calls for methods that do not need it. -# -# `ruby2_keywords` should only be called on methods that accept an argument splat -# (`\*args`) but do not explicit keyword arguments (`k:` or `k: true`) or -# a keyword splat (`**kwargs`). -# -# @example -# # good (splat argument without keyword arguments) -# ruby2_keywords def foo(*args); end -# -# # bad (no arguments) -# ruby2_keywords def foo; end -# -# # good -# def foo; end -# -# # bad (positional argument) -# ruby2_keywords def foo(arg); end -# -# # good -# def foo(arg); end -# -# # bad (double splatted argument) -# ruby2_keywords def foo(**args); end -# -# # good -# def foo(**args); end -# -# # bad (keyword arguments) -# ruby2_keywords def foo(i:, j:); end -# -# # good -# def foo(i:, j:); end -# -# # bad (splat argument with keyword arguments) -# ruby2_keywords def foo(*args, i:, j:); end -# -# # good -# def foo(*args, i:, j:); end -# -# # bad (splat argument with double splat) -# ruby2_keywords def foo(*args, **kwargs); end -# -# # good -# def foo(*args, **kwargs); end -# -# # bad (ruby2_keywords given a symbol) -# def foo; end -# ruby2_keywords :foo -# -# # good -# def foo; end -# -# # bad (ruby2_keywords with dynamic method) -# define_method(:foo) { |arg| } -# ruby2_keywords :foo -# -# # good -# define_method(:foo) { |arg| } -# -# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#66 -class RuboCop::Cop::Lint::UselessRuby2Keywords < ::RuboCop::Cop::Base - # Looks for statically or dynamically defined methods with a given name - # - # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#72 - def method_definition(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#79 - def on_send(node); end - - private - - # `ruby2_keywords` is only allowed if there's a `restarg` and no keyword arguments - # - # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#118 - def allowed_arguments(arguments); end - - # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#109 - def find_method_definition(node, method_name); end - - # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#91 - def inspect_def(node, def_node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#97 - def inspect_sym(node, sym_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#67 -RuboCop::Cop::Lint::UselessRuby2Keywords::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#68 -RuboCop::Cop::Lint::UselessRuby2Keywords::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for setter call to local variable as the final -# expression of a function definition. -# -# @example -# -# # bad -# -# def something -# x = Something.new -# x.attr = 5 -# end -# @example -# -# # good -# -# def something -# x = Something.new -# x.attr = 5 -# x -# end -# -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#35 -class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#41 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#41 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#63 - def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#67 - def last_expression(body); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#39 -RuboCop::Cop::Lint::UselessSetterCall::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#38 -RuboCop::Cop::Lint::UselessSetterCall::MSG = T.let(T.unsafe(nil), String) - -# This class tracks variable assignments in a method body -# and if a variable contains object passed as argument at the end of -# the method. -# -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#76 -class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker - # @return [MethodVariableTracker] a new instance of MethodVariableTracker - # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#77 - def initialize(body_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#163 - def constructor?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#82 - def contain_local_object?(variable_name); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#152 - def process_assignment(asgn_node, rhs_node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#100 - def process_assignment_node(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#142 - def process_binary_operator_assignment(op_asgn_node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#133 - def process_logical_operator_assignment(asgn_node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#114 - def process_multiple_assignment(masgn_node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#92 - def scan(node, &block); end -end - -# Checks for uses of `Integer#times` that will never yield -# (when the integer ``<= 0``) or that will only ever yield once -# (`1.times`). -# -# @example -# # bad -# -5.times { do_something } -# 0.times { do_something } -# 1.times { do_something } -# 1.times { |i| do_something(i) } -# -# # good -# do_something -# do_something(1) -# -# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#24 -class RuboCop::Cop::Lint::UselessTimes < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#37 - def block_arg(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#42 - def block_reassigns_arg?(param0, param1); end - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#46 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#32 - def times_call?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#62 - def autocorrect(corrector, count, node, proc_name); end - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#84 - def autocorrect_block(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#80 - def autocorrect_block_pass(corrector, node, proc_name); end - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#94 - def fix_indentation(source, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#72 - def never_process?(count, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#106 - def own_line?(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#76 - def remove_node(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#28 -RuboCop::Cop::Lint::UselessTimes::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#29 -RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for operators, variables, literals, lambda, proc and nonmutating -# methods used in void context. -# -# `each` blocks are allowed to prevent false positives. -# For example, the expression inside the `each` block below. -# It's not void, especially when the receiver is an `Enumerator`: -# -# [source,ruby] -# ---- -# enumerator = [1, 2, 3].filter -# enumerator.each { |item| item >= 2 } #=> [2, 3] -# ---- -# -# @example CheckForMethodsWithNoSideEffects: false (default) -# # bad -# def some_method -# some_num * 10 -# do_something -# end -# -# def some_method(some_var) -# some_var -# do_something -# end -# @example CheckForMethodsWithNoSideEffects: true -# # bad -# def some_method(some_array) -# some_array.sort -# do_something(some_array) -# end -# -# # good -# def some_method -# do_something -# some_num * 10 -# end -# -# def some_method(some_var) -# do_something -# some_var -# end -# -# def some_method(some_array) -# some_array.sort! -# do_something(some_array) -# end -# -# source://rubocop//lib/rubocop/cop/lint/void.rb#53 -class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/void.rb#92 - def on_begin(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#82 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#92 - def on_kwbegin(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#82 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/void.rb#217 - def autocorrect_nonmutating_send(corrector, node, suggestion); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#213 - def autocorrect_void_expression(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#201 - def autocorrect_void_op(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#99 - def check_begin(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#113 - def check_expression(expr); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#151 - def check_literal(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#175 - def check_nonmutating(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#159 - def check_self(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#133 - def check_var(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#167 - def check_void_expression(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#123 - def check_void_op(node, &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/void.rb#226 - def entirely_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/void.rb#193 - def in_void_context?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/void.rb#66 -RuboCop::Cop::Lint::Void::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#60 -RuboCop::Cop::Lint::Void::CONST_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#63 -RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#61 -RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#77 -RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#79 -RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#70 -RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#64 -RuboCop::Cop::Lint::Void::NONMUTATING_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#68 -RuboCop::Cop::Lint::Void::OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#58 -RuboCop::Cop::Lint::Void::OP_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#62 -RuboCop::Cop::Lint::Void::SELF_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#67 -RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#59 -RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#69 -RuboCop::Cop::Lint::Void::VOID_CONTEXT_TYPES = T.let(T.unsafe(nil), Array) - -# Common functionality for obtaining source ranges from regexp matches -# -# source://rubocop//lib/rubocop/cop/mixin/match_range.rb#6 -module RuboCop::Cop::MatchRange - include ::RuboCop::Cop::RangeHelp - - private - - # Return a new `Range` covering the first matching group number for each - # match of `regex` inside `range` - # - # source://rubocop//lib/rubocop/cop/mixin/match_range.rb#13 - def each_match_range(range, regex); end - - # For a `match` inside `range`, return a new `Range` covering the match - # - # source://rubocop//lib/rubocop/cop/mixin/match_range.rb#18 - def match_range(range, match); end -end - -# Message Annotator class annotates a basic offense message -# based on params passed into initializer. -# -# #=> 'Cop/CopName: message (http://example.org/styleguide)' -# -# @example -# RuboCop::Cop::MessageAnnotator.new( -# config, cop_name, cop_config, @options -# ).annotate('message') -# @see #initialize -# -# source://rubocop//lib/rubocop/cop/message_annotator.rb#15 -class RuboCop::Cop::MessageAnnotator - # @option cop_config - # @option cop_config - # @option cop_config - # @option options - # @option options - # @option options - # @option options - # @param config [RuboCop::Config] Check configs for all cops - # @note Message Annotator specifically checks the - # following config options for_all_cops - # :StyleGuideBaseURL [String] URL for styleguide - # :DisplayStyleGuide [Boolean] Include styleguide and reference URLs - # :ExtraDetails [Boolean] Include cop details - # :DisplayCopNames [Boolean] Include cop name - # @param cop_name [String] for specific cop name - # @param cop_config [Hash] configs for specific cop, from config#for_cop - # @param options [Hash, nil] optional - # @return [MessageAnnotator] a new instance of MessageAnnotator - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#47 - def initialize(config, cop_name, cop_config, options); end - - # Returns the annotated message, - # based on params passed into initializer - # - # @return [String] annotated message - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#58 - def annotate(message); end - - # Returns the value of attribute config. - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 - def config; end - - # Returns the value of attribute cop_config. - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 - def cop_config; end - - # Returns the value of attribute cop_name. - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 - def cop_name; end - - # Returns the value of attribute options. - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 - def options; end - - # source://rubocop//lib/rubocop/cop/message_annotator.rb#68 - def urls; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#111 - def debug?; end - - # source://rubocop//lib/rubocop/cop/message_annotator.rb#124 - def details; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#115 - def display_cop_names?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#98 - def display_style_guide?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#107 - def extra_details?; end - - # source://rubocop//lib/rubocop/cop/message_annotator.rb#102 - def reference_urls; end - - # Returns the base style guide URL from AllCops or the specific department - # - # @return [String] style guide URL - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#91 - def style_guide_base_url; end - - # source://rubocop//lib/rubocop/cop/message_annotator.rb#74 - def style_guide_url; end - - class << self - # Returns the value of attribute style_guide_urls. - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#21 - def style_guide_urls; end - end -end - -# This module handles measurement and reporting of complexity in methods. -# -# @api private -# -# source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#8 -module RuboCop::Cop::MethodComplexity - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::ExcludeLimit - - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#37 - def define_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def max=(value); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#24 - def on_block(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#17 - def on_def(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#17 - def on_defs(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#24 - def on_numblock(node); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#42 - def check_complexity(node, method_name); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#61 - def complexity(body); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#73 - def location(node); end -end - -# Common code for cops that deal with preferred methods. -# -# source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#6 -module RuboCop::Cop::MethodPreference - private - - # source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#25 - def default_cop_config; end - - # source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#9 - def preferred_method(method); end - - # source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#13 - def preferred_methods; end -end - -# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#5 -module RuboCop::Cop::Metrics; end - -# Checks that the ABC size of methods is not higher than the -# configured maximum. The ABC size is based on assignments, branches -# (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric -# and https://en.wikipedia.org/wiki/ABC_Software_Metric. -# -# Interpreting ABC size: -# -# * ``<= 17`` satisfactory -# * `18..30` unsatisfactory -# * `>` 30 dangerous -# -# You can have repeated "attributes" calls count as a single "branch". -# For this purpose, attributes are any method with no argument; no attempt -# is meant to distinguish actual `attr_reader` from other methods. -# -# This cop also takes into account `AllowedMethods` (defaults to `[]`) -# And `AllowedPatterns` (defaults to `[]`) -# -# @example CountRepeatedAttributes: false (default is true) -# -# # `model` and `current_user`, referenced 3 times each, -# # are each counted as only 1 branch each if -# # `CountRepeatedAttributes` is set to 'false' -# -# def search -# @posts = model.active.visible_by(current_user) -# .search(params[:q]) -# @posts = model.some_process(@posts, current_user) -# @posts = model.another_process(@posts, current_user) -# -# render 'pages/search/page' -# end -# -# source://rubocop//lib/rubocop/cop/metrics/abc_size.rb#39 -class RuboCop::Cop::Metrics::AbcSize < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - include ::RuboCop::Cop::MethodComplexity - - private - - # source://rubocop//lib/rubocop/cop/metrics/abc_size.rb#47 - def complexity(node); end -end - -# source://rubocop//lib/rubocop/cop/metrics/abc_size.rb#42 -RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) - -# Checks if the length of a block exceeds some maximum value. -# Comment lines can optionally be ignored. -# The maximum allowed length is configurable. -# The cop can be configured to ignore blocks passed to certain methods. -# -# You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. -# -# NOTE: This cop does not apply for `Struct` definitions. -# -# NOTE: The `ExcludedMethods` configuration is deprecated and only kept -# for backwards compatibility. Please use `AllowedMethods` and `AllowedPatterns` -# instead. By default, there are no methods to allowed. -# -# @example CountAsOne: ['array', 'heredoc', 'method_call'] -# -# something do -# array = [ # +1 -# 1, -# 2 -# ] -# -# hash = { # +3 -# key: 'value' -# } -# -# msg = <<~HEREDOC # +1 -# Heredoc -# content. -# HEREDOC -# -# foo( # +1 -# 1, -# 2 -# ) -# end # 6 points -# -# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#44 -class RuboCop::Cop::Metrics::BlockLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#51 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#51 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#80 - def cop_label; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#62 - def method_receiver_excluded?(node); end -end - -# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#49 -RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) - -# Checks for excessive nesting of conditional and looping -# constructs. -# -# You can configure if blocks are considered using the `CountBlocks` -# option. When set to `false` (the default) blocks are not counted -# towards the nesting level. Set to `true` to count blocks as well. -# -# The maximum level of nesting allowed is configurable. -# -# source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#14 -class RuboCop::Cop::Metrics::BlockNesting < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def max=(value); end - - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#19 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#28 - def check_nesting_level(node, max, current_level); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#44 - def consider_node?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#54 - def count_blocks?; end - - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#50 - def message(max); end -end - -# source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#15 -RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array) - -# Checks if the length of a class exceeds some maximum value. -# Comment lines can optionally be ignored. -# The maximum allowed length is configurable. -# -# You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. -# -# NOTE: This cop also applies for `Struct` definitions. -# -# @example CountAsOne: ['array', 'heredoc', 'method_call'] -# -# class Foo -# ARRAY = [ # +1 -# 1, -# 2 -# ] -# -# HASH = { # +3 -# key: 'value' -# } -# -# MSG = <<~HEREDOC # +1 -# Heredoc -# content. -# HEREDOC -# -# foo( # +1 -# 1, -# 2 -# ) -# end # 6 points -# -# source://rubocop//lib/rubocop/cop/metrics/class_length.rb#39 -class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#52 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#42 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#46 - def on_sclass(node); end - - private - - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#70 - def message(length, max_length); end -end - -# Checks for literals with extremely many entries. This is indicative of -# configuration or data that may be better extracted somewhere else, like -# a database, fetched from an API, or read from a non-code file (CSV, -# JSON, YAML, etc.). -# -# @example -# # bad -# # Huge Array literal -# [1, 2, '...', 999_999_999] -# -# # bad -# # Huge Hash literal -# { 1 => 1, 2 => 2, '...' => '...', 999_999_999 => 999_999_999} -# -# # bad -# # Huge Set "literal" -# Set[1, 2, '...', 999_999_999] -# -# # good -# # Reasonably sized Array literal -# [1, 2, '...', 10] -# -# # good -# # Reading huge Array from external data source -# # File.readlines('numbers.txt', chomp: true).map!(&:to_i) -# -# # good -# # Reasonably sized Hash literal -# { 1 => 1, 2 => 2, '...' => '...', 10 => 10} -# -# # good -# # Reading huge Hash from external data source -# CSV.foreach('numbers.csv', headers: true).each_with_object({}) do |row, hash| -# hash[row["key"].to_i] = row["value"].to_i -# end -# -# # good -# # Reasonably sized Set "literal" -# Set[1, 2, '...', 10] -# -# # good -# # Reading huge Set from external data source -# SomeFramework.config_for(:something)[:numbers].to_set -# -# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#50 -class RuboCop::Cop::Metrics::CollectionLiteralLength < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#55 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#55 - def on_hash(node); end - - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#60 - def on_index(node); end - - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#64 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#70 - def collection_threshold; end -end - -# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#51 -RuboCop::Cop::Metrics::CollectionLiteralLength::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#53 -RuboCop::Cop::Metrics::CollectionLiteralLength::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks that the cyclomatic complexity of methods is not higher -# than the configured maximum. The cyclomatic complexity is the number of -# linearly independent paths through a method. The algorithm counts -# decision points and adds one. -# -# An if statement (or unless or ?:) increases the complexity by one. An -# else branch does not, since it doesn't add a decision point. The && -# operator (or keyword and) can be converted to a nested if statement, -# and ||/or is shorthand for a sequence of ifs, so they also add one. -# Loops can be said to have an exit condition, so they add one. -# Blocks that are calls to builtin iteration methods -# (e.g. `ary.map{...}) also add one, others are ignored. -# -# def each_child_node(*types) # count begins: 1 -# unless block_given? # unless: +1 -# return to_enum(__method__, *types) -# -# children.each do |child| # each{}: +1 -# next unless child.is_a?(Node) # unless: +1 -# -# yield child if types.empty? || # if: +1, ||: +1 -# types.include?(child.type) -# end -# -# self -# end # total: 6 -# -# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#32 -class RuboCop::Cop::Metrics::CyclomaticComplexity < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - include ::RuboCop::Cop::MethodComplexity - include ::RuboCop::Cop::Metrics::Utils::IteratingBlock - - private - - # source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#42 - def complexity_score_for(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#49 - def count_block?(block); end -end - -# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#37 -RuboCop::Cop::Metrics::CyclomaticComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#36 -RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) - -# Checks if the length of a method exceeds some maximum value. -# Comment lines can optionally be allowed. -# The maximum allowed length is configurable. -# -# You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. -# -# NOTE: The `ExcludedMethods` and `IgnoredMethods` configuration is -# deprecated and only kept for backwards compatibility. -# Please use `AllowedMethods` and `AllowedPatterns` instead. -# By default, there are no methods to allowed. -# -# @example CountAsOne: ['array', 'heredoc', 'method_call'] -# -# def m -# array = [ # +1 -# 1, -# 2 -# ] -# -# hash = { # +3 -# key: 'value' -# } -# -# <<~HEREDOC # +1 -# Heredoc -# content. -# HEREDOC -# -# foo( # +1 -# 1, -# 2 -# ) -# end # 6 points -# -# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#42 -class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#56 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#49 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#49 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#56 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#65 - def cop_label; end -end - -# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#47 -RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) - -# Checks if the length of a module exceeds some maximum value. -# Comment lines can optionally be ignored. -# The maximum allowed length is configurable. -# -# You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. -# -# @example CountAsOne: ['array', 'heredoc', 'method_call'] -# -# module M -# ARRAY = [ # +1 -# 1, -# 2 -# ] -# -# HASH = { # +3 -# key: 'value' -# } -# -# MSG = <<~HEREDOC # +1 -# Heredoc -# content. -# HEREDOC -# -# foo( # +1 -# 1, -# 2 -# ) -# end # 6 points -# -# source://rubocop//lib/rubocop/cop/metrics/module_length.rb#37 -class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#51 - def module_definition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#44 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#40 - def on_module(node); end - - private - - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#55 - def message(length, max_length); end -end - -# Checks for methods with too many parameters. -# -# The maximum number of parameters is configurable. -# Keyword arguments can optionally be excluded from the total count, -# as they add less complexity than positional or optional parameters. -# -# Any number of arguments for `initialize` method inside a block of -# `Struct.new` and `Data.define` like this is always allowed: -# -# [source,ruby] -# ---- -# Struct.new(:one, :two, :three, :four, :five, keyword_init: true) do -# def initialize(one:, two:, three:, four:, five:) -# end -# end -# ---- -# -# This is because checking the number of arguments of the `initialize` method -# does not make sense. -# -# NOTE: Explicit block argument `&block` is not counted to prevent -# erroneous change that is avoided by making block argument implicit. -# -# This cop also checks for the maximum number of optional parameters. -# This can be configured using the `MaxOptionalParameters` config option. -# -# @example Max: 3 -# # good -# def foo(a, b, c = 1) -# end -# @example Max: 2 -# # bad -# def foo(a, b, c = 1) -# end -# @example CountKeywordArgs: true (default) -# # counts keyword args towards the maximum -# -# # bad (assuming Max is 3) -# def foo(a, b, c, d: 1) -# end -# -# # good (assuming Max is 3) -# def foo(a, b, c: 1) -# end -# @example CountKeywordArgs: false -# # don't count keyword args towards the maximum -# -# # good (assuming Max is 3) -# def foo(a, b, c, d: 1) -# end -# @example MaxOptionalParameters: 3 (default) -# # good -# def foo(a = 1, b = 2, c = 3) -# end -# @example MaxOptionalParameters: 2 -# # bad -# def foo(a = 1, b = 2, c = 3) -# end -# -# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#70 -class RuboCop::Cop::Metrics::ParameterLists < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#121 - def argument_to_lambda_or_proc?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def max=(value); end - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def max_optional_parameters=(value); end - - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#104 - def on_args(node); end - - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#90 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#90 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#81 - def struct_new_or_data_define_block?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#125 - def args_count(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#141 - def count_keyword_args?; end - - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#137 - def max_optional_parameters; end - - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#133 - def max_params; end -end - -# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#74 -RuboCop::Cop::Metrics::ParameterLists::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#77 -RuboCop::Cop::Metrics::ParameterLists::NAMED_KEYWORD_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#75 -RuboCop::Cop::Metrics::ParameterLists::OPTIONAL_PARAMETERS_MSG = T.let(T.unsafe(nil), String) - -# Tries to produce a complexity score that's a measure of the -# complexity the reader experiences when looking at a method. For that -# reason it considers `when` nodes as something that doesn't add as much -# complexity as an `if` or a `&&`. Except if it's one of those special -# `case`/`when` constructs where there's no expression after `case`. Then -# the cop treats it as an `if`/`elsif`/`elsif`... and lets all the `when` -# nodes count. In contrast to the CyclomaticComplexity cop, this cop -# considers `else` nodes as adding complexity. -# -# @example -# -# def my_method # 1 -# if cond # 1 -# case var # 2 (0.8 + 4 * 0.2, rounded) -# when 1 then func_one -# when 2 then func_two -# when 3 then func_three -# when 4..10 then func_other -# end -# else # 1 -# do_something until a && b # 2 -# end # === -# end # 7 complexity points -# -# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#29 -class RuboCop::Cop::Metrics::PerceivedComplexity < ::RuboCop::Cop::Metrics::CyclomaticComplexity - private - - # source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#36 - def complexity_score_for(node); end -end - -# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#32 -RuboCop::Cop::Metrics::PerceivedComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#30 -RuboCop::Cop::Metrics::PerceivedComplexity::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#6 -module RuboCop::Cop::Metrics::Utils; end - -# > ABC is .. a software size metric .. computed by counting the number -# > of assignments, branches and conditions for a section of code. -# > http://c2.com/cgi/wiki?AbcMetric -# -# We separate the *calculator* from the *cop* so that the calculation, -# the formula itself, is easier to test. -# -# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#13 -class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator - include ::RuboCop::AST::Sexp - include ::RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount - include ::RuboCop::Cop::Metrics::Utils::IteratingBlock - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - - # @return [AbcSizeCalculator] a new instance of AbcSizeCalculator - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#30 - def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#42 - def calculate; end - - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#53 - def calculate_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#65 - def else_branch?(node); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#47 - def evaluate_branch_nodes(node); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#60 - def evaluate_condition_node(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#127 - def argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#86 - def assignment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#123 - def branch?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#119 - def capturing_variable?(name); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#95 - def compound_assignment(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#131 - def condition?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#108 - def simple_assignment?(node); end - - # @yield [node] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#71 - def visit_depth_last(node, &block); end - - class << self - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#30 - def calculate(node, discount_repeated_attributes: T.unsafe(nil)); end - end -end - -# > Branch -- an explicit forward program branch out of scope -- a -# > function call, class method call .. -# > http://c2.com/cgi/wiki?AbcMetric -# -# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#21 -RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::BRANCH_NODES = T.let(T.unsafe(nil), Array) - -# > Condition -- a logical/Boolean test, == != <= >= < > else case -# > default try catch ? and unary conditionals. -# > http://c2.com/cgi/wiki?AbcMetric -# -# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#26 -RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::CONDITION_NODES = T.let(T.unsafe(nil), Array) - -# Helps to calculate code length for the provided node. -# -# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#8 -class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator - include ::RuboCop::PathUtil - include ::RuboCop::Cop::Util - extend ::RuboCop::AST::NodePattern::Macros - - # @return [CodeLengthCalculator] a new instance of CodeLengthCalculator - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#16 - def initialize(node, processed_source, count_comments: T.unsafe(nil), foldable_types: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#24 - def calculate; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#182 - def another_args?(node); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#42 - def build_foldable_checks(types); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#90 - def classlike_code_length(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#138 - def classlike_node?(node); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#66 - def code_length(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#163 - def count_comments?; end - - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#126 - def each_top_level_descendant(node, types, &block); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#146 - def extract_body(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#142 - def foldable_node?(node); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#121 - def heredoc_length(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#86 - def heredoc_node?(node); end - - # Returns true for lines that shall not be included in the count. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#159 - def irrelevant_line?(source_line); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#110 - def line_numbers_of_inner_nodes(node, *types); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#106 - def namespace_module?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#186 - def node_with_heredoc?(node); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#60 - def normalize_foldable_types(types); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#167 - def omit_length(descendant); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#178 - def parenthesized?(node); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#190 - def source_from_node_with_heredoc(node); end -end - -# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#13 -RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::CLASSLIKE_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#12 -RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::FOLDABLE_TYPES = T.let(T.unsafe(nil), Array) - -# Used to identify iterating blocks like `.map{}` and `.map(&:...)` -# -# source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#8 -module RuboCop::Cop::Metrics::Utils::IteratingBlock - # Returns the name of the method called with a block - # if node is a block node, or a block-pass node. - # - # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#37 - def block_method_name(node); end - - # Returns nil if node is neither a block node or a block-pass node. - # Otherwise returns true/false if method call is a known iterating call - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#53 - def iterating_block?(node); end - - # Returns true iff name is a known iterating type (e.g. :each, :transform_values) - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#47 - def iterating_method?(name); end -end - -# source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#33 -RuboCop::Cop::Metrics::Utils::IteratingBlock::KNOWN_ITERATING_METHODS = T.let(T.unsafe(nil), Set) - -# Identifies repetitions `{c}send` calls with no arguments: -# -# foo.bar -# foo.bar # => repeated -# foo.bar.baz.qux # => inner send repeated -# foo.bar.baz.other # => both inner send repeated -# foo.bar(2) # => not repeated -# -# It also invalidates sequences if a receiver is reassigned: -# -# xx.foo.bar -# xx.foo.baz # => inner send repeated -# self.xx = any # => invalidates everything so far -# xx.foo.baz # => no repetition -# self.xx.foo.baz # => all repeated -# -# @api private -# -# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#25 -module RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount - include ::RuboCop::AST::Sexp - extend ::RuboCop::AST::NodePattern::Macros - - # Plug into the calculator - # - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#30 - def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#61 - def attribute_call?(param0 = T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#53 - def calculate_node(node); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#43 - def discount_repeated_attributes?; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#47 - def evaluate_branch_nodes(node); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#92 - def root_node?(param0 = T.unsafe(nil)); end - - private - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#66 - def discount_repeated_attribute?(send_node); end - - # Returns the "known_attributes" for the `node` by walking the receiver tree - # If at any step the subdirectory does not exist, it is yielded with the - # associated key (method_name) - # If the node is not a series of `(c)send` calls with no arguments, - # then `nil` is yielded - # - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#103 - def find_attributes(node, &block); end - - # or `nil` if it is not a setter. - # - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#126 - def setter_to_getter(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#80 - def update_repeated_attribute(node); end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#117 -RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount::VAR_SETTER_TO_GETTER = T.let(T.unsafe(nil), Hash) - -# Identifies repetitions `&.` on the same variable: -# -# my_var&.foo -# my_var&.bar # => repeated -# my_var = baz # => reset -# my_var&.qux # => not repeated -# -# @api private -# -# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#15 -module RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#20 - def discount_for_repeated_csend?(csend_node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#34 - def reset_on_lvasgn(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#16 - def reset_repeated_csend; end -end - -# source://rubocop//lib/rubocop/cop/migration/department_name.rb#5 -module RuboCop::Cop::Migration; end - -# department name. -# -# source://rubocop//lib/rubocop/cop/migration/department_name.rb#8 -class RuboCop::Cop::Migration::DepartmentName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/migration/department_name.rb#21 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/migration/department_name.rb#47 - def check_cop_name(name, comment, offset); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/migration/department_name.rb#69 - def contain_unexpected_character_for_department_name?(name); end - - # source://rubocop//lib/rubocop/cop/migration/department_name.rb#43 - def disable_comment_offset; end - - # source://rubocop//lib/rubocop/cop/migration/department_name.rb#73 - def qualified_legacy_cop_name(cop_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/migration/department_name.rb#63 - def valid_content_token?(content_token); end -end - -# source://rubocop//lib/rubocop/cop/migration/department_name.rb#14 -RuboCop::Cop::Migration::DepartmentName::DISABLE_COMMENT_FORMAT = T.let(T.unsafe(nil), Regexp) - -# The token that makes up a disable comment. -# `DepartmentName/CopName` or` all`. -# -# source://rubocop//lib/rubocop/cop/migration/department_name.rb#19 -RuboCop::Cop::Migration::DepartmentName::DISABLING_COPS_CONTENT_TOKEN = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/migration/department_name.rb#12 -RuboCop::Cop::Migration::DepartmentName::MSG = T.let(T.unsafe(nil), String) - -# Common functionality for checking minimum body length. -# -# source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#6 -module RuboCop::Cop::MinBodyLength - private - - # source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#13 - def min_body_length; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#9 - def min_body_length?(node); end -end - -# Common functionality for checking minimum branches count. -# -# source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#6 -module RuboCop::Cop::MinBranchesCount - private - - # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#29 - def if_conditional_branches(node, branches = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#22 - def min_branches_count; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#9 - def min_branches_count?(node); end -end - -# Common code for indenting the first elements in multiline -# array literals, hash literals, and method definitions. -# -# source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#7 -module RuboCop::Cop::MultilineElementIndentation - private - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#42 - def check_expected_style(styles); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#26 - def check_first(first, left_brace, left_parenthesis, offset); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#80 - def detected_styles(actual_column, offset, left_parenthesis, left_brace); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#85 - def detected_styles_for_column(column, left_parenthesis, left_brace); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#10 - def each_argument_node(node, type); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#66 - def hash_pair_where_value_beginning_with(left_brace, first); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#98 - def incorrect_style_detected(styles, first, base_column_type); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#50 - def indent_base(left_brace, first, left_parenthesis); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#72 - def key_and_value_begin_on_same_line?(pair); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#76 - def right_sibling_begins_on_subsequent_line?(pair); end -end - -# Common functionality for checking for a line break before each -# element in a multi-line collection. -# -# source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#7 -module RuboCop::Cop::MultilineElementLineBreaks - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#23 - def all_on_same_line?(nodes, ignore_last: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#10 - def check_line_breaks(_node, children, ignore_last: T.unsafe(nil)); end -end - -# Common functionality for checking multiline method calls and binary -# operations. -# -# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#7 -module RuboCop::Cop::MultilineExpressionIndentation - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#14 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#14 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#132 - def argument_in_method_call(node, kind); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#188 - def assignment_rhs(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#65 - def check(range, node, lhs, rhs); end - - # The correct indentation of `node` is usually `IndentationWidth`, with - # one exception: prefix keywords. - # - # ``` - # while foo && # Here, `while` is called a "prefix keyword" - # bar # This is called "special indentation" - # baz - # end - # ``` - # - # Note that *postfix conditionals* do *not* get "special indentation". - # - # ``` - # next if foo && - # bar # normal indentation, not special - # ``` - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#55 - def correct_indentation(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#160 - def disqualified_rhs?(candidate, ancestor); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#204 - def grouped_expression?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#73 - def incorrect_style_detected(range, node, lhs, rhs); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#85 - def indentation(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#122 - def indented_keyword_expression(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#208 - def inside_arg_list_parentheses?(node, ancestor); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#99 - def keyword_message_tail(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#107 - def kw_node_with_special_indentation(node); end - - # In a chain of method calls, we regard the top call node as the base - # for indentation of all lines following the first. For example: - # a. - # b c { block }. <-- b is indented relative to a - # d <-- d is indented relative to a - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#32 - def left_hand_side(lhs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#198 - def not_for_this_cop?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#89 - def operation_description(node, rhs); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#146 - def part_of_assignment_rhs(node, candidate); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#184 - def part_of_block_body?(candidate, block_node); end - - # Returns true if `node` is a conditional whose `body` and `condition` - # begin on the same line. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#217 - def postfix_conditional?(node); end - - # The []= operator and setters (a.b = c) are parsed as :send nodes. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#176 - def valid_method_rhs_candidate?(candidate, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#165 - def valid_rhs?(candidate, ancestor); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#180 - def valid_rhs_candidate?(candidate, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#221 - def within_node?(inner, outer); end -end - -# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#11 -RuboCop::Cop::MultilineExpressionIndentation::ASSIGNMENT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#10 -RuboCop::Cop::MultilineExpressionIndentation::DEFAULT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#8 -RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#12 -RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_MESSAGE_TAIL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#9 -RuboCop::Cop::MultilineExpressionIndentation::UNALIGNED_RHS_TYPES = T.let(T.unsafe(nil), Array) - -# Autocorrection logic for the closing brace of a literal either -# on the same line as the last contained elements, or a new line. -# -# source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#7 -class RuboCop::Cop::MultilineLiteralBraceCorrector - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - include ::RuboCop::Cop::RangeHelp - - # @return [MultilineLiteralBraceCorrector] a new instance of MultilineLiteralBraceCorrector - # - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#15 - def initialize(corrector, node, processed_source); end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#21 - def call; end - - private - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#61 - def content_if_comment_present(corrector, node); end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#51 - def correct_heredoc_argument_method_chain(corrector, end_range); end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#46 - def correct_next_line_brace(corrector, end_range); end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#42 - def correct_same_line_brace(corrector); end - - # Returns the value of attribute corrector. - # - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 - def corrector; end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#94 - def last_element_range_with_trailing_comma(node); end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#103 - def last_element_trailing_comma_range(node); end - - # Returns the value of attribute node. - # - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 - def node; end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 - def processed_source; end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#90 - def remove_trailing_content_of_comment(corrector, range); end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#80 - def select_content_to_be_inserted_after_last_element(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#73 - def use_heredoc_argument_method_chain?(parent); end - - class << self - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#11 - def correct(corrector, node, processed_source); end - end -end - -# Common functionality for checking the closing brace of a literal is -# either on the same line as the last contained elements or a new line. -# -# source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#7 -module RuboCop::Cop::MultilineLiteralBraceLayout - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - private - - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#34 - def check(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#12 - def check_brace_layout(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#42 - def check_new_line(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#50 - def check_same_line(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#58 - def check_symmetrical(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#86 - def children(node); end - - # This method depends on the fact that we have guarded - # against implicit and empty literals. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#98 - def closing_brace_on_same_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#74 - def empty_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#82 - def ignored_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#78 - def implicit_literal?(node); end - - # Starting with the parent node and recursively for the parent node's - # children, check if the node is a HEREDOC and if the HEREDOC ends below - # or on the last line of the parent node. - # - # Example: - # - # # node is `b: ...` parameter - # # last_line_heredoc?(node) => false - # foo(a, - # b: { - # a: 1, - # c: <<-EOM - # baz - # EOM - # } - # ) - # - # # node is `b: ...` parameter - # # last_line_heredoc?(node) => true - # foo(a, - # b: <<-EOM - # baz - # EOM - # ) - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#126 - def last_line_heredoc?(node, parent = T.unsafe(nil)); end - - # Returns true for the case - # [a, - # b # comment - # ].some_method - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#26 - def new_line_needed_before_closing_brace?(node); end - - # This method depends on the fact that we have guarded - # against implicit and empty literals. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#92 - def opening_brace_on_same_line?(node); end -end - -# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#5 -module RuboCop::Cop::Naming; end - -# Makes sure that accessor methods are named properly. Applies -# to both instance and class methods. -# -# NOTE: Offenses are only registered for methods with the expected -# arity. Getters (`get_attribute`) must have no arguments to be -# registered, and setters (`set_attribute(value)`) must have exactly -# one. -# -# @example -# # bad -# def set_attribute(value) -# end -# -# # good -# def attribute=(value) -# end -# -# # bad -# def get_attribute -# end -# -# # good -# def attribute -# end -# -# # accepted, incorrect arity for getter -# def get_value(attr) -# end -# -# # accepted, incorrect arity for setter -# def set_value -# end -# -# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#38 -class RuboCop::Cop::Naming::AccessorMethodName < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#42 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#42 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#61 - def bad_reader_name?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#65 - def bad_writer_name?(node); end - - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#53 - def message(node); end -end - -# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#39 -RuboCop::Cop::Naming::AccessorMethodName::MSG_READER = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#40 -RuboCop::Cop::Naming::AccessorMethodName::MSG_WRITER = T.let(T.unsafe(nil), String) - -# Checks for non-ascii characters in identifier and constant names. -# Identifiers are always checked and whether constants are checked -# can be controlled using AsciiConstants config. -# -# @example -# # bad -# def καλημερα # Greek alphabet (non-ascii) -# end -# -# # bad -# def こんにちはと言う # Japanese character (non-ascii) -# end -# -# # bad -# def hello_🍣 # Emoji (non-ascii) -# end -# -# # good -# def say_hello -# end -# -# # bad -# 신장 = 10 # Hangul character (non-ascii) -# -# # good -# height = 10 -# -# # bad -# params[:عرض_gteq] # Arabic character (non-ascii) -# -# # good -# params[:width_gteq] -# @example AsciiConstants: true (default) -# # bad -# class Foö -# end -# -# FOÖ = "foo" -# @example AsciiConstants: false -# # good -# class Foö -# end -# -# FOÖ = "foo" -# -# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#53 -class RuboCop::Cop::Naming::AsciiIdentifiers < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#59 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#84 - def first_non_ascii_chars(string); end - - # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#74 - def first_offense_range(identifier); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#70 - def should_check?(token); end -end - -# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#57 -RuboCop::Cop::Naming::AsciiIdentifiers::CONSTANT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#56 -RuboCop::Cop::Naming::AsciiIdentifiers::IDENTIFIER_MSG = T.let(T.unsafe(nil), String) - -# Makes sure that certain binary operator methods have their -# sole parameter named `other`. -# -# @example -# -# # bad -# def +(amount); end -# -# # good -# def +(other); end -# -# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#16 -class RuboCop::Cop::Naming::BinaryOperatorParameterName < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#29 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#25 - def op_method_candidate?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#45 - def op_method?(name); end -end - -# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#22 -RuboCop::Cop::Naming::BinaryOperatorParameterName::EXCLUDED = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#19 -RuboCop::Cop::Naming::BinaryOperatorParameterName::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#21 -RuboCop::Cop::Naming::BinaryOperatorParameterName::OP_LIKE_METHODS = T.let(T.unsafe(nil), Array) - -# In Ruby 3.1, anonymous block forwarding has been added. -# -# This cop identifies places where `do_something(&block)` can be replaced -# by `do_something(&)`. -# -# It also supports the opposite style by alternative `explicit` option. -# You can specify the block variable name for autocorrection with `BlockForwardingName`. -# The default variable name is `block`. If the name is already in use, it will not be -# autocorrected. -# -# @example EnforcedStyle: anonymous (default) -# -# # bad -# def foo(&block) -# bar(&block) -# end -# -# # good -# def foo(&) -# bar(&) -# end -# @example EnforcedStyle: explicit -# -# # bad -# def foo(&) -# bar(&) -# end -# -# # good -# def foo(&block) -# bar(&block) -# end -# -# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#40 -class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#114 - def anonymous_block_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#87 - def block_argument_name_matched?(block_pass_node, last_argument); end - - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#146 - def block_forwarding_name; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#77 - def expected_block_forwarding_style?(node, last_argument); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#118 - def explicit_block_argument?(node); end - - # Prevents the following syntax error: - # - # # foo.rb - # def foo(&) - # block_method do - # bar(&) - # end - # end - # - # $ ruby -vc foo.rb - # ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] - # foo.rb: foo.rb:4: anonymous block parameter is also used within block (SyntaxError) - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#106 - def invalidates_syntax?(block_pass_node); end - - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#122 - def register_offense(block_argument, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#138 - def use_block_argument_as_local_variable?(node, last_argument); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#110 - def use_kwarg_in_method_definition?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#50 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#48 -RuboCop::Cop::Naming::BlockForwarding::MSG = T.let(T.unsafe(nil), String) - -# Checks block parameter names for how descriptive they -# are. It is highly configurable. -# -# The `MinNameLength` config option takes an integer. It represents -# the minimum amount of characters the name must be. Its default is 1. -# The `AllowNamesEndingInNumbers` config option takes a boolean. When -# set to false, this cop will register offenses for names ending with -# numbers. Its default is false. The `AllowedNames` config option -# takes an array of permitted names that will never register an -# offense. The `ForbiddenNames` config option takes an array of -# restricted names that will always register an offense. -# -# @example -# # bad -# bar do |varOne, varTwo| -# varOne + varTwo -# end -# -# # With `AllowNamesEndingInNumbers` set to false -# foo { |num1, num2| num1 * num2 } -# -# # With `MinNameLength` set to number greater than 1 -# baz { |a, b, c| do_stuff(a, b, c) } -# -# # good -# bar do |thud, fred| -# thud + fred -# end -# -# foo { |speed, distance| speed * distance } -# -# baz { |age, height, gender| do_stuff(age, height, gender) } -# -# source://rubocop//lib/rubocop/cop/naming/block_parameter_name.rb#38 -class RuboCop::Cop::Naming::BlockParameterName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::UncommunicativeName - - # source://rubocop//lib/rubocop/cop/naming/block_parameter_name.rb#41 - def on_block(node); end -end - -# Checks for class and module names with -# an underscore in them. -# -# `AllowedNames` config takes an array of permitted names. -# Its default value is `['module_parent']`. -# These names can be full class/module names or part of the name. -# eg. Adding `my_class` to the `AllowedNames` config will allow names like -# `my_class`, `my_class::User`, `App::my_class`, `App::my_class::User`, etc. -# -# @example -# # bad -# class My_Class -# end -# module My_Module -# end -# -# # good -# class MyClass -# end -# module MyModule -# end -# class module_parent::MyModule -# end -# -# source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#29 -class RuboCop::Cop::Naming::ClassAndModuleCamelCase < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#32 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#32 - def on_module(node); end -end - -# source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#30 -RuboCop::Cop::Naming::ClassAndModuleCamelCase::MSG = T.let(T.unsafe(nil), String) - -# Checks whether constant names are written using -# SCREAMING_SNAKE_CASE. -# -# To avoid false positives, it ignores cases in which we cannot know -# for certain the type of value that would be assigned to a constant. -# -# @example -# # bad -# InchInCm = 2.54 -# INCHinCM = 2.54 -# Inch_In_Cm = 2.54 -# -# # good -# INCH_IN_CM = 2.54 -# -# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#20 -class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#27 - def class_or_struct_return_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#68 - def literal_receiver?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#33 - def on_casgn(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#56 - def allowed_assignment?(value); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#73 - def allowed_conditional_expression_on_rhs?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#63 - def allowed_method_call_on_rhs?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#77 - def contains_constant?(node); end -end - -# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#21 -RuboCop::Cop::Naming::ConstantName::MSG = T.let(T.unsafe(nil), String) - -# Use POSIX character classes, so we allow accented characters rather -# than just standard ASCII characters -# -# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#24 -RuboCop::Cop::Naming::ConstantName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) - -# Makes sure that Ruby source files have snake_case -# names. Ruby scripts (i.e. source files with a shebang in the -# first line) are ignored. -# -# The cop also ignores `.gemspec` files, because Bundler -# recommends using dashes to separate namespaces in nested gems -# (i.e. `bundler-console` becomes `Bundler::Console`). As such, the -# gemspec is supposed to be named `bundler-console.gemspec`. -# -# When `ExpectMatchingDefinition` (default: `false`) is `true`, the cop requires -# each file to have a class, module or `Struct` defined in it that matches -# the filename. This can be further configured using -# `CheckDefinitionPathHierarchy` (default: `true`) to determine whether the -# path should match the namespace of the above definition. -# -# When `IgnoreExecutableScripts` (default: `true`) is `true`, files that start -# with a shebang line are not considered by the cop. -# -# When `Regex` is set, the cop will flag any filename that does not match -# the regular expression. -# -# @example -# # bad -# lib/layoutManager.rb -# -# anything/usingCamelCase -# -# # good -# lib/layout_manager.rb -# -# anything/using_snake_case.rake -# -# source://rubocop//lib/rubocop/cop/naming/file_name.rb#39 -class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#56 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#49 - def struct_definition(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#134 - def allowed_acronyms; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#96 - def bad_filename_allowed?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#122 - def check_definition_path_hierarchy?; end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#169 - def defined_struct(node); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#126 - def definition_path_hierarchy_roots; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#118 - def expect_matching_definition?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#138 - def filename_good?(basename); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#147 - def find_class_or_module(node, namespace); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#165 - def find_definition(node); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#65 - def for_bad_filename(file_path); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#114 - def ignore_executable_scripts?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#202 - def match?(expected); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#206 - def match_acronym?(expected, name); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#174 - def match_namespace(node, namespace, expected); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#92 - def matching_class?(file_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#88 - def matching_definition?(file_path); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#100 - def no_definition_message(basename, file_path); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#106 - def other_message(basename); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#188 - def partial_matcher!(expected); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#77 - def perform_class_and_module_naming_checks(file_path, basename); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#130 - def regex; end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#240 - def to_module_name(basename); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#213 - def to_namespace(path); end -end - -# source://rubocop//lib/rubocop/cop/naming/file_name.rb#43 -RuboCop::Cop::Naming::FileName::MSG_NO_DEFINITION = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/file_name.rb#44 -RuboCop::Cop::Naming::FileName::MSG_REGEX = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/file_name.rb#42 -RuboCop::Cop::Naming::FileName::MSG_SNAKE_CASE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/file_name.rb#46 -RuboCop::Cop::Naming::FileName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) - -# Checks that your heredocs are using the configured case. -# By default it is configured to enforce uppercase heredocs. -# -# @example EnforcedStyle: uppercase (default) -# # bad -# <<-sql -# SELECT * FROM foo -# sql -# -# # good -# <<-SQL -# SELECT * FROM foo -# SQL -# @example EnforcedStyle: lowercase -# # bad -# <<-SQL -# SELECT * FROM foo -# SQL -# -# # good -# <<-sql -# SELECT * FROM foo -# sql -# -# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#30 -class RuboCop::Cop::Naming::HeredocDelimiterCase < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#37 - def on_heredoc(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#54 - def correct_case_delimiters?(node); end - - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#58 - def correct_delimiters(source); end - - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#50 - def message(_node); end -end - -# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#35 -RuboCop::Cop::Naming::HeredocDelimiterCase::MSG = T.let(T.unsafe(nil), String) - -# Checks that your heredocs are using meaningful delimiters. -# By default it disallows `END` and `EO*`, and can be configured through -# forbidden listing additional delimiters. -# -# @example -# -# # good -# <<-SQL -# SELECT * FROM foo -# SQL -# -# # bad -# <<-END -# SELECT * FROM foo -# END -# -# # bad -# <<-EOS -# SELECT * FROM foo -# EOS -# -# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#26 -class RuboCop::Cop::Naming::HeredocDelimiterNaming < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#31 - def on_heredoc(node); end - - private - - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#51 - def forbidden_delimiters; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#41 - def meaningful_delimiters?(node); end -end - -# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#29 -RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String) - -# Recommends the use of inclusive language instead of problematic terms. -# The cop can check the following locations for offenses: -# -# - identifiers -# - constants -# - variables -# - strings -# - symbols -# - comments -# - file paths -# -# Each of these locations can be individually enabled/disabled via configuration, -# for example CheckIdentifiers = true/false. -# -# Flagged terms are configurable for the cop. For each flagged term an optional -# Regex can be specified to identify offenses. Suggestions for replacing a flagged term can -# be configured and will be displayed as part of the offense message. -# An AllowedRegex can be specified for a flagged term to exempt allowed uses of the term. -# `WholeWord: true` can be set on a flagged term to indicate the cop should only match when -# a term matches the whole word (partial matches will not be offenses). -# -# The cop supports autocorrection when there is only one suggestion. When there are multiple -# suggestions, the best suggestion cannot be identified and will not be autocorrected. -# -# @example FlaggedTerms: { whitelist: { Suggestions: ['allowlist'] } } -# # Suggest replacing identifier whitelist with allowlist -# -# # bad -# whitelist_users = %w(user1 user1) -# -# # good -# allowlist_users = %w(user1 user2) -# @example FlaggedTerms: { master: { Suggestions: ['main', 'primary', 'leader'] } } -# # Suggest replacing master in an instance variable name with main, primary, or leader -# -# # bad -# @master_node = 'node1.example.com' -# -# # good -# @primary_node = 'node1.example.com' -# @example FlaggedTerms: { whitelist: { Regex: !ruby/regexp '/white[-_\s]?list' } } -# # Identify problematic terms using a Regexp -# -# # bad -# white_list = %w(user1 user2) -# -# # good -# allow_list = %w(user1 user2) -# @example FlaggedTerms: { master: { AllowedRegex: 'master\'?s degree' } } -# # Specify allowed uses of the flagged term as a string or regexp. -# -# # bad -# # They had a masters -# -# # good -# # They had a master's degree -# @example FlaggedTerms: { slave: { WholeWord: true } } -# # Specify that only terms that are full matches will be flagged. -# -# # bad -# Slave -# -# # good (won't be flagged despite containing `slave`) -# TeslaVehicle -# -# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#74 -class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # @return [InclusiveLanguage] a new instance of InclusiveLanguage - # - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#84 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#93 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#111 - def add_offenses_for_token(token, word_locations); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#167 - def add_to_flagged_term_hash(regex_string, term, term_definition); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#193 - def array_to_ignorecase_regex(strings); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#126 - def check_token?(type); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#243 - def create_message(word, message = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#217 - def create_multiple_word_message_for_file(words); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#213 - def create_single_word_message_for_file(word); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#189 - def ensure_regex_string(regex); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#160 - def extract_regexp(term, term_definition); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#251 - def find_flagged_term(word); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#265 - def format_suggestions(suggestions); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#197 - def investigate_filepath; end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#100 - def investigate_tokens; end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#231 - def mask_input(str); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#280 - def offense_range(token, word); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#130 - def preprocess_check_config; end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#144 - def preprocess_flagged_terms; end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#258 - def preprocess_suggestions(suggestions); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#179 - def process_allowed_regex(allowed); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#221 - def scan_for_words(input); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#174 - def set_regexes(flagged_term_strings, allowed_strings); end -end - -# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#78 -RuboCop::Cop::Naming::InclusiveLanguage::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#79 -RuboCop::Cop::Naming::InclusiveLanguage::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#80 -RuboCop::Cop::Naming::InclusiveLanguage::MSG_FOR_FILE_PATH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#82 -class RuboCop::Cop::Naming::InclusiveLanguage::WordLocation < ::Struct - # Returns the value of attribute position - # - # @return [Object] the current value of position - def position; end - - # Sets the attribute position - # - # @param value [Object] the value to set the attribute position to. - # @return [Object] the newly set value - def position=(_); end - - # Returns the value of attribute word - # - # @return [Object] the current value of word - def word; end - - # Sets the attribute word - # - # @param value [Object] the value to set the attribute word to. - # @return [Object] the newly set value - def word=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Checks for memoized methods whose instance variable name -# does not match the method name. Applies to both regular methods -# (defined with `def`) and dynamic methods (defined with -# `define_method` or `define_singleton_method`). -# -# This cop can be configured with the EnforcedStyleForLeadingUnderscores -# directive. It can be configured to allow for memoized instance variables -# prefixed with an underscore. Prefixing ivars with an underscore is a -# convention that is used to implicitly indicate that an ivar should not -# be set or referenced outside of the memoization method. -# -# @example EnforcedStyleForLeadingUnderscores: disallowed (default) -# # bad -# # Method foo is memoized using an instance variable that is -# # not `@foo`. This can cause confusion and bugs. -# def foo -# @something ||= calculate_expensive_thing -# end -# -# def foo -# return @something if defined?(@something) -# @something = calculate_expensive_thing -# end -# -# # good -# def _foo -# @foo ||= calculate_expensive_thing -# end -# -# # good -# def foo -# @foo ||= calculate_expensive_thing -# end -# -# # good -# def foo -# @foo ||= begin -# calculate_expensive_thing -# end -# end -# -# # good -# def foo -# helper_variable = something_we_need_to_calculate_foo -# @foo ||= calculate_expensive_thing(helper_variable) -# end -# -# # good -# define_method(:foo) do -# @foo ||= calculate_expensive_thing -# end -# -# # good -# define_method(:foo) do -# return @foo if defined?(@foo) -# @foo = calculate_expensive_thing -# end -# @example EnforcedStyleForLeadingUnderscores: required -# # bad -# def foo -# @something ||= calculate_expensive_thing -# end -# -# # bad -# def foo -# @foo ||= calculate_expensive_thing -# end -# -# def foo -# return @foo if defined?(@foo) -# @foo = calculate_expensive_thing -# end -# -# # good -# def foo -# @_foo ||= calculate_expensive_thing -# end -# -# # good -# def _foo -# @_foo ||= calculate_expensive_thing -# end -# -# def foo -# return @_foo if defined?(@_foo) -# @_foo = calculate_expensive_thing -# end -# -# # good -# define_method(:foo) do -# @_foo ||= calculate_expensive_thing -# end -# -# # good -# define_method(:foo) do -# return @_foo if defined?(@_foo) -# @_foo = calculate_expensive_thing -# end -# @example EnforcedStyleForLeadingUnderscores :optional -# # bad -# def foo -# @something ||= calculate_expensive_thing -# end -# -# # good -# def foo -# @foo ||= calculate_expensive_thing -# end -# -# # good -# def foo -# @_foo ||= calculate_expensive_thing -# end -# -# # good -# def _foo -# @_foo ||= calculate_expensive_thing -# end -# -# # good -# def foo -# return @_foo if defined?(@_foo) -# @_foo = calculate_expensive_thing -# end -# -# # good -# define_method(:foo) do -# @foo ||= calculate_expensive_thing -# end -# -# # good -# define_method(:foo) do -# @_foo ||= calculate_expensive_thing -# end -# -# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#148 -class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#197 - def defined_memoized?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#160 - def method_definition?(param0 = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#205 - def on_defined?(node); end - - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#170 - def on_or_asgn(node); end - - private - - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#242 - def find_definition(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#253 - def matches?(method_name, ivar_assign); end - - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#263 - def message(variable); end - - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#238 - def style_parameter_name; end - - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#271 - def suggested_var(method_name); end - - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#277 - def variable_name_candidates(method_name); end -end - -# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#157 -RuboCop::Cop::Naming::MemoizedInstanceVariableName::DYNAMIC_DEFINE_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#153 -RuboCop::Cop::Naming::MemoizedInstanceVariableName::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#155 -RuboCop::Cop::Naming::MemoizedInstanceVariableName::UNDERSCORE_REQUIRED = T.let(T.unsafe(nil), String) - -# Makes sure that all methods use the configured style, -# snake_case or camelCase, for their names. -# -# This cop has `AllowedPatterns` configuration option. -# -# Naming/MethodName: -# AllowedPatterns: -# - '\AonSelectionBulkChange\z' -# - '\AonSelectionCleared\z' -# -# Method names matching patterns are always allowed. -# -# @example EnforcedStyle: snake_case (default) -# # bad -# def fooBar; end -# -# # good -# def foo_bar; end -# @example EnforcedStyle: camelCase -# # bad -# def foo_bar; end -# -# # good -# def fooBar; end -# -# source://rubocop//lib/rubocop/cop/naming/method_name.rb#31 -class RuboCop::Cop::Naming::MethodName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableNaming - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#55 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#55 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#44 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#42 - def str_name(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#39 - def sym_name(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#64 - def attr_name(name_item); end - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#75 - def message(style); end - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#68 - def range_position(node); end -end - -# source://rubocop//lib/rubocop/cop/naming/method_name.rb#36 -RuboCop::Cop::Naming::MethodName::MSG = T.let(T.unsafe(nil), String) - -# Checks method parameter names for how descriptive they -# are. It is highly configurable. -# -# The `MinNameLength` config option takes an integer. It represents -# the minimum amount of characters the name must be. Its default is 3. -# The `AllowNamesEndingInNumbers` config option takes a boolean. When -# set to false, this cop will register offenses for names ending with -# numbers. Its default is false. The `AllowedNames` config option -# takes an array of permitted names that will never register an -# offense. The `ForbiddenNames` config option takes an array of -# restricted names that will always register an offense. -# -# @example -# # bad -# def bar(varOne, varTwo) -# varOne + varTwo -# end -# -# # With `AllowNamesEndingInNumbers` set to false -# def foo(num1, num2) -# num1 * num2 -# end -# -# # With `MinNameLength` set to number greater than 1 -# def baz(a, b, c) -# do_stuff(a, b, c) -# end -# -# # good -# def bar(thud, fred) -# thud + fred -# end -# -# def foo(speed, distance) -# speed * distance -# end -# -# def baz(age_a, height_b, gender_c) -# do_stuff(age_a, height_b, gender_c) -# end -# -# source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#46 -class RuboCop::Cop::Naming::MethodParameterName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::UncommunicativeName - - # source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#49 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#49 - def on_defs(node); end -end - -# Checks that predicate methods names end with a question mark and -# do not start with a forbidden prefix. -# -# A method is determined to be a predicate method if its name starts -# with one of the prefixes defined in the `NamePrefix` configuration. -# You can change what prefixes are considered by changing this option. -# Any method name that starts with one of these prefixes is required by -# the cop to end with a `?`. Other methods can be allowed by adding to -# the `AllowedMethods` configuration. -# -# NOTE: The `is_a?` method is allowed by default. -# -# If `ForbiddenPrefixes` is set, methods that start with the configured -# prefixes will not be allowed and will be removed by autocorrection. -# -# In other words, if `ForbiddenPrefixes` is empty, a method named `is_foo` -# will register an offense only due to the lack of question mark (and will be -# autocorrected to `is_foo?`). If `ForbiddenPrefixes` contains `is_`, -# `is_foo` will register an offense both because the ? is missing and because of -# the `is_` prefix, and will be corrected to `foo?`. -# -# NOTE: `ForbiddenPrefixes` is only applied to prefixes in `NamePrefix`; -# a prefix in the former but not the latter will not be considered by -# this cop. -# -# @example -# # bad -# def is_even(value) -# end -# -# def is_even?(value) -# end -# -# # good -# def even?(value) -# end -# -# # bad -# def has_value -# end -# -# def has_value? -# end -# -# # good -# def value? -# end -# @example AllowedMethods: ['is_a?'] (default) -# # good -# def is_a?(value) -# end -# -# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#59 -class RuboCop::Cop::Naming::PredicateName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#63 - def dynamic_method_define(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#82 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#82 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#69 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 - def allowed_method_name?(method_name, prefix); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#106 - def expected_name(method_name, prefix); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#120 - def forbidden_prefixes; end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#116 - def message(method_name, new_name); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#128 - def method_definition_macros(macro_name); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#124 - def predicate_prefixes; end -end - -# Makes sure that rescued exceptions variables are named as -# expected. -# -# The `PreferredName` config option takes a `String`. It represents -# the required name of the variable. Its default is `e`. -# -# NOTE: This cop does not consider nested rescues because it cannot -# guarantee that the variable from the outer rescue is not used within -# the inner rescue (in which case, changing the inner variable would -# shadow the outer variable). -# -# @example PreferredName: e (default) -# # bad -# begin -# # do something -# rescue MyException => exception -# # do something -# end -# -# # good -# begin -# # do something -# rescue MyException => e -# # do something -# end -# -# # good -# begin -# # do something -# rescue MyException => _e -# # do something -# end -# @example PreferredName: exception -# # bad -# begin -# # do something -# rescue MyException => e -# # do something -# end -# -# # good -# begin -# # do something -# rescue MyException => exception -# # do something -# end -# -# # good -# begin -# # do something -# rescue MyException => _exception -# # do something -# end -# -# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#61 -class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#66 - def on_resbody(node); end - - private - - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#96 - def autocorrect(corrector, node, range, offending_name, preferred_name); end - - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#116 - def correct_node(corrector, node, offending_name, preferred_name); end - - # If the exception variable is reassigned, that assignment needs to be corrected. - # Further `lvar` nodes will not be corrected though since they now refer to a - # different variable. - # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#134 - def correct_reassignment(corrector, node, offending_name, preferred_name); end - - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#159 - def message(node); end - - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#91 - def offense_range(resbody); end - - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#143 - def preferred_name(variable_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#165 - def shadowed_variable_name?(node); end - - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#152 - def variable_name(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#106 - def variable_name_matches?(node, name); end -end - -# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#64 -RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil), String) - -# Makes sure that all variables use the configured style, -# snake_case or camelCase, for their names. -# -# @example EnforcedStyle: snake_case (default) -# # bad -# fooBar = 1 -# -# # good -# foo_bar = 1 -# @example EnforcedStyle: camelCase -# # bad -# foo_bar = 1 -# -# # good -# fooBar = 1 -# @example AllowedIdentifiers: ['fooBar'] -# # good (with EnforcedStyle: snake_case) -# fooBar = 1 -# @example AllowedPatterns: ['_v\d+\z'] -# # good (with EnforcedStyle: camelCase) -# :release_v1 -# -# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#31 -class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedIdentifiers - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableNaming - include ::RuboCop::Cop::AllowedPattern - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 - def on_arg(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 - def on_blockarg(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 - def on_kwarg(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 - def on_kwoptarg(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 - def on_kwrestarg(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 - def on_lvar(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 - def on_optarg(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 - def on_restarg(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#38 - def valid_name?(node, name, given_style = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#62 - def message(style); end -end - -# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#36 -RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) - -# Makes sure that all numbered variables use the -# configured style, snake_case, normalcase, or non_integer, -# for their numbering. -# -# Additionally, `CheckMethodNames` and `CheckSymbols` configuration options -# can be used to specify whether method names and symbols should be checked. -# Both are enabled by default. -# -# @example AllowedPatterns: ['_v\d+\z'] -# # good -# :some_sym_v1 -# @example EnforcedStyle: snake_case -# # bad -# :some_sym1 -# variable1 = 1 -# -# def some_method1; end -# -# def some_method_1(arg1); end -# -# # good -# :some_sym_1 -# variable_1 = 1 -# -# def some_method_1; end -# -# def some_method_1(arg_1); end -# @example EnforcedStyle: non_integer -# # bad -# :some_sym1 -# :some_sym_1 -# -# variable1 = 1 -# variable_1 = 1 -# -# def some_method1; end -# -# def some_method_1; end -# -# def some_methodone(arg1); end -# def some_methodone(arg_1); end -# -# # good -# :some_symone -# :some_sym_one -# -# variableone = 1 -# variable_one = 1 -# -# def some_methodone; end -# -# def some_method_one; end -# -# def some_methodone(argone); end -# def some_methodone(arg_one); end -# -# # In the following examples, we assume `EnforcedStyle: normalcase` (default). -# @example CheckMethodNames: true (default) -# # bad -# def some_method_1; end -# @example CheckMethodNames: false -# # good -# def some_method_1; end -# @example CheckSymbols: true (default) -# # bad -# :some_sym_1 -# @example CheckSymbols: false -# # good -# :some_sym_1 -# @example AllowedIdentifiers: [capture3] -# # good -# expect(Open3).to receive(:capture3) -# @example EnforcedStyle: normalcase (default) -# # bad -# :some_sym_1 -# variable_1 = 1 -# -# def some_method_1; end -# -# def some_method1(arg_1); end -# -# # good -# :some_sym1 -# variable1 = 1 -# -# def some_method1; end -# -# def some_method1(arg1); end -# -# source://rubocop//lib/rubocop/cop/naming/variable_number.rb#103 -class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedIdentifiers - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableNumbering - include ::RuboCop::Cop::AllowedPattern - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 - def on_arg(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#126 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#126 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#134 - def on_sym(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#110 - def valid_name?(node, name, given_style = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#143 - def message(style); end -end - -# source://rubocop//lib/rubocop/cop/naming/variable_number.rb#108 -RuboCop::Cop::Naming::VariableNumber::MSG = T.let(T.unsafe(nil), String) - -# Some common code shared between `NegatedIf` and -# `NegatedWhile` cops. -# -# source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#7 -module RuboCop::Cop::NegativeConditional - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#18 - def empty_condition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#15 - def single_negative?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#20 - def check_negative_conditional(node, message:, &block); end -end - -# source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#10 -RuboCop::Cop::NegativeConditional::MSG = T.let(T.unsafe(nil), String) - -# This module provides a list of methods that are: -# 1. In the NilClass by default -# 2. Added to NilClass by explicitly requiring any standard libraries -# 3. Cop's configuration parameter AllowedMethods. -# -# source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#9 -module RuboCop::Cop::NilMethods - include ::RuboCop::Cop::AllowedMethods - - private - - # source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#14 - def nil_methods; end - - # source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#18 - def other_stdlib_methods; end -end - -# An offense represents a style violation detected by RuboCop. -# -# source://rubocop//lib/rubocop/cop/offense.rb#6 -class RuboCop::Cop::Offense - include ::Comparable - - # @api private - # @return [Offense] a new instance of Offense - # - # source://rubocop//lib/rubocop/cop/offense.rb#84 - def initialize(severity, location, message, cop_name, status = T.unsafe(nil), corrector = T.unsafe(nil)); end - - # Returns `-1`, `0`, or `+1` - # if this offense is less than, equal to, or greater than `other`. - # - # @api public - # @return [Integer] comparison result - # - # source://rubocop//lib/rubocop/cop/offense.rb#230 - def <=>(other); end - - # @api public - # @return [Boolean] returns `true` if two offenses contain same attributes - # - # source://rubocop//lib/rubocop/cop/offense.rb#211 - def ==(other); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#160 - def column; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#170 - def column_length; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#194 - def column_range; end - - # @api public - # @example - # 'LineLength' - # @return [String] a cop class name without department. - # i.e. type of the violation. - # - # source://rubocop//lib/rubocop/cop/offense.rb#51 - def cop_name; end - - # @api public - # @return [Boolean] whether this offense can be automatically corrected via - # autocorrect or a todo. - # - # source://rubocop//lib/rubocop/cop/offense.rb#102 - def correctable?; end - - # @api public - # @return [Boolean] whether this offense is automatically corrected via - # autocorrect or a todo. - # - # source://rubocop//lib/rubocop/cop/offense.rb#113 - def corrected?; end - - # @api public - # @return [Boolean] whether this offense is automatically disabled via a todo. - # - # source://rubocop//lib/rubocop/cop/offense.rb#123 - def corrected_with_todo?; end - - # @api public - # @return [Corrector | nil] the autocorrection for this offense, or `nil` when not available - # - # source://rubocop//lib/rubocop/cop/offense.rb#62 - def corrector; end - - # @api public - # @return [Boolean] whether this offense was locally disabled with a - # disable or todo where it occurred. - # - # source://rubocop//lib/rubocop/cop/offense.rb#134 - def disabled?; end - - # @api public - # @return [Boolean] returns `true` if two offenses contain same attributes - # - # source://rubocop//lib/rubocop/cop/offense.rb#211 - def eql?(other); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#179 - def first_line; end - - # source://rubocop//lib/rubocop/cop/offense.rb#219 - def hash; end - - # @api public - # @return [Parser::Source::Range] the range of the code that is highlighted - # - # source://rubocop//lib/rubocop/cop/offense.rb#142 - def highlighted_area; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#189 - def last_column; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#184 - def last_line; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#155 - def line; end - - # @api public - # @return [Parser::Source::Range] the location where the violation is detected. - # @see https://www.rubydoc.info/gems/parser/Parser/Source/Range Parser::Source::Range - # - # source://rubocop//lib/rubocop/cop/offense.rb#28 - def location; end - - # @api public - # @example - # 'Line is too long. [90/80]' - # @return [String] human-readable message - # - # source://rubocop//lib/rubocop/cop/offense.rb#39 - def message; end - - # Internally we use column number that start at 0, but when - # outputting column numbers, we want them to start at 1. One - # reason is that editors, such as Emacs, expect this. - # - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#203 - def real_column; end - - # @api public - # @return [RuboCop::Cop::Severity] - # - # source://rubocop//lib/rubocop/cop/offense.rb#17 - def severity; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#165 - def source_line; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#54 - def status; end - - # This is just for debugging purpose. - # - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#148 - def to_s; end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/offense.rb#10 -RuboCop::Cop::Offense::COMPARISON_ATTRIBUTES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/offense.rb#81 -RuboCop::Cop::Offense::NO_LOCATION = T.let(T.unsafe(nil), RuboCop::Cop::Offense::PseudoSourceRange) - -# source://rubocop//lib/rubocop/cop/offense.rb#64 -class RuboCop::Cop::Offense::PseudoSourceRange < ::Struct - # Returns the value of attribute begin_pos - # - # @return [Object] the current value of begin_pos - def begin_pos; end - - # Sets the attribute begin_pos - # - # @param value [Object] the value to set the attribute begin_pos to. - # @return [Object] the newly set value - def begin_pos=(_); end - - # Returns the value of attribute column - # - # @return [Object] the current value of column - def column; end - - # Sets the attribute column - # - # @param value [Object] the value to set the attribute column to. - # @return [Object] the newly set value - def column=(_); end - - # source://rubocop//lib/rubocop/cop/offense.rb#70 - def column_range; end - - # Returns the value of attribute end_pos - # - # @return [Object] the current value of end_pos - def end_pos; end - - # Sets the attribute end_pos - # - # @param value [Object] the value to set the attribute end_pos to. - # @return [Object] the newly set value - def end_pos=(_); end - - # Returns the value of attribute line - # - # @return [Object] the current value of line - def first_line; end - - # Returns the value of attribute column - # - # @return [Object] the current value of column - def last_column; end - - # Returns the value of attribute line - # - # @return [Object] the current value of line - def last_line; end - - # source://rubocop//lib/rubocop/cop/offense.rb#74 - def length; end - - # Returns the value of attribute line - # - # @return [Object] the current value of line - def line; end - - # Sets the attribute line - # - # @param value [Object] the value to set the attribute line to. - # @return [Object] the newly set value - def line=(_); end - - # source://rubocop//lib/rubocop/cop/offense.rb#74 - def size; end - - # Returns the value of attribute source_line - # - # @return [Object] the current value of source_line - def source_line; end - - # Sets the attribute source_line - # - # @param value [Object] the value to set the attribute source_line to. - # @return [Object] the newly set value - def source_line=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Common functionality for cops checking if and unless expressions. -# -# source://rubocop//lib/rubocop/cop/mixin/on_normal_if_unless.rb#6 -module RuboCop::Cop::OnNormalIfUnless - # source://rubocop//lib/rubocop/cop/mixin/on_normal_if_unless.rb#7 - def on_if(node); end -end - -# This autocorrects gem dependency order -# -# source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#6 -class RuboCop::Cop::OrderedGemCorrector - extend ::RuboCop::Cop::OrderedGemNode - extend ::RuboCop::Cop::RangeHelp - - class << self - # Returns the value of attribute comments_as_separators. - # - # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#11 - def comments_as_separators; end - - # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#13 - def correct(processed_source, node, previous_declaration, comments_as_separators); end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#11 - def processed_source; end - - private - - # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#26 - def declaration_with_comment(node); end - end -end - -# Common functionality for Bundler/OrderedGems and -# Gemspec/OrderedDependencies. -# -# source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#7 -module RuboCop::Cop::OrderedGemNode - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#23 - def case_insensitive_out_of_order?(string_a, string_b); end - - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#27 - def consecutive_lines(previous, current); end - - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#55 - def find_gem_name(gem_node); end - - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#18 - def gem_canonical_name(name); end - - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#49 - def gem_name(declaration_node); end - - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#10 - def get_source_range(node, comments_as_separators); end - - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#32 - def register_offense(previous, current); end - - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#61 - def treat_comments_as_separators; end -end - -# Common functionality for handling parentheses. -# -# source://rubocop//lib/rubocop/cop/mixin/parentheses.rb#6 -module RuboCop::Cop::Parentheses - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/parentheses.rb#9 - def parens_required?(node); end -end - -# This autocorrects parentheses -# -# source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#6 -class RuboCop::Cop::ParenthesesCorrector - extend ::RuboCop::Cop::RangeHelp - - class << self - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#12 - def correct(corrector, node); end - - private - - # Add a comma back after the heredoc identifier - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#74 - def add_heredoc_comma(corrector, node); end - - # If the node contains a heredoc, remove the comma too - # It'll be added back in the right place later - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#64 - def extend_range_for_heredoc(node, range); end - - # If removing parentheses leaves a comma on its own line, remove all the whitespace - # preceding it to prevent a syntax error. - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#41 - def handle_orphaned_comma(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#80 - def heredoc?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#28 - def next_char_is_question_mark?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#32 - def only_closing_paren_before_comma?(node); end - - # Get a range for the closing parenthesis and all whitespace to the left of it - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#51 - def parens_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#24 - def ternary_condition?(node); end - end -end - -# Common functionality for handling percent arrays. -# -# source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#6 -module RuboCop::Cop::PercentArray - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#26 - def allowed_bracket_array?(node); end - - # @param node [RuboCop::AST::ArrayNode] - # @param elements [Array] - # @return [String] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#83 - def build_bracketed_array_with_appropriate_whitespace(elements:, node:); end - - # @param preferred_array_code [String] - # @return [String] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#56 - def build_message_for_bracketed_array(preferred_array_code); end - - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#67 - def check_bracketed_array(node, literal_prefix); end - - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#36 - def check_percent_array(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#31 - def comments_in_array?(node); end - - # Override to determine values that are invalid in a percent array - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#22 - def invalid_percent_array_contents?(_node); end - - # Ruby does not allow percent arrays in an ambiguous block context. - # - # @example - # - # foo %i[bar baz] { qux } - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#14 - def invalid_percent_array_context?(node); end - - # Provides whitespace between elements for building a bracketed array. - # %w[ a b c ] - # ^^^ - # - # @param node [RuboCop::AST::ArrayNode] - # @return [String] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#98 - def whitespace_between(node); end - - # Provides leading whitespace for building a bracketed array. - # %w[ a b c ] - # ^^ - # - # @param node [RuboCop::AST::ArrayNode] - # @return [String] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#111 - def whitespace_leading(node); end - - # Provides trailing whitespace for building a bracketed array. - # %w[ a b c ] - # ^^^^ - # - # @param node [RuboCop::AST::ArrayNode] - # @return [String] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#120 - def whitespace_trailing(node); end -end - -# Common functionality for handling percent literals. -# -# source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#6 -module RuboCop::Cop::PercentLiteral - include ::RuboCop::Cop::RangeHelp - - private - - # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#23 - def begin_source(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#11 - def percent_literal?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#17 - def process(node, *types); end - - # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#27 - def type(node); end -end - -# This autocorrects percent literals -# -# source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#6 -class RuboCop::Cop::PercentLiteralCorrector - include ::RuboCop::PathUtil - include ::RuboCop::Cop::Util - - # @return [PercentLiteralCorrector] a new instance of PercentLiteralCorrector - # - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#11 - def initialize(config, preferred_delimiters); end - - # Returns the value of attribute config. - # - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#9 - def config; end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#16 - def correct(corrector, node, char); end - - # Returns the value of attribute preferred_delimiters. - # - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#9 - def preferred_delimiters; end - - private - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#46 - def autocorrect_multiline_words(node, escape, delimiters); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#52 - def autocorrect_words(node, escape, delimiters); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#34 - def delimiters_for(type); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#100 - def end_content(source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#30 - def escape_words?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#78 - def first_line?(node, previous_line_num); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#89 - def fix_escaped_content(word_node, escape, delimiters); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#69 - def line_breaks(node, source, previous_line_num, base_line_num, node_index); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#38 - def new_contents(node, escape, delimiters); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#82 - def process_lines(node, previous_line_num, base_line_num, source_in_lines); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#58 - def process_multiline_words(node, escape, delimiters); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#96 - def substitute_escaped_delimiters(content, delimiters); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#26 - def wrap_contents(corrector, node, contents, char, delimiters); end -end - -# Common functionality for checking whether an AST node/token is aligned -# with something on a preceding or following line -# -# source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#7 -module RuboCop::Cop::PrecedingFollowingAlignment - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#93 - def aligned_assignment?(range, line); end - - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#70 - def aligned_comment_lines; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#105 - def aligned_identical?(range, line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#81 - def aligned_operator?(range, line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#77 - def aligned_token?(range, line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#34 - def aligned_with_adjacent_line?(range, predicate); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#52 - def aligned_with_any_line?(line_ranges, range, indent = T.unsafe(nil), &predicate); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#42 - def aligned_with_any_line_range?(line_ranges, range, &predicate); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#98 - def aligned_with_append_operator?(range, line); end - - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#109 - def aligned_with_assignment(token, line_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#56 - def aligned_with_line?(line_nos, range, indent = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#18 - def aligned_with_operator?(range); end - - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#22 - def aligned_with_preceding_assignment(token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#14 - def aligned_with_something?(range); end - - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#28 - def aligned_with_subsequent_assignment(token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#85 - def aligned_words?(range, line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#10 - def allow_for_alignment?; end - - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#127 - def assignment_lines; end - - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#131 - def assignment_tokens; end - - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#147 - def relevant_assignment_lines(line_range); end - - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#174 - def remove_optarg_equals(asgn_tokens, processed_source); end -end - -# Common functionality for handling percent literal delimiters. -# -# source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#6 -class RuboCop::Cop::PreferredDelimiters - # @return [PreferredDelimiters] a new instance of PreferredDelimiters - # - # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#11 - def initialize(type, config, preferred_delimiters); end - - # Returns the value of attribute config. - # - # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#7 - def config; end - - # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#17 - def delimiters; end - - # Returns the value of attribute type. - # - # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#7 - def type; end - - private - - # @raise [ArgumentError] - # - # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#23 - def ensure_valid_preferred_delimiters; end - - # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#30 - def preferred_delimiters; end - - # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#45 - def preferred_delimiters_config; end -end - -# source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#9 -RuboCop::Cop::PreferredDelimiters::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) - -# This autocorrects punctuation -# -# source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#6 -class RuboCop::Cop::PunctuationCorrector - class << self - # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#12 - def add_space(corrector, token); end - - # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#8 - def remove_space(corrector, space_before); end - - # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#16 - def swap_comma(corrector, range); end - end -end - -# Methods that calculate and return Parser::Source::Ranges -# -# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#6 -module RuboCop::Cop::RangeHelp - private - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#141 - def add_range(range1, range2); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#82 - def column_offset_between(base_range, range); end - - # A range containing only the contents of a literal with delimiters (e.g. in - # `%i{1 2 3}` this will be the range covering `1 2 3` only). - # - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#32 - def contents_range(node); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#100 - def directions(side); end - - # Returns the column attribute of the range, except if the range is on - # the first line and there's a byte order mark at the beginning of that - # line, in which case 1 is subtracted from the column value. This gives - # the column as it appears when viewing the file in an editor. - # - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#92 - def effective_column(range); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#109 - def final_pos(src, pos, increment, continuations, newlines, whitespace); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#117 - def move_pos(src, pos, step, condition, regexp); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#123 - def move_pos_str(src, pos, step, condition, needle); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#36 - def range_between(start_pos, end_pos); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#73 - def range_by_whole_lines(range, include_final_newline: T.unsafe(nil), buffer: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#134 - def range_with_comments(node); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#130 - def range_with_comments_and_lines(node); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#40 - def range_with_surrounding_comma(range, side = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#55 - def range_with_surrounding_space(range_positional = T.unsafe(nil), range: T.unsafe(nil), side: T.unsafe(nil), newlines: T.unsafe(nil), whitespace: T.unsafe(nil), continuations: T.unsafe(nil), buffer: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#11 - def source_range(source_buffer, line_number, column, length = T.unsafe(nil)); end -end - -# The Unicode codepoint -# -# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#9 -RuboCop::Cop::RangeHelp::BYTE_ORDER_MARK = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#54 -module RuboCop::Cop::RangeHelp::NOT_GIVEN; end - -# Common functionality for handling Rational literals. -# -# source://rubocop//lib/rubocop/cop/mixin/rational_literal.rb#6 -module RuboCop::Cop::RationalLiteral - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/rational_literal.rb#12 - def rational_literal?(param0 = T.unsafe(nil)); end -end - -# Registry that tracks all cops by their badge and department. -# -# source://rubocop//lib/rubocop/cop/registry.rb#19 -class RuboCop::Cop::Registry - include ::Enumerable - - # @return [Registry] a new instance of Registry - # - # source://rubocop//lib/rubocop/cop/registry.rb#51 - def initialize(cops = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/registry.rb#232 - def ==(other); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/registry.rb#97 - def contains_cop_matching?(names); end - - # source://rubocop//lib/rubocop/cop/registry.rb#179 - def cops; end - - # source://rubocop//lib/rubocop/cop/registry.rb#224 - def cops_for_department(department); end - - # @return [Boolean] Checks if given name is department - # - # source://rubocop//lib/rubocop/cop/registry.rb#93 - def department?(name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/registry.rb#147 - def department_missing?(badge, name); end - - # @return [Array] list of departments for current cops. - # - # source://rubocop//lib/rubocop/cop/registry.rb#72 - def departments; end - - # source://rubocop//lib/rubocop/cop/registry.rb#193 - def disabled(config); end - - # source://rubocop//lib/rubocop/cop/registry.rb#67 - def dismiss(cop); end - - # source://rubocop//lib/rubocop/cop/registry.rb#247 - def each(&block); end - - # source://rubocop//lib/rubocop/cop/registry.rb#189 - def enabled(config); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/registry.rb#197 - def enabled?(cop, config); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/registry.rb#213 - def enabled_pending_cop?(cop_cfg, config); end - - # source://rubocop//lib/rubocop/cop/registry.rb#63 - def enlist(cop); end - - # @param cop_name [String] - # @return [Class, nil] - # - # source://rubocop//lib/rubocop/cop/registry.rb#253 - def find_by_cop_name(cop_name); end - - # When a cop name is given returns a single-element array with the cop class. - # When a department name is given returns an array with all the cop classes - # for that department. - # - # source://rubocop//lib/rubocop/cop/registry.rb#260 - def find_cops_by_directive(directive); end - - # source://rubocop//lib/rubocop/cop/registry.rb#265 - def freeze; end - - # source://rubocop//lib/rubocop/cop/registry.rb#184 - def length; end - - # source://rubocop//lib/rubocop/cop/registry.rb#220 - def names; end - - # source://rubocop//lib/rubocop/cop/registry.rb#228 - def names_for_department(department); end - - # Returns the value of attribute options. - # - # source://rubocop//lib/rubocop/cop/registry.rb#49 - def options; end - - # source://rubocop//lib/rubocop/cop/registry.rb#151 - def print_warning(name, path); end - - # Convert a user provided cop name into a properly namespaced name - # - # @example gives back a correctly qualified cop name - # - # registry = RuboCop::Cop::Registry - # registry.qualified_cop_name('Layout/EndOfLine', '') # => 'Layout/EndOfLine' - # @example fixes incorrect namespaces - # - # registry = RuboCop::Cop::Registry - # registry.qualified_cop_name('Lint/EndOfLine', '') # => 'Layout/EndOfLine' - # @example namespaces bare cop identifiers - # - # registry = RuboCop::Cop::Registry - # registry.qualified_cop_name('EndOfLine', '') # => 'Layout/EndOfLine' - # @example passes back unrecognized cop names - # - # registry = RuboCop::Cop::Registry - # registry.qualified_cop_name('NotACop', '') # => 'NotACop' - # @note Emits a warning if the provided name has an incorrect namespace - # @param name [String] Cop name extracted from config - # @param path [String, nil] Path of file that `name` was extracted from - # @param warn [Boolean] Print a warning if no department given for `name` - # @raise [AmbiguousCopName] if a bare identifier with two possible namespaces is provided - # @return [String] Qualified cop name - # - # source://rubocop//lib/rubocop/cop/registry.rb#133 - def qualified_cop_name(name, path, warn: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/registry.rb#166 - def qualify_badge(badge); end - - # source://rubocop//lib/rubocop/cop/registry.rb#243 - def select(&block); end - - # source://rubocop//lib/rubocop/cop/registry.rb#236 - def sort!; end - - # @return [Hash{String => Array}] - # - # source://rubocop//lib/rubocop/cop/registry.rb#174 - def to_h; end - - # source://rubocop//lib/rubocop/cop/registry.rb#159 - def unqualified_cop_names; end - - # @return [Registry] Cops for that specific department. - # - # source://rubocop//lib/rubocop/cop/registry.rb#78 - def with_department(department); end - - # @return [Registry] Cops not for a specific department. - # - # source://rubocop//lib/rubocop/cop/registry.rb#84 - def without_department(department); end - - private - - # source://rubocop//lib/rubocop/cop/registry.rb#283 - def clear_enrollment_queue; end - - # source://rubocop//lib/rubocop/cop/registry.rb#279 - def initialize_copy(reg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/registry.rb#309 - def registered?(badge); end - - # source://rubocop//lib/rubocop/cop/registry.rb#299 - def resolve_badge(given_badge, real_badge, source_path); end - - # source://rubocop//lib/rubocop/cop/registry.rb#295 - def with(cops); end - - class << self - # source://rubocop//lib/rubocop/cop/registry.rb#22 - def all; end - - # Returns the value of attribute global. - # - # source://rubocop//lib/rubocop/cop/registry.rb#274 - def global; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/registry.rb#44 - def qualified_cop?(name); end - - # source://rubocop//lib/rubocop/cop/registry.rb#26 - def qualified_cop_name(name, origin); end - - # source://rubocop//lib/rubocop/cop/registry.rb#40 - def reset!; end - - # Changes momentarily the global registry - # Intended for testing purposes - # - # source://rubocop//lib/rubocop/cop/registry.rb#32 - def with_temporary_global(temp_global = T.unsafe(nil)); end - end -end - -# Ensure a require statement is present for a standard library determined -# by variable library_name -# -# source://rubocop//lib/rubocop/cop/mixin/require_library.rb#7 -module RuboCop::Cop::RequireLibrary - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#12 - def ensure_required(corrector, node, library_name); end - - # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#33 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#24 - def remove_subsequent_requires(corrector, node, library_name); end - - # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#51 - def require_any_library?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#56 - def require_library_name?(param0 = T.unsafe(nil), param1); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#44 - def on_new_investigation; end -end - -# source://rubocop//lib/rubocop/cop/mixin/require_library.rb#10 -RuboCop::Cop::RequireLibrary::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# This class ensures a require statement is present for a standard library -# determined by the variable library_name -# -# source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#7 -class RuboCop::Cop::RequireLibraryCorrector - extend ::RuboCop::Cop::RangeHelp - - class << self - # source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#11 - def correct(corrector, node, library_name); end - - # source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#17 - def require_statement(library_name); end - end -end - -# Common functionality for checking `rescue` nodes. -# -# source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#6 -module RuboCop::Cop::RescueNode - # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#7 - def modifier_locations; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#13 - def rescue_modifier?(node); end - - # @deprecated Use ResbodyNode#exceptions instead - # - # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#20 - def rescued_exceptions(resbody); end -end - -# Common functionality for safe assignment. By safe assignment we mean -# putting parentheses around an assignment to indicate "I know I'm using an -# assignment as a condition. It's not a mistake." -# -# source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#8 -module RuboCop::Cop::SafeAssignment - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#14 - def empty_condition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#20 - def safe_assignment?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#17 - def setter_method?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#22 - def safe_assignment_allowed?; end -end - -# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#5 -module RuboCop::Cop::Security; end - -# Checks for implementations of the `hash` method which combine -# values using custom logic instead of delegating to `Array#hash`. -# -# Manually combining hashes is error prone and hard to follow, especially -# when there are many values. Poor implementations may also introduce -# performance or security concerns if they are prone to collisions. -# Delegating to `Array#hash` is clearer and safer, although it might be slower -# depending on the use case. -# -# @example -# -# # bad -# def hash -# @foo ^ @bar -# end -# -# # good -# def hash -# [@foo, @bar].hash -# end -# -# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#30 -class RuboCop::Cop::Security::CompoundHash < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#58 - def bad_hash_combinator?(param0 = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#75 - def contained_in_hash_method?(node, &block); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#42 - def dynamic_hash_method_definition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#37 - def hash_method_definition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#63 - def monuple_hash?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#87 - def on_op_asgn(node); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#87 - def on_send(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#81 - def outer_bad_hash_combinator?(node); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#68 - def redundant_hash?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#51 - def static_hash_method_definition?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#31 -RuboCop::Cop::Security::CompoundHash::COMBINATOR_IN_HASH_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#32 -RuboCop::Cop::Security::CompoundHash::MONUPLE_HASH_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#34 -RuboCop::Cop::Security::CompoundHash::REDUNDANT_HASH_MSG = T.let(T.unsafe(nil), String) - -# Checks for the use of `Kernel#eval` and `Binding#eval`. -# -# @example -# -# # bad -# -# eval(something) -# binding.eval(something) -# -# source://rubocop//lib/rubocop/cop/security/eval.rb#14 -class RuboCop::Cop::Security::Eval < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/security/eval.rb#19 - def eval?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/security/eval.rb#23 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/security/eval.rb#15 -RuboCop::Cop::Security::Eval::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/eval.rb#16 -RuboCop::Cop::Security::Eval::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the first argument to `IO.read`, `IO.binread`, `IO.write`, `IO.binwrite`, -# `IO.foreach`, and `IO.readlines`. -# -# If argument starts with a pipe character (`'|'`) and the receiver is the `IO` class, -# a subprocess is created in the same way as `Kernel#open`, and its output is returned. -# `Kernel#open` may allow unintentional command injection, which is the reason these -# `IO` methods are a security risk. -# Consider to use `File.read` to disable the behavior of subprocess invocation. -# -# @example -# -# # bad -# IO.read(path) -# IO.read('path') -# -# # good -# File.read(path) -# File.read('path') -# IO.read('| command') # Allow intentional command invocation. -# -# source://rubocop//lib/rubocop/cop/security/io_methods.rb#30 -class RuboCop::Cop::Security::IoMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/security/io_methods.rb#36 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/security/io_methods.rb#33 -RuboCop::Cop::Security::IoMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/io_methods.rb#34 -RuboCop::Cop::Security::IoMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the use of JSON class methods which have potential -# security issues. -# -# @example -# # bad -# JSON.load("{}") -# JSON.restore("{}") -# -# # good -# JSON.parse("{}") -# -# source://rubocop//lib/rubocop/cop/security/json_load.rb#26 -class RuboCop::Cop::Security::JSONLoad < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/security/json_load.rb#33 - def json_load(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/security/json_load.rb#37 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/security/json_load.rb#29 -RuboCop::Cop::Security::JSONLoad::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/json_load.rb#30 -RuboCop::Cop::Security::JSONLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the use of Marshal class methods which have -# potential security issues leading to remote code execution when -# loading from an untrusted source. -# -# @example -# # bad -# Marshal.load("{}") -# Marshal.restore("{}") -# -# # good -# Marshal.dump("{}") -# -# # okish - deep copy hack -# Marshal.load(Marshal.dump({})) -# -# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#21 -class RuboCop::Cop::Security::MarshalLoad < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/security/marshal_load.rb#26 - def marshal_load(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/security/marshal_load.rb#31 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#22 -RuboCop::Cop::Security::MarshalLoad::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#23 -RuboCop::Cop::Security::MarshalLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the use of `Kernel#open` and `URI.open` with dynamic -# data. -# -# `Kernel#open` and `URI.open` enable not only file access but also process -# invocation by prefixing a pipe symbol (e.g., `open("| ls")`). -# So, it may lead to a serious security risk by using variable input to -# the argument of `Kernel#open` and `URI.open`. It would be better to use -# `File.open`, `IO.popen` or `URI.parse#open` explicitly. -# -# NOTE: `open` and `URI.open` with literal strings are not flagged by this -# cop. -# -# @example -# # bad -# open(something) -# open("| #{something}") -# open("| foo") -# URI.open(something) -# -# # good -# File.open(something) -# IO.popen(something) -# URI.parse(something).open -# -# # good (literal strings) -# open("foo.text") -# URI.open("http://example.com") -# -# source://rubocop//lib/rubocop/cop/security/open.rb#37 -class RuboCop::Cop::Security::Open < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/security/open.rb#46 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/security/open.rb#42 - def open?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/open.rb#75 - def composite_string?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/open.rb#83 - def concatenated_string?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/open.rb#79 - def interpolated_string?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/open.rb#57 - def safe?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/open.rb#67 - def safe_argument?(argument); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/open.rb#71 - def simple_string?(node); end -end - -# source://rubocop//lib/rubocop/cop/security/open.rb#38 -RuboCop::Cop::Security::Open::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/open.rb#39 -RuboCop::Cop::Security::Open::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the use of YAML class methods which have -# potential security issues leading to remote code execution when -# loading from an untrusted source. -# -# NOTE: Ruby 3.1+ (Psych 4) uses `Psych.load` as `Psych.safe_load` by default. -# -# @example -# # bad -# YAML.load("--- !ruby/object:Foo {}") # Psych 3 is unsafe by default -# -# # good -# YAML.safe_load("--- !ruby/object:Foo {}", [Foo]) # Ruby 2.5 (Psych 3) -# YAML.safe_load("--- !ruby/object:Foo {}", permitted_classes: [Foo]) # Ruby 3.0- (Psych 3) -# YAML.load("--- !ruby/object:Foo {}", permitted_classes: [Foo]) # Ruby 3.1+ (Psych 4) -# YAML.dump(foo) -# -# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#26 -class RuboCop::Cop::Security::YAMLLoad < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/security/yaml_load.rb#37 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/security/yaml_load.rb#33 - def yaml_load(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#29 -RuboCop::Cop::Security::YAMLLoad::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#30 -RuboCop::Cop::Security::YAMLLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Severity class is simple value object about severity -# -# source://rubocop//lib/rubocop/cop/severity.rb#6 -class RuboCop::Cop::Severity - include ::Comparable - - # @api private - # @raise [ArgumentError] - # @return [Severity] a new instance of Severity - # - # source://rubocop//lib/rubocop/cop/severity.rb#30 - def initialize(name_or_code); end - - # source://rubocop//lib/rubocop/cop/severity.rb#62 - def <=>(other); end - - # source://rubocop//lib/rubocop/cop/severity.rb#50 - def ==(other); end - - # source://rubocop//lib/rubocop/cop/severity.rb#42 - def code; end - - # source://rubocop//lib/rubocop/cop/severity.rb#58 - def hash; end - - # source://rubocop//lib/rubocop/cop/severity.rb#46 - def level; end - - # @api public - # @return [Symbol] severity. - # any of `:info`, `:refactor`, `:convention`, `:warning`, `:error` or `:fatal`. - # - # source://rubocop//lib/rubocop/cop/severity.rb#22 - def name; end - - # source://rubocop//lib/rubocop/cop/severity.rb#38 - def to_s; end - - class << self - # source://rubocop//lib/rubocop/cop/severity.rb#24 - def name_from_code(code); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/severity.rb#12 -RuboCop::Cop::Severity::CODE_TABLE = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/severity.rb#9 -RuboCop::Cop::Severity::NAMES = T.let(T.unsafe(nil), Array) - -# Common functionality for cops checking for missing space after -# punctuation. -# -# source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#7 -module RuboCop::Cop::SpaceAfterPunctuation - # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#10 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#38 - def allowed_type?(token); end - - # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#20 - def each_missing_space(tokens); end - - # The normal offset, i.e., the distance from the punctuation - # token where a space should be, is 1. - # - # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#49 - def offset; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#42 - def space_forbidden_before_rcurly?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#30 - def space_missing?(token1, token2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#34 - def space_required_before?(token); end -end - -# source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#8 -RuboCop::Cop::SpaceAfterPunctuation::MSG = T.let(T.unsafe(nil), String) - -# Common functionality for cops checking for space before -# punctuation. -# -# source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#7 -module RuboCop::Cop::SpaceBeforePunctuation - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#12 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#22 - def each_missing_space(tokens); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#34 - def space_missing?(token1, token2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#38 - def space_required_after?(token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#42 - def space_required_after_lcurly?; end -end - -# source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#10 -RuboCop::Cop::SpaceBeforePunctuation::MSG = T.let(T.unsafe(nil), String) - -# This autocorrects whitespace -# -# source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#6 -class RuboCop::Cop::SpaceCorrector - extend ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::SurroundingSpace - - class << self - # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#36 - def add_space(processed_source, corrector, left_token, right_token); end - - # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#12 - def empty_corrections(processed_source, corrector, empty_config, left_token, right_token); end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#10 - def processed_source; end - - # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#24 - def remove_space(processed_source, corrector, left_token, right_token); end - end -end - -# Common functionality for modifier cops. -# -# source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#6 -module RuboCop::Cop::StatementModifier - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp - - private - - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#79 - def code_after(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#103 - def comment_disables_cop?(comment); end - - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#71 - def first_line_comment(node); end - - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#58 - def if_body_source(if_body); end - - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#44 - def length_in_modifier_form(node); end - - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#97 - def max_line_length; end - - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#67 - def method_source(if_body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#38 - def modifier_fits_on_single_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#27 - def non_eligible_body?(body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#34 - def non_eligible_condition?(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#20 - def non_eligible_node?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#85 - def parenthesize?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#12 - def single_line_as_modifier?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#51 - def to_modifier_form(node); end -end - -# Classes that include this module just implement functions to determine -# what is an offense and how to do autocorrection. They get help with -# adding offenses for the faulty string nodes, and with filtering out -# nodes. -# -# source://rubocop//lib/rubocop/cop/mixin/string_help.rb#9 -module RuboCop::Cop::StringHelp - # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#26 - def on_regexp(node); end - - # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#10 - def on_str(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#32 - def inside_interpolation?(node); end -end - -# This autocorrects string literals -# -# source://rubocop//lib/rubocop/cop/correctors/string_literal_corrector.rb#6 -class RuboCop::Cop::StringLiteralCorrector - extend ::RuboCop::PathUtil - extend ::RuboCop::Cop::Util - - class << self - # source://rubocop//lib/rubocop/cop/correctors/string_literal_corrector.rb#10 - def correct(corrector, node, style); end - end -end - -# Common functionality for cops checking single/double quotes. -# -# source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#6 -module RuboCop::Cop::StringLiteralsHelp - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#9 - def wrong_quotes?(src_or_node); end -end - -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#5 -module RuboCop::Cop::Style; end - -# Access modifiers should be declared to apply to a group of methods -# or inline before each method, depending on configuration. -# EnforcedStyle config covers only method definitions. -# Applications of visibility methods to symbols can be controlled -# using AllowModifiersOnSymbols config. -# Also, the visibility of `attr*` methods can be controlled using -# AllowModifiersOnAttrs config. -# -# In Ruby 3.0, `attr*` methods now return an array of defined method names -# as symbols. So we can write the modifier and `attr*` in inline style. -# AllowModifiersOnAttrs config allows `attr*` methods to be written in -# inline style without modifying applications that have been maintained -# for a long time in group style. Furthermore, developers who are not very -# familiar with Ruby may know that the modifier applies to `def`, but they -# may not know that it also applies to `attr*` methods. It would be easier -# to understand if we could write `attr*` methods in inline style. -# -# @example EnforcedStyle: group (default) -# # bad -# class Foo -# -# private def bar; end -# private def baz; end -# -# end -# -# # good -# class Foo -# -# private -# -# def bar; end -# def baz; end -# -# end -# @example EnforcedStyle: inline -# # bad -# class Foo -# -# private -# -# def bar; end -# def baz; end -# -# end -# -# # good -# class Foo -# -# private def bar; end -# private def baz; end -# -# end -# @example AllowModifiersOnSymbols: true (default) -# # good -# class Foo -# -# private :bar, :baz -# -# end -# @example AllowModifiersOnSymbols: false -# # bad -# class Foo -# -# private :bar, :baz -# -# end -# @example AllowModifiersOnAttrs: true (default) -# # good -# class Foo -# -# public attr_reader :bar -# protected attr_writer :baz -# private attr_accessor :qux -# private attr :quux -# -# def public_method; end -# -# private -# -# def private_method; end -# -# end -# @example AllowModifiersOnAttrs: false -# # bad -# class Foo -# -# public attr_reader :bar -# protected attr_writer :baz -# private attr_accessor :qux -# private attr :quux -# -# end -# -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#109 -class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#135 - def access_modifier_with_attr?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#130 - def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#140 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#195 - def access_modifier_is_inlined?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#199 - def access_modifier_is_not_inlined?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#177 - def allow_modifiers_on_attrs?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#173 - def allow_modifiers_on_symbols?(node); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#158 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#269 - def def_source(node, def_node); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#230 - def find_argument_less_modifier_node(node); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 - def find_corresponding_def_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#187 - def group_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#191 - def inline_style?; end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#261 - def insert_inline_modifier(corrector, node, modifier_name); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#209 - def message(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#181 - def offense?(node); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#265 - def remove_node(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#244 - def replace_def(corrector, node, def_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#203 - def right_siblings_same_inline_method?(node); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#238 - def select_grouped_def_nodes(node); end -end - -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#127 -RuboCop::Cop::Style::AccessModifierDeclarations::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#115 -RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#120 -RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#125 -RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for grouping of accessors in `class` and `module` bodies. -# By default it enforces accessors to be placed in grouped declarations, -# but it can be configured to enforce separating them in multiple declarations. -# -# NOTE: If there is a method call before the accessor method it is always allowed -# as it might be intended like Sorbet. -# -# @example EnforcedStyle: grouped (default) -# # bad -# class Foo -# attr_reader :bar -# attr_reader :bax -# attr_reader :baz -# end -# -# # good -# class Foo -# attr_reader :bar, :bax, :baz -# end -# -# # good -# class Foo -# # may be intended comment for bar. -# attr_reader :bar -# -# sig { returns(String) } -# attr_reader :bax -# -# may_be_intended_annotation :baz -# attr_reader :baz -# end -# @example EnforcedStyle: separated -# # bad -# class Foo -# attr_reader :bar, :baz -# end -# -# # good -# class Foo -# attr_reader :bar -# attr_reader :baz -# end -# -# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#50 -class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::VisibilityHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 - def on_sclass(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#82 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#71 - def check(send_node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#114 - def class_send_elements(class_node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#157 - def group_accessors(node, accessors); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#96 - def groupable_accessor?(node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#134 - def groupable_sibling_accessors(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#126 - def grouped_style?; end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#143 - def message(send_node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#148 - def preferred_accessors(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#91 - def previous_line_comment?(node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#163 - def separate_accessors(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#130 - def separated_style?; end -end - -# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#56 -RuboCop::Cop::Style::AccessorGrouping::GROUPED_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#57 -RuboCop::Cop::Style::AccessorGrouping::SEPARATED_MSG = T.let(T.unsafe(nil), String) - -# Enforces the use of either `#alias` or `#alias_method` -# depending on configuration. -# It also flags uses of `alias :symbol` rather than `alias bareword`. -# -# However, it will always enforce `method_alias` when used `alias` -# in an instance method definition and in a singleton method definition. -# If used in a block, always enforce `alias_method` -# unless it is an `instance_eval` block. -# -# @example EnforcedStyle: prefer_alias (default) -# # bad -# alias_method :bar, :foo -# alias :bar :foo -# -# # good -# alias bar foo -# @example EnforcedStyle: prefer_alias_method -# # bad -# alias :bar :foo -# alias bar foo -# -# # good -# alias_method :bar, :foo -# -# source://rubocop//lib/rubocop/cop/style/alias.rb#31 -class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/alias.rb#52 - def on_alias(node); end - - # source://rubocop//lib/rubocop/cop/style/alias.rb#41 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/alias.rb#86 - def add_offense_for_args(node, &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/alias.rb#76 - def alias_keyword_possible?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/alias.rb#80 - def alias_method_possible?(node); end - - # source://rubocop//lib/rubocop/cop/style/alias.rb#66 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/alias.rb#125 - def bareword?(sym_node); end - - # source://rubocop//lib/rubocop/cop/style/alias.rb#129 - def correct_alias_method_to_alias(corrector, send_node); end - - # source://rubocop//lib/rubocop/cop/style/alias.rb#136 - def correct_alias_to_alias_method(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/alias.rb#143 - def correct_alias_with_symbol_args(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/alias.rb#148 - def identifier(node); end - - # source://rubocop//lib/rubocop/cop/style/alias.rb#114 - def lexical_scope_type(node); end - - # In this expression, will `self` be the same as the innermost enclosing - # class or module block (:lexical)? Or will it be something else - # (:dynamic)? If we're in an instance_eval block, return that. - # - # source://rubocop//lib/rubocop/cop/style/alias.rb#97 - def scope_type(node); end -end - -# source://rubocop//lib/rubocop/cop/style/alias.rb#35 -RuboCop::Cop::Style::Alias::MSG_ALIAS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/alias.rb#36 -RuboCop::Cop::Style::Alias::MSG_ALIAS_METHOD = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/alias.rb#37 -RuboCop::Cop::Style::Alias::MSG_SYMBOL_ARGS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/alias.rb#39 -RuboCop::Cop::Style::Alias::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for uses of `and` and `or`, and suggests using `&&` and -# `||` instead. It can be configured to check only in conditions or in -# all contexts. -# -# @example EnforcedStyle: conditionals (default) -# # bad -# if foo and bar -# end -# -# # good -# foo.save && return -# -# # good -# foo.save and return -# -# # good -# if foo && bar -# end -# @example EnforcedStyle: always -# # bad -# foo.save and return -# -# # bad -# if foo and bar -# end -# -# # good -# foo.save && return -# -# # good -# if foo && bar -# end -# -# source://rubocop//lib/rubocop/cop/style/and_or.rb#44 -class RuboCop::Cop::Style::AndOr < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#51 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#51 - def on_or(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 - def on_until_post(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 - def on_while(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 - def on_while_post(node); end - - private - - # ! is a special case: - # 'x and !obj.method arg' can be autocorrected if we - # recurse down a level and add parens to 'obj.method arg' - # however, 'not x' also parses as (send x :!) - # - # source://rubocop//lib/rubocop/cop/style/and_or.rb#117 - def correct_not(node, receiver, corrector); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#129 - def correct_other(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#95 - def correct_send(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#108 - def correct_setter(node, corrector); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/and_or.rb#143 - def correctable_send?(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#135 - def keep_operator_precedence(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#91 - def message(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#85 - def on_conditionals(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#66 - def process_logical_operator(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#147 - def whitespace_before_arg(node); end -end - -# source://rubocop//lib/rubocop/cop/style/and_or.rb#49 -RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) - -# In Ruby 2.7, arguments forwarding has been added. -# -# This cop identifies places where `do_something(*args, &block)` -# can be replaced by `do_something(...)`. -# -# In Ruby 3.1, anonymous block forwarding has been added. -# -# This cop identifies places where `do_something(&block)` can be replaced -# by `do_something(&)`; if desired, this functionality can be disabled -# by setting `UseAnonymousForwarding: false`. -# -# In Ruby 3.2, anonymous args/kwargs forwarding has been added. -# -# This cop also identifies places where `use_args(*args)`/`use_kwargs(**kwargs)` can be -# replaced by `use_args(*)`/`use_kwargs(**)`; if desired, this functionality can be disabled -# by setting `UseAnonymousForwarding: false`. -# -# And this cop has `RedundantRestArgumentNames`, `RedundantKeywordRestArgumentNames`, -# and `RedundantBlockArgumentNames` options. This configuration is a list of redundant names -# that are sufficient for anonymizing meaningless naming. -# -# Meaningless names that are commonly used can be anonymized by default: -# e.g., `*args`, `**options`, `&block`, and so on. -# -# Names not on this list are likely to be meaningful and are allowed by default. -# -# This cop handles not only method forwarding but also forwarding to `super`. -# -# @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default) -# # bad - But it is good with `EnforcedStyle: explicit` set for `Naming/BlockForwarding`. -# def foo(&block) -# bar(&block) -# end -# -# # good -# def foo(&) -# bar(&) -# end -# @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2) -# # bad -# def foo(*args, **kwargs, &block) -# args_only(*args) -# kwargs_only(**kwargs) -# block_only(&block) -# end -# -# # good -# def foo(*, **, &) -# args_only(*) -# kwargs_only(**) -# block_only(&) -# end -# @example UseAnonymousForwarding: false (only relevant for Ruby >= 3.2) -# # good -# def foo(*args, **kwargs, &block) -# args_only(*args) -# kwargs_only(**kwargs) -# block_only(&block) -# end -# @example AllowOnlyRestArgument: true (default, only relevant for Ruby < 3.2) -# # good -# def foo(*args) -# bar(*args) -# end -# -# def foo(**kwargs) -# bar(**kwargs) -# end -# @example AllowOnlyRestArgument: false (only relevant for Ruby < 3.2) -# # bad -# # The following code can replace the arguments with `...`, -# # but it will change the behavior. Because `...` forwards block also. -# def foo(*args) -# bar(*args) -# end -# -# def foo(**kwargs) -# bar(**kwargs) -# end -# @example RedundantRestArgumentNames: ['args', 'arguments'] (default) -# # bad -# def foo(*args) -# bar(*args) -# end -# -# # good -# def foo(*) -# bar(*) -# end -# @example RedundantKeywordRestArgumentNames: ['kwargs', 'options', 'opts'] (default) -# # bad -# def foo(**kwargs) -# bar(**kwargs) -# end -# -# # good -# def foo(**) -# bar(**) -# end -# @example -# # bad -# def foo(*args, &block) -# bar(*args, &block) -# end -# -# # bad -# def foo(*args, **kwargs, &block) -# bar(*args, **kwargs, &block) -# end -# -# # good -# def foo(...) -# bar(...) -# end -# -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#127 -class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#146 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#146 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#187 - def add_forward_all_offenses(node, send_classifications, forwardable_args); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#353 - def add_parens_if_missing(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#214 - def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#345 - def allow_only_rest_arguments?; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#337 - def arguments_range(node, first_node); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#265 - def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#250 - def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#497 - def explicit_block_name?; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#170 - def extract_forwardable_args(args); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#240 - def non_splat_or_block_pass_lvar_references(body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#182 - def only_forwards_all?(send_classifications); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#294 - def outside_block?(node); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#174 - def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#284 - def redundant_named_arg(arg, config_name, keyword); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#327 - def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#300 - def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#316 - def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#308 - def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#349 - def use_anonymous_forwarding?; end - - class << self - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#142 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#135 -RuboCop::Cop::Style::ArgumentsForwarding::ADDITIONAL_ARG_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#138 -RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#140 -RuboCop::Cop::Style::ArgumentsForwarding::BLOCK_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#134 -RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#137 -RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#139 -RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String) - -# Classifies send nodes for possible rest/kwrest/all (including block) forwarding. -# -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#360 -class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier - extend ::RuboCop::AST::NodePattern::Macros - - # @return [SendNodeClassifier] a new instance of SendNodeClassifier - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#372 - def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#400 - def classification; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#367 - def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#394 - def forwarded_block_arg; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#370 - def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#388 - def forwarded_kwrest_arg; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#382 - def forwarded_rest_arg; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#364 - def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#468 - def additional_kwargs?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#464 - def additional_kwargs_or_forwarded_kwargs?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#478 - def allow_offense_for_no_block?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#449 - def any_arg_referenced?; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#433 - def arguments; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#412 - def can_forward_all?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#472 - def forward_additional_kwargs?; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#429 - def forwarded_rest_and_kwrest_args; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#491 - def missing_rest_arg_or_kwrest_arg?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#482 - def no_additional_args?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#457 - def no_post_splat_args?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#425 - def offensive_block_forwarding?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#445 - def referenced_block_arg?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#441 - def referenced_kwrest_arg?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#437 - def referenced_rest_arg?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#421 - def ruby_32_missing_rest_or_kwest?; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#453 - def target_ruby_version; end -end - -# Enforces the use of `Array()` instead of explicit `Array` check or `[*var]`. -# -# The cop is disabled by default due to safety concerns. -# -# @example -# # bad -# paths = [paths] unless paths.is_a?(Array) -# paths.each { |path| do_something(path) } -# -# # bad (always creates a new Array instance) -# [*paths].each { |path| do_something(path) } -# -# # good (and a bit more readable) -# Array(paths).each { |path| do_something(path) } -# -# source://rubocop//lib/rubocop/cop/style/array_coercion.rb#41 -class RuboCop::Cop::Style::ArrayCoercion < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#48 - def array_splat?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#63 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#74 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#53 - def unless_array?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/style/array_coercion.rb#45 -RuboCop::Cop::Style::ArrayCoercion::CHECK_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/array_coercion.rb#44 -RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String) - -# Identifies usages of `arr[0]` and `arr[-1]` and suggests to change -# them to use `arr.first` and `arr.last` instead. -# -# The cop is disabled by default due to safety concerns. -# -# @example -# # bad -# arr[0] -# arr[-1] -# -# # good -# arr.first -# arr.last -# arr[0] = 2 -# arr[0][-2] -# -# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#28 -class RuboCop::Cop::Style::ArrayFirstLast < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#35 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#58 - def brace_method?(node); end - - # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#53 - def innermost_braces_node(node); end -end - -# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#31 -RuboCop::Cop::Style::ArrayFirstLast::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#32 -RuboCop::Cop::Style::ArrayFirstLast::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# In Ruby 3.1, `Array#intersect?` has been added. -# -# This cop identifies places where `(array1 & array2).any?` -# can be replaced by `array1.intersect?(array2)`. -# -# The `array1.intersect?(array2)` method is faster than -# `(array1 & array2).any?` and is more readable. -# -# In cases like the following, compatibility is not ensured, -# so it will not be detected when using block argument. -# -# [source,ruby] -# ---- -# ([1] & [1,2]).any? { |x| false } # => false -# [1].intersect?([1,2]) { |x| false } # => true -# ---- -# -# @example -# # bad -# (array1 & array2).any? -# (array1 & array2).empty? -# -# # good -# array1.intersect?(array2) -# !array1.intersect?(array2) -# @example AllCops:ActiveSupportExtensionsEnabled: false (default) -# # good -# (array1 & array2).present? -# (array1 & array2).blank? -# @example AllCops:ActiveSupportExtensionsEnabled: true -# # bad -# (array1 & array2).present? -# (array1 & array2).blank? -# -# # good -# array1.intersect?(array2) -# !array1.intersect?(array2) -# -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#49 -class RuboCop::Cop::Style::ArrayIntersect < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#65 - def active_support_bad_intersection_check?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#79 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#56 - def regular_bad_intersection_check?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#94 - def bad_intersection_check?(node); end - - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#106 - def message(receiver, argument, method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#102 - def straight?(method_name); end -end - -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#73 -RuboCop::Cop::Style::ArrayIntersect::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#76 -RuboCop::Cop::Style::ArrayIntersect::NEGATED_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#77 -RuboCop::Cop::Style::ArrayIntersect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#75 -RuboCop::Cop::Style::ArrayIntersect::STRAIGHT_METHODS = T.let(T.unsafe(nil), Array) - -# Checks for uses of "*" as a substitute for _join_. -# -# Not all cases can reliably checked, due to Ruby's dynamic -# types, so we consider only cases when the first argument is an -# array literal or the second is a string literal. -# -# @example -# -# # bad -# %w(foo bar baz) * "," -# -# # good -# %w(foo bar baz).join(",") -# -# source://rubocop//lib/rubocop/cop/style/array_join.rb#20 -class RuboCop::Cop::Style::ArrayJoin < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/array_join.rb#27 - def join_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/array_join.rb#29 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/array_join.rb#23 -RuboCop::Cop::Style::ArrayJoin::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/array_join.rb#24 -RuboCop::Cop::Style::ArrayJoin::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#16 -class RuboCop::Cop::Style::AsciiComments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#21 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#51 - def allowed_non_ascii_chars; end - - # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#42 - def first_non_ascii_chars(string); end - - # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#32 - def first_offense_range(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#46 - def only_allowed_non_ascii_chars?(string); end -end - -# source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#19 -RuboCop::Cop::Style::AsciiComments::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of Module#attr. -# -# @example -# # bad - creates a single attribute accessor (deprecated in Ruby 1.9) -# attr :something, true -# attr :one, :two, :three # behaves as attr_reader -# -# # good -# attr_accessor :something -# attr_reader :one, :two, :three -# -# source://rubocop//lib/rubocop/cop/style/attr.rb#17 -class RuboCop::Cop::Style::Attr < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/attr.rb#74 - def class_eval?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/attr.rb#24 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/attr.rb#37 - def allowed_context?(node); end - - # source://rubocop//lib/rubocop/cop/style/attr.rb#47 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/attr.rb#43 - def define_attr_method?(node); end - - # source://rubocop//lib/rubocop/cop/style/attr.rb#59 - def message(node); end - - # source://rubocop//lib/rubocop/cop/style/attr.rb#63 - def replacement_method(node); end -end - -# source://rubocop//lib/rubocop/cop/style/attr.rb#21 -RuboCop::Cop::Style::Attr::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/attr.rb#22 -RuboCop::Cop::Style::Attr::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for cases when you could use a block -# accepting version of a method that does automatic -# resource cleanup. -# -# @example -# -# # bad -# f = File.open('file') -# -# # good -# File.open('file') do |f| -# # ... -# end -# -# # bad -# f = Tempfile.open('temp') -# -# # good -# Tempfile.open('temp') do |f| -# # ... -# end -# -# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#27 -class RuboCop::Cop::Style::AutoResourceCleanup < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#32 - def file_open_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#36 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#46 - def cleanup?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#28 -RuboCop::Cop::Style::AutoResourceCleanup::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#29 -RuboCop::Cop::Style::AutoResourceCleanup::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks if usage of %() or %Q() matches configuration. -# -# @example EnforcedStyle: bare_percent (default) -# # bad -# %Q(He said: "#{greeting}") -# %q{She said: 'Hi'} -# -# # good -# %(He said: "#{greeting}") -# %{She said: 'Hi'} -# @example EnforcedStyle: percent_q -# # bad -# %|He said: "#{greeting}"| -# %/She said: 'Hi'/ -# -# # good -# %Q|He said: "#{greeting}"| -# %q/She said: 'Hi'/ -# -# source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#26 -class RuboCop::Cop::Style::BarePercentLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#32 - def on_dstr(node); end - - # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#36 - def on_str(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#63 - def add_offense_for_wrong_style(node, good, bad); end - - # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#42 - def check(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#59 - def requires_bare_percent?(source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#55 - def requires_percent_q?(source); end -end - -# source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#30 -RuboCop::Cop::Style::BarePercentLiterals::MSG = T.let(T.unsafe(nil), String) - -# Checks for BEGIN blocks. -# -# @example -# # bad -# BEGIN { test } -# -# source://rubocop//lib/rubocop/cop/style/begin_block.rb#12 -class RuboCop::Cop::Style::BeginBlock < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/begin_block.rb#15 - def on_preexe(node); end -end - -# source://rubocop//lib/rubocop/cop/style/begin_block.rb#13 -RuboCop::Cop::Style::BeginBlock::MSG = T.let(T.unsafe(nil), String) - -# Checks for places where `attr_reader` and `attr_writer` -# for the same method can be combined into single `attr_accessor`. -# -# @example -# # bad -# class Foo -# attr_reader :bar -# attr_writer :bar -# end -# -# # good -# class Foo -# attr_accessor :bar -# end -# -# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#21 -class RuboCop::Cop::Style::BisectedAttrAccessor < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # Each offending macro is captured and registered in `on_class` but correction - # happens in `after_class` because a macro might have multiple attributes - # rewritten from it - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#55 - def after_class(class_node); end - - # Each offending macro is captured and registered in `on_class` but correction - # happens in `after_class` because a macro might have multiple attributes - # rewritten from it - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#55 - def after_module(class_node); end - - # Each offending macro is captured and registered in `on_class` but correction - # happens in `after_class` because a macro might have multiple attributes - # rewritten from it - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#55 - def after_sclass(class_node); end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#33 - def on_class(class_node); end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#33 - def on_module(class_node); end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#29 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#33 - def on_sclass(class_node); end - - private - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#102 - def correct_reader(corrector, macro, node, range); end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#114 - def correct_writer(corrector, macro, node, range); end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#91 - def find_bisection(macros); end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#74 - def find_macros(class_def); end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#98 - def register_offense(attr); end -end - -# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#27 -RuboCop::Cop::Style::BisectedAttrAccessor::MSG = T.let(T.unsafe(nil), String) - -# Representation of an `attr_reader`, `attr_writer` or `attr` macro -# for use by `Style/BisectedAttrAccessor`. -# -# @api private -# -# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#10 -class RuboCop::Cop::Style::BisectedAttrAccessor::Macro - include ::RuboCop::Cop::VisibilityHelp - - # @api private - # @return [Macro] a new instance of Macro - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#19 - def initialize(node); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#49 - def all_bisected?; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#29 - def attr_names; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 - def attrs; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#25 - def bisect(*names); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#33 - def bisected_names; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 - def bisection; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 - def node; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#41 - def reader?; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#53 - def rest; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#37 - def visibility; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#45 - def writer?; end - - class << self - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#15 - def macro?(node); end - end -end - -# Looks for uses of block comments (=begin...=end). -# -# @example -# # bad -# =begin -# Multiple lines -# of comments... -# =end -# -# # good -# # Multiple lines -# # of comments... -# -# source://rubocop//lib/rubocop/cop/style/block_comments.rb#19 -class RuboCop::Cop::Style::BlockComments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/block_comments.rb#27 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/block_comments.rb#56 - def eq_end_part(comment, expr); end - - # source://rubocop//lib/rubocop/cop/style/block_comments.rb#48 - def parts(comment); end -end - -# source://rubocop//lib/rubocop/cop/style/block_comments.rb#24 -RuboCop::Cop::Style::BlockComments::BEGIN_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/style/block_comments.rb#25 -RuboCop::Cop::Style::BlockComments::END_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/style/block_comments.rb#23 -RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) - -# Check for uses of braces or do/end around single line or -# multi-line blocks. -# -# Methods that can be either procedural or functional and cannot be -# categorised from their usage alone is ignored. -# `lambda`, `proc`, and `it` are their defaults. -# Additional methods can be added to the `AllowedMethods`. -# -# @example AllowedPatterns: ['map'] -# -# # good -# things.map { |thing| -# something = thing.some_method -# process(something) -# } -# @example EnforcedStyle: semantic -# # Prefer `do...end` over `{...}` for procedural blocks. -# -# # return value is used/assigned -# # bad -# foo = map do |x| -# x -# end -# puts (map do |x| -# x -# end) -# -# # return value is not used out of scope -# # good -# map do |x| -# x -# end -# -# # Prefer `{...}` over `do...end` for functional blocks. -# -# # return value is not used out of scope -# # bad -# each { |x| -# x -# } -# -# # return value is used/assigned -# # good -# foo = map { |x| -# x -# } -# map { |x| -# x -# }.inspect -# -# # The AllowBracesOnProceduralOneLiners option is allowed unless the -# # EnforcedStyle is set to `semantic`. If so: -# -# # If the AllowBracesOnProceduralOneLiners option is unspecified, or -# # set to `false` or any other falsey value, then semantic purity is -# # maintained, so one-line procedural blocks must use do-end, not -# # braces. -# -# # bad -# collection.each { |element| puts element } -# -# # good -# collection.each do |element| puts element end -# -# # If the AllowBracesOnProceduralOneLiners option is set to `true`, or -# # any other truthy value, then one-line procedural blocks may use -# # either style. (There is no setting for requiring braces on them.) -# -# # good -# collection.each { |element| puts element } -# -# # also good -# collection.each do |element| puts element end -# @example EnforcedStyle: braces_for_chaining -# # bad -# words.each do |word| -# word.flip.flop -# end.join("-") -# -# # good -# words.each { |word| -# word.flip.flop -# }.join("-") -# @example EnforcedStyle: always_braces -# # bad -# words.each do |word| -# word.flip.flop -# end -# -# # good -# words.each { |word| -# word.flip.flop -# } -# @example BracesRequiredMethods: ['sig'] -# -# # Methods listed in the BracesRequiredMethods list, such as 'sig' -# # in this example, will require `{...}` braces. This option takes -# # precedence over all other configurations except AllowedMethods. -# -# # bad -# sig do -# params( -# foo: string, -# ).void -# end -# def bar(foo) -# puts foo -# end -# -# # good -# sig { -# params( -# foo: string, -# ).void -# } -# def bar(foo) -# puts foo -# end -# @example AllowedMethods: ['lambda', 'proc', 'it' ] (default) -# -# # good -# foo = lambda do |x| -# puts "Hello, #{x}" -# end -# -# foo = lambda do |x| -# x * 100 -# end -# @example AllowedPatterns: [] (default) -# -# # bad -# things.map { |thing| -# something = thing.some_method -# process(something) -# } -# @example EnforcedStyle: line_count_based (default) -# # bad - single line block -# items.each do |item| item / 5 end -# -# # good - single line block -# items.each { |item| item / 5 } -# -# # bad - multi-line block -# things.map { |thing| -# something = thing.some_method -# process(something) -# } -# -# # good - multi-line block -# things.map do |thing| -# something = thing.some_method -# process(something) -# end -# -# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#168 -class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#194 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#194 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#179 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#459 - def array_or_range?(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#208 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#463 - def begin_required?(block_node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#236 - def braces_for_chaining_message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#400 - def braces_for_chaining_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#248 - def braces_required_message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#377 - def braces_required_method?(method_name); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#381 - def braces_required_methods; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#410 - def braces_style?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#455 - def conditional?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#414 - def correction_would_break_code?(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#309 - def end_of_chain(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#424 - def functional_block?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#420 - def functional_method?(method_name); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#326 - def get_blocks(node, &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#385 - def line_count_based_block_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#218 - def line_count_based_message(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#252 - def message(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#300 - def move_comment_before_block(corrector, comment, block_node, closing_brace); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#432 - def procedural_method?(method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#428 - def procedural_oneliners_may_have_braces?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#344 - def proper_block_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#316 - def remove_trailing_whitespace(corrector, range, comment); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#263 - def replace_braces_with_do_end(corrector, loc); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#279 - def replace_do_end_with_braces(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#356 - def require_braces?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#448 - def return_value_of_scope?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#436 - def return_value_used?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#389 - def semantic_block_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#226 - def semantic_message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#364 - def special_method?(method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#370 - def special_method_proper_block_style?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#296 - def whitespace_after?(range, length = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#292 - def whitespace_before?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#322 - def with_block?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#175 -RuboCop::Cop::Style::BlockDelimiters::ALWAYS_BRACES_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#177 -RuboCop::Cop::Style::BlockDelimiters::BRACES_REQUIRED_MESSAGE = T.let(T.unsafe(nil), String) - -# Corrector to correct conditional assignment in `case` statements. -# -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#604 -class RuboCop::Cop::Style::CaseCorrector - extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper - extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper - - class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#609 - def correct(corrector, cop, node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#619 - def move_assignment_inside_condition(corrector, node); end - - private - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#639 - def extract_branches(case_node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#633 - def extract_tail_branches(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#649 - def move_branch_inside_condition(corrector, branch, condition, assignment, column); end - end -end - -# If `AllowOnSelfClass` option is enabled, the cop will ignore violations when the receiver of -# the case equality operator is `self.class`. Note intermediate variables are not accepted. -# -# @example -# # bad -# (1..100) === 7 -# /something/ === some_string -# -# # good -# something.is_a?(Array) -# (1..100).include?(7) -# /something/.match?(some_string) -# @example AllowOnConstant: false (default) -# # bad -# Array === something -# @example AllowOnConstant: true -# # good -# Array === something -# @example AllowOnSelfClass: false (default) -# # bad -# self.class === something -# @example AllowOnSelfClass: true -# # good -# self.class === something -# -# source://rubocop//lib/rubocop/cop/style/case_equality.rb#40 -class RuboCop::Cop::Style::CaseEquality < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#47 - def case_equality?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#52 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#50 - def self_class?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#90 - def begin_replacement(lhs, rhs); end - - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#96 - def const_replacement(lhs, rhs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#65 - def offending_receiver?(node); end - - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#72 - def replacement(lhs, rhs); end - - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#100 - def send_replacement(lhs, rhs); end -end - -# source://rubocop//lib/rubocop/cop/style/case_equality.rb#43 -RuboCop::Cop::Style::CaseEquality::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/case_equality.rb#44 -RuboCop::Cop::Style::CaseEquality::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where `if-elsif` constructions -# can be replaced with `case-when`. -# -# @example MinBranchesCount: 3 (default) -# # bad -# if status == :active -# perform_action -# elsif status == :inactive || status == :hibernating -# check_timeout -# elsif status == :invalid -# report_invalid -# else -# final_action -# end -# -# # good -# case status -# when :active -# perform_action -# when :inactive, :hibernating -# check_timeout -# when :invalid -# report_invalid -# else -# final_action -# end -# @example MinBranchesCount: 4 -# # good -# if status == :active -# perform_action -# elsif status == :inactive || status == :hibernating -# check_timeout -# elsif status == :invalid -# report_invalid -# else -# final_action -# end -# -# source://rubocop//lib/rubocop/cop/style/case_like_if.rb#50 -class RuboCop::Cop::Style::CaseLikeIf < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MinBranchesCount - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#57 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#81 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#231 - def branch_conditions(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#249 - def class_reference?(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#166 - def collect_conditions(node, target, conditions); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#220 - def condition_from_binary_op(lhs, rhs, target); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#202 - def condition_from_equality_node(node, target); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#213 - def condition_from_include_or_cover_node(node, target); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#208 - def condition_from_match_node(node, target); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#185 - def condition_from_send_node(node, target); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#240 - def const_reference?(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#258 - def correction_range(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#253 - def deparenthesize(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#102 - def find_target(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#136 - def find_target_in_equality_node(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#148 - def find_target_in_include_or_cover_node(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#154 - def find_target_in_match_node(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#121 - def find_target_in_send_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#274 - def regexp_with_named_captures?(node); end - - # Named captures work with `=~` (if regexp is on lhs) and with `match` (both sides) - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#263 - def regexp_with_working_captures?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#96 - def should_check?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/case_like_if.rb#55 -RuboCop::Cop::Style::CaseLikeIf::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of the character literal ?x. -# Starting with Ruby 1.9 character literals are -# essentially one-character strings, so this syntax -# is mostly redundant at this point. -# -# ? character literal can be used to express meta and control character. -# That's a good use case of ? literal so it doesn't count it as an offense. -# -# @example -# # bad -# ?x -# -# # good -# 'x' -# -# # good - control & meta escapes -# ?\C-\M-d -# "\C-\M-d" # same as above -# -# source://rubocop//lib/rubocop/cop/style/character_literal.rb#24 -class RuboCop::Cop::Style::CharacterLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::StringHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/character_literal.rb#35 - def autocorrect(corrector, node); end - - # Dummy implementation of method in ConfigurableEnforcedStyle that is - # called from StringHelp. - # - # source://rubocop//lib/rubocop/cop/style/character_literal.rb#53 - def correct_style_detected; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/character_literal.rb#30 - def offense?(node); end - - # Dummy implementation of method in ConfigurableEnforcedStyle that is - # called from StringHelp. - # - # source://rubocop//lib/rubocop/cop/style/character_literal.rb#49 - def opposite_style_detected; end -end - -# source://rubocop//lib/rubocop/cop/style/character_literal.rb#28 -RuboCop::Cop::Style::CharacterLiteral::MSG = T.let(T.unsafe(nil), String) - -# Checks the style of children definitions at classes and -# modules. Basically there are two different styles: -# -# The compact style is only forced for classes/modules with one child. -# -# @example EnforcedStyle: nested (default) -# # good -# # have each child on its own line -# class Foo -# class Bar -# end -# end -# @example EnforcedStyle: compact -# # good -# # combine definitions as much as possible -# class Foo::Bar -# end -# -# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#33 -class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#42 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#48 - def on_module(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#89 - def add_trailing_end(corrector, node, padding); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#170 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#159 - def check_compact_style(node, body); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#151 - def check_nested_style(node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#141 - def check_style(node, body); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#94 - def compact_definition(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#115 - def compact_identifier_name(node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#100 - def compact_node(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#180 - def compact_node_name?(node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#105 - def compact_replacement(node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#137 - def leading_spaces(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#176 - def needs_compacting?(body); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#62 - def nest_definition(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#54 - def nest_or_compact(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#120 - def remove_end(corrector, body); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#71 - def replace_namespace_keyword(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#80 - def split_on_double_colon(corrector, node, padding); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#128 - def unindent(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#40 -RuboCop::Cop::Style::ClassAndModuleChildren::COMPACT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#39 -RuboCop::Cop::Style::ClassAndModuleChildren::NESTED_MSG = T.let(T.unsafe(nil), String) - -# Enforces consistent use of `Object#is_a?` or `Object#kind_of?`. -# -# @example EnforcedStyle: is_a? (default) -# # bad -# var.kind_of?(Date) -# var.kind_of?(Integer) -# -# # good -# var.is_a?(Date) -# var.is_a?(Integer) -# @example EnforcedStyle: kind_of? -# # bad -# var.is_a?(Time) -# var.is_a?(String) -# -# # good -# var.kind_of?(Time) -# var.kind_of?(String) -# -# source://rubocop//lib/rubocop/cop/style/class_check.rb#26 -class RuboCop::Cop::Style::ClassCheck < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/class_check.rb#45 - def message(node); end - - # source://rubocop//lib/rubocop/cop/style/class_check.rb#33 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/class_check.rb#33 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/class_check.rb#30 -RuboCop::Cop::Style::ClassCheck::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/class_check.rb#31 -RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces the use of `Object#instance_of?` instead of class comparison -# for equality. -# `==`, `equal?`, and `eql?` custom method definitions are allowed by default. -# These are customizable with `AllowedMethods` option. -# -# @example -# # bad -# var.class == Date -# var.class.equal?(Date) -# var.class.eql?(Date) -# var.class.name == 'Date' -# -# # good -# var.instance_of?(Date) -# @example AllowedMethods: ['==', 'equal?', 'eql?'] (default) -# # good -# def ==(other) -# self.class == other.class && name == other.name -# end -# -# def equal?(other) -# self.class.equal?(other.class) && name.equal?(other.name) -# end -# -# def eql?(other) -# self.class.eql?(other.class) && name.eql?(other.name) -# end -# @example AllowedPatterns: [] (default) -# # bad -# def eq(other) -# self.class.eq(other.class) && name.eq(other.name) -# end -# @example AllowedPatterns: ['eq'] -# # good -# def eq(other) -# self.class.eq(other.class) && name.eq(other.name) -# end -# -# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#52 -class RuboCop::Cop::Style::ClassEqualityComparison < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#64 - def class_comparison_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#70 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#92 - def class_name(class_node, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#112 - def class_name_method?(method_name); end - - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#128 - def offense_range(receiver_node, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#116 - def require_cbase?(class_node); end - - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#124 - def trim_string_quotes(class_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#120 - def unable_to_determine_type?(class_node); end -end - -# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#61 -RuboCop::Cop::Style::ClassEqualityComparison::CLASS_NAME_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#58 -RuboCop::Cop::Style::ClassEqualityComparison::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#60 -RuboCop::Cop::Style::ClassEqualityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for uses of the class/module name instead of -# self, when defining class/module methods. -# -# @example -# # bad -# class SomeClass -# def SomeClass.class_method -# # ... -# end -# end -# -# # good -# class SomeClass -# def self.class_method -# # ... -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/class_methods.rb#23 -class RuboCop::Cop::Style::ClassMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/class_methods.rb#28 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/style/class_methods.rb#28 - def on_module(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/class_methods.rb#41 - def check_defs(name, node); end -end - -# source://rubocop//lib/rubocop/cop/style/class_methods.rb#26 -RuboCop::Cop::Style::ClassMethods::MSG = T.let(T.unsafe(nil), String) - -# Enforces using `def self.method_name` or `class << self` to define class methods. -# -# @example EnforcedStyle: def_self (default) -# # bad -# class SomeClass -# class << self -# attr_accessor :class_accessor -# -# def class_method -# # ... -# end -# end -# end -# -# # good -# class SomeClass -# def self.class_method -# # ... -# end -# -# class << self -# attr_accessor :class_accessor -# end -# end -# -# # good - contains private method -# class SomeClass -# class << self -# attr_accessor :class_accessor -# -# private -# -# def private_class_method -# # ... -# end -# end -# end -# @example EnforcedStyle: self_class -# # bad -# class SomeClass -# def self.class_method -# # ... -# end -# end -# -# # good -# class SomeClass -# class << self -# def class_method -# # ... -# end -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#61 -class RuboCop::Cop::Style::ClassMethodsDefinitions < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::VisibilityHelp - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#81 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#71 - def on_sclass(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#95 - def all_methods_public?(sclass_node); end - - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#115 - def autocorrect_sclass(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#102 - def def_nodes(sclass_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#91 - def def_self_style?; end - - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#141 - def extract_def_from_sclass(def_node, sclass_node); end - - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#152 - def indentation_diff(node1, node2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#137 - def sclass_only_has_methods?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#68 -RuboCop::Cop::Style::ClassMethodsDefinitions::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#69 -RuboCop::Cop::Style::ClassMethodsDefinitions::MSG_SCLASS = T.let(T.unsafe(nil), String) - -# Checks for uses of class variables. Offenses -# are signaled only on assignment to class variables to -# reduce the number of offenses that would be reported. -# -# You have to be careful when setting a value for a class -# variable; if a class has been inherited, changing the -# value of a class variable also affects the inheriting -# classes. This means that it's almost always better to -# use a class instance variable instead. -# -# @example -# # bad -# class A -# @@test = 10 -# end -# -# class A -# def self.test(name, value) -# class_variable_set("@@#{name}", value) -# end -# end -# -# class A; end -# A.class_variable_set(:@@test, 10) -# -# # good -# class A -# @test = 10 -# end -# -# class A -# def test -# @@test # you can access class variable without offense -# end -# end -# -# class A -# def self.test(name) -# class_variable_get("@@#{name}") # you can access without offense -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/class_vars.rb#48 -class RuboCop::Cop::Style::ClassVars < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/class_vars.rb#52 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/class_vars.rb#56 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/class_vars.rb#49 -RuboCop::Cop::Style::ClassVars::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/class_vars.rb#50 -RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for places where custom logic on rejection nils from arrays -# and hashes can be replaced with `{Array,Hash}#{compact,compact!}`. -# -# @example -# # bad -# array.reject(&:nil?) -# array.reject { |e| e.nil? } -# array.select { |e| !e.nil? } -# array.grep_v(nil) -# array.grep_v(NilClass) -# -# # good -# array.compact -# -# # bad -# hash.reject!(&:nil?) -# array.delete_if(&:nil?) -# hash.reject! { |k, v| v.nil? } -# array.delete_if { |e| e.nil? } -# hash.select! { |k, v| !v.nil? } -# -# # good -# hash.compact! -# @example AllowedReceivers: ['params'] -# # good -# params.reject(&:nil?) -# -# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#44 -class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedReceivers - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#85 - def grep_v_with_nil?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#89 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#89 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#64 - def reject_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#57 - def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#74 - def select_method?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#129 - def good_method_name(node); end - - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#106 - def offense_range(node); end - - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#137 - def range(begin_pos_node, end_pos_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#123 - def to_enum_method?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#50 -RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#51 -RuboCop::Cop::Style::CollectionCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#52 -RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), Array) - -# Enforces the use of consistent method names -# from the Enumerable module. -# -# You can customize the mapping from undesired method to desired method. -# -# e.g. to use `detect` over `find`: -# -# Style/CollectionMethods: -# PreferredMethods: -# find: detect -# -# @example -# # These examples are based on the default mapping for `PreferredMethods`. -# -# # bad -# items.collect -# items.collect! -# items.collect_concat -# items.inject -# items.detect -# items.find_all -# items.member? -# -# # good -# items.map -# items.map! -# items.flat_map -# items.reduce -# items.find -# items.select -# items.include? -# -# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#43 -class RuboCop::Cop::Style::CollectionMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MethodPreference - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#55 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#63 - def check_method_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#72 - def implicit_block?(node); end - - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#80 - def message(node); end - - # Some enumerable methods accept a bare symbol (ie. _not_ Symbol#to_proc) instead - # of a block. - # - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#86 - def methods_accepting_symbol; end -end - -# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47 -RuboCop::Cop::Style::CollectionMethods::MSG = T.let(T.unsafe(nil), String) - -# Checks for methods invoked via the `::` operator instead -# of the `.` operator (like `FileUtils::rmdir` instead of `FileUtils.rmdir`). -# -# @example -# # bad -# Timeout::timeout(500) { do_something } -# FileUtils::rmdir(dir) -# Marshal::dump(obj) -# -# # good -# Timeout.timeout(500) { do_something } -# FileUtils.rmdir(dir) -# Marshal.dump(obj) -# -# source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#20 -class RuboCop::Cop::Style::ColonMethodCall < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#26 - def java_type_node?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#35 - def on_send(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#31 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#23 -RuboCop::Cop::Style::ColonMethodCall::MSG = T.let(T.unsafe(nil), String) - -# Checks for class methods that are defined using the `::` -# operator instead of the `.` operator. -# -# @example -# # bad -# class Foo -# def self::bar -# end -# end -# -# # good -# class Foo -# def self.bar -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#22 -class RuboCop::Cop::Style::ColonMethodDefinition < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#27 - def on_defs(node); end -end - -# source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#25 -RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -# Checks for places where multiple consecutive loops over the same data -# can be combined into a single loop. It is very likely that combining them -# will make the code more efficient and more concise. -# -# @example -# # bad -# def method -# items.each do |item| -# do_something(item) -# end -# -# items.each do |item| -# do_something_else(item) -# end -# end -# -# # good -# def method -# items.each do |item| -# do_something(item) -# do_something_else(item) -# end -# end -# -# # bad -# def method -# for item in items do -# do_something(item) -# end -# -# for item in items do -# do_something_else(item) -# end -# end -# -# # good -# def method -# for item in items do -# do_something(item) -# do_something_else(item) -# end -# end -# -# # good -# def method -# each_slice(2) { |slice| do_something(slice) } -# each_slice(3) { |slice| do_something(slice) } -# end -# -# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#59 -class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#77 - def on_for(node); end - - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64 - def on_numblock(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#88 - def collection_looping_method?(node); end - - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#105 - def combine_with_left_sibling(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#112 - def correct_end_of_block(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#93 - def same_collection_looping_block?(node, sibling); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#101 - def same_collection_looping_for?(node, sibling); end -end - -# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#62 -RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String) - -# Enforces using `` or %x around command literals. -# -# @example EnforcedStyle: backticks (default) -# # bad -# folders = %x(find . -type d).split -# -# # bad -# %x( -# ln -s foo.example.yml foo.example -# ln -s bar.example.yml bar.example -# ) -# -# # good -# folders = `find . -type d`.split -# -# # good -# ` -# ln -s foo.example.yml foo.example -# ln -s bar.example.yml bar.example -# ` -# @example EnforcedStyle: mixed -# # bad -# folders = %x(find . -type d).split -# -# # bad -# ` -# ln -s foo.example.yml foo.example -# ln -s bar.example.yml bar.example -# ` -# -# # good -# folders = `find . -type d`.split -# -# # good -# %x( -# ln -s foo.example.yml foo.example -# ln -s bar.example.yml bar.example -# ) -# @example EnforcedStyle: percent_x -# # bad -# folders = `find . -type d`.split -# -# # bad -# ` -# ln -s foo.example.yml foo.example -# ln -s bar.example.yml bar.example -# ` -# -# # good -# folders = %x(find . -type d).split -# -# # good -# %x( -# ln -s foo.example.yml foo.example -# ln -s bar.example.yml bar.example -# ) -# @example AllowInnerBackticks: false (default) -# # If `false`, the cop will always recommend using `%x` if one or more -# # backticks are found in the command string. -# -# # bad -# `echo \`ls\`` -# -# # good -# %x(echo `ls`) -# @example AllowInnerBackticks: true -# # good -# `echo \`ls\`` -# -# source://rubocop//lib/rubocop/cop/style/command_literal.rb#78 -class RuboCop::Cop::Style::CommandLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#85 - def on_xstr(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#146 - def allow_inner_backticks?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#122 - def allowed_backtick_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#131 - def allowed_percent_x_literal?(node); end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#109 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#159 - def backtick_literal?(node); end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#97 - def check_backtick_literal(node, message); end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#103 - def check_percent_x_literal(node, message); end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#167 - def command_delimiter; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#150 - def contains_backtick?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#142 - def contains_disallowed_backtick?(node); end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#171 - def default_delimiter; end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#154 - def node_body(node); end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#163 - def preferred_delimiter; end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#175 - def preferred_delimiters_config; end -end - -# source://rubocop//lib/rubocop/cop/style/command_literal.rb#82 -RuboCop::Cop::Style::CommandLiteral::MSG_USE_BACKTICKS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/command_literal.rb#83 -RuboCop::Cop::Style::CommandLiteral::MSG_USE_PERCENT_X = T.let(T.unsafe(nil), String) - -# Checks that comment annotation keywords are written according -# to guidelines. -# -# Annotation keywords can be specified by overriding the cop's `Keywords` -# configuration. Keywords are allowed to be single words or phrases. -# -# NOTE: With a multiline comment block (where each line is only a -# comment), only the first line will be able to register an offense, even -# if an annotation keyword starts another line. This is done to prevent -# incorrect registering of keywords (eg. `review`) inside a paragraph as an -# annotation. -# -# @example RequireColon: true (default) -# # bad -# # TODO make better -# -# # good -# # TODO: make better -# -# # bad -# # TODO:make better -# -# # good -# # TODO: make better -# -# # bad -# # fixme: does not work -# -# # good -# # FIXME: does not work -# -# # bad -# # Optimize does not work -# -# # good -# # OPTIMIZE: does not work -# @example RequireColon: false -# # bad -# # TODO: make better -# -# # good -# # TODO make better -# -# # bad -# # fixme does not work -# -# # good -# # FIXME does not work -# -# # bad -# # Optimize does not work -# -# # good -# # OPTIMIZE does not work -# -# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#61 -class RuboCop::Cop::Style::CommentAnnotation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#73 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#110 - def annotation_range(annotation); end - - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#114 - def correct_offense(corrector, range, keyword); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#102 - def first_comment_line?(comments, index); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#106 - def inline_comment?(comment); end - - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#124 - def keywords; end - - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#87 - def register_offense(annotation); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#120 - def requires_colon?; end -end - -# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#71 -RuboCop::Cop::Style::CommentAnnotation::MISSING_NOTE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#65 -RuboCop::Cop::Style::CommentAnnotation::MSG_COLON_STYLE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#68 -RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), String) - -# Checks for comments put on the same line as some keywords. -# These keywords are: `class`, `module`, `def`, `begin`, `end`. -# -# Note that some comments -# are allowed. -# -# Autocorrection removes comments from `end` keyword and keeps comments -# for `class`, `module`, `def` and `begin` above the keyword. -# -# @example -# # bad -# if condition -# statement -# end # end if -# -# # bad -# class X # comment -# statement -# end -# -# # bad -# def x; end # comment -# -# # good -# if condition -# statement -# end -# -# # good -# class X # :nodoc: -# y -# end -# -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#45 -class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#60 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#83 - def offensive?(comment); end - - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#70 - def register_offense(comment, matched_keyword); end - - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#89 - def source_line(comment); end -end - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#54 -RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENTS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#55 -RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENT_REGEXES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#51 -RuboCop::Cop::Style::CommentedKeyword::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#52 -RuboCop::Cop::Style::CommentedKeyword::KEYWORD_REGEXES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#49 -RuboCop::Cop::Style::CommentedKeyword::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#58 -RuboCop::Cop::Style::CommentedKeyword::REGEXP = T.let(T.unsafe(nil), Regexp) - -# Enforces the use of `Comparable#clamp` instead of comparison by minimum and maximum. -# -# This cop supports autocorrection for `if/elsif/else` bad style only. -# Because `ArgumentError` occurs if the minimum and maximum of `clamp` arguments are reversed. -# When these are variables, it is not possible to determine which is the minimum and maximum: -# -# [source,ruby] -# ---- -# [1, [2, 3].max].min # => 1 -# 1.clamp(3, 1) # => min argument must be smaller than max argument (ArgumentError) -# ---- -# -# @example -# -# # bad -# [[x, low].max, high].min -# -# # bad -# if x < low -# low -# elsif high < x -# high -# else -# x -# end -# -# # good -# x.clamp(low, high) -# -# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#35 -class RuboCop::Cop::Style::ComparableClamp < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#61 - def array_min_max?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#47 - def if_elsif_else_condition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#78 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#100 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#108 - def autocorrect(corrector, node, prefer); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#117 - def min_condition?(if_condition, else_body); end -end - -# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#42 -RuboCop::Cop::Style::ComparableClamp::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#43 -RuboCop::Cop::Style::ComparableClamp::MSG_MIN_MAX = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#44 -RuboCop::Cop::Style::ComparableClamp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces the use of `Array#push(item)` instead of `Array#concat([item])` -# to avoid redundant array literals. -# -# @example -# -# # bad -# list.concat([foo]) -# list.concat([bar, baz]) -# list.concat([qux, quux], [corge]) -# -# # good -# list.push(foo) -# list.push(bar, baz) -# list.push(qux, quux, corge) -# -# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#25 -class RuboCop::Cop::Style::ConcatArrayLiterals < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#34 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#34 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#70 - def offense_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#87 - def percent_literals_includes_only_basic_literals?(node); end - - # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#74 - def preferred_method(node); end -end - -# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#28 -RuboCop::Cop::Style::ConcatArrayLiterals::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#29 -RuboCop::Cop::Style::ConcatArrayLiterals::MSG_FOR_PERCENT_LITERALS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#31 -RuboCop::Cop::Style::ConcatArrayLiterals::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Check for `if` and `case` statements where each branch is used for -# both the assignment and comparison of the same variable -# when using the return of the condition can be used instead. -# -# @example EnforcedStyle: assign_to_condition (default) -# # bad -# if foo -# bar = 1 -# else -# bar = 2 -# end -# -# case foo -# when 'a' -# bar += 1 -# else -# bar += 2 -# end -# -# if foo -# some_method -# bar = 1 -# else -# some_other_method -# bar = 2 -# end -# -# # good -# bar = if foo -# 1 -# else -# 2 -# end -# -# bar += case foo -# when 'a' -# 1 -# else -# 2 -# end -# -# bar << if foo -# some_method -# 1 -# else -# some_other_method -# 2 -# end -# @example EnforcedStyle: assign_inside_condition -# # bad -# bar = if foo -# 1 -# else -# 2 -# end -# -# bar += case foo -# when 'a' -# 1 -# else -# 2 -# end -# -# bar << if foo -# some_method -# 1 -# else -# some_other_method -# 2 -# end -# -# # good -# if foo -# bar = 1 -# else -# bar = 2 -# end -# -# case foo -# when 'a' -# bar += 1 -# else -# bar += 2 -# end -# -# if foo -# some_method -# bar = 1 -# else -# some_other_method -# bar = 2 -# end -# -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#210 -class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Style::ConditionalAssignmentHelper - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # The shovel operator `<<` does not have its own type. It is a `send` - # type. - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#228 - def assignment_type?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#309 - def candidate_condition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 - def on_and_asgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#264 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#274 - def on_case_match(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#250 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 - def on_masgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 - def on_op_asgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 - def on_or_asgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#244 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#315 - def allowed_single_line?(branches); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#386 - def allowed_statements?(branches); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#311 - def allowed_ternary?(assignment); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#319 - def assignment_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#363 - def assignment_types_match?(*nodes); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#378 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#304 - def candidate_node?(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#286 - def check_assignment_to_condition(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#369 - def check_node(node, branches); end - - # If `Layout/LineLength` is enabled, we do not want to introduce an - # offense by autocorrecting this cop. Find the max configured line - # length. Find the longest line of condition. Remove the assignment - # from lines that contain the offending assignment because after - # correcting, this will not be on the line anymore. Check if the length - # of the longest line + the length of the corrected assignment is - # greater than the max configured line length - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#402 - def correction_exceeds_line_limit?(node, branches); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#433 - def include_ternary?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#356 - def lhs_all_match?(branches); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#421 - def line_length_cop_enabled?; end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#414 - def longest_line(node, assignment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#410 - def longest_line_exceeds_line_limit?(node, assignment); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#425 - def max_line_length; end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#340 - def move_assignment_inside_condition(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#330 - def move_assignment_outside_condition(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#429 - def single_line_conditions_only?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#352 - def ternary_condition?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#219 -RuboCop::Cop::Style::ConditionalAssignment::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#217 -RuboCop::Cop::Style::ConditionalAssignment::ASSIGN_TO_CONDITION_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#221 -RuboCop::Cop::Style::ConditionalAssignment::ENABLED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#220 -RuboCop::Cop::Style::ConditionalAssignment::LINE_LENGTH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#222 -RuboCop::Cop::Style::ConditionalAssignment::MAX = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#216 -RuboCop::Cop::Style::ConditionalAssignment::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#223 -RuboCop::Cop::Style::ConditionalAssignment::SINGLE_LINE_CONDITIONS_ONLY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#218 -RuboCop::Cop::Style::ConditionalAssignment::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# Helper module to provide common methods to classes needed for the -# ConditionalAssignment Cop. -# -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#8 -module RuboCop::Cop::Style::ConditionalAssignmentHelper - extend ::RuboCop::AST::NodePattern::Macros - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#64 - def end_with_eq?(sym); end - - # `elsif` branches show up in the `node` as an `else`. We need - # to recursively iterate over all `else` branches and consider all - # but the last `node` an `elsif` branch and consider the last `node` - # the actual `else` branch. - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#20 - def expand_elses(branch); end - - # `when` nodes contain the entire branch including the condition. - # We only need the contents of the branch, not the condition. - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#28 - def expand_when_branches(when_branches); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#55 - def indent(cop, source); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#37 - def lhs(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#32 - def tail(branch); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#109 - def assignment_rhs_exist?(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#70 - def expand_elsif(node, elsif_branches = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#96 - def lhs_for_casgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#83 - def lhs_for_send(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#105 - def setter_method?(method_name); end -end - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#13 -RuboCop::Cop::Style::ConditionalAssignmentHelper::ALIGN_WITH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#12 -RuboCop::Cop::Style::ConditionalAssignmentHelper::END_ALIGNMENT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#11 -RuboCop::Cop::Style::ConditionalAssignmentHelper::EQUAL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#14 -RuboCop::Cop::Style::ConditionalAssignmentHelper::KEYWORD = T.let(T.unsafe(nil), String) - -# Helper module to provide common methods to ConditionalAssignment -# correctors -# -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#440 -module RuboCop::Cop::Style::ConditionalCorrectorHelper - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#461 - def assignment(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#490 - def correct_branches(corrector, branches); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#467 - def correct_if_branches(corrector, cop, node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#441 - def remove_whitespace_in_branches(corrector, branch, condition, column); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#477 - def replace_branch_assignment(corrector, branch); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#454 - def white_space_range(node, column); end -end - -# Checks that constants defined in classes and modules have -# an explicit visibility declaration. By default, Ruby makes all class- -# and module constants public, which litters the public API of the -# class or module. Explicitly declaring a visibility makes intent more -# clear, and prevents outside actors from touching private state. -# -# @example -# -# # bad -# class Foo -# BAR = 42 -# BAZ = 43 -# end -# -# # good -# class Foo -# BAR = 42 -# private_constant :BAR -# -# BAZ = 43 -# public_constant :BAZ -# end -# @example IgnoreModules: false (default) -# # bad -# class Foo -# MyClass = Struct.new() -# end -# -# # good -# class Foo -# MyClass = Struct.new() -# public_constant :MyClass -# end -# @example IgnoreModules: true -# # good -# class Foo -# MyClass = Struct.new() -# end -# -# source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#47 -class RuboCop::Cop::Style::ConstantVisibility < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#51 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#96 - def visibility_declaration_for?(param0 = T.unsafe(nil), param1); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#76 - def class_or_module_scope?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#62 - def ignore_modules?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#100 - def match_name?(name, constant_name); end - - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#70 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#66 - def module?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#87 - def visibility_declaration?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#48 -RuboCop::Cop::Style::ConstantVisibility::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/copyright.rb#21 -class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/copyright.rb#28 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/copyright.rb#45 - def autocorrect(corrector); end - - # source://rubocop//lib/rubocop/cop/style/copyright.rb#56 - def autocorrect_notice; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#86 - def encoding_token?(processed_source, token_index); end - - # source://rubocop//lib/rubocop/cop/style/copyright.rb#72 - def insert_notice_before(processed_source); end - - # source://rubocop//lib/rubocop/cop/style/copyright.rb#52 - def notice; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#93 - def notice_found?(processed_source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#79 - def shebang_token?(processed_source, token_index); end - - # @raise [Warning] - # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#60 - def verify_autocorrect_notice!; end -end - -# source://rubocop//lib/rubocop/cop/style/copyright.rb#26 -RuboCop::Cop::Style::Copyright::AUTOCORRECT_EMPTY_WARNING = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/copyright.rb#25 -RuboCop::Cop::Style::Copyright::MSG = T.let(T.unsafe(nil), String) - -# Checks for inheritance from `Data.define` to avoid creating the anonymous parent class. -# -# @example -# # bad -# class Person < Data.define(:first_name, :last_name) -# def age -# 42 -# end -# end -# -# # good -# Person = Data.define(:first_name, :last_name) do -# def age -# 42 -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#26 -class RuboCop::Cop::Style::DataInheritance < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#48 - def data_define?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#36 - def on_class(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#55 - def correct_parent(parent, corrector); end - - # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#65 - def range_for_empty_class_body(class_node, data_define); end -end - -# source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#31 -RuboCop::Cop::Style::DataInheritance::MSG = T.let(T.unsafe(nil), String) - -# Checks for consistent usage of the `DateTime` class over the -# `Time` class. This cop is disabled by default since these classes, -# although highly overlapping, have particularities that make them not -# replaceable in certain situations when dealing with multiple timezones -# and/or DST. -# -# @example -# -# # bad - uses `DateTime` for current time -# DateTime.now -# -# # good - uses `Time` for current time -# Time.now -# -# # bad - uses `DateTime` for modern date -# DateTime.iso8601('2016-06-29') -# -# # good - uses `Time` for modern date -# Time.iso8601('2016-06-29') -# -# # good - uses `DateTime` with start argument for historical date -# DateTime.iso8601('1751-04-23', Date::ENGLAND) -# @example AllowCoercion: false (default) -# -# # bad - coerces to `DateTime` -# something.to_datetime -# -# # good - coerces to `Time` -# something.to_time -# @example AllowCoercion: true -# -# # good -# something.to_datetime -# -# # good -# something.to_time -# -# source://rubocop//lib/rubocop/cop/style/date_time.rb#49 -class RuboCop::Cop::Style::DateTime < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/date_time.rb#56 - def date_time?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/date_time.rb#61 - def historic_date?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/date_time.rb#70 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/date_time.rb#70 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/date_time.rb#66 - def to_datetime?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/date_time.rb#86 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/date_time.rb#82 - def disallow_coercion?; end -end - -# source://rubocop//lib/rubocop/cop/style/date_time.rb#52 -RuboCop::Cop::Style::DateTime::CLASS_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/date_time.rb#53 -RuboCop::Cop::Style::DateTime::COERCION_MSG = T.let(T.unsafe(nil), String) - -# Checks for parentheses in the definition of a method, -# that does not take any arguments. Both instance and -# class/singleton methods are checked. -# -# @example -# -# # bad -# def foo() -# do_something -# end -# -# # good -# def foo -# do_something -# end -# -# # bad -# def foo() = do_something -# -# # good -# def foo = do_something -# -# # good (without parentheses it's a syntax error) -# def foo() do_something end -# @example -# -# # bad -# def Baz.foo() -# do_something -# end -# -# # good -# def Baz.foo -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#42 -class RuboCop::Cop::Style::DefWithParentheses < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#47 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#47 - def on_defs(node); end -end - -# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 -RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String) - -# Checks for places where the `#\_\_dir\_\_` method can replace more -# complex constructs to retrieve a canonicalized absolute path to the -# current file. -# -# @example -# # bad -# path = File.expand_path(File.dirname(__FILE__)) -# -# # bad -# path = File.dirname(File.realpath(__FILE__)) -# -# # good -# path = __dir__ -# -# source://rubocop//lib/rubocop/cop/style/dir.rb#19 -class RuboCop::Cop::Style::Dir < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/dir.rb#29 - def dir_replacement?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/dir.rb#34 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/dir.rb#44 - def file_keyword?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/dir.rb#25 -RuboCop::Cop::Style::Dir::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/dir.rb#26 -RuboCop::Cop::Style::Dir::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Prefer to use `Dir.empty?('path/to/dir')` when checking if a directory is empty. -# -# @example -# # bad -# Dir.entries('path/to/dir').size == 2 -# Dir.children('path/to/dir').empty? -# Dir.children('path/to/dir').size == 0 -# Dir.each_child('path/to/dir').none? -# -# # good -# Dir.empty?('path/to/dir') -# -# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#18 -class RuboCop::Cop::Style::DirEmpty < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#28 - def offensive?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#37 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#48 - def bang(node); end -end - -# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#22 -RuboCop::Cop::Style::DirEmpty::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#23 -RuboCop::Cop::Style::DirEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Detects comments to enable/disable RuboCop. -# This is useful if want to make sure that every RuboCop error gets fixed -# and not quickly disabled with a comment. -# -# Specific cops can be allowed with the `AllowedCops` configuration. Note that -# -# @example -# # bad -# # rubocop:disable Metrics/AbcSize -# def foo -# end -# # rubocop:enable Metrics/AbcSize -# -# # good -# def foo -# end -# @example AllowedCops: [Metrics/AbcSize] -# # good -# # rubocop:disable Metrics/AbcSize -# def foo -# end -# # rubocop:enable Metrics/AbcSize -# -# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#33 -class RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#40 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#77 - def allowed_cops; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#81 - def any_cops_allowed?; end - - # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#72 - def directive_cops(comment); end - - # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#53 - def register_offense(comment, directive_cops, disallowed_cops); end -end - -# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#37 -RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#38 -RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG_FOR_COPS = T.let(T.unsafe(nil), String) - -# When using `class_eval` (or other `eval`) with string interpolation, -# add a comment block showing its appearance if interpolated (a practice used in Rails code). -# -# @example -# # from activesupport/lib/active_support/core_ext/string/output_safety.rb -# -# # bad -# UNSAFE_STRING_METHODS.each do |unsafe_method| -# if 'String'.respond_to?(unsafe_method) -# class_eval <<-EOT, __FILE__, __LINE__ + 1 -# def #{unsafe_method}(*params, &block) -# to_str.#{unsafe_method}(*params, &block) -# end -# -# def #{unsafe_method}!(*params) -# @dirty = true -# super -# end -# EOT -# end -# end -# -# # good, inline comments in heredoc -# UNSAFE_STRING_METHODS.each do |unsafe_method| -# if 'String'.respond_to?(unsafe_method) -# class_eval <<-EOT, __FILE__, __LINE__ + 1 -# def #{unsafe_method}(*params, &block) # def capitalize(*params, &block) -# to_str.#{unsafe_method}(*params, &block) # to_str.capitalize(*params, &block) -# end # end -# -# def #{unsafe_method}!(*params) # def capitalize!(*params) -# @dirty = true # @dirty = true -# super # super -# end # end -# EOT -# end -# end -# -# # good, block comments in heredoc -# class_eval <<-EOT, __FILE__, __LINE__ + 1 -# # def capitalize!(*params) -# # @dirty = true -# # super -# # end -# -# def #{unsafe_method}!(*params) -# @dirty = true -# super -# end -# EOT -# -# # good, block comments before heredoc -# class_eval( -# # def capitalize!(*params) -# # @dirty = true -# # super -# # end -# -# <<-EOT, __FILE__, __LINE__ + 1 -# def #{unsafe_method}!(*params) -# @dirty = true -# super -# end -# EOT -# ) -# -# # bad - interpolated string without comment -# class_eval("def #{unsafe_method}!(*params); end") -# -# # good - with inline comment or replace it with block comment using heredoc -# class_eval("def #{unsafe_method}!(*params); end # def capitalize!(*params); end") -# -# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#77 -class RuboCop::Cop::Style::DocumentDynamicEvalDefinition < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#84 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#107 - def comment_block_docs?(arg_node); end - - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#147 - def comment_regexp(arg_node); end - - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#126 - def heredoc_comment_blocks(heredoc_body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#100 - def inline_comment_docs?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#96 - def interpolated?(arg_node); end - - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#136 - def merge_adjacent_comments(line, index, hash); end - - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#117 - def preceding_comment_blocks(node); end - - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#156 - def source_to_regexp(source); end -end - -# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#78 -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::BLOCK_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#79 -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#80 -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#82 -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for missing top-level documentation of classes and -# modules. Classes with no body are exempt from the check and so are -# namespace modules - modules that have nothing in their bodies except -# classes, other modules, constant definitions or constant visibility -# declarations. -# -# The documentation requirement is annulled if the class or module has -# same for all its children. -# -# @example -# # bad -# class Person -# # ... -# end -# -# module Math -# end -# -# # good -# # Description/Explanation of Person class -# class Person -# # ... -# end -# -# # allowed -# # Class without body -# class Person -# end -# -# # Namespace - A namespace can be a class or a module -# # Containing a class -# module Namespace -# # Description/Explanation of Person class -# class Person -# # ... -# end -# end -# -# # Containing constant visibility declaration -# module Namespace -# class Private -# end -# -# private_constant :Private -# end -# -# # Containing constant definition -# module Namespace -# Public = Class.new -# end -# -# # Macro calls -# module Namespace -# extend Foo -# end -# @example AllowedConstants: ['ClassMethods'] -# -# # good -# module A -# module ClassMethods -# # ... -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/documentation.rb#72 -class RuboCop::Cop::Style::Documentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::DocumentationComment - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#79 - def constant_definition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#85 - def constant_visibility_declaration?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#90 - def include_statement?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#94 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#100 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#82 - def outer_module(param0); end - - private - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#174 - def allowed_constants; end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#106 - def check(node, body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#147 - def compact_namespace?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#143 - def constant_allowed?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#139 - def constant_declaration?(node); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#178 - def identifier(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#123 - def include_statement_only?(body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#129 - def namespace?(node); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#170 - def nodoc(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#166 - def nodoc?(comment, require_all: T.unsafe(nil)); end - - # Note: How end-of-line comments are associated with code changed in - # parser-2.2.0.4. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#156 - def nodoc_comment?(node, require_all: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#118 - def nodoc_self_or_outer_module?(node); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#186 - def qualify_const(node); end -end - -# source://rubocop//lib/rubocop/cop/style/documentation.rb#76 -RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String) - -# Checks for missing documentation comment for public methods. -# It can optionally be configured to also require documentation for -# non-public methods. -# -# NOTE: This cop allows `initialize` method because `initialize` is -# a special method called from `new`. In some programming languages -# they are called constructor to distinguish it from method. -# -# @example -# -# # bad -# -# class Foo -# def bar -# puts baz -# end -# end -# -# module Foo -# def bar -# puts baz -# end -# end -# -# def foo.bar -# puts baz -# end -# -# # good -# -# class Foo -# # Documentation -# def bar -# puts baz -# end -# end -# -# module Foo -# # Documentation -# def bar -# puts baz -# end -# end -# -# # Documentation -# def foo.bar -# puts baz -# end -# @example RequireForNonPublicMethods: false (default) -# # good -# class Foo -# protected -# def do_something -# end -# end -# -# class Foo -# private -# def do_something -# end -# end -# @example RequireForNonPublicMethods: true -# # bad -# class Foo -# protected -# def do_something -# end -# end -# -# class Foo -# private -# def do_something -# end -# end -# -# # good -# class Foo -# protected -# # Documentation -# def do_something -# end -# end -# -# class Foo -# private -# # Documentation -# def do_something -# end -# end -# @example AllowedMethods: ['method_missing', 'respond_to_missing?'] -# -# # good -# class Foo -# def method_missing(name, *args) -# end -# -# def respond_to_missing?(symbol, include_private) -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 -class RuboCop::Cop::Style::DocumentationMethod < ::RuboCop::Cop::Base - include ::RuboCop::Cop::DocumentationComment - include ::RuboCop::Cop::VisibilityHelp - include ::RuboCop::Cop::DefNode - - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#116 - def modifier_node?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#120 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#120 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#146 - def allowed_methods; end - - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#130 - def check(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#142 - def method_allowed?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#138 - def require_for_non_public_methods?; end -end - -# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#113 -RuboCop::Cop::Style::DocumentationMethod::MSG = T.let(T.unsafe(nil), String) - -# Detects double disable comments on one line. This is mostly to catch -# automatically generated comments that need to be regenerated. -# -# @example -# # bad -# def f # rubocop:disable Style/For # rubocop:disable Metrics/AbcSize -# end -# -# # good -# # rubocop:disable Metrics/AbcSize -# def f # rubocop:disable Style/For -# end -# # rubocop:enable Metrics/AbcSize -# -# # if both fit on one line -# def f # rubocop:disable Style/For, Metrics/AbcSize -# end -# -# source://rubocop//lib/rubocop/cop/style/double_cop_disable_directive.rb#27 -class RuboCop::Cop::Style::DoubleCopDisableDirective < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/double_cop_disable_directive.rb#34 - def on_new_investigation; end -end - -# source://rubocop//lib/rubocop/cop/style/double_cop_disable_directive.rb#32 -RuboCop::Cop::Style::DoubleCopDisableDirective::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of double negation (`!!`) to convert something to a boolean value. -# -# When using `EnforcedStyle: allowed_in_returns`, allow double negation in contexts -# that use boolean as a return value. When using `EnforcedStyle: forbidden`, double negation -# should be forbidden always. -# -# NOTE: when `something` is a boolean value -# `!!something` and `!something.nil?` are not the same thing. -# As you're unlikely to write code that can accept values of any type -# this is rarely a problem in practice. -# -# @example -# # bad -# !!something -# -# # good -# !something.nil? -# @example EnforcedStyle: allowed_in_returns (default) -# # good -# def foo? -# !!return_value -# end -# -# define_method :foo? do -# !!return_value -# end -# -# define_singleton_method :foo? do -# !!return_value -# end -# @example EnforcedStyle: forbidden -# # bad -# def foo? -# !!return_value -# end -# -# define_method :foo? do -# !!return_value -# end -# -# define_singleton_method :foo? do -# !!return_value -# end -# -# source://rubocop//lib/rubocop/cop/style/double_negation.rb#61 -class RuboCop::Cop::Style::DoubleNegation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#69 - def double_negative?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#71 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#84 - def allowed_in_returns?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#111 - def define_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#138 - def double_negative_condition_return_value?(node, last_child, conditional_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#88 - def end_of_method_definition?(node); end - - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#120 - def find_conditional_node_from_ascendant(node); end - - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#103 - def find_def_node_from_ascendant(node); end - - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#127 - def find_last_child(node); end - - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#147 - def find_parent_not_enumerable(node); end -end - -# source://rubocop//lib/rubocop/cop/style/double_negation.rb#65 -RuboCop::Cop::Style::DoubleNegation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/double_negation.rb#66 -RuboCop::Cop::Style::DoubleNegation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for loops which iterate a constant number of times, -# using a Range literal and `#each`. This can be done more readably using -# `Integer#times`. -# -# This check only applies if the block takes no parameters. -# -# @example -# # bad -# (1..5).each { } -# -# # good -# 5.times { } -# @example -# # bad -# (0...10).each {} -# -# # good -# 10.times {} -# -# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#25 -class RuboCop::Cop::Style::EachForSimpleLoop < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#53 - def each_range(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#65 - def each_range_with_zero_origin?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#77 - def each_range_without_block_argument?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#30 - def on_block(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#46 - def offending?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#28 -RuboCop::Cop::Style::EachForSimpleLoop::MSG = T.let(T.unsafe(nil), String) - -# Looks for inject / reduce calls where the passed in object is -# returned at the end and so could be replaced by each_with_object without -# the need to return the object at the end. -# -# However, we can't replace with each_with_object if the accumulator -# parameter is assigned to within the block. -# -# @example -# # bad -# [1, 2].inject({}) { |a, e| a[e] = e; a } -# -# # good -# [1, 2].each_with_object({}) { |e, a| a[e] = e } -# -# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#19 -class RuboCop::Cop::Style::EachWithObject < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#60 - def each_with_object_block_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#65 - def each_with_object_numblock_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#26 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#43 - def on_numblock(node); end - - private - - # if the accumulator parameter is assigned to in the block, - # then we can't convert to each_with_object - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#102 - def accumulator_param_assigned_to?(body, args); end - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#69 - def autocorrect_block(corrector, node, return_value); end - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#84 - def autocorrect_numblock(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#121 - def first_argument_returned?(args, return_value); end - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#114 - def return_value(body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#129 - def return_value_occupies_whole_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#96 - def simple_method_arg?(method_arg); end - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#133 - def whole_line_expression(node); end -end - -# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#24 -RuboCop::Cop::Style::EachWithObject::METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#23 -RuboCop::Cop::Style::EachWithObject::MSG = T.let(T.unsafe(nil), String) - -# Checks for pipes for empty block parameters. Pipes for empty -# block parameters do not cause syntax errors, but they are redundant. -# -# @example -# # bad -# a do || -# do_something -# end -# -# # bad -# a { || do_something } -# -# # good -# a do -# end -# -# # good -# a { do_something } -# -# source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#24 -class RuboCop::Cop::Style::EmptyBlockParameter < ::RuboCop::Cop::Base - include ::RuboCop::Cop::EmptyParameter - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#31 - def on_block(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#38 - def autocorrect(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#29 -RuboCop::Cop::Style::EmptyBlockParameter::MSG = T.let(T.unsafe(nil), String) - -# Checks for case statements with an empty condition. -# -# @example -# -# # bad: -# case -# when x == 0 -# puts 'x is 0' -# when y == 0 -# puts 'y is 0' -# else -# puts 'neither is 0' -# end -# -# # good: -# if x == 0 -# puts 'x is 0' -# elsif y == 0 -# puts 'y is 0' -# else -# puts 'neither is 0' -# end -# -# # good: (the case condition node is not empty) -# case n -# when 0 -# puts 'zero' -# when 1 -# puts 'one' -# else -# puts 'more' -# end -# -# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#38 -class RuboCop::Cop::Style::EmptyCaseCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#46 - def on_case(case_node); end - - private - - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#63 - def autocorrect(corrector, case_node); end - - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#70 - def correct_case_when(corrector, case_node, when_nodes); end - - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#82 - def correct_when_conditions(corrector, when_nodes); end - - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#97 - def keep_first_when_comment(case_range, corrector); end - - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#107 - def replace_then_with_line_break(corrector, conditions, when_node); end -end - -# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#42 -RuboCop::Cop::Style::EmptyCaseCondition::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#43 -RuboCop::Cop::Style::EmptyCaseCondition::NOT_SUPPORTED_PARENT_TYPES = T.let(T.unsafe(nil), Array) - -# Checks for empty else-clauses, possibly including comments and/or an -# explicit `nil` depending on the EnforcedStyle. -# -# @example EnforcedStyle: both (default) -# # warn on empty else and else with nil in it -# -# # bad -# if condition -# statement -# else -# nil -# end -# -# # bad -# if condition -# statement -# else -# end -# -# # good -# if condition -# statement -# else -# statement -# end -# -# # good -# if condition -# statement -# end -# @example EnforcedStyle: empty -# # warn only on empty else -# -# # bad -# if condition -# statement -# else -# end -# -# # good -# if condition -# statement -# else -# nil -# end -# -# # good -# if condition -# statement -# else -# statement -# end -# -# # good -# if condition -# statement -# end -# @example EnforcedStyle: nil -# # warn on else with nil in it -# -# # bad -# if condition -# statement -# else -# nil -# end -# -# # good -# if condition -# statement -# else -# end -# -# # good -# if condition -# statement -# else -# statement -# end -# -# # good -# if condition -# statement -# end -# @example AllowComments: false (default) -# -# # bad -# if condition -# statement -# else -# # something comment -# nil -# end -# -# # bad -# if condition -# statement -# else -# # something comment -# end -# @example AllowComments: true -# -# # good -# if condition -# statement -# else -# # something comment -# nil -# end -# -# # good -# if condition -# statement -# else -# # something comment -# end -# -# source://rubocop//lib/rubocop/cop/style/empty_else.rb#127 -class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#139 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#135 - def on_normal_if_unless(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#172 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#193 - def autocorrect_forbidden?(type); end - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#186 - def base_node(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#145 - def check(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#180 - def comment_in_else?(loc); end - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#160 - def empty_check(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#156 - def empty_style?; end - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#197 - def missing_else_style; end - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#166 - def nil_check(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#152 - def nil_style?; end -end - -# source://rubocop//lib/rubocop/cop/style/empty_else.rb#133 -RuboCop::Cop::Style::EmptyElse::MSG = T.let(T.unsafe(nil), String) - -# Checks for using empty heredoc to reduce redundancy. -# -# @example -# -# # bad -# <<~EOS -# EOS -# -# <<-EOS -# EOS -# -# < () { do_something } -# -# # good -# -> { do_something } -# -# # good -# -> (arg) { do_something(arg) } -# -# source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#19 -class RuboCop::Cop::Style::EmptyLambdaParameter < ::RuboCop::Cop::Base - include ::RuboCop::Cop::EmptyParameter - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#26 - def on_block(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#35 - def autocorrect(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#24 -RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) - -# Checks for the use of a method, the result of which -# would be a literal, like an empty array, hash, or string. -# -# @example -# # bad -# a = Array.new -# h = Hash.new -# s = String.new -# -# # good -# a = [] -# h = {} -# s = '' -# -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#19 -class RuboCop::Cop::Style::EmptyLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#31 - def array_node(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#40 - def array_with_block(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#34 - def hash_node(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#43 - def hash_with_block(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#50 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#37 - def str_node(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#111 - def correction(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#74 - def enforce_double_quotes?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#82 - def first_argument_unparenthesized?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#129 - def frozen_strings?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#102 - def offense_array_node?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#106 - def offense_hash_node?(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#60 - def offense_message(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#70 - def preferred_string_literal; end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#89 - def replacement_range(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#78 - def string_literals_config; end -end - -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#24 -RuboCop::Cop::Style::EmptyLiteral::ARR_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#25 -RuboCop::Cop::Style::EmptyLiteral::HASH_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#28 -RuboCop::Cop::Style::EmptyLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#26 -RuboCop::Cop::Style::EmptyLiteral::STR_MSG = T.let(T.unsafe(nil), String) - -# Checks for the formatting of empty method definitions. -# By default it enforces empty method definitions to go on a single -# line (compact style), but it can be configured to enforce the `end` -# to go on its own line (expanded style). -# -# NOTE: A method definition is not considered empty if it contains -# comments. -# -# NOTE: Autocorrection will not be applied for the `compact` style -# if the resulting code is longer than the `Max` configuration for -# `Layout/LineLength`, but an offense will still be registered. -# -# @example EnforcedStyle: compact (default) -# # bad -# def foo(bar) -# end -# -# def self.foo(bar) -# end -# -# # good -# def foo(bar); end -# -# def foo(bar) -# # baz -# end -# -# def self.foo(bar); end -# @example EnforcedStyle: expanded -# # bad -# def foo(bar); end -# -# def self.foo(bar); end -# -# # good -# def foo(bar) -# end -# -# def self.foo(bar) -# end -# -# source://rubocop//lib/rubocop/cop/style/empty_method.rb#47 -class RuboCop::Cop::Style::EmptyMethod < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#54 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#54 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#95 - def compact?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#103 - def compact_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#73 - def correct_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#77 - def corrected(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#99 - def expanded?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#107 - def expanded_style?; end - - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#89 - def joint(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#111 - def max_line_length; end - - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#69 - def message(_range); end -end - -# source://rubocop//lib/rubocop/cop/style/empty_method.rb#51 -RuboCop::Cop::Style::EmptyMethod::MSG_COMPACT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/empty_method.rb#52 -RuboCop::Cop::Style::EmptyMethod::MSG_EXPANDED = T.let(T.unsafe(nil), String) - -# Checks ensures source files have no utf-8 encoding comments. -# -# @example -# # bad -# # encoding: UTF-8 -# # coding: UTF-8 -# # -*- coding: UTF-8 -*- -# -# source://rubocop//lib/rubocop/cop/style/encoding.rb#12 -class RuboCop::Cop::Style::Encoding < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/encoding.rb#20 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/encoding.rb#32 - def comments; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/encoding.rb#43 - def offense?(comment); end - - # source://rubocop//lib/rubocop/cop/style/encoding.rb#47 - def register_offense(line_number, comment); end -end - -# source://rubocop//lib/rubocop/cop/style/encoding.rb#17 -RuboCop::Cop::Style::Encoding::ENCODING_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/encoding.rb#16 -RuboCop::Cop::Style::Encoding::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/encoding.rb#18 -RuboCop::Cop::Style::Encoding::SHEBANG = T.let(T.unsafe(nil), String) - -# Checks for END blocks. -# -# @example -# # bad -# END { puts 'Goodbye!' } -# -# # good -# at_exit { puts 'Goodbye!' } -# -# source://rubocop//lib/rubocop/cop/style/end_block.rb#15 -class RuboCop::Cop::Style::EndBlock < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/end_block.rb#20 - def on_postexe(node); end -end - -# source://rubocop//lib/rubocop/cop/style/end_block.rb#18 -RuboCop::Cop::Style::EndBlock::MSG = T.let(T.unsafe(nil), String) - -# Checks for endless methods. -# -# It can enforce either the use of endless methods definitions -# for single-lined method bodies, or disallow endless methods. -# -# Other method definition types are not considered by this cop. -# -# The supported styles are: -# -# * allow_single_line (default) - only single line endless method definitions are allowed. -# * allow_always - all endless method definitions are allowed. -# * disallow - all endless method definitions are disallowed. -# -# NOTE: Incorrect endless method definitions will always be -# corrected to a multi-line definition. -# -# @example EnforcedStyle: allow_single_line (default) -# # good -# def my_method() = x -# -# # bad, multi-line endless method -# def my_method() = x.foo -# .bar -# .baz -# @example EnforcedStyle: allow_always -# # good -# def my_method() = x -# -# # good -# def my_method() = x.foo -# .bar -# .baz -# @example EnforcedStyle: disallow -# # bad -# def my_method() = x -# -# # bad -# def my_method() = x.foo -# .bar -# .baz -# -# source://rubocop//lib/rubocop/cop/style/endless_method.rb#49 -class RuboCop::Cop::Style::EndlessMethod < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::TargetRubyVersion - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#60 - def on_def(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#95 - def arguments(node, missing = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#85 - def correct_to_multiline(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#70 - def handle_allow_style(node); end - - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#79 - def handle_disallow_style(node); end -end - -# source://rubocop//lib/rubocop/cop/style/endless_method.rb#56 -RuboCop::Cop::Style::EndlessMethod::CORRECTION_STYLES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/endless_method.rb#57 -RuboCop::Cop::Style::EndlessMethod::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/endless_method.rb#58 -RuboCop::Cop::Style::EndlessMethod::MSG_MULTI_LINE = T.let(T.unsafe(nil), String) - -# Checks for consistent usage of `ENV['HOME']`. If `nil` is used as -# the second argument of `ENV.fetch`, it is treated as a bad case like `ENV[]`. -# -# @example -# -# # bad -# ENV['HOME'] -# ENV.fetch('HOME', nil) -# -# # good -# Dir.home -# -# # good -# ENV.fetch('HOME', default) -# -# source://rubocop//lib/rubocop/cop/style/env_home.rb#31 -class RuboCop::Cop::Style::EnvHome < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/env_home.rb#38 - def env_home?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/env_home.rb#45 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/env_home.rb#34 -RuboCop::Cop::Style::EnvHome::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/env_home.rb#35 -RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Ensures that eval methods (`eval`, `instance_eval`, `class_eval` -# and `module_eval`) are given filename and line number values (`\_\_FILE\_\_` -# and `\_\_LINE\_\_`). This data is used to ensure that any errors raised -# within the evaluated code will be given the correct identification -# in a backtrace. -# -# The cop also checks that the line number given relative to `\_\_LINE\_\_` is -# correct. -# -# This cop will autocorrect incorrect or missing filename and line number -# values. However, if `eval` is called without a binding argument, the cop -# will not attempt to automatically add a binding, or add filename and -# line values. -# -# This cop works only when a string literal is given as a code string. -# No offense is reported if a string variable is given as below: -# -# @example -# # bad -# eval <<-RUBY -# def do_something -# end -# RUBY -# -# # bad -# C.class_eval <<-RUBY -# def do_something -# end -# RUBY -# -# # good -# eval <<-RUBY, binding, __FILE__, __LINE__ + 1 -# def do_something -# end -# RUBY -# -# # good -# C.class_eval <<-RUBY, __FILE__, __LINE__ + 1 -# def do_something -# end -# RUBY -# @example -# # not checked -# code = <<-RUBY -# def do_something -# end -# RUBY -# eval code -# -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#56 -class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#74 - def line_with_offset?(param0 = T.unsafe(nil), param1, param2); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#81 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#69 - def valid_eval_receiver?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#186 - def add_offense_for_different_line(node, line_node, line_diff); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#131 - def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#201 - def add_offense_for_missing_line(node, code); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#208 - def add_offense_for_missing_location(node, code); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#180 - def add_offense_for_same_line(node, line_node); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#143 - def check_file(node, file_node); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#156 - def check_line(node, code); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#95 - def check_location(node, code); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#193 - def expected_line(sign, line_diff); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#122 - def file_and_line(node); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#168 - def line_difference(line_node, code); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#220 - def missing_line(node, code); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#109 - def register_offense(node, &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#114 - def special_file_keyword?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#118 - def special_line_keyword?(node); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#172 - def string_first_line(str_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#127 - def with_binding?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#59 -RuboCop::Cop::Style::EvalWithLocation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#60 -RuboCop::Cop::Style::EvalWithLocation::MSG_EVAL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#61 -RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_FILE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#63 -RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_LINE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#66 -RuboCop::Cop::Style::EvalWithLocation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for places where `Integer#even?` or `Integer#odd?` -# can be used. -# -# @example -# -# # bad -# if x % 2 == 0 -# end -# -# # good -# if x.even? -# end -# -# source://rubocop//lib/rubocop/cop/style/even_odd.rb#18 -class RuboCop::Cop::Style::EvenOdd < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/even_odd.rb#25 - def even_odd_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/even_odd.rb#33 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/even_odd.rb#45 - def replacement_method(arg, method); end -end - -# source://rubocop//lib/rubocop/cop/style/even_odd.rb#21 -RuboCop::Cop::Style::EvenOdd::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/even_odd.rb#22 -RuboCop::Cop::Style::EvenOdd::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for exact regexp match inside Regexp literals. -# -# @example -# -# # bad -# string =~ /\Astring\z/ -# string === /\Astring\z/ -# string.match(/\Astring\z/) -# string.match?(/\Astring\z/) -# -# # good -# string == 'string' -# -# # bad -# string !~ /\Astring\z/ -# -# # good -# string != 'string' -# -# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#25 -class RuboCop::Cop::Style::ExactRegexpMatch < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#32 - def exact_regexp_match(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#40 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#40 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#57 - def exact_match_pattern?(parsed_regexp); end - - # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#64 - def new_method(node); end -end - -# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#28 -RuboCop::Cop::Style::ExactRegexpMatch::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#29 -RuboCop::Cop::Style::ExactRegexpMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for use of the `File.expand_path` arguments. -# Likewise, it also checks for the `Pathname.new` argument. -# -# Contrastive bad case and good case are alternately shown in -# the following examples. -# -# @example -# # bad -# File.expand_path('..', __FILE__) -# -# # good -# File.expand_path(__dir__) -# -# # bad -# File.expand_path('../..', __FILE__) -# -# # good -# File.expand_path('..', __dir__) -# -# # bad -# File.expand_path('.', __FILE__) -# -# # good -# File.expand_path(__FILE__) -# -# # bad -# Pathname(__FILE__).parent.expand_path -# -# # good -# Pathname(__dir__).expand_path -# -# # bad -# Pathname.new(__FILE__).parent.expand_path -# -# # good -# Pathname.new(__dir__).expand_path -# -# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#43 -class RuboCop::Cop::Style::ExpandPathArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#58 - def file_expand_path(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#82 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#74 - def pathname_new_parent_expand_path(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#66 - def pathname_parent_expand_path(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#189 - def arguments_range(node); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#100 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#135 - def autocorrect_expand_path(corrector, current_path, default_dir); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#162 - def depth(current_path); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#113 - def inspect_offense_for_expand_path(node, current_path, default_dir); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#168 - def parent_path(current_path); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#182 - def remove_parent_method(corrector, default_dir); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#155 - def strip_surrounded_quotes!(path_string); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#109 - def unrecommended_argument?(default_dir); end -end - -# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#47 -RuboCop::Cop::Style::ExpandPathArguments::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#49 -RuboCop::Cop::Style::ExpandPathArguments::PATHNAME_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#51 -RuboCop::Cop::Style::ExpandPathArguments::PATHNAME_NEW_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#55 -RuboCop::Cop::Style::ExpandPathArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces the use of explicit block argument to avoid writing -# block literal that just passes its arguments to another block. -# -# NOTE: This cop only registers an offense if the block args match the -# yield args exactly. -# -# @example -# # bad -# def with_tmp_dir -# Dir.mktmpdir do |tmp_dir| -# Dir.chdir(tmp_dir) { |dir| yield dir } # block just passes arguments -# end -# end -# -# # bad -# def nine_times -# 9.times { yield } -# end -# -# # good -# def with_tmp_dir(&block) -# Dir.mktmpdir do |tmp_dir| -# Dir.chdir(tmp_dir, &block) -# end -# end -# -# with_tmp_dir do |dir| -# puts "dir is accessible as a parameter and pwd is set: #{dir}" -# end -# -# # good -# def nine_times(&block) -# 9.times(&block) -# end -# -# source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#41 -class RuboCop::Cop::Style::ExplicitBlockArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # @return [ExplicitBlockArgument] a new instance of ExplicitBlockArgument - # - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#57 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#62 - def on_yield(node); end - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#49 - def yielding_block?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#108 - def add_block_argument(node, corrector, block_name); end - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#147 - def block_body_range(block_node, send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#125 - def call_like?(node); end - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#137 - def correct_call_node(node, corrector, block_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#120 - def empty_arguments?(node); end - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#87 - def extract_block_name(def_node); end - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#129 - def insert_argument(node, corrector, block_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#95 - def yielding_arguments?(block_args, yield_args); end - - class << self - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#53 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#45 -RuboCop::Cop::Style::ExplicitBlockArgument::MSG = T.let(T.unsafe(nil), String) - -# Enforces consistency when using exponential notation -# for numbers in the code (eg 1.2e4). Different styles are supported: -# -# * `scientific` which enforces a mantissa between 1 (inclusive) and 10 (exclusive). -# * `engineering` which enforces the exponent to be a multiple of 3 and the mantissa -# to be between 0.1 (inclusive) and 10 (exclusive). -# * `integral` which enforces the mantissa to always be a whole number without -# trailing zeroes. -# -# @example EnforcedStyle: scientific (default) -# # Enforces a mantissa between 1 (inclusive) and 10 (exclusive). -# -# # bad -# 10e6 -# 0.3e4 -# 11.7e5 -# 3.14e0 -# -# # good -# 1e7 -# 3e3 -# 1.17e6 -# 3.14 -# @example EnforcedStyle: engineering -# # Enforces using multiple of 3 exponents, -# # mantissa should be between 0.1 (inclusive) and 1000 (exclusive) -# -# # bad -# 3.2e7 -# 0.1e5 -# 12e5 -# 1232e6 -# -# # good -# 32e6 -# 10e3 -# 1.2e6 -# 1.232e9 -# @example EnforcedStyle: integral -# # Enforces the mantissa to have no decimal part and no -# # trailing zeroes. -# -# # bad -# 3.2e7 -# 0.1e5 -# 120e4 -# -# # good -# 32e6 -# 1e4 -# 12e5 -# -# source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#60 -class RuboCop::Cop::Style::ExponentialNotation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#68 - def on_float(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#79 - def engineering?(node); end - - # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#90 - def integral(node); end - - # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#110 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#95 - def offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#74 - def scientific?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#62 -RuboCop::Cop::Style::ExponentialNotation::MESSAGES = T.let(T.unsafe(nil), Hash) - -# Suggests `ENV.fetch` for the replacement of `ENV[]`. -# `ENV[]` silently fails and returns `nil` when the environment variable is unset, -# which may cause unexpected behaviors when the developer forgets to set it. -# On the other hand, `ENV.fetch` raises KeyError or returns the explicitly -# specified default value. -# -# @example -# # bad -# ENV['X'] -# x = ENV['X'] -# -# # good -# ENV.fetch('X') -# x = ENV.fetch('X') -# -# # also good -# !ENV['X'] -# ENV['X'].some_method # (e.g. `.nil?`) -# -# source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#25 -class RuboCop::Cop::Style::FetchEnvVar < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#31 - def env_with_bracket?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#35 - def on_send(node); end - - private - - # The following are allowed cases: - # - # - Used as a flag (e.g., `if ENV['X']` or `!ENV['X']`) because - # it simply checks whether the variable is set. - # - Receiving a message with dot syntax, e.g. `ENV['X'].nil?`. - # - `ENV['key']` assigned by logical AND/OR assignment. - # - `ENV['key']` is the LHS of a `||`. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#105 - def allowable_use?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#48 - def allowed_var?(node); end - - # The following are allowed cases: - # - # - `ENV['key']` is a receiver of `||=`, e.g. `ENV['X'] ||= y`. - # - `ENV['key']` is a receiver of `&&=`, e.g. `ENV['X'] &&= y`. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#113 - def assigned?(node); end - - # Check if the node is a receiver and receives a message with dot syntax. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#89 - def message_chained_with_dot?(node); end - - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#126 - def new_code(name_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#84 - def offensive?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#120 - def or_lhs?(node); end - - # Avoid offending in the following cases: - # `ENV['key'] if ENV['key'] = x` - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#80 - def partial_matched?(node, condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#53 - def used_as_flag?(node); end - - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#60 - def used_if_condition_in_body(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#69 - def used_in_condition?(node, condition); end -end - -# source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#28 -RuboCop::Cop::Style::FetchEnvVar::MSG = T.let(T.unsafe(nil), String) - -# Prefer to use `File.empty?('path/to/file')` when checking if a file is empty. -# -# @example -# # bad -# File.zero?('path/to/file') -# File.size('path/to/file') == 0 -# File.size('path/to/file') >= 0 -# File.size('path/to/file').zero? -# File.read('path/to/file').empty? -# File.binread('path/to/file') == '' -# FileTest.zero?('path/to/file') -# -# # good -# File.empty?('path/to/file') -# FileTest.empty?('path/to/file') -# -# source://rubocop//lib/rubocop/cop/style/file_empty.rb#27 -class RuboCop::Cop::Style::FileEmpty < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/file_empty.rb#37 - def offensive?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/file_empty.rb#49 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/file_empty.rb#62 - def bang(node); end -end - -# source://rubocop//lib/rubocop/cop/style/file_empty.rb#31 -RuboCop::Cop::Style::FileEmpty::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/file_empty.rb#32 -RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Favor `File.(bin)read` convenience methods. -# -# @example -# ## text mode -# # bad -# File.open(filename).read -# File.open(filename, &:read) -# File.open(filename) { |f| f.read } -# File.open(filename) do |f| -# f.read -# end -# File.open(filename, 'r').read -# File.open(filename, 'r', &:read) -# File.open(filename, 'r') do |f| -# f.read -# end -# -# # good -# File.read(filename) -# @example -# ## binary mode -# # bad -# File.open(filename, 'rb').read -# File.open(filename, 'rb', &:read) -# File.open(filename, 'rb') do |f| -# f.read -# end -# -# # good -# File.binread(filename) -# -# source://rubocop//lib/rubocop/cop/style/file_read.rb#38 -class RuboCop::Cop::Style::FileRead < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/file_read.rb#65 - def block_read?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/file_read.rb#49 - def file_open?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/file_read.rb#69 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/file_read.rb#60 - def send_read?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/file_read.rb#84 - def evidence(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/file_read.rb#100 - def file_open_read?(node); end - - # source://rubocop//lib/rubocop/cop/style/file_read.rb#106 - def read_method(mode); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/file_read.rb#92 - def read_node?(node, block_pass); end -end - -# source://rubocop//lib/rubocop/cop/style/file_read.rb#42 -RuboCop::Cop::Style::FileRead::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/file_read.rb#46 -RuboCop::Cop::Style::FileRead::READ_FILE_START_TO_FINISH_MODES = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/style/file_read.rb#44 -RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Favor `File.(bin)write` convenience methods. -# -# NOTE: There are different method signatures between `File.write` (class method) -# and `File#write` (instance method). The following case will be allowed because -# static analysis does not know the contents of the splat argument: -# -# [source,ruby] -# ---- -# File.open(filename, 'w') do |f| -# f.write(*objects) -# end -# ---- -# -# @example -# ## text mode -# # bad -# File.open(filename, 'w').write(content) -# File.open(filename, 'w') do |f| -# f.write(content) -# end -# -# # good -# File.write(filename, content) -# @example -# ## binary mode -# # bad -# File.open(filename, 'wb').write(content) -# File.open(filename, 'wb') do |f| -# f.write(content) -# end -# -# # good -# File.binwrite(filename, content) -# -# source://rubocop//lib/rubocop/cop/style/file_write.rb#41 -class RuboCop::Cop::Style::FileWrite < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#68 - def block_write?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#85 - def evidence(node); end - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#52 - def file_open?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#72 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#63 - def send_write?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # @yield [content] - # - # source://rubocop//lib/rubocop/cop/style/file_write.rb#95 - def file_open_write?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/file_write.rb#123 - def heredoc?(write_node); end - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#128 - def heredoc_range(first_argument); end - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#108 - def replacement(mode, filename, content, write_node); end - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#104 - def write_method(mode); end -end - -# source://rubocop//lib/rubocop/cop/style/file_write.rb#45 -RuboCop::Cop::Style::FileWrite::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/file_write.rb#47 -RuboCop::Cop::Style::FileWrite::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/style/file_write.rb#49 -RuboCop::Cop::Style::FileWrite::TRUNCATING_WRITE_MODES = T.let(T.unsafe(nil), Set) - -# Checks for division with integers coerced to floats. -# It is recommended to either always use `fdiv` or coerce one side only. -# This cop also provides other options for code consistency. -# -# @example EnforcedStyle: single_coerce (default) -# # bad -# a.to_f / b.to_f -# -# # good -# a.to_f / b -# a / b.to_f -# @example EnforcedStyle: left_coerce -# # bad -# a / b.to_f -# a.to_f / b.to_f -# -# # good -# a.to_f / b -# @example EnforcedStyle: right_coerce -# # bad -# a.to_f / b -# a.to_f / b.to_f -# -# # good -# a / b.to_f -# @example EnforcedStyle: fdiv -# # bad -# a / b.to_f -# a.to_f / b -# a.to_f / b.to_f -# -# # good -# a.fdiv(b) -# -# source://rubocop//lib/rubocop/cop/style/float_division.rb#53 -class RuboCop::Cop::Style::FloatDivision < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#79 - def any_coerce?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#75 - def both_coerce?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#71 - def left_coerce?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#83 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#67 - def right_coerce?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#121 - def add_to_f_method(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#130 - def correct_from_slash_to_fdiv(corrector, node, receiver, argument); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#141 - def extract_receiver_source(node); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#117 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/float_division.rb#102 - def offense_condition?(node); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#125 - def remove_to_f_method(corrector, send_node); end -end - -# source://rubocop//lib/rubocop/cop/style/float_division.rb#57 -RuboCop::Cop::Style::FloatDivision::MESSAGES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/float_division.rb#64 -RuboCop::Cop::Style::FloatDivision::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Looks for uses of the `for` keyword or `each` method. The -# preferred alternative is set in the EnforcedStyle configuration -# parameter. An `each` call with a block on a single line is always -# allowed. -# -# @example EnforcedStyle: each (default) -# # bad -# def foo -# for n in [1, 2, 3] do -# puts n -# end -# end -# -# # good -# def foo -# [1, 2, 3].each do |n| -# puts n -# end -# end -# @example EnforcedStyle: for -# # bad -# def foo -# [1, 2, 3].each do |n| -# puts n -# end -# end -# -# # good -# def foo -# for n in [1, 2, 3] do -# puts n -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/for.rb#45 -class RuboCop::Cop::Style::For < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/for.rb#65 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/for.rb#54 - def on_for(node); end - - # source://rubocop//lib/rubocop/cop/style/for.rb#65 - def on_numblock(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/for.rb#84 - def suspect_enumerable?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/for.rb#50 -RuboCop::Cop::Style::For::EACH_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/style/for.rb#51 -RuboCop::Cop::Style::For::PREFER_EACH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/for.rb#52 -RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) - -# Enforces the use of a single string formatting utility. -# Valid options include `Kernel#format`, `Kernel#sprintf`, and `String#%`. -# -# The detection of `String#%` cannot be implemented in a reliable -# manner for all cases, so only two scenarios are considered - -# if the first argument is a string literal and if the second -# argument is an array literal. -# -# Autocorrection will be applied when using argument is a literal or known built-in conversion -# methods such as `to_d`, `to_f`, `to_h`, `to_i`, `to_r`, `to_s`, and `to_sym` on variables, -# provided that their return value is not an array. For example, when using `to_s`, -# `'%s' % [1, 2, 3].to_s` can be autocorrected without any incompatibility: -# -# [source,ruby] -# ---- -# '%s' % [1, 2, 3] #=> '1' -# format('%s', [1, 2, 3]) #=> '[1, 2, 3]' -# '%s' % [1, 2, 3].to_s #=> '[1, 2, 3]' -# ---- -# -# @example EnforcedStyle: format (default) -# # bad -# puts sprintf('%10s', 'foo') -# puts '%10s' % 'foo' -# -# # good -# puts format('%10s', 'foo') -# @example EnforcedStyle: sprintf -# # bad -# puts format('%10s', 'foo') -# puts '%10s' % 'foo' -# -# # good -# puts sprintf('%10s', 'foo') -# @example EnforcedStyle: percent -# # bad -# puts format('%10s', 'foo') -# puts sprintf('%10s', 'foo') -# -# # good -# puts '%10s' % 'foo' -# -# source://rubocop//lib/rubocop/cop/style/format_string.rb#50 -class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/format_string.rb#61 - def formatter(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/format_string.rb#74 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/format_string.rb#70 - def variable_argument?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/format_string.rb#102 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/format_string.rb#118 - def autocorrect_from_percent(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/format_string.rb#132 - def autocorrect_to_percent(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/format_string.rb#88 - def autocorrectable?(node); end - - # source://rubocop//lib/rubocop/cop/style/format_string.rb#145 - def format_single_parameter(arg); end - - # source://rubocop//lib/rubocop/cop/style/format_string.rb#94 - def message(detected_style); end - - # source://rubocop//lib/rubocop/cop/style/format_string.rb#98 - def method_name(style_name); end -end - -# Known conversion methods whose return value is not an array. -# -# source://rubocop//lib/rubocop/cop/style/format_string.rb#58 -RuboCop::Cop::Style::FormatString::AUTOCORRECTABLE_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/format_string.rb#54 -RuboCop::Cop::Style::FormatString::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/format_string.rb#55 -RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Use a consistent style for named format string tokens. -# -# NOTE: `unannotated` style cop only works for strings -# which are passed as arguments to those methods: -# `printf`, `sprintf`, `format`, `%`. -# The reason is that _unannotated_ format is very similar -# to encoded URLs or Date/Time formatting strings. -# -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. -# -# It is allowed to contain unannotated token -# if the number of them is less than or equals to -# `MaxUnannotatedPlaceholdersAllowed`. -# -# @example AllowedPatterns: ['redirect'] -# -# # good -# redirect('foo/%{bar_id}') -# @example EnforcedStyle: template -# -# # bad -# format('%s', greeting: 'Hello') -# format('%s', 'Hello') -# -# # good -# format('%{greeting}', greeting: 'Hello') -# @example EnforcedStyle: unannotated -# -# # bad -# format('%s', greeting: 'Hello') -# format('%{greeting}', greeting: 'Hello') -# -# # good -# format('%s', 'Hello') -# @example MaxUnannotatedPlaceholdersAllowed: 0 -# -# # bad -# format('%06d', 10) -# format('%s %s.', 'Hello', 'world') -# -# # good -# format('%06d', number: 10) -# @example MaxUnannotatedPlaceholdersAllowed: 1 (default) -# -# # bad -# format('%s %s.', 'Hello', 'world') -# -# # good -# format('%06d', 10) -# @example AllowedMethods: [] (default) -# -# # bad -# redirect('foo/%{bar_id}') -# @example AllowedMethods: [redirect] -# -# # good -# redirect('foo/%{bar_id}') -# @example AllowedPatterns: [] (default) -# -# # bad -# redirect('foo/%{bar_id}') -# @example EnforcedStyle: annotated (default) -# -# # bad -# format('%{greeting}', greeting: 'Hello') -# format('%s', 'Hello') -# -# # good -# format('%s', greeting: 'Hello') -# -# source://rubocop//lib/rubocop/cop/style/format_string_token.rb#85 -class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#106 - def format_string_in_typical_context?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#91 - def on_str(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#213 - def allowed_unannotated?(detections); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#139 - def autocorrect_sequence(corrector, detected_sequence, token_range); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#124 - def check_sequence(detected_sequence, token_range); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#203 - def collect_detections(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#135 - def correctable_sequence?(detected_type); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#113 - def format_string_token?(node); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#222 - def max_unannotated_placeholders_allowed; end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#160 - def message(detected_style); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#165 - def message_text(style); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#180 - def str_contents(source_map); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#190 - def token_ranges(contents); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#174 - def tokens(str_node, &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#156 - def unannotated_format?(node, detected_style); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#117 - def use_allowed_method?(node); end -end - -# Helps you transition from mutable string literals -# to frozen string literals. -# of files to enable frozen string literals. Frozen string literals may be -# default in future Ruby. The comment will be added below a shebang and -# encoding comment. The frozen string literal comment is only valid in Ruby 2.3+. -# -# Note that the cop will accept files where the comment exists but is set -# to `false` instead of `true`. -# -# To require a blank line after this comment, please see -# `Layout/EmptyLineAfterMagicComment` cop. -# -# @example EnforcedStyle: always (default) -# # The `always` style will always add the frozen string literal comment -# # to a file, regardless of the Ruby version or if `freeze` or `<<` are -# # called on a string literal. -# # bad -# module Bar -# # ... -# end -# -# # good -# # frozen_string_literal: true -# -# module Bar -# # ... -# end -# -# # good -# # frozen_string_literal: false -# -# module Bar -# # ... -# end -# @example EnforcedStyle: never -# # The `never` will enforce that the frozen string literal comment does -# # not exist in a file. -# # bad -# # frozen_string_literal: true -# -# module Baz -# # ... -# end -# -# # good -# module Baz -# # ... -# end -# @example EnforcedStyle: always_true -# # The `always_true` style enforces that the frozen string literal -# # comment is set to `true`. This is a stricter option than `always` -# # and forces projects to use frozen string literals. -# # bad -# # frozen_string_literal: false -# -# module Baz -# # ... -# end -# -# # bad -# module Baz -# # ... -# end -# -# # good -# # frozen_string_literal: true -# -# module Bar -# # ... -# end -# -# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#84 -class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#99 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#178 - def disabled_offense(processed_source); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#190 - def enable_comment(corrector); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#120 - def ensure_comment(processed_source); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#126 - def ensure_enabled_comment(processed_source); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#114 - def ensure_no_comment(processed_source); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#214 - def following_comment; end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#152 - def frozen_string_literal_comment(processed_source); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#196 - def insert_comment(corrector); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#137 - def last_special_comment(processed_source); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#206 - def line_range(line); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#158 - def missing_offense(processed_source); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#164 - def missing_true_offense(processed_source); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#210 - def preceding_comment; end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#186 - def remove_comment(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#170 - def unnecessary_comment_offense(processed_source); end -end - -# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#96 -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_DISABLED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#94 -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_MISSING = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#93 -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_MISSING_TRUE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#95 -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#97 -RuboCop::Cop::Style::FrozenStringLiteralComment::SHEBANG = T.let(T.unsafe(nil), String) - -# Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`. -# `STDOUT/STDERR/STDIN` are constants, and while you can actually -# reassign (possibly to redirect some stream) constants in Ruby, you'll get -# an interpreter warning if you do so. -# -# @example -# # bad -# STDOUT.puts('hello') -# -# hash = { out: STDOUT, key: value } -# -# def m(out = STDOUT) -# out.puts('hello') -# end -# -# # good -# $stdout.puts('hello') -# -# hash = { out: $stdout, key: value } -# -# def m(out = $stdout) -# out.puts('hello') -# end -# -# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#34 -class RuboCop::Cop::Style::GlobalStdStream < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#42 - def const_to_gvar_assignment?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#46 - def on_const(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#64 - def gvar_name(const_name); end - - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#60 - def message(const_name); end -end - -# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#37 -RuboCop::Cop::Style::GlobalStdStream::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#39 -RuboCop::Cop::Style::GlobalStdStream::STD_STREAMS = T.let(T.unsafe(nil), Set) - -# Looks for uses of global variables. -# It does not report offenses for built-in global variables. -# Built-in global variables are allowed by default. Additionally -# users can allow additional variables via the AllowedVariables option. -# -# Note that backreferences like $1, $2, etc are not global variables. -# -# @example -# # bad -# $foo = 2 -# bar = $foo + 5 -# -# # good -# FOO = 2 -# foo = 2 -# $stdin.read -# -# source://rubocop//lib/rubocop/cop/style/global_vars.rb#22 -class RuboCop::Cop::Style::GlobalVars < ::RuboCop::Cop::Base - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/global_vars.rb#60 - def allowed_var?(global_var); end - - # source://rubocop//lib/rubocop/cop/style/global_vars.rb#72 - def check(node); end - - # source://rubocop//lib/rubocop/cop/style/global_vars.rb#64 - def on_gvar(node); end - - # source://rubocop//lib/rubocop/cop/style/global_vars.rb#68 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/global_vars.rb#56 - def user_vars; end -end - -# built-in global variables and their English aliases -# https://www.zenspider.com/ruby/quickref.html -# -# source://rubocop//lib/rubocop/cop/style/global_vars.rb#27 -RuboCop::Cop::Style::GlobalVars::BUILT_IN_VARS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/global_vars.rb#23 -RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String) - -# Use a guard clause instead of wrapping the code inside a conditional -# expression -# -# A condition with an `elsif` or `else` branch is allowed unless -# one of `return`, `break`, `next`, `raise`, or `fail` is used -# in the body of the conditional expression. -# -# NOTE: Autocorrect works in most cases except with if-else statements -# that contain logical operators such as `foo || raise('exception')` -# -# @example -# # bad -# def test -# if something -# work -# end -# end -# -# # good -# def test -# return unless something -# -# work -# end -# -# # also good -# def test -# work if something -# end -# -# # bad -# if something -# raise 'exception' -# else -# ok -# end -# -# # good -# raise 'exception' if something -# ok -# -# # bad -# if something -# foo || raise('exception') -# else -# ok -# end -# -# # good -# foo || raise('exception') if something -# ok -# -# # bad -# define_method(:test) do -# if something -# work -# end -# end -# -# # good -# define_method(:test) do -# return unless something -# -# work -# end -# -# # also good -# define_method(:test) do -# work if something -# end -# @example AllowConsecutiveConditionals: false (default) -# # bad -# def test -# if foo? -# work -# end -# -# if bar? # <- reports an offense -# work -# end -# end -# @example AllowConsecutiveConditionals: true -# # good -# def test -# if foo? -# work -# end -# -# if bar? -# work -# end -# end -# -# # bad -# def test -# if foo? -# work -# end -# -# do_something -# -# if bar? # <- reports an offense -# work -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#114 -class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MinBodyLength - include ::RuboCop::Cop::StatementModifier - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#132 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#123 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#123 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#139 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#132 - def on_numblock(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#275 - def accepted_form?(node, ending: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#283 - def accepted_if?(node, ending); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#297 - def allowed_consecutive_conditionals?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#265 - def and_or_guard_clause?(guard_clause); end - - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#210 - def autocorrect(corrector, node, condition, replacement, guard); end - - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#236 - def autocorrect_heredoc_argument(corrector, node, heredoc_branch, leave_branch, guard); end - - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#159 - def check_ending_body(body); end - - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#170 - def check_ending_if(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#180 - def consecutive_conditionals?(parent, node); end - - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#257 - def guard_clause_source(guard_clause); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#232 - def heredoc?(argument); end - - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#248 - def range_of_branch_to_remove(node, guard); end - - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#188 - def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#293 - def remove_whole_lines(corrector, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#270 - def too_long_for_single_line?(node, example); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#279 - def trivial?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#120 -RuboCop::Cop::Style::GuardClause::MSG = T.let(T.unsafe(nil), String) - -# Checks for presence or absence of braces around hash literal as a last -# array item depending on configuration. -# -# NOTE: This cop will ignore arrays where all items are hashes, regardless of -# EnforcedStyle. -# -# @example EnforcedStyle: braces (default) -# # bad -# [1, 2, one: 1, two: 2] -# -# # good -# [1, 2, { one: 1, two: 2 }] -# -# # good -# [{ one: 1 }, { two: 2 }] -# @example EnforcedStyle: no_braces -# # bad -# [1, 2, { one: 1, two: 2 }] -# -# # good -# [1, 2, one: 1, two: 2] -# -# # good -# [{ one: 1 }, { two: 2 }] -# -# source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#31 -class RuboCop::Cop::Style::HashAsLastArrayItem < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#36 - def on_hash(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#85 - def braces_style?; end - - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#66 - def check_braces(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#74 - def check_no_braces(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#50 - def containing_array(hash_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#61 - def explicit_array?(array); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#55 - def last_array_item?(array, node); end - - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#89 - def remove_last_element_trailing_comma(corrector, node); end -end - -# Checks the usage of pre-2.1 `Hash[args]` method of converting enumerables and -# sequences of values to hashes. -# -# Correction code from splat argument (`Hash[*ary]`) is not simply determined. For example, -# `Hash[*ary]` can be replaced with `ary.each_slice(2).to_h` but it will be complicated. -# So, `AllowSplatArgument` option is true by default to allow splat argument for simple code. -# -# @example -# # bad -# Hash[ary] -# -# # good -# ary.to_h -# -# # bad -# Hash[key1, value1, key2, value2] -# -# # good -# {key1 => value1, key2 => value2} -# @example AllowSplatArgument: true (default) -# # good -# Hash[*ary] -# @example AllowSplatArgument: false -# # bad -# Hash[*ary] -# -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#44 -class RuboCop::Cop::Style::HashConversion < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#54 - def hash_from_array?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#56 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#138 - def allowed_splat_argument?; end - - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#131 - def args_to_hash(args); end - - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#118 - def multi_argument(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#94 - def register_offense_for_hash(node, hash_argument); end - - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#103 - def register_offense_for_zip_method(node, zip_method); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#113 - def requires_parens?(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#71 - def single_argument(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#88 - def use_zip_method_without_argument?(first_argument); end -end - -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#49 -RuboCop::Cop::Style::HashConversion::MSG_LITERAL_HASH_ARG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#48 -RuboCop::Cop::Style::HashConversion::MSG_LITERAL_MULTI_ARG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#50 -RuboCop::Cop::Style::HashConversion::MSG_SPLAT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#47 -RuboCop::Cop::Style::HashConversion::MSG_TO_H = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#51 -RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for uses of `each_key` and `each_value` Hash methods. -# -# NOTE: If you have an array of two-element arrays, you can put -# parentheses around the block arguments to indicate that you're not -# working with a hash, and suppress RuboCop offenses. -# -# @example -# # bad -# hash.keys.each { |k| p k } -# hash.each { |k, unused_value| p k } -# -# # good -# hash.each_key { |k| p k } -# -# # bad -# hash.values.each { |v| p v } -# hash.each { |unused_key, v| p v } -# -# # good -# hash.each_value { |v| p v } -# @example AllowedReceivers: ['execute'] -# # good -# execute(sql).keys.each { |v| p v } -# execute(sql).values.each { |v| p v } -# -# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#36 -class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedReceivers - include ::RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#74 - def check_unused_block_args(node, key, value); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#51 - def each_arguments(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#46 - def kv_each(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#56 - def kv_each_with_block_pass(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#60 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#95 - def on_block_pass(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#60 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#180 - def check_argument(variable); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#204 - def correct_args(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#190 - def correct_implicit(node, corrector, method_name); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#195 - def correct_key_value_each(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#176 - def format_message(method_name, current); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#103 - def handleable?(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#211 - def kv_range(outer_node); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#133 - def message(prefer, method_name, unused_code); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#139 - def register_each_args_offense(node, message, prefer, unused_range); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#110 - def register_kv_offense(target, method); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#146 - def register_kv_with_block_pass_offense(node, target, method); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#167 - def root_receiver(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#121 - def unused_block_arg_exist?(node, block_arg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#157 - def use_array_converter_method_as_preceding?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#186 - def used?(arg); end -end - -# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#43 -RuboCop::Cop::Style::HashEachMethods::ARRAY_CONVERTER_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#41 -RuboCop::Cop::Style::HashEachMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#42 -RuboCop::Cop::Style::HashEachMethods::UNUSED_BLOCK_ARG_MSG = T.let(T.unsafe(nil), String) - -# Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods -# that can be replaced with `Hash#except` method. -# -# This cop should only be enabled on Ruby version 3.0 or higher. -# (`Hash#except` was added in Ruby 3.0.) -# -# For safe detection, it is limited to commonly used string and symbol comparisons -# when used `==`. -# And do not check `Hash#delete_if` and `Hash#keep_if` to change receiver object. -# -# @example -# -# # bad -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k == :bar } -# {foo: 1, bar: 2, baz: 3}.select {|k, v| k != :bar } -# {foo: 1, bar: 2, baz: 3}.filter {|k, v| k != :bar } -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[foo bar].include?(k) } -# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[foo bar].include?(k) } -# {foo: 1, bar: 2, baz: 3}.filter {|k, v| !%i[foo bar].include?(k) } -# -# # good -# {foo: 1, bar: 2, baz: 3}.except(:bar) -# -# source://rubocop//lib/rubocop/cop/style/hash_except.rb#33 -class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::TargetRubyVersion - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#60 - def bad_method_with_active_support?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#44 - def bad_method_with_poro?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#75 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#75 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#94 - def bad_method?(block); end - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#166 - def decorate_source(value); end - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#174 - def except_key(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#153 - def except_key_source(key); end - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#147 - def extract_body_if_negated(body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#128 - def included?(negated, body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#132 - def not_included?(negated, body); end - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#183 - def offense_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#136 - def safe_to_register_offense?(block, except_key); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#112 - def semantically_except_method?(send, block); end -end - -# source://rubocop//lib/rubocop/cop/style/hash_except.rb#40 -RuboCop::Cop::Style::HashExcept::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/hash_except.rb#41 -RuboCop::Cop::Style::HashExcept::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for places where `case-when` represents a simple 1:1 -# mapping and can be replaced with a hash lookup. -# -# @example MinBranchesCount: 3 (default) -# # bad -# case country -# when 'europe' -# 'http://eu.example.com' -# when 'america' -# 'http://us.example.com' -# when 'australia' -# 'http://au.example.com' -# end -# -# # good -# SITES = { -# 'europe' => 'http://eu.example.com', -# 'america' => 'http://us.example.com', -# 'australia' => 'http://au.example.com' -# } -# SITES[country] -# @example MinBranchesCount: 4 -# # good -# case country -# when 'europe' -# 'http://eu.example.com' -# when 'america' -# 'http://us.example.com' -# when 'australia' -# 'http://au.example.com' -# end -# -# source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#39 -class RuboCop::Cop::Style::HashLikeCase < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MinBranchesCount - - # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#45 - def hash_like_case?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#53 - def on_case(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#65 - def nodes_of_same_type?(nodes); end -end - -# source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#42 -RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) - -# Checks hash literal syntax. -# -# It can enforce either the use of the class hash rocket syntax or -# the use of the newer Ruby 1.9 syntax (when applicable). -# -# A separate offense is registered for each problematic pair. -# -# The supported styles are: -# -# * ruby19 - forces use of the 1.9 syntax (e.g. `{a: 1}`) when hashes have -# all symbols for keys -# * hash_rockets - forces use of hash rockets for all hashes -# * no_mixed_keys - simply checks for hashes with mixed syntaxes -# * ruby19_no_mixed_keys - forces use of ruby 1.9 syntax and forbids mixed -# syntax hashes -# -# This cop has `EnforcedShorthandSyntax` option. -# It can enforce either the use of the explicit hash value syntax or -# the use of Ruby 3.1's hash value shorthand syntax. -# -# The supported styles are: -# -# * always - forces use of the 3.1 syntax (e.g. {foo:}) -# * never - forces use of explicit hash literal value -# * either - accepts both shorthand and explicit use of hash literal value -# * consistent - forces use of the 3.1 syntax only if all values can be omitted in the hash -# * either_consistent - accepts both shorthand and explicit use of hash literal value, -# but they must be consistent -# -# @example EnforcedShorthandSyntax: either_consistent -# -# # good - `foo` and `bar` values can be omitted, but they are consistent, so it's accepted -# {foo: foo, bar: bar} -# -# # bad - `bar` value can be omitted -# {foo:, bar: bar} -# -# # bad - mixed syntaxes -# {foo:, bar: baz} -# -# # good -# {foo:, bar:} -# -# # good - can't omit `baz` -# {foo: foo, bar: baz} -# @example EnforcedStyle: hash_rockets -# # bad -# {a: 1, b: 2} -# {c: 1, 'd' => 5} -# -# # good -# {:a => 1, :b => 2} -# @example EnforcedStyle: no_mixed_keys -# # bad -# {:a => 1, b: 2} -# {c: 1, 'd' => 2} -# -# # good -# {:a => 1, :b => 2} -# {c: 1, d: 2} -# @example EnforcedStyle: ruby19_no_mixed_keys -# # bad -# {:a => 1, :b => 2} -# {c: 2, 'd' => 3} # should just use hash rockets -# -# # good -# {a: 1, b: 2} -# {:c => 3, 'd' => 4} -# @example EnforcedShorthandSyntax: always (default) -# -# # bad -# {foo: foo, bar: bar} -# -# # good -# {foo:, bar:} -# @example EnforcedShorthandSyntax: never -# -# # bad -# {foo:, bar:} -# -# # good -# {foo: foo, bar: bar} -# @example EnforcedShorthandSyntax: either -# -# # good -# {foo: foo, bar: bar} -# -# # good -# {foo: foo, bar:} -# -# # good -# {foo:, bar:} -# @example EnforcedShorthandSyntax: consistent -# -# # bad - `foo` and `bar` values can be omitted -# {foo: foo, bar: bar} -# -# # bad - `bar` value can be omitted -# {foo:, bar: bar} -# -# # bad - mixed syntaxes -# {foo:, bar: baz} -# -# # good -# {foo:, bar:} -# -# # good - can't omit `baz` -# {foo: foo, bar: baz} -# @example EnforcedStyle: ruby19 (default) -# # bad -# {:a => 2} -# {b: 1, :c => 2} -# -# # good -# {a: 2, b: 1} -# {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol -# {d: 1, 'e' => 2} # technically not forbidden -# -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#131 -class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::HashShorthandSyntax - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#185 - def alternative_style; end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#163 - def hash_rockets_check(pairs); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#177 - def no_mixed_keys_check(pairs); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#141 - def on_hash(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#159 - def ruby19_check(pairs); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#167 - def ruby19_no_mixed_keys_check(pairs); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#217 - def acceptable_19_syntax_symbol?(sym_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#274 - def argument_without_space?(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#196 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#278 - def autocorrect_hash_rockets(corrector, pair_node); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#287 - def autocorrect_no_mixed_keys(corrector, pair_node); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#253 - def autocorrect_ruby19(corrector, pair_node); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#238 - def check(pairs, delim, msg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#295 - def force_hash_rockets?(pairs); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#266 - def range_for_autocorrect_ruby19(pair_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#206 - def sym_indices?(pairs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#210 - def word_symbol_pair?(pair); end -end - -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#137 -RuboCop::Cop::Style::HashSyntax::MSG_19 = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#139 -RuboCop::Cop::Style::HashSyntax::MSG_HASH_ROCKETS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#138 -RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String) - -# Looks for uses of `\_.each_with_object({}) {...}`, -# `\_.map {...}.to_h`, and `Hash[\_.map {...}]` that are actually just -# transforming the keys of a hash, and tries to use a simpler & faster -# call to `transform_keys` instead. -# It should only be enabled on Ruby version 2.5 or newer. -# (`transform_keys` was added in Ruby 2.5.) -# -# @example -# # bad -# {a: 1, b: 2}.each_with_object({}) { |(k, v), h| h[foo(k)] = v } -# Hash[{a: 1, b: 2}.collect { |k, v| [foo(k), v] }] -# {a: 1, b: 2}.map { |k, v| [k.to_s, v] }.to_h -# {a: 1, b: 2}.to_h { |k, v| [k.to_s, v] } -# -# # good -# {a: 1, b: 2}.transform_keys { |k| foo(k) } -# {a: 1, b: 2}.transform_keys { |k| k.to_s } -# -# source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#28 -class RuboCop::Cop::Style::HashTransformKeys < ::RuboCop::Cop::Base - include ::RuboCop::Cop::HashTransformMethod - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#36 - def on_bad_each_with_object(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#48 - def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#61 - def on_bad_map_to_h(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#73 - def on_bad_to_h(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#84 - def extract_captures(match); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#89 - def new_method_name; end -end - -# Looks for uses of `\_.each_with_object({}) {...}`, -# `\_.map {...}.to_h`, and `Hash[\_.map {...}]` that are actually just -# transforming the values of a hash, and tries to use a simpler & faster -# call to `transform_values` instead. -# -# @example -# # bad -# {a: 1, b: 2}.each_with_object({}) { |(k, v), h| h[k] = foo(v) } -# Hash[{a: 1, b: 2}.collect { |k, v| [k, foo(v)] }] -# {a: 1, b: 2}.map { |k, v| [k, v * v] }.to_h -# {a: 1, b: 2}.to_h { |k, v| [k, v * v] } -# -# # good -# {a: 1, b: 2}.transform_values { |v| foo(v) } -# {a: 1, b: 2}.transform_values { |v| v * v } -# -# source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#26 -class RuboCop::Cop::Style::HashTransformValues < ::RuboCop::Cop::Base - include ::RuboCop::Cop::HashTransformMethod - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#34 - def on_bad_each_with_object(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#46 - def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#59 - def on_bad_map_to_h(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#71 - def on_bad_to_h(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#82 - def extract_captures(match); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#87 - def new_method_name; end -end - -# Checks for identical expressions at the beginning or end of -# each branch of a conditional expression. Such expressions should normally -# be placed outside the conditional expression - before or after it. -# -# NOTE: The cop is poorly named and some people might think that it actually -# checks for duplicated conditional branches. The name will probably be changed -# in a future major RuboCop release. -# -# @example -# # bad -# if condition -# do_x -# do_z -# else -# do_y -# do_z -# end -# -# # good -# if condition -# do_x -# else -# do_y -# end -# do_z -# -# # bad -# if condition -# do_z -# do_x -# else -# do_z -# do_y -# end -# -# # good -# do_z -# if condition -# do_x -# else -# do_y -# end -# -# # bad -# case foo -# when 1 -# do_x -# when 2 -# do_x -# else -# do_x -# end -# -# # good -# case foo -# when 1 -# do_x -# do_y -# when 2 -# # nothing -# else -# do_x -# do_z -# end -# -# # bad -# case foo -# in 1 -# do_x -# in 2 -# do_x -# else -# do_x -# end -# -# # good -# case foo -# in 1 -# do_x -# do_y -# in 2 -# # nothing -# else -# do_x -# do_z -# end -# -# source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#110 -class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#123 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#130 - def on_case_match(node); end - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#116 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#184 - def assignable_condition_value(node); end - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#140 - def check_branches(node, branches); end - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#193 - def check_expressions(node, expressions, insert_position); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#173 - def duplicated_expressions?(node, expressions); end - - # `elsif` branches show up in the if node as nested `else` branches. We - # need to recursively iterate over all `else` branches. - # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#233 - def expand_elses(branch); end - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#248 - def head(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#217 - def last_child_of_parent?(node); end - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#227 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#223 - def single_child_branch?(branch_node); end - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#244 - def tail(node); end -end - -# source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#114 -RuboCop::Cop::Style::IdenticalConditionalBranches::MSG = T.let(T.unsafe(nil), String) - -# Corrector to correct conditional assignment in `if` statements. -# -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#559 -class RuboCop::Cop::Style::IfCorrector - extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper - extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper - - class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#564 - def correct(corrector, cop, node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#568 - def move_assignment_inside_condition(corrector, node); end - - private - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#582 - def extract_tail_branches(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#589 - def move_branch_inside_condition(corrector, branch, condition, assignment, column); end - end -end - -# If the `else` branch of a conditional consists solely of an `if` node, -# it can be combined with the `else` to become an `elsif`. -# This helps to keep the nesting level from getting too deep. -# -# @example -# # bad -# if condition_a -# action_a -# else -# if condition_b -# action_b -# else -# action_c -# end -# end -# -# # good -# if condition_a -# action_a -# elsif condition_b -# action_b -# else -# action_c -# end -# @example AllowIfModifier: false (default) -# # bad -# if condition_a -# action_a -# else -# action_b if condition_b -# end -# -# # good -# if condition_a -# action_a -# elsif condition_b -# action_b -# end -# @example AllowIfModifier: true -# # good -# if condition_a -# action_a -# else -# action_b if condition_b -# end -# -# # good -# if condition_a -# action_a -# elsif condition_b -# action_b -# end -# -# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#61 -class RuboCop::Cop::Style::IfInsideElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#69 - def on_if(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#150 - def allow_if_modifier?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#146 - def allow_if_modifier_in_else_branch?(else_branch); end - - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#88 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#117 - def correct_to_elsif_from_if_inside_else_form(corrector, node, condition); end - - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#109 - def correct_to_elsif_from_modifier_form(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#135 - def find_end_range(node); end - - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#142 - def if_condition_range(node, condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#131 - def then?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#66 -RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String) - -# Checks for `if` and `unless` statements that would fit on one line if -# written as modifier `if`/`unless`. The cop also checks for modifier -# `if`/`unless` lines that exceed the maximum line length. -# -# The maximum line length is configured in the `Layout/LineLength` -# cop. The tab size is configured in the `IndentationWidth` of the -# `Layout/IndentationStyle` cop. -# -# One-line pattern matching is always allowed. To ensure that there are few cases -# where the match variable is not used, and to prevent oversights. The variable `x` -# becomes undefined and raises `NameError` when the following example is changed to -# the modifier form: -# -# [source,ruby] -# ---- -# if [42] in [x] -# x # `x` is undefined when using modifier form. -# end -# ---- -# -# NOTE: It is allowed when `defined?` argument has an undefined value, -# because using the modifier form causes the following incompatibility: -# -# [source,ruby] -# ---- -# unless defined?(undefined_foo) -# undefined_foo = 'default_value' -# end -# undefined_foo # => 'default_value' -# -# undefined_bar = 'default_value' unless defined?(undefined_bar) -# undefined_bar # => nil -# ---- -# -# @example -# # bad -# if condition -# do_stuff(bar) -# end -# -# unless qux.empty? -# Foo.do_something -# end -# -# do_something_with_a_long_name(arg) if long_condition_that_prevents_code_fit_on_single_line -# -# # good -# do_stuff(bar) if condition -# Foo.do_something unless qux.empty? -# -# if long_condition_that_prevents_code_fit_on_single_line -# do_something_with_a_long_name(arg) -# end -# -# if short_condition # a long comment that makes it too long if it were just a single line -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#63 -class RuboCop::Cop::Style::IfUnlessModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::StatementModifier - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::CommentsHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#80 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#171 - def allowed_patterns; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#231 - def another_statement_on_same_line?(node); end - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#132 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#285 - def comment_on_node_line(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#104 - def defined_argument_is_undefined?(if_node, defined_node); end - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#96 - def defined_nodes(condition); end - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#272 - def extract_heredoc_from(last_argument); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#215 - def line_length_enabled_at_line?(line); end - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#124 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#219 - def named_capture_in_condition?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#223 - def non_eligible_node?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#227 - def non_simple_if_unless?(node); end - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#114 - def pattern_matching_nodes(condition); end - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#289 - def remove_comment(corrector, _node, comment); end - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#279 - def remove_heredoc(corrector, heredoc); end - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#141 - def replacement_for_modifier_form(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#265 - def to_modifier_form_with_move_comment(node, indentation, comment); end - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#245 - def to_normal_form(node, indentation); end - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#253 - def to_normal_form_with_heredoc(node, indentation, heredoc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#165 - def too_long_due_to_comment_after_modifier?(node, comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#160 - def too_long_due_to_modifier?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#206 - def too_long_line_based_on_allow_uri?(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#189 - def too_long_line_based_on_config?(range, line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#198 - def too_long_line_based_on_ignore_cop_directives?(range, line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#176 - def too_long_single_line?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#76 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#71 -RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_MODIFIER = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#74 -RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_NORMAL = T.let(T.unsafe(nil), String) - -# Checks for if and unless statements used as modifiers of other if or -# unless statements. -# -# @example -# -# # bad -# tired? ? 'stop' : 'go faster' if running? -# -# # bad -# if tired? -# "please stop" -# else -# "keep going" -# end if running? -# -# # good -# if running? -# tired? ? 'stop' : 'go faster' -# end -# -# source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#25 -class RuboCop::Cop::Style::IfUnlessModifierOfIfUnless < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::StatementModifier - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#31 - def on_if(node); end -end - -# source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#29 -RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), String) - -# Checks for redundant `if` with boolean literal branches. -# It checks only conditions to return boolean value (`true` or `false`) for safe detection. -# The conditions to be checked are comparison methods, predicate methods, and -# double negation (!!). -# `nonzero?` method is allowed by default. -# These are customizable with `AllowedMethods` option. -# -# This cop targets only `if`s with a single `elsif` or `else` branch. The following -# code will be allowed, because it has two `elsif` branches: -# -# [source,ruby] -# ---- -# if foo -# true -# elsif bar > baz -# true -# elsif qux > quux # Single `elsif` is warned, but two or more `elsif`s are not. -# true -# else -# false -# end -# ---- -# -# @example -# # bad -# if foo == bar -# true -# else -# false -# end -# -# # bad -# foo == bar ? true : false -# -# # good -# foo == bar -# @example -# # bad -# if foo.do_something? -# true -# else -# false -# end -# -# # good (but potentially an unsafe correction) -# foo.do_something? -# @example AllowedMethods: ['nonzero?'] (default) -# # good -# num.nonzero? ? true : false -# -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#62 -class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#74 - def double_negative?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#70 - def if_with_boolean_literal_branches?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#76 - def on_if(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#136 - def assume_boolean_value?(condition); end - - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#114 - def message(node, keyword); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#96 - def multiple_elsif?(node); end - - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#102 - def offense_range_with_keyword(node, condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#153 - def opposite_condition?(node); end - - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#143 - def replacement_condition(node, condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#158 - def require_parentheses?(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#122 - def return_boolean_value?(condition); end -end - -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#66 -RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#67 -RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG_FOR_ELSIF = T.let(T.unsafe(nil), String) - -# Checks for uses of semicolon in if statements. -# -# @example -# -# # bad -# result = if some_condition; something else another_thing end -# -# # good -# result = some_condition ? something : another_thing -# -# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#16 -class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#23 - def on_normal_if_unless(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#38 - def autocorrect(node); end - - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#56 - def build_else_branch(second_condition); end - - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#47 - def correct_elsif(node); end -end - -# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#20 -RuboCop::Cop::Style::IfWithSemicolon::MSG_IF_ELSE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#21 -RuboCop::Cop::Style::IfWithSemicolon::MSG_TERNARY = T.let(T.unsafe(nil), String) - -# Checks for `raise` or `fail` statements which do not specify an -# explicit exception class. (This raises a `RuntimeError`. Some projects -# might prefer to use exception classes which more precisely identify the -# nature of the error.) -# -# @example -# # bad -# raise 'Error message here' -# -# # good -# raise ArgumentError, 'Error message here' -# -# source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#17 -class RuboCop::Cop::Style::ImplicitRuntimeError < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#23 - def implicit_runtime_error_raise_or_fail(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#26 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#18 -RuboCop::Cop::Style::ImplicitRuntimeError::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#20 -RuboCop::Cop::Style::ImplicitRuntimeError::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for `in;` uses in `case` expressions. -# -# @example -# # bad -# case expression -# in pattern_a; foo -# in pattern_b; bar -# end -# -# # good -# case expression -# in pattern_a then foo -# in pattern_b then bar -# end -# -# source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#21 -class RuboCop::Cop::Style::InPatternThen < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#29 - def on_in_pattern(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#46 - def alternative_pattern_source(pattern); end -end - -# source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#27 -RuboCop::Cop::Style::InPatternThen::MSG = T.let(T.unsafe(nil), String) - -# Use `Kernel#loop` for infinite loops. -# -# @example -# # bad -# while true -# work -# end -# -# # good -# loop do -# work -# end -# -# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#23 -class RuboCop::Cop::Style::InfiniteLoop < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#35 - def after_leaving_scope(scope, _variable_table); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#44 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#44 - def on_until_post(node); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#40 - def on_while(node); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#40 - def on_while_post(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#84 - def assigned_before_loop?(var, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#80 - def assigned_inside_loop?(var, range); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#70 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#103 - def modifier_replacement(node); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#114 - def non_modifier_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#89 - def referenced_after_loop?(var, range); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#94 - def replace_begin_end_with_modifier(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#99 - def replace_source(corrector, range, replacement); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#53 - def while_or_until(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#31 - def joining_forces; end - end -end - -# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#27 -RuboCop::Cop::Style::InfiniteLoop::LEADING_SPACE = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#29 -RuboCop::Cop::Style::InfiniteLoop::MSG = T.let(T.unsafe(nil), String) - -# Checks for trailing inline comments. -# -# @example -# -# # good -# foo.each do |f| -# # Standalone comment -# f.bar -# end -# -# # bad -# foo.each do |f| -# f.bar # Trailing inline comment -# end -# -# source://rubocop//lib/rubocop/cop/style/inline_comment.rb#20 -class RuboCop::Cop::Style::InlineComment < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/inline_comment.rb#23 - def on_new_investigation; end -end - -# source://rubocop//lib/rubocop/cop/style/inline_comment.rb#21 -RuboCop::Cop::Style::InlineComment::MSG = T.let(T.unsafe(nil), String) - -# Check for usages of not (`not` or `!`) called on a method -# when an inverse of that method can be used instead. -# -# Methods that can be inverted by a not (`not` or `!`) should be defined -# in `InverseMethods`. -# -# Methods that are inverted by inverting the return -# of the block that is passed to the method should be defined in -# `InverseBlocks`. -# -# @example -# # bad -# !foo.none? -# !foo.any? { |f| f.even? } -# !foo.blank? -# !(foo == bar) -# foo.select { |f| !f.even? } -# foo.reject { |f| f != 7 } -# -# # good -# foo.none? -# foo.blank? -# foo.any? { |f| f.even? } -# foo != bar -# foo == bar -# !!('foo' =~ /^\w+$/) -# !(foo.class < Numeric) # Checking class hierarchy is allowed -# # Blocks with guard clauses are ignored: -# foo.select do |f| -# next if f.zero? -# f != 1 -# end -# -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#43 -class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#70 - def inverse_block?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#61 - def inverse_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#78 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#78 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#177 - def camel_case_constant?(node); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#121 - def correct_inverse_block(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#112 - def correct_inverse_method(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#128 - def correct_inverse_selector(block, corrector); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#181 - def dot_range(loc); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#166 - def end_parentheses(node, method_call); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#150 - def inverse_blocks; end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#145 - def inverse_methods; end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#191 - def message(method, inverse); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#154 - def negated?(node); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#162 - def not_to_receiver(node, method_call); end - - # When comparing classes, `!(Integer < Numeric)` is not the same as - # `Integer > Numeric`. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#172 - def possible_class_hierarchy_check?(lhs, rhs, method); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#158 - def relational_comparison_with_safe_navigation?(node); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#185 - def remove_end_parenthesis(corrector, node, method, method_call); end - - class << self - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#56 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#52 -RuboCop::Cop::Style::InverseMethods::CAMEL_CASE = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#49 -RuboCop::Cop::Style::InverseMethods::CLASS_COMPARISON_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#50 -RuboCop::Cop::Style::InverseMethods::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#48 -RuboCop::Cop::Style::InverseMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#51 -RuboCop::Cop::Style::InverseMethods::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#54 -RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for usages of `unless` which can be replaced by `if` with inverted condition. -# Code without `unless` is easier to read, but that is subjective, so this cop -# is disabled by default. -# -# Methods that can be inverted should be defined in `InverseMethods`. Note that -# the relationship of inverse methods needs to be defined in both directions. -# For example, -# -# [source,yaml] -# ---- -# InverseMethods: -# :!=: :== -# :even?: :odd? -# :odd?: :even? -# ---- -# -# will suggest both `even?` and `odd?` to be inverted, but only `!=` (and not `==`). -# -# @example -# # bad (simple condition) -# foo unless !bar -# foo unless x != y -# foo unless x >= 10 -# foo unless x.even? -# foo unless odd? -# -# # good -# foo if bar -# foo if x == y -# foo if x < 10 -# foo if x.odd? -# foo if even? -# -# # bad (complex condition) -# foo unless x != y || x.even? -# -# # good -# foo if x == y && x.odd? -# -# # good (if) -# foo if !condition -# -# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#53 -class RuboCop::Cop::Style::InvertibleUnlessCondition < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#58 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#133 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#146 - def autocorrect_send_node(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#90 - def inheritance_check?(node); end - - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#154 - def inverse_methods; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#75 - def invertible?(node); end - - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#96 - def preferred_condition(node); end - - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#126 - def preferred_logical_condition(node); end - - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#104 - def preferred_send_condition(node); end -end - -# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#56 -RuboCop::Cop::Style::InvertibleUnlessCondition::MSG = T.let(T.unsafe(nil), String) - -# Checks for hardcoded IP addresses, which can make code -# brittle. IP addresses are likely to need to be changed when code -# is deployed to a different server or environment, which may break -# a deployment if forgotten. Prefer setting IP addresses in ENV or -# other configuration. -# -# @example -# -# # bad -# ip_address = '127.59.241.29' -# -# # good -# ip_address = ENV['DEPLOYMENT_IP_ADDRESS'] -# -# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#21 -class RuboCop::Cop::Style::IpAddresses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::StringHelp - - # Dummy implementation of method in ConfigurableEnforcedStyle that is - # called from StringHelp. - # - # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#46 - def correct_style_detected; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#27 - def offense?(node); end - - # Dummy implementation of method in ConfigurableEnforcedStyle that is - # called from StringHelp. - # - # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#42 - def opposite_style_detected; end - - private - - # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#50 - def allowed_addresses; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#55 - def could_be_ip?(str); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#68 - def starts_with_hex_or_colon?(str); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#64 - def too_long?(str); end -end - -# IPv4-mapped IPv6 is the longest -# -# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#24 -RuboCop::Cop::Style::IpAddresses::IPV6_MAX_SIZE = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#25 -RuboCop::Cop::Style::IpAddresses::MSG = T.let(T.unsafe(nil), String) - -# Enforces that optional keyword parameters are placed at the -# end of the parameters list. -# -# This improves readability, because when looking through the source, -# it is expected to find required parameters at the beginning of parameters list -# and optional parameters at the end. -# -# @example -# # bad -# def some_method(first: false, second:, third: 10) -# # body omitted -# end -# -# # good -# def some_method(second:, first: false, third: 10) -# # body omitted -# end -# -# # bad -# do_something do |first: false, second:, third: 10| -# # body omitted -# end -# -# # good -# do_something do |second:, first: false, third: 10| -# # body omitted -# end -# -# source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#34 -class RuboCop::Cop::Style::KeywordParametersOrder < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#40 - def on_kwoptarg(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#58 - def append_newline_to_last_kwoptarg(arguments, corrector); end - - # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#66 - def remove_kwargs(kwarg_nodes, corrector); end -end - -# source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#38 -RuboCop::Cop::Style::KeywordParametersOrder::MSG = T.let(T.unsafe(nil), String) - -# (by default) checks for uses of the lambda literal syntax for -# single line lambdas, and the method call syntax for multiline lambdas. -# It is configurable to enforce one of the styles for both single line -# and multiline lambdas as well. -# -# @example EnforcedStyle: line_count_dependent (default) -# # bad -# f = lambda { |x| x } -# f = ->(x) do -# x -# end -# -# # good -# f = ->(x) { x } -# f = lambda do |x| -# x -# end -# @example EnforcedStyle: lambda -# # bad -# f = ->(x) { x } -# f = ->(x) do -# x -# end -# -# # good -# f = lambda { |x| x } -# f = lambda do |x| -# x -# end -# @example EnforcedStyle: literal -# # bad -# f = lambda { |x| x } -# f = lambda do |x| -# x -# end -# -# # good -# f = ->(x) { x } -# f = ->(x) do -# x -# end -# -# source://rubocop//lib/rubocop/cop/style/lambda.rb#49 -class RuboCop::Cop::Style::Lambda < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/lambda.rb#64 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/lambda.rb#64 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/lambda.rb#115 - def arguments_with_whitespace(node); end - - # source://rubocop//lib/rubocop/cop/style/lambda.rb#104 - def autocorrect_method_to_literal(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/lambda.rb#119 - def lambda_arg_string(args); end - - # source://rubocop//lib/rubocop/cop/style/lambda.rb#89 - def message(node, selector); end - - # source://rubocop//lib/rubocop/cop/style/lambda.rb#95 - def message_line_modifier(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/lambda.rb#83 - def offending_selector?(node, selector); end -end - -# source://rubocop//lib/rubocop/cop/style/lambda.rb#53 -RuboCop::Cop::Style::Lambda::LITERAL_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/lambda.rb#54 -RuboCop::Cop::Style::Lambda::METHOD_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/lambda.rb#56 -RuboCop::Cop::Style::Lambda::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) - -# Checks for use of the lambda.(args) syntax. -# -# @example EnforcedStyle: call (default) -# # bad -# lambda.(x, y) -# -# # good -# lambda.call(x, y) -# @example EnforcedStyle: braces -# # bad -# lambda.call(x, y) -# -# # good -# lambda.(x, y) -# -# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#21 -class RuboCop::Cop::Style::LambdaCall < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#29 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#67 - def explicit_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#63 - def implicit_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#51 - def offense?(node); end - - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#55 - def prefer(node); end -end - -# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#26 -RuboCop::Cop::Style::LambdaCall::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#27 -RuboCop::Cop::Style::LambdaCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for string literal concatenation at -# the end of a line. -# -# @example -# -# # bad -# some_str = 'ala' + -# 'bala' -# -# some_str = 'ala' << -# 'bala' -# -# # good -# some_str = 'ala' \ -# 'bala' -# -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#35 -class RuboCop::Cop::Style::LineEndConcatenation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#51 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#74 - def autocorrect(corrector, operator_range); end - - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#57 - def check_token_set(index); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#101 - def eligible_next_successor?(next_successor); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#97 - def eligible_operator?(operator); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#105 - def eligible_predecessor?(predecessor); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#93 - def eligible_successor?(successor); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#87 - def eligible_token_set?(predecessor, operator, successor); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#124 - def standard_string_literal?(token); end - - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#109 - def token_after_last_string(successor, base_index); end - - class << self - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#47 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#42 -RuboCop::Cop::Style::LineEndConcatenation::COMPLEX_STRING_BEGIN_TOKEN = T.let(T.unsafe(nil), Symbol) - -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#43 -RuboCop::Cop::Style::LineEndConcatenation::COMPLEX_STRING_END_TOKEN = T.let(T.unsafe(nil), Symbol) - -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#40 -RuboCop::Cop::Style::LineEndConcatenation::CONCAT_TOKEN_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#44 -RuboCop::Cop::Style::LineEndConcatenation::HIGH_PRECEDENCE_OP_TOKEN_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#39 -RuboCop::Cop::Style::LineEndConcatenation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#45 -RuboCop::Cop::Style::LineEndConcatenation::QUOTE_DELIMITERS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#41 -RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.unsafe(nil), Symbol) - -# Ensures magic comments are written consistently throughout your code base. -# Looks for discrepancies in separators (`-` vs `_`) and capitalization for -# both magic comment directives and values. -# -# Required capitalization can be set with the `DirectiveCapitalization` and -# `ValueCapitalization` configuration keys. -# -# NOTE: If one of these configuration is set to nil, any capitalization is allowed. -# -# @example ValueCapitalization: uppercase -# # bad -# # frozen-string-literal: true -# -# # good -# # frozen-string-literal: TRUE -# @example EnforcedStyle: kebab_case -# # The `kebab_case` style will enforce that the frozen string literal -# # comment is written in kebab case. (Words separated by hyphens) -# # bad -# # frozen_string_literal: true -# -# module Baz -# # ... -# end -# -# # good -# # frozen-string-literal: true -# -# module Baz -# # ... -# end -# @example DirectiveCapitalization: lowercase (default) -# # bad -# # FROZEN-STRING-LITERAL: true -# -# # good -# # frozen-string-literal: true -# @example DirectiveCapitalization: uppercase -# # bad -# # frozen-string-literal: true -# -# # good -# # FROZEN-STRING-LITERAL: true -# @example DirectiveCapitalization: nil -# # any capitalization is accepted -# -# # good -# # frozen-string-literal: true -# -# # good -# # FROZEN-STRING-LITERAL: true -# @example ValueCapitalization: nil (default) -# # any capitalization is accepted -# -# # good -# # frozen-string-literal: true -# -# # good -# # frozen-string-literal: TRUE -# @example ValueCapitalization: lowercase -# # when a value is not given, any capitalization is accepted -# -# # bad -# # frozen-string-literal: TRUE -# -# # good -# # frozen-string-literal: TRUE -# @example EnforcedStyle: snake_case (default) -# # The `snake_case` style will enforce that the frozen string literal -# # comment is written in snake case. (Words separated by underscores) -# # bad -# # frozen-string-literal: true -# -# module Bar -# # ... -# end -# -# # good -# # frozen_string_literal: false -# -# module Bar -# # ... -# end -# -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#97 -class RuboCop::Cop::Style::MagicCommentFormat < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#156 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#241 - def correct_separator; end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#279 - def directive_capitalization; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#197 - def directive_offends?(directive); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#233 - def expected_style; end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#183 - def find_issues(comment); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#207 - def fix_directives(issues); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#221 - def fix_values(issues); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#245 - def incorrect_separator?(text); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#173 - def leading_comment_lines; end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#275 - def line_range(line); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#167 - def magic_comments; end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#202 - def register_offenses(issues); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#264 - def replace_capitalization(text, style); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#260 - def replace_separator(text); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#301 - def supported_capitalizations; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#295 - def valid_capitalization?(style); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#287 - def value_capitalization; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#249 - def wrong_capitalization?(text, expected_case); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#237 - def wrong_separator; end -end - -# Value object to extract source ranges for the different parts of a magic comment -# -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#107 -class RuboCop::Cop::Style::MagicCommentFormat::CommentRange - extend ::Forwardable - - # @return [CommentRange] a new instance of CommentRange - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#119 - def initialize(comment); end - - # Returns the value of attribute comment. - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#117 - def comment; end - - # A magic comment can contain one directive (normal style) or - # multiple directives (emacs style) - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#125 - def directives; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def loc(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def text(*args, **_arg1, &block); end - - # A magic comment can contain one value (normal style) or - # multiple directives (emacs style) - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#141 - def values; end -end - -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#110 -RuboCop::Cop::Style::MagicCommentFormat::CommentRange::DIRECTIVE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#114 -RuboCop::Cop::Style::MagicCommentFormat::CommentRange::VALUE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#102 -RuboCop::Cop::Style::MagicCommentFormat::KEBAB_SEPARATOR = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#103 -RuboCop::Cop::Style::MagicCommentFormat::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#104 -RuboCop::Cop::Style::MagicCommentFormat::MSG_VALUE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#101 -RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil), String) - -# Prefer `select` or `reject` over `map { ... }.compact`. -# -# @example -# -# # bad -# array.map { |e| some_condition? ? e : next }.compact -# -# # bad -# array.map do |e| -# if some_condition? -# e -# else -# next -# end -# end.compact -# -# # bad -# array.map do |e| -# next if some_condition? -# -# e -# end.compact -# -# # bad -# array.map do |e| -# e if some_condition? -# end.compact -# -# # good -# array.select { |e| some_condition? } -# -# # good -# array.reject { |e| some_condition? } -# -# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#40 -class RuboCop::Cop::Style::MapCompactWithConditionalBlock < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#46 - def map_and_compact?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#72 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#72 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#126 - def range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#92 - def returns_block_argument?(block_argument_node, return_value_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#96 - def truthy_branch?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#116 - def truthy_branch_for_guard?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#106 - def truthy_branch_for_if?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#43 -RuboCop::Cop::Style::MapCompactWithConditionalBlock::MSG = T.let(T.unsafe(nil), String) - -# Checks for usages of `each` with `<<`, `push`, or `append` which -# can be replaced by `map`. -# -# If `PreferredMethods` is configured for `map` in `Style/CollectionMethods`, -# this cop uses the specified method for replacement. -# -# NOTE: The return value of `Enumerable#each` is `self`, whereas the -# return value of `Enumerable#map` is an `Array`. They are not autocorrected -# when a return value could be used because these types differ. -# -# NOTE: It only detects when the mapping destination is a local variable -# initialized as an empty array and referred to only by the pushing operation. -# This is because, if not, it's challenging to statically guarantee that the -# mapping destination variable remains an empty array: -# -# [source,ruby] -# ---- -# ret = [] -# src.each { |e| ret << e * 2 } # `<<` method may mutate `ret` -# -# dest = [] -# src.each { |e| dest << transform(e, dest) } # `transform` method may mutate `dest` -# ---- -# -# @example -# # bad -# dest = [] -# src.each { |e| dest << e * 2 } -# dest -# -# # good -# dest = src.map { |e| e * 2 } -# -# # good - contains another operation -# dest = [] -# src.each { |e| dest << e * 2; puts e } -# dest -# -# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#50 -class RuboCop::Cop::Style::MapIntoArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#75 - def after_leaving_scope(scope, _variable_table); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#57 - def each_block_with_push?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#66 - def empty_array_asgn?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#69 - def lvar_ref?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#155 - def correct_push_node(corrector, push_node); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#163 - def correct_return_value_handling(corrector, block, dest_var); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#108 - def dest_used_only_for_mapping?(block, dest_var, asgn); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#102 - def find_closest_assignment(block, dest_var); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#94 - def find_dest_var(block); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#127 - def new_method_name; end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#116 - def register_offense(block, dest_var, asgn); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#148 - def remove_assignment(corrector, asgn); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#133 - def return_value_used?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#71 - def joining_forces; end - end -end - -# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#54 -RuboCop::Cop::Style::MapIntoArray::MSG = T.let(T.unsafe(nil), String) - -# Looks for uses of `map.to_h` or `collect.to_h` that could be -# written with just `to_h` in Ruby >= 2.6. -# -# NOTE: `Style/HashTransformKeys` and `Style/HashTransformValues` will -# also change this pattern if only hash keys or hash values are being -# transformed. -# -# @example -# # bad -# something.map { |v| [v, v * 2] }.to_h -# -# # good -# something.to_h { |v| [v, v * 2] } -# -# # bad -# {foo: bar}.collect { |k, v| [k.to_s, v.do_something] }.to_h -# -# # good -# {foo: bar}.to_h { |k, v| [k.to_s, v.do_something] } -# -# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#30 -class RuboCop::Cop::Style::MapToHash < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#41 - def map_to_h(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#52 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#52 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#68 - def autocorrect(corrector, to_h, map); end - - class << self - # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#48 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#37 -RuboCop::Cop::Style::MapToHash::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#38 -RuboCop::Cop::Style::MapToHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Looks for uses of `map.to_set` or `collect.to_set` that could be -# written with just `to_set`. -# -# @example -# # bad -# something.map { |i| i * 2 }.to_set -# -# # good -# something.to_set { |i| i * 2 } -# -# # bad -# [1, 2, 3].collect { |i| i.to_s }.to_set -# -# # good -# [1, 2, 3].to_set { |i| i.to_s } -# -# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#26 -class RuboCop::Cop::Style::MapToSet < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#34 - def map_to_set?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#41 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#55 - def autocorrect(corrector, to_set, map); end -end - -# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#30 -RuboCop::Cop::Style::MapToSet::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#31 -RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces the presence (default) or absence of parentheses in -# method calls containing parameters. -# -# In the default style (require_parentheses), macro methods are allowed. -# Additional methods can be added to the `AllowedMethods` or -# `AllowedPatterns` list. These options are valid only in the default -# style. Macros can be included by either setting `IgnoreMacros` to false -# or adding specific macros to the `IncludedMacros` list. -# -# Precedence of options is as follows: -# -# 1. `AllowedMethods` -# 2. `AllowedPatterns` -# 3. `IncludedMacros` -# -# If a method is listed in both `IncludedMacros` and `AllowedMethods`, -# then the latter takes precedence (that is, the method is allowed). -# -# In the alternative style (omit_parentheses), there are three additional -# options. -# -# 1. `AllowParenthesesInChaining` is `false` by default. Setting it to -# `true` allows the presence of parentheses in the last call during -# method chaining. -# -# 2. `AllowParenthesesInMultilineCall` is `false` by default. Setting it -# to `true` allows the presence of parentheses in multi-line method -# calls. -# -# 3. `AllowParenthesesInCamelCaseMethod` is `false` by default. This -# allows the presence of parentheses when calling a method whose name -# begins with a capital letter and which has no arguments. Setting it -# to `true` allows the presence of parentheses in such a method call -# even with arguments. -# -# NOTE: The style of `omit_parentheses` allows parentheses in cases where -# omitting them results in ambiguous or syntactically incorrect code. -# -# Non-exhaustive list of examples: -# -# - Parentheses are required allowed in method calls with arguments inside -# literals, logical operators, setting default values in position and -# keyword arguments, chaining and more. -# - Parentheses are allowed in method calls with arguments inside -# operators to avoid ambiguity. -# triple-dot syntax introduced in Ruby 2.7 as omitting them starts an -# endless range. -# - Parentheses are allowed when forwarding arguments with the -# triple-dot syntax introduced in Ruby 2.7 as omitting them starts an -# endless range. -# - Parentheses are required in calls with arguments when inside an -# endless method definition introduced in Ruby 3.0. -# - Ruby 3.1's hash omission syntax allows parentheses if the method call -# is in conditionals and requires parentheses if the call -# is not the value-returning expression. See -# https://bugs.ruby-lang.org/issues/18396. -# - Parentheses are required in anonymous arguments, keyword arguments -# and block passing in Ruby 3.2. -# -# @example AllowParenthesesInStringInterpolation: true -# -# # good -# "#{t('this.is.good')}" -# -# # good -# "#{t 'this.is.also.good'}" -# @example EnforcedStyle: omit_parentheses -# -# # bad -# array.delete(e) -# -# # good -# array.delete e -# -# # bad -# action.enforce(strict: true) -# -# # good -# action.enforce strict: true -# -# # good -# # Parentheses are allowed for code that can be ambiguous without -# # them. -# action.enforce(condition) || other_condition -# -# # good -# # Parentheses are allowed for calls that won't produce valid Ruby -# # without them. -# yield path, File.basename(path) -# -# # good -# # Omitting the parentheses in Ruby 3.1 hash omission syntax can lead -# # to ambiguous code. We allow them in conditionals and non-last -# # expressions. See https://bugs.ruby-lang.org/issues/18396 -# if meets(criteria:, action:) -# safe_action(action) || dangerous_action(action) -# end -# @example IgnoreMacros: true (default) -# -# # good -# class Foo -# bar :baz -# end -# @example IgnoreMacros: false -# -# # bad -# class Foo -# bar :baz -# end -# @example AllowParenthesesInMultilineCall: false (default) -# -# # bad -# foo.enforce( -# strict: true -# ) -# -# # good -# foo.enforce \ -# strict: true -# @example AllowParenthesesInMultilineCall: true -# -# # good -# foo.enforce( -# strict: true -# ) -# -# # good -# foo.enforce \ -# strict: true -# @example AllowParenthesesInChaining: false (default) -# -# # bad -# foo().bar(1) -# -# # good -# foo().bar 1 -# @example AllowParenthesesInChaining: true -# -# # good -# foo().bar(1) -# -# # good -# foo().bar 1 -# @example AllowParenthesesInCamelCaseMethod: false (default) -# -# # bad -# Array(1) -# -# # good -# Array 1 -# @example AllowParenthesesInCamelCaseMethod: true -# -# # good -# Array(1) -# -# # good -# Array 1 -# @example AllowParenthesesInStringInterpolation: false (default) -# -# # bad -# "#{t('this.is.bad')}" -# -# # good -# "#{t 'this.is.better'}" -# @example EnforcedStyle: require_parentheses (default) -# -# # bad -# array.delete e -# -# # good -# array.delete(e) -# -# # good -# # Operators don't need parens -# foo == bar -# -# # good -# # Setter methods don't need parens -# foo.bar = baz -# -# # okay with `puts` listed in `AllowedMethods` -# puts 'test' -# -# # okay with `^assert` listed in `AllowedPatterns` -# assert_equal 'test', x -# -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#202 -class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses - include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 - def on_yield(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#225 - def args_begin(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#233 - def args_end(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#237 - def args_parenthesized?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#213 - def autocorrect_incompatible_with; end - end -end - -# Style omit_parentheses -# -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#9 -module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#70 - def allowed_camel_case_method_call?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#174 - def allowed_chained_call_with_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#170 - def allowed_multiline_call_with_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#75 - def allowed_string_interpolation_method_call?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#183 - def ambiguous_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212 - def assigned_before?(node, target); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#220 - def assignment_in_condition?(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#31 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#151 - def call_as_argument_or_chain?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#144 - def call_in_argument_with_block?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#100 - def call_in_literals?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#111 - def call_in_logical_operators?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#157 - def call_in_match_pattern?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#120 - def call_in_optional_arguments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#124 - def call_in_single_line_inheritance?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#128 - def call_with_ambiguous_arguments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#140 - def call_with_braced_block?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#230 - def forwards_anonymous_rest_arguments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#199 - def hash_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#163 - def hash_literal_in_arguments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#44 - def inside_endless_method_def?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#216 - def inside_string_interpolation?(node); end - - # Require hash value omission be enclosed in parentheses to prevent the following issue: - # https://bugs.ruby-lang.org/issues/18396. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#58 - def last_expression?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#87 - def legitimate_call_with_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#195 - def logical_operator?(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#40 - def offense_range(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#16 - def omit_parentheses(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 - def parentheses_at_the_end_of_multiline_call?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#203 - def regexp_slash_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#49 - def require_parentheses_for_hash_value_omission?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#187 - def splat?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#66 - def super_call_without_arguments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#62 - def syntax_like_method_call?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#191 - def ternary_if?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#207 - def unary_literal?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#11 -RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::OMIT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#10 -RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::TRAILING_WHITESPACE_REGEX = T.let(T.unsafe(nil), Regexp) - -# Style require_parentheses -# -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#8 -module RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#27 - def allowed_method_name?(name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#31 - def eligible_for_parentheses_omission?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#39 - def ignored_macro?(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#35 - def included_macros_list; end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#14 - def require_parentheses(node); end -end - -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#9 -RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_MSG = T.let(T.unsafe(nil), String) - -# Checks for unwanted parentheses in parameterless method calls. -# -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. -# -# NOTE: This cop allows the use of `it()` without arguments in blocks, -# as in `0.times { it() }`, following `Lint/ItWithoutArgumentsInBlock` cop. -# -# @example -# # bad -# object.some_method() -# -# # good -# object.some_method -# @example AllowedMethods: [] (default) -# # bad -# object.foo() -# @example AllowedMethods: [foo] -# # good -# object.foo() -# -# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#29 -class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#37 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#66 - def allowed_method_name?(name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#94 - def any_assignment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#62 - def default_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#58 - def ineligible_node?(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#117 - def offense_range(node); end - - # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: - # - # $ ruby -e '0.times { begin; it; end }' - # -e:1: warning: `it` calls without arguments will refer to the first block param in - # Ruby 3.4; use it() or self.it - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#86 - def parenthesized_it_method_in_block?(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#51 - def register_offense(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#70 - def same_name_assignment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#110 - def variable_in_mass_assignment?(variable_name, node); end -end - -# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#34 -RuboCop::Cop::Style::MethodCallWithoutArgsParentheses::MSG = T.let(T.unsafe(nil), String) - -# Checks for methods called on a do...end block. The point of -# this check is that it's easy to miss the call tacked on to the block -# when reading code. -# -# @example -# # bad -# a do -# b -# end.c -# -# # good -# a { b }.c -# -# # good -# foo = a do -# b -# end -# foo.c -# -# source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#24 -class RuboCop::Cop::Style::MethodCalledOnDoEndBlock < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#29 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#40 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#29 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#40 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#27 -RuboCop::Cop::Style::MethodCalledOnDoEndBlock::MSG = T.let(T.unsafe(nil), String) - -# Checks for parentheses around the arguments in method -# definitions. Both instance and class/singleton methods are checked. -# -# Regardless of style, parentheses are necessary for: -# -# 1. Endless methods -# 2. Argument lists containing a `forward-arg` (`...`) -# 3. Argument lists containing an anonymous rest arguments forwarding (`*`) -# 4. Argument lists containing an anonymous keyword rest arguments forwarding (`**`) -# 5. Argument lists containing an anonymous block forwarding (`&`) -# -# Removing the parens would be a syntax error here. -# -# @example EnforcedStyle: require_parentheses (default) -# # The `require_parentheses` style requires method definitions -# # to always use parentheses -# -# # bad -# def bar num1, num2 -# num1 + num2 -# end -# -# def foo descriptive_var_name, -# another_descriptive_var_name, -# last_descriptive_var_name -# do_something -# end -# -# # good -# def bar(num1, num2) -# num1 + num2 -# end -# -# def foo(descriptive_var_name, -# another_descriptive_var_name, -# last_descriptive_var_name) -# do_something -# end -# @example EnforcedStyle: require_no_parentheses -# # The `require_no_parentheses` style requires method definitions -# # to never use parentheses -# -# # bad -# def bar(num1, num2) -# num1 + num2 -# end -# -# def foo(descriptive_var_name, -# another_descriptive_var_name, -# last_descriptive_var_name) -# do_something -# end -# -# # good -# def bar num1, num2 -# num1 + num2 -# end -# -# def foo descriptive_var_name, -# another_descriptive_var_name, -# last_descriptive_var_name -# do_something -# end -# @example EnforcedStyle: require_no_parentheses_except_multiline -# # The `require_no_parentheses_except_multiline` style prefers no -# # parentheses when method definition arguments fit on single line, -# # but prefers parentheses when arguments span multiple lines. -# -# # bad -# def bar(num1, num2) -# num1 + num2 -# end -# -# def foo descriptive_var_name, -# another_descriptive_var_name, -# last_descriptive_var_name -# do_something -# end -# -# # good -# def bar num1, num2 -# num1 + num2 -# end -# -# def foo(descriptive_var_name, -# another_descriptive_var_name, -# last_descriptive_var_name) -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#97 -class RuboCop::Cop::Style::MethodDefParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#105 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#105 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#169 - def anonymous_arguments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#147 - def arguments_without_parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#126 - def correct_arguments(arg_node, corrector); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#131 - def forced_parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#151 - def missing_parentheses(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#142 - def require_parentheses?(args); end - - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#161 - def unwanted_parentheses(args); end -end - -# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#103 -RuboCop::Cop::Style::MethodDefParentheses::MSG_MISSING = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#102 -RuboCop::Cop::Style::MethodDefParentheses::MSG_PRESENT = T.let(T.unsafe(nil), String) - -# Checks for potential uses of `Enumerable#minmax`. -# -# @example -# -# # bad -# bar = [foo.min, foo.max] -# return foo.min, foo.max -# -# # good -# bar = foo.minmax -# return foo.minmax -# -# source://rubocop//lib/rubocop/cop/style/min_max.rb#17 -class RuboCop::Cop::Style::MinMax < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/min_max.rb#38 - def min_max_candidate(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/min_max.rb#22 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/style/min_max.rb#22 - def on_return(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/min_max.rb#55 - def argument_range(node); end - - # source://rubocop//lib/rubocop/cop/style/min_max.rb#42 - def message(offender, receiver); end - - # source://rubocop//lib/rubocop/cop/style/min_max.rb#46 - def offending_range(node); end -end - -# source://rubocop//lib/rubocop/cop/style/min_max.rb#20 -RuboCop::Cop::Style::MinMax::MSG = T.let(T.unsafe(nil), String) - -# Enforces the use of `max` or `min` instead of comparison for greater or less. -# -# NOTE: It can be used if you want to present limit or threshold in Ruby 2.7+. -# That it is slow though. So autocorrection will apply generic `max` or `min`: -# -# [source,ruby] -# ---- -# a.clamp(b..) # Same as `[a, b].max` -# a.clamp(..b) # Same as `[a, b].min` -# ---- -# -# @example -# -# # bad -# a > b ? a : b -# a >= b ? a : b -# -# # good -# [a, b].max -# -# # bad -# a < b ? a : b -# a <= b ? a : b -# -# # good -# [a, b].min -# -# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#37 -class RuboCop::Cop::Style::MinMaxComparison < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#46 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#72 - def autocorrect(corrector, node, replacement); end - - # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#64 - def preferred_method(operator, lhs, rhs, if_branch, else_branch); end -end - -# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#44 -RuboCop::Cop::Style::MinMaxComparison::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#42 -RuboCop::Cop::Style::MinMaxComparison::GRATER_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#43 -RuboCop::Cop::Style::MinMaxComparison::LESS_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#41 -RuboCop::Cop::Style::MinMaxComparison::MSG = T.let(T.unsafe(nil), String) - -# Checks for `if` expressions that do not have an `else` branch. -# -# NOTE: Pattern matching is allowed to have no `else` branch because unlike `if` and `case`, -# it raises `NoMatchingPatternError` if the pattern doesn't match and without having `else`. -# -# Supported styles are: if, case, both. -# -# @example EnforcedStyle: both (default) -# # warn when an `if` or `case` expression is missing an `else` branch. -# -# # bad -# if condition -# statement -# end -# -# # bad -# case var -# when condition -# statement -# end -# -# # good -# if condition -# statement -# else -# # the content of `else` branch will be determined by Style/EmptyElse -# end -# -# # good -# case var -# when condition -# statement -# else -# # the content of `else` branch will be determined by Style/EmptyElse -# end -# @example EnforcedStyle: if -# # warn when an `if` expression is missing an `else` branch. -# -# # bad -# if condition -# statement -# end -# -# # good -# if condition -# statement -# else -# # the content of `else` branch will be determined by Style/EmptyElse -# end -# -# # good -# case var -# when condition -# statement -# end -# -# # good -# case var -# when condition -# statement -# else -# # the content of `else` branch will be determined by Style/EmptyElse -# end -# @example EnforcedStyle: case -# # warn when a `case` expression is missing an `else` branch. -# -# # bad -# case var -# when condition -# statement -# end -# -# # good -# case var -# when condition -# statement -# else -# # the content of `else` branch will be determined by Style/EmptyElse -# end -# -# # good -# if condition -# statement -# end -# -# # good -# if condition -# statement -# else -# # the content of `else` branch will be determined by Style/EmptyElse -# end -# -# source://rubocop//lib/rubocop/cop/style/missing_else.rb#99 -class RuboCop::Cop::Style::MissingElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#115 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#121 - def on_case_match(node); end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#108 - def on_normal_if_unless(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#146 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#159 - def case_style?; end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#127 - def check(node); end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#181 - def empty_else_config; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#171 - def empty_else_cop_enabled?; end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#175 - def empty_else_style; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#155 - def if_style?; end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#135 - def message_template; end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#167 - def unless_else_config; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#163 - def unless_else_cop_enabled?; end -end - -# source://rubocop//lib/rubocop/cop/style/missing_else.rb#104 -RuboCop::Cop::Style::MissingElse::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/missing_else.rb#106 -RuboCop::Cop::Style::MissingElse::MSG_EMPTY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/missing_else.rb#105 -RuboCop::Cop::Style::MissingElse::MSG_NIL = T.let(T.unsafe(nil), String) - -# Checks for the presence of `method_missing` without also -# defining `respond_to_missing?`. -# -# @example -# # bad -# def method_missing(name, *args) -# # ... -# end -# -# # good -# def respond_to_missing?(name, include_private) -# # ... -# end -# -# def method_missing(name, *args) -# # ... -# end -# -# source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#24 -class RuboCop::Cop::Style::MissingRespondToMissing < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#27 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#27 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#37 - def implements_respond_to_missing?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#25 -RuboCop::Cop::Style::MissingRespondToMissing::MSG = T.let(T.unsafe(nil), String) - -# Checks for grouping of mixins in `class` and `module` bodies. -# By default it enforces mixins to be placed in separate declarations, -# but it can be configured to enforce grouping them in one declaration. -# -# @example EnforcedStyle: separated (default) -# # bad -# class Foo -# include Bar, Qox -# end -# -# # good -# class Foo -# include Qox -# include Bar -# end -# @example EnforcedStyle: grouped -# # bad -# class Foo -# extend Bar -# extend Qox -# end -# -# # good -# class Foo -# extend Qox, Bar -# end -# -# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#33 -class RuboCop::Cop::Style::MixinGrouping < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#40 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#40 - def on_module(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#64 - def check(send_node); end - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#72 - def check_grouped_style(send_node); end - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#91 - def check_separated_style(send_node); end - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#127 - def group_mixins(node, mixins); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#110 - def grouped_style?; end - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#53 - def range_to_remove_for_subsequent_mixin(mixins, node); end - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#118 - def separate_mixins(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#114 - def separated_style?; end - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#104 - def sibling_mixins(send_node); end -end - -# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#37 -RuboCop::Cop::Style::MixinGrouping::MIXIN_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#38 -RuboCop::Cop::Style::MixinGrouping::MSG = T.let(T.unsafe(nil), String) - -# Checks that `include`, `extend` and `prepend` statements appear -# inside classes and modules, not at the top level, so as to not affect -# the behavior of `Object`. -# -# @example -# # bad -# include M -# -# class C -# end -# -# # bad -# extend M -# -# class C -# end -# -# # bad -# prepend M -# -# class C -# end -# -# # good -# class C -# include M -# end -# -# # good -# class C -# extend M -# end -# -# # good -# class C -# prepend M -# end -# -# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#43 -class RuboCop::Cop::Style::MixinUsage < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#54 - def in_top_level_scope?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#48 - def include_statement(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#62 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#44 -RuboCop::Cop::Style::MixinUsage::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#45 -RuboCop::Cop::Style::MixinUsage::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for use of `extend self` or `module_function` in a module. -# -# Supported styles are: `module_function` (default), `extend_self` and `forbidden`. -# -# A couple of things to keep in mind: -# -# - `forbidden` style prohibits the usage of both styles -# - in default mode (`module_function`), the cop won't be activated when the module -# contains any private methods -# -# @example EnforcedStyle: module_function (default) -# # bad -# module Test -# extend self -# # ... -# end -# -# # good -# module Test -# module_function -# # ... -# end -# -# # good -# module Test -# extend self -# # ... -# private -# # ... -# end -# -# # good -# module Test -# class << self -# # ... -# end -# end -# @example EnforcedStyle: extend_self -# # bad -# module Test -# module_function -# # ... -# end -# -# # good -# module Test -# extend self -# # ... -# end -# -# # good -# module Test -# class << self -# # ... -# end -# end -# @example EnforcedStyle: forbidden -# # bad -# module Test -# module_function -# # ... -# end -# -# # bad -# module Test -# extend self -# # ... -# end -# -# # bad -# module Test -# extend self -# # ... -# private -# # ... -# end -# -# # good -# module Test -# class << self -# # ... -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/module_function.rb#95 -class RuboCop::Cop::Style::ModuleFunction < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#107 - def extend_self_node?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#104 - def module_function_node?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#112 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#110 - def private_directive?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#149 - def check_extend_self(nodes); end - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#155 - def check_forbidden(nodes); end - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#141 - def check_module_function(nodes); end - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#130 - def each_wrong_style(nodes, &block); end - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#162 - def message(_range); end -end - -# source://rubocop//lib/rubocop/cop/style/module_function.rb#100 -RuboCop::Cop::Style::ModuleFunction::EXTEND_SELF_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/module_function.rb#101 -RuboCop::Cop::Style::ModuleFunction::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/module_function.rb#99 -RuboCop::Cop::Style::ModuleFunction::MODULE_FUNCTION_MSG = T.let(T.unsafe(nil), String) - -# Checks for chaining of a block after another block that spans -# multiple lines. -# -# @example -# -# # bad -# Thread.list.select do |t| -# t.alive? -# end.map do |t| -# t.object_id -# end -# -# # good -# alive_threads = Thread.list.select do |t| -# t.alive? -# end -# alive_threads.map do |t| -# t.object_id -# end -# -# source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#25 -class RuboCop::Cop::Style::MultilineBlockChain < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#30 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#30 - def on_numblock(node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#28 -RuboCop::Cop::Style::MultilineBlockChain::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of if/unless modifiers with multiple-lines bodies. -# -# @example -# -# # bad -# { -# result: 'this should not happen' -# } unless cond -# -# # good -# { result: 'ok' } if cond -# -# source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#17 -class RuboCop::Cop::Style::MultilineIfModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::StatementModifier - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#25 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#43 - def indented_body(body, node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#35 - def to_normal_if(node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#22 -RuboCop::Cop::Style::MultilineIfModifier::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of the `then` keyword in multi-line if statements. -# -# @example -# # bad -# # This is considered bad practice. -# if cond then -# end -# -# # good -# # If statements can contain `then` on the same line. -# if cond then a -# elsif cond then b -# end -# -# source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#19 -class RuboCop::Cop::Style::MultilineIfThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#28 - def on_normal_if_unless(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#38 - def non_modifier_then?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#26 -RuboCop::Cop::Style::MultilineIfThen::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#24 -RuboCop::Cop::Style::MultilineIfThen::NON_MODIFIER_THEN = T.let(T.unsafe(nil), Regexp) - -# Checks uses of the `then` keyword in multi-line `in` statement. -# -# @example -# # bad -# case expression -# in pattern then -# end -# -# # good -# case expression -# in pattern -# end -# -# # good -# case expression -# in pattern then do_something -# end -# -# # good -# case expression -# in pattern then do_something(arg1, -# arg2) -# end -# -# source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#30 -class RuboCop::Cop::Style::MultilineInPatternThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#39 - def on_in_pattern(node); end - - private - - # Requires `then` for write `in` and its body on the same line. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#51 - def require_then?(in_pattern_node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#37 -RuboCop::Cop::Style::MultilineInPatternThen::MSG = T.let(T.unsafe(nil), String) - -# Checks expressions wrapping styles for multiline memoization. -# -# @example EnforcedStyle: keyword (default) -# # bad -# foo ||= ( -# bar -# baz -# ) -# -# # good -# foo ||= begin -# bar -# baz -# end -# @example EnforcedStyle: braces -# # bad -# foo ||= begin -# bar -# baz -# end -# -# # good -# foo ||= ( -# bar -# baz -# ) -# -# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#33 -class RuboCop::Cop::Style::MultilineMemoization < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#56 - def message(_node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#41 - def on_or_asgn(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#62 - def bad_rhs?(rhs); end - - # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#72 - def keyword_autocorrect(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#78 - def keyword_begin_str(node, node_buf); end - - # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#86 - def keyword_end_str(node, node_buf); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#39 -RuboCop::Cop::Style::MultilineMemoization::BRACES_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#38 -RuboCop::Cop::Style::MultilineMemoization::KEYWORD_MSG = T.let(T.unsafe(nil), String) - -# Checks for method signatures that span multiple lines. -# -# @example -# -# # good -# -# def foo(bar, baz) -# end -# -# # bad -# -# def foo(bar, -# baz) -# end -# -# source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#21 -class RuboCop::Cop::Style::MultilineMethodSignature < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#27 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#27 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#69 - def arguments_range(node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#42 - def autocorrect(corrector, node, begin_of_arguments); end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#81 - def closing_line(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#85 - def correction_exceeds_max_line_length?(node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#93 - def definition_width(node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#89 - def indentation_width(node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#65 - def last_line_source_of_arguments(arguments); end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#97 - def max_line_length; end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#77 - def opening_line(node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#25 -RuboCop::Cop::Style::MultilineMethodSignature::MSG = T.let(T.unsafe(nil), String) - -# Checks for multi-line ternary op expressions. -# -# NOTE: `return if ... else ... end` is syntax error. If `return` is used before -# multiline ternary operator expression, it will be autocorrected to single-line -# ternary operator. The same is true for `break`, `next`, and method call. -# -# @example -# # bad -# a = cond ? -# b : c -# a = cond ? b : -# c -# a = cond ? -# b : -# c -# -# return cond ? -# b : -# c -# -# # good -# a = cond ? b : c -# a = if cond -# b -# else -# c -# end -# -# return cond ? b : c -# -# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#36 -class RuboCop::Cop::Style::MultilineTernaryOperator < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#44 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#64 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#86 - def comments_in_condition(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#92 - def enforce_single_line_ternary_operator?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#60 - def offense?(node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#72 - def replacement(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#96 - def use_assignment_method?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#40 -RuboCop::Cop::Style::MultilineTernaryOperator::MSG_IF = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#41 -RuboCop::Cop::Style::MultilineTernaryOperator::MSG_SINGLE_LINE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#42 -RuboCop::Cop::Style::MultilineTernaryOperator::SINGLE_LINE_TYPES = T.let(T.unsafe(nil), Array) - -# Checks uses of the `then` keyword -# in multi-line when statements. -# -# @example -# # bad -# case foo -# when bar then -# end -# -# # good -# case foo -# when bar -# end -# -# # good -# case foo -# when bar then do_something -# end -# -# # good -# case foo -# when bar then do_something(arg1, -# arg2) -# end -# -# source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#31 -class RuboCop::Cop::Style::MultilineWhenThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#37 - def on_when(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#58 - def accept_node_type?(node); end - - # Requires `then` for write `when` and its body on the same line. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#49 - def require_then?(when_node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#35 -RuboCop::Cop::Style::MultilineWhenThen::MSG = T.let(T.unsafe(nil), String) - -# Checks against comparing a variable with multiple items, where -# `Array#include?`, `Set#include?` or a `case` could be used instead -# to avoid code repetition. -# It accepts comparisons of multiple method calls to avoid unnecessary method calls -# by default. It can be configured by `AllowMethodComparison` option. -# -# @example -# # bad -# a = 'a' -# foo if a == 'a' || a == 'b' || a == 'c' -# -# # good -# a = 'a' -# foo if ['a', 'b', 'c'].include?(a) -# -# VALUES = Set['a', 'b', 'c'].freeze -# # elsewhere... -# foo if VALUES.include?(a) -# -# case foo -# when 'a', 'b', 'c' then foo -# # ... -# end -# -# # accepted (but consider `case` as above) -# foo if a == b.lightweight || a == b.heavyweight -# @example AllowMethodComparison: true (default) -# # good -# foo if a == b.lightweight || a == b.heavyweight -# @example AllowMethodComparison: false -# # bad -# foo if a == b.lightweight || a == b.heavyweight -# -# # good -# foo if [b.lightweight, b.heavyweight].include?(a) -# @example ComparisonsThreshold: 2 (default) -# # bad -# foo if a == 'a' || a == 'b' -# @example ComparisonsThreshold: 3 -# # good -# foo if a == 'a' || a == 'b' -# -# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#52 -class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#58 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#62 - def on_or(node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#88 - def simple_comparison_lhs?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#93 - def simple_comparison_rhs?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#85 - def simple_double_comparison?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#161 - def allow_method_comparison?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#136 - def comparison?(node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#165 - def comparisons_threshold; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#128 - def nested_comparison?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#97 - def nested_variable_comparison?(node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#156 - def reset_comparison; end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#140 - def root_of_or_node(or_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#150 - def switch_comparison?(node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#124 - def variable_name(node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#103 - def variables_in_node(node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#111 - def variables_in_simple_node(node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#55 -RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String) - -# Checks whether some constant value isn't a -# mutable literal (e.g. array or hash). -# -# Strict mode can be used to freeze all constants, rather than -# just literals. -# Strict mode is considered an experimental feature. It has not been -# updated with an exhaustive list of all methods that will produce -# frozen objects so there is a decent chance of getting some false -# positives. Luckily, there is no harm in freezing an already -# frozen object. -# -# From Ruby 3.0, this cop honours the magic comment -# 'shareable_constant_value'. When this magic comment is set to any -# acceptable value other than none, it will suppress the offenses -# raised by this cop. It enforces frozen state. -# -# NOTE: Regexp and Range literals are frozen objects since Ruby 3.0. -# -# NOTE: From Ruby 3.0, interpolated strings are not frozen when -# `# frozen-string-literal: true` is used, so this cop enforces explicit -# freezing for such strings. -# -# NOTE: From Ruby 3.0, this cop allows explicit freezing of constants when -# the `shareable_constant_value` directive is used. -# -# @example EnforcedStyle: literals (default) -# # bad -# CONST = [1, 2, 3] -# -# # good -# CONST = [1, 2, 3].freeze -# -# # good -# CONST = <<~TESTING.freeze -# This is a heredoc -# TESTING -# -# # good -# CONST = Something.new -# @example EnforcedStyle: strict -# # bad -# CONST = Something.new -# -# # bad -# CONST = Struct.new do -# def foo -# puts 1 -# end -# end -# -# # good -# CONST = Something.new.freeze -# -# # good -# CONST = Struct.new do -# def foo -# puts 1 -# end -# end.freeze -# @example -# # Magic comment - shareable_constant_value: literal -# -# # bad -# CONST = [1, 2, 3] -# -# # good -# # shareable_constant_value: literal -# CONST = [1, 2, 3] -# -# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#83 -class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Style::MutableConstant::ShareableConstantValue - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-sorbet/0.6.11/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#15 - def on_assignment(value); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#127 - def on_casgn(node); end - - # Some of these patterns may not actually return an immutable object, - # but we want to consider them immutable for this cop. - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#224 - def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#241 - def range_enclosed_in_parentheses?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#217 - def splat_value(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet/0.6.11/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#10 - def t_let(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#169 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#158 - def check(value); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#208 - def correct_splat_expansion(corrector, expr, splat_value); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#200 - def frozen_regexp_or_range_literals?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#190 - def immutable_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#184 - def mutable_literal?(value); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#204 - def requires_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#194 - def shareable_constant_value?(node); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#149 - def strict_check(value); end -end - -# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#125 -RuboCop::Cop::Style::MutableConstant::MSG = T.let(T.unsafe(nil), String) - -# Handles magic comment shareable_constant_value with O(n ^ 2) complexity -# n - number of lines in the source -# Iterates over all lines before a CONSTANT -# until it reaches shareable_constant_value -# -# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#88 -module RuboCop::Cop::Style::MutableConstant::ShareableConstantValue - private - - # Identifies the most recent magic comment with valid shareable constant values - # that's in scope for this node - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#102 - def magic_comment_in_scope(node); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#110 - def processed_source_till_node(node); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#91 - def recent_shareable_value?(node); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#114 - def shareable_constant_value_enabled?(value); end - - class << self - # Identifies the most recent magic comment with valid shareable constant values - # that's in scope for this node - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#102 - def magic_comment_in_scope(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#91 - def recent_shareable_value?(node); end - end -end - -# Checks for uses of if with a negated condition. Only ifs -# without else are considered. There are three different styles: -# -# * both -# * prefix -# * postfix -# -# @example EnforcedStyle: both (default) -# # enforces `unless` for `prefix` and `postfix` conditionals -# -# # bad -# -# if !foo -# bar -# end -# -# # good -# -# unless foo -# bar -# end -# -# # bad -# -# bar if !foo -# -# # good -# -# bar unless foo -# @example EnforcedStyle: prefix -# # enforces `unless` for just `prefix` conditionals -# -# # bad -# -# if !foo -# bar -# end -# -# # good -# -# unless foo -# bar -# end -# -# # good -# -# bar if !foo -# @example EnforcedStyle: postfix -# # enforces `unless` for just `postfix` conditionals -# -# # bad -# -# bar if !foo -# -# # good -# -# bar unless foo -# -# # good -# -# if !foo -# bar -# end -# -# source://rubocop//lib/rubocop/cop/style/negated_if.rb#71 -class RuboCop::Cop::Style::NegatedIf < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::NegativeConditional - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/negated_if.rb#76 - def on_if(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/negated_if.rb#92 - def correct_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/negated_if.rb#88 - def message(node); end -end - -# Checks for uses of `if-else` and ternary operators with a negated condition -# which can be simplified by inverting condition and swapping branches. -# -# @example -# # bad -# if !x -# do_something -# else -# do_something_else -# end -# -# # good -# if x -# do_something_else -# else -# do_something -# end -# -# # bad -# !x ? do_something : do_something_else -# -# # good -# x ? do_something_else : do_something -# -# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#30 -class RuboCop::Cop::Style::NegatedIfElseCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#39 - def double_negation?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#49 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#45 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#94 - def correct_negated_condition(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#90 - def corrected_ancestor?(node); end - - # Collect the entire else branch, including whitespace and comments - # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#125 - def else_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#68 - def if_else?(node); end - - # Collect the entire if branch, including whitespace and comments - # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#116 - def if_range(node); end - - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#84 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#79 - def negated_condition?(node); end - - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#107 - def swap_branches(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#73 - def unwrap_begin_nodes(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#41 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#34 -RuboCop::Cop::Style::NegatedIfElseCondition::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#36 -RuboCop::Cop::Style::NegatedIfElseCondition::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) - -# Checks for uses of unless with a negated condition. Only unless -# without else are considered. There are three different styles: -# -# * both -# * prefix -# * postfix -# -# @example EnforcedStyle: both (default) -# # enforces `if` for `prefix` and `postfix` conditionals -# -# # bad -# unless !foo -# bar -# end -# -# # good -# if foo -# bar -# end -# -# # bad -# bar unless !foo -# -# # good -# bar if foo -# @example EnforcedStyle: prefix -# # enforces `if` for just `prefix` conditionals -# -# # bad -# unless !foo -# bar -# end -# -# # good -# if foo -# bar -# end -# -# # good -# bar unless !foo -# @example EnforcedStyle: postfix -# # enforces `if` for just `postfix` conditionals -# -# # bad -# bar unless !foo -# -# # good -# bar if foo -# -# # good -# unless !foo -# bar -# end -# -# source://rubocop//lib/rubocop/cop/style/negated_unless.rb#61 -class RuboCop::Cop::Style::NegatedUnless < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::NegativeConditional - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#66 - def on_if(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#82 - def correct_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#78 - def message(node); end -end - -# Checks for uses of while with a negated condition. -# -# @example -# # bad -# while !foo -# bar -# end -# -# # good -# until foo -# bar -# end -# -# # bad -# bar until !foo -# -# # good -# bar while foo -# bar while !foo && baz -# -# source://rubocop//lib/rubocop/cop/style/negated_while.rb#25 -class RuboCop::Cop::Style::NegatedWhile < ::RuboCop::Cop::Base - include ::RuboCop::Cop::NegativeConditional - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/negated_while.rb#29 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/negated_while.rb#29 - def on_while(node); end -end - -# Checks for nested `File.dirname`. -# It replaces nested `File.dirname` with the level argument introduced in Ruby 3.1. -# -# @example -# -# # bad -# File.dirname(File.dirname(path)) -# -# # good -# File.dirname(path, 2) -# -# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#17 -class RuboCop::Cop::Style::NestedFileDirname < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#28 - def file_dirname?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#33 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#60 - def offense_range(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#49 - def path_with_dir_level(node, level); end -end - -# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#22 -RuboCop::Cop::Style::NestedFileDirname::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#23 -RuboCop::Cop::Style::NestedFileDirname::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for nested use of if, unless, while and until in their -# modifier form. -# -# @example -# -# # bad -# something if a if b -# -# # good -# something if b && a -# -# source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#16 -class RuboCop::Cop::Style::NestedModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#22 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#22 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#22 - def on_while(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#85 - def add_parentheses_to_method_arguments(send_node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#42 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#30 - def check(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#65 - def left_hand_operand(node, operator); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#38 - def modifier?(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#51 - def new_expression(inner_node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#61 - def replacement_operator(keyword); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#94 - def requires_parens?(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#71 - def right_hand_operand(node, left_hand_keyword); end -end - -# source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#20 -RuboCop::Cop::Style::NestedModifier::MSG = T.let(T.unsafe(nil), String) - -# Checks for unparenthesized method calls in the argument list -# of a parenthesized method call. -# `be`, `be_a`, `be_an`, `be_between`, `be_falsey`, `be_kind_of`, `be_instance_of`, -# `be_truthy`, `be_within`, `eq`, `eql`, `end_with`, `include`, `match`, `raise_error`, -# `respond_to`, and `start_with` methods are allowed by default. -# These are customizable with `AllowedMethods` option. -# -# @example -# # good -# method1(method2(arg)) -# -# # bad -# method1(method2 arg) -# @example AllowedMethods: [foo] -# # good -# method1(foo arg) -# -# source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#24 -class RuboCop::Cop::Style::NestedParenthesizedCalls < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#35 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#35 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#71 - def allowed?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#65 - def allowed_omission?(send_node); end - - # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#51 - def autocorrect(corrector, nested); end - - class << self - # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#31 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#29 -RuboCop::Cop::Style::NestedParenthesizedCalls::MSG = T.let(T.unsafe(nil), String) - -# Checks for nested ternary op expressions. -# -# @example -# # bad -# a ? (b ? b1 : b2) : a2 -# -# # good -# if a -# b ? b1 : b2 -# else -# a2 -# end -# -# source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#18 -class RuboCop::Cop::Style::NestedTernaryOperator < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#25 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#40 - def autocorrect(corrector, if_node); end - - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#47 - def remove_parentheses(source); end - - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#53 - def replace_loc_and_whitespace(corrector, range, replacement); end -end - -# source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#23 -RuboCop::Cop::Style::NestedTernaryOperator::MSG = T.let(T.unsafe(nil), String) - -# Use `next` to skip iteration instead of a condition at the end. -# -# @example EnforcedStyle: skip_modifier_ifs (default) -# # bad -# [1, 2].each do |a| -# if a == 1 -# puts a -# end -# end -# -# # good -# [1, 2].each do |a| -# next unless a == 1 -# puts a -# end -# -# # good -# [1, 2].each do |a| -# puts a if a == 1 -# end -# @example EnforcedStyle: always -# # With `always` all conditions at the end of an iteration needs to be -# # replaced by next - with `skip_modifier_ifs` the modifier if like -# # this one are ignored: `[1, 2].each { |a| puts a if a == 1 }` -# -# # bad -# [1, 2].each do |a| -# puts a if a == 1 -# end -# -# # bad -# [1, 2].each do |a| -# if a == 1 -# puts a -# end -# end -# -# # good -# [1, 2].each do |a| -# next unless a == 1 -# puts a -# end -# -# source://rubocop//lib/rubocop/cop/style/next.rb#49 -class RuboCop::Cop::Style::Next < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MinBodyLength - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/next.rb#68 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#76 - def on_for(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#62 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/style/next.rb#68 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#76 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#76 - def on_while(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/next.rb#213 - def actual_indent(lines, buffer); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/next.rb#112 - def allowed_modifier_if?(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#155 - def autocorrect_block(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#145 - def autocorrect_modifier(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#84 - def check(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#170 - def cond_range(node, cond); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/next.rb#189 - def end_followed_by_whitespace_only?(source_buffer, end_pos); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#180 - def end_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/next.rb#98 - def ends_with_condition?(body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/next.rb#128 - def exit_body_type?(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#217 - def heredoc_lines(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/next.rb#120 - def if_else_children?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/next.rb#124 - def if_without_else?(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#140 - def offense_location(offense_node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#134 - def offense_node(body); end - - # Adjust indentation of `lines` to match `node` - # - # source://rubocop//lib/rubocop/cop/style/next.rb#204 - def reindent(lines, node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#224 - def reindent_line(corrector, lineno, delta, buffer); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#193 - def reindentable_lines(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/next.rb#104 - def simple_if_without_break?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/next.rb#58 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/next.rb#56 -RuboCop::Cop::Style::Next::EXIT_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/next.rb#55 -RuboCop::Cop::Style::Next::MSG = T.let(T.unsafe(nil), String) - -# Checks for comparison of something with nil using `==` and -# `nil?`. -# -# Supported styles are: predicate, comparison. -# -# @example EnforcedStyle: predicate (default) -# -# # bad -# if x == nil -# end -# -# # good -# if x.nil? -# end -# @example EnforcedStyle: comparison -# -# # bad -# if x.nil? -# end -# -# # good -# if x == nil -# end -# -# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#31 -class RuboCop::Cop::Style::NilComparison < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#44 - def nil_check?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#41 - def nil_comparison?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#46 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#67 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#79 - def prefer_comparison?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#71 - def style_check?(node, &block); end -end - -# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#36 -RuboCop::Cop::Style::NilComparison::EXPLICIT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#35 -RuboCop::Cop::Style::NilComparison::PREDICATE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#38 -RuboCop::Cop::Style::NilComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for lambdas and procs that always return nil, -# which can be replaced with an empty lambda or proc instead. -# -# @example -# # bad -# -> { nil } -# -# lambda do -# next nil -# end -# -# proc { nil } -# -# Proc.new do -# break nil -# end -# -# # good -# -> {} -# -# lambda do -# end -# -# -> (x) { nil if x } -# -# proc {} -# -# Proc.new { nil if x } -# -# source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#35 -class RuboCop::Cop::Style::NilLambda < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#42 - def nil_return?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#46 - def on_block(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#58 - def autocorrect(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#39 -RuboCop::Cop::Style::NilLambda::MSG = T.let(T.unsafe(nil), String) - -# Checks for non-nil checks, which are usually redundant. -# -# With `IncludeSemanticChanges` set to `false` by default, this cop -# does not report offenses for `!x.nil?` and does no changes that might -# change behavior. -# Also `IncludeSemanticChanges` set to `false` with `EnforcedStyle: comparison` of -# `Style/NilComparison` cop, this cop does not report offenses for `x != nil` and -# does no changes to `!x.nil?` style. -# -# With `IncludeSemanticChanges` set to `true`, this cop reports offenses -# for `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which -# is *usually* OK, but might change behavior. -# -# @example -# # bad -# if x != nil -# end -# -# # good -# if x -# end -# -# # Non-nil checks are allowed if they are the final nodes of predicate. -# # good -# def signed_in? -# !current_user.nil? -# end -# @example IncludeSemanticChanges: false (default) -# # good -# if !x.nil? -# end -# @example IncludeSemanticChanges: true -# # bad -# if !x.nil? -# end -# -# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#44 -class RuboCop::Cop::Style::NonNilCheck < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#59 - def nil_check?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#62 - def not_and_nil_check?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#53 - def not_equal_to_nil?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#73 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#73 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#64 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#56 - def unless_check?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#93 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#123 - def autocorrect_comparison(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#137 - def autocorrect_non_nil(corrector, node, inner_node); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#145 - def autocorrect_unless_nil(corrector, node, receiver); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#119 - def include_semantic_changes?; end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#110 - def message(node); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#150 - def nil_comparison_style; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#88 - def register_offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#104 - def unless_and_nil_check?(send_node); end -end - -# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#48 -RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REDUNDANCY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#47 -RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REPLACEMENT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#50 -RuboCop::Cop::Style::NonNilCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for uses of the keyword `not` instead of `!`. -# -# @example -# -# # bad - parentheses are required because of op precedence -# x = (not something) -# -# # good -# x = !something -# -# source://rubocop//lib/rubocop/cop/style/not.rb#16 -class RuboCop::Cop::Style::Not < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/not.rb#32 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/not.rb#60 - def correct_opposite_method(corrector, range, child); end - - # source://rubocop//lib/rubocop/cop/style/not.rb#65 - def correct_with_parens(corrector, range, node); end - - # source://rubocop//lib/rubocop/cop/style/not.rb#70 - def correct_without_parens(corrector, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/not.rb#50 - def opposite_method?(child); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/not.rb#54 - def requires_parens?(child); end -end - -# source://rubocop//lib/rubocop/cop/style/not.rb#20 -RuboCop::Cop::Style::Not::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/not.rb#23 -RuboCop::Cop::Style::Not::OPPOSITE_METHODS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/not.rb#21 -RuboCop::Cop::Style::Not::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for numbered parameters. -# -# It can either restrict the use of numbered parameters to -# single-lined blocks, or disallow completely numbered parameters. -# -# @example EnforcedStyle: allow_single_line (default) -# # bad -# collection.each do -# puts _1 -# end -# -# # good -# collection.each { puts _1 } -# @example EnforcedStyle: disallow -# # bad -# collection.each { puts _1 } -# -# # good -# collection.each { |item| puts item } -# -# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#27 -class RuboCop::Cop::Style::NumberedParameters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#36 - def on_numblock(node); end -end - -# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#31 -RuboCop::Cop::Style::NumberedParameters::MSG_DISALLOW = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#32 -RuboCop::Cop::Style::NumberedParameters::MSG_MULTI_LINE = T.let(T.unsafe(nil), String) - -# Detects use of an excessive amount of numbered parameters in a -# single block. Having too many numbered parameters can make code too -# cryptic and hard to read. -# -# The cop defaults to registering an offense if there is more than 1 numbered -# parameter but this maximum can be configured by setting `Max`. -# -# @example Max: 1 (default) -# # bad -# use_multiple_numbered_parameters { _1.call(_2, _3, _4) } -# -# # good -# array.each { use_array_element_as_numbered_parameter(_1) } -# hash.each { use_only_hash_value_as_numbered_parameter(_2) } -# -# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#20 -class RuboCop::Cop::Style::NumberedParametersLimit < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def max=(value); end - - # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#32 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#49 - def max_count; end - - # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#43 - def numbered_parameter_nodes(node); end -end - -# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#24 -RuboCop::Cop::Style::NumberedParametersLimit::DEFAULT_MAX_VALUE = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#29 -RuboCop::Cop::Style::NumberedParametersLimit::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#30 -RuboCop::Cop::Style::NumberedParametersLimit::NUMBERED_PARAMETER_PATTERN = T.let(T.unsafe(nil), Regexp) - -# Checks for octal, hex, binary, and decimal literals using -# uppercase prefixes and corrects them to lowercase prefix -# or no prefix (in case of decimals). -# -# @example EnforcedOctalStyle: zero_with_o (default) -# # bad - missing octal prefix -# num = 01234 -# -# # bad - uppercase prefix -# num = 0O1234 -# num = 0X12AB -# num = 0B10101 -# -# # bad - redundant decimal prefix -# num = 0D1234 -# num = 0d1234 -# -# # good -# num = 0o1234 -# num = 0x12AB -# num = 0b10101 -# num = 1234 -# @example EnforcedOctalStyle: zero_only -# # bad -# num = 0o1234 -# num = 0O1234 -# -# # good -# num = 01234 -# -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#36 -class RuboCop::Cop::Style::NumericLiteralPrefix < ::RuboCop::Cop::Base - include ::RuboCop::Cop::IntegerNode - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#52 - def on_int(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#109 - def format_binary(source); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#113 - def format_decimal(source); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#105 - def format_hex(source); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#97 - def format_octal(source); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#101 - def format_octal_zero_only(source); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#82 - def hex_bin_dec_literal_type(literal); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#68 - def literal_type(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#64 - def message(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#74 - def octal_literal_type(literal); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#93 - def octal_zero_only?; end -end - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#49 -RuboCop::Cop::Style::NumericLiteralPrefix::BINARY_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#43 -RuboCop::Cop::Style::NumericLiteralPrefix::BINARY_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#50 -RuboCop::Cop::Style::NumericLiteralPrefix::DECIMAL_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#44 -RuboCop::Cop::Style::NumericLiteralPrefix::DECIMAL_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#48 -RuboCop::Cop::Style::NumericLiteralPrefix::HEX_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#42 -RuboCop::Cop::Style::NumericLiteralPrefix::HEX_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#47 -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#41 -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#46 -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#40 -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_REGEX = T.let(T.unsafe(nil), Regexp) - -# Checks for big numeric literals without `_` between groups -# of digits in them. -# -# Additional allowed patterns can be added by adding regexps to -# the `AllowedPatterns` configuration. All regexps are treated -# as anchored even if the patterns do not contain anchors (so -# `\d{4}_\d{4}` will allow `1234_5678` but not `1234_5678_9012`). -# -# NOTE: Even if `AllowedPatterns` are given, autocorrection will -# only correct to the standard pattern of an `_` every 3 digits. -# -# @example -# -# # bad -# 1000000 -# 1_00_000 -# 1_0000 -# -# # good -# 1_000_000 -# 1000 -# @example Strict: false (default) -# -# # good -# 10_000_00 # typical representation of $10,000 in cents -# @example Strict: true -# -# # bad -# 10_000_00 # typical representation of $10,000 in cents -# @example AllowedNumbers: [3000] -# -# # good -# 3000 # You can specify allowed numbers. (e.g. port number) -# -# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#43 -class RuboCop::Cop::Style::NumericLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::IntegerNode - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def min_digits=(value); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#60 - def on_float(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#56 - def on_int(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#118 - def allowed_numbers; end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#122 - def allowed_patterns; end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#66 - def check(node); end - - # @param int_part [String] - # - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#107 - def format_int_part(int_part); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#93 - def format_number(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#114 - def min_digits; end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#82 - def register_offense(node, &_block); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#89 - def short_group_regex; end -end - -# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#49 -RuboCop::Cop::Style::NumericLiterals::DELIMITER_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#48 -RuboCop::Cop::Style::NumericLiterals::MSG = T.let(T.unsafe(nil), String) - -# Checks for usage of comparison operators (`==`, -# `>`, `<`) to test numbers as zero, positive, or negative. -# These can be replaced by their respective predicate methods. -# This cop can also be configured to do the reverse. -# -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. -# -# This cop disregards `#nonzero?` as its value is truthy or falsey, -# but not `true` and `false`, and thus not always interchangeable with -# `!= 0`. -# -# This cop allows comparisons to global variables, since they are often -# populated with objects which can be compared with integers, but are -# not themselves `Integer` polymorphic. -# -# @example EnforcedStyle: predicate (default) -# # bad -# foo == 0 -# 0 > foo -# bar.baz > 0 -# -# # good -# foo.zero? -# foo.negative? -# bar.baz.positive? -# @example EnforcedStyle: comparison -# # bad -# foo.zero? -# foo.negative? -# bar.baz.positive? -# -# # good -# foo == 0 -# 0 > foo -# bar.baz > 0 -# @example AllowedMethods: [] (default) with EnforcedStyle: predicate -# # bad -# foo == 0 -# 0 > foo -# bar.baz > 0 -# @example AllowedMethods: [==] with EnforcedStyle: predicate -# # good -# foo == 0 -# -# # bad -# 0 > foo -# bar.baz > 0 -# @example AllowedPatterns: [] (default) with EnforcedStyle: comparison -# # bad -# foo.zero? -# foo.negative? -# bar.baz.positive? -# @example AllowedPatterns: ['zero'] with EnforcedStyle: predicate -# # good -# # bad -# foo.zero? -# -# # bad -# foo.negative? -# bar.baz.positive? -# -# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#78 -class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#174 - def comparison(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#179 - def inverted_comparison(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#90 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#169 - def predicate(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#107 - def allowed_method_name?(name); end - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#111 - def check(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#154 - def invert; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#162 - def negated?(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#134 - def parenthesized_source(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#124 - def replacement(node, numeric, operation); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#146 - def replacement_supported?(operator); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#142 - def require_parentheses?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#84 -RuboCop::Cop::Style::NumericPredicate::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#86 -RuboCop::Cop::Style::NumericPredicate::REPLACEMENTS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#88 -RuboCop::Cop::Style::NumericPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces the use of consistent method names -# `Object#yield_self` or `Object#then`. -# -# @example EnforcedStyle: then (default) -# -# # bad -# obj.yield_self { |x| x.do_something } -# -# # good -# obj.then { |x| x.do_something } -# @example EnforcedStyle: yield_self -# -# # bad -# obj.then { |x| x.do_something } -# -# # good -# obj.yield_self { |x| x.do_something } -# -# source://rubocop//lib/rubocop/cop/style/object_then.rb#25 -class RuboCop::Cop::Style::ObjectThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/object_then.rb#34 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/object_then.rb#34 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/object_then.rb#40 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/object_then.rb#48 - def check_method_node(node); end - - # source://rubocop//lib/rubocop/cop/style/object_then.rb#70 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/object_then.rb#59 - def preferred_method?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/object_then.rb#32 -RuboCop::Cop::Style::ObjectThen::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of if/then/else/end constructs on a single line. -# AlwaysCorrectToMultiline config option can be set to true to auto-convert all offenses to -# multi-line constructs. When AlwaysCorrectToMultiline is false (default case) the -# autocorrect will first try converting them to ternary operators. -# -# @example -# # bad -# if foo then bar else baz end -# -# # bad -# unless foo then baz else bar end -# -# # good -# foo ? bar : baz -# -# # good -# bar if foo -# -# # good -# if foo then bar end -# -# # good -# if foo -# bar -# else -# baz -# end -# -# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#33 -class RuboCop::Cop::Style::OneLineConditional < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::OnNormalIfUnless - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#42 - def on_normal_if_unless(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#77 - def always_multiline?; end - - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#59 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#81 - def cannot_replace_to_ternary?(node); end - - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#93 - def expr_replacement(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#114 - def keyword_with_changed_precedence?(node); end - - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#55 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#107 - def method_call_with_changed_precedence?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#99 - def requires_parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#67 - def ternary_correction(node); end - - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#85 - def ternary_replacement(node); end -end - -# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#39 -RuboCop::Cop::Style::OneLineConditional::MSG = T.let(T.unsafe(nil), String) - -# Flags uses of OpenStruct, as it is now officially discouraged -# to be used for performance, version compatibility, and potential security issues. -# -# @example -# -# # bad -# point = OpenStruct.new(x: 0, y: 1) -# -# # good -# Point = Struct.new(:x, :y) -# point = Point.new(0, 1) -# -# # also good -# point = { x: 0, y: 1 } -# -# # bad -# test_double = OpenStruct.new(a: 'b') -# -# # good (assumes test using rspec-mocks) -# test_double = double -# allow(test_double).to receive(:a).and_return('b') -# -# source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#44 -class RuboCop::Cop::Style::OpenStructUse < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#52 - def on_const(node); end - - # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#48 - def uses_open_struct?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#61 - def custom_class_or_module_definition?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#45 -RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String) - -# Checks for redundant dot before operator method call. -# The target operator methods are `|`, `^`, `&`, ``<=>``, `==`, `===`, `=~`, `>`, `>=`, `<`, -# ``<=``, `<<`, `>>`, `+`, `-`, `*`, `/`, `%`, `**`, `~`, `!`, `!=`, and `!~`. -# -# @example -# -# # bad -# foo.+ bar -# foo.& bar -# -# # good -# foo + bar -# foo & bar -# -# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#20 -class RuboCop::Cop::Style::OperatorMethodCall < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#27 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#53 - def anonymous_forwarding?(argument); end - - # Checks for an acceptable case of `foo.+(bar).baz`. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#47 - def method_call_with_parenthesized_arg?(argument); end - - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#60 - def wrap_in_parentheses_if_chained(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#23 -RuboCop::Cop::Style::OperatorMethodCall::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#24 -RuboCop::Cop::Style::OperatorMethodCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for options hashes and discourages them if the -# current Ruby version supports keyword arguments. -# -# @example -# -# # bad -# def fry(options = {}) -# temperature = options.fetch(:temperature, 300) -# # ... -# end -# -# # good -# def fry(temperature: 300) -# # ... -# end -# -# source://rubocop//lib/rubocop/cop/style/option_hash.rb#22 -class RuboCop::Cop::Style::OptionHash < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/option_hash.rb#30 - def on_args(node); end - - # source://rubocop//lib/rubocop/cop/style/option_hash.rb#26 - def option_hash(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/option_hash.rb#39 - def allowlist; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/option_hash.rb#48 - def super_used?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/option_hash.rb#43 - def suspicious_name?(arg_name); end -end - -# source://rubocop//lib/rubocop/cop/style/option_hash.rb#23 -RuboCop::Cop::Style::OptionHash::MSG = T.let(T.unsafe(nil), String) - -# Checks for optional arguments to methods -# that do not come at the end of the argument list. -# -# @example -# # bad -# def foo(a = 1, b, c) -# end -# -# # good -# def baz(a, b, c = 1) -# end -# -# def foobar(a = 1, b = 2, c = 3) -# end -# -# source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#24 -class RuboCop::Cop::Style::OptionalArguments < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#27 - def on_def(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#45 - def argument_positions(arguments); end - - # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#33 - def each_misplaced_optional_arg(arguments); end -end - -# source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#25 -RuboCop::Cop::Style::OptionalArguments::MSG = T.let(T.unsafe(nil), String) - -# Checks for places where keyword arguments can be used instead of -# boolean arguments when defining methods. `respond_to_missing?` method is allowed by default. -# These are customizable with `AllowedMethods` option. -# -# @example -# # bad -# def some_method(bar = false) -# puts bar -# end -# -# # bad - common hack before keyword args were introduced -# def some_method(options = {}) -# bar = options.fetch(:bar, false) -# puts bar -# end -# -# # good -# def some_method(bar: false) -# puts bar -# end -# @example AllowedMethods: ['some_method'] -# # good -# def some_method(bar = false) -# puts bar -# end -# -# source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#37 -class RuboCop::Cop::Style::OptionalBooleanParameter < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - - # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#43 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#43 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#56 - def format_message(argument); end -end - -# source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#40 -RuboCop::Cop::Style::OptionalBooleanParameter::MSG = T.let(T.unsafe(nil), String) - -# Checks for potential usage of the `||=` operator. -# -# @example -# # bad -# name = name ? name : 'Bozhidar' -# -# # bad -# name = if name -# name -# else -# 'Bozhidar' -# end -# -# # bad -# unless name -# name = 'Bozhidar' -# end -# -# # bad -# name = 'Bozhidar' unless name -# -# # good - set name to 'Bozhidar', only if it's nil or false -# name ||= 'Bozhidar' -# -# source://rubocop//lib/rubocop/cop/style/or_assignment.rb#29 -class RuboCop::Cop::Style::OrAssignment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#51 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#35 - def ternary_assignment?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#44 - def unless_assignment?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#70 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#80 - def take_variable_and_default_from_ternary(node); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#85 - def take_variable_and_default_from_unless(node); end -end - -# source://rubocop//lib/rubocop/cop/style/or_assignment.rb#32 -RuboCop::Cop::Style::OrAssignment::MSG = T.let(T.unsafe(nil), String) - -# Checks for simple usages of parallel assignment. -# This will only complain when the number of variables -# being assigned matched the number of assigning variables. -# -# @example -# # bad -# a, b, c = 1, 2, 3 -# a, b, c = [1, 2, 3] -# -# # good -# one, two = *foo -# a, b = foo() -# a, b = b, a -# -# a = 1 -# b = 2 -# c = 3 -# -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#25 -class RuboCop::Cop::Style::ParallelAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#124 - def implicit_self_getter?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#31 - def on_masgn(node); end - - private - - # Converts (send nil :something) nodes to (send (:self) :something). - # This makes the sorting algorithm work for expressions such as - # `self.a, self.b = b, a`. - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#117 - def add_self_to_getters(right_elements); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#64 - def allowed_lhs?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#58 - def allowed_masign?(lhs_elements, rhs_elements); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#72 - def allowed_rhs?(node); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#84 - def assignment_corrector(node, rhs, order); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#49 - def autocorrect(corrector, node, lhs, rhs); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#100 - def find_valid_order(left_elements, right_elements); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#183 - def modifier_statement?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#80 - def return_of_method_call?(node); end -end - -# Helper class necessitated by silly design of TSort prior to Ruby 2.1 -# Newer versions have a better API, but that doesn't help us -# -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#128 -class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter - include ::TSort - extend ::RuboCop::AST::NodePattern::Macros - - # @return [AssignmentSorter] a new instance of AssignmentSorter - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#141 - def initialize(assignments); end - - # `lhs` is an assignment method call like `obj.attr=` or `ary[idx]=`. - # Does `rhs` access the same value which is assigned by `lhs`? - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#170 - def accesses?(rhs, lhs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#163 - def dependency?(lhs, rhs); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#139 - def matching_calls(param0, param1, param2); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#149 - def tsort_each_child(assignment); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#145 - def tsort_each_node(*_arg0, **_arg1, &_arg2); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#136 - def uses_var?(param0, param1); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#133 - def var_name(param0 = T.unsafe(nil)); end -end - -# An internal class for correcting parallel assignment -# -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#190 -class RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - include ::RuboCop::Cop::Alignment - - # @return [GenericCorrector] a new instance of GenericCorrector - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#195 - def initialize(node, rhs, modifier, config, new_elements); end - - # Returns the value of attribute config. - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 - def config; end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#203 - def correction; end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#207 - def correction_range; end - - # Returns the value of attribute node. - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 - def node; end - - # Returns the value of attribute rescue_result. - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 - def rescue_result; end - - # Returns the value of attribute rhs. - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 - def rhs; end - - protected - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#213 - def assignment; end - - private - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#233 - def cop_config; end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#229 - def extract_sources(node); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#219 - def source(node); end -end - -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#29 -RuboCop::Cop::Style::ParallelAssignment::MSG = T.let(T.unsafe(nil), String) - -# An internal class for correcting parallel assignment -# guarded by if, unless, while, or until -# -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#275 -class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#276 - def correction; end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#285 - def correction_range; end - - private - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#291 - def modifier_range(node); end -end - -# An internal class for correcting parallel assignment -# protected by rescue -# -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#240 -class RuboCop::Cop::Style::ParallelAssignment::RescueCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#241 - def correction; end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#252 - def correction_range; end - - private - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#263 - def begin_correction(rescue_result); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#258 - def def_correction(rescue_result); end -end - -# Checks for the presence of superfluous parentheses around the -# condition of if/unless/while/until. -# -# `AllowSafeAssignment` option for safe assignment. -# By safe assignment we mean putting parentheses around -# an assignment to indicate "I know I'm using an assignment -# as a condition. It's not a mistake." -# -# @example -# # bad -# x += 1 while (x < 10) -# foo unless (bar || baz) -# -# if (x > 10) -# elsif (x < 3) -# end -# -# # good -# x += 1 while x < 10 -# foo unless bar || baz -# -# if x > 10 -# elsif x < 3 -# end -# @example AllowSafeAssignment: true (default) -# # good -# foo unless (bar = baz) -# @example AllowSafeAssignment: false -# # bad -# foo unless (bar = baz) -# @example AllowInMultilineConditions: false (default) -# # bad -# if (x > 10 && -# y > 10) -# end -# -# # good -# if x > 10 && -# y > 10 -# end -# @example AllowInMultilineConditions: true -# # good -# if (x > 10 && -# y > 10) -# end -# -# source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#56 -class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SafeAssignment - include ::RuboCop::Cop::Parentheses - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#76 - def control_op_condition(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#62 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#68 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#68 - def on_while(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#130 - def allow_multiline_conditions?; end - - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#118 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#111 - def modifier_op?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#124 - def parens_allowed?(node); end - - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#80 - def process_control_op(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#96 - def require_parentheses?(node, condition_body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#103 - def semicolon_separated_expressions?(first_exp, rest_exps); end -end - -# Enforces the consistent usage of `%`-literal delimiters. -# -# Specify the 'default' key to set all preferred delimiters at once. You -# can continue to specify individual preferred delimiters to override the -# default. -# -# @example -# # Style/PercentLiteralDelimiters: -# # PreferredDelimiters: -# # default: '[]' -# # '%i': '()' -# -# # good -# %w[alpha beta] + %i(gamma delta) -# -# # bad -# %W(alpha #{beta}) -# -# # bad -# %I(alpha beta) -# -# source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#26 -class RuboCop::Cop::Style::PercentLiteralDelimiters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#30 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#38 - def on_dstr(node); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#34 - def on_regexp(node); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#38 - def on_str(node); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#43 - def on_sym(node); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#47 - def on_xstr(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#93 - def contains_delimiter?(node, delimiters); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#82 - def contains_preferred_delimiter?(node, type); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#86 - def include_same_character_as_used_for_delimiter?(node, type); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#107 - def matchpairs(begin_delimiter); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#67 - def message(type); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#53 - def on_percent_literal(node); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#74 - def preferred_delimiters_for(type); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#99 - def string_source(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#78 - def uses_preferred_delimiter?(node, type); end -end - -# Checks for usage of the %Q() syntax when %q() would do. -# -# @example EnforcedStyle: lower_case_q (default) -# # The `lower_case_q` style prefers `%q` unless -# # interpolation is needed. -# # bad -# %Q[Mix the foo into the baz.] -# %Q(They all said: 'Hooray!') -# -# # good -# %q[Mix the foo into the baz] -# %q(They all said: 'Hooray!') -# @example EnforcedStyle: upper_case_q -# # The `upper_case_q` style requires the sole use of `%Q`. -# # bad -# %q/Mix the foo into the baz./ -# %q{They all said: 'Hooray!'} -# -# # good -# %Q/Mix the foo into the baz./ -# %Q{They all said: 'Hooray!'} -# -# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#28 -class RuboCop::Cop::Style::PercentQLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#36 - def on_str(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#55 - def correct_literal_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#64 - def corrected(src); end - - # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#60 - def message(_range); end - - # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#42 - def on_percent_literal(node); end -end - -# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#33 -RuboCop::Cop::Style::PercentQLiterals::LOWER_CASE_Q_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#34 -RuboCop::Cop::Style::PercentQLiterals::UPPER_CASE_Q_MSG = T.let(T.unsafe(nil), String) - -# Looks for uses of Perl-style regexp match -# backreferences and their English versions like -# $1, $2, $&, &+, $MATCH, $PREMATCH, etc. -# -# @example -# # bad -# puts $1 -# -# # good -# puts Regexp.last_match(1) -# -# source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#16 -class RuboCop::Cop::Style::PerlBackrefs < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#21 - def on_back_ref(node); end - - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#25 - def on_gvar(node); end - - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#29 - def on_nth_ref(node); end - - private - - # @param node [RuboCop::AST::Node] - # @private - # @return [String] - # - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#99 - def constant_prefix(node); end - - # @param node [RuboCop::AST::Node] - # @private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#38 - def derived_from_braceless_interpolation?(node); end - - # @param node [RuboCop::AST::Node] - # @param preferred_expression [String] - # @private - # @return [String] - # - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#46 - def format_message(node:, preferred_expression:); end - - # @param node [RuboCop::AST::Node] - # @private - # - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#109 - def on_back_ref_or_gvar_or_nth_ref(node); end - - # @param node [RuboCop::AST::Node] - # @private - # @return [String] - # - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#58 - def original_expression_of(node); end - - # @param node [RuboCop::AST::Node] - # @private - # @return [String, nil] - # - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#70 - def preferred_expression_to(node); end - - # @param node [RuboCop::AST::Node] - # @private - # @return [String, nil] - # - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#89 - def preferred_expression_to_node_with_constant_prefix(node); end -end - -# source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#19 -RuboCop::Cop::Style::PerlBackrefs::MESSAGE_FORMAT = T.let(T.unsafe(nil), String) - -# Checks for uses of methods `Hash#has_key?` and -# `Hash#has_value?`, and suggests using `Hash#key?` and `Hash#value?` instead. -# -# It is configurable to enforce the verbose method names, by using the -# `EnforcedStyle: verbose` configuration. -# -# @example EnforcedStyle: short (default) -# # bad -# Hash#has_key? -# Hash#has_value? -# -# # good -# Hash#key? -# Hash#value? -# @example EnforcedStyle: verbose -# # bad -# Hash#key? -# Hash#value? -# -# # good -# Hash#has_key? -# Hash#has_value? -# -# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#33 -class RuboCop::Cop::Style::PreferredHashMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#43 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#43 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#56 - def message(method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#68 - def offending_selector?(method_name); end - - # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#60 - def proper_method_name(method_name); end -end - -# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#37 -RuboCop::Cop::Style::PreferredHashMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#39 -RuboCop::Cop::Style::PreferredHashMethods::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#41 -RuboCop::Cop::Style::PreferredHashMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for uses of Proc.new where Kernel#proc -# would be more appropriate. -# -# @example -# # bad -# p = Proc.new { |n| puts n } -# -# # good -# p = proc { |n| puts n } -# -# source://rubocop//lib/rubocop/cop/style/proc.rb#16 -class RuboCop::Cop::Style::Proc < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/proc.rb#25 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/proc.rb#25 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/proc.rb#22 - def proc_new?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/style/proc.rb#19 -RuboCop::Cop::Style::Proc::MSG = T.let(T.unsafe(nil), String) - -# Checks if the quotes used for quoted symbols match the configured defaults. -# By default uses the same configuration as `Style/StringLiterals`; if that -# cop is not enabled, the default `EnforcedStyle` is `single_quotes`. -# -# String interpolation is always kept in double quotes. -# -# Note: `Lint/SymbolConversion` can be used in parallel to ensure that symbols -# are not quoted that don't need to be. This cop is for configuring the quoting -# style to use for symbols that require quotes. -# -# @example EnforcedStyle: same_as_string_literals (default) / single_quotes -# # bad -# :"abc-def" -# -# # good -# :'abc-def' -# :"#{str}" -# :"a\'b" -# @example EnforcedStyle: double_quotes -# # bad -# :'abc-def' -# -# # good -# :"abc-def" -# :"#{str}" -# :"a\'b" -# -# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#33 -class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::SymbolHelp - include ::RuboCop::Cop::StringLiteralsHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#44 - def on_sym(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#108 - def alternative_style; end - - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#71 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#88 - def correct_quotes(str); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#83 - def hash_colon_key?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#61 - def invalid_double_quotes?(source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#112 - def quoted?(sym_node); end - - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#99 - def style; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#116 - def wrong_quotes?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#41 -RuboCop::Cop::Style::QuotedSymbols::MSG_DOUBLE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#39 -RuboCop::Cop::Style::QuotedSymbols::MSG_SINGLE = T.let(T.unsafe(nil), String) - -# Checks the args passed to `fail` and `raise`. For exploded -# style (default), it recommends passing the exception class and message -# to `raise`, rather than construct an instance of the error. It will -# still allow passing just a message, or the construction of an error -# with more than one argument. -# -# The exploded style works identically, but with the addition that it -# will also suggest constructing error objects when the exception is -# passed multiple arguments. -# -# The exploded style has an `AllowedCompactTypes` configuration -# option that takes an Array of exception name Strings. -# -# @example EnforcedStyle: exploded (default) -# # bad -# raise StandardError.new('message') -# -# # good -# raise StandardError, 'message' -# fail 'message' -# raise MyCustomError -# raise MyCustomError.new(arg1, arg2, arg3) -# raise MyKwArgError.new(key1: val1, key2: val2) -# -# # With `AllowedCompactTypes` set to ['MyWrappedError'] -# raise MyWrappedError.new(obj) -# raise MyWrappedError.new(obj), 'message' -# @example EnforcedStyle: compact -# # bad -# raise StandardError, 'message' -# raise RuntimeError, arg1, arg2, arg3 -# -# # good -# raise StandardError.new('message') -# raise MyCustomError -# raise MyCustomError.new(arg1, arg2, arg3) -# fail 'message' -# -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#47 -class RuboCop::Cop::Style::RaiseArgs < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#56 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#132 - def acceptable_exploded_args?(args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#146 - def allowed_non_exploded_type?(arg); end - - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#95 - def check_compact(node); end - - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#111 - def check_exploded(node); end - - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#69 - def correction_compact_to_exploded(node); end - - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#81 - def correction_exploded_to_compact(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#152 - def requires_parens?(parent); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#128 - def use_new_method?(first_arg); end -end - -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#52 -RuboCop::Cop::Style::RaiseArgs::COMPACT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#51 -RuboCop::Cop::Style::RaiseArgs::EXPLODED_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#54 -RuboCop::Cop::Style::RaiseArgs::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the use of randomly generated numbers, -# added/subtracted with integer literals, as well as those with -# Integer#succ and Integer#pred methods. Prefer using ranges instead, -# as it clearly states the intentions. -# -# @example -# # bad -# rand(6) + 1 -# 1 + rand(6) -# rand(6) - 1 -# 1 - rand(6) -# rand(6).succ -# rand(6).pred -# Random.rand(6) + 1 -# Kernel.rand(6) + 1 -# rand(0..5) + 1 -# -# # good -# rand(1..6) -# rand(1...7) -# -# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#26 -class RuboCop::Cop::Style::RandomWithOffset < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#33 - def integer_op_rand?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#63 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#54 - def rand_modified?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#43 - def rand_op_integer?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#73 - def random_call(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#147 - def to_int(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#78 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#135 - def boundaries_from_random_node(random_node); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#88 - def corrected_integer_op_rand(node); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#118 - def corrected_rand_modified(node); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#103 - def corrected_rand_op_integer(node); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#131 - def prefix_from_prefix_node(node); end -end - -# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#29 -RuboCop::Cop::Style::RandomWithOffset::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#30 -RuboCop::Cop::Style::RandomWithOffset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for a redundant argument passed to certain methods. -# -# NOTE: This cop is limited to methods with single parameter. -# -# Method names and their redundant arguments can be configured like this: -# -# [source,yaml] -# ---- -# Methods: -# join: '' -# sum: 0 -# split: ' ' -# chomp: "\n" -# chomp!: "\n" -# foo: 2 -# ---- -# -# @example -# # bad -# array.join('') -# [1, 2, 3].join("") -# array.sum(0) -# exit(true) -# exit!(false) -# string.split(" ") -# "first\nsecond".split(" ") -# string.chomp("\n") -# string.chomp!("\n") -# A.foo(2) -# -# # good -# array.join -# [1, 2, 3].join -# array.sum -# exit -# exit! -# string.split -# "first second".split -# string.chomp -# string.chomp! -# A.foo -# -# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#57 -class RuboCop::Cop::Style::RedundantArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#64 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#64 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#108 - def argument_matched?(target_argument, redundant_argument); end - - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#100 - def argument_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#120 - def exclude_cntrl_character?(target_argument, redundant_argument); end - - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#93 - def redundant_arg_for_method(method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#80 - def redundant_argument?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#61 -RuboCop::Cop::Style::RedundantArgument::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#62 -RuboCop::Cop::Style::RedundantArgument::NO_RECEIVER_METHODS = T.let(T.unsafe(nil), Array) - -# Checks for the instantiation of array using redundant `Array` constructor. -# Autocorrect replaces to array literal which is the simplest and fastest. -# -# @example -# -# # bad -# Array.new([]) -# Array[] -# Array([]) -# Array.new(['foo', 'foo', 'foo']) -# Array['foo', 'foo', 'foo'] -# Array(['foo', 'foo', 'foo']) -# -# # good -# [] -# ['foo', 'foo', 'foo'] -# Array.new(3, 'foo') -# Array.new(3) { 'foo' } -# -# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#25 -class RuboCop::Cop::Style::RedundantArrayConstructor < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#47 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#33 - def redundant_array_constructor(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#69 - def register_offense(range, node, replacement); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#28 -RuboCop::Cop::Style::RedundantArrayConstructor::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#30 -RuboCop::Cop::Style::RedundantArrayConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for redundant assignment before returning. -# -# @example -# # bad -# def test -# x = foo -# x -# end -# -# # bad -# def test -# if x -# z = foo -# z -# elsif y -# z = bar -# z -# end -# end -# -# # good -# def test -# foo -# end -# -# # good -# def test -# if x -# foo -# elsif y -# bar -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#40 -class RuboCop::Cop::Style::RedundantAssignment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#50 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#50 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#46 - def redundant_assignment?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#99 - def check_begin_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#58 - def check_branch(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#79 - def check_case_match_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#74 - def check_case_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#95 - def check_ensure_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#84 - def check_if_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#91 - def check_rescue_node(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#43 -RuboCop::Cop::Style::RedundantAssignment::MSG = T.let(T.unsafe(nil), String) - -# Checks for redundant `begin` blocks. -# -# Currently it checks for code like this: -# -# @example -# -# # bad -# def redundant -# begin -# ala -# bala -# rescue StandardError => e -# something -# end -# end -# -# # good -# def preferred -# ala -# bala -# rescue StandardError => e -# something -# end -# -# # bad -# begin -# do_something -# end -# -# # good -# do_something -# -# # bad -# # When using Ruby 2.5 or later. -# do_something do -# begin -# something -# rescue => ex -# anything -# end -# end -# -# # good -# # In Ruby 2.5 or later, you can omit `begin` in `do-end` block. -# do_something do -# something -# rescue => ex -# anything -# end -# -# # good -# # Stabby lambdas don't support implicit `begin` in `do-end` blocks. -# -> do -# begin -# foo -# rescue Bar -# baz -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#65 -class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#72 - def offensive_kwbegins(param0); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#84 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#76 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#76 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#95 - def on_kwbegin(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#84 - def on_numblock(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#103 - def allowable_kwbegin?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#177 - def begin_block_has_multiline_statements?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#169 - def condition_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#181 - def contain_rescue_or_ensure?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#162 - def correct_modifier_form_after_multiline_begin_block(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173 - def empty_begin?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#110 - def register_offense(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#139 - def remove_begin(corrector, offense_range, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#127 - def replace_begin_with_statement(corrector, offense_range, node); end - - # Restore comments that occur between "begin" and "first_child". - # These comments will be moved to above the assignment line. - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#149 - def restore_removed_comments(corrector, offense_range, node, first_child); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#156 - def use_modifier_form_after_multiline_begin_block?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#194 - def valid_begin_assignment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#187 - def valid_context_using_only_begin?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#69 -RuboCop::Cop::Style::RedundantBegin::MSG = T.let(T.unsafe(nil), String) - -# Checks for usage of the %W() syntax when %w() would do. -# -# @example -# # bad -# %W(cat dog pig) -# %W[door wall floor] -# -# # good -# %w/swim run bike/ -# %w[shirt pants shoes] -# %W(apple #{fruit} grape) -# -# source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#17 -class RuboCop::Cop::Style::RedundantCapitalW < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#23 - def on_array(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#29 - def on_percent_literal(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#38 - def requires_interpolation?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#21 -RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) - -# Checks for unnecessary conditional expressions. -# -# @example -# # bad -# a = b ? b : c -# -# # good -# a = b || c -# @example -# # bad -# if b -# b -# else -# c -# end -# -# # good -# b || c -# -# # good -# if b -# b -# elsif cond -# c -# end -# -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#33 -class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#43 - def on_if(node); end - - private - - # If the argument is using an operator, it is an invalid syntax. - # e.g. `foo || *bar`, `foo || **bar`, and `foo || &bar`. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#167 - def argument_with_operator?(argument); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#142 - def asgn_type?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#132 - def branches_have_assignment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#146 - def branches_have_method?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#240 - def correct_ternary(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#187 - def else_source(else_branch, arithmetic_operation); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#213 - def else_source_if_has_assignment(else_branch); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#203 - def else_source_if_has_method(else_branch); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#175 - def if_source(if_branch, arithmetic_operation); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#223 - def make_ternary_form(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#64 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#79 - def offense?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#72 - def range_of_offense(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#88 - def redundant_condition?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#255 - def require_braces?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#248 - def require_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#161 - def same_method?(if_branch, else_branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#155 - def single_argument_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#104 - def synonymous_condition_and_branch?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#259 - def use_arithmetic_operation?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#100 - def use_hash_key_access?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#96 - def use_hash_key_assignment?(else_branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#92 - def use_if_branch?(else_branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#263 - def without_argument_parentheses_method?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#39 -RuboCop::Cop::Style::RedundantCondition::ARGUMENT_WITH_OPERATOR_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#37 -RuboCop::Cop::Style::RedundantCondition::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#38 -RuboCop::Cop::Style::RedundantCondition::REDUNDANT_CONDITION = T.let(T.unsafe(nil), String) - -# Checks for redundant returning of true/false in conditionals. -# -# @example -# # bad -# x == y ? true : false -# -# # bad -# if x == y -# true -# else -# false -# end -# -# # good -# x == y -# -# # bad -# x == y ? false : true -# -# # good -# x != y -# -# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#27 -class RuboCop::Cop::Style::RedundantConditional < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#36 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#56 - def redundant_condition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#61 - def redundant_condition_inverted?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#78 - def indented_else_node(expression, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#48 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#65 - def offense?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#71 - def replacement_condition(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#32 -RuboCop::Cop::Style::RedundantConditional::COMPARISON_OPERATOR_MATCHER = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#34 -RuboCop::Cop::Style::RedundantConditional::MSG = T.let(T.unsafe(nil), String) - -# Avoid redundant `::` prefix on constant. -# -# How Ruby searches constant is a bit complicated, and it can often be difficult to -# understand from the code whether the `::` is intended or not. Where `Module.nesting` -# is empty, there is no need to prepend `::`, so it would be nice to consistently -# avoid such meaningless `::` prefix to avoid confusion. -# -# NOTE: This cop is disabled if `Lint/ConstantResolution` cop is enabled to prevent -# conflicting rules. Because it respects user configurations that want to enable -# `Lint/ConstantResolution` cop which is disabled by default. -# -# @example -# # bad -# ::Const -# -# # good -# Const -# -# # bad -# class << self -# ::Const -# end -# -# # good -# class << self -# Const -# end -# -# # good -# class A -# ::Const -# end -# -# # good -# module A -# ::Const -# end -# -# source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#43 -class RuboCop::Cop::Style::RedundantConstantBase < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#48 - def on_cbase(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#67 - def bad?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#63 - def lint_constant_resolution_config; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#59 - def lint_constant_resolution_cop_enabled?; end - - # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#71 - def module_nesting_ancestors_of(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#77 - def used_in_super_class_part?(node, class_node:); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#46 -RuboCop::Cop::Style::RedundantConstantBase::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses a redundant current directory in path. -# -# @example -# -# # bad -# require_relative './path/to/feature' -# -# # good -# require_relative 'path/to/feature' -# -# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#16 -class RuboCop::Cop::Style::RedundantCurrentDirectoryInPath < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#24 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#22 -RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::CURRENT_DIRECTORY_PATH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#20 -RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#21 -RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for redundant uses of double splat hash braces. -# -# @example -# -# # bad -# do_something(**{foo: bar, baz: qux}) -# -# # good -# do_something(foo: bar, baz: qux) -# -# # bad -# do_something(**{foo: bar, baz: qux}.merge(options)) -# -# # good -# do_something(foo: bar, baz: qux, **options) -# -# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#22 -class RuboCop::Cop::Style::RedundantDoubleSplatHashBraces < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#29 - def on_hash(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#45 - def allowed_double_splat_receiver?(kwsplat); end - - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#55 - def autocorrect(corrector, node, kwsplat); end - - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#89 - def autocorrect_merge_methods(corrector, merge_methods, kwsplat); end - - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#85 - def closing_brace(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#111 - def convert_to_new_arguments(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#107 - def extract_send_methods(kwsplat); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#123 - def mergeable?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#81 - def opening_brace(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#100 - def range_of_merge_methods(merge_methods); end - - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#66 - def root_receiver(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#75 - def select_merge_method_nodes(kwsplat); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#26 -RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MERGE_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#25 -RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MSG = T.let(T.unsafe(nil), String) - -# Checks for redundant `each`. -# -# @example -# -# # bad -# array.each.each { |v| do_something(v) } -# -# # good -# array.each { |v| do_something(v) } -# -# # bad -# array.each.each_with_index { |v, i| do_something(v, i) } -# -# # good -# array.each.with_index { |v, i| do_something(v, i) } -# array.each_with_index { |v, i| do_something(v, i) } -# -# # bad -# array.each.each_with_object { |v, o| do_something(v, o) } -# -# # good -# array.each.with_object { |v, o| do_something(v, o) } -# array.each_with_object { |v, o| do_something(v, o) } -# -# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#34 -class RuboCop::Cop::Style::RedundantEach < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#43 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#43 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#96 - def message(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#86 - def range(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#64 - def redundant_each_method(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#107 - def remove_redundant_each(corrector, range, redundant_node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#37 -RuboCop::Cop::Style::RedundantEach::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#38 -RuboCop::Cop::Style::RedundantEach::MSG_WITH_INDEX = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#39 -RuboCop::Cop::Style::RedundantEach::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#41 -RuboCop::Cop::Style::RedundantEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for RuntimeError as the argument of raise/fail. -# -# @example -# # bad -# raise RuntimeError, 'message' -# raise RuntimeError.new('message') -# -# # good -# raise 'message' -# -# # bad - message is not a string -# raise RuntimeError, Object.new -# raise RuntimeError.new(Object.new) -# -# # good -# raise Object.new.to_s -# -# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#23 -class RuboCop::Cop::Style::RedundantException < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#79 - def compact?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#74 - def exploded?(param0 = T.unsafe(nil)); end - - # Switch `raise RuntimeError, 'message'` to `raise 'message'`, and - # `raise RuntimeError.new('message')` to `raise 'message'`. - # - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#33 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#57 - def fix_compact(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#39 - def fix_exploded(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#65 - def replaced_compact(message); end - - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#47 - def replaced_exploded(node, command, message); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#53 - def string_message?(message); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#26 -RuboCop::Cop::Style::RedundantException::MSG_1 = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#27 -RuboCop::Cop::Style::RedundantException::MSG_2 = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#29 -RuboCop::Cop::Style::RedundantException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where `fetch(key) { value }` can be replaced by `fetch(key, value)`. -# -# In such cases `fetch(key, value)` method is faster than `fetch(key) { value }`. -# -# NOTE: The block string `'value'` in `hash.fetch(:key) { 'value' }` is detected -# but not when disabled. -# -# @example SafeForConstants: false (default) -# # bad -# hash.fetch(:key) { 5 } -# hash.fetch(:key) { true } -# hash.fetch(:key) { nil } -# array.fetch(5) { :value } -# ENV.fetch(:key) { 'value' } -# -# # good -# hash.fetch(:key, 5) -# hash.fetch(:key, true) -# hash.fetch(:key, nil) -# array.fetch(5, :value) -# ENV.fetch(:key, 'value') -# @example SafeForConstants: true -# # bad -# ENV.fetch(:key) { VALUE } -# -# # good -# ENV.fetch(:key, VALUE) -# -# source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#40 -class RuboCop::Cop::Style::RedundantFetchBlock < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#55 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#89 - def rails_cache?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#48 - def redundant_fetch_block_candidate?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#74 - def basic_literal?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#104 - def build_bad_method(send, body); end - - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#97 - def build_good_method(send, body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#111 - def check_for_constant?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#115 - def check_for_string?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#78 - def const_type?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#93 - def fetch_range(send, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#82 - def should_not_check?(send, body); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#45 -RuboCop::Cop::Style::RedundantFetchBlock::MSG = T.let(T.unsafe(nil), String) - -# Checks for the presence of superfluous `.rb` extension in -# the filename provided to `require` and `require_relative`. -# -# Note: If the extension is omitted, Ruby tries adding '.rb', '.so', -# and so on to the name until found. If the file named cannot be found, -# a `LoadError` will be raised. -# There is an edge case where `foo.so` file is loaded instead of a `LoadError` -# if `foo.so` file exists when `require 'foo.rb'` will be changed to `require 'foo'`, -# but that seems harmless. -# -# @example -# # bad -# require 'foo.rb' -# require_relative '../foo.rb' -# -# # good -# require 'foo' -# require 'foo.so' -# require_relative '../foo' -# require_relative '../foo.so' -# -# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#27 -class RuboCop::Cop::Style::RedundantFileExtensionInRequire < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#39 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#35 - def require_call?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#53 - def extension_range(name_node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#31 -RuboCop::Cop::Style::RedundantFileExtensionInRequire::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#32 -RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies usages of `any?`, `empty?` or `none?` predicate methods -# chained to `select`/`filter`/`find_all` and change them to use predicate method instead. -# -# @example -# # bad -# arr.select { |x| x > 1 }.any? -# -# # good -# arr.any? { |x| x > 1 } -# -# # bad -# arr.select { |x| x > 1 }.empty? -# arr.select { |x| x > 1 }.none? -# -# # good -# arr.none? { |x| x > 1 } -# -# # good -# relation.select(:name).any? -# arr.select { |x| x > 1 }.any?(&:odd?) -# @example AllCops:ActiveSupportExtensionsEnabled: false (default) -# # good -# arr.select { |x| x > 1 }.many? -# -# # good -# arr.select { |x| x > 1 }.present? -# @example AllCops:ActiveSupportExtensionsEnabled: true -# # bad -# arr.select { |x| x > 1 }.many? -# -# # good -# arr.many? { |x| x > 1 } -# -# # bad -# arr.select { |x| x > 1 }.present? -# -# # good -# arr.any? { |x| x > 1 } -# -# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#53 -class RuboCop::Cop::Style::RedundantFilterChain < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#81 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#81 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#62 - def select_predicate?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#108 - def offense_range(select_node, predicate_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#112 - def predicate_range(predicate_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#94 - def register_offense(select_node, predicate_node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#56 -RuboCop::Cop::Style::RedundantFilterChain::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#58 -RuboCop::Cop::Style::RedundantFilterChain::RAILS_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#71 -RuboCop::Cop::Style::RedundantFilterChain::REPLACEMENT_METHODS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#59 -RuboCop::Cop::Style::RedundantFilterChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Check for uses of `Object#freeze` on immutable objects. -# -# NOTE: Regexp and Range literals are frozen objects since Ruby 3.0. -# -# NOTE: From Ruby 3.0, this cop allows explicit freezing of interpolated -# string literals when `# frozen-string-literal: true` is used. -# -# @example -# # bad -# CONST = 1.freeze -# -# # good -# CONST = 1 -# -# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#19 -class RuboCop::Cop::Style::RedundantFreeze < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#26 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#57 - def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#39 - def immutable_literal?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#48 - def strip_parenthesis(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#23 -RuboCop::Cop::Style::RedundantFreeze::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#24 -RuboCop::Cop::Style::RedundantFreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for redundant heredoc delimiter quotes. -# -# @example -# -# # bad -# do_something(<<~'EOS') -# no string interpolation style text -# EOS -# -# # good -# do_something(<<~EOS) -# no string interpolation style text -# EOS -# -# do_something(<<~'EOS') -# #{string_interpolation_style_text_not_evaluated} -# EOS -# -# do_something(<<~'EOS') -# Preserve \ -# newlines -# EOS -# -# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#29 -class RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#36 - def on_heredoc(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#48 - def need_heredoc_delimiter_quotes?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#33 -RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#34 -RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes::STRING_INTERPOLATION_OR_ESCAPED_CHARACTER_PATTERN = T.let(T.unsafe(nil), Regexp) - -# Checks for `initialize` methods that are redundant. -# -# An initializer is redundant if it does not do anything, or if it only -# calls `super` with the same arguments given to it. If the initializer takes -# an argument that accepts multiple values (`restarg`, `kwrestarg`, etc.) it -# will not register an offense, because it allows the initializer to take a different -# number of arguments as its superclass potentially does. -# -# NOTE: If an initializer argument has a default value, RuboCop assumes it -# to *not* be redundant. -# -# NOTE: Empty initializers are registered as offenses, but it is possible -# to purposely create an empty `initialize` method to override a superclass's -# initializer. -# -# @example -# # bad -# def initialize -# end -# -# # bad -# def initialize -# super -# end -# -# # bad -# def initialize(a, b) -# super -# end -# -# # bad -# def initialize(a, b) -# super(a, b) -# end -# -# # good -# def initialize -# do_something -# end -# -# # good -# def initialize -# do_something -# super -# end -# -# # good (different number of parameters) -# def initialize(a, b) -# super(a) -# end -# -# # good (default value) -# def initialize(a, b = 5) -# super -# end -# -# # good (default value) -# def initialize(a, b: 5) -# super -# end -# -# # good (changes the parameter requirements) -# def initialize(*) -# end -# -# # good (changes the parameter requirements) -# def initialize(**) -# end -# -# # good (changes the parameter requirements) -# def initialize(...) -# end -# @example AllowComments: true (default) -# -# # good -# def initialize -# # Overriding to negate superclass `initialize` method. -# end -# @example AllowComments: false -# -# # bad -# def initialize -# # Overriding to negate superclass `initialize` method. -# end -# -# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#97 -class RuboCop::Cop::Style::RedundantInitialize < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#106 - def initialize_forwards?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#110 - def on_def(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#134 - def acceptable?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#142 - def allow_comments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#138 - def forwards?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#128 - def register_offense(node, message); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#148 - def same_args?(super_node, args); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#102 -RuboCop::Cop::Style::RedundantInitialize::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#103 -RuboCop::Cop::Style::RedundantInitialize::MSG_EMPTY = T.let(T.unsafe(nil), String) - -# Checks for strings that are just an interpolated expression. -# -# @example -# -# # bad -# "#{@var}" -# -# # good -# @var.to_s -# -# # good if @var is already a String -# @var -# -# source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#39 -class RuboCop::Cop::Style::RedundantInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#49 - def on_dstr(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#122 - def autocorrect_other(corrector, embedded_node, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#105 - def autocorrect_single_variable_interpolation(corrector, embedded_node, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#99 - def autocorrect_variable_interpolation(corrector, embedded_node, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#95 - def embedded_in_percent_array?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#91 - def implicit_concatenation?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#83 - def interpolation?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#132 - def require_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#67 - def single_interpolation?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#74 - def single_variable_interpolation?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#87 - def variable_interpolation?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#45 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#43 -RuboCop::Cop::Style::RedundantInterpolation::MSG = T.let(T.unsafe(nil), String) - -# Check for redundant line continuation. -# -# This cop marks a line continuation as redundant if removing the backslash -# does not result in a syntax error. -# However, a backslash at the end of a comment or -# for string concatenation is not redundant and is not considered an offense. -# -# @example -# # bad -# foo. \ -# bar -# foo \ -# &.bar \ -# .baz -# -# # good -# foo. -# bar -# foo -# &.bar -# .baz -# -# # bad -# [foo, \ -# bar] -# {foo: \ -# bar} -# -# # good -# [foo, -# bar] -# {foo: -# bar} -# -# # bad -# foo(bar, \ -# baz) -# -# # good -# foo(bar, -# baz) -# -# # also good - backslash in string concatenation is not redundant -# foo('bar' \ -# 'baz') -# -# # also good - backslash at the end of a comment is not redundant -# foo(bar, # \ -# baz) -# -# # also good - backslash at the line following the newline begins with a + or -, -# # it is not redundant -# 1 \ -# + 2 \ -# - 3 -# -# # also good - backslash with newline between the method name and its arguments, -# # it is not redundant. -# some_method \ -# (argument) -# -# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#67 -class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#79 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#183 - def argument_is_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#147 - def argument_newline?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#102 - def ends_with_backslash_without_comment?(source_line); end - - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#163 - def find_node_for_line(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#132 - def inside_string_literal?(range, token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#110 - def inside_string_literal_or_method_with_argument?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#118 - def leading_dot_method_chain_with_blank_line?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#190 - def method_call_with_arguments?(node); end - - # A method call without parentheses such as the following cannot remove `\`: - # - # do_something \ - # argument - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#140 - def method_with_argument?(current_token, next_token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#124 - def redundant_line_continuation?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#94 - def require_line_continuation?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#169 - def same_line?(node, line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#194 - def start_with_arithmetic_operator?(source_line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#106 - def string_concatenation?(source_line); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#72 -RuboCop::Cop::Style::RedundantLineContinuation::ALLOWED_STRING_TOKENS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#77 -RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TAKING_FLOW_TOKEN_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#73 -RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#71 -RuboCop::Cop::Style::RedundantLineContinuation::MSG = T.let(T.unsafe(nil), String) - -# Checks for redundant parentheses. -# -# @example -# -# # bad -# (x) if ((y.z).nil?) -# -# # good -# x if y.z.nil? -# -# source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#16 -class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Parentheses - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#32 - def allowed_pin_operator?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#35 - def arg_in_call_with_block?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#269 - def first_send_argument?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#274 - def first_super_argument?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#279 - def first_yield_argument?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#175 - def interpolation?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#26 - def method_node_and_args(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#37 - def on_begin(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#29 - def rescue?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#23 - def square_brackets?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#177 - def allow_in_multiline_conditions?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#68 - def allowed_ancestor?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#60 - def allowed_expression?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#73 - def allowed_method_call?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#78 - def allowed_multiple_expression?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#87 - def allowed_ternary?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#283 - def call_chain_starts_with_int?(begin_node, send_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#136 - def check(begin_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#184 - def check_send(begin_node, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#193 - def check_unary(begin_node, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#217 - def disallowed_literal?(begin_node, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#114 - def empty_parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#147 - def find_offense_message(begin_node, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#119 - def first_arg_begins_with_hash_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#258 - def first_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#53 - def ignore_syntax?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#213 - def keyword_ancestor?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#232 - def keyword_with_redundant_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#100 - def like_method_argument_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#245 - def method_call_with_redundant_parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#128 - def method_chain_begins_with_hash_literal(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#107 - def multiline_control_flow_statements?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#203 - def offense(node, msg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#254 - def only_begin_arg?(args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#45 - def parens_allowed?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#221 - def raised_to_power_negative_numeric?(begin_node, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#209 - def suspect_unary?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#93 - def ternary_parentheses_required?; end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#20 -RuboCop::Cop::Style::RedundantParentheses::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) - -# Checks for usage of the %q/%Q syntax when '' or "" would do. -# -# @example -# -# # bad -# name = %q(Bruce Wayne) -# time = %q(8 o'clock) -# question = %q("What did you say?") -# -# # good -# name = 'Bruce Wayne' -# time = "8 o'clock" -# question = '"What did you say?"' -# -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#20 -class RuboCop::Cop::Style::RedundantPercentQ < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#34 - def on_dstr(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#40 - def on_str(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#99 - def acceptable_capital_q?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#91 - def acceptable_q?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#67 - def allowed_percent_q?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#51 - def check(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#63 - def interpolated_quotes?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#72 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#87 - def start_with_percent_q_variant?(string); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#82 - def string_literal?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#25 -RuboCop::Cop::Style::RedundantPercentQ::DYNAMIC_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#28 -RuboCop::Cop::Style::RedundantPercentQ::EMPTY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#32 -RuboCop::Cop::Style::RedundantPercentQ::ESCAPED_NON_BACKSLASH = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#23 -RuboCop::Cop::Style::RedundantPercentQ::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#30 -RuboCop::Cop::Style::RedundantPercentQ::PERCENT_CAPITAL_Q = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#29 -RuboCop::Cop::Style::RedundantPercentQ::PERCENT_Q = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#27 -RuboCop::Cop::Style::RedundantPercentQ::QUOTE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#26 -RuboCop::Cop::Style::RedundantPercentQ::SINGLE_QUOTE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#31 -RuboCop::Cop::Style::RedundantPercentQ::STRING_INTERPOLATION_REGEXP = T.let(T.unsafe(nil), Regexp) - -# Identifies places where argument can be replaced from -# a deterministic regexp to a string. -# -# @example -# # bad -# 'foo'.byteindex(/f/) -# 'foo'.byterindex(/f/) -# 'foo'.gsub(/f/, 'x') -# 'foo'.gsub!(/f/, 'x') -# 'foo'.partition(/f/) -# 'foo'.rpartition(/f/) -# 'foo'.scan(/f/) -# 'foo'.split(/f/) -# 'foo'.start_with?(/f/) -# 'foo'.sub(/f/, 'x') -# 'foo'.sub!(/f/, 'x') -# -# # good -# 'foo'.byteindex('f') -# 'foo'.byterindex('f') -# 'foo'.gsub('f', 'x') -# 'foo'.gsub!('f', 'x') -# 'foo'.partition('f') -# 'foo'.rpartition('f') -# 'foo'.scan('f') -# 'foo'.split('f') -# 'foo'.start_with?('f') -# 'foo'.sub('f', 'x') -# 'foo'.sub!('f', 'x') -# -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#35 -class RuboCop::Cop::Style::RedundantRegexpArgument < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#64 - def determinist_regexp?(regexp_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#68 - def preferred_argument(regexp_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#81 - def replacement(regexp_node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#42 -RuboCop::Cop::Style::RedundantRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#38 -RuboCop::Cop::Style::RedundantRegexpArgument::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 -RuboCop::Cop::Style::RedundantRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 -RuboCop::Cop::Style::RedundantRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) - -# Checks for unnecessary single-element Regexp character classes. -# -# @example -# -# # bad -# r = /[x]/ -# -# # good -# r = /x/ -# -# # bad -# r = /[\s]/ -# -# # good -# r = /\s/ -# -# # bad -# r = %r{/[b]} -# -# # good -# r = %r{/b} -# -# # good -# r = /[ab]/ -# -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#30 -class RuboCop::Cop::Style::RedundantRegexpCharacterClass < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#37 - def on_regexp(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#101 - def backslash_b?(elem); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#53 - def each_redundant_character_class(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#61 - def each_single_element_character_class(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#83 - def multiple_codepoints?(expression); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#107 - def octal_requiring_char_class?(elem); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#72 - def redundant_single_element_character_class?(node, char_class); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#113 - def requires_escape_outside_char_class?(elem); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#95 - def whitespace_in_free_space_mode?(node, elem); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#87 - def without_character_class(loc); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#34 -RuboCop::Cop::Style::RedundantRegexpCharacterClass::MSG_REDUNDANT_CHARACTER_CLASS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#33 -RuboCop::Cop::Style::RedundantRegexpCharacterClass::REQUIRES_ESCAPE_OUTSIDE_CHAR_CLASS_CHARS = T.let(T.unsafe(nil), Array) - -# Checks for the instantiation of regexp using redundant `Regexp.new` or `Regexp.compile`. -# Autocorrect replaces to regexp literal which is the simplest and fastest. -# -# @example -# -# # bad -# Regexp.new(/regexp/) -# Regexp.compile(/regexp/) -# -# # good -# /regexp/ -# Regexp.new('regexp') -# Regexp.compile('regexp') -# -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#20 -class RuboCop::Cop::Style::RedundantRegexpConstructor < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#33 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#27 - def redundant_regexp_constructor(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#23 -RuboCop::Cop::Style::RedundantRegexpConstructor::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#24 -RuboCop::Cop::Style::RedundantRegexpConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for redundant escapes inside Regexp literals. -# -# @example -# # bad -# %r{foo\/bar} -# -# # good -# %r{foo/bar} -# -# # good -# /foo\/bar/ -# -# # good -# %r/foo\/bar/ -# -# # good -# %r!foo\!bar! -# -# # bad -# /a\-b/ -# -# # good -# /a-b/ -# -# # bad -# /[\+\-]\d/ -# -# # good -# /[+\-]\d/ -# -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#35 -class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#45 - def on_regexp(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#60 - def allowed_escape?(node, char, index, within_character_class); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#76 - def char_class_begins_or_ends_with_escaped_hyphen?(node, index); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#92 - def delimiter?(node, char); end - - # Please remove this `else` branch when support for regexp_parser 1.8 will be dropped. - # It's for compatibility with regexp_parser 1.8 and will never be maintained. - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#99 - def each_escape(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#126 - def escape_range_at_index(node, index); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#41 -RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_ALWAYS_ESCAPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#43 -RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_OUTSIDE_CHAR_CLASS_METACHAR_ESCAPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#42 -RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_WITHIN_CHAR_CLASS_METACHAR_ESCAPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#39 -RuboCop::Cop::Style::RedundantRegexpEscape::MSG_REDUNDANT_ESCAPE = T.let(T.unsafe(nil), String) - -# Checks for redundant `return` expressions. -# -# @example -# # These bad cases should be extended to handle methods whose body is -# # if/else or a case expression with a default branch. -# -# # bad -# def test -# return something -# end -# -# # bad -# def test -# one -# two -# three -# return something -# end -# -# # bad -# def test -# return something if something_else -# end -# -# # good -# def test -# something if something_else -# end -# -# # good -# def test -# if x -# elsif y -# else -# end -# end -# @example AllowMultipleReturnValues: false (default) -# # bad -# def test -# return x, y -# end -# @example AllowMultipleReturnValues: true -# # good -# def test -# return x, y -# end -# -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#55 -class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#69 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#69 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#63 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#104 - def add_braces(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#99 - def add_brackets(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#175 - def allow_multiple_return_values?; end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#170 - def check_begin_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#110 - def check_branch(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#144 - def check_case_match_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#139 - def check_case_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#165 - def check_ensure_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#149 - def check_if_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#161 - def check_resbody_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#156 - def check_rescue_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#127 - def check_return_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#80 - def correct_with_arguments(return_node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#76 - def correct_without_arguments(return_node, corrector); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#95 - def hash_without_braces?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#179 - def message(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#59 -RuboCop::Cop::Style::RedundantReturn::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#60 -RuboCop::Cop::Style::RedundantReturn::MULTI_RETURN_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#61 -RuboCop::Cop::Style::RedundantReturn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for redundant uses of `self`. -# -# The usage of `self` is only needed when: -# -# * Sending a message to same object with zero arguments in -# presence of a method name clash with an argument or a local -# variable. -# -# * Calling an attribute writer to prevent a local variable assignment. -# -# Note, with using explicit self you can only send messages with public or -# protected scope, you cannot send private messages this way. -# -# Note we allow uses of `self` with operators because it would be awkward -# otherwise. Also allows the use of `self.it` without arguments in blocks, -# as in `0.times { self.it }`, following `Lint/ItWithoutArgumentsInBlock` cop. -# -# @example -# -# # bad -# def foo(bar) -# self.baz -# end -# -# # good -# def foo(bar) -# self.bar # Resolves name clash with the argument. -# end -# -# def foo -# bar = 1 -# self.bar # Resolves name clash with the local variable. -# end -# -# def foo -# %w[x y z].select do |bar| -# self.bar == bar # Resolves name clash with argument of the block. -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#45 -class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # @return [RedundantSelf] a new instance of RedundantSelf - # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#60 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - # Assignment of self.x - # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#68 - def on_and_asgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#86 - def on_args(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#120 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#90 - def on_blockarg(node); end - - # Using self.x to distinguish from local variable x - # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#81 - def on_def(node); end - - # Using self.x to distinguish from local variable x - # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#81 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#104 - def on_in_pattern(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#99 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#94 - def on_masgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#120 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#74 - def on_op_asgn(node); end - - # Assignment of self.x - # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#68 - def on_or_asgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#108 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 - def on_while(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#196 - def add_lhs_to_local_variables_scopes(rhs, lhs); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#204 - def add_masgn_lhs_variables(rhs, lhs); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#210 - def add_match_var_scopes(in_pattern_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#144 - def add_scope(node, local_variables = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#190 - def allow_self(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#150 - def allowed_send_node?(node); end - - # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: - # - # $ ruby -e '0.times { begin; it; end }' - # -e:1: warning: `it` calls without arguments will refer to the first block param in - # Ruby 3.4; use it() or self.it - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#165 - def it_method_in_block?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#181 - def on_argument(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#173 - def regular_method_call?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#56 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#49 -RuboCop::Cop::Style::RedundantSelf::KERNEL_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#50 -RuboCop::Cop::Style::RedundantSelf::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#48 -RuboCop::Cop::Style::RedundantSelf::MSG = T.let(T.unsafe(nil), String) - -# Checks for places where redundant assignments are made for in place -# modification methods. -# -# @example -# # bad -# args = args.concat(ary) -# hash = hash.merge!(other) -# -# # good -# args.concat(foo) -# args += foo -# hash.merge!(other) -# -# # bad -# self.foo = foo.concat(ary) -# -# # good -# foo.concat(ary) -# self.foo += ary -# -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#31 -class RuboCop::Cop::Style::RedundantSelfAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#69 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#96 - def redundant_nonself_assignment?(param0 = T.unsafe(nil), param1, param2); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#86 - def redundant_self_assignment?(param0 = T.unsafe(nil), param1); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#112 - def correction_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#81 - def method_returning_self?(method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#105 - def redundant_assignment?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#45 -RuboCop::Cop::Style::RedundantSelfAssignment::ASSIGNMENT_TYPE_TO_RECEIVER_TYPE = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#38 -RuboCop::Cop::Style::RedundantSelfAssignment::METHODS_RETURNING_SELF = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#35 -RuboCop::Cop::Style::RedundantSelfAssignment::MSG = T.let(T.unsafe(nil), String) - -# Checks for places where conditional branch makes redundant self-assignment. -# -# It only detects local variable because it may replace state of instance variable, -# class variable, and global variable that have state across methods with `nil`. -# -# @example -# -# # bad -# foo = condition ? bar : foo -# -# # good -# foo = bar if condition -# -# # bad -# foo = condition ? foo : bar -# -# # good -# foo = bar unless condition -# -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#25 -class RuboCop::Cop::Style::RedundantSelfAssignmentBranch < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#32 - def bad_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#36 - def on_lvasgn(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#59 - def inconvertible_to_modifier?(if_branch, else_branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#64 - def multiple_statements?(branch); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#74 - def register_offense(if_node, offense_branch, opposite_branch, keyword); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#70 - def self_assign?(variable, branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#53 - def use_if_and_else_branch?(expression); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#29 -RuboCop::Cop::Style::RedundantSelfAssignmentBranch::MSG = T.let(T.unsafe(nil), String) - -# Identifies instances of sorting and then -# taking only the first or last element. The same behavior can -# be accomplished without a relatively expensive sort by using -# `Enumerable#min` instead of sorting and taking the first -# element and `Enumerable#max` instead of sorting and taking the -# last element. Similarly, `Enumerable#min_by` and -# `Enumerable#max_by` can replace `Enumerable#sort_by` calls -# after which only the first or last element is used. -# -# @example -# # bad -# [2, 1, 3].sort.first -# [2, 1, 3].sort[0] -# [2, 1, 3].sort.at(0) -# [2, 1, 3].sort.slice(0) -# -# # good -# [2, 1, 3].min -# -# # bad -# [2, 1, 3].sort.last -# [2, 1, 3].sort[-1] -# [2, 1, 3].sort.at(-1) -# [2, 1, 3].sort.slice(-1) -# -# # good -# [2, 1, 3].max -# -# # bad -# arr.sort_by(&:foo).first -# arr.sort_by(&:foo)[0] -# arr.sort_by(&:foo).at(0) -# arr.sort_by(&:foo).slice(0) -# -# # good -# arr.min_by(&:foo) -# -# # bad -# arr.sort_by(&:foo).last -# arr.sort_by(&:foo)[-1] -# arr.sort_by(&:foo).at(-1) -# arr.sort_by(&:foo).slice(-1) -# -# # good -# arr.max_by(&:foo) -# -# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#79 -class RuboCop::Cop::Style::RedundantSort < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#104 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#104 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#88 - def redundant_sort?(param0 = T.unsafe(nil)); end - - private - - # This gets the start of the accessor whether it has a dot - # (e.g. `.first`) or doesn't (e.g. `[0]`) - # - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#193 - def accessor_start(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#183 - def arg_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#187 - def arg_value(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#148 - def autocorrect(corrector, node, sort_node, sorter, accessor); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#166 - def base(accessor, arg); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#115 - def find_redundant_sort(*nodes); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#136 - def message(node, sorter, accessor); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#132 - def offense_range(sort_node, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#125 - def register_offense(node, sort_node, sorter, accessor); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#157 - def replace_with_logical_operator(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#174 - def suffix(sorter); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#162 - def suggestion(sorter, accessor, arg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#201 - def with_logical_operator?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#83 -RuboCop::Cop::Style::RedundantSort::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#85 -RuboCop::Cop::Style::RedundantSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where `sort_by { ... }` can be replaced by -# `sort`. -# -# @example -# # bad -# array.sort_by { |x| x } -# array.sort_by do |var| -# var -# end -# -# # good -# array.sort -# -# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#18 -class RuboCop::Cop::Style::RedundantSortBy < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#25 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#35 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#48 - def redundant_sort_by_block(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#53 - def redundant_sort_by_numblock(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#57 - def sort_by_range(send, node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#22 -RuboCop::Cop::Style::RedundantSortBy::MSG_BLOCK = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#23 -RuboCop::Cop::Style::RedundantSortBy::MSG_NUMBLOCK = T.let(T.unsafe(nil), String) - -# Checks for redundant escapes in string literals. -# -# @example -# # bad - no need to escape # without following {/$/@ -# "\#foo" -# -# # bad - no need to escape single quotes inside double quoted string -# "\'foo\'" -# -# # bad - heredocs are also checked for unnecessary escapes -# <<~STR -# \#foo \"foo\" -# STR -# -# # good -# "#foo" -# -# # good -# "\#{no_interpolation}" -# -# # good -# "'foo'" -# -# # good -# "foo\ -# bar" -# -# # good -# <<~STR -# #foo "foo" -# STR -# -# source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#37 -class RuboCop::Cop::Style::RedundantStringEscape < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#43 - def on_str(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#79 - def allowed_escape?(node, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#119 - def array_literal?(node, prefix); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#73 - def begin_loc_present?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#153 - def delimiter?(node, char); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#171 - def disabling_interpolation?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#149 - def heredoc?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#139 - def heredoc_with_disabled_interpolation?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#100 - def interpolation_not_enabled?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#167 - def literal_in_interpolated_or_multiline_string?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#59 - def message(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#135 - def percent_array_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#111 - def percent_q_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#127 - def percent_w_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#131 - def percent_w_upper_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#107 - def single_quoted?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#63 - def str_contents_range(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#41 -RuboCop::Cop::Style::RedundantStringEscape::MSG = T.let(T.unsafe(nil), String) - -# Enforces using `//` or `%r` around regular expressions. -# -# NOTE: The following `%r` cases using a regexp starts with a blank or `=` -# as a method argument allowed to prevent syntax errors. -# -# [source,ruby] -# ---- -# do_something %r{ regexp} # `do_something / regexp/` is an invalid syntax. -# do_something %r{=regexp} # `do_something /=regexp/` is an invalid syntax. -# ---- -# -# @example EnforcedStyle: slashes (default) -# # bad -# snake_case = %r{^[\dA-Z_]+$} -# -# # bad -# regex = %r{ -# foo -# (bar) -# (baz) -# }x -# -# # good -# snake_case = /^[\dA-Z_]+$/ -# -# # good -# regex = / -# foo -# (bar) -# (baz) -# /x -# @example EnforcedStyle: percent_r -# # bad -# snake_case = /^[\dA-Z_]+$/ -# -# # bad -# regex = / -# foo -# (bar) -# (baz) -# /x -# -# # good -# snake_case = %r{^[\dA-Z_]+$} -# -# # good -# regex = %r{ -# foo -# (bar) -# (baz) -# }x -# @example EnforcedStyle: mixed -# # bad -# snake_case = %r{^[\dA-Z_]+$} -# -# # bad -# regex = / -# foo -# (bar) -# (baz) -# /x -# -# # good -# snake_case = /^[\dA-Z_]+$/ -# -# # good -# regex = %r{ -# foo -# (bar) -# (baz) -# }x -# @example AllowInnerSlashes: false (default) -# # If `false`, the cop will always recommend using `%r` if one or more -# # slashes are found in the regexp string. -# -# # bad -# x =~ /home\// -# -# # good -# x =~ %r{home/} -# @example AllowInnerSlashes: true -# # good -# x =~ /home\// -# -# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#93 -class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#101 - def on_regexp(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#144 - def allow_inner_slashes?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#132 - def allowed_mixed_percent_r?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#122 - def allowed_mixed_slash?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#161 - def allowed_omit_parentheses_with_percent_r_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#126 - def allowed_percent_r_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#118 - def allowed_slash_literal?(node); end - - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#221 - def calculate_replacement(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#136 - def contains_disallowed_slash?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#140 - def contains_slash?(node); end - - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#170 - def correct_delimiters(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#176 - def correct_inner_slashes(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#209 - def inner_slash_after_correction(node); end - - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#205 - def inner_slash_before_correction(node); end - - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#213 - def inner_slash_for(opening_delimiter); end - - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#192 - def inner_slash_indices(node); end - - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#148 - def node_body(node, include_begin_nodes: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#157 - def preferred_delimiters; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#153 - def slash_literal?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#99 -RuboCop::Cop::Style::RegexpLiteral::MSG_USE_PERCENT_R = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#98 -RuboCop::Cop::Style::RegexpLiteral::MSG_USE_SLASHES = T.let(T.unsafe(nil), String) - -# Sort `require` and `require_relative` in alphabetical order. -# -# @example -# # bad -# require 'b' -# require 'a' -# -# # good -# require 'a' -# require 'b' -# -# # bad -# require_relative 'b' -# require_relative 'a' -# -# # good -# require_relative 'a' -# require_relative 'b' -# -# # good (sorted within each section separated by a blank line) -# require 'a' -# require 'd' -# -# require 'b' -# require 'c' -# -# # good -# require 'b' -# require_relative 'c' -# require 'a' -# -# # bad -# require 'a' -# require 'c' if foo -# require 'b' -# -# # good -# require 'a' -# require 'b' -# require 'c' if foo -# -# # bad -# require 'c' -# if foo -# require 'd' -# require 'b' -# end -# require 'a' -# -# # good -# require 'c' -# if foo -# require 'b' -# require 'd' -# end -# require 'a' -# -# source://rubocop//lib/rubocop/cop/style/require_order.rb#66 -class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/require_order.rb#76 - def if_inside_only_require(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/require_order.rb#83 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/require_order.rb#115 - def autocorrect(corrector, node, previous_older_sibling); end - - # source://rubocop//lib/rubocop/cop/style/require_order.rb#101 - def find_previous_older_sibling(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/require_order.rb#133 - def in_same_section?(node1, node2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/require_order.rb#97 - def not_modifier_form?(node); end - - # source://rubocop//lib/rubocop/cop/style/require_order.rb#123 - def search_node(node); end - - # source://rubocop//lib/rubocop/cop/style/require_order.rb#127 - def sibling_node(node); end -end - -# source://rubocop//lib/rubocop/cop/style/require_order.rb#73 -RuboCop::Cop::Style::RequireOrder::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/require_order.rb#71 -RuboCop::Cop::Style::RequireOrder::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for uses of `rescue` in its modifier form is added for following -# reasons: -# -# * The syntax of modifier form `rescue` can be misleading because it -# might lead us to believe that `rescue` handles the given exception -# but it actually rescue all exceptions to return the given rescue -# block. In this case, value returned by handle_error or -# SomeException. -# -# * Modifier form `rescue` would rescue all the exceptions. It would -# silently skip all exception or errors and handle the error. -# Example: If `NoMethodError` is raised, modifier form rescue would -# handle the exception. -# -# @example -# # bad -# some_method rescue handle_error -# -# # bad -# some_method rescue SomeException -# -# # good -# begin -# some_method -# rescue -# handle_error -# end -# -# # good -# begin -# some_method -# rescue SomeException -# handle_error -# end -# -# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#40 -class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RescueNode - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#52 - def on_resbody(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#70 - def correct_rescue_block(corrector, node, parenthesized); end - - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#86 - def indentation_and_offset(node, parenthesized); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#66 - def parenthesized?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#48 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#46 -RuboCop::Cop::Style::RescueModifier::MSG = T.let(T.unsafe(nil), String) - -# Checks for rescuing `StandardError`. There are two supported -# styles `implicit` and `explicit`. This cop will not register an offense -# if any error other than `StandardError` is specified. -# -# @example EnforcedStyle: explicit (default) -# # `explicit` will enforce using `rescue StandardError` -# # instead of `rescue`. -# -# # bad -# begin -# foo -# rescue -# bar -# end -# -# # good -# begin -# foo -# rescue StandardError -# bar -# end -# -# # good -# begin -# foo -# rescue OtherError -# bar -# end -# -# # good -# begin -# foo -# rescue StandardError, SecurityError -# bar -# end -# @example EnforcedStyle: implicit -# # `implicit` will enforce using `rescue` instead of -# # `rescue StandardError`. -# -# # bad -# begin -# foo -# rescue StandardError -# bar -# end -# -# # good -# begin -# foo -# rescue -# bar -# end -# -# # good -# begin -# foo -# rescue OtherError -# bar -# end -# -# # good -# begin -# foo -# rescue StandardError, SecurityError -# bar -# end -# -# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#73 -class RuboCop::Cop::Style::RescueStandardError < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#92 - def on_resbody(node); end - - # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#88 - def rescue_standard_error?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#83 - def rescue_without_error_class?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#118 - def offense_for_explicit_enforced_style(node); end - - # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#107 - def offense_for_implicit_enforced_style(node, error); end -end - -# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#80 -RuboCop::Cop::Style::RescueStandardError::MSG_EXPLICIT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#79 -RuboCop::Cop::Style::RescueStandardError::MSG_IMPLICIT = T.let(T.unsafe(nil), String) - -# Enforces consistency between `return nil` and `return`. -# -# This cop is disabled by default. Because there seems to be a perceived semantic difference -# between `return` and `return nil`. The former can be seen as just halting evaluation, -# while the latter might be used when the return value is of specific concern. -# -# Supported styles are `return` and `return_nil`. -# -# @example EnforcedStyle: return (default) -# # bad -# def foo(arg) -# return nil if arg -# end -# -# # good -# def foo(arg) -# return if arg -# end -# @example EnforcedStyle: return_nil -# # bad -# def foo(arg) -# return if arg -# end -# -# # good -# def foo(arg) -# return nil if arg -# end -# -# source://rubocop//lib/rubocop/cop/style/return_nil.rb#35 -class RuboCop::Cop::Style::ReturnNil < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#90 - def chained_send?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#93 - def define_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#48 - def on_return(node); end - - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#46 - def return_nil_node?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#43 - def return_node?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#80 - def correct_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#76 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#85 - def scoped_node?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/return_nil.rb#39 -RuboCop::Cop::Style::ReturnNil::RETURN_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/return_nil.rb#40 -RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) - -# Checks if `return` or `return nil` is used in predicate method definitions. -# -# @example -# # bad -# def foo? -# return if condition -# -# do_something? -# end -# -# # bad -# def foo? -# return nil if condition -# -# do_something? -# end -# -# # good -# def foo? -# return false if condition -# -# do_something? -# end -# @example AllowedMethods: ['foo?'] -# # good -# def foo? -# return if condition -# -# do_something? -# end -# @example AllowedPatterns: [/foo/] -# # good -# def foo? -# return if condition -# -# do_something? -# end -# -# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#50 -class RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#58 - def return_nil?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#79 - def nil_node_at_the_end_of_method_body(body); end - - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#87 - def register_offense(offense_node, replacement); end -end - -# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#55 -RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -# Transforms usages of a method call safeguarded by a non `nil` -# check for the variable whose method is being called to -# safe navigation (`&.`). If there is a method chain, all of the methods -# in the chain need to be checked for safety, and all of the methods will -# need to be changed to use safe navigation. -# -# The default for `ConvertCodeThatCanStartToReturnNil` is `false`. -# When configured to `true`, this will -# check for code in the format `!foo.nil? && foo.bar`. As it is written, -# the return of this code is limited to `false` and whatever the return -# of the method is. If this is converted to safe navigation, -# `foo&.bar` can start returning `nil` as well as what the method -# returns. -# -# The default for `MaxChainLength` is `2` -# We have limited the cop to not register an offense for method chains -# that exceed this option is set. -# -# @example -# # bad -# foo.bar if foo -# foo.bar.baz if foo -# foo.bar(param1, param2) if foo -# foo.bar { |e| e.something } if foo -# foo.bar(param) { |e| e.something } if foo -# -# foo.bar if !foo.nil? -# foo.bar unless !foo -# foo.bar unless foo.nil? -# -# foo && foo.bar -# foo && foo.bar.baz -# foo && foo.bar(param1, param2) -# foo && foo.bar { |e| e.something } -# foo && foo.bar(param) { |e| e.something } -# -# foo ? foo.bar : nil -# foo.nil? ? nil : foo.bar -# !foo.nil? ? foo.bar : nil -# !foo ? nil : foo.bar -# -# # good -# foo&.bar -# foo&.bar&.baz -# foo&.bar(param1, param2) -# foo&.bar { |e| e.something } -# foo&.bar(param) { |e| e.something } -# foo && foo.bar.baz.qux # method chain with more than 2 methods -# foo && foo.nil? # method that `nil` responds to -# -# # Method calls that do not use `.` -# foo && foo < bar -# foo < bar if foo -# -# # When checking `foo&.empty?` in a conditional, `foo` being `nil` will actually -# # do the opposite of what the author intends. -# foo && foo.empty? -# -# # This could start returning `nil` as well as the return of the method -# foo.nil? || foo.bar -# !foo || foo.bar -# -# # Methods that are used on assignment, arithmetic operation or -# # comparison should not be converted to use safe navigation -# foo.baz = bar if foo -# foo.baz + bar if foo -# foo.bar > 2 if foo -# -# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#84 -class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::NilMethods - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # if format: (if checked_variable body nil) - # unless format: (if checked_variable nil body) - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#99 - def modifier_if_safe_navigation_candidate(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#125 - def not_nil_check?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#133 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#127 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#114 - def ternary_safe_navigation_candidate(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#307 - def add_safe_nav_to_all_methods_in_chain(corrector, start_method, method_chain); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#200 - def allowed_if_condition?(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#154 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#299 - def begin_range(node, method_call); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#261 - def chain_length(method_chain, method); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#139 - def check_node(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#181 - def comments(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#303 - def end_range(node, method_call); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#166 - def extract_body(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#243 - def extract_common_parts(method_chain, checked_variable); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#209 - def extract_parts(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#233 - def extract_parts_from_and(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#218 - def extract_parts_from_if(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#251 - def find_matching_receiver_invocation(method_chain, checked_variable); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#174 - def handle_comments(corrector, node, method_call); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#320 - def max_chain_length; end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#204 - def method_call(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#295 - def method_called?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#287 - def negated?(send_node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#187 - def relevant_comment_ranges(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#281 - def unsafe_method?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#269 - def unsafe_method_used?(method_chain, method); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#150 - def use_var_only_in_unless_modifier?(node, variable); end -end - -# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#92 -RuboCop::Cop::Style::SafeNavigation::LOGIC_JUMP_KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#90 -RuboCop::Cop::Style::SafeNavigation::MSG = T.let(T.unsafe(nil), String) - -# Identifies usages of `shuffle.first`, -# `shuffle.last`, and `shuffle[]` and change them to use -# `sample` instead. -# -# @example -# # bad -# [1, 2, 3].shuffle.first -# [1, 2, 3].shuffle.first(2) -# [1, 2, 3].shuffle.last -# [2, 1, 3].shuffle.at(0) -# [2, 1, 3].shuffle.slice(0) -# [1, 2, 3].shuffle[2] -# [1, 2, 3].shuffle[0, 2] # sample(2) will do the same -# [1, 2, 3].shuffle[0..2] # sample(3) will do the same -# [1, 2, 3].shuffle(random: Random.new).first -# -# # good -# [1, 2, 3].shuffle -# [1, 2, 3].sample -# [1, 2, 3].sample(3) -# [1, 2, 3].shuffle[1, 3] # sample(3) might return a longer Array -# [1, 2, 3].shuffle[1..3] # sample(3) might return a longer Array -# [1, 2, 3].shuffle[foo, bar] -# [1, 2, 3].shuffle(random: Random.new) -# -# source://rubocop//lib/rubocop/cop/style/sample.rb#30 -class RuboCop::Cop::Style::Sample < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/sample.rb#41 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#41 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#37 - def sample_candidate?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/sample.rb#122 - def correction(shuffle_arg, method, method_args); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#138 - def extract_source(args); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#116 - def message(shuffle_arg, method, method_args, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sample.rb#59 - def offensive?(method, method_args); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#96 - def range_size(range_node); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#129 - def sample_arg(method, method_args); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#70 - def sample_size(method_args); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#79 - def sample_size_for_one_arg(arg); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#89 - def sample_size_for_two_args(first, second); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#112 - def source_range(shuffle_node, node); end -end - -# source://rubocop//lib/rubocop/cop/style/sample.rb#33 -RuboCop::Cop::Style::Sample::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/sample.rb#34 -RuboCop::Cop::Style::Sample::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Looks for places where an subset of an Enumerable (array, -# range, set, etc.; see note below) is calculated based on a `Regexp` -# match, and suggests `grep` or `grep_v` instead. -# -# NOTE: Hashes do not behave as you may expect with `grep`, which -# means that `hash.grep` is not equivalent to `hash.select`. Although -# RuboCop is limited by static analysis, this cop attempts to avoid -# registering an offense when the receiver is a hash (hash literal, -# `Hash.new`, `Hash#[]`, or `to_h`/`to_hash`). -# -# NOTE: `grep` and `grep_v` were optimized when used without a block -# in Ruby 3.0, but may be slower in previous versions. -# See https://bugs.ruby-lang.org/issues/17030 -# -# @example -# # bad (select or find_all) -# array.select { |x| x.match? /regexp/ } -# array.select { |x| /regexp/.match?(x) } -# array.select { |x| x =~ /regexp/ } -# array.select { |x| /regexp/ =~ x } -# -# # bad (reject) -# array.reject { |x| x.match? /regexp/ } -# array.reject { |x| /regexp/.match?(x) } -# array.reject { |x| x =~ /regexp/ } -# array.reject { |x| /regexp/ =~ x } -# -# # good -# array.grep(regexp) -# array.grep_v(regexp) -# -# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#45 -class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#79 - def calls_lvar?(param0 = T.unsafe(nil), param1); end - - # Returns true if a node appears to return a hash - # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#65 - def creates_hash?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#74 - def env_const?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#56 - def regexp_match?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#133 - def extract_send_node(block_node); end - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#146 - def find_regexp(node, block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#157 - def match_predicate_without_receiver?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#142 - def opposite?(regexp_method_send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#107 - def receiver_allowed?(node); end - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#121 - def register_offense(node, block_node, regexp, replacement); end - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#113 - def replacement(regexp_method_send_node, node); end -end - -# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#49 -RuboCop::Cop::Style::SelectByRegexp::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#52 -RuboCop::Cop::Style::SelectByRegexp::OPPOSITE_REPLACEMENTS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#53 -RuboCop::Cop::Style::SelectByRegexp::REGEXP_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#51 -RuboCop::Cop::Style::SelectByRegexp::REPLACEMENTS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#50 -RuboCop::Cop::Style::SelectByRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces the use the shorthand for self-assignment. -# -# @example -# -# # bad -# x = x + 1 -# -# # good -# x += 1 -# -# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#15 -class RuboCop::Cop::Style::SelfAssignment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#33 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#29 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#25 - def on_lvasgn(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#94 - def apply_autocorrect(corrector, node, rhs, operator, new_rhs); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#74 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#89 - def autocorrect_boolean_node(corrector, node, rhs); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#84 - def autocorrect_send_node(corrector, node, rhs); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#39 - def check(node, var_type); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#62 - def check_boolean_node(node, rhs, var_name, var_type); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#50 - def check_send_node(node, rhs, var_name, var_type); end - - class << self - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#21 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#18 -RuboCop::Cop::Style::SelfAssignment::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#19 -RuboCop::Cop::Style::SelfAssignment::OPS = T.let(T.unsafe(nil), Array) - -# Checks for multiple expressions placed on the same line. -# It also checks for lines terminated with a semicolon. -# -# This cop has `AllowAsExpressionSeparator` configuration option. -# It allows `;` to separate several expressions on the same line. -# -# @example -# # bad -# foo = 1; bar = 2; -# baz = 3; -# -# # good -# foo = 1 -# bar = 2 -# baz = 3 -# @example AllowAsExpressionSeparator: false (default) -# # bad -# foo = 1; bar = 2 -# @example AllowAsExpressionSeparator: true -# # good -# foo = 1; bar = 2 -# -# source://rubocop//lib/rubocop/cop/style/semicolon.rb#29 -class RuboCop::Cop::Style::Semicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#45 - def on_begin(node); end - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#39 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#64 - def check_for_line_terminator_or_opener; end - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#70 - def each_semicolon; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#106 - def exist_semicolon_after_left_curly_brace?(tokens); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#110 - def exist_semicolon_after_left_lambda_curly_brace?(tokens); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#118 - def exist_semicolon_after_left_string_interpolation_brace?(tokens); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#102 - def exist_semicolon_before_right_curly_brace?(tokens); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#114 - def exist_semicolon_before_right_string_interpolation_brace?(tokens); end - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#142 - def expressions_per_line(exprs); end - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#156 - def find_range_node(token_before_semicolon); end - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#148 - def find_semicolon_positions(line); end - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#162 - def range_nodes; end - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#122 - def register_semicolon(line, column, after_expression, token_before_semicolon = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#84 - def semicolon_position(tokens); end - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#79 - def tokens_for_lines; end - - class << self - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#35 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/semicolon.rb#33 -RuboCop::Cop::Style::Semicolon::MSG = T.let(T.unsafe(nil), String) - -# Checks for the use of the send method. -# -# @example -# # bad -# Foo.send(bar) -# quuz.send(fred) -# -# # good -# Foo.__send__(bar) -# quuz.public_send(fred) -# -# source://rubocop//lib/rubocop/cop/style/send.rb#16 -class RuboCop::Cop::Style::Send < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/send.rb#20 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/send.rb#20 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/send.rb#17 -RuboCop::Cop::Style::Send::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/send.rb#18 -RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Detects the use of the `public_send` method with a literal method name argument. -# Since the `send` method can be used to call private methods, by default, -# only the `public_send` method is detected. -# -# @example -# # bad -# obj.public_send(:method_name) -# obj.public_send('method_name') -# -# # good -# obj.method_name -# @example AllowSend: true (default) -# # good -# obj.send(:method_name) -# obj.send('method_name') -# obj.__send__(:method_name) -# obj.__send__('method_name') -# @example AllowSend: false -# # bad -# obj.send(:method_name) -# obj.send('method_name') -# obj.__send__(:method_name) -# obj.__send__('method_name') -# -# # good -# obj.method_name -# -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#40 -class RuboCop::Cop::Style::SendWithLiteralMethodName < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#54 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#76 - def allow_send?; end - - # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#80 - def offense_range(node); end - - # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#84 - def removal_argument_range(first_argument, second_argument); end -end - -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#46 -RuboCop::Cop::Style::SendWithLiteralMethodName::METHOD_NAME_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#43 -RuboCop::Cop::Style::SendWithLiteralMethodName::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#47 -RuboCop::Cop::Style::SendWithLiteralMethodName::RESERVED_WORDS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#44 -RuboCop::Cop::Style::SendWithLiteralMethodName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#45 -RuboCop::Cop::Style::SendWithLiteralMethodName::STATIC_METHOD_NAME_NODE_TYPES = T.let(T.unsafe(nil), Array) - -# Checks for uses of `fail` and `raise`. -# -# @example EnforcedStyle: only_raise (default) -# # The `only_raise` style enforces the sole use of `raise`. -# # bad -# begin -# fail -# rescue Exception -# # handle it -# end -# -# def watch_out -# fail -# rescue Exception -# # handle it -# end -# -# Kernel.fail -# -# # good -# begin -# raise -# rescue Exception -# # handle it -# end -# -# def watch_out -# raise -# rescue Exception -# # handle it -# end -# -# Kernel.raise -# @example EnforcedStyle: only_fail -# # The `only_fail` style enforces the sole use of `fail`. -# # bad -# begin -# raise -# rescue Exception -# # handle it -# end -# -# def watch_out -# raise -# rescue Exception -# # handle it -# end -# -# Kernel.raise -# -# # good -# begin -# fail -# rescue Exception -# # handle it -# end -# -# def watch_out -# fail -# rescue Exception -# # handle it -# end -# -# Kernel.fail -# @example EnforcedStyle: semantic -# # The `semantic` style enforces the use of `fail` to signal an -# # exception, then will use `raise` to trigger an offense after -# # it has been rescued. -# # bad -# begin -# raise -# rescue Exception -# # handle it -# end -# -# def watch_out -# # Error thrown -# rescue Exception -# fail -# end -# -# Kernel.fail -# Kernel.raise -# -# # good -# begin -# fail -# rescue Exception -# # handle it -# end -# -# def watch_out -# fail -# rescue Exception -# raise 'Preferably with descriptive message' -# end -# -# explicit_receiver.fail -# explicit_receiver.raise -# -# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#107 -class RuboCop::Cop::Style::SignalException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#120 - def custom_fail_methods(param0); end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#117 - def kernel_call?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#122 - def on_rescue(node); end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#134 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#206 - def allow(method_name, node); end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#188 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#167 - def check_scope(method_name, node); end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#180 - def check_send(method_name, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#200 - def command_or_kernel_call?(name, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#149 - def custom_fail_defined?; end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#210 - def each_command_or_kernel_call(method_name, node); end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#156 - def message(method_name); end -end - -# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#111 -RuboCop::Cop::Style::SignalException::FAIL_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#112 -RuboCop::Cop::Style::SignalException::RAISE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#114 -RuboCop::Cop::Style::SignalException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Sometimes using `dig` method ends up with just a single -# argument. In such cases, dig should be replaced with `[]`. -# -# Since replacing `hash&.dig(:key)` with `hash[:key]` could potentially lead to error, -# calls to the `dig` method using safe navigation will be ignored. -# -# @example -# # bad -# { key: 'value' }.dig(:key) -# [1, 2, 3].dig(0) -# -# # good -# { key: 'value' }[:key] -# [1, 2, 3][0] -# -# # good -# { key1: { key2: 'value' } }.dig(:key1, :key2) -# [1, [2, [3]]].dig(1, 1) -# -# # good -# keys = %i[key1 key2] -# { key1: { key2: 'value' } }.dig(*keys) -# -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#34 -class RuboCop::Cop::Style::SingleArgumentDig < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#46 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#42 - def single_argument_dig?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#39 -RuboCop::Cop::Style::SingleArgumentDig::IGNORED_ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#37 -RuboCop::Cop::Style::SingleArgumentDig::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#38 -RuboCop::Cop::Style::SingleArgumentDig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks whether the block parameters of a single-line -# method accepting a block match the names specified via configuration. -# -# For instance one can configure `reduce`(`inject`) to use |a, e| as -# parameters. -# -# Configuration option: Methods -# Should be set to use this cop. Array of hashes, where each key is the -# method name and value - array of argument names. -# -# @example Methods: [{reduce: %w[a b]}] -# # bad -# foo.reduce { |c, d| c + d } -# foo.reduce { |_, _d| 1 } -# -# # good -# foo.reduce { |a, b| a + b } -# foo.reduce { |a, _b| a } -# foo.reduce { |a, (id, _)| a + id } -# foo.reduce { true } -# -# # good -# foo.reduce do |c, d| -# c + d -# end -# -# source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#31 -class RuboCop::Cop::Style::SingleLineBlockParams < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#36 - def on_block(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#105 - def args_match?(method_name, args); end - - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#69 - def autocorrect(corrector, node, preferred_block_arguments, joined_block_arguments); end - - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#57 - def build_preferred_arguments_map(node, preferred_arguments); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#79 - def eligible_arguments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#83 - def eligible_method?(node); end - - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#95 - def method_name(method); end - - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#91 - def method_names; end - - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#87 - def methods; end - - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#99 - def target_args(method_name); end -end - -# source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#34 -RuboCop::Cop::Style::SingleLineBlockParams::MSG = T.let(T.unsafe(nil), String) - -# Checks for single-line `do`...`end` block. -# -# In practice a single line `do`...`end` is autocorrected when `EnforcedStyle: semantic` -# in `Style/BlockDelimiters`. The autocorrection maintains the `do` ... `end` syntax to -# preserve semantics and does not change it to `{`...`}` block. -# -# @example -# -# # bad -# foo do |arg| bar(arg) end -# -# # good -# foo do |arg| -# bar(arg) -# end -# -# # bad -# ->(arg) do bar(arg) end -# -# # good -# ->(arg) { bar(arg) } -# -# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#28 -class RuboCop::Cop::Style::SingleLineDoEndBlock < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#34 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#34 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#55 - def do_line(node); end - - # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#63 - def x(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#31 -RuboCop::Cop::Style::SingleLineDoEndBlock::MSG = T.let(T.unsafe(nil), String) - -# Checks for single-line method definitions that contain a body. -# It will accept single-line methods with no body. -# -# Endless methods added in Ruby 3.0 are also accepted by this cop. -# -# If `Style/EndlessMethod` is enabled with `EnforcedStyle: allow_single_line` or -# `allow_always`, single-line methods will be autocorrected to endless -# methods if there is only one statement in the body. -# -# @example -# # bad -# def some_method; body end -# def link_to(url); {:name => url}; end -# def @table.columns; super; end -# -# # good -# def self.resource_class=(klass); end -# def @table.columns; end -# def some_method() = body -# @example AllowIfMethodIsEmpty: true (default) -# # good -# def no_op; end -# @example AllowIfMethodIsEmpty: false -# # bad -# def no_op; end -# -# source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#34 -class RuboCop::Cop::Style::SingleLineMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#41 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#41 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#60 - def allow_empty?; end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#52 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#97 - def break_line_before(corrector, node, range, indent_steps: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#88 - def correct_to_endless(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#64 - def correct_to_endless?(body_node); end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#74 - def correct_to_multiline(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#136 - def disallow_endless_method_style?; end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#104 - def each_part(body); end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#121 - def method_body_source(method_body); end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#114 - def move_comment(node, corrector); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#132 - def require_parentheses?(method_body); end -end - -# source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#38 -RuboCop::Cop::Style::SingleLineMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#39 -RuboCop::Cop::Style::SingleLineMethods::NOT_SUPPORTED_ENDLESS_METHOD_BODY_TYPES = T.let(T.unsafe(nil), Array) - -# Checks that arrays are not sliced with the redundant `ary[0..-1]`, replacing it with `ary`, -# and ensures arrays are sliced with endless ranges instead of `ary[start..-1]` on Ruby 2.6+, -# and with beginless ranges instead of `ary[nil..end]` on Ruby 2.7+. -# -# @example -# # bad -# items[0..-1] -# items[0..nil] -# items[0...nil] -# -# # good -# items -# -# # bad -# items[1..-1] # Ruby 2.6+ -# items[1..nil] # Ruby 2.6+ -# -# # good -# items[1..] # Ruby 2.6+ -# -# # bad -# items[nil..42] # Ruby 2.7+ -# -# # good -# items[..42] # Ruby 2.7+ -# items[0..42] # Ruby 2.7+ -# -# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#46 -class RuboCop::Cop::Style::SlicingWithRange < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#77 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#73 - def range_from_zero?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#57 - def range_from_zero_till_minus_one?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#65 - def range_till_minus_one?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#111 - def beginless(range_node); end - - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#107 - def endless(range_node); end - - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#93 - def offense_message_with_removal_range(range_node, selector); end -end - -# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#52 -RuboCop::Cop::Style::SlicingWithRange::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#53 -RuboCop::Cop::Style::SlicingWithRange::MSG_USELESS_RANGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#54 -RuboCop::Cop::Style::SlicingWithRange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# If the branch of a conditional consists solely of a conditional node, -# its conditions can be combined with the conditions of the outer branch. -# This helps to keep the nesting level from getting too deep. -# -# @example -# # bad -# if condition_a -# if condition_b -# do_something -# end -# end -# -# # bad -# if condition_b -# do_something -# end if condition_a -# -# # good -# if condition_a && condition_b -# do_something -# end -# @example AllowModifier: false (default) -# # bad -# if condition_a -# do_something if condition_b -# end -# -# # bad -# if condition_b -# do_something -# end if condition_a -# @example AllowModifier: true -# # good -# if condition_a -# do_something if condition_b -# end -# -# # good -# if condition_b -# do_something -# end if condition_a -# -# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#49 -class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#59 - def on_if(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#242 - def allow_modifier?; end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#227 - def arguments_range(node); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81 - def assigned_variables(condition); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#98 - def autocorrect(corrector, node, if_branch); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#110 - def autocorrect_outer_condition_basic(corrector, node, if_branch); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#125 - def autocorrect_outer_condition_modify_form(corrector, node, if_branch); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#145 - def correct_for_basic_condition_style(corrector, node, if_branch, and_operator); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#175 - def correct_for_comment(corrector, node, if_branch); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#136 - def correct_for_guard_condition_style(corrector, outer_condition, if_branch, and_operator); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#165 - def correct_for_outer_condition_modify_form_style(corrector, node, if_branch); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#130 - def correct_from_unless_to_if(corrector, node, is_modify_form: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#184 - def correct_outer_condition(corrector, condition); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#197 - def insert_bang(corrector, node, is_modify_form); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#210 - def insert_bang_for_and(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#89 - def offending_branch?(node, branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#246 - def outer_condition_modify_form?(node, if_branch); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#238 - def replace_condition(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#222 - def require_parentheses?(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#74 - def use_variable_assignment_in_condition?(condition, if_branch); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#155 - def wrap_condition(corrector, condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 - def wrap_condition?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#55 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#53 -RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) - -# Looks for uses of Perl-style global variables. -# Correcting to global variables in the 'English' library -# will add a require statement to the top of the file if -# enabled by RequireEnglish config. -# -# @example EnforcedStyle: use_english_names (default) -# # good -# require 'English' # or this could be in another file. -# -# puts $LOAD_PATH -# puts $LOADED_FEATURES -# puts $PROGRAM_NAME -# puts $ERROR_INFO -# puts $ERROR_POSITION -# puts $FIELD_SEPARATOR # or $FS -# puts $OUTPUT_FIELD_SEPARATOR # or $OFS -# puts $INPUT_RECORD_SEPARATOR # or $RS -# puts $OUTPUT_RECORD_SEPARATOR # or $ORS -# puts $INPUT_LINE_NUMBER # or $NR -# puts $LAST_READ_LINE -# puts $DEFAULT_OUTPUT -# puts $DEFAULT_INPUT -# puts $PROCESS_ID # or $PID -# puts $CHILD_STATUS -# puts $LAST_MATCH_INFO -# puts $IGNORECASE -# puts $ARGV # or ARGV -# @example EnforcedStyle: use_perl_names -# # good -# puts $: -# puts $" -# puts $0 -# puts $! -# puts $@ -# puts $; -# puts $, -# puts $/ -# puts $\ -# puts $. -# puts $_ -# puts $> -# puts $< -# puts $$ -# puts $? -# puts $~ -# puts $= -# puts $* -# @example EnforcedStyle: use_builtin_english_names -# -# # good -# # Like `use_perl_names` but allows builtin global vars. -# puts $LOAD_PATH -# puts $LOADED_FEATURES -# puts $PROGRAM_NAME -# puts ARGV -# puts $: -# puts $" -# puts $0 -# puts $! -# puts $@ -# puts $; -# puts $, -# puts $/ -# puts $\ -# puts $. -# puts $_ -# puts $> -# puts $< -# puts $$ -# puts $? -# puts $~ -# puts $= -# puts $* -# -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#86 -class RuboCop::Cop::Style::SpecialGlobalVars < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RequireLibrary - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#175 - def autocorrect(corrector, node, global_var); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#167 - def message(global_var); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#151 - def on_gvar(node); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#146 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#246 - def add_require_english?; end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#240 - def english_name_replacement(preferred_name, node); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#189 - def format_english_message(global_var); end - - # For now, we assume that lists are 2 items or less. Easy grammar! - # - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#211 - def format_list(items); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#197 - def format_message(english, regular, global); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#234 - def matching_styles(global); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#226 - def preferred_names(global); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#215 - def replacement(node, global_var); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#250 - def should_require_english?(global_var); end -end - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#127 -RuboCop::Cop::Style::SpecialGlobalVars::BUILTIN_VARS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#99 -RuboCop::Cop::Style::SpecialGlobalVars::ENGLISH_VARS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#144 -RuboCop::Cop::Style::SpecialGlobalVars::LIBRARY_NAME = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#92 -RuboCop::Cop::Style::SpecialGlobalVars::MSG_BOTH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#95 -RuboCop::Cop::Style::SpecialGlobalVars::MSG_ENGLISH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#97 -RuboCop::Cop::Style::SpecialGlobalVars::MSG_REGULAR = T.let(T.unsafe(nil), String) - -# Anything *not* in this set is provided by the English library. -# -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#121 -RuboCop::Cop::Style::SpecialGlobalVars::NON_ENGLISH_VARS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#123 -RuboCop::Cop::Style::SpecialGlobalVars::PERL_VARS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#138 -RuboCop::Cop::Style::SpecialGlobalVars::STYLE_VARS_MAP = T.let(T.unsafe(nil), Hash) - -# Check for parentheses around stabby lambda arguments. -# There are two different styles. Defaults to `require_parentheses`. -# -# @example EnforcedStyle: require_parentheses (default) -# # bad -# ->a,b,c { a + b + c } -# -# # good -# ->(a,b,c) { a + b + c} -# @example EnforcedStyle: require_no_parentheses -# # bad -# ->(a,b,c) { a + b + c } -# -# # good -# ->a,b,c { a + b + c} -# -# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#22 -class RuboCop::Cop::Style::StabbyLambdaParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#28 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#54 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#46 - def missing_parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#58 - def missing_parentheses_corrector(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#73 - def parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#50 - def redundant_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#69 - def stabby_lambda_with_args?(node); end - - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#62 - def unwanted_parentheses_corrector(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#27 -RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_NO_REQUIRE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#26 -RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_REQUIRE = T.let(T.unsafe(nil), String) - -# Checks for places where classes with only class methods can be -# replaced with a module. Classes should be used only when it makes sense to create -# instances out of them. -# -# @example -# # bad -# class SomeClass -# def self.some_method -# # body omitted -# end -# -# def self.some_other_method -# # body omitted -# end -# end -# -# # good -# module SomeModule -# module_function -# -# def some_method -# # body omitted -# end -# -# def some_other_method -# # body omitted -# end -# end -# -# # good - has instance method -# class SomeClass -# def instance_method; end -# def self.class_method; end -# end -# -# source://rubocop//lib/rubocop/cop/style/static_class.rb#46 -class RuboCop::Cop::Style::StaticClass < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::VisibilityHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/static_class.rb#53 - def on_class(class_node); end - - private - - # source://rubocop//lib/rubocop/cop/style/static_class.rb#64 - def autocorrect(corrector, class_node); end - - # source://rubocop//lib/rubocop/cop/style/static_class.rb#77 - def autocorrect_def(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/static_class.rb#83 - def autocorrect_sclass(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/static_class.rb#90 - def class_convertible_to_module?(class_node); end - - # source://rubocop//lib/rubocop/cop/style/static_class.rb#114 - def class_elements(class_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/static_class.rb#102 - def extend_call?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/static_class.rb#106 - def sclass_convertible_to_module?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/static_class.rb#51 -RuboCop::Cop::Style::StaticClass::MSG = T.let(T.unsafe(nil), String) - -# Identifies places where `$stderr.puts` can be replaced by -# `warn`. The latter has the advantage of easily being disabled by, -# the `-W0` interpreter flag or setting `$VERBOSE` to `nil`. -# -# @example -# # bad -# $stderr.puts('hello') -# -# # good -# warn('hello') -# -# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#17 -class RuboCop::Cop::Style::StderrPuts < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#32 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#25 - def stderr_puts?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#43 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#47 - def stderr_gvar?(sym); end - - # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#51 - def stderr_puts_range(send); end -end - -# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#21 -RuboCop::Cop::Style::StderrPuts::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#22 -RuboCop::Cop::Style::StderrPuts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for uses of `String#split` with empty string or regexp literal argument. -# -# @example -# # bad -# string.split(//) -# string.split('') -# -# # good -# string.chars -# -# source://rubocop//lib/rubocop/cop/style/string_chars.rb#21 -class RuboCop::Cop::Style::StringChars < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/string_chars.rb#29 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/string_chars.rb#29 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/string_chars.rb#27 -RuboCop::Cop::Style::StringChars::BAD_ARGUMENTS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/string_chars.rb#25 -RuboCop::Cop::Style::StringChars::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/string_chars.rb#26 -RuboCop::Cop::Style::StringChars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for places where string concatenation -# can be replaced with string interpolation. -# -# The cop can autocorrect simple cases but will skip autocorrecting -# more complex cases where the resulting code would be harder to read. -# In those cases, it might be useful to extract statements to local -# variables or methods which you can then interpolate in a string. -# -# NOTE: When concatenation between two strings is broken over multiple -# lines, this cop does not register an offense; instead, -# `Style/LineEndConcatenation` will pick up the offense if enabled. -# -# Two modes are supported: -# 1. `aggressive` style checks and corrects all occurrences of `+` where -# either the left or right side of `+` is a string literal. -# 2. `conservative` style on the other hand, checks and corrects only if -# left side (receiver of `+` method call) is a string literal. -# This is useful when the receiver is some expression that returns string like `Pathname` -# instead of a string literal. -# -# @example Mode: aggressive (default) -# # bad -# email_with_name = user.name + ' <' + user.email + '>' -# Pathname.new('/') + 'test' -# -# # good -# email_with_name = "#{user.name} <#{user.email}>" -# email_with_name = format('%s <%s>', user.name, user.email) -# "#{Pathname.new('/')}test" -# -# # accepted, line-end concatenation -# name = 'First' + -# 'Last' -# @example Mode: conservative -# # bad -# 'Hello' + user.name -# -# # good -# "Hello #{user.name}" -# user.name + '!!' -# Pathname.new('/') + 'test' -# -# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#53 -class RuboCop::Cop::Style::StringConcatenation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#69 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#73 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#62 - def string_concatenation?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#116 - def collect_parts(node, parts = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#141 - def corrected_ancestor?(node); end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#108 - def find_topmost_plus_node(node); end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#162 - def handle_quotes(parts); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#135 - def heredoc?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#98 - def line_end_concatenation?(node); end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#172 - def mode; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#127 - def plus_node?(node); end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#86 - def register_offense(topmost_plus_node, parts); end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#145 - def replacement(parts); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#168 - def single_quoted?(str_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#131 - def uncorrectable?(part); end -end - -# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#58 -RuboCop::Cop::Style::StringConcatenation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#59 -RuboCop::Cop::Style::StringConcatenation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the use of strings as keys in hashes. The use of -# symbols is preferred instead. -# -# @example -# # bad -# { 'one' => 1, 'two' => 2, 'three' => 3 } -# -# # good -# { one: 1, two: 2, three: 3 } -# -# source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#19 -class RuboCop::Cop::Style::StringHashKeys < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#42 - def on_pair(node); end - - # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#30 - def receive_environments_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#25 - def string_hash_key?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#22 -RuboCop::Cop::Style::StringHashKeys::MSG = T.let(T.unsafe(nil), String) - -# Checks if uses of quotes match the configured preference. -# -# @example EnforcedStyle: single_quotes (default) -# # bad -# "No special symbols" -# "No string interpolation" -# "Just text" -# -# # good -# 'No special symbols' -# 'No string interpolation' -# 'Just text' -# "Wait! What's #{this}!" -# @example EnforcedStyle: double_quotes -# # bad -# 'Just some text' -# 'No special chars or interpolation' -# -# # good -# "Just some text" -# "No special chars or interpolation" -# "Every string in #{project} uses double_quotes" -# -# source://rubocop//lib/rubocop/cop/style/string_literals.rb#29 -class RuboCop::Cop::Style::StringLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::StringLiteralsHelp - include ::RuboCop::Cop::StringHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#37 - def on_dstr(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#123 - def accept_child_double_quotes?(nodes); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#71 - def all_string_literals?(nodes); end - - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#61 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#105 - def check_multiline_quote_style(node, quote); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#101 - def consistent_multiline?; end - - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#75 - def detect_quote_styles(node); end - - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#87 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#97 - def offense?(node); end - - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#65 - def register_offense(node, message: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#119 - def unexpected_double_quotes?(quote); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#115 - def unexpected_single_quotes?(quote); end -end - -# source://rubocop//lib/rubocop/cop/style/string_literals.rb#35 -RuboCop::Cop::Style::StringLiterals::MSG_INCONSISTENT = T.let(T.unsafe(nil), String) - -# Checks that quotes inside string, symbol, and regexp interpolations -# match the configured preference. -# -# @example EnforcedStyle: single_quotes (default) -# # bad -# string = "Tests #{success ? "PASS" : "FAIL"}" -# symbol = :"Tests #{success ? "PASS" : "FAIL"}" -# heredoc = <<~TEXT -# Tests #{success ? "PASS" : "FAIL"} -# TEXT -# regexp = /Tests #{success ? "PASS" : "FAIL"}/ -# -# # good -# string = "Tests #{success ? 'PASS' : 'FAIL'}" -# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" -# heredoc = <<~TEXT -# Tests #{success ? 'PASS' : 'FAIL'} -# TEXT -# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ -# @example EnforcedStyle: double_quotes -# # bad -# string = "Tests #{success ? 'PASS' : 'FAIL'}" -# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" -# heredoc = <<~TEXT -# Tests #{success ? 'PASS' : 'FAIL'} -# TEXT -# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ -# -# # good -# string = "Tests #{success ? "PASS" : "FAIL"}" -# symbol = :"Tests #{success ? "PASS" : "FAIL"}" -# heredoc = <<~TEXT -# Tests #{success ? "PASS" : "FAIL"} -# TEXT -# regexp = /Tests #{success ? "PASS" : "FAIL"}/ -# -# source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#42 -class RuboCop::Cop::Style::StringLiteralsInInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::StringLiteralsHelp - include ::RuboCop::Cop::StringHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#48 - def autocorrect(corrector, node); end - - # Cop classes that include the StringHelp module usually ignore regexp - # nodes. Not so for this cop, which is why we override the on_regexp - # definition with an empty one. - # - # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#55 - def on_regexp(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#59 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#66 - def offense?(node); end -end - -# Enforces the use of consistent method names -# from the String class. -# -# @example -# # bad -# 'name'.intern -# 'var'.unfavored_method -# -# # good -# 'name'.to_sym -# 'var'.preferred_method -# -# source://rubocop//lib/rubocop/cop/style/string_methods.rb#17 -class RuboCop::Cop::Style::StringMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MethodPreference - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/string_methods.rb#23 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/string_methods.rb#23 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/string_methods.rb#21 -RuboCop::Cop::Style::StringMethods::MSG = T.let(T.unsafe(nil), String) - -# Identifies places where `lstrip.rstrip` can be replaced by -# `strip`. -# -# @example -# # bad -# 'abc'.lstrip.rstrip -# 'abc'.rstrip.lstrip -# -# # good -# 'abc'.strip -# -# source://rubocop//lib/rubocop/cop/style/strip.rb#16 -class RuboCop::Cop::Style::Strip < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/strip.rb#24 - def lstrip_rstrip(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/strip.rb#31 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/strip.rb#31 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/strip.rb#20 -RuboCop::Cop::Style::Strip::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/strip.rb#21 -RuboCop::Cop::Style::Strip::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for inheritance from Struct.new. -# -# @example -# # bad -# class Person < Struct.new(:first_name, :last_name) -# def age -# 42 -# end -# end -# -# # good -# Person = Struct.new(:first_name, :last_name) do -# def age -# 42 -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#26 -class RuboCop::Cop::Style::StructInheritance < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#33 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#45 - def struct_constructor?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#52 - def correct_parent(parent, corrector); end - - # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#62 - def range_for_empty_class_body(class_node, struct_new); end -end - -# source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#30 -RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) - -# Checks for redundant argument forwarding when calling super -# with arguments identical to the method definition. -# -# @example -# # bad -# def method(*args, **kwargs) -# super(*args, **kwargs) -# end -# -# # good - implicitly passing all arguments -# def method(*args, **kwargs) -# super -# end -# -# # good - forwarding a subset of the arguments -# def method(*args, **kwargs) -# super(*args) -# end -# -# # good - forwarding no arguments -# def method(*args, **kwargs) -# super() -# end -# -# # good - assigning to the block variable before calling super -# def method(&block) -# # Assigning to the block variable would pass the old value to super, -# # under this circumstance the block must be referenced explicitly. -# block ||= proc { 'fallback behavior' } -# super(&block) -# end -# -# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#37 -class RuboCop::Cop::Style::SuperArguments < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#45 - def on_super(super_node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#62 - def arguments_identical?(def_node, def_args, super_args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#117 - def block_arg_same?(def_node, def_arg, super_arg); end - - # Reassigning the block argument will still pass along the original block to super - # https://bugs.ruby-lang.org/issues/20505 - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#128 - def block_reassigned?(def_node, block_arg_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#138 - def define_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#134 - def forward_arg_same?(def_arg, super_arg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#97 - def keyword_arg_same?(def_arg, super_arg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#107 - def keyword_rest_arg_same?(def_arg, super_arg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#80 - def positional_arg_same?(def_arg, super_arg); end - - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#87 - def positional_rest_arg_same(def_arg, super_arg); end - - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#144 - def preprocess_super_args(super_args); end -end - -# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#41 -RuboCop::Cop::Style::SuperArguments::ASSIGN_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#40 -RuboCop::Cop::Style::SuperArguments::DEF_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#43 -RuboCop::Cop::Style::SuperArguments::MSG = T.let(T.unsafe(nil), String) - -# Enforces the presence of parentheses in `super` containing arguments. -# -# `super` is a keyword and is provided as a distinct cop from those designed for method call. -# -# @example -# -# # bad -# super name, age -# -# # good -# super(name, age) -# -# source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#18 -class RuboCop::Cop::Style::SuperWithArgsParentheses < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#23 - def on_super(node); end -end - -# source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#21 -RuboCop::Cop::Style::SuperWithArgsParentheses::MSG = T.let(T.unsafe(nil), String) - -# Enforces the use of shorthand-style swapping of 2 variables. -# -# @example -# # bad -# tmp = x -# x = y -# y = tmp -# -# # good -# x, y = y, x -# -# source://rubocop//lib/rubocop/cop/style/swap_values.rb#21 -class RuboCop::Cop::Style::SwapValues < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 - def on_asgn(node); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 - def on_lvasgn(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#47 - def allowed_assignment?(node); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#104 - def correction_range(tmp_assign, y_assign); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#81 - def lhs(node); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#66 - def message(x_assign, y_assign); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#75 - def replacement(x_assign); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#95 - def rhs(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#60 - def simple_assignment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#51 - def swapping_values?(tmp_assign, x_assign, y_assign); end -end - -# source://rubocop//lib/rubocop/cop/style/swap_values.rb#25 -RuboCop::Cop::Style::SwapValues::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/swap_values.rb#28 -RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Set) - -# Checks for array literals made up of symbols that are not -# using the %i() syntax. -# -# Alternatively, it checks for symbol arrays using the %i() syntax on -# projects which do not want to use that syntax, perhaps because they -# support a version of Ruby lower than 2.0. -# -# Configuration option: MinSize -# If set, arrays with fewer elements than this value will not trigger the -# cop. For example, a `MinSize` of `3` will not enforce a style on an -# array of 2 or fewer elements. -# -# @example EnforcedStyle: percent (default) -# # good -# %i[foo bar baz] -# -# # bad -# [:foo, :bar, :baz] -# -# # bad (contains spaces) -# %i[foo\ bar baz\ quux] -# -# # bad (contains [] with spaces) -# %i[foo \[ \]] -# -# # bad (contains () with spaces) -# %i(foo \( \)) -# @example EnforcedStyle: brackets -# # good -# [:foo, :bar, :baz] -# -# # bad -# %i[foo bar baz] -# -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#40 -class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ArrayMinSize - include ::RuboCop::Cop::ArraySyntax - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::PercentArray - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#66 - def on_array(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#96 - def build_bracketed_array(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#78 - def complex_content?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#92 - def invalid_percent_array_contents?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#119 - def symbol_without_quote?(string); end - - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#111 - def to_symbol_literal(string); end - - class << self - # Returns the value of attribute largest_brackets. - # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 - def largest_brackets; end - - # Sets the attribute largest_brackets - # - # @param value the value to set the attribute largest_brackets to. - # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 - def largest_brackets=(_arg0); end - end -end - -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#51 -RuboCop::Cop::Style::SymbolArray::ARRAY_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#52 -RuboCop::Cop::Style::SymbolArray::DELIMITERS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#50 -RuboCop::Cop::Style::SymbolArray::PERCENT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#57 -RuboCop::Cop::Style::SymbolArray::REDEFINABLE_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#53 -RuboCop::Cop::Style::SymbolArray::SPECIAL_GVARS = T.let(T.unsafe(nil), Array) - -# Checks symbol literal syntax. -# -# @example -# -# # bad -# :"symbol" -# -# # good -# :symbol -# -# source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#15 -class RuboCop::Cop::Style::SymbolLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#20 - def on_sym(node); end -end - -# source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#18 -RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) - -# Use symbols as procs when possible. -# -# If you prefer a style that allows block for method with arguments, -# please set `true` to `AllowMethodsWithArguments`. -# `define_method?` methods are allowed by default. -# These are customizable with `AllowedMethods` option. -# -# @example AllCops:ActiveSupportExtensionsEnabled: true -# # good -# ->(x) { x.foo } -# proc { |x| x.foo } -# Proc.new { |x| x.foo } -# @example AllowMethodsWithArguments: false (default) -# # bad -# something.do_something(foo) { |o| o.bar } -# -# # good -# something.do_something(foo, &:bar) -# @example AllowMethodsWithArguments: true -# # good -# something.do_something(foo) { |o| o.bar } -# @example AllowComments: false (default) -# # bad -# something.do_something do |s| # some comment -# # some comment -# s.upcase # some comment -# # some comment -# end -# @example AllowComments: true -# # good - if there are comment in either position -# something.do_something do |s| # some comment -# # some comment -# s.upcase # some comment -# # some comment -# end -# @example AllowedMethods: [define_method] (default) -# # good -# define_method(:foo) { |foo| foo.bar } -# @example AllowedPatterns: [] (default) -# # bad -# something.map { |s| s.upcase } -# @example AllowedPatterns: ['map'] (default) -# # good -# something.map { |s| s.upcase } -# @example AllCops:ActiveSupportExtensionsEnabled: false (default) -# # bad -# ->(x) { x.foo } -# proc { |x| x.foo } -# Proc.new { |x| x.foo } -# -# # good -# lambda(&:foo) -# proc(&:foo) -# Proc.new(&:foo) -# @example -# # bad -# something.map { |s| s.upcase } -# something.map { _1.upcase } -# -# # good -# something.map(&:upcase) -# -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#140 -class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#189 - def destructuring_block_argument?(argument_node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 - def proc_node?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#158 - def symbol_proc?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#155 - def symbol_proc_receiver?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#267 - def allow_comments?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#263 - def allow_if_method_has_argument?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#204 - def allowed_method_name?(name); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#217 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#240 - def autocorrect_lambda_block(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#231 - def autocorrect_with_args(corrector, node, args, method_name); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#225 - def autocorrect_without_args(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#253 - def begin_pos_for_replacement(node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#248 - def block_range_with_space(node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#208 - def register_offense(node, method_name, block_method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 - def unsafe_array_usage?(node); end - - # See: https://github.com/rubocop/rubocop/issues/10864 - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#196 - def unsafe_hash_usage?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#165 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#149 -RuboCop::Cop::Style::SymbolProc::LAMBDA_OR_PROC = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 -RuboCop::Cop::Style::SymbolProc::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#148 -RuboCop::Cop::Style::SymbolProc::SUPER_TYPES = T.let(T.unsafe(nil), Array) - -# Corrector to correct conditional assignment in ternary conditions. -# -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#499 -class RuboCop::Cop::Style::TernaryCorrector - extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper - extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper - - class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#504 - def correct(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#508 - def move_assignment_inside_condition(corrector, node); end - - private - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#522 - def correction(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#535 - def element_assignment?(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#539 - def extract_branches(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#552 - def move_branch_inside_condition(corrector, branch, assignment); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#547 - def remove_parentheses(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#526 - def ternary(node); end - end -end - -# Checks for the presence of parentheses around ternary -# conditions. It is configurable to enforce inclusion or omission of -# parentheses using `EnforcedStyle`. Omission is only enforced when -# removing the parentheses won't cause a different behavior. -# -# `AllowSafeAssignment` option for safe assignment. -# By safe assignment we mean putting parentheses around -# an assignment to indicate "I know I'm using an assignment -# as a condition. It's not a mistake." -# -# @example EnforcedStyle: require_no_parentheses (default) -# # bad -# foo = (bar?) ? a : b -# foo = (bar.baz?) ? a : b -# foo = (bar && baz) ? a : b -# -# # good -# foo = bar? ? a : b -# foo = bar.baz? ? a : b -# foo = bar && baz ? a : b -# @example EnforcedStyle: require_parentheses -# # bad -# foo = bar? ? a : b -# foo = bar.baz? ? a : b -# foo = bar && baz ? a : b -# -# # good -# foo = (bar?) ? a : b -# foo = (bar.baz?) ? a : b -# foo = (bar && baz) ? a : b -# @example EnforcedStyle: require_parentheses_when_complex -# # bad -# foo = (bar?) ? a : b -# foo = (bar.baz?) ? a : b -# foo = bar && baz ? a : b -# -# # good -# foo = bar? ? a : b -# foo = bar.baz? ? a : b -# foo = (bar && baz) ? a : b -# @example AllowSafeAssignment: true (default) -# # good -# foo = (bar = baz) ? a : b -# @example AllowSafeAssignment: false -# # bad -# foo = (bar = baz) ? a : b -# -# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#57 -class RuboCop::Cop::Style::TernaryParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SafeAssignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#193 - def method_name(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#69 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#100 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#183 - def below_ternary_precedence?(child); end - - # If the condition is parenthesized we recurse and check for any - # complex expressions within it. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#131 - def complex_condition?(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#89 - def condition_as_parenthesized_one_line_pattern_matching?(condition); end - - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#198 - def correct_parenthesized(corrector, condition); end - - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#208 - def correct_unparenthesized(corrector, condition); end - - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#151 - def message(node); end - - # Anything that is not a variable, constant, or method/.method call - # will be counted as a complex expression. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#141 - def non_complex_expression?(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#145 - def non_complex_send?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#113 - def offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#85 - def only_closing_parenthesis_is_last_line?(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#169 - def parenthesized?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#161 - def require_parentheses?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#165 - def require_parentheses_when_complex?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#179 - def unparenthesized_method_call?(child); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#173 - def unsafe_autocorrect?(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#212 - def whitespace_after?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#66 -RuboCop::Cop::Style::TernaryParentheses::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#67 -RuboCop::Cop::Style::TernaryParentheses::MSG_COMPLEX = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#64 -RuboCop::Cop::Style::TernaryParentheses::NON_COMPLEX_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#63 -RuboCop::Cop::Style::TernaryParentheses::VARIABLE_TYPES = T.let(T.unsafe(nil), Set) - -# Newcomers to ruby applications may write top-level methods, -# when ideally they should be organized in appropriate classes or modules. -# This cop looks for definitions of top-level methods and warns about them. -# -# However for ruby scripts it is perfectly fine to use top-level methods. -# Hence this cop is disabled by default. -# -# @example -# # bad -# def some_method -# end -# -# # bad -# def self.some_method -# end -# -# # bad -# define_method(:foo) { puts 1 } -# -# # good -# module Foo -# def some_method -# end -# end -# -# # good -# class Foo -# def self.some_method -# end -# end -# -# # good -# Struct.new do -# def some_method -# end -# end -# -# # good -# class Foo -# define_method(:foo) { puts 1 } -# end -# -# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#47 -class RuboCop::Cop::Style::TopLevelMethodDefinition < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#79 - def define_method_block?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#60 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#52 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#52 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#60 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#52 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#70 - def top_level_method_definition?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#48 -RuboCop::Cop::Style::TopLevelMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#50 -RuboCop::Cop::Style::TopLevelMethodDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for trailing code after the class definition. -# -# @example -# # bad -# class Foo; def foo; end -# end -# -# # good -# class Foo -# def foo; end -# end -# -# source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#18 -class RuboCop::Cop::Style::TrailingBodyOnClass < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::TrailingBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#25 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#25 - def on_sclass(node); end -end - -# source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#23 -RuboCop::Cop::Style::TrailingBodyOnClass::MSG = T.let(T.unsafe(nil), String) - -# Checks for trailing code after the method definition. -# -# NOTE: It always accepts endless method definitions that are basically on the same line. -# -# @example -# # bad -# def some_method; do_stuff -# end -# -# def f(x); b = foo -# b[c: x] -# end -# -# # good -# def some_method -# do_stuff -# end -# -# def f(x) -# b = foo -# b[c: x] -# end -# -# def endless_method = do_stuff -# -# source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#31 -class RuboCop::Cop::Style::TrailingBodyOnMethodDefinition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::TrailingBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#38 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#38 - def on_defs(node); end -end - -# source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#36 -RuboCop::Cop::Style::TrailingBodyOnMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -# Checks for trailing code after the module definition. -# -# @example -# # bad -# module Foo extend self -# end -# -# # good -# module Foo -# extend self -# end -# -# source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#18 -class RuboCop::Cop::Style::TrailingBodyOnModule < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::TrailingBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#25 - def on_module(node); end -end - -# source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#23 -RuboCop::Cop::Style::TrailingBodyOnModule::MSG = T.let(T.unsafe(nil), String) - -# Checks for trailing comma in argument lists. -# The supported styles are: -# -# * `consistent_comma`: Requires a comma after the last argument, -# for all parenthesized method calls with arguments. -# * `comma`: Requires a comma after the last argument, but only for -# parenthesized method calls where each argument is on its own line. -# * `no_comma`: Requires that there is no comma after the last -# argument. -# -# @example EnforcedStyleForMultiline: consistent_comma -# # bad -# method(1, 2,) -# -# # good -# method(1, 2) -# -# # good -# method( -# 1, 2, -# 3, -# ) -# -# # good -# method( -# 1, 2, 3, -# ) -# -# # good -# method( -# 1, -# 2, -# ) -# @example EnforcedStyleForMultiline: comma -# # bad -# method(1, 2,) -# -# # good -# method(1, 2) -# -# # bad -# method( -# 1, 2, -# 3, -# ) -# -# # good -# method( -# 1, 2, -# 3 -# ) -# -# # bad -# method( -# 1, 2, 3, -# ) -# -# # good -# method( -# 1, 2, 3 -# ) -# -# # good -# method( -# 1, -# 2, -# ) -# @example EnforcedStyleForMultiline: no_comma (default) -# # bad -# method(1, 2,) -# -# # good -# method(1, 2) -# -# # good -# method( -# 1, -# 2 -# ) -# -# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#87 -class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::TrailingComma - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 - def on_send(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#91 - def autocorrect_incompatible_with; end - end -end - -# Checks for trailing comma in array literals. -# The configuration options are: -# -# * `consistent_comma`: Requires a comma after the -# last item of all non-empty, multiline array literals. -# * `comma`: Requires a comma after last item in an array, -# but only when each item is on its own line. -# * `no_comma`: Does not require a comma after the -# last item in an array -# -# @example EnforcedStyleForMultiline: consistent_comma -# # bad -# a = [1, 2,] -# -# # good -# a = [1, 2] -# -# # good -# a = [ -# 1, 2, -# 3, -# ] -# -# # good -# a = [ -# 1, 2, 3, -# ] -# -# # good -# a = [ -# 1, -# 2, -# ] -# @example EnforcedStyleForMultiline: comma -# # bad -# a = [1, 2,] -# -# # good -# a = [1, 2] -# -# # bad -# a = [ -# 1, 2, -# 3, -# ] -# -# # good -# a = [ -# 1, 2, -# 3 -# ] -# -# # bad -# a = [ -# 1, 2, 3, -# ] -# -# # good -# a = [ -# 1, 2, 3 -# ] -# -# # good -# a = [ -# 1, -# 2, -# ] -# @example EnforcedStyleForMultiline: no_comma (default) -# # bad -# a = [1, 2,] -# -# # good -# a = [ -# 1, -# 2 -# ] -# -# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_array_literal.rb#84 -class RuboCop::Cop::Style::TrailingCommaInArrayLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::TrailingComma - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_array_literal.rb#88 - def on_array(node); end -end - -# Checks whether trailing commas in block arguments are -# required. Blocks with only one argument and a trailing comma require -# that comma to be present. Blocks with more than one argument never -# require a trailing comma. -# -# @example -# # bad -# add { |foo, bar,| foo + bar } -# -# # good -# add { |foo, bar| foo + bar } -# -# # good -# add { |foo,| foo } -# -# # good -# add { foo } -# -# # bad -# add do |foo, bar,| -# foo + bar -# end -# -# # good -# add do |foo, bar| -# foo + bar -# end -# -# # good -# add do |foo,| -# foo -# end -# -# # good -# add do -# foo + bar -# end -# -# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#62 -class RuboCop::Cop::Style::TrailingCommaInBlockArgs < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#67 - def on_block(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#83 - def arg_count(node); end - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#95 - def argument_tokens(node); end - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#91 - def last_comma(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#87 - def trailing_comma?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#79 - def useless_trailing_comma?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#65 -RuboCop::Cop::Style::TrailingCommaInBlockArgs::MSG = T.let(T.unsafe(nil), String) - -# Checks for trailing comma in hash literals. -# The configuration options are: -# -# * `consistent_comma`: Requires a comma after the -# last item of all non-empty, multiline hash literals. -# * `comma`: Requires a comma after the last item in a hash, -# but only when each item is on its own line. -# * `no_comma`: Does not require a comma after the -# last item in a hash -# -# @example EnforcedStyleForMultiline: consistent_comma -# -# # bad -# a = { foo: 1, bar: 2, } -# -# # good -# a = { foo: 1, bar: 2 } -# -# # good -# a = { -# foo: 1, bar: 2, -# qux: 3, -# } -# -# # good -# a = { -# foo: 1, bar: 2, qux: 3, -# } -# -# # good -# a = { -# foo: 1, -# bar: 2, -# } -# @example EnforcedStyleForMultiline: comma -# -# # bad -# a = { foo: 1, bar: 2, } -# -# # good -# a = { foo: 1, bar: 2 } -# -# # bad -# a = { -# foo: 1, bar: 2, -# qux: 3, -# } -# -# # good -# a = { -# foo: 1, bar: 2, -# qux: 3 -# } -# -# # bad -# a = { -# foo: 1, bar: 2, qux: 3, -# } -# -# # good -# a = { -# foo: 1, bar: 2, qux: 3 -# } -# -# # good -# a = { -# foo: 1, -# bar: 2, -# } -# @example EnforcedStyleForMultiline: no_comma (default) -# -# # bad -# a = { foo: 1, bar: 2, } -# -# # good -# a = { -# foo: 1, -# bar: 2 -# } -# -# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb#87 -class RuboCop::Cop::Style::TrailingCommaInHashLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::TrailingComma - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb#91 - def on_hash(node); end -end - -# Checks for trailing code after the method definition. -# -# @example -# # bad -# def some_method -# do_stuff; end -# -# def do_this(x) -# baz.map { |b| b.this(x) } end -# -# def foo -# block do -# bar -# end end -# -# # good -# def some_method -# do_stuff -# end -# -# def do_this(x) -# baz.map { |b| b.this(x) } -# end -# -# def foo -# block do -# bar -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#36 -class RuboCop::Cop::Style::TrailingMethodEndStatement < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#41 - def on_def(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#55 - def body_and_end_on_same_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#51 - def trailing_end?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#39 -RuboCop::Cop::Style::TrailingMethodEndStatement::MSG = T.let(T.unsafe(nil), String) - -# Checks for extra underscores in variable assignment. -# -# @example -# # bad -# a, b, _ = foo() -# a, b, _, = foo() -# a, _, _ = foo() -# a, _, _, = foo() -# -# # good -# a, b, = foo() -# a, = foo() -# *a, b, _ = foo() -# # => We need to know to not include 2 variables in a -# a, *b, _ = foo() -# # => The correction `a, *b, = foo()` is a syntax error -# @example AllowNamedUnderscoreVariables: true (default) -# # good -# a, b, _something = foo() -# @example AllowNamedUnderscoreVariables: false -# # bad -# a, b, _something = foo() -# -# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#31 -class RuboCop::Cop::Style::TrailingUnderscoreVariable < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#41 - def on_masgn(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#92 - def allow_named_underscore_variables; end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#125 - def children_offenses(variables); end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#57 - def find_first_offense(variables); end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#66 - def find_first_possible_offense(variables); end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#108 - def main_node_offense(node); end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#146 - def range_for_parentheses(offense, left); end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#88 - def reverse_index(collection, item); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#80 - def splat_variable_before?(first_offense, variables); end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#96 - def unneeded_ranges(node); end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#133 - def unused_range(node_type, mlhs_node, right); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#129 - def unused_variables_only?(offense, variables); end -end - -# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#38 -RuboCop::Cop::Style::TrailingUnderscoreVariable::DISALLOW = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#36 -RuboCop::Cop::Style::TrailingUnderscoreVariable::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#37 -RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil), String) - -# Looks for trivial reader/writer methods, that could -# have been created with the attr_* family of functions automatically. -# `to_ary`, `to_a`, `to_c`, `to_enum`, `to_h`, `to_hash`, `to_i`, `to_int`, `to_io`, -# `to_open`, `to_path`, `to_proc`, `to_r`, `to_regexp`, `to_str`, `to_s`, and `to_sym` methods -# are allowed by default. These are customizable with `AllowedMethods` option. -# -# @example AllowedMethods: ['allowed_method'] -# # good -# def allowed_method -# @foo -# end -# @example ExactNameMatch: true (default) -# # good -# def name -# @other_name -# end -# @example ExactNameMatch: false -# # bad -# def name -# @other_name -# end -# @example AllowPredicates: true (default) -# # good -# def foo? -# @foo -# end -# @example AllowPredicates: false -# # bad -# def foo? -# @foo -# end -# -# # good -# attr_reader :foo -# @example AllowDSLWriters: true (default) -# # good -# def on_exception(action) -# @on_exception=action -# end -# @example AllowDSLWriters: false -# # bad -# def on_exception(action) -# @on_exception=action -# end -# -# # good -# attr_writer :on_exception -# @example IgnoreClassMethods: false (default) -# # bad -# def self.foo -# @foo -# end -# -# # good -# class << self -# attr_reader :foo -# end -# @example IgnoreClassMethods: true -# # good -# def self.foo -# @foo -# end -# @example -# # bad -# def foo -# @foo -# end -# -# def bar=(val) -# @bar = val -# end -# -# def self.baz -# @baz -# end -# -# # good -# attr_reader :foo -# attr_writer :bar -# -# class << self -# attr_reader :baz -# end -# -# source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#98 -class RuboCop::Cop::Style::TrivialAccessors < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#190 - def looks_like_trivial_writer?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#104 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#104 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#222 - def accessor(kind, method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#161 - def allow_dsl_writers?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#157 - def allow_predicates?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#195 - def allowed_method_name?(node); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#169 - def allowed_method_names; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#204 - def allowed_reader?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#200 - def allowed_writer?(node); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#142 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#234 - def autocorrect_class(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#226 - def autocorrect_instance(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#173 - def dsl_writer?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#153 - def exact_name_match?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#165 - def ignore_class_methods?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#115 - def in_module_or_instance_eval?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#181 - def looks_like_trivial_reader?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#208 - def names_match?(node); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#129 - def on_method_def(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#248 - def top_level_node?(node); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#214 - def trivial_accessor_kind(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#177 - def trivial_reader?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#185 - def trivial_writer?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#102 -RuboCop::Cop::Style::TrivialAccessors::MSG = T.let(T.unsafe(nil), String) - -# Looks for `unless` expressions with `else` clauses. -# -# @example -# # bad -# unless foo_bar.nil? -# # do something... -# else -# # do a different thing... -# end -# -# # good -# if foo_bar.present? -# # do something... -# else -# # do a different thing... -# end -# -# source://rubocop//lib/rubocop/cop/style/unless_else.rb#22 -class RuboCop::Cop::Style::UnlessElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/unless_else.rb#28 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/unless_else.rb#45 - def range_between_condition_and_else(node, condition); end - - # source://rubocop//lib/rubocop/cop/style/unless_else.rb#49 - def range_between_else_and_end(node); end -end - -# source://rubocop//lib/rubocop/cop/style/unless_else.rb#26 -RuboCop::Cop::Style::UnlessElse::MSG = T.let(T.unsafe(nil), String) - -# Checks for the use of logical operators in an `unless` condition. -# It discourages such code, as the condition becomes more difficult -# to read and understand. -# -# This cop supports two styles: -# -# - `forbid_mixed_logical_operators` (default) -# - `forbid_logical_operators` -# -# `forbid_mixed_logical_operators` style forbids the use of more than one type -# of logical operators. This makes the `unless` condition easier to read -# because either all conditions need to be met or any condition need to be met -# in order for the expression to be truthy or falsey. -# -# `forbid_logical_operators` style forbids any use of logical operator. -# This makes it even more easy to read the `unless` condition as -# there is only one condition in the expression. -# -# @example EnforcedStyle: forbid_mixed_logical_operators (default) -# # bad -# return unless a || b && c -# return unless a && b || c -# return unless a && b and c -# return unless a || b or c -# return unless a && b or c -# return unless a || b and c -# -# # good -# return unless a && b && c -# return unless a || b || c -# return unless a and b and c -# return unless a or b or c -# return unless a? -# @example EnforcedStyle: forbid_logical_operators -# # bad -# return unless a || b -# return unless a && b -# return unless a or b -# return unless a and b -# -# # good -# return unless a -# return unless a? -# -# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#50 -class RuboCop::Cop::Style::UnlessLogicalOperators < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#62 - def and_with_or?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#67 - def logical_operator?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#71 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#57 - def or_with_and?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#83 - def mixed_logical_operator?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#90 - def mixed_precedence_and?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#97 - def mixed_precedence_or?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#54 -RuboCop::Cop::Style::UnlessLogicalOperators::FORBID_LOGICAL_OPERATORS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#53 -RuboCop::Cop::Style::UnlessLogicalOperators::FORBID_MIXED_LOGICAL_OPERATORS = T.let(T.unsafe(nil), String) - -# Checks for accessing the first element of `String#unpack` -# which can be replaced with the shorter method `unpack1`. -# -# @example -# -# # bad -# 'foo'.unpack('h*').first -# 'foo'.unpack('h*')[0] -# 'foo'.unpack('h*').slice(0) -# 'foo'.unpack('h*').at(0) -# -# # good -# 'foo'.unpack1('h*') -# -# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#20 -class RuboCop::Cop::Style::UnpackFirst < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#37 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#37 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#30 - def unpack_and_first_element?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#53 - def first_element_range(node, unpack_call); end -end - -# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#26 -RuboCop::Cop::Style::UnpackFirst::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#27 -RuboCop::Cop::Style::UnpackFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for variable interpolation (like "#@ivar"). -# -# @example -# # bad -# "His name is #$name" -# /check #$pattern/ -# "Let's go to the #@store" -# -# # good -# "His name is #{$name}" -# /check #{$pattern}/ -# "Let's go to the #{@store}" -# -# source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#18 -class RuboCop::Cop::Style::VariableInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#25 - def on_node_with_interpolations(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#35 - def message(range); end - - # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#39 - def var_nodes(nodes); end -end - -# source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#22 -RuboCop::Cop::Style::VariableInterpolation::MSG = T.let(T.unsafe(nil), String) - -# Checks for `when;` uses in `case` expressions. -# -# @example -# # bad -# case foo -# when 1; 'baz' -# when 2; 'bar' -# end -# -# # good -# case foo -# when 1 then 'baz' -# when 2 then 'bar' -# end -# -# source://rubocop//lib/rubocop/cop/style/when_then.rb#20 -class RuboCop::Cop::Style::WhenThen < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/when_then.rb#25 - def on_when(node); end -end - -# source://rubocop//lib/rubocop/cop/style/when_then.rb#23 -RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of `do` in multi-line `while/until` statements. -# -# @example -# -# # bad -# while x.any? do -# do_something(x.pop) -# end -# -# # good -# while x.any? -# do_something(x.pop) -# end -# @example -# -# # bad -# until x.empty? do -# do_something(x.pop) -# end -# -# # good -# until x.empty? -# do_something(x.pop) -# end -# -# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#31 -class RuboCop::Cop::Style::WhileUntilDo < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#36 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#36 - def on_while(node); end -end - -# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 -RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) - -# Checks for while and until statements that would fit on one line -# if written as a modifier while/until. The maximum line length is -# configured in the `Layout/LineLength` cop. -# -# @example -# # bad -# while x < 10 -# x += 1 -# end -# -# # good -# x += 1 while x < 10 -# @example -# # bad -# until x > 10 -# x += 1 -# end -# -# # good -# x += 1 until x > 10 -# @example -# # bad -# x += 100 while x < 500 # a long comment that makes code too long if it were a single line -# -# # good -# while x < 500 # a long comment that makes code too long if it were a single line -# x += 100 -# end -# -# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#36 -class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::StatementModifier - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#42 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#42 - def on_while(node); end -end - -# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#40 -RuboCop::Cop::Style::WhileUntilModifier::MSG = T.let(T.unsafe(nil), String) - -# Checks for array literals made up of word-like -# strings, that are not using the %w() syntax. -# -# Alternatively, it can check for uses of the %w() syntax, in projects -# which do not want to include that syntax. -# -# NOTE: When using the `percent` style, %w() arrays containing a space -# will be registered as offenses. -# -# Configuration option: MinSize -# If set, arrays with fewer elements than this value will not trigger the -# cop. For example, a `MinSize` of `3` will not enforce a style on an -# array of 2 or fewer elements. -# -# @example EnforcedStyle: percent (default) -# # good -# %w[foo bar baz] -# -# # bad -# ['foo', 'bar', 'baz'] -# -# # bad (contains spaces) -# %w[foo\ bar baz\ quux] -# -# # bad -# [ -# ['one', 'One'], -# ['two', 'Two'] -# ] -# -# # good -# [ -# %w[one One], -# %w[two Two] -# ] -# -# # good (2d array containing spaces) -# [ -# ['one', 'One'], -# ['two', 'Two'], -# ['forty two', 'Forty Two'] -# ] -# @example EnforcedStyle: brackets -# # good -# ['foo', 'bar', 'baz'] -# -# # bad -# %w[foo bar baz] -# -# # good (contains spaces) -# ['foo bar', 'baz quux'] -# -# # good -# [ -# ['one', 'One'], -# ['two', 'Two'] -# ] -# -# # bad -# [ -# %w[one One], -# %w[two Two] -# ] -# -# source://rubocop//lib/rubocop/cop/style/word_array.rb#71 -class RuboCop::Cop::Style::WordArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ArrayMinSize - include ::RuboCop::Cop::ArraySyntax - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::PercentArray - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/word_array.rb#94 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/style/word_array.rb#85 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/word_array.rb#138 - def build_bracketed_array(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/word_array.rb#118 - def complex_content?(strings, complex_regex: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/word_array.rb#129 - def invalid_percent_array_contents?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/word_array.rb#113 - def matrix_of_complex_content?(array); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/word_array.rb#107 - def within_matrix_of_complex_content?(node); end - - # source://rubocop//lib/rubocop/cop/style/word_array.rb#134 - def word_regex; end - - class << self - # Returns the value of attribute largest_brackets. - # - # source://rubocop//lib/rubocop/cop/style/word_array.rb#82 - def largest_brackets; end - - # Sets the attribute largest_brackets - # - # @param value the value to set the attribute largest_brackets to. - # - # source://rubocop//lib/rubocop/cop/style/word_array.rb#82 - def largest_brackets=(_arg0); end - end -end - -# source://rubocop//lib/rubocop/cop/style/word_array.rb#79 -RuboCop::Cop::Style::WordArray::ARRAY_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/word_array.rb#78 -RuboCop::Cop::Style::WordArray::PERCENT_MSG = T.let(T.unsafe(nil), String) - -# Checks for the use of `YAML.load`, `YAML.safe_load`, and `YAML.parse` with -# `File.read` argument. -# -# NOTE: `YAML.safe_load_file` was introduced in Ruby 3.0. -# -# @example -# -# # bad -# YAML.load(File.read(path)) -# YAML.parse(File.read(path)) -# -# # good -# YAML.load_file(path) -# YAML.parse_file(path) -# -# # bad -# YAML.safe_load(File.read(path)) # Ruby 3.0 and newer -# -# # good -# YAML.safe_load_file(path) # Ruby 3.0 and newer -# -# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#27 -class RuboCop::Cop::Style::YAMLFileRead < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#41 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#34 - def yaml_file_read?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#60 - def offense_range(node); end -end - -# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#30 -RuboCop::Cop::Style::YAMLFileRead::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#31 -RuboCop::Cop::Style::YAMLFileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces or forbids Yoda conditions, -# i.e. comparison operations where the order of expression is reversed. -# eg. `5 == x` -# -# @example EnforcedStyle: forbid_for_all_comparison_operators (default) -# # bad -# 99 == foo -# "bar" != foo -# 42 >= foo -# 10 < bar -# 99 == CONST -# -# # good -# foo == 99 -# foo == "bar" -# foo <= 42 -# bar > 10 -# CONST == 99 -# "#{interpolation}" == foo -# /#{interpolation}/ == foo -# @example EnforcedStyle: forbid_for_equality_operators_only -# # bad -# 99 == foo -# "bar" != foo -# -# # good -# 99 >= foo -# 3 < a && a < 5 -# @example EnforcedStyle: require_for_all_comparison_operators -# # bad -# foo == 99 -# foo == "bar" -# foo <= 42 -# bar > 10 -# -# # good -# 99 == foo -# "bar" != foo -# 42 >= foo -# 10 < bar -# @example EnforcedStyle: require_for_equality_operators_only -# # bad -# 99 >= foo -# 3 < a && a < 5 -# -# # good -# 99 == foo -# "bar" != foo -# -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#77 -class RuboCop::Cop::Style::YodaCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#90 - def file_constant_equal_program_name?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#94 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#149 - def actual_code_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#145 - def constant_portion?(node); end - - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#138 - def corrected_code(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#107 - def enforce_yoda?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#112 - def equality_only?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#173 - def interpolation?(node); end - - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#134 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#157 - def non_equality_operator?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#161 - def noncommutative_operator?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#169 - def program_name?(name); end - - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#153 - def reverse_comparison(operator); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#165 - def source_file_path_constant?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#122 - def valid_yoda?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#117 - def yoda_compatible_condition?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#84 -RuboCop::Cop::Style::YodaCondition::EQUALITY_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#82 -RuboCop::Cop::Style::YodaCondition::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#85 -RuboCop::Cop::Style::YodaCondition::NONCOMMUTATIVE_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#86 -RuboCop::Cop::Style::YodaCondition::PROGRAM_NAMES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#87 -RuboCop::Cop::Style::YodaCondition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#83 -RuboCop::Cop::Style::YodaCondition::REVERSE_COMPARISON = T.let(T.unsafe(nil), Hash) - -# Forbids Yoda expressions, i.e. binary operations (using `*`, `+`, `&`, `|`, -# and `^` operators) where the order of expression is reversed, eg. `1 + x`. -# This cop complements `Style/YodaCondition` cop, which has a similar purpose. -# -# This cop is disabled by default to respect user intentions such as: -# -# [source,ruby] -# ---- -# config.server_port = 9000 + ENV["TEST_ENV_NUMBER"].to_i -# ---- -# -# @example SupportedOperators: ['*', '+', '&', '|', '^'] (default) -# # bad -# 10 * y -# 1 + x -# 1 & z -# 1 | x -# 1 ^ x -# 1 + CONST -# -# # good -# y * 10 -# x + 1 -# z & 1 -# x | 1 -# x ^ 1 -# CONST + 1 -# 60 * 24 -# -# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#40 -class RuboCop::Cop::Style::YodaExpression < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#47 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#51 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#73 - def constant_portion?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#81 - def offended_ancestor?(node); end - - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#85 - def offended_nodes; end - - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#77 - def supported_operators; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#69 - def yoda_expression_constant?(lhs, rhs); end -end - -# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#43 -RuboCop::Cop::Style::YodaExpression::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#45 -RuboCop::Cop::Style::YodaExpression::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for numeric comparisons that can be replaced -# by a predicate method, such as `receiver.length == 0`, -# `receiver.length > 0`, and `receiver.length != 0`, -# `receiver.length < 1` and `receiver.size == 0` that can be -# replaced by `receiver.empty?` and `!receiver.empty?`. -# -# NOTE: `File`, `Tempfile`, and `StringIO` do not have `empty?` -# so allow `size == 0` and `size.zero?`. -# -# @example -# # bad -# [1, 2, 3].length == 0 -# 0 == "foobar".length -# array.length < 1 -# {a: 1, b: 2}.length != 0 -# string.length > 0 -# hash.size > 0 -# -# # good -# [1, 2, 3].empty? -# "foobar".empty? -# array.empty? -# !{a: 1, b: 2}.empty? -# !string.empty? -# !hash.empty? -# -# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#37 -class RuboCop::Cop::Style::ZeroLengthPredicate < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # Some collection like objects in the Ruby standard library - # implement `#size`, but not `#empty`. We ignore those to - # reduce false positives. - # - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#139 - def non_polymorphic_collection?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#109 - def nonzero_length_comparison(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#45 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#130 - def other_receiver(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#101 - def zero_length_comparison(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#96 - def zero_length_predicate(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#122 - def zero_length_receiver(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#80 - def check_nonzero_length_comparison(node); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#65 - def check_zero_length_comparison(node); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#53 - def check_zero_length_predicate(node); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#114 - def replacement(node); end -end - -# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#41 -RuboCop::Cop::Style::ZeroLengthPredicate::NONZERO_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#43 -RuboCop::Cop::Style::ZeroLengthPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#40 -RuboCop::Cop::Style::ZeroLengthPredicate::ZERO_MSG = T.let(T.unsafe(nil), String) - -# Common functionality for checking and correcting surrounding whitespace. -# -# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#6 -module RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::RangeHelp - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#110 - def empty_brackets?(left_bracket_token, right_bracket_token, tokens: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#104 - def empty_offense(node, range, message, command); end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#94 - def empty_offenses(node, left, right, message); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#68 - def extra_space?(token, side); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#129 - def no_character_between?(left_bracket_token, right_bracket_token); end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#38 - def no_space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#120 - def offending_empty_no_space?(config, left_token, right_token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#116 - def offending_empty_space?(config, left_token, right_token); end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#33 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#78 - def reposition(src, pos, step, include_newlines: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#16 - def side_space_range(range:, side:, include_newlines: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#124 - def space_between?(left_bracket_token, right_bracket_token); end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#85 - def space_offense(node, token, side, message, command); end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#53 - def space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#9 -RuboCop::Cop::SurroundingSpace::NO_SPACE_COMMAND = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#12 -RuboCop::Cop::SurroundingSpace::SINGLE_SPACE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#10 -RuboCop::Cop::SurroundingSpace::SPACE_COMMAND = T.let(T.unsafe(nil), String) - -# Classes that include this module just implement functions for working -# with symbol nodes. -# -# source://rubocop//lib/rubocop/cop/mixin/symbol_help.rb#7 -module RuboCop::Cop::SymbolHelp - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/symbol_help.rb#8 - def hash_key?(node); end -end - -# Common functionality for checking target ruby version. -# -# source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#6 -module RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#11 - def minimum_target_ruby_version(version); end - - # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#7 - def required_minimum_ruby_version; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#15 - def support_target_ruby_version?(version); end -end - -# A group of cops, ready to be called on duty to inspect files. -# Team is responsible for selecting only relevant cops to be sent on duty, -# as well as insuring that the needed forces are sent along with them. -# -# For performance reasons, Team will first dispatch cops & forces in two groups, -# first the ones needed for autocorrection (if any), then the rest -# (unless autocorrections happened). -# -# source://rubocop//lib/rubocop/cop/team.rb#12 -class RuboCop::Cop::Team - # @return [Team] a new instance of Team - # - # source://rubocop//lib/rubocop/cop/team.rb#55 - def initialize(cops, config = T.unsafe(nil), options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/team.rb#66 - def autocorrect?; end - - # Returns the value of attribute cops. - # - # source://rubocop//lib/rubocop/cop/team.rb#51 - def cops; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/team.rb#70 - def debug?; end - - # Returns the value of attribute errors. - # - # source://rubocop//lib/rubocop/cop/team.rb#51 - def errors; end - - # source://rubocop//lib/rubocop/cop/team.rb#114 - def external_dependency_checksum; end - - # @deprecated - # - # source://rubocop//lib/rubocop/cop/team.rb#110 - def forces; end - - # source://rubocop//lib/rubocop/cop/team.rb#76 - def inspect_file(processed_source); end - - # @return [Commissioner::InvestigationReport] - # - # source://rubocop//lib/rubocop/cop/team.rb#81 - def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end - - # Returns the value of attribute updated_source_file. - # - # source://rubocop//lib/rubocop/cop/team.rb#51 - def updated_source_file; end - - # Returns the value of attribute updated_source_file. - # - # source://rubocop//lib/rubocop/cop/team.rb#51 - def updated_source_file?; end - - # Returns the value of attribute warnings. - # - # source://rubocop//lib/rubocop/cop/team.rb#51 - def warnings; end - - private - - # source://rubocop//lib/rubocop/cop/team.rb#121 - def autocorrect(processed_source, report, original:, offset:); end - - # source://rubocop//lib/rubocop/cop/team.rb#185 - def autocorrect_report(report, offset:, original:); end - - # source://rubocop//lib/rubocop/cop/team.rb#140 - def be_ready; end - - # source://rubocop//lib/rubocop/cop/team.rb#191 - def collate_corrections(report, offset:, original:); end - - # source://rubocop//lib/rubocop/cop/team.rb#207 - def each_corrector(report); end - - # source://rubocop//lib/rubocop/cop/team.rb#259 - def handle_error(error, location, cop); end - - # source://rubocop//lib/rubocop/cop/team.rb#251 - def handle_warning(error, location); end - - # @return [Commissioner::InvestigationReport] - # - # source://rubocop//lib/rubocop/cop/team.rb#154 - def investigate_partial(cops, processed_source, offset:, original:); end - - # source://rubocop//lib/rubocop/cop/team.rb#234 - def process_errors(file, errors); end - - # source://rubocop//lib/rubocop/cop/team.rb#148 - def reset; end - - # @return [Array] - # - # source://rubocop//lib/rubocop/cop/team.rb#160 - def roundup_relevant_cops(processed_source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/team.rb#176 - def support_target_rails_version?(cop); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/team.rb#170 - def support_target_ruby_version?(cop); end - - # source://rubocop//lib/rubocop/cop/team.rb#222 - def suppress_clobbering; end - - # source://rubocop//lib/rubocop/cop/team.rb#228 - def validate_config; end - - class << self - # @return [Array] needed for the given cops - # - # source://rubocop//lib/rubocop/cop/team.rb#37 - def forces_for(cops); end - - # @return [Team] with cops assembled from the given `cop_classes` - # - # source://rubocop//lib/rubocop/cop/team.rb#22 - def mobilize(cop_classes, config, options = T.unsafe(nil)); end - - # @return [Array] - # - # source://rubocop//lib/rubocop/cop/team.rb#28 - def mobilize_cops(cop_classes, config, options = T.unsafe(nil)); end - - # @return [Team] - # - # source://rubocop//lib/rubocop/cop/team.rb#14 - def new(cop_or_classes, config, options = T.unsafe(nil)); end - end -end - -# Common methods shared by TrailingBody cops -# -# source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#6 -module RuboCop::Cop::TrailingBody - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#12 - def body_on_first_line?(node, body); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#16 - def first_part_of(body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#7 - def trailing_body?(node); end -end - -# Common methods shared by Style/TrailingCommaInArguments and -# Style/TrailingCommaInLiteral -# -# source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#7 -module RuboCop::Cop::TrailingComma - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - private - - # A single argument with the closing bracket on the same line as the end - # of the argument is not considered multiline, even if the argument - # itself might span multiple lines. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#104 - def allowed_multiline_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#167 - def any_heredoc?(items); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#159 - def autocorrect_range(item); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#133 - def avoid_comma(kind, comma_begin_pos, extra_info); end - - # Returns true if the node has round/square/curly brackets. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#82 - def brackets?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#19 - def check(node, items, kind, begin_pos, end_pos); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#37 - def check_comma(node, kind, comma_pos); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#43 - def check_literal(node, kind); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#30 - def comma_offset(items, range); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#108 - def elements(node); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#54 - def extra_avoid_comma_info; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#171 - def heredoc?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#189 - def heredoc_send?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#76 - def inside_comment?(range, comma_offset); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#93 - def method_name_and_arguments_on_same_line?(node); end - - # Returns true if the round/square/curly brackets of the given node are - # on different lines, each item within is on its own line, and the - # closing bracket is on its own line. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#89 - def multiline?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#123 - def no_elements_on_same_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#129 - def on_same_line?(range1, range2); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#147 - def put_comma(items, kind); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#65 - def should_have_comma?(style, node); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#15 - def style_parameter_name; end -end - -# source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#11 -RuboCop::Cop::TrailingComma::MSG = T.let(T.unsafe(nil), String) - -# Common functionality shared by Uncommunicative cops -# -# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#6 -module RuboCop::Cop::UncommunicativeName - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#12 - def check(node, args); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#95 - def allow_nums; end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#87 - def allowed_names; end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#78 - def arg_range(arg, length); end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#45 - def case_offense(node, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#64 - def ends_with_num?(name); end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#91 - def forbidden_names; end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#83 - def forbidden_offense(node, range, name); end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#36 - def issue_offenses(node, range, name); end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#68 - def length_offense(node, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#74 - def long_enough?(name); end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#99 - def min_length; end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#53 - def name_type(node); end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#60 - def num_offense(node, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#49 - def uppercase?(name); end -end - -# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#7 -RuboCop::Cop::UncommunicativeName::CASE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#10 -RuboCop::Cop::UncommunicativeName::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#9 -RuboCop::Cop::UncommunicativeName::LENGTH_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#8 -RuboCop::Cop::UncommunicativeName::NUM_MSG = T.let(T.unsafe(nil), String) - -# This autocorrects unused arguments. -# -# source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#6 -class RuboCop::Cop::UnusedArgCorrector - extend ::RuboCop::Cop::RangeHelp - - class << self - # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#12 - def correct(corrector, processed_source, node); end - - # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#31 - def correct_for_blockarg_type(corrector, node); end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#10 - def processed_source; end - end -end - -# This module contains a collection of useful utility methods. -# -# source://rubocop//lib/rubocop/cop/util.rb#7 -module RuboCop::Cop::Util - include ::RuboCop::PathUtil - - private - - # source://rubocop//lib/rubocop/cop/util.rb#35 - def add_parentheses(node, corrector); end - - # source://rubocop//lib/rubocop/cop/util.rb#56 - def any_descendant?(node, *types); end - - # source://rubocop//lib/rubocop/cop/util.rb#71 - def args_begin(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#83 - def args_end(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#104 - def begins_its_line?(range); end - - # This is a bad API - # - # source://rubocop//lib/rubocop/cop/util.rb#17 - def comment_line?(line_source); end - - # @deprecated Use `ProcessedSource#line_with_comment?`, `contains_comment?` or similar - # - # source://rubocop//lib/rubocop/cop/util.rb#22 - def comment_lines?(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#192 - def compatible_external_encoding_for?(src); end - - # If converting a string to Ruby string literal source code, must - # double quotes be used? - # - # source://rubocop//lib/rubocop/cop/util.rb#130 - def double_quotes_required?(string); end - - # source://rubocop//lib/rubocop/cop/util.rb#144 - def escape_string(string); end - - # Returns, for example, a bare `if` node if the given node is an `if` - # with calls chained to the end of it. - # - # source://rubocop//lib/rubocop/cop/util.rb#114 - def first_part_of_call_chain(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#197 - def include_or_equal?(source, target); end - - # source://rubocop//lib/rubocop/cop/util.rb#179 - def indent(node, offset: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/util.rb#161 - def interpret_string_escapes(string); end - - # source://rubocop//lib/rubocop/cop/util.rb#165 - def line(node_or_range); end - - # source://rubocop//lib/rubocop/cop/util.rb#26 - def line_range(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#140 - def needs_escaping?(string); end - - # source://rubocop//lib/rubocop/cop/util.rb#87 - def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end - - # source://rubocop//lib/rubocop/cop/util.rb#30 - def parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#173 - def same_line?(node1, node2); end - - # source://rubocop//lib/rubocop/cop/util.rb#148 - def to_string_literal(string); end - - # source://rubocop//lib/rubocop/cop/util.rb#185 - def to_supported_styles(enforced_style); end - - # source://rubocop//lib/rubocop/cop/util.rb#157 - def trim_string_interpolation_escape_character(str); end - - class << self - # source://rubocop//lib/rubocop/cop/util.rb#35 - def add_parentheses(node, corrector); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#56 - def any_descendant?(node, *types); end - - # source://rubocop//lib/rubocop/cop/util.rb#71 - def args_begin(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#83 - def args_end(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#104 - def begins_its_line?(range); end - - # This is a bad API - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#17 - def comment_line?(line_source); end - - # @deprecated Use `ProcessedSource#line_with_comment?`, `contains_comment?` or similar - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#22 - def comment_lines?(node); end - - # If converting a string to Ruby string literal source code, must - # double quotes be used? - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#130 - def double_quotes_required?(string); end - - # source://rubocop//lib/rubocop/cop/util.rb#144 - def escape_string(string); end - - # Returns, for example, a bare `if` node if the given node is an `if` - # with calls chained to the end of it. - # - # source://rubocop//lib/rubocop/cop/util.rb#114 - def first_part_of_call_chain(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#179 - def indent(node, offset: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/util.rb#161 - def interpret_string_escapes(string); end - - # source://rubocop//lib/rubocop/cop/util.rb#165 - def line(node_or_range); end - - # source://rubocop//lib/rubocop/cop/util.rb#26 - def line_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#140 - def needs_escaping?(string); end - - # @yield [sexp] - # - # source://rubocop//lib/rubocop/cop/util.rb#87 - def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#30 - def parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#173 - def same_line?(node1, node2); end - - # source://rubocop//lib/rubocop/cop/util.rb#148 - def to_string_literal(string); end - - # source://rubocop//lib/rubocop/cop/util.rb#185 - def to_supported_styles(enforced_style); end - - # source://rubocop//lib/rubocop/cop/util.rb#157 - def trim_string_interpolation_escape_character(str); end - end -end - -# source://rubocop//lib/rubocop/cop/util.rb#99 -RuboCop::Cop::Util::LINE_BEGINS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) - -# Match literal regex characters, not including anchors, character -# classes, alternatives, groups, repetitions, references, etc -# -# source://rubocop//lib/rubocop/cop/util.rb#12 -RuboCop::Cop::Util::LITERAL_REGEX = T.let(T.unsafe(nil), Regexp) - -# Arbitrarily chosen value, should be enough to cover -# the most nested source code in real world projects. -# -# source://rubocop//lib/rubocop/cop/util.rb#98 -RuboCop::Cop::Util::MAX_LINE_BEGINS_REGEX_INDEX = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#5 -module RuboCop::Cop::Utils; end - -# Parses {Kernel#sprintf} format strings. -# -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#7 -class RuboCop::Cop::Utils::FormatString - # @return [FormatString] a new instance of FormatString - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#89 - def initialize(string); end - - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#93 - def format_sequences; end - - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#105 - def max_digit_dollar_num; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#101 - def named_interpolation?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#97 - def valid?; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#117 - def mixed_formats?; end - - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#111 - def parse; end -end - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#8 -RuboCop::Cop::Utils::FormatString::DIGIT_DOLLAR = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#9 -RuboCop::Cop::Utils::FormatString::FLAG = T.let(T.unsafe(nil), Regexp) - -# The syntax of a format sequence is as follows. -# -# ``` -# %[flags][width][.precision]type -# ``` -# -# A format sequence consists of a percent sign, followed by optional -# flags, width, and precision indicators, then terminated with a field -# type character. -# -# For more complex formatting, Ruby supports a reference by name. -# -# @see https://ruby-doc.org/core-2.6.3/Kernel.html#method-i-format -# -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#43 -class RuboCop::Cop::Utils::FormatString::FormatSequence - # @return [FormatSequence] a new instance of FormatSequence - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#46 - def initialize(match); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#61 - def annotated?; end - - # Number of arguments required for the format sequence - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#70 - def arity; end - - # Returns the value of attribute begin_pos. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 - def begin_pos; end - - # Returns the value of attribute end_pos. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 - def end_pos; end - - # Returns the value of attribute flags. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 - def flags; end - - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#74 - def max_digit_dollar_num; end - - # Returns the value of attribute name. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 - def name; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#57 - def percent?; end - - # Returns the value of attribute precision. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 - def precision; end - - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#78 - def style; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#65 - def template?; end - - # Returns the value of attribute type. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 - def type; end - - # Returns the value of attribute width. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 - def width; end -end - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#15 -RuboCop::Cop::Utils::FormatString::NAME = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#11 -RuboCop::Cop::Utils::FormatString::NUMBER = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#10 -RuboCop::Cop::Utils::FormatString::NUMBER_ARG = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#13 -RuboCop::Cop::Utils::FormatString::PRECISION = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#18 -RuboCop::Cop::Utils::FormatString::SEQUENCE = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#16 -RuboCop::Cop::Utils::FormatString::TEMPLATE_NAME = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#14 -RuboCop::Cop::Utils::FormatString::TYPE = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#12 -RuboCop::Cop::Utils::FormatString::WIDTH = T.let(T.unsafe(nil), Regexp) - -# Helper to abstract complexity of building range pairs -# with octal escape reconstruction (needed for regexp_parser < 2.7). -# -# source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#8 -class RuboCop::Cop::Utils::RegexpRanges - # @return [RegexpRanges] a new instance of RegexpRanges - # - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#11 - def initialize(root); end - - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#18 - def compound_token; end - - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#24 - def pairs; end - - # Returns the value of attribute root. - # - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#9 - def root; end - - private - - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#78 - def compose_range(expressions, current); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#90 - def escaped_octal?(expr); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#94 - def octal_digit?(char); end - - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#98 - def pop_octal_digits(expressions); end - - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#44 - def populate(expr); end - - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#32 - def populate_all; end - - # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#63 - def process_set(expressions, current); end -end - -# This force provides a way to track local variables and scopes of Ruby. -# Cops interact with this force need to override some of the hook methods. -# -# def before_entering_scope(scope, variable_table) -# end -# -# def after_entering_scope(scope, variable_table) -# end -# -# def before_leaving_scope(scope, variable_table) -# end -# -# def after_leaving_scope(scope, variable_table) -# end -# -# def before_declaring_variable(variable, variable_table) -# end -# -# def after_declaring_variable(variable, variable_table) -# end -# -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#27 -class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force - # Starting point. - # - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#76 - def investigate(processed_source); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#85 - def process_node(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#71 - def variable_table; end - - private - - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 - def after_declaring_variable(arg); end - - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 - def after_entering_scope(arg); end - - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 - def after_leaving_scope(arg); end - - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 - def before_declaring_variable(arg); end - - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 - def before_entering_scope(arg); end - - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 - def before_leaving_scope(arg); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#339 - def descendant_reference(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#329 - def each_descendant_reference(loop_node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#314 - def find_variables_in_loop(loop_node); end - - # This is called for each scope recursively. - # - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#94 - def inspect_variables_in_scope(scope_node); end - - # Mark all assignments which are referenced in the same loop - # as referenced by ignoring AST order since they would be referenced - # in next iteration. - # - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#295 - def mark_assignments_as_referenced_in_loop(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#126 - def node_handler_method_name(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#100 - def process_children(origin_node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#231 - def process_loop(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#160 - def process_regexp_named_captures(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#246 - def process_rescue(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#265 - def process_scope(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#284 - def process_send(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#142 - def process_variable_assignment(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#130 - def process_variable_declaration(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#219 - def process_variable_multiple_assignment(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#184 - def process_variable_operator_assignment(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#226 - def process_variable_referencing(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#257 - def process_zero_arity_super(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#178 - def regexp_captured_names(node); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#351 - def scanned_node?(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#355 - def scanned_nodes; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#108 - def skip_children!; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#278 - def twisted_nodes(node); end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#32 -RuboCop::Cop::VariableForce::ARGUMENT_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) - -# This class represents each assignment of a variable. -# -# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#7 -class RuboCop::Cop::VariableForce::Assignment - include ::RuboCop::Cop::VariableForce::Branchable - - # @return [Assignment] a new instance of Assignment - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#16 - def initialize(node, variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#50 - def exception_assignment?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#72 - def for_assignment?; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#83 - def meta_assignment_node; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#60 - def multiple_assignment?; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#29 - def name; end - - # Returns the value of attribute node. - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 - def node; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#78 - def operator; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#54 - def operator_assignment?; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#37 - def reference!(node); end - - # Returns the value of attribute referenced. - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 - def referenced; end - - # Returns the value of attribute referenced. - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 - def referenced?; end - - # Returns the value of attribute references. - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 - def references; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#46 - def regexp_named_capture?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#66 - def rest_assignment?; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#33 - def scope; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#42 - def used?; end - - # Returns the value of attribute variable. - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 - def variable; end - - private - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#125 - def find_multiple_assignment_node(grandparent_node); end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#121 - def for_assignment_node; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#104 - def multiple_assignment_node; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#96 - def operator_assignment_node; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#114 - def rest_assignment_node; end -end - -# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#10 -RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T.unsafe(nil), Symbol) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#65 -class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#66 - def assignment?; end - - # Returns the value of attribute node - # - # @return [Object] the current value of node - def node; end - - # Sets the attribute node - # - # @param value [Object] the value to set the attribute node to. - # @return [Object] the newly set value - def node=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Namespace for branch classes for each control structure. -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#7 -module RuboCop::Cop::VariableForce::Branch - class << self - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#8 - def of(target_node, scope: T.unsafe(nil)); end - end -end - -# left_body && right_body -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#265 -class RuboCop::Cop::VariableForce::Branch::And < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::LogicalOperator - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def left_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def right_body?; end -end - -# Abstract base class for branch classes. -# A branch represents a conditional branch in a scope. -# -# @example -# def some_scope -# do_something # no branch -# -# if foo -# do_something # branch A -# do_something # branch A -# else -# do_something # branch B -# if bar -# do_something # branch C (whose parent is branch B) -# end -# end -# -# do_something # no branch -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#42 -class RuboCop::Cop::VariableForce::Branch::Base < ::Struct - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#121 - def ==(other); end - - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#92 - def always_run?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#88 - def branched?; end - - # Returns the value of attribute child_node - # - # @return [Object] the current value of child_node - def child_node; end - - # Sets the attribute child_node - # - # @param value [Object] the value to set the attribute child_node to. - # @return [Object] the newly set value - def child_node=(_); end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#70 - def control_node; end - - # @yield [_self] - # @yieldparam _self [RuboCop::Cop::VariableForce::Branch::Base] the object that the method was called on - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#80 - def each_ancestor(include_self: T.unsafe(nil), &block); end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#121 - def eql?(other); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#104 - def exclusive_with?(other); end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#129 - def hash; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#96 - def may_jump_to_other_branch?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#100 - def may_run_incompletely?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#74 - def parent; end - - # Returns the value of attribute scope - # - # @return [Object] the current value of scope - def scope; end - - # Sets the attribute scope - # - # @param value [Object] the value to set the attribute scope to. - # @return [Object] the newly set value - def scope=(_); end - - private - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#135 - def scan_ancestors; end - - class << self - def [](*_arg0); end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#43 - def classes; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#56 - def define_predicate(name, child_index: T.unsafe(nil)); end - - # @private - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#47 - def inherited(subclass); end - - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#52 - def type; end - end -end - -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#325 -RuboCop::Cop::VariableForce::Branch::CLASSES_BY_TYPE = T.let(T.unsafe(nil), Hash) - -# case target -# when /pattern/ # when_clause -# else -# else_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#219 -class RuboCop::Cop::VariableForce::Branch::Case < ::RuboCop::Cop::VariableForce::Branch::Base - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#224 - def always_run?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def else_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def target?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def when_clause?; end -end - -# case target -# in pattern # in_pattern -# else -# else_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#234 -class RuboCop::Cop::VariableForce::Branch::CaseMatch < ::RuboCop::Cop::VariableForce::Branch::Base - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#239 - def always_run?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def else_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def in_pattern?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def target?; end -end - -# begin -# main_body -# ensure -# ensure_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#314 -class RuboCop::Cop::VariableForce::Branch::Ensure < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::ExceptionHandler - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#320 - def always_run?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def ensure_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def main_body?; end -end - -# Mix-in module for exception handling control structures. -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#281 -module RuboCop::Cop::VariableForce::Branch::ExceptionHandler - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#282 - def may_jump_to_other_branch?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#286 - def may_run_incompletely?; end -end - -# for element in collection -# loop_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#247 -class RuboCop::Cop::VariableForce::Branch::For < ::RuboCop::Cop::VariableForce::Branch::Base - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#252 - def always_run?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def collection?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def element?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def loop_body?; end -end - -# if conditional_clause -# truthy_body -# else -# falsey_body -# end -# -# unless conditional_clause -# falsey_body -# else -# truthy_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#166 -class RuboCop::Cop::VariableForce::Branch::If < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def conditional_clause?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def falsey_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def truthy_body?; end -end - -# Mix-in module for logical operator control structures. -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#258 -module RuboCop::Cop::VariableForce::Branch::LogicalOperator - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#259 - def always_run?; end -end - -# left_body || right_body -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#273 -class RuboCop::Cop::VariableForce::Branch::Or < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::LogicalOperator - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def left_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def right_body?; end -end - -# begin -# main_body -# rescue StandardError => error # rescue_clause -# else -# else_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#297 -class RuboCop::Cop::VariableForce::Branch::Rescue < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::ExceptionHandler - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#304 - def always_run?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def else_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def main_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def rescue_clause?; end -end - -# Mix-in module for simple conditional control structures. -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#145 -module RuboCop::Cop::VariableForce::Branch::SimpleConditional - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#150 - def always_run?; end - - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#146 - def conditional_clause?; end -end - -# until conditional_clause -# loop_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#187 -class RuboCop::Cop::VariableForce::Branch::Until < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def conditional_clause?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def loop_body?; end -end - -# begin -# loop_body -# end until conditional_clause -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#207 -class RuboCop::Cop::VariableForce::Branch::UntilPost < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def conditional_clause?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def loop_body?; end -end - -# while conditional_clause -# loop_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#177 -class RuboCop::Cop::VariableForce::Branch::While < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def conditional_clause?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def loop_body?; end -end - -# begin -# loop_body -# end while conditional_clause -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#197 -class RuboCop::Cop::VariableForce::Branch::WhilePost < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def conditional_clause?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def loop_body?; end -end - -# Mix-in module for classes which own a node and need branch information -# of the node. The user classes must implement #node and #scope. -# -# source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#8 -module RuboCop::Cop::VariableForce::Branchable - # source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#9 - def branch; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#15 - def run_exclusively_with?(other); end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#39 -RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#48 -RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#42 -RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#112 -RuboCop::Cop::VariableForce::NODE_HANDLER_METHOD_NAMES = T.let(T.unsafe(nil), Hash) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#40 -RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#47 -RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#29 -RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Symbol) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#50 -RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#43 -RuboCop::Cop::VariableForce::REST_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) - -# This class represents each reference of a variable. -# -# source://rubocop//lib/rubocop/cop/variable_force/reference.rb#7 -class RuboCop::Cop::VariableForce::Reference - include ::RuboCop::Cop::VariableForce::Branchable - - # @return [Reference] a new instance of Reference - # - # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#16 - def initialize(node, scope); end - - # There's an implicit variable reference by the zero-arity `super`: - # - # def some_method(foo) - # super - # end - # - # Another case is `binding`: - # - # def some_method(foo) - # do_something(binding) - # end - # - # In these cases, the variable `foo` is not explicitly referenced, - # but it can be considered used implicitly by the `super` or `binding`. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#41 - def explicit?; end - - # Returns the value of attribute node. - # - # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#14 - def node; end - - # Returns the value of attribute scope. - # - # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#14 - def scope; end -end - -# source://rubocop//lib/rubocop/cop/variable_force/reference.rb#10 -RuboCop::Cop::VariableForce::Reference::VARIABLE_REFERENCE_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#55 -RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#57 -RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol) - -# A Scope represents a context of local variable visibility. -# This is a place where local variables belong to. -# A scope instance holds a scope node and variable entries. -# -# source://rubocop//lib/rubocop/cop/variable_force/scope.rb#9 -class RuboCop::Cop::VariableForce::Scope - # @return [Scope] a new instance of Scope - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#22 - def initialize(node); end - - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#35 - def ==(other); end - - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#43 - def body_node; end - - # @yield [node] - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#61 - def each_node(&block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#57 - def include?(target_node); end - - # Returns the value of attribute naked_top_level. - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 - def naked_top_level; end - - # Returns the value of attribute naked_top_level. - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 - def naked_top_level?; end - - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#39 - def name; end - - # Returns the value of attribute node. - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 - def node; end - - # Returns the value of attribute variables. - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 - def variables; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#100 - def ancestor_node?(target_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#90 - def belong_to_inner_scope?(target_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#79 - def belong_to_outer_scope?(target_node); end - - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#70 - def scan_node(node, &block); end -end - -# source://rubocop//lib/rubocop/cop/variable_force/scope.rb#10 -RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(nil), Hash) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#54 -RuboCop::Cop::VariableForce::TWISTED_SCOPE_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#28 -RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#30 -RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#45 -RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol) - -# A Variable represents existence of a local variable. -# This holds a variable declaration node and some states of the variable. -# -# source://rubocop//lib/rubocop/cop/variable_force/variable.rb#8 -class RuboCop::Cop::VariableForce::Variable - # @return [Variable] a new instance of Variable - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#15 - def initialize(name, declaration_node, scope); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#94 - def argument?; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#31 - def assign(node); end - - # Returns the value of attribute assignments. - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 - def assignments; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#102 - def block_argument?; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#74 - def capture_with_block!; end - - # Returns the value of attribute captured_by_block. - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 - def captured_by_block; end - - # Returns the value of attribute captured_by_block. - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 - def captured_by_block?; end - - # Returns the value of attribute declaration_node. - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 - def declaration_node; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#110 - def explicit_block_local_variable?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#66 - def in_modifier_conditional?(assignment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#106 - def keyword_argument?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#98 - def method_argument?; end - - # Returns the value of attribute name. - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 - def name; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#40 - def reference!(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#35 - def referenced?; end - - # Returns the value of attribute references. - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 - def references; end - - # Returns the value of attribute scope. - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 - def scope; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#90 - def should_be_unused?; end - - # This is a convenient way to check whether the variable is used - # in its entire variable lifetime. - # For more precise usage check, refer Assignment#used?. - # - # Once the variable is captured by a block, we have no idea - # when, where, and how many times the block would be invoked. - # This means we cannot track the usage of the variable. - # So we consider it's used to suppress false positive offenses. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#86 - def used?; end -end - -# source://rubocop//lib/rubocop/cop/variable_force/variable.rb#9 -RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#59 -class RuboCop::Cop::VariableForce::VariableReference < ::Struct - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#60 - def assignment?; end - - # Returns the value of attribute name - # - # @return [Object] the current value of name - def name; end - - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# A VariableTable manages the lifetime of all scopes and local variables -# in a program. -# This holds scopes as stack structure, provides a way to add local -# variables to current scope, and find local variables by considering -# variable visibility of the current scope. -# -# source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#11 -class RuboCop::Cop::VariableForce::VariableTable - # @return [VariableTable] a new instance of VariableTable - # - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#12 - def initialize(hook_receiver = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#113 - def accessible_variables; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#56 - def assign_to_variable(name, node); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#40 - def current_scope; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#44 - def current_scope_level; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#48 - def declare_variable(name, node); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#94 - def find_variable(name); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#16 - def invoke_hook(hook_name, *args); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#32 - def pop_scope; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#24 - def push_scope(scope_node); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#68 - def reference_variable(name, node); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#20 - def scope_stack; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#109 - def variable_exist?(name); end - - private - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#122 - def mark_variable_as_captured_by_block_if_so(variable); end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#52 -RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol) - -# Help methods for determining node visibility. -# -# source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#8 -module RuboCop::Cop::VisibilityHelp - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#57 - def visibility_block?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#62 - def visibility_inline_on_def?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#67 - def visibility_inline_on_method_name?(param0 = T.unsafe(nil), method_name:); end - - private - - # Navigate to find the last protected method - # - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#48 - def find_visibility_end(node); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#43 - def find_visibility_start(node); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#15 - def node_visibility(node); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#39 - def node_visibility_from_visibility_block(node); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#21 - def node_visibility_from_visibility_inline(node); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#28 - def node_visibility_from_visibility_inline_on_def(node); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#33 - def node_visibility_from_visibility_inline_on_method_name(node); end -end - -# source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#11 -RuboCop::Cop::VisibilityHelp::VISIBILITY_SCOPES = T.let(T.unsafe(nil), Set) - -# This class wraps the `Parser::Source::Comment` object that represents a -# cops it contains. -# -# source://rubocop//lib/rubocop/directive_comment.rb#7 -class RuboCop::DirectiveComment - # @return [DirectiveComment] a new instance of DirectiveComment - # - # source://rubocop//lib/rubocop/directive_comment.rb#32 - def initialize(comment, cop_registry = T.unsafe(nil)); end - - # Checks if all cops specified in this directive - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#82 - def all_cops?; end - - # Returns the value of attribute comment. - # - # source://rubocop//lib/rubocop/directive_comment.rb#30 - def comment; end - - # Returns array of specified in this directive cop names - # - # source://rubocop//lib/rubocop/directive_comment.rb#87 - def cop_names; end - - # Returns the value of attribute cop_registry. - # - # source://rubocop//lib/rubocop/directive_comment.rb#30 - def cop_registry; end - - # Returns the value of attribute cops. - # - # source://rubocop//lib/rubocop/directive_comment.rb#30 - def cops; end - - # Returns array of specified in this directive department names - # when all department disabled - # - # source://rubocop//lib/rubocop/directive_comment.rb#93 - def department_names; end - - # source://rubocop//lib/rubocop/directive_comment.rb#107 - def directive_count; end - - # Checks if this directive disables cops - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#62 - def disabled?; end - - # Checks if this directive disables all cops - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#77 - def disabled_all?; end - - # Checks if this directive enables cops - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#67 - def enabled?; end - - # Checks if this directive enables all cops - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#72 - def enabled_all?; end - - # Checks if directive departments include cop - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#98 - def in_directive_department?(cop); end - - # Returns line number for directive - # - # source://rubocop//lib/rubocop/directive_comment.rb#112 - def line_number; end - - # Checks if this directive contains all the given cop names - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#44 - def match?(cop_names); end - - # Returns match captures to directive comment pattern - # - # source://rubocop//lib/rubocop/directive_comment.rb#57 - def match_captures; end - - # Returns the value of attribute mode. - # - # source://rubocop//lib/rubocop/directive_comment.rb#30 - def mode; end - - # Checks if cop department has already used in directive comment - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#103 - def overridden_by_department?(cop); end - - # source://rubocop//lib/rubocop/directive_comment.rb#48 - def range; end - - # Checks if this directive relates to single line - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#39 - def single_line?; end - - private - - # source://rubocop//lib/rubocop/directive_comment.rb#133 - def all_cop_names; end - - # source://rubocop//lib/rubocop/directive_comment.rb#137 - def cop_names_for_department(department); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#129 - def department?(name); end - - # source://rubocop//lib/rubocop/directive_comment.rb#142 - def exclude_lint_department_cops(cops); end - - # source://rubocop//lib/rubocop/directive_comment.rb#122 - def parsed_cop_names; end - - # source://rubocop//lib/rubocop/directive_comment.rb#118 - def splitted_cops_string; end - - class << self - # source://rubocop//lib/rubocop/directive_comment.rb#26 - def before_comment(line); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#19 -RuboCop::DirectiveComment::COPS_PATTERN = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#17 -RuboCop::DirectiveComment::COP_NAMES_PATTERN = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#15 -RuboCop::DirectiveComment::COP_NAME_PATTERN = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#21 -RuboCop::DirectiveComment::DIRECTIVE_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#9 -RuboCop::DirectiveComment::LINT_DEPARTMENT = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#11 -RuboCop::DirectiveComment::LINT_REDUNDANT_DIRECTIVE_COP = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#13 -RuboCop::DirectiveComment::LINT_SYNTAX_COP = T.let(T.unsafe(nil), String) - -# An Error exception is different from an Offense with severity 'error' -# When this exception is raised, it means that RuboCop is unable to perform -# a requested action (probably due to misconfiguration) and must stop -# immediately, rather than carrying on -# -# source://rubocop//lib/rubocop/error.rb#8 -class RuboCop::Error < ::StandardError; end - -# A wrapper to display errored location of analyzed file. -# -# source://rubocop//lib/rubocop/error.rb#13 -class RuboCop::ErrorWithAnalyzedFileLocation < ::RuboCop::Error - # @return [ErrorWithAnalyzedFileLocation] a new instance of ErrorWithAnalyzedFileLocation - # - # source://rubocop//lib/rubocop/error.rb#14 - def initialize(cause:, node:, cop:); end - - # Returns the value of attribute cause. - # - # source://rubocop//lib/rubocop/error.rb#21 - def cause; end - - # source://rubocop//lib/rubocop/error.rb#27 - def column; end - - # Returns the value of attribute cop. - # - # source://rubocop//lib/rubocop/error.rb#21 - def cop; end - - # source://rubocop//lib/rubocop/error.rb#23 - def line; end - - # source://rubocop//lib/rubocop/error.rb#31 - def message; end -end - -# Allows specified configuration options to have an exclude limit -# ie. a maximum value tracked that it can be used by `--auto-gen-config`. -# -# source://rubocop//lib/rubocop/cop/exclude_limit.rb#6 -module RuboCop::ExcludeLimit - # Sets up a configuration option to have an exclude limit tracked. - # The parameter name given is transformed into a method name (eg. `Max` - # becomes `self.max=` and `MinDigits` becomes `self.min_digits=`). - # - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#10 - def exclude_limit(parameter_name, method_name: T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#22 - def transform(parameter_name); end -end - -# source://rubocop//lib/rubocop/ext/comment.rb#4 -module RuboCop::Ext; end - -# Extensions to `Parser::Source::Comment`. -# -# source://rubocop//lib/rubocop/ext/comment.rb#6 -module RuboCop::Ext::Comment - # source://rubocop//lib/rubocop/ext/comment.rb#7 - def source; end - - # source://rubocop//lib/rubocop/ext/comment.rb#11 - def source_range; end -end - -# Extensions to AST::ProcessedSource for our cached comment_config -# -# source://rubocop//lib/rubocop/ext/processed_source.rb#6 -module RuboCop::Ext::ProcessedSource - # source://rubocop//lib/rubocop/ext/processed_source.rb#9 - def comment_config; end - - # Returns the value of attribute config. - # - # source://rubocop//lib/rubocop/ext/processed_source.rb#7 - def config; end - - # Sets the attribute config - # - # @param value the value to set the attribute config to. - # - # source://rubocop//lib/rubocop/ext/processed_source.rb#7 - def config=(_arg0); end - - # source://rubocop//lib/rubocop/ext/processed_source.rb#13 - def disabled_line_ranges; end - - # Returns the value of attribute registry. - # - # source://rubocop//lib/rubocop/ext/processed_source.rb#7 - def registry; end - - # Sets the attribute registry - # - # @param value the value to set the attribute registry to. - # - # source://rubocop//lib/rubocop/ext/processed_source.rb#7 - def registry=(_arg0); end -end - -# Extensions to Parser::Source::Range -# -# source://rubocop//lib/rubocop/ext/range.rb#6 -module RuboCop::Ext::Range - # Adds `Range#single_line?` to parallel `Node#single_line?` - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/ext/range.rb#8 - def single_line?; end -end - -# Extensions to AST::RegexpNode for our cached parsed regexp info -# -# source://rubocop//lib/rubocop/ext/regexp_node.rb#6 -module RuboCop::Ext::RegexpNode - # Please remove this `else` branch when support for regexp_parser 1.8 will be dropped. - # It's for compatibility with regexp_parser 1.8 and will never be maintained. - # - # source://rubocop//lib/rubocop/ext/regexp_node.rb#19 - def assign_properties(*_arg0); end - - # source://rubocop//lib/rubocop/ext/regexp_node.rb#53 - def each_capture(named: T.unsafe(nil)); end - - # Note: we extend Regexp nodes to provide `loc` and `expression` - # see `ext/regexp_parser`. - # - # @return [Regexp::Expression::Root, nil] - # - # source://rubocop//lib/rubocop/ext/regexp_node.rb#16 - def parsed_tree; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/ext/regexp_node.rb#65 - def named_capturing?(exp, event, named); end - - # source://rubocop//lib/rubocop/ext/regexp_node.rb#73 - def with_interpolations_blanked; end -end - -# source://rubocop//lib/rubocop/ext/regexp_node.rb#7 -RuboCop::Ext::RegexpNode::ANY = T.let(T.unsafe(nil), Object) - -# Extensions for `regexp_parser` gem -# -# source://rubocop//lib/rubocop/ext/regexp_parser.rb#6 -module RuboCop::Ext::RegexpParser; end - -# source://rubocop//lib/rubocop/ext/regexp_parser.rb#20 -module RuboCop::Ext::RegexpParser::Expression; end - -# Add `expression` and `loc` to all `regexp_parser` nodes -# -# source://rubocop//lib/rubocop/ext/regexp_parser.rb#22 -module RuboCop::Ext::RegexpParser::Expression::Base - # Shortcut to `loc.expression` - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#27 - def expression; end - - # E.g. - # [a-z]{2,} - # ^^^^^^^^^ expression - # ^^^^ quantifier - # ^^^^^ body - # ^ begin - # ^ end - # - # Please open issue if you need other locations - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#61 - def loc; end - - # Returns the value of attribute origin. - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#23 - def origin; end - - # Sets the attribute origin - # - # @param value the value to set the attribute origin to. - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#23 - def origin=(_arg0); end - - private - - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#67 - def build_location; end -end - -# Provide `CharacterSet` with `begin` and `end` locations. -# -# source://rubocop//lib/rubocop/ext/regexp_parser.rb#79 -module RuboCop::Ext::RegexpParser::Expression::CharacterSet - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#80 - def build_location; end -end - -# Source map for RegexpParser nodes -# -# source://rubocop//lib/rubocop/ext/regexp_parser.rb#8 -class RuboCop::Ext::RegexpParser::Map < ::Parser::Source::Map - # @return [Map] a new instance of Map - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#11 - def initialize(expression, body:, quantifier: T.unsafe(nil), begin_l: T.unsafe(nil), end_l: T.unsafe(nil)); end - - # Returns the value of attribute begin. - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 - def begin; end - - # Returns the value of attribute body. - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 - def body; end - - # Returns the value of attribute end. - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 - def end; end - - # Returns the value of attribute quantifier. - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 - def quantifier; end -end - -# This class handles loading files (a.k.a. features in Ruby) specified -# by `--require` command line option and `require` directive in the config. -# -# Normally, the given string is directly passed to `require`. If a string -# beginning with `.` is given, it is assumed to be relative to the given -# directory. -# -# If a string containing `-` is given, it will be used as is, but if we -# cannot find the file to load, we will replace `-` with `/` and try it -# again as when Bundler loads gems. -# -# @api private -# -# source://rubocop//lib/rubocop/feature_loader.rb#16 -class RuboCop::FeatureLoader - # @api private - # @param config_directory_path [String] - # @param feature [String] - # @return [FeatureLoader] a new instance of FeatureLoader - # - # source://rubocop//lib/rubocop/feature_loader.rb#27 - def initialize(config_directory_path:, feature:); end - - # @api private - # - # source://rubocop//lib/rubocop/feature_loader.rb#32 - def load; end - - private - - # @api private - # @return [String] - # - # source://rubocop//lib/rubocop/feature_loader.rb#55 - def namespaced_feature; end - - # @api private - # @return [String] - # - # source://rubocop//lib/rubocop/feature_loader.rb#60 - def namespaced_target; end - - # @api private - # @param [String] - # @return [String] - # - # source://rubocop//lib/rubocop/feature_loader.rb#70 - def relative(feature); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/feature_loader.rb#75 - def relative?; end - - # @api private - # @param error [LoadError] - # @return [Boolean] - # - # source://rubocop//lib/rubocop/feature_loader.rb#81 - def seems_cannot_load_such_file_error?(error); end - - # @api private - # @return [String] - # - # source://rubocop//lib/rubocop/feature_loader.rb#86 - def target; end - - class << self - # @api private - # @param config_directory_path [String] - # @param feature [String] - # - # source://rubocop//lib/rubocop/feature_loader.rb#20 - def load(config_directory_path:, feature:); end - end -end - -# Common methods for finding files. -# -# @api private -# -# source://rubocop//lib/rubocop/file_finder.rb#8 -module RuboCop::FileFinder - # @api private - # - # source://rubocop//lib/rubocop/file_finder.rb#13 - def find_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/file_finder.rb#20 - def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/file_finder.rb#28 - def traverse_files_upwards(filename, start_dir, stop_dir); end - - class << self - # @api private - # - # source://rubocop//lib/rubocop/file_finder.rb#10 - def root_level; end - - # @api private - # - # source://rubocop//lib/rubocop/file_finder.rb#10 - def root_level=(_arg0); end - end -end - -# A wrapper around patterns array to perform optimized search. -# -# For projects with a large set of rubocop todo files, most items in `Exclude`/`Include` -# are exact file names. It is wasteful to linearly check the list of patterns over and over -# to check if the file is relevant to the cop. -# -# This class partitions an array of patterns into a set of exact match strings and the rest -# of the patterns. This way we can firstly do a cheap check in the set and then proceed via -# the costly patterns check, if needed. -# -# @api private -# -# source://rubocop//lib/rubocop/file_patterns.rb#14 -class RuboCop::FilePatterns - # @api private - # @return [FilePatterns] a new instance of FilePatterns - # - # source://rubocop//lib/rubocop/file_patterns.rb#21 - def initialize(patterns); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/file_patterns.rb#27 - def match?(path); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/file_patterns.rb#33 - def partition_patterns(patterns); end - - class << self - # @api private - # - # source://rubocop//lib/rubocop/file_patterns.rb#17 - def from(patterns); end - end -end - -# The bootstrap module for formatter. -# -# source://rubocop//lib/rubocop/formatter.rb#5 -module RuboCop::Formatter; end - -# Does not show individual offenses in the console. -# -# source://rubocop//lib/rubocop/formatter/auto_gen_config_formatter.rb#6 -class RuboCop::Formatter::AutoGenConfigFormatter < ::RuboCop::Formatter::ProgressFormatter - # source://rubocop//lib/rubocop/formatter/auto_gen_config_formatter.rb#7 - def finished(inspected_files); end -end - -# Abstract base class for formatter, implements all public API methods. -# -# ## Creating Custom Formatter -# -# You can create a custom formatter by subclassing -# `RuboCop::Formatter::BaseFormatter` and overriding some methods -# or by implementing all the methods by duck typing. -# -# ## Using Custom Formatter in Command Line -# -# You can tell RuboCop to use your custom formatter with a combination of -# `--format` and `--require` option. -# For example, when you have defined `MyCustomFormatter` in -# `./path/to/my_custom_formatter.rb`, you would type this command: -# -# rubocop --require ./path/to/my_custom_formatter --format MyCustomFormatter -# -# Note: The path passed to `--require` is directly passed to -# `Kernel.require`. -# If your custom formatter file is not in `$LOAD_PATH`, -# you need to specify the path as relative path prefixed with `./` -# explicitly or absolute path. -# -# ## Method Invocation Order -# -# For example, when RuboCop inspects 2 files, -# the invocation order should be like this: -# -# * `#initialize` -# * `#started` -# * `#file_started` -# * `#file_finished` -# * `#file_started` -# * `#file_finished` -# * `#finished` -# -# source://rubocop//lib/rubocop/formatter/base_formatter.rb#41 -class RuboCop::Formatter::BaseFormatter - # @api public - # @param output [IO] `$stdout` or opened file - # @return [BaseFormatter] a new instance of BaseFormatter - # - # source://rubocop//lib/rubocop/formatter/base_formatter.rb#63 - def initialize(output, options = T.unsafe(nil)); end - - # Invoked at the end of inspecting each files. - # - # @api public - # @param file [String] the file path - # @param offenses [Array(RuboCop::Cop::Offense)] all detected offenses for the file - # @return [void] - # @see RuboCop::Cop::Offense - # - # source://rubocop//lib/rubocop/formatter/base_formatter.rb#104 - def file_finished(file, offenses); end - - # Invoked at the beginning of inspecting each files. - # - # @api public - # @param file [String] the file path - # @param options [Hash] file specific information, currently this is always empty. - # @return [void] - # - # source://rubocop//lib/rubocop/formatter/base_formatter.rb#89 - def file_started(file, options); end - - # Invoked after all files are inspected or interrupted by user. - # - # @api public - # @param inspected_files [Array(String)] the inspected file paths. - # This would be same as `target_files` passed to `#started` - # unless RuboCop is interrupted by user. - # @return [void] - # - # source://rubocop//lib/rubocop/formatter/base_formatter.rb#116 - def finished(inspected_files); end - - # @api public - # @return [Hash] - # - # source://rubocop//lib/rubocop/formatter/base_formatter.rb#57 - def options; end - - # @api public - # @return [IO] the IO object passed to `#initialize` - # @see #initialize - # - # source://rubocop//lib/rubocop/formatter/base_formatter.rb#50 - def output; end - - # Invoked once before any files are inspected. - # - # @api public - # @param target_files [Array(String)] all target file paths to be inspected - # @return [void] - # - # source://rubocop//lib/rubocop/formatter/base_formatter.rb#76 - def started(target_files); end -end - -# This formatter formats report data in clang style. -# The precise location of the problem is shown together with the -# relevant source code. -# -# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#8 -class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleTextFormatter - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#11 - def report_file(file, offenses); end - - private - - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#47 - def report_highlighted_area(highlighted_area); end - - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#37 - def report_line(location); end - - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#17 - def report_offense(file, offense); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#33 - def valid_line?(offense); end -end - -# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#9 -RuboCop::Formatter::ClangStyleFormatter::ELLIPSES = T.let(T.unsafe(nil), String) - -# This mix-in module provides string coloring methods for terminals. -# It automatically disables coloring if coloring is disabled in the process -# globally or the formatter's output is not a terminal. -# -# source://rubocop//lib/rubocop/formatter/colorizable.rb#8 -module RuboCop::Formatter::Colorizable - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def black(string); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def blue(string); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#21 - def colorize(string, *args); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def cyan(string); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def green(string); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def magenta(string); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#9 - def rainbow; end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def red(string); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def white(string); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def yellow(string); end -end - -# This formatter displays a YAML configuration file where all cops that -# detected any offenses are configured to not detect the offense. -# -# source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#7 -class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFormatter - include ::RuboCop::PathUtil - - # @return [DisabledConfigFormatter] a new instance of DisabledConfigFormatter - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#27 - def initialize(output, options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#40 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#33 - def file_started(_file, options); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#48 - def finished(_inspected_files); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#69 - def auto_gen_enforced_style?; end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#73 - def command; end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#165 - def cop_config_params(default_cfg, cfg); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#185 - def default_config(cop_name); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#229 - def excludes(offending_files, cop_name, parent); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#200 - def filtered_config(cfg); end - - # Returns true if the given arr include the given elm or if any of the - # given arr is a regexp that matches the given elm. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#277 - def include_or_match?(arr, elm); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#250 - def merge_mode_for_exclude?(cfg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#271 - def no_exclude_limit?; end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#102 - def output_cop(cop_name, offense_count); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#137 - def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#189 - def output_cop_config(output_buffer, cfg, cop_name); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#172 - def output_cop_param_comments(output_buffer, params, default_cfg); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#219 - def output_exclude_list(output_buffer, offending_files, cop_name); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#254 - def output_exclude_path(output_buffer, exclude_path, parent); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#208 - def output_offending_files(output_buffer, cfg, cop_name); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#96 - def output_offenses; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#267 - def safe_autocorrect?(config); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#116 - def set_max(cfg, cop_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#125 - def should_set_max?(cop_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#65 - def show_offense_counts?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#61 - def show_timestamp?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#157 - def supports_safe_autocorrect?(cop_class, default_cfg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#161 - def supports_unsafe_autocorrect?(cop_class, default_cfg); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#92 - def timestamp; end - - class << self - # Returns the value of attribute config_to_allow_offenses. - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 - def config_to_allow_offenses; end - - # Sets the attribute config_to_allow_offenses - # - # @param value the value to set the attribute config_to_allow_offenses to. - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 - def config_to_allow_offenses=(_arg0); end - - # Returns the value of attribute detected_styles. - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 - def detected_styles; end - - # Sets the attribute detected_styles - # - # @param value the value to set the attribute detected_styles to. - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 - def detected_styles=(_arg0); end - end -end - -# source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#10 -RuboCop::Formatter::DisabledConfigFormatter::HEADING = T.let(T.unsafe(nil), String) - -# This formatter displays the report data in format that's -# easy to process in the Emacs text editor. -# The output is machine-parsable. -# -# source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#8 -class RuboCop::Formatter::EmacsStyleFormatter < ::RuboCop::Formatter::BaseFormatter - # source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#9 - def file_finished(file, offenses); end - - private - - # source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#24 - def message(offense); end -end - -# This formatter displays just a list of the files with offenses in them, -# separated by newlines. The output is machine-parsable. -# -# Here's the format: -# -# /some/file -# /some/other/file -# -# source://rubocop//lib/rubocop/formatter/file_list_formatter.rb#12 -class RuboCop::Formatter::FileListFormatter < ::RuboCop::Formatter::BaseFormatter - # source://rubocop//lib/rubocop/formatter/file_list_formatter.rb#13 - def file_finished(file, offenses); end -end - -# This is a collection of formatters. A FormatterSet can hold multiple -# formatter instances and provides transparent formatter API methods -# which invoke same method of each formatters. -# -# source://rubocop//lib/rubocop/formatter/formatter_set.rb#10 -class RuboCop::Formatter::FormatterSet < ::Array - # @return [FormatterSet] a new instance of FormatterSet - # - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#40 - def initialize(options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#56 - def add_formatter(formatter_type, output_path = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#68 - def close_output_files; end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#51 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#45 - def file_started(file, options); end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 - def finished(*args); end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 - def started(*args); end - - private - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#87 - def builtin_formatter_class(specified_key); end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#105 - def custom_formatter_class(specified_class_name); end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#76 - def formatter_class(formatter_type); end -end - -# source://rubocop//lib/rubocop/formatter/formatter_set.rb#11 -RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTERS_FOR_KEYS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/formatter/formatter_set.rb#30 -RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTER_NAMES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/formatter/formatter_set.rb#32 -RuboCop::Formatter::FormatterSet::FORMATTER_APIS = T.let(T.unsafe(nil), Array) - -# This formatter displays a progress bar and shows details of offenses as -# soon as they are detected. -# This is inspired by the Fuubar formatter for RSpec by Jeff Kreeftmeijer. -# https://github.com/jeffkreeftmeijer/fuubar -# -# source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#11 -class RuboCop::Formatter::FuubarStyleFormatter < ::RuboCop::Formatter::ClangStyleFormatter - # @return [FuubarStyleFormatter] a new instance of FuubarStyleFormatter - # - # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#14 - def initialize(*output); end - - # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#51 - def count_stats(offenses); end - - # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#40 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#71 - def progressbar_color; end - - # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#20 - def started(target_files); end - - # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#61 - def with_color; end -end - -# source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#12 -RuboCop::Formatter::FuubarStyleFormatter::RESET_SEQUENCE = T.let(T.unsafe(nil), String) - -# This formatter formats report data as GitHub Workflow commands resulting -# in GitHub check annotations when run within GitHub Actions. -# -# source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#7 -class RuboCop::Formatter::GitHubActionsFormatter < ::RuboCop::Formatter::BaseFormatter - # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#14 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#18 - def finished(_inspected_files); end - - # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#10 - def started(_target_files); end - - private - - # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#29 - def github_escape(string); end - - # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#41 - def github_severity(offense); end - - # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#33 - def minimum_severity_to_fail; end - - # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#45 - def report_offense(file, offense); end -end - -# source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#8 -RuboCop::Formatter::GitHubActionsFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) - -# This formatter saves the output as an html file. -# -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#9 -class RuboCop::Formatter::HTMLFormatter < ::RuboCop::Formatter::BaseFormatter - # @return [HTMLFormatter] a new instance of HTMLFormatter - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#29 - def initialize(output, options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#39 - def file_finished(file, offenses); end - - # Returns the value of attribute files. - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#27 - def files; end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#44 - def finished(inspected_files); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#50 - def render_html; end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#35 - def started(target_files); end - - # Returns the value of attribute summary. - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#27 - def summary; end -end - -# This class provides helper methods used in the ERB CSS template. -# -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#135 -class RuboCop::Formatter::HTMLFormatter::CSSContext - # Make Kernel#binding public. - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#146 - def binding; end -end - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#136 -RuboCop::Formatter::HTMLFormatter::CSSContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#12 -RuboCop::Formatter::HTMLFormatter::CSS_PATH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 -class RuboCop::Formatter::HTMLFormatter::Color < ::Struct - # Returns the value of attribute alpha - # - # @return [Object] the current value of alpha - def alpha; end - - # Sets the attribute alpha - # - # @param value [Object] the value to set the attribute alpha to. - # @return [Object] the newly set value - def alpha=(_); end - - # Returns the value of attribute blue - # - # @return [Object] the current value of blue - def blue; end - - # Sets the attribute blue - # - # @param value [Object] the value to set the attribute blue to. - # @return [Object] the newly set value - def blue=(_); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#19 - def fade_out(amount); end - - # Returns the value of attribute green - # - # @return [Object] the current value of green - def green; end - - # Sets the attribute green - # - # @param value [Object] the value to set the attribute green to. - # @return [Object] the newly set value - def green=(_); end - - # Returns the value of attribute red - # - # @return [Object] the current value of red - def red; end - - # Sets the attribute red - # - # @param value [Object] the value to set the attribute red to. - # @return [Object] the newly set value - def red=(_); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#15 - def to_s; end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#10 -RuboCop::Formatter::HTMLFormatter::ELLIPSES = T.let(T.unsafe(nil), String) - -# This class provides helper methods used in the ERB template. -# -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#61 -class RuboCop::Formatter::HTMLFormatter::ERBContext - include ::RuboCop::PathUtil - include ::RuboCop::Formatter::TextUtil - - # @return [ERBContext] a new instance of ERBContext - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 - def initialize(files, summary); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#116 - def base64_encoded_logo_image; end - - # Make Kernel#binding public. - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76 - def binding; end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#81 - def decorated_message(offense); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#112 - def escape(string); end - - # Returns the value of attribute files. - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#67 - def files; end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#92 - def highlight_source_tag(offense); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#85 - def highlighted_source_line(offense); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#108 - def possible_ellipses(location); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#124 - def render_css; end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#103 - def source_after_highlight(offense); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#98 - def source_before_highlight(offense); end - - # Returns the value of attribute summary. - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#67 - def summary; end -end - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#65 -RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 -class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct - # Returns the value of attribute offenses - # - # @return [Object] the current value of offenses - def offenses; end - - # Sets the attribute offenses - # - # @param value [Object] the value to set the attribute offenses to. - # @return [Object] the newly set value - def offenses=(_); end - - # Returns the value of attribute path - # - # @return [Object] the current value of path - def path; end - - # Sets the attribute path - # - # @param value [Object] the value to set the attribute path to. - # @return [Object] the newly set value - def path=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 -class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct - # Returns the value of attribute inspected_files - # - # @return [Object] the current value of inspected_files - def inspected_files; end - - # Sets the attribute inspected_files - # - # @param value [Object] the value to set the attribute inspected_files to. - # @return [Object] the newly set value - def inspected_files=(_); end - - # Returns the value of attribute offense_count - # - # @return [Object] the current value of offense_count - def offense_count; end - - # Sets the attribute offense_count - # - # @param value [Object] the value to set the attribute offense_count to. - # @return [Object] the newly set value - def offense_count=(_); end - - # Returns the value of attribute target_files - # - # @return [Object] the current value of target_files - def target_files; end - - # Sets the attribute target_files - # - # @param value [Object] the value to set the attribute target_files to. - # @return [Object] the newly set value - def target_files=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#11 -RuboCop::Formatter::HTMLFormatter::TEMPLATE_PATH = T.let(T.unsafe(nil), String) - -# This formatter formats the report data in JSON format. -# -# source://rubocop//lib/rubocop/formatter/json_formatter.rb#8 -class RuboCop::Formatter::JSONFormatter < ::RuboCop::Formatter::BaseFormatter - include ::RuboCop::PathUtil - - # @return [JSONFormatter] a new instance of JSONFormatter - # - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#13 - def initialize(output, options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#22 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#27 - def finished(inspected_files); end - - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#42 - def hash_for_file(file, offenses); end - - # TODO: Consider better solution for Offense#real_column. - # The minimum value of `start_column: real_column` is 1. - # So, the minimum value of `last_column` should be 1. - # And non-zero value of `last_column` should be used as is. - # - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#64 - def hash_for_location(offense); end - - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#49 - def hash_for_offense(offense); end - - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#32 - def metadata_hash; end - - # Returns the value of attribute output_hash. - # - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#11 - def output_hash; end - - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#18 - def started(target_files); end -end - -# This formatter formats the report data in JUnit format. -# -# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#17 -class RuboCop::Formatter::JUnitFormatter < ::RuboCop::Formatter::BaseFormatter - # @return [JUnitFormatter] a new instance of JUnitFormatter - # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#18 - def initialize(output, options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#55 - def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#64 - def classname_attribute_value(file); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#29 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#71 - def finished(_inspected_files); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#51 - def offenses_for_cop(all_offenses, cop); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#47 - def relevant_for_output?(options, target_offenses); end - - private - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#83 - def add_failure_to(testcase, offenses, cop_name); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#78 - def reset_count; end -end - -# This formatter displays the report data in markdown -# -# source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#6 -class RuboCop::Formatter::MarkdownFormatter < ::RuboCop::Formatter::BaseFormatter - include ::RuboCop::Formatter::TextUtil - include ::RuboCop::PathUtil - - # @return [MarkdownFormatter] a new instance of MarkdownFormatter - # - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#11 - def initialize(output, options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#21 - def file_finished(file, offenses); end - - # Returns the value of attribute files. - # - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#9 - def files; end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#26 - def finished(inspected_files); end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#17 - def started(target_files); end - - # Returns the value of attribute summary. - # - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#9 - def summary; end - - private - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#73 - def possible_ellipses(location); end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#33 - def render_markdown; end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#67 - def write_code(offense); end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#61 - def write_context(offense); end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#42 - def write_file_messages; end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#54 - def write_heading(file); end -end - -# This formatter displays the list of offended cops with a count of how -# many offenses of their kind were found. Ordered by desc offense count -# -# Here's the format: -# -# 26 LineLength -# 3 OneLineConditional -# -- -# 29 Total in 5 files -# -# source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#16 -class RuboCop::Formatter::OffenseCountFormatter < ::RuboCop::Formatter::BaseFormatter - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#81 - def cop_information(cop_name); end - - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#42 - def file_finished(_file, offenses); end - - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#51 - def finished(_inspected_files); end - - # Returns the value of attribute offense_counts. - # - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#17 - def offense_counts; end - - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#73 - def ordered_offense_counts(offense_counts); end - - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#56 - def report_summary(offense_counts, offending_files_count); end - - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#19 - def started(target_files); end - - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#77 - def total_offense_count(offense_counts); end -end - -# This formatter prints a PACDOT per every file to be analyzed. -# Pacman will "eat" one PACDOT per file when no offense is detected. -# Otherwise it will print a Ghost. -# This is inspired by the Pacman formatter for RSpec by Carlos Rojas. -# https://github.com/go-labs/rspec_pacman_formatter -# -# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#10 -class RuboCop::Formatter::PacmanFormatter < ::RuboCop::Formatter::ClangStyleFormatter - include ::RuboCop::Formatter::TextUtil - - # @return [PacmanFormatter] a new instance of PacmanFormatter - # - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#19 - def initialize(output, options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#50 - def cols; end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#37 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#33 - def file_started(_file, _options); end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#43 - def next_step(offenses); end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#64 - def pacdots(number); end - - # Returns the value of attribute progress_line. - # - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#12 - def progress_line; end - - # Sets the attribute progress_line - # - # @param value the value to set the attribute progress_line to. - # - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#12 - def progress_line=(_arg0); end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#26 - def started(target_files); end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#68 - def step(character); end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#57 - def update_progress_line; end -end - -# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#14 -RuboCop::Formatter::PacmanFormatter::FALLBACK_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#15 -RuboCop::Formatter::PacmanFormatter::GHOST = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#17 -RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::Presenter) - -# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#16 -RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::Presenter) - -# This formatter display dots for files with no offenses and -# letters for files with problems in the them. In the end it -# appends the regular report data in the clang style format. -# -# source://rubocop//lib/rubocop/formatter/progress_formatter.rb#8 -class RuboCop::Formatter::ProgressFormatter < ::RuboCop::Formatter::ClangStyleFormatter - include ::RuboCop::Formatter::TextUtil - - # @return [ProgressFormatter] a new instance of ProgressFormatter - # - # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#13 - def initialize(output, options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#24 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#33 - def finished(inspected_files); end - - # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#50 - def report_file_as_mark(offenses); end - - # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#18 - def started(target_files); end -end - -# source://rubocop//lib/rubocop/formatter/progress_formatter.rb#11 -RuboCop::Formatter::ProgressFormatter::DOT = T.let(T.unsafe(nil), String) - -# If no offenses are found, no output is displayed. -# Otherwise, SimpleTextFormatter's output is displayed. -# -# source://rubocop//lib/rubocop/formatter/quiet_formatter.rb#7 -class RuboCop::Formatter::QuietFormatter < ::RuboCop::Formatter::SimpleTextFormatter - # source://rubocop//lib/rubocop/formatter/quiet_formatter.rb#8 - def report_summary(file_count, offense_count, correction_count, correctable_count); end -end - -# A basic formatter that displays only files with offenses. -# Offenses are displayed at compact form - just the -# location of the problem and the associated message. -# -# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#10 -class RuboCop::Formatter::SimpleTextFormatter < ::RuboCop::Formatter::BaseFormatter - include ::RuboCop::Formatter::Colorizable - include ::RuboCop::PathUtil - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#29 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#36 - def finished(inspected_files); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#43 - def report_file(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#57 - def report_summary(file_count, offense_count, correction_count, correctable_count); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#23 - def started(_target_files); end - - private - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#85 - def annotate_message(msg); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#80 - def colored_severity_code(offense); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#73 - def count_stats(offenses); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#89 - def message(offense); end -end - -# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#14 -RuboCop::Formatter::SimpleTextFormatter::COLOR_FOR_SEVERITY = T.let(T.unsafe(nil), Hash) - -# A helper class for building the report summary text. -# -# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#105 -class RuboCop::Formatter::SimpleTextFormatter::Report - include ::RuboCop::Formatter::Colorizable - include ::RuboCop::Formatter::TextUtil - - # @return [Report] a new instance of Report - # - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#110 - def initialize(file_count, offense_count, correction_count, correctable_count, rainbow, safe_autocorrect: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#123 - def summary; end - - private - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#160 - def correctable; end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#153 - def corrections; end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#142 - def files; end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#146 - def offenses; end - - # Returns the value of attribute rainbow. - # - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#140 - def rainbow; end -end - -# This formatter formats report data using the Test Anything Protocol. -# TAP allows for to communicate tests results in a language agnostics way. -# -# source://rubocop//lib/rubocop/formatter/tap_formatter.rb#7 -class RuboCop::Formatter::TapFormatter < ::RuboCop::Formatter::ClangStyleFormatter - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#14 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#8 - def started(target_files); end - - private - - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#62 - def annotate_message(msg); end - - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#66 - def message(offense); end - - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#39 - def report_highlighted_area(highlighted_area); end - - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#29 - def report_line(location); end - - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#46 - def report_offense(file, offense); end -end - -# Common logic for UI texts. -# -# source://rubocop//lib/rubocop/formatter/text_util.rb#6 -module RuboCop::Formatter::TextUtil - private - - # source://rubocop//lib/rubocop/formatter/text_util.rb#9 - def pluralize(number, thing, options = T.unsafe(nil)); end - - class << self - # source://rubocop//lib/rubocop/formatter/text_util.rb#9 - def pluralize(number, thing, options = T.unsafe(nil)); end - end -end - -# This formatter displays the list of offensive files, sorted by number of -# offenses with the worst offenders first. -# -# Here's the format: -# -# 26 this/file/is/really/bad.rb -# 3 just/ok.rb -# -- -# 29 Total in 2 files -# -# source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#16 -class RuboCop::Formatter::WorstOffendersFormatter < ::RuboCop::Formatter::BaseFormatter - # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#24 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#31 - def finished(_inspected_files); end - - # Returns the value of attribute offense_counts. - # - # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#17 - def offense_counts; end - - # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#55 - def ordered_offense_counts(offense_counts); end - - # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#36 - def report_summary(offense_counts); end - - # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#19 - def started(target_files); end - - # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#59 - def total_offense_count(offense_counts); end -end - -# source://rubocop//lib/rubocop/options.rb#8 -class RuboCop::IncorrectCopNameError < ::StandardError; end - -# The RuboCop's built-in LSP module. -# -# source://rubocop//lib/rubocop/lsp.rb#5 -module RuboCop::LSP - private - - # Disable LSP. - # - # @return [void] - # - # source://rubocop//lib/rubocop/lsp.rb#25 - def disable(&block); end - - # Enable LSP. - # - # @return [void] - # - # source://rubocop//lib/rubocop/lsp.rb#18 - def enable; end - - # Returns true when LSP is enabled, false when disabled. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/lsp.rb#11 - def enabled?; end - - class << self - # Disable LSP. - # - # @return [void] - # - # source://rubocop//lib/rubocop/lsp.rb#25 - def disable(&block); end - - # Enable LSP. - # - # @return [void] - # - # source://rubocop//lib/rubocop/lsp.rb#18 - def enable; end - - # Returns true when LSP is enabled, false when disabled. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/lsp.rb#11 - def enabled?; end - end -end - -# Log for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/logger.rb#16 -class RuboCop::LSP::Logger - class << self - # @api private - # - # source://rubocop//lib/rubocop/lsp/logger.rb#17 - def log(message); end - end -end - -# Routes for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/routes.rb#18 -class RuboCop::LSP::Routes - # @api private - # @return [Routes] a new instance of Routes - # - # source://rubocop//lib/rubocop/lsp/routes.rb#25 - def initialize(server); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#31 - def for(name); end - - # source://rubocop//lib/rubocop/lsp/routes.rb#38 - def handle_initialize(request); end - - # source://rubocop//lib/rubocop/lsp/routes.rb#57 - def handle_initialized(_request); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#167 - def handle_method_missing(request); end - - # source://rubocop//lib/rubocop/lsp/routes.rb#64 - def handle_shutdown(request); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#156 - def handle_unsupported_method(request, method = T.unsafe(nil)); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#205 - def diagnostic(file_uri, text); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#175 - def extract_initialization_options_from(request); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#185 - def format_file(file_uri, command: T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#219 - def remove_file_protocol_from(uri); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#223 - def to_diagnostic(offense); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#235 - def to_range(location); end - - class << self - private - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#19 - def handle(name, &block); end - end -end - -# Runtime for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/runtime.rb#16 -class RuboCop::LSP::Runtime - # @api private - # @return [Runtime] a new instance of Runtime - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#19 - def initialize(config_store); end - - # This abuses the `--stdin` option of rubocop and reads the formatted text - # from the `options[:stdin]` that rubocop mutates. This depends on - # `parallel: false` as well as the fact that RuboCop doesn't otherwise dup - # or reassign that options object. Risky business! - # - # Reassigning `options[:stdin]` is done here: - # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cop/team.rb#L131 - # Printing `options[:stdin]` - # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cli/command/execute_runner.rb#L95 - # Setting `parallel: true` would break this here: - # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/runner.rb#L72 - # - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#38 - def format(path, text, command:); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#17 - def layout_mode=(_arg0); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#17 - def lint_mode=(_arg0); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#55 - def offenses(path, text); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#17 - def safe_autocorrect=(_arg0); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#77 - def config_only_options; end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#84 - def redirect_stdout(&block); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#92 - def run_rubocop(options, path); end -end - -# Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/server.rb#22 -class RuboCop::LSP::Server - # @api private - # @return [Server] a new instance of Server - # - # source://rubocop//lib/rubocop/lsp/server.rb#23 - def initialize(config_store); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#61 - def configure(options); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#53 - def format(path, text, command:); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#57 - def offenses(path, text); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#34 - def start; end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#67 - def stop(&block); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#49 - def write(response); end -end - -# Severity for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/severity.rb#7 -class RuboCop::LSP::Severity - class << self - # @api private - # - # source://rubocop//lib/rubocop/lsp/severity.rb#17 - def find_by(rubocop_severity); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/lsp/severity.rb#8 -RuboCop::LSP::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) - -# Encapsulation of a lockfile for use when checking for gems. -# Does not actually resolve gems, just parses the lockfile. -# -# @api private -# -# source://rubocop//lib/rubocop/lockfile.rb#15 -class RuboCop::Lockfile - # @api private - # @param lockfile_path [String, Pathname, nil] - # @return [Lockfile] a new instance of Lockfile - # - # source://rubocop//lib/rubocop/lockfile.rb#17 - def initialize(lockfile_path = T.unsafe(nil)); end - - # Gems that the bundle directly depends on. - # - # @api private - # @return [Array, nil] - # - # source://rubocop//lib/rubocop/lockfile.rb#29 - def dependencies; end - - # Returns the locked versions of gems from this lockfile. - # - # @api private - # @param include_transitive_dependencies: [Boolean] When false, only direct dependencies - # are returned, i.e. those listed explicitly in the `Gemfile`. - # - # source://rubocop//lib/rubocop/lockfile.rb#49 - def gem_versions(include_transitive_dependencies: T.unsafe(nil)); end - - # All activated gems, including transitive dependencies. - # - # @api private - # @return [Array, nil] - # - # source://rubocop//lib/rubocop/lockfile.rb#37 - def gems; end - - # Whether this lockfile includes the named gem, directly or indirectly. - # - # @api private - # @param name [String] - # @return [Boolean] - # - # source://rubocop//lib/rubocop/lockfile.rb#65 - def includes_gem?(name); end - - private - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/lockfile.rb#85 - def bundler_lock_parser_defined?; end - - # @api private - # @return [Bundler::LockfileParser, nil] - # - # source://rubocop//lib/rubocop/lockfile.rb#72 - def parser; end -end - -# Parse different formats of magic comments. -# -# @abstract parent of three different magic comment handlers -# -# source://rubocop//lib/rubocop/magic_comment.rb#7 -class RuboCop::MagicComment - # @return [MagicComment] a new instance of MagicComment - # - # source://rubocop//lib/rubocop/magic_comment.rb#32 - def initialize(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#36 - def any?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#104 - def encoding_specified?; end - - # Expose the `frozen_string_literal` value coerced to a boolean if possible. - # - # @return [Boolean] if value is `true` or `false` - # @return [nil] if frozen_string_literal comment isn't found - # @return [String] if comment is found but isn't true or false - # - # source://rubocop//lib/rubocop/magic_comment.rb#86 - def frozen_string_literal; end - - # Does the magic comment enable the frozen string literal feature. - # - # Test whether the frozen string literal value is `true`. Cannot - # just return `frozen_string_literal` since an invalid magic comment - # `'yes'` does not actually enable the feature - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#55 - def frozen_string_literal?; end - - # Was a magic comment for the frozen string literal found? - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#70 - def frozen_string_literal_specified?; end - - # Expose the `shareable_constant_value` value coerced to a boolean if possible. - # - # @return [String] for shareable_constant_value config - # - # source://rubocop//lib/rubocop/magic_comment.rb#100 - def shareable_constant_value; end - - # Was a shareable_constant_value specified? - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#77 - def shareable_constant_value_specified?; end - - # source://rubocop//lib/rubocop/magic_comment.rb#115 - def typed; end - - # Was the Sorbet `typed` sigil specified? - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#111 - def typed_specified?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#43 - def valid?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#59 - def valid_literal_value?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#63 - def valid_shareable_constant_value?; end - - private - - # Match the entire comment string with a pattern and take the first capture. - # - # @param pattern [Regexp] - # @return [String] if pattern matched - # @return [nil] otherwise - # - # source://rubocop//lib/rubocop/magic_comment.rb#131 - def extract(pattern); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#121 - def specified?(value); end - - class << self - # Detect magic comment format and pass it to the appropriate wrapper. - # - # @param comment [String] - # @return [RuboCop::MagicComment] - # - # source://rubocop//lib/rubocop/magic_comment.rb#23 - def parse(comment); end - end -end - -# Parent to Vim and Emacs magic comment handling. -# -# @abstract -# -# source://rubocop//lib/rubocop/magic_comment.rb#138 -class RuboCop::MagicComment::EditorComment < ::RuboCop::MagicComment - # source://rubocop//lib/rubocop/magic_comment.rb#139 - def encoding; end - - # Rewrite the comment without a given token type - # - # source://rubocop//lib/rubocop/magic_comment.rb#144 - def without(type); end - - private - - # Find a token starting with the provided keyword and extract its value. - # - # @param keyword [String] - # @return [String] extracted value if it is found - # @return [nil] otherwise - # - # source://rubocop//lib/rubocop/magic_comment.rb#159 - def match(keyword); end - - # Individual tokens composing an editor specific comment string. - # - # @return [Array] - # - # source://rubocop//lib/rubocop/magic_comment.rb#174 - def tokens; end -end - -# Wrapper for Emacs style magic comments. -# -# @example Emacs style comment -# comment = RuboCop::MagicComment.parse( -# '# -*- encoding: ASCII-8BIT -*-' -# ) -# -# comment.encoding # => 'ascii-8bit' -# @see https://www.gnu.org/software/emacs/manual/html_node/emacs/Specify-Coding.html -# @see https://github.com/ruby/ruby/blob/3f306dc/parse.y#L6873-L6892 Emacs handling in parse.y -# -# source://rubocop//lib/rubocop/magic_comment.rb#190 -class RuboCop::MagicComment::EmacsComment < ::RuboCop::MagicComment::EditorComment - private - - # source://rubocop//lib/rubocop/magic_comment.rb#198 - def extract_frozen_string_literal; end - - # source://rubocop//lib/rubocop/magic_comment.rb#202 - def extract_shareable_constant_value; end - - # Emacs comments cannot specify Sorbet typechecking behavior. - # - # source://rubocop//lib/rubocop/magic_comment.rb#207 - def extract_typed; end -end - -# source://rubocop//lib/rubocop/magic_comment.rb#192 -RuboCop::MagicComment::EmacsComment::FORMAT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/magic_comment.rb#194 -RuboCop::MagicComment::EmacsComment::OPERATOR = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/magic_comment.rb#191 -RuboCop::MagicComment::EmacsComment::REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/magic_comment.rb#193 -RuboCop::MagicComment::EmacsComment::SEPARATOR = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/magic_comment.rb#11 -RuboCop::MagicComment::KEYWORDS = T.let(T.unsafe(nil), Hash) - -# Wrapper for regular magic comments not bound to an editor. -# -# Simple comments can only specify one setting per comment. -# -# @example frozen string literal comments -# comment1 = RuboCop::MagicComment.parse('# frozen_string_literal: true') -# comment1.frozen_string_literal # => true -# comment1.encoding # => nil -# @example encoding comments -# comment2 = RuboCop::MagicComment.parse('# encoding: utf-8') -# comment2.frozen_string_literal # => nil -# comment2.encoding # => 'utf-8' -# -# source://rubocop//lib/rubocop/magic_comment.rb#261 -class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment - # Match `encoding` or `coding` - # - # source://rubocop//lib/rubocop/magic_comment.rb#265 - def encoding; end - - # Rewrite the comment without a given token type - # - # source://rubocop//lib/rubocop/magic_comment.rb#270 - def without(type); end - - private - - # Extract `frozen_string_literal`. - # - # The `frozen_string_literal` magic comment only works if it - # is the only text in the comment. - # - # Case-insensitive and dashes/underscores are acceptable. - # - # @see https://github.com/ruby/ruby/blob/78b95b4/parse.y#L7134-L7138 - # - # source://rubocop//lib/rubocop/magic_comment.rb#287 - def extract_frozen_string_literal; end - - # source://rubocop//lib/rubocop/magic_comment.rb#291 - def extract_shareable_constant_value; end - - # source://rubocop//lib/rubocop/magic_comment.rb#295 - def extract_typed; end -end - -# source://rubocop//lib/rubocop/magic_comment.rb#262 -RuboCop::MagicComment::SimpleComment::FSTRING_LITERAL_COMMENT = T.let(T.unsafe(nil), String) - -# IRB's pattern for matching magic comment tokens. -# -# @see https://github.com/ruby/ruby/blob/b4a55c1/lib/irb/magic-file.rb#L5 -# -# source://rubocop//lib/rubocop/magic_comment.rb#10 -RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), String) - -# Wrapper for Vim style magic comments. -# -# @example Vim style comment -# comment = RuboCop::MagicComment.parse( -# '# vim: filetype=ruby, fileencoding=ascii-8bit' -# ) -# -# comment.encoding # => 'ascii-8bit' -# -# source://rubocop//lib/rubocop/magic_comment.rb#218 -class RuboCop::MagicComment::VimComment < ::RuboCop::MagicComment::EditorComment - # For some reason the fileencoding keyword only works if there - # is at least one other token included in the string. For example - # - # # works - # # vim: foo=bar, fileencoding=ascii-8bit - # - # # does nothing - # # vim: foo=bar, fileencoding=ascii-8bit - # - # source://rubocop//lib/rubocop/magic_comment.rb#234 - def encoding; end - - # Vim comments cannot specify Sorbet typechecking behavior. - # - # source://rubocop//lib/rubocop/magic_comment.rb#245 - def extract_typed; end - - # Vim comments cannot specify frozen string literal behavior. - # - # source://rubocop//lib/rubocop/magic_comment.rb#239 - def frozen_string_literal; end - - # Vim comments cannot specify shareable constant values behavior. - # - # source://rubocop//lib/rubocop/magic_comment.rb#242 - def shareable_constant_value; end -end - -# source://rubocop//lib/rubocop/magic_comment.rb#220 -RuboCop::MagicComment::VimComment::FORMAT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/magic_comment.rb#223 -RuboCop::MagicComment::VimComment::KEYWORDS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/magic_comment.rb#222 -RuboCop::MagicComment::VimComment::OPERATOR = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/magic_comment.rb#219 -RuboCop::MagicComment::VimComment::REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/magic_comment.rb#221 -RuboCop::MagicComment::VimComment::SEPARATOR = T.let(T.unsafe(nil), String) - -# Common functionality for finding names that are similar to a given name. -# -# @api private -# -# source://rubocop//lib/rubocop/name_similarity.rb#6 -module RuboCop::NameSimilarity - private - - # @api private - # - # source://rubocop//lib/rubocop/name_similarity.rb#9 - def find_similar_name(target_name, names); end - - # @api private - # - # source://rubocop//lib/rubocop/name_similarity.rb#15 - def find_similar_names(target_name, names); end - - class << self - # @api private - # - # source://rubocop//lib/rubocop/name_similarity.rb#9 - def find_similar_name(target_name, names); end - - # @api private - # - # source://rubocop//lib/rubocop/name_similarity.rb#15 - def find_similar_names(target_name, names); end - end -end - -# source://rubocop//lib/rubocop/ast_aliases.rb#5 -RuboCop::NodePattern = RuboCop::AST::NodePattern - -# source://rubocop//lib/rubocop/options.rb#10 -class RuboCop::OptionArgumentError < ::StandardError; end - -# This class handles command line options. -# -# @api private -# -# source://rubocop//lib/rubocop/options.rb#14 -class RuboCop::Options - # @api private - # @return [Options] a new instance of Options - # - # source://rubocop//lib/rubocop/options.rb#22 - def initialize; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#27 - def parse(command_line_args); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#229 - def add_additional_modes(opts); end - - # the autocorrect command-line arguments map to the autocorrect @options values like so: - # :fix_layout :autocorrect :safe_autocorrect :autocorrect_all - # -x, --fix-layout true true - - - # -a, --auto-correct - true true - - # --safe-auto-correct - true true - - # -A, --auto-correct-all - true - true - # - # @api private - # - # source://rubocop//lib/rubocop/options.rb#140 - def add_autocorrection_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#205 - def add_cache_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#73 - def add_check_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#163 - def add_config_generation_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#181 - def add_cop_selection_csv_option(option, opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#241 - def add_general_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#212 - def add_lsp_option(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#105 - def add_output_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#253 - def add_profile_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#218 - def add_server_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#196 - def add_severity_option(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#53 - def define_options; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#263 - def handle_deprecated_option(old_option, new_option); end - - # Finds the option in `args` starting with -- and converts it to a symbol, - # e.g. [..., '--autocorrect', ...] to :autocorrect. - # - # @api private - # - # source://rubocop//lib/rubocop/options.rb#297 - def long_opt_symbol(args); end - - # Sets a value in the @options hash, based on the given long option and its - # value, in addition to calling the block if a block is given. - # - # @api private - # - # source://rubocop//lib/rubocop/options.rb#286 - def option(opts, *args); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#268 - def rainbow; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#302 - def require_feature(file); end - - # Creates a section of options in order to separate them visually when - # using `--help`. - # - # @api private - # - # source://rubocop//lib/rubocop/options.rb#278 - def section(opts, heading, &_block); end -end - -# @api private -# -# source://rubocop//lib/rubocop/options.rb#20 -RuboCop::Options::DEFAULT_MAXIMUM_EXCLUSION_ITEMS = T.let(T.unsafe(nil), Integer) - -# @api private -# -# source://rubocop//lib/rubocop/options.rb#19 -RuboCop::Options::EXITING_OPTIONS = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/options.rb#15 -RuboCop::Options::E_STDIN_NO_PATH = T.let(T.unsafe(nil), String) - -# This module contains help texts for command line options. -# -# @api private -# -# source://rubocop//lib/rubocop/options.rb#498 -module RuboCop::OptionsHelp; end - -# @api private -# -# source://rubocop//lib/rubocop/options.rb#500 -RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/options.rb#499 -RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/options.rb#502 -RuboCop::OptionsHelp::TEXT = T.let(T.unsafe(nil), Hash) - -# Validates option arguments and the options' compatibility with each other. -# -# @api private -# -# source://rubocop//lib/rubocop/options.rb#312 -class RuboCop::OptionsValidator - # @api private - # @return [OptionsValidator] a new instance of OptionsValidator - # - # source://rubocop//lib/rubocop/options.rb#350 - def initialize(options); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/options.rb#472 - def boolean_or_empty_cache?; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#442 - def disable_parallel_when_invalid_option_combo; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/options.rb#468 - def except_syntax?; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#476 - def incompatible_options; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#455 - def invalid_arguments_for_parallel; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/options.rb#463 - def only_includes_redundant_disable?; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#382 - def validate_auto_gen_config; end - - # @api private - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/options.rb#428 - def validate_autocorrect; end - - # @api private - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/options.rb#488 - def validate_cache_enabled_for_cache_root; end - - # @api private - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/options.rb#359 - def validate_compatibility; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#354 - def validate_cop_options; end - - # @api private - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/options.rb#403 - def validate_display_only_correctable_and_autocorrect; end - - # @api private - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/options.rb#395 - def validate_display_only_failed; end - - # @api private - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/options.rb#412 - def validate_display_only_failed_and_display_only_correctable; end - - # @api private - # @raise [OptionParser::MissingArgument] - # - # source://rubocop//lib/rubocop/options.rb#480 - def validate_exclude_limit_option; end - - # @api private - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/options.rb#421 - def validate_lsp_and_editor_mode; end - - class << self - # Cop name validation must be done later than option parsing, so it's not - # called from within Options. - # - # @api private - # - # source://rubocop//lib/rubocop/options.rb#319 - def validate_cop_list(names); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#336 - def format_message_from(name, cop_names); end - end -end - -# Common methods and behaviors for dealing with paths. -# -# source://rubocop//lib/rubocop/path_util.rb#5 -module RuboCop::PathUtil - private - - # Returns true for an absolute Unix or Windows path. - # - # source://rubocop//lib/rubocop/path_util.rb#76 - def absolute?(path); end - - # Returns true for a glob - # - # source://rubocop//lib/rubocop/path_util.rb#81 - def glob?(path); end - - # source://rubocop//lib/rubocop/path_util.rb#111 - def hidden_dir?(path); end - - # source://rubocop//lib/rubocop/path_util.rb#94 - def hidden_file?(path); end - - # source://rubocop//lib/rubocop/path_util.rb#85 - def hidden_file_in_not_hidden_dir?(pattern, path); end - - # source://rubocop//lib/rubocop/path_util.rb#48 - def match_path?(pattern, path); end - - # Loose check to reduce memory allocations - # - # source://rubocop//lib/rubocop/path_util.rb#101 - def maybe_hidden_file?(path); end - - # source://rubocop//lib/rubocop/path_util.rb#13 - def relative_path(path, base_dir = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/path_util.rb#34 - def smart_path(path); end - - class << self - # Returns true for an absolute Unix or Windows path. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#76 - def absolute?(path); end - - # Returns true for a glob - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#81 - def glob?(path); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#111 - def hidden_dir?(path); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#94 - def hidden_file?(path); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#85 - def hidden_file_in_not_hidden_dir?(pattern, path); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#48 - def match_path?(pattern, path); end - - # Loose check to reduce memory allocations - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#101 - def maybe_hidden_file?(path); end - - # source://rubocop//lib/rubocop/path_util.rb#13 - def relative_path(path, base_dir = T.unsafe(nil)); end - - # Returns the value of attribute relative_paths_cache. - # - # source://rubocop//lib/rubocop/path_util.rb#7 - def relative_paths_cache; end - - # Sets the attribute relative_paths_cache - # - # @param value the value to set the attribute relative_paths_cache to. - # - # source://rubocop//lib/rubocop/path_util.rb#7 - def relative_paths_cache=(_arg0); end - - # source://rubocop//lib/rubocop/path_util.rb#34 - def smart_path(path); end - end -end - -# source://rubocop//lib/rubocop/path_util.rb#98 -RuboCop::PathUtil::HIDDEN_FILE_PATTERN = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/path_util.rb#31 -RuboCop::PathUtil::SMART_PATH_CACHE = T.let(T.unsafe(nil), Hash) - -# This module provides information on the platform that RuboCop is being run -# on. -# -# source://rubocop//lib/rubocop/platform.rb#6 -module RuboCop::Platform - class << self - # @return [Boolean] - # - # source://rubocop//lib/rubocop/platform.rb#7 - def windows?; end - end -end - -# source://rubocop//lib/rubocop/ast_aliases.rb#6 -RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource - -# Common methods and behaviors for dealing with remote config files. -# -# @api private -# -# source://rubocop//lib/rubocop/remote_config.rb#9 -class RuboCop::RemoteConfig - # @api private - # @return [RemoteConfig] a new instance of RemoteConfig - # - # source://rubocop//lib/rubocop/remote_config.rb#14 - def initialize(url, base_dir); end - - # @api private - # - # source://rubocop//lib/rubocop/remote_config.rb#19 - def file; end - - # @api private - # - # source://rubocop//lib/rubocop/remote_config.rb#32 - def inherit_from_remote(file, path); end - - # @api private - # - # source://rubocop//lib/rubocop/remote_config.rb#10 - def uri; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/remote_config.rb#95 - def cache_name_from_uri; end - - # @api private - # - # source://rubocop//lib/rubocop/remote_config.rb#78 - def cache_path; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/remote_config.rb#82 - def cache_path_exists?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/remote_config.rb#86 - def cache_path_expired?; end - - # @api private - # - # source://rubocop//lib/rubocop/remote_config.rb#101 - def cloned_url; end - - # @api private - # @yield [request] - # - # source://rubocop//lib/rubocop/remote_config.rb#53 - def generate_request(uri); end - - # @api private - # - # source://rubocop//lib/rubocop/remote_config.rb#62 - def handle_response(response, limit, &block); end - - # @api private - # @raise [ArgumentError] - # - # source://rubocop//lib/rubocop/remote_config.rb#40 - def request(uri = T.unsafe(nil), limit = T.unsafe(nil), &block); end -end - -# @api private -# -# source://rubocop//lib/rubocop/remote_config.rb#12 -RuboCop::RemoteConfig::CACHE_LIFETIME = T.let(T.unsafe(nil), Integer) - -# Provides functionality for caching RuboCop runs. -# -# @api private -# -# source://rubocop//lib/rubocop/result_cache.rb#11 -class RuboCop::ResultCache - # @api private - # @return [ResultCache] a new instance of ResultCache - # - # source://rubocop//lib/rubocop/result_cache.rb#87 - def initialize(file, team, options, config_store, cache_root = T.unsafe(nil)); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/result_cache.rb#100 - def debug?; end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#108 - def load; end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#85 - def path; end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#113 - def save(offenses); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/result_cache.rb#104 - def valid?; end - - private - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/result_cache.rb#146 - def any_symlink?(path); end - - # We combine team and options into a single "context" checksum to avoid - # making file names that are too long for some filesystems to handle. - # This context is for anything that's not (1) the RuboCop executable - # checksum or (2) the inspected file checksum. - # - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#236 - def context_checksum(team, options); end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#189 - def digest(path); end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#157 - def file_checksum(file, config_store); end - - # Return a hash of the options given at invocation, minus the ones that have - # no effect on which offenses and disabled line ranges are found, and thus - # don't affect caching. - # - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#220 - def relevant_options_digest(options); end - - # The checksum of the RuboCop program running the inspection. - # - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#174 - def rubocop_checksum; end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#200 - def rubocop_extra_features; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/result_cache.rb#142 - def symlink_protection_triggered?(path); end - - # The external dependency checksums are cached per RuboCop team so that - # the checksums don't need to be recomputed for each file. - # - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#227 - def team_checksum(team); end - - class << self - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/result_cache.rb#81 - def allow_symlinks_in_cache_location?(config_store); end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#75 - def cache_root(config_store); end - - # Remove old files so that the cache doesn't grow too big. When the - # threshold MaxFilesInCache has been exceeded, the oldest 50% of all the - # files in the cache are removed. The reason for removing so much is that - # cleaning should be done relatively seldom, since there is a slight risk - # that some other RuboCop process was just about to read the file, when - # there's parallel execution and the cache is shared. - # - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#28 - def cleanup(config_store, verbose, cache_root = T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#170 - def inhibit_cleanup; end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#170 - def inhibit_cleanup=(_arg0); end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#42 - def rubocop_required_features; end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#42 - def rubocop_required_features=(_arg0); end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#170 - def source_checksum; end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#170 - def source_checksum=(_arg0); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#65 - def remove_files(files, dirs, remove_count); end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#52 - def remove_oldest_files(files, dirs, cache_root, verbose); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/result_cache.rb#48 - def requires_file_removal?(file_count, config_store); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/result_cache.rb#16 -RuboCop::ResultCache::DL_EXTENSIONS = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/result_cache.rb#12 -RuboCop::ResultCache::NON_CHANGING = T.let(T.unsafe(nil), Array) - -# This class handles the processing of files, which includes dealing with -# formatters and letting cops inspect the files. -# -# source://rubocop//lib/rubocop/runner.rb#8 -class RuboCop::Runner - # @return [Runner] a new instance of Runner - # - # source://rubocop//lib/rubocop/runner.rb#63 - def initialize(options, config_store); end - - # Sets the attribute aborting - # - # @param value the value to set the attribute aborting to. - # - # source://rubocop//lib/rubocop/runner.rb#61 - def aborting=(_arg0); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#87 - def aborting?; end - - # Returns the value of attribute errors. - # - # source://rubocop//lib/rubocop/runner.rb#60 - def errors; end - - # source://rubocop//lib/rubocop/runner.rb#71 - def run(paths); end - - # Returns the value of attribute warnings. - # - # source://rubocop//lib/rubocop/runner.rb#60 - def warnings; end - - private - - # source://rubocop//lib/rubocop/runner.rb#200 - def add_redundant_disables(file, offenses, source); end - - # source://rubocop//lib/rubocop/runner.rb#174 - def cached_result(file, team); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#254 - def cached_run?; end - - # Check whether a run created source identical to a previous run, which - # means that we definitely have an infinite loop. - # - # source://rubocop//lib/rubocop/runner.rb#332 - def check_for_infinite_loop(processed_source, offenses_by_iteration); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#226 - def check_for_redundant_disables?(source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#427 - def considered_failure?(offense); end - - # source://rubocop//lib/rubocop/runner.rb#460 - def default_config(cop_name); end - - # source://rubocop//lib/rubocop/runner.rb#276 - def do_inspection_loop(file); end - - # source://rubocop//lib/rubocop/runner.rb#137 - def each_inspected_file(files); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#240 - def except_redundant_cop_disable_directive?; end - - # source://rubocop//lib/rubocop/runner.rb#361 - def extract_ruby_sources(processed_source); end - - # source://rubocop//lib/rubocop/runner.rb#249 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/runner.rb#178 - def file_offense_cache(file); end - - # source://rubocop//lib/rubocop/runner.rb#166 - def file_offenses(file); end - - # source://rubocop//lib/rubocop/runner.rb#244 - def file_started(file); end - - # source://rubocop//lib/rubocop/runner.rb#407 - def filter_cop_classes(cop_classes, config); end - - # source://rubocop//lib/rubocop/runner.rb#108 - def find_target_files(paths); end - - # source://rubocop//lib/rubocop/runner.rb#418 - def formatter_set; end - - # source://rubocop//lib/rubocop/runner.rb#475 - def get_processed_source(file); end - - # source://rubocop//lib/rubocop/runner.rb#346 - def inspect_file(processed_source, team = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/runner.rb#119 - def inspect_files(files); end - - # source://rubocop//lib/rubocop/runner.rb#307 - def iterate_until_no_changes(source, offenses_by_iteration); end - - # source://rubocop//lib/rubocop/runner.rb#152 - def list_files(paths); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#456 - def mark_as_safe_by_config?(config); end - - # source://rubocop//lib/rubocop/runner.rb#464 - def minimum_severity_to_fail; end - - # source://rubocop//lib/rubocop/runner.rb#368 - def mobilize_team(processed_source); end - - # source://rubocop//lib/rubocop/runner.rb#373 - def mobilized_cop_classes(config); end - - # source://rubocop//lib/rubocop/runner.rb#436 - def offenses_to_report(offenses); end - - # source://rubocop//lib/rubocop/runner.rb#156 - def process_file(file); end - - # source://rubocop//lib/rubocop/runner.rb#397 - def qualify_option_cop_names; end - - # @yield [cop] - # - # source://rubocop//lib/rubocop/runner.rb#232 - def redundant_cop_disable_directive(file); end - - # source://rubocop//lib/rubocop/runner.rb#266 - def save_in_cache(cache, offenses); end - - # A Cop::Team instance is stateful and may change when inspecting. - # The "standby" team for a given config is an initialized but - # otherwise dormant team that can be used for config- and option- - # level caching in ResultCache. - # - # source://rubocop//lib/rubocop/runner.rb#503 - def standby_team(config); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#414 - def style_guide_cops_only?(config); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#448 - def supports_safe_autocorrect?(offense); end - - # @yield [team] - # - # source://rubocop//lib/rubocop/runner.rb#215 - def team_for_redundant_disables(file, offenses, source); end - - # Warms up the RuboCop cache by forking a suitable number of RuboCop - # instances that each inspects its allotted group of files. - # - # source://rubocop//lib/rubocop/runner.rb#95 - def warm_cache(target_files); end - - class << self - # @return [Array<#call>] - # - # source://rubocop//lib/rubocop/runner.rb#33 - def ruby_extractors; end - - private - - # @return [#call] - # - # source://rubocop//lib/rubocop/runner.rb#40 - def default_ruby_extractor; end - end -end - -# An exception indicating that the inspection loop got stuck correcting -# offenses back and forth. -# -# source://rubocop//lib/rubocop/runner.rb#11 -class RuboCop::Runner::InfiniteCorrectionLoop < ::StandardError - # @return [InfiniteCorrectionLoop] a new instance of InfiniteCorrectionLoop - # - # source://rubocop//lib/rubocop/runner.rb#14 - def initialize(path, offenses_by_iteration, loop_start: T.unsafe(nil)); end - - # Returns the value of attribute offenses. - # - # source://rubocop//lib/rubocop/runner.rb#12 - def offenses; end -end - -# @api private -# -# source://rubocop//lib/rubocop/runner.rb#53 -RuboCop::Runner::MAX_ITERATIONS = T.let(T.unsafe(nil), Integer) - -# @api private -# -# source://rubocop//lib/rubocop/runner.rb#56 -RuboCop::Runner::REDUNDANT_COP_DISABLE_DIRECTIVE_RULES = T.let(T.unsafe(nil), Array) - -# Take a string with embedded escapes, and convert the escapes as the Ruby -# interpreter would when reading a double-quoted string literal. -# For example, "\\n" will be converted to "\n". -# -# source://rubocop//lib/rubocop/string_interpreter.rb#7 -class RuboCop::StringInterpreter - class << self - # source://rubocop//lib/rubocop/string_interpreter.rb#24 - def interpret(string); end - - private - - # source://rubocop//lib/rubocop/string_interpreter.rb#51 - def interpret_hex(escape); end - - # source://rubocop//lib/rubocop/string_interpreter.rb#55 - def interpret_octal(escape); end - - # source://rubocop//lib/rubocop/string_interpreter.rb#33 - def interpret_string_escape(escape); end - - # source://rubocop//lib/rubocop/string_interpreter.rb#43 - def interpret_unicode(escape); end - end -end - -# source://rubocop//lib/rubocop/string_interpreter.rb#8 -RuboCop::StringInterpreter::STRING_ESCAPES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/string_interpreter.rb#12 -RuboCop::StringInterpreter::STRING_ESCAPE_REGEX = T.let(T.unsafe(nil), Regexp) - -# This class finds target files to inspect by scanning the directory tree and picking ruby files. -# -# @api private -# -# source://rubocop//lib/rubocop/target_finder.rb#6 -class RuboCop::TargetFinder - # @api private - # @return [TargetFinder] a new instance of TargetFinder - # - # source://rubocop//lib/rubocop/target_finder.rb#9 - def initialize(config_store, options = T.unsafe(nil)); end - - # Generate a list of target files by expanding globbing patterns (if any). If args is empty, - # recursively find all Ruby source files under the current directory - # - # @api private - # @return [Array] array of file paths - # - # source://rubocop//lib/rubocop/target_finder.rb#17 - def find(args, mode); end - - # Search for files recursively starting at the given base directory using the given flags that - # determine how the match is made. Excluded files will be removed later by the caller, but as an - # optimization find_files removes the top level directories that are excluded in configuration - # in the normal way (dir/**/*). - # - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#58 - def find_files(base_dir, flags); end - - # Finds all Ruby source files under the current or other supplied directory. A Ruby source file - # is defined as a file with the `.rb` extension or a file with no extension that has a ruby - # shebang line as its first line. - # It is possible to specify includes and excludes using the config file, so you can include - # other Ruby files like Rakefiles and gemspecs. - # - # @api private - # @param base_dir Root directory under which to search for - # ruby source files - # @return [Array] Array of filenames - # - # source://rubocop//lib/rubocop/target_finder.rb#41 - def target_files_in_dir(base_dir = T.unsafe(nil)); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#120 - def all_cops_include; end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#106 - def combined_exclude_glob_patterns(base_dir); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#172 - def configured_include?(file); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#208 - def debug?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#212 - def fail_fast?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#200 - def force_exclusion?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#204 - def ignore_parent_exclusion?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#145 - def included_file?(file); end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#191 - def order; end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#124 - def process_explicit_path(path, mode); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#176 - def ruby_executable?(file); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#157 - def ruby_extension?(file); end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#161 - def ruby_extensions; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#149 - def ruby_file?(file); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#168 - def ruby_filename?(file); end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#113 - def ruby_filenames; end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#187 - def ruby_interpreters(file); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#153 - def stdin?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#98 - def symlink_excluded_or_infinite_loop?(base_dir, current_dir, exclude_pattern, flags); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#73 - def to_inspect?(file, hidden_files, base_dir_config); end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#82 - def wanted_dir_patterns(base_dir, exclude_pattern, flags); end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#134 - def without_excluded(files); end -end - -# @api private -# -# source://rubocop//lib/rubocop/target_finder.rb#7 -RuboCop::TargetFinder::HIDDEN_PATH_SUBSTRING = T.let(T.unsafe(nil), String) - -# The kind of Ruby that code inspected by RuboCop is written in. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#6 -class RuboCop::TargetRuby - # @api private - # @return [TargetRuby] a new instance of TargetRuby - # - # source://rubocop//lib/rubocop/target_ruby.rb#254 - def initialize(config); end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#270 - def rubocop_version_with_support; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#258 - def source; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_ruby.rb#266 - def supported?; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#262 - def version; end - - class << self - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#240 - def supported_versions; end - end -end - -# The lock file of Bundler may identify the target ruby version. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#187 -class RuboCop::TargetRuby::BundlerLockFile < ::RuboCop::TargetRuby::Source - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#188 - def name; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#221 - def bundler_lock_file_path; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#194 - def find_version; end -end - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#8 -RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) - -# If all else fails, a default version will be picked. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#228 -class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#229 - def name; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#235 - def find_version; end -end - -# The target ruby version may be found in a .gemspec file. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#53 -class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/target_ruby.rb#64 - def gem_requirement_versions(param0 = T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#70 - def name; end - - # source://rubocop//lib/rubocop/target_ruby.rb#59 - def required_ruby_version(param0); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#121 - def find_default_minimal_known_ruby(right_hand_side); end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#76 - def find_version; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#86 - def gemspec_filename; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#93 - def gemspec_filepath; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#117 - def version_from_array(array); end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#98 - def version_from_gemspec_file(file); end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#105 - def version_from_right_hand_side(right_hand_side); end -end - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#56 -RuboCop::TargetRuby::GemspecFile::GEMSPEC_EXTENSION = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#7 -RuboCop::TargetRuby::KNOWN_RUBIES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#10 -RuboCop::TargetRuby::OBSOLETE_RUBIES = T.let(T.unsafe(nil), Hash) - -# The target ruby version may be configured in RuboCop's config. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#39 -class RuboCop::TargetRuby::RuboCopConfig < ::RuboCop::TargetRuby::Source - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#40 - def name; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#46 - def find_version; end -end - -# The target ruby version may be found in a .ruby-version file. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#133 -class RuboCop::TargetRuby::RubyVersionFile < ::RuboCop::TargetRuby::Source - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#137 - def name; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#143 - def filename; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#151 - def find_version; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#147 - def pattern; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#158 - def version_file; end -end - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#134 -RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_FILENAME = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#135 -RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#244 -RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array) - -# A place where information about a target ruby version is found. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#24 -class RuboCop::TargetRuby::Source - # @api private - # @return [Source] a new instance of Source - # - # source://rubocop//lib/rubocop/target_ruby.rb#27 - def initialize(config); end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#25 - def name; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#32 - def to_s; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#25 - def version; end -end - -# The target ruby version may be found in a .tool-versions file, in a line -# starting with `ruby`. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#166 -class RuboCop::TargetRuby::ToolVersionsFile < ::RuboCop::TargetRuby::RubyVersionFile - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#170 - def name; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#176 - def filename; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#180 - def pattern; end -end - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#167 -RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_FILENAME = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#168 -RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/ast_aliases.rb#7 -RuboCop::Token = RuboCop::AST::Token - -# This module contains a collection of useful utility methods. -# -# source://rubocop//lib/rubocop/util.rb#5 -module RuboCop::Util - class << self - # source://rubocop//lib/rubocop/util.rb#6 - def silence_warnings; end - end -end - -# source://rubocop//lib/rubocop/error.rb#10 -class RuboCop::ValidationError < ::RuboCop::Error; end - -# This module holds the RuboCop version information. -# -# source://rubocop//lib/rubocop/version.rb#5 -module RuboCop::Version - class << self - # @api private - # - # source://rubocop//lib/rubocop/version.rb#108 - def document_version; end - - # @api private - # - # source://rubocop//lib/rubocop/version.rb#58 - def extension_versions(env); end - - # Returns feature version in one of two ways: - # - # * Find by RuboCop core version style (e.g. rubocop-performance, rubocop-rspec) - # * Find by `bundle gem` version style (e.g. rubocop-rake) - # - # @api private - # - # source://rubocop//lib/rubocop/version.rb#92 - def feature_version(feature); end - - # @api private - # - # source://rubocop//lib/rubocop/version.rb#43 - def parser_version; end - - # @api private - # - # source://rubocop//lib/rubocop/version.rb#113 - def server_mode; end - - # @api private - # - # source://rubocop//lib/rubocop/version.rb#21 - def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end - end -end - -# source://rubocop//lib/rubocop/version.rb#12 -RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/version.rb#16 -RuboCop::Version::EXTENSION_PATH_NAMES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/version.rb#8 -RuboCop::Version::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/version.rb#6 -RuboCop::Version::STRING = T.let(T.unsafe(nil), String) - -# A Warning exception is different from an Offense with severity 'warning' -# When a Warning is raised, this means that RuboCop was unable to perform a -# requested operation (such as inspecting or correcting a source file) due to -# user error -# For example, a configuration value in .rubocop.yml might be malformed -# -# source://rubocop//lib/rubocop/warning.rb#9 -class RuboCop::Warning < ::StandardError; end - -# Find duplicated keys from YAML. -# -# @api private -# -# source://rubocop//lib/rubocop/yaml_duplication_checker.rb#6 -module RuboCop::YAMLDuplicationChecker - class << self - # @api private - # - # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#7 - def check(yaml_string, filename, &on_duplicated); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#21 - def traverse(tree, &on_duplicated); end - end -end - -# Extensions to the core String class -# -# source://rubocop//lib/rubocop/core_ext/string.rb#4 -class String - include ::Comparable -end diff --git a/sorbet/rbi/gems/rubocop@1.86.1.rbi b/sorbet/rbi/gems/rubocop@1.86.1.rbi new file mode 100644 index 000000000..c118dfc66 --- /dev/null +++ b/sorbet/rbi/gems/rubocop@1.86.1.rbi @@ -0,0 +1,62214 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop` gem. +# Please instead update this file by running `bin/tapioca gem rubocop`. + + +class Parser::Source::Comment + include ::RuboCop::Ext::Comment +end + +class Parser::Source::Range + include ::RuboCop::Ext::Range +end + +class Regexp::Expression::Base + include ::RuboCop::Ext::RegexpParser::Expression::Base +end + +class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression + include ::RuboCop::Ext::RegexpParser::Expression::CharacterSet +end + +class Regexp::Expression::Quantifier + include ::RuboCop::Ext::RegexpParser::Expression::Base +end + +# These aliases are for compatibility. +# FIXME: Moving Rails department code to RuboCop Rails will remove +# The Lint/RedundantCopDisableDirective cop needs to be disabled so as +# to be able to provide a (bad) example of a redundant disable. +# Lint/RedundantCopDisableDirective needs to be disabled so as +# +# This code is based on https://github.com/mikian/rubocop-junit-formatter. +# +# Copyright (c) 2015 Mikko Kokkonen +# +# MIT License +# +# https://github.com/mikian/rubocop-junit-formatter/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/standardrb/standard. +# +# Copyright (c) 2023 Test Double, Inc. +# +# The MIT License (MIT) +# +# https://github.com/standardrb/standard/blob/main/LICENSE.txt +# +# +# This code is based on https://github.com/standardrb/standard. +# +# Copyright (c) 2023 Test Double, Inc. +# +# The MIT License (MIT) +# +# https://github.com/standardrb/standard/blob/main/LICENSE.txt +# +# +# This code is based on https://github.com/standardrb/standard. +# +# Copyright (c) 2023 Test Double, Inc. +# +# The MIT License (MIT) +# +# https://github.com/standardrb/standard/blob/main/LICENSE.txt +# +# +# This code is based on https://github.com/standardrb/standard. +# +# Copyright (c) 2023 Test Double, Inc. +# +# The MIT License (MIT) +# +# https://github.com/standardrb/standard/blob/main/LICENSE.txt +# +# +# This code is based on https://github.com/standardrb/standard. +# +# Copyright (c) 2023 Test Double, Inc. +# +# The MIT License (MIT) +# +# https://github.com/standardrb/standard/blob/main/LICENSE.txt +# +# +# This code is based on https://github.com/standardrb/standard. +# +# Copyright (c) 2023 Test Double, Inc. +# +# The MIT License (MIT) +# +# https://github.com/standardrb/standard/blob/main/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# pkg:gem/rubocop#lib/rubocop/version.rb:3 +module RuboCop; end + +# pkg:gem/rubocop#lib/rubocop/ast_aliases.rb:6 +class RuboCop::AST::ProcessedSource + include ::RuboCop::Ext::ProcessedSource +end + +class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node + include ::RuboCop::Ext::RegexpNode +end + +# This is a class that reads optional command line arguments to rubocop from environment variable. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/arguments_env.rb:6 +class RuboCop::ArgumentsEnv + class << self + # pkg:gem/rubocop#lib/rubocop/arguments_env.rb:7 + def read_as_arguments; end + end +end + +# This is a class that reads optional command line arguments to rubocop from .rubocop file. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/arguments_file.rb:6 +class RuboCop::ArgumentsFile + class << self + # pkg:gem/rubocop#lib/rubocop/arguments_file.rb:7 + def read_as_arguments; end + end +end + +# The CLI is a class responsible of handling all the command line interface +# logic. +# +# pkg:gem/rubocop#lib/rubocop/cli.rb:8 +class RuboCop::CLI + # pkg:gem/rubocop#lib/rubocop/cli.rb:24 + def initialize; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:22 + def config_store; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:22 + def options; end + + # @api public + # + # Entry point for the application logic. Here we + # do the command line arguments processing and inspect + # the target files. + # + # @param args [Array] command line arguments + # @return [Integer] UNIX exit code + # + # pkg:gem/rubocop#lib/rubocop/cli.rb:39 + def run(args = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cli.rb:164 + def act_on_options; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:216 + def apply_default_formatter; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:133 + def execute_runners; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:199 + def handle_editor_mode; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:204 + def handle_exiting_options; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:152 + def parallel_by_default!; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:88 + def profile_if_needed; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:230 + def report_pending_cops; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:121 + def require_gem(name); end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:129 + def run_command(name); end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:186 + def set_options_to_config_loader; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:194 + def set_options_to_pending_cops_reporter; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:141 + def suggest_extensions; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:145 + def validate_options_vs_config; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:234 + def warn_if_cache_root_changed(early, desired); end +end + +# Home of subcommands in the CLI. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command.rb:7 +module RuboCop::CLI::Command + class << self + # Find the command with a given name and run it in an environment. + # + # pkg:gem/rubocop#lib/rubocop/cli/command.rb:10 + def run(env, name); end + + private + + # pkg:gem/rubocop#lib/rubocop/cli/command.rb:16 + def class_for(name); end + end +end + +# Generate a configuration file acting as a TODO list. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:8 +class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:25 + def run; end + + private + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:107 + def add_formatter; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:115 + def add_inheritance_from_auto_generated_file(config_file); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:111 + def execute_runner; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:136 + def existing_configuration(config_file); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:65 + def line_length_cop(config); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:53 + def line_length_enabled?(config); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:61 + def max_line_length(config); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:34 + def maybe_run_line_length_cop; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:73 + def only_exclude?; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:69 + def options_has_only_flag?; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:153 + def relative_path_to_todo_from_options_config; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:100 + def reset_config_and_auto_gen_file; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:91 + def run_all_cops(line_length_contents); end + + # Do an initial run with only Layout/LineLength so that cops that + # depend on Layout/LineLength:Max get the correct value for that + # parameter. + # + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:80 + def run_line_length_cop; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:57 + def same_max_line_length?(config1, config2); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:48 + def skip_line_length_cop(reason); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:142 + def write_config_file(file_name, file_string, rubocop_yml_contents); end +end + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:11 +RuboCop::CLI::Command::AutoGenerateConfig::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:15 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1 = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:19 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_DISABLED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:18 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:20 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_COPS = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:22 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_EXCLUDE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:16 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_2 = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:13 +RuboCop::CLI::Command::AutoGenerateConfig::PLACEHOLDER = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:12 +RuboCop::CLI::Command::AutoGenerateConfig::YAML_OPTIONAL_DOC_START = T.let(T.unsafe(nil), Regexp) + +# A subcommand in the CLI. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/base.rb:8 +class RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/base.rb:26 + def initialize(env); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/base.rb:9 + def env; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cli/command/base.rb:21 + def by_command_name(name); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/base.rb:14 + def command_name; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/base.rb:14 + def command_name=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/base.rb:16 + def inherited(subclass); end + end +end + +# Run all the selected cops and report the result. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:8 +class RuboCop::CLI::Command::ExecuteRunner < ::RuboCop::CLI::Command::Base + include ::RuboCop::Formatter::TextUtil + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:16 + def run; end + + private + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:85 + def bug_tracker_uri; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:69 + def display_error_summary(errors); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:56 + def display_summary(runner); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:61 + def display_warning_summary(warnings); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:22 + def execute_runner(paths); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:91 + def maybe_print_corrected_source; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:42 + def with_redirect; end +end + +# Combination of short and long formatter names. +# +# pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:12 +RuboCop::CLI::Command::ExecuteRunner::INTEGRATION_FORMATTERS = T.let(T.unsafe(nil), Array) + +# Generate a .rubocop.yml file in the current directory. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/init_dotfile.rb:8 +class RuboCop::CLI::Command::InitDotfile < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/init_dotfile.rb:13 + def run; end +end + +# pkg:gem/rubocop#lib/rubocop/cli/command/init_dotfile.rb:9 +RuboCop::CLI::Command::InitDotfile::DOTFILE = T.let(T.unsafe(nil), String) + +# Start Language Server Protocol of RuboCop. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/lsp.rb:8 +class RuboCop::CLI::Command::LSP < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/lsp.rb:11 + def run; end +end + +# Start Model Context Protocol of RuboCop. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/mcp.rb:8 +class RuboCop::CLI::Command::MCP < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/mcp.rb:11 + def run; end +end + +# Shows the given cops, or all cops by default, and their configurations +# for the current directory. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:9 +class RuboCop::CLI::Command::ShowCops < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:24 + def initialize(env); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:39 + def run; end + + private + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:89 + def config_lines(cop); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:85 + def cops_of_department(cops, department); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:45 + def print_available_cops; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:68 + def print_cop_details(cops); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:56 + def print_cops_of_department(registry, department, show_all); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:77 + def selected_cops_of_department(cops, department); end +end + +# pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:12 +class RuboCop::CLI::Command::ShowCops::ExactMatcher < ::Struct + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:13 + def match?(name); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:12 + def pattern; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:12 + def pattern=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:12 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:12 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:12 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:12 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:12 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:18 +class RuboCop::CLI::Command::ShowCops::WildcardMatcher < ::Struct + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:19 + def match?(name); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:18 + def pattern; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:18 + def pattern=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:18 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:18 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:18 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:18 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:18 + def new(*_arg0); end + end +end + +# Prints out url to documentation of provided cops +# or documentation base url by default. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/show_docs_url.rb:9 +class RuboCop::CLI::Command::ShowDocsUrl < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/show_docs_url.rb:12 + def initialize(env); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_docs_url.rb:18 + def run; end + + private + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_docs_url.rb:38 + def cops_array; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_docs_url.rb:24 + def print_documentation_url; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_docs_url.rb:42 + def registry_hash; end +end + +# Suggest RuboCop extensions to install based on Gemfile dependencies. +# Only primary dependencies are evaluated, so if a dependency depends on a +# gem with an extension, it is not suggested. However, if an extension is +# a transitive dependency, it will not be suggested. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:11 +class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:17 + def run; end + + private + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:73 + def all_extensions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:69 + def current_formatter; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:117 + def dependent_gems; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:87 + def extensions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:109 + def installed_and_not_loaded_extensions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:91 + def installed_extensions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:121 + def installed_gems; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:99 + def loaded_extensions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:113 + def lockfile; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:95 + def not_installed_extensions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:41 + def print_install_suggestions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:51 + def print_load_suggestions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:60 + def print_opt_out_instruction; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:125 + def puts(*args); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:30 + def skip?; end +end + +# Combination of short and long formatter names. +# +# pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:13 +RuboCop::CLI::Command::SuggestExtensions::INCLUDED_FORMATTERS = T.let(T.unsafe(nil), Array) + +# Display version. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/version.rb:8 +class RuboCop::CLI::Command::Version < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/version.rb:11 + def run; end +end + +# pkg:gem/rubocop#lib/rubocop/cli.rb:13 +RuboCop::CLI::DEFAULT_PARALLEL_OPTIONS = T.let(T.unsafe(nil), Array) + +# Execution environment for a CLI command. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/environment.rb:7 +class RuboCop::CLI::Environment + # pkg:gem/rubocop#lib/rubocop/cli/environment.rb:10 + def initialize(options, config_store, paths); end + + # pkg:gem/rubocop#lib/rubocop/cli/environment.rb:8 + def config_store; end + + # pkg:gem/rubocop#lib/rubocop/cli/environment.rb:8 + def options; end + + # pkg:gem/rubocop#lib/rubocop/cli/environment.rb:8 + def paths; end + + # Run a command in this environment. + # + # pkg:gem/rubocop#lib/rubocop/cli/environment.rb:17 + def run(name); end +end + +# pkg:gem/rubocop#lib/rubocop/cli.rb:20 +class RuboCop::CLI::Finished < ::StandardError; end + +# pkg:gem/rubocop#lib/rubocop/cli.rb:11 +RuboCop::CLI::STATUS_ERROR = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rubocop#lib/rubocop/cli.rb:12 +RuboCop::CLI::STATUS_INTERRUPTED = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rubocop#lib/rubocop/cli.rb:10 +RuboCop::CLI::STATUS_OFFENSES = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rubocop#lib/rubocop/cli.rb:9 +RuboCop::CLI::STATUS_SUCCESS = T.let(T.unsafe(nil), Integer) + +# This class represents the cache config of the caching RuboCop runs. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cache_config.rb:6 +class RuboCop::CacheConfig + class << self + # pkg:gem/rubocop#lib/rubocop/cache_config.rb:7 + def root_dir; end + + # Lightweight cache root computation that reads CacheRootDirectory from + # the toplevel config file and environment variables without going through + # the full ConfigStore/ConfigLoader. This method can be used, for example, + # before loading configuration files. Please note that this method doesn't + # take into account any `inherit_from` dependencies. + # + # pkg:gem/rubocop#lib/rubocop/cache_config.rb:34 + def root_dir_from_toplevel_config(cache_root_override = T.unsafe(nil)); end + end +end + +# Converts RuboCop objects to and from the serialization format JSON. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cached_data.rb:8 +class RuboCop::CachedData + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:9 + def initialize(filename); end + + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:13 + def from_json(text); end + + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:17 + def to_json(offenses); end + + private + + # Restore an offense object loaded from a JSON file. + # + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:47 + def deserialize_offenses(offenses); end + + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:54 + def location_from_source_buffer(offense); end + + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:40 + def message(offense); end + + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:23 + def serialize_offense(offense); end + + # Delay creation until needed. Some type of offenses will have no buffer associated with them + # and be global only. For these, trying to create the buffer will likely fail, for example + # because of unknown encoding comments. + # + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:67 + def source_buffer; end +end + +# and provides a way to check if each cop is enabled at arbitrary line. +# +# pkg:gem/rubocop#lib/rubocop/comment_config.rb:6 +class RuboCop::CommentConfig + extend ::RuboCop::SimpleForwardable + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:34 + def initialize(processed_source); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:64 + def comment_only_line?(line_number); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:32 + def config(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:52 + def cop_disabled_line_ranges; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:40 + def cop_enabled_at_line?(cop, line_number); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:48 + def cop_opted_in?(cop); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:56 + def extra_enabled_comments; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:30 + def processed_source; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:32 + def registry(*_arg0, **_arg1, &_arg2); end + + private + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:98 + def analyze; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:177 + def analyze_cop(analysis, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:195 + def analyze_disabled(analysis, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:202 + def analyze_rest(analysis, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:188 + def analyze_single_line(analysis, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:147 + def apply_cop_op(analyses, operation, cop, line); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:141 + def apply_push(analyses, resolved_cops, line); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:209 + def cop_line_ranges(analysis); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:215 + def each_directive; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:135 + def expand_cop_name(name); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:70 + def extra_enabled_comments_with_names(extras:, names:); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:235 + def handle_enable_all(directive, names, extras); end + + # Collect cops that have been disabled or enabled by name in a directive comment + # so that `Lint/RedundantCopEnableDirective` can register offenses correctly. + # + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:249 + def handle_switch(directive, names, extras); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:168 + def inject_disabled_cops_directives(analyses); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:228 + def non_comment_token_line_numbers; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:85 + def opt_in_cops; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:157 + def pop_state(analyses, line); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:224 + def qualified_cop_name(cop_name); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:129 + def resolve_push_cops(directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:125 + def snapshot_cops(analyses, cop_names); end +end + +# pkg:gem/rubocop#lib/rubocop/comment_config.rb:9 +RuboCop::CommentConfig::CONFIG_DISABLED_LINE_RANGE_MIN = T.let(T.unsafe(nil), Float) + +# This class provides an API compatible with RuboCop::DirectiveComment +# to be used for cops that are disabled in the config file +# +# pkg:gem/rubocop#lib/rubocop/comment_config.rb:13 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment + include ::RuboCop::Ext::Comment + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 + def initialize(cop_name); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:16 + def line_number; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:16 + def loc; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:16 + def text; end +end + +# pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Expression < ::Struct + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 + def line; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 + def line=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 + def members; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/comment_config.rb:18 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Loc < ::Struct + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:18 + def expression; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:18 + def expression=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:18 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:18 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:18 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:18 + def members; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:18 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/comment_config.rb:28 +class RuboCop::CommentConfig::CopAnalysis < ::Struct + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:28 + def line_ranges; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:28 + def line_ranges=(_); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:28 + def start_line_number; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:28 + def start_line_number=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:28 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:28 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:28 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:28 + def members; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:28 + def new(*_arg0); end + end +end + +# This class represents the configuration of the RuboCop application +# and all its cops. A Config is associated with a YAML configuration +# file from which it was read. Several different Configs can be used +# during a run of the rubocop program, if files in several +# directories are inspected. +# +# pkg:gem/rubocop#lib/rubocop/config.rb:12 +class RuboCop::Config + include ::RuboCop::PathUtil + include ::RuboCop::FileFinder + extend ::RuboCop::SimpleForwardable + + # pkg:gem/rubocop#lib/rubocop/config.rb:31 + def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def [](*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def []=(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:212 + def active_support_extensions_enabled?; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:127 + def add_excludes_from_higher_level(highest_config); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:240 + def allowed_camel_case_file?(file); end + + # Paths specified in configuration files starting with .rubocop are + # relative to the directory where that file is. Paths in other config files + # are relative to the current directory. This is so that paths in + # config/default.yml, for example, are not relative to RuboCop's config + # directory since that wouldn't work. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:281 + def base_dir_for_path_parameters; end + + # @return [String, nil] + # + # pkg:gem/rubocop#lib/rubocop/config.rb:311 + def bundler_lock_file_path; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:85 + def check; end + + # @return [Boolean] whether config for this badge has 'Include' or 'Exclude' keys + # @api private + # + # pkg:gem/rubocop#lib/rubocop/config.rb:180 + def clusivity_config_for_badge?(badge); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:200 + def cop_enabled?(name); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def delete(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:139 + def deprecation_check; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def dig(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:204 + def disabled_new_cops?; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def each(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def each_key(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:208 + def enabled_new_cops?; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def fetch(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:259 + def file_to_exclude?(file); end + + # Returns true if the file matches any include pattern. If a block is given, the block is called + # to determine if the pattern is relevant (true returned by the block) or should be skipped + # (false returned). + # + # pkg:gem/rubocop#lib/rubocop/config.rb:223 + def file_to_include?(file); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:196 + def for_all_cops; end + + # @return [Config] for the given cop merged with that of its department (if any) + # Note: the 'Enabled' attribute is same as that returned by `for_cop` + # + # pkg:gem/rubocop#lib/rubocop/config.rb:166 + def for_badge(badge); end + + # @return [Config] for the given cop / cop name. + # Note: the 'Enabled' attribute is calculated according to the department's + # and 'AllCops' configuration; other attributes are not inherited. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:153 + def for_cop(cop); end + + # @return [Config] for the given department name. + # Note: the 'Enabled' attribute will be present only if specified + # at the department's level + # + # pkg:gem/rubocop#lib/rubocop/config.rb:191 + def for_department(department_name); end + + # @return [Config, Hash] for the given cop / cop name. + # If the given cop is enabled, returns its configuration hash. + # Otherwise, returns an empty hash. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:160 + def for_enabled_cop(cop); end + + # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) + # @returns [Hash{String => Gem::Version}] The locked gem versions, keyed by the gems' names. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:336 + def gem_versions_in_target; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:340 + def inspect; end + + # True if this is a config file that is shipped with RuboCop + # + # pkg:gem/rubocop#lib/rubocop/config.rb:110 + def internal?; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def key?(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def keys(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:81 + def loaded_features; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:21 + def loaded_path; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:77 + def loaded_plugins; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:115 + def make_excludes_absolute; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def map(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def merge(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:291 + def parser_engine; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:272 + def path_relative_to_config(path); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:268 + def patterns_to_exclude; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:264 + def patterns_to_include; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:322 + def pending_cops; end + + # Returns true if there's a chance that an Include pattern matches hidden + # files, false if that's definitely not possible. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:251 + def possibly_include_hidden?; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def replace(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:105 + def signature; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:306 + def smart_loaded_path; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:216 + def string_literals_frozen_by_default?; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:295 + def target_rails_version; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:99 + def target_ruby_version(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def to_h(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def to_hash(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:101 + def to_s; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:97 + def transform_values(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:99 + def validate(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:92 + def validate_after_resolution; end + + private + + # pkg:gem/rubocop#lib/rubocop/config.rb:396 + def department_of(qualified_cop_name); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:384 + def enable_cop?(qualified_cop_name, cop_options); end + + # @param [Gem::Version] gem_version an object like `Gem::Version.new("7.1.2.3")` + # @return [Float] The major and minor version, like `7.1` + # + # pkg:gem/rubocop#lib/rubocop/config.rb:371 + def gem_version_to_major_minor_float(gem_version); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:346 + def match_relative_or_absolute_path?(pattern, relative_file_path, absolute_file_path); end + + # @returns [Hash{String => Gem::Version}] The locked gem versions, keyed by the gems' names. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:377 + def read_gem_versions_from_target_lockfile; end + + # @return [Float, nil] The Rails version as a `major.minor` Float. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:358 + def read_rails_version_from_bundler_lock_file; end + + # @return [Float, nil] The Rails version as a `major.minor` Float. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:353 + def target_rails_version_from_bundler_lock_file; end + + class << self + # pkg:gem/rubocop#lib/rubocop/config.rb:23 + def create(hash, path, check: T.unsafe(nil)); end + end +end + +# pkg:gem/rubocop#lib/rubocop/config.rb:17 +class RuboCop::Config::CopConfig < ::Struct + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def metadata; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def metadata=(_); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def name; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def name=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def members; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/config.rb:20 +RuboCop::Config::DEFAULT_RAILS_VERSION = T.let(T.unsafe(nil), Float) + +# pkg:gem/rubocop#lib/rubocop/config.rb:19 +RuboCop::Config::EMPTY_CONFIG = T.let(T.unsafe(nil), Hash) + +# This class has methods related to finding configuration path. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_finder.rb:8 +class RuboCop::ConfigFinder + extend ::RuboCop::FileFinder + + class << self + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:19 + def find_config_path(target_dir); end + + # Returns the path RuboCop inferred as the root of the project. No file + # searches will go past this directory. + # + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:26 + def project_root; end + + # Returns the path RuboCop inferred as the root of the project. No file + # searches will go past this directory. + # + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:17 + def project_root=(_arg0); end + + private + + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:69 + def expand_path(path); end + + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:40 + def find_project_dotfile(target_dir); end + + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:32 + def find_project_root; end + + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:44 + def find_project_root_dot_config; end + + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:54 + def find_user_dotfile; end + + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:62 + def find_user_xdg_config; end + end +end + +# pkg:gem/rubocop#lib/rubocop/config_finder.rb:12 +RuboCop::ConfigFinder::DEFAULT_FILE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/config_finder.rb:9 +RuboCop::ConfigFinder::DOTFILE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/config_finder.rb:11 +RuboCop::ConfigFinder::RUBOCOP_HOME = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/config_finder.rb:10 +RuboCop::ConfigFinder::XDG_CONFIG = T.let(T.unsafe(nil), String) + +# This class represents the configuration of the RuboCop application +# and all its cops. A Config is associated with a YAML configuration +# file from which it was read. Several different Configs can be used +# during a run of the rubocop program, if files in several +# directories are inspected. +# +# pkg:gem/rubocop#lib/rubocop/config_loader.rb:18 +class RuboCop::ConfigLoader + extend ::RuboCop::FileFinder + + class << self + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:138 + def add_excludes_from_files(config, config_file); end + + # @api private + # Used to add features that were required inside a config or from + # the CLI using `--require`. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:203 + def add_loaded_features(loaded_features); end + + # @api private + # Used to add plugins that were required inside a config or from + # the CLI using `--plugin`. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:196 + def add_loaded_plugins(loaded_plugins); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:91 + def add_missing_namespaces(path, hash); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:34 + def cache_root(cache_root_override = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:28 + def cache_root=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:38 + def clear_options; end + + # Returns the path of .rubocop.yml searching upwards in the + # directory structure starting at the given directory where the + # inspected file is. If no .rubocop.yml is found there, the + # user's home directory is checked. If there's no .rubocop.yml + # there either, the path to the default file is returned. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:119 + def configuration_file_for(target_dir); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:123 + def configuration_from_file(config_file, check: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def debug; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def debug=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:31 + def debug?; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:148 + def default_configuration; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:28 + def default_configuration=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def disable_pending_cops; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def disable_pending_cops=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def enable_pending_cops; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def enable_pending_cops=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def ignore_parent_exclusion; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def ignore_parent_exclusion=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:32 + def ignore_parent_exclusion?; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def ignore_unrecognized_cops; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def ignore_unrecognized_cops=(_arg0); end + + # This API is primarily intended for testing and documenting plugins. + # When testing a plugin using `rubocop/rspec/support`, the plugin is loaded automatically, + # so this API is usually not needed. It is intended to be used only when implementing tests + # that do not use `rubocop/rspec/support`. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:159 + def inject_defaults!(config_yml_path); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:51 + def load_file(file, check: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:76 + def load_yaml_configuration(absolute_path); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:29 + def loaded_features; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:29 + def loaded_plugins; end + + # Return a recursive merge of two hashes. That is, a normal hash merge, + # with the addition that any value that is a hash, and occurs in both + # arguments, will also be merged. And so on. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:110 + def merge(base_hash, derived_hash); end + + # Merges the given configuration with the default one. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:189 + def merge_with_default(config, config_file, unset_nil: T.unsafe(nil)); end + + # Returns the path RuboCop inferred as the root of the project. No file + # searches will go past this directory. + # @deprecated Use `RuboCop::ConfigFinder.project_root` instead. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:179 + def project_root; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:217 + def check_duplication(yaml_code, absolute_path); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:209 + def file_path(file); end + + # Read the specified file, or exit with a friendly, concise message on + # stderr. Care is taken to use the standard OS exit code for a "file not + # found" error. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:237 + def read_file(absolute_path); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:213 + def resolver; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:243 + def yaml_tree_to_hash(yaml_tree); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:253 + def yaml_tree_to_hash!(yaml_tree); end + end +end + +# pkg:gem/rubocop#lib/rubocop/config_loader.rb:21 +RuboCop::ConfigLoader::DEFAULT_FILE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/config_loader.rb:19 +RuboCop::ConfigLoader::DOTFILE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/config_loader.rb:20 +RuboCop::ConfigLoader::RUBOCOP_HOME = T.let(T.unsafe(nil), String) + +# A help class for ConfigLoader that handles configuration resolution. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:10 +class RuboCop::ConfigLoaderResolver + # When one .rubocop.yml file inherits from another .rubocop.yml file, the Include paths in the + # base configuration are relative to the directory where the base configuration file is. For the + # derived configuration, we need to make those paths relative to where the derived configuration + # file is. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:65 + def fix_include_paths(base_config_path, hash, path, key, value); end + + # Return a recursive merge of two hashes. That is, a normal hash merge, + # with the addition that any value that is a hash, and occurs in both + # arguments, will also be merged. And so on. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:119 + def merge(base_hash, derived_hash, **opts); end + + # Merges the given configuration with the default one. If + # AllCops:DisabledByDefault is true, it changes the Enabled params so that + # only cops from user configuration are enabled. If + # AllCops:EnabledByDefault is true, it changes the Enabled params so that + # only cops explicitly disabled in user configuration are disabled. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:95 + def merge_with_default(config, config_file, unset_nil:); end + + # An `Enabled: true` setting in user configuration for a cop overrides an + # `Enabled: false` setting for its department. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:139 + def override_department_setting_for_cops(base_hash, derived_hash); end + + # If a cop was previously explicitly enabled, but then superseded by the + # department being disabled, disable it. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:156 + def override_enabled_for_disabled_departments(base_hash, derived_hash); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:38 + def resolve_inheritance(path, hash, file, debug); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:75 + def resolve_inheritance_from_gems(hash); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:11 + def resolve_plugins(rubocop_config, plugins); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:18 + def resolve_requires(path, hash); end + + private + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:235 + def base_configs(path, inherit_from, file); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:203 + def determine_inherit_mode(hash, key); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:172 + def disabled?(hash, department); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:176 + def duplicate_setting?(base_hash, derived_hash, key, inherited_file); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:197 + def duplicate_setting_warning(opts, key); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:294 + def gem_config_path(gem_name, relative_config_path); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:272 + def handle_disabled_by_default(config, new_default_configuration); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:247 + def inherited_file(path, inherit_from, file); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:231 + def merge_hashes?(base_hash, derived_hash, key); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:268 + def remote_config?(file); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:223 + def should_merge?(mode, key); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:227 + def should_override?(mode, key); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:209 + def should_union?(derived_hash, base_hash, root_mode, key); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:290 + def transform(config, &block); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:185 + def warn_on_duplicate_setting(base_hash, derived_hash, key, **opts); end +end + +# Raised when a RuboCop configuration file is not found. +# +# pkg:gem/rubocop#lib/rubocop/config_loader.rb:10 +class RuboCop::ConfigNotFoundError < ::RuboCop::Error; end + +# This class handles obsolete configuration. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:4 +class RuboCop::ConfigObsoletion + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:66 + def initialize(config); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:84 + def deprecated_cop_name?(name); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:79 + def legacy_cop_names; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:72 + def reject_obsolete!; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:21 + def rules; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:21 + def warnings; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:151 + def cop_rules; end + + # Cop rules are keyed by the name of the original cop + # + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:112 + def load_cop_rules(rules); end + + # Parameter rules may apply to multiple cops and multiple parameters + # and are given as an array. Each combination is turned into a separate + # rule object. + # + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:125 + def load_parameter_rules(rules); end + + # Default rules for obsoletions are in config/obsoletion.yml + # Additional rules files can be added with `RuboCop::ConfigObsoletion.files << filename` + # + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:92 + def load_rules; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:138 + def obsoletions; end + + class << self + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:45 + def deprecated_cop_name?(name); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:49 + def deprecated_names_for(cop); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:24 + def files; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:24 + def files=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:26 + def global; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:40 + def legacy_cop_names; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:30 + def reset!; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:36 + def rules_cache_key; end + end +end + +# pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:8 +RuboCop::ConfigObsoletion::COP_RULE_CLASSES = T.let(T.unsafe(nil), Hash) + +# Encapsulation of a ConfigObsoletion rule for changing a parameter +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_enforced_styles.rb:7 +class RuboCop::ConfigObsoletion::ChangedEnforcedStyles < ::RuboCop::ConfigObsoletion::ParameterRule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_enforced_styles.rb:14 + def message; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_enforced_styles.rb:10 + def violated?; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_enforced_styles.rb:28 + def value; end +end + +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_enforced_styles.rb:8 +RuboCop::ConfigObsoletion::ChangedEnforcedStyles::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for changing a parameter +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_parameter.rb:7 +class RuboCop::ConfigObsoletion::ChangedParameter < ::RuboCop::ConfigObsoletion::ParameterRule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_parameter.rb:10 + def message; end +end + +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_parameter.rb:8 +RuboCop::ConfigObsoletion::ChangedParameter::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Base class for ConfigObsoletion rules relating to cops +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:7 +class RuboCop::ConfigObsoletion::CopRule < ::RuboCop::ConfigObsoletion::Rule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:10 + def initialize(config, old_name); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:15 + def cop_rule?; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:19 + def message; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:8 + def old_name; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:28 + def violated?; end + + # Cop rules currently can only be failures, not warnings + # + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:24 + def warning?; end +end + +# pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:7 +RuboCop::ConfigObsoletion::DEFAULT_RULES_FILE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for splitting a cop's +# functionality into multiple new cops. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:8 +class RuboCop::ConfigObsoletion::ExtractedCop < ::RuboCop::ConfigObsoletion::CopRule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:11 + def initialize(config, old_name, gem); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:9 + def department; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:9 + def gem; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:23 + def rule_message; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:17 + def violated?; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:32 + def affected_cops; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:41 + def plugin_loaded?; end +end + +# pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:18 +RuboCop::ConfigObsoletion::LOAD_RULES_CACHE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:14 +RuboCop::ConfigObsoletion::PARAMETER_RULE_CLASSES = T.let(T.unsafe(nil), Hash) + +# Base class for ConfigObsoletion rules relating to parameters +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:7 +class RuboCop::ConfigObsoletion::ParameterRule < ::RuboCop::ConfigObsoletion::Rule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:10 + def initialize(config, cop, parameter, metadata); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:8 + def cop; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:8 + def metadata; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:8 + def parameter; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:17 + def parameter_rule?; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:21 + def violated?; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:25 + def warning?; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:39 + def alternative; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:43 + def alternatives; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:31 + def applies_to_current_ruby_version?; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:47 + def reason; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:51 + def severity; end +end + +# Encapsulation of a ConfigObsoletion rule for removing +# a previously defined cop. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:8 +class RuboCop::ConfigObsoletion::RemovedCop < ::RuboCop::ConfigObsoletion::CopRule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:13 + def initialize(config, old_name, metadata); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:9 + def metadata; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:9 + def old_name; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:18 + def rule_message; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:36 + def alternatives; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:32 + def reason; end +end + +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:11 +RuboCop::ConfigObsoletion::RemovedCop::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for renaming +# a cop or moving it to a new department. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:8 +class RuboCop::ConfigObsoletion::RenamedCop < ::RuboCop::ConfigObsoletion::CopRule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:11 + def initialize(config, old_name, name_or_hash); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:9 + def metadata; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:9 + def new_name; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:23 + def rule_message; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:27 + def warning?; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:33 + def moved?; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:44 + def severity; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:40 + def verb; end +end + +# Abstract base class for ConfigObsoletion rules +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:7 +class RuboCop::ConfigObsoletion::Rule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:8 + def initialize(config); end + + # Does this rule relate to cops? + # + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:13 + def cop_rule?; end + + # Does this rule relate to parameters? + # + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:18 + def parameter_rule?; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:22 + def violated?; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:28 + def config; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:36 + def smart_loaded_path; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:30 + def to_sentence(collection, connector: T.unsafe(nil)); end +end + +# Encapsulation of a ConfigObsoletion rule for splitting a cop's +# functionality into multiple new cops. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/split_cop.rb:8 +class RuboCop::ConfigObsoletion::SplitCop < ::RuboCop::ConfigObsoletion::CopRule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/split_cop.rb:11 + def initialize(config, old_name, metadata); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/split_cop.rb:9 + def metadata; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/split_cop.rb:16 + def rule_message; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/split_cop.rb:22 + def alternatives; end +end + +# This class handles collecting the options for regenerating a TODO file. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_regeneration.rb:6 +class RuboCop::ConfigRegeneration + # Get options from the comment in the TODO file, and parse them as options + # + # pkg:gem/rubocop#lib/rubocop/config_regeneration.rb:12 + def options; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_regeneration.rb:29 + def generation_command; end + + # pkg:gem/rubocop#lib/rubocop/config_regeneration.rb:25 + def todo_exists?; end +end + +# pkg:gem/rubocop#lib/rubocop/config_regeneration.rb:7 +RuboCop::ConfigRegeneration::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/config_regeneration.rb:8 +RuboCop::ConfigRegeneration::COMMAND_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/config_regeneration.rb:9 +RuboCop::ConfigRegeneration::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# Handles caching of configurations and association of inspected +# ruby files to configurations. +# +# pkg:gem/rubocop#lib/rubocop/config_store.rb:6 +class RuboCop::ConfigStore + # pkg:gem/rubocop#lib/rubocop/config_store.rb:10 + def initialize; end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:28 + def apply_options!(options); end + + # If type (file/dir) is known beforehand, + # prefer using #for_file or #for_dir for improved performance + # + # pkg:gem/rubocop#lib/rubocop/config_store.rb:57 + def for(file_or_dir); end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:66 + def for_dir(dir); end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:47 + def for_file(file); end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:51 + def for_pwd; end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:38 + def force_default_config!; end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:33 + def options_config=(options_config); end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:42 + def unvalidated; end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:7 + def validated; end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:8 + def validated?; end +end + +# Handles validation of configuration, for example cop names, parameter +# names, and Ruby versions. +# +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:7 +class RuboCop::ConfigValidator + extend ::RuboCop::SimpleForwardable + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:28 + def initialize(config); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:26 + def for_all_cops(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:26 + def smart_loaded_path(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:65 + def target_ruby_version; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:34 + def validate; end + + # Validations that should only be run after all config resolving has + # taken place: + # * The target ruby version is only checked once the entire inheritance + # chain has been loaded so that only the final value is validated, and + # any obsolete but overridden values are ignored. + # + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:61 + def validate_after_resolution; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:100 + def alert_about_unrecognized_cops(invalid_cop_names); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:263 + def check_cop_config_value(hash, parent = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:73 + def check_obsoletions; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:80 + def check_target_ruby; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:205 + def each_invalid_parameter(cop_name); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:116 + def list_unknown_cops(invalid_cop_names); end + + # FIXME: Handling colors in exception messages like this is ugly. + # + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:284 + def param_error_message(parent, key, value, supposed_values); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:252 + def reject_conflicting_safe_settings; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:243 + def reject_mutually_exclusive_defaults; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:139 + def suggestion(name); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:71 + def target_ruby; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:217 + def validate_enforced_styles(valid_cop_names); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:166 + def validate_new_cops_parameter; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:191 + def validate_parameter_names(valid_cop_names); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:177 + def validate_parameter_shape(valid_cop_names); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:237 + def validate_support_and_has_list(name, formats, valid); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:155 + def validate_syntax_cop; end +end + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:11 +RuboCop::ConfigValidator::COMMON_PARAMS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:23 +RuboCop::ConfigValidator::CONFIG_CHECK_AUTOCORRECTS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:22 +RuboCop::ConfigValidator::CONFIG_CHECK_DEPARTMENTS = T.let(T.unsafe(nil), Array) + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:21 +RuboCop::ConfigValidator::CONFIG_CHECK_KEYS = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:14 +RuboCop::ConfigValidator::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:18 +RuboCop::ConfigValidator::NEW_COPS_VALUES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/util.rb:4 +module RuboCop::Cop; end + +# This module checks for nodes that should be aligned to the left or right. +# This amount is determined by the instance variable @column_delta. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:7 +module RuboCop::Cop::Alignment + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:26 + def check_alignment(items, base_column = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:12 + def column_delta; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:14 + def configured_indentation_width; end + + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:58 + def display_column(range); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:45 + def each_bad_alignment(items, base_column); end + + # @deprecated Use processed_source.line_with_comment?(line) + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:69 + def end_of_line_comment(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:18 + def indentation(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:22 + def offset(node); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:78 + def register_offense(offense_node, message_node); end + + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:64 + def within?(inner, outer); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:8 +RuboCop::Cop::Alignment::SPACE = T.let(T.unsafe(nil), String) + +# This class does autocorrection of nodes that should just be moved to +# the left or to the right, amount being determined by the instance +# variable column_delta. +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:8 +class RuboCop::Cop::AlignmentCorrector + extend ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::Alignment + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:32 + def align_end(corrector, processed_source, node, align_to); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:15 + def correct(corrector, processed_source, node, column_delta); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:13 + def processed_source; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:118 + def alignment_column(align_to); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:47 + def autocorrect_line(corrector, line_begin_pos, expr, column_delta, taboo_ranges); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:86 + def block_comment_within?(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:92 + def calculate_range(expr, line_begin_pos, column_delta); end + + # Some special kinds of string literals are not composed of literal + # characters between two delimiters: + # - The source map of `?a` responds to :begin and :end but its end is + # nil. + # - The source map of `__FILE__` responds to neither :begin nor :end. + # + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:82 + def delimited_string_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:104 + def each_line(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:128 + def indentation_string(column); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:67 + def inside_string_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:61 + def inside_string_ranges(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:136 + def using_tabs?; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:112 + def whitespace_range(node); end + end +end + +# This module encapsulates the ability to allow certain identifiers in a cop. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_identifiers.rb:6 +module RuboCop::Cop::AllowedIdentifiers + # if a variable starts with a sigil it will be removed + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_identifiers.rb:9 + def allowed_identifier?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_identifiers.rb:13 + def allowed_identifiers; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_identifiers.rb:7 +RuboCop::Cop::AllowedIdentifiers::SIGILS = T.let(T.unsafe(nil), String) + +# This module encapsulates the ability to allow certain methods when +# parsing. Even if the code is in offense, if it contains methods +# that are allowed. This module is equivalent to the IgnoredMethods module, +# which will be deprecated in RuboCop 2.0. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_methods.rb:9 +module RuboCop::Cop::AllowedMethods + private + + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_methods.rb:13 + def allowed_method?(name); end + + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_methods.rb:27 + def allowed_methods; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_methods.rb:35 + def cop_config_allowed_methods; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_methods.rb:39 + def cop_config_deprecated_values; end + + # @deprecated Use allowed_method? instead + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_methods.rb:18 + def ignored_method?; end +end + +# This module encapsulates the ability to ignore certain lines when +# parsing. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:7 +module RuboCop::Cop::AllowedPattern + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:10 + def allowed_line?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:42 + def allowed_patterns; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:58 + def cop_config_deprecated_methods_values; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:52 + def cop_config_patterns_values; end + + # @deprecated Use allowed_line? instead + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:21 + def ignored_line?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:29 + def matches_allowed_pattern?(line); end + + # @deprecated Use matches_allowed_pattern? instead + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:34 + def matches_ignored_pattern?(line); end +end + +# This module encapsulates the ability to allow certain receivers in a cop. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_receivers.rb:6 +module RuboCop::Cop::AllowedReceivers + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_receivers.rb:7 + def allowed_receiver?(receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_receivers.rb:29 + def allowed_receivers; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_receivers.rb:13 + def receiver_name(receiver); end +end + +# Error raised when an unqualified cop name is used that could +# refer to two or more cops under different departments +# +# pkg:gem/rubocop#lib/rubocop/cop/registry.rb:7 +class RuboCop::Cop::AmbiguousCopName < ::RuboCop::Error + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:11 + def initialize(name, origin, badges); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/registry.rb:8 +RuboCop::Cop::AmbiguousCopName::MSG = T.let(T.unsafe(nil), String) + +# Representation of an annotation comment in source code (eg. `# TODO: blah blah blah`). +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:6 +class RuboCop::Cop::AnnotationComment + # @param [Parser::Source::Comment] comment + # @param [Array] keywords + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:11 + def initialize(comment, keywords); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:17 + def annotation?; end + + # Returns the range bounds for just the annotation + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:29 + def bounds; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:7 + def colon; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:7 + def comment; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:21 + def correct?(colon:); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:7 + def keyword; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:7 + def margin; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:7 + def note; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:7 + def space; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:65 + def just_keyword_of_sentence?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:61 + def keyword_appearance?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:37 + def keywords; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:51 + def regex; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:39 + def split_comment(comment); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:48 +RuboCop::Cop::AnnotationComment::KEYWORDS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) + +# Handles the `MinSize` configuration option for array-based cops +# `Style/SymbolArray` and `Style/WordArray`, which check for use of the +# relevant percent literal syntax such as `%i[...]` and `%w[...]` +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/array_min_size.rb:8 +module RuboCop::Cop::ArrayMinSize + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/array_min_size.rb:19 + def array_style_detected(style, ary_size); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/array_min_size.rb:11 + def below_array_length?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/array_min_size.rb:38 + def largest_brackets_size(style, ary_size); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/array_min_size.rb:15 + def min_size_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/array_min_size.rb:48 + def smallest_percent_size(style, ary_size); end +end + +# Common code for ordinary arrays with [] that can be written with % +# syntax. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/array_syntax.rb:7 +module RuboCop::Cop::ArraySyntax + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/array_syntax.rb:10 + def bracketed_array_of?(element_type, node); end +end + +# extend this module to signal autocorrection support +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/auto_corrector.rb:6 +module RuboCop::Cop::AutoCorrector + # pkg:gem/rubocop#lib/rubocop/cop/mixin/auto_corrector.rb:7 + def support_autocorrect?; end +end + +# This module encapsulates the logic for autocorrect behavior for a cop. +# +# pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:6 +module RuboCop::Cop::AutocorrectLogic + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:7 + def autocorrect?; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:31 + def autocorrect_enabled?; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:15 + def autocorrect_requested?; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:11 + def autocorrect_with_disable_uncorrectable?; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:19 + def correctable?; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:23 + def disable_uncorrectable?; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:27 + def safe_autocorrect?; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:51 + def disable_offense(offense_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:143 + def disable_offense_at_end_of_line(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:151 + def disable_offense_before_and_after(range_by_lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:77 + def disable_offense_with_eol_or_surround_comment(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:147 + def eol_comment; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:85 + def eol_comment_would_be_inside_literal?(offense_range, literal_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:102 + def heredoc_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:92 + def line_with_eol_comment_too_long?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:137 + def max_line_length; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:63 + def multiline_ranges(offense_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:114 + def multiline_string?(node); end + + # Expand the given range to include all of any lines it covers. Does not + # include newline at end of the last line. + # + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:127 + def range_by_lines(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:118 + def range_of_first_line(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:110 + def string_continuation?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:98 + def surrounding_heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:106 + def surrounding_percent_array?(node); end +end + +# Identifier of all cops containing a department and cop name. +# +# All cops are identified by their badge. For example, the badge for +# `RuboCop::Cop::Layout::IndentationStyle` is `Layout/IndentationStyle`. +# Badges can be parsed as either `Department/CopName` or just `CopName` to +# allow for badge references in source files that omit the department for +# RuboCop to infer. +# +# pkg:gem/rubocop#lib/rubocop/cop/badge.rb:12 +class RuboCop::Cop::Badge + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:34 + def initialize(class_name_parts); end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:41 + def ==(other); end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:13 + def cop_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:13 + def department; end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:13 + def department_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:44 + def eql?(other); end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:46 + def hash; end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:51 + def match?(other); end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:59 + def qualified?; end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:55 + def to_s; end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:63 + def with_department(department); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:27 + def camel_case(name_part); end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:15 + def for(class_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:23 + def parse(identifier); end + end +end + +# A scaffold for concrete cops. +# +# The Cop::Base class is meant to be extended. +# +# Cops track offenses and can autocorrect them on the fly. +# +# A commissioner object is responsible for traversing the AST and invoking +# the specific callbacks on each cop. +# +# First the callback `on_new_investigation` is called; +# if a cop needs to do its own processing of the AST or depends on +# something else. +# +# Then callbacks like `on_def`, `on_send` (see AST::Traversal) are called +# with their respective nodes. +# +# Finally the callback `on_investigation_end` is called. +# +# Within these callbacks, cops are meant to call `add_offense` or +# `add_global_offense`. Use the `processed_source` method to +# get the currently processed source being investigated. +# +# In case of invalid syntax / unparsable content, +# the callback `on_other_file` is called instead of all the other +# `on_...` callbacks. +# +# Private methods are not meant for custom cops consumption, +# nor are any instance variables. +# +# pkg:gem/rubocop#lib/rubocop/cop/base.rb:34 +class RuboCop::Cop::Base + include ::RuboCop::AST::Sexp + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + include ::RuboCop::Cop::IgnoredNode + include ::RuboCop::Cop::AutocorrectLogic + extend ::RuboCop::AST::Sexp + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::ExcludeLimit + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:156 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:278 + def active_support_extensions_enabled?; end + + # Adds an offense that has no particular location. + # No correction can be applied to global offenses + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:189 + def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end + + # Adds an offense on the specified range (or node with an expression) + # Unless that offense is disabled for this range, a corrector will be yielded + # to provide the cop the opportunity to autocorrect the offense. + # If message is not specified, the method `message` will be called. + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:201 + def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:357 + def always_autocorrect?; end + + # Called before any investigation + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:343 + def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:324 + def callbacks_needed; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:43 + def config; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:252 + def config_to_allow_offenses; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:256 + def config_to_allow_offenses=(hash); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:363 + def contextual_autocorrect?; end + + # Configuration Helpers + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:246 + def cop_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:238 + def cop_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:295 + def excluded_file?(file); end + + # This method should be overridden when a cop's behavior depends + # on state that lives outside of these locations: + # + # (1) the file under inspection + # (2) the cop's source code + # (3) the config (eg a .rubocop.yml file) + # + # For example, some cops may want to look at other parts of + # the codebase being inspected to find violations. A cop may + # use the presence or absence of file `foo.rb` to determine + # whether a certain violation exists in `bar.rb`. + # + # Overriding this method allows the cop to indicate to RuboCop's + # ResultCache system when those external dependencies change, + # ie when the ResultCache should be invalidated. + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:234 + def external_dependency_checksum; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:367 + def inspect; end + + # Gets called if no message is specified when calling `add_offense` or + # `add_global_offense` + # Cops are discouraged to override this; instead pass your message directly + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:183 + def message(_range = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:242 + def name; end + + # @deprecated Make potential errors with previous API more obvious + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:315 + def offenses; end + + # Called after all on_... have been called + # When refining this method, always call `super` + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:170 + def on_investigation_end; end + + # Called before all on_... have been called + # When refining this method, always call `super` + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:164 + def on_new_investigation; end + + # Called instead of all on_... callbacks for unrecognized files / syntax errors + # When refining this method, always call `super` + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:176 + def on_other_file; end + + # There should be very limited reasons for a Cop to do it's own parsing + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:300 + def parse(source, path = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:270 + def parser_engine; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:43 + def processed_source; end + + # @api private + # Called between investigations + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:306 + def ready; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:286 + def relevant_file?(file); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:282 + def string_literals_frozen_by_default?; end + + # Returns a gems locked versions (i.e. from Gemfile.lock or gems.locked) + # @returns [Gem::Version | nil] The locked gem version, or nil if the gem is not present. + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:266 + def target_gem_version(gem_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:274 + def target_rails_version; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:260 + def target_ruby_version; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:485 + def annotate(message); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:379 + def apply_correction(corrector); end + + # @return [Symbol] offense status + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:449 + def attempt_correction(range, corrector); end + + # Reserved for Cop::Cop + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:375 + def callback_argument(range); end + + # Called to complete an investigation + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:408 + def complete_investigation; end + + # @return [Symbol, Corrector] offense status + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:423 + def correct(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:393 + def current_corrector; end + + # Reserved for Commissioner: + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:385 + def current_offense_locations; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:397 + def current_offenses; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:389 + def currently_disabled_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:513 + def custom_severity; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:509 + def default_severity; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:463 + def disable_uncorrectable(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:499 + def enabled_line?(line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:491 + def file_name_matches_any?(file, parameter, default_result); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:481 + def find_message(range, message); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:505 + def find_severity(_range, severity); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:526 + def range_for_original(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:470 + def range_from_node_or_range(node_or_range); end + + # Actually private methods + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:418 + def reset_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:534 + def target_satisfies_all_gem_version_requirements?; end + + # @return [Symbol] offense status + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:438 + def use_corrector(range, corrector); end + + class << self + # List of cops that should not try to autocorrect at the same + # time as this cop + # + # @return [Array] + # + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:59 + def autocorrect_incompatible_with; end + + # Naming + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:93 + def badge; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:329 + def callbacks_needed; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:97 + def cop_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:101 + def department; end + + # Returns a url to view this cops documentation online. + # Requires 'DocumentationBaseURL' to be set for your department. + # Will follow the convention of RuboCops own documentation structure, + # overwrite this method to accommodate your custom layout. + # @return [String, nil] + # + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:70 + def documentation_url(config = T.unsafe(nil)); end + + # Call for abstract Cop classes + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:81 + def exclude_from_registry; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:138 + def gem_requirements; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:74 + def inherited(subclass); end + + # Override and return the Force class(es) you need to join + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:118 + def joining_forces; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:105 + def lint?; end + + # Returns true if the cop name or the cop namespace matches any of the + # given names. + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:111 + def match?(given_names); end + + # Register a version requirement for the given gem name. + # This cop will be skipped unless the target satisfies *all* requirements. + # @param [String] gem_name + # @param [Array] version_requirements The version requirements, + # using the same syntax as a Gemfile, e.g. ">= 1.2.3" + # + # If omitted, any version of the gem will be accepted. + # + # https://guides.rubygems.org/patterns/#declaring-dependencies + # + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:151 + def requires_gem(gem_name, *version_requirements); end + + # Returns if class supports autocorrect. + # It is recommended to extend AutoCorrector instead of overriding + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:87 + def support_autocorrect?; end + + # Override if your cop should be called repeatedly for multiple investigations + # Between calls to `on_new_investigation` and `on_investigation_end`, + # the result of `processed_source` will remain constant. + # You should invalidate any caches that depend on the current `processed_source` + # in the `on_new_investigation` callback. + # If your cop does autocorrections, be aware that your instance may be called + # multiple times with the same `processed_source.path` but different content. + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:129 + def support_multiple_source?; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:401 + def restrict_on_send; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/base.rb:405 +RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) + +# Reports of an investigation. +# Immutable +# Consider creation API private +# +# pkg:gem/rubocop#lib/rubocop/cop/base.rb:48 +class RuboCop::Cop::Base::InvestigationReport < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:48 + def cop; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:48 + def cop=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:48 + def corrector; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:48 + def corrector=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:48 + def offenses; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:48 + def offenses=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:48 + def processed_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:48 + def processed_source=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:48 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:48 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:48 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:48 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:48 + def new(*_arg0); end + end +end + +# List of methods names to restrict calls for `on_send` / `on_csend` +# +# pkg:gem/rubocop#lib/rubocop/cop/base.rb:51 +RuboCop::Cop::Base::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:5 +module RuboCop::Cop::Bundler; end + +# A Gem's requirements should be listed only once in a Gemfile. +# +# @example +# # bad +# gem 'rubocop' +# gem 'rubocop' +# +# # bad +# group :development do +# gem 'rubocop' +# end +# +# group :test do +# gem 'rubocop' +# end +# +# # good +# group :development, :test do +# gem 'rubocop' +# end +# +# # good +# gem 'rubocop', groups: [:development, :test] +# +# # good - conditional declaration +# if Dir.exist?(local) +# gem 'rubocop', path: local +# elsif ENV['RUBOCOP_VERSION'] == 'master' +# gem 'rubocop', git: 'https://github.com/rubocop/rubocop.git' +# else +# gem 'rubocop', '~> 0.90.0' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:39 +class RuboCop::Cop::Bundler::DuplicatedGem < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:58 + def gem_declarations(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:45 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:67 + def conditional_declaration?(nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:60 + def duplicated_gem_nodes; end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:81 + def register_offense(node, gem_name, line_of_first_occurrence); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:75 + def within_conditional?(node, conditional_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:42 +RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String) + +# A Gem group, or a set of groups, should be listed only once in a Gemfile. +# +# For example, if the values of `source`, `git`, `platforms`, or `path` +# surrounding `group` are different, no offense will be registered: +# +# [source,ruby] +# ----- +# platforms :ruby do +# group :default do +# gem 'openssl' +# end +# end +# +# platforms :jruby do +# group :default do +# gem 'jruby-openssl' +# end +# end +# ----- +# +# @example +# # bad +# group :development do +# gem 'rubocop' +# end +# +# group :development do +# gem 'rubocop-rails' +# end +# +# # bad (same set of groups declared twice) +# group :development, :test do +# gem 'rubocop' +# end +# +# group :test, :development do +# gem 'rspec' +# end +# +# # good +# group :development do +# gem 'rubocop' +# end +# +# group :development, :test do +# gem 'rspec' +# end +# +# # good +# gem 'rubocop', groups: [:development, :test] +# gem 'rspec', groups: [:development, :test] +# +# pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:58 +class RuboCop::Cop::Bundler::DuplicatedGroup < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:66 + def group_declarations(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:68 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:82 + def duplicated_group_nodes; end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:105 + def find_source_key(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:115 + def group_attributes(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:94 + def register_offense(node, group_name, line_of_first_occurrence); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:61 +RuboCop::Cop::Bundler::DuplicatedGroup::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:63 +RuboCop::Cop::Bundler::DuplicatedGroup::SOURCE_BLOCK_NAMES = T.let(T.unsafe(nil), Array) + +# Each gem in the Gemfile should have a comment explaining +# its purpose in the project, or the reason for its version +# or source. +# +# The optional "OnlyFor" configuration array +# can be used to only register offenses when the gems +# use certain options or have version specifiers. +# +# When "version_specifiers" is included, a comment +# will be enforced if the gem has any version specifier. +# +# When "restrictive_version_specifiers" is included, a comment +# will be enforced if the gem has a version specifier that +# holds back the version of the gem. +# +# For any other value in the array, a comment will be enforced for +# a gem if an option by the same name is present. +# A useful use case is to enforce a comment when using +# options that change the source of a gem: +# +# - `bitbucket` +# - `gist` +# - `git` +# - `github` +# - `source` +# +# For a full list of options supported by bundler, +# see https://bundler.io/man/gemfile.5.html +# . +# +# @example OnlyFor: [] (default) +# # bad +# +# gem 'foo' +# +# # good +# +# # Helpers for the foo things. +# gem 'foo' +# +# @example OnlyFor: ['version_specifiers'] +# # bad +# +# gem 'foo', '< 2.1' +# +# # good +# +# # Version 2.1 introduces breaking change baz +# gem 'foo', '< 2.1' +# +# @example OnlyFor: ['restrictive_version_specifiers'] +# # bad +# +# gem 'foo', '< 2.1' +# +# # good +# +# gem 'foo', '>= 1.0' +# +# # Version 2.1 introduces breaking change baz +# gem 'foo', '< 2.1' +# +# @example OnlyFor: ['version_specifiers', 'github'] +# # bad +# +# gem 'foo', github: 'some_account/some_fork_of_foo' +# +# gem 'bar', '< 2.1' +# +# # good +# +# # Using this fork because baz +# gem 'foo', github: 'some_account/some_fork_of_foo' +# +# # Version 2.1 introduces breaking change baz +# gem 'bar', '< 2.1' +# +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:83 +class RuboCop::Cop::Bundler::GemComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::DefNode + include ::RuboCop::Cop::GemDeclaration + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:94 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:135 + def checked_options_present?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:109 + def commented?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:105 + def commented_any_descendant?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:159 + def contains_checked_options?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:163 + def gem_options(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:130 + def ignored_gem?(node); end + + # The args node1 & node2 may represent a RuboCop::AST::Node + # or a Parser::Source::Comment. Both respond to #loc. + # + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:116 + def precede?(node1, node2); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:126 + def preceding_comment?(node1, node2); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:120 + def preceding_lines(node); end + + # Version specifications that restrict all updates going forward. This excludes versions + # like ">= 1.0" or "!= 2.0.3". + # + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:152 + def restrictive_version_specified_gem?(node); end + + # Besides the gem name, all other *positional* arguments to `gem` are version specifiers, + # as long as it has one we know there's at least one version specifier. + # + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:145 + def version_specified_gem?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:88 +RuboCop::Cop::Bundler::GemComment::CHECKED_OPTIONS_CONFIG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:87 +RuboCop::Cop::Bundler::GemComment::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:91 +RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:90 +RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:92 +RuboCop::Cop::Bundler::GemComment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:89 +RuboCop::Cop::Bundler::GemComment::VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) + +# Verifies that a project contains Gemfile or gems.rb file and correct +# associated lock file based on the configuration. +# +# @example EnforcedStyle: Gemfile (default) +# # bad +# Project contains gems.rb and gems.locked files +# +# # bad +# Project contains Gemfile and gems.locked file +# +# # good +# Project contains Gemfile and Gemfile.lock +# +# @example EnforcedStyle: gems.rb +# # bad +# Project contains Gemfile and Gemfile.lock files +# +# # bad +# Project contains gems.rb and Gemfile.lock file +# +# # good +# Project contains gems.rb and gems.locked files +# +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:28 +class RuboCop::Cop::Bundler::GemFilename < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:42 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:87 + def expected_gemfile?(basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:79 + def gemfile_offense?(basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:92 + def gemfile_required?; end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:83 + def gems_rb_offense?(basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:96 + def gems_rb_required?; end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:57 + def register_gemfile_offense(file_path, basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:68 + def register_gems_rb_offense(file_path, basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:52 + def register_offense(file_path, basename); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:39 +RuboCop::Cop::Bundler::GemFilename::GEMFILE_FILES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:40 +RuboCop::Cop::Bundler::GemFilename::GEMS_RB_FILES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:35 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_MISMATCHED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:31 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_REQUIRED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:37 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_MISMATCHED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:33 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_REQUIRED = T.let(T.unsafe(nil), String) + +# Enforce that Gem version specifications or a commit reference (branch, +# ref, or tag) are either required or forbidden. +# +# @example EnforcedStyle: required (default) +# # bad +# gem 'rubocop' +# +# # good +# gem 'rubocop', '~> 1.12' +# +# # good +# gem 'rubocop', '>= 1.10.0' +# +# # good +# gem 'rubocop', '>= 1.5.0', '< 1.10.0' +# +# # good +# gem 'rubocop', branch: 'feature-branch' +# +# # good +# gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' +# +# # good +# gem 'rubocop', tag: 'v1.17.0' +# +# @example EnforcedStyle: forbidden +# # good +# gem 'rubocop' +# +# # bad +# gem 'rubocop', '~> 1.12' +# +# # bad +# gem 'rubocop', '>= 1.10.0' +# +# # bad +# gem 'rubocop', '>= 1.5.0', '< 1.10.0' +# +# # bad +# gem 'rubocop', branch: 'feature-branch' +# +# # bad +# gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' +# +# # bad +# gem 'rubocop', tag: 'v1.17.0' +# +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:53 +class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::GemDeclaration + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:68 + def includes_commit_reference?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:63 + def includes_version_specification?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:72 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:86 + def allowed_gem?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:90 + def allowed_gems; end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:112 + def forbidden_offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:118 + def forbidden_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:94 + def message(_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:102 + def offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:106 + def required_offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:122 + def required_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:126 + def version_specification?(expression); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:58 +RuboCop::Cop::Bundler::GemVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:57 +RuboCop::Cop::Bundler::GemVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:59 +RuboCop::Cop::Bundler::GemVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:60 +RuboCop::Cop::Bundler::GemVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) + +# Passing symbol arguments to `source` (e.g. `source :rubygems`) is +# deprecated because they default to using HTTP requests. Instead, specify +# `'https://rubygems.org'` if possible, or `'http://rubygems.org'` if not. +# +# When autocorrecting, this cop will replace symbol arguments with +# `'https://rubygems.org'`. +# +# This cop will not replace existing sources that use `http://`. This may +# be necessary where HTTPS is not available. For example, where using an +# internal gem server via an intranet, or where HTTPS is prohibited. +# However, you should strongly prefer `https://` where possible, as it is +# more secure. +# +# If you don't allow `http://`, please set `false` to `AllowHttpProtocol`. +# This option is `true` by default for safe autocorrection. +# +# @example +# # bad +# source :gemcutter +# source :rubygems +# source :rubyforge +# +# # good +# source 'https://rubygems.org' # strongly recommended +# +# @example AllowHttpProtocol: true (default) +# +# # good +# source 'http://rubygems.org' # use only if HTTPS is unavailable +# +# @example AllowHttpProtocol: false +# +# # bad +# source 'http://rubygems.org' +# +# pkg:gem/rubocop#lib/rubocop/cop/bundler/insecure_protocol_source.rb:41 +class RuboCop::Cop::Bundler::InsecureProtocolSource < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/insecure_protocol_source.rb:53 + def insecure_protocol_source?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/insecure_protocol_source.rb:58 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/insecure_protocol_source.rb:79 + def allow_http_protocol?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/insecure_protocol_source.rb:44 +RuboCop::Cop::Bundler::InsecureProtocolSource::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/insecure_protocol_source.rb:48 +RuboCop::Cop::Bundler::InsecureProtocolSource::MSG_HTTP_PROTOCOL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/insecure_protocol_source.rb:50 +RuboCop::Cop::Bundler::InsecureProtocolSource::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Gems should be alphabetically sorted within groups. +# +# @example +# # bad +# gem 'rubocop' +# gem 'rspec' +# +# # good +# gem 'rspec' +# gem 'rubocop' +# +# # good +# gem 'rubocop' +# +# gem 'rspec' +# +# @example TreatCommentsAsGroupSeparators: true (default) +# # good +# # For code quality +# gem 'rubocop' +# # For tests +# gem 'rspec' +# +# @example TreatCommentsAsGroupSeparators: false +# # bad +# # For code quality +# gem 'rubocop' +# # For tests +# gem 'rspec' +# +# pkg:gem/rubocop#lib/rubocop/cop/bundler/ordered_gems.rb:35 +class RuboCop::Cop::Bundler::OrderedGems < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OrderedGemNode + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/ordered_gems.rb:63 + def gem_declarations(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/ordered_gems.rb:43 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/ordered_gems.rb:56 + def previous_declaration(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/ordered_gems.rb:39 +RuboCop::Cop::Bundler::OrderedGems::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking assignment nodes. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:6 +module RuboCop::Cop::CheckAssignment + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:17 + def on_and_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:13 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:11 + def on_cvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:12 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:10 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:7 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:14 + def on_masgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:15 + def on_op_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:16 + def on_or_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:19 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:27 + def extract_rhs(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:27 + def extract_rhs(node); end + end +end + +# This mixin detects collections that are safe to "break" +# by inserting new lines. This is useful for breaking +# up long lines. +# +# Let's look at hashes as an example: +# +# We know hash keys are safe to break across lines. We can add +# linebreaks into hashes on lines longer than the specified maximum. +# Then in further passes cops can clean up the multi-line hash. +# For example, say the maximum line length is as indicated below: +# +# | +# v +# {foo: "0000000000", bar: "0000000000", baz: "0000000000"} +# +# In a LineLength autocorrection pass, a line is added before +# the first key that exceeds the column limit: +# +# {foo: "0000000000", bar: "0000000000", +# baz: "0000000000"} +# +# In a MultilineHashKeyLineBreaks pass, lines are inserted +# before all keys: +# +# {foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000"} +# +# Then in future passes FirstHashElementLineBreak, +# MultilineHashBraceLayout, and TrailingCommaInHashLiteral will +# manipulate as well until we get: +# +# { +# foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000", +# } +# +# (Note: Passes may not happen exactly in this sequence.) +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:44 +module RuboCop::Cop::CheckLineBreakable + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:45 + def extract_breakable_node(node, max); end + + private + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:202 + def all_on_same_line?(nodes); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:222 + def already_on_multiple_lines?(node); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:135 + def breakable_collection?(node, elements); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:228 + def chained_to_heredoc?(node); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:189 + def children_could_be_broken_up?(children); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:152 + def contained_by_breakable_collection_on_same_line?(node); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:172 + def contained_by_multiline_collection_that_could_be_broken_up?(node); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:62 + def extract_breakable_node_from_elements(node, elements, max); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:74 + def extract_first_element_over_column_limit(node, elements, max); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:94 + def first_argument_is_heredoc?(node); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:209 + def process_args(args); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:119 + def safe_to_ignore?(node); end + + # @api private + # If a `send` or `csend` node contains a heredoc argument, splitting cannot happen + # after the heredoc or else it will cause a syntax error. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:103 + def shift_elements_for_heredoc_arg(node, elements, index); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:114 + def within_column_limit?(element, max, line); end +end + +# Checks for code on multiple lines that could be rewritten on a single line +# without changing semantics or exceeding the `Max` parameter of `Layout/LineLength`. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/check_single_line_suitability.rb:7 +module RuboCop::Cop::CheckSingleLineSuitability + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_single_line_suitability.rb:8 + def suitable_as_single_line?(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_single_line_suitability.rb:32 + def comment_within?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_single_line_suitability.rb:40 + def safe_to_split?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_single_line_suitability.rb:23 + def to_single_line(source); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_single_line_suitability.rb:16 + def too_long?(node); end +end + +# Common functionality for checking length of code segments. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:6 +module RuboCop::Cop::CodeLength + extend ::RuboCop::ExcludeLimit + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:11 + def max=(value); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:49 + def build_code_length_calculator(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:31 + def check_code_length(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:27 + def count_as_one; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:23 + def count_comments?; end + + # Returns true for lines that shall not be included in the count. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:45 + def irrelevant_line(source_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:58 + def location(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:19 + def max_length; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:15 + def message(length, max_length); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:9 +RuboCop::Cop::CodeLength::MSG = T.let(T.unsafe(nil), String) + +# Help methods for working with nodes containing comments. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:6 +module RuboCop::Cop::CommentsHelp + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:27 + def comments_contain_disables?(node, cop_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:18 + def comments_in_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:14 + def contains_comments?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:7 + def source_range_with_comment(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:46 + def begin_pos_with_comment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:60 + def buffer; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:41 + def end_position_for(node); end + + # Returns the end line of a node, which might be a comment and not part of the AST + # End line is considered either the line at which another node starts, or + # the line at which the parent node ends. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:68 + def find_end_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:56 + def start_line_position(node); end +end + +# Commissioner class is responsible for processing the AST and delegating +# work to the specified cops. +# +# pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:7 +class RuboCop::Cop::Commissioner + include ::RuboCop::AST::Traversal + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:44 + def initialize(cops, forces = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:42 + def errors; end + + # @return [InvestigationReport] + # + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:79 + def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on___ENCODING__(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on___FILE__(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on___LINE__(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_alias(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_and_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_arg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_arg_expr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_args(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_array_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_array_pattern_with_tail(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_back_ref(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_block_pass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_blockarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_blocknilarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_break(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_case_match(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_cbase(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_complex(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_const(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_const_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_cvar(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_cvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_defined?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_dstr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_dsym(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_eflipflop(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_empty_else(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_ensure(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_erange(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_false(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_find_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_float(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_for(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_forward_arg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_forward_args(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_forwarded_args(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_forwarded_kwrestarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_forwarded_restarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_gvar(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_hash_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_if_guard(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_iflipflop(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_in_match(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_in_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_index(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_indexasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_int(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_irange(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_ivar(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_kwarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_kwargs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_kwbegin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_kwnilarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_kwoptarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_kwrestarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_kwsplat(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_lambda(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_lvar(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_masgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_match_alt(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_match_as(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_match_current_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_match_nil_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_match_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_match_pattern_p(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_match_rest(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_match_var(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_match_with_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_match_with_trailing_comma(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_mlhs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_next(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_nil(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_not(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_nth_ref(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_op_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_optarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_or_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_pair(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_pin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_postexe(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_preexe(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_procarg0(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_rational(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_redo(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_regexp(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_regopt(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_resbody(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_rescue(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_restarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_retry(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_return(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_sclass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_self(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_shadowarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_splat(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_str(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_super(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_sym(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_true(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_undef(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_unless_guard(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_until_post(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_when(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_while(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_while_post(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_xstr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_yield(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:67 + def on_zsuper(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:98 + def begin_investigation(processed_source, offset:, original:); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:121 + def build_callbacks(cops); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:116 + def initialize_callbacks; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:159 + def invoke(callback, cops); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:163 + def invoke_with_argument(callback, cops, arg); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:112 + def reset; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:131 + def restrict_callbacks(callbacks); end + + # NOTE: mutates `callbacks` in place + # + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:149 + def restricted_map(callbacks); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:104 + def trigger_responding_cops(callback, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:139 + def trigger_restricted_cops(event, node); end + + # Allow blind rescues here, since we're absorbing and packaging or + # re-raising exceptions that can be raised from within the individual + # cops' `#investigate` methods. + # + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:170 + def with_cop_error_handling(cop, node = T.unsafe(nil)); end +end + +# How a Commissioner returns the results of the investigation +# as a list of Cop::InvestigationReport and any errors caught +# during the investigation. +# Immutable +# Consider creation API private +# +# pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 +class RuboCop::Cop::Commissioner::InvestigationReport < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def cop_reports; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def cop_reports=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:19 + def cops; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:27 + def correctors; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def errors; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def errors=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:35 + def merge(investigation); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:31 + def offenses; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:23 + def offenses_per_cop; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def processed_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def processed_source=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:10 +RuboCop::Cop::Commissioner::RESTRICTED_CALLBACKS = T.let(T.unsafe(nil), Array) + +# This class does condition autocorrection +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/condition_corrector.rb:6 +class RuboCop::Cop::ConditionCorrector + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/condition_corrector.rb:8 + def correct_negative_condition(corrector, node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/condition_corrector.rb:17 + def negated_condition(node); end + end +end + +# Handles `EnforcedStyle` configuration parameters. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:6 +module RuboCop::Cop::ConfigurableEnforcedStyle + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:88 + def alternative_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:96 + def alternative_styles; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:19 + def ambiguous_style_detected(*possibilities); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:72 + def conflicting_styles_detected; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:11 + def correct_style_detected; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:64 + def detected_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:68 + def detected_style=(style); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:60 + def no_acceptable_style!; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:56 + def no_acceptable_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:7 + def opposite_style_detected; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:79 + def style; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:75 + def style_configured?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:29 + def style_detected(detected); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:107 + def style_parameter_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:100 + def supported_styles; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:15 + def unexpected_style_detected(unexpected); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:73 + def unrecognized_style_detected; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:23 +RuboCop::Cop::ConfigurableEnforcedStyle::SYMBOL_TO_STRING_CACHE = T.let(T.unsafe(nil), Hash) + +# Shared functionality between mixins that enforce naming conventions +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_formatting.rb:6 +module RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_formatting.rb:9 + def check_name(node, name, name_range); end + + # A class emitter method is a singleton method in a class/module, where + # the method has the same name as a class defined in the class/module. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_formatting.rb:30 + def class_emitter_method?(node, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_formatting.rb:17 + def report_opposing_styles(node, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_formatting.rb:24 + def valid_name?(node, name, given_style = T.unsafe(nil)); end +end + +# Handles `Max` configuration parameters, especially setting them to an +# appropriate value with --auto-gen-config. +# @deprecated Use `exclude_limit ` instead. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_max.rb:8 +module RuboCop::Cop::ConfigurableMax + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_max.rb:11 + def max=(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_max.rb:23 + def max_parameter_name; end +end + +# This module provides functionality for checking if names match the +# configured EnforcedStyle. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_naming.rb:7 +module RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_naming.rb:10 +RuboCop::Cop::ConfigurableNaming::FORMATS = T.let(T.unsafe(nil), Hash) + +# This module provides functionality for checking if numbering match the +# configured EnforcedStyle. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_numbering.rb:7 +module RuboCop::Cop::ConfigurableNumbering + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_numbering.rb:11 +RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash) + +# @deprecated Use Cop::Base instead +# Legacy scaffold for Cops. +# See https://docs.rubocop.org/rubocop/v1_upgrade_notes.html +# Monkey-patch Cop for tests to provide easy access to messages and +# highlights. +# +# pkg:gem/rubocop#lib/rubocop/cop/cop.rb:11 +class RuboCop::Cop::Cop < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:73 + def add_offense(node_or_range, location: T.unsafe(nil), message: T.unsafe(nil), severity: T.unsafe(nil), &block); end + + # Called before any investigation + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:129 + def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # @deprecated + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:105 + def corrections; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:90 + def find_location(node, loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:12 + def offenses; end + + # Called after all on_... have been called + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:122 + def on_investigation_end; end + + # Called before all on_... have been called + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:116 + def on_new_investigation; end + + # @deprecated Use class method + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:96 + def support_autocorrect?; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:147 + def apply_correction(corrector); end + + # Override Base + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:143 + def callback_argument(_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:164 + def correction_lambda; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:170 + def dedupe_on_node(node); end + + # Just for legacy + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:152 + def emulate_v0_callsequence(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:183 + def range_for_original(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:177 + def suppress_clobbering; end + + class << self + # @deprecated Use Registry.all + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:56 + def all; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:25 + def inherited(_subclass); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:37 + def joining_forces; end + + # @deprecated Use Registry.qualified_cop_name + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:65 + def qualified_cop_name(name, origin); end + + # @deprecated Use Registry.global + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:47 + def registry; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:33 + def support_autocorrect?; end + end +end + +# @deprecated +# +# pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 +class RuboCop::Cop::Cop::Correction < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:18 + def call(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def cop; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def cop=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def lambda; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def lambda=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def node; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def node=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def new(*_arg0); end + end +end + +# This class takes a source buffer and rewrite its source +# based on the different correction rules supplied. +# +# Important! +# The nodes modified by the corrections should be part of the +# AST of the source_buffer. +# +# pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:11 +class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter + # @param source [Parser::Source::Buffer, or anything + # leading to one via `(processed_source.)buffer`] + # + # corrector = Corrector.new(cop) + # + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:32 + def initialize(source); end + + # Removes `size` characters from the beginning of the given range. + # If `size` is greater than the size of `range`, the removed region can + # overrun the end of `range`. + # + # @param [Parser::Source::Range, RuboCop::AST::Node] range or node + # @param [Integer] size + # + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:63 + def remove_leading(node_or_range, size); end + + # Removes `size` characters prior to the source range. + # + # @param [Parser::Source::Range, RuboCop::AST::Node] range or node + # @param [Integer] size + # + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:51 + def remove_preceding(node_or_range, size); end + + # Removes `size` characters from the end of the given range. + # If `size` is greater than the size of `range`, the removed region can + # overrun the beginning of `range`. + # + # @param [Parser::Source::Range, RuboCop::AST::Node] range or node + # @param [Integer] size + # + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:75 + def remove_trailing(node_or_range, size); end + + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:45 + def rewrite; end + + # Swaps sources at the given ranges. + # + # @param [Parser::Source::Range, RuboCop::AST::Node] node_or_range1 + # @param [Parser::Source::Range, RuboCop::AST::Node] node_or_range2 + # + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:85 + def swap(node_or_range1, node_or_range2); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:119 + def check_range_validity(node_or_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:104 + def to_range(node_or_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:123 + def validate_buffer(buffer); end + + class << self + # Duck typing for get to a ::Parser::Source::Buffer + # + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:15 + def source_buffer(source); end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:12 +RuboCop::Cop::Corrector::NOOP_CONSUMER = T.let(T.unsafe(nil), Proc) + +# Common functionality for checking def nodes. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/def_node.rb:6 +module RuboCop::Cop::DefNode + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/def_node.rb:21 + def non_public_modifier?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/def_node.rb:12 + def non_public?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/def_node.rb:16 + def preceding_non_public_modifier?(node); end +end + +# Help methods for working with `Enumerable#dig` in cops. +# Used by `Style::DigChain` and `Style::SingleArgumentDig` +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/dig_help.rb:7 +module RuboCop::Cop::DigHelp + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/dig_help.rb:11 + def dig?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/dig_help.rb:16 + def single_argument_dig?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/dig_help.rb:22 + def dig_chain_enabled?; end +end + +# Helpers for builtin documentation +# +# pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:6 +module RuboCop::Cop::Documentation + private + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:25 + def base_url_for(cop_class, config); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:57 + def builtin?(cop_class); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:47 + def default_base_url; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:52 + def default_extension; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:10 + def department_to_basename(department); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:36 + def extension_for(cop_class, config); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:15 + def url_for(cop_class, config = T.unsafe(nil)); end + + class << self + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:25 + def base_url_for(cop_class, config); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:57 + def builtin?(cop_class); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:47 + def default_base_url; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:52 + def default_extension; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:10 + def department_to_basename(department); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:36 + def extension_for(cop_class, config); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:15 + def url_for(cop_class, config = T.unsafe(nil)); end + end +end + +# Common functionality for checking documentation. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:6 +module RuboCop::Cop::DocumentationComment + extend ::RuboCop::AST::NodePattern::Macros + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:47 + def annotation_keywords; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:11 + def documentation_comment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:39 + def interpreter_directive_comment?(comment); end + + # The args node1 & node2 may represent a RuboCop::AST::Node + # or a Parser::Source::Comment. Both respond to #loc. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:31 + def precede?(node1, node2); end + + # The args node1 & node2 may represent a RuboCop::AST::Node + # or a Parser::Source::Comment. Both respond to #loc. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:25 + def preceding_comment?(node1, node2); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:35 + def preceding_lines(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:43 + def rubocop_directive_comment?(comment); end +end + +# Common functionality for dealing with duplication. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/duplication.rb:6 +module RuboCop::Cop::Duplication + private + + # Returns the consecutive duplicates, leaving out the first instance of + # the duplicated elements. + # + # @param [Array] collection an array to return consecutive duplicates for + # @return [Array] the consecutive duplicates + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/duplication.rb:31 + def consecutive_duplicates(collection); end + + # Returns all duplicates, including the first instance of the duplicated + # elements. + # + # @param [Array] collection an array to return duplicates for + # @return [Array] all the duplicates + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/duplication.rb:22 + def duplicates(collection); end + + # Whether the `collection` contains any duplicates. + # + # @param [Array] collection an array to check for duplicates + # @return [Boolean] whether the array contains any duplicates + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/duplication.rb:13 + def duplicates?(collection); end + + # Returns a hash of grouped duplicates. The key will be the first + # instance of the element, and the value an `array` of the initial + # element and all duplicate instances. + # + # @param [Array] collection an array to group duplicates for + # @return [Array] the grouped duplicates + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/duplication.rb:41 + def grouped_duplicates(collection); end +end + +# This class autocorrects `#each` enumeration to `for` iteration. +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:6 +class RuboCop::Cop::EachToForCorrector + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:12 + def initialize(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:18 + def call(corrector); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:24 + def argument_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:24 + def block_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:24 + def collection_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:26 + def correction; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:36 + def offending_range; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:10 +RuboCop::Cop::EachToForCorrector::CORRECTION_WITHOUT_ARGUMENTS = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:9 +RuboCop::Cop::EachToForCorrector::CORRECTION_WITH_ARGUMENTS = T.let(T.unsafe(nil), String) + +# This class does empty line autocorrection +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/empty_line_corrector.rb:6 +class RuboCop::Cop::EmptyLineCorrector + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/empty_line_corrector.rb:8 + def correct(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/empty_line_corrector.rb:19 + def insert_before(corrector, node); end + end +end + +# Common code for empty parameter cops. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_parameter.rb:6 +module RuboCop::Cop::EmptyParameter + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_parameter.rb:12 + def empty_arguments?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_parameter.rb:16 + def check(node); end +end + +# Functions for checking the alignment of the `end` keyword. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:6 +module RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:49 + def add_offense_for_misalignment(node, align_with); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:19 + def check_end_kw_alignment(node, align_ranges); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:15 + def check_end_kw_in_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:69 + def line_break_before_keyword?(whole_expression, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:34 + def matching_ranges(end_loc, align_ranges); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:40 + def start_line_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:59 + def style_parameter_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:63 + def variable_alignment?(whole_expression, rhs, end_alignment_style); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:10 +RuboCop::Cop::EndKeywordAlignment::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for rewriting endless methods to normal method definitions +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_rewriter.rb:6 +module RuboCop::Cop::EndlessMethodRewriter + # pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_rewriter.rb:7 + def correct_to_multiline(corrector, node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_rewriter.rb:19 + def arguments(node, missing = T.unsafe(nil)); end +end + +# Common functionality for enforcing a specific superclass. +# +# IMPORTANT: RuboCop core depended on this module when it supported Rails department. +# Rails department has been extracted to RuboCop Rails gem. +# +# @deprecated This module is deprecated and will be removed by RuboCop 2.0. +# It will not be updated to `RuboCop::Cop::Base` v1 API to maintain compatibility +# with existing RuboCop Rails 2.8 or lower. +# +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/enforce_superclass.rb:15 +module RuboCop::Cop::EnforceSuperclass + # pkg:gem/rubocop#lib/rubocop/cop/mixin/enforce_superclass.rb:35 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/enforce_superclass.rb:39 + def on_send(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/mixin/enforce_superclass.rb:16 + def included(base); end + end +end + +# Common functionality for checking for a line break before the first +# element in a multi-line collection. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/first_element_line_break.rb:7 +module RuboCop::Cop::FirstElementLineBreak + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/first_element_line_break.rb:23 + def check_children_line_break(node, children, start = T.unsafe(nil), ignore_last: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/first_element_line_break.rb:10 + def check_method_line_break(node, children, ignore_last: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/first_element_line_break.rb:37 + def first_by_line(nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/first_element_line_break.rb:41 + def last_line(nodes, ignore_last:); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/first_element_line_break.rb:18 + def method_uses_parens?(node, limit); end +end + +# This class autocorrects `for` iteration to `#each` enumeration. +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:6 +class RuboCop::Cop::ForToEachCorrector + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:11 + def initialize(for_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:17 + def call(corrector); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:62 + def collection_end; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:25 + def collection_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:36 + def collection_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:27 + def correction; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:50 + def end_range; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:25 + def for_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:58 + def keyword_begin; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:44 + def requires_parentheses?; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:25 + def variable_node; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:9 +RuboCop::Cop::ForToEachCorrector::CORRECTION = T.let(T.unsafe(nil), String) + +# This module encapsulates the ability to forbid certain identifiers in a cop. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_identifiers.rb:6 +module RuboCop::Cop::ForbiddenIdentifiers + # if a variable starts with a sigil it will be removed + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_identifiers.rb:9 + def forbidden_identifier?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_identifiers.rb:15 + def forbidden_identifiers; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_identifiers.rb:7 +RuboCop::Cop::ForbiddenIdentifiers::SIGILS = T.let(T.unsafe(nil), String) + +# This module encapsulates the ability to forbid certain patterns in a cop. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_pattern.rb:6 +module RuboCop::Cop::ForbiddenPattern + # pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_pattern.rb:7 + def forbidden_pattern?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_pattern.rb:11 + def forbidden_patterns; end +end + +# A scaffold for concrete forces. +# +# pkg:gem/rubocop#lib/rubocop/cop/force.rb:6 +class RuboCop::Cop::Force + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:32 + def initialize(cops); end + + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:17 + def cops; end + + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:50 + def investigate(_processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:36 + def name; end + + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:40 + def run_hook(method_name, *args); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:19 + def all; end + + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:28 + def force_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:23 + def inherited(subclass); end + end +end + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cop/force.rb:8 +class RuboCop::Cop::Force::HookError < ::StandardError + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:11 + def initialize(joining_cop); end + + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:9 + def joining_cop; end +end + +# Common functionality for dealing with frozen string literals. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:6 +module RuboCop::Cop::FrozenStringLiteral + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:41 + def frozen_heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:20 + def frozen_string_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:14 + def frozen_string_literal_comment_exists?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:77 + def frozen_string_literal_specified?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:71 + def frozen_string_literals_disabled?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:43 + def frozen_string_literals_enabled?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:87 + def leading_comment_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:83 + def leading_magic_comments; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:36 + def uninterpolated_heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:30 + def uninterpolated_string?(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:14 + def frozen_string_literal_comment_exists?; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:9 +RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_ENABLED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:10 +RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_TYPES_RUBY27 = T.let(T.unsafe(nil), Array) + +# Common functionality for checking gem declarations. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/gem_declaration.rb:6 +module RuboCop::Cop::GemDeclaration + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/gem_declaration.rb:10 + def gem_declaration?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/add_runtime_dependency.rb:5 +module RuboCop::Cop::Gemspec; end + +# Prefer `add_dependency` over `add_runtime_dependency` as the latter is +# considered soft-deprecated. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_runtime_dependency('rubocop') +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency('rubocop') +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/add_runtime_dependency.rb:21 +class RuboCop::Cop::Gemspec::AddRuntimeDependency < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/add_runtime_dependency.rb:28 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/add_runtime_dependency.rb:24 +RuboCop::Cop::Gemspec::AddRuntimeDependency::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/add_runtime_dependency.rb:26 +RuboCop::Cop::Gemspec::AddRuntimeDependency::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Use consistent style for Gemspec attributes assignment. +# +# @example +# +# # bad +# # This example uses two styles for assignment of metadata attribute. +# Gem::Specification.new do |spec| +# spec.metadata = { 'key' => 'value' } +# spec.metadata['another-key'] = 'another-value' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata['key'] = 'value' +# spec.metadata['another-key'] = 'another-value' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata = { 'key' => 'value', 'another-key' => 'another-value' } +# end +# +# # bad +# # This example uses two styles for assignment of authors attribute. +# Gem::Specification.new do |spec| +# spec.authors = %w[author-0 author-1] +# spec.authors[2] = 'author-2' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.authors = %w[author-0 author-1 author-2] +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.authors[0] = 'author-0' +# spec.authors[1] = 'author-1' +# spec.authors[2] = 'author-2' +# end +# +# # good +# # This example uses consistent assignment per attribute, +# # even though two different styles are used overall. +# Gem::Specification.new do |spec| +# spec.metadata = { 'key' => 'value' } +# spec.authors[0] = 'author-0' +# spec.authors[1] = 'author-1' +# spec.authors[2] = 'author-2' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/attribute_assignment.rb:57 +class RuboCop::Cop::Gemspec::AttributeAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemspecHelp + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/attribute_assignment.rb:62 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/attribute_assignment.rb:77 + def source_assignments(ast); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/attribute_assignment.rb:84 + def source_indexed_assignments(ast); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/attribute_assignment.rb:60 +RuboCop::Cop::Gemspec::AttributeAssignment::MSG = T.let(T.unsafe(nil), String) + +# Enforce that gem dependency version specifications or a commit reference (branch, +# ref, or tag) are either required or forbidden. +# +# @example EnforcedStyle: required (default) +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# @example EnforcedStyle: forbidden +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:53 +class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::GemspecHelp + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:67 + def add_dependency_method_declaration?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:78 + def includes_commit_reference?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:73 + def includes_version_specification?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:82 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:118 + def add_dependency_method?(method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:96 + def allowed_gem?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:100 + def allowed_gems; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:132 + def forbidden_offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:138 + def forbidden_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:112 + def match_block_variable_name?(receiver_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:104 + def message(_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:122 + def offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:126 + def required_offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:142 + def required_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:146 + def version_specification?(expression); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:61 +RuboCop::Cop::Gemspec::DependencyVersion::ADD_DEPENDENCY_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:58 +RuboCop::Cop::Gemspec::DependencyVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:57 +RuboCop::Cop::Gemspec::DependencyVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:64 +RuboCop::Cop::Gemspec::DependencyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:59 +RuboCop::Cop::Gemspec::DependencyVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) + +# Checks that deprecated attributes are not set in a gemspec file. +# Removing deprecated attributes allows the user to receive smaller packed gems. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# spec.test_files = Dir.glob('test/**/*') +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# spec.test_files += Dir.glob('test/**/*') +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb:28 +class RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb:35 + def gem_specification(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb:43 + def on_block(block_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb:85 + def format_message_from; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb:63 + def node_and_method_name(node, attribute); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb:71 + def use_deprecated_attributes?(node, block_parameter); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb:32 +RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment::MSG = T.let(T.unsafe(nil), String) + +# Enforce that development dependencies for a gem are specified in +# `Gemfile`, rather than in the `gemspec` using +# `add_development_dependency`. Alternatively, using `EnforcedStyle: +# gemspec`, enforce that all dependencies are specified in `gemspec`, +# rather than in `Gemfile`. +# +# @example EnforcedStyle: Gemfile (default) +# # Specify runtime dependencies in your gemspec, +# # but all other dependencies in your Gemfile. +# +# # bad +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good +# # Gemfile +# gem "foo" +# +# # good +# # gems.rb +# gem "foo" +# +# # good (with AllowedGems: ["bar"]) +# # example.gemspec +# s.add_development_dependency "bar" +# +# @example EnforcedStyle: gems.rb +# # Specify runtime dependencies in your gemspec, +# # but all other dependencies in your Gemfile. +# # +# # Identical to `EnforcedStyle: Gemfile`, but with a different error message. +# # Rely on Bundler/GemFilename to enforce the use of `Gemfile` vs `gems.rb`. +# +# # bad +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good +# # Gemfile +# gem "foo" +# +# # good +# # gems.rb +# gem "foo" +# +# # good (with AllowedGems: ["bar"]) +# # example.gemspec +# s.add_development_dependency "bar" +# +# @example EnforcedStyle: gemspec +# # Specify all dependencies in your gemspec. +# +# # bad +# # Gemfile +# gem "foo" +# +# # good +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good (with AllowedGems: ["bar"]) +# # Gemfile +# gem "bar" +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:70 +class RuboCop::Cop::Gemspec::DevelopmentDependencies < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:77 + def add_development_dependency?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:82 + def gem?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:86 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:97 + def forbidden_gem?(gem_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:101 + def message(_range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:73 +RuboCop::Cop::Gemspec::DevelopmentDependencies::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:74 +RuboCop::Cop::Gemspec::DevelopmentDependencies::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# An attribute assignment method calls should be listed only once +# in a gemspec. +# +# Assigning to an attribute with the same name using `spec.foo =` or +# `spec.attribute#[]=` will be an unintended usage. On the other hand, +# duplication of methods such # as `spec.requirements`, +# `spec.add_runtime_dependency`, and others are permitted because it is +# the intended use of appending values. +# +# @example +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'rubocop' +# spec.name = 'rubocop2' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.name = 'rubocop' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.requirements << 'libmagick, v6.0' +# spec.requirements << 'A good graphics card' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency('parallel', '~> 1.10') +# spec.add_dependency('parser', '>= 2.3.3.1', '< 3.0') +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.metadata["key"] = "value" +# spec.metadata["key"] = "value" +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata["key"] = "value" +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:50 +class RuboCop::Cop::Gemspec::DuplicatedAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::GemspecHelp + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:57 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:83 + def duplicated_assignment_method_nodes; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:91 + def duplicated_indexed_assignment_method_nodes; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:66 + def process_assignment_method_nodes; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:74 + def process_indexed_assignment_method_nodes; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:98 + def register_offense(node, assignment, line_of_first_occurrence); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:54 +RuboCop::Cop::Gemspec::DuplicatedAssignment::MSG = T.let(T.unsafe(nil), String) + +# Dependencies in the gemspec should be alphabetically sorted. +# +# @example +# # bad +# spec.add_dependency 'rubocop' +# spec.add_dependency 'rspec' +# +# # good +# spec.add_dependency 'rspec' +# spec.add_dependency 'rubocop' +# +# # good +# spec.add_dependency 'rubocop' +# +# spec.add_dependency 'rspec' +# +# # bad +# spec.add_development_dependency 'rubocop' +# spec.add_development_dependency 'rspec' +# +# # good +# spec.add_development_dependency 'rspec' +# spec.add_development_dependency 'rubocop' +# +# # good +# spec.add_development_dependency 'rubocop' +# +# spec.add_development_dependency 'rspec' +# +# # bad +# spec.add_runtime_dependency 'rubocop' +# spec.add_runtime_dependency 'rspec' +# +# # good +# spec.add_runtime_dependency 'rspec' +# spec.add_runtime_dependency 'rubocop' +# +# # good +# spec.add_runtime_dependency 'rubocop' +# +# spec.add_runtime_dependency 'rspec' +# +# @example TreatCommentsAsGroupSeparators: true (default) +# # good +# # For code quality +# spec.add_dependency 'rubocop' +# # For tests +# spec.add_dependency 'rspec' +# +# @example TreatCommentsAsGroupSeparators: false +# # bad +# # For code quality +# spec.add_dependency 'rubocop' +# # For tests +# spec.add_dependency 'rspec' +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/ordered_dependencies.rb:61 +class RuboCop::Cop::Gemspec::OrderedDependencies < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OrderedGemNode + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/ordered_dependencies.rb:94 + def dependency_declarations(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/ordered_dependencies.rb:69 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/ordered_dependencies.rb:89 + def get_dependency_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/ordered_dependencies.rb:83 + def previous_declaration(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/ordered_dependencies.rb:65 +RuboCop::Cop::Gemspec::OrderedDependencies::MSG = T.let(T.unsafe(nil), String) + +# Requires a gemspec to have `rubygems_mfa_required` metadata set. +# +# This setting tells RubyGems that MFA (Multi-Factor Authentication) is +# required for accounts to be able perform privileged operations, such as +# (see RubyGems' documentation for the full list of privileged +# operations): +# +# * `gem push` +# * `gem yank` +# * `gem owner --add/remove` +# * adding or removing owners using gem ownership page +# +# This helps make your gem more secure, as users can be more +# confident that gem updates were pushed by maintainers. +# +# @example +# # bad +# Gem::Specification.new do |spec| +# # no `rubygems_mfa_required` metadata specified +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'true' +# } +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'true' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'false' +# } +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'true' +# } +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'false' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'true' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:63 +class RuboCop::Cop::Gemspec::RequireMFA < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemspecHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:70 + def metadata(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:78 + def metadata_assignment(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:95 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:86 + def rubygems_mfa_required(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:91 + def true_string?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:123 + def autocorrect(corrector, node, block_var, metadata); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:153 + def change_value(corrector, value); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:133 + def correct_metadata(corrector, metadata); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:141 + def insert_mfa_required(corrector, node, block_var); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:116 + def mfa_value(metadata_value); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:67 +RuboCop::Cop::Gemspec::RequireMFA::MSG = T.let(T.unsafe(nil), String) + +# Checks that `required_ruby_version` in a gemspec file is set to a valid +# value (non-blank) and matches `TargetRubyVersion` as set in RuboCop's +# configuration for the gem. +# +# This ensures that RuboCop is using the same Ruby version as the gem. +# +# @example +# # When `TargetRubyVersion` of .rubocop.yml is `2.5`. +# +# # bad +# Gem::Specification.new do |spec| +# # no `required_ruby_version` specified +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.4.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.6.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.5.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.5' +# end +# +# # accepted but not recommended +# Gem::Specification.new do |spec| +# spec.required_ruby_version = ['>= 2.5.0', '< 2.7.0'] +# end +# +# # accepted but not recommended, since +# # Ruby does not really follow semantic versioning +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '~> 2.5' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:55 +class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:68 + def defined_ruby_version(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:76 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:82 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:63 + def required_ruby_version?(param0); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:94 + def dynamic_version?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:100 + def extract_ruby_version(required_ruby_version); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:118 + def not_equal_message(required_ruby_version, target_ruby_version); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:60 +RuboCop::Cop::Gemspec::RequiredRubyVersion::MISSING_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:57 +RuboCop::Cop::Gemspec::RequiredRubyVersion::NOT_EQUAL_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:56 +RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that `RUBY_VERSION` and `Ruby::VERSION` constants are not used in gemspec. +# Using `RUBY_VERSION` and `Ruby::VERSION` are dangerous because value of the +# constant is determined by `rake release`. +# It's possible to have dependency based on ruby version used +# to execute `rake release` and not user's ruby version. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# if RUBY_VERSION >= '3.0' +# spec.add_dependency 'gem_a' +# else +# spec.add_dependency 'gem_b' +# end +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency 'gem_a' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb:28 +class RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemspecHelp + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb:41 + def on_const(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb:34 + def ruby_version?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb:49 + def gem_spec_with_ruby_version?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb:31 +RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking gem declarations. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/gemspec_help.rb:6 +module RuboCop::Cop::GemspecHelp + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/gemspec_help.rb:30 + def assignment_method_declarations(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/gemspec_help.rb:20 + def gem_specification(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/gemspec_help.rb:10 + def gem_specification?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/gemspec_help.rb:36 + def indexed_assignment_method_declarations(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/gemspec_help.rb:45 + def match_block_variable_name?(receiver_name); end +end + +# Source and spec generator for new cops +# +# This generator will take a cop name and generate a source file +# and spec file when given a valid qualified cop name. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cop/generator.rb:10 +class RuboCop::Cop::Generator + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:119 + def initialize(name, output: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:139 + def inject_config(config_file_path: T.unsafe(nil), version_added: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:135 + def inject_require(root_file_path: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:152 + def todo; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:127 + def write_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:131 + def write_spec; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:166 + def badge; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:189 + def generate(template); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:181 + def generated_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:185 + def generated_spec; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:166 + def output; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:214 + def snake_case(camel_case_string); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:204 + def source_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:194 + def spec_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:168 + def write_unless_file_exists(path, contents); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/generator.rb:115 +RuboCop::Cop::Generator::CONFIGURATION_ADDED_MESSAGE = T.let(T.unsafe(nil), String) + +# A class that injects a require directive into the root RuboCop file. +# It looks for other directives that require files in the same (cop) +# namespace and injects the provided one in alpha +# +# pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:9 +class RuboCop::Cop::Generator::ConfigurationInjector + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:17 + def initialize(configuration_file_path:, badge:, version_added: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:24 + def inject; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:39 + def badge; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:41 + def configuration_entries; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:39 + def configuration_file_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:59 + def cop_name_line?(yaml); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:49 + def find_target_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:45 + def new_configuration_entry; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:39 + def output; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:39 + def version_added; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:10 +RuboCop::Cop::Generator::ConfigurationInjector::TEMPLATE = T.let(T.unsafe(nil), String) + +# A class that injects a require directive into the root RuboCop file. +# It looks for other directives that require files in the same (cop) +# namespace and injects the provided one in alpha +# +# pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:9 +class RuboCop::Cop::Generator::RequireFileInjector + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:12 + def initialize(source_path:, root_file_path:, output: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:19 + def inject; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:64 + def injectable_require_directive; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:29 + def output; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:29 + def require_entries; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:31 + def require_exists?; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:68 + def require_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:58 + def require_path_fragments(require_directive); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:29 + def root_file_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:29 + def source_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:39 + def target_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:35 + def updated_directives; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:10 +RuboCop::Cop::Generator::RequireFileInjector::REQUIRE_PATH = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/generator.rb:11 +RuboCop::Cop::Generator::SOURCE_TEMPLATE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/generator.rb:91 +RuboCop::Cop::Generator::SPEC_TEMPLATE = T.let(T.unsafe(nil), String) + +# Common functionality for checking hash alignment. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:6 +module RuboCop::Cop::HashAlignmentStyles; end + +# Handles calculation of deltas when the enforced style is 'key'. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:8 +class RuboCop::Cop::HashAlignmentStyles::KeyAlignment + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:9 + def checkable_layout?(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:20 + def deltas(first_pair, current_pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:13 + def deltas_for_first_pair(first_pair); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:34 + def separator_delta(pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:45 + def value_delta(pair); end +end + +# Handles calculation of deltas for `kwsplat` nodes. +# This is a special case that just ensures the kwsplat is aligned with the rest of the hash +# since a `kwsplat` does not have a key, separator or value. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:146 +class RuboCop::Cop::HashAlignmentStyles::KeywordSplatAlignment + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:147 + def deltas(first_pair, current_pair); end +end + +# Handles calculation of deltas when the enforced style is 'separator'. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:121 +class RuboCop::Cop::HashAlignmentStyles::SeparatorAlignment + include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:124 + def deltas_for_first_pair(_first_pair); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:134 + def hash_rocket_delta(first_pair, current_pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:130 + def key_delta(first_pair, current_pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:138 + def value_delta(first_pair, current_pair); end +end + +# Handles calculation of deltas when the enforced style is 'table'. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:81 +class RuboCop::Cop::HashAlignmentStyles::TableAlignment + include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:84 + def deltas_for_first_pair(first_pair); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:98 + def hash_rocket_delta(first_pair, current_pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:94 + def key_delta(first_pair, current_pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:115 + def max_delimiter_width(hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:111 + def max_key_width(hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:103 + def value_delta(first_pair, current_pair); end +end + +# Common functionality for checking alignment of hash values. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:56 +module RuboCop::Cop::HashAlignmentStyles::ValueAlignment + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:57 + def checkable_layout?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:61 + def deltas(first_pair, current_pair); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:71 + def separator_delta(first_pair, current_pair, key_delta); end +end + +# This module checks for Ruby 3.1's hash value omission syntax. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:7 +module RuboCop::Cop::HashShorthandSyntax + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:32 + def on_hash_for_mixed_shorthand(hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:44 + def on_pair(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:144 + def brackets?(method_dispatch_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:174 + def breakdown_value_types_of_hash(hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:121 + def def_node_that_require_parentheses(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:203 + def each_omittable_value_pair(hash_value_type_breakdown, &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:199 + def each_omitted_value_pair(hash_value_type_breakdown, &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:99 + def enforced_shorthand_syntax; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:136 + def find_ancestor_method_dispatch_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:186 + def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:190 + def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:194 + def ignore_explicit_omissible_hash_shorthand_syntax?(hash_value_type_breakdown); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:93 + def ignore_hash_shorthand_syntax?(pair_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:87 + def ignore_mixed_hash_shorthand_syntax?(hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:159 + def last_expression?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:207 + def mixed_shorthand_syntax_check(hash_value_type_breakdown); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:223 + def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:67 + def register_offense(node, message, replacement); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:103 + def require_hash_value?(hash_key_source, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:112 + def require_hash_value_for_around_hash_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:167 + def requires_parentheses_context?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:148 + def use_element_of_hash_literal_as_receiver?(ancestor, parent); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:153 + def use_modifier_form_without_parenthesized_method_call?(ancestor); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:12 +RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_EXPLICIT_VALUE_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:10 +RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_MSG_PREFIX = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:11 +RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_OMIT_VALUE_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:14 +class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:23 + def first_argument; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:27 + def last_argument; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:14 + def node; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:14 + def node=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:15 + def selector; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:14 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:14 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:14 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:14 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:14 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:9 +RuboCop::Cop::HashShorthandSyntax::EXPLICIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:8 +RuboCop::Cop::HashShorthandSyntax::OMIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) + +# Common functionality for Style/HashExcept and Style/HashSlice cops. +# It registers an offense on methods with blocks that are equivalent +# to Hash#except or Hash#slice. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:9 +module RuboCop::Cop::HashSubset + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:21 + def block_with_first_arg_check?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:47 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:36 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:181 + def decorate_source(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:189 + def except_key(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:168 + def except_key_source(key); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:160 + def extract_body_if_negated(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:59 + def extract_offense(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:69 + def extracts_hash_subset?(block); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:138 + def included?(body, negated); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:146 + def not_included?(body, negated); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:197 + def offense_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:55 + def preferred_method_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:95 + def range_include?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:150 + def safe_to_register_offense?(block, except_key); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:123 + def semantically_except_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:134 + def semantically_slice_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:51 + def semantically_subset_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:88 + def slices_key?(send_node, method, key_arg, value_arg); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:115 + def supported_subset_method?(method); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:107 + def using_value_variable?(send_node, value_arg); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:16 +RuboCop::Cop::HashSubset::ACTIVE_SUPPORT_SUBSET_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:18 +RuboCop::Cop::HashSubset::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:13 +RuboCop::Cop::HashSubset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:15 +RuboCop::Cop::HashSubset::SUBSET_METHODS = T.let(T.unsafe(nil), Array) + +# Common functionality for Style/HashTransformKeys and +# Style/HashTransformValues +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:5 +module RuboCop::Cop::HashTransformMethod + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:33 + def hash_receiver?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:41 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:58 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:51 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:132 + def execute_correction(corrector, node, correction); end + + # @abstract + # + # @return [Captures] + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:107 + def extract_captures(_match); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:84 + def handle_possible_offense(node, match, match_desc); end + + # @abstract + # + # @return [String] + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:114 + def new_method_name; end + + # @abstract Implemented with `def_node_matcher` + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:65 + def on_bad_each_with_object(_node); end + + # @abstract Implemented with `def_node_matcher` + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:70 + def on_bad_hash_brackets_map(_node); end + + # @abstract Implemented with `def_node_matcher` + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:75 + def on_bad_map_to_h(_node); end + + # @abstract Implemented with `def_node_matcher` + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:80 + def on_bad_to_h(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:118 + def prepare_correction(node); end +end + +# Internal helper class to hold autocorrect data +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 +class RuboCop::Cop::HashTransformMethod::Autocorrection < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def block_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def block_node=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def leading; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def leading=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def match; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def match=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:48 + def set_new_arg_name(transformed_argname, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:52 + def set_new_body_expression(transforming_body_expr, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:38 + def set_new_method_name(new_method_name, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:32 + def strip_prefix_and_suffix(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def trailing; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def trailing=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:8 + def from_each_with_object(node, match); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:12 + def from_hash_brackets_map(node, match); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:16 + def from_map_to_h(node, match); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:28 + def from_to_h(node, match); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def new(*_arg0); end + end +end + +# Internal helper class to hold match data +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 +class RuboCop::Cop::HashTransformMethod::Captures < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:16 + def noop_transformation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:21 + def transformation_uses_both_args?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def transformed_argname; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def transformed_argname=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def transforming_body_expr; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def transforming_body_expr=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def unchanged_body_expr; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def unchanged_body_expr=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:25 + def use_transformed_argname?; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:12 +RuboCop::Cop::HashTransformMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Common functionality for working with heredoc strings. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:6 +module RuboCop::Cop::Heredoc + # pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:14 + def on_dstr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:17 + def on_heredoc(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:9 + def on_str(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:15 + def on_xstr(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:28 + def delimiter_string(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:34 + def heredoc_type(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:23 + def indent_level(str); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:7 +RuboCop::Cop::Heredoc::OPENING_DELIMITER = T.let(T.unsafe(nil), Regexp) + +# This class autocorrects `if...then` structures to a multiline `if` statement +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:6 +class RuboCop::Cop::IfThenCorrector + # pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:9 + def initialize(if_node, indentation: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:14 + def call(corrector); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:50 + def branch_body_indentation; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:20 + def if_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:20 + def indentation; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:22 + def replacement(node = T.unsafe(nil), indentation = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:36 + def rewrite_else_branch(else_branch, indentation); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:7 +RuboCop::Cop::IfThenCorrector::DEFAULT_INDENTATION_WIDTH = T.let(T.unsafe(nil), Integer) + +# @deprecated IgnoredMethods class has been replaced with AllowedMethods. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_methods.rb:46 +RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods + +# Handles adding and checking ignored nodes. +# +# pkg:gem/rubocop#lib/rubocop/cop/ignored_node.rb:6 +module RuboCop::Cop::IgnoredNode + # pkg:gem/rubocop#lib/rubocop/cop/ignored_node.rb:7 + def ignore_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/ignored_node.rb:24 + def ignored_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/ignored_node.rb:11 + def part_of_ignored_node?(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/ignored_node.rb:31 + def ignored_nodes; end +end + +# @deprecated IgnoredPattern class has been replaced with AllowedPattern. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:66 +RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern + +# Common functionality for checking integer nodes. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/integer_node.rb:6 +module RuboCop::Cop::IntegerNode + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/integer_node.rb:9 + def integer_part(node); end +end + +# Common functionality for working with string interpolations. +# +# @abstract Subclasses are expected to implement {#on_interpolation}. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/interpolation.rb:8 +module RuboCop::Cop::Interpolation + # pkg:gem/rubocop#lib/rubocop/cop/mixin/interpolation.rb:9 + def on_dstr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/interpolation.rb:14 + def on_dsym(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/interpolation.rb:17 + def on_node_with_interpolations(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/interpolation.rb:15 + def on_regexp(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/interpolation.rb:13 + def on_xstr(node); end +end + +# This class autocorrects lambda literal to method notation. +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:6 +class RuboCop::Cop::LambdaLiteralToMethodCorrector + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:7 + def initialize(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:13 + def call(corrector); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:118 + def arg_to_unparenthesized_call?; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:34 + def arguments; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:102 + def arguments_begin_pos; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:98 + def arguments_end_pos; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:110 + def block_begin; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:106 + def block_end; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:34 + def block_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:59 + def insert_arguments(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:43 + def insert_separating_space(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:88 + def lambda_arg_string; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:34 + def method; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:92 + def needs_separating_space?; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:53 + def remove_arguments(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:66 + def remove_leading_whitespace(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:74 + def remove_trailing_whitespace(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:36 + def remove_unparenthesized_whitespace(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:79 + def replace_delimiters(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:49 + def replace_selector(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:114 + def selector_end; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:134 + def separating_space?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:5 +module RuboCop::Cop::Layout; end + +# Bare access modifiers (those not applying to specific methods) should be +# indented as deep as method definitions, or as deep as the `class`/`module` +# keyword, depending on configuration. +# +# @example EnforcedStyle: indent (default) +# # bad +# class Plumbus +# private +# def smooth; end +# end +# +# # good +# class Plumbus +# private +# def smooth; end +# end +# +# @example EnforcedStyle: outdent +# # bad +# class Plumbus +# private +# def smooth; end +# end +# +# # good +# class Plumbus +# private +# def smooth; end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:35 +class RuboCop::Cop::Layout::AccessModifierIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:50 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:43 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:49 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:48 + def on_sclass(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:54 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:58 + def check_body(body, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:69 + def check_modifier(send_node, end_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:92 + def expected_indent_offset; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:88 + def message(range); end + + # An offset that is not expected, but correct if the configuration is + # changed. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:98 + def unexpected_indent_offset; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:41 +RuboCop::Cop::Layout::AccessModifierIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks that the arguments on a multi-line method call are aligned. +# +# @example EnforcedStyle: with_first_argument (default) +# # good +# +# foo :bar, +# :baz, +# key: value +# +# foo( +# :bar, +# :baz, +# key: value +# ) +# +# # bad +# +# foo :bar, +# :baz, +# key: value +# +# foo( +# :bar, +# :baz, +# key: value +# ) +# +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# foo :bar, +# :baz, +# key: value +# +# # bad +# +# foo :bar, +# :baz, +# key: value +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:45 +class RuboCop::Cop::Layout::ArgumentAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:63 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:54 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:91 + def arguments_or_first_arg_pairs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:79 + def arguments_with_last_arg_pairs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:107 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:67 + def autocorrect_incompatible_with_other_cops?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:123 + def base_column(node, first_argument); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:143 + def enforce_hash_argument_with_separator?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:115 + def fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:71 + def flattened_arguments(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:111 + def message(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:100 + def multiple_arguments?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:134 + def target_method_lineno(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:119 + def with_first_argument_style?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:49 +RuboCop::Cop::Layout::ArgumentAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:51 +RuboCop::Cop::Layout::ArgumentAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Checks that the elements of a multi-line array literal are +# aligned. +# +# @example EnforcedStyle: with_first_element (default) +# # good +# +# array = [1, 2, 3, +# 4, 5, 6] +# array = ['run', +# 'forrest', +# 'run'] +# +# # bad +# +# array = [1, 2, 3, +# 4, 5, 6] +# array = ['run', +# 'forrest', +# 'run'] +# +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# array = [1, 2, 3, +# 4, 5, 6] +# +# # bad +# +# array = [1, 2, 3, +# 4, 5, 6] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:36 +class RuboCop::Cop::Layout::ArrayAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:46 + def on_array(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:55 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:67 + def base_column(node, args); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:63 + def fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:59 + def message(_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:78 + def target_method_lineno(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:40 +RuboCop::Cop::Layout::ArrayAlignment::ALIGN_ELEMENTS_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:43 +RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first line of the +# right-hand-side of a multi-line assignment. +# +# The indentation of the remaining lines can be corrected with +# other cops such as `Layout/IndentationConsistency` and `Layout/EndAlignment`. +# +# @example +# # bad +# value = +# if foo +# 'bar' +# end +# +# # good +# value = +# if foo +# 'bar' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/assignment_indentation.rb:25 +class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/assignment_indentation.rb:43 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/assignment_indentation.rb:34 + def check_assignment(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/assignment_indentation.rb:47 + def leftmost_multiple_assignment(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/assignment_indentation.rb:30 +RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keyword of `begin` is aligned properly. +# +# Two modes are supported through the `EnforcedStyleAlignWith` configuration +# parameter. If it's set to `start_of_line` (which is the default), the +# `end` shall be aligned with the start of the line where the `begin` +# keyword is. If it's set to `begin`, the `end` shall be aligned with the +# `begin` keyword. +# +# `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) +# by default. On the other hand, `||= begin` that this cop targets tends to +# align with the start of the line, it defaults to `EnforcedStyleAlignWith: start_of_line`. +# These style can be configured by each cop. +# +# @example EnforcedStyleAlignWith: start_of_line (default) +# # bad +# foo ||= begin +# do_something +# end +# +# # good +# foo ||= begin +# do_something +# end +# +# @example EnforcedStyleAlignWith: begin +# # bad +# foo ||= begin +# do_something +# end +# +# # good +# foo ||= begin +# do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/begin_end_alignment.rb:41 +class RuboCop::Cop::Layout::BeginEndAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/begin_end_alignment.rb:47 + def on_kwbegin(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/begin_end_alignment.rb:62 + def alignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/begin_end_alignment.rb:58 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/begin_end_alignment.rb:53 + def check_begin_alignment(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/begin_end_alignment.rb:45 +RuboCop::Cop::Layout::BeginEndAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords are aligned properly for do +# end blocks. +# +# Three modes are supported through the `EnforcedStyleAlignWith` +# configuration parameter: +# +# `start_of_block` : the `end` shall be aligned with the +# start of the line where the `do` appeared. +# +# `start_of_line` : the `end` shall be aligned with the +# start of the line where the expression started. +# +# `either` (which is the default) : the `end` is allowed to be in either +# location. The autocorrect will default to `start_of_line`. +# +# @example EnforcedStyleAlignWith: either (default) +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# +# @example EnforcedStyleAlignWith: start_of_block +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# +# @example EnforcedStyleAlignWith: start_of_line +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:66 +class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:74 + def block_end_align_target?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:84 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:89 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:88 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:91 + def style_parameter_name; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:247 + def add_space_before(corrector, loc, delta); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:224 + def alt_start_msg(start_loc, source_line_column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:146 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:97 + def block_end_align_target(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:115 + def check_block_alignment(start_node, block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:197 + def compute_do_source_line_column(node, end_loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:239 + def compute_start_col(ancestor_node, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:111 + def disqualified_parent?(parent, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:107 + def end_align_target?(node, parent); end + + # In offense message, we want to show the assignment LHS rather than + # the entire assignment. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:192 + def find_lhs_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:163 + def format_message(start_loc, end_loc, do_source_line_column, error_source_line_column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:234 + def format_source_line_column(source_line_column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:216 + def loc_to_source_line_column(loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:128 + def register_offense(block_node, start_loc, end_loc, do_source_line_column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:251 + def remove_space_before(corrector, end_pos, delta); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:173 + def start_for_block_node(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:180 + def start_for_line_node(block_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:71 +RuboCop::Cop::Layout::BlockAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end statement of a do..end block +# is on its own line. +# +# @example +# # bad +# blah do |i| +# foo(i) end +# +# # good +# blah do |i| +# foo(i) +# end +# +# # bad +# blah { |i| +# foo(i) } +# +# # good +# blah { |i| +# foo(i) +# } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:27 +class RuboCop::Cop::Layout::BlockEndNewline < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:33 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:46 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:45 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:67 + def last_heredoc_argument(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:63 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:77 + def offense_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:50 + def register_offense(node, offense_range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:31 +RuboCop::Cop::Layout::BlockEndNewline::MSG = T.let(T.unsafe(nil), String) + +# Checks how the `when` and ``in``s of a `case` expression +# are indented in relation to its `case` or `end` keyword. +# +# It will register a separate offense for each misaligned `when` and `in`. +# +# @example +# # If Layout/EndAlignment is set to keyword style (default) +# # *case* and *end* should always be aligned to same depth, +# # and therefore *when* should always be aligned to both - +# # regardless of configuration. +# +# # bad for all styles +# case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good for all styles +# case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# @example EnforcedStyle: case (default) +# # if EndAlignment is set to other style such as +# # start_of_line (as shown below), then *when* alignment +# # configuration does have an effect. +# +# # bad +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# @example EnforcedStyle: end +# # bad +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:112 +class RuboCop::Cop::Layout::CaseIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:120 + def on_case(case_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:127 + def on_case_match(case_match_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:195 + def base_column(case_node, base); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:152 + def check_when(when_node, branch_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:184 + def detect_incorrect_style(when_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:138 + def end_and_last_conditional_same_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:148 + def enforced_style_end?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:171 + def incorrect_style(when_node, branch_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:163 + def indent_one_step?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:167 + def indentation_width; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:209 + def replacement(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:202 + def whitespace_range(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:118 +RuboCop::Cop::Layout::CaseIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks if the code style follows the `ExpectedOrder` configuration: +# +# `Categories` allows us to map macro names into a category. +# +# Consider an example of code style that covers the following order: +# +# * Module inclusion (`include`, `prepend`, `extend`) +# * Constants +# * Associations (`has_one`, `has_many`) +# * Public attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) +# * Other macros (`validates`, `validate`) +# * Public class methods +# * Initializer +# * Public instance methods +# * Protected attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) +# * Protected instance methods +# * Private attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) +# * Private instance methods +# +# NOTE: Simply enabling the cop with `Enabled: true` will not use +# the example order shown below. +# To enforce the order of macros like `attr_reader`, +# you must define both `ExpectedOrder` *and* `Categories`. +# +# You can configure the following order: +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# ExpectedOrder: +# - module_inclusion +# - constants +# - association +# - public_attribute_macros +# - public_delegate +# - macros +# - public_class_methods +# - initializer +# - public_methods +# - protected_attribute_macros +# - protected_methods +# - private_attribute_macros +# - private_delegate +# - private_methods +# ---- +# +# Instead of putting all literals in the expected order, is also +# possible to group categories of macros. Visibility levels are handled +# automatically. +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# Categories: +# association: +# - has_many +# - has_one +# attribute_macros: +# - attr_accessor +# - attr_reader +# - attr_writer +# macros: +# - validates +# - validate +# module_inclusion: +# - include +# - prepend +# - extend +# ---- +# +# If you only set `ExpectedOrder` +# without defining `Categories`, +# macros such as `attr_reader` or `has_many` +# will not be recognized as part of a category, and their order will not be validated. +# For example, the following will NOT raise any offenses, even if the order is incorrect: +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# Enabled: true +# ExpectedOrder: +# - public_attribute_macros +# - initializer +# ---- +# +# To make it work as expected, you must also specify `Categories` like this: +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# ExpectedOrder: +# - public_attribute_macros +# - initializer +# Categories: +# attribute_macros: +# - attr_reader +# - attr_writer +# - attr_accessor +# ---- +# +# @safety +# Autocorrection is unsafe because class methods and module inclusion +# can behave differently, based on which methods or constants have +# already been defined. +# +# Constants will only be moved when they are assigned with literals. +# +# @example +# # bad +# # Expect extend be before constant +# class Person < ApplicationRecord +# has_many :orders +# ANSWER = 42 +# +# extend SomeModule +# include AnotherModule +# end +# +# # good +# class Person +# # extend and include go first +# extend SomeModule +# include AnotherModule +# +# # inner classes +# CustomError = Class.new(StandardError) +# +# # constants are next +# SOME_CONSTANT = 20 +# +# # afterwards we have public attribute macros +# attr_reader :name +# +# # followed by other macros (if any) +# validates :name +# +# # then we have public delegate macros +# delegate :to_s, to: :name +# +# # public class methods are next in line +# def self.some_method +# end +# +# # initialization goes between class methods and instance methods +# def initialize +# end +# +# # followed by other public instance methods +# def some_method +# end +# +# # protected attribute macros and methods go next +# protected +# +# attr_reader :protected_name +# +# def some_protected_method +# end +# +# # private attribute macros, delegate macros and methods +# # are grouped near the end +# private +# +# attr_reader :private_name +# +# delegate :some_private_delegate, to: :name +# +# def some_private_method +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:177 +class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # Validates code style on class declaration. + # Add offense when find a node out of expected order. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:193 + def on_class(class_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:204 + def on_sclass(class_node); end + + private + + # Autocorrect by swapping between two nodes autocorrecting them + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:209 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:347 + def begin_pos_with_comment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:370 + def buffer; end + + # Setting categories hash allow you to group methods in group to match + # in the {expected_order}. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:382 + def categories; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:276 + def class_elements(class_node); end + + # Classifies a node to match with something in the {expected_order} + # @param node to be analysed + # @return String when the node type is a `:block` then + # {classify} recursively with the first children + # @return String when the node type is a `:send` then {find_send_node_category} + # by method name + # @return String otherwise trying to {humanize_node} of the current node + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:229 + def classify(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:313 + def dynamic_constant?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:337 + def end_position_for(node); end + + # Load expected order from `ExpectedOrder` config. + # Define new terms in the expected order by adding new {categories}. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:376 + def expected_order; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:261 + def find_category(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:366 + def find_heredoc(node); end + + # Categorize a node according to the {expected_order} + # Try to match {categories} values against the node's method_name given + # also its visibility. + # @param node to be analysed. + # @return [String] with the key category or the `method_name` as string + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:248 + def find_send_node_category(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:304 + def humanize_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:288 + def ignore?(node, classification); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:295 + def ignore_for_autocorrect?(node, sibling); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:331 + def marked_as_private_constant?(node, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:321 + def private_constant?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:362 + def start_line_position(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:267 + def walk_over_nested_class_definition(class_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:358 + def whole_line_comment_at_line?(line); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:182 +RuboCop::Cop::Layout::ClassStructure::HUMANIZED_NODE_TYPE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:189 +RuboCop::Cop::Layout::ClassStructure::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of here document closings. +# +# @example +# +# # bad +# class Foo +# def bar +# <<~SQL +# 'Hi' +# SQL +# end +# end +# +# # good +# class Foo +# def bar +# <<~SQL +# 'Hi' +# SQL +# end +# end +# +# # bad +# +# # heredoc contents is before closing heredoc. +# foo arg, +# <<~EOS +# Hi +# EOS +# +# # good +# foo arg, +# <<~EOS +# Hi +# EOS +# +# # good +# foo arg, +# <<~EOS +# Hi +# EOS +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:48 +class RuboCop::Cop::Layout::ClosingHeredocIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:57 + def on_heredoc(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:74 + def argument_indentation_correct?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:82 + def closing_indentation(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:101 + def find_node_used_heredoc_argument(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:90 + def heredoc_closing(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:86 + def heredoc_opening(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:117 + def indent_level(source_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:94 + def indented_end(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:109 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:70 + def opening_indentation(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:53 +RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:54 +RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG_ARG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:52 +RuboCop::Cop::Layout::ClosingHeredocIndentation::SIMPLE_HEREDOC = T.let(T.unsafe(nil), String) + +# Checks the indentation of hanging closing parentheses in +# method calls, method definitions, and grouped expressions. A hanging +# closing parenthesis means `)` preceded by a line break. +# +# @example +# +# # bad +# some_method( +# a, +# b +# ) +# +# some_method( +# a, b +# ) +# +# some_method(a, b, c +# ) +# +# some_method(a, +# b, +# c +# ) +# +# some_method(a, +# x: 1, +# y: 2 +# ) +# +# # Scenario 1: When First Parameter Is On Its Own Line +# +# # good: when first param is on a new line, right paren is *always* +# # outdented by IndentationWidth +# some_method( +# a, +# b +# ) +# +# # good +# some_method( +# a, b +# ) +# +# # Scenario 2: When First Parameter Is On The Same Line +# +# # good: when all other params are also on the same line, outdent +# # right paren by IndentationWidth +# some_method(a, b, c +# ) +# +# # good: when all other params are on multiple lines, but are lined +# # up, align right paren with left paren +# some_method(a, +# b, +# c +# ) +# +# # good: when other params are not lined up on multiple lines, outdent +# # right paren by IndentationWidth +# some_method(a, +# x: 1, +# y: 2 +# ) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:71 +class RuboCop::Cop::Layout::ClosingParenthesisIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:84 + def on_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:82 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:88 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:91 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:79 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:157 + def all_elements_aligned?(elements); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:95 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:99 + def check(node, elements); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:107 + def check_for_elements(node, elements); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:125 + def check_for_no_elements(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:171 + def correct_column_candidates(node, left_paren); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:144 + def expected_column(left_paren, elements); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:167 + def first_argument_line(elements); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:187 + def line_break_after_left_paren?(left_paren, elements); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:179 + def message(correct_column, left_paren, right_paren); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:77 +RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:75 +RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) + +# Checks the indentation of comments. +# +# @example +# # bad +# # comment here +# def method_name +# end +# +# # comment here +# a = 'hello' +# +# # yet another comment +# if true +# true +# end +# +# # good +# # comment here +# def method_name +# end +# +# # comment here +# a = 'hello' +# +# # yet another comment +# if true +# true +# end +# +# @example AllowForAlignment: false (default) +# # bad +# a = 1 # A really long comment +# # spanning two lines. +# +# # good +# # A really long comment spanning one line. +# a = 1 +# +# @example AllowForAlignment: true +# # good +# a = 1 # A really long comment +# # spanning two lines. +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:48 +class RuboCop::Cop::Layout::CommentIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:55 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:61 + def autocorrect(corrector, comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:88 + def autocorrect_one(corrector, comment); end + + # Corrects all comment lines that occur immediately before the given + # comment and have the same indentation. This is to avoid a long chain + # of correcting, saving the file, parsing and inspecting again, and + # then correcting one more line, and so on. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:71 + def autocorrect_preceding_comments(corrector, comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:92 + def check(comment, comment_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:145 + def correct_indentation(next_line); end + + # Returns true if: + # a) the cop is configured to allow extra indentation for alignment, and + # b) the currently inspected comment is aligned with the nearest preceding end-of-line + # comment. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:121 + def correctly_aligned_with_preceding_comment?(comment_index, column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:156 + def less_indented?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:140 + def line_after_comment(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:131 + def message(column, correct_comment_indentation); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:135 + def own_line_comment?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:82 + def should_correct?(preceding_comment, reference_comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:162 + def two_alternatives?(line); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:52 +RuboCop::Cop::Layout::CommentIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for conditions that are not on the same line as +# if/while/until. +# +# @example +# +# # bad +# if +# some_condition +# do_something +# end +# +# # good +# if some_condition +# do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:21 +class RuboCop::Cop::Layout::ConditionPosition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:27 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:36 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:33 + def on_while(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:40 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:54 + def message(condition); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:25 +RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords of method definitions are +# aligned properly. +# +# Two modes are supported through the EnforcedStyleAlignWith configuration +# parameter. If it's set to `start_of_line` (which is the default), the +# `end` shall be aligned with the start of the line where the `def` +# keyword is. If it's set to `def`, the `end` shall be aligned with the +# `def` keyword. +# +# @example EnforcedStyleAlignWith: start_of_line (default) +# # bad +# +# private def foo +# end +# +# # good +# +# private def foo +# end +# +# @example EnforcedStyleAlignWith: def +# # bad +# +# private def foo +# end +# +# # good +# +# private def foo +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/def_end_alignment.rb:36 +class RuboCop::Cop::Layout::DefEndAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/def_end_alignment.rb:43 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/def_end_alignment.rb:46 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/def_end_alignment.rb:48 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/def_end_alignment.rb:63 + def autocorrect(corrector, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/def_end_alignment.rb:41 +RuboCop::Cop::Layout::DefEndAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks the . position in multi-line method calls. +# +# @example EnforcedStyle: leading (default) +# # bad +# something. +# method +# +# # good +# something +# .method +# +# @example EnforcedStyle: trailing +# # bad +# something +# .method +# +# # good +# something. +# method +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:25 +class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:45 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:34 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:49 + def autocorrect(corrector, dot, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:99 + def correct_dot_position_style?(dot_line, selector_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:126 + def end_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:122 + def heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:114 + def last_heredoc_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:95 + def line_between?(first_line, second_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:64 + def message(dot); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:74 + def proper_dot_position?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:106 + def receiver_end_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:130 + def selector_range(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:30 + def autocorrect_incompatible_with; end + end +end + +# Checks the alignment of else keywords. Normally they should +# be aligned with an if/unless/while/until/begin/def/rescue keyword, but there +# are special cases when they should follow the same rules as the +# alignment of end. +# +# @example +# # bad +# if something +# code +# else +# code +# end +# +# # bad +# if something +# code +# elsif something +# code +# end +# +# # good +# if something +# code +# else +# code +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:32 +class RuboCop::Cop::Layout::ElseAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::CheckAssignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:57 + def on_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:63 + def on_case_match(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:40 + def on_if(node, base = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:51 + def on_rescue(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:147 + def assignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:71 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:106 + def base_for_method_definition(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:80 + def base_range_of_if(node, base); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:89 + def base_range_of_rescue(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:131 + def check_alignment(base_range, else_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:115 + def check_assignment(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:75 + def check_nested(node, base); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:38 +RuboCop::Cop::Layout::ElseAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks empty comment. +# +# @example +# # bad +# +# # +# class Foo +# end +# +# # good +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# +# @example AllowBorderComment: true (default) +# # good +# +# def foo +# end +# +# ################# +# +# def bar +# end +# +# @example AllowBorderComment: false +# # bad +# +# def foo +# end +# +# ################# +# +# def bar +# end +# +# @example AllowMarginComment: true (default) +# # good +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# +# @example AllowMarginComment: false +# # bad +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:63 +class RuboCop::Cop::Layout::EmptyComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:69 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:133 + def allow_border_comment?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:137 + def allow_margin_comment?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:97 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:129 + def comment_text(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:108 + def concat_consecutive_comments(comments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:141 + def current_token(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:119 + def empty_comment_only?(comment_text); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:85 + def investigate(comments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:145 + def previous_token(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:67 +RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String) + +# Enforces empty line after guard clause. +# +# This cop allows `# :nocov:` directive after guard clause because +# SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: +# +# [source,ruby] +# ---- +# def foo +# # :nocov: +# return if condition +# # :nocov: +# bar +# end +# ---- +# +# Refer to SimpleCov's documentation for more details: +# https://github.com/simplecov-ruby/simplecov#ignoringskipping-code +# +# @example +# +# # bad +# def foo +# return if need_return? +# bar +# end +# +# # good +# def foo +# return if need_return? +# +# bar +# end +# +# # good +# def foo +# return if something? +# return if something_different? +# +# bar +# end +# +# # also good +# def foo +# if something? +# do_something +# return if need_return? +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:54 +class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::PathUtil + extend ::RuboCop::Cop::Util + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:64 + def guard_clause_branch?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:68 + def on_if(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:89 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:111 + def contains_guard_clause?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:104 + def correct_style?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:191 + def heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:184 + def heredoc_line(node, heredoc_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:156 + def last_heredoc_argument(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:172 + def last_heredoc_argument_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:209 + def multiple_statements_on_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:128 + def next_line_allowed_directive_comment?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:124 + def next_line_empty?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:117 + def next_line_empty_or_allowed_directive_comment?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:134 + def next_line_rescue_or_ensure?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:148 + def next_sibling_empty_or_guard_clause?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:139 + def next_sibling_parent_empty_or_else?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:201 + def offense_location(node); end + + # SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: + # https://github.com/simplecov-ruby/simplecov#ignoringskipping-code + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:218 + def simplecov_directive_comment?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:195 + def use_heredoc_in_condition?(condition); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:60 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::END_OF_HEREDOC_LINE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:59 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:61 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::SIMPLE_DIRECTIVE_COMMENT_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Checks for a newline after the final magic comment. +# +# @example +# # good +# +# # Some documentation for Person +# class Person +# # Some code +# end +# +# # bad +# # Some documentation for Person +# class Person +# # Some code +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:23 +class RuboCop::Cop::Layout::EmptyLineAfterMagicComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:29 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:61 + def comments_before_code(source); end + + # Find the last magic comment in the source file. + # + # Take all comments that precede the first line of code (or just take + # them all in the case when there is no code), select the + # magic comments, and return the last magic comment in the file. + # + # @return [Parser::Source::Comment] if magic comments exist before code + # @return [nil] otherwise + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:55 + def last_magic_comment(source); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:43 + def offending_range(last_magic_comment); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:27 +RuboCop::Cop::Layout::EmptyLineAfterMagicComment::MSG = T.let(T.unsafe(nil), String) + +# Enforces empty line after multiline condition. +# +# @example +# # bad +# if multiline && +# condition +# do_something +# end +# +# # good +# if multiline && +# condition +# +# do_something +# end +# +# # bad +# case x +# when foo, +# bar +# do_something +# end +# +# # good +# case x +# when foo, +# bar +# +# do_something +# end +# +# # bad +# begin +# do_something +# rescue FooError, +# BarError +# handle_error +# end +# +# # good +# begin +# do_something +# rescue FooError, +# BarError +# +# handle_error +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:54 +class RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:82 + def on_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:60 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:93 + def on_rescue(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:73 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:80 + def on_until_post(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:70 + def on_while(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:75 + def on_while_post(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:127 + def autocorrect(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:105 + def check_condition(condition); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:120 + def multiline_rescue_exceptions?(exception_nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:116 + def multiline_when_condition?(when_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:112 + def next_line_empty?(line); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:58 +RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks whether class/module/method definitions are +# separated by one or more empty lines. +# +# `NumberOfEmptyLines` can be an integer (default is 1) or +# an array (e.g. [1, 2]) to specify a minimum and maximum +# number of empty lines permitted. +# +# `AllowAdjacentOneLineDefs` configures whether adjacent +# one-line definitions are considered an offense. +# +# @example EmptyLineBetweenMethodDefs: true (default) +# # checks for empty lines between method definitions. +# +# # bad +# def a +# end +# def b +# end +# +# # good +# def a +# end +# +# def b +# end +# +# @example EmptyLineBetweenClassDefs: true (default) +# # checks for empty lines between class definitions. +# +# # bad +# class A +# end +# class B +# end +# def b +# end +# +# # good +# class A +# end +# +# class B +# end +# +# def b +# end +# +# @example EmptyLineBetweenModuleDefs: true (default) +# # checks for empty lines between module definitions. +# +# # bad +# module A +# end +# module B +# end +# def b +# end +# +# # good +# module A +# end +# +# module B +# end +# +# def b +# end +# +# @example AllowAdjacentOneLineDefs: true (default) +# +# # good +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# # good - DefLikeMacros: [memoize] +# memoize :attribute_a +# memoize :attribute_b +# +# # good +# memoize :attribute_a +# +# memoize :attribute_b +# +# @example AllowAdjacentOneLineDefs: false +# +# # bad +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# # bad - DefLikeMacros: [memoize] +# memoize :attribute_a +# memoize :attribute_b +# +# # good +# memoize :attribute_a +# +# memoize :attribute_b +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:114 +class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:151 + def autocorrect(corrector, prev_def, node, count); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:136 + def check_defs(nodes); end + + # We operate on `begin` nodes, instead of using `OnMethodDef`, + # so that we can walk over pairs of consecutive nodes and + # efficiently access a node's predecessor; #prev_node ends up + # doing a linear scan over siblings, so we don't want to call + # it on each def. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:129 + def on_begin(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:305 + def allowance_range?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:287 + def autocorrect_insert_lines(corrector, newline_pos, count); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:280 + def autocorrect_remove_lines(corrector, newline_pos, count); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:242 + def blank_lines_count_between(first_def_node, second_def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:180 + def candidate?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:206 + def class_candidate?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:272 + def def_end(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:170 + def def_location(correction_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:262 + def def_start(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:187 + def empty_line_between_macros; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:276 + def end_loc(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:220 + def expected_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:238 + def line_count_allowed?(count); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:254 + def lines_between_defs(first_def_node, second_def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:191 + def macro_candidate?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:250 + def maximum_empty_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:214 + def message(node, count: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:202 + def method_candidate?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:246 + def minimum_empty_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:210 + def module_candidate?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:229 + def multiple_blank_lines_groups?(first_def_node, second_def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:294 + def node_type(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:120 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:118 +RuboCop::Cop::Layout::EmptyLineBetweenDefs::MSG = T.let(T.unsafe(nil), String) + +# Checks for two or more consecutive blank lines. +# +# @example +# +# # bad - It has two empty lines. +# some_method +# # one empty line +# # two empty lines +# some_method +# +# # good +# some_method +# # one empty line +# some_method +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:21 +class RuboCop::Cop::Layout::EmptyLines < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:28 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:45 + def each_extra_empty_line(lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:63 + def exceeds_line_offset?(line_diff); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:67 + def previous_and_current_lines_empty?(line); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:26 +RuboCop::Cop::Layout::EmptyLines::LINE_OFFSET = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:25 +RuboCop::Cop::Layout::EmptyLines::MSG = T.let(T.unsafe(nil), String) + +# Checks for an empty line after a module inclusion method (`extend`, +# `include` and `prepend`), or a group of them. +# +# @example +# # bad +# class Foo +# include Bar +# attr_reader :baz +# end +# +# # good +# class Foo +# include Bar +# +# attr_reader :baz +# end +# +# # also good - multiple module inclusions grouped together +# class Foo +# extend Bar +# include Baz +# prepend Qux +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:30 +class RuboCop::Cop::Layout::EmptyLinesAfterModuleInclusion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:40 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:85 + def allowed_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:54 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:69 + def enable_directive_comment?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:75 + def line_empty?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:65 + def next_line_empty_or_enable_directive_comment?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:93 + def next_line_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:79 + def require_empty_line?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:36 +RuboCop::Cop::Layout::EmptyLinesAfterModuleInclusion::MODULE_INCLUSION_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:34 +RuboCop::Cop::Layout::EmptyLinesAfterModuleInclusion::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:38 +RuboCop::Cop::Layout::EmptyLinesAfterModuleInclusion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Access modifiers should be surrounded by blank lines. +# +# @example EnforcedStyle: around (default) +# +# # bad +# class Foo +# def bar; end +# private +# def baz; end +# end +# +# # good +# class Foo +# def bar; end +# +# private +# +# def baz; end +# end +# +# @example EnforcedStyle: only_before +# +# # bad +# class Foo +# def bar; end +# private +# def baz; end +# end +# +# # good +# class Foo +# def bar; end +# +# private +# def baz; end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:43 +class RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:56 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:81 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:62 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:86 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:71 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:85 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:76 + def on_sclass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:88 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:116 + def allowed_only_before_style?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:171 + def block_start?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:177 + def body_end?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:165 + def class_def?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:125 + def correct_next_line_if_denied_style(corrector, node, line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:161 + def empty_lines_around?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:105 + def expected_empty_lines?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:230 + def inside_block?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:187 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:196 + def message_for_around_style(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:206 + def message_for_only_before_style(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:183 + def next_empty_line_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:151 + def next_line_empty?(last_send_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:157 + def next_line_empty_and_exists?(last_send_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:234 + def no_empty_lines_around_block_body?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:144 + def previous_line_empty?(send_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:140 + def previous_line_ignoring_comments(processed_source, send_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:224 + def should_insert_line_after?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:216 + def should_insert_line_before?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:48 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:52 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:49 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_AND_AFTER = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:51 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:54 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if empty lines exist around the arguments +# of a method invocation. +# +# @example +# # bad +# do_something( +# foo +# +# ) +# +# process(bar, +# +# baz: qux, +# thud: fred) +# +# some_method( +# +# [1,2,3], +# x: y +# ) +# +# # good +# do_something( +# foo +# ) +# +# process(bar, +# baz: qux, +# thud: fred) +# +# some_method( +# [1,2,3], +# x: y +# ) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_arguments.rb:41 +class RuboCop::Cop::Layout::EmptyLinesAroundArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_arguments.rb:57 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_arguments.rb:47 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_arguments.rb:73 + def empty_range_for_starting_point(start); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_arguments.rb:65 + def extra_lines(node, &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_arguments.rb:61 + def receiver_and_method_call_on_different_lines?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_arguments.rb:45 +RuboCop::Cop::Layout::EmptyLinesAroundArguments::MSG = T.let(T.unsafe(nil), String) + +# Checks for a newline after an attribute accessor or a group of them. +# `alias` syntax and `alias_method`, `public`, `protected`, and `private` methods are allowed +# by default. These are customizable with `AllowAliasSyntax` and `AllowedMethods` options. +# +# @example +# # bad +# attr_accessor :foo +# def do_something +# end +# +# # good +# attr_accessor :foo +# +# def do_something +# end +# +# # good +# attr_accessor :foo +# attr_reader :bar +# attr_writer :baz +# attr :qux +# +# def do_something +# end +# +# @example AllowAliasSyntax: true (default) +# # good +# attr_accessor :foo +# alias :foo? :foo +# +# def do_something +# end +# +# @example AllowAliasSyntax: false +# # bad +# attr_accessor :foo +# alias :foo? :foo +# +# def do_something +# end +# +# # good +# attr_accessor :foo +# +# alias :foo? :foo +# +# def do_something +# end +# +# @example AllowedMethods: ['private'] +# # good +# attr_accessor :foo +# private :foo +# +# def do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:63 +class RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:71 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:124 + def allow_alias?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:134 + def allow_alias_syntax?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:128 + def attribute_or_allowed_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:84 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:108 + def next_line_empty?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:95 + def next_line_empty_or_enable_directive_comment?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:102 + def next_line_enable_directive_comment?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:118 + def next_line_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:112 + def require_empty_line?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:68 +RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:69 +RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if empty lines exist around the bodies of begin-end +# blocks. +# +# @example +# +# # bad +# begin +# +# # ... +# +# end +# +# # good +# begin +# # ... +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_begin_body.rb:23 +class RuboCop::Cop::Layout::EmptyLinesAroundBeginBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_begin_body.rb:29 + def on_kwbegin(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_begin_body.rb:35 + def style; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_begin_body.rb:27 +RuboCop::Cop::Layout::EmptyLinesAroundBeginBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of blocks match +# the configuration. +# +# @example EnforcedStyle: no_empty_lines (default) +# # bad +# foo do |bar| +# +# # ... +# +# end +# +# # good +# foo do |bar| +# # ... +# end +# +# @example EnforcedStyle: empty_lines +# # bad +# foo do |bar| +# # ... +# end +# +# # good +# foo do |bar| +# +# # ... +# +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_block_body.rb:34 +class RuboCop::Cop::Layout::EmptyLinesAroundBlockBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_block_body.rb:40 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_block_body.rb:47 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_block_body.rb:46 + def on_numblock(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_block_body.rb:38 +RuboCop::Cop::Layout::EmptyLinesAroundBlockBody::KIND = T.let(T.unsafe(nil), String) + +# Common functionality for checking if presence/absence of empty lines +# around some kind of body matches the configuration. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:8 +module RuboCop::Cop::Layout::EmptyLinesAroundBody + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:20 + def constant_definition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:23 + def empty_line_required?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:26 + def check(node, body, adjusted_first_line: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:81 + def check_beginning(style, first_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:67 + def check_both(style, first_line, last_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:108 + def check_deferred_empty_line(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:43 + def check_empty_lines_except_namespace(body, first_line, last_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:51 + def check_empty_lines_special(body, first_line, last_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:85 + def check_ending(style, last_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:98 + def check_line(style, line, msg); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:89 + def check_source(style, line_no, desc); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:159 + def deferred_message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:132 + def first_child_requires_empty_line?(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:140 + def first_empty_line_required_child(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:155 + def message(type, desc); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:122 + def namespace?(body, with_one_child: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:148 + def previous_line_ignoring_comments(send_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:163 + def valid_body_style?(body); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:15 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_DEFERRED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:13 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_EXTRA = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:14 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_MISSING = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of classes match +# the configuration. +# +# @example EnforcedStyle: no_empty_lines (default) +# # bad +# class Foo +# +# def bar +# # ... +# end +# +# end +# +# # good +# class Foo +# def bar +# # ... +# end +# end +# +# @example EnforcedStyle: empty_lines +# # bad +# class Foo +# def bar +# # ... +# end +# end +# +# # good +# class Foo +# +# def bar +# # ... +# end +# +# end +# +# @example EnforcedStyle: empty_lines_except_namespace +# # good +# +# class Foo +# class Bar +# +# # ... +# +# end +# end +# +# @example EnforcedStyle: empty_lines_special +# # good +# class Foo +# +# def bar; end +# +# end +# +# @example EnforcedStyle: beginning_only +# # good +# +# class Foo +# +# def bar +# # ... +# end +# end +# +# @example EnforcedStyle: ending_only +# # good +# +# class Foo +# def bar +# # ... +# end +# +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_class_body.rb:81 +class RuboCop::Cop::Layout::EmptyLinesAroundClassBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_class_body.rb:87 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_class_body.rb:93 + def on_sclass(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_class_body.rb:85 +RuboCop::Cop::Layout::EmptyLinesAroundClassBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines exist around the bodies of `begin` +# sections. This cop doesn't check empty lines at `begin` body +# beginning/end and around method definition body. +# `Layout/EmptyLinesAroundBeginBody` or `Layout/EmptyLinesAroundMethodBody` +# can be used for this purpose. +# +# @example +# +# # good +# +# begin +# do_something +# rescue +# do_something2 +# else +# do_something3 +# ensure +# do_something4 +# end +# +# # good +# +# def foo +# do_something +# rescue +# do_something2 +# end +# +# # bad +# +# begin +# do_something +# +# rescue +# +# do_something2 +# +# else +# +# do_something3 +# +# ensure +# +# do_something4 +# end +# +# # bad +# +# def foo +# do_something +# +# rescue +# +# do_something2 +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:61 +class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:71 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:67 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:70 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:74 + def on_kwbegin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:72 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:80 + def check_body(body, line_of_def_or_kwbegin); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:112 + def keyword_locations(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:129 + def keyword_locations_in_ensure(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:125 + def keyword_locations_in_rescue(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:95 + def last_body_and_end_on_same_line?(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:104 + def message(location, keyword); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:108 + def style; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:65 +RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords::MSG = T.let(T.unsafe(nil), String) + +# Checks if empty lines exist around the bodies of methods. +# +# @example +# +# # good +# +# def foo +# # ... +# end +# +# # bad +# +# def bar +# +# # ... +# +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_method_body.rb:23 +class RuboCop::Cop::Layout::EmptyLinesAroundMethodBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_method_body.rb:29 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_method_body.rb:39 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_method_body.rb:47 + def offending_endless_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_method_body.rb:52 + def register_offense_for_endless_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_method_body.rb:43 + def style; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_method_body.rb:27 +RuboCop::Cop::Layout::EmptyLinesAroundMethodBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of modules match +# the configuration. +# +# @example EnforcedStyle: no_empty_lines (default) +# # bad +# module Foo +# +# def bar +# # ... +# end +# +# end +# +# # good +# module Foo +# def bar +# # ... +# end +# end +# +# @example EnforcedStyle: empty_lines +# # bad +# module Foo +# def bar +# # ... +# end +# end +# +# # good +# module Foo +# +# def bar +# # ... +# end +# +# end +# +# @example EnforcedStyle: empty_lines_except_namespace +# # good +# +# module Foo +# module Bar +# +# # ... +# +# end +# end +# +# @example EnforcedStyle: empty_lines_special +# # good +# module Foo +# +# def bar; end +# +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_module_body.rb:61 +class RuboCop::Cop::Layout::EmptyLinesAroundModuleBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_module_body.rb:67 + def on_module(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_module_body.rb:65 +RuboCop::Cop::Layout::EmptyLinesAroundModuleBody::KIND = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords are aligned properly. +# +# Three modes are supported through the `EnforcedStyleAlignWith` +# configuration parameter: +# +# If it's set to `keyword` (which is the default), the `end` +# shall be aligned with the start of the keyword (if, class, etc.). +# +# If it's set to `variable` the `end` shall be aligned with the +# left-hand-side of the variable assignment, if there is one. +# +# If it's set to `start_of_line`, the `end` shall be aligned with the +# start of the line where the matching keyword appears. +# +# This `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) +# by default. On the other hand, `Layout/BeginEndAlignment` cop aligns with +# `EnforcedStyleAlignWith: start_of_line` by default due to `||= begin` tends +# to align with the start of the line. `Layout/DefEndAlignment` cop also aligns with +# `EnforcedStyleAlignWith: start_of_line` by default. +# These style can be configured by each cop. +# +# @example EnforcedStyleAlignWith: keyword (default) +# # bad +# +# variable = if true +# end +# +# # good +# +# variable = if true +# end +# +# variable = +# if true +# end +# +# @example EnforcedStyleAlignWith: variable +# # bad +# +# variable = if true +# end +# +# # good +# +# variable = if true +# end +# +# variable = +# if true +# end +# +# @example EnforcedStyleAlignWith: start_of_line +# # bad +# +# variable = if true +# end +# +# puts(if true +# end) +# +# # good +# +# variable = if true +# end +# +# puts(if true +# end) +# +# variable = +# if true +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:77 +class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:111 + def on_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:118 + def on_case_match(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:83 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:99 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:95 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:87 + def on_sclass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:107 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:103 + def on_while(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:174 + def alignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:191 + def alignment_node_for_variable_style(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:155 + def asgn_variable_align_with(outer_node, inner_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:209 + def assignment_or_operator_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:122 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:144 + def check_asgn_alignment(outer_node, inner_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:127 + def check_assignment(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:165 + def check_other_alignment(node); end +end + +# Checks for Windows-style line endings in the source code. +# +# @example EnforcedStyle: native (default) +# # The `native` style means that CR+LF (Carriage Return + Line Feed) is +# # enforced on Windows, and LF is enforced on other platforms. +# +# # bad +# puts 'Hello' # Return character is LF on Windows. +# puts 'Hello' # Return character is CR+LF on other than Windows. +# +# # good +# puts 'Hello' # Return character is CR+LF on Windows. +# puts 'Hello' # Return character is LF on other than Windows. +# +# @example EnforcedStyle: lf +# # The `lf` style means that LF (Line Feed) is enforced on +# # all platforms. +# +# # bad +# puts 'Hello' # Return character is CR+LF on all platforms. +# +# # good +# puts 'Hello' # Return character is LF on all platforms. +# +# @example EnforcedStyle: crlf +# # The `crlf` style means that CR+LF (Carriage Return + Line Feed) is +# # enforced on all platforms. +# +# # bad +# puts 'Hello' # Return character is LF on all platforms. +# +# # good +# puts 'Hello' # Return character is CR+LF on all platforms. +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/end_of_line.rb:40 +class RuboCop::Cop::Layout::EndOfLine < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_of_line.rb:71 + def offense_message(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_of_line.rb:47 + def on_new_investigation; end + + # If there is no LF on the last line, we don't care if there's no CR. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_of_line.rb:67 + def unimportant_missing_cr?(index, last_line, line); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_of_line.rb:85 + def last_line(processed_source); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/end_of_line.rb:44 +RuboCop::Cop::Layout::EndOfLine::MSG_DETECTED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/end_of_line.rb:45 +RuboCop::Cop::Layout::EndOfLine::MSG_MISSING = T.let(T.unsafe(nil), String) + +# Checks for extra/unnecessary whitespace. +# +# @example +# +# # good if AllowForAlignment is true +# name = "RuboCop" +# # Some comment and an empty line +# +# website += "/rubocop/rubocop" unless cond +# puts "rubocop" if debug +# +# # bad for any configuration +# set_app("RuboCop") +# website = "https://github.com/rubocop/rubocop" +# +# # good only if AllowBeforeTrailingComments is true +# object.method(arg) # this is a comment +# +# # good even if AllowBeforeTrailingComments is false or not set +# object.method(arg) # this is a comment +# +# # good with either AllowBeforeTrailingComments or AllowForAlignment +# object.method(arg) # this is a comment +# another_object.method(arg) # this is another comment +# some_object.method(arg) # this is some comment +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:31 +class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:39 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:170 + def align_column(asgn_token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:147 + def align_equal_sign(corrector, token, align_to); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:137 + def align_equal_signs(range, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:52 + def aligned_locations(locs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:103 + def aligned_tok?(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:159 + def all_relevant_assignment_lines(line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:179 + def allow_for_trailing_comments?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:72 + def check_assignment(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:81 + def check_other(token1, token2, ast); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:62 + def check_tokens(ast, token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:91 + def extra_space_range(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:133 + def force_equal_sign_alignment?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:111 + def ignored_range?(ast, start_pos); end + + # Returns an array of ranges that should not be reported. It's the + # extra spaces between the keys and values in a multiline hash, + # since those are handled by the Layout/HashAlignment cop. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:118 + def ignored_ranges(ast); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:37 +RuboCop::Cop::Layout::ExtraSpacing::MSG_UNALIGNED_ASGN = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:36 +RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first argument in a method call. +# Arguments after the first one are checked by `Layout/ArgumentAlignment`, +# not by this cop. +# +# For indenting the first parameter of method _definitions_, check out +# `Layout/FirstParameterIndentation`. +# +# This cop will respect `Layout/ArgumentAlignment` and will not work when +# `EnforcedStyle: with_fixed_indentation` is specified for `Layout/ArgumentAlignment`. +# +# @example +# +# # bad +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# +# @example EnforcedStyle: special_for_inner_method_call_in_parentheses (default) +# # Same as `special_for_inner_method_call` except that the special rule +# # only applies if the outer method call encloses its arguments in +# # parentheses. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# +# @example EnforcedStyle: consistent +# # The first argument should always be indented one step more than the +# # preceding line. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# +# @example EnforcedStyle: consistent_relative_to_receiver +# # The first argument should always be indented one level relative to +# # the parent that is receiving the argument +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_params +# +# @example EnforcedStyle: special_for_inner_method_call +# # The first argument should normally be indented one step more than +# # the preceding line, but if it's an argument for a method call that +# # is itself an argument in a method call, then the inner argument +# # should be indented relative to the inner method. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:147 +class RuboCop::Cop::Layout::FirstArgumentIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:255 + def eligible_method_call?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:165 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:155 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:166 + def on_super(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:174 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:211 + def bare_operator?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:231 + def base_indentation(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:259 + def base_range(send_node, arg_node); end + + # Returns the column of the given range. For single line ranges, this + # is simple. For ranges with line breaks, we look a the last code line. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:271 + def column_of(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:292 + def comment_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:309 + def enable_layout_first_method_argument_line_break?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:304 + def enforce_first_argument_with_fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:201 + def find_top_level_send(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:195 + def inner_call?(top_level_send); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:215 + def message(arg_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:300 + def on_new_investigation; end + + # Takes the line number of a given code line and returns a string + # containing the previous line that's not a comment line or a blank + # line. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:283 + def previous_code_line(line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:170 + def should_check?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:187 + def should_correct_entire_chain?(send_node, top_level_send); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:239 + def special_inner_call_indentation?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:153 +RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first element in an array literal +# where the opening bracket and the first element are on separate lines. +# The other elements' indentations are handled by `Layout/ArrayAlignment` cop. +# +# This cop will respect `Layout/ArrayAlignment` and will not work when +# `EnforcedStyle: with_fixed_indentation` is specified for `Layout/ArrayAlignment`. +# +# By default, array literals that are arguments in a method call with +# parentheses, and where the opening square bracket of the array is on the +# same line as the opening parenthesis of the method call, shall have +# their first element indented one step (two spaces) more than the +# position inside the opening parenthesis. +# +# Other array literals shall have their first element indented one step +# more than the start of the line where the opening square bracket is. +# +# This default style is called 'special_inside_parentheses'. Alternative +# styles are 'consistent' and 'align_brackets'. Here are examples: +# +# @example EnforcedStyle: special_inside_parentheses (default) +# # The `special_inside_parentheses` style enforces that the first +# # element in an array literal where the opening bracket and first +# # element are on separate lines is indented one step (two spaces) more +# # than the position inside the opening parenthesis. +# +# # bad +# array = [ +# :value +# ] +# and_in_a_method_call([ +# :no_difference +# ]) +# +# # good +# array = [ +# :value +# ] +# but_in_a_method_call([ +# :its_like_this +# ]) +# +# @example EnforcedStyle: consistent +# # The `consistent` style enforces that the first element in an array +# # literal where the opening bracket and the first element are on +# # separate lines is indented the same as an array literal which is not +# # defined inside a method call. +# +# # bad +# array = [ +# :value +# ] +# but_in_a_method_call([ +# :its_like_this +# ]) +# +# # good +# array = [ +# :value +# ] +# and_in_a_method_call([ +# :no_difference +# ]) +# +# @example EnforcedStyle: align_brackets +# # The `align_brackets` style enforces that the opening and closing +# # brackets are indented to the same position. +# +# # bad +# and_now_for_something = [ +# :completely_different +# ] +# +# # good +# and_now_for_something = [ +# :completely_different +# ] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:82 +class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:91 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:104 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:97 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:108 + def autocorrect(corrector, node); end + + # Returns the description of what the correct indentation is based on. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:146 + def base_description(indent_base_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:112 + def brace_alignment_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:116 + def check(array_node, left_parenthesis); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:130 + def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:182 + def enforce_first_argument_with_fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:159 + def message(base_description); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:167 + def message_for_right_bracket(indent_base_type); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:88 +RuboCop::Cop::Layout::FirstArrayElementIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first element in a +# multi-line array. +# +# @example +# +# # bad +# [ :a, +# :b] +# +# # good +# [ +# :a, +# :b] +# +# # good +# [:a, :b] +# +# @example AllowImplicitArrayLiterals: false (default) +# +# # bad +# a = b, +# c +# +# # good +# a = +# b, +# c +# +# @example AllowImplicitArrayLiterals: true +# +# # good +# a = b, +# c +# +# a = +# b, +# c +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# [ :a, { +# :b => :c +# }] +# +# # good +# [ +# :a, { +# :b => :c +# }] +# +# @example AllowMultilineFinalElement: true +# +# # good +# [:a, { +# :b => :c +# }] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_line_break.rb:64 +class RuboCop::Cop::Layout::FirstArrayElementLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_line_break.rb:70 + def on_array(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_line_break.rb:84 + def allow_implicit_array_brackets?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_line_break.rb:79 + def assignment_on_same_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_line_break.rb:88 + def ignore_last_element?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_line_break.rb:68 +RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first key in a hash literal +# where the opening brace and the first key are on separate lines. The +# other keys' indentations are handled by the HashAlignment cop. +# +# By default, `Hash` literals that are arguments in a method call with +# parentheses, and where the opening curly brace of the hash is on the +# same line as the opening parenthesis of the method call, shall have +# their first key indented one step (two spaces) more than the position +# inside the opening parenthesis. +# +# Other hash literals shall have their first key indented one step more +# than the start of the line where the opening curly brace is. +# +# This default style is called 'special_inside_parentheses'. Alternative +# styles are 'consistent' and 'align_braces'. Here are examples: +# +# @example EnforcedStyle: special_inside_parentheses (default) +# # The `special_inside_parentheses` style enforces that the first key +# # in a hash literal where the opening brace and the first key are on +# # separate lines is indented one step (two spaces) more than the +# # position inside the opening parentheses. +# +# # bad +# hash = { +# key: :value +# } +# and_in_a_method_call({ +# no: :difference +# }) +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# # good +# special_inside_parentheses +# hash = { +# key: :value +# } +# but_in_a_method_call({ +# its_like: :this +# }) +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# @example EnforcedStyle: consistent +# # The `consistent` style enforces that the first key in a hash +# # literal where the opening brace and the first key are on +# # separate lines is indented the same as a hash literal which is not +# # defined inside a method call. +# +# # bad +# hash = { +# key: :value +# } +# but_in_a_method_call({ +# its_like: :this +# }) +# +# # good +# hash = { +# key: :value +# } +# and_in_a_method_call({ +# no: :difference +# }) +# +# +# @example EnforcedStyle: align_braces +# # The `align_brackets` style enforces that the opening and closing +# # braces are indented to the same position. +# +# # bad +# and_now_for_something = { +# completely: :different +# } +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# # good +# and_now_for_something = { +# completely: :different +# } +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:113 +class RuboCop::Cop::Layout::FirstHashElementIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:133 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:122 + def on_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:126 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:137 + def autocorrect(corrector, node); end + + # Returns the description of what the correct indentation is based on. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:197 + def base_description(indent_base_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:147 + def brace_alignment_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:151 + def check(hash_node, left_parenthesis); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:190 + def check_based_on_longest_key(hash_node, left_brace, left_parenthesis); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:170 + def check_right_brace(right_brace, first_pair, left_brace, left_parenthesis); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:233 + def enforce_first_argument_with_fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:210 + def message(base_description); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:218 + def message_for_right_brace(indent_base_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:184 + def separator_style?(first_pair); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:119 +RuboCop::Cop::Layout::FirstHashElementIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first element in a +# multi-line hash. +# +# @example +# +# # bad +# { a: 1, +# b: 2} +# +# # good +# { +# a: 1, +# b: 2 } +# +# # good +# { +# a: 1, b: { +# c: 3 +# }} +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# { a: 1, b: { +# c: 3 +# }} +# +# @example AllowMultilineFinalElement: true +# +# # bad +# { a: 1, +# b: { +# c: 3 +# }} +# +# # good +# { a: 1, b: { +# c: 3 +# }} +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_line_break.rb:46 +class RuboCop::Cop::Layout::FirstHashElementLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_line_break.rb:52 + def on_hash(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_line_break.rb:62 + def ignore_last_element?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_line_break.rb:50 +RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first argument in a +# multi-line method call. +# +# @example +# +# # bad +# method(foo, bar, +# baz) +# +# # good +# method( +# foo, bar, +# baz) +# +# # ignored +# method foo, bar, +# baz +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# method(foo, bar, { +# baz: "a", +# qux: "b", +# }) +# +# # good +# method( +# foo, bar, { +# baz: "a", +# qux: "b", +# }) +# +# @example AllowMultilineFinalElement: true +# +# # bad +# method(foo, +# bar, +# { +# baz: "a", +# qux: "b", +# } +# ) +# +# # good +# method(foo, bar, { +# baz: "a", +# qux: "b", +# }) +# +# # good +# method( +# foo, +# bar, +# { +# baz: "a", +# qux: "b", +# } +# ) +# +# @example AllowedMethods: ['some_method'] +# +# # good +# some_method(foo, bar, +# baz) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_argument_line_break.rb:71 +class RuboCop::Cop::Layout::FirstMethodArgumentLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_argument_line_break.rb:94 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_argument_line_break.rb:78 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_argument_line_break.rb:95 + def on_super(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_argument_line_break.rb:99 + def ignore_last_element?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_argument_line_break.rb:76 +RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first parameter in a +# multi-line method parameter definition. +# +# @example +# +# # bad +# def method(foo, bar, +# baz) +# do_something +# end +# +# # good +# def method( +# foo, bar, +# baz) +# do_something +# end +# +# # ignored +# def method foo, +# bar +# do_something +# end +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# def method(foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# +# # good +# def method( +# foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# +# @example AllowMultilineFinalElement: true +# +# # good +# def method(foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_parameter_line_break.rb:56 +class RuboCop::Cop::Layout::FirstMethodParameterLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_parameter_line_break.rb:62 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_parameter_line_break.rb:65 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_parameter_line_break.rb:69 + def ignore_last_element?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_parameter_line_break.rb:60 +RuboCop::Cop::Layout::FirstMethodParameterLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first parameter in a method +# definition. Parameters after the first one are checked by +# `Layout/ParameterAlignment`, not by this cop. +# +# For indenting the first argument of method _calls_, check out +# `Layout/FirstArgumentIndentation`, which supports options related to +# nesting that are irrelevant for method _definitions_. +# +# @example +# +# # bad +# def some_method( +# first_param, +# second_param) +# 123 +# end +# +# @example EnforcedStyle: consistent (default) +# # The first parameter should always be indented one step more than the +# # preceding line. +# +# # good +# def some_method( +# first_param, +# second_param) +# 123 +# end +# +# @example EnforcedStyle: align_parentheses +# # The first parameter should always be indented one step more than the +# # opening parenthesis. +# +# # good +# def some_method( +# first_param, +# second_param) +# 123 +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:44 +class RuboCop::Cop::Layout::FirstParameterIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:53 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:59 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:63 + def autocorrect(corrector, node); end + + # Returns the description of what the correct indentation is based on. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:83 + def base_description(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:67 + def brace_alignment_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:71 + def check(def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:91 + def message(base_description); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:50 +RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks that the keys, separators, and values of a multi-line hash +# literal are aligned according to configuration. The configuration +# options are: +# +# * key (left align keys, one space before hash rockets and values) +# * separator (align hash rockets and colons, right align keys) +# * table (left align keys, hash rockets, and values) +# +# The treatment of hashes passed as the last argument to a method call +# can also be configured. The options are: +# +# * always_inspect +# * always_ignore +# * ignore_implicit (without curly braces) +# +# Alternatively you can specify multiple allowed styles. That's done by +# passing a list of styles to EnforcedHashRocketStyle and EnforcedColonStyle. +# +# @example EnforcedHashRocketStyle: key (default) +# # bad +# { +# :foo => bar, +# :ba => baz +# } +# { +# :foo => bar, +# :ba => baz +# } +# +# # good +# { +# :foo => bar, +# :ba => baz +# } +# +# @example EnforcedHashRocketStyle: separator +# # bad +# { +# :foo => bar, +# :ba => baz +# } +# { +# :foo => bar, +# :ba => baz +# } +# +# # good +# { +# :foo => bar, +# :ba => baz +# } +# +# @example EnforcedHashRocketStyle: table +# # bad +# { +# :foo => bar, +# :ba => baz +# } +# +# # good +# { +# :foo => bar, +# :ba => baz +# } +# +# @example EnforcedColonStyle: key (default) +# # bad +# { +# foo: bar, +# ba: baz +# } +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# +# @example EnforcedColonStyle: separator +# # bad +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# +# @example EnforcedColonStyle: table +# # bad +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# +# @example EnforcedLastArgumentHashStyle: always_inspect (default) +# # Inspect both implicit and explicit hashes. +# +# # bad +# do_something(foo: 1, +# bar: 2) +# +# # bad +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something( +# foo: 1, +# bar: 2 +# ) +# +# # good +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something({ +# foo: 1, +# bar: 2 +# }) +# +# @example EnforcedLastArgumentHashStyle: always_ignore +# # Ignore both implicit and explicit hashes. +# +# # good +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something({foo: 1, +# bar: 2}) +# +# @example EnforcedLastArgumentHashStyle: ignore_implicit +# # Ignore only implicit hashes. +# +# # bad +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something(foo: 1, +# bar: 2) +# +# @example EnforcedLastArgumentHashStyle: ignore_explicit +# # Ignore only explicit hashes. +# +# # bad +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something({foo: 1, +# bar: 2}) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:178 +class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::HashAlignmentStyles + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:218 + def column_deltas; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:218 + def column_deltas=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:218 + def offenses_by; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:218 + def offenses_by=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:204 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:208 + def on_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:195 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:205 + def on_super(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:206 + def on_yield(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:264 + def add_offenses; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:370 + def adjust(corrector, delta, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:299 + def alignment_for(pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:313 + def alignment_for_colons; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:309 + def alignment_for_hash_rockets; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:234 + def argument_before_hash(hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:222 + def autocorrect_incompatible_with_other_cops?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:282 + def check_delta(delta, node:, alignment:); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:245 + def check_pairs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:336 + def correct_key_value(corrector, delta, key, value, separator); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:332 + def correct_no_value(corrector, key_delta, key); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:317 + def correct_node(corrector, node, delta); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:383 + def enforce_first_argument_with_fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:379 + def good_alignment?(column_deltas); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:290 + def ignore_hash_argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:352 + def new_alignment(key); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:272 + def register_offenses_with_format(offenses, format); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:240 + def reset!; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:388 + def same_line?(node1, node2); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:183 +RuboCop::Cop::Layout::HashAlignment::MESSAGES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:193 +RuboCop::Cop::Layout::HashAlignment::SEPARATOR_ALIGNMENT_STYLES = T.let(T.unsafe(nil), Array) + +# Checks for the placement of the closing parenthesis +# in a method call that passes a HEREDOC string as an argument. +# It should be placed at the end of the line containing the +# opening HEREDOC tag. +# +# @example +# # bad +# +# foo(<<-SQL +# bar +# SQL +# ) +# +# foo(<<-SQL, 123, <<-NOSQL, +# bar +# SQL +# baz +# NOSQL +# ) +# +# foo( +# bar(<<-SQL +# baz +# SQL +# ), +# 123, +# ) +# +# # good +# +# foo(<<-SQL) +# bar +# SQL +# +# foo(<<-SQL, 123, <<-NOSQL) +# bar +# SQL +# baz +# NOSQL +# +# foo( +# bar(<<-SQL), +# baz +# SQL +# 123, +# ) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:53 +class RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:78 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:64 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:185 + def add_correct_closing_paren(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:272 + def add_correct_external_trailing_comma(node, corrector); end + + # Autocorrection note: + # + # Commas are a bit tricky to handle when the method call is + # embedded in another expression. Here's an example: + # + # [ + # first_array_value, + # foo(<<-SQL, 123, 456, + # SELECT * FROM db + # SQL + # ), + # third_array_value, + # ] + # + # The "internal" trailing comma is after `456`. + # The "external" trailing comma is after `)`. + # + # To autocorrect, we remove the latter, and move the former up: + # + # [ + # first_array_value, + # foo(<<-SQL, 123, 456), + # SELECT * FROM db + # SQL + # third_array_value, + # ] + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:108 + def autocorrect(corrector, node); end + + # Closing parenthesis helpers. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:163 + def end_keyword_before_closing_parenthesis?(parenthesized_send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:223 + def exist_argument_between_heredoc_end_and_closing_parentheses?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:290 + def external_trailing_comma?(node); end + + # Returns nil if no trailing external comma. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:295 + def external_trailing_comma_offset_from_loc_end(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:138 + def extract_heredoc(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:134 + def extract_heredoc_argument(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:231 + def find_most_bottom_of_heredoc_end(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:180 + def fix_closing_parenthesis(node, corrector); end + + # External trailing comma helpers. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:267 + def fix_external_trailing_comma(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:150 + def heredoc_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:198 + def incorrect_parenthesis_removal_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:214 + def incorrect_parenthesis_removal_end(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:245 + def internal_trailing_comma?(node); end + + # Returns nil if no trailing internal comma. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:250 + def internal_trailing_comma_offset_from_last_arg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:116 + def outermost_send_on_same_line(heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:189 + def remove_incorrect_closing_paren(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:278 + def remove_incorrect_external_trailing_comma(node, corrector); end + + # Internal trailing comma helpers. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:239 + def remove_internal_trailing_comma(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:208 + def safe_to_remove_line_containing_closing_paren?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:127 + def send_missing_closing_parens?(parent, child, heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:154 + def single_line_send_with_heredoc_receiver?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:306 + def space?(pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:169 + def subsequent_closing_parentheses_in_same_line?(outermost_send); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:60 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:57 +RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the here document bodies. The bodies +# are indented one step. +# +# NOTE: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default), +# this cop does not add any offenses for long here documents to +# avoid ``Layout/LineLength``'s offenses. +# +# @example +# # bad +# <<-RUBY +# something +# RUBY +# +# # good +# <<~RUBY +# something +# RUBY +# +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # good +# <<-RUBY.squish +# something +# RUBY +# +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # bad +# <<-RUBY.squish +# something +# RUBY +# +# # good +# <<~RUBY.squish +# something +# RUBY +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:41 +class RuboCop::Cop::Layout::HeredocIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:58 + def on_heredoc(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:54 + def squish_method?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:136 + def adjust_heredoc_squish(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:146 + def adjust_minus(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:141 + def adjust_squiggly(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:170 + def base_indent_level(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:181 + def heredoc_body(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:185 + def heredoc_end(node); end + + # Returns '~', '-' or nil + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:177 + def heredoc_indent_type(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:189 + def heredoc_squish?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:152 + def indented_body(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:159 + def indented_end(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:115 + def line_too_long?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:128 + def longest_line(lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:93 + def message(heredoc_indent_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:79 + def register_offense(node, heredoc_indent_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:103 + def type_message(indentation_width, current_indent_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:132 + def unlimited_heredoc_length?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:111 + def width_message(indentation_width); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:49 +RuboCop::Cop::Layout::HeredocIndentation::TYPE_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:51 +RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), String) + +# Checks for inconsistent indentation. +# +# The difference between `indented_internal_methods` and `normal` is +# that the `indented_internal_methods` style prescribes that in +# classes and modules the `protected` and `private` modifier keywords +# shall be indented the same as public methods and that protected and +# private members shall be indented one step more than the modifiers. +# Other than that, both styles mean that entities on the same logical +# depth shall have the same indentation. +# +# @example EnforcedStyle: normal (default) +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# @example EnforcedStyle: indented_internal_methods +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:121 +class RuboCop::Cop::Layout::IndentationConsistency < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:128 + def on_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:132 + def on_kwbegin(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:138 + def autocorrect(corrector, node); end + + # Not all nodes define `bare_access_modifier?` (for example, + # `RuboCop::AST::DefNode` does not), so we must check `send_type?` first + # to avoid a NoMethodError. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:145 + def bare_access_modifier?(node); end + + # Returns an integer representing the correct indentation, or nil to + # indicate that the correct indentation is that of the first child that + # is not an access modifier. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:152 + def base_column_for_normal_style(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:172 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:187 + def check_indented_internal_methods_style(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:180 + def check_normal_style(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:126 +RuboCop::Cop::Layout::IndentationConsistency::MSG = T.let(T.unsafe(nil), String) + +# Checks that the indentation method is consistent. +# Either tabs only or spaces only are used for indentation. +# +# @example EnforcedStyle: spaces (default) +# # bad +# # This example uses a tab to indent bar. +# def foo +# bar +# end +# +# # good +# # This example uses spaces to indent bar. +# def foo +# bar +# end +# +# @example EnforcedStyle: tabs +# # bad +# # This example uses spaces to indent bar. +# def foo +# bar +# end +# +# # good +# # This example uses a tab to indent bar. +# def foo +# bar +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:34 +class RuboCop::Cop::Layout::IndentationStyle < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:42 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:58 + def autocorrect(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:82 + def autocorrect_lambda_for_spaces(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:77 + def autocorrect_lambda_for_tabs(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:66 + def find_offense(line, lineno); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:88 + def in_string_literal?(ranges, tabs_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:109 + def message(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:92 + def string_literal_ranges(ast); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:40 +RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) + +# Checks for indentation that doesn't use the specified number of spaces. +# The indentation width can be configured using the `Width` setting. The default width is 2. +# The block body indentation for method chain blocks can be configured using the +# `EnforcedStyleAlignWith` setting. +# +# See also the `Layout/IndentationConsistency` cop which is the companion to this one. +# +# @example Width: 2 (default) +# # bad +# class A +# def test +# puts 'hello' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# end +# end +# +# @example AllowedPatterns: ['^\s*module'] +# # bad +# module A +# class B +# def test +# puts 'hello' +# end +# end +# end +# +# # good +# module A +# class B +# def test +# puts 'hello' +# end +# end +# end +# +# @example EnforcedStyleAlignWith: start_of_line (default) +# # good +# records.uniq { |el| el[:profile_id] } +# .map do |message| +# SomeJob.perform_later(message[:id]) +# end +# +# @example EnforcedStyleAlignWith: relative_to_receiver +# # good +# records.uniq { |el| el[:profile_id] } +# .map do |message| +# SomeJob.perform_later(message[:id]) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:60 +class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:73 + def access_modifier?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:98 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:158 + def on_case(case_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:166 + def on_case_match(case_match); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:115 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:139 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:141 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:146 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:86 + def on_ensure(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:84 + def on_for(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:176 + def on_if(node, base = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:113 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:90 + def on_kwbegin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:122 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:112 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:81 + def on_resbody(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:77 + def on_rescue(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:121 + def on_sclass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:124 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:156 + def on_until(node, base = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:148 + def on_while(node, base = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:249 + def access_modifier_indentation_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:185 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:475 + def block_body_indentation_base(node, end_loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:257 + def check_assignment(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:277 + def check_if(node, body, else_clause, base_loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:290 + def check_indentation(base_loc, body_node, style = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:191 + def check_members(base, members); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:215 + def check_members_for_indented_internal_methods_style(members); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:221 + def check_members_for_normal_style(base, members); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:384 + def check_rescue?(rescue_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:440 + def column_offset_between(base_range, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:426 + def contains_access_modifier?(body_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:483 + def dot_on_new_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:229 + def each_member(members); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:253 + def indentation_consistency_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:432 + def indentation_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:367 + def indentation_to_check?(base_loc, body_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:241 + def indented_internal_methods_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:469 + def leftmost_modifier_of(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:451 + def line_indentation(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:456 + def line_uses_tabs?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:324 + def message(configured_indentation_width, indentation, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:345 + def message_for_spaces(configured_indentation_width, indentation, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:332 + def message_for_tabs(configured_indentation_width, indentation, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:403 + def offending_range(body_node, indentation); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:300 + def offense(body_node, indentation, style); end + + # Returns true if the given node is within another node that has + # already been marked for autocorrection by this cop. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:357 + def other_offense_in_same_range?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:203 + def select_check_member(member); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:388 + def skip_check?(base_loc, body_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:245 + def special_modifier?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:417 + def starts_with_access_modifier?(body_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:436 + def using_tabs?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:460 + def visual_column(range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:69 +RuboCop::Cop::Layout::IndentationWidth::MSG = T.let(T.unsafe(nil), String) + +# Checks for indentation of the first non-blank non-comment +# line in a file. +# +# @example +# # bad +# class A +# def foo; end +# end +# +# # good +# class A +# def foo; end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/initial_indentation.rb:20 +class RuboCop::Cop::Layout::InitialIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/initial_indentation.rb:26 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/initial_indentation.rb:36 + def first_token; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/initial_indentation.rb:40 + def space_before(token); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/initial_indentation.rb:24 +RuboCop::Cop::Layout::InitialIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks whether comments have a leading space after the +# `#` denoting the start of the comment. The leading space is not +# required for some RDoc special syntax, like `#++`, `#--`, +# `#:nodoc`, `=begin`- and `=end` comments, "shebang" directives, +# or rackup options. +# +# @example +# +# # bad +# #Some comment +# +# # good +# # Some comment +# +# @example AllowDoxygenCommentStyle: false (default) +# +# # bad +# +# #** +# # Some comment +# # Another line of comment +# #* +# +# @example AllowDoxygenCommentStyle: true +# +# # good +# +# #** +# # Some comment +# # Another line of comment +# #* +# +# @example AllowGemfileRubyComment: false (default) +# +# # bad +# +# #ruby=2.7.0 +# #ruby-gemset=myproject +# +# @example AllowGemfileRubyComment: true +# +# # good +# +# #ruby=2.7.0 +# #ruby-gemset=myproject +# +# @example AllowRBSInlineAnnotation: false (default) +# +# # bad +# +# include Enumerable #[Integer] +# +# attr_reader :name #: String +# attr_reader :age #: Integer? +# +# #: ( +# #| Integer, +# #| String +# #| ) -> void +# def foo; end +# +# @example AllowRBSInlineAnnotation: true +# +# # good +# +# include Enumerable #[Integer] +# +# attr_reader :name #: String +# attr_reader :age #: Integer? +# +# #: ( +# #| Integer, +# #| String +# #| ) -> void +# def foo; end +# +# @example AllowSteepAnnotation: false (default) +# +# # bad +# [1, 2, 3].each_with_object([]) do |n, list| #$ Array[Integer] +# list << n +# end +# +# name = 'John' #: String +# +# @example AllowSteepAnnotation: true +# +# # good +# +# [1, 2, 3].each_with_object([]) do |n, list| #$ Array[Integer] +# list << n +# end +# +# name = 'John' #: String +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:101 +class RuboCop::Cop::Layout::LeadingCommentSpace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:107 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:161 + def allow_doxygen_comment?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:169 + def allow_gemfile_ruby_comment?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:185 + def allow_rbs_inline_annotation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:193 + def allow_steep_annotation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:131 + def allowed_on_first_line?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:165 + def doxygen_comment_style?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:173 + def gemfile?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:181 + def gemfile_ruby_comment?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:127 + def hash_mark(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:157 + def rackup_config_file?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:153 + def rackup_options?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:189 + def rbs_inline_annotation?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:177 + def ruby_comment_in_gemfile?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:135 + def shebang?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:139 + def shebang_continuation?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:197 + def steep_annotation?(comment); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:105 +RuboCop::Cop::Layout::LeadingCommentSpace::MSG = T.let(T.unsafe(nil), String) + +# Checks for unnecessary leading blank lines at the beginning +# of a file. +# +# @example +# +# # bad +# # (start of file) +# +# class Foo +# end +# +# # bad +# # (start of file) +# +# # a comment +# +# # good +# # (start of file) +# class Foo +# end +# +# # good +# # (start of file) +# # a comment +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/leading_empty_lines.rb:30 +class RuboCop::Cop::Layout::LeadingEmptyLines < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_empty_lines.rb:35 + def on_new_investigation; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/leading_empty_lines.rb:33 +RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String) + +# Checks that strings broken over multiple lines (by a backslash) contain +# trailing spaces instead of leading spaces (default) or leading spaces +# instead of trailing spaces. +# +# @example EnforcedStyle: trailing (default) +# # bad +# 'this text contains a lot of' \ +# ' spaces' +# +# # good +# 'this text contains a lot of ' \ +# 'spaces' +# +# # bad +# 'this text is too' \ +# ' long' +# +# # good +# 'this text is too ' \ +# 'long' +# +# @example EnforcedStyle: leading +# # bad +# 'this text contains a lot of ' \ +# 'spaces' +# +# # good +# 'this text contains a lot of' \ +# ' spaces' +# +# # bad +# 'this text is too ' \ +# 'long' +# +# # good +# 'this text is too' \ +# ' long' +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:43 +class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:63 + def on_dstr(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:122 + def autocorrect(corrector, offense_range, insert_pos, spaces); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:115 + def continuation?(line, line_num, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:147 + def enforced_style_leading?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:85 + def investigate(first_line, second_line, end_of_first_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:93 + def investigate_leading_style(first_line, second_line, end_of_first_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:104 + def investigate_trailing_style(first_line, second_line, end_of_first_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:127 + def leading_offense_range(end_of_first_line, matches); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:139 + def message(_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:81 + def raw_lines(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:133 + def trailing_offense_range(end_of_first_line, matches); end + + class << self + # When both cops are activated and run in the same iteration of the correction loop, + # `Style/StringLiterals` undoes the moving of spaces that + # `Layout/LineContinuationLeadingSpace` performs. This is because `Style/StringLiterals` + # takes the original string content and transforms it, rather than just modifying the + # delimiters, in order to handle escaping for quotes within the string. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:59 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:49 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LEADING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:47 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_1_ENDING = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:48 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_2_BEGINNING = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:50 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::TRAILING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp) + +# Checks that the backslash of a line continuation is separated from +# preceding text by exactly one space (default) or zero spaces. +# +# @example EnforcedStyle: space (default) +# # bad +# 'a'\ +# 'b' \ +# 'c' +# +# # good +# 'a' \ +# 'b' \ +# 'c' +# +# @example EnforcedStyle: no_space +# # bad +# 'a' \ +# 'b' \ +# 'c' +# +# # good +# 'a'\ +# 'b'\ +# 'c' +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:30 +class RuboCop::Cop::Layout::LineContinuationSpacing < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:34 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:81 + def autocorrect(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:111 + def comment_ranges(comments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:65 + def find_offensive_spacing(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:121 + def ignore_range?(backtick_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:91 + def ignored_literal_ranges(ast); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:130 + def ignored_parent?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:125 + def ignored_ranges; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:49 + def investigate(line, line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:115 + def last_line(processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:73 + def message(_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:136 + def no_space_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:140 + def space_style?; end +end + +# Checks the indentation of the next line after a line that ends with a string +# literal and a backslash. +# +# If `EnforcedStyle: aligned` is set, the concatenated string parts shall be aligned with the +# first part. There are some exceptions, such as implicit return values, where the +# concatenated string parts shall be indented regardless of `EnforcedStyle` configuration. +# +# If `EnforcedStyle: indented` is set, it's the second line that shall be indented one step +# more than the first line. Lines 3 and forward shall be aligned with line 2. +# +# @example +# # bad +# def some_method +# 'x' \ +# 'y' \ +# 'z' +# end +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# def some_method +# 'x' \ +# 'y' \ +# 'z' +# end +# +# @example EnforcedStyle: aligned (default) +# # bad +# puts 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# puts 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# @example EnforcedStyle: indented +# # bad +# result = 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# result = 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:74 +class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:97 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:83 + def on_dstr(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:137 + def add_offense_and_correction(node, message); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:109 + def always_indented?(dstr_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:128 + def base_column(child); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:113 + def check_aligned(children, start_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:122 + def check_indented(children); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:103 + def strings_concatenated_with_backslash?(dstr_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:79 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:80 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:81 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_INDENTED = T.let(T.unsafe(nil), Array) + +# Checks the length of lines in the source code. +# The maximum length is configurable. +# The tab size is configured in the `IndentationWidth` +# of the `Layout/IndentationStyle` cop. +# It also ignores a shebang line by default. +# +# This cop has some autocorrection capabilities. +# It can programmatically shorten certain long lines by +# inserting line breaks into expressions that can be safely +# split across lines. These include arrays, hashes, and +# method calls with argument lists. +# +# If autocorrection is enabled, the following cops +# are recommended to further format the broken lines. +# (Many of these are enabled by default.) +# +# * `Layout/ArgumentAlignment` +# * `Layout/ArrayAlignment` +# * `Layout/BlockAlignment` +# * `Layout/BlockEndNewline` +# * `Layout/ClosingParenthesisIndentation` +# * `Layout/FirstArgumentIndentation` +# * `Layout/FirstArrayElementIndentation` +# * `Layout/FirstHashElementIndentation` +# * `Layout/FirstParameterIndentation` +# * `Layout/HashAlignment` +# * `Layout/IndentationWidth` +# * `Layout/MultilineArrayLineBreaks` +# * `Layout/MultilineBlockLayout` +# * `Layout/MultilineHashBraceLayout` +# * `Layout/MultilineHashKeyLineBreaks` +# * `Layout/MultilineMethodArgumentLineBreaks` +# * `Layout/MultilineMethodParameterLineBreaks` +# * `Layout/ParameterAlignment` +# * `Style/BlockDelimiters` +# +# Together, these cops will pretty print hashes, arrays, +# method calls, etc. For example, let's say the max columns +# is 25: +# +# @example +# +# # bad +# {foo: "0000000000", bar: "0000000000", baz: "0000000000"} +# +# # good +# {foo: "0000000000", +# bar: "0000000000", baz: "0000000000"} +# +# # good (with recommended cops enabled) +# { +# foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000", +# } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:63 +class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckLineBreakable + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:70 + def max=(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:91 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:74 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:94 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:95 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:96 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:84 + def on_dstr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:92 + def on_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:104 + def on_investigation_end; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:78 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:98 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:77 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:88 + def on_potential_breakable_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:93 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:80 + def on_str(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:316 + def allow_heredoc?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:324 + def allow_string_split?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:391 + def allowed_combination?(line, uri_range, qualified_name_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:320 + def allowed_heredoc; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:272 + def allowed_line?(line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:182 + def breakable_block_range(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:403 + def breakable_dstr?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:231 + def breakable_dstr_begin_position(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:112 + def breakable_range; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:112 + def breakable_range=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:190 + def breakable_range_after_semicolon(semicolon_token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:236 + def breakable_range_by_line_index; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:173 + def breakable_string?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:240 + def breakable_string_delimiters; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:203 + def breakable_string_position(node); end + + # Locate where to break a string that is too long, ensuring that escape characters + # are not bisected. + # If the string contains spaces, use them to determine a place for a clean break; + # otherwise, the string will be broken at the line length limit. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:215 + def breakable_string_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:358 + def check_directive_line(line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:135 + def check_for_breakable_block(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:158 + def check_for_breakable_dstr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:114 + def check_for_breakable_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:127 + def check_for_breakable_semicolons(processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:146 + def check_for_breakable_str(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:256 + def check_line(line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:375 + def check_line_for_exemptions(line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:300 + def excess_range(uri_range, line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:328 + def extract_heredocs(ast); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:244 + def heredocs; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:248 + def highlight_start(line); end + + # Find the largest possible substring of a string node to retain before a break + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:419 + def largest_possible_string(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:347 + def line_in_heredoc?(line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:338 + def line_in_permitted_heredoc?(line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:311 + def max; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:314 + def max_line_length; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:385 + def range_if_applicable(line, type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:351 + def receiver_contains_heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:282 + def register_offense(loc, line, line_index, length: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:278 + def shebang?(line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:408 + def string_delimiter(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:72 +RuboCop::Cop::Layout::LineLength::MSG = T.let(T.unsafe(nil), String) + +# Checks that the closing brace in an array literal is either +# on the same line as the last array element or on a new line. +# +# When using the `symmetrical` (default) style: +# +# If an array's opening brace is on the same line as the first element +# of the array, then the closing brace should be on the same line as +# the last element of the array. +# +# If an array's opening brace is on the line above the first element +# of the array, then the closing brace should be on the line below +# the last element of the array. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line array literal must be on the line +# after the last element of the array. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line array literal must be on the same +# line as the last element of the array. +# +# @example EnforcedStyle: symmetrical (default) +# # bad +# [ :a, +# :b +# ] +# +# # bad +# [ +# :a, +# :b ] +# +# # good +# [ :a, +# :b ] +# +# # good +# [ +# :a, +# :b +# ] +# +# @example EnforcedStyle: new_line +# # bad +# [ +# :a, +# :b ] +# +# # bad +# [ :a, +# :b ] +# +# # good +# [ :a, +# :b +# ] +# +# # good +# [ +# :a, +# :b +# ] +# +# @example EnforcedStyle: same_line +# # bad +# [ :a, +# :b +# ] +# +# # bad +# [ +# :a, +# :b +# ] +# +# # good +# [ +# :a, +# :b ] +# +# # good +# [ :a, +# :b ] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_brace_layout.rb:91 +class RuboCop::Cop::Layout::MultilineArrayBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_brace_layout.rb:109 + def on_array(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_brace_layout.rb:103 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_brace_layout.rb:106 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_brace_layout.rb:99 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_brace_layout.rb:95 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each item in a multi-line array +# starts on a separate line. +# +# @example +# +# # bad +# [ +# a, b, +# c +# ] +# +# # good +# [ +# a, +# b, +# c +# ] +# +# # good +# [ +# a, +# b, +# foo( +# bar +# ) +# ] +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# [a, b, foo( +# bar +# )] +# +# @example AllowMultilineFinalElement: true +# +# # good +# [a, b, foo( +# bar +# )] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_line_breaks.rb:47 +class RuboCop::Cop::Layout::MultilineArrayLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_line_breaks.rb:53 + def on_array(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_line_breaks.rb:59 + def ignore_last_element?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_line_breaks.rb:51 +RuboCop::Cop::Layout::MultilineArrayLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the multiline assignments have a newline +# after the assignment operator. +# +# @example EnforcedStyle: new_line (default) +# # bad +# foo = if expression +# 'bar' +# end +# +# # good +# foo = +# if expression +# 'bar' +# end +# +# # good +# foo = +# begin +# compute +# rescue => e +# nil +# end +# +# @example EnforcedStyle: same_line +# # good +# foo = if expression +# 'bar' +# end +# +# @example SupportedTypes: ['block', 'case', 'class', 'if', 'kwbegin', 'module'] (default) +# # good +# foo = +# if expression +# 'bar' +# end +# +# # good +# foo = +# [1].map do |i| +# i + 1 +# end +# +# @example SupportedTypes: ['block'] +# # good +# foo = if expression +# 'bar' +# end +# +# # good +# foo = +# [1].map do |i| +# 'bar' * i +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:60 +class RuboCop::Cop::Layout::MultilineAssignmentLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:75 + def check_assignment(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:85 + def check_by_enforced_style(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:94 + def check_new_line_offense(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:102 + def check_same_line_offense(node, rhs); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:115 + def supported_types; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:72 +RuboCop::Cop::Layout::MultilineAssignmentLayout::BLOCK_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:66 +RuboCop::Cop::Layout::MultilineAssignmentLayout::NEW_LINE_OFFENSE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:69 +RuboCop::Cop::Layout::MultilineAssignmentLayout::SAME_LINE_OFFENSE = T.let(T.unsafe(nil), String) + +# Checks whether the multiline do end blocks have a newline +# after the start of the block. Additionally, it checks whether the block +# arguments, if any, are on the same line as the start of the +# block. Putting block arguments on separate lines, because the whole +# line would otherwise be too long, is accepted. +# +# @example +# # bad +# blah do |i| foo(i) +# bar(i) +# end +# +# # bad +# blah do +# |i| foo(i) +# bar(i) +# end +# +# # good +# blah do |i| +# foo(i) +# bar(i) +# end +# +# # bad +# blah { |i| foo(i) +# bar(i) +# } +# +# # good +# blah { |i| +# foo(i) +# bar(i) +# } +# +# # good +# blah { | +# long_list, +# of_parameters, +# that_would_not, +# fit_on_one_line +# | +# foo(i) +# bar(i) +# } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:51 +class RuboCop::Cop::Layout::MultilineBlockLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:59 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:72 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:71 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:101 + def add_offense_for_expression(node, expr, msg); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:76 + def args_on_beginning_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:108 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:123 + def autocorrect_arguments(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:133 + def autocorrect_body(corrector, node, block_body); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:145 + def block_arg_string(node, args); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:93 + def characters_needed_for_space_and_pipes(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:157 + def include_trailing_comma?(args); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:80 + def line_break_necessary_in_args?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:86 + def needed_length_for_args(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:56 +RuboCop::Cop::Layout::MultilineBlockLayout::ARG_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:55 +RuboCop::Cop::Layout::MultilineBlockLayout::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:57 +RuboCop::Cop::Layout::MultilineBlockLayout::PIPE_SIZE = T.let(T.unsafe(nil), Integer) + +# Checks that the closing brace in a hash literal is either +# on the same line as the last hash element, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a hash's opening brace is on the same line as the first element +# of the hash, then the closing brace should be on the same line as +# the last element of the hash. +# +# If a hash's opening brace is on the line above the first element +# of the hash, then the closing brace should be on the line below +# the last element of the hash. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line hash literal must be on the line +# after the last element of the hash. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line hash literal must be on the same +# line as the last element of the hash. +# +# @example EnforcedStyle: symmetrical (default) +# +# # bad +# { a: 1, +# b: 2 +# } +# # bad +# { +# a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 } +# +# # good +# { +# a: 1, +# b: 2 +# } +# +# @example EnforcedStyle: new_line +# # bad +# { +# a: 1, +# b: 2 } +# +# # bad +# { a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 +# } +# +# # good +# { +# a: 1, +# b: 2 +# } +# +# @example EnforcedStyle: same_line +# # bad +# { a: 1, +# b: 2 +# } +# +# # bad +# { +# a: 1, +# b: 2 +# } +# +# # good +# { +# a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_brace_layout.rb:91 +class RuboCop::Cop::Layout::MultilineHashBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_brace_layout.rb:109 + def on_hash(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_brace_layout.rb:103 +RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_brace_layout.rb:106 +RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_brace_layout.rb:99 +RuboCop::Cop::Layout::MultilineHashBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_brace_layout.rb:95 +RuboCop::Cop::Layout::MultilineHashBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each key in a multi-line hash +# starts on a separate line. +# +# @example +# +# # bad +# { +# a: 1, b: 2, +# c: 3 +# } +# +# # good +# { +# a: 1, +# b: 2, +# c: 3 +# } +# +# # good +# { +# a: 1, +# b: { +# c: 3, +# } +# } +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# { a: 1, b: { +# c: 3, +# }} +# +# @example AllowMultilineFinalElement: true +# +# # good +# { a: 1, b: { +# c: 3, +# }} +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb:46 +class RuboCop::Cop::Layout::MultilineHashKeyLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb:52 + def on_hash(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb:68 + def ignore_last_element?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb:64 + def starts_with_curly_brace?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb:50 +RuboCop::Cop::Layout::MultilineHashKeyLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Ensures that each argument in a multi-line method call +# starts on a separate line. +# +# NOTE: This cop does not move the first argument, if you want that to +# be on a separate line, see `Layout/FirstMethodArgumentLineBreak`. +# +# @example +# +# # bad +# foo(a, b, +# c +# ) +# +# # bad +# foo(a, b, { +# foo: "bar", +# }) +# +# # good +# foo( +# a, +# b, +# c +# ) +# +# # good +# foo(a, b, c) +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# foo(a, b, +# c +# ) +# +# # bad +# foo( +# a, b, { +# foo: "bar", +# } +# ) +# +# # good +# foo( +# a, +# b, +# { +# foo: "bar", +# } +# ) +# +# @example AllowMultilineFinalElement: true +# +# # bad +# foo(a, b, +# c +# ) +# +# # good +# foo( +# a, b, { +# foo: "bar", +# } +# ) +# +# # good +# foo( +# a, +# b, +# { +# foo: "bar", +# } +# ) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb:80 +class RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb:102 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb:86 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb:106 + def ignore_last_element?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb:84 +RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Checks that the closing brace in a method call is either +# on the same line as the last method argument, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a method call's opening brace is on the same line as the first +# argument of the call, then the closing brace should be on the same +# line as the last argument of the call. +# +# If a method call's opening brace is on the line above the first +# argument of the call, then the closing brace should be on the line +# below the last argument of the call. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line method call must be on the line +# after the last argument of the call. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line method call must be on the same +# line as the last argument of the call. +# +# @example EnforcedStyle: symmetrical (default) +# # bad +# foo(a, +# b +# ) +# +# # bad +# foo( +# a, +# b) +# +# # good +# foo(a, +# b) +# +# # good +# foo( +# a, +# b +# ) +# +# @example EnforcedStyle: new_line +# # bad +# foo( +# a, +# b) +# +# # bad +# foo(a, +# b) +# +# # good +# foo(a, +# b +# ) +# +# # good +# foo( +# a, +# b +# ) +# +# @example EnforcedStyle: same_line +# # bad +# foo(a, +# b +# ) +# +# # bad +# foo( +# a, +# b +# ) +# +# # good +# foo( +# a, +# b) +# +# # good +# foo(a, +# b) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:91 +class RuboCop::Cop::Layout::MultilineMethodCallBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:112 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:109 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:116 + def children(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:120 + def ignored_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:124 + def single_line_ignoring_receiver?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:103 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:106 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:99 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:95 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Checks the indentation of the method name part in method calls +# that span more than one line. +# +# @example EnforcedStyle: aligned (default) +# # bad +# while myvariable +# .b +# # do something +# end +# +# # good +# while myvariable +# .b +# # do something +# end +# +# # good +# Thing.a +# .b +# .c +# +# @example EnforcedStyle: indented +# # good +# while myvariable +# .b +# +# # do something +# end +# +# @example EnforcedStyle: indented_relative_to_receiver +# # good +# while myvariable +# .a +# .b +# +# # do something +# end +# +# # good +# myvariable = Thing +# .a +# .b +# .c +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:50 +class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::MultilineExpressionIndentation + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:57 + def validate_config; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:255 + def align_with_base_message(rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:194 + def aligned_with_first_line_dot?(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:277 + def alignment_base(node, rhs, given_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:336 + def alignment_base_for_chained_receiver?(receiver_chain, base_receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:83 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:259 + def base_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:217 + def calculate_column_delta_offense(rhs, correct_column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:157 + def check_hash_pair_indentation(node, lhs, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:148 + def check_hash_pair_indented_style(rhs, pair_ancestor); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:204 + def check_regular_indentation(node, lhs, rhs, given_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:98 + def correct_block(corrector, block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:92 + def correct_selector_only(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:222 + def extra_indentation(given_style, parent); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:69 + def find_base_receiver(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:381 + def find_continuation_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:182 + def find_enclosing_chain_call(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:324 + def find_hash_method_base_in_receiver_chain(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:167 + def find_hash_pair_alignment_base(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:375 + def find_multiline_block_chain_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:75 + def find_pair_ancestor(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:349 + def first_call_alignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:405 + def first_call_has_a_dot(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:366 + def get_dot_right_above(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:395 + def handle_descendant_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:190 + def hash_arg_in_chain?(call, hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:140 + def hash_pair_aligned?(pair_ancestor, given_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:144 + def hash_pair_indented?(node, pair_ancestor, given_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:175 + def inside_multiline_chain_arg?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:232 + def message(node, lhs, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:360 + def method_on_receiver_last_line?(node, base_receiver, type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:263 + def no_base_message(lhs, rhs, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:120 + def offending_range(node, lhs, rhs, given_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:412 + def operation_rhs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:422 + def operator_rhs?(node, receiver); end + + # a + # .b + # .c + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:316 + def receiver_alignment_base(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:250 + def relative_to_receiver_message(rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:104 + def relevant_node?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:108 + def right_hand_side(send_node); end + + # a.b + # .c + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:304 + def semantic_alignment_base(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:341 + def semantic_alignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:246 + def should_align_with_base?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:242 + def should_indent_relative_to_receiver?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:391 + def single_line_block_receiver?(receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:136 + def skip_for_context?(node, pair_ancestor); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:286 + def syntactic_alignment_base(lhs, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:79 + def unwrap_block_node(node); end +end + +# Checks that the closing brace in a method definition is either +# on the same line as the last method parameter, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a method definition's opening brace is on the same line as the +# first parameter of the definition, then the closing brace should be +# on the same line as the last parameter of the definition. +# +# If a method definition's opening brace is on the line above the first +# parameter of the definition, then the closing brace should be on the +# line below the last parameter of the definition. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line method definition must be on the line +# after the last parameter of the definition. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line method definition must be on the same +# line as the last parameter of the definition. +# +# @example EnforcedStyle: symmetrical (default) +# # bad +# def foo(a, +# b +# ) +# end +# +# # bad +# def foo( +# a, +# b) +# end +# +# # good +# def foo(a, +# b) +# end +# +# # good +# def foo( +# a, +# b +# ) +# end +# +# @example EnforcedStyle: new_line +# # bad +# def foo( +# a, +# b) +# end +# +# # bad +# def foo(a, +# b) +# end +# +# # good +# def foo(a, +# b +# ) +# end +# +# # good +# def foo( +# a, +# b +# ) +# end +# +# @example EnforcedStyle: same_line +# # bad +# def foo(a, +# b +# ) +# end +# +# # bad +# def foo( +# a, +# b +# ) +# end +# +# # good +# def foo( +# a, +# b) +# end +# +# # good +# def foo(a, +# b) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:103 +class RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:121 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:124 + def on_defs(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:115 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:118 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:111 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:107 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each parameter in a multi-line method definition +# starts on a separate line. +# +# NOTE: This cop does not move the first argument, if you want that to +# be on a separate line, see `Layout/FirstMethodParameterLineBreak`. +# +# @example +# +# # bad +# def foo(a, b, +# c +# ) +# end +# +# # good +# def foo( +# a, +# b, +# c +# ) +# end +# +# # good +# def foo( +# a, +# b = { +# foo: "bar", +# } +# ) +# end +# +# # good +# def foo(a, b, c) +# end +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# def foo(a, b = { +# foo: "bar", +# }) +# end +# +# @example AllowMultilineFinalElement: true +# +# # good +# def foo(a, b = { +# foo: "bar", +# }) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb:57 +class RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb:63 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb:68 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb:72 + def ignore_last_element?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb:61 +RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the right hand side operand in binary operations that +# span more than one line. +# +# The `aligned` style checks that operators are aligned if they are part of an `if` or `while` +# condition, an explicit `return` statement, etc. In other contexts, the second operand should +# be indented regardless of enforced style. +# +# In both styles, operators should be aligned when an assignment begins on the next line. +# +# @example EnforcedStyle: aligned (default) +# # bad +# if a + +# b +# something && +# something_else +# end +# +# # good +# if a + +# b +# something && +# something_else +# end +# +# @example EnforcedStyle: indented +# # bad +# if a + +# b +# something && +# something_else +# end +# +# # good +# if a + +# b +# something && +# something_else +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:45 +class RuboCop::Cop::Layout::MultilineOperationIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::MultilineExpressionIndentation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:51 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:55 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:59 + def validate_config; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:70 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:80 + def check_and_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:113 + def message(node, lhs, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:85 + def offending_range(node, lhs, rhs, given_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:74 + def relevant_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:124 + def right_hand_side(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:98 + def should_align?(node, rhs, given_style); end +end + +# Checks that the parameters on a multi-line method call or definition are aligned. +# +# To set the alignment of the first argument, use the +# `Layout/FirstParameterIndentation` cop. +# +# @example EnforcedStyle: with_first_parameter (default) +# # good +# +# def foo(bar, +# baz) +# 123 +# end +# +# def foo( +# bar, +# baz +# ) +# 123 +# end +# +# # bad +# +# def foo(bar, +# baz) +# 123 +# end +# +# # bad +# +# def foo( +# bar, +# baz) +# 123 +# end +# +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# def foo(bar, +# baz) +# 123 +# end +# +# def foo( +# bar, +# baz +# ) +# 123 +# end +# +# # bad +# +# def foo(bar, +# baz) +# 123 +# end +# +# # bad +# +# def foo( +# bar, +# baz) +# 123 +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:70 +class RuboCop::Cop::Layout::ParameterAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:80 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:85 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:89 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:101 + def base_column(node, args); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:97 + def fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:93 + def message(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:112 + def target_method_lineno(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:74 +RuboCop::Cop::Layout::ParameterAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:77 +RuboCop::Cop::Layout::ParameterAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Checks whether certain expressions, e.g. method calls, that could fit +# completely on a single line, are broken up into multiple lines unnecessarily. +# +# @example +# # bad +# foo( +# a, +# b +# ) +# +# # good +# foo(a, b) +# +# # bad +# puts 'string that fits on ' \ +# 'a single line' +# +# # good +# puts 'string that fits on a single line' +# +# # bad +# things +# .select { |thing| thing.cond? } +# .join('-') +# +# # good +# things.select { |thing| thing.cond? }.join('-') +# +# @example InspectBlocks: false (default) +# # good +# foo(a) do |x| +# puts x +# end +# +# @example InspectBlocks: true +# # bad +# foo(a) do |x| +# puts x +# end +# +# # good +# foo(a) { |x| puts x } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:49 +class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::CheckSingleLineSuitability + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:70 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:56 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:60 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:78 + def check_assignment(node, _rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:108 + def configured_to_not_be_inspected?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:125 + def convertible_block?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:74 + def end_with_percent_blank_string?(processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:102 + def index_access_call_chained?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:91 + def offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:115 + def other_cop_takes_precedence?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:84 + def register_offense(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:98 + def require_backslash?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:121 + def single_line_block_chain_enabled?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:54 +RuboCop::Cop::Layout::RedundantLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the rescue and ensure keywords are aligned +# properly. +# +# @example +# +# # bad +# begin +# something +# rescue +# puts 'error' +# end +# +# # good +# begin +# something +# rescue +# puts 'error' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:24 +class RuboCop::Cop::Layout::RescueEnsureAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:39 + def on_ensure(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:43 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:35 + def on_resbody(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:187 + def access_modifier?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:165 + def access_modifier_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:151 + def aligned_with_leading_dot?(do_keyword_line, send_node_loc, rescue_keyword_column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:138 + def aligned_with_line_break_method?(ancestor_node, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:196 + def alignment_location(alignment_node); end + + # We will use ancestor or wrapper with access modifier. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:118 + def alignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:95 + def alignment_source(node, starting_loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:134 + def ancestor_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:157 + def assignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:72 + def autocorrect(corrector, node, alignment_location); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:212 + def begin_end_alignment_style; end + + # Check alignment of node with rescue or ensure modifiers. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:56 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:82 + def format_message(alignment_node, alignment_loc, kw_loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:174 + def modifier?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:180 + def whitespace_range(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:33 +RuboCop::Cop::Layout::RescueEnsureAlignment::ALTERNATIVE_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:32 +RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:29 +RuboCop::Cop::Layout::RescueEnsureAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks if method calls are chained onto single line blocks. It considers that a +# line break before the dot improves the readability of the code. +# +# @example +# # bad +# example.select { |item| item.cond? }.join('-') +# +# # good +# example.select { |item| item.cond? } +# .join('-') +# +# # good (not a concern for this cop) +# example.select do |item| +# item.cond? +# end.join('-') +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:22 +class RuboCop::Cop::Layout::SingleLineBlockChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:36 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:32 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:56 + def call_method_after_block?(node, dot_range, closing_block_delimiter_line_num); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:40 + def offending_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:62 + def selector_range(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:28 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:26 +RuboCop::Cop::Layout::SingleLineBlockChain::MSG = T.let(T.unsafe(nil), String) + +# Checks for colon (`:`) not followed by some kind of space. +# N.B. this cop does not handle spaces after a ternary operator, which are +# instead handled by `Layout/SpaceAroundOperators`. +# +# @example +# # bad +# def f(a:, b:2); {a:3}; end +# +# # good +# def f(a:, b: 2); {a: 3}; end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_colon.rb:16 +class RuboCop::Cop::Layout::SpaceAfterColon < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_colon.rb:29 + def on_kwoptarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_colon.rb:21 + def on_pair(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_colon.rb:43 + def followed_by_space?(colon); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_colon.rb:39 + def register_offense(colon); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_colon.rb:19 +RuboCop::Cop::Layout::SpaceAfterColon::MSG = T.let(T.unsafe(nil), String) + +# Checks for comma (`,`) not followed by some kind of space. +# +# @example +# +# # bad +# [1,2] +# { foo:bar,} +# +# # good +# [1, 2] +# { foo:bar, } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_comma.rb:17 +class RuboCop::Cop::Layout::SpaceAfterComma < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SpaceAfterPunctuation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_comma.rb:26 + def kind(token, next_token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_comma.rb:21 + def space_style_before_rcurly; end +end + +# Checks for space between a method name and a left parenthesis in defs. +# +# @example +# +# # bad +# def func (x) end +# def method= (y) end +# +# # good +# def func(x) end +# def method=(y) end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_method_name.rb:17 +class RuboCop::Cop::Layout::SpaceAfterMethodName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_method_name.rb:23 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_method_name.rb:35 + def on_defs(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_method_name.rb:21 +RuboCop::Cop::Layout::SpaceAfterMethodName::MSG = T.let(T.unsafe(nil), String) + +# Checks for space after `!`. +# +# @example +# # bad +# ! something +# +# # good +# !something +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_not.rb:14 +class RuboCop::Cop::Layout::SpaceAfterNot < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_not.rb:21 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_not.rb:33 + def whitespace_after_operator?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_not.rb:18 +RuboCop::Cop::Layout::SpaceAfterNot::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_not.rb:19 +RuboCop::Cop::Layout::SpaceAfterNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for semicolon (`;`) not followed by some kind of space. +# +# @example +# # bad +# x = 1;y = 2 +# +# # good +# x = 1; y = 2 +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_semicolon.rb:14 +class RuboCop::Cop::Layout::SpaceAfterSemicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SpaceAfterPunctuation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_semicolon.rb:23 + def kind(token, _next_token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_semicolon.rb:27 + def space_missing?(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_semicolon.rb:18 + def space_style_before_rcurly; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_semicolon.rb:33 + def semicolon_sequence?(token, next_token); end +end + +# Checks the spacing inside and after block parameters pipes. Line breaks +# inside parameter pipes are checked by `Layout/MultilineBlockLayout` and +# not by this cop. +# +# @example EnforcedStyleInsidePipes: no_space (default) +# # bad +# {}.each { | x, y |puts x } +# ->( x, y ) { puts x } +# +# # good +# {}.each { |x, y| puts x } +# ->(x, y) { puts x } +# +# @example EnforcedStyleInsidePipes: space +# # bad +# {}.each { |x, y| puts x } +# ->(x, y) { puts x } +# +# # good +# {}.each { | x, y | puts x } +# ->( x, y ) { puts x } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:27 +class RuboCop::Cop::Layout::SpaceAroundBlockParameters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:32 + def on_block(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:65 + def check_after_closing_pipe(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:125 + def check_arg(arg); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:103 + def check_closing_pipe_space(arguments, closing_pipe); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:121 + def check_each_arg(args); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:56 + def check_inside_pipes(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:150 + def check_no_space(space_begin_pos, space_end_pos, msg); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:73 + def check_no_space_style_inside_pipes(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:92 + def check_opening_pipe_space(arguments, opening_pipe); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:136 + def check_space(space_begin_pos, space_end_pos, range, msg, node = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:85 + def check_space_style_inside_pipes(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:113 + def last_end_pos_inside_pipes(arguments, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:44 + def pipes(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:48 + def pipes?(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:52 + def style_parameter_name; end +end + +# Checks that the equals signs in parameter default assignments +# have or don't have surrounding space depending on configuration. +# +# @example EnforcedStyle: space (default) +# # bad +# def some_method(arg1=:default, arg2=nil, arg3=[]) +# # do something... +# end +# +# # good +# def some_method(arg1 = :default, arg2 = nil, arg3 = []) +# # do something... +# end +# +# @example EnforcedStyle: no_space +# # bad +# def some_method(arg1 = :default, arg2 = nil, arg3 = []) +# # do something... +# end +# +# # good +# def some_method(arg1=:default, arg2=nil, arg3=[]) +# # do something... +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:30 +class RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:38 + def on_optarg(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:67 + def autocorrect(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:46 + def check_optarg(arg, equals, value); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:58 + def incorrect_style_detected(arg, value); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:83 + def message(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:79 + def no_surrounding_space?(arg, equals); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:75 + def space_on_both_sides?(arg, equals); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:36 +RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault::MSG = T.let(T.unsafe(nil), String) + +# Checks the spacing around the keywords. +# +# @example +# +# # bad +# something 'test'do|x| +# end +# +# while(something) +# end +# +# something = 123if test +# +# return(foo + bar) +# +# # good +# something 'test' do |x| +# end +# +# while (something) +# end +# +# something = 123 if test +# +# return (foo + bar) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:32 +class RuboCop::Cop::Layout::SpaceAroundKeyword < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:46 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:50 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:56 + def on_break(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:60 + def on_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:64 + def on_case_match(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:164 + def on_defined?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:68 + def on_ensure(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:72 + def on_for(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:76 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:80 + def on_if_guard(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:84 + def on_in_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:54 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:88 + def on_kwbegin(node); end + + # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby27`. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:93 + def on_match_pattern(node); end + + # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby30`. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:100 + def on_match_pattern_p(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:104 + def on_next(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:53 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:108 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:112 + def on_postexe(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:116 + def on_preexe(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:120 + def on_resbody(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:124 + def on_rescue(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:128 + def on_return(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:132 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:136 + def on_super(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:144 + def on_unless_guard(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:148 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:152 + def on_when(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:156 + def on_while(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:160 + def on_yield(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:140 + def on_zsuper(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:243 + def accept_left_parenthesis?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:247 + def accept_left_square_bracket?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:251 + def accept_namespace_operator?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:236 + def accepted_opening_delimiter?(range, char); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:170 + def check(node, locations, begin_keyword = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:185 + def check_begin(node, range, begin_keyword); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:191 + def check_end(node, range, begin_keyword); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:204 + def check_keyword(node, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:200 + def do?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:259 + def namespace_operator?(range, pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:263 + def preceded_by_operator?(node, _range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:255 + def safe_navigation_call?(range, pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:225 + def space_after_missing?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:218 + def space_before_missing?(range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:41 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_PAREN = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:42 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_SQUARE_BRACKET = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:43 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:38 +RuboCop::Cop::Layout::SpaceAroundKeyword::DO = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:36 +RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_AFTER = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:35 +RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_BEFORE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:40 +RuboCop::Cop::Layout::SpaceAroundKeyword::NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:44 +RuboCop::Cop::Layout::SpaceAroundKeyword::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:39 +RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), String) + +# Checks method call operators to not have spaces around them. +# +# @example +# # bad +# foo. bar +# foo .bar +# foo . bar +# foo. bar .buzz +# foo +# . bar +# . buzz +# foo&. bar +# foo &.bar +# foo &. bar +# foo &. bar&. buzz +# RuboCop:: Cop +# RuboCop:: Cop:: Base +# :: RuboCop::Cop +# +# # good +# foo.bar +# foo.bar.buzz +# foo +# .bar +# .buzz +# foo&.bar +# foo&.bar&.buzz +# RuboCop::Cop +# RuboCop::Cop::Base +# ::RuboCop::Cop +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:37 +class RuboCop::Cop::Layout::SpaceAroundMethodCallOperator < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:53 + def on_const(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:51 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:45 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:87 + def check_space(begin_pos, end_pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:67 + def check_space_after_dot(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:81 + def check_space_after_double_colon(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:61 + def check_space_before_dot(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:43 +RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:41 +RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) + +# Checks that operators have space around them, except for ** which +# should or shouldn't have surrounding space depending on configuration. +# It allows vertical alignment consisting of one or more whitespace +# around operators. +# +# This cop has `AllowForAlignment` option. When `true`, allows most +# uses of extra spacing if the intent is to align with an operator on +# the previous or next line, not counting empty lines or comment lines. +# +# @example +# # bad +# total = 3*4 +# "apple"+"juice" +# my_number = 38/4 +# +# # good +# total = 3 * 4 +# "apple" + "juice" +# my_number = 38 / 4 +# +# @example AllowForAlignment: true (default) +# # good +# { +# 1 => 2, +# 11 => 3 +# } +# +# @example AllowForAlignment: false +# # bad +# { +# 1 => 2, +# 11 => 3 +# } +# +# @example EnforcedStyleForExponentOperator: no_space (default) +# # bad +# a ** b +# +# # good +# a**b +# +# @example EnforcedStyleForExponentOperator: space +# # bad +# a**b +# +# # good +# a ** b +# +# @example EnforcedStyleForRationalLiterals: no_space (default) +# # bad +# 1 / 48r +# +# # good +# 1/48r +# +# @example EnforcedStyleForRationalLiterals: space +# # bad +# 1/48r +# +# # good +# 1 / 48r +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:67 +class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RationalLiteral + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:163 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:171 + def on_and_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:115 + def on_assignment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:132 + def on_binary(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:165 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:124 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:168 + def on_cvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:169 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:92 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:167 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:164 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:166 + def on_masgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:154 + def on_match_alt(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:158 + def on_match_as(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:148 + def on_match_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:172 + def on_op_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:162 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:170 + def on_or_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:84 + def on_pair(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:99 + def on_resbody(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:80 + def on_sclass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:105 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:140 + def on_setter_method(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:266 + def align_hash_cop_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:205 + def autocorrect(corrector, range, right_operand); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:186 + def check_operator(type, operator, right_operand); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:219 + def enclose_operator_with_space(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:246 + def excess_leading_space?(type, operator, with_space); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:261 + def excess_trailing_space?(right_operand, with_space); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:287 + def force_equal_sign_alignment?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:270 + def hash_table_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:200 + def offense(type, operator, with_space, right_operand); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:232 + def offense_message(type, operator, with_space, right_operand); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:182 + def operator_with_regular_syntax?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:176 + def regular_operator?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:291 + def should_not_have_surrounding_space?(operator, right_operand); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:277 + def space_around_exponent_operator?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:281 + def space_around_slash_operator?(right_operand); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:76 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:74 +RuboCop::Cop::Layout::SpaceAroundOperators::EXCESSIVE_SPACE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:73 +RuboCop::Cop::Layout::SpaceAroundOperators::IRREGULAR_METHODS = T.let(T.unsafe(nil), Array) + +# Checks that block braces have or don't have a space before the opening +# brace depending on configuration. +# +# @example EnforcedStyle: space (default) +# # bad +# foo.map{ |a| +# a.bar.to_s +# } +# +# # good +# foo.map { |a| +# a.bar.to_s +# } +# +# @example EnforcedStyle: no_space +# # bad +# foo.map { |a| +# a.bar.to_s +# } +# +# # good +# foo.map{ |a| +# a.bar.to_s +# } +# +# @example EnforcedStyleForEmptyBraces: space (default) +# # bad +# 7.times{} +# +# # good +# 7.times {} +# +# @example EnforcedStyleForEmptyBraces: no_space +# # bad +# 7.times {} +# +# # good +# 7.times{} +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:44 +class RuboCop::Cop::Layout::SpaceBeforeBlockBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:56 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:80 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:79 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:134 + def autocorrect(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:154 + def block_delimiters_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:84 + def check_empty(left_brace, space_plus_brace, used_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:110 + def check_non_empty(left_brace, space_plus_brace, used_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:150 + def conflict_with_block_delimiters?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:158 + def empty_braces?(loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:102 + def handle_different_styles_for_empty_braces(used_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:125 + def space_detected(left_brace, space_plus_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:118 + def space_missing(left_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:141 + def style_for_empty_braces; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:52 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:50 +RuboCop::Cop::Layout::SpaceBeforeBlockBraces::DETECTED_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:49 +RuboCop::Cop::Layout::SpaceBeforeBlockBraces::MISSING_MSG = T.let(T.unsafe(nil), String) + +# Checks for space between the name of a receiver and a left +# brackets. +# +# @example +# +# # bad +# collection [index_or_key] +# +# # good +# collection[index_or_key] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_brackets.rb:17 +class RuboCop::Cop::Layout::SpaceBeforeBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_brackets.rb:24 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_brackets.rb:21 +RuboCop::Cop::Layout::SpaceBeforeBrackets::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_brackets.rb:22 +RuboCop::Cop::Layout::SpaceBeforeBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for comma (`,`) preceded by space. +# +# @example +# # bad +# [1 , 2 , 3] +# a(1 , 2) +# each { |a , b| } +# +# # good +# [1, 2, 3] +# a(1, 2) +# each { |a, b| } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_comma.rb:19 +class RuboCop::Cop::Layout::SpaceBeforeComma < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SpaceBeforePunctuation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_comma.rb:23 + def kind(token); end +end + +# Checks for missing space between a token and a comment on the +# same line. +# +# @example +# # bad +# 1 + 1# this operation does ... +# +# # good +# 1 + 1 # this operation does ... +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_comment.rb:15 +class RuboCop::Cop::Layout::SpaceBeforeComment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_comment.rb:20 + def on_new_investigation; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_comment.rb:18 +RuboCop::Cop::Layout::SpaceBeforeComment::MSG = T.let(T.unsafe(nil), String) + +# Checks that exactly one space is used between a method name and the +# first argument for method calls without parentheses. +# +# Alternatively, extra spaces can be added to align the argument with +# something on a preceding or following line, if the AllowForAlignment +# config parameter is true. +# +# @example +# # bad +# something x +# something y, z +# something'hello' +# +# # good +# something x +# something y, z +# something 'hello' +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:24 +class RuboCop::Cop::Layout::SpaceBeforeFirstArg < ::RuboCop::Cop::Base + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:47 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:35 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:55 + def expect_params_after_method_name?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:64 + def no_space_between_method_name_and_first_argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:51 + def regular_method_call_with_arguments?(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:31 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:29 +RuboCop::Cop::Layout::SpaceBeforeFirstArg::MSG = T.let(T.unsafe(nil), String) + +# Checks for semicolon (`;`) preceded by space. +# +# @example +# # bad +# x = 1 ; y = 2 +# +# # good +# x = 1; y = 2 +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_semicolon.rb:14 +class RuboCop::Cop::Layout::SpaceBeforeSemicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SpaceBeforePunctuation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_semicolon.rb:18 + def kind(token); end +end + +# Checks for spaces between `->` and opening parameter +# parenthesis (`(`) in lambda literals. +# +# @example EnforcedStyle: require_no_space (default) +# # bad +# a = -> (x, y) { x + y } +# +# # good +# a = ->(x, y) { x + y } +# +# @example EnforcedStyle: require_space +# # bad +# a = ->(x, y) { x + y } +# +# # good +# a = -> (x, y) { x + y } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:22 +class RuboCop::Cop::Layout::SpaceInLambdaLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:31 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:51 + def arrow_lambda_with_args?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:73 + def lambda_arguments(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:66 + def range_of_offense(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:59 + def space_after_arrow(lambda_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:55 + def space_after_arrow?(lambda_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:28 +RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_NO_SPACE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:27 +RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:29 +RuboCop::Cop::Layout::SpaceInLambdaLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that brackets used for array literals have or don't have +# surrounding space depending on configuration. +# +# Array pattern matching is handled in the same way. +# +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that array literals have +# # no surrounding space. +# +# # bad +# array = [ a, b, c, d ] +# array = [ a, [ b, c ]] +# +# # good +# array = [a, b, c, d] +# array = [a, [b, c]] +# +# @example EnforcedStyle: space +# # The `space` style enforces that array literals have +# # surrounding space. +# +# # bad +# array = [a, b, c, d] +# array = [ a, [ b, c ]] +# +# # good +# array = [ a, b, c, d ] +# array = [ a, [ b, c ] ] +# +# @example EnforcedStyle: compact +# # The `compact` style normally requires a space inside +# # array brackets, with the exception that successive left +# # or right brackets are collapsed together in nested arrays. +# +# # bad +# array = [a, b, c, d] +# array = [ a, [ b, c ] ] +# array = [ +# [ a ], +# [ b, c ] +# ] +# +# # good +# array = [ a, b, c, d ] +# array = [ a, [ b, c ]] +# array = [[ a ], +# [ b, c ]] +# +# @example EnforcedStyleForEmptyBrackets: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBrackets style enforces that +# # empty array brackets do not contain spaces. +# +# # bad +# foo = [ ] +# bar = [ ] +# +# # good +# foo = [] +# bar = [] +# +# @example EnforcedStyleForEmptyBrackets: space +# # The `space` EnforcedStyleForEmptyBrackets style enforces that +# # empty array brackets contain exactly one space. +# +# # bad +# foo = [] +# bar = [ ] +# +# # good +# foo = [ ] +# bar = [ ] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:78 +class RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:86 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:102 + def on_array_pattern(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:124 + def array_brackets(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:110 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:232 + def compact(corrector, bracket, side); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:218 + def compact_corrections(corrector, node, left, right); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:210 + def compact_offense(node, token, side: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:172 + def compact_offenses(node, left, right, start_ok, end_ok); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:133 + def empty_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:141 + def end_has_own_line?(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:106 + def find_node_with_brackets(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:148 + def index_for(node, token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:156 + def issue_offenses(node, left, right, start_ok, end_ok); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:152 + def line_and_column_for(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:193 + def multi_dimensional_array?(node, token, side: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:204 + def next_to_bracket?(token, side: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:168 + def next_to_comment?(node, token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:137 + def next_to_newline?(node, token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:185 + def qualifies_for_compact?(node, token, side: T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:84 +RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:83 +RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::MSG = T.let(T.unsafe(nil), String) + +# Checks for unnecessary additional spaces inside array percent literals +# (i.e. %i/%w). +# +# Note that blank percent literals (e.g. `%i( )`) are checked by +# `Layout/SpaceInsidePercentLiteralDelimiters`. +# +# @example +# +# # bad +# %w(foo bar baz) +# # good +# %i(foo bar baz) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_percent_literal.rb:18 +class RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_percent_literal.rb:26 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_percent_literal.rb:30 + def on_percent_literal(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_percent_literal.rb:40 + def each_unnecessary_space_match(node, &blk); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_percent_literal.rb:23 +RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_percent_literal.rb:24 +RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MULTIPLE_SPACES_BETWEEN_ITEMS_REGEX = T.let(T.unsafe(nil), Regexp) + +# Checks that block braces have or don't have surrounding space inside +# them on configuration. For blocks taking parameters, it checks that the +# left brace has or doesn't have trailing space depending on +# configuration. +# +# @example EnforcedStyle: space (default) +# # The `space` style enforces that block braces have +# # surrounding space. +# +# # bad +# some_array.each {puts e} +# +# # good +# some_array.each { puts e } +# +# @example EnforcedStyle: no_space +# # The `no_space` style enforces that block braces don't +# # have surrounding space. +# +# # bad +# some_array.each { puts e } +# +# # good +# some_array.each {puts e} +# +# +# @example EnforcedStyleForEmptyBraces: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBraces style enforces that +# # block braces don't have a space in between when empty. +# +# # bad +# some_array.each { } +# some_array.each { } +# some_array.each { } +# +# # good +# some_array.each {} +# +# @example EnforcedStyleForEmptyBraces: space +# # The `space` EnforcedStyleForEmptyBraces style enforces that +# # block braces have at least a space in between when empty. +# +# # bad +# some_array.each {} +# +# # good +# some_array.each { } +# some_array.each { } +# some_array.each { } +# +# +# @example SpaceBeforeBlockParameters: true (default) +# # The SpaceBeforeBlockParameters style set to `true` enforces that +# # there is a space between `{` and `|`. Overrides `EnforcedStyle` +# # if there is a conflict. +# +# # bad +# [1, 2, 3].each {|n| n * 2 } +# +# # good +# [1, 2, 3].each { |n| n * 2 } +# +# @example SpaceBeforeBlockParameters: false +# # The SpaceBeforeBlockParameters style set to `false` enforces that +# # there is no space between `{` and `|`. Overrides `EnforcedStyle` +# # if there is a conflict. +# +# # bad +# [1, 2, 3].each { |n| n * 2 } +# +# # good +# [1, 2, 3].each {|n| n * 2 } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:79 +class RuboCop::Cop::Layout::SpaceInsideBlockBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:89 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:106 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:105 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:127 + def adjacent_braces(left_brace, right_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:166 + def aligned_braces?(inner, right_brace, column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:135 + def braces_with_contents_inside(node, inner); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:110 + def check_inside(node, left_brace, right_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:142 + def check_left_brace(inner, left_brace, args_delimiter); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:150 + def check_right_brace(node, inner, left_brace, right_brace, single_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:170 + def inner_last_space_count(inner); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:162 + def multiline_block?(left_brace, right_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:227 + def no_space(begin_pos, end_pos, msg); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:174 + def no_space_inside_left_brace(left_brace, args_delimiter); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:243 + def offense(begin_pos, end_pos, msg, style_param = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:206 + def pipe?(args_delimiter); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:235 + def space(begin_pos, end_pos, msg); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:191 + def space_inside_left_brace(left_brace, args_delimiter); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:210 + def space_inside_right_brace(inner, right_brace, column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:258 + def style_for_empty_braces; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:85 + def autocorrect_incompatible_with; end + end +end + +# Checks that braces used for hash literals have or don't have +# surrounding space depending on configuration. +# +# Hash pattern matching is handled in the same way. +# +# @example EnforcedStyle: space (default) +# # The `space` style enforces that hash literals have +# # surrounding space. +# +# # bad +# h = {a: 1, b: 2} +# foo = {{ a: 1 } => { b: { c: 2 }}} +# +# # good +# h = { a: 1, b: 2 } +# foo = { { a: 1 } => { b: { c: 2 } } } +# +# @example EnforcedStyle: no_space +# # The `no_space` style enforces that hash literals have +# # no surrounding space. +# +# # bad +# h = { a: 1, b: 2 } +# foo = {{ a: 1 } => { b: { c: 2 }}} +# +# # good +# h = {a: 1, b: 2} +# foo = {{a: 1} => {b: {c: 2}}} +# +# @example EnforcedStyle: compact +# # The `compact` style normally requires a space inside +# # hash braces, with the exception that successive left +# # braces or right braces are collapsed together in nested hashes. +# +# # bad +# h = { a: { b: 2 } } +# foo = { { a: 1 } => { b: { c: 2 } } } +# +# # good +# h = { a: { b: 2 }} +# foo = {{ a: 1 } => { b: { c: 2 }}} +# +# @example EnforcedStyleForEmptyBraces: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBraces style enforces that +# # empty hash braces do not contain spaces. +# +# # bad +# foo = { } +# bar = { } +# baz = { +# } +# +# # good +# foo = {} +# bar = {} +# baz = {} +# +# @example EnforcedStyleForEmptyBraces: space +# # The `space` EnforcedStyleForEmptyBraces style enforces that +# # empty hash braces contain space. +# +# # bad +# foo = {} +# +# # good +# foo = { } +# foo = { } +# foo = { +# } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:76 +class RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:84 + def on_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:92 + def on_hash_pattern(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:144 + def ambiguous_or_unexpected_style_detected(style, is_match); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:136 + def autocorrect(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:96 + def check(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:191 + def check_whitespace_only_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:209 + def enforce_no_space_style_for_empty_braces?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:111 + def expect_space?(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:124 + def incorrect_style_detected(token1, token2, expect_space, is_empty_braces); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:157 + def message(brace, is_empty_braces, expect_space); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:152 + def offense?(token1, expect_space); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:203 + def range_inside_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:183 + def range_of_space_to_the_left(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:175 + def range_of_space_to_the_right(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:167 + def space_range(token_range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:82 +RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces::MSG = T.let(T.unsafe(nil), String) + +# Checks for spaces inside ordinary round parentheses. +# +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that parentheses do not have spaces. +# +# # bad +# f( 3) +# g = (a + 3 ) +# f( ) +# +# # good +# f(3) +# g = (a + 3) +# f() +# +# @example EnforcedStyle: space +# # The `space` style enforces that parentheses have a space at the +# # beginning and end. +# # Note: Empty parentheses should not have spaces. +# +# # bad +# f(3) +# g = (a + 3) +# y( ) +# +# # good +# f( 3 ) +# g = ( a + 3 ) +# y() +# +# @example EnforcedStyle: compact +# # The `compact` style enforces that parentheses have a space at the +# # beginning with the exception that successive parentheses are allowed. +# # Note: Empty parentheses should not have spaces. +# +# # bad +# f(3) +# g = (a + 3) +# y( ) +# g( f( x ) ) +# g( f( x( 3 ) ), 5 ) +# g( ( ( 3 + 5 ) * f) ** x, 5 ) +# +# # good +# f( 3 ) +# g = ( a + 3 ) +# y() +# g( f( x )) +# g( f( x( 3 )), 5 ) +# g((( 3 + 5 ) * f ) ** x, 5 ) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:57 +class RuboCop::Cop::Layout::SpaceInsideParens < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:66 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:161 + def can_be_ignored?(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:99 + def correct_extraneous_space(tokens); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:115 + def correct_extraneous_space_between_consecutive_parens(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:124 + def correct_extraneous_space_in_empty_parens(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:135 + def correct_missing_space(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:153 + def left_parens?(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:149 + def parens?(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:88 + def process_with_compact_style(tokens); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:81 + def process_with_space_style(tokens); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:157 + def right_parens?(token1, token2); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:63 +RuboCop::Cop::Layout::SpaceInsideParens::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:64 +RuboCop::Cop::Layout::SpaceInsideParens::MSG_SPACE = T.let(T.unsafe(nil), String) + +# Checks for unnecessary additional spaces inside the delimiters of +# %i/%w/%x literals. +# +# @example +# +# # bad +# %i( foo bar baz ) +# +# # good +# %i(foo bar baz) +# +# # bad +# %w( foo bar baz ) +# +# # good +# %w(foo bar baz) +# +# # bad +# %x( ls -l ) +# +# # good +# %x(ls -l) +# +# # bad +# %w( ) +# %w( +# ) +# +# # good +# %w() +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:36 +class RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:45 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:53 + def on_percent_literal(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:49 + def on_xstr(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:60 + def add_offenses_for_blank_spaces(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:69 + def add_offenses_for_unnecessary_spaces(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:85 + def body_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:79 + def regex_matches(node, &blk); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:42 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::BEGIN_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:43 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::END_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:41 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::MSG = T.let(T.unsafe(nil), String) + +# Checks for spaces inside range literals. +# +# @example +# # bad +# 1 .. 3 +# +# # good +# 1..3 +# +# # bad +# 'a' .. 'z' +# +# # good +# 'a'..'z' +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_range_literal.rb:20 +class RuboCop::Cop::Layout::SpaceInsideRangeLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_range_literal.rb:29 + def on_erange(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_range_literal.rb:25 + def on_irange(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_range_literal.rb:35 + def check(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_range_literal.rb:23 +RuboCop::Cop::Layout::SpaceInsideRangeLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks that reference brackets have or don't have +# surrounding space depending on configuration. +# +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that reference brackets have +# # no surrounding space. +# +# # bad +# hash[ :key ] +# array[ index ] +# +# # good +# hash[:key] +# array[index] +# +# @example EnforcedStyle: space +# # The `space` style enforces that reference brackets have +# # surrounding space. +# +# # bad +# hash[:key] +# array[index] +# +# # good +# hash[ :key ] +# array[ index ] +# +# +# @example EnforcedStyleForEmptyBrackets: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBrackets style enforces that +# # empty reference brackets do not contain spaces. +# +# # bad +# foo[ ] +# foo[ ] +# foo[ +# ] +# +# # good +# foo[] +# +# @example EnforcedStyleForEmptyBrackets: space +# # The `space` EnforcedStyleForEmptyBrackets style enforces that +# # empty reference brackets contain exactly one space. +# +# # bad +# foo[] +# foo[ ] +# foo[ +# ] +# +# # good +# foo[ ] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:60 +class RuboCop::Cop::Layout::SpaceInsideReferenceBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:70 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:92 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:121 + def closing_bracket(tokens, opening_bracket); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:137 + def empty_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:110 + def left_ref_bracket(node, tokens); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:132 + def previous_token(current_token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:104 + def reference_brackets(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:66 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:65 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:68 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for whitespace within string interpolations. +# +# @example EnforcedStyle: no_space (default) +# # bad +# var = "This is the #{ space } example" +# +# # good +# var = "This is the #{no_space} example" +# +# @example EnforcedStyle: space +# # bad +# var = "This is the #{no_space} example" +# +# # good +# var = "This is the #{ space } example" +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_string_interpolation.rb:21 +class RuboCop::Cop::Layout::SpaceInsideStringInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_string_interpolation.rb:29 + def on_interpolation(begin_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_string_interpolation.rb:45 + def autocorrect(corrector, begin_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_string_interpolation.rb:55 + def delimiters(begin_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_string_interpolation.rb:27 +RuboCop::Cop::Layout::SpaceInsideStringInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Looks for trailing blank lines and a final newline in the +# source code. +# +# @example EnforcedStyle: final_newline (default) +# # `final_newline` looks for one newline at the end of files. +# +# # bad +# class Foo; end +# +# # EOF +# +# # bad +# class Foo; end # EOF +# +# # good +# class Foo; end +# # EOF +# +# @example EnforcedStyle: final_blank_line +# # `final_blank_line` looks for one blank line followed by a new line +# # at the end of files. +# +# # bad +# class Foo; end +# # EOF +# +# # bad +# class Foo; end # EOF +# +# # good +# class Foo; end +# +# # EOF +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_empty_lines.rb:40 +class RuboCop::Cop::Layout::TrailingEmptyLines < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_empty_lines.rb:45 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_empty_lines.rb:90 + def end_with_percent_blank_string?(processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_empty_lines.rb:80 + def ends_in_end?(processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_empty_lines.rb:94 + def message(wanted_blank_lines, blank_lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_empty_lines.rb:67 + def offense_detected(buffer, wanted_blank_lines, blank_lines, whitespace_at_end); end +end + +# Looks for trailing whitespace in the source code. +# +# @example +# # The line in this example contains spaces after the 0. +# # bad +# x = 0 +# +# # The line in this example ends directly after the 0. +# # good +# x = 0 +# +# @example AllowInHeredoc: false (default) +# # The line in this example contains spaces after the 0. +# # bad +# code = <<~RUBY +# x = 0 +# RUBY +# +# # ok +# code = <<~RUBY +# x = 0 #{} +# RUBY +# +# # good +# trailing_whitespace = ' ' +# code = <<~RUBY +# x = 0#{trailing_whitespace} +# RUBY +# +# @example AllowInHeredoc: true +# # The line in this example contains spaces after the 0. +# # good +# code = <<~RUBY +# x = 0 +# RUBY +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:42 +class RuboCop::Cop::Layout::TrailingWhitespace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:57 + def on_heredoc(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:49 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:112 + def extract_heredocs(ast); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:103 + def find_heredoc(line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:108 + def heredocs; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:125 + def offense_range(lineno, line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:61 + def process_line(line, lineno); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:75 + def process_line_in_heredoc(corrector, range, heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:99 + def skip_heredoc?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:95 + def static?(heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:86 + def whitespace_is_indentation?(range, level); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:90 + def whitespace_only?(range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:47 +RuboCop::Cop::Layout::TrailingWhitespace::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:5 +module RuboCop::Cop::Legacy; end + +# Legacy support for Corrector#corrections +# See https://docs.rubocop.org/rubocop/v1_upgrade_notes.html +# +# pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:8 +class RuboCop::Cop::Legacy::CorrectionsProxy + # pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:9 + def initialize(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:13 + def <<(callable); end + + # pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:21 + def concat(corrections); end + + # pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:17 + def empty?; end + + protected + + # pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:31 + def corrector; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:35 + def suppress_clobbering; end +end + +# This class handles autocorrection for code that needs to be moved +# to new lines. +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:7 +class RuboCop::Cop::LineBreakCorrector + extend ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::TrailingBody + extend ::RuboCop::PathUtil + extend ::RuboCop::Cop::Util + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:27 + def break_line_before(range:, node:, corrector:, configured_width:, indent_steps: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:15 + def correct_trailing_body(configured_width:, corrector:, node:, processed_source:); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:35 + def move_comment(eol_comment:, node:, corrector:); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:13 + def processed_source; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:45 + def remove_semicolon(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:51 + def semicolon(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:60 + def trailing_class_definition?(token, body); end + end +end + +# Help methods for determining if a line is too long. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:6 +module RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::Alignment + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:24 + def allow_cop_directives?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:47 + def allow_qualified_name?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:11 + def allow_rbs_inline_annotation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:43 + def allow_uri?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:51 + def allowed_position?(line, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:34 + def directive_on_source_line?(line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:104 + def extend_end_position(line, end_position); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:59 + def find_excessive_range(line, type); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:91 + def indentation_difference(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:55 + def line_length(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:146 + def line_length_without_directive(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:83 + def match_qualified_names(string); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:75 + def match_uris(string); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:135 + def qualified_name_regexp; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:15 + def rbs_inline_annotation_on_source_line?(line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:120 + def tab_indentation_width; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:125 + def uri_regexp; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:139 + def valid_uri?(uri_ish_string); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/unused_argument.rb:5 +module RuboCop::Cop::Lint; end + +# Checks for mistyped shorthand assignments. +# +# @example +# # bad +# x =- y +# x =+ y +# x =* y +# x =! y +# +# # good +# x -= y # or x = -y +# x += y # or x = +y +# x *= y # or x = *y +# x != y # or x = !y +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:21 +class RuboCop::Cop::Lint::AmbiguousAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:30 + def on_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:40 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:40 + def on_cvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:40 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:40 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:40 + def on_lvasgn(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:44 + def rhs(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:28 +RuboCop::Cop::Lint::AmbiguousAssignment::MISTAKES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:24 +RuboCop::Cop::Lint::AmbiguousAssignment::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:26 +RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# Checks for ambiguous block association with method +# when param passed without parentheses. +# +# This cop can customize allowed methods with `AllowedMethods`. +# By default, there are no methods to allowed. +# +# @example +# +# # bad +# some_method a { |val| puts val } +# +# # good +# # With parentheses, there's no ambiguity. +# some_method(a { |val| puts val }) +# # or (different meaning) +# some_method(a) { |val| puts val } +# +# # good +# # Operator methods require no disambiguation +# foo == bar { |b| b.baz } +# +# # good +# # Lambda arguments require no disambiguation +# foo = ->(bar) { bar.baz } +# +# @example AllowedMethods: [] (default) +# +# # bad +# expect { do_something }.to change { object.attribute } +# +# @example AllowedMethods: [change] +# +# # good +# expect { do_something }.to change { object.attribute } +# +# @example AllowedPatterns: [] (default) +# +# # bad +# expect { do_something }.to change { object.attribute } +# +# @example AllowedPatterns: ['change'] +# +# # good +# expect { do_something }.to change { object.attribute } +# expect { do_something }.to not_change { object.attribute } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:52 +class RuboCop::Cop::Lint::AmbiguousBlockAssociation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:75 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:62 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:83 + def allowed_method_pattern?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:79 + def ambiguous_block_association?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:89 + def message(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:95 + def wrap_in_parentheses(corrector, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:58 +RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String) + +# Checks for ambiguous operators in the first argument of a +# method invocation without parentheses. +# +# @example +# +# # bad +# +# # The `*` is interpreted as a splat operator but it could possibly be +# # a `*` method invocation (i.e. `do_something.*(some_array)`). +# do_something *some_array +# +# # good +# +# # With parentheses, there's no ambiguity. +# do_something(*some_array) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:21 +class RuboCop::Cop::Lint::AmbiguousOperator < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:43 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:62 + def find_offense_node_by(diagnostic); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:80 + def message(diagnostic); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:90 + def offense_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:86 + def offense_position?(node, diagnostic); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:99 + def unary_operator?(node, diagnostic); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:39 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:24 +RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:34 +RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String) + +# Looks for expressions containing multiple binary operators +# where precedence is ambiguous due to lack of parentheses. For example, +# in `1 + 2 * 3`, the multiplication will happen before the addition, but +# lexically it appears that the addition will happen first. +# +# The cop does not consider unary operators (ie. `!a` or `-b`) or comparison +# operators (ie. `a =~ b`) because those are not ambiguous. +# +# NOTE: Ranges are handled by `Lint/AmbiguousRange`. +# +# @example +# # bad +# a + b * c +# a || b && c +# a ** b + c +# +# # good (different precedence) +# a + (b * c) +# a || (b && c) +# (a ** b) + c +# +# # good (same precedence) +# a + b + c +# a * b / c % d +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:30 +class RuboCop::Cop::Lint::AmbiguousOperatorPrecedence < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:54 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:47 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:65 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:105 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:89 + def greater_precedence?(node1, node2); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:85 + def operator?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:97 + def operator_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:79 + def precedence(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:45 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::MSG = T.let(T.unsafe(nil), String) + +# See https://ruby-doc.org/core-3.0.2/doc/syntax/precedence_rdoc.html +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:34 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::PRECEDENCE = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:44 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for ambiguous ranges. +# +# Ranges have quite low precedence, which leads to unexpected behavior when +# using a range with other operators. This cop avoids that by making ranges +# explicit by requiring parenthesis around complex range boundaries (anything +# that is not a literal: numerics, strings, symbols, etc.). +# +# This cop can be configured with `RequireParenthesesForMethodChains` in order to +# specify whether method chains (including `self.foo`) should be wrapped in parens +# by this cop. +# +# NOTE: Regardless of this configuration, if a method receiver is a basic literal +# value, it will be wrapped in order to prevent the ambiguity of `1..2.to_a`. +# +# @safety +# The cop autocorrects by wrapping the entire boundary in parentheses, which +# makes the outcome more explicit but is possible to not be the intention of the +# programmer. For this reason, this cop's autocorrect is unsafe (it will not +# change the behavior of the code, but will not necessarily match the +# intent of the program). +# +# @example +# # bad +# x || 1..2 +# x - 1..2 +# (x || 1..2) +# x || 1..y || 2 +# 1..2.to_a +# +# # good, unambiguous +# 1..2 +# 'a'..'z' +# :bar..:baz +# MyClass::MIN..MyClass::MAX +# @min..@max +# a..b +# -a..b +# +# # good, ambiguity removed +# x || (1..2) +# (x - 1)..2 +# (x || 1)..2 +# (x || 1)..(y || 2) +# (1..2).to_a +# +# @example RequireParenthesesForMethodChains: false (default) +# # good +# a.foo..b.bar +# (a.foo)..(b.bar) +# +# @example RequireParenthesesForMethodChains: true +# # bad +# a.foo..b.bar +# +# # good +# (a.foo)..(b.bar) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:62 +class RuboCop::Cop::Lint::AmbiguousRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RationalLiteral + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:77 + def on_erange(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:68 + def on_irange(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:87 + def acceptable?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:95 + def acceptable_call?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:81 + def each_boundary(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:107 + def require_parentheses_for_method_chain?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:66 +RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) + +# Checks for ambiguous regexp literals in the first argument of +# a method invocation without parentheses. +# +# @example +# +# # bad +# +# # This is interpreted as a method invocation with a regexp literal, +# # but it could possibly be `/` method invocations. +# # (i.e. `do_something./(pattern)./(i)`) +# do_something /pattern/i +# +# # good +# +# # With parentheses, there's no ambiguity. +# do_something(/pattern/i) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_regexp_literal.rb:22 +class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_regexp_literal.rb:29 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_regexp_literal.rb:54 + def find_offense_node(node, regexp_receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_regexp_literal.rb:47 + def find_offense_node_by(diagnostic); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_regexp_literal.rb:65 + def first_argument_is_regexp?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_regexp_literal.rb:69 + def method_chain_to_regexp_receiver?(node, regexp_receiver); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_regexp_literal.rb:25 +RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks for an array literal interpolated inside a regexp. +# +# When interpolating an array literal, it is converted to a string. This means +# that when inside a regexp, it acts as a character class but with additional +# quotes, spaces and commas that are likely not intended. For example, +# `/#{%w[a b c]}/` parses as `/["a", "b", "c"]/` (or `/["a, bc]/` without +# repeated characters). +# +# The cop can autocorrect to a character class (if all items in the array are a +# single character) or alternation (if the array contains longer items). +# +# NOTE: This only considers interpolated arrays that contain only strings, symbols, +# integers, and floats. Any other type is not easily convertible to a character class +# or regexp alternation. +# +# @safety +# Autocorrection is unsafe because it will change the regexp pattern, by +# removing the additional quotes, spaces and commas from the character class. +# +# @example +# # bad +# /#{%w[a b c]}/ +# +# # good +# /[abc]/ +# +# # bad +# /#{%w[foo bar baz]}/ +# +# # good +# /(?:foo|bar|baz)/ +# +# # bad - construct a regexp rather than interpolate an array of identifiers +# /#{[foo, bar]}/ +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:41 +class RuboCop::Cop::Lint::ArrayLiteralInRegexp < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:53 + def on_interpolation(begin_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:106 + def alternation_for(values); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:67 + def array_of_literal_values?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:92 + def array_values(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:98 + def character_class?(values); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:102 + def character_class_for(values); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:110 + def escape_values(values); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:71 + def register_array_of_literal_values(begin_node, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:87 + def register_array_of_nonliteral_values(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:45 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:49 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_ALTERNATION = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:48 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:50 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_UNKNOWN = T.let(T.unsafe(nil), String) + +# Checks for assignments in the conditions of +# if/while/until. +# +# `AllowSafeAssignment` option for safe assignment. +# By safe assignment we mean putting parentheses around +# an assignment to indicate "I know I'm using an assignment +# as a condition. It's not a mistake." +# +# @safety +# This cop's autocorrection is unsafe because it assumes that +# the author meant to use an assignment result as a condition. +# +# @example +# # bad +# if some_var = value +# do_something +# end +# +# # good +# if some_var == value +# do_something +# end +# +# @example AllowSafeAssignment: true (default) +# # good +# if (some_var = value) +# do_something +# end +# +# @example AllowSafeAssignment: false +# # bad +# if (some_var = value) +# do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:41 +class RuboCop::Cop::Lint::AssignmentInCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SafeAssignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:55 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:68 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:67 + def on_while(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:80 + def allowed_construct?(asgn_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:84 + def conditional_assignment?(asgn_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:72 + def message(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:88 + def skip_children?(asgn_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:94 + def traverse_node(node, &block); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:53 +RuboCop::Cop::Lint::AssignmentInCondition::ASGN_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:50 +RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITHOUT_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:46 +RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITH_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) + +# `BigDecimal.new()` is deprecated since BigDecimal 1.3.3. +# This cop identifies places where `BigDecimal.new()` +# can be replaced by `BigDecimal()`. +# +# @example +# # bad +# BigDecimal.new(123.456, 3) +# +# # good +# BigDecimal(123.456, 3) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/big_decimal_new.rb:17 +class RuboCop::Cop::Lint::BigDecimalNew < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/big_decimal_new.rb:24 + def big_decimal_new(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/big_decimal_new.rb:29 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/big_decimal_new.rb:20 +RuboCop::Cop::Lint::BigDecimalNew::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/big_decimal_new.rb:21 +RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where binary operator has identical operands. +# +# It covers comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, ``<=``; +# bitwise operators: `|`, `^`, `&`; +# boolean operators: `&&`, `||` +# and "spaceship" operator - ``<=>``. +# +# Simple arithmetic operations are allowed by this cop: `+`, `*`, `**`, `<<` and `>>`. +# Although these can be rewritten in a different way, it should not be necessary to +# do so. Operations such as `-` or `/` where the result will always be the same +# (`x - x` will always be 0; `x / x` will always be 1) are offenses, but these +# are covered by `Lint/NumericOperationWithConstantResult` instead. +# +# @safety +# This cop is unsafe as it does not consider side effects when calling methods +# and thus can generate false positives, for example: +# +# [source,ruby] +# ---- +# if wr.take_char == '\0' && wr.take_char == '\0' +# # ... +# end +# ---- +# +# @example +# # bad +# x.top >= x.top +# +# if a.x != 0 && a.x != 0 +# do_something +# end +# +# def child? +# left_child || left_child +# end +# +# # good +# x + x +# 1 << 1 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb:46 +class RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb:57 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb:62 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb:50 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb:47 +RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb:48 +RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `:true` and `:false` symbols. +# In most cases it would be a typo. +# +# @safety +# Autocorrection is unsafe for this cop because code relying +# on `:true` or `:false` symbols will break when those are +# changed to actual booleans. +# +# @example +# +# # bad +# :true +# +# # good +# true +# +# # bad +# :false +# +# # good +# false +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/boolean_symbol.rb:27 +class RuboCop::Cop::Lint::BooleanSymbol < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/boolean_symbol.rb:33 + def boolean_symbol?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/boolean_symbol.rb:35 + def on_sym(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/boolean_symbol.rb:48 + def autocorrect(corrector, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/boolean_symbol.rb:30 +RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) + +# Checks for circular argument references in optional keyword +# arguments and optional ordinal arguments. +# +# NOTE: This syntax was made invalid on Ruby 2.7 - Ruby 3.3 but is allowed +# again since Ruby 3.4. +# +# @example +# +# # bad +# def bake(pie: pie) +# pie.heat_up +# end +# +# # good +# def bake(pie:) +# pie.refrigerate +# end +# +# # good +# def bake(pie: self.pie) +# pie.feed_to(user) +# end +# +# # bad +# def cook(dry_ingredients = dry_ingredients) +# dry_ingredients.reduce(&:+) +# end +# +# # good +# def cook(dry_ingredients = self.dry_ingredients) +# dry_ingredients.combine +# end +# +# # bad +# def foo(pie = pie = pie) +# pie.heat_up +# end +# +# # good +# def foo(pie) +# pie.heat_up +# end +# +# # bad +# def foo(pie = cake = pie) +# [pie, cake].each(&:heat_up) +# end +# +# # good +# def foo(cake = pie) +# [pie, cake].each(&:heat_up) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/circular_argument_reference.rb:58 +class RuboCop::Cop::Lint::CircularArgumentReference < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/circular_argument_reference.rb:63 + def on_kwoptarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/circular_argument_reference.rb:67 + def on_optarg(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/circular_argument_reference.rb:84 + def check_assignment_chain(arg_name, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/circular_argument_reference.rb:73 + def check_for_circular_argument_references(arg_name, arg_value); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/circular_argument_reference.rb:61 +RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String) + +# Do not define constants within a block, since the block's scope does not +# isolate or namespace the constant in any way. +# +# If you are trying to define that constant once, define it outside of +# the block instead, or use a variable or method if defining the constant +# in the outer scope would be problematic. +# +# For meta-programming, use `const_set`. +# +# @example +# # bad +# task :lint do +# FILES_TO_LINT = Dir['lib/*.rb'] +# end +# +# # bad +# describe 'making a request' do +# class TestRequest; end +# end +# +# # bad +# module M +# extend ActiveSupport::Concern +# included do +# LIST = [] +# end +# end +# +# # good +# task :lint do +# files_to_lint = Dir['lib/*.rb'] +# end +# +# # good +# describe 'making a request' do +# let(:test_request) { Class.new } +# # see also `stub_const` for RSpec +# end +# +# # good +# module M +# extend ActiveSupport::Concern +# included do +# const_set(:LIST, []) +# end +# end +# +# @example AllowedMethods: ['enums'] (default) +# # good +# +# # `enums` for Typed Enums via `T::Enum` in Sorbet. +# # https://sorbet.org/docs/tenum +# class TestEnum < T::Enum +# enums do +# Foo = new("foo") +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:64 +class RuboCop::Cop::Lint::ConstantDefinitionInBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:70 + def constant_assigned_in_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:75 + def module_defined_in_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:79 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:85 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:90 + def on_module(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:94 + def method_name(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:67 +RuboCop::Cop::Lint::ConstantDefinitionInBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for overwriting an exception with an exception result by use ``rescue =>``. +# +# You intended to write as `rescue StandardError`. +# However, you have written `rescue => StandardError`. +# In that case, the result of `rescue` will overwrite `StandardError`. +# +# @example +# +# # bad +# begin +# something +# rescue => StandardError +# end +# +# # good +# begin +# something +# rescue StandardError +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb:26 +class RuboCop::Cop::Lint::ConstantOverwrittenInRescue < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb:41 + def on_resbody(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb:33 + def overwritten_constant(param0 = T.unsafe(nil)); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb:37 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb:30 +RuboCop::Cop::Lint::ConstantOverwrittenInRescue::MSG = T.let(T.unsafe(nil), String) + +# Checks for constant reassignments. +# +# Emulates Ruby's runtime warning "already initialized constant X" +# when a constant is reassigned in the same file and namespace. +# +# The cop tracks constants defined via `NAME = value` syntax as well as +# class/module keyword definitions. It detects reassignment when a constant +# is first defined one way and then redefined using the `NAME = value` syntax. +# +# The cop cannot catch all offenses, like, for example, when a constant +# is reassigned in another file, or when using metaprogramming (`Module#const_set`). +# +# The cop only takes into account constants assigned in a "simple" way: directly +# inside class/module definition, or within another constant. Other type of assignments +# (e.g., inside a conditional) are disregarded. +# +# The cop also tracks constant removal using `Module#remove_const` with symbol +# or string argument. +# +# @example +# # bad +# X = :foo +# X = :bar +# +# # bad +# class A +# X = :foo +# X = :bar +# end +# +# # bad +# module A +# X = :foo +# X = :bar +# end +# +# # bad +# class FooError < StandardError; end +# FooError = Class.new(RuntimeError) +# +# # bad +# module M; end +# M = 1 +# +# # good - keep only one assignment +# X = :bar +# +# class A +# X = :bar +# end +# +# module A +# X = :bar +# end +# +# # good - use OR assignment +# X = :foo +# X ||= :bar +# +# # good - use conditional assignment +# X = :foo +# X = :bar unless defined?(X) +# +# # good - remove the assigned constant first +# class A +# X = :foo +# remove_const :X +# X = :bar +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:76 +class RuboCop::Cop::Lint::ConstantReassignment < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:99 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:87 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:93 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:109 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:82 + def remove_constant(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:164 + def ancestor_namespaces(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:192 + def constant_definitions; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:156 + def constant_display_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:160 + def constant_namespaces(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:177 + def definition_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:123 + def fixed_constant_path?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:136 + def freeze_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:140 + def fully_qualified_constant_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:152 + def fully_qualified_name_for(namespaces, constant); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:188 + def identifier_namespaces(identifier); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:127 + def simple_assignment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:171 + def unconditional_definition?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:77 +RuboCop::Cop::Lint::ConstantReassignment::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:79 +RuboCop::Cop::Lint::ConstantReassignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that certain constants are fully qualified. +# +# This is not enabled by default because it would mark a lot of offenses +# unnecessarily. +# +# Generally, gems should fully qualify all constants to avoid conflicts with +# the code that uses the gem. Enable this cop without using `Only`/`Ignore` +# +# Large projects will over time end up with one or two constant names that +# are problematic because of a conflict with a library or just internally +# using the same name a namespace and a class. To avoid too many unnecessary +# offenses, Enable this cop with `Only: [The, Constant, Names, Causing, Issues]` +# +# NOTE: `Style/RedundantConstantBase` cop is disabled if this cop is enabled to prevent +# conflicting rules. Because it respects user configurations that want to enable +# this cop which is disabled by default. +# +# @example +# # By default checks every constant +# +# # bad +# User +# +# # bad +# User::Login +# +# # good +# ::User +# +# # good +# ::User::Login +# +# @example Only: ['Login'] +# # Restrict this cop to only being concerned about certain constants +# +# # bad +# Login +# +# # good +# ::Login +# +# # good +# User::Login +# +# @example Ignore: ['Login'] +# # Restrict this cop not being concerned about certain constants +# +# # bad +# User +# +# # good +# ::User::Login +# +# # good +# Login +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:62 +class RuboCop::Cop::Lint::ConstantResolution < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:70 + def on_const(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:66 + def unqualified_const?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:83 + def allowed_names; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:78 + def const_name?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:87 + def ignored_names; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:63 +RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) + +# are strictly formatted. +# +# A comment can be added to the directive by prefixing it with `--`. +# +# @example +# # bad +# +# # good +# +# # bad +# +# # good +# +# # bad +# +# # good +# +# # bad +# +# # good +# +# # bad +# +# # good +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:45 +class RuboCop::Cop::Lint::CopDirectiveSyntax < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:54 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:68 + def offense_message(directive_comment); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:46 +RuboCop::Cop::Lint::CopDirectiveSyntax::COMMON_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:49 +RuboCop::Cop::Lint::CopDirectiveSyntax::INVALID_MODE_NAME_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:51 +RuboCop::Cop::Lint::CopDirectiveSyntax::MALFORMED_COP_NAMES_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:50 +RuboCop::Cop::Lint::CopDirectiveSyntax::MISSING_COP_NAME_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:48 +RuboCop::Cop::Lint::CopDirectiveSyntax::MISSING_MODE_NAME_MSG = T.let(T.unsafe(nil), String) + +# Checks unexpected overrides of the `Data` built-in methods +# via `Data.define`. +# +# @example +# # bad +# Bad = Data.define(:members, :clone, :to_s) +# b = Bad.new(members: [], clone: true, to_s: 'bad') +# b.members #=> [] (overriding `Data#members`) +# b.clone #=> true (overriding `Object#clone`) +# b.to_s #=> "bad" (overriding `Data#to_s`) +# +# # good +# Good = Data.define(:id, :name) +# g = Good.new(id: 1, name: "foo") +# g.members #=> [:id, :name] +# g.clone #=> # +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/data_define_override.rb:23 +class RuboCop::Cop::Lint::DataDefineOverride < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/data_define_override.rb:41 + def data_define(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/data_define_override.rb:46 + def on_send(node); end +end + +# This is based on `Data.define.instance_methods.sort` in Ruby 4.0.0. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/data_define_override.rb:28 +RuboCop::Cop::Lint::DataDefineOverride::DATA_METHOD_NAMES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/data_define_override.rb:38 +RuboCop::Cop::Lint::DataDefineOverride::MEMBER_NAME_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/data_define_override.rb:24 +RuboCop::Cop::Lint::DataDefineOverride::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/data_define_override.rb:25 +RuboCop::Cop::Lint::DataDefineOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for debug calls (such as `debugger` or `binding.pry`) that should +# not be kept for production code. +# +# The cop can be configured using `DebuggerMethods`. By default, a number of gems +# debug entrypoints are configured (`Kernel`, `Byebug`, `Capybara`, `debug.rb`, +# `Pry`, `Rails`, `RubyJard`, and `WebConsole`). Additional methods can be added. +# +# Specific default groups can be disabled if necessary: +# +# [source,yaml] +# ---- +# Lint/Debugger: +# DebuggerMethods: +# WebConsole: ~ +# ---- +# +# You can also add your own methods by adding a new category: +# +# [source,yaml] +# ---- +# Lint/Debugger: +# DebuggerMethods: +# MyDebugger: +# MyDebugger.debug_this +# ---- +# +# Some gems also ship files that will start a debugging session when required, +# for example `require 'debug/start'` from `ruby/debug`. These requires can +# be configured through `DebuggerRequires`. It has the same structure as +# `DebuggerMethods`, which you can read about above. +# +# @example +# +# # bad (ok during development) +# +# # using pry +# def some_method +# binding.pry +# do_something +# end +# +# # bad (ok during development) +# +# # using byebug +# def some_method +# byebug +# do_something +# end +# +# # good +# +# def some_method +# do_something +# end +# +# @example DebuggerMethods: [my_debugger] +# +# # bad (ok during development) +# +# def some_method +# my_debugger +# end +# +# @example DebuggerRequires: [my_debugger/start] +# +# # bad (ok during development) +# +# require 'my_debugger/start' +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:74 +class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:78 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:136 + def assumed_argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:115 + def assumed_usage_context?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:125 + def chained_method_name(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:104 + def debugger_method?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:90 + def debugger_methods; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:108 + def debugger_require?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:97 + def debugger_requires; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:86 + def message(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:76 +RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:75 +RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of the deprecated class method usages. +# +# @example +# +# # bad +# File.exists?(some_path) +# Dir.exists?(some_path) +# iterator? +# attr :name, true +# attr :name, false +# ENV.freeze # Calling `Env.freeze` raises `TypeError` since Ruby 2.7. +# ENV.clone +# ENV.dup # Calling `Env.dup` raises `TypeError` since Ruby 3.1. +# Socket.gethostbyname(host) +# Socket.gethostbyaddr(host) +# +# # good +# File.exist?(some_path) +# Dir.exist?(some_path) +# block_given? +# attr_accessor :name +# attr_reader :name +# ENV # `ENV.freeze` cannot prohibit changes to environment variables. +# ENV.to_h +# ENV.to_h # `ENV.dup` cannot dup `ENV`, use `ENV.to_h` to get a copy of `ENV` as a hash. +# Addrinfo.getaddrinfo(nodename, service) +# Addrinfo.tcp(host, port).getnameinfo +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:33 +class RuboCop::Cop::Lint::DeprecatedClassMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:53 + def deprecated_class_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:63 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:112 + def dir_env_file_const?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:83 + def offense_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:93 + def preferred_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:108 + def socket_const?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:50 +RuboCop::Cop::Lint::DeprecatedClassMethods::DIR_ENV_FILE_CONSTANTS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:36 +RuboCop::Cop::Lint::DeprecatedClassMethods::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:41 +RuboCop::Cop::Lint::DeprecatedClassMethods::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:37 +RuboCop::Cop::Lint::DeprecatedClassMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for deprecated constants. +# +# It has `DeprecatedConstants` config. If there is an alternative method, you can set +# alternative value as `Alternative`. And you can set the deprecated version as +# `DeprecatedVersion`. These options can be omitted if they are not needed. +# +# DeprecatedConstants: +# 'DEPRECATED_CONSTANT': +# Alternative: 'alternative_value' +# DeprecatedVersion: 'deprecated_version' +# +# By default, `NIL`, `TRUE`, `FALSE`, `Net::HTTPServerException, `Random::DEFAULT`, +# `Struct::Group`, and `Struct::Passwd` are configured. +# +# @example +# +# # bad +# NIL +# TRUE +# FALSE +# Net::HTTPServerException +# Random::DEFAULT # Return value of Ruby 2 is `Random` instance, Ruby 3.0 is `Random` class. +# Struct::Group +# Struct::Passwd +# +# # good +# nil +# true +# false +# Net::HTTPClientException +# Random.new # `::DEFAULT` has been deprecated in Ruby 3, `.new` is compatible with Ruby 2. +# Etc::Group +# Etc::Passwd +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_constants.rb:40 +class RuboCop::Cop::Lint::DeprecatedConstants < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_constants.rb:46 + def on_const(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_constants.rb:66 + def constant_name(node, nested_constant_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_constants.rb:82 + def deprecated_constants; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_constants.rb:72 + def message(good, bad, deprecated_version); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_constants.rb:44 +RuboCop::Cop::Lint::DeprecatedConstants::DO_NOT_USE_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_constants.rb:43 +RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil), String) + +# Algorithmic constants for `OpenSSL::Cipher` and `OpenSSL::Digest` +# deprecated since OpenSSL version 2.2.0. Prefer passing a string +# instead. +# +# @example +# +# # bad +# OpenSSL::Cipher::AES.new(128, :GCM) +# +# # good +# OpenSSL::Cipher.new('aes-128-gcm') +# +# # bad +# OpenSSL::Digest::SHA256.new +# +# # good +# OpenSSL::Digest.new('SHA256') +# +# # bad +# OpenSSL::Digest::SHA256.digest('foo') +# +# # good +# OpenSSL::Digest.digest('SHA256', 'foo') +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:30 +class RuboCop::Cop::Lint::DeprecatedOpenSSLConstant < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:40 + def algorithm_const(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:50 + def digest_const?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:54 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:101 + def algorithm_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:66 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:133 + def build_cipher_arguments(node, algorithm_name, no_arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:93 + def correction_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:78 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:97 + def openssl_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:119 + def replacement_args(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:111 + def sanitize_arguments(arguments); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:34 +RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:37 +RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::NO_ARG_ALGORITHM = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:36 +RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks constructors for disjunctive assignments (`||=`) that should +# be plain assignments. +# +# So far, this cop is only concerned with disjunctive assignment of +# instance variables. +# +# In ruby, an instance variable is nil until a value is assigned, so the +# disjunction is unnecessary. A plain assignment has the same effect. +# +# @safety +# This cop is unsafe because it can register a false positive when a +# method is redefined in a subclass that calls super. For example: +# +# [source,ruby] +# ---- +# class Base +# def initialize +# @config ||= 'base' +# end +# end +# +# class Derived < Base +# def initialize +# @config = 'derived' +# super +# end +# end +# ---- +# +# Without the disjunctive assignment, `Derived` will be unable to override +# the value for `@config`. +# +# @example +# # bad +# def initialize +# @x ||= 1 +# end +# +# # good +# def initialize +# @x = 1 +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb:48 +class RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb:53 + def on_def(node); end + + private + + # @param [DefNode] node a constructor definition + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb:60 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb:66 + def check_body(body); end + + # @param [Array] lines the logical lines of the constructor + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb:78 + def check_body_lines(lines); end + + # Add an offense if the LHS of the given disjunctive assignment is + # an instance variable. + # + # For now, we only care about assignments to instance variables. + # + # @param [Node] node a disjunctive assignment + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb:99 + def check_disjunctive_assignment(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb:51 +RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated bodies +# within `if/unless`, `case-when`, `case-in` and `rescue` constructs. +# +# With `IgnoreLiteralBranches: true`, branches are not registered +# as offenses if they return a basic literal value (string, symbol, +# integer, float, rational, complex, `true`, `false`, or `nil`), or +# return an array, hash, regexp or range that only contains one of +# the above basic literal values. +# +# With `IgnoreConstantBranches: true`, branches are not registered +# as offenses if they return a constant value. +# +# With `IgnoreDuplicateElseBranch: true`, in conditionals with multiple branches, +# duplicate 'else' branches are not registered as offenses. +# +# @example +# # bad +# if foo +# do_foo +# do_something_else +# elsif bar +# do_foo +# do_something_else +# end +# +# # good +# if foo || bar +# do_foo +# do_something_else +# end +# +# # bad +# case x +# when foo +# do_foo +# when bar +# do_foo +# else +# do_something_else +# end +# +# # good +# case x +# when foo, bar +# do_foo +# else +# do_something_else +# end +# +# # bad +# begin +# do_something +# rescue FooError +# handle_error +# rescue BarError +# handle_error +# end +# +# # good +# begin +# do_something +# rescue FooError, BarError +# handle_error +# end +# +# @example IgnoreLiteralBranches: true +# # good +# case size +# when "small" then 100 +# when "medium" then 250 +# when "large" then 1000 +# else 250 +# end +# +# @example IgnoreConstantBranches: true +# # good +# case size +# when "small" then SMALL_SIZE +# when "medium" then MEDIUM_SIZE +# when "large" then LARGE_SIZE +# else MEDIUM_SIZE +# end +# +# @example IgnoreDuplicateElseBranch: true +# # good +# if foo +# do_foo +# elsif bar +# do_bar +# else +# do_foo +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:99 +class RuboCop::Cop::Lint::DuplicateBranch < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:102 + def on_branching_statement(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:110 + def on_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:111 + def on_case_match(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:114 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:112 + def on_rescue(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:136 + def branches(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:140 + def consider_branch?(branches, branch); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:174 + def const_branch?(branch); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:178 + def duplicate_else_branch?(branches, branch); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:155 + def ignore_constant_branches?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:159 + def ignore_duplicate_else_branches?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:151 + def ignore_literal_branches?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:163 + def literal_branch?(branch); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:122 + def offense_range(duplicate_branch); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:100 +RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated conditions +# used in case 'when' expressions. +# +# @example +# +# # bad +# case x +# when 'first' +# do_something +# when 'first' +# do_something_else +# end +# +# # good +# case x +# when 'first' +# do_something +# when 'second' +# do_something_else +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_case_condition.rb:26 +class RuboCop::Cop::Lint::DuplicateCaseCondition < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_case_condition.rb:29 + def on_case(case_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_case_condition.rb:27 +RuboCop::Cop::Lint::DuplicateCaseCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated conditions used in if 'elsif'. +# +# @example +# # bad +# if x == 1 +# do_something +# elsif x == 1 +# do_something_else +# end +# +# # good +# if x == 1 +# do_something +# elsif x == 2 +# do_something_else +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_elsif_condition.rb:23 +class RuboCop::Cop::Lint::DuplicateElsifCondition < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_elsif_condition.rb:26 + def on_if(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_elsif_condition.rb:24 +RuboCop::Cop::Lint::DuplicateElsifCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicated keys in hash literals. +# This cop considers both primitive types and constants for the hash keys. +# +# This cop mirrors a warning in Ruby 2.2. +# +# @example +# +# # bad +# hash = { food: 'apple', food: 'orange' } +# +# # good +# hash = { food: 'apple', other_food: 'orange' } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_hash_key.rb:18 +class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Duplication + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_hash_key.rb:23 + def on_hash(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_hash_key.rb:21 +RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicated magic comments. +# +# @example +# +# # bad +# +# +# # good +# +# +# # bad +# +# +# # good +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_magic_comment.rb:28 +class RuboCop::Cop::Lint::DuplicateMagicComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_magic_comment.rb:35 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_magic_comment.rb:51 + def magic_comment_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_magic_comment.rb:65 + def register_offense(range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_magic_comment.rb:33 +RuboCop::Cop::Lint::DuplicateMagicComment::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated patterns used in `in` keywords. +# +# @example +# +# # bad +# case x +# in 'first' +# do_something +# in 'first' +# do_something_else +# end +# +# # good +# case x +# in 'first' +# do_something +# in 'second' +# do_something_else +# end +# +# # bad - repeated alternate patterns with the same conditions don't depend on the order +# case x +# in 0 | 1 +# first_method +# in 1 | 0 +# second_method +# end +# +# # good +# case x +# in 0 | 1 +# first_method +# in 2 | 3 +# second_method +# end +# +# # bad - repeated hash patterns with the same conditions don't depend on the order +# case x +# in foo: a, bar: b +# first_method +# in bar: b, foo: a +# second_method +# end +# +# # good +# case x +# in foo: a, bar: b +# first_method +# in bar: b, baz: c +# second_method +# end +# +# # bad - repeated array patterns with elements in the same order +# case x +# in [foo, bar] +# first_method +# in [foo, bar] +# second_method +# end +# +# # good +# case x +# in [foo, bar] +# first_method +# in [bar, foo] +# second_method +# end +# +# # bad - repeated the same patterns and guard conditions +# case x +# in foo if bar +# first_method +# in foo if bar +# second_method +# end +# +# # good +# case x +# in foo if bar +# first_method +# in foo if baz +# second_method +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_match_pattern.rb:90 +class RuboCop::Cop::Lint::DuplicateMatchPattern < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_match_pattern.rb:97 + def on_case_match(case_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_match_pattern.rb:108 + def pattern_identity(pattern); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_match_pattern.rb:93 +RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicated instance (or singleton) method +# definitions. +# +# NOTE: Aliasing a method to itself is allowed, as it indicates that +# the developer intends to suppress Ruby's method redefinition warnings. +# See https://bugs.ruby-lang.org/issues/13574. +# +# @example +# +# # bad +# def foo +# 1 +# end +# +# def foo +# 2 +# end +# +# # bad +# def foo +# 1 +# end +# +# alias foo bar +# +# # good +# def foo +# 1 +# end +# +# def bar +# 2 +# end +# +# # good +# def foo +# 1 +# end +# +# alias bar foo +# +# # good +# alias foo foo +# def foo +# 1 +# end +# +# # good +# alias_method :foo, :foo +# def foo +# 1 +# end +# +# # bad +# class MyClass +# extend Forwardable +# +# # or with: `def_instance_delegator`, `def_delegators`, `def_instance_delegators` +# def_delegator :delegation_target, :delegated_method_name +# +# def delegated_method_name +# end +# end +# +# # good +# class MyClass +# extend Forwardable +# +# def_delegator :delegation_target, :delegated_method_name +# +# def non_duplicated_delegated_method_name +# end +# end +# +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# +# # good +# def foo +# 1 +# end +# +# delegate :foo, to: :bar +# +# @example AllCops:ActiveSupportExtensionsEnabled: true +# +# # bad +# def foo +# 1 +# end +# +# delegate :foo, to: :bar +# +# # good +# def foo +# 1 +# end +# +# delegate :baz, to: :bar +# +# # good - delegate with splat arguments is ignored +# def foo +# 1 +# end +# +# delegate :foo, **options +# +# # good - delegate inside a condition is ignored +# def foo +# 1 +# end +# +# if cond +# delegate :foo, to: :bar +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:121 +class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:127 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:167 + def alias_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:201 + def class_or_module_new_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:172 + def delegate_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:180 + def delegator?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:190 + def delegators?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:153 + def method_alias?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:157 + def on_alias(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:133 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:141 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:207 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:198 + def sym_name(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:317 + def anon_block_scope_id(anon_block); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:308 + def anonymous_class_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:234 + def check_const_receiver(node, name, const_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:241 + def check_self_receiver(node, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:270 + def delegate_prefix(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:395 + def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:286 + def found_instance_method(node, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:344 + def found_method(node, method_name, scope_id: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:333 + def found_sclass_method(node, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:282 + def hash_value(node, key); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:300 + def humanize_scope(scope); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:251 + def inside_condition?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:373 + def location(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:405 + def lookup_constant(node, const_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:255 + def message_for_dup(node, method_name, key); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:365 + def method_key(node, method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:328 + def named_receiver(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:381 + def on_attr(node, attr_name, args); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:260 + def on_delegate(node, method_names); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:423 + def qualified_name(enclosing, namespace, mod_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:437 + def source_location(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:122 +RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:123 +RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for duplicate elements in `Regexp` character classes. +# +# @example +# +# # bad +# r = /[xyx]/ +# +# # bad +# r = /[0-9x0-9]/ +# +# # good +# r = /[xy]/ +# +# # good +# r = /[0-9x]/ +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:21 +class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:35 + def each_repeated_character_class_element_loc(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:27 + def on_regexp(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:52 + def group_expressions(node, expressions); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:73 + def interpolation_locs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:60 + def skip_expression?(expr); end + + # Since we blank interpolations with a space for every char of the interpolation, we would + # mark every space (except the first) as duplicate if we do not skip regexp_parser nodes + # that are within an interpolation. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:67 + def within_interpolation?(node, child); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:25 +RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::MSG_REPEATED_ELEMENT = T.let(T.unsafe(nil), String) + +# Checks for duplicate ``require``s and ``require_relative``s. +# +# @safety +# This cop's autocorrection is unsafe because it may break the dependency order +# of `require`. +# +# @example +# # bad +# require 'foo' +# require 'bar' +# require 'foo' +# +# # good +# require 'foo' +# require 'bar' +# +# # good +# require 'foo' +# require_relative 'foo' +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_require.rb:26 +class RuboCop::Cop::Lint::DuplicateRequire < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_require.rb:39 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_require.rb:45 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_require.rb:35 + def require_call?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_require.rb:30 +RuboCop::Cop::Lint::DuplicateRequire::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_require.rb:31 +RuboCop::Cop::Lint::DuplicateRequire::REQUIRE_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_require.rb:32 +RuboCop::Cop::Lint::DuplicateRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Checks that there are no repeated exceptions +# used in 'rescue' expressions. +# +# @example +# # bad +# begin +# something +# rescue FirstException +# handle_exception +# rescue FirstException +# handle_other_exception +# end +# +# # good +# begin +# something +# rescue FirstException +# handle_exception +# rescue SecondException +# handle_other_exception +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_rescue_exception.rb:28 +class RuboCop::Cop::Lint::DuplicateRescueException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_rescue_exception.rb:33 + def on_rescue(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_rescue_exception.rb:31 +RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicate literal, constant, or variable elements in `Set` and `SortedSet`. +# +# @example +# +# # bad +# Set[:foo, :bar, :foo] +# +# # good +# Set[:foo, :bar] +# +# # bad +# Set.new([:foo, :bar, :foo]) +# +# # good +# Set.new([:foo, :bar]) +# +# # bad +# [:foo, :bar, :foo].to_set +# +# # good +# [:foo, :bar].to_set +# +# # bad +# SortedSet[:foo, :bar, :foo] +# +# # good +# SortedSet[:foo, :bar] +# +# # bad +# SortedSet.new([:foo, :bar, :foo]) +# +# # good +# SortedSet.new([:foo, :bar]) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_set_element.rb:39 +class RuboCop::Cop::Lint::DuplicateSetElement < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_set_element.rb:71 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_set_element.rb:54 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_set_element.rb:46 + def set_init_elements(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_set_element.rb:75 + def register_offense(current_element, prev_element, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_set_element.rb:42 +RuboCop::Cop::Lint::DuplicateSetElement::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_set_element.rb:43 +RuboCop::Cop::Lint::DuplicateSetElement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if each_with_object is called with an immutable +# argument. Since the argument is the object that the given block shall +# make calls on to build something based on the enumerable that +# each_with_object iterates over, an immutable argument makes no sense. +# It's definitely a bug. +# +# @example +# +# # bad +# sum = numbers.each_with_object(0) { |e, a| a += e } +# +# # good +# num = 0 +# sum = numbers.each_with_object(num) { |e, a| a += e } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/each_with_object_argument.rb:20 +class RuboCop::Cop::Lint::EachWithObjectArgument < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/each_with_object_argument.rb:25 + def each_with_object?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/each_with_object_argument.rb:36 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/each_with_object_argument.rb:29 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/each_with_object_argument.rb:21 +RuboCop::Cop::Lint::EachWithObjectArgument::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/each_with_object_argument.rb:22 +RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for odd `else` block layout - like +# having an expression on the same line as the `else` keyword, +# which is usually a mistake. +# +# Its autocorrection tweaks layout to keep the syntax. So, this autocorrection +# is compatible correction for bad case syntax, but if your code makes a mistake +# with `elsif` and `else`, you will have to correct it manually. +# +# @example +# +# # bad +# +# if something +# # ... +# else do_this +# do_that +# end +# +# # good +# +# # This code is compatible with the bad case. It will be autocorrected like this. +# if something +# # ... +# else +# do_this +# do_that +# end +# +# # This code is incompatible with the bad case. +# # If `do_this` is a condition, `elsif` should be used instead of `else`. +# if something +# # ... +# elsif do_this +# do_that +# end +# +# # bad +# +# # For single-line conditionals using `then` the layout is disallowed +# # when the `else` body is multiline because it is treated as a lint offense. +# if something then on_the_same_line_as_then +# else first_line +# second_line +# end +# +# # good +# +# # For single-line conditional using `then` the layout is allowed +# # when `else` body is a single-line because it is treated as intentional. +# +# if something then on_the_same_line_as_then +# else single_line +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/else_layout.rb:59 +class RuboCop::Cop::Lint::ElseLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/else_layout.rb:66 + def on_if(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/else_layout.rb:98 + def autocorrect(corrector, node, first_else); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/else_layout.rb:78 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/else_layout.rb:88 + def check_else(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/else_layout.rb:64 +RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String) + +# Checks for blocks without a body. +# Such empty blocks are typically an oversight or we should provide a comment +# to clarify what we're aiming for. +# +# Empty lambdas and procs are ignored by default. +# +# NOTE: For backwards compatibility, the configuration that allows/disallows +# empty lambdas and procs is called `AllowEmptyLambdas`, even though it also +# applies to procs. +# +# @example +# # bad +# items.each { |item| } +# +# # good +# items.each { |item| puts item } +# +# @example AllowComments: true (default) +# # good +# items.each do |item| +# # TODO: implement later (inner comment) +# end +# +# items.each { |item| } # TODO: implement later (inline comment) +# +# @example AllowComments: false +# # bad +# items.each do |item| +# # TODO: implement later (inner comment) +# end +# +# items.each { |item| } # TODO: implement later (inline comment) +# +# @example AllowEmptyLambdas: true (default) +# # good +# allow(subject).to receive(:callable).and_return(-> {}) +# +# placeholder = lambda do +# end +# (callable || placeholder).call +# +# proc { } +# +# Proc.new { } +# +# @example AllowEmptyLambdas: false +# # bad +# allow(subject).to receive(:callable).and_return(-> {}) +# +# placeholder = lambda do +# end +# (callable || placeholder).call +# +# proc { } +# +# Proc.new { } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_block.rb:63 +class RuboCop::Cop::Lint::EmptyBlock < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_block.rb:66 + def on_block(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_block.rb:76 + def allow_comment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_block.rb:83 + def allow_empty_lambdas?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_block.rb:87 + def comment_disables_cop?(comment); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_block.rb:64 +RuboCop::Cop::Lint::EmptyBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for classes and metaclasses without a body. +# Such empty classes and metaclasses are typically an oversight or we should provide a comment +# to be clearer what we're aiming for. +# +# @example +# # bad +# class Foo +# end +# +# class Bar +# class << self +# end +# end +# +# class << obj +# end +# +# # good +# class Foo +# def do_something +# # ... code +# end +# end +# +# class Bar +# class << self +# attr_reader :bar +# end +# end +# +# class << obj +# attr_reader :bar +# end +# +# @example AllowComments: false (default) +# # bad +# class Foo +# # TODO: implement later +# end +# +# class Bar +# class << self +# # TODO: implement later +# end +# end +# +# class << obj +# # TODO: implement later +# end +# +# @example AllowComments: true +# # good +# class Foo +# # TODO: implement later +# end +# +# class Bar +# class << self +# # TODO: implement later +# end +# end +# +# class << obj +# # TODO: implement later +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_class.rb:72 +class RuboCop::Cop::Lint::EmptyClass < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_class.rb:76 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_class.rb:81 + def on_sclass(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_class.rb:87 + def body_or_allowed_comment_lines?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_class.rb:73 +RuboCop::Cop::Lint::EmptyClass::CLASS_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_class.rb:74 +RuboCop::Cop::Lint::EmptyClass::METACLASS_MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of `if`, `elsif` and `unless` branches without a body. +# +# NOTE: empty `else` branches are handled by `Style/EmptyElse`. +# +# @example +# # bad +# if condition +# end +# +# # bad +# unless condition +# end +# +# # bad +# if condition +# do_something +# elsif other_condition +# end +# +# # good +# if condition +# do_something +# end +# +# # good +# unless condition +# do_something +# end +# +# # good +# if condition +# do_something +# elsif other_condition +# nil +# end +# +# # good +# if condition +# do_something +# elsif other_condition +# do_something_else +# end +# +# @example AllowComments: true (default) +# # good +# if condition +# do_something +# elsif other_condition +# # noop +# end +# +# @example AllowComments: false +# # bad +# if condition +# do_something +# elsif other_condition +# # noop +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:65 +class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:71 + def on_if(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:86 + def allow_comments?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:130 + def branch_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:99 + def can_simplify_conditional?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:138 + def deletion_range(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:126 + def else_branch?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:118 + def empty_if_branch?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:113 + def flip_orphaned_else(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:91 + def offense_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:103 + def remove_empty_branch(corrector, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:69 +RuboCop::Cop::Lint::EmptyConditionalBody::MSG = T.let(T.unsafe(nil), String) + +# Checks for empty `ensure` blocks. +# +# @example +# +# # bad +# def some_method +# do_something +# ensure +# end +# +# # bad +# begin +# do_something +# ensure +# end +# +# # good +# def some_method +# do_something +# ensure +# do_something_else +# end +# +# # good +# begin +# do_something +# ensure +# do_something_else +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_ensure.rb:35 +class RuboCop::Cop::Lint::EmptyEnsure < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_ensure.rb:40 + def on_ensure(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_ensure.rb:38 +RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of empty expressions. +# +# @example +# +# # bad +# +# foo = () +# if () +# bar +# end +# +# # good +# +# foo = (some_expression) +# if (some_expression) +# bar +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_expression.rb:23 +class RuboCop::Cop::Lint::EmptyExpression < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_expression.rb:26 + def on_begin(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_expression.rb:34 + def empty_expression?(begin_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_expression.rb:24 +RuboCop::Cop::Lint::EmptyExpression::MSG = T.let(T.unsafe(nil), String) + +# Enforces that Ruby source files are not empty. +# +# @example +# # bad +# # Empty file +# +# # good +# # File containing non commented source lines +# +# @example AllowComments: true (default) +# # good +# # File consisting only of comments +# +# @example AllowComments: false +# # bad +# # File consisting only of comments +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_file.rb:23 +class RuboCop::Cop::Lint::EmptyFile < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_file.rb:26 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_file.rb:40 + def contains_only_comments?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_file.rb:36 + def empty_file?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_file.rb:32 + def offending?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_file.rb:24 +RuboCop::Cop::Lint::EmptyFile::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of `in` pattern branches without a body. +# +# @example +# +# # bad +# case condition +# in [a] +# do_something +# in [a, b] +# end +# +# # good +# case condition +# in [a] +# do_something +# in [a, b] +# nil +# end +# +# @example AllowComments: true (default) +# +# # good +# case condition +# in [a] +# do_something +# in [a, b] +# # noop +# end +# +# @example AllowComments: false +# +# # bad +# case condition +# in [a] +# do_something +# in [a, b] +# # noop +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_in_pattern.rb:45 +class RuboCop::Cop::Lint::EmptyInPattern < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_in_pattern.rb:53 + def on_case_match(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_in_pattern.rb:64 + def allow_comments?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_in_pattern.rb:49 +RuboCop::Cop::Lint::EmptyInPattern::MSG = T.let(T.unsafe(nil), String) + +# Checks for empty interpolation. +# +# @example +# +# # bad +# "result is #{}" +# +# # good +# "result is #{some_result}" +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_interpolation.rb:15 +class RuboCop::Cop::Lint::EmptyInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_interpolation.rb:21 + def on_interpolation(begin_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_interpolation.rb:33 + def in_percent_literal_array?(begin_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_interpolation.rb:19 +RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of `when` branches without a body. +# +# @example +# +# # bad +# case foo +# when bar +# do_something +# when baz +# end +# +# # good +# case condition +# when foo +# do_something +# when bar +# nil +# end +# +# @example AllowComments: true (default) +# +# # good +# case condition +# when foo +# do_something +# when bar +# # noop +# end +# +# @example AllowComments: false +# +# # bad +# case condition +# when foo +# do_something +# when bar +# # do nothing +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_when.rb:45 +class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_when.rb:50 + def on_case(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_when.rb:61 + def allow_comments?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_when.rb:48 +RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) + +# Checks for `return` from an `ensure` block. +# `return` from an ensure block is a dangerous code smell as it +# will take precedence over any exception being raised, +# and the exception will be silently thrown away as if it were rescued. +# +# If you want to rescue some (or all) exceptions, best to do it explicitly +# +# @example +# +# # bad +# def foo +# do_something +# ensure +# cleanup +# return self +# end +# +# # good +# def foo +# do_something +# self +# ensure +# cleanup +# end +# +# # good +# def foo +# begin +# do_something +# rescue SomeException +# # Let's ignore this exception +# end +# self +# ensure +# cleanup +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ensure_return.rb:42 +class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/ensure_return.rb:45 + def on_ensure(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ensure_return.rb:43 +RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) + +# Emulates the following Ruby warnings in Ruby 2.6. +# +# [source,console] +# ---- +# $ cat example.rb +# ERB.new('hi', nil, '-', '@output_buffer') +# $ ruby -rerb example.rb +# example.rb:1: warning: Passing safe_level with the 2nd argument of ERB.new is +# deprecated. Do not use it, and specify other arguments as keyword arguments. +# example.rb:1: warning: Passing trim_mode with the 3rd argument of ERB.new is +# deprecated. Use keyword argument like ERB.new(str, trim_mode:...) instead. +# example.rb:1: warning: Passing eoutvar with the 4th argument of ERB.new is +# deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead. +# ---- +# +# Now non-keyword arguments other than first one are softly deprecated +# and will be removed when Ruby 2.5 becomes EOL. +# `ERB.new` with non-keyword arguments is deprecated since ERB 2.2.0. +# Use `:trim_mode` and `:eoutvar` keyword arguments to `ERB.new`. +# This cop identifies places where `ERB.new(str, trim_mode, eoutvar)` can +# be replaced by `ERB.new(str, :trim_mode: trim_mode, eoutvar: eoutvar)`. +# +# @example +# # Target codes supports Ruby 2.6 and higher only +# # bad +# ERB.new(str, nil, '-', '@output_buffer') +# +# # good +# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') +# +# # Target codes supports Ruby 2.5 and lower only +# # good +# ERB.new(str, nil, '-', '@output_buffer') +# +# # Target codes supports Ruby 2.6, 2.5 and lower +# # bad +# ERB.new(str, nil, '-', '@output_buffer') +# +# # good +# # Ruby standard library style +# # https://github.com/ruby/ruby/commit/3406c5d +# if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+ +# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') +# else +# ERB.new(str, nil, '-', '@output_buffer') +# end +# +# # good +# # Use `RUBY_VERSION` style +# if RUBY_VERSION >= '2.6' +# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') +# else +# ERB.new(str, nil, '-', '@output_buffer') +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:61 +class RuboCop::Cop::Lint::ErbNewArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:81 + def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:86 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:115 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:130 + def build_kwargs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:126 + def correct_arguments?(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:104 + def message(positional_argument_index, arg_value); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:147 + def override_by_legacy_args(kwargs, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:74 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_EOUTVAR = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:68 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_SAFE_LEVEL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:71 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_TRIM_MODE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:78 +RuboCop::Cop::Lint::ErbNewArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for uses of flip-flop operator +# based on the Ruby Style Guide. +# +# Here is the history of flip-flops in Ruby. +# flip-flop operator is deprecated in Ruby 2.6.0 and +# the deprecation has been reverted by Ruby 2.7.0 and +# backported to Ruby 2.6. +# See: https://bugs.ruby-lang.org/issues/5400 +# +# @example +# # bad +# (1..20).each do |x| +# puts x if (x == 5) .. (x == 10) +# end +# +# # good +# (1..20).each do |x| +# puts x if (x >= 5) && (x <= 10) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/flip_flop.rb:25 +class RuboCop::Cop::Lint::FlipFlop < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/flip_flop.rb:32 + def on_eflipflop(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/flip_flop.rb:28 + def on_iflipflop(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/flip_flop.rb:26 +RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of precise comparison of floating point numbers. +# +# Floating point values are inherently inaccurate, and comparing them for exact equality +# is almost never the desired semantics. Comparison via the `==/!=` operators checks +# floating-point value representation to be exactly the same, which is very unlikely +# if you perform any arithmetic operations involving precision loss. +# +# @example +# # bad +# x == 0.1 +# x != 0.1 +# +# # bad +# case value +# when 1.0 +# foo +# when 2.0 +# bar +# end +# +# # good - using BigDecimal +# x.to_d == 0.1.to_d +# +# # good - comparing against zero +# x == 0.0 +# x != 0.0 +# +# # good +# (x - 0.1).abs < Float::EPSILON +# +# # good +# tolerance = 0.0001 +# (x - 0.1).abs < tolerance +# +# # good - comparing against nil +# Float(x, exception: false) == nil +# +# # good - using epsilon comparison in case expression +# case +# when (value - 1.0).abs < Float::EPSILON +# foo +# when (value - 2.0).abs < Float::EPSILON +# bar +# end +# +# # Or some other epsilon based type of comparison: +# # https://www.embeddeduse.com/2019/08/26/qt-compare-two-floats/ +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:54 +class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:78 + def on_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:76 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:65 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:90 + def float?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:111 + def float_send?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:105 + def literal_safe?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:122 + def numeric_returning_method?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:59 +RuboCop::Cop::Lint::FloatComparison::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:61 +RuboCop::Cop::Lint::FloatComparison::FLOAT_INSTANCE_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:60 +RuboCop::Cop::Lint::FloatComparison::FLOAT_RETURNING_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:57 +RuboCop::Cop::Lint::FloatComparison::MSG_CASE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:55 +RuboCop::Cop::Lint::FloatComparison::MSG_EQUALITY = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:56 +RuboCop::Cop::Lint::FloatComparison::MSG_INEQUALITY = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:63 +RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies `Float` literals which are, like, really really really +# really really really really really big. Too big. No-one needs Floats +# that big. If you need a float that big, something is wrong with you. +# +# @example +# +# # bad +# float = 3.0e400 +# +# # good +# float = 42.9 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_out_of_range.rb:17 +class RuboCop::Cop::Lint::FloatOutOfRange < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_out_of_range.rb:20 + def on_float(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_out_of_range.rb:18 +RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) + +# This lint sees if there is a mismatch between the number of +# expected fields for format/sprintf/#% and what is actually +# passed as arguments. +# +# In addition, it checks whether different formats are used in the same +# format string. Do not mix numbered, unnumbered, and named formats in +# the same format string. +# +# @example +# +# # bad +# format('A value: %s and another: %i', a_value) +# +# # good +# format('A value: %s and another: %i', a_value, another) +# +# # bad +# format('Unnumbered format: %s and numbered: %2$s', a_value, another) +# +# # good +# format('Numbered format: %1$s and numbered %2$s', a_value, another) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:27 +class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:90 + def called_on_string?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:39 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:127 + def count_format_matches(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:109 + def count_matches(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:131 + def count_percent_matches(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:119 + def countable_format?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:123 + def countable_percent?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:143 + def expected_fields_count(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:158 + def format?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:136 + def format_method?(name, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:54 + def format_string?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:105 + def heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:58 + def invalid_format_string?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:81 + def matched_arguments_count?(expected, passed); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:176 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:95 + def method_with_format_args?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:67 + def offending_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:166 + def percent?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:99 + def splat_args?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:162 + def sprintf?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:185 + def string_type?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:34 +RuboCop::Cop::Lint::FormatParameterMismatch::KERNEL = T.let(T.unsafe(nil), String) + +# http://rubular.com/r/CvpbxkcTzy +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:29 +RuboCop::Cop::Lint::FormatParameterMismatch::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:31 +RuboCop::Cop::Lint::FormatParameterMismatch::MSG_INVALID = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:37 +RuboCop::Cop::Lint::FormatParameterMismatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:35 +RuboCop::Cop::Lint::FormatParameterMismatch::SHOVEL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:36 +RuboCop::Cop::Lint::FormatParameterMismatch::STRING_TYPES = T.let(T.unsafe(nil), Array) + +# Prefer using `Hash#compare_by_identity` rather than using `object_id` +# for hash keys. +# +# This cop looks for hashes being keyed by objects' `object_id`, using +# one of these methods: `key?`, `has_key?`, `fetch`, `[]` and `[]=`. +# +# @safety +# This cop is unsafe. Although unlikely, the hash could store both object +# ids and other values that need be compared by value, and thus +# could be a false positive. +# +# Furthermore, this cop cannot guarantee that the receiver of one of the +# methods (`key?`, etc.) is actually a hash. +# +# @example +# # bad +# hash = {} +# hash[foo.object_id] = :bar +# hash.key?(baz.object_id) +# +# # good +# hash = {}.compare_by_identity +# hash[foo] = :bar +# hash.key?(baz) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/hash_compare_by_identity.rb:31 +class RuboCop::Cop::Lint::HashCompareByIdentity < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/hash_compare_by_identity.rb:37 + def id_as_hash_key?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/hash_compare_by_identity.rb:44 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/hash_compare_by_identity.rb:41 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/hash_compare_by_identity.rb:34 +RuboCop::Cop::Lint::HashCompareByIdentity::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/hash_compare_by_identity.rb:32 +RuboCop::Cop::Lint::HashCompareByIdentity::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the deprecated use of keyword arguments as a default in `Hash.new`. +# +# This usage raises a warning in Ruby 3.3 and results in an error in Ruby 3.4. +# In Ruby 3.4, keyword arguments will instead be used to change the behavior of a hash. +# For example, the capacity option can be passed to create a hash with a certain size +# if you know it in advance, for better performance. +# +# NOTE: The following corner case may result in a false negative when upgrading from Ruby 3.3 +# or earlier, but it is intentionally not detected to respect the expected usage in Ruby 3.4. +# +# [source,ruby] +# ---- +# Hash.new(capacity: 42) +# ---- +# +# @example +# +# # bad +# Hash.new(key: :value) +# +# # good +# Hash.new({key: :value}) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb:29 +class RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb:36 + def hash_new(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb:40 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb:32 +RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb:33 +RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the ordering of a method call where +# the receiver of the call is a HEREDOC. +# +# @example +# # bad +# <<-SQL +# bar +# SQL +# .strip_indent +# +# <<-SQL +# bar +# SQL +# .strip_indent +# .trim +# +# # good +# <<~SQL +# bar +# SQL +# +# <<~SQL.trim +# bar +# SQL +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:31 +class RuboCop::Cop::Lint::HeredocMethodCallPosition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:46 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:37 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:97 + def all_on_same_line?(nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:50 + def autocorrect(corrector, node, heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:77 + def call_after_heredoc_range(heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:107 + def call_end_pos(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:116 + def call_line_range(node); end + + # Returns nil if no range can be safely repositioned. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:122 + def call_range_to_safely_reposition(node, heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:86 + def calls_on_multiple_lines?(node, _heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:82 + def correctly_positioned?(node, heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:111 + def heredoc_begin_line_range(heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:103 + def heredoc_end_pos(heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:73 + def heredoc_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:59 + def heredoc_node_descendent_receiver(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:67 + def send_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:146 + def trailing_comma?(call_source, call_line_source); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:35 +RuboCop::Cop::Lint::HeredocMethodCallPosition::MSG = T.let(T.unsafe(nil), String) + +# Prefer `equal?` over `==` when comparing `object_id`. +# +# `Object#equal?` is provided to compare objects for identity, and in contrast +# `Object#==` is provided for the purpose of doing value comparison. +# +# @example +# # bad +# foo.object_id == bar.object_id +# foo.object_id != baz.object_id +# +# # good +# foo.equal?(bar) +# !foo.equal?(baz) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/identity_comparison.rb:20 +class RuboCop::Cop::Lint::IdentityComparison < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/identity_comparison.rb:27 + def object_id_comparison(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/identity_comparison.rb:35 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/identity_comparison.rb:23 +RuboCop::Cop::Lint::IdentityComparison::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/identity_comparison.rb:24 +RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for implicit string concatenation of string literals +# which are on the same line. +# +# @example +# +# # bad +# array = ['Item 1' 'Item 2'] +# +# # good +# array = ['Item 1Item 2'] +# array = ['Item 1' + 'Item 2'] +# array = [ +# 'Item 1' \ +# 'Item 2' +# ] +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:21 +class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:32 + def on_dstr(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:92 + def display_str(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:59 + def each_bad_cons(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:74 + def ending_delimiter(str); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:100 + def str_content(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:84 + def string_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:88 + def string_literals?(node1, node2); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:26 +RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:28 +RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:24 +RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String) + +# Checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0. +# +# When an array of IO objects waiting for an exception (the third argument of `IO.select`) +# is used as an argument, there is no alternative API, so offenses are not registered. +# +# NOTE: When the method is successful the return value of `IO.select` is `[[IO]]`, +# and the return value of `io.wait_readable` and `io.wait_writable` are `self`. +# They are not autocorrected when assigning a return value because these types are different. +# It's up to user how to handle the return value. +# +# @safety +# This cop's autocorrection is unsafe because `NoMethodError` occurs +# if `require 'io/wait'` is not called. +# +# @example +# +# # bad +# IO.select([io], [], [], timeout) +# +# # good +# io.wait_readable(timeout) +# +# # bad +# IO.select([], [io], [], timeout) +# +# # good +# io.wait_writable(timeout) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb:34 +class RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb:41 + def io_select(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb:46 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb:69 + def preferred_method(read, write, timeout); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb:63 + def scheduler_compatible?(io1, io2); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb:37 +RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb:38 +RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `private` or `protected` access modifiers which are +# applied to a singleton method. These access modifiers do not make +# singleton methods private/protected. `private_class_method` can be +# used for that. +# +# @example +# +# # bad +# class C +# private +# +# def self.method +# puts 'hi' +# end +# end +# +# # good +# class C +# def self.method +# puts 'hi' +# end +# +# private_class_method :method +# end +# +# # good +# class C +# class << self +# private +# +# def method +# puts 'hi' +# end +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:41 +class RuboCop::Cop::Lint::IneffectiveAccessModifier < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:52 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:55 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:48 + def private_class_methods(param0); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:102 + def access_modifier?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:59 + def check_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:106 + def correct_visibility?(node, modifier, ignored_methods); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:71 + def format_message(modifier); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:84 + def ineffective_modifier(node, ignored_methods = T.unsafe(nil), modifier = T.unsafe(nil), &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:67 + def private_class_method_names(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:44 +RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PRIVATE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:45 +RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PROTECTED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:42 +RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String) + +# Looks for error classes inheriting from `Exception`. +# It is configurable to suggest using either `StandardError` (default) or +# `RuntimeError` instead. +# +# @safety +# This cop's autocorrection is unsafe because `rescue` that omit +# exception class handle `StandardError` and its subclasses, +# but not `Exception` and its subclasses. +# +# @example EnforcedStyle: standard_error (default) +# # bad +# +# class C < Exception; end +# +# C = Class.new(Exception) +# +# # good +# +# class C < StandardError; end +# +# C = Class.new(StandardError) +# +# @example EnforcedStyle: runtime_error +# # bad +# +# class C < Exception; end +# +# C = Class.new(Exception) +# +# # good +# +# class C < RuntimeError; end +# +# C = Class.new(RuntimeError) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:40 +class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:53 + def class_new_call?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:59 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:70 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:87 + def exception_class?(class_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:91 + def inherit_exception_class_with_omitted_namespace?(class_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:83 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:99 + def preferred_base_class; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:44 +RuboCop::Cop::Lint::InheritException::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:45 +RuboCop::Cop::Lint::InheritException::PREFERRED_BASE_CLASS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:50 +RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for interpolation in a single quoted string. +# +# @safety +# This cop's autocorrection is unsafe because although it always replaces single quotes as +# if it were miswritten double quotes, it is not always the case. For example, +# `'#{foo} bar'` would be replaced by `"#{foo} bar"`, so the replaced code would evaluate +# the expression `foo`. +# +# @example +# +# # bad +# foo = 'something with #{interpolation} inside' +# +# # good +# foo = "something with #{interpolation} inside" +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/interpolation_check.rb:21 +class RuboCop::Cop::Lint::InterpolationCheck < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/interpolation_check.rb:28 + def on_str(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/interpolation_check.rb:41 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/interpolation_check.rb:52 + def heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/interpolation_check.rb:56 + def valid_syntax?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/interpolation_check.rb:24 +RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String) + +# Emulates the following Ruby warning in Ruby 3.3. +# +# [source,ruby] +# ---- +# $ ruby -e '0.times { it }' +# -e:1: warning: `it` calls without arguments will refer to the first block param in Ruby 3.4; +# use it() or self.it +# ---- +# +# `it` calls without arguments will refer to the first block param in Ruby 3.4. +# So use `it()` or `self.it` to ensure compatibility. +# +# @example +# +# # bad +# do_something { it } +# +# # good +# do_something { it() } +# do_something { self.it } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/it_without_arguments_in_block.rb:27 +class RuboCop::Cop::Lint::ItWithoutArgumentsInBlock < ::RuboCop::Cop::Base + include ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/it_without_arguments_in_block.rb:44 + def deprecated_it_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/it_without_arguments_in_block.rb:37 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/it_without_arguments_in_block.rb:33 +RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/it_without_arguments_in_block.rb:35 +RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks uses of lambda without a literal block. +# It emulates the following warning in Ruby 3.0: +# +# $ ruby -vwe 'lambda(&proc {})' +# ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19] +# -e:1: warning: lambda without a literal block is deprecated; use the proc without +# lambda instead +# +# This way, proc object is never converted to lambda. +# Autocorrection replaces with compatible proc argument. +# +# @example +# +# # bad +# lambda(&proc { do_something }) +# lambda(&Proc.new { do_something }) +# +# # good +# proc { do_something } +# Proc.new { do_something } +# lambda { do_something } # If you use lambda. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/lambda_without_literal_block.rb:28 +class RuboCop::Cop::Lint::LambdaWithoutLiteralBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/lambda_without_literal_block.rb:35 + def lambda_with_symbol_proc?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/lambda_without_literal_block.rb:39 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/lambda_without_literal_block.rb:31 +RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/lambda_without_literal_block.rb:32 +RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for literals used as the conditions or as +# operands in and/or expressions serving as the conditions of +# if/while/until/case-when/case-in. +# +# NOTE: Literals in `case-in` condition where the match variable is used in +# `in` are accepted as a pattern matching. +# +# @example +# +# # bad +# if 20 +# do_something +# end +# +# # bad +# # We're only interested in the left hand side being a truthy literal, +# # because it affects the evaluation of the &&, whereas the right hand +# # side will be conditionally executed/called and can be a literal. +# if true && some_var +# do_something +# end +# +# # good +# if some_var +# do_something +# end +# +# # good +# # When using a boolean value for an infinite loop. +# while true +# break if condition +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:38 +class RuboCop::Cop::Lint::LiteralAsCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:174 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:45 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:137 + def on_case(case_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:154 + def on_case_match(case_match_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:69 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:57 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:168 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:107 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:122 + def on_until_post(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:77 + def on_while(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:92 + def on_while_post(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:189 + def basic_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:221 + def check_case(case_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:180 + def check_for_literal(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:201 + def check_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:230 + def condition(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:245 + def condition_evaluation?(node, cond); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:254 + def correct_if_node(node, cond); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:211 + def handle_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:197 + def primitive_array?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:238 + def when_conditions_range(when_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:42 +RuboCop::Cop::Lint::LiteralAsCondition::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:43 +RuboCop::Cop::Lint::LiteralAsCondition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for literal assignments in the conditions of `if`, `while`, and `until`. +# It emulates the following Ruby warning: +# +# [source,console] +# ---- +# $ ruby -we 'if x = true; end' +# -e:1: warning: found `= literal' in conditional, should be == +# ---- +# +# As a lint cop, it cannot be determined if `==` is appropriate as intended, +# therefore this cop does not provide autocorrection. +# +# @example +# +# # bad +# if x = 42 +# do_something +# end +# +# # good +# if x == 42 +# do_something +# end +# +# # good +# if x = y +# do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:35 +class RuboCop::Cop::Lint::LiteralAssignmentInCondition < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:39 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:52 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:51 + def on_while(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:62 + def all_literals?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:79 + def offense_range(asgn_node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:75 + def parallel_assignment_with_splat_operator?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:56 + def traverse_node(node, &block); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:36 +RuboCop::Cop::Lint::LiteralAssignmentInCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for interpolated literals. +# +# NOTE: Array literals interpolated in regexps are not handled by this cop, but +# by `Lint/ArrayLiteralInRegexp` instead. +# +# @example +# +# # bad +# "result is #{10}" +# +# # good +# "result is 10" +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:18 +class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:28 + def on_interpolation(begin_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:72 + def array_in_regexp?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:78 + def autocorrected_value(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:145 + def autocorrected_value_for_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:151 + def autocorrected_value_for_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:121 + def autocorrected_value_for_string(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:129 + def autocorrected_value_for_symbol(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:162 + def autocorrected_value_in_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:136 + def autocorrected_value_in_hash_for_symbol(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:192 + def ends_heredoc_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:100 + def handle_special_regexp_chars(begin_node, value); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:200 + def in_array_percent_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:57 + def offending?(node); end + + # Does node print its own source when converted to a string? + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:183 + def prints_as_self?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:188 + def space_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:67 + def special_keyword?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:25 +RuboCop::Cop::Lint::LiteralInInterpolation::COMPOSITE = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:24 +RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of `begin...end while/until something`. +# +# @safety +# The cop is unsafe because behavior can change in some cases, including +# if a local variable inside the loop body is accessed outside of it, or if the +# loop body raises a `StopIteration` exception (which `Kernel#loop` rescues). +# +# @example +# +# # bad +# +# # using while +# begin +# do_something +# end while some_condition +# +# # good +# +# # while replacement +# loop do +# do_something +# break unless some_condition +# end +# +# # bad +# +# # using until +# begin +# do_something +# end until some_condition +# +# # good +# +# # until replacement +# loop do +# do_something +# break if some_condition +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:44 +class RuboCop::Cop::Lint::Loop < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:53 + def on_until_post(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:49 + def on_while_post(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:73 + def build_break_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:69 + def keyword_and_condition_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:59 + def register_offense(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:47 +RuboCop::Cop::Lint::Loop::MSG = T.let(T.unsafe(nil), String) + +# cop disables on wide ranges of code, that latter contributors to +# a file wouldn't be aware of. +# +# You can set `MaximumRangeSize` to define the maximum number of +# consecutive lines a cop can be disabled for. +# +# - `.inf` any size (default) +# - `0` allows only single-line disables +# - `1` means the maximum allowed is as follows: +# +# [source,ruby] +# ---- +# a = 1 +# ---- +# +# @example MaximumRangeSize: .inf (default) +# +# # good +# x= 0 +# # y = 1 +# # EOF +# +# # bad +# x= 0 +# # EOF +# +# @example MaximumRangeSize: 2 +# +# # good +# x= 0 +# # With the previous, there are 2 lines on which cop is disabled. +# +# # bad +# x= 0 +# x += 1 +# # Including this, that's 3 lines on which the cop is disabled. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:55 +class RuboCop::Cop::Lint::MissingCopEnableDirective < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:61 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:79 + def acceptable_range?(cop, line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:113 + def department_enabled?(cop, comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:73 + def each_missing_enable; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:96 + def max_range; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:100 + def message(cop, comment, type = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:58 +RuboCop::Cop::Lint::MissingCopEnableDirective::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:59 +RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil), String) + +# Checks for the presence of constructors and lifecycle callbacks +# without calls to `super`. +# +# This cop does not consider `method_missing` (and `respond_to_missing?`) +# because in some cases it makes sense to overtake what is considered a +# missing method. In other cases, the theoretical ideal handling could be +# challenging or verbose for no actual gain. +# +# Autocorrection is not supported because the position of `super` cannot be +# determined automatically. +# +# `Object` and `BasicObject` are allowed by this cop because of their +# stateless nature. However, sometimes you might want to allow other parent +# classes from this cop, for example in the case of an abstract class that is +# not meant to be called with `super`. In those cases, you can use the +# `AllowedParentClasses` option to specify which classes should be allowed +# *in addition to* `Object` and `BasicObject`. +# +# @example +# # bad +# class Employee < Person +# def initialize(name, salary) +# @salary = salary +# end +# end +# +# # good +# class Employee < Person +# def initialize(name, salary) +# super(name) +# @salary = salary +# end +# end +# +# # bad +# Employee = Class.new(Person) do +# def initialize(name, salary) +# @salary = salary +# end +# end +# +# # good +# Employee = Class.new(Person) do +# def initialize(name, salary) +# super(name) +# @salary = salary +# end +# end +# +# # bad +# class Parent +# def self.inherited(base) +# do_something +# end +# end +# +# # good +# class Parent +# def self.inherited(base) +# super +# do_something +# end +# end +# +# # good +# class ClassWithNoParent +# def initialize +# do_something +# end +# end +# +# @example AllowedParentClasses: [MyAbstractClass] +# # good +# class MyConcreteClass < MyAbstractClass +# def initialize +# do_something +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:85 +class RuboCop::Cop::Lint::MissingSuper < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:99 + def class_new_block(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:105 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:115 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:149 + def allowed_class?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:153 + def allowed_classes; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:127 + def callback_method_def?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:133 + def contains_super?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:137 + def inside_class_with_stateful_parent?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:123 + def offender?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:96 +RuboCop::Cop::Lint::MissingSuper::CALLBACKS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:87 +RuboCop::Cop::Lint::MissingSuper::CALLBACK_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:91 +RuboCop::Cop::Lint::MissingSuper::CLASS_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:86 +RuboCop::Cop::Lint::MissingSuper::CONSTRUCTOR_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:92 +RuboCop::Cop::Lint::MissingSuper::METHOD_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:89 +RuboCop::Cop::Lint::MissingSuper::STATELESS_CLASSES = T.let(T.unsafe(nil), Array) + +# Checks for mixed-case character ranges since they include likely unintended characters. +# +# Offenses are registered for regexp character classes like `/[A-z]/` +# as well as range objects like `('A'..'z')`. +# +# NOTE: `Range` objects cannot be autocorrected. +# +# @safety +# The cop autocorrects regexp character classes +# by replacing one character range with two: `A-z` becomes `A-Za-z`. +# In most cases this is probably what was originally intended +# but it changes the regexp to no longer match symbols it used to include. +# For this reason, this cop's autocorrect is unsafe (it will +# change the behavior of the code). +# +# @example +# +# # bad +# r = /[A-z]/ +# +# # good +# r = /[A-Za-z]/ +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:28 +class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:55 + def each_unsafe_regexp_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:43 + def on_erange(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:37 + def on_irange(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:45 + def on_regexp(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:71 + def build_source_range(range_start, range_end); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:75 + def range_for(char); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:81 + def range_pairs(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:101 + def regexp_range(source); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:91 + def skip_expression?(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:95 + def skip_range?(range_start, range_end); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:85 + def unsafe_range?(range_start, range_end); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:32 +RuboCop::Cop::Lint::MixedCaseRange::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:35 +RuboCop::Cop::Lint::MixedCaseRange::RANGES = T.let(T.unsafe(nil), Array) + +# Do not mix named captures and numbered captures in a `Regexp` literal +# because numbered capture is ignored if they're mixed. +# Replace numbered captures with non-capturing groupings or +# named captures. +# +# @example +# # bad +# /(?FOO)(BAR)/ +# +# # good +# /(?FOO)(?BAR)/ +# +# # good +# /(?FOO)(?:BAR)/ +# +# # good +# /(FOO)(BAR)/ +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_regexp_capture_types.rb:24 +class RuboCop::Cop::Lint::MixedRegexpCaptureTypes < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_regexp_capture_types.rb:27 + def on_regexp(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_regexp_capture_types.rb:25 +RuboCop::Cop::Lint::MixedRegexpCaptureTypes::MSG = T.let(T.unsafe(nil), String) + +# In math and Python, we can use `x < y < z` style comparison to compare +# multiple value. However, we can't use the comparison in Ruby. However, +# the comparison is not syntax error. This cop checks the bad usage of +# comparison operators. +# +# @example +# +# # bad +# x < y < z +# 10 <= x <= 20 +# +# # good +# x < y && y < z +# 10 <= x && x <= 20 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/multiple_comparison.rb:20 +class RuboCop::Cop::Lint::MultipleComparison < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/multiple_comparison.rb:29 + def multiple_compare?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/multiple_comparison.rb:33 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/multiple_comparison.rb:24 +RuboCop::Cop::Lint::MultipleComparison::COMPARISON_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/multiple_comparison.rb:23 +RuboCop::Cop::Lint::MultipleComparison::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/multiple_comparison.rb:26 +RuboCop::Cop::Lint::MultipleComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/multiple_comparison.rb:25 +RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe(nil), Array) + +# Checks for nested method definitions. +# +# @example +# +# # bad +# +# # `bar` definition actually produces methods in the same scope +# # as the outer `foo` method. Furthermore, the `bar` method +# # will be redefined every time `foo` is invoked. +# def foo +# def bar +# end +# end +# +# # good +# +# def foo +# bar = -> { puts 'hello' } +# bar.call +# end +# +# # good +# +# # `class_eval`, `instance_eval`, `module_eval`, `class_exec`, `instance_exec`, and +# # `module_exec` blocks are allowed by default. +# +# def foo +# self.class.class_eval do +# def bar +# end +# end +# end +# +# def foo +# self.class.module_exec do +# def bar +# end +# end +# end +# +# # good +# +# def foo +# class << self +# def bar +# end +# end +# end +# +# @example AllowedMethods: [] (default) +# # bad +# def do_something +# has_many :articles do +# def find_or_create_by_name(name) +# end +# end +# end +# +# @example AllowedMethods: ['has_many'] +# # bad +# def do_something +# has_many :articles do +# def find_or_create_by_name(name) +# end +# end +# end +# +# @example AllowedPatterns: [] (default) +# # bad +# def foo(obj) +# obj.do_baz do +# def bar +# end +# end +# end +# +# @example AllowedPatterns: ['baz'] +# # good +# def foo(obj) +# obj.do_baz do +# def bar +# end +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:91 +class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:131 + def eval_call?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:136 + def exec_call?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:97 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:111 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:124 + def allowed_method_name?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:120 + def allowed_subject_type?(subject); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:115 + def scoping_method_call?(child); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:95 +RuboCop::Cop::Lint::NestedMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for nested percent literals. +# +# @example +# +# # bad +# +# # The percent literal for nested_attributes is parsed as four tokens, +# # yielding the array [:name, :content, :"%i[incorrectly", :"nested]"]. +# attributes = { +# valid_attributes: %i[name content], +# nested_attributes: %i[name content %i[incorrectly nested]] +# } +# +# # good +# +# # Neither is incompatible with the bad case, but probably the intended code. +# attributes = { +# valid_attributes: %i[name content], +# nested_attributes: [:name, :content, %i[incorrectly nested]] +# } +# +# attributes = { +# valid_attributes: %i[name content], +# nested_attributes: [:name, :content, [:incorrectly, :nested]] +# } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/nested_percent_literal.rb:32 +class RuboCop::Cop::Lint::NestedPercentLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_percent_literal.rb:44 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_percent_literal.rb:48 + def on_percent_literal(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_percent_literal.rb:54 + def contains_percent_literals?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/nested_percent_literal.rb:35 +RuboCop::Cop::Lint::NestedPercentLiteral::MSG = T.let(T.unsafe(nil), String) + +# The array of regular expressions representing percent literals that, +# if found within a percent literal expression, will cause a +# NestedPercentLiteral violation to be emitted. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/nested_percent_literal.rb:41 +RuboCop::Cop::Lint::NestedPercentLiteral::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/nested_percent_literal.rb:42 +RuboCop::Cop::Lint::NestedPercentLiteral::REGEXES = T.let(T.unsafe(nil), Array) + +# Don't omit the accumulator when calling `next` in a `reduce` block. +# +# @example +# +# # bad +# result = (1..4).reduce(0) do |acc, i| +# next if i.odd? +# acc + i +# end +# +# # good +# result = (1..4).reduce(0) do |acc, i| +# next acc if i.odd? +# acc + i +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/next_without_accumulator.rb:21 +class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/next_without_accumulator.rb:24 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/next_without_accumulator.rb:39 + def on_block_body_of_reduce(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/next_without_accumulator.rb:34 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/next_without_accumulator.rb:33 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/next_without_accumulator.rb:47 + def parent_block_node(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/next_without_accumulator.rb:22 +RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of a `return` inside a `begin..end` block +# in assignment contexts. +# In this situation, the `return` will result in an exit from the current +# method, possibly leading to unexpected behavior. +# +# @example +# +# # bad +# @some_variable ||= begin +# return some_value if some_condition_is_met +# +# do_something +# end +# +# # good +# @some_variable ||= begin +# if some_condition_is_met +# some_value +# else +# do_something +# end +# end +# +# # good +# some_variable = if some_condition_is_met +# return if another_condition_is_met +# +# some_value +# else +# do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:38 +class RuboCop::Cop::Lint::NoReturnInBeginEndBlocks < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:51 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:49 + def on_cvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:50 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:48 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:41 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:53 + def on_op_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:52 + def on_or_asgn(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:39 +RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String) + +# Checks for non-atomic file operation. +# And then replace it with a nearly equivalent and atomic method. +# +# These can cause problems that are difficult to reproduce, +# especially in cases of frequent file operations in parallel, +# such as test runs with parallel_rspec. +# +# For examples: creating a directory if there is none, has the following problems +# +# An exception occurs when the directory didn't exist at the time of `exist?`, +# but someone else created it before `mkdir` was executed. +# +# Subsequent processes are executed without the directory that should be there +# when the directory existed at the time of `exist?`, +# but someone else deleted it shortly afterwards. +# +# @safety +# This cop is unsafe, because autocorrection change to atomic processing. +# The atomic processing of the replacement destination is not guaranteed +# to be strictly equivalent to that before the replacement. +# +# @example +# # bad - race condition with another process may result in an error in `mkdir` +# unless Dir.exist?(path) +# FileUtils.mkdir(path) +# end +# +# # good - atomic and idempotent creation +# FileUtils.mkdir_p(path) +# +# # bad - race condition with another process may result in an error in `remove` +# if File.exist?(path) +# FileUtils.remove(path) +# end +# +# # good - atomic and idempotent removal +# FileUtils.rm_f(path) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:44 +class RuboCop::Cop::Lint::NonAtomicFileOperation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:76 + def explicit_not_force?(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:71 + def force?(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:80 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:66 + def receiver_and_method_name(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:61 + def send_exist_node(param0); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:98 + def allowable_use_with_if?(if_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:123 + def autocorrect(corrector, node, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:134 + def autocorrect_replace_method(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:154 + def force_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:168 + def force_method_name?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:164 + def force_option?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:92 + def if_node_child?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:113 + def message_change_force_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:117 + def message_remove_file_exist_check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:102 + def register_offense(node, exist_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:142 + def replacement_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:158 + def require_mode_keyword?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:50 +RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_FORCE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:51 +RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:49 +RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_CHANGE_FORCE_METHOD = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:47 +RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_REMOVE_FILE_EXIST_CHECK = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:54 +RuboCop::Cop::Lint::NonAtomicFileOperation::RECURSIVE_REMOVE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:52 +RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_FORCE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:53 +RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:55 +RuboCop::Cop::Lint::NonAtomicFileOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# `Dir[...]` and `Dir.glob(...)` do not make any guarantees about +# the order in which files are returned. The final order is +# determined by the operating system and file system. +# This means that using them in cases where the order matters, +# such as requiring files, can lead to intermittent failures +# that are hard to debug. To ensure this doesn't happen, +# always sort the list. +# +# `Dir.glob` and `Dir[]` sort globbed results by default in Ruby 3.0. +# So all bad cases are acceptable when Ruby 3.0 or higher are used. +# +# NOTE: This cop will be deprecated and removed when supporting only Ruby 3.0 and higher. +# +# @safety +# This cop is unsafe in the case where sorting files changes existing +# expected behavior. +# +# @example +# +# # bad +# Dir["./lib/**/*.rb"].each do |file| +# require file +# end +# +# # good +# Dir["./lib/**/*.rb"].sort.each do |file| +# require file +# end +# +# # bad +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb')) do |file| +# require file +# end +# +# # good +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb')).sort.each do |file| +# require file +# end +# +# # bad +# Dir['./lib/**/*.rb'].each(&method(:require)) +# +# # good +# Dir['./lib/**/*.rb'].sort.each(&method(:require)) +# +# # bad +# Dir.glob(Rails.root.join('test', '*.rb'), &method(:require)) +# +# # good +# Dir.glob(Rails.root.join('test', '*.rb')).sort.each(&method(:require)) +# +# # good - Respect intent if `sort` keyword option is specified in Ruby 3.0 or higher. +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb'), sort: false).each(&method(:require)) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:60 +class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:174 + def loop_variable(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:157 + def method_require?(param0 = T.unsafe(nil)); end + + # NOTE: itblock is not handled because this cop is limited to Ruby <= 2.7 + # via `maximum_target_ruby_version`, so itblock nodes (Ruby 3.4+) are never encountered. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:70 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:92 + def on_block_pass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:81 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:147 + def unsorted_dir_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:152 + def unsorted_dir_each?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:168 + def unsorted_dir_each_pass?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:162 + def unsorted_dir_glob_pass?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:179 + def var_is_required?(param0, param1); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:109 + def correct_block(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:119 + def correct_block_pass(corrector, node); end + + # Returns range of last argument including comma and whitespace. + # + # @return [Parser::Source::Range] + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:134 + def last_arg_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:138 + def unsorted_dir_loop?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:142 + def unsorted_dir_pass?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:64 +RuboCop::Cop::Lint::NonDeterministicRequireOrder::MSG = T.let(T.unsafe(nil), String) + +# Checks for non-local exits from iterators without a return +# value. It registers an offense under these conditions: +# +# * No value is returned, +# * the block is preceded by a method chain, +# * the block has arguments, +# * the method which receives the block is not `define_method` +# or `define_singleton_method`, +# * the return is not contained in an inner scope, e.g. a lambda or a +# method definition. +# +# @example +# +# class ItemApi +# rescue_from ValidationError do |e| # non-iteration block with arg +# return { message: 'validation error' } unless e.errors # allowed +# error_array = e.errors.map do |error| # block with method chain +# return if error.suppress? # warned +# return "#{error.param}: invalid" unless error.message # allowed +# "#{error.param}: #{error.message}" +# end +# { message: 'validation error', errors: error_array } +# end +# +# def update_items +# transaction do # block without arguments +# return unless update_necessary? # allowed +# find_each do |item| # block without method chain +# return if item.stock == 0 # false-negative... +# item.update!(foobar: true) +# end +# end +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_local_exit_from_iterator.rb:41 +class RuboCop::Cop::Lint::NonLocalExitFromIterator < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_local_exit_from_iterator.rb:77 + def chained_send?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_local_exit_from_iterator.rb:80 + def define_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_local_exit_from_iterator.rb:46 + def on_return(return_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_local_exit_from_iterator.rb:72 + def return_value?(return_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_local_exit_from_iterator.rb:68 + def scoped_node?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_local_exit_from_iterator.rb:42 +RuboCop::Cop::Lint::NonLocalExitFromIterator::MSG = T.let(T.unsafe(nil), String) + +# Warns the usage of unsafe number conversions. Unsafe +# number conversion can cause unexpected error if auto type conversion +# fails. Cop prefer parsing with number class instead. +# +# Conversion with `Integer`, `Float`, etc. will raise an `ArgumentError` +# if given input that is not numeric (eg. an empty string), whereas +# `to_i`, etc. will try to convert regardless of input (``''.to_i => 0``). +# As such, this cop is disabled by default because it's not necessarily +# always correct to raise if a value is not numeric. +# +# NOTE: Some values cannot be converted properly using one of the `Kernel` +# method (for instance, `Time` and `DateTime` values are allowed by this +# cop by default). Similarly, Rails' duration methods do not work well +# with `Integer()` and can be allowed with `AllowedMethods`. By default, +# there are no methods to allowed. +# +# @safety +# Autocorrection is unsafe because it is not guaranteed that the +# replacement `Kernel` methods are able to properly handle the +# input if it is not a standard class. +# +# @example +# +# # bad +# +# '10'.to_i +# '10.2'.to_f +# '10'.to_c +# '1/3'.to_r +# ['1', '2', '3'].map(&:to_i) +# foo.try(:to_f) +# bar.send(:to_c) +# +# # good +# +# Integer('10', 10) +# Float('10.2') +# Complex('10') +# Rational('1/3') +# ['1', '2', '3'].map { |i| Integer(i, 10) } +# foo.try { |i| Float(i) } +# bar.send { |i| Complex(i) } +# +# @example AllowedMethods: [] (default) +# +# # bad +# 10.minutes.to_i +# +# @example AllowedMethods: [minutes] +# +# # good +# 10.minutes.to_i +# +# @example AllowedPatterns: [] (default) +# +# # bad +# 10.minutes.to_i +# +# @example AllowedPatterns: ['min*'] +# +# # good +# 10.minutes.to_i +# +# @example IgnoredClasses: [Time, DateTime] (default) +# +# # good +# Time.now.to_datetime.to_i +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:73 +class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:110 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:106 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:92 + def to_method(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:97 + def to_method_symbol(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:164 + def allow_receiver?(receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:176 + def allowed_method_name?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:186 + def conversion_method?(method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:150 + def correct_method(node, receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:154 + def correct_sym_method(to_method); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:133 + def handle_as_symbol(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:114 + def handle_conversion_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:194 + def ignored_class?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:190 + def ignored_classes; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:159 + def remove_parentheses(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:180 + def top_receiver(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:88 +RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:78 +RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHOD_CLASS_MAPPING = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:89 +RuboCop::Cop::Lint::NumberConversion::METHODS = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:84 +RuboCop::Cop::Lint::NumberConversion::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of numbered parameter assignment. +# It emulates the following warning in Ruby 2.7: +# +# $ ruby -ve '_1 = :value' +# ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin19] +# -e:1: warning: `_1' is reserved for numbered parameter; consider another name +# +# Assigning to a numbered parameter (from `_1` to `_9`) causes an error in Ruby 3.0. +# +# $ ruby -ve '_1 = :value' +# ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19] +# -e:1: _1 is reserved for numbered parameter +# +# NOTE: The parametered parameters are from `_1` to `_9`. This cop checks `_0`, and over `_10` +# as well to prevent confusion. +# +# @example +# +# # bad +# _1 = :value +# +# # good +# non_numbered_parameter_name = :value +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/numbered_parameter_assignment.rb:30 +class RuboCop::Cop::Lint::NumberedParameterAssignment < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/numbered_parameter_assignment.rb:35 + def on_lvasgn(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/numbered_parameter_assignment.rb:32 +RuboCop::Cop::Lint::NumberedParameterAssignment::LVAR_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/numbered_parameter_assignment.rb:33 +RuboCop::Cop::Lint::NumberedParameterAssignment::NUMBERED_PARAMETER_RANGE = T.let(T.unsafe(nil), Range) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/numbered_parameter_assignment.rb:31 +RuboCop::Cop::Lint::NumberedParameterAssignment::NUM_PARAM_MSG = T.let(T.unsafe(nil), String) + +# Certain numeric operations have a constant result, usually 0 or 1. +# Multiplying a number by 0 will always return 0. +# Dividing a number by itself or raising it to the power of 0 will always return 1. +# As such, they can be replaced with that result. +# These are probably leftover from debugging, or are mistakes. +# Other numeric operations that are similarly leftover from debugging or mistakes +# are handled by `Lint/UselessNumericOperation`. +# +# NOTE: This cop doesn't detect offenses for the `-` and `%` operator because it +# can't determine the type of `x`. If `x` is an `Array` or `String`, it doesn't perform +# a numeric operation. +# +# @example +# +# # bad +# x * 0 +# +# # good +# 0 +# +# # bad +# x *= 0 +# +# # good +# x = 0 +# +# # bad +# x / x +# x ** 0 +# +# # good +# 1 +# +# # bad +# x /= x +# x **= 0 +# +# # good +# x = 1 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:46 +class RuboCop::Cop::Lint::NumericOperationWithConstantResult < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:57 + def abbreviated_assignment_with_constant_result?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:68 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:70 + def on_op_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:60 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:53 + def operation_with_constant_result?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:81 + def constant_result?(lhs, operation, rhs); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:49 +RuboCop::Cop::Lint::NumericOperationWithConstantResult::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:50 +RuboCop::Cop::Lint::NumericOperationWithConstantResult::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for unintended or-assignment to a constant. +# +# Constants should always be assigned in the same location. And its value +# should always be the same. If constants are assigned in multiple +# locations, the result may vary depending on the order of `require`. +# +# @safety +# This cop is unsafe because code that is already conditionally +# assigning a constant may have its behavior changed by autocorrection. +# +# @example +# +# # bad +# CONST ||= 1 +# +# # good +# CONST = 1 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/or_assignment_to_constant.rb:24 +class RuboCop::Cop::Lint::OrAssignmentToConstant < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/or_assignment_to_constant.rb:29 + def on_or_asgn(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/or_assignment_to_constant.rb:27 +RuboCop::Cop::Lint::OrAssignmentToConstant::MSG = T.let(T.unsafe(nil), String) + +# Checks the proper ordering of magic comments and whether +# a magic comment is not placed before a shebang. +# +# @safety +# This cop's autocorrection is unsafe because file encoding may change. +# +# @example +# # bad +# +# p [''.frozen?, ''.encoding] #=> [true, #] +# +# # good +# +# p [''.frozen?, ''.encoding] #=> [true, #] +# +# # good +# +# #!/usr/bin/env ruby +# p [''.frozen?, ''.encoding] #=> [true, #] +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ordered_magic_comments.rb:32 +class RuboCop::Cop::Lint::OrderedMagicComments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ordered_magic_comments.rb:38 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ordered_magic_comments.rb:55 + def autocorrect(corrector, encoding_line, frozen_string_literal_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ordered_magic_comments.rb:63 + def magic_comment_lines; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ordered_magic_comments.rb:36 +RuboCop::Cop::Lint::OrderedMagicComments::MSG = T.let(T.unsafe(nil), String) + +# Looks for references of `Regexp` captures that are out of range +# and thus always returns nil. +# +# @safety +# This cop is unsafe because it is naive in how it determines what +# references are available based on the last encountered regexp, but +# it cannot handle some cases, such as conditional regexp matches, which +# leads to false positives, such as: +# +# [source,ruby] +# ---- +# foo ? /(c)(b)/ =~ str : /(b)/ =~ str +# do_something if $2 +# # $2 is defined for the first condition but not the second, however +# # the cop will mark this as an offense. +# ---- +# +# This might be a good indication of code that should be refactored, +# however. +# +# @example +# +# /(foo)bar/ =~ 'foobar' +# +# # bad - always returns nil +# +# puts $2 # => nil +# +# # good +# +# puts $1 # => foo +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:38 +class RuboCop::Cop::Lint::OutOfRangeRegexpRef < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:64 + def after_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:55 + def after_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:72 + def on_in_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:51 + def on_match_with_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:47 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:78 + def on_nth_ref(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:66 + def on_when(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:103 + def check_regexp(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:123 + def nth_ref_receiver?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:114 + def regexp_first_argument?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:94 + def regexp_patterns(in_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:119 + def regexp_receiver?(send_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:39 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:42 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_ARGUMENT_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:44 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_CAPTURE_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:41 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_RECEIVER_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:45 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Checks for space between the name of a called method and a left +# parenthesis. +# +# @example +# +# # bad +# do_something (foo) +# +# # good +# do_something(foo) +# do_something (2 + 3) * 4 +# do_something (foo * bar).baz +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:18 +class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:35 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:24 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:56 + def chained_calls?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:52 + def compound_range?(first_arg); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:81 + def space_range(expr, space_length); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:65 + def spaces_before_left_parenthesis(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:61 + def ternary_expression?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:39 + def valid_context?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:47 + def valid_first_argument?(first_arg); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:22 +RuboCop::Cop::Lint::ParenthesesAsGroupedExpression::MSG = T.let(T.unsafe(nil), String) + +# Checks for quotes and commas in %w, e.g. `%w('foo', "bar")` +# +# It is more likely that the additional characters are unintended (for +# example, mistranslating an array of literals to percent string notation) +# rather than meant to be part of the resulting strings. +# +# @safety +# The cop is unsafe because the correction changes the values in the array +# and that might have been done purposely. +# +# [source,ruby] +# ---- +# %w('foo', "bar") #=> ["'foo',", '"bar"'] +# %w(foo bar) #=> ['foo', 'bar'] +# ---- +# +# @example +# +# # bad +# %w('foo', "bar") +# +# # good +# %w(foo bar) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:29 +class RuboCop::Cop::Lint::PercentStringArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:40 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:44 + def on_percent_literal(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:61 + def contains_quotes_or_commas?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:34 +RuboCop::Cop::Lint::PercentStringArray::LEADING_QUOTE = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:37 +RuboCop::Cop::Lint::PercentStringArray::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:33 +RuboCop::Cop::Lint::PercentStringArray::QUOTES_AND_COMMAS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:35 +RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Regexp) + +# Checks for colons and commas in %i, e.g. `%i(:foo, :bar)` +# +# It is more likely that the additional characters are unintended (for +# example, mistranslating an array of literals to percent string notation) +# rather than meant to be part of the resulting symbols. +# +# @example +# +# # bad +# %i(:foo, :bar) +# +# # good +# %i(foo bar) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/percent_symbol_array.rb:19 +class RuboCop::Cop::Lint::PercentSymbolArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_symbol_array.rb:26 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_symbol_array.rb:30 + def on_percent_literal(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_symbol_array.rb:38 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_symbol_array.rb:48 + def contains_colons_or_commas?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_symbol_array.rb:58 + def non_alphanumeric_literal?(literal); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/percent_symbol_array.rb:23 +RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String) + +# Checks for `raise` or `fail` statements which raise `Exception` or +# `Exception.new`. Use `StandardError` or a specific exception class instead. +# +# If you have defined your own namespaced `Exception` class, it is possible +# to configure the cop to allow it by setting `AllowedImplicitNamespaces` to +# an array with the names of the namespaces to allow. By default, this is set to +# `['Gem']`, which allows `Gem::Exception` to be raised without an explicit namespace. +# If not allowed, a false positive may be registered if `raise Exception` is called +# within the namespace. +# +# Alternatively, use a fully qualified name with `raise`/`fail` +# (eg. `raise Namespace::Exception`). +# +# @safety +# This cop is unsafe because it will change the exception class being +# raised, which is a change in behavior. +# +# @example +# # bad +# raise Exception, 'Error message here' +# raise Exception.new('Error message here') +# +# # good +# raise StandardError, 'Error message here' +# raise MyError.new, 'Error message here' +# +# @example AllowedImplicitNamespaces: ['Gem'] (default) +# # bad - `Foo` is not an allowed implicit namespace +# module Foo +# def self.foo +# raise Exception # This is qualified to `Foo::Exception`. +# end +# end +# +# # good +# module Gem +# def self.foo +# raise Exception # This is qualified to `Gem::Exception`. +# end +# end +# +# # good +# module Foo +# def self.foo +# raise Foo::Exception +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:53 +class RuboCop::Cop::Lint::RaiseException < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:60 + def exception?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:65 + def exception_new_with_message?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:70 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:104 + def allow_implicit_namespaces; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:76 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:92 + def implicit_namespace?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:56 +RuboCop::Cop::Lint::RaiseException::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:57 +RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `rand(1)` calls. +# Such calls always return `0`. +# +# @example +# +# # bad +# rand 1 +# Kernel.rand(-1) +# rand 1.0 +# rand(-1.0) +# +# # good +# 0 # just use 0 instead +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/rand_one.rb:19 +class RuboCop::Cop::Lint::RandOne < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/rand_one.rb:28 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rand_one.rb:24 + def rand_one?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rand_one.rb:36 + def message(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/rand_one.rb:20 +RuboCop::Cop::Lint::RandOne::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/rand_one.rb:21 +RuboCop::Cop::Lint::RandOne::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# removed without causing any offenses to be reported. It's implemented +# as a cop in that it inherits from the Cop base class and calls +# add_offense. The unusual part of its implementation is that it doesn't +# have any on_* methods or an investigate method. This means that it +# doesn't take part in the investigation phase when the other cops do +# their work. Instead, it waits until it's called in a later stage of the +# execution. The reason it can't be implemented as a normal cop is that +# it depends on the results of all other cops to do its work. +# +# +# @example +# # bad +# x += 1 +# +# # good +# x += 1 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:28 +class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:37 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil), offenses = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:35 + def offenses_to_check; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:35 + def offenses_to_check=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:42 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:337 + def add_department_marker(department); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:243 + def add_offense_for_entire_comment(comment, cops); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:258 + def add_offense_for_some_cops(comment, cops); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:233 + def add_offenses(redundant_cops); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:320 + def all_cop_names; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:204 + def all_disabled?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:69 + def comment_range_with_surrounding_space(directive_comment_range, line_comment_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:57 + def cop_disabled_line_ranges; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:278 + def cop_range(comment, cop); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:224 + def department_disabled?(cop, comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:329 + def department_marker?(department); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:307 + def describe(cop); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:229 + def directive_count(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:92 + def directive_range_in_list(range, ranges); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:61 + def disabled_ranges; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:146 + def each_already_disabled(cop, line_ranges); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:113 + def each_line_range(cop, line_ranges); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:106 + def each_redundant_disable(&block); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:324 + def ends_its_line?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:216 + def expected_final_disable?(cop, line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:180 + def find_redundant_all(range, next_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:175 + def find_redundant_cop(cop, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:190 + def find_redundant_department(cop, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:135 + def find_redundant_directive(cop, comment, line_range, next_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:196 + def followed_ranges?(range, next_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:208 + def ignore_offense?(line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:272 + def leave_free_comment?(comment, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:285 + def matching_range(haystack, needle); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:316 + def message(cop_names); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:65 + def previous_line_blank?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:200 + def range_with_offense?(range, offenses = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:333 + def remove_department_marker(department); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:126 + def should_skip_line_range?(cop, line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:130 + def skip_directive?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:293 + def trailing_range?(ranges, range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:32 +RuboCop::Cop::Lint::RedundantCopDisableDirective::COP_NAME = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:33 +RuboCop::Cop::Lint::RedundantCopDisableDirective::DEPARTMENT_MARKER = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:301 +RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.let(T.unsafe(nil), Hash) + +# removed. +# +# that cop checks whether any cop was actually enabled. +# +# @example +# +# # bad +# foo = 1 +# +# # good +# foo = 1 +# +# # bad +# foo = "1" +# baz +# +# # good +# foo = "1" +# baz +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:33 +class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:40 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:116 + def all_or_name(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:72 + def comment_start(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:76 + def cop_name_indention(comment, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:120 + def department?(directive, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:67 + def range_of_offense(comment, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:91 + def range_to_remove(begin_pos, end_pos, comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:80 + def range_with_comma(comment, name); end + + # If the list of cops is comma-separated, but without an empty space after the comma, + # we should **not** remove the prepending empty space, thus begin_pos += 1 + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:110 + def range_with_comma_after(comment, start, begin_pos, end_pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:104 + def range_with_comma_before(start, begin_pos, end_pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:49 + def register_offense(comment, cop_names); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:38 +RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG = T.let(T.unsafe(nil), String) + +# Sort globbed results by default in Ruby 3.0. +# This cop checks for redundant `sort` method to `Dir.glob` and `Dir[]`. +# +# @safety +# This cop is unsafe, in case of having a file and a directory with +# identical names, since directory will be loaded before the file, which +# will break `exe/files.rb` that rely on `exe.rb` file. +# +# @example +# +# # bad +# Dir.glob('./lib/**/*.rb').sort.each do |file| +# end +# +# Dir['./lib/**/*.rb'].sort.each do |file| +# end +# +# # good +# Dir.glob('./lib/**/*.rb').each do |file| +# end +# +# Dir['./lib/**/*.rb'].each do |file| +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:30 +class RuboCop::Cop::Lint::RedundantDirGlobSort < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:40 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:56 + def multiple_argument?(glob_method); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:38 +RuboCop::Cop::Lint::RedundantDirGlobSort::GLOB_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:36 +RuboCop::Cop::Lint::RedundantDirGlobSort::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:37 +RuboCop::Cop::Lint::RedundantDirGlobSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant quantifiers inside `Regexp` literals. +# +# It is always allowed when interpolation is used in a regexp literal, +# because it's unknown what kind of string will be expanded as a result: +# +# [source,ruby] +# ---- +# /(?:a*#{interpolation})?/x +# ---- +# +# @example +# # bad +# /(?:x+)+/ +# +# # good +# /(?:x)+/ +# +# # good +# /(?:x+)/ +# +# # bad +# /(?:x+)?/ +# +# # good +# /(?:x)*/ +# +# # good +# /(?:x*)/ +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:34 +class RuboCop::Cop::Lint::RedundantRegexpQuantifiers < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:42 + def on_regexp(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:83 + def character_set?(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:61 + def each_redundantly_quantified_pair(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:87 + def mergeable_quantifier(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:103 + def merged_quantifier(exp1, exp2); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:119 + def message(group, child, replacement); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:115 + def quantifier_range(group, child); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:75 + def redundant_group?(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:79 + def redundantly_quantifiable?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:38 +RuboCop::Cop::Lint::RedundantRegexpQuantifiers::MSG_REDUNDANT_QUANTIFIER = T.let(T.unsafe(nil), String) + +# Checks for unnecessary `require` statement. +# +# The following features are unnecessary `require` statement because +# they are already loaded. e.g. Ruby 2.2: +# +# ruby -ve 'p $LOADED_FEATURES.reject { |feature| %r|/| =~ feature }' +# ruby 2.2.8p477 (2017-09-14 revision 59906) [x86_64-darwin13] +# ["enumerator.so", "rational.so", "complex.so", "thread.rb"] +# +# Below are the features that each `TargetRubyVersion` targets. +# +# * 2.0+ ... `enumerator` +# * 2.1+ ... `thread` +# * 2.2+ ... Add `rational` and `complex` above +# * 2.7+ ... Add `ruby2_keywords` above +# * 3.1+ ... Add `fiber` above +# * 3.2+ ... Add `set` above +# * 4.0+ ... Add `pathname` above +# +# This cop target those features. +# +# @example +# # bad +# require 'unloaded_feature' +# require 'thread' +# +# # good +# require 'unloaded_feature' +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_require_statement.rb:34 +class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_require_statement.rb:48 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_require_statement.rb:43 + def redundant_require_statement?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_require_statement.rb:67 + def redundant_feature?(feature_name); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_require_statement.rb:38 +RuboCop::Cop::Lint::RedundantRequireStatement::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_require_statement.rb:39 +RuboCop::Cop::Lint::RedundantRequireStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_require_statement.rb:40 +RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T.unsafe(nil), Array) + +# Checks for redundant safe navigation calls. +# Use cases where a constant, named in camel case for classes and modules is `nil` are rare, +# and an offense is not detected when the receiver is a constant. The detection also applies +# to `self`, and to literal receivers, except for `nil`. +# +# For all receivers, the `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, +# and `equal?` methods are checked by default. +# These are customizable with `AllowedMethods` option. +# +# The `AllowedMethods` option specifies nil-safe methods, +# in other words, it is a method that is allowed to skip safe navigation. +# Note that the `AllowedMethod` option is not an option that specifies methods +# for which to suppress (allow) this cop's check. +# +# In the example below, the safe navigation operator (`&.`) is unnecessary +# because `NilClass` has methods like `respond_to?` and `is_a?`. +# +# The `InferNonNilReceiver` option specifies whether to look into previous code +# paths to infer if the receiver can't be nil. This check is unsafe because the receiver +# can be redefined between the safe navigation call and previous regular method call. +# It does the inference only in the current scope, e.g. within the same method definition etc. +# +# The `AdditionalNilMethods` option specifies additional custom methods which are +# defined on `NilClass`. When `InferNonNilReceiver` is set, they are used to determine +# whether the receiver can be nil. +# +# @safety +# This cop is unsafe, because autocorrection can change the return type of +# the expression. An offending expression that previously could return `nil` +# will be autocorrected to never return `nil`. +# +# @example +# # bad +# CamelCaseConst&.do_something +# +# # good +# CamelCaseConst.do_something +# +# # bad +# foo.to_s&.strip +# foo.to_i&.zero? +# foo.to_f&.zero? +# foo.to_a&.size +# foo.to_h&.size +# +# # good +# foo.to_s.strip +# foo.to_i.zero? +# foo.to_f.zero? +# foo.to_a.size +# foo.to_h.size +# +# # bad +# do_something if attrs&.respond_to?(:[]) +# +# # good +# do_something if attrs.respond_to?(:[]) +# +# # bad +# foo&.bar ? foo&.bar.baz : qux +# +# # good +# foo&.bar ? foo.bar.baz : qux +# +# # bad +# if foo&.bar +# foo&.bar.baz +# end +# +# # good +# if foo&.bar +# foo.bar.baz +# end +# +# # bad +# while node&.is_a?(BeginNode) +# node = node.parent +# end +# +# # good +# while node.is_a?(BeginNode) +# node = node.parent +# end +# +# # good - without `&.` this changes the return value for `nil` +# foo&.respond_to?(:to_a) +# foo&.respond_to?(:class) +# +# # bad - for `nil`s conversion methods return default values for the type +# foo&.to_h || {} +# foo&.to_h { |k, v| [k, v] } || {} +# foo&.to_a || [] +# foo&.to_i || 0 +# foo&.to_f || 0.0 +# foo&.to_s || '' +# +# # good +# foo.to_h +# foo.to_h { |k, v| [k, v] } +# foo.to_a +# foo.to_i +# foo.to_f +# foo.to_s +# +# # bad +# self&.foo +# +# # good +# self.foo +# +# @example AllowedMethods: [nil_safe_method] +# # bad +# do_something if attrs&.nil_safe_method(:[]) +# +# # good +# do_something if attrs.nil_safe_method(:[]) +# do_something if attrs&.not_nil_safe_method(:[]) +# +# @example InferNonNilReceiver: false (default) +# # good +# foo.bar +# foo&.baz +# +# @example InferNonNilReceiver: true +# # bad +# foo.bar +# foo&.baz # would raise on previous line if `foo` is nil +# +# # good +# foo.bar +# foo.baz +# +# # bad +# if foo.condition? +# foo&.bar +# end +# +# # good +# if foo.condition? +# foo.bar +# end +# +# # good (different scopes) +# def method1 +# foo.bar +# end +# +# def method2 +# foo&.bar +# end +# +# @example AdditionalNilMethods: [present?] +# # good +# foo.present? +# foo&.bar +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:162 +class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:183 + def conversion_with_default?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:195 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:217 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:178 + def respond_to_nil_method?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:269 + def additional_nil_methods; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:233 + def assume_receiver_instance_exists?(receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:250 + def check?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:261 + def condition?(parent, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:239 + def guaranteed_instance?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:265 + def infer_non_nil_receiver?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:175 +RuboCop::Cop::Lint::RedundantSafeNavigation::GUARANTEED_INSTANCE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:166 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:167 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_LITERAL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:168 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_NON_NIL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:171 +RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:173 +RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + +# Checks for unneeded usages of splat expansion. +# +# @example +# +# # bad +# a = *[1, 2, 3] +# a = *'a' +# a = *1 +# ['a', 'b', *%w(c d e), 'f', 'g'] +# +# # good +# c = [1, 2, 3] +# a = *c +# a, b = *c +# a, *b = *c +# a = *1..10 +# a = ['a'] +# ['a', 'b', 'c', 'd', 'e', 'f', 'g'] +# +# # bad +# do_something(*['foo', 'bar', 'baz']) +# +# # good +# do_something('foo', 'bar', 'baz') +# +# # bad +# begin +# foo +# rescue *[StandardError, ApplicationError] +# bar +# end +# +# # good +# begin +# foo +# rescue StandardError, ApplicationError +# bar +# end +# +# # bad +# case foo +# when *[1, 2, 3] +# bar +# else +# baz +# end +# +# # good +# case foo +# when 1, 2, 3 +# bar +# else +# baz +# end +# +# @example AllowPercentLiteralArrayArgument: true (default) +# +# # good +# do_something(*%w[foo bar baz]) +# +# @example AllowPercentLiteralArrayArgument: false +# +# # bad +# do_something(*%w[foo bar baz]) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:71 +class RuboCop::Cop::Lint::RedundantSplatExpansion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:83 + def array_new?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:91 + def literal_expansion(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:95 + def on_splat(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:210 + def allow_percent_literal_array_argument?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:131 + def array_new_inside_array_literal?(array_new_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:158 + def array_splat?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:112 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:162 + def method_argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:166 + def part_of_an_array?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:173 + def redundant_brackets?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:118 + def redundant_splat_expansion(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:185 + def remove_brackets(array); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:139 + def replacement_range_and_content(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:203 + def use_percent_literal_array_argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:181 + def wrap_in_brackets?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:75 +RuboCop::Cop::Lint::RedundantSplatExpansion::ARRAY_PARAM_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:80 +RuboCop::Cop::Lint::RedundantSplatExpansion::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:74 +RuboCop::Cop::Lint::RedundantSplatExpansion::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:79 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_I = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:77 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_W = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:78 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_I = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:76 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_W = T.let(T.unsafe(nil), String) + +# Checks for string conversion in string interpolation, `print`, `puts`, and `warn` arguments, +# which is redundant. +# +# @example +# +# # bad +# "result is #{something.to_s}" +# print something.to_s +# puts something.to_s +# warn something.to_s +# +# # good +# "result is #{something}" +# print something +# puts something +# warn something +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:23 +class RuboCop::Cop::Lint::RedundantStringCoercion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:34 + def on_interpolation(begin_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:42 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:32 + def to_s_without_args?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:54 + def register_offense(node, context); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:27 +RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:28 +RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:29 +RuboCop::Cop::Lint::RedundantStringCoercion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant uses of `to_s`, `to_sym`, `to_i`, `to_f`, `to_d`, `to_r`, `to_c`, +# `to_a`, `to_h`, and `to_set`. +# +# When one of these methods is called on an object of the same type, that object +# is returned, making the call unnecessary. The cop detects conversion methods called +# on object literals, class constructors, class `[]` methods, and the `Kernel` methods +# `String()`, `Integer()`, `Float()`, BigDecimal(), `Rational()`, `Complex()`, and `Array()`. +# +# Specifically, these cases are detected for each conversion method: +# +# * `to_s` when called on a string literal, interpolated string, heredoc, +# or with `String.new` or `String()`. +# * `to_sym` when called on a symbol literal or interpolated symbol. +# * `to_i` when called on an integer literal or with `Integer()`. +# * `to_f` when called on a float literal of with `Float()`. +# * `to_r` when called on a rational literal or with `Rational()`. +# * `to_c` when called on a complex literal of with `Complex()`. +# * `to_a` when called on an array literal, or with `Array.new`, `Array()` or `Array[]`. +# * `to_h` when called on a hash literal, or with `Hash.new`, `Hash()` or `Hash[]`. +# * `to_set` when called on `Set.new` or `Set[]`. +# +# In all cases, chaining one same `to_*` conversion methods listed above is redundant. +# +# The cop can also register an offense for chaining conversion methods on methods that are +# expected to return a specific type regardless of receiver (eg. `foo.inspect.to_s` and +# `foo.to_json.to_s`). +# +# @example +# # bad +# "text".to_s +# :sym.to_sym +# 42.to_i +# 8.5.to_f +# 12r.to_r +# 1i.to_c +# [].to_a +# {}.to_h +# Set.new.to_set +# +# # good +# "text" +# :sym +# 42 +# 8.5 +# 12r +# 1i +# [] +# {} +# Set.new +# +# # bad +# Integer(var).to_i +# +# # good +# Integer(var) +# +# # good - chaining to a type constructor with exceptions suppressed +# # in this case, `Integer()` could return `nil` +# Integer(var, exception: false).to_i +# +# # bad - chaining the same conversion +# foo.to_s.to_s +# +# # good +# foo.to_s +# +# # bad - chaining a conversion to a method that is expected to return the same type +# foo.inspect.to_s +# foo.to_json.to_s +# +# # good +# foo.inspect +# foo.to_json +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:80 +class RuboCop::Cop::Lint::RedundantTypeConversion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:160 + def array_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:145 + def bigdecimal_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:155 + def complex_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:184 + def exception_false_keyword_argument?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:140 + def float_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:168 + def hash_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:135 + def integer_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:205 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:189 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:150 + def rational_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:177 + def set_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:127 + def string_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:122 + def type_constructor?(param0 = T.unsafe(nil), param1); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:247 + def chained_conversion?(node, receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:253 + def chained_to_typed_method?(node, receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:234 + def constructor?(node, receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:241 + def constructor_suppresses_exceptions?(receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:215 + def find_receiver(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:209 + def hash_or_set_with_block?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:228 + def literal_receiver?(node, receiver); end +end + +# Maps each conversion method to the pattern matcher for that type's constructors +# Not every type has a constructor, for instance Symbol. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:100 +RuboCop::Cop::Lint::RedundantTypeConversion::CONSTRUCTOR_MAPPING = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:116 +RuboCop::Cop::Lint::RedundantTypeConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Set) + +# Maps conversion methods to the node types for the literals of that type +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:86 +RuboCop::Cop::Lint::RedundantTypeConversion::LITERAL_NODE_TYPES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:83 +RuboCop::Cop::Lint::RedundantTypeConversion::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:117 +RuboCop::Cop::Lint::RedundantTypeConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Methods that already are expected to return a given type, which makes a further +# conversion redundant. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:114 +RuboCop::Cop::Lint::RedundantTypeConversion::TYPED_METHODS = T.let(T.unsafe(nil), Hash) + +# Checks for redundant `with_index`. +# +# @example +# # bad +# ary.each_with_index do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# # bad +# ary.each.with_index do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:29 +class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:37 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:56 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:55 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:61 + def redundant_with_index?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:73 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:81 + def with_index_range(send); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:33 +RuboCop::Cop::Lint::RedundantWithIndex::MSG_EACH_WITH_INDEX = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:34 +RuboCop::Cop::Lint::RedundantWithIndex::MSG_WITH_INDEX = T.let(T.unsafe(nil), String) + +# Checks for redundant `with_object`. +# +# @example +# # bad +# ary.each_with_object([]) do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# # bad +# ary.each.with_object([]) do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:29 +class RuboCop::Cop::Lint::RedundantWithObject < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:36 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:52 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:51 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:57 + def redundant_with_object?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:68 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:76 + def with_object_range(send); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:33 +RuboCop::Cop::Lint::RedundantWithObject::MSG_EACH_WITH_OBJECT = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:34 +RuboCop::Cop::Lint::RedundantWithObject::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String) + +# Checks if `include` or `prepend` is called in `refine` block. +# These methods are deprecated and should be replaced with `Refinement#import_methods`. +# +# It emulates deprecation warnings in Ruby 3.1. Functionality has been removed in Ruby 3.2. +# +# @safety +# This cop's autocorrection is unsafe because `include M` will affect the included class +# if any changes are made to module `M`. +# On the other hand, `import_methods M` uses a snapshot of method definitions, +# thus it will not be affected if module `M` changes. +# +# @example +# +# # bad +# refine Foo do +# include Bar +# end +# +# # bad +# refine Foo do +# prepend Bar +# end +# +# # good +# refine Foo do +# import_methods Bar +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/refinement_import_methods.rb:34 +class RuboCop::Cop::Lint::RefinementImportMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/refinement_import_methods.rb:42 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/refinement_import_methods.rb:37 +RuboCop::Cop::Lint::RefinementImportMethods::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/refinement_import_methods.rb:38 +RuboCop::Cop::Lint::RefinementImportMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for regexp literals used as `match-current-line`. +# If a regexp literal is in condition, the regexp matches `$_` implicitly. +# +# @example +# # bad +# if /foo/ +# do_something +# end +# +# # good +# if /foo/ =~ $_ +# do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/regexp_as_condition.rb:19 +class RuboCop::Cop::Lint::RegexpAsCondition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/regexp_as_condition.rb:25 + def on_match_current_line(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/regexp_as_condition.rb:22 +RuboCop::Cop::Lint::RegexpAsCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for expressions where there is a call to a predicate +# method with at least one argument, where no parentheses are used around +# the parameter list, and a boolean operator, && or ||, is used in the +# last argument. +# +# The idea behind warning for these constructs is that the user might +# be under the impression that the return value from the method call is +# an operand of &&/||. +# +# @example +# +# # bad +# if day.is? :tuesday && month == :jan +# # ... +# end +# +# # good +# if day.is?(:tuesday) && month == :jan +# # ... +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/require_parentheses.rb:26 +class RuboCop::Cop::Lint::RequireParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_parentheses.rb:40 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_parentheses.rb:31 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_parentheses.rb:54 + def check_predicate(predicate, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_parentheses.rb:44 + def check_ternary(ternary, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/require_parentheses.rb:29 +RuboCop::Cop::Lint::RequireParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks that a range literal is enclosed in parentheses when the end of the range is +# at a line break. +# +# NOTE: The following is maybe intended for `(42..)`. But, compatible is `42..do_something`. +# So, this cop does not provide autocorrection because it is left to user. +# +# [source,ruby] +# ---- +# case condition +# when 42.. +# do_something +# end +# ---- +# +# @example +# +# # bad - Represents `(1..42)`, not endless range. +# 1.. +# 42 +# +# # good - It's incompatible, but your intentions when using endless range may be: +# (1..) +# 42 +# +# # good +# 1..42 +# +# # good +# (1..42) +# +# # good +# (1.. +# 42) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/require_range_parentheses.rb:40 +class RuboCop::Cop::Lint::RequireRangeParentheses < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_range_parentheses.rb:53 + def on_erange(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_range_parentheses.rb:43 + def on_irange(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/require_range_parentheses.rb:41 +RuboCop::Cop::Lint::RequireRangeParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses a file requiring itself with `require_relative`. +# +# @example +# +# # bad +# +# # foo.rb +# require_relative 'foo' +# require_relative 'bar' +# +# # good +# +# # foo.rb +# require_relative 'bar' +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/require_relative_self_path.rb:21 +class RuboCop::Cop::Lint::RequireRelativeSelfPath < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_relative_self_path.rb:28 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_relative_self_path.rb:44 + def remove_ext(file_path); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_relative_self_path.rb:40 + def same_file?(file_path, required_feature); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/require_relative_self_path.rb:25 +RuboCop::Cop::Lint::RequireRelativeSelfPath::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/require_relative_self_path.rb:26 +RuboCop::Cop::Lint::RequireRelativeSelfPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `rescue` blocks targeting the `Exception` class. +# +# @example +# +# # bad +# begin +# do_something +# rescue Exception +# handle_exception +# end +# +# # good +# begin +# do_something +# rescue ArgumentError +# handle_exception +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_exception.rb:23 +class RuboCop::Cop::Lint::RescueException < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_exception.rb:26 + def on_resbody(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_exception.rb:32 + def targets_exception?(rescue_arg_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_exception.rb:24 +RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String) + +# Checks for arguments to `rescue` that will result in a `TypeError` +# if an exception is raised. +# +# @example +# # bad +# begin +# bar +# rescue nil +# baz +# end +# +# # bad +# def foo +# bar +# rescue 1, 'a', "#{b}", 0.0, [], {} +# baz +# end +# +# # good +# begin +# bar +# rescue +# baz +# end +# +# # good +# def foo +# bar +# rescue NameError +# baz +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:37 +class RuboCop::Cop::Lint::RescueType < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:56 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:44 + def on_resbody(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:65 + def correction(*exceptions); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:76 + def invalid_exceptions(exceptions); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:72 + def valid_exceptions(exceptions); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:42 +RuboCop::Cop::Lint::RescueType::INVALID_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:40 +RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of a return with a value in a context +# where the value will be ignored. (initialize and setter methods) +# +# @example +# +# # bad +# def initialize +# foo +# return :qux if bar? +# baz +# end +# +# def foo=(bar) +# return 42 +# end +# +# # good +# def initialize +# foo +# return if bar? +# baz +# end +# +# def foo=(bar) +# return +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/return_in_void_context.rb:32 +class RuboCop::Cop::Lint::ReturnInVoidContext < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/return_in_void_context.rb:38 + def on_return(return_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/return_in_void_context.rb:33 +RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) + +# Returning out of these methods only exits the block itself. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/return_in_void_context.rb:36 +RuboCop::Cop::Lint::ReturnInVoidContext::SCOPE_CHANGING_METHODS = T.let(T.unsafe(nil), Array) + +# The safe navigation operator returns nil if the receiver is +# nil. If you chain an ordinary method call after a safe +# navigation operator, it raises NoMethodError. We should use a +# safe navigation operator after a safe navigation operator. +# This cop checks for the problem outlined above. +# +# @example +# +# # bad +# x&.foo.bar +# x&.foo + bar +# x&.foo[bar] +# +# # good +# x&.foo&.bar +# x&.foo || bar +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:22 +class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::NilMethods + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:33 + def bad_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:41 + def on_send(node); end + + private + + # @param [Parser::Source::Range] offense_range + # @param [RuboCop::AST::SendNode] send_node + # @return [String] + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:84 + def add_safe_navigation_operator(offense_range:, send_node:); end + + # @param [RuboCop::Cop::Corrector] corrector + # @param [Parser::Source::Range] offense_range + # @param [RuboCop::AST::SendNode] send_node + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:103 + def autocorrect(corrector, offense_range:, send_node:); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:112 + def brackets?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:125 + def operator_inside_collection_literal?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:116 + def require_parentheses?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:62 + def require_safe_navigation?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:75 + def ternary_else_branch?(node, safe_nav); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:69 + def ternary_safe_navigation?(node, safe_nav); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:29 +RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:30 +RuboCop::Cop::Lint::SafeNavigationChain::PLUS_MINUS_METHODS = T.let(T.unsafe(nil), Array) + +# Checks that if safe navigation is used in an `&&` or `||` condition, +# consistent and appropriate safe navigation, without excess or deficiency, +# is used for all method calls on the same object. +# +# @safety +# Autocorrection is unsafe because if the receiver is not a local variable +# but a method call, it may not be idempotent. For example, replacing +# `foo&.bar` with `foo.bar` could raise `NoMethodError` if `foo` returns +# `nil` on a subsequent call. +# +# @example +# # bad +# foo&.bar && foo&.baz +# +# # good +# foo&.bar && foo.baz +# +# # bad +# foo.bar && foo&.baz +# +# # good +# foo.bar && foo.baz +# +# # bad +# foo&.bar || foo.baz +# +# # good +# foo&.bar || foo&.baz +# +# # bad +# foo.bar || foo&.baz +# +# # good +# foo.bar || foo.baz +# +# # bad +# foo&.bar && (foobar.baz || foo&.baz) +# +# # good +# foo&.bar && (foobar.baz || foo.baz) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:47 +class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::NilMethods + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:54 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:69 + def on_or(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:104 + def already_appropriate_call?(operand, dot_op); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:73 + def collect_operands(node, operand_nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:89 + def find_consistent_parts(grouped_operands); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:130 + def most_left_indices(grouped_operands); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:160 + def nilable?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:144 + def operand_in_and?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:152 + def operand_in_or?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:121 + def operand_nodes(operand, operand_nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:80 + def receiver_name_as_key(method, fully_receivers); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:110 + def register_offense(operand, dot_operator); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:51 +RuboCop::Cop::Lint::SafeNavigationConsistency::USE_DOT_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:52 +RuboCop::Cop::Lint::SafeNavigationConsistency::USE_SAFE_NAVIGATION_MSG = T.let(T.unsafe(nil), String) + +# Checks to make sure safe navigation isn't used with `empty?` in +# a conditional. +# +# While the safe navigation operator is generally a good idea, when +# checking `foo&.empty?` in a conditional, `foo` being `nil` will actually +# do the opposite of what the author intends. +# +# @example +# # bad +# return if foo&.empty? +# return unless foo&.empty? +# +# # good +# return if foo && foo.empty? +# return unless foo && foo.empty? +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_with_empty.rb:22 +class RuboCop::Cop::Lint::SafeNavigationWithEmpty < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_with_empty.rb:32 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_with_empty.rb:28 + def safe_navigation_empty_in_conditional?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_with_empty.rb:25 +RuboCop::Cop::Lint::SafeNavigationWithEmpty::MSG = T.let(T.unsafe(nil), String) + +# Checks if a file which has a shebang line as +# its first line is granted execute permission. +# +# @example +# # bad +# +# # A file which has a shebang line as its first line is not +# # granted execute permission. +# +# #!/usr/bin/env ruby +# puts 'hello, world' +# +# # good +# +# # A file which has a shebang line as its first line is +# # granted execute permission. +# +# #!/usr/bin/env ruby +# puts 'hello, world' +# +# # good +# +# # A file which has not a shebang line as its first line is not +# # granted execute permission. +# +# puts 'hello, world' +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/script_permission.rb:33 +class RuboCop::Cop::Lint::ScriptPermission < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/script_permission.rb:39 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/script_permission.rb:55 + def autocorrect; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/script_permission.rb:59 + def executable?(processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/script_permission.rb:66 + def format_message_from(processed_source); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/script_permission.rb:36 +RuboCop::Cop::Lint::ScriptPermission::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/script_permission.rb:37 +RuboCop::Cop::Lint::ScriptPermission::SHEBANG = T.let(T.unsafe(nil), String) + +# Checks for self-assignments. +# +# @example +# # bad +# foo = foo +# foo, bar = foo, bar +# Foo = Foo +# hash['foo'] = hash['foo'] +# obj.attr = obj.attr +# +# # good +# foo = bar +# foo, bar = bar, foo +# Foo = Bar +# hash['foo'] = hash['bar'] +# obj.attr = obj.attr2 +# +# # good (method calls possibly can return different results) +# hash[foo] = hash[foo] +# +# @example AllowRBSInlineAnnotation: false (default) +# # bad +# foo = foo #: Integer +# foo, bar = foo, bar #: Integer +# Foo = Foo #: Integer +# hash['foo'] = hash['foo'] #: Integer +# obj.attr = obj.attr #: Integer +# +# @example AllowRBSInlineAnnotation: true +# # good +# foo = foo #: Integer +# foo, bar = foo, bar #: Integer +# Foo = Foo #: Integer +# hash['foo'] = hash['foo'] #: Integer +# obj.attr = obj.attr #: Integer +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:42 +class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:95 + def on_and_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:75 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:61 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:72 + def on_cvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:73 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:71 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:63 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:83 + def on_masgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:90 + def on_or_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:52 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:142 + def allow_rbs_inline_annotation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:127 + def handle_attribute_assignment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:115 + def handle_key_assignment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:99 + def multiple_self_assignment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:138 + def rbs_inline_annotation?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:110 + def rhs_matches_lhs?(rhs, lhs); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:45 +RuboCop::Cop::Lint::SelfAssignment::ASSIGNMENT_TYPE_TO_RHS_TYPE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:43 +RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for `send`, `public_send`, and `__send__` methods +# when using mix-in. +# +# `include` and `prepend` methods were private methods until Ruby 2.0, +# they were mixed-in via `send` method. This cop uses Ruby 2.1 or +# higher style that can be called by public methods. +# And `extend` method that was originally a public method is also targeted +# for style unification. +# +# @example +# # bad +# Foo.send(:include, Bar) +# Foo.send(:prepend, Bar) +# Foo.send(:extend, Bar) +# +# # bad +# Foo.public_send(:include, Bar) +# Foo.public_send(:prepend, Bar) +# Foo.public_send(:extend, Bar) +# +# # bad +# Foo.__send__(:include, Bar) +# Foo.__send__(:prepend, Bar) +# Foo.__send__(:extend, Bar) +# +# # good +# Foo.include Bar +# Foo.prepend Bar +# Foo.extend Bar +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:36 +class RuboCop::Cop::Lint::SendWithMixinArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:53 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:46 + def send_with_mixin_argument?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:67 + def bad_location(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:73 + def message(method, module_name, bad_method); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:77 + def mixin_method?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:41 +RuboCop::Cop::Lint::SendWithMixinArgument::MIXIN_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:40 +RuboCop::Cop::Lint::SendWithMixinArgument::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:43 +RuboCop::Cop::Lint::SendWithMixinArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:42 +RuboCop::Cop::Lint::SendWithMixinArgument::SEND_METHODS = T.let(T.unsafe(nil), Array) + +# Checks for shadowed arguments. +# +# This cop has `IgnoreImplicitReferences` configuration option. +# It means argument shadowing is used in order to pass parameters +# to zero arity `super` when `IgnoreImplicitReferences` is `true`. +# +# @example +# +# # bad +# do_something do |foo| +# foo = 42 +# puts foo +# end +# +# def do_something(foo) +# foo = 42 +# puts foo +# end +# +# # good +# do_something do |foo| +# foo = foo + 42 +# puts foo +# end +# +# def do_something(foo) +# foo = foo + 42 +# puts foo +# end +# +# def do_something(foo) +# puts foo +# end +# +# @example IgnoreImplicitReferences: false (default) +# +# # bad +# def do_something(foo) +# foo = 42 +# super +# end +# +# def do_something(foo) +# foo = super +# bar +# end +# +# @example IgnoreImplicitReferences: true +# +# # good +# def do_something(foo) +# foo = 42 +# super +# end +# +# def do_something(foo) +# foo = super +# bar +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:66 +class RuboCop::Cop::Lint::ShadowedArgument < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:76 + def after_leaving_scope(scope, _variable_table); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:70 + def uses_var?(param0, param1); end + + private + + # Get argument references without assignments' references + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:161 + def argument_references(argument); end + + # Find the first argument assignment, which doesn't reference the + # argument at the rhs. If the assignment occurs inside a branch or + # block, it is impossible to tell whether it's executed, so precise + # shadowing location is not known. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:120 + def assignment_without_argument_usage(argument); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:82 + def check_argument(argument); end + + # Check whether the given node is always executed or not + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:152 + def conditional_assignment?(node, stop_search_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:171 + def ignore_implicit_references?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:144 + def reference_pos(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:95 + def shadowing_assignment(argument); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:72 + def joining_forces; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:67 +RuboCop::Cop::Lint::ShadowedArgument::MSG = T.let(T.unsafe(nil), String) + +# Checks for a rescued exception that get shadowed by a +# less specific exception being rescued before a more specific +# exception is rescued. +# +# An exception is considered shadowed if it is rescued after its +# ancestor is, or if it and its ancestor are both rescued in the +# same `rescue` statement. In both cases, the more specific rescue is +# unnecessary because it is covered by rescuing the less specific +# exception. (ie. `rescue Exception, StandardError` has the same behavior +# whether `StandardError` is included or not, because all ``StandardError``s +# are rescued by `rescue Exception`). +# +# @example +# +# # bad +# +# begin +# something +# rescue Exception +# handle_exception +# rescue StandardError +# handle_standard_error +# end +# +# # bad +# begin +# something +# rescue Exception, StandardError +# handle_error +# end +# +# # good +# +# begin +# something +# rescue StandardError +# handle_standard_error +# rescue Exception +# handle_exception +# end +# +# # good, however depending on runtime environment. +# # +# # This is a special case for system call errors. +# # System dependent error code depends on runtime environment. +# # For example, whether `Errno::EAGAIN` and `Errno::EWOULDBLOCK` are +# # the same error code or different error code depends on environment. +# # This good case is for `Errno::EAGAIN` and `Errno::EWOULDBLOCK` with +# # the same error code. +# begin +# something +# rescue Errno::EAGAIN, Errno::EWOULDBLOCK +# handle_standard_error +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:61 +class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:67 + def on_rescue(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:101 + def compare_exceptions(exception, other_exception); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:94 + def contains_multiple_levels_of_exceptions?(group); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:119 + def evaluate_exceptions(group); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:152 + def find_shadowing_rescue(rescues); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:84 + def offense_range(rescues); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:90 + def rescued_groups_for(rescues); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:137 + def sorted?(rescued_groups); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:115 + def system_call_err?(error); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:65 +RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of local variable names from an outer scope +# in block arguments or block-local variables. This mirrors the warning +# given by `ruby -cw` prior to Ruby 2.6: +# "shadowing outer local variable - foo". +# +# The cop is now disabled by default to match the upstream Ruby behavior. +# It's useful, however, if you'd like to avoid shadowing variables from outer +# scopes, which some people consider an anti-pattern that makes it harder +# to keep track of what's going on in a program. +# +# NOTE: Shadowing of variables in block passed to `Ractor.new` is allowed +# because `Ractor` should not access outer variables. +# eg. following style is encouraged: +# +# [source,ruby] +# ---- +# worker_id, pipe = env +# Ractor.new(worker_id, pipe) do |worker_id, pipe| +# end +# ---- +# +# @example +# +# # bad +# def some_method +# foo = 1 +# +# 2.times do |foo| # shadowing outer `foo` +# do_something(foo) +# end +# end +# +# # good +# def some_method +# foo = 1 +# +# 2.times do |bar| +# do_something(bar) +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:46 +class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:58 + def before_declaring_variable(variable, variable_table); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:50 + def ractor_block?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:101 + def find_conditional_node_from_ascendant(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:108 + def node_or_its_ascendant_conditional?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:77 + def same_conditions_node_different_branch?(variable, outer_local_variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:91 + def variable_node(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:73 + def variable_used_in_declaration_of_outer?(variable, outer_local_variable); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:54 + def joining_forces; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:47 +RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), String) + +# Checks for `Hash` creation with a mutable default value. +# Creating a `Hash` in such a way will share the default value +# across all keys, causing unexpected behavior when modifying it. +# +# For example, when the `Hash` was created with an `Array` as the argument, +# calling `hash[:foo] << 'bar'` will also change the value of all +# other keys that have not been explicitly assigned to. +# +# @example +# # bad +# Hash.new([]) +# Hash.new({}) +# Hash.new(Array.new) +# Hash.new(Hash.new) +# +# # okay -- In rare cases that intentionally have this behavior, +# # without disabling the cop, you can set the default explicitly. +# h = Hash.new +# h.default = [] +# h[:a] << 1 +# h[:b] << 2 +# h # => {:a => [1, 2], :b => [1, 2]} +# +# # okay -- beware this will discard mutations and only remember assignments +# Hash.new { Array.new } +# Hash.new { Hash.new } +# Hash.new { {} } +# Hash.new { [] } +# +# # good - frozen solution will raise an error when mutation attempted +# Hash.new([].freeze) +# Hash.new({}.freeze) +# +# # good - using a proc will create a new object for each key +# h = Hash.new +# h.default_proc = ->(h, k) { [] } +# h.default_proc = ->(h, k) { {} } +# +# # good - using a block will create a new object for each key +# Hash.new { |h, k| h[k] = [] } +# Hash.new { |h, k| h[k] = {} } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/shared_mutable_default.rb:47 +class RuboCop::Cop::Lint::SharedMutableDefault < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/shared_mutable_default.rb:64 + def capacity_keyword_argument?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shared_mutable_default.rb:53 + def hash_initialized_with_mutable_shared_object?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shared_mutable_default.rb:68 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/shared_mutable_default.rb:48 +RuboCop::Cop::Lint::SharedMutableDefault::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/shared_mutable_default.rb:50 +RuboCop::Cop::Lint::SharedMutableDefault::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks unexpected overrides of the `Struct` built-in methods +# via `Struct.new`. +# +# @example +# # bad +# Bad = Struct.new(:members, :clone, :count) +# b = Bad.new([], true, 1) +# b.members #=> [] (overriding `Struct#members`) +# b.clone #=> true (overriding `Object#clone`) +# b.count #=> 1 (overriding `Enumerable#count`) +# +# # good +# Good = Struct.new(:id, :name) +# g = Good.new(1, "foo") +# g.members #=> [:id, :name] +# g.clone #=> # +# g.count #=> 2 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/struct_new_override.rb:24 +class RuboCop::Cop::Lint::StructNewOverride < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/struct_new_override.rb:54 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/struct_new_override.rb:49 + def struct_new(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/struct_new_override.rb:25 +RuboCop::Cop::Lint::StructNewOverride::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/struct_new_override.rb:27 +RuboCop::Cop::Lint::StructNewOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/struct_new_override.rb:46 +RuboCop::Cop::Lint::StructNewOverride::STRUCT_MEMBER_NAME_TYPES = T.let(T.unsafe(nil), Array) + +# This is based on `Struct.instance_methods.sort` in Ruby 4.0.0. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/struct_new_override.rb:30 +RuboCop::Cop::Lint::StructNewOverride::STRUCT_METHOD_NAMES = T.let(T.unsafe(nil), Array) + +# Checks for `rescue` blocks with no body. +# +# @example +# +# # bad +# def some_method +# do_something +# rescue +# end +# +# # bad +# begin +# do_something +# rescue +# end +# +# # good +# def some_method +# do_something +# rescue +# handle_exception +# end +# +# # good +# begin +# do_something +# rescue +# handle_exception +# end +# +# @example AllowComments: true (default) +# +# # good +# def some_method +# do_something +# rescue +# # do nothing +# end +# +# # good +# begin +# do_something +# rescue +# # do nothing +# end +# +# @example AllowComments: false +# +# # bad +# def some_method +# do_something +# rescue +# # do nothing +# end +# +# # bad +# begin +# do_something +# rescue +# # do nothing +# end +# +# @example AllowNil: true (default) +# +# # good +# def some_method +# do_something +# rescue +# nil +# end +# +# # good +# begin +# do_something +# rescue +# # do nothing +# end +# +# # good +# do_something rescue nil +# +# @example AllowNil: false +# +# # bad +# def some_method +# do_something +# rescue +# nil +# end +# +# # bad +# begin +# do_something +# rescue +# nil +# end +# +# # bad +# do_something rescue nil +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception.rb:105 +class RuboCop::Cop::Lint::SuppressedException < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception.rb:108 + def on_resbody(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception.rb:118 + def comment_between_rescue_and_end?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception.rb:126 + def nil_body?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception.rb:106 +RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) + +# Checks for cases where exceptions unrelated to the numeric constructors `Integer()`, +# `Float()`, `BigDecimal()`, `Complex()`, and `Rational()` may be unintentionally swallowed. +# +# @safety +# The cop is unsafe for autocorrection because unexpected errors occurring in the argument +# passed to numeric constructor (e.g., `Integer()`) can lead to incompatible behavior. +# For example, changing it to `Integer(potential_exception_method_call, exception: false)` +# ensures that exceptions raised by `potential_exception_method_call` are not ignored. +# +# [source,ruby] +# ---- +# Integer(potential_exception_method_call) rescue nil +# ---- +# +# @example +# +# # bad +# Integer(arg) rescue nil +# +# # bad +# begin +# Integer(arg) +# rescue +# nil +# end +# +# # bad +# begin +# Integer(arg) +# rescue +# end +# +# # good +# Integer(arg, exception: false) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:41 +class RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:56 + def begin_numeric_constructor_rescue_nil(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:75 + def constructor_receiver?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:49 + def numeric_constructor_rescue_nil(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:65 + def numeric_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:82 + def on_rescue(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:103 + def expected_exception_classes_only?(exception_classes); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:46 +RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion::EXPECTED_EXCEPTION_CLASSES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:45 +RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of literal strings converted to +# a symbol where a literal symbol could be used instead. +# +# There are two possible styles for this cop. +# `strict` (default) will register an offense for any incorrect usage. +# `consistent` additionally requires hashes to use the same style for +# every symbol key (ie. if any symbol key needs to be quoted it requires +# all keys to be quoted). +# +# @example +# # bad +# 'string'.to_sym +# :symbol.to_sym +# 'underscored_string'.to_sym +# :'underscored_symbol' +# 'hyphenated-string'.to_sym +# "string_#{interpolation}".to_sym +# +# # good +# :string +# :symbol +# :underscored_string +# :underscored_symbol +# :'hyphenated-string' +# :"string_#{interpolation}" +# +# @example EnforcedStyle: strict (default) +# +# # bad +# { +# 'a': 1, +# "b": 2, +# 'c-d': 3 +# } +# +# # good (don't quote keys that don't require quoting) +# { +# a: 1, +# b: 2, +# 'c-d': 3 +# } +# +# @example EnforcedStyle: consistent +# +# # bad +# { +# a: 1, +# 'b-c': 2 +# } +# +# # good (quote all keys if any need quoting) +# { +# 'a': 1, +# 'b-c': 2 +# } +# +# # good (no quoting required) +# { +# a: 1, +# b: 2 +# } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:68 +class RuboCop::Cop::Lint::SymbolConversion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::SymbolHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:105 + def on_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:78 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:88 + def on_sym(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:147 + def correct_hash_key(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:166 + def correct_inconsistent_hash_keys(keys); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:139 + def in_alias?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:143 + def in_percent_literal_array?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:126 + def properly_quoted?(source, value); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:122 + def register_offense(node, correction:, message: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:135 + def requires_quotes?(sym_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:73 +RuboCop::Cop::Lint::SymbolConversion::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:74 +RuboCop::Cop::Lint::SymbolConversion::MSG_CONSISTENCY = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:76 +RuboCop::Cop::Lint::SymbolConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Repacks Parser's diagnostics/errors +# into RuboCop's offenses. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:8 +class RuboCop::Cop::Lint::Syntax < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:11 + def on_other_file; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:22 + def add_offense_from_diagnostic(diagnostic, ruby_version); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:56 + def add_offense_from_error(error); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:61 + def beautify_message(message); end + + # Expand zero-length diagnostic ranges so that editors and formatters + # can display them. This typically occurs when the parser reports + # `unexpected token $end` at EOF. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:36 + def diagnostic_location(location); end + + # Override to skip multiline_ranges check which requires AST. + # Syntax errors mean the AST is nil, so we go directly to + # the EOL comment insertion path. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:52 + def disable_offense(offense_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:67 + def find_severity(_range, _severity); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:9 +RuboCop::Cop::Lint::Syntax::LEVELS = T.let(T.unsafe(nil), Array) + +# Ensures that `to_enum`/`enum_for`, called for the current method, +# has correct arguments. +# +# @example +# # bad +# def foo(x, y = 1) +# return to_enum(__callee__, x) # `y` is missing +# end +# +# # good +# def foo(x, y = 1) +# # Alternatives to `__callee__` are `__method__` and `:foo`. +# return to_enum(__callee__, x, y) +# end +# +# # good +# def foo(x, y = 1) +# # It is also allowed if it is wrapped in some method like Sorbet. +# return to_enum(T.must(__callee__), x, y) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:27 +class RuboCop::Cop::Lint::ToEnumArguments < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:33 + def enum_conversion_call?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:38 + def method_name?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:47 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:43 + def passing_keyword_arg?(param0 = T.unsafe(nil), param1); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:76 + def argument_match?(send_arg, def_arg); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:61 + def arguments_match?(arguments, def_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:28 +RuboCop::Cop::Lint::ToEnumArguments::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:30 +RuboCop::Cop::Lint::ToEnumArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks to make sure `#to_json` includes an optional argument. +# When overriding `#to_json`, callers may invoke JSON +# generation via `JSON.generate(your_obj)`. Since `JSON#generate` allows +# for an optional argument, your method should too. +# +# @example +# # bad - incorrect arity +# def to_json +# JSON.generate([x, y]) +# end +# +# # good - preserving args +# def to_json(*args) +# JSON.generate([x, y], *args) +# end +# +# # good - discarding args +# def to_json(*_args) +# JSON.generate([x, y]) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/to_json.rb:27 +class RuboCop::Cop::Lint::ToJSON < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_json.rb:32 + def on_def(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/to_json.rb:30 +RuboCop::Cop::Lint::ToJSON::MSG = T.let(T.unsafe(nil), String) + +# Checks for top level return with arguments. If there is a +# top-level return statement with an argument, then the argument is +# always ignored. This is detected automatically since Ruby 2.7. +# +# @example +# # bad +# return 1 +# +# # good +# return +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/top_level_return_with_argument.rb:16 +class RuboCop::Cop::Lint::TopLevelReturnWithArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/top_level_return_with_argument.rb:21 + def on_return(return_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/top_level_return_with_argument.rb:35 + def remove_arguments(corrector, return_node); end + + # This cop works by validating the ancestors of the return node. A + # top-level return node's ancestors should not be of block, def, or + # defs type. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/top_level_return_with_argument.rb:42 + def top_level_return?(return_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/top_level_return_with_argument.rb:31 + def top_level_return_with_any_argument?(return_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/top_level_return_with_argument.rb:19 +RuboCop::Cop::Lint::TopLevelReturnWithArgument::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing commas in attribute declarations, such as +# `#attr_reader`. Leaving a trailing comma will nullify the next method +# definition by overriding it with a getter method. +# +# @example +# +# # bad +# class Foo +# attr_reader :foo, +# +# def bar +# puts "Unreachable." +# end +# end +# +# # good +# class Foo +# attr_reader :foo +# +# def bar +# puts "No problem!" +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:30 +class RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:37 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:47 + def trailing_comma_range(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:34 +RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:35 +RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for "triple quotes" (strings delimited by any odd number +# of quotes greater than 1). +# +# Ruby allows multiple strings to be implicitly concatenated by just +# being adjacent in a statement (ie. `"foo""bar" == "foobar"`). This sometimes +# gives the impression that there is something special about triple quotes, but +# in fact it is just extra unnecessary quotes and produces the same string. Each +# pair of quotes produces an additional concatenated empty string, so the result +# is still only the "actual" string within the delimiters. +# +# NOTE: Although this cop is called triple quotes, the same behavior is present +# for strings delimited by 5, 7, etc. quotation marks. +# +# @example +# # bad +# """ +# A string +# """ +# +# # bad +# ''' +# A string +# ''' +# +# # good +# " +# A string +# " +# +# # good +# < b } +# values.sort { |*x| x[0] <=> x[1] } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:41 +class RuboCop::Cop::Lint::UnexpectedBlockArity < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:44 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:56 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:55 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:64 + def acceptable?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:76 + def arg_count(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:72 + def expected_arity(method); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:68 + def included_method?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:60 + def methods; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:42 +RuboCop::Cop::Lint::UnexpectedBlockArity::MSG = T.let(T.unsafe(nil), String) + +# Checks for using Fixnum or Bignum constant. +# +# @example +# +# # bad +# 1.is_a?(Fixnum) +# 1.is_a?(Bignum) +# +# # good +# 1.is_a?(Integer) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unified_integer.rb:16 +class RuboCop::Cop::Lint::UnifiedInteger < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unified_integer.rb:22 + def fixnum_or_bignum_const(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unified_integer.rb:26 + def on_const(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unified_integer.rb:19 +RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String) + +# Looks for `reduce` or `inject` blocks where the value returned (implicitly or +# explicitly) does not include the accumulator. A block is considered valid as +# long as at least one return value includes the accumulator. +# +# If the accumulator is not included in the return value, then the entire +# block will just return a transformation of the last element value, and +# could be rewritten as such without a loop. +# +# Also catches instances where an index of the accumulator is returned, as +# this may change the type of object being retained. +# +# NOTE: For the purpose of reducing false positives, this cop only flags +# returns in `reduce` blocks where the element is the only variable in +# the expression (since we will not be able to tell what other variables +# relate to via static analysis). +# +# @example +# +# # bad +# (1..4).reduce(0) do |acc, el| +# el * 2 +# end +# +# # bad, may raise a NoMethodError after the first iteration +# %w(a b c).reduce({}) do |acc, letter| +# acc[letter] = true +# end +# +# # good +# (1..4).reduce(0) do |acc, el| +# acc + el * 2 +# end +# +# # good, element is returned but modified using the accumulator +# values.reduce do |acc, el| +# el << acc +# el +# end +# +# # good, returns the accumulator instead of the index +# %w(a b c).reduce({}) do |acc, letter| +# acc[letter] = true +# acc +# end +# +# # good, at least one branch returns the accumulator +# values.reduce(nil) do |result, value| +# break result if something? +# value +# end +# +# # good, recursive +# keys.reduce(self) { |result, key| result[key] } +# +# # ignored as the return value cannot be determined +# enum.reduce do |acc, el| +# x = foo(acc, el) +# bar(x) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:65 +class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:78 + def accumulator_index?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:83 + def element_modified?(param0, param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:104 + def expression_values(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:93 + def lvar_used?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:115 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:123 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:122 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:70 + def reduce_with_block?(param0 = T.unsafe(nil)); end + + private + + # Determine if a return value is acceptable for the purposes of this cop + # If it is an expression containing the accumulator, it is acceptable + # Otherwise, it is only unacceptable if it contains the iterated element, since we + # otherwise do not have enough information to prevent false positives. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:192 + def acceptable_return?(return_val, element_name); end + + # Exclude `begin` nodes inside a `dstr` from being collected by `return_values` + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:200 + def allowed_type?(parent_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:160 + def block_arg_name(node, index); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:143 + def check_return_values(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:177 + def potential_offense?(return_values, block_body, element_name, accumulator_name); end + + # Return values in a block are either the value given to next, + # the last line of a multiline block, or the only line of the block + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:129 + def return_values(block_body_node); end + + # Look for an index of the accumulator being returned, except where the index + # is the element. + # This is always an offense, in order to try to catch potential exceptions + # due to type mismatches + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:168 + def returned_accumulator_index(return_values, accumulator_name, element_name); end + + # If the accumulator is used in any return value, the node is acceptable since + # the accumulator has a chance to change each iteration + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:184 + def returns_accumulator_anywhere?(return_values, accumulator_name); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:66 +RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:67 +RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil), String) + +# Checks for unreachable code. +# The check are based on the presence of flow of control +# statement in non-final position in `begin` (implicit) blocks. +# +# @example +# +# # bad +# def some_method +# return +# do_something +# end +# +# # bad +# def some_method +# if cond +# return +# else +# return +# end +# do_something +# end +# +# # good +# def some_method +# do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:32 +class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:35 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:48 + def after_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:71 + def flow_command?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:52 + def on_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:41 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:46 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:62 + def on_kwbegin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:45 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:108 + def check_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:102 + def check_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:82 + def flow_expression?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:122 + def instance_eval_block?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:66 + def redefinable_flow_method?(method); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:118 + def register_redefinition(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:126 + def report_on_flow_command?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:33 +RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String) + +# Checks for loops that will have at most one iteration. +# +# A loop that can never reach the second iteration is a possible error in the code. +# In rare cases where only one iteration (or at most one iteration) is intended behavior, +# the code should be refactored to use `if` conditionals. +# +# NOTE: Block methods that are used with ``Enumerable``s are considered to be loops. +# +# `AllowedPatterns` can be used to match against the block receiver in order to allow +# code that would otherwise be registered as an offense (eg. `times` used not in an +# `Enumerable` context). +# +# @example +# # bad +# while node +# do_something(node) +# node = node.parent +# break +# end +# +# # good +# while node +# do_something(node) +# node = node.parent +# end +# +# # bad +# def verify_list(head) +# item = head +# begin +# if verify(item) +# return true +# else +# return false +# end +# end while(item) +# end +# +# # good +# def verify_list(head) +# item = head +# begin +# if verify(item) +# item = item.next +# else +# return false +# end +# end while(item) +# +# true +# end +# +# # bad +# def find_something(items) +# items.each do |item| +# if something?(item) +# return item +# else +# raise NotFoundError +# end +# end +# end +# +# # good +# def find_something(items) +# items.each do |item| +# if something?(item) +# return item +# end +# end +# raise NotFoundError +# end +# +# # bad +# 2.times { raise ArgumentError } +# +# @example AllowedPatterns: ['(exactly|at_least|at_most)\(\d+\)\.times'] (default) +# +# # good +# exactly(2).times { raise StandardError } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:86 +class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedPattern + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:142 + def break_command?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:100 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:98 + def on_for(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:105 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:104 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:95 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:97 + def on_until_post(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:92 + def on_while(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:96 + def on_while_post(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:152 + def break_statement?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:118 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:175 + def check_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:169 + def check_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:200 + def conditional_continue_keyword?(break_statement); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:109 + def loop_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:189 + def preceded_by_continue_statement?(break_statement); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:129 + def statements(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:90 +RuboCop::Cop::Lint::UnreachableLoop::CONTINUE_KEYWORDS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:89 +RuboCop::Cop::Lint::UnreachableLoop::MSG = T.let(T.unsafe(nil), String) + +# Checks for unreachable `in` pattern branches in `case...in` statements. +# +# An `in` branch is unreachable when a previous branch uses an unguarded +# catch-all pattern that matches any value unconditionally. Any `in` branches +# (and `else`) that follow such a catch-all are dead code. +# +# A catch-all pattern is one of: +# +# * A bare variable capture (`in x`) +# * An underscore (`in _`) +# * A pattern alias where the left side is a catch-all (`in _ => y`) +# * An alternation pattern where at least one alternative is a catch-all +# (`in _ | Integer`) +# +# NOTE: A catch-all pattern with a guard clause (e.g., `in _ if condition`) +# does NOT make subsequent branches unreachable because the guard might +# not be satisfied. +# +# @example +# +# # bad +# case value +# in Integer +# handle_integer +# in x +# handle_other +# in String +# handle_string +# else +# handle_else +# end +# +# # good +# case value +# in Integer +# handle_integer +# in String +# handle_string +# in x +# handle_other +# end +# +# # bad - else is unreachable after catch-all +# case value +# in Integer +# handle_integer +# in _ +# handle_other +# else +# handle_else +# end +# +# # good - guard clause means catch-all might not match +# case value +# in x if x.positive? +# handle_positive +# in Integer +# handle_integer +# else +# handle_other +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_pattern_branch.rb:68 +class RuboCop::Cop::Lint::UnreachablePatternBranch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_pattern_branch.rb:76 + def on_case_match(case_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_pattern_branch.rb:98 + def catch_all_pattern?(pattern); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_pattern_branch.rb:71 +RuboCop::Cop::Lint::UnreachablePatternBranch::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_pattern_branch.rb:72 +RuboCop::Cop::Lint::UnreachablePatternBranch::MSG_ELSE = T.let(T.unsafe(nil), String) + +# Common functionality for cops handling unused arguments. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/unused_argument.rb:7 +module RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/unused_argument.rb:10 + def after_leaving_scope(scope, _variable_table); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/unused_argument.rb:16 + def check_argument(variable); end +end + +# Checks for unused block arguments. +# +# @example +# # bad +# do_something do |used, unused| +# puts used +# end +# +# do_something do |bar| +# puts :foo +# end +# +# define_method(:foo) do |bar| +# puts :baz +# end +# +# # good +# do_something do |used, _unused| +# puts used +# end +# +# do_something do +# puts :foo +# end +# +# define_method(:foo) do |_bar| +# puts :baz +# end +# +# @example IgnoreEmptyBlocks: true (default) +# # good +# do_something { |unused| } +# +# @example IgnoreEmptyBlocks: false +# # bad +# do_something { |unused| } +# +# @example AllowUnusedKeywordArguments: false (default) +# # bad +# do_something do |unused: 42| +# foo +# end +# +# @example AllowUnusedKeywordArguments: true +# # good +# do_something do |unused: 42| +# foo +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:55 +class RuboCop::Cop::Lint::UnusedBlockArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::Cop::AutoCorrector + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:162 + def allow_unused_keyword_arguments?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:81 + def allowed_block?(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:85 + def allowed_keyword_argument?(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:99 + def augment_message(message, variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:65 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:69 + def check_argument(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:149 + def define_method_call?(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:156 + def empty_block?(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:166 + def ignore_empty_blocks?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:89 + def message(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:132 + def message_for_lambda(variable, all_arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:120 + def message_for_normal_block(variable, all_arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:144 + def message_for_underscore_prefix(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:77 + def used_block_local?(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:112 + def variable_type(variable); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:59 + def joining_forces; end + end +end + +# Checks for unused method arguments. +# +# @example +# # bad +# def some_method(used, unused, _unused_but_allowed) +# puts used +# end +# +# # good +# def some_method(used, _unused, _unused_but_allowed) +# puts used +# end +# +# @example AllowUnusedKeywordArguments: false (default) +# # bad +# def do_something(used, unused: 42) +# used +# end +# +# @example AllowUnusedKeywordArguments: true +# # good +# def do_something(used, unused: 42) +# used +# end +# +# @example IgnoreEmptyMethods: true (default) +# # good +# def do_something(unused) +# end +# +# @example IgnoreEmptyMethods: false +# # bad +# def do_something(unused) +# end +# +# @example IgnoreNotImplementedMethods: true (default) +# # with default value of `NotImplementedExceptions: ['NotImplementedError']` +# +# # good +# def do_something(unused) +# raise NotImplementedError +# end +# +# def do_something_else(unused) +# fail "TODO" +# end +# +# @example IgnoreNotImplementedMethods: true +# # with `NotImplementedExceptions: ['AbstractMethodError']` +# +# # good +# def do_something(unused) +# raise AbstractMethodError +# end +# +# @example IgnoreNotImplementedMethods: false +# # bad +# def do_something(unused) +# raise NotImplementedError +# end +# +# def do_something_else(unused) +# fail "TODO" +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:70 +class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:75 + def not_implemented?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:138 + def allowed_exception_class?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:90 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:103 + def block_argument_with_yield?(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:94 + def check_argument(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:112 + def ignored_method?(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:117 + def message(variable); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:80 + def autocorrect_incompatible_with; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:84 + def joining_forces; end + end +end + +# Identifies places where `URI.escape` can be replaced by +# `CGI.escape`, `URI.encode_www_form`, or `URI.encode_www_form_component` +# depending on your specific use case. +# Also this cop identifies places where `URI.unescape` can be replaced by +# `CGI.unescape`, `URI.decode_www_form`, +# or `URI.decode_www_form_component` depending on your specific use case. +# +# @example +# # bad +# URI.escape('http://example.com') +# URI.encode('http://example.com') +# +# # good +# CGI.escape('http://example.com') +# URI.encode_uri_component(uri) # Since Ruby 3.1 +# URI.encode_www_form([['example', 'param'], ['lang', 'en']]) +# URI.encode_www_form(page: 10, locale: 'en') +# URI.encode_www_form_component('http://example.com') +# +# # bad +# URI.unescape(enc_uri) +# URI.decode(enc_uri) +# +# # good +# CGI.unescape(enc_uri) +# URI.decode_uri_component(uri) # Since Ruby 3.1 +# URI.decode_www_form(enc_uri) +# URI.decode_www_form_component(enc_uri) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:34 +class RuboCop::Cop::Lint::UriEscapeUnescape < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:59 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:53 + def uri_escape_unescape?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:35 +RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_ESCAPE = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:40 +RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_UNESCAPE = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:49 +RuboCop::Cop::Lint::UriEscapeUnescape::METHOD_NAMES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:46 +RuboCop::Cop::Lint::UriEscapeUnescape::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:50 +RuboCop::Cop::Lint::UriEscapeUnescape::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `URI.regexp` is obsolete and should not be used. +# +# For Ruby 3.3 or lower, use `URI::DEFAULT_PARSER.make_regexp`. +# For Ruby 3.4 or higher, use `URI::RFC2396_PARSER.make_regexp`. +# +# NOTE: If you need to support both Ruby 3.3 and lower as well as Ruby 3.4 and higher, +# consider manually changing the code as follows: +# +# [source,ruby] +# ---- +# defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::DEFAULT_PARSER +# ---- +# +# @example +# # bad +# URI.regexp('http://example.com') +# +# # good - Ruby 3.3 or lower +# URI::DEFAULT_PARSER.make_regexp('http://example.com') +# +# # good - Ruby 3.4 or higher +# URI::RFC2396_PARSER.make_regexp('http://example.com') +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_regexp.rb:29 +class RuboCop::Cop::Lint::UriRegexp < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/uri_regexp.rb:40 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/uri_regexp.rb:36 + def uri_constant?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_regexp.rb:32 +RuboCop::Cop::Lint::UriRegexp::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_regexp.rb:33 +RuboCop::Cop::Lint::UriRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant access modifiers, including those with no +# code, those which are repeated, those which are on top-level, and +# leading `public` modifiers in a class or module body. +# Conditionally-defined methods are considered as always being defined, +# and thus access modifiers guarding such methods are not redundant. +# +# This cop has `ContextCreatingMethods` option. The default setting value +# is an empty array that means no method is specified. +# This setting is an array of methods which, when called, are known to +# create its own context in the module's current access context. +# +# It also has `MethodCreatingMethods` option. The default setting value +# is an empty array that means no method is specified. +# This setting is an array of methods which, when called, are known to +# create other methods in the module's current access context. +# +# @example +# # bad +# class Foo +# public # this is redundant (default access is public) +# +# def method +# end +# end +# +# # bad +# class Foo +# # The following is redundant (methods defined on the class' +# # singleton class are not affected by the private modifier) +# private +# +# def self.method3 +# end +# end +# +# # bad +# class Foo +# protected +# +# define_method(:method2) do +# end +# +# protected # this is redundant (repeated from previous modifier) +# +# [1,2,3].each do |i| +# define_method("foo#{i}") do +# end +# end +# end +# +# # bad +# class Foo +# private # this is redundant (no following methods are defined) +# end +# +# # bad +# private # this is useless (access modifiers have no effect on top-level) +# +# def method +# end +# +# # good +# class Foo +# private # this is not redundant (a method is defined) +# +# def method2 +# end +# end +# +# # good +# class Foo +# # The following is not redundant (conditionally defined methods are +# # considered as always defining a method) +# private +# +# if condition? +# def method +# end +# end +# end +# +# # good +# class Foo +# protected # this is not redundant (a method is defined) +# +# define_method(:method2) do +# end +# end +# +# @example ContextCreatingMethods: concerning +# # Lint/UselessAccessModifier: +# # ContextCreatingMethods: +# # - concerning +# +# # good +# require 'active_support/concern' +# class Foo +# concerning :Bar do +# def some_public_method +# end +# +# private +# +# def some_private_method +# end +# end +# +# # this is not redundant because `concerning` created its own context +# private +# +# def some_other_private_method +# end +# end +# +# @example MethodCreatingMethods: delegate +# # Lint/UselessAccessModifier: +# # MethodCreatingMethods: +# # - delegate +# +# # good +# require 'active_support/core_ext/module/delegation' +# class Foo +# # this is not redundant because `delegate` creates methods +# private +# +# delegate :method_a, to: :method_b +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:133 +class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:184 + def class_or_instance_eval?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:179 + def dynamic_method_definition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:154 + def on_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:145 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:139 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:152 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:142 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:151 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:143 + def on_sclass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:174 + def static_method_definition?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:200 + def access_modifier?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:302 + def any_context_creating_methods?(child); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:275 + def any_method_definition?(child); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:167 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:214 + def check_child_nodes(node, unused, cur_vis); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:244 + def check_new_visibility(node, unused, new_vis, cur_vis); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:188 + def check_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:204 + def check_scope(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:233 + def check_send_node(node, cur_vis, unused); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:296 + def eval_call?(child); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:265 + def included_block?(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:269 + def method_definition?(child); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:292 + def start_of_new_scope?(child); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:137 +RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for every useless assignment to local variable in every +# scope. +# The basic idea for this cop was from the warning of `ruby -cw`: +# +# [source,console] +# ---- +# assigned but unused variable - foo +# ---- +# +# Currently this cop has advanced logic that detects unreferenced +# reassignments and properly handles varied cases such as branch, loop, +# rescue, ensure, etc. +# +# This cop's autocorrection avoids cases like `a ||= 1` because removing assignment from +# operator assignment can cause `NameError` if this assignment has been used to declare +# a local variable. For example, replacing `a ||= 1` with `a || 1` may cause +# "undefined local variable or method `a' for main:Object (NameError)". +# +# NOTE: Given the assignment `foo = 1, bar = 2`, removing unused variables +# can lead to a syntax error, so this case is not autocorrected. +# +# @example +# +# # bad +# def some_method +# some_var = 1 +# do_something +# end +# +# # good +# def some_method +# some_var = 1 +# do_something(some_var) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:40 +class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:51 + def after_leaving_scope(scope, _variable_table); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:174 + def autocorrect(corrector, assignment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:113 + def chained_assignment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:63 + def check_for_unused_assignment(variable, assignment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:55 + def check_for_unused_assignments(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:158 + def collect_variable_like_names(scope); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:84 + def ignored_assignment?(variable, assignment_node, assignment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:89 + def message_for_useless_assignment(assignment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:119 + def message_specification(assignment, variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:129 + def multiple_assignment_message(variable_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:95 + def offense_range(assignment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:134 + def operator_assignment_message(scope, assignment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:191 + def remove_exception_assignment_part(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:215 + def remove_local_variable_assignment_part(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:204 + def remove_trailing_character_from_operator(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:200 + def rename_variable_with_underscore(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:208 + def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end + + # TODO: More precise handling (rescue, ensure, nested begin, etc.) + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:148 + def return_value_node_of_scope(scope); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:103 + def sequential_assignment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:141 + def similar_name_message(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:219 + def variable_in_loop_condition?(assignment_node, variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:167 + def variable_like_method_invocation?(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:47 + def joining_forces; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:45 +RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for useless constant scoping. Private constants must be defined using +# `private_constant`. Even if `private` access modifier is used, it is public scope despite +# its appearance. +# +# It does not support autocorrection due to behavior change and multiple ways to fix it. +# Or a public constant may be intended. +# +# @example +# +# # bad +# class Foo +# private +# PRIVATE_CONST = 42 +# end +# +# # good +# class Foo +# PRIVATE_CONST = 42 +# private_constant :PRIVATE_CONST +# end +# +# # good +# class Foo +# PUBLIC_CONST = 42 # If private scope is not intended. +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_constant_scoping.rb:32 +class RuboCop::Cop::Lint::UselessConstantScoping < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_constant_scoping.rb:40 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_constant_scoping.rb:36 + def private_constants(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_constant_scoping.rb:49 + def after_private_modifier?(left_siblings); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_constant_scoping.rb:59 + def private_constantize?(right_siblings, const_value); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_constant_scoping.rb:33 +RuboCop::Cop::Lint::UselessConstantScoping::MSG = T.let(T.unsafe(nil), String) + +# Checks for usage of method `fetch` or `Array.new` with default value argument +# and block. In such cases, block will always be used as default value. +# +# This cop emulates Ruby warning "block supersedes default value argument" which +# applies to `Array.new`, `Array#fetch`, `Hash#fetch`, `ENV.fetch` and +# `Thread#fetch`. +# +# A `fetch` call without a receiver is considered a custom method and does not register +# an offense. +# +# @safety +# This cop is unsafe because the receiver could have nonstandard implementation +# of `fetch`, or be a class other than the one listed above. +# +# It is also unsafe because default value argument could have side effects: +# +# [source,ruby] +# ---- +# def x(a) = puts "side effect" +# Array.new(5, x(1)) { 2 } +# ---- +# +# so removing it would change behavior. +# +# @example +# # bad +# x.fetch(key, default_value) { block_value } +# Array.new(size, default_value) { block_value } +# +# # good +# x.fetch(key) { block_value } +# Array.new(size) { block_value } +# +# # also good - in case default value argument is desired instead +# x.fetch(key, default_value) +# Array.new(size, default_value) +# +# # good - keyword arguments aren't registered as offenses +# x.fetch(key, keyword: :arg) { block_value } +# +# @example AllowedReceivers: ['Rails.cache'] +# # good +# Rails.cache.fetch(name, options) { block } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:50 +class RuboCop::Cop::Lint::UselessDefaultValueArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedReceivers + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:59 + def default_value_argument_and_block(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:82 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:69 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:86 + def hash_without_braces?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:54 +RuboCop::Cop::Lint::UselessDefaultValueArgument::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:56 +RuboCop::Cop::Lint::UselessDefaultValueArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for calls to `defined?` with strings or symbols as the argument. +# Such calls will always return `'expression'`, you probably meant to +# check for the existence of a constant, method, or variable instead. +# +# `defined?` is part of the Ruby syntax and doesn't behave like normal methods. +# You can safely pass in what you are checking for directly, without encountering +# a `NameError`. +# +# When interpolation is used, oftentimes it is not possible to write the +# code with `defined?`. In these cases, switch to one of the more specific methods: +# +# * `class_variable_defined?` +# * `const_defined?` +# * `method_defined?` +# * `instance_variable_defined?` +# * `binding.local_variable_defined?` +# +# @example +# +# # bad +# defined?('FooBar') +# defined?(:FooBar) +# defined?(:foo_bar) +# defined?('foo_bar') +# +# # good +# defined?(FooBar) +# defined?(foo_bar) +# +# # bad - interpolation +# bar = 'Bar' +# defined?("Foo::#{bar}::Baz") +# +# # good +# bar = 'Bar' +# defined?(Foo) && Foo.const_defined?(bar) && Foo.const_get(bar).const_defined?(:Baz) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_defined.rb:42 +class RuboCop::Cop::Lint::UselessDefined < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_defined.rb:46 + def on_defined?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_defined.rb:43 +RuboCop::Cop::Lint::UselessDefined::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_defined.rb:44 +RuboCop::Cop::Lint::UselessDefined::TYPES = T.let(T.unsafe(nil), Hash) + +# Checks for useless `else` in `begin..end` without `rescue`. +# +# NOTE: This syntax is no longer valid on Ruby 2.6 or higher. +# +# @example +# +# # bad +# begin +# do_something +# else +# do_something_else # This will never be run. +# end +# +# # good +# begin +# do_something +# rescue +# handle_errors +# else +# do_something_else +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_else_without_rescue.rb:27 +class RuboCop::Cop::Lint::UselessElseWithoutRescue < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_else_without_rescue.rb:34 + def on_new_investigation; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_else_without_rescue.rb:30 +RuboCop::Cop::Lint::UselessElseWithoutRescue::MSG = T.let(T.unsafe(nil), String) + +# Checks for useless method definitions, specifically: empty constructors +# and methods just delegating to `super`. +# +# @safety +# This cop is unsafe as it can register false positives for cases when an empty +# constructor just overrides the parent constructor, which is bad anyway. +# +# @example +# # bad +# def initialize +# super +# end +# +# def method +# super +# end +# +# # good - with default arguments +# def initialize(x = Object.new) +# super +# end +# +# # good +# def initialize +# super +# initialize_internals +# end +# +# def method(*args) +# super(:extra_arg, *args) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_method_definition.rb:38 +class RuboCop::Cop::Lint::UselessMethodDefinition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_method_definition.rb:43 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_method_definition.rb:53 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_method_definition.rb:65 + def delegating?(node, def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_method_definition.rb:57 + def method_definition_with_modifier?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_method_definition.rb:61 + def use_rest_or_optional_args?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_method_definition.rb:41 +RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Certain numeric operations have no impact, being: +# Adding or subtracting 0, multiplying or dividing by 1 or raising to the power of 1. +# These are probably leftover from debugging, or are mistakes. +# +# @example +# +# # bad +# x + 0 +# x - 0 +# x * 1 +# x / 1 +# x ** 1 +# +# # good +# x +# +# # bad +# x += 0 +# x -= 0 +# x *= 1 +# x /= 1 +# x **= 1 +# +# # good +# x = x +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:32 +class RuboCop::Cop::Lint::UselessNumericOperation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:54 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:56 + def on_op_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:44 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:42 + def useless_abbreviated_assignment?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:39 + def useless_operation?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:69 + def useless?(operation, number); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:35 +RuboCop::Cop::Lint::UselessNumericOperation::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:36 +RuboCop::Cop::Lint::UselessNumericOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for useless OR (`||` and `or`) expressions. +# +# Some methods always return a truthy value, even when called +# on `nil` (e.g. `nil.to_i` evaluates to `0`). Therefore, OR expressions +# appended after these methods will never evaluate. +# +# @safety +# As shown in the examples below, there are generally two possible ways to correct the +# offense, but this cop's autocorrection always chooses the option that preserves the +# current behavior. While this does not change how the code behaves, that option is not +# necessarily the appropriate fix in every situation. For this reason, the autocorrection +# provided by this cop is considered unsafe. +# +# @example +# +# # bad +# x.to_a || fallback +# x.to_c || fallback +# x.to_d || fallback +# x.to_i || fallback +# x.to_f || fallback +# x.to_h || fallback +# x.to_r || fallback +# x.to_s || fallback +# x.to_sym || fallback +# x.intern || fallback +# x.inspect || fallback +# x.hash || fallback +# x.object_id || fallback +# x.__id__ || fallback +# +# x.to_s or fallback +# +# # good - if fallback is same as return value of method called on nil +# x.to_a # nil.to_a returns [] +# x.to_c # nil.to_c returns (0+0i) +# x.to_d # nil.to_d returns 0.0 +# x.to_i # nil.to_i returns 0 +# x.to_f # nil.to_f returns 0.0 +# x.to_h # nil.to_h returns {} +# x.to_r # nil.to_r returns (0/1) +# x.to_s # nil.to_s returns '' +# x.to_sym # nil.to_sym raises an error +# x.intern # nil.intern raises an error +# x.inspect # nil.inspect returns "nil" +# x.hash # nil.hash returns an Integer +# x.object_id # nil.object_id returns an Integer +# x.__id__ # nil.object_id returns an Integer +# +# # good - if the intention is not to call the method on nil +# x&.to_a || fallback +# x&.to_c || fallback +# x&.to_d || fallback +# x&.to_i || fallback +# x&.to_f || fallback +# x&.to_h || fallback +# x&.to_r || fallback +# x&.to_s || fallback +# x&.to_sym || fallback +# x&.intern || fallback +# x&.inspect || fallback +# x&.hash || fallback +# x&.object_id || fallback +# x&.__id__ || fallback +# +# x&.to_s or fallback +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_or.rb:73 +class RuboCop::Cop::Lint::UselessOr < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_or.rb:87 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_or.rb:83 + def truthy_return_value_method?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_or.rb:100 + def report_offense(or_node, truthy_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_or.rb:76 +RuboCop::Cop::Lint::UselessOr::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_or.rb:78 +RuboCop::Cop::Lint::UselessOr::TRUTHY_RETURN_VALUE_METHODS = T.let(T.unsafe(nil), Set) + +# Checks for useless ``rescue``s, which only reraise rescued exceptions. +# +# @example +# # bad +# def foo +# do_something +# rescue +# raise +# end +# +# # bad +# def foo +# do_something +# rescue => e +# raise # or 'raise e', or 'raise $!', or 'raise $ERROR_INFO' +# end +# +# # good +# def foo +# do_something +# rescue +# do_cleanup +# raise +# end +# +# # bad (latest rescue) +# def foo +# do_something +# rescue ArgumentError +# # noop +# rescue +# raise +# end +# +# # good (not the latest rescue) +# def foo +# do_something +# rescue ArgumentError +# raise +# rescue +# # noop +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_rescue.rb:49 +class RuboCop::Cop::Lint::UselessRescue < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_rescue.rb:52 + def on_rescue(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_rescue.rb:83 + def exception_objects(resbody_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_rescue.rb:60 + def only_reraising?(resbody_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_rescue.rb:75 + def use_exception_variable_in_ensure?(resbody_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_rescue.rb:50 +RuboCop::Cop::Lint::UselessRescue::MSG = T.let(T.unsafe(nil), String) + +# Looks for `ruby2_keywords` calls for methods that do not need it. +# +# `ruby2_keywords` should only be called on methods that accept an argument splat +# (`\*args`) but do not explicit keyword arguments (`k:` or `k: true`) or +# a keyword splat (`**kwargs`). +# +# @example +# # good (splat argument without keyword arguments) +# ruby2_keywords def foo(*args); end +# +# # bad (no arguments) +# ruby2_keywords def foo; end +# +# # good +# def foo; end +# +# # bad (positional argument) +# ruby2_keywords def foo(arg); end +# +# # good +# def foo(arg); end +# +# # bad (double splatted argument) +# ruby2_keywords def foo(**args); end +# +# # good +# def foo(**args); end +# +# # bad (keyword arguments) +# ruby2_keywords def foo(i:, j:); end +# +# # good +# def foo(i:, j:); end +# +# # bad (splat argument with keyword arguments) +# ruby2_keywords def foo(*args, i:, j:); end +# +# # good +# def foo(*args, i:, j:); end +# +# # bad (splat argument with double splat) +# ruby2_keywords def foo(*args, **kwargs); end +# +# # good +# def foo(*args, **kwargs); end +# +# # bad (ruby2_keywords given a symbol) +# def foo; end +# ruby2_keywords :foo +# +# # good +# def foo; end +# +# # bad (ruby2_keywords with dynamic method) +# define_method(:foo) { |arg| } +# ruby2_keywords :foo +# +# # good +# define_method(:foo) { |arg| } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:66 +class RuboCop::Cop::Lint::UselessRuby2Keywords < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:72 + def method_definition(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:79 + def on_send(node); end + + private + + # `ruby2_keywords` is only allowed if there's a `restarg` and no keyword arguments + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:118 + def allowed_arguments?(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:109 + def find_method_definition(node, method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:91 + def inspect_def(node, def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:97 + def inspect_sym(node, sym_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:67 +RuboCop::Cop::Lint::UselessRuby2Keywords::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:68 +RuboCop::Cop::Lint::UselessRuby2Keywords::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for setter call to local variable as the final +# expression of a function definition. +# +# @safety +# There are edge cases in which the local variable references a +# value that is also accessible outside the local scope. This is not +# detected by the cop, and it can yield a false positive. +# +# As well, autocorrection is unsafe because the method's +# return value will be changed. +# +# @example +# +# # bad +# def something +# x = Something.new +# x.attr = 5 +# end +# +# # good +# def something +# x = Something.new +# x.attr = 5 +# x +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:31 +class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:37 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:54 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:59 + def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:63 + def last_expression(body); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:35 +RuboCop::Cop::Lint::UselessSetterCall::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:34 +RuboCop::Cop::Lint::UselessSetterCall::MSG = T.let(T.unsafe(nil), String) + +# This class tracks variable assignments in a method body +# and if a variable contains object passed as argument at the end of +# the method. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:72 +class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:73 + def initialize(body_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:148 + def constructor?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:78 + def contain_local_object?(variable_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:140 + def process_assignment(asgn_node, rhs_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:96 + def process_assignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:131 + def process_binary_operator_assignment(op_asgn_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:123 + def process_logical_operator_assignment(asgn_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:109 + def process_multiple_assignment(masgn_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:88 + def scan(node, &block); end +end + +# Checks for uses of `Integer#times` that will never yield +# (when the integer ``<= 0``) or that will only ever yield once +# (`1.times`). +# +# @safety +# This cop is unsafe as `times` returns its receiver, which is +# *usually* OK, but might change behavior. +# +# @example +# # bad +# -5.times { do_something } +# 0.times { do_something } +# 1.times { do_something } +# 1.times { |i| do_something(i) } +# +# # good +# do_something +# do_something(1) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:24 +class RuboCop::Cop::Lint::UselessTimes < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:37 + def block_arg(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:42 + def block_reassigns_arg?(param0, param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:46 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:32 + def times_call?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:62 + def autocorrect(corrector, count, node, proc_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:84 + def autocorrect_block(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:80 + def autocorrect_block_pass(corrector, node, proc_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:94 + def fix_indentation(source, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:72 + def never_process?(count, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:106 + def own_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:76 + def remove_node(corrector, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:28 +RuboCop::Cop::Lint::UselessTimes::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:29 +RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:6 +module RuboCop::Cop::Lint::Utils; end + +# Utility class that checks if the receiver can't be nil. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:8 +class RuboCop::Cop::Lint::Utils::NilReceiverChecker + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:11 + def initialize(receiver, additional_nil_methods); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:17 + def cant_be_nil?; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:24 + def _cant_be_nil?(node, receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:125 + def csend_root_receiver(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:115 + def else_branch?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:119 + def find_top_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:109 + def non_nil_condition?(condition, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:81 + def non_nil_method?(method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:86 + def sole_condition_of_parent_if?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:9 +RuboCop::Cop::Lint::Utils::NilReceiverChecker::NIL_METHODS = T.let(T.unsafe(nil), Set) + +# Checks for operators, variables, literals, lambda, proc and nonmutating +# methods used in void context. +# +# `each` blocks are allowed to prevent false positives. +# For example, the expression inside the `each` block below. +# It's not void, especially when the receiver is an `Enumerator`: +# +# [source,ruby] +# ---- +# enumerator = [1, 2, 3].filter +# enumerator.each { |item| item >= 2 } #=> [2, 3] +# ---- +# +# NOTE: Return values in assignment method definitions such as `def foo=(arg)` are +# detected because they are in a void context. However, autocorrection does not remove +# the return value, as that would change behavior. In such cases, whether to remove +# the return value or rename the method to something more appropriate should be left to +# the user. +# +# @example CheckForMethodsWithNoSideEffects: false (default) +# # bad +# def some_method +# some_num * 10 +# do_something +# end +# +# def some_method(some_var) +# some_var +# do_something +# end +# +# @example CheckForMethodsWithNoSideEffects: true +# # bad +# def some_method(some_array) +# some_array.sort +# do_something(some_array) +# end +# +# # good +# def some_method +# do_something +# some_num * 10 +# end +# +# def some_method(some_var) +# do_something +# some_var +# end +# +# def some_method(some_array) +# some_array.sort! +# do_something(some_array) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:59 +class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:98 + def on_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:87 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:103 + def on_ensure(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:96 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:101 + def on_kwbegin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:95 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:289 + def all_keys_entirely_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:293 + def all_values_entirely_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:267 + def autocorrect_nonmutating_send(corrector, node, suggestion); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:260 + def autocorrect_void_expression(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:247 + def autocorrect_void_op(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:109 + def check_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:141 + def check_case_expression(case_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:146 + def check_case_match_expression(case_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:232 + def check_ensure(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:119 + def check_expression(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:137 + def check_if_expression(if_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:188 + def check_literal(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:214 + def check_nonmutating(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:198 + def check_self(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:170 + def check_var(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:206 + def check_void_expression(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:127 + def check_void_expression_nodes(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:154 + def check_void_op(node, &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:276 + def entirely_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:240 + def in_void_context?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:72 +RuboCop::Cop::Lint::Void::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:66 +RuboCop::Cop::Lint::Void::CONST_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:69 +RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:67 +RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:82 +RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:84 +RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:75 +RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:70 +RuboCop::Cop::Lint::Void::NONMUTATING_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:74 +RuboCop::Cop::Lint::Void::OPERATORS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:64 +RuboCop::Cop::Lint::Void::OP_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:68 +RuboCop::Cop::Lint::Void::SELF_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:73 +RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:65 +RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) + +# Common functionality for obtaining source ranges from regexp matches +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/match_range.rb:6 +module RuboCop::Cop::MatchRange + include ::RuboCop::Cop::RangeHelp + + private + + # Return a new `Range` covering the first matching group number for each + # match of `regex` inside `range` + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/match_range.rb:13 + def each_match_range(range, regex); end + + # For a `match` inside `range`, return a new `Range` covering the match + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/match_range.rb:18 + def match_range(range, match); end +end + +# Message Annotator class annotates a basic offense message +# based on params passed into initializer. +# +# @see #initialize +# +# @example +# RuboCop::Cop::MessageAnnotator.new( +# config, cop_name, cop_config, @options +# ).annotate('message') +# #=> 'Cop/CopName: message (http://example.org/styleguide)' +# +# pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:15 +class RuboCop::Cop::MessageAnnotator + # @param config [RuboCop::Config] Check configs for all cops + # @note Message Annotator specifically checks the + # following config options for_all_cops + # :StyleGuideBaseURL [String] URL for styleguide + # :DisplayStyleGuide [Boolean] Include styleguide and reference URLs + # :ExtraDetails [Boolean] Include cop details + # :DisplayCopNames [Boolean] Include cop name + # + # @param [String] cop_name for specific cop name + # @param [Hash] cop_config configs for specific cop, from config#for_cop + # @option cop_config [String] :StyleGuide Extension of base styleguide URL + # @option cop_config [String] :References Full reference URLs + # @option cop_config [String] :Details + # + # @param [Hash, nil] options optional + # @option options [Boolean] :display_style_guide + # Include style guide and reference URLs + # @option options [Boolean] :extra_details + # Include cop specific details + # @option options [Boolean] :debug + # Include debug output + # @option options [Boolean] :display_cop_names + # Include cop name + # + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:47 + def initialize(config, cop_name, cop_config, options); end + + # Returns the annotated message, + # based on params passed into initializer + # + # @return [String] annotated message + # + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:58 + def annotate(message); end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:16 + def config; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:16 + def cop_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:16 + def cop_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:16 + def options; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:68 + def urls; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:115 + def debug?; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:128 + def details; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:119 + def display_cop_names?; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:98 + def display_style_guide?; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:111 + def extra_details?; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:102 + def reference_urls; end + + # Returns the base style guide URL from AllCops or the specific department + # + # @return [String] style guide URL + # + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:91 + def style_guide_base_url; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:74 + def style_guide_url; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:21 + def style_guide_urls; end + end +end + +# @api private +# +# This module handles measurement and reporting of complexity in methods. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:8 +module RuboCop::Cop::MethodComplexity + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::ExcludeLimit + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:38 + def define_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:15 + def max=(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:24 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:17 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:22 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:33 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:32 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:43 + def check_complexity(node, method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:62 + def complexity(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:74 + def location(node); end +end + +# Common code for cops that deal with preferred methods. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/method_preference.rb:6 +module RuboCop::Cop::MethodPreference + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_preference.rb:25 + def default_cop_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_preference.rb:9 + def preferred_method(method); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_preference.rb:13 + def preferred_methods; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb:5 +module RuboCop::Cop::Metrics; end + +# Checks that the ABC size of methods is not higher than the +# configured maximum. The ABC size is based on assignments, branches +# (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric +# and https://en.wikipedia.org/wiki/ABC_Software_Metric. +# +# Interpreting ABC size: +# +# * ``<= 17`` satisfactory +# * `18..30` unsatisfactory +# * `>` 30 dangerous +# +# You can have repeated "attributes" calls count as a single "branch". +# For this purpose, attributes are any method with no argument; no attempt +# is meant to distinguish actual `attr_reader` from other methods. +# +# @example CountRepeatedAttributes: false (default is true) +# +# # `model` and `current_user`, referenced 3 times each, +# # are each counted as only 1 branch each if +# # `CountRepeatedAttributes` is set to 'false' +# +# def search +# @posts = model.active.visible_by(current_user) +# .search(params[:q]) +# @posts = model.some_process(@posts, current_user) +# @posts = model.another_process(@posts, current_user) +# +# render 'pages/search/page' +# end +# +# This cop also takes into account `AllowedMethods` (defaults to `[]`) +# And `AllowedPatterns` (defaults to `[]`) +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/abc_size.rb:39 +class RuboCop::Cop::Metrics::AbcSize < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + include ::RuboCop::Cop::MethodComplexity + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/abc_size.rb:47 + def complexity(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/abc_size.rb:42 +RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) + +# Checks if the length of a block exceeds some maximum value. +# Comment lines can optionally be ignored. +# The maximum allowed length is configurable. +# The cop can be configured to ignore blocks passed to certain methods. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# NOTE: This cop does not apply for `Struct` definitions. +# +# NOTE: The `ExcludedMethods` configuration is deprecated and only kept +# for backwards compatibility. Please use `AllowedMethods` and `AllowedPatterns` +# instead. By default, there are no methods to allowed. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# something do +# array = [ # +1 +# 1, +# 2 +# ] +# +# hash = { # +1 +# key: 'value' +# } +# +# msg = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/block_length.rb:45 +class RuboCop::Cop::Metrics::BlockLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_length.rb:52 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_length.rb:60 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_length.rb:59 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_length.rb:82 + def cop_label; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_length.rb:64 + def method_receiver_excluded?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/block_length.rb:50 +RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) + +# Checks for excessive nesting of conditional and looping constructs. +# Deeply nested code is harder to read, understand, and maintain. +# Extracting nested logic into methods improves clarity. +# +# You can configure if blocks are considered using the `CountBlocks` and `CountModifierForms` +# options. When both are set to `false` (the default) blocks and modifier forms are not +# counted towards the nesting level. Set them to `true` to include these in the nesting level +# calculation as well. +# +# The maximum level of nesting allowed is configurable. +# +# @example Max: 3 (default) +# # bad +# if condition1 +# if condition2 +# if condition3 +# if condition4 +# do_something +# end +# end +# end +# end +# +# # good +# if condition1 +# if condition2 +# if condition3 +# do_something +# end +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:37 +class RuboCop::Cop::Metrics::BlockNesting < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:40 + def max=(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:42 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:51 + def check_nesting_level(node, max, current_level); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:75 + def consider_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:85 + def count_blocks?; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:67 + def count_if_block?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:89 + def count_modifier_forms?; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:81 + def message(max); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:38 +RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array) + +# Checks if the length of a class exceeds some maximum value. +# Comment lines can optionally be ignored. +# The maximum allowed length is configurable. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# NOTE: This cop also applies for `Struct` definitions. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# class Foo +# ARRAY = [ # +1 +# 1, +# 2 +# ] +# +# HASH = { # +1 +# key: 'value' +# } +# +# MSG = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/class_length.rb:40 +class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/class_length.rb:53 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/class_length.rb:43 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/class_length.rb:47 + def on_sclass(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/class_length.rb:67 + def find_expression_within_parent(parent); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/class_length.rb:63 + def message(length, max_length); end +end + +# Checks for literals with extremely many entries. This is indicative of +# configuration or data that may be better extracted somewhere else, like +# a database, fetched from an API, or read from a non-code file (CSV, +# JSON, YAML, etc.). +# +# @example +# # bad +# # Huge Array literal +# [1, 2, '...', 999_999_999] +# +# # bad +# # Huge Hash literal +# { 1 => 1, 2 => 2, '...' => '...', 999_999_999 => 999_999_999} +# +# # bad +# # Huge Set "literal" +# Set[1, 2, '...', 999_999_999] +# +# # good +# # Reasonably sized Array literal +# [1, 2, '...', 10] +# +# # good +# # Reading huge Array from external data source +# # File.readlines('numbers.txt', chomp: true).map!(&:to_i) +# +# # good +# # Reasonably sized Hash literal +# { 1 => 1, 2 => 2, '...' => '...', 10 => 10} +# +# # good +# # Reading huge Hash from external data source +# CSV.foreach('numbers.csv', headers: true).each_with_object({}) do |row, hash| +# hash[row["key"].to_i] = row["value"].to_i +# end +# +# # good +# # Reasonably sized Set "literal" +# Set[1, 2, '...', 10] +# +# # good +# # Reading huge Set from external data source +# SomeFramework.config_for(:something)[:numbers].to_set +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:50 +class RuboCop::Cop::Metrics::CollectionLiteralLength < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:60 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:63 + def on_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:65 + def on_index(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:71 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:56 + def set_const?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:77 + def collection_threshold; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:51 +RuboCop::Cop::Metrics::CollectionLiteralLength::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:53 +RuboCop::Cop::Metrics::CollectionLiteralLength::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that the cyclomatic complexity of methods is not higher +# than the configured maximum. The cyclomatic complexity is the number of +# linearly independent paths through a method. The algorithm counts +# decision points and adds one. +# +# An if statement (or unless or ?:) increases the complexity by one. An +# else branch does not, since it doesn't add a decision point. The && +# operator (or keyword and) can be converted to a nested if statement, +# and ||/or is shorthand for a sequence of ifs, so they also add one. +# Loops can be said to have an exit condition, so they add one. +# Blocks that are calls to builtin iteration methods +# (e.g. `ary.map{...}`) also add one, others are ignored. +# +# @example +# +# def each_child_node(*types) # count begins: 1 +# unless block_given? # unless: +1 +# return to_enum(__method__, *types) +# end +# +# children.each do |child| # each{}: +1 +# next unless child.is_a?(Node) # unless: +1 +# +# yield child if types.empty? || # if: +1, ||: +1 +# types.include?(child.type) +# end +# +# self +# end # total: 6 +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/cyclomatic_complexity.rb:35 +class RuboCop::Cop::Metrics::CyclomaticComplexity < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + include ::RuboCop::Cop::MethodComplexity + include ::RuboCop::Cop::Metrics::Utils::IteratingBlock + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/cyclomatic_complexity.rb:45 + def complexity_score_for(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/cyclomatic_complexity.rb:52 + def count_block?(block); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/cyclomatic_complexity.rb:40 +RuboCop::Cop::Metrics::CyclomaticComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/cyclomatic_complexity.rb:39 +RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) + +# Checks if the length of a method exceeds some maximum value. +# Comment lines can optionally be allowed. +# The maximum allowed length is configurable. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# NOTE: The `ExcludedMethods` and `IgnoredMethods` configuration is +# deprecated and only kept for backwards compatibility. +# Please use `AllowedMethods` and `AllowedPatterns` instead. +# By default, there are no methods to allowed. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# def m +# array = [ # +1 +# 1, +# 2 +# ] +# +# hash = { # +1 +# key: 'value' +# } +# +# <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:43 +class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:57 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:50 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:55 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:66 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:65 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:74 + def allowed?(method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:70 + def cop_label; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:48 +RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) + +# Checks if the length of a module exceeds some maximum value. +# Comment lines can optionally be ignored. +# The maximum allowed length is configurable. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# module M +# ARRAY = [ # +1 +# 1, +# 2 +# ] +# +# HASH = { # +1 +# key: 'value' +# } +# +# MSG = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/module_length.rb:38 +class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/module_length.rb:52 + def module_definition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/module_length.rb:45 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/module_length.rb:41 + def on_module(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/module_length.rb:56 + def message(length, max_length); end +end + +# Checks for methods with too many parameters. +# +# The maximum number of parameters is configurable. +# Keyword arguments can optionally be excluded from the total count, +# as they add less complexity than positional or optional parameters. +# +# Any number of arguments for `initialize` method inside a block of +# `Struct.new` and `Data.define` like this is always allowed: +# +# [source,ruby] +# ---- +# Struct.new(:one, :two, :three, :four, :five, keyword_init: true) do +# def initialize(one:, two:, three:, four:, five:) +# end +# end +# ---- +# +# This is because checking the number of arguments of the `initialize` method +# does not make sense. +# +# NOTE: Explicit block argument `&block` is not counted to prevent +# erroneous change that is avoided by making block argument implicit. +# +# @example Max: 3 +# # good +# def foo(a, b, c = 1) +# end +# +# @example Max: 2 +# # bad +# def foo(a, b, c = 1) +# end +# +# @example CountKeywordArgs: true (default) +# # counts keyword args towards the maximum +# +# # bad (assuming Max is 3) +# def foo(a, b, c, d: 1) +# end +# +# # good (assuming Max is 3) +# def foo(a, b, c: 1) +# end +# +# @example CountKeywordArgs: false +# # don't count keyword args towards the maximum +# +# # good (assuming Max is 3) +# def foo(a, b, c, d: 1) +# end +# +# This cop also checks for the maximum number of optional parameters. +# This can be configured using the `MaxOptionalParameters` config option. +# +# @example MaxOptionalParameters: 3 (default) +# # good +# def foo(a = 1, b = 2, c = 3) +# end +# +# @example MaxOptionalParameters: 2 +# # bad +# def foo(a = 1, b = 2, c = 3) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:70 +class RuboCop::Cop::Metrics::ParameterLists < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:121 + def argument_to_lambda_or_proc?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:71 + def max=(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:72 + def max_optional_parameters=(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:104 + def on_args(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:90 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:102 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:81 + def struct_new_or_data_define_block?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:125 + def args_count(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:141 + def count_keyword_args?; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:137 + def max_optional_parameters; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:133 + def max_params; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:74 +RuboCop::Cop::Metrics::ParameterLists::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:77 +RuboCop::Cop::Metrics::ParameterLists::NAMED_KEYWORD_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:75 +RuboCop::Cop::Metrics::ParameterLists::OPTIONAL_PARAMETERS_MSG = T.let(T.unsafe(nil), String) + +# Tries to produce a complexity score that's a measure of the +# complexity the reader experiences when looking at a method. For that +# reason it considers `when` nodes as something that doesn't add as much +# complexity as an `if` or a `&&`. Except if it's one of those special +# `case`/`when` constructs where there's no expression after `case`. Then +# the cop treats it as an `if`/`elsif`/`elsif`... and lets all the `when` +# nodes count. In contrast to the CyclomaticComplexity cop, this cop +# considers `else` nodes as adding complexity. +# +# @example +# +# def my_method # 1 +# if cond # 1 +# case var # 2 (0.8 + 4 * 0.2, rounded) +# when 1 then func_one +# when 2 then func_two +# when 3 then func_three +# when 4..10 then func_other +# end +# else # 1 +# do_something until a && b # 2 +# end # === +# end # 7 complexity points +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/perceived_complexity.rb:29 +class RuboCop::Cop::Metrics::PerceivedComplexity < ::RuboCop::Cop::Metrics::CyclomaticComplexity + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/perceived_complexity.rb:36 + def complexity_score_for(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/perceived_complexity.rb:32 +RuboCop::Cop::Metrics::PerceivedComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/perceived_complexity.rb:30 +RuboCop::Cop::Metrics::PerceivedComplexity::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb:6 +module RuboCop::Cop::Metrics::Utils; end + +# > ABC is .. a software size metric .. computed by counting the number +# > of assignments, branches and conditions for a section of code. +# > http://c2.com/cgi/wiki?AbcMetric +# +# We separate the *calculator* from the *cop* so that the calculation, +# the formula itself, is easier to test. +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:13 +class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator + include ::RuboCop::AST::Sexp + include ::RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount + include ::RuboCop::Cop::Metrics::Utils::IteratingBlock + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:34 + def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:42 + def calculate; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:76 + def calculate_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:65 + def else_branch?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:51 + def evaluate_branch_nodes(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:60 + def evaluate_condition_node(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:128 + def argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:86 + def assignment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:124 + def branch?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:120 + def capturing_variable?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:98 + def compound_assignment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:132 + def condition?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:109 + def simple_assignment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:71 + def visit_depth_last(node, &block); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:30 + def calculate(node, discount_repeated_attributes: T.unsafe(nil)); end + end +end + +# > Branch -- an explicit forward program branch out of scope -- a +# > function call, class method call .. +# > http://c2.com/cgi/wiki?AbcMetric +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:21 +RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::BRANCH_NODES = T.let(T.unsafe(nil), Array) + +# > Condition -- a logical/Boolean test, == != <= >= < > else case +# > default try catch ? and unary conditionals. +# > http://c2.com/cgi/wiki?AbcMetric +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:26 +RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::CONDITION_NODES = T.let(T.unsafe(nil), Array) + +# Helps to calculate code length for the provided node. +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:8 +class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:16 + def initialize(node, processed_source, count_comments: T.unsafe(nil), foldable_types: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:24 + def calculate; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:181 + def another_args?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:42 + def build_foldable_checks(types); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:90 + def classlike_code_length(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:138 + def classlike_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:66 + def code_length(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:162 + def count_comments?; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:126 + def each_top_level_descendant(node, types, &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:146 + def extract_body(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:142 + def foldable_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:121 + def heredoc_length(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:86 + def heredoc_node?(node); end + + # Returns true for lines that shall not be included in the count. + # + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:158 + def irrelevant_line?(source_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:110 + def line_numbers_of_inner_nodes(node, *types); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:106 + def namespace_module?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:185 + def node_with_heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:60 + def normalize_foldable_types(types); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:166 + def omit_length(descendant); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:177 + def parenthesized?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:189 + def source_from_node_with_heredoc(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:13 +RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::CLASSLIKE_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:12 +RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::FOLDABLE_TYPES = T.let(T.unsafe(nil), Array) + +# Used to identify iterating blocks like `.map{}` and `.map(&:...)` +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/iterating_block.rb:8 +module RuboCop::Cop::Metrics::Utils::IteratingBlock + # Returns the name of the method called with a block + # if node is a block node, or a block-pass node. + # + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/iterating_block.rb:37 + def block_method_name(node); end + + # Returns nil if node is neither a block node or a block-pass node. + # Otherwise returns true/false if method call is a known iterating call + # + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/iterating_block.rb:53 + def iterating_block?(node); end + + # Returns true iff name is a known iterating type (e.g. :each, :transform_values) + # + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/iterating_block.rb:47 + def iterating_method?(name); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/iterating_block.rb:33 +RuboCop::Cop::Metrics::Utils::IteratingBlock::KNOWN_ITERATING_METHODS = T.let(T.unsafe(nil), Set) + +# @api private +# +# Identifies repetitions `{c}send` calls with no arguments: +# +# foo.bar +# foo.bar # => repeated +# foo.bar.baz.qux # => inner send repeated +# foo.bar.baz.other # => both inner send repeated +# foo.bar(2) # => not repeated +# +# It also invalidates sequences if a receiver is reassigned: +# +# xx.foo.bar +# xx.foo.baz # => inner send repeated +# self.xx = any # => invalidates everything so far +# xx.foo.baz # => no repetition +# self.xx.foo.baz # => all repeated +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:25 +module RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount + include ::RuboCop::AST::Sexp + extend ::RuboCop::AST::NodePattern::Macros + + # Plug into the calculator + # + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:37 + def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:68 + def attribute_call?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:60 + def calculate_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:50 + def discount_repeated_attributes?; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:54 + def evaluate_branch_nodes(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:99 + def root_node?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:73 + def discount_repeated_attribute?(send_node); end + + # Returns the "known_attributes" for the `node` by walking the receiver tree + # If at any step the subdirectory does not exist, it is yielded with the + # associated key (method_name) + # If the node is not a series of `(c)send` calls with no arguments, + # then `nil` is yielded + # + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:110 + def find_attributes(node, &block); end + + # @returns `[receiver, method | nil]` for the given setter `node` + # or `nil` if it is not a setter. + # + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:126 + def setter_to_getter(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:87 + def update_repeated_attribute(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:29 +RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount::VAR_SETTER_TO_GETTER = T.let(T.unsafe(nil), Hash) + +# @api private +# +# Identifies repetitions `&.` on the same variable: +# +# my_var&.foo +# my_var&.bar # => repeated +# my_var = baz # => reset +# my_var&.qux # => not repeated +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb:15 +module RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb:20 + def discount_for_repeated_csend?(csend_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb:34 + def reset_on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb:16 + def reset_repeated_csend; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:8 +module RuboCop::Cop::Migration; end + +# department name. +# +# @example +# # bad +# +# # good +# +# pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:18 +class RuboCop::Cop::Migration::DepartmentName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:31 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:57 + def check_cop_name(name, comment, offset); end + + # pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:79 + def contain_unexpected_character_for_department_name?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:53 + def disable_comment_offset; end + + # pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:83 + def qualified_legacy_cop_name(cop_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:73 + def valid_content_token?(content_token); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:24 +RuboCop::Cop::Migration::DepartmentName::DISABLE_COMMENT_FORMAT = T.let(T.unsafe(nil), Regexp) + +# The token that makes up a disable comment. +# `DepartmentName/CopName` or` all`. +# +# pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:29 +RuboCop::Cop::Migration::DepartmentName::DISABLING_COPS_CONTENT_TOKEN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:22 +RuboCop::Cop::Migration::DepartmentName::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking minimum body length. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/min_body_length.rb:6 +module RuboCop::Cop::MinBodyLength + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/min_body_length.rb:13 + def min_body_length; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/min_body_length.rb:9 + def min_body_length?(node); end +end + +# Common functionality for checking minimum branches count. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/min_branches_count.rb:6 +module RuboCop::Cop::MinBranchesCount + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/min_branches_count.rb:29 + def if_conditional_branches(node, branches = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/min_branches_count.rb:22 + def min_branches_count; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/min_branches_count.rb:9 + def min_branches_count?(node); end +end + +# Common code for indenting the first elements in multiline +# array literals, hash literals, and method definitions. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:7 +module RuboCop::Cop::MultilineElementIndentation + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:42 + def check_expected_style(styles); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:26 + def check_first(first, left_brace, left_parenthesis, offset); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:80 + def detected_styles(actual_column, offset, left_parenthesis, left_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:85 + def detected_styles_for_column(column, left_parenthesis, left_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:10 + def each_argument_node(node, type); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:66 + def hash_pair_where_value_beginning_with(left_brace, first); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:98 + def incorrect_style_detected(styles, first, base_column_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:50 + def indent_base(left_brace, first, left_parenthesis); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:72 + def key_and_value_begin_on_same_line?(pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:76 + def right_sibling_begins_on_subsequent_line?(pair); end +end + +# Common functionality for checking for a line break before each +# element in a multi-line collection. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_line_breaks.rb:7 +module RuboCop::Cop::MultilineElementLineBreaks + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_line_breaks.rb:23 + def all_on_same_line?(nodes, ignore_last: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_line_breaks.rb:10 + def check_line_breaks(_node, children, ignore_last: T.unsafe(nil)); end +end + +# Common functionality for checking multiline method calls and binary +# operations. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:7 +module RuboCop::Cop::MultilineExpressionIndentation + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:25 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:14 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:132 + def argument_in_method_call(node, kind); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:188 + def assignment_rhs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:67 + def check(range, node, lhs, rhs); end + + # The correct indentation of `node` is usually `IndentationWidth`, with + # one exception: prefix keywords. + # + # ``` + # while foo && # Here, `while` is called a "prefix keyword" + # bar # This is called "special indentation" + # baz + # end + # ``` + # + # Note that *postfix conditionals* do *not* get "special indentation". + # + # ``` + # next if foo && + # bar # normal indentation, not special + # ``` + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:57 + def correct_indentation(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:160 + def disqualified_rhs?(candidate, ancestor); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:202 + def grouped_expression?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:75 + def incorrect_style_detected(range, node, lhs, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:87 + def indentation(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:124 + def indented_keyword_expression(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:206 + def inside_arg_list_parentheses?(node, ancestor); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:101 + def keyword_message_tail(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:109 + def kw_node_with_special_indentation(node); end + + # In a chain of method calls, we regard the top call node as the base + # for indentation of all lines following the first. For example: + # a. + # b c { block }. <-- b is indented relative to a + # d <-- d is indented relative to a + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:34 + def left_hand_side(lhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:196 + def not_for_this_cop?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:91 + def operation_description(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:146 + def part_of_assignment_rhs(node, candidate); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:184 + def part_of_block_body?(candidate, block_node); end + + # Returns true if `node` is a conditional whose `body` and `condition` + # begin on the same line. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:215 + def postfix_conditional?(node); end + + # The []= operator and setters (a.b = c) are parsed as :send nodes. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:176 + def valid_method_rhs_candidate?(candidate, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:165 + def valid_rhs?(candidate, ancestor); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:180 + def valid_rhs_candidate?(candidate, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:219 + def within_node?(inner, outer); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:11 +RuboCop::Cop::MultilineExpressionIndentation::ASSIGNMENT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:10 +RuboCop::Cop::MultilineExpressionIndentation::DEFAULT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:8 +RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:12 +RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:9 +RuboCop::Cop::MultilineExpressionIndentation::UNALIGNED_RHS_TYPES = T.let(T.unsafe(nil), Array) + +# Autocorrection logic for the closing brace of a literal either +# on the same line as the last contained elements, or a new line. +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:7 +class RuboCop::Cop::MultilineLiteralBraceCorrector + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:15 + def initialize(corrector, node, processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:21 + def call; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:61 + def content_if_comment_present(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:51 + def correct_heredoc_argument_method_chain(corrector, end_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:46 + def correct_next_line_brace(corrector, end_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:42 + def correct_same_line_brace(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:40 + def corrector; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:94 + def last_element_range_with_trailing_comma(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:103 + def last_element_trailing_comma_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:40 + def node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:40 + def processed_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:90 + def remove_trailing_content_of_comment(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:80 + def select_content_to_be_inserted_after_last_element(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:73 + def use_heredoc_argument_method_chain?(parent); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:11 + def correct(corrector, node, processed_source); end + end +end + +# Common functionality for checking the closing brace of a literal is +# either on the same line as the last contained elements or a new line. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:7 +module RuboCop::Cop::MultilineLiteralBraceLayout + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:34 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:12 + def check_brace_layout(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:42 + def check_new_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:50 + def check_same_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:58 + def check_symmetrical(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:86 + def children(node); end + + # This method depends on the fact that we have guarded + # against implicit and empty literals. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:98 + def closing_brace_on_same_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:74 + def empty_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:82 + def ignored_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:78 + def implicit_literal?(node); end + + # Starting with the parent node and recursively for the parent node's + # children, check if the node is a HEREDOC and if the HEREDOC ends below + # or on the last line of the parent node. + # + # Example: + # + # # node is `b: ...` parameter + # # last_line_heredoc?(node) => false + # foo(a, + # b: { + # a: 1, + # c: <<-EOM + # baz + # EOM + # } + # ) + # + # # node is `b: ...` parameter + # # last_line_heredoc?(node) => true + # foo(a, + # b: <<-EOM + # baz + # EOM + # ) + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:126 + def last_line_heredoc?(node, parent = T.unsafe(nil)); end + + # Returns true for the case + # [a, + # b # comment + # ].some_method + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:26 + def new_line_needed_before_closing_brace?(node); end + + # This method depends on the fact that we have guarded + # against implicit and empty literals. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:92 + def opening_brace_on_same_line?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:5 +module RuboCop::Cop::Naming; end + +# Avoid prefixing accessor method names with `get_` or `set_`. +# Applies to both instance and class methods. +# +# NOTE: Method names starting with `get_` or `set_` only register an offense +# when the methods match the expected arity for getters and setters respectively. +# Getters (`get_attribute`) must have no arguments to be registered, +# and setters (`set_attribute(value)`) must have exactly one. +# +# @example +# # bad +# def set_attribute(value) +# end +# +# # good +# def attribute=(value) +# end +# +# # bad +# def get_attribute +# end +# +# # good +# def attribute +# end +# +# # accepted, incorrect arity for getter +# def get_value(attr) +# end +# +# # accepted, incorrect arity for setter +# def set_value +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:38 +class RuboCop::Cop::Naming::AccessorMethodName < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:42 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:50 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:66 + def bad_reader_name?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:70 + def bad_writer_name?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:54 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:62 + def proper_attribute_name?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:39 +RuboCop::Cop::Naming::AccessorMethodName::MSG_READER = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:40 +RuboCop::Cop::Naming::AccessorMethodName::MSG_WRITER = T.let(T.unsafe(nil), String) + +# Checks for non-ascii characters in identifier and constant names. +# Identifiers are always checked and whether constants are checked +# can be controlled using AsciiConstants config. +# +# @example +# # bad +# def καλημερα # Greek alphabet (non-ascii) +# end +# +# # bad +# def こんにちはと言う # Japanese character (non-ascii) +# end +# +# # bad +# def hello_🍣 # Emoji (non-ascii) +# end +# +# # good +# def say_hello +# end +# +# # bad +# 신장 = 10 # Hangul character (non-ascii) +# +# # good +# height = 10 +# +# # bad +# params[:عرض_gteq] # Arabic character (non-ascii) +# +# # good +# params[:width_gteq] +# +# @example AsciiConstants: true (default) +# # bad +# class Foö +# end +# +# FOÖ = "foo" +# +# @example AsciiConstants: false +# # good +# class Foö +# end +# +# FOÖ = "foo" +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/ascii_identifiers.rb:53 +class RuboCop::Cop::Naming::AsciiIdentifiers < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/naming/ascii_identifiers.rb:59 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/ascii_identifiers.rb:84 + def first_non_ascii_chars(string); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/ascii_identifiers.rb:74 + def first_offense_range(identifier); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/ascii_identifiers.rb:70 + def should_check?(token); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/ascii_identifiers.rb:57 +RuboCop::Cop::Naming::AsciiIdentifiers::CONSTANT_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/ascii_identifiers.rb:56 +RuboCop::Cop::Naming::AsciiIdentifiers::IDENTIFIER_MSG = T.let(T.unsafe(nil), String) + +# Makes sure that certain binary operator methods have their +# sole parameter named `other`. +# +# @example +# +# # bad +# def +(amount); end +# +# # good +# def +(other); end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:16 +class RuboCop::Cop::Naming::BinaryOperatorParameterName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:29 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:25 + def op_method_candidate?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:45 + def op_method?(name); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:22 +RuboCop::Cop::Naming::BinaryOperatorParameterName::EXCLUDED = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:19 +RuboCop::Cop::Naming::BinaryOperatorParameterName::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:21 +RuboCop::Cop::Naming::BinaryOperatorParameterName::OP_LIKE_METHODS = T.let(T.unsafe(nil), Array) + +# In Ruby 3.1, anonymous block forwarding has been added. +# +# This cop identifies places where `do_something(&block)` can be replaced +# by `do_something(&)`. +# +# It also supports the opposite style by alternative `explicit` option. +# You can specify the block variable name for autocorrection with `BlockForwardingName`. +# The default variable name is `block`. If the name is already in use, it will not be +# autocorrected. +# +# [NOTE] +# ==== +# Because of a bug in Ruby 3.3.0, when a block is referenced inside of another block, +# no offense will be registered until Ruby 3.4: +# +# [source,ruby] +# ---- +# def foo(&block) +# # Using an anonymous block would be a syntax error on Ruby 3.3.0 +# block_method { bar(&block) } +# end +# ---- +# ==== +# +# @example EnforcedStyle: anonymous (default) +# +# # bad +# def foo(&block) +# bar(&block) +# end +# +# # good +# def foo(&) +# bar(&) +# end +# +# @example EnforcedStyle: explicit +# +# # bad +# def foo(&) +# bar(&) +# end +# +# # good +# def foo(&block) +# bar(&block) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:54 +class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:68 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:87 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:118 + def anonymous_block_argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:101 + def block_argument_name_matched?(block_pass_node, last_argument); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:150 + def block_forwarding_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:91 + def expected_block_forwarding_style?(node, last_argument); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:122 + def explicit_block_argument?(node); end + + # Ruby 3.3.0 had a bug where accessing an anonymous block argument inside of a block + # was a syntax error in unambiguous cases: https://bugs.ruby-lang.org/issues/20090 + # We disallow this also for earlier Ruby versions so that code is forwards compatible. + # + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:110 + def invalidates_syntax?(block_pass_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:126 + def register_offense(block_argument, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:142 + def use_block_argument_as_local_variable?(node, last_argument); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:114 + def use_kwarg_in_method_definition?(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:64 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:62 +RuboCop::Cop::Naming::BlockForwarding::MSG = T.let(T.unsafe(nil), String) + +# Checks block parameter names for how descriptive they +# are. It is highly configurable. +# +# The `MinNameLength` config option takes an integer. It represents +# the minimum amount of characters the name must be. Its default is 1. +# The `AllowNamesEndingInNumbers` config option takes a boolean. When +# set to false, this cop will register offenses for names ending with +# numbers. Its default is false. The `AllowedNames` config option +# takes an array of permitted names that will never register an +# offense. The `ForbiddenNames` config option takes an array of +# restricted names that will always register an offense. +# +# @example +# # bad +# bar do |varOne, varTwo| +# varOne + varTwo +# end +# +# # With `AllowNamesEndingInNumbers` set to false +# foo { |num1, num2| num1 * num2 } +# +# # With `MinNameLength` set to number greater than 1 +# baz { |a, b, c| do_stuff(a, b, c) } +# +# # good +# bar do |thud, fred| +# thud + fred +# end +# +# foo { |speed, distance| speed * distance } +# +# baz { |age, height, gender| do_stuff(age, height, gender) } +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/block_parameter_name.rb:38 +class RuboCop::Cop::Naming::BlockParameterName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::UncommunicativeName + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_parameter_name.rb:41 + def on_block(node); end +end + +# Checks for class and module names with +# an underscore in them. +# +# `AllowedNames` config takes an array of permitted names. +# Its default value is `['module_parent']`. +# These names can be full class/module names or part of the name. +# eg. Adding `my_class` to the `AllowedNames` config will allow names like +# `my_class`, `my_class::User`, `App::my_class`, `App::my_class::User`, etc. +# +# @example +# # bad +# class My_Class +# end +# module My_Module +# end +# +# # good +# class MyClass +# end +# module MyModule +# end +# class module_parent::MyModule +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/class_and_module_camel_case.rb:29 +class RuboCop::Cop::Naming::ClassAndModuleCamelCase < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/naming/class_and_module_camel_case.rb:32 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/class_and_module_camel_case.rb:41 + def on_module(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/class_and_module_camel_case.rb:30 +RuboCop::Cop::Naming::ClassAndModuleCamelCase::MSG = T.let(T.unsafe(nil), String) + +# Checks whether constant names are written using +# SCREAMING_SNAKE_CASE. +# +# To avoid false positives, it ignores cases in which we cannot know +# for certain the type of value that would be assigned to a constant. +# +# @example +# # bad +# InchInCm = 2.54 +# INCHinCM = 2.54 +# Inch_In_Cm = 2.54 +# +# # good +# INCH_IN_CM = 2.54 +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:20 +class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:27 + def class_or_struct_return_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:67 + def literal_receiver?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:33 + def on_casgn(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:55 + def allowed_assignment?(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:72 + def allowed_conditional_expression_on_rhs?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:62 + def allowed_method_call_on_rhs?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:76 + def contains_constant?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:21 +RuboCop::Cop::Naming::ConstantName::MSG = T.let(T.unsafe(nil), String) + +# Use POSIX character classes, so we allow accented characters rather +# than just standard ASCII characters +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:24 +RuboCop::Cop::Naming::ConstantName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + +# Makes sure that Ruby source files have snake_case +# names. Ruby scripts (i.e. source files with a shebang in the +# first line) are ignored. +# +# The cop also ignores `.gemspec` files, because Bundler +# recommends using dashes to separate namespaces in nested gems +# (i.e. `bundler-console` becomes `Bundler::Console`). As such, the +# gemspec is supposed to be named `bundler-console.gemspec`. +# +# When `ExpectMatchingDefinition` (default: `false`) is `true`, the cop requires +# each file to have a class, module or `Struct` defined in it that matches +# the filename. This can be further configured using +# `CheckDefinitionPathHierarchy` (default: `true`) to determine whether the +# path should match the namespace of the above definition. +# +# When `IgnoreExecutableScripts` (default: `true`) is `true`, files that start +# with a shebang line are not considered by the cop. +# +# When `Regex` is set, the cop will flag any filename that does not match +# the regular expression. +# +# @example +# # bad +# lib/layoutManager.rb +# +# anything/usingCamelCase +# +# # good +# lib/layout_manager.rb +# +# anything/using_snake_case.rake +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:39 +class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:54 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:47 + def struct_definition(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:132 + def allowed_acronyms; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:94 + def bad_filename_allowed?; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:120 + def check_definition_path_hierarchy?; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:167 + def defined_struct(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:124 + def definition_path_hierarchy_roots; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:116 + def expect_matching_definition?; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:136 + def filename_good?(basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:145 + def find_class_or_module(node, namespace); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:163 + def find_definition(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:63 + def for_bad_filename(file_path); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:112 + def ignore_executable_scripts?; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:200 + def match?(expected); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:204 + def match_acronym?(expected, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:90 + def matching_class?(file_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:86 + def matching_definition?(file_path); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:172 + def namespace_matches?(node, namespace, expected); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:98 + def no_definition_message(basename, file_path); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:104 + def other_message(basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:186 + def partial_matcher!(expected); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:75 + def perform_class_and_module_naming_checks(file_path, basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:128 + def regex; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:238 + def to_module_name(basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:211 + def to_namespace(path); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:41 +RuboCop::Cop::Naming::FileName::MSG_NO_DEFINITION = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:42 +RuboCop::Cop::Naming::FileName::MSG_REGEX = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:40 +RuboCop::Cop::Naming::FileName::MSG_SNAKE_CASE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:44 +RuboCop::Cop::Naming::FileName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + +# Checks that your heredocs are using the configured case. +# By default it is configured to enforce uppercase heredocs. +# +# @example EnforcedStyle: uppercase (default) +# # bad +# <<-sql +# SELECT * FROM foo +# sql +# +# # good +# <<-SQL +# SELECT * FROM foo +# SQL +# +# @example EnforcedStyle: lowercase +# # bad +# <<-SQL +# SELECT * FROM foo +# SQL +# +# # good +# <<-sql +# SELECT * FROM foo +# sql +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_case.rb:30 +class RuboCop::Cop::Naming::HeredocDelimiterCase < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_case.rb:37 + def on_heredoc(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_case.rb:54 + def correct_case_delimiters?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_case.rb:58 + def correct_delimiters(source); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_case.rb:50 + def message(_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_case.rb:35 +RuboCop::Cop::Naming::HeredocDelimiterCase::MSG = T.let(T.unsafe(nil), String) + +# Checks that your heredocs are using meaningful delimiters. +# By default it disallows `END` and `EO*`, and can be configured through +# forbidden listing additional delimiters. +# +# @example +# +# # good +# <<-SQL +# SELECT * FROM foo +# SQL +# +# # bad +# <<-END +# SELECT * FROM foo +# END +# +# # bad +# <<-EOS +# SELECT * FROM foo +# EOS +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_naming.rb:26 +class RuboCop::Cop::Naming::HeredocDelimiterNaming < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_naming.rb:31 + def on_heredoc(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_naming.rb:51 + def forbidden_delimiters; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_naming.rb:41 + def meaningful_delimiters?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_naming.rb:29 +RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String) + +# Recommends the use of inclusive language instead of problematic terms. +# The cop can check the following locations for offenses: +# +# - identifiers +# - constants +# - variables +# - strings +# - symbols +# - comments +# - file paths +# +# Each of these locations can be individually enabled/disabled via configuration, +# for example CheckIdentifiers = true/false. +# +# Flagged terms are configurable for the cop. For each flagged term an optional +# Regex can be specified to identify offenses. Suggestions for replacing a flagged term can +# be configured and will be displayed as part of the offense message. +# An AllowedRegex can be specified for a flagged term to exempt allowed uses of the term. +# `WholeWord: true` can be set on a flagged term to indicate the cop should only match when +# a term matches the whole word (partial matches will not be offenses). +# +# The cop supports autocorrection when there is only one suggestion. When there are multiple +# suggestions, the best suggestion cannot be identified and will not be autocorrected. +# +# @example FlaggedTerms: { whitelist: { Suggestions: ['allowlist'] } } +# # Suggest replacing identifier whitelist with allowlist +# +# # bad +# whitelist_users = %w(user1 user1) +# +# # good +# allowlist_users = %w(user1 user2) +# +# @example FlaggedTerms: { master: { Suggestions: ['main', 'primary', 'leader'] } } +# # Suggest replacing master in an instance variable name with main, primary, or leader +# +# # bad +# @master_node = 'node1.example.com' +# +# # good +# @primary_node = 'node1.example.com' +# +# @example FlaggedTerms: { whitelist: { Regex: !ruby/regexp '/white[-_\s]?list' } } +# # Identify problematic terms using a Regexp +# +# # bad +# white_list = %w(user1 user2) +# +# # good +# allow_list = %w(user1 user2) +# +# @example FlaggedTerms: { master: { AllowedRegex: 'master\'?s degree' } } +# # Specify allowed uses of the flagged term as a string or regexp. +# +# # bad +# # They had a masters +# +# # good +# # They had a master's degree +# +# @example FlaggedTerms: { slave: { WholeWord: true } } +# # Specify that only terms that are full matches will be flagged. +# +# # bad +# Slave +# +# # good (won't be flagged despite containing `slave`) +# TeslaVehicle +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:74 +class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:84 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:93 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:111 + def add_offenses_for_token(token, word_locations); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:176 + def add_to_flagged_term_hash(regex_string, term, term_definition); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:202 + def array_to_ignorecase_regex(strings); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:126 + def check_token?(type); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:252 + def create_message(word, message = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:226 + def create_multiple_word_message_for_file(words); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:222 + def create_single_word_message_for_file(word); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:198 + def ensure_regex_string(regex); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:169 + def extract_regexp(term, term_definition); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:260 + def find_flagged_term(word); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:274 + def format_suggestions(suggestions); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:206 + def investigate_filepath; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:100 + def investigate_tokens; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:240 + def mask_input(str); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:289 + def offense_range(token, word); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:160 + def preferred_sole_term(suggestions); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:130 + def preprocess_check_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:144 + def preprocess_flagged_terms; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:267 + def preprocess_suggestions(suggestions); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:188 + def process_allowed_regex(allowed); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:230 + def scan_for_words(input); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:183 + def set_regexes(flagged_term_strings, allowed_strings); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:78 +RuboCop::Cop::Naming::InclusiveLanguage::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:79 +RuboCop::Cop::Naming::InclusiveLanguage::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:80 +RuboCop::Cop::Naming::InclusiveLanguage::MSG_FOR_FILE_PATH = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 +class RuboCop::Cop::Naming::InclusiveLanguage::WordLocation < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def position; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def position=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def word; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def word=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def new(*_arg0); end + end +end + +# Checks for memoized methods whose instance variable name +# does not match the method name. Applies to both regular methods +# (defined with `def`) and dynamic methods (defined with +# `define_method` or `define_singleton_method`). +# +# This cop can be configured with the EnforcedStyleForLeadingUnderscores +# directive. It can be configured to allow for memoized instance variables +# prefixed with an underscore. Prefixing ivars with an underscore is a +# convention that is used to implicitly indicate that an ivar should not +# be set or referenced outside of the memoization method. +# +# @safety +# This cop relies on the pattern `@instance_var ||= ...`, +# but this is sometimes used for other purposes than memoization +# so this cop is considered unsafe. Also, its autocorrection is unsafe +# because it may conflict with instance variable names already in use. +# +# @example EnforcedStyleForLeadingUnderscores: disallowed (default) +# # bad +# # Method foo is memoized using an instance variable that is +# # not `@foo`. This can cause confusion and bugs. +# def foo +# @something ||= calculate_expensive_thing +# end +# +# def foo +# return @something if defined?(@something) +# @something = calculate_expensive_thing +# end +# +# # good +# def _foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= begin +# calculate_expensive_thing +# end +# end +# +# # good +# def foo +# helper_variable = something_we_need_to_calculate_foo +# @foo ||= calculate_expensive_thing(helper_variable) +# end +# +# # good +# define_method(:foo) do +# @foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# return @foo if defined?(@foo) +# @foo = calculate_expensive_thing +# end +# +# @example EnforcedStyleForLeadingUnderscores: required +# # bad +# def foo +# @something ||= calculate_expensive_thing +# end +# +# # bad +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# def foo +# return @foo if defined?(@foo) +# @foo = calculate_expensive_thing +# end +# +# # good +# def foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def _foo +# @_foo ||= calculate_expensive_thing +# end +# +# def foo +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# +# @example EnforcedStyleForLeadingUnderscores :optional +# # bad +# def foo +# @something ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def _foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @_foo ||= calculate_expensive_thing +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:148 +class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:198 + def defined_memoized?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:161 + def method_definition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:206 + def on_defined?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:171 + def on_or_asgn(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:242 + def find_definition(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:253 + def matches?(method_name, ivar_assign); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:262 + def message(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:238 + def style_parameter_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:270 + def suggested_var(method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:276 + def variable_name_candidates(method_name); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:157 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::DYNAMIC_DEFINE_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:158 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::INITIALIZE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:153 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:155 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::UNDERSCORE_REQUIRED = T.let(T.unsafe(nil), String) + +# Makes sure that all methods use the configured style, +# snake_case or camelCase, for their names. +# +# Method names matching patterns are always allowed. +# +# The cop can be configured with `AllowedPatterns` to allow certain regexp patterns: +# +# [source,yaml] +# ---- +# Naming/MethodName: +# AllowedPatterns: +# - '\AonSelectionBulkChange\z' +# - '\AonSelectionCleared\z' +# ---- +# +# As well, you can also forbid specific method names or regexp patterns +# using `ForbiddenIdentifiers` or `ForbiddenPatterns`: +# +# [source,yaml] +# ---- +# Naming/MethodName: +# ForbiddenIdentifiers: +# - 'def' +# - 'super' +# ForbiddenPatterns: +# - '_v1\z' +# - '_gen1\z' +# ---- +# +# @example EnforcedStyle: snake_case (default) +# # bad +# def fooBar; end +# +# # good +# def foo_bar; end +# +# # bad +# define_method :fooBar do +# end +# +# # good +# define_method :foo_bar do +# end +# +# # bad +# Struct.new(:fooBar) +# +# # good +# Struct.new(:foo_bar) +# +# # bad +# alias_method :fooBar, :some_method +# +# # good +# alias_method :foo_bar, :some_method +# +# @example EnforcedStyle: camelCase +# # bad +# def foo_bar; end +# +# # good +# def fooBar; end +# +# # bad +# define_method :foo_bar do +# end +# +# # good +# define_method :fooBar do +# end +# +# # bad +# Struct.new(:foo_bar) +# +# # good +# Struct.new(:fooBar) +# +# # bad +# alias_method :foo_bar, :some_method +# +# # good +# alias_method :fooBar, :some_method +# +# @example ForbiddenIdentifiers: ['def', 'super'] +# # bad +# def def; end +# def super; end +# +# @example ForbiddenPatterns: ['_v1\z', '_gen1\z'] +# # bad +# def release_v1; end +# def api_gen1; end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:99 +class RuboCop::Cop::Naming::MethodName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::ForbiddenIdentifiers + include ::RuboCop::Cop::ForbiddenPattern + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:122 + def define_data?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:119 + def new_struct?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:149 + def on_alias(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:138 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:147 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:124 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:116 + def str_name(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:113 + def sym_name(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:232 + def attr_name(name_item); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:208 + def forbidden_name?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:176 + def handle_alias_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:183 + def handle_attr_accessor(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:170 + def handle_define_data(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:157 + def handle_define_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:198 + def handle_method_name(node, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:163 + def handle_new_struct(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:247 + def message(style); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:236 + def range_position(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:213 + def register_forbidden_name(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:106 +RuboCop::Cop::Naming::MethodName::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:107 +RuboCop::Cop::Naming::MethodName::MSG_FORBIDDEN = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:109 +RuboCop::Cop::Naming::MethodName::OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# Checks method parameter names for how descriptive they +# are. It is highly configurable. +# +# The `MinNameLength` config option takes an integer. It represents +# the minimum amount of characters the name must be. Its default is 3. +# The `AllowNamesEndingInNumbers` config option takes a boolean. When +# set to false, this cop will register offenses for names ending with +# numbers. Its default is false. The `AllowedNames` config option +# takes an array of permitted names that will never register an +# offense. The `ForbiddenNames` config option takes an array of +# restricted names that will always register an offense. +# +# @example +# # bad +# def bar(varOne, varTwo) +# varOne + varTwo +# end +# +# # With `AllowNamesEndingInNumbers` set to false +# def foo(num1, num2) +# num1 * num2 +# end +# +# # With `MinNameLength` set to number greater than 1 +# def baz(a, b, c) +# do_stuff(a, b, c) +# end +# +# # good +# def bar(thud, fred) +# thud + fred +# end +# +# def foo(speed, distance) +# speed * distance +# end +# +# def baz(age_a, height_b, gender_c) +# do_stuff(age_a, height_b, gender_c) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/method_parameter_name.rb:46 +class RuboCop::Cop::Naming::MethodParameterName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::UncommunicativeName + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_parameter_name.rb:49 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_parameter_name.rb:54 + def on_defs(node); end +end + +# Checks that predicate methods end with `?` and non-predicate methods do not. +# +# The names of predicate methods (methods that return a boolean value) should end +# in a question mark. Methods that don't return a boolean, shouldn't +# end in a question mark. +# +# The cop assesses a predicate method as one that returns boolean values. Likewise, +# a method that only returns literal values is assessed as non-predicate. Other predicate +# method calls are assumed to return boolean values. The cop does not make an assessment +# if the return type is unknown (non-predicate method calls, variables, etc.). +# +# NOTE: The `initialize` method and operator methods (`def ==`, etc.) are ignored. +# +# By default, the cop runs in `conservative` mode, which allows a method to be named +# with a question mark as long as at least one return value is boolean. In `aggressive` +# mode, methods with a question mark will register an offense if any known non-boolean +# return values are detected. +# +# The cop also has `AllowedMethods` configuration in order to prevent the cop from +# registering an offense from a method name that does not confirm to the naming +# guidelines. By default, `call` is allowed. The cop also has `AllowedPatterns` +# configuration to allow method names by regular expression. +# +# Although returning a call to another predicate method is treated as a boolean value, +# certain method names can be known to not return a boolean, despite ending in a `?` +# (for example, `Numeric#nonzero?` returns `self` or `nil`). These methods can be +# configured using `NonBooleanPredicates`. +# +# The cop can furthermore be configured to allow all bang methods (method names +# ending with `!`), with `AllowBangMethods: true` (default false). +# +# @example Mode: conservative (default) +# # bad +# def foo +# bar == baz +# end +# +# # good +# def foo? +# bar == baz +# end +# +# # bad +# def foo? +# 5 +# end +# +# # good +# def foo +# 5 +# end +# +# # bad +# def foo +# x == y +# end +# +# # good +# def foo? +# x == y +# end +# +# # bad +# def foo +# !x +# end +# +# # good +# def foo? +# !x +# end +# +# # bad - returns the value of another predicate method +# def foo +# bar? +# end +# +# # good +# def foo? +# bar? +# end +# +# # good - operator method +# def ==(other) +# hash == other.hash +# end +# +# # good - at least one return value is boolean +# def foo? +# return unless bar? +# true +# end +# +# # ok - return type is not known +# def foo? +# bar +# end +# +# # ok - return type is not known +# def foo +# bar? +# end +# +# @example Mode: aggressive +# # bad - the method returns nil in some cases +# def foo? +# return unless bar? +# true +# end +# +# @example AllowedMethods: [call] (default) +# # good +# def call +# foo == bar +# end +# +# @example AllowedPatterns: [\Afoo] +# # good +# def foo? +# 'foo' +# end +# +# @example AllowBangMethods: false (default) +# # bad +# def save! +# true +# end +# +# @example AllowBangMethods: true +# # good +# def save! +# true +# end +# +# @example WaywardPredicates: ['infinite?', 'nonzero?'] (default) +# # good +# def non_predicate_method(num) +# num.infinite? +# end +# +# # good +# def non_predicate_method(num) +# num.nonzero? +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:151 +class RuboCop::Cop::Naming::PredicateMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:158 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:170 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:183 + def acceptable?(return_values); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:212 + def all_return_values_boolean?(return_values); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:313 + def allow_bang_methods?; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:174 + def allowed?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:307 + def allowed_bang_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:277 + def and_or?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:219 + def boolean_return?(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:303 + def conservative?; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:281 + def extract_and_or_clauses(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:288 + def extract_conditional_branches(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:246 + def extract_return_value(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:259 + def last_value(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:225 + def method_returning_boolean?(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:232 + def potential_non_predicate?(return_values); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:265 + def process_return_values(return_values); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:199 + def return_values(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:193 + def unknown_method_call?(value); end + + # If a method ending in `?` is known to not return a boolean value, + # (for example, `Numeric#nonzero?`) it should be treated as a non-boolean + # value, despite the method naming. + # + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:320 + def wayward_predicate?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:324 + def wayward_predicates; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:156 +RuboCop::Cop::Naming::PredicateMethod::MSG_NON_PREDICATE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:155 +RuboCop::Cop::Naming::PredicateMethod::MSG_PREDICATE = T.let(T.unsafe(nil), String) + +# Checks that predicate method names end with a question mark and +# do not start with a forbidden prefix. +# +# A method is determined to be a predicate method if its name starts with +# one of the prefixes listed in the `NamePrefix` configuration. The list +# defaults to `is_`, `has_`, and `have_` but may be overridden. +# +# Predicate methods must end with a question mark. +# +# When `ForbiddenPrefixes` is also set (as it is by default), predicate +# methods which begin with a forbidden prefix are not allowed, even if +# they end with a `?`. These methods should be changed to remove the +# prefix. +# +# When `UseSorbetSigs` set to true (optional), the cop will only report +# offenses if the method has a Sorbet `sig` with a return type of +# `T::Boolean`. Dynamic methods are not supported with this configuration. +# +# @example NamePrefix: ['is_', 'has_', 'have_'] (default) +# # bad +# def is_even(value) +# end +# +# # When ForbiddenPrefixes: ['is_', 'has_', 'have_'] (default) +# # good +# def even?(value) +# end +# +# # When ForbiddenPrefixes: [] +# # good +# def is_even?(value) +# end +# +# @example NamePrefix: ['seems_to_be_'] +# # bad +# def seems_to_be_even(value) +# end +# +# # When ForbiddenPrefixes: ['seems_to_be_'] +# # good +# def even?(value) +# end +# +# # When ForbiddenPrefixes: [] +# # good +# def seems_to_be_even?(value) +# end +# +# @example AllowedMethods: ['is_a?'] (default) +# # Despite starting with the `is_` prefix, this method is allowed +# # good +# def is_a?(value) +# end +# +# @example AllowedMethods: ['is_even?'] +# # good +# def is_even?(value) +# end +# +# @example UseSorbetSigs: false (default) +# # bad +# sig { returns(String) } +# def is_this_thing_on +# "yes" +# end +# +# # good - Sorbet signature is not evaluated +# sig { returns(String) } +# def is_this_thing_on? +# "yes" +# end +# +# @example UseSorbetSigs: true +# # bad +# sig { returns(T::Boolean) } +# def odd(value) +# end +# +# # good +# sig { returns(T::Boolean) } +# def odd?(value) +# end +# +# @example MethodDefinitionMacros: ['define_method', 'define_singleton_method'] (default) +# # bad +# define_method(:is_even) { |value| } +# +# # good +# define_method(:even?) { |value| } +# +# @example MethodDefinitionMacros: ['def_node_matcher'] +# # bad +# def_node_matcher(:is_even) { |value| } +# +# # good +# def_node_matcher(:even?) { |value| } +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:103 +class RuboCop::Cop::Naming::PredicatePrefix < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:107 + def dynamic_method_define(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:126 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:139 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:113 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:154 + def sorbet_return_type(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:141 + def validate_config; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:164 + def allowed_method_name?(method_name, prefix); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:172 + def expected_name(method_name, prefix); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:186 + def forbidden_prefixes; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:182 + def message(method_name, new_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:198 + def method_definition_macro?(macro_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:190 + def predicate_prefixes; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:158 + def sorbet_sig?(node, return_type: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:194 + def use_sorbet_sigs?; end +end + +# Makes sure that rescued exceptions variables are named as +# expected. +# +# The `PreferredName` config option takes a `String`. It represents +# the required name of the variable. Its default is `e`. +# +# NOTE: This cop does not consider nested rescues because it cannot +# guarantee that the variable from the outer rescue is not used within +# the inner rescue (in which case, changing the inner variable would +# shadow the outer variable). +# +# @example PreferredName: e (default) +# # bad +# begin +# # do something +# rescue MyException => exception +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => e +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => _e +# # do something +# end +# +# @example PreferredName: exception +# # bad +# begin +# # do something +# rescue MyException => e +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => exception +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => _exception +# # do something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:61 +class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:66 + def on_resbody(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:96 + def autocorrect(corrector, node, range, offending_name, preferred_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:117 + def correct_node(corrector, node, offending_name, preferred_name); end + + # If the exception variable is reassigned, that assignment needs to be corrected. + # Further `lvar` nodes will not be corrected though since they now refer to a + # different variable. + # + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:143 + def correct_reassignment(corrector, node, offending_name, preferred_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:160 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:91 + def offense_range(resbody); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:147 + def preferred_name(variable_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:166 + def shadowed_variable_name?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:156 + def variable_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:106 + def variable_name_matches?(node, name); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:64 +RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil), String) + +# Checks that the configured style (snake_case or camelCase) is used for all variable names. +# This includes local variables, instance variables, class variables, method arguments +# (positional, keyword, rest or block), and block arguments. +# +# The cop can also be configured to forbid using specific names for variables, using +# `ForbiddenIdentifiers` or `ForbiddenPatterns`. In addition to the above, this applies +# to global variables as well. +# +# Method definitions and method calls are not affected by this cop. +# +# @example EnforcedStyle: snake_case (default) +# # bad +# fooBar = 1 +# +# # good +# foo_bar = 1 +# +# @example EnforcedStyle: camelCase +# # bad +# foo_bar = 1 +# +# # good +# fooBar = 1 +# +# @example AllowedIdentifiers: ['fooBar'] +# # good (with EnforcedStyle: snake_case) +# fooBar = 1 +# +# @example AllowedPatterns: ['_v\d+\z'] +# # good (with EnforcedStyle: camelCase) +# release_v1 = true +# +# @example ForbiddenIdentifiers: ['fooBar'] +# # bad (in all cases) +# fooBar = 1 +# @fooBar = 1 +# @@fooBar = 1 +# $fooBar = 1 +# +# @example ForbiddenPatterns: ['_v\d+\z'] +# # bad (in all cases) +# release_v1 = true +# @release_v1 = true +# @@release_v1 = true +# $release_v1 = true +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:52 +class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedIdentifiers + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::ForbiddenIdentifiers + include ::RuboCop::Cop::ForbiddenPattern + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:78 + def on_arg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:84 + def on_blockarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:77 + def on_cvasgn(node); end + + # Only forbidden names are checked for global variable assignment + # + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:88 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:76 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:82 + def on_kwarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:81 + def on_kwoptarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:83 + def on_kwrestarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:85 + def on_lvar(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:66 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:79 + def on_optarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:80 + def on_restarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:62 + def valid_name?(node, name, given_style = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:97 + def forbidden_name?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:101 + def message(style); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:105 + def register_forbidden_name(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:59 +RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:60 +RuboCop::Cop::Naming::VariableName::MSG_FORBIDDEN = T.let(T.unsafe(nil), String) + +# Makes sure that all numbered variables use the +# configured style, snake_case, normalcase, or non_integer, +# for their numbering. +# +# Additionally, `CheckMethodNames` and `CheckSymbols` configuration options +# can be used to specify whether method names and symbols should be checked. +# Both are enabled by default. +# +# @example EnforcedStyle: normalcase (default) +# # bad +# :some_sym_1 +# variable_1 = 1 +# +# def some_method_1; end +# +# def some_method1(arg_1); end +# +# # good +# :some_sym1 +# variable1 = 1 +# +# def some_method1; end +# +# def some_method1(arg1); end +# +# @example EnforcedStyle: snake_case +# # bad +# :some_sym1 +# variable1 = 1 +# +# def some_method1; end +# +# def some_method_1(arg1); end +# +# # good +# :some_sym_1 +# variable_1 = 1 +# +# def some_method_1; end +# +# def some_method_1(arg_1); end +# +# @example EnforcedStyle: non_integer +# # bad +# :some_sym1 +# :some_sym_1 +# +# variable1 = 1 +# variable_1 = 1 +# +# def some_method1; end +# +# def some_method_1; end +# +# def some_methodone(arg1); end +# def some_methodone(arg_1); end +# +# # good +# :some_symone +# :some_sym_one +# +# variableone = 1 +# variable_one = 1 +# +# def some_methodone; end +# +# def some_method_one; end +# +# def some_methodone(argone); end +# def some_methodone(arg_one); end +# +# # In the following examples, we assume `EnforcedStyle: normalcase` (default). +# +# @example CheckMethodNames: true (default) +# # bad +# def some_method_1; end +# +# @example CheckMethodNames: false +# # good +# def some_method_1; end +# +# @example CheckSymbols: true (default) +# # bad +# :some_sym_1 +# +# @example CheckSymbols: false +# # good +# :some_sym_1 +# +# @example AllowedIdentifiers: [capture3] +# # good +# expect(Open3).to receive(:capture3) +# +# @example AllowedPatterns: ['_v\d+\z'] +# # good +# :some_sym_v1 +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:103 +class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedIdentifiers + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNumbering + include ::RuboCop::Cop::AllowedPattern + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:114 + def on_arg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:122 + def on_cvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:125 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:131 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:123 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:121 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:120 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:133 + def on_sym(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:110 + def valid_name?(node, name, given_style = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:142 + def message(style); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:108 +RuboCop::Cop::Naming::VariableNumber::MSG = T.let(T.unsafe(nil), String) + +# Some common code shared between `NegatedIf` and +# `NegatedWhile` cops. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/negative_conditional.rb:7 +module RuboCop::Cop::NegativeConditional + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/negative_conditional.rb:18 + def empty_condition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/negative_conditional.rb:15 + def single_negative?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/negative_conditional.rb:20 + def check_negative_conditional(node, message:, &block); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/negative_conditional.rb:10 +RuboCop::Cop::NegativeConditional::MSG = T.let(T.unsafe(nil), String) + +# This module provides a list of methods that are: +# 1. In the NilClass by default +# 2. Added to NilClass by explicitly requiring any standard libraries +# 3. Cop's configuration parameter AllowedMethods. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/nil_methods.rb:9 +module RuboCop::Cop::NilMethods + include ::RuboCop::Cop::AllowedMethods + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/nil_methods.rb:14 + def nil_methods; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/nil_methods.rb:18 + def other_stdlib_methods; end +end + +# An offense represents a style violation detected by RuboCop. +# +# pkg:gem/rubocop#lib/rubocop/cop/offense.rb:6 +class RuboCop::Cop::Offense + include ::Comparable + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:90 + def initialize(severity, location, message, cop_name, status = T.unsafe(nil), corrector = T.unsafe(nil)); end + + # @api public + # + # Returns `-1`, `0`, or `+1` + # if this offense is less than, equal to, or greater than `other`. + # + # @return [Integer] + # comparison result + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:237 + def <=>(other); end + + # @api public + # + # @return [Boolean] + # returns `true` if two offenses contain same attributes + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:218 + def ==(other); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:167 + def column; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:177 + def column_length; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:201 + def column_range; end + + # @api public + # + # @!attribute [r] cop_name + # + # @return [String] + # the cop name as a String for which this offense is for. + # + # @example + # 'Layout/LineLength' + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:50 + def cop_name; end + + # @api public + # + # @!attribute [r] correctable? + # + # @return [Boolean] + # whether this offense can be automatically corrected via autocorrect. + # This includes todo comments, for example when requested with `--disable-uncorrectable`. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:108 + def correctable?; end + + # @api public + # + # @!attribute [r] corrected? + # + # @return [Boolean] + # whether this offense is automatically corrected via + # autocorrect or a todo. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:119 + def corrected?; end + + # @api public + # + # @!attribute [r] corrected_with_todo? + # + # @return [Boolean] + # whether this offense is automatically disabled via a todo. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:129 + def corrected_with_todo?; end + + # @api public + # + # @!attribute [r] corrector + # + # @return [Corrector | nil] + # the autocorrection for this offense, or `nil` when not available + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:61 + def corrector; end + + # @api public + # + # @!attribute [r] disabled? + # + # @return [Boolean] + # whether this offense was locally disabled with a + # disable or todo where it occurred. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:140 + def disabled?; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:224 + def eql?(other); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:186 + def first_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:226 + def hash; end + + # @api public + # + # @return [Parser::Source::Range] + # the range of the code that is highlighted + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:148 + def highlighted_area; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:196 + def last_column; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:191 + def last_line; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:162 + def line; end + + # @api public + # + # @!attribute [r] location + # + # @return [Parser::Source::Range] + # the location where the violation is detected. + # + # @see https://www.rubydoc.info/gems/parser/Parser/Source/Range + # Parser::Source::Range + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:28 + def location; end + + # @api public + # + # @!attribute [r] message + # + # @return [String] + # human-readable message + # + # @example + # 'Line is too long. [90/80]' + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:39 + def message; end + + # @api private + # + # Internally we use column number that start at 0, but when + # outputting column numbers, we want them to start at 1. One + # reason is that editors, such as Emacs, expect this. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:210 + def real_column; end + + # @api public + # + # @!attribute [r] severity + # + # @return [RuboCop::Cop::Severity] + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:17 + def severity; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:172 + def source_line; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:53 + def status; end + + # @api private + # This is just for debugging purpose. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:155 + def to_s; end +end + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cop/offense.rb:10 +RuboCop::Cop::Offense::COMPARISON_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/offense.rb:87 +RuboCop::Cop::Offense::NO_LOCATION = T.let(T.unsafe(nil), RuboCop::Cop::Offense::PseudoSourceRange) + +# pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 +class RuboCop::Cop::Offense::PseudoSourceRange < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:71 + def initialize(line, column, source_line, begin_pos, end_pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def begin_pos; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def begin_pos=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def column; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def column=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:76 + def column_range; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def end_pos; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def end_pos=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:65 + def first_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:67 + def last_column; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:66 + def last_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:83 + def length; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def line; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def line=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:80 + def size; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:69 + def source_buffer; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def source_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def source_line=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def new(*_arg0); end + end +end + +# Common functionality for cops checking if and unless expressions. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/on_normal_if_unless.rb:6 +module RuboCop::Cop::OnNormalIfUnless + # pkg:gem/rubocop#lib/rubocop/cop/mixin/on_normal_if_unless.rb:7 + def on_if(node); end +end + +# This autocorrects gem dependency order +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/ordered_gem_corrector.rb:6 +class RuboCop::Cop::OrderedGemCorrector + extend ::RuboCop::Cop::OrderedGemNode + extend ::RuboCop::Cop::RangeHelp + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/ordered_gem_corrector.rb:11 + def comments_as_separators; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/ordered_gem_corrector.rb:13 + def correct(processed_source, node, previous_declaration, comments_as_separators); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/ordered_gem_corrector.rb:11 + def processed_source; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/ordered_gem_corrector.rb:26 + def declaration_with_comment(node); end + end +end + +# Common functionality for Bundler/OrderedGems and +# Gemspec/OrderedDependencies. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:7 +module RuboCop::Cop::OrderedGemNode + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:23 + def case_insensitive_out_of_order?(string_a, string_b); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:27 + def consecutive_lines?(previous, current); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:55 + def find_gem_name(gem_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:18 + def gem_canonical_name(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:49 + def gem_name(declaration_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:10 + def get_source_range(node, comments_as_separators); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:32 + def register_offense(previous, current); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:61 + def treat_comments_as_separators; end +end + +# Common functionality for handling parentheses. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/parentheses.rb:6 +module RuboCop::Cop::Parentheses + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/parentheses.rb:9 + def parens_required?(node); end +end + +# This autocorrects parentheses +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:6 +class RuboCop::Cop::ParenthesesCorrector + extend ::RuboCop::Cop::RangeHelp + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:12 + def correct(corrector, node); end + + private + + # Add a comma back after the heredoc identifier + # + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:77 + def add_heredoc_comma(corrector, node); end + + # If the node contains a heredoc, remove the comma too + # It'll be added back in the right place later + # + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:67 + def extend_range_for_heredoc(node, range); end + + # If removing parentheses leaves a comma on its own line, remove all the whitespace + # preceding it to prevent a syntax error. + # + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:44 + def handle_orphaned_comma(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:83 + def heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:31 + def next_char_is_question_mark?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:35 + def only_closing_paren_before_comma?(node); end + + # Get a range for the closing parenthesis and all whitespace to the left of it + # + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:54 + def parens_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:27 + def ternary_condition?(node); end + end +end + +# Common functionality for handling percent arrays. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:6 +module RuboCop::Cop::PercentArray + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:26 + def allowed_bracket_array?(node); end + + # @param [RuboCop::AST::ArrayNode] node + # @param [Array] elements + # @return [String] + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:83 + def build_bracketed_array_with_appropriate_whitespace(elements:, node:); end + + # @param [String] preferred_array_code + # @return [String] + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:56 + def build_message_for_bracketed_array(preferred_array_code); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:67 + def check_bracketed_array(node, literal_prefix); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:36 + def check_percent_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:31 + def comments_in_array?(node); end + + # Override to determine values that are invalid in a percent array + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:22 + def invalid_percent_array_contents?(_node); end + + # Ruby does not allow percent arrays in an ambiguous block context. + # + # @example + # + # foo %i[bar baz] { qux } + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:14 + def invalid_percent_array_context?(node); end + + # Provides whitespace between elements for building a bracketed array. + # %w[ a b c ] + # ^^^ + # @param [RuboCop::AST::ArrayNode] node + # @return [String] + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:98 + def whitespace_between(node); end + + # Provides leading whitespace for building a bracketed array. + # %w[ a b c ] + # ^^ + # @param [RuboCop::AST::ArrayNode] node + # @return [String] + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:111 + def whitespace_leading(node); end + + # Provides trailing whitespace for building a bracketed array. + # %w[ a b c ] + # ^^^^ + # @param [RuboCop::AST::ArrayNode] node + # @return [String] + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:120 + def whitespace_trailing(node); end +end + +# Common functionality for handling percent literals. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_literal.rb:6 +module RuboCop::Cop::PercentLiteral + include ::RuboCop::Cop::RangeHelp + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_literal.rb:23 + def begin_source(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_literal.rb:11 + def percent_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_literal.rb:17 + def process(node, *types); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_literal.rb:27 + def type(node); end +end + +# This autocorrects percent literals +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:6 +class RuboCop::Cop::PercentLiteralCorrector + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:11 + def initialize(config, preferred_delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:9 + def config; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:16 + def correct(corrector, node, char); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:9 + def preferred_delimiters; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:46 + def autocorrect_multiline_words(node, escape, delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:52 + def autocorrect_words(node, escape, delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:34 + def delimiters_for(type); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:110 + def end_content(source); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:30 + def escape_words?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:78 + def first_line?(node, previous_line_num); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:89 + def fix_escaped_content(word_node, escape, delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:69 + def line_breaks(node, source, previous_line_num, base_line_num, node_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:38 + def new_contents(node, escape, delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:82 + def process_lines(node, previous_line_num, base_line_num, source_in_lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:58 + def process_multiline_words(node, escape, delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:96 + def substitute_escaped_delimiters(content, delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:26 + def wrap_contents(corrector, node, contents, char, delimiters); end +end + +# Common functionality for checking whether an AST node/token is aligned +# with something on a preceding or following line +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:8 +module RuboCop::Cop::PrecedingFollowingAlignment + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:79 + def aligned_comment_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:102 + def aligned_equals_operator?(range, lineno); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:133 + def aligned_identical?(range, line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:90 + def aligned_operator?(range, line, lineno); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:86 + def aligned_token?(range, line, lineno); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:43 + def aligned_with_adjacent_line?(range, predicate); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:61 + def aligned_with_any_line?(line_ranges, range, indent = T.unsafe(nil), &predicate); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:51 + def aligned_with_any_line_range?(line_ranges, range, &predicate); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:125 + def aligned_with_append_operator?(range, token); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:137 + def aligned_with_equals_sign(token, line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:65 + def aligned_with_line?(line_nos, range, indent = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:23 + def aligned_with_operator?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:119 + def aligned_with_preceding_equals?(range, token); end + + # Allows alignment with a preceding operator that ends with an `=`, + # including assignment and comparison operators. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:29 + def aligned_with_preceding_equals_operator(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:19 + def aligned_with_something?(range); end + + # Allows alignment with a subsequent operator that ends with an `=`, + # including assignment and comparison operators. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:37 + def aligned_with_subsequent_equals_operator(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:94 + def aligned_words?(range, line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:15 + def allow_for_alignment?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:152 + def assignment_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:156 + def assignment_tokens; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:176 + def relevant_assignment_lines(line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:203 + def remove_equals_in_def(asgn_tokens, processed_source); end +end + +# Tokens that end with an `=`, as well as `<<`, that can be aligned together: +# `=`, `==`, `===`, `!=`, `<=`, `>=`, `<<` and operator assignment (`+=`, etc). +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:11 +RuboCop::Cop::PrecedingFollowingAlignment::ASSIGNMENT_OR_COMPARISON_TOKENS = T.let(T.unsafe(nil), Array) + +# Common functionality for handling percent literal delimiters. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:6 +class RuboCop::Cop::PreferredDelimiters + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:11 + def initialize(type, config, preferred_delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:7 + def config; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:17 + def delimiters; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:7 + def type; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:23 + def ensure_valid_preferred_delimiters; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:30 + def preferred_delimiters; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:45 + def preferred_delimiters_config; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:9 +RuboCop::Cop::PreferredDelimiters::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# This autocorrects punctuation +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/punctuation_corrector.rb:6 +class RuboCop::Cop::PunctuationCorrector + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/punctuation_corrector.rb:12 + def add_space(corrector, token); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/punctuation_corrector.rb:8 + def remove_space(corrector, space_before); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/punctuation_corrector.rb:16 + def swap_comma(corrector, range); end + end +end + +# Methods that calculate and return Parser::Source::Ranges +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:6 +module RuboCop::Cop::RangeHelp + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:152 + def add_range(range1, range2); end + + # A range containing the first to the last argument + # of a method call or method definition. + # def foo(a, b:) + # ^^^^^ + # bar(1, 2, 3, &blk) + # ^^^^^^^^^^^^^ + # baz { |x, y:, z:| } + # ^^^^^^^^^ + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:45 + def arguments_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:93 + def column_offset_between(base_range, range); end + + # A range containing only the contents of a literal with delimiters (e.g. in + # `%i{1 2 3}` this will be the range covering `1 2 3` only). + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:33 + def contents_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:111 + def directions(side); end + + # Returns the column attribute of the range, except if the range is on + # the first line and there's a byte order mark at the beginning of that + # line, in which case 1 is subtracted from the column value. This gives + # the column as it appears when viewing the file in an editor. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:103 + def effective_column(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:120 + def final_pos(src, pos, increment, continuations, newlines, whitespace); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:128 + def move_pos(src, pos, step, condition, regexp); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:134 + def move_pos_str(src, pos, step, condition, needle); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:49 + def range_between(start_pos, end_pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:84 + def range_by_whole_lines(range, include_final_newline: T.unsafe(nil), buffer: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:145 + def range_with_comments(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:141 + def range_with_comments_and_lines(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:53 + def range_with_surrounding_comma(range, side = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:67 + def range_with_surrounding_space(range_positional = T.unsafe(nil), range: T.unsafe(nil), side: T.unsafe(nil), newlines: T.unsafe(nil), whitespace: T.unsafe(nil), continuations: T.unsafe(nil), buffer: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:12 + def source_range(source_buffer, line_number, column, length = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:7 +RuboCop::Cop::RangeHelp::BYTE_ORDER_MARK = T.let(T.unsafe(nil), Integer) + +# The Unicode codepoint +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:8 +module RuboCop::Cop::RangeHelp::NOT_GIVEN; end + +# Common functionality for handling Rational literals. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/rational_literal.rb:6 +module RuboCop::Cop::RationalLiteral + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/rational_literal.rb:12 + def rational_literal?(param0 = T.unsafe(nil)); end +end + +# Registry that tracks all cops by their badge and department. +# +# pkg:gem/rubocop#lib/rubocop/cop/registry.rb:19 +class RuboCop::Cop::Registry + include ::Enumerable + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:51 + def initialize(cops = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:233 + def ==(other); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:98 + def contains_cop_matching?(names); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:180 + def cops; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:225 + def cops_for_department(department); end + + # @return [Boolean] Checks if given name is department + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:94 + def department?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:148 + def department_missing?(badge, name); end + + # @return [Array] list of departments for current cops. + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:73 + def departments; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:194 + def disabled(config); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:68 + def dismiss(cop); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:248 + def each(&block); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:190 + def enabled(config); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:198 + def enabled?(cop, config); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:214 + def enabled_pending_cop?(cop_cfg, config); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:64 + def enlist(cop); end + + # @param [String] cop_name + # @return [Class, nil] + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:254 + def find_by_cop_name(cop_name); end + + # When a cop name is given returns a single-element array with the cop class. + # When a department name is given returns an array with all the cop classes + # for that department. + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:261 + def find_cops_by_directive(directive); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:266 + def freeze; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:185 + def length; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:221 + def names; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:229 + def names_for_department(department); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:49 + def options; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:152 + def print_department_missing_warning(name, path); end + + # Convert a user provided cop name into a properly namespaced name + # + # @example gives back a correctly qualified cop name + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('Layout/EndOfLine', '') # => 'Layout/EndOfLine' + # + # @example fixes incorrect namespaces + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('Lint/EndOfLine', '') # => 'Layout/EndOfLine' + # + # @example namespaces bare cop identifiers + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('EndOfLine', '') # => 'Layout/EndOfLine' + # + # @example passes back unrecognized cop names + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('NotACop', '') # => 'NotACop' + # + # @param name [String] Cop name extracted from config + # @param path [String, nil] Path of file that `name` was extracted from + # @param warn [Boolean] Print a warning if no department given for `name` + # + # @raise [AmbiguousCopName] + # if a bare identifier with two possible namespaces is provided + # + # @note Emits a warning if the provided name has an incorrect namespace + # + # @return [String] Qualified cop name + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:134 + def qualified_cop_name(name, path, warn: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:167 + def qualify_badge(badge); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:244 + def select(&block); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:237 + def sort!; end + + # @return [Hash{String => Array}] + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:175 + def to_h; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:160 + def unqualified_cop_names; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:49 + def warnings; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:278 + def warnings?(path); end + + # @return [Registry] Cops for that specific department. + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:79 + def with_department(department); end + + # @return [Registry] Cops not for a specific department. + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:85 + def without_department(department); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:288 + def clear_enrollment_queue; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:314 + def emit_warning(path, message); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:284 + def initialize_copy(reg); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:319 + def registered?(badge); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:304 + def resolve_badge(given_badge, real_badge, source_path, warn: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:300 + def with(cops); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:22 + def all; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:275 + def global; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:44 + def qualified_cop?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:26 + def qualified_cop_name(name, origin, warn: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:40 + def reset!; end + + # Changes momentarily the global registry + # Intended for testing purposes + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:32 + def with_temporary_global(temp_global = T.unsafe(nil)); end + end +end + +# Ensure a require statement is present for a standard library determined +# by variable library_name +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:7 +module RuboCop::Cop::RequireLibrary + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:12 + def ensure_required(corrector, node, library_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:33 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:24 + def remove_subsequent_requires(corrector, node, library_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:51 + def require_any_library?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:56 + def require_library_name?(param0 = T.unsafe(nil), param1); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:44 + def on_new_investigation; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:10 +RuboCop::Cop::RequireLibrary::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# This class ensures a require statement is present for a standard library +# determined by the variable library_name +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/require_library_corrector.rb:7 +class RuboCop::Cop::RequireLibraryCorrector + extend ::RuboCop::Cop::RangeHelp + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/require_library_corrector.rb:11 + def correct(corrector, node, library_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/require_library_corrector.rb:17 + def require_statement(library_name); end + end +end + +# Common functionality for checking `rescue` nodes. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/rescue_node.rb:6 +module RuboCop::Cop::RescueNode + # pkg:gem/rubocop#lib/rubocop/cop/mixin/rescue_node.rb:7 + def modifier_locations; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/rescue_node.rb:13 + def rescue_modifier?(node); end + + # @deprecated Use ResbodyNode#exceptions instead + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/rescue_node.rb:20 + def rescued_exceptions(resbody); end +end + +# Common functionality for safe assignment. By safe assignment we mean +# putting parentheses around an assignment to indicate "I know I'm using an +# assignment as a condition. It's not a mistake." +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/safe_assignment.rb:8 +module RuboCop::Cop::SafeAssignment + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/safe_assignment.rb:14 + def empty_condition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/safe_assignment.rb:20 + def safe_assignment?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/safe_assignment.rb:17 + def setter_method?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/safe_assignment.rb:22 + def safe_assignment_allowed?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:5 +module RuboCop::Cop::Security; end + +# Checks for implementations of the `hash` method which combine +# values using custom logic instead of delegating to `Array#hash`. +# +# Manually combining hashes is error prone and hard to follow, especially +# when there are many values. Poor implementations may also introduce +# performance or security concerns if they are prone to collisions. +# Delegating to `Array#hash` is clearer and safer, although it might be slower +# depending on the use case. +# +# @safety +# This cop may be unsafe if the application logic depends on the hash +# value, however this is inadvisable anyway. +# +# @example +# +# # bad +# def hash +# @foo ^ @bar +# end +# +# # good +# def hash +# [@foo, @bar].hash +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:30 +class RuboCop::Cop::Security::CompoundHash < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:59 + def bad_hash_combinator?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:76 + def contained_in_hash_method?(node, &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:43 + def dynamic_hash_method_definition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:38 + def hash_method_definition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:64 + def monuple_hash?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:103 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:104 + def on_op_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:88 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:82 + def outer_bad_hash_combinator?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:69 + def redundant_hash?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:52 + def static_hash_method_definition?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:31 +RuboCop::Cop::Security::CompoundHash::COMBINATOR_IN_HASH_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:32 +RuboCop::Cop::Security::CompoundHash::MONUPLE_HASH_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:34 +RuboCop::Cop::Security::CompoundHash::REDUNDANT_HASH_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:35 +RuboCop::Cop::Security::CompoundHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of `Kernel#eval` and `Binding#eval` with +# dynamic strings as arguments. Evaluating non-literal strings +# can enable code injection attacks and makes it difficult to +# reason about what code will actually be executed. +# +# Calls to `eval` with literal strings are not flagged by this cop, +# as they do not pose the same injection risk. +# +# @example +# +# # bad +# eval(something) +# binding.eval(something) +# Kernel.eval(something) +# +# # good - use safer alternatives +# obj.public_send(method_name) +# obj.send(method_name, *args) +# +# # good - literal strings are allowed +# eval("1 + 1") +# binding.eval("foo") +# +# pkg:gem/rubocop#lib/rubocop/cop/security/eval.rb:28 +class RuboCop::Cop::Security::Eval < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/security/eval.rb:33 + def eval?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/eval.rb:37 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/eval.rb:29 +RuboCop::Cop::Security::Eval::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/eval.rb:30 +RuboCop::Cop::Security::Eval::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the first argument to `IO.read`, `IO.binread`, `IO.write`, `IO.binwrite`, +# `IO.foreach`, and `IO.readlines`. +# +# If argument starts with a pipe character (`'|'`) and the receiver is the `IO` class, +# a subprocess is created in the same way as `Kernel#open`, and its output is returned. +# `Kernel#open` may allow unintentional command injection, which is the reason these +# `IO` methods are a security risk. +# Consider to use `File.read` to disable the behavior of subprocess invocation. +# +# @safety +# This cop is unsafe because false positive will occur if the variable passed as +# the first argument is a command that is not a file path. +# +# @example +# +# # bad +# IO.read(path) +# IO.read('path') +# +# # good +# File.read(path) +# File.read('path') +# IO.read('| command') # Allow intentional command invocation. +# +# pkg:gem/rubocop#lib/rubocop/cop/security/io_methods.rb:30 +class RuboCop::Cop::Security::IoMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/security/io_methods.rb:36 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/io_methods.rb:33 +RuboCop::Cop::Security::IoMethods::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/io_methods.rb:34 +RuboCop::Cop::Security::IoMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of JSON class methods which have potential +# security issues. +# +# `JSON.load` and similar methods allow deserialization of arbitrary ruby objects: +# +# [source,ruby] +# ---- +# require 'json/add/string' +# result = JSON.load('{ "json_class": "String", "raw": [72, 101, 108, 108, 111] }') +# pp result # => "Hello" +# ---- +# +# Never use `JSON.load` for untrusted user input. Prefer `JSON.parse` unless you have +# a concrete use-case for `JSON.load`. +# +# NOTE: Starting with `json` gem version 2.8.0, triggering this behavior without explicitly +# passing the `create_additions` keyword argument emits a deprecation warning, with the +# goal of being secure by default in the next major version 3.0.0. +# +# @safety +# This cop's autocorrection is unsafe because it's potentially dangerous. +# If using a stream, like `JSON.load(open('file'))`, you will need to call +# `#read` manually, like `JSON.parse(open('file').read)`. +# Other similar issues may apply. +# +# @example +# # bad +# JSON.load('{}') +# JSON.restore('{}') +# +# # good +# JSON.parse('{}') +# JSON.unsafe_load('{}') +# +# # good - explicit use of `create_additions` option +# JSON.load('{}', create_additions: true) +# JSON.load('{}', create_additions: false) +# +# pkg:gem/rubocop#lib/rubocop/cop/security/json_load.rb:44 +class RuboCop::Cop::Security::JSONLoad < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/security/json_load.rb:51 + def insecure_json_load(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/json_load.rb:59 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/json_load.rb:47 +RuboCop::Cop::Security::JSONLoad::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/json_load.rb:48 +RuboCop::Cop::Security::JSONLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of Marshal class methods which have +# potential security issues leading to remote code execution when +# loading from an untrusted source. +# +# @example +# # bad +# Marshal.load("{}") +# Marshal.restore("{}") +# +# # good +# Marshal.dump("{}") +# +# # okish - deep copy hack +# Marshal.load(Marshal.dump({})) +# +# pkg:gem/rubocop#lib/rubocop/cop/security/marshal_load.rb:21 +class RuboCop::Cop::Security::MarshalLoad < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/security/marshal_load.rb:26 + def marshal_load(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/marshal_load.rb:31 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/marshal_load.rb:22 +RuboCop::Cop::Security::MarshalLoad::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/marshal_load.rb:23 +RuboCop::Cop::Security::MarshalLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of `Kernel#open` and `URI.open` with dynamic +# data. +# +# `Kernel#open` and `URI.open` enable not only file access but also process +# invocation by prefixing a pipe symbol (e.g., `open("| ls")`). +# So, it may lead to a serious security risk by using variable input to +# the argument of `Kernel#open` and `URI.open`. It would be better to use +# `File.open`, `IO.popen` or `URI.parse#open` explicitly. +# +# NOTE: `open` and `URI.open` with literal strings are not flagged by this +# cop. +# +# @safety +# This cop could register false positives if `open` is redefined +# in a class and then used without a receiver in that class. +# +# @example +# # bad +# open(something) +# open("| #{something}") +# open("| foo") +# URI.open(something) +# +# # good +# File.open(something) +# IO.popen(something) +# URI.parse(something).open +# +# # good (literal strings) +# open("foo.text") +# URI.open("http://example.com") +# URI.parse(url).open +# +# pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:38 +class RuboCop::Cop::Security::Open < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:47 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:43 + def open?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:76 + def composite_string?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:84 + def concatenated_string?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:80 + def interpolated_string?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:58 + def safe?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:68 + def safe_argument?(argument); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:72 + def simple_string?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:39 +RuboCop::Cop::Security::Open::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:40 +RuboCop::Cop::Security::Open::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of YAML class methods which have +# potential security issues leading to remote code execution when +# loading from an untrusted source. +# +# NOTE: Ruby 3.1+ (Psych 4) uses `Psych.load` as `Psych.safe_load` by default. +# +# @safety +# The behavior of the code might change depending on what was +# in the YAML payload, since `YAML.safe_load` is more restrictive. +# +# @example +# # bad +# YAML.load("--- !ruby/object:Foo {}") # Psych 3 is unsafe by default +# +# # good +# YAML.safe_load("--- !ruby/object:Foo {}", [Foo]) # Ruby 2.5 (Psych 3) +# YAML.safe_load("--- !ruby/object:Foo {}", permitted_classes: [Foo]) # Ruby 3.0- (Psych 3) +# YAML.load("--- !ruby/object:Foo {}", permitted_classes: [Foo]) # Ruby 3.1+ (Psych 4) +# YAML.dump(foo) +# +# pkg:gem/rubocop#lib/rubocop/cop/security/yaml_load.rb:26 +class RuboCop::Cop::Security::YAMLLoad < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/security/yaml_load.rb:40 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/yaml_load.rb:36 + def yaml_load(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/yaml_load.rb:30 +RuboCop::Cop::Security::YAMLLoad::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/yaml_load.rb:31 +RuboCop::Cop::Security::YAMLLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Severity class is simple value object about severity +# +# pkg:gem/rubocop#lib/rubocop/cop/severity.rb:6 +class RuboCop::Cop::Severity + include ::Comparable + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:30 + def initialize(name_or_code); end + + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:62 + def <=>(other); end + + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:50 + def ==(other); end + + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:42 + def code; end + + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:58 + def hash; end + + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:46 + def level; end + + # @api public + # + # @!attribute [r] name + # + # @return [Symbol] + # severity. + # any of `:info`, `:refactor`, `:convention`, `:warning`, `:error` or `:fatal`. + # + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:22 + def name; end + + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:38 + def to_s; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:24 + def name_from_code(code); end + end +end + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cop/severity.rb:12 +RuboCop::Cop::Severity::CODE_TABLE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/severity.rb:9 +RuboCop::Cop::Severity::NAMES = T.let(T.unsafe(nil), Array) + +# Common functionality for cops checking for missing space after +# punctuation. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:7 +module RuboCop::Cop::SpaceAfterPunctuation + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:10 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:39 + def allowed_type?(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:20 + def each_missing_space(tokens); end + + # The normal offset, i.e., the distance from the punctuation + # token where a space should be, is 1. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:50 + def offset; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:43 + def space_forbidden_before_rcurly?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:31 + def space_missing?(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:35 + def space_required_before?(token); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:8 +RuboCop::Cop::SpaceAfterPunctuation::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for cops checking for space before +# punctuation. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/space_before_punctuation.rb:7 +module RuboCop::Cop::SpaceBeforePunctuation + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_before_punctuation.rb:12 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_before_punctuation.rb:22 + def each_missing_space(tokens); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_before_punctuation.rb:34 + def space_missing?(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_before_punctuation.rb:38 + def space_required_after?(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_before_punctuation.rb:42 + def space_required_after_lcurly?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/space_before_punctuation.rb:10 +RuboCop::Cop::SpaceBeforePunctuation::MSG = T.let(T.unsafe(nil), String) + +# This autocorrects whitespace +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/space_corrector.rb:6 +class RuboCop::Cop::SpaceCorrector + extend ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::SurroundingSpace + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/space_corrector.rb:36 + def add_space(processed_source, corrector, left_token, right_token); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/space_corrector.rb:12 + def empty_corrections(processed_source, corrector, empty_config, left_token, right_token); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/space_corrector.rb:10 + def processed_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/space_corrector.rb:24 + def remove_space(processed_source, corrector, left_token, right_token); end + end +end + +# Common functionality for modifier cops. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:6 +module RuboCop::Cop::StatementModifier + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:85 + def code_after(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:103 + def comment_disables_cop?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:77 + def first_line_comment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:57 + def if_body_source(if_body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:43 + def length_in_modifier_form(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:71 + def method_source(if_body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:37 + def modifier_fits_on_single_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:26 + def non_eligible_body?(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:33 + def non_eligible_condition?(condition); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:19 + def non_eligible_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:65 + def omitted_value_in_last_hash_arg?(if_body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:91 + def parenthesize?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:11 + def single_line_as_modifier?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:50 + def to_modifier_form(node); end +end + +# Classes that include this module just implement functions to determine +# what is an offense and how to do autocorrection. They get help with +# adding offenses for the faulty string nodes, and with filtering out +# nodes. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/string_help.rb:9 +module RuboCop::Cop::StringHelp + # pkg:gem/rubocop#lib/rubocop/cop/mixin/string_help.rb:26 + def on_regexp(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/string_help.rb:10 + def on_str(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/string_help.rb:32 + def inside_interpolation?(node); end +end + +# This autocorrects string literals +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/string_literal_corrector.rb:6 +class RuboCop::Cop::StringLiteralCorrector + extend ::RuboCop::PathUtil + extend ::RuboCop::Cop::Util + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/string_literal_corrector.rb:10 + def correct(corrector, node, style); end + end +end + +# Common functionality for cops checking single/double quotes. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/string_literals_help.rb:6 +module RuboCop::Cop::StringLiteralsHelp + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/string_literals_help.rb:24 + def enforce_double_quotes?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/string_literals_help.rb:20 + def preferred_string_literal; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/string_literals_help.rb:28 + def string_literals_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/string_literals_help.rb:9 + def wrong_quotes?(src_or_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:5 +module RuboCop::Cop::Style; end + +# Access modifiers should be declared to apply to a group of methods +# or inline before each method, depending on configuration. +# EnforcedStyle config covers only method definitions. +# Applications of visibility methods to symbols can be controlled +# using AllowModifiersOnSymbols config. +# Also, the visibility of `attr*` methods can be controlled using +# AllowModifiersOnAttrs config. +# +# In Ruby 3.0, `attr*` methods now return an array of defined method names +# as symbols. So we can write the modifier and `attr*` in inline style. +# AllowModifiersOnAttrs config allows `attr*` methods to be written in +# inline style without modifying applications that have been maintained +# for a long time in group style. Furthermore, developers who are not very +# familiar with Ruby may know that the modifier applies to `def`, but they +# may not know that it also applies to `attr*` methods. It would be easier +# to understand if we could write `attr*` methods in inline style. +# +# @safety +# Autocorrection is not safe, because the visibility of dynamically +# defined methods can vary depending on the state determined by +# the group access modifier. +# +# @example EnforcedStyle: group (default) +# # bad +# class Foo +# +# private def bar; end +# private def baz; end +# +# end +# +# # good +# class Foo +# +# private +# +# def bar; end +# def baz; end +# +# end +# +# @example EnforcedStyle: inline +# # bad +# class Foo +# +# private +# +# def bar; end +# def baz; end +# +# end +# +# # good +# class Foo +# +# private def bar; end +# private def baz; end +# +# end +# +# @example AllowModifiersOnSymbols: true (default) +# # good +# class Foo +# +# private :bar, :baz +# private *%i[qux quux] +# private *METHOD_NAMES +# private *private_methods +# +# end +# +# @example AllowModifiersOnSymbols: false +# # bad +# class Foo +# +# private :bar, :baz +# private *%i[qux quux] +# private *METHOD_NAMES +# private *private_methods +# +# end +# +# @example AllowModifiersOnAttrs: true (default) +# # good +# class Foo +# +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux +# +# def public_method; end +# +# private +# +# def private_method; end +# +# end +# +# @example AllowModifiersOnAttrs: false +# # bad +# class Foo +# +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux +# +# end +# +# @example AllowModifiersOnAliasMethod: true (default) +# # good +# class Foo +# +# public alias_method :bar, :foo +# protected alias_method :baz, :foo +# private alias_method :qux, :foo +# +# end +# +# @example AllowModifiersOnAliasMethod: false +# # bad +# class Foo +# +# public alias_method :bar, :foo +# protected alias_method :baz, :foo +# private alias_method :qux, :foo +# +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:135 +class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:167 + def access_modifier_with_alias_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:161 + def access_modifier_with_attr?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:154 + def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:172 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:263 + def access_modifier_is_inlined?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:267 + def access_modifier_is_not_inlined?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:234 + def allow_modifiers_on_alias_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:230 + def allow_modifiers_on_attrs?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:226 + def allow_modifiers_on_symbols?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:187 + def allowed?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:195 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:204 + def autocorrect_group_style(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:211 + def autocorrect_inline_style(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:248 + def correctable_group_offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:367 + def def_source(node, def_nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:310 + def find_argument_less_modifier_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:291 + def find_corresponding_def_nodes(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:358 + def first_comment_or_node_start(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:255 + def group_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:259 + def inline_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:339 + def insert_inline_modifier(corrector, node, modifier_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:281 + def message(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:238 + def offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:222 + def percent_symbol_array?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:349 + def remove_modifier_node_within_begin(corrector, modifier_node, begin_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:343 + def remove_nodes(corrector, *nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:324 + def replace_defs(corrector, node, def_nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:271 + def right_siblings_same_inline_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:318 + def select_grouped_def_nodes(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:141 +RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:146 +RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:151 +RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for grouping of accessors in `class` and `module` bodies. +# By default it enforces accessors to be placed in grouped +# declarations, reducing boilerplate. It can also be configured +# to enforce separating them into individual declarations for +# easier diffing and per-attribute documentation. +# +# NOTE: If there is a method call before the accessor method it is always allowed +# as it might be intended like Sorbet. +# +# NOTE: If there is a RBS::Inline annotation comment just after the accessor method +# it is always allowed. +# +# @example EnforcedStyle: grouped (default) +# # bad +# class Foo +# attr_reader :bar +# attr_reader :bax +# attr_reader :baz +# end +# +# # good +# class Foo +# attr_reader :bar, :bax, :baz +# end +# +# # good +# class Foo +# # may be intended comment for bar. +# attr_reader :bar +# +# sig { returns(String) } +# attr_reader :bax +# +# may_be_intended_annotation :baz +# attr_reader :baz +# end +# +# @example EnforcedStyle: separated +# # bad +# class Foo +# attr_reader :bar, :baz +# end +# +# # good +# class Foo +# attr_reader :bar +# attr_reader :baz +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:55 +class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:64 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:72 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:71 + def on_sclass(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:87 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:76 + def check(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:127 + def class_send_elements(class_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:184 + def group_accessors(node, accessors); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:104 + def groupable_accessor?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:147 + def groupable_sibling_accessor?(node, sibling); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:154 + def groupable_sibling_accessors(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:139 + def grouped_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:160 + def message(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:165 + def preferred_accessors(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:99 + def previous_line_comment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:205 + def range_with_trailing_argument_comment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:190 + def separate_accessors(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:143 + def separated_style?; end + + # Group after constants + # + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:179 + def skip_for_grouping?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:61 +RuboCop::Cop::Style::AccessorGrouping::GROUPED_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:62 +RuboCop::Cop::Style::AccessorGrouping::SEPARATED_MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of either `#alias` or `#alias_method` +# depending on configuration. Consistent use of one or the +# other prevents confusion about their different semantics +# (e.g., `alias` is resolved at parse time, while `alias_method` +# is resolved at runtime). +# It also flags uses of `alias :symbol` rather than `alias bareword`. +# +# However, it will always enforce `method_alias` when used `alias` +# in an instance method definition and in a singleton method definition. +# If used in a block, always enforce `alias_method` +# unless it is an `instance_eval` block. +# +# @example EnforcedStyle: prefer_alias (default) +# # bad +# alias_method :bar, :foo +# alias :bar :foo +# +# # good +# alias bar foo +# +# @example EnforcedStyle: prefer_alias_method +# # bad +# alias :bar :foo +# alias bar foo +# +# # good +# alias_method :bar, :foo +# +# pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:34 +class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:55 + def on_alias(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:44 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:89 + def add_offense_for_args(node, &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:79 + def alias_keyword_possible?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:83 + def alias_method_possible?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:69 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:128 + def bareword?(sym_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:132 + def correct_alias_method_to_alias(corrector, send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:139 + def correct_alias_to_alias_method(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:146 + def correct_alias_with_symbol_args(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:151 + def identifier(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:117 + def lexical_scope_type(node); end + + # In this expression, will `self` be the same as the innermost enclosing + # class or module block (:lexical)? Or will it be something else + # (:dynamic)? If we're in an instance_eval block, return that. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:100 + def scope_type(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:38 +RuboCop::Cop::Style::Alias::MSG_ALIAS = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:39 +RuboCop::Cop::Style::Alias::MSG_ALIAS_METHOD = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:40 +RuboCop::Cop::Style::Alias::MSG_SYMBOL_ARGS = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:42 +RuboCop::Cop::Style::Alias::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for endless methods inside operations of lower precedence (`and`, `or`, and +# modifier forms of `if`, `unless`, `while`, `until`) that are ambiguous due to +# lack of parentheses. This may lead to unexpected behavior as the code may appear +# to use these keywords as part of the method but in fact they modify +# the method definition itself. +# +# In these cases, using a normal method definition is more clear. +# +# @example +# +# # bad +# def foo = true if bar +# +# # good - using a non-endless method is more explicit +# def foo +# true +# end if bar +# +# # ok - method body is explicit +# def foo = (true if bar) +# +# # ok - method definition is explicit +# (def foo = true) if bar +# +# pkg:gem/rubocop#lib/rubocop/cop/style/ambiguous_endless_method_definition.rb:29 +class RuboCop::Cop::Style::AmbiguousEndlessMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::EndlessMethodRewriter + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/style/ambiguous_endless_method_definition.rb:40 + def ambiguous_endless_method_body(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/ambiguous_endless_method_definition.rb:48 + def on_def(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/style/ambiguous_endless_method_definition.rb:69 + def keyword(operation); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/ambiguous_endless_method_definition.rb:63 + def modifier_form?(operation); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/style/ambiguous_endless_method_definition.rb:37 +RuboCop::Cop::Style::AmbiguousEndlessMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of `and` and `or`, and suggests using `&&` and +# `||` instead. It can be configured to check only in conditions or in +# all contexts. +# +# @safety +# Autocorrection is unsafe because there is a different operator precedence +# between logical operators (`&&` and `||`) and semantic operators (`and` and `or`), +# and that might change the behavior. +# +# @example EnforcedStyle: conditionals (default) +# # bad +# if foo and bar +# end +# +# # good +# foo.save && return +# +# # good +# foo.save and return +# +# # good +# if foo && bar +# end +# +# @example EnforcedStyle: always +# # bad +# foo.save and return +# +# # bad +# if foo and bar +# end +# +# # good +# foo.save && return +# +# # good +# if foo && bar +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:44 +class RuboCop::Cop::Style::AndOr < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:51 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:56 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:54 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:61 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:62 + def on_until_post(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:59 + def on_while(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:60 + def on_while_post(node); end + + private + + # ! is a special case: + # 'x and !obj.method arg' can be autocorrected if we + # recurse down a level and add parens to 'obj.method arg' + # however, 'not x' also parses as (send x :!) + # + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:117 + def correct_not(node, receiver, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:129 + def correct_other(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:95 + def correct_send(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:108 + def correct_setter(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:144 + def correctable_send?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:136 + def keep_operator_precedence(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:91 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:85 + def on_conditionals(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:66 + def process_logical_operator(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:148 + def whitespace_before_arg(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:49 +RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) + +# In Ruby 2.7, arguments forwarding has been added. +# +# This cop identifies places where `do_something(*args, &block)` +# can be replaced by `do_something(...)`. +# +# In Ruby 3.1, anonymous block forwarding has been added. +# +# This cop identifies places where `do_something(&block)` can be replaced +# by `do_something(&)`; if desired, this functionality can be disabled +# by setting `UseAnonymousForwarding: false`. +# +# In Ruby 3.2, anonymous args/kwargs forwarding has been added. +# +# This cop also identifies places where `+use_args(*args)+`/`+use_kwargs(**kwargs)+` can be +# replaced by `+use_args(*)+`/`+use_kwargs(**)+`; if desired, this functionality can be +# disabled by setting `UseAnonymousForwarding: false`. +# +# And this cop has `RedundantRestArgumentNames`, `RedundantKeywordRestArgumentNames`, +# and `RedundantBlockArgumentNames` options. This configuration is a list of redundant names +# that are sufficient for anonymizing meaningless naming. +# +# Meaningless names that are commonly used can be anonymized by default: +# e.g., `+*args+`, `+**options+`, `&block`, and so on. +# +# Names not on this list are likely to be meaningful and are allowed by default. +# +# This cop handles not only method forwarding but also forwarding to `super`. +# +# [NOTE] +# ==== +# Because of a bug in Ruby 3.3.0, when a block is referenced inside of another block, +# no offense will be registered until Ruby 3.4: +# +# [source,ruby] +# ---- +# def foo(&block) +# # Using an anonymous block would be a syntax error on Ruby 3.3.0 +# block_method { bar(&block) } +# end +# ---- +# ==== +# +# @example +# # bad +# def foo(*args, &block) +# bar(*args, &block) +# end +# +# # bad +# def foo(*args, **kwargs, &block) +# bar(*args, **kwargs, &block) +# end +# +# # good +# def foo(...) +# bar(...) +# end +# +# @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2) +# # bad +# def foo(*args, **kwargs, &block) +# args_only(*args) +# kwargs_only(**kwargs) +# block_only(&block) +# end +# +# # good +# def foo(*, **, &) +# args_only(*) +# kwargs_only(**) +# block_only(&) +# end +# +# @example UseAnonymousForwarding: false (only relevant for Ruby >= 3.2) +# # good +# def foo(*args, **kwargs, &block) +# args_only(*args) +# kwargs_only(**kwargs) +# block_only(&block) +# end +# +# @example AllowOnlyRestArgument: true (default, only relevant for Ruby < 3.2) +# # good +# def foo(*args) +# bar(*args) +# end +# +# def foo(**kwargs) +# bar(**kwargs) +# end +# +# @example AllowOnlyRestArgument: false (only relevant for Ruby < 3.2) +# # bad +# # The following code can replace the arguments with `...`, +# # but it will change the behavior. Because `...` forwards block also. +# def foo(*args) +# bar(*args) +# end +# +# def foo(**kwargs) +# bar(**kwargs) +# end +# +# @example RedundantRestArgumentNames: ['args', 'arguments'] (default) +# # bad +# def foo(*args) +# bar(*args) +# end +# +# # good +# def foo(*) +# bar(*) +# end +# +# @example RedundantKeywordRestArgumentNames: ['kwargs', 'options', 'opts'] (default) +# # bad +# def foo(**kwargs) +# bar(**kwargs) +# end +# +# # good +# def foo(**) +# bar(**) +# end +# +# @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default) +# # bad - But it is good with `EnforcedStyle: explicit` set for `Naming/BlockForwarding`. +# def foo(&block) +# bar(&block) +# end +# +# # good +# def foo(&) +# bar(&) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:141 +class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:159 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:179 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:201 + def add_forward_all_offenses(node, send_classifications, forwardable_args); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:379 + def add_parens_if_missing(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:230 + def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end + + # Checks if forwarding is uses both in blocks and outside of blocks. + # On Ruby 3.3.0, anonymous block forwarding in blocks can be is a syntax + # error, so we only want to register an offense if we can change all occurrences. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:312 + def all_forwarding_offenses_correctable?(send_classifications); end + + # Ruby 3.3.0 had a bug where accessing an anonymous block argument inside of a block + # was a syntax error in unambiguous cases: https://bugs.ruby-lang.org/issues/20090 + # We disallow this also for earlier Ruby versions so that code is forwards compatible. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:323 + def allow_anonymous_forwarding_in_block?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:371 + def allow_only_rest_arguments?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:367 + def arguments_range(node, first_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:280 + def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:265 + def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:576 + def explicit_block_name?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:183 + def extract_forwardable_args(args); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:225 + def forward_all_first_argument(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:255 + def non_splat_or_block_pass_lvar_references(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:195 + def only_forwards_all?(send_classifications); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:187 + def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:299 + def redundant_named_arg(arg, config_name, keyword); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:357 + def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:330 + def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:346 + def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:338 + def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:375 + def use_anonymous_forwarding?; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:155 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:151 +RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:153 +RuboCop::Cop::Style::ArgumentsForwarding::BLOCK_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:148 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:150 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:152 +RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String) + +# Classifies send nodes for possible rest/kwrest/all (including block) forwarding. +# +# pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:387 +class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:416 + def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:462 + def classification; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:400 + def def_all_anonymous_args?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:394 + def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:450 + def forwarded_block_arg; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:397 + def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:438 + def forwarded_kwrest_arg; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:426 + def forwarded_rest_arg; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:391 + def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:409 + def send_all_anonymous_args?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:547 + def additional_kwargs?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:543 + def additional_kwargs_or_forwarded_kwargs?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:557 + def allow_offense_for_no_block?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:528 + def any_arg_referenced?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:512 + def arguments; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:477 + def can_forward_all?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:551 + def forward_additional_kwargs?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:508 + def forwarded_rest_and_kwrest_args; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:570 + def missing_rest_arg_or_kwrest_arg?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:561 + def no_additional_args?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:536 + def no_post_splat_args?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:504 + def offensive_block_forwarding?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:524 + def referenced_block_arg?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:520 + def referenced_kwrest_arg?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:516 + def referenced_rest_arg?; end + + # def foo(a = 41, ...) is a syntax error in 3.0. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:489 + def ruby_30_or_lower_optarg?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:493 + def ruby_32_only_anonymous_forwarding?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:500 + def ruby_32_or_higher_missing_rest_or_kwest?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:532 + def target_ruby_version; end +end + +# Enforces the use of `Array()` instead of explicit `Array` check or `[*var]`. +# +# The cop is disabled by default due to safety concerns. +# +# @safety +# This cop is unsafe because a false positive may occur if +# the argument of `Array()` is (or could be) nil or depending +# on how the argument is handled by `Array()` (which can be +# different than just wrapping the argument in an array). +# +# For example: +# +# [source,ruby] +# ---- +# [nil] #=> [nil] +# Array(nil) #=> [] +# +# [{a: 'b'}] #= [{a: 'b'}] +# Array({a: 'b'}) #=> [[:a, 'b']] +# +# [Time.now] #=> [#